@dialpad/dialtone 9.175.2 → 9.176.0

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,119 +1,120 @@
1
- import { nodeViewProps as pt, NodeViewWrapper as mt, VueRenderer as Fe, VueNodeViewRenderer as gt, EditorContent as Ke, Editor as We } from "../../node_modules/@tiptap/vue-3.js";
2
- import { isTextSelection as qe, posToDOMRect as ae, getText as Xe, getTextSerializersFromSchema as Ye, mergeAttributes as st, Node as le, nodePasteRule as St, InputRule as Ge, getMarksBetween as Je, combineTransactionSteps as Ze, getChangedRanges as Qe, findChildrenInRange as tn, Mark as en, nodeInputRule as nn, Extension as on } from "@tiptap/core";
3
- import { Plugin as It, PluginKey as at, NodeSelection as sn } from "@tiptap/pm/state";
4
- import { CellSelection as rn } from "@tiptap/pm/tables";
5
- import { defineComponent as ce, ref as de, onMounted as ue, nextTick as an, onBeforeUnmount as he, h as fe, resolveComponent as T, openBlock as _, createBlock as A, withCtx as C, createVNode as M, createElementBlock as et, withDirectives as ln, createElementVNode as nt, Fragment as cn, renderList as dn, withModifiers as Dt, normalizeClass as pe, resolveDynamicComponent as un, vShow as hn, markRaw as fn, createTextVNode as lt, toDisplayString as $, createCommentVNode as rt, withKeys as pn, mergeProps as me } from "vue";
6
- import mn from "@tiptap/extension-blockquote";
7
- import gn from "@tiptap/extension-code-block";
8
- import yn from "@tiptap/extension-code";
9
- import wn from "@tiptap/extension-document";
10
- import { UndoRedo as bn, Placeholder as vn, Gapcursor as xn } from "@tiptap/extensions";
11
- import Tn from "@tiptap/extension-hard-break";
12
- import ge from "@tiptap/extension-paragraph";
13
- import _n from "@tiptap/extension-bold";
14
- import { BulletList as kn, ListItem as Cn, OrderedList as On } from "@tiptap/extension-list";
15
- import En from "@tiptap/extension-italic";
16
- import Sn from "@tiptap/extension-link";
17
- import Ln from "@tiptap/extension-strike";
18
- import An from "@tiptap/extension-underline";
19
- import In from "@tiptap/extension-text";
20
- import Dn from "@tiptap/extension-text-align";
21
- import { Table as Rn, TableRow as Mn, TableHeader as Hn, TableCell as $n } from "@tiptap/extension-table";
22
- import { TextStyle as Bn, TextStyleKit as Nn } from "@tiptap/extension-text-style";
23
- import Pn from "@tiptap/suggestion";
24
- import { emojiPattern as ye } from "regex-combined-emojis";
1
+ import { nodeViewProps as pt, NodeViewWrapper as mt, VueRenderer as We, VueNodeViewRenderer as gt, EditorContent as Ke, Editor as qe } from "../../node_modules/@tiptap/vue-3.js";
2
+ import { isTextSelection as Xe, posToDOMRect as le, getText as Ye, getTextSerializersFromSchema as Ge, mergeAttributes as st, Node as ce, nodePasteRule as St, InputRule as Je, getMarksBetween as Ze, combineTransactionSteps as Qe, getChangedRanges as tn, findChildrenInRange as en, Mark as nn, nodeInputRule as on, Extension as sn } from "@tiptap/core";
3
+ import { Plugin as It, PluginKey as at, NodeSelection as rn } from "@tiptap/pm/state";
4
+ import { CellSelection as an } from "@tiptap/pm/tables";
5
+ import { defineComponent as de, ref as ue, onMounted as he, nextTick as ln, onBeforeUnmount as fe, h as pe, resolveComponent as T, openBlock as _, createBlock as A, withCtx as C, createVNode as M, createElementBlock as et, withDirectives as cn, createElementVNode as nt, Fragment as dn, renderList as un, withModifiers as Dt, normalizeClass as me, resolveDynamicComponent as hn, vShow as fn, markRaw as pn, createTextVNode as lt, toDisplayString as B, createCommentVNode as rt, withKeys as mn, mergeProps as ge } from "vue";
6
+ import gn from "@tiptap/extension-blockquote";
7
+ import yn from "@tiptap/extension-code-block";
8
+ import wn from "@tiptap/extension-code";
9
+ import bn from "@tiptap/extension-document";
10
+ import { UndoRedo as vn, Placeholder as xn, Gapcursor as Tn } from "@tiptap/extensions";
11
+ import _n from "@tiptap/extension-hard-break";
12
+ import ye from "@tiptap/extension-paragraph";
13
+ import On from "@tiptap/extension-bold";
14
+ import { BulletList as Cn, ListItem as En, OrderedList as kn } from "@tiptap/extension-list";
15
+ import Sn from "@tiptap/extension-italic";
16
+ import Ln from "@tiptap/extension-link";
17
+ import An from "@tiptap/extension-strike";
18
+ import In from "@tiptap/extension-underline";
19
+ import Dn from "@tiptap/extension-text";
20
+ import Rn from "@tiptap/extension-text-align";
21
+ import { Table as Mn, TableRow as Hn, TableHeader as Bn, TableCell as $n } from "@tiptap/extension-table";
22
+ import { TextStyle as Pn, TextStyleKit as Un } from "@tiptap/extension-text-style";
23
+ import Vn from "@tiptap/suggestion";
24
+ import { emojiPattern as we } from "regex-combined-emojis";
25
25
  import { _ as q } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
26
- import we from "../emoji/emoji.js";
27
- import { getEmojiData as Un, emojiRegex as Vn, stringToUnicode as jn, codeToEmojiData as Rt, emojiShortCodeRegex as zn } from "../../common/emoji/index.js";
28
- import Fn from "../list-item/list-item.js";
26
+ import be from "../emoji/emoji.js";
27
+ import { getEmojiData as zn, emojiRegex as Fn, stringToUnicode as Nn, codeToEmojiData as Rt, emojiShortCodeRegex as jn } from "../../common/emoji/index.js";
28
+ import Wn from "../list-item/list-item.js";
29
29
  import yt from "../stack/stack.js";
30
- import { linkRegex as Kn, getPhoneNumberRegex as Wn, warnIfUnmounted as qn, returnFirstEl as Ft } from "../../common/utils/index.js";
31
- import Xn from "@tiptap/extension-image";
30
+ import { linkRegex as Kn, getPhoneNumberRegex as qn, warnIfUnmounted as Xn, returnFirstEl as jt } from "../../common/utils/index.js";
31
+ import Yn from "@tiptap/extension-image";
32
32
  import Mt from "@tiptap/extension-mention";
