@dialpad/dialtone 9.172.0 → 9.173.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.
- package/README.md +8 -8
- package/dist/css/dialtone-default-theme.css +7 -8
- package/dist/css/dialtone-default-theme.min.css +1 -1
- package/dist/css/dialtone.css +7 -8
- package/dist/css/dialtone.min.css +1 -1
- package/dist/tokens/doc.json +94581 -94581
- package/dist/vue3/lib/loader/loader.cjs +10 -2
- package/dist/vue3/lib/loader/loader.cjs.map +1 -1
- package/dist/vue3/lib/loader/loader.js +34 -16
- package/dist/vue3/lib/loader/loader.js.map +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs +4 -4
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.cjs.map +1 -1
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js +632 -563
- package/dist/vue3/lib/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/vue3/types/components/loader/loader.vue.d.ts.map +1 -1
- package/dist/vue3/types/components/rich_text_editor/extensions/table/table.d.ts +5 -0
- package/dist/vue3/types/components/rich_text_editor/extensions/table/table.d.ts.map +1 -0
- package/dist/vue3/types/components/rich_text_editor/extensions/text_style/text_style.d.ts +2 -0
- package/dist/vue3/types/components/rich_text_editor/extensions/text_style/text_style.d.ts.map +1 -0
- package/package.json +12 -2
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
import { nodeViewProps as
|
|
2
|
-
import { isTextSelection as
|
|
3
|
-
import { Plugin as It, PluginKey as
|
|
4
|
-
import { CellSelection as
|
|
5
|
-
import { defineComponent as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { UndoRedo as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import { BulletList as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import { Table as
|
|
22
|
-
import { TextStyleKit as
|
|
23
|
-
import
|
|
24
|
-
import { emojiPattern as
|
|
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 nt, withDirectives as ln, createElementVNode as ot, 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";
|
|
25
25
|
import { _ as q } from "../../_plugin-vue_export-helper-CHgC5LLL.js";
|
|
26
|
-
import
|
|
27
|
-
import { getEmojiData as
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import { linkRegex as
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import { DtIconLock as
|
|
35
|
-
import { DialtoneLocalization as
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import { RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
const
|
|
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";
|
|
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";
|
|
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) => ({
|
|
46
46
|
x: t,
|
|
47
47
|
y: t
|
|
48
|
-
}),
|
|
48
|
+
}), so = {
|
|
49
49
|
left: "right",
|
|
50
50
|
right: "left",
|
|
51
51
|
bottom: "top",
|
|
52
52
|
top: "bottom"
|
|
53
|
-
},
|
|
53
|
+
}, ro = {
|
|
54
54
|
start: "end",
|
|
55
55
|
end: "start"
|
|
56
56
|
};
|
|
57
|
-
function
|
|
57
|
+
function Lt(t, e, o) {
|
|
58
58
|
return R(t, G(e, o));
|
|
59
59
|
}
|
|
60
60
|
function Z(t, e) {
|
|
@@ -66,54 +66,54 @@ function j(t) {
|
|
|
66
66
|
function F(t) {
|
|
67
67
|
return t.split("-")[1];
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function _e(t) {
|
|
70
70
|
return t === "x" ? "y" : "x";
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Ht(t) {
|
|
73
73
|
return t === "y" ? "height" : "width";
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const ao = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
76
76
|
function X(t) {
|
|
77
|
-
return
|
|
77
|
+
return ao.has(j(t)) ? "y" : "x";
|
|
78
78
|
}
|
|
79
|
-
function
|
|
80
|
-
return
|
|
79
|
+
function $t(t) {
|
|
80
|
+
return _e(X(t));
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function ke(t, e, o) {
|
|
83
83
|
o === void 0 && (o = !1);
|
|
84
|
-
const n = F(t), i =
|
|
84
|
+
const n = F(t), i = $t(t), s = Ht(i);
|
|
85
85
|
let r = i === "x" ? n === (o ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
|
|
86
|
-
return e.reference[s] > e.floating[s] && (r =
|
|
86
|
+
return e.reference[s] > e.floating[s] && (r = xt(r)), [r, xt(r)];
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
const e =
|
|
90
|
-
return [
|
|
88
|
+
function lo(t) {
|
|
89
|
+
const e = xt(t);
|
|
90
|
+
return [vt(t), e, vt(e)];
|
|
91
91
|
}
|
|
92
|
-
function
|
|
93
|
-
return t.replace(/start|end/g, (e) =>
|
|
92
|
+
function vt(t) {
|
|
93
|
+
return t.replace(/start|end/g, (e) => ro[e]);
|
|
94
94
|
}
|
|
95
|
-
const
|
|
96
|
-
function
|
|
95
|
+
const Xt = ["left", "right"], Yt = ["right", "left"], co = ["top", "bottom"], uo = ["bottom", "top"];
|
|
96
|
+
function ho(t, e, o) {
|
|
97
97
|
switch (t) {
|
|
98
98
|
case "top":
|
|
99
99
|
case "bottom":
|
|
100
|
-
return o ? e ?
|
|
100
|
+
return o ? e ? Yt : Xt : e ? Xt : Yt;
|
|
101
101
|
case "left":
|
|
102
102
|
case "right":
|
|
103
|
-
return e ?
|
|
103
|
+
return e ? co : uo;
|
|
104
104
|
default:
|
|
105
105
|
return [];
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function fo(t, e, o, n) {
|
|
109
109
|
const i = F(t);
|
|
110
|
-
let s =
|
|
111
|
-
return i && (s = s.map((r) => r + "-" + i), e && (s = s.concat(s.map(
|
|
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;
|
|
112
112
|
}
|
|
113
|
-
function
|
|
114
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
113
|
+
function xt(t) {
|
|
114
|
+
return t.replace(/left|right|bottom|top/g, (e) => so[e]);
|
|
115
115
|
}
|
|
116
|
-
function
|
|
116
|
+
function po(t) {
|
|
117
117
|
return {
|
|
118
118
|
top: 0,
|
|
119
119
|
right: 0,
|
|
@@ -122,15 +122,15 @@ function uo(t) {
|
|
|
122
122
|
...t
|
|
123
123
|
};
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
return typeof t != "number" ?
|
|
125
|
+
function Bt(t) {
|
|
126
|
+
return typeof t != "number" ? po(t) : {
|
|
127
127
|
top: t,
|
|
128
128
|
right: t,
|
|
129
129
|
bottom: t,
|
|
130
130
|
left: t
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
|
-
function
|
|
133
|
+
function dt(t) {
|
|
134
134
|
const {
|
|
135
135
|
x: e,
|
|
136
136
|
y: o,
|
|
@@ -148,12 +148,12 @@ function ct(t) {
|
|
|
148
148
|
y: o
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function Gt(t, e, o) {
|
|
152
152
|
let {
|
|
153
153
|
reference: n,
|
|
154
154
|
floating: i
|
|
155
155
|
} = t;
|
|
156
|
-
const s = X(e), r =
|
|
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
157
|
let f;
|
|
158
158
|
switch (l) {
|
|
159
159
|
case "top":
|
|
@@ -196,7 +196,7 @@ function Yt(t, e, o) {
|
|
|
196
196
|
}
|
|
197
197
|
return f;
|
|
198
198
|
}
|
|
199
|
-
async function
|
|
199
|
+
async function mo(t, e) {
|
|
200
200
|
var o;
|
|
201
201
|
e === void 0 && (e = {});
|
|
202
202
|
const {
|
|
@@ -212,7 +212,7 @@ async function ho(t, e) {
|
|
|
212
212
|
elementContext: c = "floating",
|
|
213
213
|
altBoundary: h = !1,
|
|
214
214
|
padding: f = 0
|
|
215
|
-
} = Z(e, t), p =
|
|
215
|
+
} = Z(e, t), p = Bt(f), g = a[h ? c === "floating" ? "reference" : "floating" : c], y = dt(await s.getClippingRect({
|
|
216
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)),
|
|
217
217
|
boundary: u,
|
|
218
218
|
rootBoundary: d,
|
|
@@ -228,7 +228,7 @@ async function ho(t, e) {
|
|
|
228
228
|
} : {
|
|
229
229
|
x: 1,
|
|
230
230
|
y: 1
|
|
231
|
-
}, O =
|
|
231
|
+
}, O = dt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
232
232
|
elements: a,
|
|
233
233
|
rect: b,
|
|
234
234
|
offsetParent: v,
|
|
@@ -241,7 +241,7 @@ async function ho(t, e) {
|
|
|
241
241
|
right: (O.right - y.right + p.right) / x.x
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
|
-
const
|
|
244
|
+
const go = async (t, e, o) => {
|
|
245
245
|
const {
|
|
246
246
|
placement: n = "bottom",
|
|
247
247
|
strategy: i = "absolute",
|
|
@@ -255,7 +255,7 @@ const fo = async (t, e, o) => {
|
|
|
255
255
|
}), {
|
|
256
256
|
x: d,
|
|
257
257
|
y: c
|
|
258
|
-
} =
|
|
258
|
+
} = Gt(u, n, l), h = n, f = {}, p = 0;
|
|
259
259
|
for (let g = 0; g < a.length; g++) {
|
|
260
260
|
var m;
|
|
261
261
|
const {
|
|
@@ -276,7 +276,7 @@ const fo = async (t, e, o) => {
|
|
|
276
276
|
rects: u,
|
|
277
277
|
platform: {
|
|
278
278
|
...r,
|
|
279
|
-
detectOverflow: (m = r.detectOverflow) != null ? m :
|
|
279
|
+
detectOverflow: (m = r.detectOverflow) != null ? m : mo
|
|
280
280
|
},
|
|
281
281
|
elements: {
|
|
282
282
|
reference: t,
|
|
@@ -296,7 +296,7 @@ const fo = async (t, e, o) => {
|
|
|
296
296
|
}) : k.rects), {
|
|
297
297
|
x: d,
|
|
298
298
|
y: c
|
|
299
|
-
} =
|
|
299
|
+
} = Gt(u, h, l)), g = -1);
|
|
300
300
|
}
|
|
301
301
|
return {
|
|
302
302
|
x: d,
|
|
@@ -305,7 +305,7 @@ const fo = async (t, e, o) => {
|
|
|
305
305
|
strategy: i,
|
|
306
306
|
middlewareData: f
|
|
307
307
|
};
|
|
308
|
-
},
|
|
308
|
+
}, yo = (t) => ({
|
|
309
309
|
name: "arrow",
|
|
310
310
|
options: t,
|
|
311
311
|
async fn(e) {
|
|
@@ -323,13 +323,13 @@ const fo = async (t, e, o) => {
|
|
|
323
323
|
} = Z(t, e) || {};
|
|
324
324
|
if (u == null)
|
|
325
325
|
return {};
|
|
326
|
-
const c =
|
|
326
|
+
const c = Bt(d), h = {
|
|
327
327
|
x: o,
|
|
328
328
|
y: n
|
|
329
|
-
}, f =
|
|
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
330
|
let L = k ? k[v] : 0;
|
|
331
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,
|
|
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;
|
|
333
333
|
return {
|
|
334
334
|
[f]: h[f] + B,
|
|
335
335
|
data: {
|
|
@@ -343,10 +343,10 @@ const fo = async (t, e, o) => {
|
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
345
|
});
|
|
346
|
-
function
|
|
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 ?
|
|
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);
|
|
348
348
|
}
|
|
349
|
-
const
|
|
349
|
+
const bo = function(t) {
|
|
350
350
|
return t === void 0 && (t = {}), {
|
|
351
351
|
name: "autoPlacement",
|
|
352
352
|
options: t,
|
|
@@ -361,13 +361,13 @@ const go = function(t) {
|
|
|
361
361
|
} = e, {
|
|
362
362
|
crossAxis: d = !1,
|
|
363
363
|
alignment: c,
|
|
364
|
-
allowedPlacements: h =
|
|
364
|
+
allowedPlacements: h = qt,
|
|
365
365
|
autoAlignment: f = !0,
|
|
366
366
|
...p
|
|
367
|
-
} = Z(t, e), m = c !== void 0 || h ===
|
|
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
368
|
if (b == null)
|
|
369
369
|
return {};
|
|
370
|
-
const v =
|
|
370
|
+
const v = ke(b, s, await (l.isRTL == null ? void 0 : l.isRTL(u.floating)));
|
|
371
371
|
if (a !== b)
|
|
372
372
|
return {
|
|
373
373
|
reset: {
|
|
@@ -397,24 +397,24 @@ const go = function(t) {
|
|
|
397
397
|
// Check only the mainAxis.
|
|
398
398
|
w.overflows[0]
|
|
399
399
|
), w.overflows];
|
|
400
|
-
}).sort((w, E) => w[1] - E[1]),
|
|
400
|
+
}).sort((w, E) => w[1] - E[1]), I = ((i = L.filter((w) => w[2].slice(
|
|
401
401
|
0,
|
|
402
402
|
// Aligned placements should not check their opposite crossAxis
|
|
403
403
|
// side.
|
|
404
404
|
F(w[0]) ? 2 : 3
|
|
405
405
|
).every((E) => E <= 0))[0]) == null ? void 0 : i[0]) || L[0][0];
|
|
406
|
-
return
|
|
406
|
+
return I !== a ? {
|
|
407
407
|
data: {
|
|
408
408
|
index: y + 1,
|
|
409
409
|
overflows: O
|
|
410
410
|
},
|
|
411
411
|
reset: {
|
|
412
|
-
placement:
|
|
412
|
+
placement: I
|
|
413
413
|
}
|
|
414
414
|
} : {};
|
|
415
415
|
}
|
|
416
416
|
};
|
|
417
|
-
},
|
|
417
|
+
}, vo = function(t) {
|
|
418
418
|
return t === void 0 && (t = {}), {
|
|
419
419
|
name: "flip",
|
|
420
420
|
options: t,
|
|
@@ -438,18 +438,18 @@ const go = function(t) {
|
|
|
438
438
|
} = Z(t, e);
|
|
439
439
|
if ((o = s.arrow) != null && o.alignmentOffset)
|
|
440
440
|
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 ? [
|
|
442
|
-
!h && k && O.push(...
|
|
443
|
-
const L = [a, ...O], U = await l.detectOverflow(e, g),
|
|
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
444
|
let w = ((n = s.flip) == null ? void 0 : n.overflows) || [];
|
|
445
|
-
if (d &&
|
|
446
|
-
const S =
|
|
447
|
-
|
|
445
|
+
if (d && I.push(U[y]), c) {
|
|
446
|
+
const S = ke(i, r, x);
|
|
447
|
+
I.push(U[S[0]], U[S[1]]);
|
|
448
448
|
}
|
|
449
449
|
if (w = [...w, {
|
|
450
450
|
placement: i,
|
|
451
|
-
overflows:
|
|
452
|
-
}], !
|
|
451
|
+
overflows: I
|
|
452
|
+
}], !I.every((S) => S <= 0)) {
|
|
453
453
|
var E, D;
|
|
454
454
|
const S = (((E = s.flip) == null ? void 0 : E.index) || 0) + 1, z = L[S];
|
|
455
455
|
if (z && (!(c === "alignment" ? b !== X(z) : !1) || // We leave the current main axis only if every placement on that axis
|
|
@@ -477,7 +477,7 @@ const go = function(t) {
|
|
|
477
477
|
tt === "y";
|
|
478
478
|
}
|
|
479
479
|
return !0;
|
|
480
|
-
}).map((N) => [N.placement, N.overflows.filter((tt) => tt > 0).reduce((tt,
|
|
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
481
|
B && (V = B);
|
|
482
482
|
break;
|
|
483
483
|
}
|
|
@@ -496,7 +496,7 @@ const go = function(t) {
|
|
|
496
496
|
}
|
|
497
497
|
};
|
|
498
498
|
};
|
|
499
|
-
function
|
|
499
|
+
function Jt(t, e) {
|
|
500
500
|
return {
|
|
501
501
|
top: t.top - e.height,
|
|
502
502
|
right: t.right - e.width,
|
|
@@ -504,10 +504,10 @@ function Gt(t, e) {
|
|
|
504
504
|
left: t.left - e.width
|
|
505
505
|
};
|
|
506
506
|
}
|
|
507
|
-
function
|
|
508
|
-
return
|
|
507
|
+
function Zt(t) {
|
|
508
|
+
return Te.some((e) => t[e] >= 0);
|
|
509
509
|
}
|
|
510
|
-
const
|
|
510
|
+
const xo = function(t) {
|
|
511
511
|
return t === void 0 && (t = {}), {
|
|
512
512
|
name: "hide",
|
|
513
513
|
options: t,
|
|
@@ -524,11 +524,11 @@ const wo = function(t) {
|
|
|
524
524
|
const r = await n.detectOverflow(e, {
|
|
525
525
|
...s,
|
|
526
526
|
elementContext: "reference"
|
|
527
|
-
}), a =
|
|
527
|
+
}), a = Jt(r, o.reference);
|
|
528
528
|
return {
|
|
529
529
|
data: {
|
|
530
530
|
referenceHiddenOffsets: a,
|
|
531
|
-
referenceHidden:
|
|
531
|
+
referenceHidden: Zt(a)
|
|
532
532
|
}
|
|
533
533
|
};
|
|
534
534
|
}
|
|
@@ -536,11 +536,11 @@ const wo = function(t) {
|
|
|
536
536
|
const r = await n.detectOverflow(e, {
|
|
537
537
|
...s,
|
|
538
538
|
altBoundary: !0
|
|
539
|
-
}), a =
|
|
539
|
+
}), a = Jt(r, o.floating);
|
|
540
540
|
return {
|
|
541
541
|
data: {
|
|
542
542
|
escapedOffsets: a,
|
|
543
|
-
escaped:
|
|
543
|
+
escaped: Zt(a)
|
|
544
544
|
}
|
|
545
545
|
};
|
|
546
546
|
}
|
|
@@ -550,7 +550,7 @@ const wo = function(t) {
|
|
|
550
550
|
}
|
|
551
551
|
};
|
|
552
552
|
};
|
|
553
|
-
function
|
|
553
|
+
function Ce(t) {
|
|
554
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));
|
|
555
555
|
return {
|
|
556
556
|
x: e,
|
|
@@ -559,16 +559,16 @@ function ke(t) {
|
|
|
559
559
|
height: i - o
|
|
560
560
|
};
|
|
561
561
|
}
|
|
562
|
-
function
|
|
562
|
+
function To(t) {
|
|
563
563
|
const e = t.slice().sort((i, s) => i.y - s.y), o = [];
|
|
564
564
|
let n = null;
|
|
565
565
|
for (let i = 0; i < e.length; i++) {
|
|
566
566
|
const s = e[i];
|
|
567
567
|
!n || s.y - n.y > n.height / 2 ? o.push([s]) : o[o.length - 1].push(s), n = s;
|
|
568
568
|
}
|
|
569
|
-
return o.map((i) =>
|
|
569
|
+
return o.map((i) => dt(Ce(i)));
|
|
570
570
|
}
|
|
571
|
-
const
|
|
571
|
+
const _o = function(t) {
|
|
572
572
|
return t === void 0 && (t = {}), {
|
|
573
573
|
name: "inline",
|
|
574
574
|
options: t,
|
|
@@ -583,7 +583,7 @@ const vo = function(t) {
|
|
|
583
583
|
padding: a = 2,
|
|
584
584
|
x: l,
|
|
585
585
|
y: u
|
|
586
|
-
} = Z(t, e), d = Array.from(await (s.getClientRects == null ? void 0 : s.getClientRects(n.reference)) || []), c =
|
|
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
587
|
function p() {
|
|
588
588
|
if (c.length === 2 && c[0].left > c[1].right && l != null && u != null)
|
|
589
589
|
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;
|
|
@@ -601,14 +601,14 @@ const vo = function(t) {
|
|
|
601
601
|
y: H
|
|
602
602
|
};
|
|
603
603
|
}
|
|
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,
|
|
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
605
|
return {
|
|
606
606
|
top: x,
|
|
607
607
|
bottom: O,
|
|
608
608
|
left: k,
|
|
609
609
|
right: L,
|
|
610
610
|
width: U,
|
|
611
|
-
height:
|
|
611
|
+
height: I,
|
|
612
612
|
x: k,
|
|
613
613
|
y: x
|
|
614
614
|
};
|
|
@@ -629,13 +629,13 @@ const vo = function(t) {
|
|
|
629
629
|
} : {};
|
|
630
630
|
}
|
|
631
631
|
};
|
|
632
|
-
},
|
|
633
|
-
async function
|
|
632
|
+
}, ko = /* @__PURE__ */ new Set(["left", "top"]);
|
|
633
|
+
async function Co(t, e) {
|
|
634
634
|
const {
|
|
635
635
|
placement: o,
|
|
636
636
|
platform: n,
|
|
637
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 =
|
|
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);
|
|
639
639
|
let {
|
|
640
640
|
mainAxis: h,
|
|
641
641
|
crossAxis: f,
|
|
@@ -657,7 +657,7 @@ async function To(t, e) {
|
|
|
657
657
|
y: f * d
|
|
658
658
|
};
|
|
659
659
|
}
|
|
660
|
-
const
|
|
660
|
+
const Oo = function(t) {
|
|
661
661
|
return t === void 0 && (t = 0), {
|
|
662
662
|
name: "offset",
|
|
663
663
|
options: t,
|
|
@@ -668,7 +668,7 @@ const _o = function(t) {
|
|
|
668
668
|
y: s,
|
|
669
669
|
placement: r,
|
|
670
670
|
middlewareData: a
|
|
671
|
-
} = e, l = await
|
|
671
|
+
} = e, l = await Co(e, t);
|
|
672
672
|
return r === ((o = a.offset) == null ? void 0 : o.placement) && (n = a.arrow) != null && n.alignmentOffset ? {} : {
|
|
673
673
|
x: i + l.x,
|
|
674
674
|
y: s + l.y,
|
|
@@ -679,7 +679,7 @@ const _o = function(t) {
|
|
|
679
679
|
};
|
|
680
680
|
}
|
|
681
681
|
};
|
|
682
|
-
},
|
|
682
|
+
}, Eo = function(t) {
|
|
683
683
|
return t === void 0 && (t = {}), {
|
|
684
684
|
name: "shift",
|
|
685
685
|
options: t,
|
|
@@ -708,15 +708,15 @@ const _o = function(t) {
|
|
|
708
708
|
} = Z(t, e), d = {
|
|
709
709
|
x: o,
|
|
710
710
|
y: n
|
|
711
|
-
}, c = await s.detectOverflow(e, u), h = X(j(i)), f =
|
|
711
|
+
}, c = await s.detectOverflow(e, u), h = X(j(i)), f = _e(h);
|
|
712
712
|
let p = d[f], m = d[h];
|
|
713
713
|
if (r) {
|
|
714
714
|
const y = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", v = p + c[y], x = p - c[b];
|
|
715
|
-
p =
|
|
715
|
+
p = Lt(v, p, x);
|
|
716
716
|
}
|
|
717
717
|
if (a) {
|
|
718
718
|
const y = h === "y" ? "top" : "left", b = h === "y" ? "bottom" : "right", v = m + c[y], x = m - c[b];
|
|
719
|
-
m =
|
|
719
|
+
m = Lt(v, m, x);
|
|
720
720
|
}
|
|
721
721
|
const g = l.fn({
|
|
722
722
|
...e,
|
|
@@ -736,7 +736,7 @@ const _o = function(t) {
|
|
|
736
736
|
};
|
|
737
737
|
}
|
|
738
738
|
};
|
|
739
|
-
},
|
|
739
|
+
}, So = function(t) {
|
|
740
740
|
return t === void 0 && (t = {}), {
|
|
741
741
|
name: "size",
|
|
742
742
|
options: t,
|
|
@@ -768,8 +768,8 @@ const _o = function(t) {
|
|
|
768
768
|
availableWidth: U,
|
|
769
769
|
availableHeight: L
|
|
770
770
|
});
|
|
771
|
-
const
|
|
772
|
-
return p !==
|
|
771
|
+
const I = await r.getDimensions(a.floating);
|
|
772
|
+
return p !== I.width || m !== I.height ? {
|
|
773
773
|
reset: {
|
|
774
774
|
rects: !0
|
|
775
775
|
}
|
|
@@ -777,11 +777,11 @@ const _o = function(t) {
|
|
|
777
777
|
}
|
|
778
778
|
};
|
|
779
779
|
};
|
|
780
|
-
function
|
|
780
|
+
function Tt() {
|
|
781
781
|
return typeof window < "u";
|
|
782
782
|
}
|
|
783
|
-
function
|
|
784
|
-
return
|
|
783
|
+
function ht(t) {
|
|
784
|
+
return Oe(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
785
785
|
}
|
|
786
786
|
function P(t) {
|
|
787
787
|
var e;
|
|
@@ -789,37 +789,37 @@ function P(t) {
|
|
|
789
789
|
}
|
|
790
790
|
function Q(t) {
|
|
791
791
|
var e;
|
|
792
|
-
return (e = (
|
|
792
|
+
return (e = (Oe(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
793
793
|
}
|
|
794
|
-
function
|
|
795
|
-
return
|
|
794
|
+
function Oe(t) {
|
|
795
|
+
return Tt() ? t instanceof Node || t instanceof P(t).Node : !1;
|
|
796
796
|
}
|
|
797
797
|
function K(t) {
|
|
798
|
-
return
|
|
798
|
+
return Tt() ? t instanceof Element || t instanceof P(t).Element : !1;
|
|
799
799
|
}
|
|
800
800
|
function J(t) {
|
|
801
|
-
return
|
|
801
|
+
return Tt() ? t instanceof HTMLElement || t instanceof P(t).HTMLElement : !1;
|
|
802
802
|
}
|
|
803
|
-
function
|
|
804
|
-
return !
|
|
803
|
+
function Qt(t) {
|
|
804
|
+
return !Tt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof P(t).ShadowRoot;
|
|
805
805
|
}
|
|
806
|
-
const
|
|
807
|
-
function
|
|
806
|
+
const Lo = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
807
|
+
function wt(t) {
|
|
808
808
|
const {
|
|
809
809
|
overflow: e,
|
|
810
810
|
overflowX: o,
|
|
811
811
|
overflowY: n,
|
|
812
812
|
display: i
|
|
813
813
|
} = W(t);
|
|
814
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !
|
|
814
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + n + o) && !Lo.has(i);
|
|
815
815
|
}
|
|
816
|
-
const
|
|
817
|
-
function
|
|
818
|
-
return
|
|
816
|
+
const Ao = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
817
|
+
function Io(t) {
|
|
818
|
+
return Ao.has(ht(t));
|
|
819
819
|
}
|
|
820
|
-
const
|
|
821
|
-
function
|
|
822
|
-
return
|
|
820
|
+
const Do = [":popover-open", ":modal"];
|
|
821
|
+
function _t(t) {
|
|
822
|
+
return Do.some((e) => {
|
|
823
823
|
try {
|
|
824
824
|
return t.matches(e);
|
|
825
825
|
} catch {
|
|
@@ -827,33 +827,33 @@ function Tt(t) {
|
|
|
827
827
|
}
|
|
828
828
|
});
|
|
829
829
|
}
|
|
830
|
-
const
|
|
831
|
-
function
|
|
832
|
-
const e =
|
|
833
|
-
return
|
|
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));
|
|
834
834
|
}
|
|
835
|
-
function
|
|
836
|
-
let e =
|
|
837
|
-
for (; J(e) && !
|
|
838
|
-
if (
|
|
835
|
+
function $o(t) {
|
|
836
|
+
let e = it(t);
|
|
837
|
+
for (; J(e) && !ut(e); ) {
|
|
838
|
+
if (Nt(e))
|
|
839
839
|
return e;
|
|
840
|
-
if (
|
|
840
|
+
if (_t(e))
|
|
841
841
|
return null;
|
|
842
|
-
e =
|
|
842
|
+
e = it(e);
|
|
843
843
|
}
|
|
844
844
|
return null;
|
|
845
845
|
}
|
|
846
|
-
function
|
|
846
|
+
function Pt() {
|
|
847
847
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
848
848
|
}
|
|
849
|
-
const
|
|
850
|
-
function
|
|
851
|
-
return
|
|
849
|
+
const Bo = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
850
|
+
function ut(t) {
|
|
851
|
+
return Bo.has(ht(t));
|
|
852
852
|
}
|
|
853
853
|
function W(t) {
|
|
854
854
|
return P(t).getComputedStyle(t);
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function kt(t) {
|
|
857
857
|
return K(t) ? {
|
|
858
858
|
scrollLeft: t.scrollLeft,
|
|
859
859
|
scrollTop: t.scrollTop
|
|
@@ -862,111 +862,111 @@ function _t(t) {
|
|
|
862
862
|
scrollTop: t.scrollY
|
|
863
863
|
};
|
|
864
864
|
}
|
|
865
|
-
function
|
|
866
|
-
if (
|
|
865
|
+
function it(t) {
|
|
866
|
+
if (ht(t) === "html")
|
|
867
867
|
return t;
|
|
868
868
|
const e = (
|
|
869
869
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
870
870
|
t.assignedSlot || // DOM Element detected.
|
|
871
871
|
t.parentNode || // ShadowRoot detected.
|
|
872
|
-
|
|
872
|
+
Qt(t) && t.host || // Fallback.
|
|
873
873
|
Q(t)
|
|
874
874
|
);
|
|
875
|
-
return
|
|
875
|
+
return Qt(e) ? e.host : e;
|
|
876
876
|
}
|
|
877
|
-
function
|
|
878
|
-
const e =
|
|
879
|
-
return
|
|
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);
|
|
880
880
|
}
|
|
881
|
-
function
|
|
881
|
+
function Se(t, e, o) {
|
|
882
882
|
var n;
|
|
883
883
|
e === void 0 && (e = []);
|
|
884
|
-
const i =
|
|
885
|
-
return s ? e.concat(r, r.visualViewport || [],
|
|
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, []));
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function te(t) {
|
|
888
888
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function Le(t) {
|
|
891
891
|
const e = W(t);
|
|
892
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 =
|
|
893
|
+
const i = J(t), s = i ? t.offsetWidth : o, r = i ? t.offsetHeight : n, a = bt(o) !== s || bt(n) !== r;
|
|
894
894
|
return a && (o = s, n = r), {
|
|
895
895
|
width: o,
|
|
896
896
|
height: n,
|
|
897
897
|
$: a
|
|
898
898
|
};
|
|
899
899
|
}
|
|
900
|
-
function
|
|
900
|
+
function Ae(t) {
|
|
901
901
|
return K(t) ? t : t.contextElement;
|
|
902
902
|
}
|
|
903
|
-
function
|
|
904
|
-
const e =
|
|
903
|
+
function ct(t) {
|
|
904
|
+
const e = Ae(t);
|
|
905
905
|
if (!J(e))
|
|
906
906
|
return Y(1);
|
|
907
907
|
const o = e.getBoundingClientRect(), {
|
|
908
908
|
width: n,
|
|
909
909
|
height: i,
|
|
910
910
|
$: s
|
|
911
|
-
} =
|
|
912
|
-
let r = (s ?
|
|
911
|
+
} = Le(e);
|
|
912
|
+
let r = (s ? bt(o.width) : o.width) / n, a = (s ? bt(o.height) : o.height) / i;
|
|
913
913
|
return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
914
914
|
x: r,
|
|
915
915
|
y: a
|
|
916
916
|
};
|
|
917
917
|
}
|
|
918
|
-
const
|
|
918
|
+
const No = /* @__PURE__ */ Y(0);
|
|
919
919
|
function Ie(t) {
|
|
920
920
|
const e = P(t);
|
|
921
|
-
return !
|
|
921
|
+
return !Pt() || !e.visualViewport ? No : {
|
|
922
922
|
x: e.visualViewport.offsetLeft,
|
|
923
923
|
y: e.visualViewport.offsetTop
|
|
924
924
|
};
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function Po(t, e, o) {
|
|
927
927
|
return e === void 0 && (e = !1), !o || e && o !== P(t) ? !1 : e;
|
|
928
928
|
}
|
|
929
|
-
function
|
|
929
|
+
function ft(t, e, o, n) {
|
|
930
930
|
e === void 0 && (e = !1), o === void 0 && (o = !1);
|
|
931
|
-
const i = t.getBoundingClientRect(), s =
|
|
931
|
+
const i = t.getBoundingClientRect(), s = Ae(t);
|
|
932
932
|
let r = Y(1);
|
|
933
|
-
e && (n ? K(n) && (r =
|
|
934
|
-
const a =
|
|
933
|
+
e && (n ? K(n) && (r = ct(n)) : r = ct(t));
|
|
934
|
+
const a = Po(s, o, n) ? Ie(s) : Y(0);
|
|
935
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;
|
|
936
936
|
if (s) {
|
|
937
937
|
const h = P(s), f = n && K(n) ? P(n) : n;
|
|
938
|
-
let p = h, m =
|
|
938
|
+
let p = h, m = te(p);
|
|
939
939
|
for (; m && n && f !== p; ) {
|
|
940
|
-
const g =
|
|
941
|
-
l *= g.x, u *= g.y, d *= g.x, c *= g.y, l += v, u += x, p = P(m), m =
|
|
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);
|
|
942
942
|
}
|
|
943
943
|
}
|
|
944
|
-
return
|
|
944
|
+
return dt({
|
|
945
945
|
width: d,
|
|
946
946
|
height: c,
|
|
947
947
|
x: l,
|
|
948
948
|
y: u
|
|
949
949
|
});
|
|
950
950
|
}
|
|
951
|
-
function
|
|
952
|
-
const o =
|
|
953
|
-
return e ? e.left + o :
|
|
951
|
+
function Ct(t, e) {
|
|
952
|
+
const o = kt(t).scrollLeft;
|
|
953
|
+
return e ? e.left + o : ft(Q(t)).left + o;
|
|
954
954
|
}
|
|
955
|
-
function
|
|
956
|
-
const o = t.getBoundingClientRect(), n = o.left + e.scrollLeft -
|
|
955
|
+
function De(t, e) {
|
|
956
|
+
const o = t.getBoundingClientRect(), n = o.left + e.scrollLeft - Ct(t, o), i = o.top + e.scrollTop;
|
|
957
957
|
return {
|
|
958
958
|
x: n,
|
|
959
959
|
y: i
|
|
960
960
|
};
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function Uo(t) {
|
|
963
963
|
let {
|
|
964
964
|
elements: e,
|
|
965
965
|
rect: o,
|
|
966
966
|
offsetParent: n,
|
|
967
967
|
strategy: i
|
|
968
968
|
} = t;
|
|
969
|
-
const s = i === "fixed", r = Q(n), a = e ?
|
|
969
|
+
const s = i === "fixed", r = Q(n), a = e ? _t(e.floating) : !1;
|
|
970
970
|
if (n === r || a && s)
|
|
971
971
|
return o;
|
|
972
972
|
let l = {
|
|
@@ -974,11 +974,11 @@ function Bo(t) {
|
|
|
974
974
|
scrollTop: 0
|
|
975
975
|
}, u = Y(1);
|
|
976
976
|
const d = Y(0), c = J(n);
|
|
977
|
-
if ((c || !c && !s) && ((
|
|
978
|
-
const f =
|
|
979
|
-
u =
|
|
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;
|
|
980
980
|
}
|
|
981
|
-
const h = r && !c && !s ?
|
|
981
|
+
const h = r && !c && !s ? De(r, l) : Y(0);
|
|
982
982
|
return {
|
|
983
983
|
width: o.width * u.x,
|
|
984
984
|
height: o.height * u.y,
|
|
@@ -986,12 +986,12 @@ function Bo(t) {
|
|
|
986
986
|
y: o.y * u.y - l.scrollTop * u.y + d.y + h.y
|
|
987
987
|
};
|
|
988
988
|
}
|
|
989
|
-
function
|
|
989
|
+
function Vo(t) {
|
|
990
990
|
return Array.from(t.getClientRects());
|
|
991
991
|
}
|
|
992
|
-
function
|
|
993
|
-
const e = Q(t), o =
|
|
994
|
-
let r = -o.scrollLeft +
|
|
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
995
|
const a = -o.scrollTop;
|
|
996
996
|
return W(n).direction === "rtl" && (r += R(e.clientWidth, n.clientWidth) - i), {
|
|
997
997
|
width: i,
|
|
@@ -1000,20 +1000,20 @@ function Po(t) {
|
|
|
1000
1000
|
y: a
|
|
1001
1001
|
};
|
|
1002
1002
|
}
|
|
1003
|
-
const
|
|
1004
|
-
function
|
|
1003
|
+
const ee = 25;
|
|
1004
|
+
function zo(t, e) {
|
|
1005
1005
|
const o = P(t), n = Q(t), i = o.visualViewport;
|
|
1006
1006
|
let s = n.clientWidth, r = n.clientHeight, a = 0, l = 0;
|
|
1007
1007
|
if (i) {
|
|
1008
1008
|
s = i.width, r = i.height;
|
|
1009
|
-
const d =
|
|
1009
|
+
const d = Pt();
|
|
1010
1010
|
(!d || d && e === "fixed") && (a = i.offsetLeft, l = i.offsetTop);
|
|
1011
1011
|
}
|
|
1012
|
-
const u =
|
|
1012
|
+
const u = Ct(n);
|
|
1013
1013
|
if (u <= 0) {
|
|
1014
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 <=
|
|
1016
|
-
} else u <=
|
|
1015
|
+
p <= ee && (s -= p);
|
|
1016
|
+
} else u <= ee && (s += u);
|
|
1017
1017
|
return {
|
|
1018
1018
|
width: s,
|
|
1019
1019
|
height: r,
|
|
@@ -1021,9 +1021,9 @@ function Uo(t, e) {
|
|
|
1021
1021
|
y: l
|
|
1022
1022
|
};
|
|
1023
1023
|
}
|
|
1024
|
-
const
|
|
1025
|
-
function
|
|
1026
|
-
const o =
|
|
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;
|
|
1027
1027
|
return {
|
|
1028
1028
|
width: r,
|
|
1029
1029
|
height: a,
|
|
@@ -1031,14 +1031,14 @@ function jo(t, e) {
|
|
|
1031
1031
|
y: u
|
|
1032
1032
|
};
|
|
1033
1033
|
}
|
|
1034
|
-
function
|
|
1034
|
+
function ne(t, e, o) {
|
|
1035
1035
|
let n;
|
|
1036
1036
|
if (e === "viewport")
|
|
1037
|
-
n =
|
|
1037
|
+
n = zo(t, o);
|
|
1038
1038
|
else if (e === "document")
|
|
1039
|
-
n =
|
|
1039
|
+
n = jo(Q(t));
|
|
1040
1040
|
else if (K(e))
|
|
1041
|
-
n =
|
|
1041
|
+
n = Ko(e, o);
|
|
1042
1042
|
else {
|
|
1043
1043
|
const i = Ie(t);
|
|
1044
1044
|
n = {
|
|
@@ -1048,36 +1048,36 @@ function ee(t, e, o) {
|
|
|
1048
1048
|
height: e.height
|
|
1049
1049
|
};
|
|
1050
1050
|
}
|
|
1051
|
-
return
|
|
1051
|
+
return dt(n);
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1054
|
-
const o =
|
|
1055
|
-
return o === e || !K(o) ||
|
|
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);
|
|
1056
1056
|
}
|
|
1057
|
-
function
|
|
1057
|
+
function Wo(t, e) {
|
|
1058
1058
|
const o = e.get(t);
|
|
1059
1059
|
if (o)
|
|
1060
1060
|
return o;
|
|
1061
|
-
let n =
|
|
1061
|
+
let n = Se(t, []).filter((a) => K(a) && ht(a) !== "body"), i = null;
|
|
1062
1062
|
const s = W(t).position === "fixed";
|
|
1063
|
-
let r = s ?
|
|
1064
|
-
for (; K(r) && !
|
|
1065
|
-
const a = W(r), l =
|
|
1066
|
-
!l && a.position === "fixed" && (i = null), (s ? !l && !i : !l && a.position === "static" && !!i &&
|
|
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);
|
|
1067
1067
|
}
|
|
1068
1068
|
return e.set(t, n), n;
|
|
1069
1069
|
}
|
|
1070
|
-
function
|
|
1070
|
+
function qo(t) {
|
|
1071
1071
|
let {
|
|
1072
1072
|
element: e,
|
|
1073
1073
|
boundary: o,
|
|
1074
1074
|
rootBoundary: n,
|
|
1075
1075
|
strategy: i
|
|
1076
1076
|
} = t;
|
|
1077
|
-
const r = [...o === "clippingAncestors" ?
|
|
1078
|
-
const c =
|
|
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);
|
|
1079
1079
|
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
|
-
},
|
|
1080
|
+
}, ne(e, a, i));
|
|
1081
1081
|
return {
|
|
1082
1082
|
width: l.right - l.left,
|
|
1083
1083
|
height: l.bottom - l.top,
|
|
@@ -1085,33 +1085,33 @@ function Fo(t) {
|
|
|
1085
1085
|
y: l.top
|
|
1086
1086
|
};
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1088
|
+
function Xo(t) {
|
|
1089
1089
|
const {
|
|
1090
1090
|
width: e,
|
|
1091
1091
|
height: o
|
|
1092
|
-
} =
|
|
1092
|
+
} = Le(t);
|
|
1093
1093
|
return {
|
|
1094
1094
|
width: e,
|
|
1095
1095
|
height: o
|
|
1096
1096
|
};
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1099
|
-
const n = J(e), i = Q(e), s = o === "fixed", r =
|
|
1098
|
+
function Yo(t, e, o) {
|
|
1099
|
+
const n = J(e), i = Q(e), s = o === "fixed", r = ft(t, !0, s, e);
|
|
1100
1100
|
let a = {
|
|
1101
1101
|
scrollLeft: 0,
|
|
1102
1102
|
scrollTop: 0
|
|
1103
1103
|
};
|
|
1104
1104
|
const l = Y(0);
|
|
1105
1105
|
function u() {
|
|
1106
|
-
l.x =
|
|
1106
|
+
l.x = Ct(i);
|
|
1107
1107
|
}
|
|
1108
1108
|
if (n || !n && !s)
|
|
1109
|
-
if ((
|
|
1110
|
-
const f =
|
|
1109
|
+
if ((ht(e) !== "body" || wt(i)) && (a = kt(e)), n) {
|
|
1110
|
+
const f = ft(e, !0, s, e);
|
|
1111
1111
|
l.x = f.x + e.clientLeft, l.y = f.y + e.clientTop;
|
|
1112
1112
|
} else i && u();
|
|
1113
1113
|
s && !n && i && u();
|
|
1114
|
-
const d = i && !n && !s ?
|
|
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;
|
|
1115
1115
|
return {
|
|
1116
1116
|
x: c,
|
|
1117
1117
|
y: h,
|
|
@@ -1119,10 +1119,10 @@ function Wo(t, e, o) {
|
|
|
1119
1119
|
height: r.height
|
|
1120
1120
|
};
|
|
1121
1121
|
}
|
|
1122
|
-
function
|
|
1122
|
+
function Et(t) {
|
|
1123
1123
|
return W(t).position === "static";
|
|
1124
1124
|
}
|
|
1125
|
-
function
|
|
1125
|
+
function oe(t, e) {
|
|
1126
1126
|
if (!J(t) || W(t).position === "fixed")
|
|
1127
1127
|
return null;
|
|
1128
1128
|
if (e)
|
|
@@ -1130,28 +1130,28 @@ function ne(t, e) {
|
|
|
1130
1130
|
let o = t.offsetParent;
|
|
1131
1131
|
return Q(t) === o && (o = o.ownerDocument.body), o;
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1133
|
+
function Me(t, e) {
|
|
1134
1134
|
const o = P(t);
|
|
1135
|
-
if (
|
|
1135
|
+
if (_t(t))
|
|
1136
1136
|
return o;
|
|
1137
1137
|
if (!J(t)) {
|
|
1138
|
-
let i =
|
|
1139
|
-
for (; i && !
|
|
1140
|
-
if (K(i) && !
|
|
1138
|
+
let i = it(t);
|
|
1139
|
+
for (; i && !ut(i); ) {
|
|
1140
|
+
if (K(i) && !Et(i))
|
|
1141
1141
|
return i;
|
|
1142
|
-
i =
|
|
1142
|
+
i = it(i);
|
|
1143
1143
|
}
|
|
1144
1144
|
return o;
|
|
1145
1145
|
}
|
|
1146
|
-
let n =
|
|
1147
|
-
for (; n &&
|
|
1148
|
-
n =
|
|
1149
|
-
return n &&
|
|
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;
|
|
1150
1150
|
}
|
|
1151
|
-
const
|
|
1152
|
-
const e = this.getOffsetParent ||
|
|
1151
|
+
const Go = async function(t) {
|
|
1152
|
+
const e = this.getOffsetParent || Me, o = this.getDimensions, n = await o(t.floating);
|
|
1153
1153
|
return {
|
|
1154
|
-
reference:
|
|
1154
|
+
reference: Yo(t.reference, await e(t.floating), t.strategy),
|
|
1155
1155
|
floating: {
|
|
1156
1156
|
x: 0,
|
|
1157
1157
|
y: 0,
|
|
@@ -1160,38 +1160,38 @@ const qo = async function(t) {
|
|
|
1160
1160
|
}
|
|
1161
1161
|
};
|
|
1162
1162
|
};
|
|
1163
|
-
function
|
|
1163
|
+
function Jo(t) {
|
|
1164
1164
|
return W(t).direction === "rtl";
|
|
1165
1165
|
}
|
|
1166
|
-
const
|
|
1167
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1166
|
+
const Zo = {
|
|
1167
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Uo,
|
|
1168
1168
|
getDocumentElement: Q,
|
|
1169
|
-
getClippingRect:
|
|
1170
|
-
getOffsetParent:
|
|
1171
|
-
getElementRects:
|
|
1172
|
-
getClientRects:
|
|
1173
|
-
getDimensions:
|
|
1174
|
-
getScale:
|
|
1169
|
+
getClippingRect: qo,
|
|
1170
|
+
getOffsetParent: Me,
|
|
1171
|
+
getElementRects: Go,
|
|
1172
|
+
getClientRects: Vo,
|
|
1173
|
+
getDimensions: Xo,
|
|
1174
|
+
getScale: ct,
|
|
1175
1175
|
isElement: K,
|
|
1176
|
-
isRTL:
|
|
1177
|
-
},
|
|
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
1178
|
const n = /* @__PURE__ */ new Map(), i = {
|
|
1179
|
-
platform:
|
|
1179
|
+
platform: Zo,
|
|
1180
1180
|
...o
|
|
1181
1181
|
}, s = {
|
|
1182
1182
|
...i.platform,
|
|
1183
1183
|
_c: n
|
|
1184
1184
|
};
|
|
1185
|
-
return
|
|
1185
|
+
return go(t, e, {
|
|
1186
1186
|
...i,
|
|
1187
1187
|
platform: s
|
|
1188
1188
|
});
|
|
1189
1189
|
};
|
|
1190
|
-
function
|
|
1190
|
+
function Qo(t, e) {
|
|
1191
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;
|
|
1192
1192
|
return new DOMRect(l, u, r, a);
|
|
1193
1193
|
}
|
|
1194
|
-
var
|
|
1194
|
+
var ti = class {
|
|
1195
1195
|
constructor({
|
|
1196
1196
|
editor: t,
|
|
1197
1197
|
element: e,
|
|
@@ -1219,7 +1219,7 @@ var Jo = class {
|
|
|
1219
1219
|
onUpdate: void 0,
|
|
1220
1220
|
onDestroy: void 0
|
|
1221
1221
|
}, 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 &&
|
|
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
1223
|
return !(!(d.hasFocus() || b) || g || y || !this.editor.isEditable);
|
|
1224
1224
|
}, this.mousedownHandler = () => {
|
|
1225
1225
|
this.preventHide = !0;
|
|
@@ -1268,16 +1268,16 @@ var Jo = class {
|
|
|
1268
1268
|
}
|
|
1269
1269
|
get middlewares() {
|
|
1270
1270
|
const t = [];
|
|
1271
|
-
return this.floatingUIOptions.flip && t.push(
|
|
1272
|
-
|
|
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)
|
|
1273
1273
|
), this.floatingUIOptions.offset && t.push(
|
|
1274
|
-
|
|
1275
|
-
), this.floatingUIOptions.arrow && t.push(
|
|
1276
|
-
|
|
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(
|
|
1277
1277
|
typeof this.floatingUIOptions.autoPlacement != "boolean" ? this.floatingUIOptions.autoPlacement : void 0
|
|
1278
1278
|
)
|
|
1279
|
-
), this.floatingUIOptions.hide && t.push(
|
|
1280
|
-
|
|
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)
|
|
1281
1281
|
), t;
|
|
1282
1282
|
}
|
|
1283
1283
|
get virtualElement() {
|
|
@@ -1287,12 +1287,12 @@ var Jo = class {
|
|
|
1287
1287
|
return i;
|
|
1288
1288
|
if (!((o = (e = this.view) == null ? void 0 : e.dom) != null && o.parentNode))
|
|
1289
1289
|
return;
|
|
1290
|
-
const s =
|
|
1290
|
+
const s = ae(this.view, n.from, n.to);
|
|
1291
1291
|
let r = {
|
|
1292
1292
|
getBoundingClientRect: () => s,
|
|
1293
1293
|
getClientRects: () => [s]
|
|
1294
1294
|
};
|
|
1295
|
-
if (n instanceof
|
|
1295
|
+
if (n instanceof sn) {
|
|
1296
1296
|
let a = this.view.nodeDOM(n.from);
|
|
1297
1297
|
const l = a.dataset.nodeViewWrapper ? a : a.querySelector("[data-node-view-wrapper]");
|
|
1298
1298
|
l && (a = l), a && (r = {
|
|
@@ -1300,11 +1300,11 @@ var Jo = class {
|
|
|
1300
1300
|
getClientRects: () => [a.getBoundingClientRect()]
|
|
1301
1301
|
});
|
|
1302
1302
|
}
|
|
1303
|
-
if (n instanceof
|
|
1303
|
+
if (n instanceof rn) {
|
|
1304
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);
|
|
1305
1305
|
if (!c || !h)
|
|
1306
1306
|
return;
|
|
1307
|
-
const f = c === h ? c.getBoundingClientRect() :
|
|
1307
|
+
const f = c === h ? c.getBoundingClientRect() : Qo(
|
|
1308
1308
|
c.getBoundingClientRect(),
|
|
1309
1309
|
h.getBoundingClientRect()
|
|
1310
1310
|
);
|
|
@@ -1317,7 +1317,7 @@ var Jo = class {
|
|
|
1317
1317
|
}
|
|
1318
1318
|
updatePosition() {
|
|
1319
1319
|
const t = this.virtualElement;
|
|
1320
|
-
t &&
|
|
1320
|
+
t && zt(t, this.element, {
|
|
1321
1321
|
placement: this.floatingUIOptions.placement,
|
|
1322
1322
|
strategy: this.floatingUIOptions.strategy,
|
|
1323
1323
|
middleware: this.middlewares
|
|
@@ -1376,10 +1376,10 @@ var Jo = class {
|
|
|
1376
1376
|
destroy() {
|
|
1377
1377
|
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
1378
|
}
|
|
1379
|
-
},
|
|
1380
|
-
key: typeof t.pluginKey == "string" ? new
|
|
1381
|
-
view: (e) => new
|
|
1382
|
-
}),
|
|
1379
|
+
}, ei = (t) => new It({
|
|
1380
|
+
key: typeof t.pluginKey == "string" ? new at(t.pluginKey) : t.pluginKey,
|
|
1381
|
+
view: (e) => new ti({ view: e, ...t })
|
|
1382
|
+
}), ni = ce({
|
|
1383
1383
|
name: "BubbleMenu",
|
|
1384
1384
|
inheritAttrs: !1,
|
|
1385
1385
|
props: {
|
|
@@ -1417,8 +1417,8 @@ var Jo = class {
|
|
|
1417
1417
|
}
|
|
1418
1418
|
},
|
|
1419
1419
|
setup(t, { slots: e, attrs: o }) {
|
|
1420
|
-
const n =
|
|
1421
|
-
return
|
|
1420
|
+
const n = de(null);
|
|
1421
|
+
return ue(() => {
|
|
1422
1422
|
const {
|
|
1423
1423
|
editor: i,
|
|
1424
1424
|
options: s,
|
|
@@ -1429,9 +1429,9 @@ var Jo = class {
|
|
|
1429
1429
|
getReferencedVirtualElement: d,
|
|
1430
1430
|
updateDelay: c
|
|
1431
1431
|
} = t, h = n.value;
|
|
1432
|
-
h && (h.style.visibility = "hidden", h.style.position = "absolute", h.remove(),
|
|
1432
|
+
h && (h.style.visibility = "hidden", h.style.position = "absolute", h.remove(), an(() => {
|
|
1433
1433
|
i.registerPlugin(
|
|
1434
|
-
|
|
1434
|
+
ei({
|
|
1435
1435
|
editor: i,
|
|
1436
1436
|
element: h,
|
|
1437
1437
|
options: s,
|
|
@@ -1444,15 +1444,15 @@ var Jo = class {
|
|
|
1444
1444
|
})
|
|
1445
1445
|
);
|
|
1446
1446
|
}));
|
|
1447
|
-
}),
|
|
1447
|
+
}), he(() => {
|
|
1448
1448
|
const { pluginKey: i, editor: s } = t;
|
|
1449
1449
|
s.unregisterPlugin(i);
|
|
1450
1450
|
}), () => {
|
|
1451
1451
|
var i;
|
|
1452
|
-
return
|
|
1452
|
+
return fe("div", { ref: n, ...o }, (i = e.default) == null ? void 0 : i.call(e));
|
|
1453
1453
|
};
|
|
1454
1454
|
}
|
|
1455
|
-
}),
|
|
1455
|
+
}), oi = class {
|
|
1456
1456
|
constructor({
|
|
1457
1457
|
editor: t,
|
|
1458
1458
|
element: e,
|
|
@@ -1512,20 +1512,20 @@ var Jo = class {
|
|
|
1512
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
1513
|
}
|
|
1514
1514
|
getTextContent(t) {
|
|
1515
|
-
return
|
|
1515
|
+
return Xe(t, { textSerializers: Ye(this.editor.schema) });
|
|
1516
1516
|
}
|
|
1517
1517
|
get middlewares() {
|
|
1518
1518
|
const t = [];
|
|
1519
|
-
return this.floatingUIOptions.flip && t.push(
|
|
1520
|
-
|
|
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)
|
|
1521
1521
|
), this.floatingUIOptions.offset && t.push(
|
|
1522
|
-
|
|
1523
|
-
), this.floatingUIOptions.arrow && t.push(
|
|
1524
|
-
|
|
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(
|
|
1525
1525
|
typeof this.floatingUIOptions.autoPlacement != "boolean" ? this.floatingUIOptions.autoPlacement : void 0
|
|
1526
1526
|
)
|
|
1527
|
-
), this.floatingUIOptions.hide && t.push(
|
|
1528
|
-
|
|
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)
|
|
1529
1529
|
), t;
|
|
1530
1530
|
}
|
|
1531
1531
|
getShouldShow(t) {
|
|
@@ -1551,8 +1551,8 @@ var Jo = class {
|
|
|
1551
1551
|
}
|
|
1552
1552
|
}
|
|
1553
1553
|
updatePosition() {
|
|
1554
|
-
const { selection: t } = this.editor.state, e =
|
|
1555
|
-
|
|
1554
|
+
const { selection: t } = this.editor.state, e = ae(this.view, t.from, t.to);
|
|
1555
|
+
zt({
|
|
1556
1556
|
getBoundingClientRect: () => e,
|
|
1557
1557
|
getClientRects: () => [e]
|
|
1558
1558
|
}, this.element, {
|
|
@@ -1586,11 +1586,11 @@ var Jo = class {
|
|
|
1586
1586
|
destroy() {
|
|
1587
1587
|
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
1588
|
}
|
|
1589
|
-
},
|
|
1590
|
-
key: typeof t.pluginKey == "string" ? new
|
|
1591
|
-
view: (e) => new
|
|
1589
|
+
}, ii = (t) => new It({
|
|
1590
|
+
key: typeof t.pluginKey == "string" ? new at(t.pluginKey) : t.pluginKey,
|
|
1591
|
+
view: (e) => new oi({ view: e, ...t })
|
|
1592
1592
|
});
|
|
1593
|
-
|
|
1593
|
+
ce({
|
|
1594
1594
|
name: "FloatingMenu",
|
|
1595
1595
|
inheritAttrs: !1,
|
|
1596
1596
|
props: {
|
|
@@ -1626,11 +1626,11 @@ le({
|
|
|
1626
1626
|
}
|
|
1627
1627
|
},
|
|
1628
1628
|
setup(t, { slots: e, attrs: o }) {
|
|
1629
|
-
const n =
|
|
1630
|
-
return
|
|
1629
|
+
const n = de(null);
|
|
1630
|
+
return ue(() => {
|
|
1631
1631
|
const { pluginKey: i, editor: s, updateDelay: r, resizeDelay: a, options: l, appendTo: u, shouldShow: d } = t, c = n.value;
|
|
1632
1632
|
c && (c.style.visibility = "hidden", c.style.position = "absolute", c.remove(), s.registerPlugin(
|
|
1633
|
-
|
|
1633
|
+
ii({
|
|
1634
1634
|
pluginKey: i,
|
|
1635
1635
|
editor: s,
|
|
1636
1636
|
element: c,
|
|
@@ -1641,27 +1641,90 @@ le({
|
|
|
1641
1641
|
shouldShow: d
|
|
1642
1642
|
})
|
|
1643
1643
|
));
|
|
1644
|
-
}),
|
|
1644
|
+
}), he(() => {
|
|
1645
1645
|
const { pluginKey: i, editor: s } = t;
|
|
1646
1646
|
s.unregisterPlugin(i);
|
|
1647
1647
|
}), () => {
|
|
1648
1648
|
var i;
|
|
1649
|
-
return
|
|
1649
|
+
return fe("div", { ref: n, ...o }, (i = e.default) == null ? void 0 : i.call(e));
|
|
1650
1650
|
};
|
|
1651
1651
|
}
|
|
1652
1652
|
});
|
|
1653
|
-
const
|
|
1653
|
+
const et = (t) => ({
|
|
1654
|
+
default: null,
|
|
1655
|
+
parseHTML: (e) => e.getAttribute(t),
|
|
1656
|
+
renderHTML: (e) => e[t] ? { [t]: e[t] } : {}
|
|
1657
|
+
}), si = Rn.extend({
|
|
1658
|
+
addAttributes() {
|
|
1659
|
+
var t;
|
|
1660
|
+
return {
|
|
1661
|
+
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
1662
|
+
border: et("border"),
|
|
1663
|
+
cellpadding: et("cellpadding"),
|
|
1664
|
+
cellspacing: et("cellspacing"),
|
|
1665
|
+
style: et("style")
|
|
1666
|
+
};
|
|
1667
|
+
},
|
|
1668
|
+
renderHTML({ HTMLAttributes: t }) {
|
|
1669
|
+
return ["table", st(this.options.HTMLAttributes, t), ["tbody", 0]];
|
|
1670
|
+
}
|
|
1671
|
+
}), ri = Mn.extend({
|
|
1672
|
+
addAttributes() {
|
|
1673
|
+
var t;
|
|
1674
|
+
return {
|
|
1675
|
+
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
1676
|
+
style: et("style")
|
|
1677
|
+
};
|
|
1678
|
+
}
|
|
1679
|
+
}), Ue = {
|
|
1680
|
+
style: et("style"),
|
|
1681
|
+
valign: et("valign"),
|
|
1682
|
+
width: et("width")
|
|
1683
|
+
}, ai = $n.extend({
|
|
1684
|
+
addAttributes() {
|
|
1685
|
+
var t;
|
|
1686
|
+
return {
|
|
1687
|
+
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
1688
|
+
...Ue
|
|
1689
|
+
};
|
|
1690
|
+
}
|
|
1691
|
+
}), li = Hn.extend({
|
|
1692
|
+
addAttributes() {
|
|
1693
|
+
var t;
|
|
1694
|
+
return {
|
|
1695
|
+
...(t = this.parent) == null ? void 0 : t.call(this),
|
|
1696
|
+
...Ue
|
|
1697
|
+
};
|
|
1698
|
+
}
|
|
1699
|
+
}), ci = Bn.extend({
|
|
1700
|
+
parseHTML() {
|
|
1701
|
+
var t;
|
|
1702
|
+
return [
|
|
1703
|
+
...((t = this.parent) == null ? void 0 : t.call(this)) || [],
|
|
1704
|
+
{
|
|
1705
|
+
tag: "div",
|
|
1706
|
+
consuming: !1,
|
|
1707
|
+
getAttrs: (e) => e.hasAttribute("style") ? {} : !1
|
|
1708
|
+
},
|
|
1709
|
+
{
|
|
1710
|
+
tag: "a",
|
|
1711
|
+
consuming: !1,
|
|
1712
|
+
getAttrs: (e) => e.hasAttribute("style") ? {} : !1
|
|
1713
|
+
}
|
|
1714
|
+
];
|
|
1715
|
+
}
|
|
1716
|
+
}), di = {
|
|
1654
1717
|
compatConfig: { MODE: 3 },
|
|
1655
1718
|
name: "EmojiComponent",
|
|
1656
1719
|
components: {
|
|
1657
|
-
NodeViewWrapper:
|
|
1658
|
-
DtEmoji:
|
|
1720
|
+
NodeViewWrapper: mt,
|
|
1721
|
+
DtEmoji: we
|
|
1659
1722
|
},
|
|
1660
|
-
props:
|
|
1723
|
+
props: pt
|
|
1661
1724
|
};
|
|
1662
|
-
function
|
|
1725
|
+
function ui(t, e, o, n, i, s) {
|
|
1663
1726
|
const r = T("dt-emoji"), a = T("node-view-wrapper");
|
|
1664
|
-
return _(),
|
|
1727
|
+
return _(), A(a, { class: "d-d-inline-block d-va-bottom d-lh0" }, {
|
|
1665
1728
|
default: C(() => [
|
|
1666
1729
|
M(r, {
|
|
1667
1730
|
size: "500",
|
|
@@ -1671,11 +1734,11 @@ function oi(t, e, o, n, i, s) {
|
|
|
1671
1734
|
_: 1
|
|
1672
1735
|
});
|
|
1673
1736
|
}
|
|
1674
|
-
const
|
|
1737
|
+
const hi = /* @__PURE__ */ q(di, [["render", ui]]), fi = {
|
|
1675
1738
|
compatConfig: { MODE: 3 },
|
|
1676
1739
|
name: "SuggestionList",
|
|
1677
1740
|
components: {
|
|
1678
|
-
DtListItem:
|
|
1741
|
+
DtListItem: Fn
|
|
1679
1742
|
},
|
|
1680
1743
|
props: {
|
|
1681
1744
|
items: {
|
|
@@ -1744,36 +1807,36 @@ const ii = /* @__PURE__ */ q(ni, [["render", oi]]), si = {
|
|
|
1744
1807
|
}
|
|
1745
1808
|
}
|
|
1746
1809
|
}
|
|
1747
|
-
},
|
|
1810
|
+
}, pi = { class: "d-popover__dialog d-suggestion-list__container" }, mi = {
|
|
1748
1811
|
ref: "suggestionList",
|
|
1749
1812
|
class: "d-suggestion-list"
|
|
1750
1813
|
};
|
|
1751
|
-
function
|
|
1814
|
+
function gi(t, e, o, n, i, s) {
|
|
1752
1815
|
const r = T("dt-list-item");
|
|
1753
|
-
return _(),
|
|
1754
|
-
|
|
1755
|
-
(_(!0),
|
|
1816
|
+
return _(), nt("div", pi, [
|
|
1817
|
+
ln(ot("ul", mi, [
|
|
1818
|
+
(_(!0), nt(cn, null, dn(o.items, (a, l) => (_(), A(r, {
|
|
1756
1819
|
key: a.id,
|
|
1757
|
-
class:
|
|
1820
|
+
class: pe([
|
|
1758
1821
|
"d-suggestion-list__item",
|
|
1759
1822
|
{ "d-list-item--highlighted": l === i.selectedIndex }
|
|
1760
1823
|
]),
|
|
1761
1824
|
"navigation-type": "arrow-keys",
|
|
1762
1825
|
onClick: (u) => s.selectItem(l),
|
|
1763
|
-
onKeydown:
|
|
1826
|
+
onKeydown: Dt(s.onKeyDown, ["prevent"])
|
|
1764
1827
|
}, {
|
|
1765
1828
|
default: C(() => [
|
|
1766
|
-
(_(),
|
|
1829
|
+
(_(), A(un(o.itemComponent), { item: a }, null, 8, ["item"]))
|
|
1767
1830
|
]),
|
|
1768
1831
|
_: 2
|
|
1769
1832
|
}, 1032, ["class", "onClick", "onKeydown"]))), 128))
|
|
1770
1833
|
], 512), [
|
|
1771
|
-
[
|
|
1834
|
+
[hn, o.items.length]
|
|
1772
1835
|
])
|
|
1773
1836
|
]);
|
|
1774
1837
|
}
|
|
1775
|
-
const
|
|
1776
|
-
function
|
|
1838
|
+
const yi = /* @__PURE__ */ q(fi, [["render", gi]]), Ve = "top-start", je = "650";
|
|
1839
|
+
function wi() {
|
|
1777
1840
|
return {
|
|
1778
1841
|
getBoundingClientRect: () => ({
|
|
1779
1842
|
width: 0,
|
|
@@ -1787,15 +1850,15 @@ function di() {
|
|
|
1787
1850
|
})
|
|
1788
1851
|
};
|
|
1789
1852
|
}
|
|
1790
|
-
function
|
|
1853
|
+
function ie(t) {
|
|
1791
1854
|
return { getBoundingClientRect: t };
|
|
1792
1855
|
}
|
|
1793
|
-
async function
|
|
1856
|
+
async function bi(t, e, o = {}) {
|
|
1794
1857
|
if (!t || !(e != null && e.getBoundingClientRect)) return;
|
|
1795
1858
|
const {
|
|
1796
|
-
placement: n =
|
|
1797
|
-
middleware: i = [
|
|
1798
|
-
} = o, { x: s, y: r } = await
|
|
1859
|
+
placement: n = Ve,
|
|
1860
|
+
middleware: i = [Ut(0), jt(), Vt({ padding: 8 })]
|
|
1861
|
+
} = o, { x: s, y: r } = await zt(e, t, {
|
|
1799
1862
|
placement: n,
|
|
1800
1863
|
middleware: i
|
|
1801
1864
|
});
|
|
@@ -1804,64 +1867,64 @@ async function ui(t, e, o = {}) {
|
|
|
1804
1867
|
top: `${r}px`
|
|
1805
1868
|
});
|
|
1806
1869
|
}
|
|
1807
|
-
function
|
|
1808
|
-
const { zIndex: o =
|
|
1870
|
+
function vi(t, e = {}) {
|
|
1871
|
+
const { zIndex: o = je } = e;
|
|
1809
1872
|
t.style.position = "absolute", t.style.zIndex = o, t.style.display = "none";
|
|
1810
1873
|
}
|
|
1811
|
-
function
|
|
1874
|
+
function xi(t) {
|
|
1812
1875
|
t && (t.style.display = "block");
|
|
1813
1876
|
}
|
|
1814
|
-
function
|
|
1877
|
+
function Ti(t) {
|
|
1815
1878
|
t && (t.style.display = "none");
|
|
1816
1879
|
}
|
|
1817
|
-
function
|
|
1880
|
+
function _i(t, e) {
|
|
1818
1881
|
return (o) => {
|
|
1819
1882
|
o.key === "Escape" && e() && t();
|
|
1820
1883
|
};
|
|
1821
1884
|
}
|
|
1822
|
-
function
|
|
1885
|
+
function ki(t) {
|
|
1823
1886
|
document.addEventListener("keydown", t);
|
|
1824
1887
|
}
|
|
1825
|
-
function
|
|
1888
|
+
function Ci(t) {
|
|
1826
1889
|
document.removeEventListener("keydown", t);
|
|
1827
1890
|
}
|
|
1828
|
-
function
|
|
1829
|
-
return new
|
|
1891
|
+
function Oi(t, e, o, n) {
|
|
1892
|
+
return new Fe(t, {
|
|
1830
1893
|
props: {
|
|
1831
|
-
itemComponent:
|
|
1894
|
+
itemComponent: fn(e),
|
|
1832
1895
|
itemType: o,
|
|
1833
1896
|
...n
|
|
1834
1897
|
},
|
|
1835
1898
|
editor: n.editor
|
|
1836
1899
|
});
|
|
1837
1900
|
}
|
|
1838
|
-
function
|
|
1901
|
+
function Ei(t) {
|
|
1839
1902
|
var e, o;
|
|
1840
|
-
t.escHandler &&
|
|
1903
|
+
t.escHandler && Ci(t.escHandler), (e = t.floatingEl) == null || e.remove(), (o = t.component) == null || o.destroy();
|
|
1841
1904
|
}
|
|
1842
|
-
function
|
|
1905
|
+
function Ot(t, e, o = {}) {
|
|
1843
1906
|
const {
|
|
1844
|
-
listComponent: n =
|
|
1845
|
-
placement: i =
|
|
1846
|
-
zIndex: s =
|
|
1907
|
+
listComponent: n = yi,
|
|
1908
|
+
placement: i = Ve,
|
|
1909
|
+
zIndex: s = je
|
|
1847
1910
|
} = o;
|
|
1848
1911
|
return () => {
|
|
1849
|
-
let r = null, a = null, l = !1, u =
|
|
1912
|
+
let r = null, a = null, l = !1, u = wi(), d = null;
|
|
1850
1913
|
function c() {
|
|
1851
|
-
|
|
1914
|
+
bi(a, u, { placement: i });
|
|
1852
1915
|
}
|
|
1853
1916
|
function h() {
|
|
1854
|
-
a && (
|
|
1917
|
+
a && (xi(a), l = !0, c());
|
|
1855
1918
|
}
|
|
1856
1919
|
function f() {
|
|
1857
|
-
a && (
|
|
1920
|
+
a && (Ti(a), l = !1);
|
|
1858
1921
|
}
|
|
1859
1922
|
return {
|
|
1860
1923
|
onStart: (p) => {
|
|
1861
|
-
r =
|
|
1924
|
+
r = Oi(n, t, e, p), p.clientRect && (a = r.element, vi(a, { zIndex: s }), document.body.appendChild(a), u = ie(p.clientRect), d = _i(f, () => l), ki(d), p.items.length > 0 && h());
|
|
1862
1925
|
},
|
|
1863
1926
|
onUpdate(p) {
|
|
1864
|
-
r == null || r.updateProps(p), p.items.length > 0 ? h() : f(), p.clientRect && (u =
|
|
1927
|
+
r == null || r.updateProps(p), p.items.length > 0 ? h() : f(), p.clientRect && (u = ie(p.clientRect), c());
|
|
1865
1928
|
},
|
|
1866
1929
|
onKeyDown(p) {
|
|
1867
1930
|
var m;
|
|
@@ -1869,17 +1932,17 @@ function Ct(t, e, o = {}) {
|
|
|
1869
1932
|
return (m = r == null ? void 0 : r.ref) == null ? void 0 : m.onKeyDown(p);
|
|
1870
1933
|
},
|
|
1871
1934
|
onExit() {
|
|
1872
|
-
|
|
1935
|
+
Ei({ escHandler: d, floatingEl: a, component: r }), d = null, a = null, r = null;
|
|
1873
1936
|
}
|
|
1874
1937
|
};
|
|
1875
1938
|
};
|
|
1876
1939
|
}
|
|
1877
|
-
const
|
|
1940
|
+
const Si = {
|
|
1878
1941
|
compatConfig: { MODE: 3 },
|
|
1879
1942
|
name: "EmojiSuggestion",
|
|
1880
1943
|
components: {
|
|
1881
|
-
DtEmoji:
|
|
1882
|
-
DtStack:
|
|
1944
|
+
DtEmoji: we,
|
|
1945
|
+
DtStack: yt
|
|
1883
1946
|
},
|
|
1884
1947
|
props: {
|
|
1885
1948
|
item: {
|
|
@@ -1888,9 +1951,9 @@ const vi = {
|
|
|
1888
1951
|
}
|
|
1889
1952
|
}
|
|
1890
1953
|
};
|
|
1891
|
-
function
|
|
1954
|
+
function Li(t, e, o, n, i, s) {
|
|
1892
1955
|
const r = T("dt-emoji"), a = T("dt-stack");
|
|
1893
|
-
return _(),
|
|
1956
|
+
return _(), A(a, {
|
|
1894
1957
|
direction: "row",
|
|
1895
1958
|
gap: "400"
|
|
1896
1959
|
}, {
|
|
@@ -1899,20 +1962,20 @@ function xi(t, e, o, n, i, s) {
|
|
|
1899
1962
|
size: "200",
|
|
1900
1963
|
code: o.item.code
|
|
1901
1964
|
}, null, 8, ["code"]),
|
|
1902
|
-
|
|
1965
|
+
lt(" " + $(o.item.code), 1)
|
|
1903
1966
|
]),
|
|
1904
1967
|
_: 1
|
|
1905
1968
|
});
|
|
1906
1969
|
}
|
|
1907
|
-
const
|
|
1970
|
+
const Ai = /* @__PURE__ */ q(Si, [["render", Li]]), Ii = 20, Di = (t, e, o) => {
|
|
1908
1971
|
var a, l;
|
|
1909
1972
|
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);
|
|
1910
1973
|
return s && !r ? -1 : !s && r ? 1 : n.localeCompare(i);
|
|
1911
|
-
},
|
|
1974
|
+
}, Ri = {
|
|
1912
1975
|
items: ({ query: t }) => {
|
|
1913
1976
|
if (t.length < 2)
|
|
1914
1977
|
return [];
|
|
1915
|
-
const e = Object.values(
|
|
1978
|
+
const e = Object.values(Un());
|
|
1916
1979
|
return t = t.toLowerCase(), e.filter(
|
|
1917
1980
|
(n) => {
|
|
1918
1981
|
var i;
|
|
@@ -1922,7 +1985,7 @@ const Ti = /* @__PURE__ */ q(vi, [["render", xi]]), _i = 20, ki = (t, e, o) => {
|
|
|
1922
1985
|
...n.keywords || []
|
|
1923
1986
|
].some((s) => s && s.startsWith(t));
|
|
1924
1987
|
}
|
|
1925
|
-
).splice(0,
|
|
1988
|
+
).splice(0, Ii).sort((n, i) => Di(n, i, t)).map((n) => ({ code: n.shortname }));
|
|
1926
1989
|
},
|
|
1927
1990
|
command: ({ editor: t, range: e, props: o }) => {
|
|
1928
1991
|
var s, r;
|
|
@@ -1934,15 +1997,15 @@ const Ti = /* @__PURE__ */ q(vi, [["render", xi]]), _i = 20, ki = (t, e, o) => {
|
|
|
1934
1997
|
}
|
|
1935
1998
|
]).run(), (r = window.getSelection()) == null || r.collapseToEnd();
|
|
1936
1999
|
},
|
|
1937
|
-
render:
|
|
1938
|
-
},
|
|
1939
|
-
if (t &&
|
|
2000
|
+
render: Ot(Ai, "emoji")
|
|
2001
|
+
}, Mi = /(:\w+:)$/, Hi = new RegExp(ye + "$"), $i = (t) => {
|
|
2002
|
+
if (t && Rt(t[0]))
|
|
1940
2003
|
return { text: t[2] || t[0] };
|
|
1941
|
-
},
|
|
2004
|
+
}, Bi = (t) => [...t.matchAll(zn)].filter((o) => Rt(o[0])).map((o) => ({
|
|
1942
2005
|
index: o.index,
|
|
1943
2006
|
text: o[0],
|
|
1944
2007
|
match: o
|
|
1945
|
-
})),
|
|
2008
|
+
})), Ni = le.create({
|
|
1946
2009
|
name: "emoji",
|
|
1947
2010
|
addOptions() {
|
|
1948
2011
|
return {
|
|
@@ -1954,7 +2017,7 @@ const Ti = /* @__PURE__ */ q(vi, [["render", xi]]), _i = 20, ki = (t, e, o) => {
|
|
|
1954
2017
|
selectable: !1,
|
|
1955
2018
|
atom: !0,
|
|
1956
2019
|
addNodeView() {
|
|
1957
|
-
return
|
|
2020
|
+
return gt(hi);
|
|
1958
2021
|
},
|
|
1959
2022
|
addAttributes() {
|
|
1960
2023
|
return {
|
|
@@ -1971,18 +2034,18 @@ const Ti = /* @__PURE__ */ q(vi, [["render", xi]]), _i = 20, ki = (t, e, o) => {
|
|
|
1971
2034
|
];
|
|
1972
2035
|
},
|
|
1973
2036
|
renderText({ node: t }) {
|
|
1974
|
-
return
|
|
2037
|
+
return jn(Rt(t.attrs.code).unicode_output);
|
|
1975
2038
|
},
|
|
1976
2039
|
renderHTML({ HTMLAttributes: t }) {
|
|
1977
2040
|
return ["emoji-component", st(this.options.HTMLAttributes, t)];
|
|
1978
2041
|
},
|
|
1979
2042
|
addInputRules() {
|
|
1980
2043
|
return [
|
|
1981
|
-
new
|
|
2044
|
+
new Ge({
|
|
1982
2045
|
find: (t) => {
|
|
1983
|
-
const e = t.match(
|
|
2046
|
+
const e = t.match(Mi) || t.match(Hi);
|
|
1984
2047
|
if (e)
|
|
1985
|
-
return
|
|
2048
|
+
return $i(e);
|
|
1986
2049
|
},
|
|
1987
2050
|
handler: ({ state: t, range: e, match: o }) => {
|
|
1988
2051
|
const { tr: n } = t, i = e.from, s = e.to;
|
|
@@ -1993,8 +2056,8 @@ const Ti = /* @__PURE__ */ q(vi, [["render", xi]]), _i = 20, ki = (t, e, o) => {
|
|
|
1993
2056
|
},
|
|
1994
2057
|
addPasteRules() {
|
|
1995
2058
|
return [
|
|
1996
|
-
|
|
1997
|
-
find:
|
|
2059
|
+
St({
|
|
2060
|
+
find: Bi,
|
|
1998
2061
|
type: this.type,
|
|
1999
2062
|
getAttributes(t) {
|
|
2000
2063
|
return {
|
|
@@ -2002,8 +2065,8 @@ const Ti = /* @__PURE__ */ q(vi, [["render", xi]]), _i = 20, ki = (t, e, o) => {
|
|
|
2002
2065
|
};
|
|
2003
2066
|
}
|
|
2004
2067
|
}),
|
|
2005
|
-
|
|
2006
|
-
find:
|
|
2068
|
+
St({
|
|
2069
|
+
find: Vn,
|
|
2007
2070
|
type: this.type,
|
|
2008
2071
|
getAttributes(t) {
|
|
2009
2072
|
return {
|
|
@@ -2015,12 +2078,12 @@ const Ti = /* @__PURE__ */ q(vi, [["render", xi]]), _i = 20, ki = (t, e, o) => {
|
|
|
2015
2078
|
},
|
|
2016
2079
|
addProseMirrorPlugins() {
|
|
2017
2080
|
return [
|
|
2018
|
-
|
|
2081
|
+
Pn({
|
|
2019
2082
|
char: ":",
|
|
2020
|
-
pluginKey: new
|
|
2083
|
+
pluginKey: new at("emoji"),
|
|
2021
2084
|
editor: this.editor,
|
|
2022
2085
|
...this.options.suggestion,
|
|
2023
|
-
...
|
|
2086
|
+
...Ri
|
|
2024
2087
|
})
|
|
2025
2088
|
];
|
|
2026
2089
|
},
|
|
@@ -2037,7 +2100,7 @@ const Ti = /* @__PURE__ */ q(vi, [["render", xi]]), _i = 20, ki = (t, e, o) => {
|
|
|
2037
2100
|
};
|
|
2038
2101
|
}
|
|
2039
2102
|
});
|
|
2040
|
-
function
|
|
2103
|
+
function Pi(t, e, o = () => !0) {
|
|
2041
2104
|
const n = [];
|
|
2042
2105
|
e.lastIndex = 0;
|
|
2043
2106
|
let i;
|
|
@@ -2045,10 +2108,10 @@ function Ai(t, e, o = () => !0) {
|
|
|
2045
2108
|
o(t, i) && n.push(i);
|
|
2046
2109
|
return n;
|
|
2047
2110
|
}
|
|
2048
|
-
function
|
|
2111
|
+
function Ui(t, e) {
|
|
2049
2112
|
return !["#", "@"].includes(t.charAt(e.index)) && !["#", "@"].includes(t.charAt(e.index - 1));
|
|
2050
2113
|
}
|
|
2051
|
-
function
|
|
2114
|
+
function Vi(t) {
|
|
2052
2115
|
const e = new RegExp(
|
|
2053
2116
|
"(?:" + [
|
|
2054
2117
|
`[!?.,:;'"]`,
|
|
@@ -2058,7 +2121,7 @@ function Ri(t) {
|
|
|
2058
2121
|
);
|
|
2059
2122
|
return t.replace(e, "");
|
|
2060
2123
|
}
|
|
2061
|
-
function
|
|
2124
|
+
function ji(t, e) {
|
|
2062
2125
|
const o = t.slice(0, e + 1).search(/\S+\s*$/), n = t.slice(e).search(/\s/);
|
|
2063
2126
|
if (n < 0) {
|
|
2064
2127
|
const i = t.slice(o);
|
|
@@ -2074,61 +2137,61 @@ function Mi(t, e) {
|
|
|
2074
2137
|
to: n + e
|
|
2075
2138
|
};
|
|
2076
2139
|
}
|
|
2077
|
-
function
|
|
2078
|
-
const i =
|
|
2140
|
+
function At(t, e, o, n) {
|
|
2141
|
+
const i = ji(t, e);
|
|
2079
2142
|
if (n.lastIndex = 0, !n.test(i.text))
|
|
2080
2143
|
return i;
|
|
2081
2144
|
const s = o === "left" ? i.from - 1 : i.to + 1;
|
|
2082
|
-
return s <= 0 || s >= t.length || s === e ? i :
|
|
2145
|
+
return s <= 0 || s >= t.length || s === e ? i : At(t, s, o, n);
|
|
2083
2146
|
}
|
|
2084
|
-
function
|
|
2085
|
-
const i = Math.max(t.from - 1, 0), s = Math.min(t.to + 1, e.content.size), r =
|
|
2147
|
+
function zi(t, e, o, n) {
|
|
2148
|
+
const i = Math.max(t.from - 1, 0), s = Math.min(t.to + 1, e.content.size), r = Je(i, s, e);
|
|
2086
2149
|
for (const a of r)
|
|
2087
2150
|
a.mark.type === n && o.removeMark(a.from, a.to, n);
|
|
2088
2151
|
}
|
|
2089
|
-
const
|
|
2090
|
-
function
|
|
2152
|
+
const se = Wn(1, 15);
|
|
2153
|
+
function re(t, e, o, n, i, s) {
|
|
2091
2154
|
if (!t)
|
|
2092
2155
|
return;
|
|
2093
2156
|
let r = o - e - 1;
|
|
2094
2157
|
r = r < 0 ? 0 : r;
|
|
2095
|
-
const a = n - e, l =
|
|
2158
|
+
const a = n - e, l = At(
|
|
2096
2159
|
t,
|
|
2097
2160
|
r,
|
|
2098
2161
|
"left",
|
|
2099
|
-
|
|
2100
|
-
), u =
|
|
2162
|
+
se
|
|
2163
|
+
), u = At(
|
|
2101
2164
|
t,
|
|
2102
2165
|
a,
|
|
2103
2166
|
"right",
|
|
2104
|
-
|
|
2167
|
+
se
|
|
2105
2168
|
), d = t.slice(l.from, u.to);
|
|
2106
|
-
|
|
2107
|
-
const f =
|
|
2169
|
+
Pi(d, Kn, Ui).forEach((h) => {
|
|
2170
|
+
const f = Vi(h[0]), p = e + l.from + h.index + 1, m = p + f.length;
|
|
2108
2171
|
i.addMark(p, m, s.create());
|
|
2109
2172
|
});
|
|
2110
2173
|
}
|
|
2111
|
-
function
|
|
2174
|
+
function Fi(t) {
|
|
2112
2175
|
let e = !1;
|
|
2113
2176
|
return new It({
|
|
2114
|
-
key: new
|
|
2177
|
+
key: new at("autolink"),
|
|
2115
2178
|
appendTransaction: (o, n, i) => {
|
|
2116
2179
|
const s = o.some((d) => d.docChanged) && !n.doc.eq(i.doc);
|
|
2117
2180
|
if (e && !s)
|
|
2118
2181
|
return;
|
|
2119
2182
|
const { tr: r } = i, { textContent: a } = i.doc;
|
|
2120
|
-
e ||
|
|
2121
|
-
const l =
|
|
2183
|
+
e || re(a, 0, 0, a.length, r, t.type), e = !0;
|
|
2184
|
+
const l = Ze(
|
|
2122
2185
|
n.doc,
|
|
2123
2186
|
[...o]
|
|
2124
2187
|
);
|
|
2125
|
-
return
|
|
2126
|
-
|
|
2188
|
+
return Qe(l).forEach(({ oldRange: d, newRange: c }) => {
|
|
2189
|
+
zi(c, i.doc, r, t.type), tn(
|
|
2127
2190
|
i.doc,
|
|
2128
2191
|
c,
|
|
2129
2192
|
(f) => f.isTextblock
|
|
2130
2193
|
).forEach(({ node: f, pos: p }) => {
|
|
2131
|
-
|
|
2194
|
+
re(
|
|
2132
2195
|
f.textContent,
|
|
2133
2196
|
p,
|
|
2134
2197
|
d.from,
|
|
@@ -2141,10 +2204,10 @@ function $i(t) {
|
|
|
2141
2204
|
}
|
|
2142
2205
|
});
|
|
2143
2206
|
}
|
|
2144
|
-
const
|
|
2207
|
+
const Ki = {
|
|
2145
2208
|
class: "d-link d-c-text d-d-inline-block d-wb-break-all",
|
|
2146
2209
|
rel: "noopener noreferrer nofollow"
|
|
2147
|
-
},
|
|
2210
|
+
}, Wi = en.create({
|
|
2148
2211
|
name: "CustomLink",
|
|
2149
2212
|
renderHTML({ HTMLAttributes: t }) {
|
|
2150
2213
|
return [
|
|
@@ -2152,7 +2215,7 @@ const Bi = {
|
|
|
2152
2215
|
st(
|
|
2153
2216
|
this.options.HTMLAttributes,
|
|
2154
2217
|
t,
|
|
2155
|
-
|
|
2218
|
+
Ki
|
|
2156
2219
|
)
|
|
2157
2220
|
];
|
|
2158
2221
|
},
|
|
@@ -2161,10 +2224,10 @@ const Bi = {
|
|
|
2161
2224
|
},
|
|
2162
2225
|
addProseMirrorPlugins() {
|
|
2163
2226
|
return [
|
|
2164
|
-
|
|
2227
|
+
Fi({ type: this.type })
|
|
2165
2228
|
];
|
|
2166
2229
|
}
|
|
2167
|
-
}),
|
|
2230
|
+
}), qi = Xn.extend({
|
|
2168
2231
|
name: "ConfigurableImage",
|
|
2169
2232
|
addAttributes() {
|
|
2170
2233
|
return {
|
|
@@ -2188,21 +2251,21 @@ const Bi = {
|
|
|
2188
2251
|
}
|
|
2189
2252
|
};
|
|
2190
2253
|
}
|
|
2191
|
-
}).configure({ inline: !0, allowBase64: !0 }),
|
|
2254
|
+
}).configure({ inline: !0, allowBase64: !0 }), Xi = ge.extend({
|
|
2192
2255
|
parseHTML() {
|
|
2193
2256
|
return [{ tag: "div" }];
|
|
2194
2257
|
},
|
|
2195
2258
|
renderHTML({ HTMLAttributes: t }) {
|
|
2196
2259
|
return ["div", st(this.options.HTMLAttributes, t), 0];
|
|
2197
2260
|
}
|
|
2198
|
-
}),
|
|
2261
|
+
}), Yi = {
|
|
2199
2262
|
compatConfig: { MODE: 3 },
|
|
2200
2263
|
name: "MentionComponent",
|
|
2201
2264
|
components: {
|
|
2202
|
-
NodeViewWrapper:
|
|
2203
|
-
DtLink:
|
|
2265
|
+
NodeViewWrapper: mt,
|
|
2266
|
+
DtLink: be
|
|
2204
2267
|
},
|
|
2205
|
-
props:
|
|
2268
|
+
props: pt,
|
|
2206
2269
|
computed: {
|
|
2207
2270
|
text() {
|
|
2208
2271
|
return "@" + this.$props.node.attrs.name;
|
|
@@ -2228,20 +2291,20 @@ const Bi = {
|
|
|
2228
2291
|
}
|
|
2229
2292
|
}
|
|
2230
2293
|
};
|
|
2231
|
-
function
|
|
2294
|
+
function Gi(t, e, o, n, i, s) {
|
|
2232
2295
|
const r = T("dt-link"), a = T("node-view-wrapper");
|
|
2233
|
-
return _(),
|
|
2296
|
+
return _(), A(a, { class: "d-d-inline-block" }, {
|
|
2234
2297
|
default: C(() => [
|
|
2235
2298
|
M(r, {
|
|
2236
2299
|
kind: "mention",
|
|
2237
|
-
onClick:
|
|
2300
|
+
onClick: Dt(s.handleClick, ["prevent"]),
|
|
2238
2301
|
onMouseenter: s.handleMouseEnter,
|
|
2239
2302
|
onMouseleave: s.handleMouseLeave,
|
|
2240
2303
|
onFocusin: s.handleMouseEnter,
|
|
2241
2304
|
onFocusout: s.handleMouseLeave
|
|
2242
2305
|
}, {
|
|
2243
2306
|
default: C(() => [
|
|
2244
|
-
|
|
2307
|
+
lt($(s.text), 1)
|
|
2245
2308
|
]),
|
|
2246
2309
|
_: 1
|
|
2247
2310
|
}, 8, ["onClick", "onMouseenter", "onMouseleave", "onFocusin", "onFocusout"])
|
|
@@ -2249,9 +2312,9 @@ function ji(t, e, o, n, i, s) {
|
|
|
2249
2312
|
_: 1
|
|
2250
2313
|
});
|
|
2251
2314
|
}
|
|
2252
|
-
const
|
|
2315
|
+
const Ji = /* @__PURE__ */ q(Yi, [["render", Gi]]), Zi = Mt.extend({
|
|
2253
2316
|
addNodeView() {
|
|
2254
|
-
return
|
|
2317
|
+
return gt(Ji);
|
|
2255
2318
|
},
|
|
2256
2319
|
parseHTML() {
|
|
2257
2320
|
return [
|
|
@@ -2285,18 +2348,18 @@ const zi = /* @__PURE__ */ q(Vi, [["render", ji]]), Fi = Rt.extend({
|
|
|
2285
2348
|
}).configure({
|
|
2286
2349
|
suggestion: {
|
|
2287
2350
|
char: "@",
|
|
2288
|
-
pluginKey: new
|
|
2351
|
+
pluginKey: new at("mentionSuggestion")
|
|
2289
2352
|
}
|
|
2290
|
-
}),
|
|
2353
|
+
}), Qi = {
|
|
2291
2354
|
compatConfig: { MODE: 3 },
|
|
2292
2355
|
name: "ChannelComponent",
|
|
2293
2356
|
components: {
|
|
2294
|
-
NodeViewWrapper:
|
|
2295
|
-
DtLink:
|
|
2296
|
-
DtIconLock:
|
|
2297
|
-
DtStack:
|
|
2357
|
+
NodeViewWrapper: mt,
|
|
2358
|
+
DtLink: be,
|
|
2359
|
+
DtIconLock: Yn,
|
|
2360
|
+
DtStack: yt
|
|
2298
2361
|
},
|
|
2299
|
-
props:
|
|
2362
|
+
props: pt,
|
|
2300
2363
|
computed: {
|
|
2301
2364
|
text() {
|
|
2302
2365
|
return this.$props.node.attrs.locked ? this.$props.node.attrs.name : "#" + this.$props.node.attrs.name;
|
|
@@ -2314,13 +2377,13 @@ const zi = /* @__PURE__ */ q(Vi, [["render", ji]]), Fi = Rt.extend({
|
|
|
2314
2377
|
}
|
|
2315
2378
|
}
|
|
2316
2379
|
};
|
|
2317
|
-
function
|
|
2380
|
+
function ts(t, e, o, n, i, s) {
|
|
2318
2381
|
const r = T("dt-icon-lock"), a = T("dt-stack"), l = T("dt-link"), u = T("node-view-wrapper");
|
|
2319
|
-
return _(),
|
|
2382
|
+
return _(), A(u, { class: "d-d-inline-block" }, {
|
|
2320
2383
|
default: C(() => [
|
|
2321
2384
|
M(l, {
|
|
2322
2385
|
kind: "mention",
|
|
2323
|
-
onClick:
|
|
2386
|
+
onClick: Dt(s.handleClick, ["prevent"])
|
|
2324
2387
|
}, {
|
|
2325
2388
|
default: C(() => [
|
|
2326
2389
|
M(a, {
|
|
@@ -2328,11 +2391,11 @@ function Wi(t, e, o, n, i, s) {
|
|
|
2328
2391
|
gap: "0"
|
|
2329
2392
|
}, {
|
|
2330
2393
|
default: C(() => [
|
|
2331
|
-
t.$props.node.attrs.locked ? (_(),
|
|
2394
|
+
t.$props.node.attrs.locked ? (_(), A(r, {
|
|
2332
2395
|
key: 0,
|
|
2333
2396
|
size: "200"
|
|
2334
|
-
})) :
|
|
2335
|
-
|
|
2397
|
+
})) : rt("", !0),
|
|
2398
|
+
ot("span", null, $(s.text), 1)
|
|
2336
2399
|
]),
|
|
2337
2400
|
_: 1
|
|
2338
2401
|
})
|
|
@@ -2343,10 +2406,10 @@ function Wi(t, e, o, n, i, s) {
|
|
|
2343
2406
|
_: 1
|
|
2344
2407
|
});
|
|
2345
2408
|
}
|
|
2346
|
-
const
|
|
2409
|
+
const es = /* @__PURE__ */ q(Qi, [["render", ts]]), ns = Mt.extend({
|
|
2347
2410
|
name: "channel",
|
|
2348
2411
|
addNodeView() {
|
|
2349
|
-
return
|
|
2412
|
+
return gt(es);
|
|
2350
2413
|
},
|
|
2351
2414
|
parseHTML() {
|
|
2352
2415
|
return [
|
|
@@ -2380,16 +2443,16 @@ const qi = /* @__PURE__ */ q(Ki, [["render", Wi]]), Xi = Rt.extend({
|
|
|
2380
2443
|
}).configure({
|
|
2381
2444
|
suggestion: {
|
|
2382
2445
|
char: "#",
|
|
2383
|
-
pluginKey: new
|
|
2446
|
+
pluginKey: new at("channelSuggestion")
|
|
2384
2447
|
}
|
|
2385
|
-
}),
|
|
2448
|
+
}), os = {
|
|
2386
2449
|
compatConfig: { MODE: 3 },
|
|
2387
2450
|
name: "SlashCommandsComponent",
|
|
2388
2451
|
components: {
|
|
2389
|
-
NodeViewWrapper:
|
|
2452
|
+
NodeViewWrapper: mt
|
|
2390
2453
|
},
|
|
2391
2454
|
props: {
|
|
2392
|
-
...
|
|
2455
|
+
...pt
|
|
2393
2456
|
},
|
|
2394
2457
|
emits: ["selected-command"],
|
|
2395
2458
|
computed: {
|
|
@@ -2405,23 +2468,23 @@ const qi = /* @__PURE__ */ q(Ki, [["render", Wi]]), Xi = Rt.extend({
|
|
|
2405
2468
|
e && typeof e == "function" && e(t);
|
|
2406
2469
|
}
|
|
2407
2470
|
};
|
|
2408
|
-
function
|
|
2471
|
+
function is(t, e, o, n, i, s) {
|
|
2409
2472
|
const r = T("node-view-wrapper");
|
|
2410
|
-
return _(),
|
|
2473
|
+
return _(), A(r, { class: "d-d-inline-block" }, {
|
|
2411
2474
|
default: C(() => [
|
|
2412
|
-
|
|
2475
|
+
lt($(s.text), 1)
|
|
2413
2476
|
]),
|
|
2414
2477
|
_: 1
|
|
2415
2478
|
});
|
|
2416
2479
|
}
|
|
2417
|
-
const
|
|
2480
|
+
const ss = /* @__PURE__ */ q(os, [["render", is]]), rs = (t, e) => [...t.matchAll(e)].map((n) => {
|
|
2418
2481
|
let i = n[2];
|
|
2419
2482
|
return i.endsWith(" ") || (i += " "), {
|
|
2420
2483
|
index: n.index,
|
|
2421
2484
|
text: i,
|
|
2422
2485
|
match: n
|
|
2423
2486
|
};
|
|
2424
|
-
}),
|
|
2487
|
+
}), as = Mt.extend({
|
|
2425
2488
|
name: "slash-commands",
|
|
2426
2489
|
group: "inline",
|
|
2427
2490
|
inline: !0,
|
|
@@ -2438,7 +2501,7 @@ const Ji = /* @__PURE__ */ q(Yi, [["render", Gi]]), Zi = (t, e) => [...t.matchAl
|
|
|
2438
2501
|
};
|
|
2439
2502
|
},
|
|
2440
2503
|
addNodeView() {
|
|
2441
|
-
return
|
|
2504
|
+
return gt(ss);
|
|
2442
2505
|
},
|
|
2443
2506
|
parseHTML() {
|
|
2444
2507
|
return [
|
|
@@ -2470,7 +2533,7 @@ const Ji = /* @__PURE__ */ q(Yi, [["render", Gi]]), Zi = (t, e) => [...t.matchAl
|
|
|
2470
2533
|
var o;
|
|
2471
2534
|
const t = (o = this.options.suggestion) == null ? void 0 : o.items({ query: "" }).map((n) => n.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) $`);
|
|
2472
2535
|
return [
|
|
2473
|
-
|
|
2536
|
+
nn({
|
|
2474
2537
|
find: e,
|
|
2475
2538
|
type: this.type,
|
|
2476
2539
|
getAttributes(n) {
|
|
@@ -2483,8 +2546,8 @@ const Ji = /* @__PURE__ */ q(Yi, [["render", Gi]]), Zi = (t, e) => [...t.matchAl
|
|
|
2483
2546
|
var o;
|
|
2484
2547
|
const t = (o = this.options.suggestion) == null ? void 0 : o.items({ query: "" }).map((n) => n.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) ?$`, "g");
|
|
2485
2548
|
return [
|
|
2486
|
-
|
|
2487
|
-
find: (n) =>
|
|
2549
|
+
St({
|
|
2550
|
+
find: (n) => rs(n, e),
|
|
2488
2551
|
type: this.type,
|
|
2489
2552
|
getAttributes(n) {
|
|
2490
2553
|
return { command: n[0].trim() };
|
|
@@ -2495,22 +2558,22 @@ const Ji = /* @__PURE__ */ q(Yi, [["render", Gi]]), Zi = (t, e) => [...t.matchAl
|
|
|
2495
2558
|
}).configure({
|
|
2496
2559
|
suggestion: {
|
|
2497
2560
|
char: "/",
|
|
2498
|
-
pluginKey: new
|
|
2561
|
+
pluginKey: new at("slashCommandSuggestion")
|
|
2499
2562
|
}
|
|
2500
|
-
}),
|
|
2563
|
+
}), ls = 100, cs = {
|
|
2501
2564
|
name: "VariableComponent",
|
|
2502
2565
|
components: {
|
|
2503
|
-
DtBadge:
|
|
2504
|
-
DtButton:
|
|
2505
|
-
DtPopover:
|
|
2506
|
-
DtInput:
|
|
2507
|
-
NodeViewWrapper:
|
|
2566
|
+
DtBadge: Zn,
|
|
2567
|
+
DtButton: xe,
|
|
2568
|
+
DtPopover: Jn,
|
|
2569
|
+
DtInput: Gn,
|
|
2570
|
+
NodeViewWrapper: mt
|
|
2508
2571
|
},
|
|
2509
|
-
props:
|
|
2572
|
+
props: pt,
|
|
2510
2573
|
data() {
|
|
2511
2574
|
return {
|
|
2512
|
-
i18n: new
|
|
2513
|
-
MAX_VARIABLE_ALT_LENGTH:
|
|
2575
|
+
i18n: new ve(),
|
|
2576
|
+
MAX_VARIABLE_ALT_LENGTH: ls
|
|
2514
2577
|
};
|
|
2515
2578
|
},
|
|
2516
2579
|
computed: {
|
|
@@ -2550,11 +2613,11 @@ const Ji = /* @__PURE__ */ q(Yi, [["render", Gi]]), Zi = (t, e) => [...t.matchAl
|
|
|
2550
2613
|
}
|
|
2551
2614
|
}
|
|
2552
2615
|
};
|
|
2553
|
-
function
|
|
2616
|
+
function ds(t, e, o, n, i, s) {
|
|
2554
2617
|
const r = T("dt-badge"), a = T("dt-button"), l = T("dt-input"), u = T("dt-popover"), d = T("node-view-wrapper");
|
|
2555
|
-
return _(),
|
|
2618
|
+
return _(), A(d, { class: "d-d-inline-block" }, {
|
|
2556
2619
|
default: C(() => [
|
|
2557
|
-
s.enableAltText ? (_(),
|
|
2620
|
+
s.enableAltText ? (_(), A(u, {
|
|
2558
2621
|
key: 0,
|
|
2559
2622
|
padding: "small",
|
|
2560
2623
|
"navigation-type": "arrow-keys",
|
|
@@ -2562,7 +2625,7 @@ function ns(t, e, o, n, i, s) {
|
|
|
2562
2625
|
modal: !1
|
|
2563
2626
|
}, {
|
|
2564
2627
|
anchor: C(({ attrs: c }) => [
|
|
2565
|
-
M(a,
|
|
2628
|
+
M(a, me(c, { kind: "unstyled" }), {
|
|
2566
2629
|
default: C(() => [
|
|
2567
2630
|
M(r, {
|
|
2568
2631
|
text: s.badgeLabel,
|
|
@@ -2588,11 +2651,11 @@ function ns(t, e, o, n, i, s) {
|
|
|
2588
2651
|
limitMaxLength: !0
|
|
2589
2652
|
}
|
|
2590
2653
|
},
|
|
2591
|
-
onKeyup:
|
|
2654
|
+
onKeyup: pn((h) => c(), ["enter"])
|
|
2592
2655
|
}, null, 8, ["modelValue", "label", "placeholder", "validate", "onKeyup"])
|
|
2593
2656
|
]),
|
|
2594
2657
|
_: 1
|
|
2595
|
-
})) : (_(),
|
|
2658
|
+
})) : (_(), A(r, {
|
|
2596
2659
|
key: 1,
|
|
2597
2660
|
text: s.badgeLabel,
|
|
2598
2661
|
contenteditable: "false"
|
|
@@ -2601,7 +2664,7 @@ function ns(t, e, o, n, i, s) {
|
|
|
2601
2664
|
_: 1
|
|
2602
2665
|
});
|
|
2603
2666
|
}
|
|
2604
|
-
const
|
|
2667
|
+
const us = /* @__PURE__ */ q(cs, [["render", ds]]), hs = le.create({
|
|
2605
2668
|
name: "variable",
|
|
2606
2669
|
group: "inline",
|
|
2607
2670
|
inline: !0,
|
|
@@ -2614,7 +2677,7 @@ const os = /* @__PURE__ */ q(es, [["render", ns]]), is = ae.create({
|
|
|
2614
2677
|
};
|
|
2615
2678
|
},
|
|
2616
2679
|
addNodeView() {
|
|
2617
|
-
return
|
|
2680
|
+
return gt(us);
|
|
2618
2681
|
},
|
|
2619
2682
|
addAttributes() {
|
|
2620
2683
|
return {
|
|
@@ -2673,12 +2736,12 @@ const os = /* @__PURE__ */ q(es, [["render", ns]]), is = ae.create({
|
|
|
2673
2736
|
})
|
|
2674
2737
|
};
|
|
2675
2738
|
}
|
|
2676
|
-
}),
|
|
2739
|
+
}), fs = {
|
|
2677
2740
|
compatConfig: { MODE: 3 },
|
|
2678
2741
|
name: "MentionSuggestion",
|
|
2679
2742
|
components: {
|
|
2680
|
-
DtAvatar:
|
|
2681
|
-
DtStack:
|
|
2743
|
+
DtAvatar: eo,
|
|
2744
|
+
DtStack: yt
|
|
2682
2745
|
},
|
|
2683
2746
|
props: {
|
|
2684
2747
|
item: {
|
|
@@ -2714,16 +2777,16 @@ const os = /* @__PURE__ */ q(es, [["render", ns]]), is = ae.create({
|
|
|
2714
2777
|
return this.item.showDetails;
|
|
2715
2778
|
}
|
|
2716
2779
|
}
|
|
2717
|
-
},
|
|
2780
|
+
}, ps = { class: "d-mention-suggestion__name" }, ms = {
|
|
2718
2781
|
key: 1,
|
|
2719
2782
|
class: "d-mention-suggestion__divider"
|
|
2720
|
-
},
|
|
2783
|
+
}, gs = {
|
|
2721
2784
|
key: 2,
|
|
2722
2785
|
class: "d-mention-suggestion__status"
|
|
2723
2786
|
};
|
|
2724
|
-
function
|
|
2787
|
+
function ys(t, e, o, n, i, s) {
|
|
2725
2788
|
const r = T("dt-avatar"), a = T("dt-stack");
|
|
2726
|
-
return _(),
|
|
2789
|
+
return _(), A(a, {
|
|
2727
2790
|
direction: "row",
|
|
2728
2791
|
class: "d-mention-suggestion__container",
|
|
2729
2792
|
gap: "400"
|
|
@@ -2742,23 +2805,23 @@ function cs(t, e, o, n, i, s) {
|
|
|
2742
2805
|
gap: "100"
|
|
2743
2806
|
}, {
|
|
2744
2807
|
default: C(() => [
|
|
2745
|
-
|
|
2746
|
-
s.showDetails ? (_(),
|
|
2808
|
+
ot("span", ps, $(s.name), 1),
|
|
2809
|
+
s.showDetails ? (_(), A(a, {
|
|
2747
2810
|
key: 0,
|
|
2748
2811
|
direction: "row",
|
|
2749
2812
|
gap: "300",
|
|
2750
2813
|
class: "d-label--sm-plain"
|
|
2751
2814
|
}, {
|
|
2752
2815
|
default: C(() => [
|
|
2753
|
-
s.presenceText ? (_(),
|
|
2816
|
+
s.presenceText ? (_(), nt("span", {
|
|
2754
2817
|
key: 0,
|
|
2755
|
-
class:
|
|
2756
|
-
}, $(s.presenceText), 3)) :
|
|
2757
|
-
s.status && s.presenceText ? (_(),
|
|
2758
|
-
s.status ? (_(),
|
|
2818
|
+
class: pe(["d-mention-suggestion__presence", [s.presenceFontColorClass]])
|
|
2819
|
+
}, $(s.presenceText), 3)) : rt("", !0),
|
|
2820
|
+
s.status && s.presenceText ? (_(), nt("div", ms, " • ")) : rt("", !0),
|
|
2821
|
+
s.status ? (_(), nt("div", gs, $(s.status), 1)) : rt("", !0)
|
|
2759
2822
|
]),
|
|
2760
2823
|
_: 1
|
|
2761
|
-
})) :
|
|
2824
|
+
})) : rt("", !0)
|
|
2762
2825
|
]),
|
|
2763
2826
|
_: 1
|
|
2764
2827
|
})
|
|
@@ -2766,19 +2829,19 @@ function cs(t, e, o, n, i, s) {
|
|
|
2766
2829
|
_: 1
|
|
2767
2830
|
});
|
|
2768
2831
|
}
|
|
2769
|
-
const
|
|
2832
|
+
const ws = /* @__PURE__ */ q(fs, [["render", ys]]), bs = {
|
|
2770
2833
|
// This function comes from the user and passed to the editor directly.
|
|
2771
2834
|
// This will also activate the mention plugin on the editor
|
|
2772
2835
|
// items: ({ query }) => { return [] },
|
|
2773
2836
|
allowSpaces: !0,
|
|
2774
|
-
render:
|
|
2775
|
-
},
|
|
2837
|
+
render: Ot(ws, "mention")
|
|
2838
|
+
}, vs = {
|
|
2776
2839
|
compatConfig: { MODE: 3 },
|
|
2777
2840
|
name: "ChannelSuggestion",
|
|
2778
2841
|
components: {
|
|
2779
|
-
DtStack:
|
|
2780
|
-
DtIconHash:
|
|
2781
|
-
DtIconLock:
|
|
2842
|
+
DtStack: yt,
|
|
2843
|
+
DtIconHash: no,
|
|
2844
|
+
DtIconLock: oo
|
|
2782
2845
|
},
|
|
2783
2846
|
props: {
|
|
2784
2847
|
item: {
|
|
@@ -2792,32 +2855,32 @@ const ds = /* @__PURE__ */ q(ss, [["render", cs]]), us = {
|
|
|
2792
2855
|
}
|
|
2793
2856
|
}
|
|
2794
2857
|
};
|
|
2795
|
-
function
|
|
2858
|
+
function xs(t, e, o, n, i, s) {
|
|
2796
2859
|
const r = T("dt-icon-hash"), a = T("dt-icon-lock"), l = T("dt-stack");
|
|
2797
|
-
return _(),
|
|
2860
|
+
return _(), A(l, {
|
|
2798
2861
|
direction: "row",
|
|
2799
2862
|
gap: "400"
|
|
2800
2863
|
}, {
|
|
2801
2864
|
default: C(() => [
|
|
2802
|
-
o.item.locked ? (_(),
|
|
2865
|
+
o.item.locked ? (_(), A(a, {
|
|
2803
2866
|
key: 1,
|
|
2804
2867
|
size: "300"
|
|
2805
|
-
})) : (_(),
|
|
2868
|
+
})) : (_(), A(r, {
|
|
2806
2869
|
key: 0,
|
|
2807
2870
|
size: "300"
|
|
2808
2871
|
})),
|
|
2809
|
-
|
|
2872
|
+
ot("span", null, $(s.name), 1)
|
|
2810
2873
|
]),
|
|
2811
2874
|
_: 1
|
|
2812
2875
|
});
|
|
2813
2876
|
}
|
|
2814
|
-
const
|
|
2877
|
+
const Ts = /* @__PURE__ */ q(vs, [["render", xs]]), _s = {
|
|
2815
2878
|
// This function comes from the user and passed to the editor directly.
|
|
2816
2879
|
// This will also activate the mention plugin on the editor
|
|
2817
2880
|
// items: ({ query }) => { return [] },
|
|
2818
2881
|
allowSpaces: !0,
|
|
2819
|
-
render:
|
|
2820
|
-
},
|
|
2882
|
+
render: Ot(Ts, "channel")
|
|
2883
|
+
}, ks = {
|
|
2821
2884
|
compatConfig: { MODE: 3 },
|
|
2822
2885
|
name: "SlashCommandSuggestion",
|
|
2823
2886
|
props: {
|
|
@@ -2837,31 +2900,31 @@ const ps = /* @__PURE__ */ q(hs, [["render", fs]]), ms = {
|
|
|
2837
2900
|
return this.item.parametersExample;
|
|
2838
2901
|
}
|
|
2839
2902
|
}
|
|
2840
|
-
},
|
|
2841
|
-
function
|
|
2842
|
-
return _(),
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
s.parametersExample ? (_(),
|
|
2903
|
+
}, Cs = { class: "d-body--md-compact" }, Os = { key: 0 }, Es = { class: "d-body--sm d-fc-tertiary" };
|
|
2904
|
+
function Ss(t, e, o, n, i, s) {
|
|
2905
|
+
return _(), nt("div", null, [
|
|
2906
|
+
ot("div", Cs, [
|
|
2907
|
+
ot("span", null, "/" + $(s.command), 1),
|
|
2908
|
+
s.parametersExample ? (_(), nt("span", Os, $(s.parametersExample), 1)) : rt("", !0)
|
|
2846
2909
|
]),
|
|
2847
|
-
|
|
2910
|
+
ot("div", Es, $(s.description), 1)
|
|
2848
2911
|
]);
|
|
2849
2912
|
}
|
|
2850
|
-
const
|
|
2913
|
+
const Ls = /* @__PURE__ */ q(ks, [["render", Ss]]), As = {
|
|
2851
2914
|
// This function comes from the user and passed to the editor directly.
|
|
2852
2915
|
// This will also activate the mention plugin on the editor
|
|
2853
2916
|
// items: ({ query }) => { return [] },
|
|
2854
2917
|
allowSpaces: !0,
|
|
2855
2918
|
startOfLine: !0,
|
|
2856
|
-
render:
|
|
2857
|
-
},
|
|
2919
|
+
render: Ot(Ls, "slash-command")
|
|
2920
|
+
}, Is = {
|
|
2858
2921
|
compatConfig: { MODE: 3 },
|
|
2859
2922
|
name: "DtRichTextEditor",
|
|
2860
2923
|
components: {
|
|
2861
|
-
EditorContent:
|
|
2862
|
-
BubbleMenu:
|
|
2863
|
-
DtButton:
|
|
2864
|
-
DtStack:
|
|
2924
|
+
EditorContent: Ke,
|
|
2925
|
+
BubbleMenu: ni,
|
|
2926
|
+
DtButton: xe,
|
|
2927
|
+
DtStack: yt
|
|
2865
2928
|
},
|
|
2866
2929
|
props: {
|
|
2867
2930
|
/**
|
|
@@ -2933,7 +2996,7 @@ const xs = /* @__PURE__ */ q(gs, [["render", vs]]), Ts = {
|
|
|
2933
2996
|
type: [Boolean, String, Number],
|
|
2934
2997
|
default: !1,
|
|
2935
2998
|
validator(t) {
|
|
2936
|
-
return typeof t == "string" ?
|
|
2999
|
+
return typeof t == "string" ? to.includes(t) : !0;
|
|
2937
3000
|
}
|
|
2938
3001
|
},
|
|
2939
3002
|
/**
|
|
@@ -2946,7 +3009,7 @@ const xs = /* @__PURE__ */ q(gs, [["render", vs]]), Ts = {
|
|
|
2946
3009
|
type: String,
|
|
2947
3010
|
default: "html",
|
|
2948
3011
|
validator(t) {
|
|
2949
|
-
return
|
|
3012
|
+
return Qn.includes(t);
|
|
2950
3013
|
}
|
|
2951
3014
|
},
|
|
2952
3015
|
/**
|
|
@@ -3298,12 +3361,12 @@ const xs = /* @__PURE__ */ q(gs, [["render", vs]]), Ts = {
|
|
|
3298
3361
|
editor: null,
|
|
3299
3362
|
appendTo: () => {
|
|
3300
3363
|
var t;
|
|
3301
|
-
return (t =
|
|
3364
|
+
return (t = Ft(this.$refs.editor.$el).getRootNode()) == null ? void 0 : t.querySelector("body");
|
|
3302
3365
|
},
|
|
3303
3366
|
floatingOptions: {
|
|
3304
3367
|
placement: "top-start"
|
|
3305
3368
|
},
|
|
3306
|
-
i18n: new
|
|
3369
|
+
i18n: new ve(),
|
|
3307
3370
|
// JSON-to-markdown converter
|
|
3308
3371
|
jsonToMarkdownConverter: {
|
|
3309
3372
|
convertToMarkdown(t) {
|
|
@@ -3443,15 +3506,15 @@ ${this.processNodeContent(t)}
|
|
|
3443
3506
|
},
|
|
3444
3507
|
// eslint-disable-next-line complexity
|
|
3445
3508
|
extensions() {
|
|
3446
|
-
const t = [
|
|
3447
|
-
t.push(this.useDivTags ?
|
|
3509
|
+
const t = [wn, In, bn, Tn];
|
|
3510
|
+
t.push(this.useDivTags ? Xi : ge), this.allowBold && t.push(_n), this.allowBlockquote && t.push(mn), this.allowBulletList && (t.push(kn), t.push(Cn.extend({
|
|
3448
3511
|
renderText({ node: n }) {
|
|
3449
3512
|
return n.textContent;
|
|
3450
3513
|
}
|
|
3451
|
-
})), t.push(
|
|
3452
|
-
|
|
3514
|
+
})), t.push(On)), this.allowItalic && t.push(En), this.allowStrike && t.push(Ln), this.allowUnderline && t.push(An), this.placeholder && t.push(
|
|
3515
|
+
vn.configure({ placeholder: this.placeholder })
|
|
3453
3516
|
);
|
|
3454
|
-
const e = this, o =
|
|
3517
|
+
const e = this, o = on.create({
|
|
3455
3518
|
addKeyboardShortcuts() {
|
|
3456
3519
|
return {
|
|
3457
3520
|
"Shift-Enter": ({ editor: n }) => e.allowLineBreaks ? !1 : (n.commands.first(({ commands: i }) => [
|
|
@@ -3465,7 +3528,7 @@ ${this.processNodeContent(t)}
|
|
|
3465
3528
|
};
|
|
3466
3529
|
}
|
|
3467
3530
|
});
|
|
3468
|
-
if (t.push(o), this.link && t.push(
|
|
3531
|
+
if (t.push(o), this.link && t.push(Sn.extend({
|
|
3469
3532
|
inclusive: !1,
|
|
3470
3533
|
addKeyboardShortcuts() {
|
|
3471
3534
|
return {
|
|
@@ -3478,29 +3541,29 @@ ${this.processNodeContent(t)}
|
|
|
3478
3541
|
},
|
|
3479
3542
|
openOnClick: !1,
|
|
3480
3543
|
autolink: !0,
|
|
3481
|
-
protocols:
|
|
3482
|
-
})), this.customLink && t.push(this.getExtension(
|
|
3483
|
-
const n = { ...this.mentionSuggestion, ...
|
|
3484
|
-
t.push(
|
|
3544
|
+
protocols: Kt
|
|
3545
|
+
})), this.customLink && t.push(this.getExtension(Wi, this.customLink)), this.mentionSuggestion) {
|
|
3546
|
+
const n = { ...this.mentionSuggestion, ...bs };
|
|
3547
|
+
t.push(Zi.configure({ suggestion: n }));
|
|
3485
3548
|
}
|
|
3486
3549
|
if (this.channelSuggestion) {
|
|
3487
|
-
const n = { ...this.channelSuggestion, ...
|
|
3488
|
-
t.push(
|
|
3550
|
+
const n = { ...this.channelSuggestion, ..._s };
|
|
3551
|
+
t.push(ns.configure({ suggestion: n }));
|
|
3489
3552
|
}
|
|
3490
3553
|
if (this.slashCommandSuggestion) {
|
|
3491
|
-
const n = { ...this.slashCommandSuggestion, ...
|
|
3492
|
-
t.push(
|
|
3554
|
+
const n = { ...this.slashCommandSuggestion, ...As };
|
|
3555
|
+
t.push(as.configure({
|
|
3493
3556
|
suggestion: n,
|
|
3494
3557
|
onSelectedCommand: (i) => {
|
|
3495
3558
|
this.$emit("selected-command", i);
|
|
3496
3559
|
}
|
|
3497
3560
|
}));
|
|
3498
3561
|
}
|
|
3499
|
-
return this.allowVariable && t.push(
|
|
3562
|
+
return this.allowVariable && t.push(hs.configure({
|
|
3500
3563
|
variableItems: this.variableItems
|
|
3501
|
-
})), t.push(
|
|
3564
|
+
})), t.push(Ni), t.push(Dn.configure({
|
|
3502
3565
|
types: ["paragraph"]
|
|
3503
|
-
})), this.allowCode && t.push(
|
|
3566
|
+
})), this.allowCode && t.push(yn), this.allowCodeblock && t.push(gn.extend({
|
|
3504
3567
|
renderText({ node: n }) {
|
|
3505
3568
|
return `\`\`\`
|
|
3506
3569
|
${n.textContent}
|
|
@@ -3510,18 +3573,24 @@ ${n.textContent}
|
|
|
3510
3573
|
HTMLAttributes: {
|
|
3511
3574
|
class: "d-rich-text-editor__code-block"
|
|
3512
3575
|
}
|
|
3513
|
-
})), this.allowInlineImages && t.push(
|
|
3576
|
+
})), this.allowInlineImages && t.push(qi.configure({
|
|
3514
3577
|
resize: {
|
|
3515
3578
|
enabled: this.allowImageResize,
|
|
3516
3579
|
alwaysPreserveAspectRatio: !0
|
|
3517
3580
|
}
|
|
3518
|
-
})), (this.allowFontFamily || this.allowFontColor || this.allowFontSize || this.allowBackgroundColor || this.allowLineHeight) && t.push(
|
|
3581
|
+
})), (this.allowFontFamily || this.allowFontColor || this.allowFontSize || this.allowBackgroundColor || this.allowLineHeight) && (t.push(Nn.configure({
|
|
3519
3582
|
color: this.allowFontColor,
|
|
3520
3583
|
backgroundColor: this.allowBackgroundColor,
|
|
3521
3584
|
fontFamily: this.allowFontFamily,
|
|
3522
3585
|
fontSize: this.allowFontSize,
|
|
3523
3586
|
lineHeight: this.allowLineHeight
|
|
3524
|
-
})), this.additionalExtensions.length && t.push(...this.additionalExtensions), this.allowTables && t.push(
|
|
3587
|
+
})), t.push(ci)), this.additionalExtensions.length && t.push(...this.additionalExtensions), this.allowTables && t.push(
|
|
3588
|
+
si.configure({ resizable: !0 }),
|
|
3589
|
+
ri,
|
|
3590
|
+
li,
|
|
3591
|
+
ai,
|
|
3592
|
+
xn
|
|
3593
|
+
), t;
|
|
3525
3594
|
},
|
|
3526
3595
|
inputAttrs() {
|
|
3527
3596
|
const t = {
|
|
@@ -3561,11 +3630,11 @@ ${n.textContent}
|
|
|
3561
3630
|
this.destroyEditor();
|
|
3562
3631
|
},
|
|
3563
3632
|
mounted() {
|
|
3564
|
-
|
|
3633
|
+
qn(Ft(this.$el), this.$options.name), this.processValue(this.modelValue, !1);
|
|
3565
3634
|
},
|
|
3566
3635
|
methods: {
|
|
3567
3636
|
createEditor() {
|
|
3568
|
-
this.editor = new
|
|
3637
|
+
this.editor = new We({
|
|
3569
3638
|
autofocus: this.autoFocus,
|
|
3570
3639
|
content: this.modelValue,
|
|
3571
3640
|
editable: this.editable,
|
|
@@ -3626,7 +3695,7 @@ ${n.textContent}
|
|
|
3626
3695
|
const t = this.editor.getAttributes("link").href;
|
|
3627
3696
|
window.open(t, "_blank");
|
|
3628
3697
|
},
|
|
3629
|
-
setLink(t, e, o, n =
|
|
3698
|
+
setLink(t, e, o, n = Kt, i) {
|
|
3630
3699
|
var a, l, u;
|
|
3631
3700
|
if (!t) {
|
|
3632
3701
|
this.removeLink();
|
|
@@ -3639,9 +3708,9 @@ ${n.textContent}
|
|
|
3639
3708
|
processValue(t, e = !0) {
|
|
3640
3709
|
if (!this.editor) return;
|
|
3641
3710
|
const o = this.getOutput();
|
|
3642
|
-
if (!(e &&
|
|
3711
|
+
if (!(e && io(t, o))) {
|
|
3643
3712
|
if (typeof t == "string" && this.outputFormat === "text") {
|
|
3644
|
-
const n = new RegExp(`(${
|
|
3713
|
+
const n = new RegExp(`(${ye})`, "g");
|
|
3645
3714
|
t = t == null ? void 0 : t.replace(n, '<emoji-component code="$1"></emoji-component>');
|
|
3646
3715
|
}
|
|
3647
3716
|
this.editor.commands.setContent(t, {
|
|
@@ -3787,11 +3856,11 @@ ${n.textContent}
|
|
|
3787
3856
|
this.editor.commands.focus();
|
|
3788
3857
|
}
|
|
3789
3858
|
}
|
|
3790
|
-
},
|
|
3791
|
-
function
|
|
3859
|
+
}, Ds = { class: "d-popover__dialog" };
|
|
3860
|
+
function Rs(t, e, o, n, i, s) {
|
|
3792
3861
|
const r = T("dt-button"), a = T("dt-stack"), l = T("bubble-menu"), u = T("editor-content");
|
|
3793
|
-
return _(),
|
|
3794
|
-
i.editor && o.link && !o.hideLinkBubbleMenu ? (_(),
|
|
3862
|
+
return _(), nt("div", null, [
|
|
3863
|
+
i.editor && o.link && !o.hideLinkBubbleMenu ? (_(), A(l, {
|
|
3795
3864
|
key: 0,
|
|
3796
3865
|
editor: i.editor,
|
|
3797
3866
|
"should-show": s.bubbleMenuShouldShow,
|
|
@@ -3800,7 +3869,7 @@ function Cs(t, e, o, n, i, s) {
|
|
|
3800
3869
|
style: { visibility: "visible" }
|
|
3801
3870
|
}, {
|
|
3802
3871
|
default: C(() => [
|
|
3803
|
-
|
|
3872
|
+
ot("div", Ds, [
|
|
3804
3873
|
M(a, {
|
|
3805
3874
|
direction: "row",
|
|
3806
3875
|
class: "d-rich-text-editor-bubble-menu__button-stack",
|
|
@@ -3813,7 +3882,7 @@ function Cs(t, e, o, n, i, s) {
|
|
|
3813
3882
|
onClick: s.editLink
|
|
3814
3883
|
}, {
|
|
3815
3884
|
default: C(() => [
|
|
3816
|
-
|
|
3885
|
+
lt($(i.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL")), 1)
|
|
3817
3886
|
]),
|
|
3818
3887
|
_: 1
|
|
3819
3888
|
}, 8, ["onClick"]),
|
|
@@ -3823,7 +3892,7 @@ function Cs(t, e, o, n, i, s) {
|
|
|
3823
3892
|
onClick: s.openLink
|
|
3824
3893
|
}, {
|
|
3825
3894
|
default: C(() => [
|
|
3826
|
-
|
|
3895
|
+
lt($(i.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL")), 1)
|
|
3827
3896
|
]),
|
|
3828
3897
|
_: 1
|
|
3829
3898
|
}, 8, ["onClick"]),
|
|
@@ -3833,7 +3902,7 @@ function Cs(t, e, o, n, i, s) {
|
|
|
3833
3902
|
onClick: s.removeLink
|
|
3834
3903
|
}, {
|
|
3835
3904
|
default: C(() => [
|
|
3836
|
-
|
|
3905
|
+
lt($(i.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL")), 1)
|
|
3837
3906
|
]),
|
|
3838
3907
|
_: 1
|
|
3839
3908
|
}, 8, ["onClick"])
|
|
@@ -3843,8 +3912,8 @@ function Cs(t, e, o, n, i, s) {
|
|
|
3843
3912
|
])
|
|
3844
3913
|
]),
|
|
3845
3914
|
_: 1
|
|
3846
|
-
}, 8, ["editor", "should-show", "options", "append-to"])) :
|
|
3847
|
-
M(u,
|
|
3915
|
+
}, 8, ["editor", "should-show", "options", "append-to"])) : rt("", !0),
|
|
3916
|
+
M(u, me({
|
|
3848
3917
|
ref: "editor",
|
|
3849
3918
|
editor: i.editor,
|
|
3850
3919
|
class: "d-rich-text-editor",
|
|
@@ -3852,8 +3921,8 @@ function Cs(t, e, o, n, i, s) {
|
|
|
3852
3921
|
}, s.attrs), null, 16, ["editor"])
|
|
3853
3922
|
]);
|
|
3854
3923
|
}
|
|
3855
|
-
const
|
|
3924
|
+
const kr = /* @__PURE__ */ q(Is, [["render", Rs]]);
|
|
3856
3925
|
export {
|
|
3857
|
-
|
|
3926
|
+
kr as default
|
|
3858
3927
|
};
|
|
3859
3928
|
//# sourceMappingURL=rich-text-editor.js.map
|