reactjs-tiptap-editor-pro 0.2.26 → 0.2.27

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,14 +1,14 @@
1
- import { a as ft, I as gt, U as bt, S as xt, C as pt, f as oe, N as re, b as wt, c as yt, R as Se, F as kt, H as vt, T as Ct, E as A, d as Nt, e as At, g as Lt, h as ge, O as St, i as Tt, j as Et, k as Ht, L as zt, l as Mt, m as be, n as Pt, o as Rt, D as It, P as jt, p as Bt, q as Dt, G as Ot, r as $t, s as Ft, t as Ut, u as qt, v as Kt, w as Vt, x as Je, y as Ye, z as Qe, A as Te, M as Wt } from "./tiptap-DkWHMWDt.js";
2
- import { P as te, b as Z, $ as se, a0 as ce, al as P, am as Gt, T as Xe, A as Zt, an as Jt, ao as Yt } from "./vendor-Cpa6z-M0.js";
3
- import { jsxs as u, jsx as r, Fragment as xe } from "react/jsx-runtime";
1
+ import { a as ft, I as gt, U as bt, S as pt, C as wt, f as oe, N as se, b as yt, c as kt, R as Se, F as vt, H as xt, T as Ct, E as A, d as Nt, e as At, g as Lt, h as ge, O as St, i as Tt, j as Et, k as Ht, L as zt, l as Mt, m as be, n as Pt, o as Rt, D as It, P as jt, p as Bt, q as Dt, G as Ot, r as $t, s as Ft, t as Ut, u as qt, v as Kt, w as Vt, x as Je, y as Ye, z as Qe, A as Te, M as Wt } from "./tiptap-DkWHMWDt.js";
2
+ import { P as te, b as Z, $ as re, a0 as le, al as P, am as Gt, T as Xe, A as Zt, an as Jt, ao as Yt } from "./vendor-Cpa6z-M0.js";
3
+ import { jsxs as m, jsx as s, Fragment as pe } from "react/jsx-runtime";
4
4
  import * as J from "react";
5
5
  import Qt, { useMemo as R, useState as C, useRef as G, useCallback as F, Fragment as Ee, forwardRef as He, useImperativeHandle as ze, useEffect as z } from "react";
6
- import { ChevronDown as Me, Check as Xt, ChevronUp as en, Copy as tn, CopyCheck as nn, SearchIcon as an, LoaderIcon as on, LucideTableProperties as rn, LucideSheet as sn, LucideImage as cn, LucideFile as ln, LucideVideo as dn, LucideAudioLines as hn } from "lucide-react";
7
- import { i as Pe, T as pe, a as we, B as V, b as ye, g as Re, A as x, D as Y, c as Q, d as X, e as un, f as T, u as Ie, h as mn, I as M, j as ne, k as et, l as Ae, m as _n, n as je, P as le, o as de, p as he, q as Be, C as fn, H as gn, L as bn, r as xn, M as pn, s as wn, t as Fe, v as me, w as K, E as D, x as yn, y as kn, V as vn, z as Ue, F as ke, G as qe, S as Cn, J as Nn, K as An, N as B, O as Ln, Q as Sn, U as Tn, W as En, X as Hn, Y as tt } from "./RichTextEditor-iBDjgtlT.js";
8
- import { a4 as Ao, a0 as Lo, _ as So, a1 as To, $ as Eo, a2 as Ho, Z as zo, a3 as Mo } from "./RichTextEditor-iBDjgtlT.js";
9
- import { M as zn, D as nt, u as j, f as Mn, g as Pn, h as Ke, i as N, j as it, k as Rn } from "./index-M6H3FoBi.js";
10
- import { bundledThemes as at, bundledLanguages as ot, createHighlighter as In } from "shiki";
11
- import * as v from "@radix-ui/react-select";
6
+ import { ChevronDown as Me, Check as Xt, ChevronUp as en, Copy as tn, CopyCheck as nn, SearchIcon as an, LoaderIcon as on, LucideTableProperties as sn, LucideSheet as rn, LucideImage as ln, LucideFile as cn, LucideVideo as dn, LucideAudioLines as un } from "lucide-react";
7
+ import { i as Pe, T as we, a as ye, B as V, b as ke, g as Re, A as p, D as Y, c as Q, d as X, e as mn, f as T, u as Ie, h as hn, I as M, j as ne, k as et, l as Ae, m as _n, n as je, P as ce, o as de, p as ue, q as Be, C as fn, H as gn, L as bn, r as pn, M as wn, s as yn, t as Fe, v as he, w as K, E as D, x as kn, y as vn, V as xn, z as Ue, F as ve, G as qe, S as Cn, J as Nn, K as An, N as B, O as Ln, Q as Sn, U as Tn, W as En, X as Hn, Y as tt } from "./RichTextEditor-B1Y3PPzy.js";
8
+ import { a4 as Ao, a0 as Lo, _ as So, a1 as To, $ as Eo, a2 as Ho, Z as zo, a3 as Mo } from "./RichTextEditor-B1Y3PPzy.js";
9
+ import { M as zn, D as nt, u as j, f as Mn, g as Pn, h as Ke, i as N, j as at, k as Rn } from "./index-M6H3FoBi.js";
10
+ import { bundledThemes as it, bundledLanguages as ot, createHighlighter as In } from "shiki";
11
+ import * as x from "@radix-ui/react-select";
12
12
  import { Slot as jn } from "@radix-ui/react-slot";
13
13
  import De from "tippy.js";
14
14
  import Oe from "scroll-into-view-if-needed";