33
- import be from "../link/link.js";
34
- import { DtIconLock as Yn } from "@dialpad/dialtone-icons/vue3";
35
- import { DialtoneLocalization as ve } from "../../localization/index.js";
36
- import Gn from "../input/input.js";
37
- import Jn from "../popover/popover.js";
38
- import xe from "../button/button.js";
39
- import Zn from "../badge/badge.js";
40
- import { RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as Kt, RICH_TEXT_EDITOR_OUTPUT_FORMATS as Qn, RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as to } from "./rich-text-editor-constants.js";
41
- import eo from "../avatar/avatar.js";
42
- import no from "@dialpad/dialtone-icons/vue3/hash";
43
- import oo from "@dialpad/dialtone-icons/vue3/lock";
44
- import io from "deep-equal";
45
- const Te = ["top", "right", "bottom", "left"], Wt = ["start", "end"], qt = /* @__PURE__ */ Te.reduce((t, e) => t.concat(e, e + "-" + Wt[0], e + "-" + Wt[1]), []), G = Math.min, R = Math.max, bt = Math.round, Y = (t) => ({
33
+ import ve from "../link/link.js";
34
+ import { DtIconLock as Gn } from "@dialpad/dialtone-icons/vue3";
35
+ import { DialtoneLocalization as xe } from "../../localization/index.js";
36
+ import Jn from "../input/input.js";
37
+ import Zn from "../popover/popover.js";
38
+ import Te from "../button/button.js";
39
+ import Qn from "../badge/badge.js";
40
+ import { RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as Wt, RICH_TEXT_EDITOR_OUTPUT_FORMATS as ti, RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as ei } from "./rich-text-editor-constants.js";
41
+ import ni from "../avatar/avatar.js";
42
+ import ii from "@dialpad/dialtone-icons/vue3/hash";
43
+ import oi from "@dialpad/dialtone-icons/vue3/lock";
44
+ import { renderEditorToMarkdown as Kt } from "./markdownRenderer.js";
45
+ import si from "deep-equal";
46
+ const _e = ["top", "right", "bottom", "left"], qt = ["start", "end"], Xt = /* @__PURE__ */ _e.reduce((t, e) => t.concat(e, e + "-" + qt[0], e + "-" + qt[1]), []), G = Math.min, R = Math.max, bt = Math.round, Y = (t) => ({
46
47
  x: t,
47
48
  y: t
48
- }), so = {
49
+ }), ri = {
49
50
  left: "right",
50
51
  right: "left",
51
52
  bottom: "top",
52
53
  top: "bottom"
53
- }, ro = {
54
+ }, ai = {
54
55
  start: "end",
55
56
  end: "start"
56
57
  };
57
- function Lt(t, e, o) {
58
- return R(t, G(e, o));
58
+ function Lt(t, e, n) {
59
+ return R(t, G(e, n));
59
60
  }
60
61
  function Z(t, e) {
61
62
  return typeof t == "function" ? t(e) : t;
62
63
  }
63
- function j(t) {
64
+ function F(t) {
64
65
  return t.split("-")[0];
65
66
  }
66
- function F(t) {
67
+ function j(t) {
67
68
  return t.split("-")[1];
68
69
  }
69
- function _e(t) {
70
+ function Oe(t) {
70
71
  return t === "x" ? "y" : "x";
71
72
  }
72
73
  function Ht(t) {
73
74
  return t === "y" ? "height" : "width";
74
75
  }
75
- const ao = /* @__PURE__ */ new Set(["top", "bottom"]);
76
+ const li = /* @__PURE__ */ new Set(["top", "bottom"]);
76
77
  function X(t) {
77
- return ao.has(j(t)) ? "y" : "x";
78
+ return li.has(F(t)) ? "y" : "x";
78
79
  }
79
- function $t(t) {
80
- return _e(X(t));
80
+ function Bt(t) {
81
+ return Oe(X(t));
81
82
  }
82
- function ke(t, e, o) {
83
- o === void 0 && (o = !1);
84
- const n = F(t), i = $t(t), s = Ht(i);
85
- let r = i === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
83
+ function Ce(t, e, n) {
84
+ n === void 0 && (n = !1);
85
+ const i = j(t), o = Bt(t), s = Ht(o);
86
+ let r = o === "x" ? i === (n ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
86
87
  return e.reference[s] > e.floating[s] && (r = xt(r)), [r, xt(r)];
87
88
  }
88
- function lo(t) {
89
+ function ci(t) {
89
90
  const e = xt(t);
90
91
  return [vt(t), e, vt(e)];
91
92
  }
92
93
  function vt(t) {
93
- return t.replace(/start|end/g, (e) => ro[e]);
94
+ return t.replace(/start|end/g, (e) => ai[e]);
94
95
  }
95
- const Xt = ["left", "right"], Yt = ["right", "left"], co = ["top", "bottom"], uo = ["bottom", "top"];
96
- function ho(t, e, o) {
96
+ const Yt = ["left", "right"], Gt = ["right", "left"], di = ["top", "bottom"], ui = ["bottom", "top"];
97
+ function hi(t, e, n) {
97
98
  switch (t) {
98
99
  case "top":
99
100
  case "bottom":
100
- return o ? e ? Yt : Xt : e ? Xt : Yt;
101
+ return n ? e ? Gt : Yt : e ? Yt : Gt;
101
102
  case "left":
102
103
  case "right":
103
- return e ? co : uo;
104
+ return e ? di : ui;
104
105
  default:
105
106
  return [];
106
107
  }
107
108
  }
108
- function fo(t, e, o, n) {
109
- const i = F(t);
110
- let s = ho(j(t), o === "start", n);
111
- return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(vt)))), s;
109
+ function fi(t, e, n, i) {
110
+ const o = j(t);
111
+ let s = hi(F(t), n === "start", i);
112
+ return o && (s = s.map((r) => r + "-" + o), e && (s = s.concat(s.map(vt)))), s;
112
113
  }
113
114
  function xt(t) {
114
- return t.replace(/left|right|bottom|top/g, (e) => so[e]);
115
+ return t.replace(/left|right|bottom|top/g, (e) => ri[e]);
115
116
  }
116
- function po(t) {
117
+ function pi(t) {
117
118
  return {
118
119
  top: 0,
119
120
  right: 0,
@@ -122,8 +123,8 @@ function po(t) {
122
123
  ...t
123
124
  };
124
125
  }
125
- function Bt(t) {
126
- return typeof t != "number" ? po(t) : {
126
+ function $t(t) {
127
+ return typeof t != "number" ? pi(t) : {
127
128
  top: t,
128
129
  right: t,
129
130
  bottom: t,
@@ -133,75 +134,75 @@ function Bt(t) {
133
134
  function dt(t) {
134
135
  const {
135
136
  x: e,
136
- y: o,
137
- width: n,
138
- height: i
137
+ y: n,
138
+ width: i,
139
+ height: o
139
140
  } = t;
140
141
  return {
141
- width: n,
142
- height: i,
143
- top: o,
142
+ width: i,
143
+ height: o,
144
+ top: n,
144
145
  left: e,
145
- right: e + n,
146
- bottom: o + i,
146
+ right: e + i,
147
+ bottom: n + o,
147
148
  x: e,
148
- y: o
149
+ y: n
149
150
  };
150
151
  }
151
- function Gt(t, e, o) {
152
+ function Jt(t, e, n) {
152
153
  let {
153
- reference: n,
154
- floating: i
154
+ reference: i,
155
+ floating: o
155
156
  } = t;
156
- const s = X(e), r = $t(e), a = Ht(r), l = j(e), u = s === "y", d = n.x + n.width / 2 - i.width / 2, c = n.y + n.height / 2 - i.height / 2, h = n[a] / 2 - i[a] / 2;
157
+ const s = X(e), r = Bt(e), a = Ht(r), l = F(e), u = s === "y", d = i.x + i.width / 2 - o.width / 2, c = i.y + i.height / 2 - o.height / 2, h = i[a] / 2 - o[a] / 2;
157
158
  let f;
158
159
  switch (l) {
159
160
  case "top":
160
161
  f = {
161
162
  x: d,
162
- y: n.y - i.height
163
+ y: i.y - o.height
163
164
  };
164
165
  break;
165
166
  case "bottom":
166
167
  f = {
167
168
  x: d,
168
- y: n.y + n.height
169
+ y: i.y + i.height
169
170
  };
170
171
  break;
171
172
  case "right":
172
173
  f = {
173
- x: n.x + n.width,
174
+ x: i.x + i.width,
174
175
  y: c
175
176
  };
176
177
  break;
177
178
  case "left":
178
179
  f = {
179
- x: n.x - i.width,
180
+ x: i.x - o.width,
180
181
  y: c
181
182
  };
182
183
  break;
183
184
  default:
184
185
  f = {
185
- x: n.x,
186
- y: n.y
186
+ x: i.x,
187
+ y: i.y
187
188
  };
188
189
  }
189
- switch (F(e)) {
190
+ switch (j(e)) {
190
191
  case "start":
191
- f[r] -= h * (o && u ? -1 : 1);
192
+ f[r] -= h * (n && u ? -1 : 1);
192
193
  break;
193
194
  case "end":
194
- f[r] += h * (o && u ? -1 : 1);
195
+ f[r] += h * (n && u ? -1 : 1);
195
196
  break;
196
197
  }
197
198
  return f;
198
199
  }
199
- async function mo(t, e) {
200
- var o;
200
+ async function mi(t, e) {
201
+ var n;
201
202
  e === void 0 && (e = {});
202
203
  const {
203
- x: n,
204
- y: i,
204
+ x: i,
205
+ y: o,
205
206
  platform: s,
206
207
  rects: r,
207
208
  elements: a,
@@ -212,14 +213,14 @@ async function mo(t, e) {
212
213
  elementContext: c = "floating",
213
214
  altBoundary: h = !1,
214
215
  padding: f = 0
215
- } = Z(e, t), p = Bt(f), g = a[h ? c === "floating" ? "reference" : "floating" : c], y = dt(await s.getClippingRect({
216
- element: (o = await (s.isElement == null ? void 0 : s.isElement(g))) == null || o ? g : g.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
216
+ } = Z(e, t), p = $t(f), g = a[h ? c === "floating" ? "reference" : "floating" : c], y = dt(await s.getClippingRect({
217
+ element: (n = await (s.isElement == null ? void 0 : s.isElement(g))) == null || n ? g : g.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
217
218
  boundary: u,
218
219
  rootBoundary: d,
219
220
  strategy: l
220
221
  })), b = c === "floating" ? {
221
- x: n,
222
- y: i,
222
+ x: i,
223
+ y: o,
223
224
  width: r.floating.width,
224
225
  height: r.floating.height
225
226
  } : r.reference, v = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)), x = await (s.isElement == null ? void 0 : s.isElement(v)) ? await (s.getScale == null ? void 0 : s.getScale(v)) || {
@@ -228,34 +229,34 @@ async function mo(t, e) {
228
229
  } : {
229
230
  x: 1,
230
231
  y: 1
231
- }, O = dt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
232
+ }, E = dt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
232
233
  elements: a,
233
234
  rect: b,
234
235
  offsetParent: v,
235
236
  strategy: l
236
237
  }) : b);
237
238
  return {
238
- top: (y.top - O.top + p.top) / x.y,
239
- bottom: (O.bottom - y.bottom + p.bottom) / x.y,
240
- left: (y.left - O.left + p.left) / x.x,
241
- right: (O.right - y.right + p.right) / x.x
239
+ top: (y.top - E.top + p.top) / x.y,
240
+ bottom: (E.bottom - y.bottom + p.bottom) / x.y,
241
+ left: (y.left - E.left + p.left) / x.x,
242
+ right: (E.right - y.right + p.right) / x.x
242
243
  };
243
244
  }
244
- const go = async (t, e, o) => {
245
+ const gi = async (t, e, n) => {
245
246
  const {
246
- placement: n = "bottom",
247
- strategy: i = "absolute",
247
+ placement: i = "bottom",
248
+ strategy: o = "absolute",
248
249
  middleware: s = [],
249
250
  platform: r
250
- } = o, a = s.filter(Boolean), l = await (r.isRTL == null ? void 0 : r.isRTL(e));
251
+ } = n, a = s.filter(Boolean), l = await (r.isRTL == null ? void 0 : r.isRTL(e));
251
252
  let u = await r.getElementRects({
252
253
  reference: t,
253
254
  floating: e,
254
- strategy: i
255
+ strategy: o
255
256
  }), {
256
257
  x: d,
257
258
  y: c
258
- } = Gt(u, n, l), h = n, f = {}, p = 0;
259
+ } = Jt(u, i, l), h = i, f = {}, p = 0;
259
260
  for (let g = 0; g < a.length; g++) {
260
261
  var m;
261
262
  const {
@@ -264,19 +265,19 @@ const go = async (t, e, o) => {
264
265
  } = a[g], {
265
266
  x: v,
266
267
  y: x,
267
- data: O,
268
- reset: k
268
+ data: E,
269
+ reset: O
269
270
  } = await b({
270
271
  x: d,
271
272
  y: c,
272
- initialPlacement: n,
273
+ initialPlacement: i,
273
274
  placement: h,
274
- strategy: i,
275
+ strategy: o,
275
276
  middlewareData: f,
276
277
  rects: u,
277
278
  platform: {
278
279
  ...r,
279
- detectOverflow: (m = r.detectOverflow) != null ? m : mo
280
+ detectOverflow: (m = r.detectOverflow) != null ? m : mi
280
281
  },
281
282
  elements: {
282
283
  reference: t,
@@ -287,32 +288,32 @@ const go = async (t, e, o) => {
287
288
  ...f,
288
289
  [y]: {
289
290
  ...f[y],
290
- ...O
291
+ ...E
291
292
  }
292
- }, k && p <= 50 && (p++, typeof k == "object" && (k.placement && (h = k.placement), k.rects && (u = k.rects === !0 ? await r.getElementRects({
293
+ }, O && p <= 50 && (p++, typeof O == "object" && (O.placement && (h = O.placement), O.rects && (u = O.rects === !0 ? await r.getElementRects({
293
294
  reference: t,
294
295
  floating: e,
295
- strategy: i
296
- }) : k.rects), {
296
+ strategy: o
297
+ }) : O.rects), {
297
298
  x: d,
298
299
  y: c
299
- } = Gt(u, h, l)), g = -1);
300
+ } = Jt(u, h, l)), g = -1);
300
301
  }
301
302
  return {
302
303
  x: d,
303
304
  y: c,
304
305
  placement: h,
305
- strategy: i,
306
+ strategy: o,
306
307
  middlewareData: f
307
308
  };
308
- }, yo = (t) => ({
309
+ }, yi = (t) => ({
309
310
  name: "arrow",
310
311
  options: t,
311
312
  async fn(e) {
312
313
  const {
313
- x: o,
314
- y: n,
315
- placement: i,
314
+ x: n,
315
+ y: i,
316
+ placement: o,
316
317
  rects: s,
317
318
  platform: r,
318
319
  elements: a,
@@ -323,35 +324,35 @@ const go = async (t, e, o) => {
323
324
  } = Z(t, e) || {};
324
325
  if (u == null)
325
326
  return {};
326
- const c = Bt(d), h = {
327
- x: o,
328
- y: n
329
- }, f = $t(i), p = Ht(f), m = await r.getDimensions(u), g = f === "y", y = g ? "top" : "left", b = g ? "bottom" : "right", v = g ? "clientHeight" : "clientWidth", x = s.reference[p] + s.reference[f] - h[f] - s.floating[p], O = h[f] - s.reference[f], k = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(u));
330
- let L = k ? k[v] : 0;
331
- (!L || !await (r.isElement == null ? void 0 : r.isElement(k))) && (L = a.floating[v] || s.floating[p]);
332
- const U = x / 2 - O / 2, I = L / 2 - m[p] / 2 - 1, w = G(c[y], I), E = G(c[b], I), D = w, H = L - m[p] - E, S = L / 2 - m[p] / 2 + U, z = Lt(D, S, H), V = !l.arrow && F(i) != null && S !== z && s.reference[p] / 2 - (S < D ? w : E) - m[p] / 2 < 0, B = V ? S < D ? S - D : S - H : 0;
327
+ const c = $t(d), h = {
328
+ x: n,
329
+ y: i
330
+ }, f = Bt(o), p = Ht(f), m = await r.getDimensions(u), g = f === "y", y = g ? "top" : "left", b = g ? "bottom" : "right", v = g ? "clientHeight" : "clientWidth", x = s.reference[p] + s.reference[f] - h[f] - s.floating[p], E = h[f] - s.reference[f], O = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(u));
331
+ let L = O ? O[v] : 0;
332
+ (!L || !await (r.isElement == null ? void 0 : r.isElement(O))) && (L = a.floating[v] || s.floating[p]);
333
+ const V = x / 2 - E / 2, I = L / 2 - m[p] / 2 - 1, w = G(c[y], I), k = G(c[b], I), D = w, H = L - m[p] - k, S = L / 2 - m[p] / 2 + V, N = Lt(D, S, H), z = !l.arrow && j(o) != null && S !== N && s.reference[p] / 2 - (S < D ? w : k) - m[p] / 2 < 0, $ = z ? S < D ? S - D : S - H : 0;
333
334
  return {
334
- [f]: h[f] + B,
335
+ [f]: h[f] + $,
335
336
  data: {
336
- [f]: z,
337
- centerOffset: S - z - B,
338
- ...V && {
339
- alignmentOffset: B
337
+ [f]: N,
338
+ centerOffset: S - N - $,
339
+ ...z && {
340
+ alignmentOffset: $
340
341
  }
341
342
  },
342
- reset: V
343
+ reset: z
343
344
  };
344
345
  }
345
346
  });
346
- function wo(t, e, o) {
347
- return (t ? [...o.filter((i) => F(i) === t), ...o.filter((i) => F(i) !== t)] : o.filter((i) => j(i) === i)).filter((i) => t ? F(i) === t || (e ? vt(i) !== i : !1) : !0);
347
+ function wi(t, e, n) {
348
+ return (t ? [...n.filter((o) => j(o) === t), ...n.filter((o) => j(o) !== t)] : n.filter((o) => F(o) === o)).filter((o) => t ? j(o) === t || (e ? vt(o) !== o : !1) : !0);
348
349
  }
349
- const bo = function(t) {
350
+ const bi = function(t) {
350
351
  return t === void 0 && (t = {}), {
351
352
  name: "autoPlacement",
352
353
  options: t,
353
354
  async fn(e) {
354
- var o, n, i;
355
+ var n, i, o;
355
356
  const {
356
357
  rects: s,
357
358
  middlewareData: r,
@@ -361,52 +362,52 @@ const bo = function(t) {
361
362
  } = e, {
362
363
  crossAxis: d = !1,
363
364
  alignment: c,
364
- allowedPlacements: h = qt,
365
+ allowedPlacements: h = Xt,
365
366
  autoAlignment: f = !0,
366
367
  ...p
367
- } = Z(t, e), m = c !== void 0 || h === qt ? wo(c || null, f, h) : h, g = await l.detectOverflow(e, p), y = ((o = r.autoPlacement) == null ? void 0 : o.index) || 0, b = m[y];
368
+ } = Z(t, e), m = c !== void 0 || h === Xt ? wi(c || null, f, h) : h, g = await l.detectOverflow(e, p), y = ((n = r.autoPlacement) == null ? void 0 : n.index) || 0, b = m[y];
368
369
  if (b == null)
369
370
  return {};
370
- const v = ke(b, s, await (l.isRTL == null ? void 0 : l.isRTL(u.floating)));
371
+ const v = Ce(b, s, await (l.isRTL == null ? void 0 : l.isRTL(u.floating)));
371
372
  if (a !== b)
372
373
  return {
373
374
  reset: {
374
375
  placement: m[0]
375
376
  }
376
377
  };
377
- const x = [g[j(b)], g[v[0]], g[v[1]]], O = [...((n = r.autoPlacement) == null ? void 0 : n.overflows) || [], {
378
+ const x = [g[F(b)], g[v[0]], g[v[1]]], E = [...((i = r.autoPlacement) == null ? void 0 : i.overflows) || [], {
378
379
  placement: b,
379
380
  overflows: x
380
- }], k = m[y + 1];
381
- if (k)
381
+ }], O = m[y + 1];
382
+ if (O)
382
383
  return {
383
384
  data: {
384
385
  index: y + 1,
385
- overflows: O
386
+ overflows: E
386
387
  },
387
388
  reset: {
388
- placement: k
389
+ placement: O
389
390
  }
390
391
  };
391
- const L = O.map((w) => {
392
- const E = F(w.placement);
393
- return [w.placement, E && d ? (
392
+ const L = E.map((w) => {
393
+ const k = j(w.placement);
394
+ return [w.placement, k && d ? (
394
395
  // Check along the mainAxis and main crossAxis side.
395
396
  w.overflows.slice(0, 2).reduce((D, H) => D + H, 0)
396
397
  ) : (
397
398
  // Check only the mainAxis.
398
399
  w.overflows[0]
399
400
  ), w.overflows];
400
- }).sort((w, E) => w[1] - E[1]), I = ((i = L.filter((w) => w[2].slice(
401
+ }).sort((w, k) => w[1] - k[1]), I = ((o = L.filter((w) => w[2].slice(
401
402
  0,
402
403
  // Aligned placements should not check their opposite crossAxis
403
404
  // side.
404
- F(w[0]) ? 2 : 3
405
- ).every((E) => E <= 0))[0]) == null ? void 0 : i[0]) || L[0][0];
405
+ j(w[0]) ? 2 : 3
406
+ ).every((k) => k <= 0))[0]) == null ? void 0 : o[0]) || L[0][0];
406
407
  return I !== a ? {
407
408
  data: {
408
409
  index: y + 1,
409
- overflows: O
410
+ overflows: E
410
411
  },
411
412
  reset: {
412
413
  placement: I
@@ -414,14 +415,14 @@ const bo = function(t) {
414
415
  } : {};
415
416
  }
416
417
  };
417
- }, vo = function(t) {
418
+ }, vi = function(t) {
418
419
  return t === void 0 && (t = {}), {
419
420
  name: "flip",
420
421
  options: t,
421
422
  async fn(e) {
422
- var o, n;
423
+ var n, i;
423
424
  const {
424
- placement: i,
425
+ placement: o,
425
426
  middlewareData: s,
426
427
  rects: r,
427
428
  initialPlacement: a,
@@ -436,59 +437,59 @@ const bo = function(t) {
436
437
  flipAlignment: m = !0,
437
438
  ...g
438
439
  } = Z(t, e);
439
- if ((o = s.arrow) != null && o.alignmentOffset)
440
+ if ((n = s.arrow) != null && n.alignmentOffset)
440
441
  return {};
441
- const y = j(i), b = X(a), v = j(a) === a, x = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), O = h || (v || !m ? [xt(a)] : lo(a)), k = p !== "none";
442
- !h && k && O.push(...fo(a, m, p, x));
443
- const L = [a, ...O], U = await l.detectOverflow(e, g), I = [];
444
- let w = ((n = s.flip) == null ? void 0 : n.overflows) || [];
445
- if (d && I.push(U[y]), c) {
446
- const S = ke(i, r, x);
447
- I.push(U[S[0]], U[S[1]]);
442
+ const y = F(o), b = X(a), v = F(a) === a, x = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), E = h || (v || !m ? [xt(a)] : ci(a)), O = p !== "none";
443
+ !h && O && E.push(...fi(a, m, p, x));
444
+ const L = [a, ...E], V = await l.detectOverflow(e, g), I = [];
445
+ let w = ((i = s.flip) == null ? void 0 : i.overflows) || [];
446
+ if (d && I.push(V[y]), c) {
447
+ const S = Ce(o, r, x);
448
+ I.push(V[S[0]], V[S[1]]);
448
449
  }
449
450
  if (w = [...w, {
450
- placement: i,
451
+ placement: o,
451
452
  overflows: I
452
453
  }], !I.every((S) => S <= 0)) {
453
- var E, D;
454
- const S = (((E = s.flip) == null ? void 0 : E.index) || 0) + 1, z = L[S];
455
- if (z && (!(c === "alignment" ? b !== X(z) : !1) || // We leave the current main axis only if every placement on that axis
454
+ var k, D;
455
+ const S = (((k = s.flip) == null ? void 0 : k.index) || 0) + 1, N = L[S];
456
+ if (N && (!(c === "alignment" ? b !== X(N) : !1) || // We leave the current main axis only if every placement on that axis
456
457
  // overflows the main axis.
457
- w.every((N) => X(N.placement) === b ? N.overflows[0] > 0 : !0)))
458
+ w.every((P) => X(P.placement) === b ? P.overflows[0] > 0 : !0)))
458
459
  return {
459
460
  data: {
460
461
  index: S,
461
462
  overflows: w
462
463
  },
463
464
  reset: {
464
- placement: z
465
+ placement: N
465
466
  }
466
467
  };
467
- let V = (D = w.filter((B) => B.overflows[0] <= 0).sort((B, N) => B.overflows[1] - N.overflows[1])[0]) == null ? void 0 : D.placement;
468
- if (!V)
468
+ let z = (D = w.filter(($) => $.overflows[0] <= 0).sort(($, P) => $.overflows[1] - P.overflows[1])[0]) == null ? void 0 : D.placement;
469
+ if (!z)
469
470
  switch (f) {
470
471
  case "bestFit": {
471
472
  var H;
472
- const B = (H = w.filter((N) => {
473
- if (k) {
474
- const tt = X(N.placement);
473
+ const $ = (H = w.filter((P) => {
474
+ if (O) {
475
+ const tt = X(P.placement);
475
476
  return tt === b || // Create a bias to the `y` side axis due to horizontal
476
477
  // reading directions favoring greater width.
477
478
  tt === "y";
478
479
  }
479
480
  return !0;
480
- }).map((N) => [N.placement, N.overflows.filter((tt) => tt > 0).reduce((tt, ze) => tt + ze, 0)]).sort((N, tt) => N[1] - tt[1])[0]) == null ? void 0 : H[0];
481
- B && (V = B);
481
+ }).map((P) => [P.placement, P.overflows.filter((tt) => tt > 0).reduce((tt, je) => tt + je, 0)]).sort((P, tt) => P[1] - tt[1])[0]) == null ? void 0 : H[0];
482
+ $ && (z = $);
482
483
  break;
483
484
  }
484
485
  case "initialPlacement":
485
- V = a;
486
+ z = a;
486
487
  break;
487
488
  }
488
- if (i !== V)
489
+ if (o !== z)
489
490
  return {
490
491
  reset: {
491
- placement: V
492
+ placement: z
492
493
  }
493
494
  };
494
495
  }
@@ -496,7 +497,7 @@ const bo = function(t) {
496
497
  }
497
498
  };
498
499
  };
499
- function Jt(t, e) {
500
+ function Zt(t, e) {
500
501
  return {
501
502
  top: t.top - e.height,
502
503
  right: t.right - e.width,
@@ -504,43 +505,43 @@ function Jt(t, e) {
504
505
  left: t.left - e.width
505
506
  };
506
507
  }
507
- function Zt(t) {
508
- return Te.some((e) => t[e] >= 0);
508
+ function Qt(t) {
509
+ return _e.some((e) => t[e] >= 0);
509
510
  }
510
- const xo = function(t) {
511
+ const xi = function(t) {
511
512
  return t === void 0 && (t = {}), {
512
513
  name: "hide",
513
514
  options: t,
514
515
  async fn(e) {
515
516
  const {
516
- rects: o,
517
- platform: n
517
+ rects: n,
518
+ platform: i
518
519
  } = e, {
519
- strategy: i = "referenceHidden",
520
+ strategy: o = "referenceHidden",
520
521
  ...s
521
522
  } = Z(t, e);
522
- switch (i) {
523
+ switch (o) {
523
524
  case "referenceHidden": {
524
- const r = await n.detectOverflow(e, {
525
+ const r = await i.detectOverflow(e, {
525
526
  ...s,
526
527
  elementContext: "reference"
527
- }), a = Jt(r, o.reference);
528
+ }), a = Zt(r, n.reference);
528
529
  return {
529
530
  data: {
530
531
  referenceHiddenOffsets: a,
531
- referenceHidden: Zt(a)
532
+ referenceHidden: Qt(a)
532
533
  }
533
534
  };
534
535
  }
535
536
  case "escaped": {
536
- const r = await n.detectOverflow(e, {
537
+ const r = await i.detectOverflow(e, {
537
538
  ...s,
538
539
  altBoundary: !0
539
- }), a = Jt(r, o.floating);
540
+ }), a = Zt(r, n.floating);
540
541
  return {
541
542
  data: {
542
543
  escapedOffsets: a,
543
- escaped: Zt(a)
544
+ escaped: Qt(a)
544
545
  }
545
546
  };
546
547
  }
@@ -550,66 +551,66 @@ const xo = function(t) {
550
551
  }
551
552
  };
552
553
  };
553
- function Ce(t) {
554
- const e = G(...t.map((s) => s.left)), o = G(...t.map((s) => s.top)), n = R(...t.map((s) => s.right)), i = R(...t.map((s) => s.bottom));
554
+ function Ee(t) {
555
+ const e = G(...t.map((s) => s.left)), n = G(...t.map((s) => s.top)), i = R(...t.map((s) => s.right)), o = R(...t.map((s) => s.bottom));
555
556
  return {
556
557
  x: e,
557
- y: o,
558
- width: n - e,
559
- height: i - o
558
+ y: n,
559
+ width: i - e,
560
+ height: o - n
560
561
  };
561
562
  }
562
- function To(t) {
563
- const e = t.slice().sort((i, s) => i.y - s.y), o = [];
564
- let n = null;
565
- for (let i = 0; i < e.length; i++) {
566
- const s = e[i];
567
- !n || s.y - n.y > n.height / 2 ? o.push([s]) : o[o.length - 1].push(s), n = s;
563
+ function Ti(t) {
564
+ const e = t.slice().sort((o, s) => o.y - s.y), n = [];
565
+ let i = null;
566
+ for (let o = 0; o < e.length; o++) {
567
+ const s = e[o];
568
+ !i || s.y - i.y > i.height / 2 ? n.push([s]) : n[n.length - 1].push(s), i = s;
568
569
  }
569
- return o.map((i) => dt(Ce(i)));
570
+ return n.map((o) => dt(Ee(o)));
570
571
  }
571
- const _o = function(t) {
572
+ const _i = function(t) {
572
573
  return t === void 0 && (t = {}), {
573
574
  name: "inline",
574
575
  options: t,
575
576
  async fn(e) {
576
577
  const {
577
- placement: o,
578
- elements: n,
579
- rects: i,
578
+ placement: n,
579
+ elements: i,
580
+ rects: o,
580
581
  platform: s,
581
582
  strategy: r
582
583
  } = e, {
583
584
  padding: a = 2,
584
585
  x: l,
585
586
  y: u
586
- } = Z(t, e), d = Array.from(await (s.getClientRects == null ? void 0 : s.getClientRects(n.reference)) || []), c = To(d), h = dt(Ce(d)), f = Bt(a);
587
+ } = Z(t, e), d = Array.from(await (s.getClientRects == null ? void 0 : s.getClientRects(i.reference)) || []), c = Ti(d), h = dt(Ee(d)), f = $t(a);
587
588
  function p() {
588
589
  if (c.length === 2 && c[0].left > c[1].right && l != null && u != null)
589
590
  return c.find((g) => l > g.left - f.left && l < g.right + f.right && u > g.top - f.top && u < g.bottom + f.bottom) || h;
590
591
  if (c.length >= 2) {
591
- if (X(o) === "y") {
592
- const w = c[0], E = c[c.length - 1], D = j(o) === "top", H = w.top, S = E.bottom, z = D ? w.left : E.left, V = D ? w.right : E.right, B = V - z, N = S - H;
592
+ if (X(n) === "y") {
593
+ const w = c[0], k = c[c.length - 1], D = F(n) === "top", H = w.top, S = k.bottom, N = D ? w.left : k.left, z = D ? w.right : k.right, $ = z - N, P = S - H;
593
594
  return {
594
595
  top: H,
595
596
  bottom: S,
596
- left: z,
597
- right: V,
598
- width: B,
599
- height: N,
600
- x: z,
597
+ left: N,
598
+ right: z,
599
+ width: $,
600
+ height: P,
601
+ x: N,
601
602
  y: H
602
603
  };
603
604
  }
604
- const g = j(o) === "left", y = R(...c.map((w) => w.right)), b = G(...c.map((w) => w.left)), v = c.filter((w) => g ? w.left === b : w.right === y), x = v[0].top, O = v[v.length - 1].bottom, k = b, L = y, U = L - k, I = O - x;
605
+ const g = F(n) === "left", y = R(...c.map((w) => w.right)), b = G(...c.map((w) => w.left)), v = c.filter((w) => g ? w.left === b : w.right === y), x = v[0].top, E = v[v.length - 1].bottom, O = b, L = y, V = L - O, I = E - x;
605
606
  return {
606
607
  top: x,
607
- bottom: O,
608
- left: k,
608
+ bottom: E,
609
+ left: O,
609
610
  right: L,
610
- width: U,
611
+ width: V,
611
612
  height: I,
612
- x: k,
613
+ x: O,
613
614
  y: x
614
615
  };
615
616
  }
@@ -619,23 +620,23 @@ const _o = function(t) {
619
620
  reference: {
620
621
  getBoundingClientRect: p
621
622
  },
622
- floating: n.floating,
623
+ floating: i.floating,
623
624
  strategy: r
624
625
  });
625
- return i.reference.x !== m.reference.x || i.reference.y !== m.reference.y || i.reference.width !== m.reference.width || i.reference.height !== m.reference.height ? {
626
+ return o.reference.x !== m.reference.x || o.reference.y !== m.reference.y || o.reference.width !== m.reference.width || o.reference.height !== m.reference.height ? {
626
627
  reset: {
627
628
  rects: m
628
629
  }
629
630
  } : {};
630
631
  }
631
632
  };
632
- }, ko = /* @__PURE__ */ new Set(["left", "top"]);
633
- async function Co(t, e) {
633
+ }, Oi = /* @__PURE__ */ new Set(["left", "top"]);
634
+ async function Ci(t, e) {
634
635
  const {
635
- placement: o,
636
- platform: n,
637
- elements: i
638
- } = t, s = await (n.isRTL == null ? void 0 : n.isRTL(i.floating)), r = j(o), a = F(o), l = X(o) === "y", u = ko.has(r) ? -1 : 1, d = s && l ? -1 : 1, c = Z(e, t);
636
+ placement: n,
637
+ platform: i,
638
+ elements: o
639
+ } = t, s = await (i.isRTL == null ? void 0 : i.isRTL(o.floating)), r = F(n), a = j(n), l = X(n) === "y", u = Oi.has(r) ? -1 : 1, d = s && l ? -1 : 1, c = Z(e, t);
639
640
  let {
640
641
  mainAxis: h,
641
642
  crossAxis: f,
@@ -657,20 +658,20 @@ async function Co(t, e) {
657
658
  y: f * d
658
659
  };
659
660
  }
660
- const Oo = function(t) {
661
+ const Ei = function(t) {
661
662
  return t === void 0 && (t = 0), {
662
663
  name: "offset",
663
664
  options: t,
664
665
  async fn(e) {
665
- var o, n;
666
+ var n, i;
666
667
  const {
667
- x: i,
668
+ x: o,
668
669
  y: s,
669
670
  placement: r,
670
671
  middlewareData: a
671
- } = e, l = await Co(e, t);
672
- return r === ((o = a.offset) == null ? void 0 : o.placement) && (n = a.arrow) != null && n.alignmentOffset ? {} : {
673
- x: i + l.x,
672
+ } = e, l = await Ci(e, t);
673
+ return r === ((n = a.offset) == null ? void 0 : n.placement) && (i = a.arrow) != null && i.alignmentOffset ? {} : {
674
+ x: o + l.x,
674
675
  y: s + l.y,
675
676
  data: {
676
677
  ...l,
@@ -679,15 +680,15 @@ const Oo = function(t) {
679
680
  };
680
681
  }
681
682
  };
682
- }, Eo = function(t) {
683
+ }, ki = function(t) {
683
684
  return t === void 0 && (t = {}), {
684
685
  name: "shift",
685
686
  options: t,
686
687
  async fn(e) {
687
688
  const {
688
- x: o,
689
- y: n,
690
- placement: i,
689
+ x: n,
690
+ y: i,
691
+ placement: o,
691
692
  platform: s
692
693
  } = e, {
693
694
  mainAxis: r = !0,
@@ -706,9 +707,9 @@ const Oo = function(t) {
706
707
  },
707
708
  ...u
708
709
  } = Z(t, e), d = {
709
- x: o,
710
- y: n
711
- }, c = await s.detectOverflow(e, u), h = X(j(i)), f = _e(h);
710
+ x: n,
711
+ y: i
712
+ }, c = await s.detectOverflow(e, u), h = X(F(o)), f = Oe(h);
712
713
  let p = d[f], m = d[h];
713
714
  if (r) {
714
715
  const y = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", v = p + c[y], x = p - c[b];
@@ -726,8 +727,8 @@ const Oo = function(t) {
726
727
  return {
727
728
  ...g,
728
729
  data: {
729
- x: g.x - o,
730
- y: g.y - n,
730
+ x: g.x - n,
731
+ y: g.y - i,
731
732
  enabled: {
732
733
  [f]: r,
733
734
  [h]: a
@@ -736,14 +737,14 @@ const Oo = function(t) {
736
737
  };
737
738
  }
738
739
  };
739
- }, So = function(t) {
740
+ }, Si = function(t) {
740
741
  return t === void 0 && (t = {}), {
741
742
  name: "size",
742
743
  options: t,
743
744
  async fn(e) {
744
- var o, n;
745
+ var n, i;
745
746
  const {
746
- placement: i,
747
+ placement: o,
747
748
  rects: s,
748
749
  platform: r,
749
750
  elements: a
@@ -751,21 +752,21 @@ const Oo = function(t) {
751
752
  apply: l = () => {
752
753
  },
753
754
  ...u
754
- } = Z(t, e), d = await r.detectOverflow(e, u), c = j(i), h = F(i), f = X(i) === "y", {
755
+ } = Z(t, e), d = await r.detectOverflow(e, u), c = F(o), h = j(o), f = X(o) === "y", {
755
756
  width: p,
756
757
  height: m
757
758
  } = s.floating;
758
759
  let g, y;
759
760
  c === "top" || c === "bottom" ? (g = c, y = h === (await (r.isRTL == null ? void 0 : r.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (y = c, g = h === "end" ? "top" : "bottom");
760
- const b = m - d.top - d.bottom, v = p - d.left - d.right, x = G(m - d[g], b), O = G(p - d[y], v), k = !e.middlewareData.shift;
761
- let L = x, U = O;
762
- if ((o = e.middlewareData.shift) != null && o.enabled.x && (U = v), (n = e.middlewareData.shift) != null && n.enabled.y && (L = b), k && !h) {
763
- const w = R(d.left, 0), E = R(d.right, 0), D = R(d.top, 0), H = R(d.bottom, 0);
764
- f ? U = p - 2 * (w !== 0 || E !== 0 ? w + E : R(d.left, d.right)) : L = m - 2 * (D !== 0 || H !== 0 ? D + H : R(d.top, d.bottom));
761
+ const b = m - d.top - d.bottom, v = p - d.left - d.right, x = G(m - d[g], b), E = G(p - d[y], v), O = !e.middlewareData.shift;
762
+ let L = x, V = E;
763
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (V = v), (i = e.middlewareData.shift) != null && i.enabled.y && (L = b), O && !h) {
764
+ const w = R(d.left, 0), k = R(d.right, 0), D = R(d.top, 0), H = R(d.bottom, 0);
765
+ f ? V = p - 2 * (w !== 0 || k !== 0 ? w + k : R(d.left, d.right)) : L = m - 2 * (D !== 0 || H !== 0 ? D + H : R(d.top, d.bottom));
765
766
  }
766
767
  await l({
767
768
  ...e,
768
- availableWidth: U,
769
+ availableWidth: V,
769
770
  availableHeight: L
770
771
  });
771
772
  const I = await r.getDimensions(a.floating);
@@ -781,45 +782,45 @@ function Tt() {
781
782
  return typeof window < "u";
782
783
  }
783
784
  function ht(t) {
784
- return Oe(t) ? (t.nodeName || "").toLowerCase() : "#document";
785
+ return ke(t) ? (t.nodeName || "").toLowerCase() : "#document";
785
786
  }
786
- function P(t) {
787
+ function U(t) {
787
788
  var e;
788
789
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
789
790
  }
790
791
  function Q(t) {
791
792
  var e;
792
- return (e = (Oe(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
793
+ return (e = (ke(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
793
794
  }
794
- function Oe(t) {
795
- return Tt() ? t instanceof Node || t instanceof P(t).Node : !1;
795
+ function ke(t) {
796
+ return Tt() ? t instanceof Node || t instanceof U(t).Node : !1;
796
797
  }
797
- function K(t) {
798
- return Tt() ? t instanceof Element || t instanceof P(t).Element : !1;
798
+ function W(t) {
799
+ return Tt() ? t instanceof Element || t instanceof U(t).Element : !1;
799
800
  }
800
801
  function J(t) {
801
- return Tt() ? t instanceof HTMLElement || t instanceof P(t).HTMLElement : !1;
802
+ return Tt() ? t instanceof HTMLElement || t instanceof U(t).HTMLElement : !1;
802
803
  }
803
- function Qt(t) {
804
- return !Tt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof P(t).ShadowRoot;
804
+ function te(t) {
805
+ return !Tt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof U(t).ShadowRoot;
805
806
  }
806
- const Lo = /* @__PURE__ */ new Set(["inline", "contents"]);
807
+ const Li = /* @__PURE__ */ new Set(["inline", "contents"]);
807
808
  function wt(t) {
808
809
  const {
809
810
  overflow: e,
810
- overflowX: o,
811
- overflowY: n,
812
- display: i
813
- } = W(t);
814
- return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !Lo.has(i);
811
+ overflowX: n,
812
+ overflowY: i,
813
+ display: o
814
+ } = K(t);
815
+ return /auto|scroll|overlay|hidden|clip/.test(e + i + n) && !Li.has(o);
815
816
  }
816
- const Ao = /* @__PURE__ */ new Set(["table", "td", "th"]);
817
- function Io(t) {
818
- return Ao.has(ht(t));
817
+ const Ai = /* @__PURE__ */ new Set(["table", "td", "th"]);
818
+ function Ii(t) {
819
+ return Ai.has(ht(t));
819
820
  }
820
- const Do = [":popover-open", ":modal"];
821
+ const Di = [":popover-open", ":modal"];
821
822
  function _t(t) {
822
- return Do.some((e) => {
823
+ return Di.some((e) => {
823
824
  try {
824
825
  return t.matches(e);
825
826
  } catch {
@@ -827,34 +828,34 @@ function _t(t) {
827
828
  }
828
829
  });
829
830
  }
830
- const Ro = ["transform", "translate", "scale", "rotate", "perspective"], Mo = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Ho = ["paint", "layout", "strict", "content"];
831
- function Nt(t) {
832
- const e = Pt(), o = K(t) ? W(t) : t;
833
- return Ro.some((n) => o[n] ? o[n] !== "none" : !1) || (o.containerType ? o.containerType !== "normal" : !1) || !e && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !e && (o.filter ? o.filter !== "none" : !1) || Mo.some((n) => (o.willChange || "").includes(n)) || Ho.some((n) => (o.contain || "").includes(n));
831
+ const Ri = ["transform", "translate", "scale", "rotate", "perspective"], Mi = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Hi = ["paint", "layout", "strict", "content"];
832
+ function Pt(t) {
833
+ const e = Ut(), n = W(t) ? K(t) : t;
834
+ return Ri.some((i) => n[i] ? n[i] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || Mi.some((i) => (n.willChange || "").includes(i)) || Hi.some((i) => (n.contain || "").includes(i));
834
835
  }
835
- function $o(t) {
836
- let e = it(t);
836
+ function Bi(t) {
837
+ let e = ot(t);
837
838
  for (; J(e) && !ut(e); ) {
838
- if (Nt(e))
839
+ if (Pt(e))
839
840
  return e;
840
841
  if (_t(e))
841
842
  return null;
842
- e = it(e);
843
+ e = ot(e);
843
844
  }
844
845
  return null;
845
846
  }
846
- function Pt() {
847
+ function Ut() {
847
848
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
848
849
  }
849
- const Bo = /* @__PURE__ */ new Set(["html", "body", "#document"]);
850
+ const $i = /* @__PURE__ */ new Set(["html", "body", "#document"]);
850
851
  function ut(t) {
851
- return Bo.has(ht(t));
852
+ return $i.has(ht(t));
852
853
  }
853
- function W(t) {
854
- return P(t).getComputedStyle(t);
854
+ function K(t) {
855
+ return U(t).getComputedStyle(t);
855
856
  }
856
- function kt(t) {
857
- return K(t) ? {
857
+ function Ot(t) {
858
+ return W(t) ? {
858
859
  scrollLeft: t.scrollLeft,
859
860
  scrollTop: t.scrollTop
860
861
  } : {
@@ -862,83 +863,83 @@ function kt(t) {
862
863
  scrollTop: t.scrollY
863
864
  };
864
865
  }
865
- function it(t) {
866
+ function ot(t) {
866
867
  if (ht(t) === "html")
867
868
  return t;
868
869
  const e = (
869
870
  // Step into the shadow DOM of the parent of a slotted node.
870
871
  t.assignedSlot || // DOM Element detected.
871
872
  t.parentNode || // ShadowRoot detected.
872
- Qt(t) && t.host || // Fallback.
873
+ te(t) && t.host || // Fallback.
873
874
  Q(t)
874
875
  );
875
- return Qt(e) ? e.host : e;
876
+ return te(e) ? e.host : e;
876
877
  }
877
- function Ee(t) {
878
- const e = it(t);
879
- return ut(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : J(e) && wt(e) ? e : Ee(e);
878
+ function Se(t) {
879
+ const e = ot(t);
880
+ return ut(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : J(e) && wt(e) ? e : Se(e);
880
881
  }
881
- function Se(t, e, o) {
882
- var n;
882
+ function Le(t, e, n) {
883
+ var i;
883
884
  e === void 0 && (e = []);
884
- const i = Ee(t), s = i === ((n = t.ownerDocument) == null ? void 0 : n.body), r = P(i);
885
- return s ? e.concat(r, r.visualViewport || [], wt(i) ? i : [], []) : e.concat(i, Se(i, []));
885
+ const o = Se(t), s = o === ((i = t.ownerDocument) == null ? void 0 : i.body), r = U(o);
886
+ return s ? e.concat(r, r.visualViewport || [], wt(o) ? o : [], []) : e.concat(o, Le(o, []));
886
887
  }
887
- function te(t) {
888
+ function ee(t) {
888
889
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
889
890
  }
890
- function Le(t) {
891
- const e = W(t);
892
- let o = parseFloat(e.width) || 0, n = parseFloat(e.height) || 0;
893
- const i = J(t), s = i ? t.offsetWidth : o, r = i ? t.offsetHeight : n, a = bt(o) !== s || bt(n) !== r;
894
- return a && (o = s, n = r), {
895
- width: o,
896
- height: n,
891
+ function Ae(t) {
892
+ const e = K(t);
893
+ let n = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
894
+ const o = J(t), s = o ? t.offsetWidth : n, r = o ? t.offsetHeight : i, a = bt(n) !== s || bt(i) !== r;
895
+ return a && (n = s, i = r), {
896
+ width: n,
897
+ height: i,
897
898
  $: a
898
899
  };
899
900
  }
900
- function Ae(t) {
901
- return K(t) ? t : t.contextElement;
901
+ function Ie(t) {
902
+ return W(t) ? t : t.contextElement;
902
903
  }
903
904
  function ct(t) {
904
- const e = Ae(t);
905
+ const e = Ie(t);
905
906
  if (!J(e))
906
907
  return Y(1);
907
- const o = e.getBoundingClientRect(), {
908
- width: n,
909
- height: i,
908
+ const n = e.getBoundingClientRect(), {
909
+ width: i,
910
+ height: o,
910
911
  $: s
911
- } = Le(e);
912
- let r = (s ? bt(o.width) : o.width) / n, a = (s ? bt(o.height) : o.height) / i;
912
+ } = Ae(e);
913
+ let r = (s ? bt(n.width) : n.width) / i, a = (s ? bt(n.height) : n.height) / o;
913
914
  return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
914
915
  x: r,
915
916
  y: a
916
917
  };
917
918
  }
918
- const No = /* @__PURE__ */ Y(0);
919
- function Ie(t) {
920
- const e = P(t);
921
- return !Pt() || !e.visualViewport ? No : {
919
+ const Pi = /* @__PURE__ */ Y(0);
920
+ function De(t) {
921
+ const e = U(t);
922
+ return !Ut() || !e.visualViewport ? Pi : {
922
923
  x: e.visualViewport.offsetLeft,
923
924
  y: e.visualViewport.offsetTop
924
925
  };
925
926
  }
926
- function Po(t, e, o) {
927
- return e === void 0 && (e = !1), !o || e && o !== P(t) ? !1 : e;
927
+ function Ui(t, e, n) {
928
+ return e === void 0 && (e = !1), !n || e && n !== U(t) ? !1 : e;
928
929
  }
929
- function ft(t, e, o, n) {
930
- e === void 0 && (e = !1), o === void 0 && (o = !1);
931
- const i = t.getBoundingClientRect(), s = Ae(t);
930
+ function ft(t, e, n, i) {
931
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
932
+ const o = t.getBoundingClientRect(), s = Ie(t);
932
933
  let r = Y(1);
933
- e && (n ? K(n) && (r = ct(n)) : r = ct(t));
934
- const a = Po(s, o, n) ? Ie(s) : Y(0);
935
- let l = (i.left + a.x) / r.x, u = (i.top + a.y) / r.y, d = i.width / r.x, c = i.height / r.y;
934
+ e && (i ? W(i) && (r = ct(i)) : r = ct(t));
935
+ const a = Ui(s, n, i) ? De(s) : Y(0);
936
+ let l = (o.left + a.x) / r.x, u = (o.top + a.y) / r.y, d = o.width / r.x, c = o.height / r.y;
936
937
  if (s) {
937
- const h = P(s), f = n && K(n) ? P(n) : n;
938
- let p = h, m = te(p);
939
- for (; m && n && f !== p; ) {
940
- const g = ct(m), y = m.getBoundingClientRect(), b = W(m), v = y.left + (m.clientLeft + parseFloat(b.paddingLeft)) * g.x, x = y.top + (m.clientTop + parseFloat(b.paddingTop)) * g.y;
941
- l *= g.x, u *= g.y, d *= g.x, c *= g.y, l += v, u += x, p = P(m), m = te(p);
938
+ const h = U(s), f = i && W(i) ? U(i) : i;
939
+ let p = h, m = ee(p);
940
+ for (; m && i && f !== p; ) {
941
+ const g = ct(m), y = m.getBoundingClientRect(), b = K(m), v = y.left + (m.clientLeft + parseFloat(b.paddingLeft)) * g.x, x = y.top + (m.clientTop + parseFloat(b.paddingTop)) * g.y;
942
+ l *= g.x, u *= g.y, d *= g.x, c *= g.y, l += v, u += x, p = U(m), m = ee(p);
942
943
  }
943
944
  }
944
945
  return dt({
@@ -949,71 +950,71 @@ function ft(t, e, o, n) {
949
950
  });
950
951
  }
951
952
  function Ct(t, e) {
952
- const o = kt(t).scrollLeft;
953
- return e ? e.left + o : ft(Q(t)).left + o;
953
+ const n = Ot(t).scrollLeft;
954
+ return e ? e.left + n : ft(Q(t)).left + n;
954
955
  }
955
- function De(t, e) {
956
- const o = t.getBoundingClientRect(), n = o.left + e.scrollLeft - Ct(t, o), i = o.top + e.scrollTop;
956
+ function Re(t, e) {
957
+ const n = t.getBoundingClientRect(), i = n.left + e.scrollLeft - Ct(t, n), o = n.top + e.scrollTop;
957
958
  return {
958
- x: n,
959
- y: i
959
+ x: i,
960
+ y: o
960
961
  };
961
962
  }
962
- function Uo(t) {
963
+ function Vi(t) {
963
964
  let {
964
965
  elements: e,
965
- rect: o,
966
- offsetParent: n,
967
- strategy: i
966
+ rect: n,
967
+ offsetParent: i,
968
+ strategy: o
968
969
  } = t;
969
- const s = i === "fixed", r = Q(n), a = e ? _t(e.floating) : !1;
970
- if (n === r || a && s)
971
- return o;
970
+ const s = o === "fixed", r = Q(i), a = e ? _t(e.floating) : !1;
971
+ if (i === r || a && s)
972
+ return n;
972
973
  let l = {
973
974
  scrollLeft: 0,
974
975
  scrollTop: 0
975
976
  }, u = Y(1);
976
- const d = Y(0), c = J(n);
977
- if ((c || !c && !s) && ((ht(n) !== "body" || wt(r)) && (l = kt(n)), J(n))) {
978
- const f = ft(n);
979
- u = ct(n), d.x = f.x + n.clientLeft, d.y = f.y + n.clientTop;
977
+ const d = Y(0), c = J(i);
978
+ if ((c || !c && !s) && ((ht(i) !== "body" || wt(r)) && (l = Ot(i)), J(i))) {
979
+ const f = ft(i);
980
+ u = ct(i), d.x = f.x + i.clientLeft, d.y = f.y + i.clientTop;
980
981
  }
981
- const h = r && !c && !s ? De(r, l) : Y(0);
982
+ const h = r && !c && !s ? Re(r, l) : Y(0);
982
983
  return {
983
- width: o.width * u.x,
984
- height: o.height * u.y,
985
- x: o.x * u.x - l.scrollLeft * u.x + d.x + h.x,
986
- y: o.y * u.y - l.scrollTop * u.y + d.y + h.y
984
+ width: n.width * u.x,
985
+ height: n.height * u.y,
986
+ x: n.x * u.x - l.scrollLeft * u.x + d.x + h.x,
987
+ y: n.y * u.y - l.scrollTop * u.y + d.y + h.y
987
988
  };
988
989
  }
989
- function Vo(t) {
990
+ function zi(t) {
990
991
  return Array.from(t.getClientRects());
991
992
  }
992
- function jo(t) {
993
- const e = Q(t), o = kt(t), n = t.ownerDocument.body, i = R(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), s = R(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight);
994
- let r = -o.scrollLeft + Ct(t);
995
- const a = -o.scrollTop;
996
- return W(n).direction === "rtl" && (r += R(e.clientWidth, n.clientWidth) - i), {
997
- width: i,
993
+ function Fi(t) {
994
+ const e = Q(t), n = Ot(t), i = t.ownerDocument.body, o = R(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth), s = R(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
995
+ let r = -n.scrollLeft + Ct(t);
996
+ const a = -n.scrollTop;
997
+ return K(i).direction === "rtl" && (r += R(e.clientWidth, i.clientWidth) - o), {
998
+ width: o,
998
999
  height: s,
999
1000
  x: r,
1000
1001
  y: a
1001
1002
  };
1002
1003
  }
1003
- const ee = 25;
1004
- function zo(t, e) {
1005
- const o = P(t), n = Q(t), i = o.visualViewport;
1006
- let s = n.clientWidth, r = n.clientHeight, a = 0, l = 0;
1007
- if (i) {
1008
- s = i.width, r = i.height;
1009
- const d = Pt();
1010
- (!d || d && e === "fixed") && (a = i.offsetLeft, l = i.offsetTop);
1004
+ const ne = 25;
1005
+ function Ni(t, e) {
1006
+ const n = U(t), i = Q(t), o = n.visualViewport;
1007
+ let s = i.clientWidth, r = i.clientHeight, a = 0, l = 0;
1008
+ if (o) {
1009
+ s = o.width, r = o.height;
1010
+ const d = Ut();
1011
+ (!d || d && e === "fixed") && (a = o.offsetLeft, l = o.offsetTop);
1011
1012
  }
1012
- const u = Ct(n);
1013
+ const u = Ct(i);
1013
1014
  if (u <= 0) {
1014
- const d = n.ownerDocument, c = d.body, h = getComputedStyle(c), f = d.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, p = Math.abs(n.clientWidth - c.clientWidth - f);
1015
- p <= ee && (s -= p);
1016
- } else u <= ee && (s += u);
1015
+ const d = i.ownerDocument, c = d.body, h = getComputedStyle(c), f = d.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, p = Math.abs(i.clientWidth - c.clientWidth - f);
1016
+ p <= ne && (s -= p);
1017
+ } else u <= ne && (s += u);
1017
1018
  return {
1018
1019
  width: s,
1019
1020
  height: r,
@@ -1021,9 +1022,9 @@ function zo(t, e) {
1021
1022
  y: l
1022
1023
  };
1023
1024
  }
1024
- const Fo = /* @__PURE__ */ new Set(["absolute", "fixed"]);
1025
- function Ko(t, e) {
1026
- const o = ft(t, !0, e === "fixed"), n = o.top + t.clientTop, i = o.left + t.clientLeft, s = J(t) ? ct(t) : Y(1), r = t.clientWidth * s.x, a = t.clientHeight * s.y, l = i * s.x, u = n * s.y;
1025
+ const ji = /* @__PURE__ */ new Set(["absolute", "fixed"]);
1026
+ function Wi(t, e) {
1027
+ const n = ft(t, !0, e === "fixed"), i = n.top + t.clientTop, o = n.left + t.clientLeft, s = J(t) ? ct(t) : Y(1), r = t.clientWidth * s.x, a = t.clientHeight * s.y, l = o * s.x, u = i * s.y;
1027
1028
  return {
1028
1029
  width: r,
1029
1030
  height: a,
@@ -1031,53 +1032,53 @@ function Ko(t, e) {
1031
1032
  y: u
1032
1033
  };
1033
1034
  }
1034
- function ne(t, e, o) {
1035
- let n;
1035
+ function ie(t, e, n) {
1036
+ let i;
1036
1037
  if (e === "viewport")
1037
- n = zo(t, o);
1038
+ i = Ni(t, n);
1038
1039
  else if (e === "document")
1039
- n = jo(Q(t));
1040
- else if (K(e))
1041
- n = Ko(e, o);
1040
+ i = Fi(Q(t));
1041
+ else if (W(e))
1042
+ i = Wi(e, n);
1042
1043
  else {
1043
- const i = Ie(t);
1044
- n = {
1045
- x: e.x - i.x,
1046
- y: e.y - i.y,
1044
+ const o = De(t);
1045
+ i = {
1046
+ x: e.x - o.x,
1047
+ y: e.y - o.y,
1047
1048
  width: e.width,
1048
1049
  height: e.height
1049
1050
  };
1050
1051
  }
1051
- return dt(n);
1052
- }
1053
- function Re(t, e) {
1054
- const o = it(t);
1055
- return o === e || !K(o) || ut(o) ? !1 : W(o).position === "fixed" || Re(o, e);
1052
+ return dt(i);
1056
1053
  }
1057
- function Wo(t, e) {
1058
- const o = e.get(t);
1059
- if (o)
1060
- return o;
1061
- let n = Se(t, []).filter((a) => K(a) && ht(a) !== "body"), i = null;
1062
- const s = W(t).position === "fixed";
1063
- let r = s ? it(t) : t;
1064
- for (; K(r) && !ut(r); ) {
1065
- const a = W(r), l = Nt(r);
1066
- !l && a.position === "fixed" && (i = null), (s ? !l && !i : !l && a.position === "static" && !!i && Fo.has(i.position) || wt(r) && !l && Re(t, r)) ? n = n.filter((d) => d !== r) : i = a, r = it(r);
1054
+ function Me(t, e) {
1055
+ const n = ot(t);
1056
+ return n === e || !W(n) || ut(n) ? !1 : K(n).position === "fixed" || Me(n, e);
1057
+ }
1058
+ function Ki(t, e) {
1059
+ const n = e.get(t);
1060
+ if (n)
1061
+ return n;
1062
+ let i = Le(t, []).filter((a) => W(a) && ht(a) !== "body"), o = null;
1063
+ const s = K(t).position === "fixed";
1064
+ let r = s ? ot(t) : t;
1065
+ for (; W(r) && !ut(r); ) {
1066
+ const a = K(r), l = Pt(r);
1067
+ !l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && ji.has(o.position) || wt(r) && !l && Me(t, r)) ? i = i.filter((d) => d !== r) : o = a, r = ot(r);
1067
1068
  }
1068
- return e.set(t, n), n;
1069
+ return e.set(t, i), i;
1069
1070
  }
1070
- function qo(t) {
1071
+ function qi(t) {
1071
1072
  let {
1072
1073
  element: e,
1073
- boundary: o,
1074
- rootBoundary: n,
1075
- strategy: i
1074
+ boundary: n,
1075
+ rootBoundary: i,
1076
+ strategy: o
1076
1077
  } = t;
1077
- const r = [...o === "clippingAncestors" ? _t(e) ? [] : Wo(e, this._c) : [].concat(o), n], a = r[0], l = r.reduce((u, d) => {
1078
- const c = ne(e, d, i);
1078
+ const r = [...n === "clippingAncestors" ? _t(e) ? [] : Ki(e, this._c) : [].concat(n), i], a = r[0], l = r.reduce((u, d) => {
1079
+ const c = ie(e, d, o);
1079
1080
  return u.top = R(c.top, u.top), u.right = G(c.right, u.right), u.bottom = G(c.bottom, u.bottom), u.left = R(c.left, u.left), u;
1080
- }, ne(e, a, i));
1081
+ }, ie(e, a, o));
1081
1082
  return {
1082
1083
  width: l.right - l.left,
1083
1084
  height: l.bottom - l.top,
@@ -1085,33 +1086,33 @@ function qo(t) {
1085
1086
  y: l.top
1086
1087
  };
1087
1088
  }
1088
- function Xo(t) {
1089
+ function Xi(t) {
1089
1090
  const {
1090
1091
  width: e,
1091
- height: o
1092
- } = Le(t);
1092
+ height: n
1093
+ } = Ae(t);
1093
1094
  return {
1094
1095
  width: e,
1095
- height: o
1096
+ height: n
1096
1097
  };
1097
1098
  }
1098
- function Yo(t, e, o) {
1099
- const n = J(e), i = Q(e), s = o === "fixed", r = ft(t, !0, s, e);
1099
+ function Yi(t, e, n) {
1100
+ const i = J(e), o = Q(e), s = n === "fixed", r = ft(t, !0, s, e);
1100
1101
  let a = {
1101
1102
  scrollLeft: 0,
1102
1103
  scrollTop: 0
1103
1104
  };
1104
1105
  const l = Y(0);
1105
1106
  function u() {
1106
- l.x = Ct(i);
1107
+ l.x = Ct(o);
1107
1108
  }
1108
- if (n || !n && !s)
1109
- if ((ht(e) !== "body" || wt(i)) && (a = kt(e)), n) {
1109
+ if (i || !i && !s)
1110
+ if ((ht(e) !== "body" || wt(o)) && (a = Ot(e)), i) {
1110
1111
  const f = ft(e, !0, s, e);
1111
1112
  l.x = f.x + e.clientLeft, l.y = f.y + e.clientTop;
1112
- } else i && u();
1113
- s && !n && i && u();
1114
- const d = i && !n && !s ? De(i, a) : Y(0), c = r.left + a.scrollLeft - l.x - d.x, h = r.top + a.scrollTop - l.y - d.y;
1113
+ } else o && u();
1114
+ s && !i && o && u();
1115
+ const d = o && !i && !s ? Re(o, a) : Y(0), c = r.left + a.scrollLeft - l.x - d.x, h = r.top + a.scrollTop - l.y - d.y;
1115
1116
  return {
1116
1117
  x: c,
1117
1118
  y: h,
@@ -1119,85 +1120,85 @@ function Yo(t, e, o) {
1119
1120
  height: r.height
1120
1121
  };
1121
1122
  }
1122
- function Et(t) {
1123
- return W(t).position === "static";
1123
+ function kt(t) {
1124
+ return K(t).position === "static";
1124
1125
  }
1125
1126
  function oe(t, e) {
1126
- if (!J(t) || W(t).position === "fixed")
1127
+ if (!J(t) || K(t).position === "fixed")
1127
1128
  return null;
1128
1129
  if (e)
1129
1130
  return e(t);
1130
- let o = t.offsetParent;
1131
- return Q(t) === o && (o = o.ownerDocument.body), o;
1131
+ let n = t.offsetParent;
1132
+ return Q(t) === n && (n = n.ownerDocument.body), n;
1132
1133
  }
1133
- function Me(t, e) {
1134
- const o = P(t);
1134
+ function He(t, e) {
1135
+ const n = U(t);
1135
1136
  if (_t(t))
1136
- return o;
1137
+ return n;
1137
1138
  if (!J(t)) {
1138
- let i = it(t);
1139
- for (; i && !ut(i); ) {
1140
- if (K(i) && !Et(i))
1141
- return i;
1142
- i = it(i);
1139
+ let o = ot(t);
1140
+ for (; o && !ut(o); ) {
1141
+ if (W(o) && !kt(o))
1142
+ return o;
1143
+ o = ot(o);
1143
1144
  }
1144
- return o;
1145
+ return n;
1145
1146
  }
1146
- let n = oe(t, e);
1147
- for (; n && Io(n) && Et(n); )
1148
- n = oe(n, e);
1149
- return n && ut(n) && Et(n) && !Nt(n) ? o : n || $o(t) || o;
1147
+ let i = oe(t, e);
1148
+ for (; i && Ii(i) && kt(i); )
1149
+ i = oe(i, e);
1150
+ return i && ut(i) && kt(i) && !Pt(i) ? n : i || Bi(t) || n;
1150
1151
  }
1151
- const Go = async function(t) {
1152
- const e = this.getOffsetParent || Me, o = this.getDimensions, n = await o(t.floating);
1152
+ const Gi = async function(t) {
1153
+ const e = this.getOffsetParent || He, n = this.getDimensions, i = await n(t.floating);
1153
1154
  return {
1154
- reference: Yo(t.reference, await e(t.floating), t.strategy),
1155
+ reference: Yi(t.reference, await e(t.floating), t.strategy),
1155
1156
  floating: {
1156
1157
  x: 0,
1157
1158
  y: 0,
1158
- width: n.width,
1159
- height: n.height
1159
+ width: i.width,
1160
+ height: i.height
1160
1161
  }
1161
1162
  };
1162
1163
  };
1163
- function Jo(t) {
1164
- return W(t).direction === "rtl";
1164
+ function Ji(t) {
1165
+ return K(t).direction === "rtl";
1165
1166
  }
1166
- const Zo = {
1167
- convertOffsetParentRelativeRectToViewportRelativeRect: Uo,
1167
+ const Zi = {
1168
+ convertOffsetParentRelativeRectToViewportRelativeRect: Vi,
1168
1169
  getDocumentElement: Q,
1169
- getClippingRect: qo,
1170
- getOffsetParent: Me,
1171
- getElementRects: Go,
1172
- getClientRects: Vo,
1173
- getDimensions: Xo,
1170
+ getClippingRect: qi,
1171
+ getOffsetParent: He,
1172
+ getElementRects: Gi,
1173
+ getClientRects: zi,
1174
+ getDimensions: Xi,
1174
1175
  getScale: ct,
1175
- isElement: K,
1176
- isRTL: Jo
1177
- }, Ut = Oo, He = bo, Vt = Eo, jt = vo, $e = So, Be = xo, Ne = yo, Pe = _o, zt = (t, e, o) => {
1178
- const n = /* @__PURE__ */ new Map(), i = {
1179
- platform: Zo,
1180
- ...o
1176
+ isElement: W,
1177
+ isRTL: Ji
1178
+ }, Vt = Ei, Be = bi, zt = ki, Ft = vi, $e = Si, Pe = xi, Ue = yi, Ve = _i, Nt = (t, e, n) => {
1179
+ const i = /* @__PURE__ */ new Map(), o = {
1180
+ platform: Zi,
1181
+ ...n
1181
1182
  }, s = {
1182
- ...i.platform,
1183
- _c: n
1183
+ ...o.platform,
1184
+ _c: i
1184
1185
  };
1185
- return go(t, e, {
1186
- ...i,
1186
+ return gi(t, e, {
1187
+ ...o,
1187
1188
  platform: s
1188
1189
  });
1189
1190
  };
1190
- function Qo(t, e) {
1191
- const o = Math.min(t.top, e.top), n = Math.max(t.bottom, e.bottom), i = Math.min(t.left, e.left), r = Math.max(t.right, e.right) - i, a = n - o, l = i, u = o;
1191
+ function Qi(t, e) {
1192
+ const n = Math.min(t.top, e.top), i = Math.max(t.bottom, e.bottom), o = Math.min(t.left, e.left), r = Math.max(t.right, e.right) - o, a = i - n, l = o, u = n;
1192
1193
  return new DOMRect(l, u, r, a);
1193
1194
  }
1194
- var ti = class {
1195
+ var to = class {
1195
1196
  constructor({
1196
1197
  editor: t,
1197
1198
  element: e,
1198
- view: o,
1199
- updateDelay: n = 250,
1200
- resizeDelay: i = 60,
1199
+ view: n,
1200
+ updateDelay: i = 250,
1201
+ resizeDelay: o = 60,
1201
1202
  shouldShow: s,
1202
1203
  appendTo: r,
1203
1204
  getReferencedVirtualElement: a,
@@ -1219,7 +1220,7 @@ var ti = class {
1219
1220
  onUpdate: void 0,
1220
1221
  onDestroy: void 0
1221
1222
  }, this.shouldShow = ({ view: d, state: c, from: h, to: f }) => {
1222
- const { doc: p, selection: m } = c, { empty: g } = m, y = !p.textBetween(h, f).length && qe(c.selection), b = this.element.contains(document.activeElement);
1223
+ const { doc: p, selection: m } = c, { empty: g } = m, y = !p.textBetween(h, f).length && Xe(c.selection), b = this.element.contains(document.activeElement);
1223
1224
  return !(!(d.hasFocus() || b) || g || y || !this.editor.isEditable);
1224
1225
  }, this.mousedownHandler = () => {
1225
1226
  this.preventHide = !0;
@@ -1261,50 +1262,50 @@ var ti = class {
1261
1262
  c === "updatePosition" ? this.updatePosition() : c && typeof c == "object" && c.type === "updateOptions" && this.updateOptions(c.options);
1262
1263
  };
1263
1264
  var u;
1264
- this.editor = t, this.element = e, this.view = o, this.updateDelay = n, this.resizeDelay = i, this.appendTo = r, this.scrollTarget = (u = l == null ? void 0 : l.scrollTarget) != null ? u : window, this.getReferencedVirtualElement = a, this.floatingUIOptions = {
1265
+ this.editor = t, this.element = e, this.view = n, this.updateDelay = i, this.resizeDelay = o, this.appendTo = r, this.scrollTarget = (u = l == null ? void 0 : l.scrollTarget) != null ? u : window, this.getReferencedVirtualElement = a, this.floatingUIOptions = {
1265
1266
  ...this.floatingUIOptions,
1266
1267
  ...l
1267
- }, this.element.tabIndex = 0, s && (this.shouldShow = s), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.addEventListener("dragstart", this.dragstartHandler), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.editor.on("transaction", this.transactionHandler), window.addEventListener("resize", this.resizeHandler), this.scrollTarget.addEventListener("scroll", this.resizeHandler), this.update(o, o.state), this.getShouldShow() && (this.show(), this.updatePosition());
1268
+ }, this.element.tabIndex = 0, s && (this.shouldShow = s), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.addEventListener("dragstart", this.dragstartHandler), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.editor.on("transaction", this.transactionHandler), window.addEventListener("resize", this.resizeHandler), this.scrollTarget.addEventListener("scroll", this.resizeHandler), this.update(n, n.state), this.getShouldShow() && (this.show(), this.updatePosition());
1268
1269
  }
1269
1270
  get middlewares() {
1270
1271
  const t = [];
1271
- return this.floatingUIOptions.flip && t.push(jt(typeof this.floatingUIOptions.flip != "boolean" ? this.floatingUIOptions.flip : void 0)), this.floatingUIOptions.shift && t.push(
1272
- Vt(typeof this.floatingUIOptions.shift != "boolean" ? this.floatingUIOptions.shift : void 0)
1272
+ return this.floatingUIOptions.flip && t.push(Ft(typeof this.floatingUIOptions.flip != "boolean" ? this.floatingUIOptions.flip : void 0)), this.floatingUIOptions.shift && t.push(
1273
+ zt(typeof this.floatingUIOptions.shift != "boolean" ? this.floatingUIOptions.shift : void 0)
1273
1274
  ), this.floatingUIOptions.offset && t.push(
1274
- Ut(typeof this.floatingUIOptions.offset != "boolean" ? this.floatingUIOptions.offset : void 0)
1275
- ), this.floatingUIOptions.arrow && t.push(Ne(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && t.push($e(typeof this.floatingUIOptions.size != "boolean" ? this.floatingUIOptions.size : void 0)), this.floatingUIOptions.autoPlacement && t.push(
1276
- He(
1275
+ Vt(typeof this.floatingUIOptions.offset != "boolean" ? this.floatingUIOptions.offset : void 0)
1276
+ ), this.floatingUIOptions.arrow && t.push(Ue(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && t.push($e(typeof this.floatingUIOptions.size != "boolean" ? this.floatingUIOptions.size : void 0)), this.floatingUIOptions.autoPlacement && t.push(
1277
+ Be(
1277
1278
  typeof this.floatingUIOptions.autoPlacement != "boolean" ? this.floatingUIOptions.autoPlacement : void 0
1278
1279
  )
1279
- ), this.floatingUIOptions.hide && t.push(Be(typeof this.floatingUIOptions.hide != "boolean" ? this.floatingUIOptions.hide : void 0)), this.floatingUIOptions.inline && t.push(
1280
- Pe(typeof this.floatingUIOptions.inline != "boolean" ? this.floatingUIOptions.inline : void 0)
1280
+ ), this.floatingUIOptions.hide && t.push(Pe(typeof this.floatingUIOptions.hide != "boolean" ? this.floatingUIOptions.hide : void 0)), this.floatingUIOptions.inline && t.push(
1281
+ Ve(typeof this.floatingUIOptions.inline != "boolean" ? this.floatingUIOptions.inline : void 0)
1281
1282
  ), t;
1282
1283
  }
1283
1284
  get virtualElement() {
1284
- var t, e, o;
1285
- const { selection: n } = this.editor.state, i = (t = this.getReferencedVirtualElement) == null ? void 0 : t.call(this);
1286
- if (i)
1287
- return i;
1288
- if (!((o = (e = this.view) == null ? void 0 : e.dom) != null && o.parentNode))
1285
+ var t, e, n;
1286
+ const { selection: i } = this.editor.state, o = (t = this.getReferencedVirtualElement) == null ? void 0 : t.call(this);
1287
+ if (o)
1288
+ return o;
1289
+ if (!((n = (e = this.view) == null ? void 0 : e.dom) != null && n.parentNode))
1289
1290
  return;
1290
- const s = ae(this.view, n.from, n.to);
1291
+ const s = le(this.view, i.from, i.to);
1291
1292
  let r = {
1292
1293
  getBoundingClientRect: () => s,
1293
1294
  getClientRects: () => [s]
1294
1295
  };
1295
- if (n instanceof sn) {
1296
- let a = this.view.nodeDOM(n.from);
1296
+ if (i instanceof rn) {
1297
+ let a = this.view.nodeDOM(i.from);
1297
1298
  const l = a.dataset.nodeViewWrapper ? a : a.querySelector("[data-node-view-wrapper]");
1298
1299
  l && (a = l), a && (r = {
1299
1300
  getBoundingClientRect: () => a.getBoundingClientRect(),
1300
1301
  getClientRects: () => [a.getBoundingClientRect()]
1301
1302
  });
1302
1303
  }
1303
- if (n instanceof rn) {
1304
- const { $anchorCell: a, $headCell: l } = n, u = a ? a.pos : l.pos, d = l ? l.pos : a.pos, c = this.view.nodeDOM(u), h = this.view.nodeDOM(d);
1304
+ if (i instanceof an) {
1305
+ const { $anchorCell: a, $headCell: l } = i, u = a ? a.pos : l.pos, d = l ? l.pos : a.pos, c = this.view.nodeDOM(u), h = this.view.nodeDOM(d);
1305
1306
  if (!c || !h)
1306
1307
  return;
1307
- const f = c === h ? c.getBoundingClientRect() : Qo(
1308
+ const f = c === h ? c.getBoundingClientRect() : Qi(
1308
1309
  c.getBoundingClientRect(),
1309
1310
  h.getBoundingClientRect()
1310
1311
  );
@@ -1317,36 +1318,36 @@ var ti = class {
1317
1318
  }
1318
1319
  updatePosition() {
1319
1320
  const t = this.virtualElement;
1320
- t && zt(t, this.element, {
1321
+ t && Nt(t, this.element, {
1321
1322
  placement: this.floatingUIOptions.placement,
1322
1323
  strategy: this.floatingUIOptions.strategy,
1323
1324
  middleware: this.middlewares
1324
- }).then(({ x: e, y: o, strategy: n, middlewareData: i }) => {
1325
+ }).then(({ x: e, y: n, strategy: i, middlewareData: o }) => {
1325
1326
  var s, r;
1326
- if ((s = i.hide) != null && s.referenceHidden || (r = i.hide) != null && r.escaped) {
1327
+ if ((s = o.hide) != null && s.referenceHidden || (r = o.hide) != null && r.escaped) {
1327
1328
  this.element.style.visibility = "hidden";
1328
1329
  return;
1329
1330
  }
1330
- this.element.style.visibility = "visible", this.element.style.width = "max-content", this.element.style.position = n, this.element.style.left = `${e}px`, this.element.style.top = `${o}px`, this.isVisible && this.floatingUIOptions.onUpdate && this.floatingUIOptions.onUpdate();
1331
+ this.element.style.visibility = "visible", this.element.style.width = "max-content", this.element.style.position = i, this.element.style.left = `${e}px`, this.element.style.top = `${n}px`, this.isVisible && this.floatingUIOptions.onUpdate && this.floatingUIOptions.onUpdate();
1331
1332
  });
1332
1333
  }
1333
1334
  update(t, e) {
1334
- const { state: o } = t, n = o.selection.from !== o.selection.to;
1335
- if (this.updateDelay > 0 && n) {
1335
+ const { state: n } = t, i = n.selection.from !== n.selection.to;
1336
+ if (this.updateDelay > 0 && i) {
1336
1337
  this.handleDebouncedUpdate(t, e);
1337
1338
  return;
1338
1339
  }
1339
- const i = !(e != null && e.selection.eq(t.state.selection)), s = !(e != null && e.doc.eq(t.state.doc));
1340
- this.updateHandler(t, i, s, e);
1340
+ const o = !(e != null && e.selection.eq(t.state.selection)), s = !(e != null && e.doc.eq(t.state.doc));
1341
+ this.updateHandler(t, o, s, e);
1341
1342
  }
1342
1343
  getShouldShow(t) {
1343
1344
  var e;
1344
- const { state: o } = this.view, { selection: n } = o, { ranges: i } = n, s = Math.min(...i.map((l) => l.$from.pos)), r = Math.max(...i.map((l) => l.$to.pos));
1345
+ const { state: n } = this.view, { selection: i } = n, { ranges: o } = i, s = Math.min(...o.map((l) => l.$from.pos)), r = Math.max(...o.map((l) => l.$to.pos));
1345
1346
  return ((e = this.shouldShow) == null ? void 0 : e.call(this, {
1346
1347
  editor: this.editor,
1347
1348
  element: this.element,
1348
1349
  view: this.view,
1349
- state: o,
1350
+ state: n,
1350
1351
  oldState: t,
1351
1352
  from: s,
1352
1353
  to: r
@@ -1366,8 +1367,8 @@ var ti = class {
1366
1367
  updateOptions(t) {
1367
1368
  var e;
1368
1369
  if (t.updateDelay !== void 0 && (this.updateDelay = t.updateDelay), t.resizeDelay !== void 0 && (this.resizeDelay = t.resizeDelay), t.appendTo !== void 0 && (this.appendTo = t.appendTo), t.getReferencedVirtualElement !== void 0 && (this.getReferencedVirtualElement = t.getReferencedVirtualElement), t.shouldShow !== void 0 && t.shouldShow && (this.shouldShow = t.shouldShow), t.options !== void 0) {
1369
- const o = (e = t.options.scrollTarget) != null ? e : window;
1370
- o !== this.scrollTarget && (this.scrollTarget.removeEventListener("scroll", this.resizeHandler), this.scrollTarget = o, this.scrollTarget.addEventListener("scroll", this.resizeHandler)), this.floatingUIOptions = {
1370
+ const n = (e = t.options.scrollTarget) != null ? e : window;
1371
+ n !== this.scrollTarget && (this.scrollTarget.removeEventListener("scroll", this.resizeHandler), this.scrollTarget = n, this.scrollTarget.addEventListener("scroll", this.resizeHandler)), this.floatingUIOptions = {
1371
1372
  ...this.floatingUIOptions,
1372
1373
  ...t.options
1373
1374
  };
@@ -1376,10 +1377,10 @@ var ti = class {
1376
1377
  destroy() {
1377
1378
  this.hide(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.removeEventListener("dragstart", this.dragstartHandler), window.removeEventListener("resize", this.resizeHandler), this.scrollTarget.removeEventListener("scroll", this.resizeHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler), this.editor.off("transaction", this.transactionHandler), this.floatingUIOptions.onDestroy && this.floatingUIOptions.onDestroy();
1378
1379
  }
1379
- }, ei = (t) => new It({
1380
+ }, eo = (t) => new It({
1380
1381
  key: typeof t.pluginKey == "string" ? new at(t.pluginKey) : t.pluginKey,
1381
- view: (e) => new ti({ view: e, ...t })
1382
- }), ni = ce({
1382
+ view: (e) => new to({ view: e, ...t })
1383
+ }), no = de({
1383
1384
  name: "BubbleMenu",
1384
1385
  inheritAttrs: !1,
1385
1386
  props: {
@@ -1416,11 +1417,11 @@ var ti = class {
1416
1417
  default: void 0
1417
1418
  }
1418
1419
  },
1419
- setup(t, { slots: e, attrs: o }) {
1420
- const n = de(null);
1421
- return ue(() => {
1420
+ setup(t, { slots: e, attrs: n }) {
1421
+ const i = ue(null);
1422
+ return he(() => {
1422
1423
  const {
1423
- editor: i,
1424
+ editor: o,
1424
1425
  options: s,
1425
1426
  pluginKey: r,
1426
1427
  resizeDelay: a,
@@ -1428,11 +1429,11 @@ var ti = class {
1428
1429
  shouldShow: u,
1429
1430
  getReferencedVirtualElement: d,
1430
1431
  updateDelay: c
1431
- } = t, h = n.value;
1432
- h && (h.style.visibility = "hidden", h.style.position = "absolute", h.remove(), an(() => {
1433
- i.registerPlugin(
1434
- ei({
1435
- editor: i,
1432
+ } = t, h = i.value;
1433
+ h && (h.style.visibility = "hidden", h.style.position = "absolute", h.remove(), ln(() => {
1434
+ o.registerPlugin(
1435
+ eo({
1436
+ editor: o,
1436
1437
  element: h,
1437
1438
  options: s,
1438
1439
  pluginKey: r,
@@ -1444,21 +1445,21 @@ var ti = class {
1444
1445
  })
1445
1446
  );
1446
1447
  }));
1447
- }), he(() => {
1448
- const { pluginKey: i, editor: s } = t;
1449
- s.unregisterPlugin(i);
1448
+ }), fe(() => {
1449
+ const { pluginKey: o, editor: s } = t;
1450
+ s.unregisterPlugin(o);
1450
1451
  }), () => {
1451
- var i;
1452
- return fe("div", { ref: n, ...o }, (i = e.default) == null ? void 0 : i.call(e));
1452
+ var o;
1453
+ return pe("div", { ref: i, ...n }, (o = e.default) == null ? void 0 : o.call(e));
1453
1454
  };
1454
1455
  }
1455
- }), oi = class {
1456
+ }), io = class {
1456
1457
  constructor({
1457
1458
  editor: t,
1458
1459
  element: e,
1459
- view: o,
1460
- updateDelay: n = 250,
1461
- resizeDelay: i = 60,
1460
+ view: n,
1461
+ updateDelay: i = 250,
1462
+ resizeDelay: o = 60,
1462
1463
  options: s,
1463
1464
  appendTo: r,
1464
1465
  shouldShow: a
@@ -1506,35 +1507,35 @@ var ti = class {
1506
1507
  }, this.resizeDelay);
1507
1508
  };
1508
1509
  var l;
1509
- this.editor = t, this.element = e, this.view = o, this.updateDelay = n, this.resizeDelay = i, this.appendTo = r, this.scrollTarget = (l = s == null ? void 0 : s.scrollTarget) != null ? l : window, this.floatingUIOptions = {
1510
+ this.editor = t, this.element = e, this.view = n, this.updateDelay = i, this.resizeDelay = o, this.appendTo = r, this.scrollTarget = (l = s == null ? void 0 : s.scrollTarget) != null ? l : window, this.floatingUIOptions = {
1510
1511
  ...this.floatingUIOptions,
1511
1512
  ...s
1512
- }, this.element.tabIndex = 0, a && (this.shouldShow = a), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.editor.on("transaction", this.transactionHandler), window.addEventListener("resize", this.resizeHandler), this.scrollTarget.addEventListener("scroll", this.resizeHandler), this.update(o, o.state), this.getShouldShow() && (this.show(), this.updatePosition());
1513
+ }, this.element.tabIndex = 0, a && (this.shouldShow = a), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.editor.on("transaction", this.transactionHandler), window.addEventListener("resize", this.resizeHandler), this.scrollTarget.addEventListener("scroll", this.resizeHandler), this.update(n, n.state), this.getShouldShow() && (this.show(), this.updatePosition());
1513
1514
  }
1514
1515
  getTextContent(t) {
1515
- return Xe(t, { textSerializers: Ye(this.editor.schema) });
1516
+ return Ye(t, { textSerializers: Ge(this.editor.schema) });
1516
1517
  }
1517
1518
  get middlewares() {
1518
1519
  const t = [];
1519
- return this.floatingUIOptions.flip && t.push(jt(typeof this.floatingUIOptions.flip != "boolean" ? this.floatingUIOptions.flip : void 0)), this.floatingUIOptions.shift && t.push(
1520
- Vt(typeof this.floatingUIOptions.shift != "boolean" ? this.floatingUIOptions.shift : void 0)
1520
+ return this.floatingUIOptions.flip && t.push(Ft(typeof this.floatingUIOptions.flip != "boolean" ? this.floatingUIOptions.flip : void 0)), this.floatingUIOptions.shift && t.push(
1521
+ zt(typeof this.floatingUIOptions.shift != "boolean" ? this.floatingUIOptions.shift : void 0)
1521
1522
  ), this.floatingUIOptions.offset && t.push(
1522
- Ut(typeof this.floatingUIOptions.offset != "boolean" ? this.floatingUIOptions.offset : void 0)
1523
- ), this.floatingUIOptions.arrow && t.push(Ne(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && t.push($e(typeof this.floatingUIOptions.size != "boolean" ? this.floatingUIOptions.size : void 0)), this.floatingUIOptions.autoPlacement && t.push(
1524
- He(
1523
+ Vt(typeof this.floatingUIOptions.offset != "boolean" ? this.floatingUIOptions.offset : void 0)
1524
+ ), this.floatingUIOptions.arrow && t.push(Ue(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && t.push($e(typeof this.floatingUIOptions.size != "boolean" ? this.floatingUIOptions.size : void 0)), this.floatingUIOptions.autoPlacement && t.push(
1525
+ Be(
1525
1526
  typeof this.floatingUIOptions.autoPlacement != "boolean" ? this.floatingUIOptions.autoPlacement : void 0
1526
1527
  )
1527
- ), this.floatingUIOptions.hide && t.push(Be(typeof this.floatingUIOptions.hide != "boolean" ? this.floatingUIOptions.hide : void 0)), this.floatingUIOptions.inline && t.push(
1528
- Pe(typeof this.floatingUIOptions.inline != "boolean" ? this.floatingUIOptions.inline : void 0)
1528
+ ), this.floatingUIOptions.hide && t.push(Pe(typeof this.floatingUIOptions.hide != "boolean" ? this.floatingUIOptions.hide : void 0)), this.floatingUIOptions.inline && t.push(
1529
+ Ve(typeof this.floatingUIOptions.inline != "boolean" ? this.floatingUIOptions.inline : void 0)
1529
1530
  ), t;
1530
1531
  }
1531
1532
  getShouldShow(t) {
1532
1533
  var e;
1533
- const { state: o } = this.view, { selection: n } = o, { ranges: i } = n, s = Math.min(...i.map((l) => l.$from.pos)), r = Math.max(...i.map((l) => l.$to.pos));
1534
+ const { state: n } = this.view, { selection: i } = n, { ranges: o } = i, s = Math.min(...o.map((l) => l.$from.pos)), r = Math.max(...o.map((l) => l.$to.pos));
1534
1535
  return (e = this.shouldShow) == null ? void 0 : e.call(this, {
1535
1536
  editor: this.editor,
1536
1537
  view: this.view,
1537
- state: o,
1538
+ state: n,
1538
1539
  oldState: t,
1539
1540
  from: s,
1540
1541
  to: r
@@ -1543,34 +1544,34 @@ var ti = class {
1543
1544
  updateOptions(t) {
1544
1545
  var e;
1545
1546
  if (t.updateDelay !== void 0 && (this.updateDelay = t.updateDelay), t.resizeDelay !== void 0 && (this.resizeDelay = t.resizeDelay), t.appendTo !== void 0 && (this.appendTo = t.appendTo), t.shouldShow !== void 0 && t.shouldShow && (this.shouldShow = t.shouldShow), t.options !== void 0) {
1546
- const o = (e = t.options.scrollTarget) != null ? e : window;
1547
- o !== this.scrollTarget && (this.scrollTarget.removeEventListener("scroll", this.resizeHandler), this.scrollTarget = o, this.scrollTarget.addEventListener("scroll", this.resizeHandler)), this.floatingUIOptions = {
1547
+ const n = (e = t.options.scrollTarget) != null ? e : window;
1548
+ n !== this.scrollTarget && (this.scrollTarget.removeEventListener("scroll", this.resizeHandler), this.scrollTarget = n, this.scrollTarget.addEventListener("scroll", this.resizeHandler)), this.floatingUIOptions = {
1548
1549
  ...this.floatingUIOptions,
1549
1550
  ...t.options
1550
1551
  };
1551
1552
  }
1552
1553
  }
1553
1554
  updatePosition() {
1554
- const { selection: t } = this.editor.state, e = ae(this.view, t.from, t.to);
1555
- zt({
1555
+ const { selection: t } = this.editor.state, e = le(this.view, t.from, t.to);
1556
+ Nt({
1556
1557
  getBoundingClientRect: () => e,
1557
1558
  getClientRects: () => [e]
1558
1559
  }, this.element, {
1559
1560
  placement: this.floatingUIOptions.placement,
1560
1561
  strategy: this.floatingUIOptions.strategy,
1561
1562
  middleware: this.middlewares
1562
- }).then(({ x: n, y: i, strategy: s, middlewareData: r }) => {
1563
+ }).then(({ x: i, y: o, strategy: s, middlewareData: r }) => {
1563
1564
  var a, l;
1564
1565
  if ((a = r.hide) != null && a.referenceHidden || (l = r.hide) != null && l.escaped) {
1565
1566
  this.element.style.visibility = "hidden";
1566
1567
  return;
1567
1568
  }
1568
- this.element.style.visibility = "visible", this.element.style.width = "max-content", this.element.style.position = s, this.element.style.left = `${n}px`, this.element.style.top = `${i}px`, this.isVisible && this.floatingUIOptions.onUpdate && this.floatingUIOptions.onUpdate();
1569
+ this.element.style.visibility = "visible", this.element.style.width = "max-content", this.element.style.position = s, this.element.style.left = `${i}px`, this.element.style.top = `${o}px`, this.isVisible && this.floatingUIOptions.onUpdate && this.floatingUIOptions.onUpdate();
1569
1570
  });
1570
1571
  }
1571
1572
  update(t, e) {
1572
- const o = !(e != null && e.selection.eq(t.state.selection)), n = !(e != null && e.doc.eq(t.state.doc));
1573
- this.updateHandler(t, o, n, e);
1573
+ const n = !(e != null && e.selection.eq(t.state.selection)), i = !(e != null && e.doc.eq(t.state.doc));
1574
+ this.updateHandler(t, n, i, e);
1574
1575
  }
1575
1576
  show() {
1576
1577
  var t;
@@ -1586,11 +1587,11 @@ var ti = class {
1586
1587
  destroy() {
1587
1588
  this.hide(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), window.removeEventListener("resize", this.resizeHandler), this.scrollTarget.removeEventListener("scroll", this.resizeHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler), this.editor.off("transaction", this.transactionHandler), this.floatingUIOptions.onDestroy && this.floatingUIOptions.onDestroy();
1588
1589
  }
1589
- }, ii = (t) => new It({
1590
+ }, oo = (t) => new It({
1590
1591
  key: typeof t.pluginKey == "string" ? new at(t.pluginKey) : t.pluginKey,
1591
- view: (e) => new oi({ view: e, ...t })
1592
+ view: (e) => new io({ view: e, ...t })
1592
1593
  });
1593
- ce({
1594
+ de({
1594
1595
  name: "FloatingMenu",
1595
1596
  inheritAttrs: !1,
1596
1597
  props: {
@@ -1625,13 +1626,13 @@ ce({
1625
1626
  default: null
1626
1627
  }
1627
1628
  },
1628
- setup(t, { slots: e, attrs: o }) {
1629
- const n = de(null);
1630
- return ue(() => {
1631
- const { pluginKey: i, editor: s, updateDelay: r, resizeDelay: a, options: l, appendTo: u, shouldShow: d } = t, c = n.value;
1629
+ setup(t, { slots: e, attrs: n }) {
1630
+ const i = ue(null);
1631
+ return he(() => {
1632
+ const { pluginKey: o, editor: s, updateDelay: r, resizeDelay: a, options: l, appendTo: u, shouldShow: d } = t, c = i.value;
1632
1633
  c && (c.style.visibility = "hidden", c.style.position = "absolute", c.remove(), s.registerPlugin(
1633
- ii({
1634
- pluginKey: i,
1634
+ oo({
1635
+ pluginKey: o,
1635
1636
  editor: s,
1636
1637
  element: c,
1637
1638
  updateDelay: r,
@@ -1641,69 +1642,69 @@ ce({
1641
1642
  shouldShow: d
1642
1643
  })
1643
1644
  ));
1644
- }), he(() => {
1645
- const { pluginKey: i, editor: s } = t;
1646
- s.unregisterPlugin(i);
1645
+ }), fe(() => {
1646
+ const { pluginKey: o, editor: s } = t;
1647
+ s.unregisterPlugin(o);
1647
1648
  }), () => {
1648
- var i;
1649
- return fe("div", { ref: n, ...o }, (i = e.default) == null ? void 0 : i.call(e));
1649
+ var o;
1650
+ return pe("div", { ref: i, ...n }, (o = e.default) == null ? void 0 : o.call(e));
1650
1651
  };
1651
1652
  }
1652
1653
  });
1653
- const ot = (t) => ({
1654
+ const it = (t) => ({
1654
1655
  default: null,
1655
1656
  parseHTML: (e) => e.getAttribute(t),
1656
1657
  renderHTML: (e) => e[t] ? { [t]: e[t] } : {}
1657
- }), si = () => {
1658
- let t = ot("style");
1659
- return t.renderHTML = (e) => e.style ? { style: ri(e.style) } : {}, t;
1658
+ }), so = () => {
1659
+ let t = it("style");
1660
+ return t.renderHTML = (e) => e.style ? { style: ro(e.style) } : {}, t;
1660
1661
  };
1661
- function ri(t) {
1662
- return t.replace(new RegExp("(?<![a-z-])width\\s*:\\s*([^;]+);?", "gi"), (e, o) => /^\s*0\s*[a-z%]*\s*(!important)?\s*$/i.test(o) ? "width: 100%;" : e);
1662
+ function ro(t) {
1663
+ return t.replace(new RegExp("(?<![a-z-])width\\s*:\\s*([^;]+);?", "gi"), (e, n) => /^\s*0\s*[a-z%]*\s*(!important)?\s*$/i.test(n) ? "width: 100%;" : e);
1663
1664
  }
1664
- const ai = Rn.extend({
1665
+ const ao = Mn.extend({
1665
1666
  addAttributes() {
1666
1667
  var t;
1667
1668
  return {
1668
1669
  ...(t = this.parent) == null ? void 0 : t.call(this),
1669
- border: ot("border"),
1670
- cellpadding: ot("cellpadding"),
1671
- cellspacing: ot("cellspacing"),
1672
- style: si()
1670
+ border: it("border"),
1671
+ cellpadding: it("cellpadding"),
1672
+ cellspacing: it("cellspacing"),
1673
+ style: so()
1673
1674
  };
1674
1675
  },
1675
1676
  renderHTML({ HTMLAttributes: t }) {
1676
1677
  return ["table", st(this.options.HTMLAttributes, t), ["tbody", 0]];
1677
1678
  }
1678
- }), li = Mn.extend({
1679
+ }), lo = Hn.extend({
1679
1680
  addAttributes() {
1680
1681
  var t;
1681
1682
  return {
1682
1683
  ...(t = this.parent) == null ? void 0 : t.call(this),
1683
- style: ot("style")
1684
+ style: it("style")
1684
1685
  };
1685
1686
  }
1686
- }), Ue = {
1687
- style: ot("style"),
1688
- valign: ot("valign"),
1689
- width: ot("width")
1690
- }, ci = $n.extend({
1687
+ }), ze = {
1688
+ style: it("style"),
1689
+ valign: it("valign"),
1690
+ width: it("width")
1691
+ }, co = $n.extend({
1691
1692
  addAttributes() {
1692
1693
  var t;
1693
1694
  return {
1694
1695
  ...(t = this.parent) == null ? void 0 : t.call(this),
1695
- ...Ue
1696
+ ...ze
1696
1697
  };
1697
1698
  }
1698
- }), di = Hn.extend({
1699
+ }), uo = Bn.extend({
1699
1700
  addAttributes() {
1700
1701
  var t;
1701
1702
  return {
1702
1703
  ...(t = this.parent) == null ? void 0 : t.call(this),
1703
- ...Ue
1704
+ ...ze
1704
1705
  };
1705
1706
  }
1706
- }), ui = Bn.extend({
1707
+ }), ho = Pn.extend({
1707
1708
  parseHTML() {
1708
1709
  var t;
1709
1710
  return [
@@ -1720,16 +1721,16 @@ const ai = Rn.extend({
1720
1721
  }
1721
1722
  ];
1722
1723
  }
1723
- }), hi = {
1724
+ }), fo = {
1724
1725
  compatConfig: { MODE: 3 },
1725
1726
  name: "EmojiComponent",
1726
1727
  components: {
1727
1728
  NodeViewWrapper: mt,
1728
- DtEmoji: we
1729
+ DtEmoji: be
1729
1730
  },
1730
1731
  props: pt
1731
1732
  };
1732
- function fi(t, e, o, n, i, s) {
1733
+ function po(t, e, n, i, o, s) {
1733
1734
  const r = T("dt-emoji"), a = T("node-view-wrapper");
1734
1735
  return _(), A(a, { class: "d-d-inline-block d-va-bottom d-lh0" }, {
1735
1736
  default: C(() => [
@@ -1741,11 +1742,11 @@ function fi(t, e, o, n, i, s) {
1741
1742
  _: 1
1742
1743
  });
1743
1744
  }
1744
- const pi = /* @__PURE__ */ q(hi, [["render", fi]]), mi = {
1745
+ const mo = /* @__PURE__ */ q(fo, [["render", po]]), go = {
1745
1746
  compatConfig: { MODE: 3 },
1746
1747
  name: "SuggestionList",
1747
1748
  components: {
1748
- DtListItem: Fn
1749
+ DtListItem: Wn
1749
1750
  },
1750
1751
  props: {
1751
1752
  items: {
@@ -1814,36 +1815,36 @@ const pi = /* @__PURE__ */ q(hi, [["render", fi]]), mi = {
1814
1815
  }
1815
1816
  }
1816
1817
  }
1817
- }, gi = { class: "d-popover__dialog d-suggestion-list__container" }, yi = {
1818
+ }, yo = { class: "d-popover__dialog d-suggestion-list__container" }, wo = {
1818
1819
  ref: "suggestionList",
1819
1820
  class: "d-suggestion-list"
1820
1821
  };
1821
- function wi(t, e, o, n, i, s) {
1822
+ function bo(t, e, n, i, o, s) {
1822
1823
  const r = T("dt-list-item");
1823
- return _(), et("div", gi, [
1824
- ln(nt("ul", yi, [
1825
- (_(!0), et(cn, null, dn(o.items, (a, l) => (_(), A(r, {
1824
+ return _(), et("div", yo, [
1825
+ cn(nt("ul", wo, [
1826
+ (_(!0), et(dn, null, un(n.items, (a, l) => (_(), A(r, {
1826
1827
  key: a.id,
1827
- class: pe([
1828
+ class: me([
1828
1829
  "d-suggestion-list__item",
1829
- { "d-list-item--highlighted": l === i.selectedIndex }
1830
+ { "d-list-item--highlighted": l === o.selectedIndex }
1830
1831
  ]),
1831
1832
  "navigation-type": "arrow-keys",
1832
1833
  onClick: (u) => s.selectItem(l),
1833
1834
  onKeydown: Dt(s.onKeyDown, ["prevent"])
1834
1835
  }, {
1835
1836
  default: C(() => [
1836
- (_(), A(un(o.itemComponent), { item: a }, null, 8, ["item"]))
1837
+ (_(), A(hn(n.itemComponent), { item: a }, null, 8, ["item"]))
1837
1838
  ]),
1838
1839
  _: 2
1839
1840
  }, 1032, ["class", "onClick", "onKeydown"]))), 128))
1840
1841
  ], 512), [
1841
- [hn, o.items.length]
1842
+ [fn, n.items.length]
1842
1843
  ])
1843
1844
  ]);
1844
1845
  }
1845
- const bi = /* @__PURE__ */ q(mi, [["render", wi]]), Ve = "top-start", je = "650";
1846
- function vi() {
1846
+ const vo = /* @__PURE__ */ q(go, [["render", bo]]), Fe = "top-start", Ne = "650";
1847
+ function xo() {
1847
1848
  return {
1848
1849
  getBoundingClientRect: () => ({
1849
1850
  width: 0,
@@ -1857,81 +1858,81 @@ function vi() {
1857
1858
  })
1858
1859
  };
1859
1860
  }
1860
- function ie(t) {
1861
+ function se(t) {
1861
1862
  return { getBoundingClientRect: t };
1862
1863
  }
1863
- async function xi(t, e, o = {}) {
1864
+ async function To(t, e, n = {}) {
1864
1865
  if (!t || !(e != null && e.getBoundingClientRect)) return;
1865
1866
  const {
1866
- placement: n = Ve,
1867
- middleware: i = [Ut(0), jt(), Vt({ padding: 8 })]
1868
- } = o, { x: s, y: r } = await zt(e, t, {
1869
- placement: n,
1870
- middleware: i
1867
+ placement: i = Fe,
1868
+ middleware: o = [Vt(0), Ft(), zt({ padding: 8 })]
1869
+ } = n, { x: s, y: r } = await Nt(e, t, {
1870
+ placement: i,
1871
+ middleware: o
1871
1872
  });
1872
1873
  Object.assign(t.style, {
1873
1874
  left: `${s}px`,
1874
1875
  top: `${r}px`
1875
1876
  });
1876
1877
  }
1877
- function Ti(t, e = {}) {
1878
- const { zIndex: o = je } = e;
1879
- t.style.position = "absolute", t.style.zIndex = o, t.style.display = "none";
1878
+ function _o(t, e = {}) {
1879
+ const { zIndex: n = Ne } = e;
1880
+ t.style.position = "absolute", t.style.zIndex = n, t.style.display = "none";
1880
1881
  }
1881
- function _i(t) {
1882
+ function Oo(t) {
1882
1883
  t && (t.style.display = "block");
1883
1884
  }
1884
- function ki(t) {
1885
+ function Co(t) {
1885
1886
  t && (t.style.display = "none");
1886
1887
  }
1887
- function Ci(t, e) {
1888
- return (o) => {
1889
- o.key === "Escape" && e() && t();
1888
+ function Eo(t, e) {
1889
+ return (n) => {
1890
+ n.key === "Escape" && e() && t();
1890
1891
  };
1891
1892
  }
1892
- function Oi(t) {
1893
+ function ko(t) {
1893
1894
  document.addEventListener("keydown", t);
1894
1895
  }
1895
- function Ei(t) {
1896
+ function So(t) {
1896
1897
  document.removeEventListener("keydown", t);
1897
1898
  }
1898
- function Si(t, e, o, n) {
1899
- return new Fe(t, {
1899
+ function Lo(t, e, n, i) {
1900
+ return new We(t, {
1900
1901
  props: {
1901
- itemComponent: fn(e),
1902
- itemType: o,
1903
- ...n
1902
+ itemComponent: pn(e),
1903
+ itemType: n,
1904
+ ...i
1904
1905
  },
1905
- editor: n.editor
1906
+ editor: i.editor
1906
1907
  });
1907
1908
  }
1908
- function Li(t) {
1909
- var e, o;
1910
- t.escHandler && Ei(t.escHandler), (e = t.floatingEl) == null || e.remove(), (o = t.component) == null || o.destroy();
1909
+ function Ao(t) {
1910
+ var e, n;
1911
+ t.escHandler && So(t.escHandler), (e = t.floatingEl) == null || e.remove(), (n = t.component) == null || n.destroy();
1911
1912
  }
1912
- function Ot(t, e, o = {}) {
1913
+ function Et(t, e, n = {}) {
1913
1914
  const {
1914
- listComponent: n = bi,
1915
- placement: i = Ve,
1916
- zIndex: s = je
1917
- } = o;
1915
+ listComponent: i = vo,
1916
+ placement: o = Fe,
1917
+ zIndex: s = Ne
1918
+ } = n;
1918
1919
  return () => {
1919
- let r = null, a = null, l = !1, u = vi(), d = null;
1920
+ let r = null, a = null, l = !1, u = xo(), d = null;
1920
1921
  function c() {
1921
- xi(a, u, { placement: i });
1922
+ To(a, u, { placement: o });
1922
1923
  }
1923
1924
  function h() {
1924
- a && (_i(a), l = !0, c());
1925
+ a && (Oo(a), l = !0, c());
1925
1926
  }
1926
1927
  function f() {
1927
- a && (ki(a), l = !1);
1928
+ a && (Co(a), l = !1);
1928
1929
  }
1929
1930
  return {
1930
1931
  onStart: (p) => {
1931
- r = Si(n, t, e, p), p.clientRect && (a = r.element, Ti(a, { zIndex: s }), document.body.appendChild(a), u = ie(p.clientRect), d = Ci(f, () => l), Oi(d), p.items.length > 0 && h());
1932
+ r = Lo(i, t, e, p), p.clientRect && (a = r.element, _o(a, { zIndex: s }), document.body.appendChild(a), u = se(p.clientRect), d = Eo(f, () => l), ko(d), p.items.length > 0 && h());
1932
1933
  },
1933
1934
  onUpdate(p) {
1934
- r == null || r.updateProps(p), p.items.length > 0 ? h() : f(), p.clientRect && (u = ie(p.clientRect), c());
1935
+ r == null || r.updateProps(p), p.items.length > 0 ? h() : f(), p.clientRect && (u = se(p.clientRect), c());
1935
1936
  },
1936
1937
  onKeyDown(p) {
1937
1938
  var m;
@@ -1939,16 +1940,16 @@ function Ot(t, e, o = {}) {
1939
1940
  return (m = r == null ? void 0 : r.ref) == null ? void 0 : m.onKeyDown(p);
1940
1941
  },
1941
1942
  onExit() {
1942
- Li({ escHandler: d, floatingEl: a, component: r }), d = null, a = null, r = null;
1943
+ Ao({ escHandler: d, floatingEl: a, component: r }), d = null, a = null, r = null;
1943
1944
  }
1944
1945
  };
1945
1946
  };
1946
1947
  }
1947
- const Ai = {
1948
+ const Io = {
1948
1949
  compatConfig: { MODE: 3 },
1949
1950
  name: "EmojiSuggestion",
1950
1951
  components: {
1951
- DtEmoji: we,
1952
+ DtEmoji: be,
1952
1953
  DtStack: yt
1953
1954
  },
1954
1955
  props: {
@@ -1958,7 +1959,7 @@ const Ai = {
1958
1959
  }
1959
1960
  }
1960
1961
  };
1961
- function Ii(t, e, o, n, i, s) {
1962
+ function Do(t, e, n, i, o, s) {
1962
1963
  const r = T("dt-emoji"), a = T("dt-stack");
1963
1964
  return _(), A(a, {
1964
1965
  direction: "row",
@@ -1967,52 +1968,52 @@ function Ii(t, e, o, n, i, s) {
1967
1968
  default: C(() => [
1968
1969
  M(r, {
1969
1970
  size: "200",
1970
- code: o.item.code
1971
+ code: n.item.code
1971
1972
  }, null, 8, ["code"]),
1972
- lt(" " + $(o.item.code), 1)
1973
+ lt(" " + B(n.item.code), 1)
1973
1974
  ]),
1974
1975
  _: 1
1975
1976
  });
1976
1977
  }
1977
- const Di = /* @__PURE__ */ q(Ai, [["render", Ii]]), Ri = 20, Mi = (t, e, o) => {
1978
+ const Ro = /* @__PURE__ */ q(Io, [["render", Do]]), Mo = 20, Ho = (t, e, n) => {
1978
1979
  var a, l;
1979
- const n = (a = t.shortname) == null ? void 0 : a.replaceAll(":", ""), i = (l = e.shortname) == null ? void 0 : l.replaceAll(":", ""), s = n.startsWith(o), r = i.startsWith(o);
1980
- return s && !r ? -1 : !s && r ? 1 : n.localeCompare(i);
1981
- }, Hi = {
1980
+ const i = (a = t.shortname) == null ? void 0 : a.replaceAll(":", ""), o = (l = e.shortname) == null ? void 0 : l.replaceAll(":", ""), s = i.startsWith(n), r = o.startsWith(n);
1981
+ return s && !r ? -1 : !s && r ? 1 : i.localeCompare(o);
1982
+ }, Bo = {
1982
1983
  items: ({ query: t }) => {
1983
1984
  if (t.length < 2)
1984
1985
  return [];
1985
- const e = Object.values(Un());
1986
+ const e = Object.values(zn());
1986
1987
  return t = t.toLowerCase(), e.filter(
1987
- (n) => {
1988
- var i;
1988
+ (i) => {
1989
+ var o;
1989
1990
  return [
1990
- n.name,
1991
- (i = n.shortname) == null ? void 0 : i.replaceAll(":", ""),
1992
- ...n.keywords || []
1991
+ i.name,
1992
+ (o = i.shortname) == null ? void 0 : o.replaceAll(":", ""),
1993
+ ...i.keywords || []
1993
1994
  ].some((s) => s && s.startsWith(t));
1994
1995
  }
1995
- ).splice(0, Ri).sort((n, i) => Mi(n, i, t)).map((n) => ({ code: n.shortname }));
1996
+ ).splice(0, Mo).sort((i, o) => Ho(i, o, t)).map((i) => ({ code: i.shortname }));
1996
1997
  },
1997
- command: ({ editor: t, range: e, props: o }) => {
1998
+ command: ({ editor: t, range: e, props: n }) => {
1998
1999
  var s, r;
1999
- const n = t.view.state.selection.$to.nodeAfter;
2000
- ((s = n == null ? void 0 : n.text) == null ? void 0 : s.startsWith(" ")) && (e.to += 1), t.chain().focus().insertContentAt(e, [
2000
+ const i = t.view.state.selection.$to.nodeAfter;
2001
+ ((s = i == null ? void 0 : i.text) == null ? void 0 : s.startsWith(" ")) && (e.to += 1), t.chain().focus().insertContentAt(e, [
2001
2002
  {
2002
2003
  type: "emoji",
2003
- attrs: o
2004
+ attrs: n
2004
2005
  }
2005
2006
  ]).run(), (r = window.getSelection()) == null || r.collapseToEnd();
2006
2007
  },
2007
- render: Ot(Di, "emoji")
2008
- }, $i = /(:\w+:)$/, Bi = new RegExp(ye + "$"), Ni = (t) => {
2008
+ render: Et(Ro, "emoji")
2009
+ }, $o = /(:\w+:)$/, Po = new RegExp(we + "$"), Uo = (t) => {
2009
2010
  if (t && Rt(t[0]))
2010
2011
  return { text: t[2] || t[0] };
2011
- }, Pi = (t) => [...t.matchAll(zn)].filter((o) => Rt(o[0])).map((o) => ({
2012
- index: o.index,
2013
- text: o[0],
2014
- match: o
2015
- })), Ui = le.create({
2012
+ }, Vo = (t) => [...t.matchAll(jn)].filter((n) => Rt(n[0])).map((n) => ({
2013
+ index: n.index,
2014
+ text: n[0],
2015
+ match: n
2016
+ })), zo = ce.create({
2016
2017
  name: "emoji",
2017
2018
  addOptions() {
2018
2019
  return {
@@ -2024,7 +2025,7 @@ const Di = /* @__PURE__ */ q(Ai, [["render", Ii]]), Ri = 20, Mi = (t, e, o) => {
2024
2025
  selectable: !1,
2025
2026
  atom: !0,
2026
2027
  addNodeView() {
2027
- return gt(pi);
2028
+ return gt(mo);
2028
2029
  },
2029
2030
  addAttributes() {
2030
2031
  return {
@@ -2041,22 +2042,22 @@ const Di = /* @__PURE__ */ q(Ai, [["render", Ii]]), Ri = 20, Mi = (t, e, o) => {
2041
2042
  ];
2042
2043
  },
2043
2044
  renderText({ node: t }) {
2044
- return jn(Rt(t.attrs.code).unicode_output);
2045
+ return Nn(Rt(t.attrs.code).unicode_output);
2045
2046
  },
2046
2047
  renderHTML({ HTMLAttributes: t }) {
2047
2048
  return ["emoji-component", st(this.options.HTMLAttributes, t)];
2048
2049
  },
2049
2050
  addInputRules() {
2050
2051
  return [
2051
- new Ge({
2052
+ new Je({
2052
2053
  find: (t) => {
2053
- const e = t.match($i) || t.match(Bi);
2054
+ const e = t.match($o) || t.match(Po);
2054
2055
  if (e)
2055
- return Ni(e);
2056
+ return Uo(e);
2056
2057
  },
2057
- handler: ({ state: t, range: e, match: o }) => {
2058
- const { tr: n } = t, i = e.from, s = e.to;
2059
- n.replaceWith(i, s, this.type.create({ code: o[0] }));
2058
+ handler: ({ state: t, range: e, match: n }) => {
2059
+ const { tr: i } = t, o = e.from, s = e.to;
2060
+ i.replaceWith(o, s, this.type.create({ code: n[0] }));
2060
2061
  }
2061
2062
  })
2062
2063
  ];
@@ -2064,7 +2065,7 @@ const Di = /* @__PURE__ */ q(Ai, [["render", Ii]]), Ri = 20, Mi = (t, e, o) => {
2064
2065
  addPasteRules() {
2065
2066
  return [
2066
2067
  St({
2067
- find: Pi,
2068
+ find: Vo,
2068
2069
  type: this.type,
2069
2070
  getAttributes(t) {
2070
2071
  return {
@@ -2073,7 +2074,7 @@ const Di = /* @__PURE__ */ q(Ai, [["render", Ii]]), Ri = 20, Mi = (t, e, o) => {
2073
2074
  }
2074
2075
  }),
2075
2076
  St({
2076
- find: Vn,
2077
+ find: Fn,
2077
2078
  type: this.type,
2078
2079
  getAttributes(t) {
2079
2080
  return {
@@ -2085,40 +2086,40 @@ const Di = /* @__PURE__ */ q(Ai, [["render", Ii]]), Ri = 20, Mi = (t, e, o) => {
2085
2086
  },
2086
2087
  addProseMirrorPlugins() {
2087
2088
  return [
2088
- Pn({
2089
+ Vn({
2089
2090
  char: ":",
2090
2091
  pluginKey: new at("emoji"),
2091
2092
  editor: this.editor,
2092
2093
  ...this.options.suggestion,
2093
- ...Hi
2094
+ ...Bo
2094
2095
  })
2095
2096
  ];
2096
2097
  },
2097
2098
  addKeyboardShortcuts() {
2098
2099
  return {
2099
2100
  Backspace: () => this.editor.commands.command(({ tr: t, state: e }) => {
2100
- let o = !1;
2101
- const { selection: n } = e, { empty: i, anchor: s } = n;
2102
- return i ? (e.doc.nodesBetween(s - 1, s, (r, a) => {
2101
+ let n = !1;
2102
+ const { selection: i } = e, { empty: o, anchor: s } = i;
2103
+ return o ? (e.doc.nodesBetween(s - 1, s, (r, a) => {
2103
2104
  if (r.type.name === this.name)
2104
- return o = !0, t.insertText("", a, a + r.nodeSize), !1;
2105
- }), o) : !1;
2105
+ return n = !0, t.insertText("", a, a + r.nodeSize), !1;
2106
+ }), n) : !1;
2106
2107
  })
2107
2108
  };
2108
2109
  }
2109
2110
  });
2110
- function Vi(t, e, o = () => !0) {
2111
- const n = [];
2111
+ function Fo(t, e, n = () => !0) {
2112
+ const i = [];
2112
2113
  e.lastIndex = 0;
2113
- let i;
2114
- for (; i = e.exec(t); )
2115
- o(t, i) && n.push(i);
2116
- return n;
2114
+ let o;
2115
+ for (; o = e.exec(t); )
2116
+ n(t, o) && i.push(o);
2117
+ return i;
2117
2118
  }
2118
- function ji(t, e) {
2119
+ function No(t, e) {
2119
2120
  return !["#", "@"].includes(t.charAt(e.index)) && !["#", "@"].includes(t.charAt(e.index - 1));
2120
2121
  }
2121
- function zi(t) {
2122
+ function jo(t) {
2122
2123
  const e = new RegExp(
2123
2124
  "(?:" + [
2124
2125
  `[!?.,:;'"]`,
@@ -2128,77 +2129,77 @@ function zi(t) {
2128
2129
  );
2129
2130
  return t.replace(e, "");
2130
2131
  }
2131
- function Fi(t, e) {
2132
- const o = t.slice(0, e + 1).search(/\S+\s*$/), n = t.slice(e).search(/\s/);
2133
- if (n < 0) {
2134
- const i = t.slice(o);
2132
+ function Wo(t, e) {
2133
+ const n = t.slice(0, e + 1).search(/\S+\s*$/), i = t.slice(e).search(/\s/);
2134
+ if (i < 0) {
2135
+ const o = t.slice(n);
2135
2136
  return {
2136
- text: i,
2137
- from: o,
2138
- to: o + i.length
2137
+ text: o,
2138
+ from: n,
2139
+ to: n + o.length
2139
2140
  };
2140
2141
  }
2141
2142
  return {
2142
- text: t.slice(o, n + e),
2143
- from: o,
2144
- to: n + e
2143
+ text: t.slice(n, i + e),
2144
+ from: n,
2145
+ to: i + e
2145
2146
  };
2146
2147
  }
2147
- function At(t, e, o, n) {
2148
- const i = Fi(t, e);
2149
- if (n.lastIndex = 0, !n.test(i.text))
2150
- return i;
2151
- const s = o === "left" ? i.from - 1 : i.to + 1;
2152
- return s <= 0 || s >= t.length || s === e ? i : At(t, s, o, n);
2148
+ function At(t, e, n, i) {
2149
+ const o = Wo(t, e);
2150
+ if (i.lastIndex = 0, !i.test(o.text))
2151
+ return o;
2152
+ const s = n === "left" ? o.from - 1 : o.to + 1;
2153
+ return s <= 0 || s >= t.length || s === e ? o : At(t, s, n, i);
2153
2154
  }
2154
- function Ki(t, e, o, n) {
2155
- const i = Math.max(t.from - 1, 0), s = Math.min(t.to + 1, e.content.size), r = Je(i, s, e);
2155
+ function Ko(t, e, n, i) {
2156
+ const o = Math.max(t.from - 1, 0), s = Math.min(t.to + 1, e.content.size), r = Ze(o, s, e);
2156
2157
  for (const a of r)
2157
- a.mark.type === n && o.removeMark(a.from, a.to, n);
2158
+ a.mark.type === i && n.removeMark(a.from, a.to, i);
2158
2159
  }
2159
- const se = Wn(1, 15);
2160
- function re(t, e, o, n, i, s) {
2160
+ const re = qn(1, 15);
2161
+ function ae(t, e, n, i, o, s) {
2161
2162
  if (!t)
2162
2163
  return;
2163
- let r = o - e - 1;
2164
+ let r = n - e - 1;
2164
2165
  r = r < 0 ? 0 : r;
2165
- const a = n - e, l = At(
2166
+ const a = i - e, l = At(
2166
2167
  t,
2167
2168
  r,
2168
2169
  "left",
2169
- se
2170
+ re
2170
2171
  ), u = At(
2171
2172
  t,
2172
2173
  a,
2173
2174
  "right",
2174
- se
2175
+ re
2175
2176
  ), d = t.slice(l.from, u.to);
2176
- Vi(d, Kn, ji).forEach((h) => {
2177
- const f = zi(h[0]), p = e + l.from + h.index + 1, m = p + f.length;
2178
- i.addMark(p, m, s.create());
2177
+ Fo(d, Kn, No).forEach((h) => {
2178
+ const f = jo(h[0]), p = e + l.from + h.index + 1, m = p + f.length;
2179
+ o.addMark(p, m, s.create());
2179
2180
  });
2180
2181
  }
2181
- function Wi(t) {
2182
+ function qo(t) {
2182
2183
  let e = !1;
2183
2184
  return new It({
2184
2185
  key: new at("autolink"),
2185
- appendTransaction: (o, n, i) => {
2186
- const s = o.some((d) => d.docChanged) && !n.doc.eq(i.doc);
2186
+ appendTransaction: (n, i, o) => {
2187
+ const s = n.some((d) => d.docChanged) && !i.doc.eq(o.doc);
2187
2188
  if (e && !s)
2188
2189
  return;
2189
- const { tr: r } = i, { textContent: a } = i.doc;
2190
- e || re(a, 0, 0, a.length, r, t.type), e = !0;
2191
- const l = Ze(
2192
- n.doc,
2193
- [...o]
2190
+ const { tr: r } = o, { textContent: a } = o.doc;
2191
+ e || ae(a, 0, 0, a.length, r, t.type), e = !0;
2192
+ const l = Qe(
2193
+ i.doc,
2194
+ [...n]
2194
2195
  );
2195
- return Qe(l).forEach(({ oldRange: d, newRange: c }) => {
2196
- Ki(c, i.doc, r, t.type), tn(
2197
- i.doc,
2196
+ return tn(l).forEach(({ oldRange: d, newRange: c }) => {
2197
+ Ko(c, o.doc, r, t.type), en(
2198
+ o.doc,
2198
2199
  c,
2199
2200
  (f) => f.isTextblock
2200
2201
  ).forEach(({ node: f, pos: p }) => {
2201
- re(
2202
+ ae(
2202
2203
  f.textContent,
2203
2204
  p,
2204
2205
  d.from,
@@ -2211,10 +2212,10 @@ function Wi(t) {
2211
2212
  }
2212
2213
  });
2213
2214
  }
2214
- const qi = {
2215
+ const Xo = {
2215
2216
  class: "d-link d-c-text d-d-inline-block d-wb-break-all",
2216
2217
  rel: "noopener noreferrer nofollow"
2217
- }, Xi = en.create({
2218
+ }, Yo = nn.create({
2218
2219
  name: "CustomLink",
2219
2220
  renderHTML({ HTMLAttributes: t }) {
2220
2221
  return [
@@ -2222,7 +2223,7 @@ const qi = {
2222
2223
  st(
2223
2224
  this.options.HTMLAttributes,
2224
2225
  t,
2225
- qi
2226
+ Xo
2226
2227
  )
2227
2228
  ];
2228
2229
  },
@@ -2231,10 +2232,10 @@ const qi = {
2231
2232
  },
2232
2233
  addProseMirrorPlugins() {
2233
2234
  return [
2234
- Wi({ type: this.type })
2235
+ qo({ type: this.type })
2235
2236
  ];
2236
2237
  }
2237
- }), Yi = Xn.extend({
2238
+ }), Go = Yn.extend({
2238
2239
  name: "ConfigurableImage",
2239
2240
  addAttributes() {
2240
2241
  return {
@@ -2258,7 +2259,7 @@ const qi = {
2258
2259
  }
2259
2260
  };
2260
2261
  }
2261
- }).configure({ inline: !0, allowBase64: !0 }), Gi = /* @__PURE__ */ new Set([
2262
+ }).configure({ inline: !0, allowBase64: !0 }), Jo = /* @__PURE__ */ new Set([
2262
2263
  "address",
2263
2264
  "article",
2264
2265
  "aside",
@@ -2292,13 +2293,13 @@ const qi = {
2292
2293
  "section",
2293
2294
  "table",
2294
2295
  "ul"
2295
- ]), Ji = ge.extend({
2296
+ ]), Zo = ye.extend({
2296
2297
  parseHTML() {
2297
2298
  return [{
2298
2299
  tag: "div",
2299
2300
  getAttrs: (t) => {
2300
2301
  for (const e of t.children)
2301
- if (Gi.has(e.tagName.toLowerCase()))
2302
+ if (Jo.has(e.tagName.toLowerCase()))
2302
2303
  return !1;
2303
2304
  return null;
2304
2305
  }
@@ -2307,12 +2308,12 @@ const qi = {
2307
2308
  renderHTML({ HTMLAttributes: t }) {
2308
2309
  return ["div", st(this.options.HTMLAttributes, t), 0];
2309
2310
  }
2310
- }), Zi = {
2311
+ }), Qo = {
2311
2312
  compatConfig: { MODE: 3 },
2312
2313
  name: "MentionComponent",
2313
2314
  components: {
2314
2315
  NodeViewWrapper: mt,
2315
- DtLink: be
2316
+ DtLink: ve
2316
2317
  },
2317
2318
  props: pt,
2318
2319
  computed: {
@@ -2340,7 +2341,7 @@ const qi = {
2340
2341
  }
2341
2342
  }
2342
2343
  };
2343
- function Qi(t, e, o, n, i, s) {
2344
+ function ts(t, e, n, i, o, s) {
2344
2345
  const r = T("dt-link"), a = T("node-view-wrapper");
2345
2346
  return _(), A(a, { class: "d-d-inline-block" }, {
2346
2347
  default: C(() => [
@@ -2353,7 +2354,7 @@ function Qi(t, e, o, n, i, s) {
2353
2354
  onFocusout: s.handleMouseLeave
2354
2355
  }, {
2355
2356
  default: C(() => [
2356
- lt($(s.text), 1)
2357
+ lt(B(s.text), 1)
2357
2358
  ]),
2358
2359
  _: 1
2359
2360
  }, 8, ["onClick", "onMouseenter", "onMouseleave", "onFocusin", "onFocusout"])
@@ -2361,9 +2362,9 @@ function Qi(t, e, o, n, i, s) {
2361
2362
  _: 1
2362
2363
  });
2363
2364
  }
2364
- const ts = /* @__PURE__ */ q(Zi, [["render", Qi]]), es = Mt.extend({
2365
+ const es = /* @__PURE__ */ q(Qo, [["render", ts]]), ns = Mt.extend({
2365
2366
  addNodeView() {
2366
- return gt(ts);
2367
+ return gt(es);
2367
2368
  },
2368
2369
  parseHTML() {
2369
2370
  return [
@@ -2399,13 +2400,13 @@ const ts = /* @__PURE__ */ q(Zi, [["render", Qi]]), es = Mt.extend({
2399
2400
  char: "@",
2400
2401
  pluginKey: new at("mentionSuggestion")
2401
2402
  }
2402
- }), ns = {
2403
+ }), is = {
2403
2404
  compatConfig: { MODE: 3 },
2404
2405
  name: "ChannelComponent",
2405
2406
  components: {
2406
2407
  NodeViewWrapper: mt,
2407
- DtLink: be,
2408
- DtIconLock: Yn,
2408
+ DtLink: ve,
2409
+ DtIconLock: Gn,
2409
2410
  DtStack: yt
2410
2411
  },
2411
2412
  props: pt,
@@ -2426,7 +2427,7 @@ const ts = /* @__PURE__ */ q(Zi, [["render", Qi]]), es = Mt.extend({
2426
2427
  }
2427
2428
  }
2428
2429
  };
2429
- function os(t, e, o, n, i, s) {
2430
+ function os(t, e, n, i, o, s) {
2430
2431
  const r = T("dt-icon-lock"), a = T("dt-stack"), l = T("dt-link"), u = T("node-view-wrapper");
2431
2432
  return _(), A(u, { class: "d-d-inline-block" }, {
2432
2433
  default: C(() => [
@@ -2444,7 +2445,7 @@ function os(t, e, o, n, i, s) {
2444
2445
  key: 0,
2445
2446
  size: "200"
2446
2447
  })) : rt("", !0),
2447
- nt("span", null, $(s.text), 1)
2448
+ nt("span", null, B(s.text), 1)
2448
2449
  ]),
2449
2450
  _: 1
2450
2451
  })
@@ -2455,10 +2456,10 @@ function os(t, e, o, n, i, s) {
2455
2456
  _: 1
2456
2457
  });
2457
2458
  }
2458
- const is = /* @__PURE__ */ q(ns, [["render", os]]), ss = Mt.extend({
2459
+ const ss = /* @__PURE__ */ q(is, [["render", os]]), rs = Mt.extend({
2459
2460
  name: "channel",
2460
2461
  addNodeView() {
2461
- return gt(is);
2462
+ return gt(ss);
2462
2463
  },
2463
2464
  parseHTML() {
2464
2465
  return [
@@ -2494,7 +2495,7 @@ const is = /* @__PURE__ */ q(ns, [["render", os]]), ss = Mt.extend({
2494
2495
  char: "#",
2495
2496
  pluginKey: new at("channelSuggestion")
2496
2497
  }
2497
- }), rs = {
2498
+ }), as = {
2498
2499
  compatConfig: { MODE: 3 },
2499
2500
  name: "SlashCommandsComponent",
2500
2501
  components: {
@@ -2510,30 +2511,30 @@ const is = /* @__PURE__ */ q(ns, [["render", os]]), ss = Mt.extend({
2510
2511
  }
2511
2512
  },
2512
2513
  created() {
2513
- var o, n, i;
2514
+ var n, i, o;
2514
2515
  const t = this.$props.node.attrs.command;
2515
2516
  this.$emit("selected-command", t);
2516
- const e = (i = (n = (o = this.editor) == null ? void 0 : o.storage) == null ? void 0 : n["slash-commands"]) == null ? void 0 : i.onSelectedCommand;
2517
+ const e = (o = (i = (n = this.editor) == null ? void 0 : n.storage) == null ? void 0 : i["slash-commands"]) == null ? void 0 : o.onSelectedCommand;
2517
2518
  e && typeof e == "function" && e(t);
2518
2519
  }
2519
2520
  };
2520
- function as(t, e, o, n, i, s) {
2521
+ function ls(t, e, n, i, o, s) {
2521
2522
  const r = T("node-view-wrapper");
2522
2523
  return _(), A(r, { class: "d-d-inline-block" }, {
2523
2524
  default: C(() => [
2524
- lt($(s.text), 1)
2525
+ lt(B(s.text), 1)
2525
2526
  ]),
2526
2527
  _: 1
2527
2528
  });
2528
2529
  }
2529
- const ls = /* @__PURE__ */ q(rs, [["render", as]]), cs = (t, e) => [...t.matchAll(e)].map((n) => {
2530
- let i = n[2];
2531
- return i.endsWith(" ") || (i += " "), {
2532
- index: n.index,
2533
- text: i,
2534
- match: n
2530
+ const cs = /* @__PURE__ */ q(as, [["render", ls]]), ds = (t, e) => [...t.matchAll(e)].map((i) => {
2531
+ let o = i[2];
2532
+ return o.endsWith(" ") || (o += " "), {
2533
+ index: i.index,
2534
+ text: o,
2535
+ match: i
2535
2536
  };
2536
- }), ds = Mt.extend({
2537
+ }), us = Mt.extend({
2537
2538
  name: "slash-commands",
2538
2539
  group: "inline",
2539
2540
  inline: !0,
@@ -2550,7 +2551,7 @@ const ls = /* @__PURE__ */ q(rs, [["render", as]]), cs = (t, e) => [...t.matchAl
2550
2551
  };
2551
2552
  },
2552
2553
  addNodeView() {
2553
- return gt(ls);
2554
+ return gt(cs);
2554
2555
  },
2555
2556
  parseHTML() {
2556
2557
  return [
@@ -2579,27 +2580,27 @@ const ls = /* @__PURE__ */ q(rs, [["render", as]]), cs = (t, e) => [...t.matchAl
2579
2580
  return ["command-component", st(this.options.HTMLAttributes, t)];
2580
2581
  },
2581
2582
  addInputRules() {
2582
- var o;
2583
- const t = (o = this.options.suggestion) == null ? void 0 : o.items({ query: "" }).map((n) => n.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) $`);
2583
+ var n;
2584
+ const t = (n = this.options.suggestion) == null ? void 0 : n.items({ query: "" }).map((i) => i.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) $`);
2584
2585
  return [
2585
- nn({
2586
+ on({
2586
2587
  find: e,
2587
2588
  type: this.type,
2588
- getAttributes(n) {
2589
- return { command: n[2] };
2589
+ getAttributes(i) {
2590
+ return { command: i[2] };
2590
2591
  }
2591
2592
  })
2592
2593
  ];
2593
2594
  },
2594
2595
  addPasteRules() {
2595
- var o;
2596
- const t = (o = this.options.suggestion) == null ? void 0 : o.items({ query: "" }).map((n) => n.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) ?$`, "g");
2596
+ var n;
2597
+ const t = (n = this.options.suggestion) == null ? void 0 : n.items({ query: "" }).map((i) => i.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) ?$`, "g");
2597
2598
  return [
2598
2599
  St({
2599
- find: (n) => cs(n, e),
2600
+ find: (i) => ds(i, e),
2600
2601
  type: this.type,
2601
- getAttributes(n) {
2602
- return { command: n[0].trim() };
2602
+ getAttributes(i) {
2603
+ return { command: i[0].trim() };
2603
2604
  }
2604
2605
  })
2605
2606
  ];
@@ -2609,20 +2610,20 @@ const ls = /* @__PURE__ */ q(rs, [["render", as]]), cs = (t, e) => [...t.matchAl
2609
2610
  char: "/",
2610
2611
  pluginKey: new at("slashCommandSuggestion")
2611
2612
  }
2612
- }), us = 100, hs = {
2613
+ }), hs = 100, fs = {
2613
2614
  name: "VariableComponent",
2614
2615
  components: {
2615
- DtBadge: Zn,
2616
- DtButton: xe,
2617
- DtPopover: Jn,
2618
- DtInput: Gn,
2616
+ DtBadge: Qn,
2617
+ DtButton: Te,
2618
+ DtPopover: Zn,
2619
+ DtInput: Jn,
2619
2620
  NodeViewWrapper: mt
2620
2621
  },
2621
2622
  props: pt,
2622
2623
  data() {
2623
2624
  return {
2624
- i18n: new ve(),
2625
- MAX_VARIABLE_ALT_LENGTH: us
2625
+ i18n: new xe(),
2626
+ MAX_VARIABLE_ALT_LENGTH: hs
2626
2627
  };
2627
2628
  },
2628
2629
  computed: {
@@ -2662,7 +2663,7 @@ const ls = /* @__PURE__ */ q(rs, [["render", as]]), cs = (t, e) => [...t.matchAl
2662
2663
  }
2663
2664
  }
2664
2665
  };
2665
- function fs(t, e, o, n, i, s) {
2666
+ function ps(t, e, n, i, o, s) {
2666
2667
  const r = T("dt-badge"), a = T("dt-button"), l = T("dt-input"), u = T("dt-popover"), d = T("node-view-wrapper");
2667
2668
  return _(), A(d, { class: "d-d-inline-block" }, {
2668
2669
  default: C(() => [
@@ -2674,7 +2675,7 @@ function fs(t, e, o, n, i, s) {
2674
2675
  modal: !1
2675
2676
  }, {
2676
2677
  anchor: C(({ attrs: c }) => [
2677
- M(a, me(c, { kind: "unstyled" }), {
2678
+ M(a, ge(c, { kind: "unstyled" }), {
2678
2679
  default: C(() => [
2679
2680
  M(r, {
2680
2681
  text: s.badgeLabel,
@@ -2689,18 +2690,18 @@ function fs(t, e, o, n, i, s) {
2689
2690
  modelValue: s.altText,
2690
2691
  "onUpdate:modelValue": e[0] || (e[0] = (h) => s.altText = h),
2691
2692
  "root-class": "d-p8 d-w332",
2692
- label: i.i18n.$t("DIALTONE_EDITOR_VARIABLE_LABEL"),
2693
+ label: o.i18n.$t("DIALTONE_EDITOR_VARIABLE_LABEL"),
2693
2694
  placeholder: s.placeholderText,
2694
2695
  validate: {
2695
2696
  length: {
2696
- description: i.i18n.$t("DIALTONE_EDITOR_VARIABLE_VALIDATE_DESCRIPTION"),
2697
- message: i.i18n.$t("DIALTONE_EDITOR_VARIABLE_VALIDATE_MESSAGE"),
2698
- max: i.MAX_VARIABLE_ALT_LENGTH,
2699
- warn: i.MAX_VARIABLE_ALT_LENGTH,
2697
+ description: o.i18n.$t("DIALTONE_EDITOR_VARIABLE_VALIDATE_DESCRIPTION"),
2698
+ message: o.i18n.$t("DIALTONE_EDITOR_VARIABLE_VALIDATE_MESSAGE"),
2699
+ max: o.MAX_VARIABLE_ALT_LENGTH,
2700
+ warn: o.MAX_VARIABLE_ALT_LENGTH,
2700
2701
  limitMaxLength: !0
2701
2702
  }
2702
2703
  },
2703
- onKeyup: pn((h) => c(), ["enter"])
2704
+ onKeyup: mn((h) => c(), ["enter"])
2704
2705
  }, null, 8, ["modelValue", "label", "placeholder", "validate", "onKeyup"])
2705
2706
  ]),
2706
2707
  _: 1
@@ -2713,7 +2714,7 @@ function fs(t, e, o, n, i, s) {
2713
2714
  _: 1
2714
2715
  });
2715
2716
  }
2716
- const ps = /* @__PURE__ */ q(hs, [["render", fs]]), ms = le.create({
2717
+ const ms = /* @__PURE__ */ q(fs, [["render", ps]]), gs = ce.create({
2717
2718
  name: "variable",
2718
2719
  group: "inline",
2719
2720
  inline: !0,
@@ -2726,7 +2727,7 @@ const ps = /* @__PURE__ */ q(hs, [["render", fs]]), ms = le.create({
2726
2727
  };
2727
2728
  },
2728
2729
  addNodeView() {
2729
- return gt(ps);
2730
+ return gt(ms);
2730
2731
  },
2731
2732
  addAttributes() {
2732
2733
  return {
@@ -2785,11 +2786,11 @@ const ps = /* @__PURE__ */ q(hs, [["render", fs]]), ms = le.create({
2785
2786
  })
2786
2787
  };
2787
2788
  }
2788
- }), gs = {
2789
+ }), ys = {
2789
2790
  compatConfig: { MODE: 3 },
2790
2791
  name: "MentionSuggestion",
2791
2792
  components: {
2792
- DtAvatar: eo,
2793
+ DtAvatar: ni,
2793
2794
  DtStack: yt
2794
2795
  },
2795
2796
  props: {
@@ -2826,14 +2827,14 @@ const ps = /* @__PURE__ */ q(hs, [["render", fs]]), ms = le.create({
2826
2827
  return this.item.showDetails;
2827
2828
  }
2828
2829
  }
2829
- }, ys = { class: "d-mention-suggestion__name" }, ws = {
2830
+ }, ws = { class: "d-mention-suggestion__name" }, bs = {
2830
2831
  key: 1,
2831
2832
  class: "d-mention-suggestion__divider"
2832
- }, bs = {
2833
+ }, vs = {
2833
2834
  key: 2,
2834
2835
  class: "d-mention-suggestion__status"
2835
2836
  };
2836
- function vs(t, e, o, n, i, s) {
2837
+ function xs(t, e, n, i, o, s) {
2837
2838
  const r = T("dt-avatar"), a = T("dt-stack");
2838
2839
  return _(), A(a, {
2839
2840
  direction: "row",
@@ -2854,7 +2855,7 @@ function vs(t, e, o, n, i, s) {
2854
2855
  gap: "100"
2855
2856
  }, {
2856
2857
  default: C(() => [
2857
- nt("span", ys, $(s.name), 1),
2858
+ nt("span", ws, B(s.name), 1),
2858
2859
  s.showDetails ? (_(), A(a, {
2859
2860
  key: 0,
2860
2861
  direction: "row",
@@ -2864,10 +2865,10 @@ function vs(t, e, o, n, i, s) {
2864
2865
  default: C(() => [
2865
2866
  s.presenceText ? (_(), et("span", {
2866
2867
  key: 0,
2867
- class: pe(["d-mention-suggestion__presence", [s.presenceFontColorClass]])
2868
- }, $(s.presenceText), 3)) : rt("", !0),
2869
- s.status && s.presenceText ? (_(), et("div", ws, " • ")) : rt("", !0),
2870
- s.status ? (_(), et("div", bs, $(s.status), 1)) : rt("", !0)
2868
+ class: me(["d-mention-suggestion__presence", [s.presenceFontColorClass]])
2869
+ }, B(s.presenceText), 3)) : rt("", !0),
2870
+ s.status && s.presenceText ? (_(), et("div", bs, " • ")) : rt("", !0),
2871
+ s.status ? (_(), et("div", vs, B(s.status), 1)) : rt("", !0)
2871
2872
  ]),
2872
2873
  _: 1
2873
2874
  })) : rt("", !0)
@@ -2878,19 +2879,19 @@ function vs(t, e, o, n, i, s) {
2878
2879
  _: 1
2879
2880
  });
2880
2881
  }
2881
- const xs = /* @__PURE__ */ q(gs, [["render", vs]]), Ts = {
2882
+ const Ts = /* @__PURE__ */ q(ys, [["render", xs]]), _s = {
2882
2883
  // This function comes from the user and passed to the editor directly.
2883
2884
  // This will also activate the mention plugin on the editor
2884
2885
  // items: ({ query }) => { return [] },
2885
2886
  allowSpaces: !0,
2886
- render: Ot(xs, "mention")
2887
- }, _s = {
2887
+ render: Et(Ts, "mention")
2888
+ }, Os = {
2888
2889
  compatConfig: { MODE: 3 },
2889
2890
  name: "ChannelSuggestion",
2890
2891
  components: {
2891
2892
  DtStack: yt,
2892
- DtIconHash: no,
2893
- DtIconLock: oo
2893
+ DtIconHash: ii,
2894
+ DtIconLock: oi
2894
2895
  },
2895
2896
  props: {
2896
2897
  item: {
@@ -2904,32 +2905,32 @@ const xs = /* @__PURE__ */ q(gs, [["render", vs]]), Ts = {
2904
2905
  }
2905
2906
  }
2906
2907
  };
2907
- function ks(t, e, o, n, i, s) {
2908
+ function Cs(t, e, n, i, o, s) {
2908
2909
  const r = T("dt-icon-hash"), a = T("dt-icon-lock"), l = T("dt-stack");
2909
2910
  return _(), A(l, {
2910
2911
  direction: "row",
2911
2912
  gap: "400"
2912
2913
  }, {
2913
2914
  default: C(() => [
2914
- o.item.locked ? (_(), A(a, {
2915
+ n.item.locked ? (_(), A(a, {
2915
2916
  key: 1,
2916
2917
  size: "300"
2917
2918
  })) : (_(), A(r, {
2918
2919
  key: 0,
2919
2920
  size: "300"
2920
2921
  })),
2921
- nt("span", null, $(s.name), 1)
2922
+ nt("span", null, B(s.name), 1)
2922
2923
  ]),
2923
2924
  _: 1
2924
2925
  });
2925
2926
  }
2926
- const Cs = /* @__PURE__ */ q(_s, [["render", ks]]), Os = {
2927
+ const Es = /* @__PURE__ */ q(Os, [["render", Cs]]), ks = {
2927
2928
  // This function comes from the user and passed to the editor directly.
2928
2929
  // This will also activate the mention plugin on the editor
2929
2930
  // items: ({ query }) => { return [] },
2930
2931
  allowSpaces: !0,
2931
- render: Ot(Cs, "channel")
2932
- }, Es = {
2932
+ render: Et(Es, "channel")
2933
+ }, Ss = {
2933
2934
  compatConfig: { MODE: 3 },
2934
2935
  name: "SlashCommandSuggestion",
2935
2936
  props: {
@@ -2949,30 +2950,30 @@ const Cs = /* @__PURE__ */ q(_s, [["render", ks]]), Os = {
2949
2950
  return this.item.parametersExample;
2950
2951
  }
2951
2952
  }
2952
- }, Ss = { class: "d-body--md-compact" }, Ls = { key: 0 }, As = { class: "d-body--sm d-fc-tertiary" };
2953
- function Is(t, e, o, n, i, s) {
2953
+ }, Ls = { class: "d-body--md-compact" }, As = { key: 0 }, Is = { class: "d-body--sm d-fc-tertiary" };
2954
+ function Ds(t, e, n, i, o, s) {
2954
2955
  return _(), et("div", null, [
2955
- nt("div", Ss, [
2956
- nt("span", null, "/" + $(s.command), 1),
2957
- s.parametersExample ? (_(), et("span", Ls, $(s.parametersExample), 1)) : rt("", !0)
2956
+ nt("div", Ls, [
2957
+ nt("span", null, "/" + B(s.command), 1),
2958
+ s.parametersExample ? (_(), et("span", As, B(s.parametersExample), 1)) : rt("", !0)
2958
2959
  ]),
2959
- nt("div", As, $(s.description), 1)
2960
+ nt("div", Is, B(s.description), 1)
2960
2961
  ]);
2961
2962
  }
2962
- const Ds = /* @__PURE__ */ q(Es, [["render", Is]]), Rs = {
2963
+ const Rs = /* @__PURE__ */ q(Ss, [["render", Ds]]), Ms = {
2963
2964
  // This function comes from the user and passed to the editor directly.
2964
2965
  // This will also activate the mention plugin on the editor
2965
2966
  // items: ({ query }) => { return [] },
2966
2967
  allowSpaces: !0,
2967
2968
  startOfLine: !0,
2968
- render: Ot(Ds, "slash-command")
2969
- }, Ms = {
2969
+ render: Et(Rs, "slash-command")
2970
+ }, Hs = {
2970
2971
  compatConfig: { MODE: 3 },
2971
2972
  name: "DtRichTextEditor",
2972
2973
  components: {
2973
2974
  EditorContent: Ke,
2974
- BubbleMenu: ni,
2975
- DtButton: xe,
2975
+ BubbleMenu: no,
2976
+ DtButton: Te,
2976
2977
  DtStack: yt
2977
2978
  },
2978
2979
  props: {
@@ -3045,7 +3046,7 @@ const Ds = /* @__PURE__ */ q(Es, [["render", Is]]), Rs = {
3045
3046
  type: [Boolean, String, Number],
3046
3047
  default: !1,
3047
3048
  validator(t) {
3048
- return typeof t == "string" ? to.includes(t) : !0;
3049
+ return typeof t == "string" ? ei.includes(t) : !0;
3049
3050
  }
3050
3051
  },
3051
3052
  /**
@@ -3058,7 +3059,7 @@ const Ds = /* @__PURE__ */ q(Es, [["render", Is]]), Rs = {
3058
3059
  type: String,
3059
3060
  default: "html",
3060
3061
  validator(t) {
3061
- return Qn.includes(t);
3062
+ return ti.includes(t);
3062
3063
  }
3063
3064
  },
3064
3065
  /**
@@ -3410,135 +3411,12 @@ const Ds = /* @__PURE__ */ q(Es, [["render", Is]]), Rs = {
3410
3411
  editor: null,
3411
3412
  appendTo: () => {
3412
3413
  var t;
3413
- return (t = Ft(this.$refs.editor.$el).getRootNode()) == null ? void 0 : t.querySelector("body");
3414
+ return (t = jt(this.$refs.editor.$el).getRootNode()) == null ? void 0 : t.querySelector("body");
3414
3415
  },
3415
3416
  floatingOptions: {
3416
3417
  placement: "top-start"
3417
3418
  },
3418
- i18n: new ve(),
3419
- // JSON-to-markdown converter
3420
- jsonToMarkdownConverter: {
3421
- convertToMarkdown(t) {
3422
- return this.processNode(t);
3423
- },
3424
- processNodeContent(t) {
3425
- return t.content ? t.content.map((e) => this.processNode(e)).join("") : "";
3426
- },
3427
- processNode(t) {
3428
- if (!t) return "";
3429
- const o = {
3430
- doc: (n) => this.processDocNode(n),
3431
- paragraph: (n) => this.processParagraphNode(n),
3432
- text: (n) => this.processTextNode(n),
3433
- hardBreak: () => this.processHardBreakNode(),
3434
- blockquote: (n) => this.processBlockquoteNode(n),
3435
- bulletList: (n) => this.processBulletListNode(n),
3436
- orderedList: (n) => this.processOrderedListNode(n),
3437
- listItem: (n) => this.processListItemNode(n),
3438
- codeBlock: (n) => this.processCodeBlockNode(n),
3439
- mention: (n) => this.processMentionNode(n),
3440
- channel: (n) => this.processChannelNode(n),
3441
- "slash-commands": (n) => this.processSlashCommandsNode(n),
3442
- emoji: (n) => this.processEmojiNode(n),
3443
- variable: (n) => this.processVariableNode(n)
3444
- }[t.type];
3445
- return o ? o(t) : this.processUnknownNode(t);
3446
- },
3447
- processDocNode(t) {
3448
- return this.processNodeContent(t);
3449
- },
3450
- processParagraphNode(t) {
3451
- const e = this.processNodeContent(t);
3452
- return e ? e + `
3453
- ` : `
3454
- `;
3455
- },
3456
- processTextNode(t) {
3457
- let e = t.text || "";
3458
- return t.marks && (e = this.applyMarks(e, t.marks)), e;
3459
- },
3460
- processHardBreakNode() {
3461
- return `
3462
- `;
3463
- },
3464
- processBlockquoteNode(t) {
3465
- return this.processNodeContent(t).split(`
3466
- `).map((o) => o ? `> ${o}` : ">").join(`
3467
- `) + `
3468
- `;
3469
- },
3470
- processBulletListNode(t) {
3471
- return this.processNodeContent(t);
3472
- },
3473
- processOrderedListNode(t) {
3474
- return t.content ? t.content.map((e, o) => this.processNode(e).replace(/^- /, `${o + 1}. `)).join("") : "";
3475
- },
3476
- processListItemNode(t) {
3477
- const e = this.processNodeContent(t);
3478
- return e ? `- ${e.replace(/\n$/, "")}
3479
- ` : "";
3480
- },
3481
- processCodeBlockNode(t) {
3482
- return `\`\`\`
3483
- ${this.processNodeContent(t)}
3484
- \`\`\``;
3485
- },
3486
- processMentionNode(t) {
3487
- var i, s, r;
3488
- const e = ((i = t.attrs) == null ? void 0 : i.name) || "", o = ((s = t.attrs) == null ? void 0 : s.id) || "", n = ((r = t.attrs) == null ? void 0 : r.contactKey) || "";
3489
- return `<!-- @mention: {"id": "${o}", "contactKey": "${n}", "name": "${e}"} -->`;
3490
- },
3491
- processChannelNode(t) {
3492
- var s, r, a, l;
3493
- const e = ((s = t.attrs) == null ? void 0 : s.name) || "", o = ((r = t.attrs) == null ? void 0 : r.id) || "", n = ((a = t.attrs) == null ? void 0 : a.locked.toString()) || "", i = ((l = t.attrs) == null ? void 0 : l.channelKey) || "";
3494
- return `<!-- @channel: {"id": "${o}", "channelKey": "${i}", "name": "${e}", "locked": "${n}"} -->`;
3495
- },
3496
- processSlashCommandsNode(t) {
3497
- var n, i;
3498
- const e = ((n = t.attrs) == null ? void 0 : n.command) || "", o = ((i = t.attrs) == null ? void 0 : i.parameters) || "";
3499
- return `/${e}${o ? ` ${o}` : ""}`;
3500
- },
3501
- processEmojiNode(t) {
3502
- var e;
3503
- return ((e = t.attrs) == null ? void 0 : e.code) || "";
3504
- },
3505
- processVariableNode(t) {
3506
- var n, i;
3507
- const e = ((n = t.attrs) == null ? void 0 : n.id) || "", o = ((i = t.attrs) == null ? void 0 : i.altText) || "";
3508
- return `{{${e}=${o}}}`;
3509
- },
3510
- processUnknownNode(t) {
3511
- return this.processNodeContent(t);
3512
- },
3513
- applyMarks(t, e) {
3514
- let o = t;
3515
- return [...e].sort((i, s) => {
3516
- const r = { link: 0, bold: 1, italic: 2, strike: 3, code: 4 };
3517
- return (r[i.type] || 5) - (r[s.type] || 5);
3518
- }).forEach((i) => {
3519
- var s;
3520
- switch (i.type) {
3521
- case "bold":
3522
- o = `**${o}**`;
3523
- break;
3524
- case "italic":
3525
- o = `*${o}*`;
3526
- break;
3527
- case "strike":
3528
- o = `~~${o}~~`;
3529
- break;
3530
- case "code":
3531
- o = `\`${o}\``;
3532
- break;
3533
- case "link": {
3534
- const r = ((s = i.attrs) == null ? void 0 : s.href) || "";
3535
- o = `[${o}](${r})`;
3536
- break;
3537
- }
3538
- }
3539
- }), o;
3540
- }
3541
- }
3419
+ i18n: new xe()
3542
3420
  };
3543
3421
  },
3544
3422
  computed: {
@@ -3555,29 +3433,29 @@ ${this.processNodeContent(t)}
3555
3433
  },
3556
3434
  // eslint-disable-next-line complexity
3557
3435
  extensions() {
3558
- const t = [wn, In, bn, Tn];
3559
- t.push(this.useDivTags ? Ji : ge), this.allowBold && t.push(_n), this.allowBlockquote && t.push(mn), this.allowBulletList && (t.push(kn), t.push(Cn.extend({
3560
- renderText({ node: n }) {
3561
- return n.textContent;
3436
+ const t = [bn, Dn, vn, _n];
3437
+ t.push(this.useDivTags ? Zo : ye), this.allowBold && t.push(On), this.allowBlockquote && t.push(gn), this.allowBulletList && (t.push(Cn), t.push(En.extend({
3438
+ renderText({ node: i }) {
3439
+ return i.textContent;
3562
3440
  }
3563
- })), t.push(On)), this.allowItalic && t.push(En), this.allowStrike && t.push(Ln), this.allowUnderline && t.push(An), this.placeholder && t.push(
3564
- vn.configure({ placeholder: this.placeholder })
3441
+ })), t.push(kn)), this.allowItalic && t.push(Sn), this.allowStrike && t.push(An), this.allowUnderline && t.push(In), this.placeholder && t.push(
3442
+ xn.configure({ placeholder: this.placeholder })
3565
3443
  );
3566
- const e = this, o = on.create({
3444
+ const e = this, n = sn.create({
3567
3445
  addKeyboardShortcuts() {
3568
3446
  return {
3569
- "Shift-Enter": ({ editor: n }) => e.allowLineBreaks ? !1 : (n.commands.first(({ commands: i }) => [
3570
- () => i.newlineInCode(),
3571
- () => e.allowBulletList && i.splitListItem("listItem"),
3572
- () => i.createParagraphNear(),
3573
- () => i.liftEmptyBlock(),
3574
- () => i.splitBlock()
3447
+ "Shift-Enter": ({ editor: i }) => e.allowLineBreaks ? !1 : (i.commands.first(({ commands: o }) => [
3448
+ () => o.newlineInCode(),
3449
+ () => e.allowBulletList && o.splitListItem("listItem"),
3450
+ () => o.createParagraphNear(),
3451
+ () => o.liftEmptyBlock(),
3452
+ () => o.splitBlock()
3575
3453
  ]), !0),
3576
3454
  Enter: () => e.allowLineBreaks ? !1 : (e.$emit("enter"), !0)
3577
3455
  };
3578
3456
  }
3579
3457
  });
3580
- if (t.push(o), this.link && t.push(Sn.extend({
3458
+ if (t.push(n), this.link && t.push(Ln.extend({
3581
3459
  inclusive: !1,
3582
3460
  addKeyboardShortcuts() {
3583
3461
  return {
@@ -3590,55 +3468,55 @@ ${this.processNodeContent(t)}
3590
3468
  },
3591
3469
  openOnClick: !1,
3592
3470
  autolink: !0,
3593
- protocols: Kt
3594
- })), this.customLink && t.push(this.getExtension(Xi, this.customLink)), this.mentionSuggestion) {
3595
- const n = { ...this.mentionSuggestion, ...Ts };
3596
- t.push(es.configure({ suggestion: n }));
3471
+ protocols: Wt
3472
+ })), this.customLink && t.push(this.getExtension(Yo, this.customLink)), this.mentionSuggestion) {
3473
+ const i = { ...this.mentionSuggestion, ..._s };
3474
+ t.push(ns.configure({ suggestion: i }));
3597
3475
  }
3598
3476
  if (this.channelSuggestion) {
3599
- const n = { ...this.channelSuggestion, ...Os };
3600
- t.push(ss.configure({ suggestion: n }));
3477
+ const i = { ...this.channelSuggestion, ...ks };
3478
+ t.push(rs.configure({ suggestion: i }));
3601
3479
  }
3602
3480
  if (this.slashCommandSuggestion) {
3603
- const n = { ...this.slashCommandSuggestion, ...Rs };
3604
- t.push(ds.configure({
3605
- suggestion: n,
3606
- onSelectedCommand: (i) => {
3607
- this.$emit("selected-command", i);
3481
+ const i = { ...this.slashCommandSuggestion, ...Ms };
3482
+ t.push(us.configure({
3483
+ suggestion: i,
3484
+ onSelectedCommand: (o) => {
3485
+ this.$emit("selected-command", o);
3608
3486
  }
3609
3487
  }));
3610
3488
  }
3611
- return this.allowVariable && t.push(ms.configure({
3489
+ return this.allowVariable && t.push(gs.configure({
3612
3490
  variableItems: this.variableItems
3613
- })), t.push(Ui), t.push(Dn.configure({
3491
+ })), t.push(zo), t.push(Rn.configure({
3614
3492
  types: ["paragraph"]
3615
- })), this.allowCode && t.push(yn), this.allowCodeblock && t.push(gn.extend({
3616
- renderText({ node: n }) {
3493
+ })), this.allowCode && t.push(wn), this.allowCodeblock && t.push(yn.extend({
3494
+ renderText({ node: i }) {
3617
3495
  return `\`\`\`
3618
- ${n.textContent}
3496
+ ${i.textContent}
3619
3497
  \`\`\``;
3620
3498
  }
3621
3499
  }).configure({
3622
3500
  HTMLAttributes: {
3623
3501
  class: "d-rich-text-editor__code-block"
3624
3502
  }
3625
- })), this.allowInlineImages && t.push(Yi.configure({
3503
+ })), this.allowInlineImages && t.push(Go.configure({
3626
3504
  resize: {
3627
3505
  enabled: this.allowImageResize,
3628
3506
  alwaysPreserveAspectRatio: !0
3629
3507
  }
3630
- })), (this.allowFontFamily || this.allowFontColor || this.allowFontSize || this.allowBackgroundColor || this.allowLineHeight) && (t.push(Nn.configure({
3508
+ })), (this.allowFontFamily || this.allowFontColor || this.allowFontSize || this.allowBackgroundColor || this.allowLineHeight) && (t.push(Un.configure({
3631
3509
  color: this.allowFontColor,
3632
3510
  backgroundColor: this.allowBackgroundColor,
3633
3511
  fontFamily: this.allowFontFamily,
3634
3512
  fontSize: this.allowFontSize,
3635
3513
  lineHeight: this.allowLineHeight
3636
- })), t.push(ui)), this.additionalExtensions.length && t.push(...this.additionalExtensions), this.allowTables && t.push(
3637
- ai.configure({ resizable: !0 }),
3638
- li,
3639
- di,
3640
- ci,
3641
- xn
3514
+ })), t.push(ho)), this.additionalExtensions.length && t.push(...this.additionalExtensions), this.allowTables && t.push(
3515
+ ao.configure({ resizable: !0 }),
3516
+ lo,
3517
+ uo,
3518
+ co,
3519
+ Tn
3642
3520
  ), t;
3643
3521
  },
3644
3522
  inputAttrs() {
@@ -3679,11 +3557,11 @@ ${n.textContent}
3679
3557
  this.destroyEditor();
3680
3558
  },
3681
3559
  mounted() {
3682
- qn(Ft(this.$el), this.$options.name), this.processValue(this.modelValue, !1);
3560
+ Xn(jt(this.$el), this.$options.name), this.processValue(this.modelValue, !1);
3683
3561
  },
3684
3562
  methods: {
3685
3563
  createEditor() {
3686
- this.editor = new We({
3564
+ this.editor = new qe({
3687
3565
  autofocus: this.autoFocus,
3688
3566
  content: this.modelValue,
3689
3567
  editable: this.editable,
@@ -3699,12 +3577,12 @@ ${n.textContent}
3699
3577
  },
3700
3578
  handleKeyDown: (t, e) => {
3701
3579
  if (!this.preventTyping) return !1;
3702
- const o = ["Backspace"];
3703
- return !this.allowLineBreaks && !e.shiftKey && o.push("Enter"), !o.includes(e.key);
3580
+ const n = ["Backspace"];
3581
+ return !this.allowLineBreaks && !e.shiftKey && n.push("Enter"), !n.includes(e.key);
3704
3582
  },
3705
3583
  handlePaste: (t, e) => {
3706
- const o = e.clipboardData || window.clipboardData, n = o.getData("text/plain"), i = o.getData("text/html");
3707
- return this.processPasteData(t, n, i);
3584
+ const n = e.clipboardData || window.clipboardData, i = n.getData("text/plain"), o = n.getData("text/html");
3585
+ return this.processPasteData(t, i, o);
3708
3586
  },
3709
3587
  // Moves the <br /> tags inside the previous closing tag to avoid
3710
3588
  // Prosemirror wrapping them within another </p> tag.
@@ -3724,7 +3602,7 @@ ${n.textContent}
3724
3602
  */
3725
3603
  getSelectedLinkText(t) {
3726
3604
  var a, l, u;
3727
- const { view: e, state: o } = t, { from: n, to: i } = e.state.selection, s = o.doc.textBetween(n, i, ""), r = this.editor.state.doc.nodeAt(n);
3605
+ const { view: e, state: n } = t, { from: i, to: o } = e.state.selection, s = n.doc.textBetween(i, o, ""), r = this.editor.state.doc.nodeAt(i);
3728
3606
  return r && ((u = (l = (a = r.marks) == null ? void 0 : a.at(0)) == null ? void 0 : l.type) == null ? void 0 : u.name) === "link" ? r.textContent : s;
3729
3607
  },
3730
3608
  editLink() {
@@ -3735,32 +3613,32 @@ ${n.textContent}
3735
3613
  this.$emit("edit-link", e);
3736
3614
  },
3737
3615
  removeLink() {
3738
- var t, e, o, n;
3739
- (n = (o = (e = (t = this.editor) == null ? void 0 : t.chain()) == null ? void 0 : e.focus()) == null ? void 0 : o.unsetLink()) == null || n.run();
3616
+ var t, e, n, i;
3617
+ (i = (n = (e = (t = this.editor) == null ? void 0 : t.chain()) == null ? void 0 : e.focus()) == null ? void 0 : n.unsetLink()) == null || i.run();
3740
3618
  },
3741
3619
  openLink() {
3742
- var e, o;
3743
- (o = (e = this.editor) == null ? void 0 : e.chain()) == null || o.focus();
3620
+ var e, n;
3621
+ (n = (e = this.editor) == null ? void 0 : e.chain()) == null || n.focus();
3744
3622
  const t = this.editor.getAttributes("link").href;
3745
3623
  window.open(t, "_blank");
3746
3624
  },
3747
- setLink(t, e, o, n = Kt, i) {
3625
+ setLink(t, e, n, i = Wt, o) {
3748
3626
  var a, l, u;
3749
3627
  if (!t) {
3750
3628
  this.removeLink();
3751
3629
  return;
3752
3630
  }
3753
- n.find((d) => d.test(t)) || (t = `${i}${t}`), this.editor.chain().focus().extendMarkRange("link").run();
3631
+ i.find((d) => d.test(t)) || (t = `${o}${t}`), this.editor.chain().focus().extendMarkRange("link").run();
3754
3632
  const r = (u = (l = (a = this.editor) == null ? void 0 : a.view) == null ? void 0 : l.state) == null ? void 0 : u.selection;
3755
- this.editor.chain().focus().insertContent(e).setTextSelection({ from: r.from, to: r.from + e.length }).setLink({ href: t, class: o.class }).run();
3633
+ this.editor.chain().focus().insertContent(e).setTextSelection({ from: r.from, to: r.from + e.length }).setLink({ href: t, class: n.class }).run();
3756
3634
  },
3757
3635
  processValue(t, e = !0) {
3758
3636
  if (!this.editor) return;
3759
- const o = this.getOutput();
3760
- if (!(e && io(t, o))) {
3637
+ const n = this.getOutput();
3638
+ if (!(e && si(t, n))) {
3761
3639
  if (typeof t == "string" && this.outputFormat === "text") {
3762
- const n = new RegExp(`(${ye})`, "g");
3763
- t = t == null ? void 0 : t.replace(n, '<emoji-component code="$1"></emoji-component>');
3640
+ const i = new RegExp(`(${we})`, "g");
3641
+ t = t == null ? void 0 : t.replace(i, '<emoji-component code="$1"></emoji-component>');
3764
3642
  }
3765
3643
  this.editor.commands.setContent(t, {
3766
3644
  emitUpdate: !1,
@@ -3772,24 +3650,24 @@ ${n.textContent}
3772
3650
  this.editor.destroy();
3773
3651
  },
3774
3652
  insertPlainTextWithHardBreaks(t, e) {
3775
- const i = (this.pasteRichText ? e : e.replace(/\r\n/g, `
3653
+ const o = (this.pasteRichText ? e : e.replace(/\r\n/g, `
3776
3654
  `).replace(/\n\n/g, `
3777
3655
  `)).replace(/[\r\n]+$/, "").split(/\r?\n/), s = [];
3778
- for (let r = 0; r < i.length; r++)
3779
- r > 0 && s.push({ type: "hardBreak" }), i[r] && s.push({ type: "text", text: i[r] });
3656
+ for (let r = 0; r < o.length; r++)
3657
+ r > 0 && s.push({ type: "hardBreak" }), o[r] && s.push({ type: "text", text: o[r] });
3780
3658
  this.editor.chain().focus().insertContent(s).run();
3781
3659
  },
3782
3660
  shouldPreserveLineBreaks(t, e) {
3783
3661
  return this.pasteRichText ? !e && t && this.hasBlankLines(t) : !!t;
3784
3662
  },
3785
- processPasteData(t, e, o) {
3786
- if (this.shouldPreserveLineBreaks(e, o))
3663
+ processPasteData(t, e, n) {
3664
+ if (this.shouldPreserveLineBreaks(e, n))
3787
3665
  return this.insertPlainTextWithHardBreaks(t, e), !0;
3788
- if (this.shouldHandlePreformattedHTML(o)) {
3789
- const n = this.extractPreformattedText(o);
3790
- if (n && n.includes(`
3666
+ if (this.shouldHandlePreformattedHTML(n)) {
3667
+ const i = this.extractPreformattedText(n);
3668
+ if (i && i.includes(`
3791
3669
  `))
3792
- return this.insertPlainTextWithHardBreaks(t, n), !0;
3670
+ return this.insertPlainTextWithHardBreaks(t, i), !0;
3793
3671
  }
3794
3672
  return !1;
3795
3673
  },
@@ -3799,15 +3677,15 @@ ${n.textContent}
3799
3677
  containsPreformattedContent(t) {
3800
3678
  const e = document.createElement("div");
3801
3679
  e.innerHTML = t;
3802
- const o = e.querySelectorAll("*");
3803
- for (const n of o)
3804
- if (this.hasPreWhitespace(n) && this.hasLineBreaks(n))
3680
+ const n = e.querySelectorAll("*");
3681
+ for (const i of n)
3682
+ if (this.hasPreWhitespace(i) && this.hasLineBreaks(i))
3805
3683
  return !0;
3806
3684
  return !1;
3807
3685
  },
3808
3686
  hasPreWhitespace(t) {
3809
- const e = t.getAttribute("style") || "", o = t.style.whiteSpace || "", n = o === "pre" || o === "pre-wrap", i = e.includes("white-space: pre");
3810
- return n || i;
3687
+ const e = t.getAttribute("style") || "", n = t.style.whiteSpace || "", i = n === "pre" || n === "pre-wrap", o = e.includes("white-space: pre");
3688
+ return i || o;
3811
3689
  },
3812
3690
  hasLineBreaks(t) {
3813
3691
  return t.textContent && t.textContent.includes(`
@@ -3830,8 +3708,8 @@ ${n.textContent}
3830
3708
  if (this.hasPreWhitespace(t))
3831
3709
  e += t.textContent;
3832
3710
  else
3833
- for (const o of t.childNodes)
3834
- e += this.walkAndExtractText(o);
3711
+ for (const n of t.childNodes)
3712
+ e += this.walkAndExtractText(n);
3835
3713
  return e;
3836
3714
  },
3837
3715
  triggerInputChangeEvents() {
@@ -3839,13 +3717,13 @@ ${n.textContent}
3839
3717
  this.$emit("input", t), this.$emit("update:modelValue", t);
3840
3718
  const e = this.editor.getJSON();
3841
3719
  this.$emit("json-input", e);
3842
- const o = this.editor.getHTML();
3843
- this.$emit("html-input", o);
3844
- const n = this.editor.getText({ blockSeparator: `
3720
+ const n = this.editor.getHTML();
3721
+ this.$emit("html-input", n);
3722
+ const i = this.editor.getText({ blockSeparator: `
3845
3723
  ` });
3846
- this.$emit("text-input", n);
3847
- const i = this.jsonToMarkdownConverter.convertToMarkdown(e);
3848
- this.$emit("markdown-input", i);
3724
+ this.$emit("text-input", i);
3725
+ const o = Kt(e, this.extensions);
3726
+ this.$emit("markdown-input", o);
3849
3727
  },
3850
3728
  /**
3851
3729
  * The Editor exposes event hooks that we have to map our emits into. See
@@ -3879,7 +3757,7 @@ ${n.textContent}
3879
3757
  case "html":
3880
3758
  return this.editor.getHTML();
3881
3759
  case "markdown":
3882
- return this.jsonToMarkdownConverter.convertToMarkdown(this.editor.getJSON());
3760
+ return Kt(this.editor.getJSON(), this.extensions);
3883
3761
  case "text":
3884
3762
  default:
3885
3763
  return this.editor.getText({ blockSeparator: `
@@ -3887,8 +3765,8 @@ ${n.textContent}
3887
3765
  }
3888
3766
  },
3889
3767
  getExtension(t, e) {
3890
- var o;
3891
- return typeof e == "boolean" ? t : (o = t.configure) == null ? void 0 : o.call(t, e);
3768
+ var n;
3769
+ return typeof e == "boolean" ? t : (n = t.configure) == null ? void 0 : n.call(t, e);
3892
3770
  },
3893
3771
  updateEditorAttributes(t) {
3894
3772
  this.editor.setOptions({
@@ -3905,20 +3783,20 @@ ${n.textContent}
3905
3783
  this.editor.commands.focus();
3906
3784
  }
3907
3785
  }
3908
- }, Hs = { class: "d-popover__dialog" };
3909
- function $s(t, e, o, n, i, s) {
3786
+ }, Bs = { class: "d-popover__dialog" };
3787
+ function $s(t, e, n, i, o, s) {
3910
3788
  const r = T("dt-button"), a = T("dt-stack"), l = T("bubble-menu"), u = T("editor-content");
3911
3789
  return _(), et("div", null, [
3912
- i.editor && o.link && !o.hideLinkBubbleMenu ? (_(), A(l, {
3790
+ o.editor && n.link && !n.hideLinkBubbleMenu ? (_(), A(l, {
3913
3791
  key: 0,
3914
- editor: i.editor,
3792
+ editor: o.editor,
3915
3793
  "should-show": s.bubbleMenuShouldShow,
3916
- options: i.floatingOptions,
3917
- "append-to": i.appendTo,
3794
+ options: o.floatingOptions,
3795
+ "append-to": o.appendTo,
3918
3796
  style: { visibility: "visible" }
3919
3797
  }, {
3920
3798
  default: C(() => [
3921
- nt("div", Hs, [
3799
+ nt("div", Bs, [
3922
3800
  M(a, {
3923
3801
  direction: "row",
3924
3802
  class: "d-rich-text-editor-bubble-menu__button-stack",
@@ -3931,7 +3809,7 @@ function $s(t, e, o, n, i, s) {
3931
3809
  onClick: s.editLink
3932
3810
  }, {
3933
3811
  default: C(() => [
3934
- lt($(i.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL")), 1)
3812
+ lt(B(o.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL")), 1)
3935
3813
  ]),
3936
3814
  _: 1
3937
3815
  }, 8, ["onClick"]),
@@ -3941,7 +3819,7 @@ function $s(t, e, o, n, i, s) {
3941
3819
  onClick: s.openLink
3942
3820
  }, {
3943
3821
  default: C(() => [
3944
- lt($(i.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL")), 1)
3822
+ lt(B(o.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL")), 1)
3945
3823
  ]),
3946
3824
  _: 1
3947
3825
  }, 8, ["onClick"]),
@@ -3951,7 +3829,7 @@ function $s(t, e, o, n, i, s) {
3951
3829
  onClick: s.removeLink
3952
3830
  }, {
3953
3831
  default: C(() => [
3954
- lt($(i.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL")), 1)
3832
+ lt(B(o.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL")), 1)
3955
3833
  ]),
3956
3834
  _: 1
3957
3835
  }, 8, ["onClick"])
@@ -3962,16 +3840,16 @@ function $s(t, e, o, n, i, s) {
3962
3840
  ]),
3963
3841
  _: 1
3964
3842
  }, 8, ["editor", "should-show", "options", "append-to"])) : rt("", !0),
3965
- M(u, me({
3843
+ M(u, ge({
3966
3844
  ref: "editor",
3967
- editor: i.editor,
3845
+ editor: o.editor,
3968
3846
  class: "d-rich-text-editor",
3969
3847
  "data-qa": "dt-rich-text-editor"
3970
3848
  }, s.attrs), null, 16, ["editor"])
3971
3849
  ]);
3972
3850
  }
3973
- const Er = /* @__PURE__ */ q(Ms, [["render", $s]]);
3851
+ const Lr = /* @__PURE__ */ q(Hs, [["render", $s]]);
3974
3852
  export {
3975
- Er as default
3853
+ Lr as default
3976
3854
  };
3977
3855
  //# sourceMappingURL=rich-text-editor.js.map