@@ -18,35 +18,35 @@ import { DocxSerializer as On, defaultNodes as U, defaultMarks as $n } from "pro
18
18
  const $e = Qt.forwardRef(
19
19
  ({ asChild: e, ...t }, n) => {
20
20
  var o;
21
- const i = Pe[t.icon];
22
- return /* @__PURE__ */ u(pe, { children: [
23
- /* @__PURE__ */ r(we, { asChild: !0, children: /* @__PURE__ */ r(
21
+ const a = Pe[t.icon];
22
+ return /* @__PURE__ */ m(we, { children: [
23
+ /* @__PURE__ */ s(ye, { asChild: !0, children: /* @__PURE__ */ s(
24
24
  e ? jn : V,
25
25
  {
26
- className: "richtext-h-[32px] richtext-min-w-24 richtext-overflow-hidden richtext-px-[5px] richtext-py-0",
26
+ className: "h-[32px] min-w-24 overflow-hidden px-[5px] py-0",
27
27
  disabled: t == null ? void 0 : t.disabled,
28
28
  ref: n,
29
29
  variant: "ghost",
30
30
  ...t,
31
- children: /* @__PURE__ */ u("div", { className: "richtext-flex richtext-h-full richtext-items-center richtext-font-normal", children: [
32
- (t == null ? void 0 : t.title) && /* @__PURE__ */ r("div", { className: "richtext-grow richtext-truncate richtext-text-left richtext-text-sm", children: t == null ? void 0 : t.title }),
33
- i && /* @__PURE__ */ r(i, { className: "richtext-ml-1 richtext-size-3 richtext-shrink-0 richtext-text-zinc-500" })
31
+ children: /* @__PURE__ */ m("div", { className: "flex h-full items-center font-normal", children: [
32
+ (t == null ? void 0 : t.title) && /* @__PURE__ */ s("div", { className: "grow truncate text-left text-sm", children: t == null ? void 0 : t.title }),
33
+ a && /* @__PURE__ */ s(a, { className: "ml-1 size-3 shrink-0 text-zinc-500" })
34
34
  ] })
35
35
  }
36
36
  ) }),
37
- /* @__PURE__ */ r(ye, { children: /* @__PURE__ */ u("div", { className: "richtext-flex richtext-max-w-24 richtext-flex-col richtext-items-center richtext-text-center", children: [
38
- (t == null ? void 0 : t.tooltip) && /* @__PURE__ */ r("div", { children: t == null ? void 0 : t.tooltip }),
39
- /* @__PURE__ */ r("div", { className: "richtext-flex", children: !!((o = t == null ? void 0 : t.shortcutKeys) != null && o.length) && /* @__PURE__ */ r("span", { children: Re(t == null ? void 0 : t.shortcutKeys) }) })
37
+ /* @__PURE__ */ s(ke, { children: /* @__PURE__ */ m("div", { className: "flex max-w-24 flex-col items-center text-center", children: [
38
+ (t == null ? void 0 : t.tooltip) && /* @__PURE__ */ s("div", { children: t == null ? void 0 : t.tooltip }),
39
+ /* @__PURE__ */ s("div", { className: "flex", children: !!((o = t == null ? void 0 : t.shortcutKeys) != null && o.length) && /* @__PURE__ */ s("span", { children: Re(t == null ? void 0 : t.shortcutKeys) }) })
40
40
  ] }) })
41
41
  ] });
42
42
  }
43
- ), Ua = ft.extend({
43
+ ), Ui = ft.extend({
44
44
  addOptions() {
45
45
  var e;
46
46
  return {
47
47
  ...(e = this.parent) == null ? void 0 : e.call(this),
48
48
  button: ({ editor: t, t: n }) => ({
49
- component: x,
49
+ component: p,
50
50
  componentProps: {
51
51
  action: () => t.commands.toggleBold(),
52
52
  isActive: () => t.isActive("bold") || !1,
@@ -58,14 +58,14 @@ const $e = Qt.forwardRef(
58
58
  })
59
59
  };
60
60
  }
61
- }), qa = gt.extend({
61
+ }), qi = gt.extend({
62
62
  addOptions() {
63
63
  var e;
64
64
  return {
65
65
  ...(e = this.parent) == null ? void 0 : e.call(this),
66
66
  button({ editor: t, t: n }) {
67
67
  return {
68
- component: x,
68
+ component: p,
69
69
  componentProps: {
70
70
  action: () => t.commands.toggleItalic(),
71
71
  isActive: () => t.isActive("italic") || !1,
@@ -78,14 +78,14 @@ const $e = Qt.forwardRef(
78
78
  }
79
79
  };
80
80
  }
81
- }), Ka = bt.extend({
81
+ }), Ki = bt.extend({
82
82
  addOptions() {
83
83
  var e;
84
84
  return {
85
85
  ...(e = this.parent) == null ? void 0 : e.call(this),
86
86
  button({ editor: t, t: n }) {
87
87
  return {
88
- component: x,
88
+ component: p,
89
89
  componentProps: {
90
90
  action: () => t.commands.toggleUnderline(),
91
91
  isActive: () => t.isActive("underline") || !1,
@@ -98,13 +98,13 @@ const $e = Qt.forwardRef(
98
98
  }
99
99
  };
100
100
  }
101
- }), Va = xt.extend({
101
+ }), Vi = pt.extend({
102
102
  addOptions() {
103
103
  var e;
104
104
  return {
105
105
  ...(e = this.parent) == null ? void 0 : e.call(this),
106
106
  button: ({ editor: t, t: n }) => ({
107
- component: x,
107
+ component: p,
108
108
  componentProps: {
109
109
  action: () => t.commands.toggleStrike(),
110
110
  isActive: () => t.isActive("strike") || !1,
@@ -116,13 +116,13 @@ const $e = Qt.forwardRef(
116
116
  })
117
117
  };
118
118
  }
119
- }), Wa = pt.extend({
119
+ }), Wi = wt.extend({
120
120
  addOptions() {
121
121
  var e;
122
122
  return {
123
123
  ...(e = this.parent) == null ? void 0 : e.call(this),
124
124
  button: ({ editor: t, t: n }) => ({
125
- component: x,
125
+ component: p,
126
126
  componentProps: {
127
127
  action: () => t.commands.toggleCode(),
128
128
  isActive: () => t.isActive("code") || !1,
@@ -135,85 +135,85 @@ const $e = Qt.forwardRef(
135
135
  };
136
136
  }
137
137
  });
138
- let I, ie;
139
- const ve = /* @__PURE__ */ new Set(), Ce = /* @__PURE__ */ new Set();
138
+ let I, ae;
139
+ const xe = /* @__PURE__ */ new Set(), Ce = /* @__PURE__ */ new Set();
140
140
  function Fn() {
141
141
  return I;
142
142
  }
143
143
  function Un(e) {
144
- if (!I && !ie) {
144
+ if (!I && !ae) {
145
145
  const t = e.themes.filter(
146
- (i) => !!i && i in at
146
+ (a) => !!a && a in it
147
147
  ), n = e.languages.filter(
148
- (i) => !!i && i in ot
148
+ (a) => !!a && a in ot
149
149
  );
150
- return ie = In({ themes: t, langs: n }).then((i) => {
151
- I = i;
152
- }), ie;
150
+ return ae = In({ themes: t, langs: n }).then((a) => {
151
+ I = a;
152
+ }), ae;
153
153
  }
154
- if (ie)
155
- return ie;
156
- }
157
- async function rt(e) {
158
- return I && !I.getLoadedThemes().includes(e) && !Ce.has(e) && e in at ? (Ce.add(e), await I.loadTheme(e), Ce.delete(e), !0) : !1;
154
+ if (ae)
155
+ return ae;
159
156
  }
160
157
  async function st(e) {
161
- return I && !I.getLoadedLanguages().includes(e) && !ve.has(e) && e in ot ? (ve.add(e), await I.loadLanguage(e), ve.delete(e), !0) : !1;
158
+ return I && !I.getLoadedThemes().includes(e) && !Ce.has(e) && e in it ? (Ce.add(e), await I.loadTheme(e), Ce.delete(e), !0) : !1;
159
+ }
160
+ async function rt(e) {
161
+ return I && !I.getLoadedLanguages().includes(e) && !xe.has(e) && e in ot ? (xe.add(e), await I.loadLanguage(e), xe.delete(e), !0) : !1;
162
162
  }
163
163
  async function qn({
164
164
  doc: e,
165
165
  name: t,
166
166
  defaultTheme: n,
167
- defaultLanguage: i
167
+ defaultLanguage: a
168
168
  }) {
169
- const a = oe(e, (c) => c.type.name === t), o = [
170
- ...a.map((c) => c.node.attrs.theme),
169
+ const i = oe(e, (l) => l.type.name === t), o = [
170
+ ...i.map((l) => l.node.attrs.theme),
171
171
  n
172
- ], s = [
173
- ...a.map((c) => c.node.attrs.language),
174
- i
172
+ ], r = [
173
+ ...i.map((l) => l.node.attrs.language),
174
+ a
175
175
  ];
176
176
  I ? await Promise.all([
177
- ...o.flatMap((c) => rt(c)),
178
- ...s.flatMap((c) => !!c && st(c))
179
- ]) : await Un({ languages: s, themes: o });
177
+ ...o.flatMap((l) => st(l)),
178
+ ...r.flatMap((l) => !!l && rt(l))
179
+ ]) : await Un({ languages: r, themes: o });
180
180
  }
181
181
  function Ve({
182
182
  doc: e,
183
183
  name: t,
184
184
  defaultTheme: n,
185
- defaultLanguage: i
185
+ defaultLanguage: a
186
186
  }) {
187
- const a = [];
188
- return oe(e, (s) => s.type.name === t).forEach((s) => {
189
- let c = s.pos + 1, h = s.node.attrs.language || i;
190
- const d = s.node.attrs.theme || n, l = Fn();
191
- if (!l)
187
+ const i = [];
188
+ return oe(e, (r) => r.type.name === t).forEach((r) => {
189
+ let l = r.pos + 1, u = r.node.attrs.language || a;
190
+ const d = r.node.attrs.theme || n, c = Fn();
191
+ if (!c)
192
192
  return;
193
- l.getLoadedLanguages().includes(h) || (h = "plaintext");
194
- const m = l.getLoadedThemes().includes(d) ? d : l.getLoadedThemes()[0], _ = l.codeToTokensBase(s.node.textContent, {
195
- lang: h,
196
- theme: m
193
+ c.getLoadedLanguages().includes(u) || (u = "plaintext");
194
+ const h = c.getLoadedThemes().includes(d) ? d : c.getLoadedThemes()[0], _ = c.codeToTokensBase(r.node.textContent, {
195
+ lang: u,
196
+ theme: h
197
197
  });
198
198
  for (const f of _) {
199
- for (const p of f) {
200
- const w = c + p.content.length, L = ce.inline(c, w, {
201
- style: `color: ${p.color}`
199
+ for (const w of f) {
200
+ const y = l + w.content.length, L = le.inline(l, y, {
201
+ style: `color: ${w.color}`
202
202
  });
203
- a.push(L), c = w;
203
+ i.push(L), l = y;
204
204
  }
205
- c += 1;
205
+ l += 1;
206
206
  }
207
- }), se.create(e, a);
207
+ }), re.create(e, i);
208
208
  }
209
209
  function Kn({
210
210
  name: e,
211
211
  defaultLanguage: t,
212
212
  defaultTheme: n
213
213
  }) {
214
- const i = new te({
214
+ const a = new te({
215
215
  key: new Z("shiki"),
216
- view(a) {
216
+ view(i) {
217
217
  class o {
218
218
  constructor() {
219
219
  this.initDecorations();
@@ -225,235 +225,235 @@ function Kn({
225
225
  }
226
226
  // Initialize shiki async, and then highlight initial document
227
227
  async initDecorations() {
228
- const c = a.state.doc;
229
- await qn({ doc: c, name: e, defaultLanguage: t, defaultTheme: n });
230
- const h = a.state.tr.setMeta("shikiPluginForceDecoration", !0);
231
- a.dispatch(h);
228
+ const l = i.state.doc;
229
+ await qn({ doc: l, name: e, defaultLanguage: t, defaultTheme: n });
230
+ const u = i.state.tr.setMeta("shikiPluginForceDecoration", !0);
231
+ i.dispatch(u);
232
232
  }
233
233
  // When new codeblocks were added and they have missing themes or
234
234
  // languages, load those and then add code decorations once again.
235
235
  async checkUndecoratedBlocks() {
236
- const c = oe(
237
- a.state.doc,
238
- (l) => l.type.name === e
236
+ const l = oe(
237
+ i.state.doc,
238
+ (c) => c.type.name === e
239
239
  );
240
240
  if ((await Promise.all(
241
- c.flatMap((l) => [
242
- rt(l.node.attrs.theme),
243
- st(l.node.attrs.language)
241
+ l.flatMap((c) => [
242
+ st(c.node.attrs.theme),
243
+ rt(c.node.attrs.language)
244
244
  ])
245
245
  )).includes(!0)) {
246
- const l = a.state.tr.setMeta("shikiPluginForceDecoration", !0);
247
- a.dispatch(l);
246
+ const c = i.state.tr.setMeta("shikiPluginForceDecoration", !0);
247
+ i.dispatch(c);
248
248
  }
249
249
  }
250
250
  }
251
251
  return new o();
252
252
  },
253
253
  state: {
254
- init: (a, { doc: o }) => Ve({
254
+ init: (i, { doc: o }) => Ve({
255
255
  doc: o,
256
256
  name: e,
257
257
  defaultLanguage: t,
258
258
  defaultTheme: n
259
259
  }),
260
- apply: (a, o, s, c) => {
261
- const h = s.selection.$head.parent.type.name, d = c.selection.$head.parent.type.name, l = oe(
262
- s.doc,
260
+ apply: (i, o, r, l) => {
261
+ const u = r.selection.$head.parent.type.name, d = l.selection.$head.parent.type.name, c = oe(
262
+ r.doc,
263
263
  (f) => f.type.name === e
264
- ), m = oe(
265
- c.doc,
264
+ ), h = oe(
265
+ l.doc,
266
266
  (f) => f.type.name === e
267
- ), _ = a.docChanged && ([h, d].includes(e) || m.length !== l.length || a.steps.some((f) => f.from !== void 0 && f.to !== void 0 && l.some((p) => p.pos >= f.from && p.pos + p.node.nodeSize <= f.to)));
268
- return a.getMeta("shikiPluginForceDecoration") || _ ? Ve({
269
- doc: a.doc,
267
+ ), _ = i.docChanged && ([u, d].includes(e) || h.length !== c.length || i.steps.some((f) => f.from !== void 0 && f.to !== void 0 && c.some((w) => w.pos >= f.from && w.pos + w.node.nodeSize <= f.to)));
268
+ return i.getMeta("shikiPluginForceDecoration") || _ ? Ve({
269
+ doc: i.doc,
270
270
  name: e,
271
271
  defaultLanguage: t,
272
272
  defaultTheme: n
273
- }) : o.map(a.mapping, a.doc);
273
+ }) : o.map(i.mapping, i.doc);
274
274
  }
275
275
  },
276
276
  props: {
277
277
  //@ts-expect-error
278
- decorations(a) {
279
- return i.getState(a);
278
+ decorations(i) {
279
+ return a.getState(i);
280
280
  }
281
281
  }
282
282
  });
283
- return i;
283
+ return a;
284
284
  }
285
285
  function Vn({ action: e, languages: t, ...n }) {
286
- const i = (o) => {
286
+ const a = (o) => {
287
287
  e(o);
288
- }, a = R(() => t == null ? void 0 : t.map((o) => ({
288
+ }, i = R(() => t == null ? void 0 : t.map((o) => ({
289
289
  title: zn[o] || o,
290
290
  // icon: language.icon,
291
291
  language: o
292
292
  })), [t]);
293
- return /* @__PURE__ */ u(Y, { children: [
294
- /* @__PURE__ */ r(Q, { disabled: n == null ? void 0 : n.disabled, asChild: !0, children: /* @__PURE__ */ r(
295
- x,
293
+ return /* @__PURE__ */ m(Y, { children: [
294
+ /* @__PURE__ */ s(Q, { disabled: n == null ? void 0 : n.disabled, asChild: !0, children: /* @__PURE__ */ s(
295
+ p,
296
296
  {
297
297
  tooltip: n == null ? void 0 : n.tooltip,
298
298
  disabled: n == null ? void 0 : n.disabled,
299
299
  icon: n == null ? void 0 : n.icon
300
300
  }
301
301
  ) }),
302
- /* @__PURE__ */ r(X, { className: "richtext-w-full !richtext-max-h-[180px] !richtext-overflow-y-scroll", children: a == null ? void 0 : a.map((o) => /* @__PURE__ */ r(un, { onClick: () => i(o.language), children: /* @__PURE__ */ r("div", { className: "richtext-h-full richtext-ml-1", children: o.title }) }, `codeblock-${o.title}`)) })
302
+ /* @__PURE__ */ s(X, { className: "w-full !max-h-[180px] !overflow-y-scroll", children: i == null ? void 0 : i.map((o) => /* @__PURE__ */ s(mn, { onClick: () => a(o.language), children: /* @__PURE__ */ s("div", { className: "h-full ml-1", children: o.title }) }, `codeblock-${o.title}`)) })
303
303
  ] });
304
304
  }
305
- const Wn = v.Root, Gn = v.Value, ct = J.forwardRef(({ className: e, children: t, ...n }, i) => /* @__PURE__ */ u(
306
- v.Trigger,
305
+ const Wn = x.Root, Gn = x.Value, lt = J.forwardRef(({ className: e, children: t, ...n }, a) => /* @__PURE__ */ m(
306
+ x.Trigger,
307
307
  {
308
- ref: i,
308
+ ref: a,
309
309
  className: T(
310
- "richtext-flex richtext-h-10 richtext-w-full richtext-items-center richtext-justify-between richtext-rounded-md richtext-border richtext-border-input richtext-bg-background richtext-px-3 richtext-py-2 richtext-text-sm richtext-ring-offset-background placeholder:richtext-text-muted-foreground focus:richtext-outline-none focus:richtext-ring-2 focus:richtext-ring-ring focus:richtext-ring-offset-2 disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50 [&>span]:richtext-line-clamp-1",
310
+ "flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
311
311
  e
312
312
  ),
313
313
  ...n,
314
314
  children: [
315
315
  t,
316
- /* @__PURE__ */ r(v.Icon, { asChild: !0, children: /* @__PURE__ */ r(Me, { className: "richtext-h-4 richtext-w-4 richtext-opacity-50" }) })
316
+ /* @__PURE__ */ s(x.Icon, { asChild: !0, children: /* @__PURE__ */ s(Me, { className: "h-4 w-4 opacity-50" }) })
317
317
  ]
318
318
  }
319
319
  ));
320
- ct.displayName = v.Trigger.displayName;
321
- const lt = J.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
322
- v.ScrollUpButton,
320
+ lt.displayName = x.Trigger.displayName;
321
+ const ct = J.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s(
322
+ x.ScrollUpButton,
323
323
  {
324
324
  ref: n,
325
325
  className: T(
326
- "richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",
326
+ "flex cursor-default items-center justify-center py-1",
327
327
  e
328
328
  ),
329
329
  ...t,
330
- children: /* @__PURE__ */ r(en, { className: "richtext-h-4 richtext-w-4" })
330
+ children: /* @__PURE__ */ s(en, { className: "h-4 w-4" })
331
331
  }
332
332
  ));
333
- lt.displayName = v.ScrollUpButton.displayName;
334
- const dt = J.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
335
- v.ScrollDownButton,
333
+ ct.displayName = x.ScrollUpButton.displayName;
334
+ const dt = J.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s(
335
+ x.ScrollDownButton,
336
336
  {
337
337
  ref: n,
338
338
  className: T(
339
- "richtext-flex richtext-cursor-default richtext-items-center richtext-justify-center richtext-py-1",
339
+ "flex cursor-default items-center justify-center py-1",
340
340
  e
341
341
  ),
342
342
  ...t,
343
- children: /* @__PURE__ */ r(Me, { className: "richtext-h-4 richtext-w-4" })
343
+ children: /* @__PURE__ */ s(Me, { className: "h-4 w-4" })
344
344
  }
345
345
  ));
346
- dt.displayName = v.ScrollDownButton.displayName;
347
- const ht = J.forwardRef(({ className: e, children: t, position: n = "popper", ...i }, a) => /* @__PURE__ */ r(v.Portal, { children: /* @__PURE__ */ u(
348
- v.Content,
346
+ dt.displayName = x.ScrollDownButton.displayName;
347
+ const ut = J.forwardRef(({ className: e, children: t, position: n = "popper", ...a }, i) => /* @__PURE__ */ s(x.Portal, { children: /* @__PURE__ */ m(
348
+ x.Content,
349
349
  {
350
- ref: a,
350
+ ref: i,
351
351
  className: T(
352
- "richtext-relative richtext-z-50 richtext-max-h-60 richtext-overflow-y-auto richtext-min-w-[8rem] richtext-overflow-hidden richtext-rounded-md richtext-border richtext-bg-popover richtext-text-popover-foreground richtext-shadow-md data-[state=open]:richtext-animate-in data-[state=closed]:richtext-animate-out data-[state=closed]:richtext-fade-out-0 data-[state=open]:richtext-fade-in-0 data-[state=closed]:richtext-zoom-out-95 data-[state=open]:richtext-zoom-in-95 data-[side=bottom]:richtext-slide-in-from-top-2 data-[side=left]:richtext-slide-in-from-right-2 data-[side=right]:richtext-slide-in-from-left-2 data-[side=top]:richtext-slide-in-from-bottom-2",
353
- n === "popper" && "data-[side=bottom]:richtext-translate-y-1 data-[side=left]:richtext--translate-x-1 data-[side=right]:richtext-translate-x-1 data-[side=top]:richtext--translate-y-1",
352
+ "relative z-50 max-h-60 overflow-y-auto min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
353
+ n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
354
354
  e
355
355
  ),
356
356
  position: n,
357
- ...i,
357
+ ...a,
358
358
  children: [
359
- /* @__PURE__ */ r(lt, {}),
360
- /* @__PURE__ */ r(
361
- v.Viewport,
359
+ /* @__PURE__ */ s(ct, {}),
360
+ /* @__PURE__ */ s(
361
+ x.Viewport,
362
362
  {
363
363
  className: T(
364
- "richtext-p-1",
365
- n === "popper" && "richtext-h-[var(--radix-select-trigger-height)] richtext-w-full richtext-min-w-[var(--radix-select-trigger-width)]"
364
+ "p-1",
365
+ n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
366
366
  ),
367
367
  children: t
368
368
  }
369
369
  ),
370
- /* @__PURE__ */ r(dt, {})
370
+ /* @__PURE__ */ s(dt, {})
371
371
  ]
372
372
  }
373
373
  ) }));
374
- ht.displayName = v.Content.displayName;
375
- const Zn = J.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
376
- v.Label,
374
+ ut.displayName = x.Content.displayName;
375
+ const Zn = J.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s(
376
+ x.Label,
377
377
  {
378
378
  ref: n,
379
- className: T("richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-font-semibold", e),
379
+ className: T("py-1.5 pl-8 pr-2 text-sm font-semibold", e),
380
380
  ...t
381
381
  }
382
382
  ));
383
- Zn.displayName = v.Label.displayName;
384
- const Le = J.forwardRef(({ className: e, children: t, ...n }, i) => /* @__PURE__ */ u(
385
- v.Item,
383
+ Zn.displayName = x.Label.displayName;
384
+ const Le = J.forwardRef(({ className: e, children: t, ...n }, a) => /* @__PURE__ */ m(
385
+ x.Item,
386
386
  {
387
- ref: i,
387
+ ref: a,
388
388
  className: T(
389
- "richtext-relative richtext-flex richtext-w-full richtext-cursor-default richtext-select-none richtext-items-center richtext-rounded-sm richtext-py-1.5 richtext-pl-8 richtext-pr-2 richtext-text-sm richtext-outline-none focus:richtext-bg-accent focus:richtext-text-accent-foreground data-[disabled]:richtext-pointer-events-none data-[disabled]:richtext-opacity-50",
389
+ "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
390
390
  e
391
391
  ),
392
392
  ...n,
393
393
  children: [
394
- /* @__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(v.ItemIndicator, { children: /* @__PURE__ */ r(Xt, { className: "richtext-h-4 richtext-w-4" }) }) }),
395
- /* @__PURE__ */ r(v.ItemText, { children: t })
394
+ /* @__PURE__ */ s("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ s(x.ItemIndicator, { children: /* @__PURE__ */ s(Xt, { className: "h-4 w-4" }) }) }),
395
+ /* @__PURE__ */ s(x.ItemText, { children: t })
396
396
  ]
397
397
  }
398
398
  ));
399
- Le.displayName = v.Item.displayName;
400
- const Jn = J.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ r(
401
- v.Separator,
399
+ Le.displayName = x.Item.displayName;
400
+ const Jn = J.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ s(
401
+ x.Separator,
402
402
  {
403
403
  ref: n,
404
- className: T("richtext--mx-1 richtext-my-1 richtext-h-px richtext-bg-muted", e),
404
+ className: T("-mx-1 my-1 h-px bg-muted", e),
405
405
  ...t
406
406
  }
407
407
  ));
408
- Jn.displayName = v.Separator.displayName;
408
+ Jn.displayName = x.Separator.displayName;
409
409
  function Yn() {
410
410
  const [e, t] = C(!1);
411
- return { isCopied: e, copyToClipboard: async (i) => {
411
+ return { isCopied: e, copyToClipboard: async (a) => {
412
412
  try {
413
- await navigator.clipboard.writeText(i), t(!0), setTimeout(() => t(!1), 2e3);
414
- } catch (a) {
415
- console.error("Failed to copy text: ", a), t(!1);
413
+ await navigator.clipboard.writeText(a), t(!0), setTimeout(() => t(!1), 2e3);
414
+ } catch (i) {
415
+ console.error("Failed to copy text: ", i), t(!1);
416
416
  }
417
417
  } };
418
418
  }
419
- const Qn = "_wrap_134f4_1", Xn = "_maxHeight_134f4_10", ei = "_btnCopy_134f4_13", ti = "_btnDelete_134f4_14", ni = "_blockInfo_134f4_18", ii = "_blockInfoEditable_134f4_28", ai = "_selectLang_134f4_32", oi = "_copied_134f4_58", $ = {
419
+ const Qn = "_wrap_fsdar_1", Xn = "_maxHeight_fsdar_10", ea = "_btnCopy_fsdar_13", ta = "_btnDelete_fsdar_14", na = "_blockInfo_fsdar_18", aa = "_blockInfoEditable_fsdar_28", ia = "_selectLang_fsdar_32", oa = "_copied_fsdar_58", $ = {
420
420
  wrap: Qn,
421
421
  maxHeight: Xn,
422
- btnCopy: ei,
423
- btnDelete: ti,
424
- blockInfo: ni,
425
- blockInfoEditable: ii,
426
- selectLang: ai,
427
- copied: oi
422
+ btnCopy: ea,
423
+ btnDelete: ta,
424
+ blockInfo: na,
425
+ blockInfoEditable: aa,
426
+ selectLang: ia,
427
+ copied: oa
428
428
  };
429
- function ri({ editor: e, node: { attrs: t }, updateAttributes: n, extension: i }) {
429
+ function sa({ editor: e, node: { attrs: t }, updateAttributes: n, extension: a }) {
430
430
  var _, f;
431
- const { isCopied: a, copyToClipboard: o } = Yn(), s = R(() => {
432
- var p;
433
- return (p = i.options.languages) != null && p.length ? i.options.languages : nt;
434
- }, [i.options.languages]), c = Ie(), h = (f = (_ = e == null ? void 0 : e.options) == null ? void 0 : _.editorProps) == null ? void 0 : f.print, { language: d } = t, l = G(null), m = F(() => mn(si.name, e), [e]);
435
- return /* @__PURE__ */ u(re, { className: P($.wrap, !h && $.maxHeight, "render-wrapper"), children: [
436
- /* @__PURE__ */ u(
431
+ const { isCopied: i, copyToClipboard: o } = Yn(), r = R(() => {
432
+ var w;
433
+ return (w = a.options.languages) != null && w.length ? a.options.languages : nt;
434
+ }, [a.options.languages]), l = Ie(), u = (f = (_ = e == null ? void 0 : e.options) == null ? void 0 : _.editorProps) == null ? void 0 : f.print, { language: d } = t, c = G(null), h = F(() => hn(ra.name, e), [e]);
435
+ return /* @__PURE__ */ m(se, { className: P($.wrap, !u && $.maxHeight, "render-wrapper"), children: [
436
+ /* @__PURE__ */ m(
437
437
  "div",
438
438
  {
439
439
  className: P($.blockInfo, {
440
- [$.blockInfoEditable]: !c
440
+ [$.blockInfoEditable]: !l
441
441
  }),
442
442
  children: [
443
- /* @__PURE__ */ r(
443
+ /* @__PURE__ */ s(
444
444
  "span",
445
445
  {
446
- className: P($.btnCopy, a && $.copied),
447
- onClick: () => o(l.current.innerText),
448
- children: a ? /* @__PURE__ */ r(nn, { size: 16 }) : /* @__PURE__ */ r(tn, { size: 16 })
446
+ className: P($.btnCopy, i && $.copied),
447
+ onClick: () => o(c.current.innerText),
448
+ children: i ? /* @__PURE__ */ s(nn, { size: 16 }) : /* @__PURE__ */ s(tn, { size: 16 })
449
449
  }
450
450
  ),
451
- /* @__PURE__ */ r(
451
+ /* @__PURE__ */ s(
452
452
  "span",
453
453
  {
454
454
  className: $.btnDelete,
455
- onClick: m,
456
- children: /* @__PURE__ */ r(
455
+ onClick: h,
456
+ children: /* @__PURE__ */ s(
457
457
  M,
458
458
  {
459
459
  name: "Trash2"
@@ -461,23 +461,23 @@ function ri({ editor: e, node: { attrs: t }, updateAttributes: n, extension: i }
461
461
  )
462
462
  }
463
463
  ),
464
- /* @__PURE__ */ r("div", { className: $.selectLang, children: /* @__PURE__ */ u(
464
+ /* @__PURE__ */ s("div", { className: $.selectLang, children: /* @__PURE__ */ m(
465
465
  Wn,
466
466
  {
467
467
  defaultValue: d || "auto",
468
- disabled: !c,
469
- onValueChange: (p) => n({ language: p }),
468
+ disabled: !l,
469
+ onValueChange: (w) => n({ language: w }),
470
470
  children: [
471
- /* @__PURE__ */ r(ct, { children: /* @__PURE__ */ r(Gn, { placeholder: "Language" }) }),
472
- /* @__PURE__ */ u(ht, { className: "richtext-max-h-60 richtext-overflow-y-auto", children: [
473
- /* @__PURE__ */ r(Le, { value: "auto", children: "Auto" }),
474
- s.map((p, w) => /* @__PURE__ */ r(
471
+ /* @__PURE__ */ s(lt, { children: /* @__PURE__ */ s(Gn, { placeholder: "Language" }) }),
472
+ /* @__PURE__ */ m(ut, { className: "max-h-60 overflow-y-auto", children: [
473
+ /* @__PURE__ */ s(Le, { value: "auto", children: "Auto" }),
474
+ r.map((w, y) => /* @__PURE__ */ s(
475
475
  Le,
476
476
  {
477
- value: p,
478
- children: p.charAt(0).toUpperCase() + p.slice(1)
477
+ value: w,
478
+ children: w.charAt(0).toUpperCase() + w.slice(1)
479
479
  },
480
- `code-lang-${w}`
480
+ `code-lang-${y}`
481
481
  ))
482
482
  ] })
483
483
  ]
@@ -486,36 +486,36 @@ function ri({ editor: e, node: { attrs: t }, updateAttributes: n, extension: i }
486
486
  ]
487
487
  }
488
488
  ),
489
- /* @__PURE__ */ r("pre", { ref: l, children: /* @__PURE__ */ r(wt, { as: "code" }) })
489
+ /* @__PURE__ */ s("pre", { ref: c, children: /* @__PURE__ */ s(yt, { as: "code" }) })
490
490
  ] });
491
491
  }
492
- const si = yt.extend({
492
+ const ra = kt.extend({
493
493
  addOptions() {
494
494
  var e;
495
495
  return {
496
496
  ...(e = this.parent) == null ? void 0 : e.call(this),
497
497
  languages: [],
498
- button: ({ editor: t, t: n, extension: i }) => {
499
- var o, s, c;
500
- const a = (s = (o = i == null ? void 0 : i.options) == null ? void 0 : o.languages) != null && s.length ? (c = i == null ? void 0 : i.options) == null ? void 0 : c.languages : nt;
498
+ button: ({ editor: t, t: n, extension: a }) => {
499
+ var o, r, l;
500
+ const i = (r = (o = a == null ? void 0 : a.options) == null ? void 0 : o.languages) != null && r.length ? (l = a == null ? void 0 : a.options) == null ? void 0 : l.languages : nt;
501
501
  return {
502
502
  component: Vn,
503
503
  componentProps: {
504
- action: (h = "js") => t.commands.setCodeBlock({
505
- language: h
504
+ action: (u = "js") => t.commands.setCodeBlock({
505
+ language: u
506
506
  }),
507
507
  isActive: () => t.isActive("codeBlock") || !1,
508
508
  disabled: !t.can().toggleCodeBlock(),
509
509
  icon: "Code2",
510
510
  tooltip: n("editor.codeblock.tooltip"),
511
- languages: a
511
+ languages: i
512
512
  }
513
513
  };
514
514
  }
515
515
  };
516
516
  },
517
517
  addNodeView() {
518
- return Se(ri);
518
+ return Se(sa);
519
519
  },
520
520
  addProseMirrorPlugins() {
521
521
  var e;
@@ -529,13 +529,13 @@ const si = yt.extend({
529
529
  ];
530
530
  }
531
531
  });
532
- function ci(e) {
533
- var a, o, s;
534
- const { t, lang: n } = j(), i = R(() => {
532
+ function la(e) {
533
+ var i, o, r;
534
+ const { t, lang: n } = j(), a = R(() => {
535
535
  var d;
536
- const c = (d = e == null ? void 0 : e.items) == null ? void 0 : d.find((l) => l.isActive());
537
- return c && !c.default ? {
538
- ...c
536
+ const l = (d = e == null ? void 0 : e.items) == null ? void 0 : d.find((c) => c.isActive());
537
+ return l && !l.default ? {
538
+ ...l
539
539
  } : {
540
540
  title: e.tooltip,
541
541
  font: t("editor.fontFamily.default.tooltip"),
@@ -544,79 +544,79 @@ function ci(e) {
544
544
  action: () => e.editor.chain().focus().unsetFontFamily().run()
545
545
  };
546
546
  }, [t, n, e]);
547
- return /* @__PURE__ */ u(Y, { children: [
548
- /* @__PURE__ */ r(
547
+ return /* @__PURE__ */ m(Y, { children: [
548
+ /* @__PURE__ */ s(
549
549
  Q,
550
550
  {
551
551
  asChild: !0,
552
552
  disabled: e == null ? void 0 : e.disabled,
553
- children: /* @__PURE__ */ r(
553
+ children: /* @__PURE__ */ s(
554
554
  $e,
555
555
  {
556
556
  disabled: e == null ? void 0 : e.disabled,
557
557
  icon: "MenuDown",
558
- title: ((a = i == null ? void 0 : i.font) == null ? void 0 : a.length) > 7 ? `${(o = i == null ? void 0 : i.font) == null ? void 0 : o.slice(0, 6)}...` : i == null ? void 0 : i.font,
558
+ title: ((i = a == null ? void 0 : a.font) == null ? void 0 : i.length) > 7 ? `${(o = a == null ? void 0 : a.font) == null ? void 0 : o.slice(0, 6)}...` : a == null ? void 0 : a.font,
559
559
  tooltip: e == null ? void 0 : e.tooltip
560
560
  }
561
561
  )
562
562
  }
563
563
  ),
564
- /* @__PURE__ */ r(X, { className: "richtext-w-full", children: (s = e == null ? void 0 : e.items) == null ? void 0 : s.map((c, h) => {
565
- const d = c.font === t("editor.fontFamily.default.tooltip") ? {} : { fontFamily: c.font };
566
- return /* @__PURE__ */ u(Ee, { children: [
567
- /* @__PURE__ */ r(
564
+ /* @__PURE__ */ s(X, { className: "w-full", children: (r = e == null ? void 0 : e.items) == null ? void 0 : r.map((l, u) => {
565
+ const d = l.font === t("editor.fontFamily.default.tooltip") ? {} : { fontFamily: l.font };
566
+ return /* @__PURE__ */ m(Ee, { children: [
567
+ /* @__PURE__ */ s(
568
568
  ne,
569
569
  {
570
- checked: (i == null ? void 0 : i.font) === c.font,
571
- onClick: c.action,
572
- children: /* @__PURE__ */ r(
570
+ checked: (a == null ? void 0 : a.font) === l.font,
571
+ onClick: l.action,
572
+ children: /* @__PURE__ */ s(
573
573
  "div",
574
574
  {
575
- className: "richtext-ml-1 richtext-h-full",
575
+ className: "ml-1 h-full",
576
576
  style: d,
577
- children: c.font
577
+ children: l.font
578
578
  }
579
579
  )
580
580
  }
581
581
  ),
582
- c.font === t("editor.fontFamily.default.tooltip") && /* @__PURE__ */ r(et, {})
583
- ] }, `font-family-${h}`);
582
+ l.font === t("editor.fontFamily.default.tooltip") && /* @__PURE__ */ s(et, {})
583
+ ] }, `font-family-${u}`);
584
584
  }) })
585
585
  ] });
586
586
  }
587
- const Ga = kt.extend({
587
+ const Gi = vt.extend({
588
588
  addOptions() {
589
589
  var e;
590
590
  return {
591
591
  ...(e = this.parent) == null ? void 0 : e.call(this),
592
592
  fontFamilyList: Mn,
593
- button({ editor: t, extension: n, t: i }) {
593
+ button({ editor: t, extension: n, t: a }) {
594
594
  var d;
595
- const { extensions: a = [] } = t.extensionManager ?? [], o = Ae(((d = n == null ? void 0 : n.options) == null ? void 0 : d.fontFamilyList) || []), s = a.find(
596
- (l) => l.name === "base-kit"
597
- ), c = o.map((l) => ({
595
+ const { extensions: i = [] } = t.extensionManager ?? [], o = Ae(((d = n == null ? void 0 : n.options) == null ? void 0 : d.fontFamilyList) || []), r = i.find(
596
+ (c) => c.name === "base-kit"
597
+ ), l = o.map((c) => ({
598
598
  action: () => {
599
- t.chain().focus().setFontFamily(l.value).run();
599
+ t.chain().focus().setFontFamily(c.value).run();
600
600
  },
601
- isActive: () => t.isActive("textStyle", { fontFamily: l.value }) || !1,
602
- disabled: !t.can().setFontFamily(l.value),
603
- title: l.name,
604
- font: l.value
601
+ isActive: () => t.isActive("textStyle", { fontFamily: c.value }) || !1,
602
+ disabled: !t.can().setFontFamily(c.value),
603
+ title: c.name,
604
+ font: c.value
605
605
  }));
606
- s && s.options.textStyle !== !1 && c.unshift({
606
+ r && r.options.textStyle !== !1 && l.unshift({
607
607
  action: () => t.chain().focus().unsetFontFamily().run(),
608
608
  isActive: () => !1,
609
609
  disabled: !1,
610
- font: i("editor.fontFamily.default.tooltip"),
611
- title: i("editor.fontFamily.tooltip")
610
+ font: a("editor.fontFamily.default.tooltip"),
611
+ title: a("editor.fontFamily.tooltip")
612
612
  });
613
- const h = c.filter((l) => l.disabled).length === c.length;
613
+ const u = l.filter((c) => c.disabled).length === l.length;
614
614
  return {
615
- component: ci,
615
+ component: la,
616
616
  componentProps: {
617
- tooltip: i("editor.fontFamily.tooltip"),
618
- disabled: h,
619
- items: c,
617
+ tooltip: a("editor.fontFamily.tooltip"),
618
+ disabled: u,
619
+ items: l,
620
620
  editor: t
621
621
  }
622
622
  };
@@ -624,26 +624,26 @@ const Ga = kt.extend({
624
624
  };
625
625
  }
626
626
  });
627
- function li(e) {
627
+ function ca(e) {
628
628
  var n;
629
629
  const t = R(() => {
630
630
  var o;
631
- const i = (o = e == null ? void 0 : e.items) == null ? void 0 : o.find((s) => s.isActive());
632
- return i && !i.default ? {
633
- ...i
631
+ const a = (o = e == null ? void 0 : e.items) == null ? void 0 : o.find((r) => r.isActive());
632
+ return a && !a.default ? {
633
+ ...a
634
634
  } : {
635
635
  title: e.tooltip,
636
636
  level: 0,
637
637
  isActive: () => !1
638
638
  };
639
639
  }, [e]);
640
- return /* @__PURE__ */ u(Y, { children: [
641
- /* @__PURE__ */ r(
640
+ return /* @__PURE__ */ m(Y, { children: [
641
+ /* @__PURE__ */ s(
642
642
  Q,
643
643
  {
644
644
  asChild: !0,
645
645
  disabled: e == null ? void 0 : e.disabled,
646
- children: /* @__PURE__ */ r(
646
+ children: /* @__PURE__ */ s(
647
647
  $e,
648
648
  {
649
649
  disabled: e == null ? void 0 : e.disabled,
@@ -654,58 +654,58 @@ function li(e) {
654
654
  )
655
655
  }
656
656
  ),
657
- /* @__PURE__ */ r(X, { className: "richtext-w-full", children: (n = e == null ? void 0 : e.items) == null ? void 0 : n.map((i, a) => {
658
- var o, s;
659
- return /* @__PURE__ */ u(Ee, { children: [
660
- /* @__PURE__ */ u(
657
+ /* @__PURE__ */ s(X, { className: "w-full", children: (n = e == null ? void 0 : e.items) == null ? void 0 : n.map((a, i) => {
658
+ var o, r;
659
+ return /* @__PURE__ */ m(Ee, { children: [
660
+ /* @__PURE__ */ m(
661
661
  ne,
662
662
  {
663
- checked: (t == null ? void 0 : t.title) === i.title,
664
- onClick: i.action,
663
+ checked: (t == null ? void 0 : t.title) === a.title,
664
+ onClick: a.action,
665
665
  children: [
666
- /* @__PURE__ */ r("div", { className: `heading- richtext-ml-1 richtext-h-full${i.level}`, children: i.title }),
667
- !!((o = i == null ? void 0 : i.shortcutKeys) != null && o.length) && /* @__PURE__ */ r(_n, { className: "richtext-pl-4", children: (s = i == null ? void 0 : i.shortcutKeys) == null ? void 0 : s.map((c) => je(c)).join(" ") })
666
+ /* @__PURE__ */ s("div", { className: `heading- ml-1 h-full${a.level}`, children: a.title }),
667
+ !!((o = a == null ? void 0 : a.shortcutKeys) != null && o.length) && /* @__PURE__ */ s(_n, { className: "pl-4", children: (r = a == null ? void 0 : a.shortcutKeys) == null ? void 0 : r.map((l) => je(l)).join(" ") })
668
668
  ]
669
669
  }
670
670
  ),
671
- i.level === 0 && /* @__PURE__ */ r(et, {})
672
- ] }, `heading-k-${a}`);
671
+ a.level === 0 && /* @__PURE__ */ s(et, {})
672
+ ] }, `heading-k-${i}`);
673
673
  }) })
674
674
  ] });
675
675
  }
676
- const Za = vt.extend({
676
+ const Zi = xt.extend({
677
677
  addOptions() {
678
678
  var e;
679
679
  return {
680
680
  ...(e = this.parent) == null ? void 0 : e.call(this),
681
681
  levels: [1, 2, 3, 4, 5, 6],
682
- button({ editor: t, extension: n, t: i }) {
682
+ button({ editor: t, extension: n, t: a }) {
683
683
  var d;
684
- const { extensions: a = [] } = t.extensionManager ?? [], o = ((d = n.options) == null ? void 0 : d.levels) || [], s = a.find(
685
- (l) => l.name === "base-kit"
686
- ), c = o.map((l) => ({
687
- action: () => t.commands.toggleHeading({ level: l }),
688
- isActive: () => t.isActive("heading", { level: l }) || !1,
689
- disabled: !t.can().toggleHeading({ level: l }),
690
- title: i(`editor.heading.h${l}.tooltip`),
691
- level: l,
692
- shortcutKeys: ["alt", "mod", `${l}`]
684
+ const { extensions: i = [] } = t.extensionManager ?? [], o = ((d = n.options) == null ? void 0 : d.levels) || [], r = i.find(
685
+ (c) => c.name === "base-kit"
686
+ ), l = o.map((c) => ({
687
+ action: () => t.commands.toggleHeading({ level: c }),
688
+ isActive: () => t.isActive("heading", { level: c }) || !1,
689
+ disabled: !t.can().toggleHeading({ level: c }),
690
+ title: a(`editor.heading.h${c}.tooltip`),
691
+ level: c,
692
+ shortcutKeys: ["alt", "mod", `${c}`]
693
693
  }));
694
- s && s.options.paragraph !== !1 && c.unshift({
694
+ r && r.options.paragraph !== !1 && l.unshift({
695
695
  action: () => t.commands.setParagraph(),
696
696
  isActive: () => t.isActive("paragraph") || !1,
697
697
  disabled: !t.can().setParagraph(),
698
698
  level: 0,
699
- title: i("editor.paragraph.tooltip"),
699
+ title: a("editor.paragraph.tooltip"),
700
700
  shortcutKeys: ["alt", "mod", "0"]
701
701
  });
702
- const h = c.filter((l) => l.disabled).length === c.length;
702
+ const u = l.filter((c) => c.disabled).length === l.length;
703
703
  return {
704
- component: li,
704
+ component: ca,
705
705
  componentProps: {
706
- tooltip: i("editor.heading.tooltip"),
707
- disabled: h,
708
- items: c,
706
+ tooltip: a("editor.heading.tooltip"),
707
+ disabled: u,
708
+ items: l,
709
709
  editor: t
710
710
  }
711
711
  };
@@ -713,37 +713,37 @@ const Za = vt.extend({
713
713
  };
714
714
  }
715
715
  });
716
- function di(e) {
716
+ function da(e) {
717
717
  var n;
718
718
  const t = R(() => {
719
719
  var o;
720
- const i = (o = e == null ? void 0 : e.items) == null ? void 0 : o.find((s) => s.isActive());
721
- return i && !i.default ? {
722
- ...i,
723
- icon: i.icon ? i.icon : e.icon
720
+ const a = (o = e == null ? void 0 : e.items) == null ? void 0 : o.find((r) => r.isActive());
721
+ return a && !a.default ? {
722
+ ...a,
723
+ icon: a.icon ? a.icon : e.icon
724
724
  } : {
725
725
  title: e == null ? void 0 : e.tooltip,
726
726
  icon: e.icon,
727
727
  isActive: () => !1
728
728
  };
729
729
  }, [e]);
730
- return /* @__PURE__ */ u(le, { modal: !0, children: [
731
- /* @__PURE__ */ r(
730
+ return /* @__PURE__ */ m(ce, { modal: !0, children: [
731
+ /* @__PURE__ */ s(
732
732
  de,
733
733
  {
734
734
  asChild: !0,
735
735
  disabled: e == null ? void 0 : e.disabled,
736
- children: /* @__PURE__ */ r(
737
- x,
736
+ children: /* @__PURE__ */ s(
737
+ p,
738
738
  {
739
- customClass: "!richtext-w-12 richtext-h-12",
739
+ customClass: "!w-12 h-12",
740
740
  disabled: e == null ? void 0 : e.disabled,
741
741
  icon: e == null ? void 0 : e.icon,
742
742
  tooltip: e == null ? void 0 : e.tooltip,
743
- children: /* @__PURE__ */ r(
743
+ children: /* @__PURE__ */ s(
744
744
  M,
745
745
  {
746
- className: "richtext-ml-1 richtext-size-3 richtext-text-zinc-500",
746
+ className: "ml-1 size-3 text-zinc-500",
747
747
  name: "MenuDown"
748
748
  }
749
749
  )
@@ -751,37 +751,37 @@ function di(e) {
751
751
  )
752
752
  }
753
753
  ),
754
- /* @__PURE__ */ r(
755
- he,
754
+ /* @__PURE__ */ s(
755
+ ue,
756
756
  {
757
757
  align: "start",
758
- className: "richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",
758
+ className: "flex w-full min-w-4 flex-row gap-1 !p-[4px]",
759
759
  side: "bottom",
760
- children: (n = e == null ? void 0 : e.items) == null ? void 0 : n.map((i, a) => {
761
- var o, s;
762
- return /* @__PURE__ */ u(pe, { children: [
763
- /* @__PURE__ */ r(we, { asChild: !0, children: /* @__PURE__ */ r(
760
+ children: (n = e == null ? void 0 : e.items) == null ? void 0 : n.map((a, i) => {
761
+ var o, r;
762
+ return /* @__PURE__ */ m(we, { children: [
763
+ /* @__PURE__ */ s(ye, { asChild: !0, children: /* @__PURE__ */ s(
764
764
  Be,
765
765
  {
766
- className: "richtext-size-7 richtext-p-1",
767
- "data-state": t.title === i.title ? "on" : "off",
768
- onClick: i == null ? void 0 : i.action,
769
- pressed: t.title === i.title,
766
+ className: "size-7 p-1",
767
+ "data-state": t.title === a.title ? "on" : "off",
768
+ onClick: a == null ? void 0 : a.action,
769
+ pressed: t.title === a.title,
770
770
  size: "sm",
771
- children: (i == null ? void 0 : i.icon) && /* @__PURE__ */ r(M, { name: i.icon })
771
+ children: (a == null ? void 0 : a.icon) && /* @__PURE__ */ s(M, { name: a.icon })
772
772
  }
773
773
  ) }),
774
- /* @__PURE__ */ u(ye, { className: "richtext-flex richtext-flex-col richtext-items-center", children: [
775
- /* @__PURE__ */ r("span", { children: i.title }),
776
- !!((o = i.shortcutKeys) != null && o.length) && /* @__PURE__ */ r("span", { children: (s = i.shortcutKeys) == null ? void 0 : s.map((c) => je(c)).join(" ") })
774
+ /* @__PURE__ */ m(ke, { className: "flex flex-col items-center", children: [
775
+ /* @__PURE__ */ s("span", { children: a.title }),
776
+ !!((o = a.shortcutKeys) != null && o.length) && /* @__PURE__ */ s("span", { children: (r = a.shortcutKeys) == null ? void 0 : r.map((l) => je(l)).join(" ") })
777
777
  ] })
778
- ] }, `text-align-${a}`);
778
+ ] }, `text-align-${i}`);
779
779
  })
780
780
  }
781
781
  )
782
782
  ] });
783
783
  }
784
- const Ja = Ct.extend({
784
+ const Ji = Ct.extend({
785
785
  addOptions() {
786
786
  var e;
787
787
  return {
@@ -790,62 +790,62 @@ const Ja = Ct.extend({
790
790
  button({
791
791
  editor: t,
792
792
  extension: n,
793
- t: i
793
+ t: a
794
794
  }) {
795
795
  var d;
796
- const a = ((d = n.options) == null ? void 0 : d.alignments) || [], o = {
796
+ const i = ((d = n.options) == null ? void 0 : d.alignments) || [], o = {
797
797
  left: ["mod", "Shift", "L"],
798
798
  center: ["mod", "Shift", "E"],
799
799
  right: ["mod", "Shift", "R"],
800
800
  justify: ["mod", "Shift", "J"]
801
- }, s = {
801
+ }, r = {
802
802
  left: "AlignLeft",
803
803
  center: "AlignCenter",
804
804
  right: "AlignRight",
805
805
  justify: "AlignJustify"
806
- }, c = a.map((l) => {
807
- var m, _, f;
806
+ }, l = i.map((c) => {
807
+ var h, _, f;
808
808
  return {
809
- title: i(`editor.textalign.${l}.tooltip`),
810
- icon: s[l],
811
- shortcutKeys: o[l],
812
- isActive: () => t.isActive({ textAlign: l }) || !1,
809
+ title: a(`editor.textalign.${c}.tooltip`),
810
+ icon: r[c],
811
+ shortcutKeys: o[c],
812
+ isActive: () => t.isActive({ textAlign: c }) || !1,
813
813
  action: () => {
814
- var p, w;
815
- return (w = (p = t.commands) == null ? void 0 : p.setTextAlign) == null ? void 0 : w.call(p, l);
814
+ var w, y;
815
+ return (y = (w = t.commands) == null ? void 0 : w.setTextAlign) == null ? void 0 : y.call(w, c);
816
816
  },
817
- disabled: !((f = (_ = (m = t == null ? void 0 : t.can) == null ? void 0 : m.call(t)) == null ? void 0 : _.setTextAlign) != null && f.call(_, l))
817
+ disabled: !((f = (_ = (h = t == null ? void 0 : t.can) == null ? void 0 : h.call(t)) == null ? void 0 : _.setTextAlign) != null && f.call(_, c))
818
818
  };
819
- }), h = c.filter((l) => l.disabled).length === c.length;
819
+ }), u = l.filter((c) => c.disabled).length === l.length;
820
820
  return {
821
- component: di,
821
+ component: da,
822
822
  componentProps: {
823
823
  icon: "AlignJustify",
824
- tooltip: i("editor.textalign.tooltip"),
825
- disabled: h,
826
- items: c
824
+ tooltip: a("editor.textalign.tooltip"),
825
+ disabled: u,
826
+ items: l
827
827
  }
828
828
  };
829
829
  }
830
830
  };
831
831
  }
832
832
  });
833
- function hi(e) {
834
- var i;
833
+ function ua(e) {
834
+ var a;
835
835
  const { t } = j(), n = R(() => {
836
- const a = (e.items || []).find((s) => s.isActive());
837
- return a || {
836
+ const i = (e.items || []).find((r) => r.isActive());
837
+ return i || {
838
838
  title: t("editor.fontSize.default.tooltip"),
839
839
  isActive: () => !1
840
840
  };
841
841
  }, [e]);
842
- return /* @__PURE__ */ u(Y, { children: [
843
- /* @__PURE__ */ r(
842
+ return /* @__PURE__ */ m(Y, { children: [
843
+ /* @__PURE__ */ s(
844
844
  Q,
845
845
  {
846
846
  asChild: !0,
847
847
  disabled: e == null ? void 0 : e.disabled,
848
- children: /* @__PURE__ */ r(
848
+ children: /* @__PURE__ */ s(
849
849
  $e,
850
850
  {
851
851
  disabled: e == null ? void 0 : e.disabled,
@@ -856,18 +856,18 @@ function hi(e) {
856
856
  )
857
857
  }
858
858
  ),
859
- /* @__PURE__ */ r(X, { className: "richtext-max-h-96 richtext-w-32 richtext-overflow-y-auto", children: (i = e == null ? void 0 : e.items) == null ? void 0 : i.map((a, o) => /* @__PURE__ */ r(
859
+ /* @__PURE__ */ s(X, { className: "max-h-96 w-32 overflow-y-auto", children: (a = e == null ? void 0 : e.items) == null ? void 0 : a.map((i, o) => /* @__PURE__ */ s(
860
860
  ne,
861
861
  {
862
- checked: n.title === a.title,
863
- onClick: a.action,
864
- children: /* @__PURE__ */ r("div", { className: "richtext-ml-1 richtext-h-full", children: a.title })
862
+ checked: n.title === i.title,
863
+ onClick: i.action,
864
+ children: /* @__PURE__ */ s("div", { className: "ml-1 h-full", children: i.title })
865
865
  },
866
866
  `font-size-${o}`
867
867
  )) })
868
868
  ] });
869
869
  }
870
- const Ya = A.create({
870
+ const Yi = A.create({
871
871
  name: "fontSize",
872
872
  addOptions() {
873
873
  var e;
@@ -875,13 +875,13 @@ const Ya = A.create({
875
875
  ...(e = this.parent) == null ? void 0 : e.call(this),
876
876
  types: ["textStyle"],
877
877
  fontSizes: [...Pn],
878
- button({ editor: t, extension: n, t: i }) {
879
- var h;
880
- const a = Ae(((h = n.options) == null ? void 0 : h.fontSizes) || Ke), o = Ae([Ke])[0], s = a.map((d) => ({
881
- title: d.value === o.value ? i("editor.fontSize.default.tooltip") : String(d.name),
878
+ button({ editor: t, extension: n, t: a }) {
879
+ var u;
880
+ const i = Ae(((u = n.options) == null ? void 0 : u.fontSizes) || Ke), o = Ae([Ke])[0], r = i.map((d) => ({
881
+ title: d.value === o.value ? a("editor.fontSize.default.tooltip") : String(d.name),
882
882
  isActive: () => {
883
- const { fontSize: l } = t.getAttributes("textStyle");
884
- return d.value === o.value && l === void 0 ? !0 : t.isActive({ fontSize: String(d.value) }) || !1;
883
+ const { fontSize: c } = t.getAttributes("textStyle");
884
+ return d.value === o.value && c === void 0 ? !0 : t.isActive({ fontSize: String(d.value) }) || !1;
885
885
  },
886
886
  action: () => {
887
887
  if (d.value === o.value) {
@@ -893,14 +893,14 @@ const Ya = A.create({
893
893
  disabled: !t.can().setFontSize(String(d.value)),
894
894
  divider: d.value === o.value || !1,
895
895
  default: d.value === o.value || !1
896
- })), c = s.filter((d) => d.disabled).length === s.length;
896
+ })), l = r.filter((d) => d.disabled).length === r.length;
897
897
  return {
898
- component: hi,
898
+ component: ua,
899
899
  componentProps: {
900
900
  editor: t,
901
- tooltip: i("editor.fontSize.tooltip"),
902
- disabled: c,
903
- items: s,
901
+ tooltip: a("editor.fontSize.tooltip"),
902
+ disabled: l,
903
+ items: r,
904
904
  maxHeight: 280
905
905
  }
906
906
  };
@@ -930,8 +930,8 @@ const Ya = A.create({
930
930
  };
931
931
  }
932
932
  });
933
- function ui({ fill: e }) {
934
- return /* @__PURE__ */ r(
933
+ function ma({ fill: e }) {
934
+ return /* @__PURE__ */ s(
935
935
  "svg",
936
936
  {
937
937
  width: "18px",
@@ -939,8 +939,8 @@ function ui({ fill: e }) {
939
939
  viewBox: "0 0 240 240",
940
940
  version: "1.1",
941
941
  xmlns: "http://www.w3.org/2000/svg",
942
- children: /* @__PURE__ */ r("g", { stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ r("g", { transform: "translate(0.000000, 0.500000)", children: /* @__PURE__ */ u("g", { transform: "translate(39.000000, 17.353553)", children: [
943
- /* @__PURE__ */ r(
942
+ children: /* @__PURE__ */ s("g", { stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ s("g", { transform: "translate(0.000000, 0.500000)", children: /* @__PURE__ */ m("g", { transform: "translate(39.000000, 17.353553)", children: [
943
+ /* @__PURE__ */ s(
944
944
  "path",
945
945
  {
946
946
  d: "M11,201.146447 L167,201.146447 C173.075132,201.146447 178,206.071314 178,212.146447 C178,218.221579 173.075132,223.146447 167,223.146447 L11,223.146447 C4.92486775,223.146447 7.43989126e-16,218.221579 0,212.146447 C-7.43989126e-16,206.071314 4.92486775,201.146447 11,201.146447 Z",
@@ -949,7 +949,7 @@ function ui({ fill: e }) {
949
949
  fillRule: "evenodd"
950
950
  }
951
951
  ),
952
- /* @__PURE__ */ r(
952
+ /* @__PURE__ */ s(
953
953
  "path",
954
954
  {
955
955
  d: "M72.3425855,16.8295583 C75.799482,7.50883712 86.1577877,2.75526801 95.4785089,6.21216449 C100.284516,7.99463061 104.096358,11.7387855 105.968745,16.4968188 L106.112518,16.8745422 L159.385152,161.694068 C161.291848,166.877345 158.635655,172.624903 153.452378,174.531599 C148.358469,176.405421 142.719567,173.872338 140.716873,168.864661 L140.614848,168.598825 L89.211,28.86 L37.3759214,168.623816 C35.4885354,173.712715 29.8981043,176.351047 24.7909589,174.617647 L24.5226307,174.522368 C19.4337312,172.634982 16.7953993,167.044551 18.5287999,161.937406 L18.6240786,161.669077 L72.3425855,16.8295583 Z",
@@ -958,7 +958,7 @@ function ui({ fill: e }) {
958
958
  fillRule: "nonzero"
959
959
  }
960
960
  ),
961
- /* @__PURE__ */ r(
961
+ /* @__PURE__ */ s(
962
962
  "path",
963
963
  {
964
964
  d: "M121,103.146447 C126.522847,103.146447 131,107.623599 131,113.146447 C131,118.575687 126.673329,122.994378 121.279905,123.142605 L121,123.146447 L55,123.146447 C49.4771525,123.146447 45,118.669294 45,113.146447 C45,107.717207 49.3266708,103.298515 54.7200952,103.150288 L55,103.146447 L121,103.146447 Z",
@@ -971,55 +971,55 @@ function ui({ fill: e }) {
971
971
  }
972
972
  );
973
973
  }
974
- function mi(e) {
974
+ function ha(e) {
975
975
  const [t, n] = C(void 0);
976
- function i(s) {
977
- var c;
978
- (c = e.action) == null || c.call(e, s);
976
+ function a(r) {
977
+ var l;
978
+ (l = e.action) == null || l.call(e, r);
979
979
  }
980
- function a() {
981
- var s;
982
- (s = e.action) == null || s.call(e, t);
980
+ function i() {
981
+ var r;
982
+ (r = e.action) == null || r.call(e, t);
983
983
  }
984
984
  const o = F(
985
- Gt((s) => {
986
- n(s);
985
+ Gt((r) => {
986
+ n(r);
987
987
  }, 350),
988
988
  []
989
989
  );
990
- return /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-h-[32px]", children: [
991
- /* @__PURE__ */ r(x, { 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(ui, { fill: t }) }) }),
992
- /* @__PURE__ */ r(
990
+ return /* @__PURE__ */ m("div", { className: "flex items-center h-[32px]", children: [
991
+ /* @__PURE__ */ s(p, { tooltip: e == null ? void 0 : e.tooltip, disabled: e == null ? void 0 : e.disabled, action: i, children: /* @__PURE__ */ s("span", { className: "flex items-center justify-center text-sm", children: /* @__PURE__ */ s(ma, { fill: t }) }) }),
992
+ /* @__PURE__ */ s(
993
993
  fn,
994
994
  {
995
995
  selectedColor: t,
996
996
  setSelectedColor: o,
997
- onChange: i,
997
+ onChange: a,
998
998
  disabled: e == null ? void 0 : e.disabled,
999
999
  colors: e == null ? void 0 : e.colors,
1000
1000
  defaultColor: e == null ? void 0 : e.defaultColor,
1001
- children: /* @__PURE__ */ r(V, { variant: "ghost", size: "icon", className: "r!ichtext-h-[32px] !richtext-w-3", disabled: e == null ? void 0 : e.disabled, children: /* @__PURE__ */ r(M, { className: "!richtext-w-3 !richtext-h-3 richtext-text-zinc-500", name: "MenuDown" }) })
1001
+ children: /* @__PURE__ */ s(V, { variant: "ghost", size: "icon", className: "r!ichtext-h-[32px] !w-3", disabled: e == null ? void 0 : e.disabled, children: /* @__PURE__ */ s(M, { className: "!w-3 !h-3 text-zinc-500", name: "MenuDown" }) })
1002
1002
  }
1003
1003
  )
1004
1004
  ] });
1005
1005
  }
1006
- const Qa = Nt.extend({
1006
+ const Qi = Nt.extend({
1007
1007
  addOptions() {
1008
1008
  var e;
1009
1009
  return {
1010
1010
  ...(e = this.parent) == null ? void 0 : e.call(this),
1011
- button({ editor: t, t: n, extension: i }) {
1011
+ button({ editor: t, t: n, extension: a }) {
1012
1012
  return {
1013
- component: mi,
1013
+ component: ha,
1014
1014
  componentProps: {
1015
- colors: i.options.colors,
1016
- defaultColor: i.options.defaultColor,
1017
- action: (a) => {
1018
- a === void 0 && t.chain().focus().unsetColor().run(), typeof a == "string" && t.chain().focus().setColor(a).run();
1015
+ colors: a.options.colors,
1016
+ defaultColor: a.options.defaultColor,
1017
+ action: (i) => {
1018
+ i === void 0 && t.chain().focus().unsetColor().run(), typeof i == "string" && t.chain().focus().setColor(i).run();
1019
1019
  },
1020
1020
  isActive: () => {
1021
- const { color: a } = t.getAttributes("textStyle");
1022
- return a && t.isActive({ color: a }) || !1;
1021
+ const { color: i } = t.getAttributes("textStyle");
1022
+ return i && t.isActive({ color: i }) || !1;
1023
1023
  },
1024
1024
  editor: t,
1025
1025
  disabled: !t.can().setColor(""),
@@ -1029,7 +1029,7 @@ const Qa = Nt.extend({
1029
1029
  }
1030
1030
  };
1031
1031
  }
1032
- }), Xa = At.extend({
1032
+ }), Xi = At.extend({
1033
1033
  addOptions() {
1034
1034
  var e;
1035
1035
  return {
@@ -1038,8 +1038,8 @@ const Qa = Nt.extend({
1038
1038
  button: ({ editor: t, t: n }) => ({
1039
1039
  component: gn,
1040
1040
  componentProps: {
1041
- action: (i) => {
1042
- typeof i == "string" && t.chain().focus().setHighlight({ color: i }).run(), i === void 0 && t.chain().focus().unsetHighlight().run();
1041
+ action: (a) => {
1042
+ typeof a == "string" && t.chain().focus().setHighlight({ color: a }).run(), a === void 0 && t.chain().focus().unsetHighlight().run();
1043
1043
  },
1044
1044
  editor: t,
1045
1045
  isActive: () => t.isActive("highlight") || !1,
@@ -1056,7 +1056,7 @@ const Qa = Nt.extend({
1056
1056
  return {
1057
1057
  ...(e = this.parent) == null ? void 0 : e.call(this),
1058
1058
  button: ({ editor: t, t: n }) => ({
1059
- component: x,
1059
+ component: p,
1060
1060
  componentProps: {
1061
1061
  action: () => t.commands.toggleBulletList(),
1062
1062
  isActive: () => t.isActive("bulletList") || !1,
@@ -1075,7 +1075,7 @@ const Qa = Nt.extend({
1075
1075
  return {
1076
1076
  ...(e = this.parent) == null ? void 0 : e.call(this),
1077
1077
  button: ({ editor: t, t: n }) => ({
1078
- component: x,
1078
+ component: p,
1079
1079
  componentProps: {
1080
1080
  action: () => t.chain().focus().clearNodes().unsetAllMarks().run(),
1081
1081
  disabled: !t.can().chain().focus().clearNodes().unsetAllMarks().run(),
@@ -1091,7 +1091,7 @@ const Qa = Nt.extend({
1091
1091
  return {
1092
1092
  ...(e = this.parent) == null ? void 0 : e.call(this),
1093
1093
  button: ({ editor: t, t: n }) => ({
1094
- component: x,
1094
+ component: p,
1095
1095
  componentProps: {
1096
1096
  action: () => t.commands.toggleOrderedList(),
1097
1097
  isActive: () => t.isActive("orderedList") || !1,
@@ -1103,7 +1103,7 @@ const Qa = Nt.extend({
1103
1103
  })
1104
1104
  };
1105
1105
  }
1106
- }), io = Tt.extend({
1106
+ }), ao = Tt.extend({
1107
1107
  addOptions() {
1108
1108
  var e;
1109
1109
  return {
@@ -1117,7 +1117,7 @@ const Qa = Nt.extend({
1117
1117
  }
1118
1118
  },
1119
1119
  button: ({ editor: t, t: n }) => ({
1120
- component: x,
1120
+ component: p,
1121
1121
  componentProps: {
1122
1122
  action: () => t.commands.toggleTaskList(),
1123
1123
  isActive: () => t.isActive("taskList") || !1,
@@ -1132,7 +1132,7 @@ const Qa = Nt.extend({
1132
1132
  addExtensions() {
1133
1133
  return [Et.configure(this.options.taskItem)];
1134
1134
  }
1135
- }), ao = Ht.extend({
1135
+ }), io = Ht.extend({
1136
1136
  addOptions() {
1137
1137
  var e;
1138
1138
  return {
@@ -1141,7 +1141,7 @@ const Qa = Nt.extend({
1141
1141
  class: "blockquote"
1142
1142
  },
1143
1143
  button: ({ editor: t, t: n }) => ({
1144
- component: x,
1144
+ component: p,
1145
1145
  componentProps: {
1146
1146
  action: () => t.commands.toggleBlockquote(),
1147
1147
  isActive: () => t.isActive("blockquote") || !1,
@@ -1154,22 +1154,22 @@ const Qa = Nt.extend({
1154
1154
  };
1155
1155
  }
1156
1156
  });
1157
- function _i(e) {
1157
+ function _a(e) {
1158
1158
  const [t, n] = C(!1);
1159
- function i(a, o, s) {
1160
- e.action && (e.action({ link: a, text: o, openInNewTab: s }), n(!1));
1159
+ function a(i, o, r) {
1160
+ e.action && (e.action({ link: i, text: o, openInNewTab: r }), n(!1));
1161
1161
  }
1162
- return /* @__PURE__ */ u(le, { modal: !0, open: t, onOpenChange: n, children: [
1163
- /* @__PURE__ */ r(de, { disabled: e == null ? void 0 : e.disabled, asChild: !0, children: /* @__PURE__ */ r(
1164
- x,
1162
+ return /* @__PURE__ */ m(ce, { modal: !0, open: t, onOpenChange: n, children: [
1163
+ /* @__PURE__ */ s(de, { disabled: e == null ? void 0 : e.disabled, asChild: !0, children: /* @__PURE__ */ s(
1164
+ p,
1165
1165
  {
1166
1166
  tooltip: e == null ? void 0 : e.tooltip,
1167
1167
  isActive: e == null ? void 0 : e.isActive,
1168
1168
  disabled: e == null ? void 0 : e.disabled,
1169
- children: /* @__PURE__ */ r(M, { name: e == null ? void 0 : e.icon })
1169
+ children: /* @__PURE__ */ s(M, { name: e == null ? void 0 : e.icon })
1170
1170
  }
1171
1171
  ) }),
1172
- /* @__PURE__ */ r(he, { hideWhenDetached: !0, className: "richtext-w-full", align: "start", side: "bottom", children: /* @__PURE__ */ r(bn, { editor: e.editor, onSetLink: i }) })
1172
+ /* @__PURE__ */ s(ue, { hideWhenDetached: !0, className: "w-full", align: "start", side: "bottom", children: /* @__PURE__ */ s(bn, { editor: e.editor, onSetLink: a }) })
1173
1173
  ] });
1174
1174
  }
1175
1175
  const oo = zt.extend({
@@ -1196,11 +1196,11 @@ const oo = zt.extend({
1196
1196
  ...(e = this.parent) == null ? void 0 : e.call(this),
1197
1197
  openOnClick: !0,
1198
1198
  button: ({ editor: t, t: n }) => ({
1199
- component: _i,
1199
+ component: _a,
1200
1200
  componentProps: {
1201
1201
  editor: t,
1202
- action: (i) => {
1203
- const { link: a, text: o, openInNewTab: s } = i;
1202
+ action: (a) => {
1203
+ const { link: i, text: o, openInNewTab: r } = a;
1204
1204
  t.chain().extendMarkRange("link").insertContent({
1205
1205
  type: "text",
1206
1206
  text: o,
@@ -1208,12 +1208,12 @@ const oo = zt.extend({
1208
1208
  {
1209
1209
  type: "link",
1210
1210
  attrs: {
1211
- href: a,
1212
- target: s ? "_blank" : ""
1211
+ href: i,
1212
+ target: r ? "_blank" : ""
1213
1213
  }
1214
1214
  }
1215
1215
  ]
1216
- }).setLink({ href: a }).focus().run();
1216
+ }).setLink({ href: i }).focus().run();
1217
1217
  },
1218
1218
  id: "linkk",
1219
1219
  isActive: () => t.isActive("link") || !1,
@@ -1229,17 +1229,17 @@ const oo = zt.extend({
1229
1229
  new te({
1230
1230
  props: {
1231
1231
  handleClick: (e, t) => {
1232
- const { schema: n, doc: i, tr: a } = e.state, o = Mt(i.resolve(t), n.marks.link);
1232
+ const { schema: n, doc: a, tr: i } = e.state, o = Mt(a.resolve(t), n.marks.link);
1233
1233
  if (!o)
1234
1234
  return !1;
1235
- const s = i.resolve(o.from), c = i.resolve(o.to), h = a.setSelection(new Xe(s, c));
1236
- e.dispatch(h);
1235
+ const r = a.resolve(o.from), l = a.resolve(o.to), u = i.setSelection(new Xe(r, l));
1236
+ e.dispatch(u);
1237
1237
  }
1238
1238
  }
1239
1239
  })
1240
1240
  ];
1241
1241
  }
1242
- }), ro = Pt.extend({
1242
+ }), so = Pt.extend({
1243
1243
  renderHTML() {
1244
1244
  return [
1245
1245
  "div",
@@ -1254,7 +1254,7 @@ const oo = zt.extend({
1254
1254
  return {
1255
1255
  ...(e = this.parent) == null ? void 0 : e.call(this),
1256
1256
  button: ({ editor: t, t: n }) => ({
1257
- component: x,
1257
+ component: p,
1258
1258
  componentProps: {
1259
1259
  action: () => t.commands.setHorizontalRule(),
1260
1260
  disabled: !t.can().setHorizontalRule(),
@@ -1271,75 +1271,75 @@ const oo = zt.extend({
1271
1271
  };
1272
1272
  }
1273
1273
  });
1274
- function fi(e) {
1274
+ function fa(e) {
1275
1275
  var d;
1276
1276
  const {
1277
1277
  icon: t = void 0,
1278
1278
  // title = undefined,
1279
1279
  tooltip: n = void 0,
1280
1280
  // disabled = false,
1281
- customClass: i = "",
1281
+ customClass: a = "",
1282
1282
  // color = undefined,
1283
1283
  // loading = false,
1284
1284
  // shortcutKeys = undefined,
1285
- tooltipOptions: a = {},
1285
+ tooltipOptions: i = {},
1286
1286
  action: o = void 0,
1287
- isActive: s = void 0,
1288
- children: c
1289
- } = e, h = Pe[t];
1290
- return /* @__PURE__ */ u(pe, { children: [
1291
- /* @__PURE__ */ r(we, { asChild: !0, children: /* @__PURE__ */ u(
1287
+ isActive: r = void 0,
1288
+ children: l
1289
+ } = e, u = Pe[t];
1290
+ return /* @__PURE__ */ m(we, { children: [
1291
+ /* @__PURE__ */ s(ye, { asChild: !0, children: /* @__PURE__ */ m(
1292
1292
  Be,
1293
1293
  {
1294
1294
  size: "sm",
1295
- className: `richtext-w-[32px] richtext-h-[32px] ${i}`,
1296
- disabled: s == null ? void 0 : s(),
1295
+ className: `w-[32px] h-[32px] ${a}`,
1296
+ disabled: r == null ? void 0 : r(),
1297
1297
  onClick: o,
1298
1298
  children: [
1299
- h && /* @__PURE__ */ r(h, { className: "richtext-w-4 richtext-h-4" }),
1300
- c && /* @__PURE__ */ r(xe, { children: c })
1299
+ u && /* @__PURE__ */ s(u, { className: "w-4 h-4" }),
1300
+ l && /* @__PURE__ */ s(pe, { children: l })
1301
1301
  ]
1302
1302
  }
1303
1303
  ) }),
1304
- n && /* @__PURE__ */ r(ye, { ...a, children: /* @__PURE__ */ u("div", { className: "richtext-flex richtext-flex-col richtext-items-center richtext-text-center richtext-max-w-24", children: [
1305
- /* @__PURE__ */ r("div", { children: n }),
1306
- !!((d = e == null ? void 0 : e.shortcutKeys) != null && d.length) && /* @__PURE__ */ r("span", { children: Re(e == null ? void 0 : e.shortcutKeys) })
1304
+ n && /* @__PURE__ */ s(ke, { ...i, children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center text-center max-w-24", children: [
1305
+ /* @__PURE__ */ s("div", { children: n }),
1306
+ !!((d = e == null ? void 0 : e.shortcutKeys) != null && d.length) && /* @__PURE__ */ s("span", { children: Re(e == null ? void 0 : e.shortcutKeys) })
1307
1307
  ] }) })
1308
1308
  ] });
1309
1309
  }
1310
- const gi = ["undo", "redo"], so = Rt.extend({
1310
+ const ga = ["undo", "redo"], ro = Rt.extend({
1311
1311
  addOptions() {
1312
1312
  var e;
1313
1313
  return {
1314
1314
  ...(e = this.parent) == null ? void 0 : e.call(this),
1315
1315
  depth: 100,
1316
1316
  newGroupDelay: 500,
1317
- button: ({ editor: t, t: n }) => gi.map((i) => ({
1318
- component: fi,
1317
+ button: ({ editor: t, t: n }) => ga.map((a) => ({
1318
+ component: fa,
1319
1319
  componentProps: {
1320
1320
  action: () => {
1321
- i === "undo" && t.chain().focus().undo().run(), i === "redo" && t.chain().focus().redo().run();
1321
+ a === "undo" && t.chain().focus().undo().run(), a === "redo" && t.chain().focus().redo().run();
1322
1322
  },
1323
- shortcutKeys: i === "undo" ? ["mod", "Z"] : ["shift", "mod", "Z"],
1324
- disabled: i === "undo" ? !t.can().undo() : !t.can().redo(),
1325
- isActive: () => i === "undo" ? !t.can().undo() : !t.can().redo(),
1326
- icon: i === "undo" ? "Undo2" : "Redo2",
1327
- tooltip: n(`editor.${i}.tooltip`)
1323
+ shortcutKeys: a === "undo" ? ["mod", "Z"] : ["shift", "mod", "Z"],
1324
+ disabled: a === "undo" ? !t.can().undo() : !t.can().redo(),
1325
+ isActive: () => a === "undo" ? !t.can().undo() : !t.can().redo(),
1326
+ icon: a === "undo" ? "Undo2" : "Redo2",
1327
+ tooltip: n(`editor.${a}.tooltip`)
1328
1328
  }
1329
1329
  }))
1330
1330
  };
1331
1331
  }
1332
- }), bi = It.extend({
1332
+ }), ba = It.extend({
1333
1333
  content: "(block|columns)+"
1334
1334
  // echo editor is a block editor
1335
- }), co = A.create({
1335
+ }), lo = A.create({
1336
1336
  name: "columnActionButton",
1337
1337
  addOptions() {
1338
1338
  var e;
1339
1339
  return {
1340
1340
  ...(e = this.parent) == null ? void 0 : e.call(this),
1341
1341
  button: ({ editor: t, t: n }) => ({
1342
- component: x,
1342
+ component: p,
1343
1343
  componentProps: {
1344
1344
  action: () => {
1345
1345
  t.chain().focus().insertColumns({ cols: 2 }).run();
@@ -1350,7 +1350,7 @@ const gi = ["undo", "redo"], so = Rt.extend({
1350
1350
  })
1351
1351
  };
1352
1352
  }
1353
- }), xi = A.create({
1353
+ }), pa = A.create({
1354
1354
  name: "selection",
1355
1355
  addProseMirrorPlugins() {
1356
1356
  const { editor: e } = this;
@@ -1359,8 +1359,8 @@ const gi = ["undo", "redo"], so = Rt.extend({
1359
1359
  key: new Z("selection"),
1360
1360
  props: {
1361
1361
  decorations(t) {
1362
- return t.selection.empty || e.isFocused === !0 ? null : se.create(t.doc, [
1363
- ce.inline(t.selection.from, t.selection.to, {
1362
+ return t.selection.empty || e.isFocused === !0 ? null : re.create(t.doc, [
1363
+ le.inline(t.selection.from, t.selection.to, {
1364
1364
  class: "selection"
1365
1365
  })
1366
1366
  ]);
@@ -1370,7 +1370,7 @@ const gi = ["undo", "redo"], so = Rt.extend({
1370
1370
  ];
1371
1371
  }
1372
1372
  });
1373
- function pi(e) {
1373
+ function wa(e) {
1374
1374
  const { t } = j(), n = R(() => [
1375
1375
  {
1376
1376
  name: "paragraph",
@@ -1435,45 +1435,45 @@ function pi(e) {
1435
1435
  iconName: "Code2",
1436
1436
  action: () => e.editor.chain().focus().clearNodes().toggleCodeBlock().run()
1437
1437
  }
1438
- ], [e.editor, t]), i = R(() => n.findLast((a) => a.isActive()) ?? {
1438
+ ], [e.editor, t]), a = R(() => n.findLast((i) => i.isActive()) ?? {
1439
1439
  label: "Empty"
1440
1440
  }, [n]);
1441
- return /* @__PURE__ */ u(Y, { children: [
1442
- /* @__PURE__ */ r(Q, { asChild: !0, children: /* @__PURE__ */ u(
1441
+ return /* @__PURE__ */ m(Y, { children: [
1442
+ /* @__PURE__ */ s(Q, { asChild: !0, children: /* @__PURE__ */ m(
1443
1443
  V,
1444
1444
  {
1445
- className: "richtext-flex richtext-h-[32px] richtext-gap-1 richtext-px-1.5",
1445
+ className: "flex h-[32px] gap-1 px-1.5",
1446
1446
  variant: "ghost",
1447
1447
  children: [
1448
- /* @__PURE__ */ u("span", { className: "richtext-whitespace-nowrap richtext-text-sm richtext-font-normal", children: [
1448
+ /* @__PURE__ */ m("span", { className: "whitespace-nowrap text-sm font-normal", children: [
1449
1449
  " ",
1450
- i == null ? void 0 : i.label
1450
+ a == null ? void 0 : a.label
1451
1451
  ] }),
1452
- /* @__PURE__ */ r(Me, { className: "richtext-size-4" })
1452
+ /* @__PURE__ */ s(Me, { className: "size-4" })
1453
1453
  ]
1454
1454
  }
1455
1455
  ) }),
1456
- /* @__PURE__ */ r(
1456
+ /* @__PURE__ */ s(
1457
1457
  X,
1458
1458
  {
1459
1459
  align: "start",
1460
- className: "richtext-w-full richtext-p-1",
1460
+ className: "w-full p-1",
1461
1461
  hideWhenDetached: !0,
1462
1462
  sideOffset: 5,
1463
- children: n.map((a, o) => {
1464
- var c;
1465
- const s = Pe[a.iconName];
1466
- return /* @__PURE__ */ r(
1463
+ children: n.map((i, o) => {
1464
+ var l;
1465
+ const r = Pe[i.iconName];
1466
+ return /* @__PURE__ */ s(
1467
1467
  ne,
1468
1468
  {
1469
- checked: ((c = a.isActive) == null ? void 0 : c.call(a)) || !1,
1470
- className: "richtext-cursor-pointer",
1471
- onClick: () => a.action(),
1472
- children: /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-gap-2 richtext-px-2", children: [
1473
- /* @__PURE__ */ r(s, { className: "richtext-h3 richtext-w-3" }),
1474
- /* @__PURE__ */ u("span", { children: [
1469
+ checked: ((l = i.isActive) == null ? void 0 : l.call(i)) || !1,
1470
+ className: "cursor-pointer",
1471
+ onClick: () => i.action(),
1472
+ children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2 px-2", children: [
1473
+ /* @__PURE__ */ s(r, { className: "h3 w-3" }),
1474
+ /* @__PURE__ */ m("span", { children: [
1475
1475
  " ",
1476
- a.label
1476
+ i.label
1477
1477
  ] })
1478
1478
  ] })
1479
1479
  },
@@ -1484,7 +1484,7 @@ function pi(e) {
1484
1484
  )
1485
1485
  ] });
1486
1486
  }
1487
- const wi = A.create({
1487
+ const ya = A.create({
1488
1488
  name: "text-bubble",
1489
1489
  addOptions() {
1490
1490
  var e;
@@ -1492,7 +1492,7 @@ const wi = A.create({
1492
1492
  ...(e = this.parent) == null ? void 0 : e.call(this),
1493
1493
  toolbar: !1,
1494
1494
  button: () => ({
1495
- component: pi,
1495
+ component: wa,
1496
1496
  componentProps: {}
1497
1497
  })
1498
1498
  };
@@ -1501,7 +1501,7 @@ const wi = A.create({
1501
1501
  function We({ types: e, node: t }) {
1502
1502
  return Array.isArray(e) && e.includes(t.type) || t.type === e;
1503
1503
  }
1504
- const yi = A.create({
1504
+ const ka = A.create({
1505
1505
  name: "trailingNode",
1506
1506
  addOptions() {
1507
1507
  return {
@@ -1514,35 +1514,35 @@ const yi = A.create({
1514
1514
  return [
1515
1515
  new te({
1516
1516
  key: e,
1517
- appendTransaction: (n, i, a) => {
1518
- const { doc: o, tr: s, schema: c } = a, h = e.getState(a), d = o.content.size, l = c.nodes[this.options.node];
1519
- if (h)
1520
- return s.insert(d, l.create());
1517
+ appendTransaction: (n, a, i) => {
1518
+ const { doc: o, tr: r, schema: l } = i, u = e.getState(i), d = o.content.size, c = l.nodes[this.options.node];
1519
+ if (u)
1520
+ return r.insert(d, c.create());
1521
1521
  },
1522
1522
  state: {
1523
- init: (n, i) => {
1524
- const a = i.tr.doc.lastChild;
1525
- return !We({ node: a, types: t });
1523
+ init: (n, a) => {
1524
+ const i = a.tr.doc.lastChild;
1525
+ return !We({ node: i, types: t });
1526
1526
  },
1527
- apply: (n, i) => {
1527
+ apply: (n, a) => {
1528
1528
  if (!n.docChanged)
1529
- return i;
1530
- const a = n.doc.lastChild;
1531
- return !We({ node: a, types: t });
1529
+ return a;
1530
+ const i = n.doc.lastChild;
1531
+ return !We({ node: i, types: t });
1532
1532
  }
1533
1533
  }
1534
1534
  })
1535
1535
  ];
1536
1536
  }
1537
- }), lo = A.create({
1537
+ }), co = A.create({
1538
1538
  name: "base-kit",
1539
1539
  addExtensions() {
1540
1540
  const e = [];
1541
- return this.options.document !== !1 && e.push(bi.configure()), this.options.placeholder !== !1 && e.push(
1541
+ return this.options.document !== !1 && e.push(ba.configure()), this.options.placeholder !== !1 && e.push(
1542
1542
  jt.configure({
1543
- placeholder: ({ node: t, pos: n, editor: i }) => {
1544
- var a, o, s, c, h;
1545
- return ((a = t == null ? void 0 : t.type) == null ? void 0 : a.name) === "columns" || ((o = t == null ? void 0 : t.content) == null ? void 0 : o.size) !== 0 ? "" : ((s = t == null ? void 0 : t.type) == null ? void 0 : s.name) === "heading" ? `${N.t(`editor.heading.h${t.attrs.level}.tooltip`)}` : ((c = t == null ? void 0 : t.type) == null ? void 0 : c.name) === "codeBlock" || ((h = t == null ? void 0 : t.type) == null ? void 0 : h.name) === "table" ? "" : i.extensionManager.extensions.some((d) => d.name === "slashCommand") ? N.t("editor.slash") : n === 0 ? N.t("editor.content") : N.t("editor.content");
1543
+ placeholder: ({ node: t, pos: n, editor: a }) => {
1544
+ var i, o, r, l, u;
1545
+ return ((i = t == null ? void 0 : t.type) == null ? void 0 : i.name) === "columns" || ((o = t == null ? void 0 : t.content) == null ? void 0 : o.size) !== 0 ? "" : ((r = t == null ? void 0 : t.type) == null ? void 0 : r.name) === "heading" ? `${N.t(`editor.heading.h${t.attrs.level}.tooltip`)}` : ((l = t == null ? void 0 : t.type) == null ? void 0 : l.name) === "codeBlock" || ((u = t == null ? void 0 : t.type) == null ? void 0 : u.name) === "table" ? "" : a.extensionManager.extensions.some((d) => d.name === "slashCommand") ? N.t("editor.slash") : n === 0 ? N.t("editor.content") : N.t("editor.content");
1546
1546
  },
1547
1547
  ...this.options.placeholder
1548
1548
  })
@@ -1551,41 +1551,41 @@ const yi = A.create({
1551
1551
  className: "focus",
1552
1552
  ...this.options.focus
1553
1553
  })
1554
- ), this.options.text !== !1 && e.push(Dt.configure()), this.options.textBubble !== !1 && e.push(wi.configure()), this.options.gapcursor !== !1 && e.push(Ot.configure()), this.options.dropcursor !== !1 && e.push(
1554
+ ), this.options.text !== !1 && e.push(Dt.configure()), this.options.textBubble !== !1 && e.push(ya.configure()), this.options.gapcursor !== !1 && e.push(Ot.configure()), this.options.dropcursor !== !1 && e.push(
1555
1555
  $t.configure({
1556
1556
  ...this.options.dropcursor,
1557
1557
  width: 2,
1558
1558
  class: "ProseMirror-dropcursor border-black"
1559
1559
  })
1560
- ), this.options.characterCount !== !1 && e.push(Ft.configure(this.options.characterCount)), this.options.paragraph !== !1 && e.push(Ut.configure(this.options.paragraph)), this.options.hardBreak !== !1 && e.push(qt.configure(this.options.hardBreak)), this.options.listItem !== !1 && e.push(Kt.configure(this.options.listItem)), this.options.textStyle !== !1 && e.push(Vt.configure(this.options.textStyle)), this.options.trailingNode !== !1 && e.push(yi.configure(this.options.trailingNode)), this.options.selection !== !1 && e.push(xi), this.options.multiColumn !== !1 && e.push(xn, pn), e;
1560
+ ), this.options.characterCount !== !1 && e.push(Ft.configure(this.options.characterCount)), this.options.paragraph !== !1 && e.push(Ut.configure(this.options.paragraph)), this.options.hardBreak !== !1 && e.push(qt.configure(this.options.hardBreak)), this.options.listItem !== !1 && e.push(Kt.configure(this.options.listItem)), this.options.textStyle !== !1 && e.push(Vt.configure(this.options.textStyle)), this.options.trailingNode !== !1 && e.push(ka.configure(this.options.trailingNode)), this.options.selection !== !1 && e.push(pa), this.options.multiColumn !== !1 && e.push(pn, wn), e;
1561
1561
  }
1562
- }), ho = A.create({
1562
+ }), uo = A.create({
1563
1563
  name: "subAndSuperScript",
1564
1564
  addOptions() {
1565
1565
  var e;
1566
1566
  return {
1567
1567
  ...(e = this.parent) == null ? void 0 : e.call(this),
1568
- button: ({ editor: t, extension: n, t: i }) => {
1569
- const a = n.options.subscript, o = n.options.superscript, s = {
1570
- component: x,
1568
+ button: ({ editor: t, extension: n, t: a }) => {
1569
+ const i = n.options.subscript, o = n.options.superscript, r = {
1570
+ component: p,
1571
1571
  componentProps: {
1572
1572
  action: () => t.commands.toggleSubscript(),
1573
1573
  isActive: () => t.isActive("subscript") || !1,
1574
1574
  disabled: !t.can().toggleSubscript(),
1575
1575
  icon: "Subscript",
1576
- tooltip: i("editor.subscript.tooltip")
1576
+ tooltip: a("editor.subscript.tooltip")
1577
1577
  }
1578
- }, c = {
1579
- component: x,
1578
+ }, l = {
1579
+ component: p,
1580
1580
  componentProps: {
1581
1581
  action: () => t.commands.toggleSuperscript(),
1582
1582
  isActive: () => t.isActive("superscript") || !1,
1583
1583
  disabled: !t.can().toggleSuperscript(),
1584
1584
  icon: "Superscript",
1585
- tooltip: i("editor.superscript.tooltip")
1585
+ tooltip: a("editor.superscript.tooltip")
1586
1586
  }
1587
- }, h = [];
1588
- return a !== !1 && h.push(s), o !== !1 && h.push(c), h;
1587
+ }, u = [];
1588
+ return i !== !1 && u.push(r), o !== !1 && u.push(l), u;
1589
1589
  }
1590
1590
  };
1591
1591
  },
@@ -1594,83 +1594,83 @@ const yi = A.create({
1594
1594
  return this.options.subscript !== !1 && e.push(Je.configure(this.options.subscript)), this.options.superscript !== !1 && e.push(Ye.configure(this.options.superscript)), e;
1595
1595
  }
1596
1596
  });
1597
- function ki(e) {
1597
+ function va(e) {
1598
1598
  var n;
1599
1599
  const t = R(() => {
1600
1600
  var o;
1601
- const i = (o = e == null ? void 0 : e.items) == null ? void 0 : o.find((s) => s.isActive());
1602
- return i && !i.default ? {
1603
- ...i,
1604
- icon: i != null && i.icon ? i == null ? void 0 : i.icon : e == null ? void 0 : e.icon
1601
+ const a = (o = e == null ? void 0 : e.items) == null ? void 0 : o.find((r) => r.isActive());
1602
+ return a && !a.default ? {
1603
+ ...a,
1604
+ icon: a != null && a.icon ? a == null ? void 0 : a.icon : e == null ? void 0 : e.icon
1605
1605
  } : {
1606
1606
  title: e.tooltip,
1607
1607
  icon: e.icon,
1608
1608
  isActive: () => !1
1609
1609
  };
1610
1610
  }, [e]);
1611
- return /* @__PURE__ */ u(Y, { children: [
1612
- /* @__PURE__ */ r(
1611
+ return /* @__PURE__ */ m(Y, { children: [
1612
+ /* @__PURE__ */ s(
1613
1613
  Q,
1614
1614
  {
1615
1615
  asChild: !0,
1616
1616
  disabled: e == null ? void 0 : e.disabled,
1617
- children: /* @__PURE__ */ r(
1618
- x,
1617
+ children: /* @__PURE__ */ s(
1618
+ p,
1619
1619
  {
1620
- customClass: "!richtext-w-12 richtext-h-12",
1620
+ customClass: "!w-12 h-12",
1621
1621
  disabled: e == null ? void 0 : e.disabled,
1622
1622
  icon: e == null ? void 0 : e.icon,
1623
1623
  tooltip: e == null ? void 0 : e.tooltip,
1624
- children: /* @__PURE__ */ r(wn, { className: "richtext-size-3 richtext-text-gray-500" })
1624
+ children: /* @__PURE__ */ s(yn, { className: "size-3 text-gray-500" })
1625
1625
  }
1626
1626
  )
1627
1627
  }
1628
1628
  ),
1629
- /* @__PURE__ */ r(X, { className: "w-full", children: (n = e == null ? void 0 : e.items) == null ? void 0 : n.map((i, a) => /* @__PURE__ */ u(
1629
+ /* @__PURE__ */ s(X, { className: "w-full", children: (n = e == null ? void 0 : e.items) == null ? void 0 : n.map((a, i) => /* @__PURE__ */ m(
1630
1630
  ne,
1631
1631
  {
1632
- checked: t.title === i.title,
1633
- className: "richtext-flex richtext-items-center richtext-gap-3",
1634
- onClick: i.action,
1632
+ checked: t.title === a.title,
1633
+ className: "flex items-center gap-3",
1634
+ onClick: a.action,
1635
1635
  children: [
1636
- /* @__PURE__ */ r(M, { name: i == null ? void 0 : i.icon }),
1637
- /* @__PURE__ */ r("span", { className: "richtext-ml-1", children: i.title }),
1638
- !!(i != null && i.shortcutKeys) && /* @__PURE__ */ r("span", { className: "richtext-ml-auto richtext-text-xs richtext-tracking-widest richtext-opacity-60", children: Re(i.shortcutKeys) })
1636
+ /* @__PURE__ */ s(M, { name: a == null ? void 0 : a.icon }),
1637
+ /* @__PURE__ */ s("span", { className: "ml-1", children: a.title }),
1638
+ !!(a != null && a.shortcutKeys) && /* @__PURE__ */ s("span", { className: "ml-auto text-xs tracking-widest opacity-60", children: Re(a.shortcutKeys) })
1639
1639
  ]
1640
1640
  },
1641
- `more-mark-${a}`
1641
+ `more-mark-${i}`
1642
1642
  )) })
1643
1643
  ] });
1644
1644
  }
1645
- const uo = A.create({
1645
+ const mo = A.create({
1646
1646
  name: "moreMark",
1647
1647
  addOptions() {
1648
1648
  var e;
1649
1649
  return {
1650
1650
  ...(e = this.parent) == null ? void 0 : e.call(this),
1651
- button({ editor: t, extension: n, t: i }) {
1652
- const a = n.options.subscript, o = n.options.superscript, s = {
1651
+ button({ editor: t, extension: n, t: a }) {
1652
+ const i = n.options.subscript, o = n.options.superscript, r = {
1653
1653
  action: () => t.commands.toggleSubscript(),
1654
1654
  isActive: () => t.isActive("subscript") || !1,
1655
1655
  disabled: !t.can().toggleSubscript(),
1656
1656
  icon: "Subscript",
1657
- title: i("editor.subscript.tooltip"),
1657
+ title: a("editor.subscript.tooltip"),
1658
1658
  shortcutKeys: ["mod", "."]
1659
- }, c = {
1659
+ }, l = {
1660
1660
  action: () => t.commands.toggleSuperscript(),
1661
1661
  isActive: () => t.isActive("superscript") || !1,
1662
1662
  disabled: !t.can().toggleSuperscript(),
1663
1663
  icon: "Superscript",
1664
- title: i("editor.superscript.tooltip"),
1664
+ title: a("editor.superscript.tooltip"),
1665
1665
  shortcutKeys: ["mod", ","]
1666
- }, h = [];
1667
- return a !== !1 && h.push(s), o !== !1 && h.push(c), {
1668
- component: ki,
1666
+ }, u = [];
1667
+ return i !== !1 && u.push(r), o !== !1 && u.push(l), {
1668
+ component: va,
1669
1669
  componentProps: {
1670
1670
  icon: "Type",
1671
- tooltip: i("editor.moremark"),
1671
+ tooltip: a("editor.moremark"),
1672
1672
  disabled: !t.isEditable,
1673
- items: h
1673
+ items: u
1674
1674
  }
1675
1675
  };
1676
1676
  }
@@ -1680,19 +1680,19 @@ const uo = A.create({
1680
1680
  const e = [];
1681
1681
  return this.options.subscript !== !1 && e.push(Je.configure(this.options.subscript)), this.options.superscript !== !1 && e.push(Ye.configure(this.options.superscript)), e;
1682
1682
  }
1683
- }), mo = A.create({
1683
+ }), ho = A.create({
1684
1684
  name: "indent",
1685
1685
  addOptions() {
1686
1686
  var e;
1687
1687
  return {
1688
1688
  ...(e = this.parent) == null ? void 0 : e.call(this),
1689
1689
  types: ["paragraph", "heading", "blockquote"],
1690
- minIndent: me.min,
1691
- maxIndent: me.max,
1690
+ minIndent: he.min,
1691
+ maxIndent: he.max,
1692
1692
  button({ editor: t, t: n }) {
1693
1693
  return [
1694
1694
  {
1695
- component: x,
1695
+ component: p,
1696
1696
  componentProps: {
1697
1697
  action: () => {
1698
1698
  t.commands.indent();
@@ -1703,7 +1703,7 @@ const uo = A.create({
1703
1703
  }
1704
1704
  },
1705
1705
  {
1706
- component: x,
1706
+ component: p,
1707
1707
  componentProps: {
1708
1708
  action: () => {
1709
1709
  t.commands.outdent();
@@ -1737,11 +1737,11 @@ const uo = A.create({
1737
1737
  addCommands() {
1738
1738
  return {
1739
1739
  indent: () => Fe({
1740
- delta: me.more,
1740
+ delta: he.more,
1741
1741
  types: this.options.types
1742
1742
  }),
1743
1743
  outdent: () => Fe({
1744
- delta: me.less,
1744
+ delta: he.less,
1745
1745
  types: this.options.types
1746
1746
  })
1747
1747
  };
@@ -1753,43 +1753,43 @@ const uo = A.create({
1753
1753
  };
1754
1754
  }
1755
1755
  });
1756
- function vi(e) {
1756
+ function xa(e) {
1757
1757
  return Number.parseFloat(e.replace("%", "")) / 100;
1758
1758
  }
1759
- function Ci(e) {
1760
- const { t } = j(), [n, i] = C("default");
1761
- function a(s) {
1762
- s === "default" ? e.editor.commands.unsetLineHeight() : e.editor.commands.setLineHeight(s), i(s);
1759
+ function Ca(e) {
1760
+ const { t } = j(), [n, a] = C("default");
1761
+ function i(r) {
1762
+ r === "default" ? e.editor.commands.unsetLineHeight() : e.editor.commands.setLineHeight(r), a(r);
1763
1763
  }
1764
1764
  const o = R(() => {
1765
- const h = e.editor.extensionManager.extensions.find(
1765
+ const u = e.editor.extensionManager.extensions.find(
1766
1766
  (d) => d.name === "lineHeight"
1767
1767
  ).options.lineHeights.map((d) => ({
1768
- label: vi(d),
1768
+ label: xa(d),
1769
1769
  value: d
1770
1770
  }));
1771
- return h.unshift({
1771
+ return u.unshift({
1772
1772
  label: t("editor.default"),
1773
1773
  value: "default"
1774
- }), h;
1774
+ }), u;
1775
1775
  }, [e]);
1776
- return /* @__PURE__ */ u(Y, { children: [
1777
- /* @__PURE__ */ r(
1776
+ return /* @__PURE__ */ m(Y, { children: [
1777
+ /* @__PURE__ */ s(
1778
1778
  Q,
1779
1779
  {
1780
1780
  asChild: !0,
1781
1781
  disabled: e == null ? void 0 : e.disabled,
1782
- children: /* @__PURE__ */ r(
1783
- x,
1782
+ children: /* @__PURE__ */ s(
1783
+ p,
1784
1784
  {
1785
- customClass: "!richtext-w-12 richtext-h-12",
1785
+ customClass: "!w-12 h-12",
1786
1786
  disabled: e == null ? void 0 : e.disabled,
1787
1787
  icon: "LineHeight",
1788
1788
  tooltip: e == null ? void 0 : e.tooltip,
1789
- children: /* @__PURE__ */ r(
1789
+ children: /* @__PURE__ */ s(
1790
1790
  M,
1791
1791
  {
1792
- className: "richtext-ml-1 richtext-size-3 richtext-text-zinc-500",
1792
+ className: "ml-1 size-3 text-zinc-500",
1793
1793
  name: "MenuDown"
1794
1794
  }
1795
1795
  )
@@ -1797,47 +1797,47 @@ function Ci(e) {
1797
1797
  )
1798
1798
  }
1799
1799
  ),
1800
- /* @__PURE__ */ r(X, { className: "richtext-min-w-24", children: o == null ? void 0 : o.map((s, c) => /* @__PURE__ */ r(
1800
+ /* @__PURE__ */ s(X, { className: "min-w-24", children: o == null ? void 0 : o.map((r, l) => /* @__PURE__ */ s(
1801
1801
  ne,
1802
1802
  {
1803
- checked: s.value === n,
1804
- onClick: () => a(s.value),
1805
- children: s.label
1803
+ checked: r.value === n,
1804
+ onClick: () => i(r.value),
1805
+ children: r.label
1806
1806
  },
1807
- `lineHeight-${c}`
1807
+ `lineHeight-${l}`
1808
1808
  )) })
1809
1809
  ] });
1810
1810
  }
1811
- const Ni = ["paragraph", "heading", "list_item", "todo_item"];
1812
- function Ai(e, t) {
1813
- const { selection: n, doc: i } = e;
1814
- if (!n || !i || !(n instanceof Xe || n instanceof Zt))
1811
+ const Na = ["paragraph", "heading", "list_item", "todo_item"];
1812
+ function Aa(e, t) {
1813
+ const { selection: n, doc: a } = e;
1814
+ if (!n || !a || !(n instanceof Xe || n instanceof Zt))
1815
1815
  return e;
1816
- const { from: a, to: o } = n, s = [], c = t && t !== it ? t : null;
1817
- if (i.nodesBetween(a, o, (h, d) => {
1818
- const l = h.type;
1819
- return Ni.includes(l.name) ? ((h.attrs.lineHeight || null) !== c && s.push({
1820
- node: h,
1816
+ const { from: i, to: o } = n, r = [], l = t && t !== at ? t : null;
1817
+ if (a.nodesBetween(i, o, (u, d) => {
1818
+ const c = u.type;
1819
+ return Na.includes(c.name) ? ((u.attrs.lineHeight || null) !== l && r.push({
1820
+ node: u,
1821
1821
  pos: d,
1822
- nodeType: l
1823
- }), l.name !== "list_item" && l.name !== "todo_item") : !0;
1824
- }), s.length === 0)
1822
+ nodeType: c
1823
+ }), c.name !== "list_item" && c.name !== "todo_item") : !0;
1824
+ }), r.length === 0)
1825
1825
  return e;
1826
- for (const h of s) {
1827
- const { node: d, pos: l, nodeType: m } = h;
1826
+ for (const u of r) {
1827
+ const { node: d, pos: c, nodeType: h } = u;
1828
1828
  let { attrs: _ } = d;
1829
1829
  _ = {
1830
1830
  ..._,
1831
- lineHeight: c
1832
- }, e = e.setNodeMarkup(l, m, _, d.marks);
1831
+ lineHeight: l
1832
+ }, e = e.setNodeMarkup(c, h, _, d.marks);
1833
1833
  }
1834
1834
  return e;
1835
1835
  }
1836
- function Li(e) {
1836
+ function La(e) {
1837
1837
  return ({ state: t, dispatch: n }) => {
1838
- const { selection: i } = t;
1839
- let { tr: a } = t;
1840
- return a = a.setSelection(i), a = Ai(a, e), a.docChanged ? (n && n(a), !0) : !1;
1838
+ const { selection: a } = t;
1839
+ let { tr: i } = t;
1840
+ return i = i.setSelection(a), i = Aa(i, e), i.docChanged ? (n && n(i), !0) : !1;
1841
1841
  };
1842
1842
  }
1843
1843
  const _o = A.create({
@@ -1848,10 +1848,10 @@ const _o = A.create({
1848
1848
  ...(e = this.parent) == null ? void 0 : e.call(this),
1849
1849
  types: ["paragraph", "heading", "list_item", "todo_item"],
1850
1850
  lineHeights: Rn,
1851
- defaultHeight: it,
1851
+ defaultHeight: at,
1852
1852
  button({ editor: t, t: n }) {
1853
1853
  return {
1854
- component: Ci,
1854
+ component: Ca,
1855
1855
  componentProps: {
1856
1856
  editor: t,
1857
1857
  tooltip: n("editor.lineheight.tooltip")
@@ -1876,103 +1876,103 @@ const _o = A.create({
1876
1876
  },
1877
1877
  addCommands() {
1878
1878
  return {
1879
- setLineHeight: (e) => Li(e),
1879
+ setLineHeight: (e) => La(e),
1880
1880
  unsetLineHeight: () => ({ commands: e }) => this.options.types.every((t) => e.resetAttributes(t, "lineHeight"))
1881
1881
  };
1882
1882
  }
1883
1883
  });
1884
- function Si(e, t) {
1884
+ function Sa(e, t) {
1885
1885
  var L, E;
1886
- const [n, i] = C(0), [a, o] = C(0), s = G(null), { t: c } = j(), h = G([]);
1886
+ const [n, a] = C(0), [i, o] = C(0), r = G(null), { t: l } = j(), u = G([]);
1887
1887
  ze(t, () => ({
1888
1888
  onKeyDown: d
1889
1889
  })), z(() => {
1890
- if (!s.current)
1890
+ if (!r.current)
1891
1891
  return;
1892
- const g = a * 1e3 + n, b = h.current[g];
1892
+ const g = i * 1e3 + n, b = u.current[g];
1893
1893
  b && b.scrollIntoView({
1894
1894
  behavior: "smooth",
1895
1895
  block: "nearest"
1896
1896
  });
1897
- }, [n, a]);
1897
+ }, [n, i]);
1898
1898
  function d({ event: g }) {
1899
- return g.key === "ArrowUp" ? (l(), !0) : g.key === "ArrowDown" ? (m(), !0) : g.key === "Enter" ? (_(), !0) : !1;
1899
+ return g.key === "ArrowUp" ? (c(), !0) : g.key === "ArrowDown" ? (h(), !0) : g.key === "Enter" ? (_(), !0) : !1;
1900
1900
  }
1901
- function l() {
1902
- var k;
1901
+ function c() {
1902
+ var v;
1903
1903
  if (e.items.length === 0)
1904
1904
  return !1;
1905
- let g = n - 1, b = a;
1906
- g < 0 && (b = a - 1, g = ((k = e.items[b]) == null ? void 0 : k.commands.length) - 1 || 0), b < 0 && (b = e.items.length - 1, g = e.items[b].commands.length - 1), i(g), o(b);
1905
+ let g = n - 1, b = i;
1906
+ g < 0 && (b = i - 1, g = ((v = e.items[b]) == null ? void 0 : v.commands.length) - 1 || 0), b < 0 && (b = e.items.length - 1, g = e.items[b].commands.length - 1), a(g), o(b);
1907
1907
  }
1908
- function m() {
1908
+ function h() {
1909
1909
  if (e.items.length === 0)
1910
1910
  return !1;
1911
- const g = e.items[a].commands;
1912
- let b = n + 1, k = a;
1913
- g.length - 1 < b && (b = 0, k = a + 1), e.items.length - 1 < k && (k = 0), i(b), o(k);
1911
+ const g = e.items[i].commands;
1912
+ let b = n + 1, v = i;
1913
+ g.length - 1 < b && (b = 0, v = i + 1), e.items.length - 1 < v && (v = 0), a(b), o(v);
1914
1914
  }
1915
1915
  function _() {
1916
- if (e.items.length === 0 || a === -1 || n === -1)
1916
+ if (e.items.length === 0 || i === -1 || n === -1)
1917
1917
  return !1;
1918
- f(a, n);
1918
+ f(i, n);
1919
1919
  }
1920
1920
  function f(g, b) {
1921
- const k = e.items[g].commands[b];
1922
- e.command(k);
1921
+ const v = e.items[g].commands[b];
1922
+ e.command(v);
1923
1923
  }
1924
- function p(g, b) {
1924
+ function w(g, b) {
1925
1925
  f(g, b);
1926
1926
  }
1927
- function w(g, b, k) {
1928
- h.current[g * 1e3 + b] = k;
1927
+ function y(g, b, v) {
1928
+ u.current[g * 1e3 + b] = v;
1929
1929
  }
1930
- return /* @__PURE__ */ r(
1930
+ return /* @__PURE__ */ s(
1931
1931
  "div",
1932
1932
  {
1933
- className: "richtext-mb-8 richtext-max-h-[min(80vh,24rem)] richtext-flex-wrap richtext-overflow-auto richtext-rounded-lg !richtext-border !richtext-border-neutral-200 !richtext-bg-white richtext-p-1 !richtext-text-black richtext-shadow-sm dark:!richtext-border-neutral-800 dark:!richtext-bg-black",
1934
- ref: s,
1935
- children: (L = e == null ? void 0 : e.items) != null && L.length ? /* @__PURE__ */ r("div", { className: "richtext-grid richtext-min-w-48 richtext-grid-cols-1 richtext-gap-0.5", children: (E = e == null ? void 0 : e.items) == null ? void 0 : E.map((g, b) => /* @__PURE__ */ u(Ee, { children: [
1936
- /* @__PURE__ */ r("div", { className: "richtext-col-[1/-1] richtext-mx-2 richtext-mt-2 richtext-select-none richtext-text-[0.65rem] richtext-font-semibold richtext-uppercase richtext-tracking-wider !richtext-text-neutral-500 first:richtext-mt-0.5", children: g.title }),
1937
- g.commands.map((k, H) => /* @__PURE__ */ u(
1933
+ className: "mb-8 max-h-[min(80vh,24rem)] flex-wrap overflow-auto rounded-lg !border !border-neutral-200 !bg-white p-1 !text-black shadow-sm dark:!border-neutral-800 dark:!bg-black",
1934
+ ref: r,
1935
+ children: (L = e == null ? void 0 : e.items) != null && L.length ? /* @__PURE__ */ s("div", { className: "grid min-w-48 grid-cols-1 gap-0.5", children: (E = e == null ? void 0 : e.items) == null ? void 0 : E.map((g, b) => /* @__PURE__ */ m(Ee, { children: [
1936
+ /* @__PURE__ */ s("div", { className: "col-[1/-1] mx-2 mt-2 select-none text-[0.65rem] font-semibold uppercase tracking-wider !text-neutral-500 first:mt-0.5", children: g.title }),
1937
+ g.commands.map((v, H) => /* @__PURE__ */ m(
1938
1938
  "button",
1939
1939
  {
1940
- onClick: () => p(b, H),
1941
- ref: (S) => w(b, H, S),
1942
- className: T("richtext-flex richtext-items-center richtext-gap-3 richtext-px-2 richtext-py-1.5 richtext-text-sm !richtext-text-neutral-800 dark:!richtext-text-neutral-200 richtext-text-left richtext-w-full richtext-rounded-sm richtext-outline-none richtext-transition-colors !richtext-bg-transparent hover:!richtext-bg-accent ", {
1943
- "slash-command-active": a === b && n === H
1940
+ onClick: () => w(b, H),
1941
+ ref: (S) => y(b, H, S),
1942
+ className: T("flex items-center gap-3 px-2 py-1.5 text-sm !text-neutral-800 dark:!text-neutral-200 text-left w-full rounded-sm outline-none transition-colors !bg-transparent hover:!bg-accent ", {
1943
+ "slash-command-active": i === b && n === H
1944
1944
  }),
1945
1945
  children: [
1946
- k.iconUrl && /* @__PURE__ */ r(
1946
+ v.iconUrl && /* @__PURE__ */ s(
1947
1947
  "img",
1948
1948
  {
1949
1949
  alt: "",
1950
- className: "richtext-size-6",
1951
- src: k.iconUrl
1950
+ className: "size-6",
1951
+ src: v.iconUrl
1952
1952
  }
1953
1953
  ),
1954
- k.iconName && /* @__PURE__ */ r(
1954
+ v.iconName && /* @__PURE__ */ s(
1955
1955
  M,
1956
1956
  {
1957
- className: "!richtext-mr-1 !richtext-text-lg",
1958
- name: k.iconName
1957
+ className: "!mr-1 !text-lg",
1958
+ name: v.iconName
1959
1959
  }
1960
1960
  ),
1961
- k.label
1961
+ v.label
1962
1962
  ]
1963
1963
  },
1964
1964
  `command-${H}`
1965
1965
  ))
1966
- ] }, `slash-${g.title}`)) }) : /* @__PURE__ */ r("div", { className: "richtext-p-3", children: /* @__PURE__ */ r("span", { className: "richtext-text-xs richtext-text-gray-800 dark:richtext-text-gray-100", children: c("editor.slash.empty") }) })
1966
+ ] }, `slash-${g.title}`)) }) : /* @__PURE__ */ s("div", { className: "p-3", children: /* @__PURE__ */ s("span", { className: "text-xs text-gray-800 dark:text-gray-100", children: l("editor.slash.empty") }) })
1967
1967
  }
1968
1968
  );
1969
1969
  }
1970
- const Ti = He(Si), Ei = {
1970
+ const Ta = He(Sa), Ea = {
1971
1971
  setOpen: (e, t) => {
1972
1972
  K(D.UPLOAD_VIDEO(e), t);
1973
1973
  }
1974
1974
  };
1975
- function Hi(e, t) {
1975
+ function Ha(e, t) {
1976
1976
  const n = [
1977
1977
  {
1978
1978
  name: "format",
@@ -1985,117 +1985,117 @@ function Hi(e, t) {
1985
1985
  commands: []
1986
1986
  }
1987
1987
  ];
1988
- return e.forEach((i) => {
1989
- i.name.toLowerCase() === "heading" && i.options.levels.forEach((a) => {
1988
+ return e.forEach((a) => {
1989
+ a.name.toLowerCase() === "heading" && a.options.levels.forEach((i) => {
1990
1990
  n[0].commands.push({
1991
- name: `heading${a}`,
1992
- label: N.t(`editor.heading.h${a}.tooltip`),
1993
- aliases: [`h${a}`, "bt", `bt${a}`],
1994
- iconName: `Heading${a}`,
1995
- action: ({ editor: o, range: s }) => {
1996
- o.chain().focus().deleteRange(s).setHeading({ level: a }).run();
1991
+ name: `heading${i}`,
1992
+ label: N.t(`editor.heading.h${i}.tooltip`),
1993
+ aliases: [`h${i}`, "bt", `bt${i}`],
1994
+ iconName: `Heading${i}`,
1995
+ action: ({ editor: o, range: r }) => {
1996
+ o.chain().focus().deleteRange(r).setHeading({ level: i }).run();
1997
1997
  }
1998
1998
  });
1999
- }), i.name.toLowerCase() === "bulletlist" && n[0].commands.push({
1999
+ }), a.name.toLowerCase() === "bulletlist" && n[0].commands.push({
2000
2000
  name: "bulletList",
2001
2001
  label: N.t("editor.bulletlist.tooltip"),
2002
2002
  aliases: ["ul", "yxlb"],
2003
2003
  iconName: "List",
2004
- action: ({ editor: a, range: o }) => {
2005
- a.chain().focus().deleteRange(o).toggleBulletList().run();
2004
+ action: ({ editor: i, range: o }) => {
2005
+ i.chain().focus().deleteRange(o).toggleBulletList().run();
2006
2006
  }
2007
- }), i.name.toLowerCase() === "orderedlist" && n[0].commands.push({
2007
+ }), a.name.toLowerCase() === "orderedlist" && n[0].commands.push({
2008
2008
  name: "numberedList",
2009
2009
  label: N.t("editor.orderedlist.tooltip"),
2010
2010
  aliases: ["ol", "yxlb"],
2011
2011
  iconName: "ListOrdered",
2012
- action: ({ editor: a, range: o }) => {
2013
- a.chain().focus().deleteRange(o).toggleOrderedList().run();
2012
+ action: ({ editor: i, range: o }) => {
2013
+ i.chain().focus().deleteRange(o).toggleOrderedList().run();
2014
2014
  }
2015
- }), i.name.toLowerCase() === "tasklist" && n[0].commands.push({
2015
+ }), a.name.toLowerCase() === "tasklist" && n[0].commands.push({
2016
2016
  name: "taskList",
2017
2017
  label: N.t("editor.tasklist.tooltip"),
2018
2018
  iconName: "ListTodo",
2019
2019
  description: "Task list with todo items",
2020
2020
  aliases: ["todo"],
2021
- action: ({ editor: a, range: o }) => {
2022
- a.chain().focus().deleteRange(o).toggleTaskList().run();
2021
+ action: ({ editor: i, range: o }) => {
2022
+ i.chain().focus().deleteRange(o).toggleTaskList().run();
2023
2023
  }
2024
- }), i.name.toLowerCase() === "blockquote" && n[0].commands.push({
2024
+ }), a.name.toLowerCase() === "blockquote" && n[0].commands.push({
2025
2025
  name: "blockquote",
2026
2026
  label: N.t("editor.blockquote.tooltip"),
2027
2027
  description: "插入引入格式",
2028
2028
  aliases: ["yr"],
2029
2029
  iconName: "TextQuote",
2030
- action: ({ editor: a, range: o }) => {
2031
- a.chain().focus().deleteRange(o).setBlockquote().run();
2030
+ action: ({ editor: i, range: o }) => {
2031
+ i.chain().focus().deleteRange(o).setBlockquote().run();
2032
2032
  }
2033
- }), i.name.toLowerCase() === "codeblock" && n[0].commands.push({
2033
+ }), a.name.toLowerCase() === "codeblock" && n[0].commands.push({
2034
2034
  name: "codeBlock",
2035
2035
  label: N.t("editor.codeblock.tooltip"),
2036
2036
  iconName: "Code2",
2037
2037
  description: "Code block with syntax highlighting",
2038
- shouldBeHidden: (a) => a.isActive("columns"),
2039
- action: ({ editor: a, range: o }) => {
2040
- a.chain().focus().deleteRange(o).setCodeBlock().run();
2038
+ shouldBeHidden: (i) => i.isActive("columns"),
2039
+ action: ({ editor: i, range: o }) => {
2040
+ i.chain().focus().deleteRange(o).setCodeBlock().run();
2041
2041
  }
2042
- }), i.name.toLowerCase() === yn.name && n[1].commands.push({
2042
+ }), a.name.toLowerCase() === kn.name && n[1].commands.push({
2043
2043
  name: "image",
2044
2044
  label: N.t("editor.image.tooltip"),
2045
2045
  iconName: "ImageUp",
2046
2046
  description: "Insert a image",
2047
2047
  aliases: ["image", "tp", "tupian"],
2048
- shouldBeHidden: (a) => a.isActive("columns"),
2049
- action: ({ editor: a, range: o }) => {
2050
- a.chain().focus().deleteRange(o).run(), kn.setOpen(a.id, !0);
2048
+ shouldBeHidden: (i) => i.isActive("columns"),
2049
+ action: ({ editor: i, range: o }) => {
2050
+ i.chain().focus().deleteRange(o).run(), vn.setOpen(i.id, !0);
2051
2051
  }
2052
- }), i.name.toLowerCase() === vn.name && n[1].commands.push({
2052
+ }), a.name.toLowerCase() === xn.name && n[1].commands.push({
2053
2053
  name: "video",
2054
2054
  label: N.t("editor.video.tooltip"),
2055
2055
  iconName: "Video",
2056
2056
  description: "Insert a video",
2057
2057
  aliases: ["video", "sp", "shipin"],
2058
- shouldBeHidden: (a) => a.isActive("columns"),
2059
- action: ({ editor: a, range: o }) => {
2060
- a.chain().focus().deleteRange(o).run(), Ei.setOpen(a.id, !0);
2058
+ shouldBeHidden: (i) => i.isActive("columns"),
2059
+ action: ({ editor: i, range: o }) => {
2060
+ i.chain().focus().deleteRange(o).run(), Ea.setOpen(i.id, !0);
2061
2061
  }
2062
- }), i.name.toLowerCase() === "table" && n[1].commands.push({
2062
+ }), a.name.toLowerCase() === "table" && n[1].commands.push({
2063
2063
  name: "table",
2064
2064
  label: N.t("editor.table.tooltip"),
2065
2065
  iconName: "Table",
2066
2066
  description: "Insert a table",
2067
2067
  aliases: ["table", "bg", "biaoge", "biao"],
2068
- shouldBeHidden: (a) => a.isActive("columns"),
2069
- action: ({ editor: a, range: o }) => {
2070
- a.chain().focus().deleteRange(o).insertTable({ rows: 3, cols: 3, withHeaderRow: !1 }).run();
2068
+ shouldBeHidden: (i) => i.isActive("columns"),
2069
+ action: ({ editor: i, range: o }) => {
2070
+ i.chain().focus().deleteRange(o).insertTable({ rows: 3, cols: 3, withHeaderRow: !1 }).run();
2071
2071
  }
2072
- }), i.name.toLowerCase() === "horizontalrule" && n[1].commands.push({
2072
+ }), a.name.toLowerCase() === "horizontalrule" && n[1].commands.push({
2073
2073
  name: "horizontalRule",
2074
2074
  label: N.t("editor.horizontalrule.tooltip"),
2075
2075
  iconName: "Minus",
2076
2076
  description: "Insert a horizontal divider",
2077
2077
  aliases: ["hr", "fgx", "fg"],
2078
- action: ({ editor: a, range: o }) => {
2079
- a.chain().focus().deleteRange(o).setHorizontalRule().run();
2078
+ action: ({ editor: i, range: o }) => {
2079
+ i.chain().focus().deleteRange(o).setHorizontalRule().run();
2080
2080
  }
2081
- }), i.name.toLowerCase() === "columns" && n[1].commands.push({
2081
+ }), a.name.toLowerCase() === "columns" && n[1].commands.push({
2082
2082
  name: "columns",
2083
2083
  label: N.t("editor.columns.tooltip"),
2084
2084
  iconName: "Columns2",
2085
2085
  description: "Add two column content",
2086
- action: ({ editor: a }) => {
2087
- a.chain().focus().insertColumns({ cols: 2 }).run();
2086
+ action: ({ editor: i }) => {
2087
+ i.chain().focus().insertColumns({ cols: 2 }).run();
2088
2088
  }
2089
- }), t == null || t(i, n);
2089
+ }), t == null || t(a, n);
2090
2090
  }), n;
2091
2091
  }
2092
2092
  const q = "slashCommand";
2093
- let y;
2093
+ let k;
2094
2094
  const fo = A.create({
2095
2095
  name: q,
2096
2096
  priority: 200,
2097
2097
  onCreate() {
2098
- y = De("body", {
2098
+ k = De("body", {
2099
2099
  interactive: !0,
2100
2100
  trigger: "manual",
2101
2101
  placement: "bottom-start",
@@ -2122,32 +2122,32 @@ const fo = A.create({
2122
2122
  startOfLine: !0,
2123
2123
  pluginKey: new Z(q),
2124
2124
  allow: ({ state: e, range: t }) => {
2125
- var d, l, m;
2126
- const n = e.doc.resolve(t.from), i = n.depth === 1, a = n.parent.type.name === "paragraph", o = ((d = n.parent.textContent) == null ? void 0 : d.charAt(0)) === "/", s = this.editor.isActive("column"), c = (m = n.parent.textContent) == null ? void 0 : m.slice(
2127
- Math.max(0, (l = n.parent.textContent) == null ? void 0 : l.indexOf("/"))
2128
- ), h = !(c != null && c.endsWith(" "));
2129
- return (i && a && o || s && a && o) && h;
2125
+ var d, c, h;
2126
+ const n = e.doc.resolve(t.from), a = n.depth === 1, i = n.parent.type.name === "paragraph", o = ((d = n.parent.textContent) == null ? void 0 : d.charAt(0)) === "/", r = this.editor.isActive("column"), l = (h = n.parent.textContent) == null ? void 0 : h.slice(
2127
+ Math.max(0, (c = n.parent.textContent) == null ? void 0 : c.indexOf("/"))
2128
+ ), u = !(l != null && l.endsWith(" "));
2129
+ return (a && i && o || r && i && o) && u;
2130
2130
  },
2131
2131
  command: ({ editor: e, range: t, props: n }) => {
2132
- const { view: i } = e;
2133
- n.action({ editor: e, range: t }), i.focus();
2132
+ const { view: a } = e;
2133
+ n.action({ editor: e, range: t }), a.focus();
2134
2134
  },
2135
- items: ({ query: e, editor: t }) => Hi(t.extensionManager.extensions, this.options.renderGroupItem).map((s) => ({
2136
- ...s,
2137
- commands: s.commands.filter((c) => {
2138
- const h = c.label.toLowerCase().trim(), d = e.toLowerCase().trim();
2139
- if (c.aliases) {
2140
- const l = c.aliases.map((f) => f.toLowerCase().trim()), m = h.match(d), _ = l.some((f) => f.match(d));
2141
- return m || _;
2135
+ items: ({ query: e, editor: t }) => Ha(t.extensionManager.extensions, this.options.renderGroupItem).map((r) => ({
2136
+ ...r,
2137
+ commands: r.commands.filter((l) => {
2138
+ const u = l.label.toLowerCase().trim(), d = e.toLowerCase().trim();
2139
+ if (l.aliases) {
2140
+ const c = l.aliases.map((f) => f.toLowerCase().trim()), h = u.match(d), _ = c.some((f) => f.match(d));
2141
+ return h || _;
2142
2142
  }
2143
- return h.match(d);
2143
+ return u.match(d);
2144
2144
  }).filter(
2145
- (c) => c.shouldBeHidden ? !c.shouldBeHidden(this.editor) : !0
2145
+ (l) => l.shouldBeHidden ? !l.shouldBeHidden(this.editor) : !0
2146
2146
  )
2147
- })).filter((s) => s.commands.length > 0).map((s) => ({
2148
- ...s,
2149
- commands: s.commands.map((c) => ({
2150
- ...c,
2147
+ })).filter((r) => r.commands.length > 0).map((r) => ({
2148
+ ...r,
2149
+ commands: r.commands.map((l) => ({
2150
+ ...l,
2151
2151
  isEnabled: !0
2152
2152
  }))
2153
2153
  })),
@@ -2156,66 +2156,66 @@ const fo = A.create({
2156
2156
  return {
2157
2157
  onStart: (n) => {
2158
2158
  var o;
2159
- e = new Te(Ti, {
2159
+ e = new Te(Ta, {
2160
2160
  props: n,
2161
2161
  editor: n.editor
2162
2162
  });
2163
- const { view: i } = n.editor, a = () => {
2163
+ const { view: a } = n.editor, i = () => {
2164
2164
  if (!n.clientRect)
2165
2165
  return n.editor.storage[q].rect;
2166
- const s = n.clientRect();
2167
- if (!s)
2166
+ const r = n.clientRect();
2167
+ if (!r)
2168
2168
  return n.editor.storage[q].rect;
2169
- let c = s.y;
2170
- if (s.top + e.element.offsetHeight + 40 > window.innerHeight) {
2171
- const h = s.top + e.element.offsetHeight - window.innerHeight + 40;
2172
- c = s.y - h;
2169
+ let l = r.y;
2170
+ if (r.top + e.element.offsetHeight + 40 > window.innerHeight) {
2171
+ const u = r.top + e.element.offsetHeight - window.innerHeight + 40;
2172
+ l = r.y - u;
2173
2173
  }
2174
- return new DOMRect(s.x, c, s.width, s.height);
2174
+ return new DOMRect(r.x, l, r.width, r.height);
2175
2175
  };
2176
2176
  t = () => {
2177
- y == null || y[0].setProps({
2178
- getReferenceClientRect: a
2177
+ k == null || k[0].setProps({
2178
+ getReferenceClientRect: i
2179
2179
  });
2180
- }, (o = i.dom.parentElement) == null || o.addEventListener("scroll", t), y == null || y[0].setProps({
2181
- getReferenceClientRect: a,
2180
+ }, (o = a.dom.parentElement) == null || o.addEventListener("scroll", t), k == null || k[0].setProps({
2181
+ getReferenceClientRect: i,
2182
2182
  appendTo: () => document.body,
2183
2183
  content: e.element
2184
- }), y == null || y[0].show();
2184
+ }), k == null || k[0].show();
2185
2185
  },
2186
2186
  onUpdate(n) {
2187
- var s;
2187
+ var r;
2188
2188
  e.updateProps(n);
2189
- const { view: i } = n.editor, a = () => {
2189
+ const { view: a } = n.editor, i = () => {
2190
2190
  if (!n.clientRect)
2191
2191
  return n.editor.storage[q].rect;
2192
- const c = n.clientRect();
2193
- return c ? new DOMRect(c.x, c.y, c.width, c.height) : n.editor.storage[q].rect;
2192
+ const l = n.clientRect();
2193
+ return l ? new DOMRect(l.x, l.y, l.width, l.height) : n.editor.storage[q].rect;
2194
2194
  }, o = () => {
2195
- y == null || y[0].setProps({
2196
- getReferenceClientRect: a
2195
+ k == null || k[0].setProps({
2196
+ getReferenceClientRect: i
2197
2197
  });
2198
2198
  };
2199
- (s = i.dom.parentElement) == null || s.addEventListener("scroll", o), n.editor.storage[q].rect = n.clientRect ? a() : {
2199
+ (r = a.dom.parentElement) == null || r.addEventListener("scroll", o), n.editor.storage[q].rect = n.clientRect ? i() : {
2200
2200
  width: 0,
2201
2201
  height: 0,
2202
2202
  left: 0,
2203
2203
  top: 0,
2204
2204
  right: 0,
2205
2205
  bottom: 0
2206
- }, y == null || y[0].setProps({
2207
- getReferenceClientRect: a
2206
+ }, k == null || k[0].setProps({
2207
+ getReferenceClientRect: i
2208
2208
  });
2209
2209
  },
2210
2210
  onKeyDown(n) {
2211
- var i;
2212
- return n.event.key === "Escape" ? (y == null || y[0].hide(), !0) : (y != null && y[0].state.isShown || y == null || y[0].show(), (i = e.ref) == null ? void 0 : i.onKeyDown(n));
2211
+ var a;
2212
+ return n.event.key === "Escape" ? (k == null || k[0].hide(), !0) : (k != null && k[0].state.isShown || k == null || k[0].show(), (a = e.ref) == null ? void 0 : a.onKeyDown(n));
2213
2213
  },
2214
2214
  onExit(n) {
2215
- var i;
2216
- if (y == null || y[0].hide(), t) {
2217
- const { view: a } = n.editor;
2218
- (i = a.dom.parentElement) == null || i.removeEventListener("scroll", t);
2215
+ var a;
2216
+ if (k == null || k[0].hide(), t) {
2217
+ const { view: i } = n.editor;
2218
+ (a = i.dom.parentElement) == null || a.removeEventListener("scroll", t);
2219
2219
  }
2220
2220
  e.destroy();
2221
2221
  }
@@ -2243,7 +2243,7 @@ const fo = A.create({
2243
2243
  return {
2244
2244
  ...(e = this.parent) == null ? void 0 : e.call(this),
2245
2245
  button: ({ editor: t, t: n }) => ({
2246
- component: x,
2246
+ component: p,
2247
2247
  componentProps: {
2248
2248
  action: () => {
2249
2249
  t.commands.setPainter(t == null ? void 0 : t.state.selection.$head.marks());
@@ -2260,11 +2260,11 @@ const fo = A.create({
2260
2260
  view: {
2261
2261
  dispatch: t,
2262
2262
  state: { tr: n },
2263
- dom: i
2263
+ dom: a
2264
2264
  }
2265
2265
  }) => {
2266
- const s = `url("data:image/svg+xml;utf8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#000" d="M9 22v-6H4V7q0-1.65 1.175-2.825T8 3h12v13h-5v6zM6 10h12V5h-1v4h-2V5h-1v2h-2V5H8q-.825 0-1.412.588T6 7zm0 4h12v-2H6zm0 0v-2z"/></svg>')}"), auto`;
2267
- return i.style.cursor = s, t(n.setMeta("painterAction", { type: "start", marks: e })), !0;
2266
+ const r = `url("data:image/svg+xml;utf8,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="#000" d="M9 22v-6H4V7q0-1.65 1.175-2.825T8 3h12v13h-5v6zM6 10h12V5h-1v4h-2V5h-1v2h-2V5H8q-.825 0-1.412.588T6 7zm0 4h12v-2H6zm0 0v-2z"/></svg>')}"), auto`;
2267
+ return a.style.cursor = r, t(n.setMeta("painterAction", { type: "start", marks: e })), !0;
2268
2268
  }
2269
2269
  };
2270
2270
  },
@@ -2288,14 +2288,14 @@ const fo = A.create({
2288
2288
  const n = () => {
2289
2289
  document.removeEventListener("mouseup", n);
2290
2290
  let {
2291
- dispatch: i,
2292
- state: { tr: a, selection: o },
2293
- dom: s
2291
+ dispatch: a,
2292
+ state: { tr: i, selection: o },
2293
+ dom: r
2294
2294
  } = e;
2295
- s.style.cursor = "", a = a.removeMark(o.from, o.to);
2296
- for (const c of t)
2297
- c.type.name !== "link" && (a = a.addMark(o.from, o.to, c));
2298
- i(a.setMeta("painterAction", { type: "end" }));
2295
+ r.style.cursor = "", i = i.removeMark(o.from, o.to);
2296
+ for (const l of t)
2297
+ l.type.name !== "link" && (i = i.addMark(o.from, o.to, l));
2298
+ a(i.setMeta("painterAction", { type: "end" }));
2299
2299
  };
2300
2300
  return document.addEventListener("mouseup", n), !0;
2301
2301
  }
@@ -2305,133 +2305,133 @@ const fo = A.create({
2305
2305
  ];
2306
2306
  }
2307
2307
  });
2308
- function zi({ editor: e, ...t }) {
2309
- const { t: n } = j(), [i, a] = C(-1), [o, s] = C([]), [c, h] = C(""), [d, l] = C(""), [m, _] = C(!1), [f, p] = C(!1);
2308
+ function za({ editor: e, ...t }) {
2309
+ const { t: n } = j(), [a, i] = C(-1), [o, r] = C([]), [l, u] = C(""), [d, c] = C(""), [h, _] = C(!1), [f, w] = C(!1);
2310
2310
  return z(() => {
2311
- m || (h(""), l(""), a(-1), s([]), e.commands.setSearchTerm(""), e.commands.setReplaceTerm(""));
2312
- }, [e, m]), z(() => {
2313
- m && e && e.commands && e.commands.setSearchTerm && e.commands.setSearchTerm(c);
2314
- }, [m, c, e]), z(() => {
2315
- m && e && e.commands && e.commands.setReplaceTerm && e.commands.setReplaceTerm(d);
2316
- }, [m, d, e]), z(() => {
2311
+ h || (u(""), c(""), i(-1), r([]), e.commands.setSearchTerm(""), e.commands.setReplaceTerm(""));
2312
+ }, [e, h]), z(() => {
2313
+ h && e && e.commands && e.commands.setSearchTerm && e.commands.setSearchTerm(l);
2314
+ }, [h, l, e]), z(() => {
2315
+ h && e && e.commands && e.commands.setReplaceTerm && e.commands.setReplaceTerm(d);
2316
+ }, [h, d, e]), z(() => {
2317
2317
  if (!e)
2318
2318
  return;
2319
- const w = e.extensionManager.extensions.find((E) => E.name === ji.name);
2320
- if (!w)
2319
+ const y = e.extensionManager.extensions.find((E) => E.name === ja.name);
2320
+ if (!y)
2321
2321
  return;
2322
2322
  const L = () => {
2323
- if (!m)
2323
+ if (!h)
2324
2324
  return;
2325
- const E = w ? w.storage.currentIndex : -1, g = w ? w.storage.results : [];
2326
- a((b) => b !== E ? E : b), s((b) => Jt(b, g) ? b : g);
2325
+ const E = y ? y.storage.currentIndex : -1, g = y ? y.storage.results : [];
2326
+ i((b) => b !== E ? E : b), r((b) => Jt(b, g) ? b : g);
2327
2327
  };
2328
2328
  return Ue(D.SEARCH_REPLCE, L), () => {
2329
- w && Ue(D.SEARCH_REPLCE, L);
2329
+ y && Ue(D.SEARCH_REPLCE, L);
2330
2330
  };
2331
- }, [m, e]), /* @__PURE__ */ u(
2332
- le,
2331
+ }, [h, e]), /* @__PURE__ */ m(
2332
+ ce,
2333
2333
  {
2334
2334
  onOpenChange: _,
2335
- open: m,
2335
+ open: h,
2336
2336
  children: [
2337
- /* @__PURE__ */ r(
2337
+ /* @__PURE__ */ s(
2338
2338
  de,
2339
2339
  {
2340
2340
  asChild: !0,
2341
2341
  disabled: t == null ? void 0 : t.disabled,
2342
- children: /* @__PURE__ */ r(
2343
- x,
2342
+ children: /* @__PURE__ */ s(
2343
+ p,
2344
2344
  {
2345
2345
  disabled: t == null ? void 0 : t.disabled,
2346
2346
  isActive: t == null ? void 0 : t.isActive,
2347
2347
  tooltip: t == null ? void 0 : t.tooltip,
2348
- children: /* @__PURE__ */ r(M, { name: t == null ? void 0 : t.icon })
2348
+ children: /* @__PURE__ */ s(M, { name: t == null ? void 0 : t.icon })
2349
2349
  }
2350
2350
  )
2351
2351
  }
2352
2352
  ),
2353
- /* @__PURE__ */ u(
2354
- he,
2353
+ /* @__PURE__ */ m(
2354
+ ue,
2355
2355
  {
2356
2356
  align: "start",
2357
- className: "richtext-w-full",
2357
+ className: "w-full",
2358
2358
  hideWhenDetached: !0,
2359
2359
  side: "bottom",
2360
2360
  children: [
2361
- /* @__PURE__ */ u("div", { className: "richtext-mb-[6px] richtext-flex richtext-items-center richtext-justify-between", children: [
2362
- /* @__PURE__ */ r(ke, { children: n("editor.search.dialog.text") }),
2363
- /* @__PURE__ */ r("span", { className: "richtext-font-semibold", children: o.length > 0 ? `${i + 1}/${o.length}` : "0/0" })
2361
+ /* @__PURE__ */ m("div", { className: "mb-[6px] flex items-center justify-between", children: [
2362
+ /* @__PURE__ */ s(ve, { children: n("editor.search.dialog.text") }),
2363
+ /* @__PURE__ */ s("span", { className: "font-semibold", children: o.length > 0 ? `${a + 1}/${o.length}` : "0/0" })
2364
2364
  ] }),
2365
- /* @__PURE__ */ u("div", { className: "richtext-mb-[10px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: [
2366
- /* @__PURE__ */ r(
2365
+ /* @__PURE__ */ m("div", { className: "mb-[10px] flex w-full max-w-sm items-center gap-1.5", children: [
2366
+ /* @__PURE__ */ s(
2367
2367
  qe,
2368
2368
  {
2369
2369
  autoFocus: !0,
2370
- className: "richtext-w-full",
2371
- onChange: (w) => h(w.target.value),
2370
+ className: "w-full",
2371
+ onChange: (y) => u(y.target.value),
2372
2372
  placeholder: "Text",
2373
2373
  required: !0,
2374
2374
  type: "text",
2375
- value: c
2375
+ value: l
2376
2376
  }
2377
2377
  ),
2378
- /* @__PURE__ */ r(
2378
+ /* @__PURE__ */ s(
2379
2379
  V,
2380
2380
  {
2381
- className: "richtext-flex-1",
2381
+ className: "flex-1",
2382
2382
  disabled: o.length === 0,
2383
2383
  onClick: e.commands.goToPrevSearchResult,
2384
- children: /* @__PURE__ */ r(M, { name: "ChevronUp" })
2384
+ children: /* @__PURE__ */ s(M, { name: "ChevronUp" })
2385
2385
  }
2386
2386
  ),
2387
- /* @__PURE__ */ r(
2387
+ /* @__PURE__ */ s(
2388
2388
  V,
2389
2389
  {
2390
- className: "richtext-flex-1",
2390
+ className: "flex-1",
2391
2391
  disabled: o.length === 0,
2392
2392
  onClick: e.commands.goToNextSearchResult,
2393
- children: /* @__PURE__ */ r(M, { name: "ChevronDown" })
2393
+ children: /* @__PURE__ */ s(M, { name: "ChevronDown" })
2394
2394
  }
2395
2395
  )
2396
2396
  ] }),
2397
- /* @__PURE__ */ r(ke, { className: "richtext-mb-[6px]", children: n("editor.replace.dialog.text") }),
2398
- /* @__PURE__ */ r("div", { className: "richtext-mb-[5px] richtext-flex richtext-w-full richtext-max-w-sm richtext-items-center richtext-gap-1.5", children: /* @__PURE__ */ r("div", { className: "richtext-relative richtext-w-full richtext-max-w-sm richtext-items-center", children: /* @__PURE__ */ r(
2397
+ /* @__PURE__ */ s(ve, { className: "mb-[6px]", children: n("editor.replace.dialog.text") }),
2398
+ /* @__PURE__ */ s("div", { className: "mb-[5px] flex w-full max-w-sm items-center gap-1.5", children: /* @__PURE__ */ s("div", { className: "relative w-full max-w-sm items-center", children: /* @__PURE__ */ s(
2399
2399
  qe,
2400
2400
  {
2401
- className: "richtext-w-80",
2402
- onChange: (w) => l(w.target.value),
2401
+ className: "w-80",
2402
+ onChange: (y) => c(y.target.value),
2403
2403
  placeholder: "Text",
2404
2404
  required: !0,
2405
2405
  type: "text",
2406
2406
  value: d
2407
2407
  }
2408
2408
  ) }) }),
2409
- /* @__PURE__ */ u("div", { className: "richtext-mb-[10px] richtext-flex richtext-items-center richtext-space-x-2", children: [
2410
- /* @__PURE__ */ r(
2409
+ /* @__PURE__ */ m("div", { className: "mb-[10px] flex items-center space-x-2", children: [
2410
+ /* @__PURE__ */ s(
2411
2411
  Cn,
2412
2412
  {
2413
2413
  checked: f,
2414
- onCheckedChange: (w) => {
2415
- p(w), e.commands.setCaseSensitive(w);
2414
+ onCheckedChange: (y) => {
2415
+ w(y), e.commands.setCaseSensitive(y);
2416
2416
  }
2417
2417
  }
2418
2418
  ),
2419
- /* @__PURE__ */ r(ke, { children: n("editor.replace.caseSensitive") })
2419
+ /* @__PURE__ */ s(ve, { children: n("editor.replace.caseSensitive") })
2420
2420
  ] }),
2421
- /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-gap-[10px]", children: [
2422
- /* @__PURE__ */ r(
2421
+ /* @__PURE__ */ m("div", { className: "flex items-center gap-[10px]", children: [
2422
+ /* @__PURE__ */ s(
2423
2423
  V,
2424
2424
  {
2425
- className: "richtext-flex-1",
2425
+ className: "flex-1",
2426
2426
  disabled: o.length === 0,
2427
2427
  onClick: e.commands.replace,
2428
2428
  children: n("editor.replace.dialog.text")
2429
2429
  }
2430
2430
  ),
2431
- /* @__PURE__ */ r(
2431
+ /* @__PURE__ */ s(
2432
2432
  V,
2433
2433
  {
2434
- className: "richtext-flex-1",
2434
+ className: "flex-1",
2435
2435
  disabled: o.length === 0,
2436
2436
  onClick: e.commands.replaceAll,
2437
2437
  children: n("editor.replaceAll.dialog.text")
@@ -2445,88 +2445,88 @@ function zi({ editor: e, ...t }) {
2445
2445
  }
2446
2446
  );
2447
2447
  }
2448
- const ae = (e, t) => t(e.tr);
2449
- function Mi(e, t, n) {
2448
+ const ie = (e, t) => t(e.tr);
2449
+ function Ma(e, t, n) {
2450
2450
  return RegExp(t ? e.replace(/[$()*+./?[\\\]^{|}-]/g, String.raw`\$&`) : e, n ? "gu" : "gui");
2451
2451
  }
2452
- function Pi(e, t, n) {
2453
- const i = [];
2454
- let a = [];
2452
+ function Pa(e, t, n) {
2453
+ const a = [];
2454
+ let i = [];
2455
2455
  const o = [];
2456
- let s = 0;
2456
+ let r = 0;
2457
2457
  if (!t)
2458
2458
  return { decorationsToReturn: [], results: [] };
2459
- e == null || e.descendants((c, h) => {
2460
- c.isText ? a[s] ? a[s] = {
2461
- text: a[s].text + c.text,
2462
- pos: a[s].pos
2463
- } : a[s] = {
2464
- text: `${c.text}`,
2465
- pos: h
2466
- } : s += 1;
2467
- }), a = a.filter(Boolean);
2468
- for (const { text: c, pos: h } of a) {
2469
- const d = [...c.matchAll(t)];
2470
- for (const l of d) {
2471
- if (l[0] === "")
2459
+ e == null || e.descendants((l, u) => {
2460
+ l.isText ? i[r] ? i[r] = {
2461
+ text: i[r].text + l.text,
2462
+ pos: i[r].pos
2463
+ } : i[r] = {
2464
+ text: `${l.text}`,
2465
+ pos: u
2466
+ } : r += 1;
2467
+ }), i = i.filter(Boolean);
2468
+ for (const { text: l, pos: u } of i) {
2469
+ const d = [...l.matchAll(t)];
2470
+ for (const c of d) {
2471
+ if (c[0] === "")
2472
2472
  break;
2473
- l.index !== void 0 && o.push({
2474
- from: h + l.index,
2475
- to: h + l.index + l[0].length
2473
+ c.index !== void 0 && o.push({
2474
+ from: u + c.index,
2475
+ to: u + c.index + c[0].length
2476
2476
  });
2477
2477
  }
2478
2478
  }
2479
- for (const c of o)
2480
- i.push(ce.inline(c.from, c.to, { class: n }));
2479
+ for (const l of o)
2480
+ a.push(le.inline(l.from, l.to, { class: n }));
2481
2481
  return {
2482
- decorationsToReturn: i,
2482
+ decorationsToReturn: a,
2483
2483
  results: o
2484
2484
  };
2485
2485
  }
2486
- function Ge(e, t, { state: n, dispatch: i }) {
2486
+ function Ge(e, t, { state: n, dispatch: a }) {
2487
2487
  if (!t[0])
2488
2488
  return;
2489
- const { from: o, to: s } = t[0];
2490
- i && i(n.tr.insertText(e, o, s));
2489
+ const { from: o, to: r } = t[0];
2490
+ a && a(n.tr.insertText(e, o, r));
2491
2491
  }
2492
- function Ri(e, t, n, i) {
2493
- const a = t + 1;
2494
- if (!i[a])
2492
+ function Ra(e, t, n, a) {
2493
+ const i = t + 1;
2494
+ if (!a[i])
2495
2495
  return null;
2496
- const { from: o, to: s } = i[t], c = s - o - e.length + n, { from: h, to: d } = i[a];
2497
- return i[a] = {
2498
- to: d - c,
2499
- from: h - c
2500
- }, [c, i];
2496
+ const { from: o, to: r } = a[t], l = r - o - e.length + n, { from: u, to: d } = a[i];
2497
+ return a[i] = {
2498
+ to: d - l,
2499
+ from: u - l
2500
+ }, [l, a];
2501
2501
  }
2502
- function Ii(e, t, { tr: n, dispatch: i }) {
2503
- let a = 0, o = t.slice();
2502
+ function Ia(e, t, { tr: n, dispatch: a }) {
2503
+ let i = 0, o = t.slice();
2504
2504
  if (o.length === 0)
2505
2505
  return !1;
2506
- for (let s = 0; s < o.length; s += 1) {
2507
- const { from: c, to: h } = o[s];
2508
- n.insertText(e, c, h);
2509
- const d = Ri(e, s, a, o);
2510
- d && (a = d[0], o = d[1]);
2506
+ for (let r = 0; r < o.length; r += 1) {
2507
+ const { from: l, to: u } = o[r];
2508
+ n.insertText(e, l, u);
2509
+ const d = Ra(e, r, i, o);
2510
+ d && (i = d[0], o = d[1]);
2511
2511
  }
2512
- return i(n), !0;
2512
+ return a(n), !0;
2513
2513
  }
2514
- function Ze({ view: e, tr: t, searchResults: n, searchResultCurrentClass: i, gotoIndex: a }) {
2515
- const o = n[a];
2514
+ function Ze({ view: e, tr: t, searchResults: n, searchResultCurrentClass: a, gotoIndex: i }) {
2515
+ const o = n[i];
2516
2516
  if (o) {
2517
- const s = t.setMeta("directDecoration", {
2517
+ const r = t.setMeta("directDecoration", {
2518
2518
  fromPos: o.from,
2519
2519
  toPos: o.to,
2520
- attrs: { class: i }
2520
+ attrs: { class: a }
2521
2521
  });
2522
- return e == null || e.dispatch(s), setTimeout(() => {
2523
- const c = window.document.querySelector(`.${i}`);
2524
- c && Oe(c, { behavior: "smooth", scrollMode: "if-needed" });
2522
+ return e == null || e.dispatch(r), setTimeout(() => {
2523
+ const l = window.document.querySelector(`.${a}`);
2524
+ l && Oe(l, { behavior: "smooth", scrollMode: "if-needed" });
2525
2525
  }, 0), !0;
2526
2526
  }
2527
2527
  return !1;
2528
2528
  }
2529
- const ji = A.create({
2529
+ const ja = A.create({
2530
2530
  name: "search",
2531
2531
  addOptions() {
2532
2532
  var e;
@@ -2543,7 +2543,7 @@ const ji = A.create({
2543
2543
  onChange: () => {
2544
2544
  },
2545
2545
  button: ({ editor: t, t: n }) => ({
2546
- component: zi,
2546
+ component: za,
2547
2547
  componentProps: {
2548
2548
  action: () => {
2549
2549
  },
@@ -2564,33 +2564,33 @@ const ji = A.create({
2564
2564
  },
2565
2565
  addCommands() {
2566
2566
  return {
2567
- setSearchTerm: (e) => ({ state: t, dispatch: n }) => (this.options.searchTerm = e, this.storage.results = [], this.storage.currentIndex = 0, K(D.SEARCH_REPLCE), ae(t, n), !1),
2568
- setReplaceTerm: (e) => ({ state: t, dispatch: n }) => (this.options.replaceTerm = e, ae(t, n), !1),
2569
- setCaseSensitive: (e) => ({ state: t, dispatch: n }) => (this.options.caseSensitive = e, ae(t, n), !1),
2567
+ setSearchTerm: (e) => ({ state: t, dispatch: n }) => (this.options.searchTerm = e, this.storage.results = [], this.storage.currentIndex = 0, K(D.SEARCH_REPLCE), ie(t, n), !1),
2568
+ setReplaceTerm: (e) => ({ state: t, dispatch: n }) => (this.options.replaceTerm = e, ie(t, n), !1),
2569
+ setCaseSensitive: (e) => ({ state: t, dispatch: n }) => (this.options.caseSensitive = e, ie(t, n), !1),
2570
2570
  replace: () => ({ state: e, dispatch: t }) => {
2571
- const { replaceTerm: n } = this.options, { currentIndex: i, results: a } = this.storage, o = a[i];
2572
- return o ? (Ge(n, [o], { state: e, dispatch: t }), this.storage.results.splice(i, 1)) : (Ge(n, a, { state: e, dispatch: t }), this.storage.results.shift()), K(D.SEARCH_REPLCE), ae(e, t), !1;
2571
+ const { replaceTerm: n } = this.options, { currentIndex: a, results: i } = this.storage, o = i[a];
2572
+ return o ? (Ge(n, [o], { state: e, dispatch: t }), this.storage.results.splice(a, 1)) : (Ge(n, i, { state: e, dispatch: t }), this.storage.results.shift()), K(D.SEARCH_REPLCE), ie(e, t), !1;
2573
2573
  },
2574
2574
  replaceAll: () => ({ state: e, tr: t, dispatch: n }) => {
2575
- const { replaceTerm: i } = this.options, { results: a } = this.storage;
2576
- return Ii(i, a, { tr: t, dispatch: n }), this.storage.currentIndex = -1, this.storage.results = [], K(D.SEARCH_REPLCE), ae(e, n), !1;
2575
+ const { replaceTerm: a } = this.options, { results: i } = this.storage;
2576
+ return Ia(a, i, { tr: t, dispatch: n }), this.storage.currentIndex = -1, this.storage.results = [], K(D.SEARCH_REPLCE), ie(e, n), !1;
2577
2577
  },
2578
2578
  goToPrevSearchResult: () => ({ view: e, tr: t }) => {
2579
- const { searchResultCurrentClass: n } = this.options, { currentIndex: i, results: a } = this.storage, o = (i + a.length - 1) % a.length;
2579
+ const { searchResultCurrentClass: n } = this.options, { currentIndex: a, results: i } = this.storage, o = (a + i.length - 1) % i.length;
2580
2580
  return this.storage.currentIndex = o, K(D.SEARCH_REPLCE), Ze({
2581
2581
  view: e,
2582
2582
  tr: t,
2583
- searchResults: a,
2583
+ searchResults: i,
2584
2584
  searchResultCurrentClass: n,
2585
2585
  gotoIndex: o
2586
2586
  });
2587
2587
  },
2588
2588
  goToNextSearchResult: () => ({ view: e, tr: t }) => {
2589
- const { searchResultCurrentClass: n } = this.options, { currentIndex: i, results: a } = this.storage, o = (i + 1) % a.length;
2589
+ const { searchResultCurrentClass: n } = this.options, { currentIndex: a, results: i } = this.storage, o = (a + 1) % i.length;
2590
2590
  return this.storage.currentIndex = o, this.options.onChange && this.options.onChange(), K(D.SEARCH_REPLCE), Ze({
2591
2591
  view: e,
2592
2592
  tr: t,
2593
- searchResults: a,
2593
+ searchResults: i,
2594
2594
  searchResultCurrentClass: n,
2595
2595
  gotoIndex: o
2596
2596
  });
@@ -2604,26 +2604,26 @@ const ji = A.create({
2604
2604
  key: new Z("search"),
2605
2605
  state: {
2606
2606
  init() {
2607
- return se.empty;
2607
+ return re.empty;
2608
2608
  },
2609
2609
  apply(t) {
2610
- const { doc: n, docChanged: i } = t, { searchTerm: a, searchResultClass: o, searchResultCurrentClass: s, disableRegex: c, caseSensitive: h } = e.options;
2611
- if (i || a) {
2612
- const { decorationsToReturn: d, results: l } = Pi(
2610
+ const { doc: n, docChanged: a } = t, { searchTerm: i, searchResultClass: o, searchResultCurrentClass: r, disableRegex: l, caseSensitive: u } = e.options;
2611
+ if (a || i) {
2612
+ const { decorationsToReturn: d, results: c } = Pa(
2613
2613
  n,
2614
- Mi(a, c, h),
2614
+ Ma(i, l, u),
2615
2615
  o
2616
2616
  );
2617
- if (e.storage.results = l, e.storage.currentIndex > l.length - 1 && (e.storage.currentIndex = 0), K(D.SEARCH_REPLCE), t.getMeta("directDecoration")) {
2618
- const { fromPos: m, toPos: _, attrs: f } = t.getMeta("directDecoration");
2619
- d.push(ce.inline(m, _, f));
2617
+ if (e.storage.results = c, e.storage.currentIndex > c.length - 1 && (e.storage.currentIndex = 0), K(D.SEARCH_REPLCE), t.getMeta("directDecoration")) {
2618
+ const { fromPos: h, toPos: _, attrs: f } = t.getMeta("directDecoration");
2619
+ d.push(le.inline(h, _, f));
2620
2620
  } else
2621
- l.length > 0 && (d[0] = ce.inline(l[0].from, l[0].to, {
2622
- class: s
2621
+ c.length > 0 && (d[0] = le.inline(c[0].from, c[0].to, {
2622
+ class: r
2623
2623
  }));
2624
- return se.create(n, d);
2624
+ return re.create(n, d);
2625
2625
  }
2626
- return se.empty;
2626
+ return re.empty;
2627
2627
  }
2628
2628
  },
2629
2629
  props: {
@@ -2635,15 +2635,15 @@ const ji = A.create({
2635
2635
  ];
2636
2636
  }
2637
2637
  });
2638
- function Bi({
2638
+ function Ba({
2639
2639
  className: e,
2640
2640
  ...t
2641
2641
  }) {
2642
- return /* @__PURE__ */ r(
2642
+ return /* @__PURE__ */ s(
2643
2643
  W.Root,
2644
2644
  {
2645
2645
  className: T(
2646
- "richtext-bg-popover richtext-text-popover-foreground richtext-isolate richtext-flex richtext-h-full richtext-w-fit richtext-flex-col richtext-overflow-hidden richtext-rounded-md",
2646
+ "bg-popover text-popover-foreground isolate flex h-full w-fit flex-col overflow-hidden rounded-md",
2647
2647
  e
2648
2648
  ),
2649
2649
  "data-slot": "emoji-picker",
@@ -2651,21 +2651,21 @@ function Bi({
2651
2651
  }
2652
2652
  );
2653
2653
  }
2654
- function Di({
2654
+ function Da({
2655
2655
  className: e,
2656
2656
  ...t
2657
2657
  }) {
2658
- return /* @__PURE__ */ u(
2658
+ return /* @__PURE__ */ m(
2659
2659
  "div",
2660
2660
  {
2661
- className: T("richtext-flex richtext-h-9 richtext-items-center richtext-gap-2 richtext-border-b richtext-px-3", e),
2661
+ className: T("flex h-9 items-center gap-2 border-b px-3", e),
2662
2662
  "data-slot": "emoji-picker-search-wrapper",
2663
2663
  children: [
2664
- /* @__PURE__ */ r(an, { className: "richtext-size-4 richtext-shrink-0 richtext-opacity-50" }),
2665
- /* @__PURE__ */ r(
2664
+ /* @__PURE__ */ s(an, { className: "size-4 shrink-0 opacity-50" }),
2665
+ /* @__PURE__ */ s(
2666
2666
  W.Search,
2667
2667
  {
2668
- className: "richtext-outline-hidden placeholder:richtext-text-muted-foreground richtext-flex richtext-h-10 richtext-w-full richtext-rounded-md richtext-bg-transparent richtext-py-3 richtext-text-sm disabled:richtext-cursor-not-allowed disabled:richtext-opacity-50",
2668
+ className: "outline-hidden placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm disabled:cursor-not-allowed disabled:opacity-50",
2669
2669
  "data-slot": "emoji-picker-search",
2670
2670
  ...t
2671
2671
  }
@@ -2674,20 +2674,20 @@ function Di({
2674
2674
  }
2675
2675
  );
2676
2676
  }
2677
- function Oi({ children: e, ...t }) {
2678
- return /* @__PURE__ */ r("div", { ...t, className: "richtext-scroll-my-1 richtext-px-1", "data-slot": "emoji-picker-row", children: e });
2677
+ function Oa({ children: e, ...t }) {
2678
+ return /* @__PURE__ */ s("div", { ...t, className: "scroll-my-1 px-1", "data-slot": "emoji-picker-row", children: e });
2679
2679
  }
2680
- function $i({
2680
+ function $a({
2681
2681
  emoji: e,
2682
2682
  className: t,
2683
2683
  ...n
2684
2684
  }) {
2685
- return /* @__PURE__ */ r(
2685
+ return /* @__PURE__ */ s(
2686
2686
  "button",
2687
2687
  {
2688
2688
  ...n,
2689
2689
  className: T(
2690
- "data-[active]:richtext-bg-accent richtext-flex richtext-size-7 richtext-items-center richtext-justify-center richtext-rounded-sm richtext-text-base",
2690
+ "data-[active]:bg-accent flex size-7 items-center justify-center rounded-sm text-base",
2691
2691
  t
2692
2692
  ),
2693
2693
  "data-slot": "emoji-picker-emoji",
@@ -2695,55 +2695,55 @@ function $i({
2695
2695
  }
2696
2696
  );
2697
2697
  }
2698
- function Fi({
2698
+ function Fa({
2699
2699
  category: e,
2700
2700
  ...t
2701
2701
  }) {
2702
- return /* @__PURE__ */ r(
2702
+ return /* @__PURE__ */ s(
2703
2703
  "div",
2704
2704
  {
2705
2705
  ...t,
2706
- className: "richtext-bg-popover richtext-text-muted-foreground richtext-px-3 richtext-pb-2 richtext-pt-3.5 richtext-text-xs richtext-leading-none",
2706
+ className: "bg-popover text-muted-foreground px-3 pb-2 pt-3.5 text-xs leading-none",
2707
2707
  "data-slot": "emoji-picker-category-header",
2708
2708
  children: e.label
2709
2709
  }
2710
2710
  );
2711
2711
  }
2712
- function Ui({
2712
+ function Ua({
2713
2713
  className: e,
2714
2714
  ...t
2715
2715
  }) {
2716
- return /* @__PURE__ */ u(
2716
+ return /* @__PURE__ */ m(
2717
2717
  W.Viewport,
2718
2718
  {
2719
- className: T("richtext-outline-hidden richtext-relative richtext-flex-1", e),
2719
+ className: T("outline-hidden relative flex-1", e),
2720
2720
  "data-slot": "emoji-picker-viewport",
2721
2721
  ...t,
2722
2722
  children: [
2723
- /* @__PURE__ */ r(
2723
+ /* @__PURE__ */ s(
2724
2724
  W.Loading,
2725
2725
  {
2726
- className: "richtext-absolute richtext-inset-0 richtext-flex richtext-items-center richtext-justify-center richtext-text-muted-foreground",
2726
+ className: "absolute inset-0 flex items-center justify-center text-muted-foreground",
2727
2727
  "data-slot": "emoji-picker-loading",
2728
- children: /* @__PURE__ */ r(on, { className: "richtext-size-4 richtext-animate-spin" })
2728
+ children: /* @__PURE__ */ s(on, { className: "size-4 animate-spin" })
2729
2729
  }
2730
2730
  ),
2731
- /* @__PURE__ */ r(
2731
+ /* @__PURE__ */ s(
2732
2732
  W.Empty,
2733
2733
  {
2734
- className: "richtext-absolute richtext-inset-0 richtext-flex richtext-items-center richtext-justify-center richtext-text-muted-foreground richtext-text-sm",
2734
+ className: "absolute inset-0 flex items-center justify-center text-muted-foreground text-sm",
2735
2735
  "data-slot": "emoji-picker-empty",
2736
2736
  children: "No emoji found."
2737
2737
  }
2738
2738
  ),
2739
- /* @__PURE__ */ r(
2739
+ /* @__PURE__ */ s(
2740
2740
  W.List,
2741
2741
  {
2742
- className: "richtext-select-none richtext-pb-1",
2742
+ className: "select-none pb-1",
2743
2743
  components: {
2744
- Row: Oi,
2745
- Emoji: $i,
2746
- CategoryHeader: Fi
2744
+ Row: Oa,
2745
+ Emoji: $a,
2746
+ CategoryHeader: Fa
2747
2747
  },
2748
2748
  "data-slot": "emoji-picker-list"
2749
2749
  }
@@ -2752,47 +2752,47 @@ function Ui({
2752
2752
  }
2753
2753
  );
2754
2754
  }
2755
- function qi({
2755
+ function qa({
2756
2756
  className: e,
2757
2757
  ...t
2758
2758
  }) {
2759
- return /* @__PURE__ */ r(
2759
+ return /* @__PURE__ */ s(
2760
2760
  "div",
2761
2761
  {
2762
2762
  className: T(
2763
- "richtext-max-w-(--frimousse-viewport-width) richtext-flex richtext-w-full richtext-min-w-0 richtext-items-center richtext-gap-1 richtext-border-t richtext-p-2",
2763
+ "max-w-(--frimousse-viewport-width) flex w-full min-w-0 items-center gap-1 border-t p-2",
2764
2764
  e
2765
2765
  ),
2766
2766
  "data-slot": "emoji-picker-footer",
2767
2767
  ...t,
2768
- children: /* @__PURE__ */ r(W.ActiveEmoji, { children: ({ emoji: n }) => n ? /* @__PURE__ */ u(xe, { children: [
2769
- /* @__PURE__ */ r("div", { className: "richtext-flex richtext-size-7 richtext-flex-none richtext-items-center richtext-justify-center richtext-text-lg", children: n.emoji }),
2770
- /* @__PURE__ */ r("span", { className: "richtext-text-secondary-foreground richtext-truncate richtext-text-xs", children: n.label })
2771
- ] }) : /* @__PURE__ */ r("span", { className: "richtext-text-muted-foreground richtext-ml-1.5 richtext-flex richtext-h-7 richtext-items-center richtext-truncate richtext-text-xs", children: "Select an emoji…" }) })
2768
+ children: /* @__PURE__ */ s(W.ActiveEmoji, { children: ({ emoji: n }) => n ? /* @__PURE__ */ m(pe, { children: [
2769
+ /* @__PURE__ */ s("div", { className: "flex size-7 flex-none items-center justify-center text-lg", children: n.emoji }),
2770
+ /* @__PURE__ */ s("span", { className: "text-secondary-foreground truncate text-xs", children: n.label })
2771
+ ] }) : /* @__PURE__ */ s("span", { className: "text-muted-foreground ml-1.5 flex h-7 items-center truncate text-xs", children: "Select an emoji…" }) })
2772
2772
  }
2773
2773
  );
2774
2774
  }
2775
- function Ki({ onSelectEmoji: e, children: t }) {
2776
- return /* @__PURE__ */ u(le, { modal: !0, children: [
2777
- /* @__PURE__ */ r(de, { asChild: !0, children: t }),
2778
- /* @__PURE__ */ r(
2779
- he,
2775
+ function Ka({ onSelectEmoji: e, children: t }) {
2776
+ return /* @__PURE__ */ m(ce, { modal: !0, children: [
2777
+ /* @__PURE__ */ s(de, { asChild: !0, children: t }),
2778
+ /* @__PURE__ */ s(
2779
+ ue,
2780
2780
  {
2781
2781
  align: "start",
2782
- className: "richtext-size-full richtext-p-2",
2782
+ className: "size-full p-2",
2783
2783
  hideWhenDetached: !0,
2784
2784
  side: "bottom",
2785
- children: /* @__PURE__ */ u(
2786
- Bi,
2785
+ children: /* @__PURE__ */ m(
2786
+ Ba,
2787
2787
  {
2788
- className: "!richtext-h-[342px]",
2788
+ className: "!h-[342px]",
2789
2789
  onEmojiSelect: ({ emoji: n }) => {
2790
2790
  e(n);
2791
2791
  },
2792
2792
  children: [
2793
- /* @__PURE__ */ r(Di, {}),
2794
- /* @__PURE__ */ r(Ui, {}),
2795
- /* @__PURE__ */ r(qi, {})
2793
+ /* @__PURE__ */ s(Da, {}),
2794
+ /* @__PURE__ */ s(Ua, {}),
2795
+ /* @__PURE__ */ s(qa, {})
2796
2796
  ]
2797
2797
  }
2798
2798
  )
@@ -2800,62 +2800,62 @@ function Ki({ onSelectEmoji: e, children: t }) {
2800
2800
  )
2801
2801
  ] });
2802
2802
  }
2803
- function Vi({ editor: e, icon: t, ...n }) {
2804
- const i = F(
2805
- (a) => {
2806
- const { selection: o } = e.state, { $anchor: s } = o;
2807
- return e.chain().insertContentAt(s.pos, a).run();
2803
+ function Va({ editor: e, icon: t, ...n }) {
2804
+ const a = F(
2805
+ (i) => {
2806
+ const { selection: o } = e.state, { $anchor: r } = o;
2807
+ return e.chain().insertContentAt(r.pos, i).run();
2808
2808
  },
2809
2809
  [e]
2810
2810
  );
2811
- return /* @__PURE__ */ r(Ki, { onSelectEmoji: i, children: /* @__PURE__ */ r(
2812
- x,
2811
+ return /* @__PURE__ */ s(Ka, { onSelectEmoji: a, children: /* @__PURE__ */ s(
2812
+ p,
2813
2813
  {
2814
2814
  icon: t,
2815
2815
  tooltip: n == null ? void 0 : n.tooltip
2816
2816
  }
2817
2817
  ) });
2818
2818
  }
2819
- const ut = He((e, t) => {
2820
- const n = G(null), [i, a] = C(0), { t: o } = j(), s = (l) => {
2821
- const m = e.items[l];
2822
- m && e.command(m);
2823
- }, c = () => {
2824
- a((i + e.items.length - 1) % e.items.length);
2825
- }, h = () => {
2826
- a((i + 1) % e.items.length);
2819
+ const mt = He((e, t) => {
2820
+ const n = G(null), [a, i] = C(0), { t: o } = j(), r = (c) => {
2821
+ const h = e.items[c];
2822
+ h && e.command(h);
2823
+ }, l = () => {
2824
+ i((a + e.items.length - 1) % e.items.length);
2825
+ }, u = () => {
2826
+ i((a + 1) % e.items.length);
2827
2827
  }, d = () => {
2828
- s(i);
2828
+ r(a);
2829
2829
  };
2830
- return z(() => a(0), [e.items]), z(() => {
2831
- if (Number.isNaN(i + 1))
2830
+ return z(() => i(0), [e.items]), z(() => {
2831
+ if (Number.isNaN(a + 1))
2832
2832
  return;
2833
- const l = n.current.querySelector(`span:nth-of-type(${i + 1})`);
2834
- l && Oe(l, { behavior: "smooth", scrollMode: "if-needed" });
2835
- }, [i]), ze(t, () => ({
2836
- onKeyDown: ({ event: l }) => l.key === "ArrowUp" ? (c(), !0) : l.key === "ArrowDown" ? (h(), !0) : l.key === "Enter" ? (d(), !0) : !1
2837
- })), /* @__PURE__ */ r("div", { className: "richtext-max-h-[320px] richtext-w-[200px] richtext-overflow-y-auto richtext-overflow-x-hidden 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: n, children: e.items.length > 0 ? e.items.map((l, m) => /* @__PURE__ */ u(
2833
+ const c = n.current.querySelector(`span:nth-of-type(${a + 1})`);
2834
+ c && Oe(c, { behavior: "smooth", scrollMode: "if-needed" });
2835
+ }, [a]), ze(t, () => ({
2836
+ onKeyDown: ({ event: c }) => c.key === "ArrowUp" ? (l(), !0) : c.key === "ArrowDown" ? (u(), !0) : c.key === "Enter" ? (d(), !0) : !1
2837
+ })), /* @__PURE__ */ s("div", { className: "max-h-[320px] w-[200px] overflow-y-auto overflow-x-hidden rounded-sm !border bg-popover p-1 text-popover-foreground shadow-md outline-none", children: /* @__PURE__ */ s("div", { ref: n, children: e.items.length > 0 ? e.items.map((c, h) => /* @__PURE__ */ m(
2838
2838
  "span",
2839
2839
  {
2840
- className: P(" richtext-relative richtext-flex 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 hover:richtext-bg-accent focus:richtext-bg-accent focus:richtext-text-accent-foreground", m === i ? "bg-accent" : ""),
2841
- onClick: () => s(m),
2840
+ className: P(" relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent focus:bg-accent focus:text-accent-foreground", h === a ? "bg-accent" : ""),
2841
+ onClick: () => r(h),
2842
2842
  children: [
2843
- l.fallbackImage ? /* @__PURE__ */ r(
2843
+ c.fallbackImage ? /* @__PURE__ */ s(
2844
2844
  "img",
2845
2845
  {
2846
- className: "richtext-size-[1em]",
2847
- src: l.fallbackImage
2846
+ className: "size-[1em]",
2847
+ src: c.fallbackImage
2848
2848
  }
2849
- ) : l.emoji,
2849
+ ) : c.emoji,
2850
2850
  ":",
2851
- l.name,
2851
+ c.name,
2852
2852
  ":"
2853
2853
  ]
2854
2854
  },
2855
- `emoji-list-code-${m}`
2856
- )) : /* @__PURE__ */ r("div", { className: "richtext-relative richtext-flex 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") }) }) }) });
2855
+ `emoji-list-code-${h}`
2856
+ )) : /* @__PURE__ */ s("div", { className: "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors", children: /* @__PURE__ */ s("span", { children: o("no_result_found") }) }) }) });
2857
2857
  });
2858
- ut.displayName = "EmojiList";
2858
+ mt.displayName = "EmojiList";
2859
2859
  const ee = {
2860
2860
  100: "💯",
2861
2861
  1234: "🔢",
@@ -4700,18 +4700,18 @@ Object.keys(ee).reduce((e, t) => {
4700
4700
  const n = ee[t];
4701
4701
  return e[n] = t, e;
4702
4702
  }, {});
4703
- const Wi = Object.keys(ee).map((e) => e);
4703
+ const Wa = Object.keys(ee).map((e) => e);
4704
4704
  Object.keys(ee).map((e) => ee[e]);
4705
- function Gi(e) {
4706
- return Wi.filter((t) => t.startsWith(e)).map((t) => ({
4705
+ function Ga(e) {
4706
+ return Wa.filter((t) => t.startsWith(e)).map((t) => ({
4707
4707
  name: t,
4708
4708
  emoji: ee[t]
4709
4709
  }));
4710
4710
  }
4711
- const Zi = 200, Ji = new Z("emoji"), bo = ge.create({
4711
+ const Za = 200, Ja = new Z("emoji"), bo = ge.create({
4712
4712
  name: "emoji",
4713
4713
  content: "text*",
4714
- priority: Zi,
4714
+ priority: Za,
4715
4715
  addOptions() {
4716
4716
  var e;
4717
4717
  return {
@@ -4719,13 +4719,13 @@ const Zi = 200, Ji = new Z("emoji"), bo = ge.create({
4719
4719
  HTMLAttributes: {},
4720
4720
  suggestion: {
4721
4721
  char: ":",
4722
- pluginKey: Ji,
4723
- command: ({ editor: t, range: n, props: i }) => {
4724
- t.chain().focus().insertContentAt(n, `${i.emoji} `).run();
4722
+ pluginKey: Ja,
4723
+ command: ({ editor: t, range: n, props: a }) => {
4724
+ t.chain().focus().insertContentAt(n, `${a.emoji} `).run();
4725
4725
  }
4726
4726
  },
4727
4727
  button: ({ editor: t, t: n }) => ({
4728
- component: Vi,
4728
+ component: Va,
4729
4729
  componentProps: {
4730
4730
  editor: t,
4731
4731
  action: () => {
@@ -4753,16 +4753,16 @@ const Zi = 200, Ji = new Z("emoji"), bo = ge.create({
4753
4753
  }
4754
4754
  }).configure({
4755
4755
  suggestion: {
4756
- items: ({ query: e }) => Gi(e),
4756
+ items: ({ query: e }) => Ga(e),
4757
4757
  render: () => {
4758
4758
  let e, t, n;
4759
4759
  return {
4760
- onStart: (i) => {
4761
- n = i.editor.isEditable, n && (e = new Te(ut, {
4762
- props: i,
4763
- editor: i.editor
4760
+ onStart: (a) => {
4761
+ n = a.editor.isEditable, n && (e = new Te(mt, {
4762
+ props: a,
4763
+ editor: a.editor
4764
4764
  }), t = De("body", {
4765
- getReferenceClientRect: i.clientRect,
4765
+ getReferenceClientRect: a.clientRect,
4766
4766
  appendTo: () => document.body,
4767
4767
  content: e.element,
4768
4768
  showOnCreate: !0,
@@ -4771,15 +4771,15 @@ const Zi = 200, Ji = new Z("emoji"), bo = ge.create({
4771
4771
  placement: "bottom-start"
4772
4772
  }));
4773
4773
  },
4774
- onUpdate(i) {
4775
- n && (e.updateProps(i), t[0].setProps({
4776
- getReferenceClientRect: i.clientRect
4774
+ onUpdate(a) {
4775
+ n && (e.updateProps(a), t[0].setProps({
4776
+ getReferenceClientRect: a.clientRect
4777
4777
  }));
4778
4778
  },
4779
- onKeyDown(i) {
4780
- var a;
4779
+ onKeyDown(a) {
4780
+ var i;
4781
4781
  if (n)
4782
- return i.event.key === "Escape" ? (t[0].hide(), !0) : (a = e.ref) == null ? void 0 : a.onKeyDown(i);
4782
+ return a.event.key === "Escape" ? (t[0].hide(), !0) : (i = e.ref) == null ? void 0 : i.onKeyDown(a);
4783
4783
  },
4784
4784
  onExit() {
4785
4785
  n && (t[0].destroy(), e.destroy());
@@ -4788,7 +4788,7 @@ const Zi = 200, Ji = new Z("emoji"), bo = ge.create({
4788
4788
  }
4789
4789
  }
4790
4790
  });
4791
- function Yi(e) {
4791
+ function Ya(e) {
4792
4792
  const t = document.createElement("iframe");
4793
4793
  t.setAttribute("style", "position: absolute; width: 0; height: 0; top: 0; left: 0;"), document.body.appendChild(t), t.textContent = `
4794
4794
  <!DOCTYPE html>
@@ -4805,8 +4805,8 @@ function Yi(e) {
4805
4805
  </body>
4806
4806
  </html>
4807
4807
  `;
4808
- const n = t.contentWindow, i = t.contentDocument || t.contentWindow && t.contentWindow.document, a = document.createElement("link");
4809
- a.rel = "stylesheet", a.href = "https://cdn.jsdelivr.net/npm/reactjs-tiptap-editor@latest/lib/style.css", i.head.appendChild(a), i && (i.open(), i.write(e), i.close()), n && t.addEventListener("load", function() {
4808
+ const n = t.contentWindow, a = t.contentDocument || t.contentWindow && t.contentWindow.document, i = document.createElement("link");
4809
+ i.rel = "stylesheet", i.href = "https://cdn.jsdelivr.net/npm/reactjs-tiptap-editor@latest/lib/style.css", a.head.appendChild(i), a && (a.open(), a.write(e), a.close()), n && t.addEventListener("load", function() {
4810
4810
  try {
4811
4811
  setTimeout(() => {
4812
4812
  n.focus();
@@ -4825,21 +4825,21 @@ function Yi(e) {
4825
4825
  }, 100);
4826
4826
  });
4827
4827
  }
4828
- function Qi(e) {
4828
+ function Qa(e) {
4829
4829
  const t = e.getHTML();
4830
- return t ? (Yi(t), !0) : !1;
4830
+ return t ? (Ya(t), !0) : !1;
4831
4831
  }
4832
- const xo = A.create({
4832
+ const po = A.create({
4833
4833
  name: "exportPdf",
4834
4834
  addOptions() {
4835
4835
  var e;
4836
4836
  return {
4837
4837
  ...(e = this.parent) == null ? void 0 : e.call(this),
4838
4838
  button: ({ editor: t, t: n }) => ({
4839
- component: x,
4839
+ component: p,
4840
4840
  componentProps: {
4841
4841
  action: () => {
4842
- Qi(t);
4842
+ Qa(t);
4843
4843
  },
4844
4844
  icon: "ExportPdf",
4845
4845
  tooltip: n("editor.exportPdf.tooltip"),
@@ -4850,24 +4850,24 @@ const xo = A.create({
4850
4850
  };
4851
4851
  }
4852
4852
  });
4853
- function Xi(e, t) {
4854
- const n = atob(e.split(",")[1]), i = Array.from({ length: n.length });
4853
+ function Xa(e, t) {
4854
+ const n = atob(e.split(",")[1]), a = Array.from({ length: n.length });
4855
4855
  for (let o = 0; o < n.length; o++)
4856
- i[o] = n.charCodeAt(o);
4857
- const a = new Uint8Array(i);
4858
- return new Blob([a], { type: t });
4856
+ a[o] = n.charCodeAt(o);
4857
+ const i = new Uint8Array(a);
4858
+ return new Blob([i], { type: t });
4859
4859
  }
4860
- function ea(e, t) {
4860
+ function ei(e, t) {
4861
4861
  return new File([e], t, { type: e.type });
4862
4862
  }
4863
- function ta(e) {
4864
- const { toast: t } = Nn(), { t: n } = j(), [i, a] = C(!1), o = G(null);
4865
- function s() {
4866
- var m;
4867
- (m = o.current) == null || m.click();
4863
+ function ti(e) {
4864
+ const { toast: t } = Nn(), { t: n } = j(), [a, i] = C(!1), o = G(null);
4865
+ function r() {
4866
+ var h;
4867
+ (h = o.current) == null || h.click();
4868
4868
  }
4869
- function c(m) {
4870
- const _ = m.target.files[0];
4869
+ function l(h) {
4870
+ const _ = h.target.files[0];
4871
4871
  if (_) {
4872
4872
  if (_.size > e.limit) {
4873
4873
  t({
@@ -4879,10 +4879,10 @@ function ta(e) {
4879
4879
  d(_);
4880
4880
  }
4881
4881
  }
4882
- async function h(m) {
4882
+ async function u(h) {
4883
4883
  var L;
4884
- const f = new DOMParser().parseFromString(m, "text/html"), p = f.querySelectorAll("img");
4885
- if (p.length === 0)
4884
+ const f = new DOMParser().parseFromString(h, "text/html"), w = f.querySelectorAll("img");
4885
+ if (w.length === 0)
4886
4886
  return f.body.innerHTML;
4887
4887
  if (An(e.editor, "image")) {
4888
4888
  const E = (L = e.editor.extensionManager.extensions.find(
@@ -4890,13 +4890,13 @@ function ta(e) {
4890
4890
  )) == null ? void 0 : L.options;
4891
4891
  if (E && typeof E.upload == "function") {
4892
4892
  const g = [];
4893
- for (const k of p) {
4894
- const H = k.getAttribute("src"), S = Xi(H, "image/jpeg"), O = ea(S, "image.jpeg");
4893
+ for (const v of w) {
4894
+ const H = v.getAttribute("src"), S = Xa(H, "image/jpeg"), O = ei(S, "image.jpeg");
4895
4895
  g.push(O);
4896
4896
  }
4897
4897
  const b = await E.upload(g);
4898
- for (const [k, H] of p.entries()) {
4899
- H.setAttribute("src", b[k].src);
4898
+ for (const [v, H] of w.entries()) {
4899
+ H.setAttribute("src", b[v].src);
4900
4900
  const S = H.parentElement;
4901
4901
  (S == null ? void 0 : S.tagName) === "P" && (S.insertAdjacentElement("beforebegin", H), !S.hasChildNodes() && S.textContent === "" && S.remove());
4902
4902
  }
@@ -4906,43 +4906,43 @@ function ta(e) {
4906
4906
  } else
4907
4907
  return console.error("Image extension not found, unable to convert image"), f.body.innerHTML;
4908
4908
  }
4909
- async function d(m) {
4910
- a(!0);
4909
+ async function d(h) {
4910
+ i(!0);
4911
4911
  try {
4912
4912
  if (e.convert) {
4913
- const _ = await e.convert(m);
4914
- l(_);
4913
+ const _ = await e.convert(h);
4914
+ c(_);
4915
4915
  } else {
4916
- const _ = await m.arrayBuffer(), { value: f } = await Yt.convertToHtml(
4916
+ const _ = await h.arrayBuffer(), { value: f } = await Yt.convertToHtml(
4917
4917
  { arrayBuffer: _ },
4918
4918
  e == null ? void 0 : e.mammothOptions
4919
4919
  );
4920
- l(f);
4920
+ c(f);
4921
4921
  }
4922
4922
  } finally {
4923
- a(!1);
4923
+ i(!1);
4924
4924
  }
4925
4925
  }
4926
- async function l(m) {
4927
- const _ = await h(m);
4926
+ async function c(h) {
4927
+ const _ = await u(h);
4928
4928
  e.editor.chain().setContent(_, !0).run();
4929
4929
  }
4930
- return /* @__PURE__ */ u("div", { children: [
4931
- /* @__PURE__ */ r(
4932
- x,
4930
+ return /* @__PURE__ */ m("div", { children: [
4931
+ /* @__PURE__ */ s(
4932
+ p,
4933
4933
  {
4934
- action: s,
4934
+ action: r,
4935
4935
  disabled: e == null ? void 0 : e.disabled,
4936
4936
  icon: e == null ? void 0 : e.icon,
4937
- loading: i,
4937
+ loading: a,
4938
4938
  tooltip: e == null ? void 0 : e.tooltip
4939
4939
  }
4940
4940
  ),
4941
- /* @__PURE__ */ r(
4941
+ /* @__PURE__ */ s(
4942
4942
  "input",
4943
4943
  {
4944
4944
  accept: ".docx",
4945
- onChange: c,
4945
+ onChange: l,
4946
4946
  ref: o,
4947
4947
  type: "file",
4948
4948
  style: {
@@ -4952,7 +4952,7 @@ function ta(e) {
4952
4952
  )
4953
4953
  ] });
4954
4954
  }
4955
- const po = A.create({
4955
+ const wo = A.create({
4956
4956
  name: "importWord",
4957
4957
  addOptions() {
4958
4958
  var e;
@@ -4962,34 +4962,34 @@ const po = A.create({
4962
4962
  convert: void 0,
4963
4963
  limit: 1024 * 1024 * 10,
4964
4964
  // 10 MB
4965
- button: ({ editor: t, extension: n, t: i }) => {
4966
- const { convert: a, limit: o, mammothOptions: s } = n.options;
4965
+ button: ({ editor: t, extension: n, t: a }) => {
4966
+ const { convert: i, limit: o, mammothOptions: r } = n.options;
4967
4967
  return {
4968
- component: ta,
4968
+ component: ti,
4969
4969
  componentProps: {
4970
4970
  editor: t,
4971
- convert: a,
4971
+ convert: i,
4972
4972
  limit: o,
4973
- mammothOptions: s,
4973
+ mammothOptions: r,
4974
4974
  action: () => t.commands.setHorizontalRule(),
4975
4975
  disabled: !t.can().setHorizontalRule(),
4976
4976
  icon: "Word",
4977
4977
  shortcutKeys: ["alt", "mod", "S"],
4978
- tooltip: i("editor.importWord.tooltip")
4978
+ tooltip: a("editor.importWord.tooltip")
4979
4979
  }
4980
4980
  };
4981
4981
  }
4982
4982
  };
4983
4983
  }
4984
- }), na = typeof window < "u";
4985
- function ia(e, t) {
4986
- if (na) {
4987
- const n = window.URL.createObjectURL(e), i = document.createElement("a");
4988
- return i.href = n, i.download = t, i.click(), window.URL.revokeObjectURL(n), Promise.resolve();
4984
+ }), ni = typeof window < "u";
4985
+ function ai(e, t) {
4986
+ if (ni) {
4987
+ const n = window.URL.createObjectURL(e), a = document.createElement("a");
4988
+ return a.href = n, a.download = t, a.click(), window.URL.revokeObjectURL(n), Promise.resolve();
4989
4989
  }
4990
4990
  return console.error("Download is not supported in Node.js"), Promise.resolve();
4991
4991
  }
4992
- const aa = {
4992
+ const ii = {
4993
4993
  ...U,
4994
4994
  hardBreak: U.hard_break,
4995
4995
  codeBlock: U.code_block,
@@ -5011,14 +5011,14 @@ const aa = {
5011
5011
  }
5012
5012
  });
5013
5013
  }
5014
- }, oa = new On(aa, $n), wo = A.create({
5014
+ }, oi = new On(ii, $n), yo = A.create({
5015
5015
  name: "exportWord",
5016
5016
  addOptions() {
5017
5017
  var e;
5018
5018
  return {
5019
5019
  ...(e = this.parent) == null ? void 0 : e.call(this),
5020
5020
  button: ({ editor: t, t: n }) => ({
5021
- component: x,
5021
+ component: p,
5022
5022
  componentProps: {
5023
5023
  icon: "ExportWord",
5024
5024
  action: () => {
@@ -5036,46 +5036,46 @@ const aa = {
5036
5036
  return {
5037
5037
  exportToWord: () => async ({ editor: e }) => {
5038
5038
  const t = {
5039
- getImageBuffer: async (i) => {
5040
- const o = await (await fetch(i)).arrayBuffer();
5039
+ getImageBuffer: async (a) => {
5040
+ const o = await (await fetch(a)).arrayBuffer();
5041
5041
  return new Uint8Array(o);
5042
5042
  }
5043
- }, n = oa.serialize(e.state.doc, t);
5044
- return Bn.toBlob(n).then((i) => ia(new Blob([i]), "export-document.docx")), !0;
5043
+ }, n = oi.serialize(e.state.doc, t);
5044
+ return Bn.toBlob(n).then((a) => ai(new Blob([a]), "export-document.docx")), !0;
5045
5045
  }
5046
5046
  };
5047
5047
  }
5048
- }), ra = "_toc_aag8a_1", sa = "_visible_aag8a_7", ca = "_list_aag8a_11", la = "_item_aag8a_16", _e = {
5049
- toc: ra,
5050
- visible: sa,
5051
- list: ca,
5052
- item: la
5048
+ }), si = "_toc_aag8a_1", ri = "_visible_aag8a_7", li = "_list_aag8a_11", ci = "_item_aag8a_16", _e = {
5049
+ toc: si,
5050
+ visible: ri,
5051
+ list: li,
5052
+ item: ci
5053
5053
  };
5054
- function da(e) {
5054
+ function di(e) {
5055
5055
  const t = [], n = [t];
5056
- return e.forEach((i) => {
5057
- let a = -1, o = n[i.level + a];
5056
+ return e.forEach((a) => {
5057
+ let i = -1, o = n[a.level + i];
5058
5058
  for (; !o; )
5059
- a -= 1, o = n[i.level + a];
5060
- o.push({ ...i, children: n[i.level] = [] });
5059
+ i -= 1, o = n[a.level + i];
5060
+ o.push({ ...a, children: n[a.level] = [] });
5061
5061
  }), t;
5062
5062
  }
5063
- function ha({ editor: e }) {
5064
- const t = Ie(), [n, i] = C([]), { t: a } = j(), o = F(() => {
5065
- const s = [], c = e.state.tr;
5066
- e.state.doc.descendants((h, d) => {
5067
- if (h.type.name === "heading") {
5068
- const l = `heading-${s.length + 1}`;
5069
- h.attrs.id !== l && c.setNodeMarkup(d, void 0, {
5070
- ...h.attrs,
5071
- id: l
5072
- }), s.push({
5073
- level: h.attrs.level,
5074
- text: h.textContent,
5075
- id: l
5063
+ function ui({ editor: e }) {
5064
+ const t = Ie(), [n, a] = C([]), { t: i } = j(), o = F(() => {
5065
+ const r = [], l = e.state.tr;
5066
+ e.state.doc.descendants((u, d) => {
5067
+ if (u.type.name === "heading") {
5068
+ const c = `heading-${r.length + 1}`;
5069
+ u.attrs.id !== c && l.setNodeMarkup(d, void 0, {
5070
+ ...u.attrs,
5071
+ id: c
5072
+ }), r.push({
5073
+ level: u.attrs.level,
5074
+ text: u.textContent,
5075
+ id: c
5076
5076
  });
5077
5077
  }
5078
- }), c.setMeta("addToHistory", !1), c.setMeta("preventUpdate", !0), e.view.dispatch(c), i(s), e.eventEmitter && e.eventEmitter.emit("TableOfContents", da(s));
5078
+ }), l.setMeta("addToHistory", !1), l.setMeta("preventUpdate", !0), e.view.dispatch(l), a(r), e.eventEmitter && e.eventEmitter.emit("TableOfContents", di(r));
5079
5079
  }, [e]);
5080
5080
  return z(() => {
5081
5081
  if (e) {
@@ -5089,60 +5089,60 @@ function ha({ editor: e }) {
5089
5089
  }
5090
5090
  }, [e, o]), z(() => {
5091
5091
  o();
5092
- }, []), /* @__PURE__ */ r(re, { className: P("tableOfContent", _e.toc, t && _e.visible), children: t ? /* @__PURE__ */ u("div", { style: { position: "relative" }, children: [
5093
- /* @__PURE__ */ r("p", { className: "text-[20px] richtext-mb-[8px] richtext-font-semibold", children: a("editor.table_of_content") }),
5094
- /* @__PURE__ */ r("ul", { className: _e.list, children: n.map((s, c) => /* @__PURE__ */ r(
5092
+ }, []), /* @__PURE__ */ s(se, { className: P("tableOfContent", _e.toc, t && _e.visible), children: t ? /* @__PURE__ */ m("div", { style: { position: "relative" }, children: [
5093
+ /* @__PURE__ */ s("p", { className: "text-[20px] mb-[8px] font-semibold", children: i("editor.table_of_content") }),
5094
+ /* @__PURE__ */ s("ul", { className: _e.list, children: n.map((r, l) => /* @__PURE__ */ s(
5095
5095
  "li",
5096
5096
  {
5097
5097
  className: _e.item,
5098
- style: { paddingLeft: `${s.level - 1}rem` },
5099
- children: /* @__PURE__ */ r("a", { href: `#${s.id}`, children: s.text })
5098
+ style: { paddingLeft: `${r.level - 1}rem` },
5099
+ children: /* @__PURE__ */ s("a", { href: `#${r.id}`, children: r.text })
5100
5100
  },
5101
- `table-of-content-${c}`
5101
+ `table-of-content-${l}`
5102
5102
  )) })
5103
5103
  ] }) : null });
5104
5104
  }
5105
- function ua(e, ...t) {
5106
- const [n, i] = C(!1);
5105
+ function mi(e, ...t) {
5106
+ const [n, a] = C(!1);
5107
5107
  return z(() => {
5108
- const a = () => {
5109
- i(e.isActive.apply(e, t));
5108
+ const i = () => {
5109
+ a(e.isActive.apply(e, t));
5110
5110
  };
5111
- return e.on("selectionUpdate", a), e.on("transaction", a), () => {
5112
- e.off("selectionUpdate", a), e.off("transaction", a);
5111
+ return e.on("selectionUpdate", i), e.on("transaction", i), () => {
5112
+ e.off("selectionUpdate", i), e.off("transaction", i);
5113
5113
  };
5114
- }, [e, t, i]), n;
5114
+ }, [e, t, a]), n;
5115
5115
  }
5116
- function ma({ editor: e, icon: t, tooltip: n }) {
5117
- const i = ua(e, ga.name), a = F(() => {
5118
- if (i) {
5116
+ function hi({ editor: e, icon: t, tooltip: n }) {
5117
+ const a = mi(e, gi.name), i = F(() => {
5118
+ if (a) {
5119
5119
  e.chain().focus().removeTableOfContents().run();
5120
5120
  return;
5121
5121
  }
5122
5122
  e.chain().focus().setTableOfContents().run();
5123
- }, [e, i]);
5124
- return /* @__PURE__ */ r(
5125
- x,
5123
+ }, [e, a]);
5124
+ return /* @__PURE__ */ s(
5125
+ p,
5126
5126
  {
5127
- action: a,
5128
- isActive: () => i || !1,
5127
+ action: i,
5128
+ isActive: () => a || !1,
5129
5129
  icon: t,
5130
5130
  tooltip: n
5131
5131
  }
5132
5132
  );
5133
5133
  }
5134
- function _a(e) {
5134
+ function _i(e) {
5135
5135
  return e && e.type.name === "title";
5136
5136
  }
5137
- function fa(e, t) {
5138
- const i = [e.getJSON()], a = [];
5139
- for (; i.length > 0; ) {
5140
- const o = i.shift();
5141
- o.type === t && a.push(o), o.content && o.content.length > 0 && i.push(...o.content);
5137
+ function fi(e, t) {
5138
+ const a = [e.getJSON()], i = [];
5139
+ for (; a.length > 0; ) {
5140
+ const o = a.shift();
5141
+ o.type === t && i.push(o), o.content && o.content.length > 0 && a.push(...o.content);
5142
5142
  }
5143
- return a;
5143
+ return i;
5144
5144
  }
5145
- const ga = ge.create({
5145
+ const gi = ge.create({
5146
5146
  name: "tableOfContents",
5147
5147
  group: "block",
5148
5148
  atom: !0,
@@ -5156,7 +5156,7 @@ const ga = ge.create({
5156
5156
  lastColumnResizable: !0,
5157
5157
  allowTableNodeSelection: !1,
5158
5158
  button: ({ editor: t, t: n }) => ({
5159
- component: ma,
5159
+ component: hi,
5160
5160
  componentProps: {
5161
5161
  disabled: !1,
5162
5162
  icon: "BookMarked",
@@ -5177,19 +5177,19 @@ const ga = ge.create({
5177
5177
  return ["toc", be(e)];
5178
5178
  },
5179
5179
  addNodeView() {
5180
- return Se(ha);
5180
+ return Se(ui);
5181
5181
  },
5182
5182
  // @ts-expect-error
5183
5183
  addCommands() {
5184
5184
  return {
5185
5185
  setTableOfContents: () => ({ commands: e, editor: t, view: n }) => {
5186
- if (fa(t, this.name).length > 0) {
5186
+ if (fi(t, this.name).length > 0) {
5187
5187
  this.options.onHasOneBeforeInsert();
5188
5188
  return;
5189
5189
  }
5190
- const a = n.props.state.doc.content.firstChild;
5191
- if (_a(a)) {
5192
- const o = (a.firstChild && a.firstChild.nodeSize || 0) + 1;
5190
+ const i = n.props.state.doc.content.firstChild;
5191
+ if (_i(i)) {
5192
+ const o = (i.firstChild && i.firstChild.nodeSize || 0) + 1;
5193
5193
  return e.insertContentAt(o, { type: this.name });
5194
5194
  }
5195
5195
  return e.insertContent({
@@ -5197,11 +5197,11 @@ const ga = ge.create({
5197
5197
  });
5198
5198
  },
5199
5199
  removeTableOfContents: () => ({ state: e, dispatch: t }) => {
5200
- const { tr: n } = e, i = e.schema.nodes.tableOfContents;
5201
- return e.doc.descendants((a, o) => {
5202
- if (a.type === i) {
5203
- const s = o, c = o + a.nodeSize;
5204
- n.delete(s, c);
5200
+ const { tr: n } = e, a = e.schema.nodes.tableOfContents;
5201
+ return e.doc.descendants((i, o) => {
5202
+ if (i.type === a) {
5203
+ const r = o, l = o + i.nodeSize;
5204
+ n.delete(r, l);
5205
5205
  }
5206
5206
  }), n.docChanged ? (t(n), !0) : !1;
5207
5207
  }
@@ -5220,37 +5220,37 @@ const ga = ge.create({
5220
5220
  ];
5221
5221
  }
5222
5222
  });
5223
- function ba(e) {
5223
+ function bi(e) {
5224
5224
  var n;
5225
5225
  const t = R(() => {
5226
5226
  var o;
5227
- const i = (o = e == null ? void 0 : e.items) == null ? void 0 : o.find((s) => s.isActive());
5228
- return i && !i.default ? {
5229
- ...i,
5230
- icon: i.icon ? i.icon : e.icon
5227
+ const a = (o = e == null ? void 0 : e.items) == null ? void 0 : o.find((r) => r.isActive());
5228
+ return a && !a.default ? {
5229
+ ...a,
5230
+ icon: a.icon ? a.icon : e.icon
5231
5231
  } : {
5232
5232
  title: e == null ? void 0 : e.tooltip,
5233
5233
  icon: e.icon,
5234
5234
  isActive: () => !1
5235
5235
  };
5236
5236
  }, [e]);
5237
- return /* @__PURE__ */ u(le, { modal: !0, children: [
5238
- /* @__PURE__ */ r(
5237
+ return /* @__PURE__ */ m(ce, { modal: !0, children: [
5238
+ /* @__PURE__ */ s(
5239
5239
  de,
5240
5240
  {
5241
5241
  asChild: !0,
5242
5242
  disabled: e == null ? void 0 : e.disabled,
5243
- children: /* @__PURE__ */ r(
5244
- x,
5243
+ children: /* @__PURE__ */ s(
5244
+ p,
5245
5245
  {
5246
- customClass: "!richtext-w-12 richtext-h-12",
5246
+ customClass: "!w-12 h-12",
5247
5247
  disabled: e == null ? void 0 : e.disabled,
5248
5248
  icon: e == null ? void 0 : e.icon,
5249
5249
  tooltip: e == null ? void 0 : e.tooltip,
5250
- children: /* @__PURE__ */ r(
5250
+ children: /* @__PURE__ */ s(
5251
5251
  M,
5252
5252
  {
5253
- className: "richtext-ml-1 richtext-size-3 richtext-text-zinc-500",
5253
+ className: "ml-1 size-3 text-zinc-500",
5254
5254
  name: "MenuDown"
5255
5255
  }
5256
5256
  )
@@ -5258,37 +5258,37 @@ function ba(e) {
5258
5258
  )
5259
5259
  }
5260
5260
  ),
5261
- /* @__PURE__ */ r(
5262
- he,
5261
+ /* @__PURE__ */ s(
5262
+ ue,
5263
5263
  {
5264
5264
  align: "start",
5265
- className: "richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",
5265
+ className: "flex w-full min-w-4 flex-row gap-1 !p-[4px]",
5266
5266
  side: "bottom",
5267
- children: (n = e == null ? void 0 : e.items) == null ? void 0 : n.map((i, a) => {
5268
- var o, s;
5269
- return /* @__PURE__ */ u(pe, { children: [
5270
- /* @__PURE__ */ r(we, { asChild: !0, children: /* @__PURE__ */ r(
5267
+ children: (n = e == null ? void 0 : e.items) == null ? void 0 : n.map((a, i) => {
5268
+ var o, r;
5269
+ return /* @__PURE__ */ m(we, { children: [
5270
+ /* @__PURE__ */ s(ye, { asChild: !0, children: /* @__PURE__ */ s(
5271
5271
  Be,
5272
5272
  {
5273
- className: "richtext-size-7 richtext-p-1",
5274
- "data-state": t.title === i.title ? "on" : "off",
5275
- onClick: i == null ? void 0 : i.action,
5276
- pressed: t.title === i.title,
5273
+ className: "size-7 p-1",
5274
+ "data-state": t.title === a.title ? "on" : "off",
5275
+ onClick: a == null ? void 0 : a.action,
5276
+ pressed: t.title === a.title,
5277
5277
  size: "sm",
5278
- children: (i == null ? void 0 : i.icon) && /* @__PURE__ */ r(M, { name: i.icon })
5278
+ children: (a == null ? void 0 : a.icon) && /* @__PURE__ */ s(M, { name: a.icon })
5279
5279
  }
5280
5280
  ) }),
5281
- /* @__PURE__ */ u(ye, { className: "richtext-flex richtext-flex-col richtext-items-center", children: [
5282
- /* @__PURE__ */ r("span", { children: i.title }),
5283
- !!((o = i.shortcutKeys) != null && o.length) && /* @__PURE__ */ r("span", { children: (s = i.shortcutKeys) == null ? void 0 : s.map((c) => je(c)).join(" ") })
5281
+ /* @__PURE__ */ m(ke, { className: "flex flex-col items-center", children: [
5282
+ /* @__PURE__ */ s("span", { children: a.title }),
5283
+ !!((o = a.shortcutKeys) != null && o.length) && /* @__PURE__ */ s("span", { children: (r = a.shortcutKeys) == null ? void 0 : r.map((l) => je(l)).join(" ") })
5284
5284
  ] })
5285
- ] }, `text-align-${a}`);
5285
+ ] }, `text-align-${i}`);
5286
5286
  })
5287
5287
  }
5288
5288
  )
5289
5289
  ] });
5290
5290
  }
5291
- const yo = A.create({
5291
+ const ko = A.create({
5292
5292
  name: "text-direction",
5293
5293
  addOptions() {
5294
5294
  var e;
@@ -5300,34 +5300,34 @@ const yo = A.create({
5300
5300
  button({
5301
5301
  editor: t,
5302
5302
  extension: n,
5303
- t: i
5303
+ t: a
5304
5304
  }) {
5305
- var h;
5306
- const a = ((h = n.options) == null ? void 0 : h.directions) || [], o = {
5305
+ var u;
5306
+ const i = ((u = n.options) == null ? void 0 : u.directions) || [], o = {
5307
5307
  auto: "TextDirection",
5308
5308
  ltr: "LeftToRight",
5309
5309
  rtl: "RightToLeft"
5310
- }, s = a.map((d) => ({
5311
- title: i(`editor.textDirection.${d}.tooltip`),
5310
+ }, r = i.map((d) => ({
5311
+ title: a(`editor.textDirection.${d}.tooltip`),
5312
5312
  icon: o[d],
5313
5313
  isActive: () => !1,
5314
5314
  action: () => {
5315
- var l, m, _, f;
5315
+ var c, h, _, f;
5316
5316
  if (d === "auto") {
5317
- (m = (l = t.commands) == null ? void 0 : l.unsetTextDirection) == null || m.call(l);
5317
+ (h = (c = t.commands) == null ? void 0 : c.unsetTextDirection) == null || h.call(c);
5318
5318
  return;
5319
5319
  }
5320
5320
  (f = (_ = t.commands) == null ? void 0 : _.setTextDirection) == null || f.call(_, d);
5321
5321
  },
5322
5322
  disabled: !1
5323
- })), c = s.filter((d) => d.disabled).length === s.length;
5323
+ })), l = r.filter((d) => d.disabled).length === r.length;
5324
5324
  return {
5325
- component: ba,
5325
+ component: bi,
5326
5326
  componentProps: {
5327
5327
  icon: "TextDirection",
5328
- tooltip: i("editor.textDirection.tooltip"),
5329
- disabled: c,
5330
- items: s
5328
+ tooltip: a("editor.textDirection.tooltip"),
5329
+ disabled: l,
5330
+ items: r
5331
5331
  }
5332
5332
  };
5333
5333
  }
@@ -5354,38 +5354,38 @@ const yo = A.create({
5354
5354
  unsetTextDirection: () => ({ commands: e }) => this.options.types.every((t) => e.resetAttributes(t, "dir"))
5355
5355
  };
5356
5356
  }
5357
- }), xa = "_listUsers_en3pm_1", pa = "_itemUser_en3pm_10", wa = "_selectedUser_en3pm_31", fe = {
5358
- listUsers: xa,
5359
- itemUser: pa,
5360
- selectedUser: wa
5361
- }, ya = He((e, t) => {
5362
- const n = G(null), [i, a] = C(0), o = (d) => {
5363
- const l = e.items[d];
5364
- l && e.command({ id: l, label: l });
5365
- }, s = () => {
5366
- a((i + e.items.length - 1) % e.items.length);
5367
- }, c = () => {
5368
- a((i + 1) % e.items.length);
5369
- }, h = () => {
5370
- o(i);
5357
+ }), pi = "_listUsers_en3pm_1", wi = "_itemUser_en3pm_10", yi = "_selectedUser_en3pm_31", fe = {
5358
+ listUsers: pi,
5359
+ itemUser: wi,
5360
+ selectedUser: yi
5361
+ }, ki = He((e, t) => {
5362
+ const n = G(null), [a, i] = C(0), o = (d) => {
5363
+ const c = e.items[d];
5364
+ c && e.command({ id: c, label: c });
5365
+ }, r = () => {
5366
+ i((a + e.items.length - 1) % e.items.length);
5367
+ }, l = () => {
5368
+ i((a + 1) % e.items.length);
5369
+ }, u = () => {
5370
+ o(a);
5371
5371
  };
5372
- return z(() => a(0), [e.items]), z(() => {
5373
- if (Number.isNaN(i + 1))
5372
+ return z(() => i(0), [e.items]), z(() => {
5373
+ if (Number.isNaN(a + 1))
5374
5374
  return;
5375
- const d = n.current.querySelector(`span:nth-of-type(${i + 1})`);
5375
+ const d = n.current.querySelector(`span:nth-of-type(${a + 1})`);
5376
5376
  d && Oe(d, { behavior: "smooth", scrollMode: "if-needed" });
5377
- }, [i]), ze(t, () => ({
5378
- onKeyDown: ({ event: d }) => d.key === "ArrowUp" ? (s(), !0) : d.key === "ArrowDown" ? (c(), !0) : d.key === "Enter" ? (h(), !0) : !1
5379
- })), /* @__PURE__ */ r("div", { className: P("listUsers", fe.listUsers), children: /* @__PURE__ */ r("div", { ref: n, children: e.items.length > 0 ? e.items.map((d, l) => /* @__PURE__ */ r(
5377
+ }, [a]), ze(t, () => ({
5378
+ onKeyDown: ({ event: d }) => d.key === "ArrowUp" ? (r(), !0) : d.key === "ArrowDown" ? (l(), !0) : d.key === "Enter" ? (u(), !0) : !1
5379
+ })), /* @__PURE__ */ s("div", { className: P("listUsers", fe.listUsers), children: /* @__PURE__ */ s("div", { ref: n, children: e.items.length > 0 ? e.items.map((d, c) => /* @__PURE__ */ s(
5380
5380
  "span",
5381
5381
  {
5382
- className: P("itemUser", fe.itemUser, l === i ? fe.selectedUser : ""),
5383
- onClick: () => o(l),
5382
+ className: P("itemUser", fe.itemUser, c === a ? fe.selectedUser : ""),
5383
+ onClick: () => o(c),
5384
5384
  children: d
5385
5385
  },
5386
- l
5387
- )) : /* @__PURE__ */ r("div", { className: P("itemUserEmpty", fe.itemUser), children: "Empty" }) }) });
5388
- }), ka = [
5386
+ c
5387
+ )) : /* @__PURE__ */ s("div", { className: P("itemUserEmpty", fe.itemUser), children: "Empty" }) }) });
5388
+ }), vi = [
5389
5389
  {
5390
5390
  id: "1",
5391
5391
  name: "John Doe"
@@ -5402,13 +5402,13 @@ const yo = A.create({
5402
5402
  id: "4",
5403
5403
  name: "Bob"
5404
5404
  }
5405
- ], va = {
5406
- items: async ({ query: e }) => ka.map((n) => n.name).filter((n) => n.toLowerCase().startsWith(e.toLowerCase())),
5405
+ ], xi = {
5406
+ items: async ({ query: e }) => vi.map((n) => n.name).filter((n) => n.toLowerCase().startsWith(e.toLowerCase())),
5407
5407
  render: () => {
5408
5408
  let e, t;
5409
5409
  return {
5410
5410
  onStart: (n) => {
5411
- e = new Te(ya, {
5411
+ e = new Te(ki, {
5412
5412
  props: n,
5413
5413
  editor: n.editor
5414
5414
  }), t = De("body", {
@@ -5427,15 +5427,15 @@ const yo = A.create({
5427
5427
  });
5428
5428
  },
5429
5429
  onKeyDown(n) {
5430
- var i;
5431
- return n.event.key === "Escape" ? (t[0].hide(), !0) : (i = e.ref) == null ? void 0 : i.onKeyDown(n);
5430
+ var a;
5431
+ return n.event.key === "Escape" ? (t[0].hide(), !0) : (a = e.ref) == null ? void 0 : a.onKeyDown(n);
5432
5432
  },
5433
5433
  onExit() {
5434
5434
  t[0].destroy(), e.destroy();
5435
5435
  }
5436
5436
  };
5437
5437
  }
5438
- }, ko = Wt.extend({
5438
+ }, vo = Wt.extend({
5439
5439
  addAttributes() {
5440
5440
  return {
5441
5441
  id: {
@@ -5452,8 +5452,8 @@ const yo = A.create({
5452
5452
  HTMLAttributes: {
5453
5453
  class: "mention"
5454
5454
  },
5455
- suggestion: va
5456
- }), Ca = {
5455
+ suggestion: xi
5456
+ }), Ci = {
5457
5457
  audio: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-audio-lines"><path d="M2 10v3"/><path d="M6 6v11"/><path d="M10 3v18"/><path d="M14 8v7"/><path d="M18 5v13"/><path d="M22 10v3"/></svg>',
5458
5458
  video: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-video"><path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/></svg>',
5459
5459
  file: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-file"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"/><path d="M14 2v4a2 2 0 0 0 2 2h4"/></svg>',
@@ -5481,45 +5481,45 @@ const yo = A.create({
5481
5481
  excel: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sheet"><rect width="18" height="18" x="3" y="3" rx="2" ry="2"/><line x1="3" x2="21" y1="9" y2="9"/><line x1="3" x2="21" y1="15" y2="15"/><line x1="9" x2="9" y1="9" y2="21"/><line x1="15" x2="15" y1="9" y2="21"/></svg>',
5482
5482
  ppt: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-table-properties"><path d="M15 3v18"/><rect width="18" height="18" x="3" y="3" rx="2"/><path d="M21 9H3"/><path d="M21 15H3"/></svg>'
5483
5483
  };
5484
- function Na(e) {
5485
- const t = Ca[e], a = new DOMParser().parseFromString(t, "image/svg+xml").documentElement, o = [
5484
+ function Ni(e) {
5485
+ const t = Ci[e], i = new DOMParser().parseFromString(t, "image/svg+xml").documentElement, o = [
5486
5486
  "svg",
5487
5487
  {
5488
- ...Array.from(a.attributes).reduce((s, c) => (s[c.name] = c.value, s), {})
5488
+ ...Array.from(i.attributes).reduce((r, l) => (r[l.name] = l.value, r), {})
5489
5489
  }
5490
5490
  ];
5491
- return Array.from(a.childNodes).forEach((s) => {
5492
- if (s.nodeType === 1) {
5493
- const c = [
5494
- s.tagName.toLowerCase(),
5495
- Array.from(s.attributes).reduce((h, d) => (h[d.name] = d.value, h), {})
5491
+ return Array.from(i.childNodes).forEach((r) => {
5492
+ if (r.nodeType === 1) {
5493
+ const l = [
5494
+ r.tagName.toLowerCase(),
5495
+ Array.from(r.attributes).reduce((u, d) => (u[d.name] = d.value, u), {})
5496
5496
  ];
5497
- s.textContent && c.push(s.textContent), o.push(c);
5497
+ r.textContent && l.push(r.textContent), o.push(l);
5498
5498
  }
5499
5499
  }), o;
5500
5500
  }
5501
- const Aa = {
5502
- audio: /* @__PURE__ */ r(hn, {}),
5503
- video: /* @__PURE__ */ r(dn, {}),
5504
- file: /* @__PURE__ */ r(ln, {}),
5505
- image: /* @__PURE__ */ r(cn, {}),
5506
- pdf: /* @__PURE__ */ r(Tn, {}),
5507
- word: /* @__PURE__ */ r(Sn, {}),
5508
- excel: /* @__PURE__ */ r(sn, {}),
5509
- ppt: /* @__PURE__ */ r(rn, {})
5501
+ const Ai = {
5502
+ audio: /* @__PURE__ */ s(un, {}),
5503
+ video: /* @__PURE__ */ s(dn, {}),
5504
+ file: /* @__PURE__ */ s(cn, {}),
5505
+ image: /* @__PURE__ */ s(ln, {}),
5506
+ pdf: /* @__PURE__ */ s(Tn, {}),
5507
+ word: /* @__PURE__ */ s(Sn, {}),
5508
+ excel: /* @__PURE__ */ s(rn, {}),
5509
+ ppt: /* @__PURE__ */ s(sn, {})
5510
5510
  };
5511
- function mt(e, t = !1) {
5512
- const n = Ln(e), i = Aa[n] || /* @__PURE__ */ r(xe, {});
5513
- return t ? Na(n) : i;
5511
+ function ht(e, t = !1) {
5512
+ const n = Ln(e), a = Ai[n] || /* @__PURE__ */ s(pe, {});
5513
+ return t ? Ni(n) : a;
5514
5514
  }
5515
- const La = "_wrap_1x1ms_2", Ne = {
5516
- wrap: La
5515
+ const Li = "_wrap_1x1ms_2", Ne = {
5516
+ wrap: Li
5517
5517
  };
5518
- function Sa({ editor: e, node: t, updateAttributes: n, deleteNode: i, extension: a }) {
5518
+ function Si({ editor: e, node: t, updateAttributes: n, deleteNode: a, extension: i }) {
5519
5519
  var H;
5520
- const o = G(null), s = Ie(), { hasTrigger: c, fileName: h, fileSize: d, fileExt: l, fileType: m, url: _, error: f } = t.attrs, [p, w] = C(!1), { t: L } = j(), E = (H = a == null ? void 0 : a.options) == null ? void 0 : H.upload, g = F(() => {
5521
- !s || _ || s && o.current.click();
5522
- }, [s, _]), b = F(
5520
+ const o = G(null), r = Ie(), { hasTrigger: l, fileName: u, fileSize: d, fileExt: c, fileType: h, url: _, error: f } = t.attrs, [w, y] = C(!1), { t: L } = j(), E = (H = i == null ? void 0 : i.options) == null ? void 0 : H.upload, g = F(() => {
5521
+ !r || _ || r && o.current.click();
5522
+ }, [r, _]), b = F(
5523
5523
  async (S) => {
5524
5524
  const O = S.target.files && S.target.files[0];
5525
5525
  if (!O)
@@ -5530,30 +5530,30 @@ function Sa({ editor: e, node: t, updateAttributes: n, deleteNode: i, extension:
5530
5530
  fileType: O.type,
5531
5531
  fileExt: En(O.name)
5532
5532
  };
5533
- w(!0);
5533
+ y(!0);
5534
5534
  try {
5535
- const ue = await E(O);
5536
- n({ ..._t, url: ue }), w(!1);
5537
- } catch (ue) {
5538
- n({ error: `File upload fail: ${ue && ue.message}` || "Unknown error" }), w(!1), o.current.value = "";
5535
+ const me = await E(O);
5536
+ n({ ..._t, url: me }), y(!1);
5537
+ } catch (me) {
5538
+ n({ error: `File upload fail: ${me && me.message}` || "Unknown error" }), y(!1), o.current.value = "";
5539
5539
  }
5540
5540
  },
5541
- [w, n]
5541
+ [y, n]
5542
5542
  );
5543
5543
  z(() => {
5544
- !_ && !c && (g(), n({ hasTrigger: !0 }));
5545
- }, [_, c, g, n]);
5546
- const k = F(() => i(), [e]);
5547
- return s && !_ ? /* @__PURE__ */ r(re, { children: /* @__PURE__ */ u("div", { className: P(Ne.wrap, "render-wrapper"), children: [
5548
- /* @__PURE__ */ r(
5544
+ !_ && !l && (g(), n({ hasTrigger: !0 }));
5545
+ }, [_, l, g, n]);
5546
+ const v = F(() => a(), [e]);
5547
+ return r && !_ ? /* @__PURE__ */ s(se, { children: /* @__PURE__ */ m("div", { className: P(Ne.wrap, "render-wrapper"), children: [
5548
+ /* @__PURE__ */ s(
5549
5549
  "p",
5550
5550
  {
5551
5551
  onClick: g,
5552
5552
  style: { cursor: "pointer" },
5553
- children: p ? /* @__PURE__ */ r("span", { children: L("editor.attachment.uploading") }) : /* @__PURE__ */ r("span", { children: L("editor.attachment.please_upload") })
5553
+ children: w ? /* @__PURE__ */ s("span", { children: L("editor.attachment.uploading") }) : /* @__PURE__ */ s("span", { children: L("editor.attachment.please_upload") })
5554
5554
  }
5555
5555
  ),
5556
- /* @__PURE__ */ r(
5556
+ /* @__PURE__ */ s(
5557
5557
  "input",
5558
5558
  {
5559
5559
  hidden: !0,
@@ -5562,45 +5562,45 @@ function Sa({ editor: e, node: t, updateAttributes: n, deleteNode: i, extension:
5562
5562
  type: "file"
5563
5563
  }
5564
5564
  )
5565
- ] }) }) : _ ? /* @__PURE__ */ r(re, { children: /* @__PURE__ */ u(
5565
+ ] }) }) : _ ? /* @__PURE__ */ s(se, { children: /* @__PURE__ */ m(
5566
5566
  "div",
5567
5567
  {
5568
5568
  className: P(Ne.wrap, "render-wrapper"),
5569
5569
  onClick: g,
5570
5570
  children: [
5571
- /* @__PURE__ */ u("div", { className: "richtext-flex richtext-items-center richtext-gap-[4px]", children: [
5572
- /* @__PURE__ */ r("span", { children: mt(m) }),
5573
- /* @__PURE__ */ u("span", { children: [
5574
- h,
5571
+ /* @__PURE__ */ m("div", { className: "flex items-center gap-[4px]", children: [
5572
+ /* @__PURE__ */ s("span", { children: ht(h) }),
5573
+ /* @__PURE__ */ m("span", { children: [
5574
+ u,
5575
5575
  ".",
5576
- l
5576
+ c
5577
5577
  ] }),
5578
- /* @__PURE__ */ u("span", { children: [
5578
+ /* @__PURE__ */ m("span", { children: [
5579
5579
  "(",
5580
5580
  tt(d),
5581
5581
  ")"
5582
5582
  ] })
5583
5583
  ] }),
5584
- /* @__PURE__ */ r(
5585
- x,
5584
+ /* @__PURE__ */ s(
5585
+ p,
5586
5586
  {
5587
- action: k,
5587
+ action: v,
5588
5588
  icon: "Trash2",
5589
5589
  tooltip: L("editor.delete")
5590
5590
  }
5591
5591
  )
5592
5592
  ]
5593
5593
  }
5594
- ) }) : f !== "null" ? /* @__PURE__ */ r(re, { children: /* @__PURE__ */ r(
5594
+ ) }) : f !== "null" ? /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(
5595
5595
  "div",
5596
5596
  {
5597
5597
  className: P(Ne.wrap, "render-wrapper"),
5598
5598
  onClick: g,
5599
- children: /* @__PURE__ */ r("p", { children: f })
5599
+ children: /* @__PURE__ */ s("p", { children: f })
5600
5600
  }
5601
- ) }) : /* @__PURE__ */ r(xe, {});
5601
+ ) }) : /* @__PURE__ */ s(pe, {});
5602
5602
  }
5603
- const vo = ge.create({
5603
+ const xo = ge.create({
5604
5604
  name: "attachment",
5605
5605
  content: "",
5606
5606
  marks: "",
@@ -5616,7 +5616,7 @@ const vo = ge.create({
5616
5616
  class: "attachment"
5617
5617
  },
5618
5618
  button: ({ editor: t, t: n }) => ({
5619
- component: x,
5619
+ component: p,
5620
5620
  componentProps: {
5621
5621
  action: () => t.chain().focus().setAttachment().run(),
5622
5622
  isActive: () => !1,
@@ -5634,8 +5634,8 @@ const vo = ge.create({
5634
5634
  const {
5635
5635
  url: t = "",
5636
5636
  fileName: n = "",
5637
- fileSize: i = "",
5638
- fileType: a = "",
5637
+ fileSize: a = "",
5638
+ fileType: i = "",
5639
5639
  fileExt: o = ""
5640
5640
  } = e || {};
5641
5641
  return [
@@ -5651,12 +5651,12 @@ const vo = ge.create({
5651
5651
  [
5652
5652
  "span",
5653
5653
  { class: "attachment__icon" },
5654
- mt(a, !0)
5654
+ ht(i, !0)
5655
5655
  ],
5656
5656
  [
5657
5657
  "span",
5658
5658
  { class: "attachment__text" },
5659
- `${n}.${o} (${tt(i)})`
5659
+ `${n}.${o} (${tt(a)})`
5660
5660
  ]
5661
5661
  ] : ["div", { class: "attachment__placeholder" }]
5662
5662
  ];
@@ -5699,57 +5699,57 @@ const vo = ge.create({
5699
5699
  };
5700
5700
  },
5701
5701
  addNodeView() {
5702
- return Se(Sa);
5702
+ return Se(Si);
5703
5703
  }
5704
5704
  });
5705
5705
  export {
5706
- vo as Attachment,
5707
- lo as BaseKit,
5708
- ao as Blockquote,
5709
- Ua as Bold,
5706
+ xo as Attachment,
5707
+ co as BaseKit,
5708
+ io as Blockquote,
5709
+ Ui as Bold,
5710
5710
  eo as BulletList,
5711
5711
  to as Clear,
5712
- Wa as Code,
5713
- si as CodeBlock,
5714
- Qa as Color,
5715
- xn as Column,
5716
- co as ColumnActionButton,
5712
+ Wi as Code,
5713
+ ra as CodeBlock,
5714
+ Qi as Color,
5715
+ pn as Column,
5716
+ lo as ColumnActionButton,
5717
5717
  Ao as Drawer,
5718
5718
  bo as Emoji,
5719
5719
  Lo as Excalidraw,
5720
- xo as ExportPdf,
5721
- wo as ExportWord,
5722
- Ga as FontFamily,
5723
- Ya as FontSize,
5720
+ po as ExportPdf,
5721
+ yo as ExportWord,
5722
+ Gi as FontFamily,
5723
+ Yi as FontSize,
5724
5724
  go as FormatPainter,
5725
- Za as Heading,
5726
- Xa as Highlight,
5727
- so as History,
5728
- ro as HorizontalRule,
5725
+ Zi as Heading,
5726
+ Xi as Highlight,
5727
+ ro as History,
5728
+ so as HorizontalRule,
5729
5729
  So as Iframe,
5730
- yn as Image,
5730
+ kn as Image,
5731
5731
  To as ImageGif,
5732
- po as ImportWord,
5733
- mo as Indent,
5734
- qa as Italic,
5732
+ wo as ImportWord,
5733
+ ho as Indent,
5734
+ qi as Italic,
5735
5735
  Eo as Katex,
5736
5736
  _o as LineHeight,
5737
5737
  oo as Link,
5738
- ko as Mention,
5738
+ vo as Mention,
5739
5739
  Ho as Mermaid,
5740
- uo as MoreMark,
5741
- pn as MultiColumn,
5740
+ mo as MoreMark,
5741
+ wn as MultiColumn,
5742
5742
  no as OrderedList,
5743
- ji as SearchAndReplace,
5743
+ ja as SearchAndReplace,
5744
5744
  fo as SlashCommand,
5745
- Va as Strike,
5746
- ho as SubAndSuperScript,
5745
+ Vi as Strike,
5746
+ uo as SubAndSuperScript,
5747
5747
  zo as Table,
5748
- ga as TableOfContents,
5749
- io as TaskList,
5750
- Ja as TextAlign,
5751
- yo as TextDirection,
5748
+ gi as TableOfContents,
5749
+ ao as TaskList,
5750
+ Ji as TextAlign,
5751
+ ko as TextDirection,
5752
5752
  Mo as Twitter,
5753
- Ka as Underline,
5754
- vn as Video
5753
+ Ki as Underline,
5754
+ xn as Video
5755
5755
  };