@dialpad/dialtone-vue 4.0.2 → 4.2.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/dist/ForceLinkify-CI1tkUBf.cjs +3 -0
- package/dist/ForceLinkify-CI1tkUBf.cjs.map +1 -0
- package/dist/ForceLinkify-bO3ug94b.js +544 -0
- package/dist/ForceLinkify-bO3ug94b.js.map +1 -0
- package/dist/{MarkdownRenderer-BQQDcWMC.cjs → MarkdownRenderer-B6oyniLV.cjs} +1 -1
- package/dist/{MarkdownRenderer-BQQDcWMC.cjs.map → MarkdownRenderer-B6oyniLV.cjs.map} +1 -1
- package/dist/{MarkdownRenderer-D3rM2x-1.js → MarkdownRenderer-D-EV50_M.js} +1 -1
- package/dist/{MarkdownRenderer-D3rM2x-1.js.map → MarkdownRenderer-D-EV50_M.js.map} +1 -1
- package/dist/{RichTextEditor-CzMY0oVT.js → RichTextEditor-Cz2VXb7-.js} +470 -466
- package/dist/{RichTextEditor-CzMY0oVT.js.map → RichTextEditor-Cz2VXb7-.js.map} +1 -1
- package/dist/RichTextEditor-EHgahp8r.cjs +11 -0
- package/dist/{RichTextEditor-n42FPkjs.cjs.map → RichTextEditor-EHgahp8r.cjs.map} +1 -1
- package/dist/{Scroller-BUtC5Z7j.cjs → Scroller-Du2kJsTR.cjs} +1 -1
- package/dist/{Scroller-BUtC5Z7j.cjs.map → Scroller-Du2kJsTR.cjs.map} +1 -1
- package/dist/{Scroller-BsGXTN6S.js → Scroller-JDoDYC5V.js} +1 -1
- package/dist/{Scroller-BsGXTN6S.js.map → Scroller-JDoDYC5V.js.map} +1 -1
- package/dist/{TextList-B6XFfQfD.js → TextList-D40u4g4T.js} +1 -1
- package/dist/{TextList-B6XFfQfD.js.map → TextList-D40u4g4T.js.map} +1 -1
- package/dist/{TextList-Dd-ROFiI.cjs → TextList-rS1MQdPB.cjs} +1 -1
- package/dist/{TextList-Dd-ROFiI.cjs.map → TextList-rS1MQdPB.cjs.map} +1 -1
- package/dist/{TextListItem-DIlrCkaM.cjs → TextListItem-CF6DzdvT.cjs} +1 -1
- package/dist/{TextListItem-DIlrCkaM.cjs.map → TextListItem-CF6DzdvT.cjs.map} +1 -1
- package/dist/{TextListItem-ImUi_FWh.js → TextListItem-PHgDIWV1.js} +1 -1
- package/dist/{TextListItem-ImUi_FWh.js.map → TextListItem-PHgDIWV1.js.map} +1 -1
- package/dist/{Toast-IyFVsArp.cjs → Toast-CN9x3jKH.cjs} +1 -1
- package/dist/{Toast-IyFVsArp.cjs.map → Toast-CN9x3jKH.cjs.map} +1 -1
- package/dist/{Toast-t6T8fd29.js → Toast-DVUE2_fV.js} +1 -1
- package/dist/{Toast-t6T8fd29.js.map → Toast-DVUE2_fV.js.map} +1 -1
- package/dist/component-documentation.json +1 -1
- package/dist/components/RichTextEditor/ForceLinkify.d.ts +4 -0
- package/dist/components/RichTextEditor/ForceLinkify.d.ts.map +1 -0
- package/dist/components/SplitButton/SplitButton.vue.d.ts +20 -2
- package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
- package/dist/dialtone-vue.cjs +1 -1
- package/dist/dialtone-vue.js +5 -5
- package/dist/lib/rich-text-editor/force-linkify.cjs +1 -0
- package/dist/lib/rich-text-editor/force-linkify.js +2 -0
- package/dist/lib/rich-text-editor/index.cjs +1 -1
- package/dist/lib/rich-text-editor/index.js +1 -1
- package/dist/lib/rich-text-editor/markdown-renderer.cjs +1 -1
- package/dist/lib/rich-text-editor/markdown-renderer.js +1 -1
- package/dist/lib/rich-text-editor/rich-text-editor.cjs +1 -1
- package/dist/lib/rich-text-editor/rich-text-editor.js +1 -1
- package/dist/lib/scroller/index.cjs +1 -1
- package/dist/lib/scroller/index.js +1 -1
- package/dist/lib/scroller/scroller.cjs +1 -1
- package/dist/lib/scroller/scroller.js +1 -1
- package/dist/lib/split-button/split-button.cjs +1 -1
- package/dist/lib/split-button/split-button.cjs.map +1 -1
- package/dist/lib/split-button/split-button.js +18 -2
- package/dist/lib/split-button/split-button.js.map +1 -1
- package/dist/lib/text-list/index.cjs +1 -1
- package/dist/lib/text-list/index.js +2 -2
- package/dist/lib/text-list/text-list-item.cjs +1 -1
- package/dist/lib/text-list/text-list-item.js +1 -1
- package/dist/lib/text-list/text-list.cjs +1 -1
- package/dist/lib/text-list/text-list.js +1 -1
- package/dist/lib/toast/index.cjs +1 -1
- package/dist/lib/toast/index.js +1 -1
- package/dist/lib/toast/toast.cjs +1 -1
- package/dist/lib/toast/toast.js +1 -1
- package/package.json +4 -4
- package/dist/RichTextEditor-n42FPkjs.cjs +0 -11
|
@@ -12,54 +12,55 @@ import _ from "./lib/stack/stack.js";
|
|
|
12
12
|
import v from "./lib/popover/popover.js";
|
|
13
13
|
import y from "./lib/emoji/emoji.js";
|
|
14
14
|
import b from "./lib/input/input.js";
|
|
15
|
-
import { Editor as x, EditorContent as
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import Ve from "@tiptap/
|
|
25
|
-
import He from "@tiptap/extension-
|
|
26
|
-
import Ue from "@tiptap/extension-code";
|
|
27
|
-
import We from "@tiptap/extension-
|
|
28
|
-
import
|
|
29
|
-
import Je from "@tiptap/
|
|
30
|
-
import Ye from "@tiptap/extension-
|
|
31
|
-
import Xe from "@tiptap/extension-
|
|
32
|
-
import
|
|
33
|
-
import et from "@tiptap/extension-
|
|
34
|
-
import tt from "@tiptap/extension-
|
|
35
|
-
import nt from "@tiptap/extension-
|
|
36
|
-
import rt from "@tiptap/extension-
|
|
37
|
-
import it from "@tiptap/extension-
|
|
38
|
-
import at from "@tiptap/extension-text
|
|
39
|
-
import
|
|
40
|
-
import {
|
|
41
|
-
import ft from "@tiptap/
|
|
42
|
-
import pt from "@tiptap/
|
|
43
|
-
import mt from "@tiptap/extension-
|
|
44
|
-
import ht from "@
|
|
45
|
-
import gt from "@dialpad/dialtone-icons/vue/
|
|
46
|
-
import _t from "
|
|
15
|
+
import { Editor as x, EditorContent as S, NodeViewWrapper as C, VueNodeViewRenderer as w, VueRenderer as T, nodeViewProps as E } from "./node_modules/@tiptap/vue-3.js";
|
|
16
|
+
import { t as ee } from "./ForceLinkify-bO3ug94b.js";
|
|
17
|
+
import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as te, RICH_TEXT_EDITOR_OUTPUT_FORMATS as ne, RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as D } from "./lib/rich-text-editor/rich-text-editor-constants.js";
|
|
18
|
+
import { t as re } from "./MarkdownRenderer-D-EV50_M.js";
|
|
19
|
+
import { Fragment as ie, createBlock as O, createCommentVNode as k, createElementBlock as ae, createElementVNode as oe, createTextVNode as A, createVNode as j, defineComponent as se, h as ce, markRaw as le, mergeProps as ue, nextTick as de, normalizeClass as fe, onBeforeUnmount as pe, onMounted as me, openBlock as M, ref as he, renderList as ge, resolveComponent as N, resolveDynamicComponent as _e, toDisplayString as P, vShow as ve, withCtx as F, withDirectives as ye, withKeys as be, withModifiers as xe } from "vue";
|
|
20
|
+
import { DtIconLock as Se } from "@dialpad/dialtone-icons/vue";
|
|
21
|
+
import { emojiPattern as Ce } from "regex-combined-emojis";
|
|
22
|
+
import { Extension as we, InputRule as Te, Mark as Ee, Node as De, combineTransactionSteps as Oe, findChildrenInRange as ke, getChangedRanges as Ae, getMarkRange as je, getMarksBetween as Me, getText as Ne, getTextSerializersFromSchema as Pe, isTextSelection as Fe, mergeAttributes as I, nodeInputRule as Ie, nodePasteRule as Le, posToDOMRect as Re } from "@tiptap/core";
|
|
23
|
+
import { NodeSelection as ze, Plugin as Be, PluginKey as L } from "@tiptap/pm/state";
|
|
24
|
+
import { CellSelection as Ve } from "@tiptap/pm/tables";
|
|
25
|
+
import He from "@tiptap/extension-blockquote";
|
|
26
|
+
import Ue from "@tiptap/extension-code-block";
|
|
27
|
+
import We from "@tiptap/extension-code";
|
|
28
|
+
import Ge from "@tiptap/extension-document";
|
|
29
|
+
import { Gapcursor as Ke, Placeholder as qe, UndoRedo as Je } from "@tiptap/extensions";
|
|
30
|
+
import Ye from "@tiptap/extension-hard-break";
|
|
31
|
+
import Xe from "@tiptap/extension-paragraph";
|
|
32
|
+
import Ze from "@tiptap/extension-bold";
|
|
33
|
+
import { BulletList as Qe, ListItem as $e, OrderedList as et } from "@tiptap/extension-list";
|
|
34
|
+
import tt from "@tiptap/extension-italic";
|
|
35
|
+
import nt from "@tiptap/extension-link";
|
|
36
|
+
import rt from "@tiptap/extension-strike";
|
|
37
|
+
import it from "@tiptap/extension-underline";
|
|
38
|
+
import at from "@tiptap/extension-text";
|
|
39
|
+
import ot from "@tiptap/extension-text-align";
|
|
40
|
+
import { Table as st, TableCell as ct, TableHeader as lt, TableRow as ut } from "@tiptap/extension-table";
|
|
41
|
+
import { TextStyle as dt, TextStyleKit as ft } from "@tiptap/extension-text-style";
|
|
42
|
+
import pt from "@tiptap/suggestion";
|
|
43
|
+
import mt from "@tiptap/extension-image";
|
|
44
|
+
import ht from "@tiptap/extension-mention";
|
|
45
|
+
import gt from "@dialpad/dialtone-icons/vue/hash";
|
|
46
|
+
import _t from "@dialpad/dialtone-icons/vue/lock";
|
|
47
|
+
import vt from "deep-equal";
|
|
47
48
|
//#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
48
|
-
var
|
|
49
|
+
var yt = [
|
|
49
50
|
"top",
|
|
50
51
|
"right",
|
|
51
52
|
"bottom",
|
|
52
53
|
"left"
|
|
53
|
-
],
|
|
54
|
+
], bt = ["start", "end"], xt = /* @__PURE__ */ yt.reduce((e, t) => e.concat(t, t + "-" + bt[0], t + "-" + bt[1]), []), R = Math.min, z = Math.max, St = Math.round, B = (e) => ({
|
|
54
55
|
x: e,
|
|
55
56
|
y: e
|
|
56
|
-
}),
|
|
57
|
+
}), Ct = {
|
|
57
58
|
left: "right",
|
|
58
59
|
right: "left",
|
|
59
60
|
bottom: "top",
|
|
60
61
|
top: "bottom"
|
|
61
62
|
};
|
|
62
|
-
function
|
|
63
|
+
function wt(e, t, n) {
|
|
63
64
|
return z(e, R(t, n));
|
|
64
65
|
}
|
|
65
66
|
function V(e, t) {
|
|
@@ -71,54 +72,54 @@ function H(e) {
|
|
|
71
72
|
function U(e) {
|
|
72
73
|
return e.split("-")[1];
|
|
73
74
|
}
|
|
74
|
-
function
|
|
75
|
+
function Tt(e) {
|
|
75
76
|
return e === "x" ? "y" : "x";
|
|
76
77
|
}
|
|
77
|
-
function
|
|
78
|
+
function Et(e) {
|
|
78
79
|
return e === "y" ? "height" : "width";
|
|
79
80
|
}
|
|
80
81
|
function W(e) {
|
|
81
82
|
let t = e[0];
|
|
82
83
|
return t === "t" || t === "b" ? "y" : "x";
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
-
return
|
|
85
|
+
function Dt(e) {
|
|
86
|
+
return Tt(W(e));
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
+
function Ot(e, t, n) {
|
|
88
89
|
n === void 0 && (n = !1);
|
|
89
|
-
let r = U(e), i =
|
|
90
|
-
return t.reference[a] > t.floating[a] && (o =
|
|
90
|
+
let r = U(e), i = Dt(e), a = Et(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
91
|
+
return t.reference[a] > t.floating[a] && (o = Lt(o)), [o, Lt(o)];
|
|
91
92
|
}
|
|
92
|
-
function
|
|
93
|
-
let t =
|
|
93
|
+
function kt(e) {
|
|
94
|
+
let t = Lt(e);
|
|
94
95
|
return [
|
|
95
|
-
|
|
96
|
+
At(e),
|
|
96
97
|
t,
|
|
97
|
-
|
|
98
|
+
At(t)
|
|
98
99
|
];
|
|
99
100
|
}
|
|
100
|
-
function
|
|
101
|
+
function At(e) {
|
|
101
102
|
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
102
103
|
}
|
|
103
|
-
var
|
|
104
|
-
function
|
|
104
|
+
var jt = ["left", "right"], Mt = ["right", "left"], Nt = ["top", "bottom"], Pt = ["bottom", "top"];
|
|
105
|
+
function Ft(e, t, n) {
|
|
105
106
|
switch (e) {
|
|
106
107
|
case "top":
|
|
107
|
-
case "bottom": return n ? t ?
|
|
108
|
+
case "bottom": return n ? t ? Mt : jt : t ? jt : Mt;
|
|
108
109
|
case "left":
|
|
109
|
-
case "right": return t ?
|
|
110
|
+
case "right": return t ? Nt : Pt;
|
|
110
111
|
default: return [];
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
function
|
|
114
|
-
let i = U(e), a =
|
|
115
|
-
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(
|
|
114
|
+
function It(e, t, n, r) {
|
|
115
|
+
let i = U(e), a = Ft(H(e), n === "start", r);
|
|
116
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(At)))), a;
|
|
116
117
|
}
|
|
117
|
-
function
|
|
118
|
+
function Lt(e) {
|
|
118
119
|
let t = H(e);
|
|
119
|
-
return
|
|
120
|
+
return Ct[t] + e.slice(t.length);
|
|
120
121
|
}
|
|
121
|
-
function
|
|
122
|
+
function Rt(e) {
|
|
122
123
|
return {
|
|
123
124
|
top: 0,
|
|
124
125
|
right: 0,
|
|
@@ -127,15 +128,15 @@ function Lt(e) {
|
|
|
127
128
|
...e
|
|
128
129
|
};
|
|
129
130
|
}
|
|
130
|
-
function
|
|
131
|
+
function zt(e) {
|
|
131
132
|
return typeof e == "number" ? {
|
|
132
133
|
top: e,
|
|
133
134
|
right: e,
|
|
134
135
|
bottom: e,
|
|
135
136
|
left: e
|
|
136
|
-
} :
|
|
137
|
+
} : Rt(e);
|
|
137
138
|
}
|
|
138
|
-
function
|
|
139
|
+
function G(e) {
|
|
139
140
|
let { x: t, y: n, width: r, height: i } = e;
|
|
140
141
|
return {
|
|
141
142
|
width: r,
|
|
@@ -151,7 +152,7 @@ function zt(e) {
|
|
|
151
152
|
//#endregion
|
|
152
153
|
//#region ../../node_modules/.pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
153
154
|
function Bt(e, t, n) {
|
|
154
|
-
let { reference: r, floating: i } = e, a = W(t), o =
|
|
155
|
+
let { reference: r, floating: i } = e, a = W(t), o = Dt(t), s = Et(o), c = H(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
155
156
|
switch (c) {
|
|
156
157
|
case "top":
|
|
157
158
|
p = {
|
|
@@ -194,7 +195,7 @@ function Bt(e, t, n) {
|
|
|
194
195
|
}
|
|
195
196
|
async function Vt(e, t) {
|
|
196
197
|
t === void 0 && (t = {});
|
|
197
|
-
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = V(t, e), p =
|
|
198
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = V(t, e), p = zt(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = G(await i.getClippingRect({
|
|
198
199
|
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
199
200
|
boundary: c,
|
|
200
201
|
rootBoundary: l,
|
|
@@ -207,7 +208,7 @@ async function Vt(e, t) {
|
|
|
207
208
|
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
208
209
|
x: 1,
|
|
209
210
|
y: 1
|
|
210
|
-
}, y =
|
|
211
|
+
}, y = G(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
211
212
|
elements: o,
|
|
212
213
|
rect: g,
|
|
213
214
|
offsetParent: _,
|
|
@@ -268,34 +269,34 @@ var Ht = 50, Ut = async (e, t, n) => {
|
|
|
268
269
|
async fn(t) {
|
|
269
270
|
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = V(e, t) || {};
|
|
270
271
|
if (l == null) return {};
|
|
271
|
-
let d =
|
|
272
|
+
let d = zt(u), f = {
|
|
272
273
|
x: n,
|
|
273
274
|
y: r
|
|
274
|
-
}, p =
|
|
275
|
-
(!
|
|
276
|
-
let
|
|
275
|
+
}, p = Dt(i), m = Et(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), C = S ? S[y] : 0;
|
|
276
|
+
(!C || !await (o.isElement == null ? void 0 : o.isElement(S))) && (C = s.floating[y] || a.floating[m]);
|
|
277
|
+
let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, E = R(d[_], T), ee = R(d[v], T), te = E, ne = C - h[m] - ee, D = C / 2 - h[m] / 2 + w, re = wt(te, D, ne), ie = !c.arrow && U(i) != null && D !== re && a.reference[m] / 2 - (D < te ? E : ee) - h[m] / 2 < 0, O = ie ? D < te ? D - te : D - ne : 0;
|
|
277
278
|
return {
|
|
278
279
|
[p]: f[p] + O,
|
|
279
280
|
data: {
|
|
280
|
-
[p]:
|
|
281
|
-
centerOffset:
|
|
282
|
-
...
|
|
281
|
+
[p]: re,
|
|
282
|
+
centerOffset: D - re - O,
|
|
283
|
+
...ie && { alignmentOffset: O }
|
|
283
284
|
},
|
|
284
|
-
reset:
|
|
285
|
+
reset: ie
|
|
285
286
|
};
|
|
286
287
|
}
|
|
287
288
|
});
|
|
288
289
|
function Gt(e, t, n) {
|
|
289
|
-
return (e ? [...n.filter((t) => U(t) === e), ...n.filter((t) => U(t) !== e)] : n.filter((e) => H(e) === e)).filter((n) => e ? U(n) === e || (t ?
|
|
290
|
+
return (e ? [...n.filter((t) => U(t) === e), ...n.filter((t) => U(t) !== e)] : n.filter((e) => H(e) === e)).filter((n) => e ? U(n) === e || (t ? At(n) !== n : !1) : !0);
|
|
290
291
|
}
|
|
291
292
|
var Kt = function(e) {
|
|
292
293
|
return e === void 0 && (e = {}), {
|
|
293
294
|
name: "autoPlacement",
|
|
294
295
|
options: e,
|
|
295
296
|
async fn(t) {
|
|
296
|
-
let { rects: n, middlewareData: r, placement: i, platform: a, elements: o } = t, { crossAxis: s = !1, alignment: c, allowedPlacements: l =
|
|
297
|
+
let { rects: n, middlewareData: r, placement: i, platform: a, elements: o } = t, { crossAxis: s = !1, alignment: c, allowedPlacements: l = xt, autoAlignment: u = !0, ...d } = V(e, t), f = c !== void 0 || l === xt ? Gt(c || null, u, l) : l, p = await a.detectOverflow(t, d), m = r.autoPlacement?.index || 0, h = f[m];
|
|
297
298
|
if (h == null) return {};
|
|
298
|
-
let g =
|
|
299
|
+
let g = Ot(h, n, await (a.isRTL == null ? void 0 : a.isRTL(o.floating)));
|
|
299
300
|
if (i !== h) return { reset: { placement: f[0] } };
|
|
300
301
|
let _ = [
|
|
301
302
|
p[H(h)],
|
|
@@ -337,29 +338,29 @@ var Kt = function(e) {
|
|
|
337
338
|
var n;
|
|
338
339
|
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = V(e, t);
|
|
339
340
|
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
340
|
-
let g = H(r), _ = W(o), v = H(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [
|
|
341
|
-
!d && x && b.push(...
|
|
342
|
-
let
|
|
343
|
-
if (l &&
|
|
344
|
-
let e =
|
|
345
|
-
|
|
341
|
+
let g = H(r), _ = W(o), v = H(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [Lt(o)] : kt(o)), x = p !== "none";
|
|
342
|
+
!d && x && b.push(...It(o, m, p, y));
|
|
343
|
+
let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
|
|
344
|
+
if (l && w.push(C[g]), u) {
|
|
345
|
+
let e = Ot(r, a, y);
|
|
346
|
+
w.push(C[e[0]], C[e[1]]);
|
|
346
347
|
}
|
|
347
|
-
if (
|
|
348
|
+
if (T = [...T, {
|
|
348
349
|
placement: r,
|
|
349
|
-
overflows:
|
|
350
|
-
}], !
|
|
351
|
-
let e = (i.flip?.index || 0) + 1, t =
|
|
352
|
-
if (t && (!(u === "alignment" && _ !== W(t)) ||
|
|
350
|
+
overflows: w
|
|
351
|
+
}], !w.every((e) => e <= 0)) {
|
|
352
|
+
let e = (i.flip?.index || 0) + 1, t = S[e];
|
|
353
|
+
if (t && (!(u === "alignment" && _ !== W(t)) || T.every((e) => W(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
|
|
353
354
|
data: {
|
|
354
355
|
index: e,
|
|
355
|
-
overflows:
|
|
356
|
+
overflows: T
|
|
356
357
|
},
|
|
357
358
|
reset: { placement: t }
|
|
358
359
|
};
|
|
359
|
-
let n =
|
|
360
|
+
let n = T.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
360
361
|
if (!n) switch (f) {
|
|
361
362
|
case "bestFit": {
|
|
362
|
-
let e =
|
|
363
|
+
let e = T.filter((e) => {
|
|
363
364
|
if (x) {
|
|
364
365
|
let t = W(e.placement);
|
|
365
366
|
return t === _ || t === "y";
|
|
@@ -388,7 +389,7 @@ function Jt(e, t) {
|
|
|
388
389
|
};
|
|
389
390
|
}
|
|
390
391
|
function Yt(e) {
|
|
391
|
-
return
|
|
392
|
+
return yt.some((t) => e[t] >= 0);
|
|
392
393
|
}
|
|
393
394
|
var Xt = function(e) {
|
|
394
395
|
return e === void 0 && (e = {}), {
|
|
@@ -437,14 +438,14 @@ function Qt(e) {
|
|
|
437
438
|
let i = t[e];
|
|
438
439
|
!r || i.y - r.y > r.height / 2 ? n.push([i]) : n[n.length - 1].push(i), r = i;
|
|
439
440
|
}
|
|
440
|
-
return n.map((e) =>
|
|
441
|
+
return n.map((e) => G(Zt(e)));
|
|
441
442
|
}
|
|
442
443
|
var $t = function(e) {
|
|
443
444
|
return e === void 0 && (e = {}), {
|
|
444
445
|
name: "inline",
|
|
445
446
|
options: e,
|
|
446
447
|
async fn(t) {
|
|
447
|
-
let { placement: n, elements: r, rects: i, platform: a, strategy: o } = t, { padding: s = 2, x: c, y: l } = V(e, t), u = Array.from(await (a.getClientRects == null ? void 0 : a.getClientRects(r.reference)) || []), d = Qt(u), f =
|
|
448
|
+
let { placement: n, elements: r, rects: i, platform: a, strategy: o } = t, { padding: s = 2, x: c, y: l } = V(e, t), u = Array.from(await (a.getClientRects == null ? void 0 : a.getClientRects(r.reference)) || []), d = Qt(u), f = G(Zt(u)), p = zt(s);
|
|
448
449
|
function m() {
|
|
449
450
|
if (d.length === 2 && d[0].left > d[1].right && c != null && l != null) return d.find((e) => c > e.left - p.left && c < e.right + p.right && l > e.top - p.top && l < e.bottom + p.bottom) || f;
|
|
450
451
|
if (d.length >= 2) {
|
|
@@ -533,14 +534,14 @@ var nn = function(e) {
|
|
|
533
534
|
} }, ...l } = V(e, t), u = {
|
|
534
535
|
x: n,
|
|
535
536
|
y: r
|
|
536
|
-
}, d = await a.detectOverflow(t, l), f = W(H(i)), p =
|
|
537
|
+
}, d = await a.detectOverflow(t, l), f = W(H(i)), p = Tt(f), m = u[p], h = u[f];
|
|
537
538
|
if (o) {
|
|
538
539
|
let e = p === "y" ? "top" : "left", t = p === "y" ? "bottom" : "right", n = m + d[e], r = m - d[t];
|
|
539
|
-
m =
|
|
540
|
+
m = wt(n, m, r);
|
|
540
541
|
}
|
|
541
542
|
if (s) {
|
|
542
543
|
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = h + d[e], r = h - d[t];
|
|
543
|
-
h =
|
|
544
|
+
h = wt(n, h, r);
|
|
544
545
|
}
|
|
545
546
|
let g = c.fn({
|
|
546
547
|
...t,
|
|
@@ -568,18 +569,18 @@ var nn = function(e) {
|
|
|
568
569
|
var n, r;
|
|
569
570
|
let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {}, ...l } = V(e, t), u = await o.detectOverflow(t, l), d = H(i), f = U(i), p = W(i) === "y", { width: m, height: h } = a.floating, g, _;
|
|
570
571
|
d === "top" || d === "bottom" ? (g = d, _ = f === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (_ = d, g = f === "end" ? "top" : "bottom");
|
|
571
|
-
let v = h - u.top - u.bottom, y = m - u.left - u.right, b = R(h - u[g], v), x = R(m - u[_], y),
|
|
572
|
-
if ((n = t.middlewareData.shift) != null && n.enabled.x && (
|
|
572
|
+
let v = h - u.top - u.bottom, y = m - u.left - u.right, b = R(h - u[g], v), x = R(m - u[_], y), S = !t.middlewareData.shift, C = b, w = x;
|
|
573
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (w = y), (r = t.middlewareData.shift) != null && r.enabled.y && (C = v), S && !f) {
|
|
573
574
|
let e = z(u.left, 0), t = z(u.right, 0), n = z(u.top, 0), r = z(u.bottom, 0);
|
|
574
|
-
p ?
|
|
575
|
+
p ? w = m - 2 * (e !== 0 || t !== 0 ? e + t : z(u.left, u.right)) : C = h - 2 * (n !== 0 || r !== 0 ? n + r : z(u.top, u.bottom));
|
|
575
576
|
}
|
|
576
577
|
await c({
|
|
577
578
|
...t,
|
|
578
|
-
availableWidth:
|
|
579
|
-
availableHeight:
|
|
579
|
+
availableWidth: w,
|
|
580
|
+
availableHeight: C
|
|
580
581
|
});
|
|
581
|
-
let
|
|
582
|
-
return m !==
|
|
582
|
+
let T = await o.getDimensions(s.floating);
|
|
583
|
+
return m !== T.width || h !== T.height ? { reset: { rects: !0 } } : {};
|
|
583
584
|
}
|
|
584
585
|
};
|
|
585
586
|
};
|
|
@@ -591,27 +592,27 @@ function on() {
|
|
|
591
592
|
function sn(e) {
|
|
592
593
|
return cn(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
593
594
|
}
|
|
594
|
-
function
|
|
595
|
+
function K(e) {
|
|
595
596
|
var t;
|
|
596
597
|
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
597
598
|
}
|
|
598
|
-
function
|
|
599
|
+
function q(e) {
|
|
599
600
|
return ((cn(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
|
|
600
601
|
}
|
|
601
602
|
function cn(e) {
|
|
602
|
-
return on() ? e instanceof Node || e instanceof
|
|
603
|
-
}
|
|
604
|
-
function q(e) {
|
|
605
|
-
return on() ? e instanceof Element || e instanceof G(e).Element : !1;
|
|
603
|
+
return on() ? e instanceof Node || e instanceof K(e).Node : !1;
|
|
606
604
|
}
|
|
607
605
|
function J(e) {
|
|
608
|
-
return on() ? e instanceof
|
|
606
|
+
return on() ? e instanceof Element || e instanceof K(e).Element : !1;
|
|
607
|
+
}
|
|
608
|
+
function Y(e) {
|
|
609
|
+
return on() ? e instanceof HTMLElement || e instanceof K(e).HTMLElement : !1;
|
|
609
610
|
}
|
|
610
611
|
function ln(e) {
|
|
611
|
-
return !on() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof
|
|
612
|
+
return !on() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof K(e).ShadowRoot;
|
|
612
613
|
}
|
|
613
614
|
function un(e) {
|
|
614
|
-
let { overflow: t, overflowX: n, overflowY: r, display: i } =
|
|
615
|
+
let { overflow: t, overflowX: n, overflowY: r, display: i } = Z(e);
|
|
615
616
|
return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
|
|
616
617
|
}
|
|
617
618
|
function dn(e) {
|
|
@@ -627,17 +628,17 @@ function fn(e) {
|
|
|
627
628
|
return !1;
|
|
628
629
|
}
|
|
629
630
|
}
|
|
630
|
-
var pn = /transform|translate|scale|rotate|perspective|filter/, mn = /paint|layout|strict|content/,
|
|
631
|
+
var pn = /transform|translate|scale|rotate|perspective|filter/, mn = /paint|layout|strict|content/, X = (e) => !!e && e !== "none", hn;
|
|
631
632
|
function gn(e) {
|
|
632
|
-
let t =
|
|
633
|
-
return
|
|
633
|
+
let t = J(e) ? Z(e) : e;
|
|
634
|
+
return X(t.transform) || X(t.translate) || X(t.scale) || X(t.rotate) || X(t.perspective) || !vn() && (X(t.backdropFilter) || X(t.filter)) || pn.test(t.willChange || "") || mn.test(t.contain || "");
|
|
634
635
|
}
|
|
635
636
|
function _n(e) {
|
|
636
|
-
let t =
|
|
637
|
-
for (;
|
|
637
|
+
let t = Q(e);
|
|
638
|
+
for (; Y(t) && !yn(t);) {
|
|
638
639
|
if (gn(t)) return t;
|
|
639
640
|
if (fn(t)) return null;
|
|
640
|
-
t =
|
|
641
|
+
t = Q(t);
|
|
641
642
|
}
|
|
642
643
|
return null;
|
|
643
644
|
}
|
|
@@ -647,11 +648,11 @@ function vn() {
|
|
|
647
648
|
function yn(e) {
|
|
648
649
|
return /^(html|body|#document)$/.test(sn(e));
|
|
649
650
|
}
|
|
650
|
-
function
|
|
651
|
-
return
|
|
651
|
+
function Z(e) {
|
|
652
|
+
return K(e).getComputedStyle(e);
|
|
652
653
|
}
|
|
653
654
|
function bn(e) {
|
|
654
|
-
return
|
|
655
|
+
return J(e) ? {
|
|
655
656
|
scrollLeft: e.scrollLeft,
|
|
656
657
|
scrollTop: e.scrollTop
|
|
657
658
|
} : {
|
|
@@ -659,18 +660,18 @@ function bn(e) {
|
|
|
659
660
|
scrollTop: e.scrollY
|
|
660
661
|
};
|
|
661
662
|
}
|
|
662
|
-
function
|
|
663
|
+
function Q(e) {
|
|
663
664
|
if (sn(e) === "html") return e;
|
|
664
|
-
let t = e.assignedSlot || e.parentNode || ln(e) && e.host ||
|
|
665
|
+
let t = e.assignedSlot || e.parentNode || ln(e) && e.host || q(e);
|
|
665
666
|
return ln(t) ? t.host : t;
|
|
666
667
|
}
|
|
667
668
|
function xn(e) {
|
|
668
|
-
let t =
|
|
669
|
-
return yn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body :
|
|
669
|
+
let t = Q(e);
|
|
670
|
+
return yn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Y(t) && un(t) ? t : xn(t);
|
|
670
671
|
}
|
|
671
672
|
function Sn(e, t, n) {
|
|
672
673
|
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
673
|
-
let r = xn(e), i = r === e.ownerDocument?.body, a =
|
|
674
|
+
let r = xn(e), i = r === e.ownerDocument?.body, a = K(r);
|
|
674
675
|
if (i) {
|
|
675
676
|
let e = Cn(a);
|
|
676
677
|
return t.concat(a, a.visualViewport || [], un(r) ? r : [], e && n ? Sn(e) : []);
|
|
@@ -682,7 +683,7 @@ function Cn(e) {
|
|
|
682
683
|
//#endregion
|
|
683
684
|
//#region ../../node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
684
685
|
function wn(e) {
|
|
685
|
-
let t =
|
|
686
|
+
let t = Z(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = Y(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = St(n) !== a || St(r) !== o;
|
|
686
687
|
return s && (n = a, r = o), {
|
|
687
688
|
width: n,
|
|
688
689
|
height: r,
|
|
@@ -690,70 +691,70 @@ function wn(e) {
|
|
|
690
691
|
};
|
|
691
692
|
}
|
|
692
693
|
function Tn(e) {
|
|
693
|
-
return
|
|
694
|
+
return J(e) ? e : e.contextElement;
|
|
694
695
|
}
|
|
695
|
-
function
|
|
696
|
+
function En(e) {
|
|
696
697
|
let t = Tn(e);
|
|
697
|
-
if (!
|
|
698
|
-
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = wn(t), o = (a ?
|
|
698
|
+
if (!Y(t)) return B(1);
|
|
699
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = wn(t), o = (a ? St(n.width) : n.width) / r, s = (a ? St(n.height) : n.height) / i;
|
|
699
700
|
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
700
701
|
x: o,
|
|
701
702
|
y: s
|
|
702
703
|
};
|
|
703
704
|
}
|
|
704
|
-
var
|
|
705
|
-
function
|
|
706
|
-
let t =
|
|
707
|
-
return !vn() || !t.visualViewport ?
|
|
705
|
+
var Dn = /* @__PURE__ */ B(0);
|
|
706
|
+
function On(e) {
|
|
707
|
+
let t = K(e);
|
|
708
|
+
return !vn() || !t.visualViewport ? Dn : {
|
|
708
709
|
x: t.visualViewport.offsetLeft,
|
|
709
710
|
y: t.visualViewport.offsetTop
|
|
710
711
|
};
|
|
711
712
|
}
|
|
712
|
-
function
|
|
713
|
-
return t === void 0 && (t = !1), !n || t && n !==
|
|
713
|
+
function kn(e, t, n) {
|
|
714
|
+
return t === void 0 && (t = !1), !n || t && n !== K(e) ? !1 : t;
|
|
714
715
|
}
|
|
715
|
-
function
|
|
716
|
+
function An(e, t, n, r) {
|
|
716
717
|
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
717
718
|
let i = e.getBoundingClientRect(), a = Tn(e), o = B(1);
|
|
718
|
-
t && (r ?
|
|
719
|
-
let s =
|
|
719
|
+
t && (r ? J(r) && (o = En(r)) : o = En(e));
|
|
720
|
+
let s = kn(a, n, r) ? On(a) : B(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
720
721
|
if (a) {
|
|
721
|
-
let e =
|
|
722
|
+
let e = K(a), t = r && J(r) ? K(r) : r, n = e, i = Cn(n);
|
|
722
723
|
for (; i && r && t !== n;) {
|
|
723
|
-
let e =
|
|
724
|
-
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n =
|
|
724
|
+
let e = En(i), t = i.getBoundingClientRect(), r = Z(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
725
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = K(i), i = Cn(n);
|
|
725
726
|
}
|
|
726
727
|
}
|
|
727
|
-
return
|
|
728
|
+
return G({
|
|
728
729
|
width: u,
|
|
729
730
|
height: d,
|
|
730
731
|
x: c,
|
|
731
732
|
y: l
|
|
732
733
|
});
|
|
733
734
|
}
|
|
734
|
-
function
|
|
735
|
+
function jn(e, t) {
|
|
735
736
|
let n = bn(e).scrollLeft;
|
|
736
|
-
return t ? t.left + n :
|
|
737
|
+
return t ? t.left + n : An(q(e)).left + n;
|
|
737
738
|
}
|
|
738
|
-
function
|
|
739
|
+
function Mn(e, t) {
|
|
739
740
|
let n = e.getBoundingClientRect();
|
|
740
741
|
return {
|
|
741
|
-
x: n.left + t.scrollLeft -
|
|
742
|
+
x: n.left + t.scrollLeft - jn(e, n),
|
|
742
743
|
y: n.top + t.scrollTop
|
|
743
744
|
};
|
|
744
745
|
}
|
|
745
|
-
function
|
|
746
|
-
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o =
|
|
746
|
+
function Nn(e) {
|
|
747
|
+
let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = q(r), s = t ? fn(t.floating) : !1;
|
|
747
748
|
if (r === o || s && a) return n;
|
|
748
749
|
let c = {
|
|
749
750
|
scrollLeft: 0,
|
|
750
751
|
scrollTop: 0
|
|
751
|
-
}, l = B(1), u = B(0), d =
|
|
752
|
+
}, l = B(1), u = B(0), d = Y(r);
|
|
752
753
|
if ((d || !d && !a) && ((sn(r) !== "body" || un(o)) && (c = bn(r)), d)) {
|
|
753
|
-
let e =
|
|
754
|
-
l =
|
|
754
|
+
let e = An(r);
|
|
755
|
+
l = En(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
|
|
755
756
|
}
|
|
756
|
-
let f = o && !d && !a ?
|
|
757
|
+
let f = o && !d && !a ? Mn(o, c) : B(0);
|
|
757
758
|
return {
|
|
758
759
|
width: n.width * l.x,
|
|
759
760
|
height: n.height * l.y,
|
|
@@ -761,31 +762,31 @@ function Mn(e) {
|
|
|
761
762
|
y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
|
|
762
763
|
};
|
|
763
764
|
}
|
|
764
|
-
function
|
|
765
|
+
function Pn(e) {
|
|
765
766
|
return Array.from(e.getClientRects());
|
|
766
767
|
}
|
|
767
|
-
function
|
|
768
|
-
let t =
|
|
769
|
-
return
|
|
768
|
+
function Fn(e) {
|
|
769
|
+
let t = q(e), n = bn(e), r = e.ownerDocument.body, i = z(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = z(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + jn(e), s = -n.scrollTop;
|
|
770
|
+
return Z(r).direction === "rtl" && (o += z(t.clientWidth, r.clientWidth) - i), {
|
|
770
771
|
width: i,
|
|
771
772
|
height: a,
|
|
772
773
|
x: o,
|
|
773
774
|
y: s
|
|
774
775
|
};
|
|
775
776
|
}
|
|
776
|
-
var
|
|
777
|
-
function
|
|
778
|
-
let n =
|
|
777
|
+
var In = 25;
|
|
778
|
+
function Ln(e, t) {
|
|
779
|
+
let n = K(e), r = q(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
|
|
779
780
|
if (i) {
|
|
780
781
|
a = i.width, o = i.height;
|
|
781
782
|
let e = vn();
|
|
782
783
|
(!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
|
|
783
784
|
}
|
|
784
|
-
let l =
|
|
785
|
+
let l = jn(r);
|
|
785
786
|
if (l <= 0) {
|
|
786
787
|
let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
|
|
787
|
-
o <=
|
|
788
|
-
} else l <=
|
|
788
|
+
o <= In && (a -= o);
|
|
789
|
+
} else l <= In && (a += l);
|
|
789
790
|
return {
|
|
790
791
|
width: a,
|
|
791
792
|
height: o,
|
|
@@ -793,8 +794,8 @@ function In(e, t) {
|
|
|
793
794
|
y: c
|
|
794
795
|
};
|
|
795
796
|
}
|
|
796
|
-
function
|
|
797
|
-
let n =
|
|
797
|
+
function Rn(e, t) {
|
|
798
|
+
let n = An(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = Y(e) ? En(e) : B(1);
|
|
798
799
|
return {
|
|
799
800
|
width: e.clientWidth * a.x,
|
|
800
801
|
height: e.clientHeight * a.y,
|
|
@@ -802,13 +803,13 @@ function Ln(e, t) {
|
|
|
802
803
|
y: r * a.y
|
|
803
804
|
};
|
|
804
805
|
}
|
|
805
|
-
function
|
|
806
|
+
function zn(e, t, n) {
|
|
806
807
|
let r;
|
|
807
|
-
if (t === "viewport") r =
|
|
808
|
-
else if (t === "document") r =
|
|
809
|
-
else if (
|
|
808
|
+
if (t === "viewport") r = Ln(e, n);
|
|
809
|
+
else if (t === "document") r = Fn(q(e));
|
|
810
|
+
else if (J(t)) r = Rn(t, n);
|
|
810
811
|
else {
|
|
811
|
-
let n =
|
|
812
|
+
let n = On(e);
|
|
812
813
|
r = {
|
|
813
814
|
x: t.x - n.x,
|
|
814
815
|
y: t.y - n.y,
|
|
@@ -816,26 +817,26 @@ function Rn(e, t, n) {
|
|
|
816
817
|
height: t.height
|
|
817
818
|
};
|
|
818
819
|
}
|
|
819
|
-
return
|
|
820
|
-
}
|
|
821
|
-
function zn(e, t) {
|
|
822
|
-
let n = Z(e);
|
|
823
|
-
return n === t || !q(n) || yn(n) ? !1 : X(n).position === "fixed" || zn(n, t);
|
|
820
|
+
return G(r);
|
|
824
821
|
}
|
|
825
822
|
function Bn(e, t) {
|
|
823
|
+
let n = Q(e);
|
|
824
|
+
return n === t || !J(n) || yn(n) ? !1 : Z(n).position === "fixed" || Bn(n, t);
|
|
825
|
+
}
|
|
826
|
+
function Vn(e, t) {
|
|
826
827
|
let n = t.get(e);
|
|
827
828
|
if (n) return n;
|
|
828
|
-
let r = Sn(e, [], !1).filter((e) =>
|
|
829
|
-
for (;
|
|
830
|
-
let t =
|
|
831
|
-
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || un(o) && !n &&
|
|
829
|
+
let r = Sn(e, [], !1).filter((e) => J(e) && sn(e) !== "body"), i = null, a = Z(e).position === "fixed", o = a ? Q(e) : e;
|
|
830
|
+
for (; J(o) && !yn(o);) {
|
|
831
|
+
let t = Z(o), n = gn(o);
|
|
832
|
+
!n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || un(o) && !n && Bn(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = Q(o);
|
|
832
833
|
}
|
|
833
834
|
return t.set(e, r), r;
|
|
834
835
|
}
|
|
835
|
-
function
|
|
836
|
-
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? fn(t) ? [] :
|
|
836
|
+
function Hn(e) {
|
|
837
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? fn(t) ? [] : Vn(t, this._c) : [].concat(n), r], o = zn(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
837
838
|
for (let e = 1; e < a.length; e++) {
|
|
838
|
-
let n =
|
|
839
|
+
let n = zn(t, a[e], i);
|
|
839
840
|
s = z(n.top, s), c = R(n.right, c), l = R(n.bottom, l), u = z(n.left, u);
|
|
840
841
|
}
|
|
841
842
|
return {
|
|
@@ -845,27 +846,27 @@ function Vn(e) {
|
|
|
845
846
|
y: s
|
|
846
847
|
};
|
|
847
848
|
}
|
|
848
|
-
function
|
|
849
|
+
function Un(e) {
|
|
849
850
|
let { width: t, height: n } = wn(e);
|
|
850
851
|
return {
|
|
851
852
|
width: t,
|
|
852
853
|
height: n
|
|
853
854
|
};
|
|
854
855
|
}
|
|
855
|
-
function
|
|
856
|
-
let r =
|
|
856
|
+
function Wn(e, t, n) {
|
|
857
|
+
let r = Y(t), i = q(t), a = n === "fixed", o = An(e, !0, a, t), s = {
|
|
857
858
|
scrollLeft: 0,
|
|
858
859
|
scrollTop: 0
|
|
859
860
|
}, c = B(0);
|
|
860
861
|
function l() {
|
|
861
|
-
c.x =
|
|
862
|
+
c.x = jn(i);
|
|
862
863
|
}
|
|
863
864
|
if (r || !r && !a) if ((sn(t) !== "body" || un(i)) && (s = bn(t)), r) {
|
|
864
|
-
let e =
|
|
865
|
+
let e = An(t, !0, a, t);
|
|
865
866
|
c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
|
|
866
867
|
} else i && l();
|
|
867
868
|
a && !r && i && l();
|
|
868
|
-
let u = i && !r && !a ?
|
|
869
|
+
let u = i && !r && !a ? Mn(i, s) : B(0);
|
|
869
870
|
return {
|
|
870
871
|
x: o.left + s.scrollLeft - c.x - u.x,
|
|
871
872
|
y: o.top + s.scrollTop - c.y - u.y,
|
|
@@ -873,34 +874,34 @@ function Un(e, t, n) {
|
|
|
873
874
|
height: o.height
|
|
874
875
|
};
|
|
875
876
|
}
|
|
876
|
-
function
|
|
877
|
-
return
|
|
877
|
+
function Gn(e) {
|
|
878
|
+
return Z(e).position === "static";
|
|
878
879
|
}
|
|
879
|
-
function
|
|
880
|
-
if (!
|
|
880
|
+
function Kn(e, t) {
|
|
881
|
+
if (!Y(e) || Z(e).position === "fixed") return null;
|
|
881
882
|
if (t) return t(e);
|
|
882
883
|
let n = e.offsetParent;
|
|
883
|
-
return
|
|
884
|
+
return q(e) === n && (n = n.ownerDocument.body), n;
|
|
884
885
|
}
|
|
885
|
-
function
|
|
886
|
-
let n =
|
|
886
|
+
function qn(e, t) {
|
|
887
|
+
let n = K(e);
|
|
887
888
|
if (fn(e)) return n;
|
|
888
|
-
if (!
|
|
889
|
-
let t =
|
|
889
|
+
if (!Y(e)) {
|
|
890
|
+
let t = Q(e);
|
|
890
891
|
for (; t && !yn(t);) {
|
|
891
|
-
if (
|
|
892
|
-
t =
|
|
892
|
+
if (J(t) && !Gn(t)) return t;
|
|
893
|
+
t = Q(t);
|
|
893
894
|
}
|
|
894
895
|
return n;
|
|
895
896
|
}
|
|
896
|
-
let r =
|
|
897
|
-
for (; r && dn(r) &&
|
|
898
|
-
return r && yn(r) &&
|
|
897
|
+
let r = Kn(e, t);
|
|
898
|
+
for (; r && dn(r) && Gn(r);) r = Kn(r, t);
|
|
899
|
+
return r && yn(r) && Gn(r) && !gn(r) ? n : r || _n(e) || n;
|
|
899
900
|
}
|
|
900
|
-
var
|
|
901
|
-
let t = this.getOffsetParent ||
|
|
901
|
+
var Jn = async function(e) {
|
|
902
|
+
let t = this.getOffsetParent || qn, n = this.getDimensions, r = await n(e.floating);
|
|
902
903
|
return {
|
|
903
|
-
reference:
|
|
904
|
+
reference: Wn(e.reference, await t(e.floating), e.strategy),
|
|
904
905
|
floating: {
|
|
905
906
|
x: 0,
|
|
906
907
|
y: 0,
|
|
@@ -909,23 +910,23 @@ var qn = async function(e) {
|
|
|
909
910
|
}
|
|
910
911
|
};
|
|
911
912
|
};
|
|
912
|
-
function
|
|
913
|
-
return
|
|
914
|
-
}
|
|
915
|
-
var
|
|
916
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
917
|
-
getDocumentElement:
|
|
918
|
-
getClippingRect:
|
|
919
|
-
getOffsetParent:
|
|
920
|
-
getElementRects:
|
|
921
|
-
getClientRects:
|
|
922
|
-
getDimensions:
|
|
923
|
-
getScale:
|
|
924
|
-
isElement:
|
|
925
|
-
isRTL:
|
|
926
|
-
},
|
|
913
|
+
function Yn(e) {
|
|
914
|
+
return Z(e).direction === "rtl";
|
|
915
|
+
}
|
|
916
|
+
var Xn = {
|
|
917
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Nn,
|
|
918
|
+
getDocumentElement: q,
|
|
919
|
+
getClippingRect: Hn,
|
|
920
|
+
getOffsetParent: qn,
|
|
921
|
+
getElementRects: Jn,
|
|
922
|
+
getClientRects: Pn,
|
|
923
|
+
getDimensions: Un,
|
|
924
|
+
getScale: En,
|
|
925
|
+
isElement: J,
|
|
926
|
+
isRTL: Yn
|
|
927
|
+
}, Zn = nn, Qn = Kt, $n = rn, er = qt, tr = an, nr = Xt, rr = Wt, ir = $t, ar = (e, t, n) => {
|
|
927
928
|
let r = /* @__PURE__ */ new Map(), i = {
|
|
928
|
-
platform:
|
|
929
|
+
platform: Xn,
|
|
929
930
|
...n
|
|
930
931
|
}, a = {
|
|
931
932
|
...i.platform,
|
|
@@ -938,11 +939,11 @@ var Yn = {
|
|
|
938
939
|
};
|
|
939
940
|
//#endregion
|
|
940
941
|
//#region ../../node_modules/.pnpm/@tiptap+vue-3@3.19.0_patch_hash=65d98f737afae097542c692b176a81069e1b7b8d577d1d7e222a944_23bfa7b5fde667bfc96216774c3ce084/node_modules/@tiptap/vue-3/dist/menus/index.js
|
|
941
|
-
function
|
|
942
|
+
function or(e, t) {
|
|
942
943
|
let n = Math.min(e.top, t.top), r = Math.max(e.bottom, t.bottom), i = Math.min(e.left, t.left), a = Math.max(e.right, t.right) - i, o = r - n;
|
|
943
944
|
return new DOMRect(i, n, a, o);
|
|
944
945
|
}
|
|
945
|
-
var
|
|
946
|
+
var sr = class {
|
|
946
947
|
constructor({ editor: e, element: t, view: n, updateDelay: r = 250, resizeDelay: i = 60, shouldShow: a, appendTo: o, getReferencedVirtualElement: s, options: c }) {
|
|
947
948
|
this.preventHide = !1, this.isVisible = !1, this.scrollTarget = window, this.floatingUIOptions = {
|
|
948
949
|
strategy: "absolute",
|
|
@@ -960,7 +961,7 @@ var or = class {
|
|
|
960
961
|
onUpdate: void 0,
|
|
961
962
|
onDestroy: void 0
|
|
962
963
|
}, this.shouldShow = ({ view: e, state: t, from: n, to: r }) => {
|
|
963
|
-
let { doc: i, selection: a } = t, { empty: o } = a, s = !i.textBetween(n, r).length &&
|
|
964
|
+
let { doc: i, selection: a } = t, { empty: o } = a, s = !i.textBetween(n, r).length && Fe(t.selection), c = this.element.contains(document.activeElement);
|
|
964
965
|
return !(!(e.hasFocus() || c) || o || s || !this.editor.isEditable);
|
|
965
966
|
}, this.mousedownHandler = () => {
|
|
966
967
|
this.preventHide = !0;
|
|
@@ -1006,27 +1007,27 @@ var or = class {
|
|
|
1006
1007
|
}
|
|
1007
1008
|
get middlewares() {
|
|
1008
1009
|
let e = [];
|
|
1009
|
-
return this.floatingUIOptions.flip && e.push(
|
|
1010
|
+
return this.floatingUIOptions.flip && e.push(er(typeof this.floatingUIOptions.flip == "boolean" ? void 0 : this.floatingUIOptions.flip)), this.floatingUIOptions.shift && e.push($n(typeof this.floatingUIOptions.shift == "boolean" ? void 0 : this.floatingUIOptions.shift)), this.floatingUIOptions.offset && e.push(Zn(typeof this.floatingUIOptions.offset == "boolean" ? void 0 : this.floatingUIOptions.offset)), this.floatingUIOptions.arrow && e.push(rr(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && e.push(tr(typeof this.floatingUIOptions.size == "boolean" ? void 0 : this.floatingUIOptions.size)), this.floatingUIOptions.autoPlacement && e.push(Qn(typeof this.floatingUIOptions.autoPlacement == "boolean" ? void 0 : this.floatingUIOptions.autoPlacement)), this.floatingUIOptions.hide && e.push(nr(typeof this.floatingUIOptions.hide == "boolean" ? void 0 : this.floatingUIOptions.hide)), this.floatingUIOptions.inline && e.push(ir(typeof this.floatingUIOptions.inline == "boolean" ? void 0 : this.floatingUIOptions.inline)), e;
|
|
1010
1011
|
}
|
|
1011
1012
|
get virtualElement() {
|
|
1012
1013
|
let { selection: e } = this.editor.state, t = this.getReferencedVirtualElement?.call(this);
|
|
1013
1014
|
if (t) return t;
|
|
1014
1015
|
if (!this.view?.dom?.parentNode) return;
|
|
1015
|
-
let n =
|
|
1016
|
+
let n = Re(this.view, e.from, e.to), r = {
|
|
1016
1017
|
getBoundingClientRect: () => n,
|
|
1017
1018
|
getClientRects: () => [n]
|
|
1018
1019
|
};
|
|
1019
|
-
if (e instanceof
|
|
1020
|
+
if (e instanceof ze) {
|
|
1020
1021
|
let t = this.view.nodeDOM(e.from), n = t.dataset.nodeViewWrapper ? t : t.querySelector("[data-node-view-wrapper]");
|
|
1021
1022
|
n && (t = n), t && (r = {
|
|
1022
1023
|
getBoundingClientRect: () => t.getBoundingClientRect(),
|
|
1023
1024
|
getClientRects: () => [t.getBoundingClientRect()]
|
|
1024
1025
|
});
|
|
1025
1026
|
}
|
|
1026
|
-
if (e instanceof
|
|
1027
|
+
if (e instanceof Ve) {
|
|
1027
1028
|
let { $anchorCell: t, $headCell: n } = e, i = t ? t.pos : n.pos, a = n ? n.pos : t.pos, o = this.view.nodeDOM(i), s = this.view.nodeDOM(a);
|
|
1028
1029
|
if (!o || !s) return;
|
|
1029
|
-
let c = o === s ? o.getBoundingClientRect() :
|
|
1030
|
+
let c = o === s ? o.getBoundingClientRect() : or(o.getBoundingClientRect(), s.getBoundingClientRect());
|
|
1030
1031
|
r = {
|
|
1031
1032
|
getBoundingClientRect: () => c,
|
|
1032
1033
|
getClientRects: () => [c]
|
|
@@ -1036,7 +1037,7 @@ var or = class {
|
|
|
1036
1037
|
}
|
|
1037
1038
|
updatePosition() {
|
|
1038
1039
|
let e = this.virtualElement;
|
|
1039
|
-
e &&
|
|
1040
|
+
e && ar(e, this.element, {
|
|
1040
1041
|
placement: this.floatingUIOptions.placement,
|
|
1041
1042
|
strategy: this.floatingUIOptions.strategy,
|
|
1042
1043
|
middleware: this.middlewares
|
|
@@ -1088,13 +1089,13 @@ var or = class {
|
|
|
1088
1089
|
destroy() {
|
|
1089
1090
|
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();
|
|
1090
1091
|
}
|
|
1091
|
-
},
|
|
1092
|
+
}, cr = (e) => new Be({
|
|
1092
1093
|
key: typeof e.pluginKey == "string" ? new L(e.pluginKey) : e.pluginKey,
|
|
1093
|
-
view: (t) => new
|
|
1094
|
+
view: (t) => new sr({
|
|
1094
1095
|
view: t,
|
|
1095
1096
|
...e
|
|
1096
1097
|
})
|
|
1097
|
-
}),
|
|
1098
|
+
}), lr = se({
|
|
1098
1099
|
name: "BubbleMenu",
|
|
1099
1100
|
inheritAttrs: !1,
|
|
1100
1101
|
props: {
|
|
@@ -1132,11 +1133,11 @@ var or = class {
|
|
|
1132
1133
|
}
|
|
1133
1134
|
},
|
|
1134
1135
|
setup(e, { slots: t, attrs: n }) {
|
|
1135
|
-
let r =
|
|
1136
|
-
return
|
|
1136
|
+
let r = he(null);
|
|
1137
|
+
return me(() => {
|
|
1137
1138
|
let { editor: t, options: n, pluginKey: i, resizeDelay: a, appendTo: o, shouldShow: s, getReferencedVirtualElement: c, updateDelay: l } = e, u = r.value;
|
|
1138
|
-
u && (u.style.visibility = "hidden", u.style.position = "absolute", u.remove(),
|
|
1139
|
-
t.registerPlugin(
|
|
1139
|
+
u && (u.style.visibility = "hidden", u.style.position = "absolute", u.remove(), de(() => {
|
|
1140
|
+
t.registerPlugin(cr({
|
|
1140
1141
|
editor: t,
|
|
1141
1142
|
element: u,
|
|
1142
1143
|
options: n,
|
|
@@ -1148,15 +1149,15 @@ var or = class {
|
|
|
1148
1149
|
updateDelay: l
|
|
1149
1150
|
}));
|
|
1150
1151
|
}));
|
|
1151
|
-
}),
|
|
1152
|
+
}), pe(() => {
|
|
1152
1153
|
let { pluginKey: t, editor: n } = e;
|
|
1153
1154
|
n.unregisterPlugin(t);
|
|
1154
|
-
}), () =>
|
|
1155
|
+
}), () => ce("div", {
|
|
1155
1156
|
ref: r,
|
|
1156
1157
|
...n
|
|
1157
1158
|
}, t.default?.call(t));
|
|
1158
1159
|
}
|
|
1159
|
-
}),
|
|
1160
|
+
}), ur = class {
|
|
1160
1161
|
constructor({ editor: e, element: t, view: n, updateDelay: r = 250, resizeDelay: i = 60, options: a, appendTo: o, shouldShow: s }) {
|
|
1161
1162
|
this.preventHide = !1, this.isVisible = !1, this.scrollTarget = window, this.shouldShow = ({ view: e, state: t }) => {
|
|
1162
1163
|
let { selection: n } = t, { $anchor: r, empty: i } = n, a = r.depth === 1, o = r.parent.isTextblock && !r.parent.type.spec.code && !r.parent.textContent && r.parent.childCount === 0 && !this.getTextContent(r.parent);
|
|
@@ -1204,11 +1205,11 @@ var or = class {
|
|
|
1204
1205
|
}, this.element.tabIndex = 0, s && (this.shouldShow = s), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.editor.on("transaction", this.transactionHandler), window.addEventListener("resize", this.resizeHandler), this.scrollTarget.addEventListener("scroll", this.resizeHandler), this.update(n, n.state), this.getShouldShow() && (this.show(), this.updatePosition());
|
|
1205
1206
|
}
|
|
1206
1207
|
getTextContent(e) {
|
|
1207
|
-
return
|
|
1208
|
+
return Ne(e, { textSerializers: Pe(this.editor.schema) });
|
|
1208
1209
|
}
|
|
1209
1210
|
get middlewares() {
|
|
1210
1211
|
let e = [];
|
|
1211
|
-
return this.floatingUIOptions.flip && e.push(
|
|
1212
|
+
return this.floatingUIOptions.flip && e.push(er(typeof this.floatingUIOptions.flip == "boolean" ? void 0 : this.floatingUIOptions.flip)), this.floatingUIOptions.shift && e.push($n(typeof this.floatingUIOptions.shift == "boolean" ? void 0 : this.floatingUIOptions.shift)), this.floatingUIOptions.offset && e.push(Zn(typeof this.floatingUIOptions.offset == "boolean" ? void 0 : this.floatingUIOptions.offset)), this.floatingUIOptions.arrow && e.push(rr(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && e.push(tr(typeof this.floatingUIOptions.size == "boolean" ? void 0 : this.floatingUIOptions.size)), this.floatingUIOptions.autoPlacement && e.push(Qn(typeof this.floatingUIOptions.autoPlacement == "boolean" ? void 0 : this.floatingUIOptions.autoPlacement)), this.floatingUIOptions.hide && e.push(nr(typeof this.floatingUIOptions.hide == "boolean" ? void 0 : this.floatingUIOptions.hide)), this.floatingUIOptions.inline && e.push(ir(typeof this.floatingUIOptions.inline == "boolean" ? void 0 : this.floatingUIOptions.inline)), e;
|
|
1212
1213
|
}
|
|
1213
1214
|
getShouldShow(e) {
|
|
1214
1215
|
let { state: t } = this.view, { selection: n } = t, { ranges: r } = n, i = Math.min(...r.map((e) => e.$from.pos)), a = Math.max(...r.map((e) => e.$to.pos));
|
|
@@ -1231,8 +1232,8 @@ var or = class {
|
|
|
1231
1232
|
}
|
|
1232
1233
|
}
|
|
1233
1234
|
updatePosition() {
|
|
1234
|
-
let { selection: e } = this.editor.state, t =
|
|
1235
|
-
|
|
1235
|
+
let { selection: e } = this.editor.state, t = Re(this.view, e.from, e.to);
|
|
1236
|
+
ar({
|
|
1236
1237
|
getBoundingClientRect: () => t,
|
|
1237
1238
|
getClientRects: () => [t]
|
|
1238
1239
|
}, this.element, {
|
|
@@ -1261,14 +1262,14 @@ var or = class {
|
|
|
1261
1262
|
destroy() {
|
|
1262
1263
|
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();
|
|
1263
1264
|
}
|
|
1264
|
-
},
|
|
1265
|
+
}, dr = (e) => new Be({
|
|
1265
1266
|
key: typeof e.pluginKey == "string" ? new L(e.pluginKey) : e.pluginKey,
|
|
1266
|
-
view: (t) => new
|
|
1267
|
+
view: (t) => new ur({
|
|
1267
1268
|
view: t,
|
|
1268
1269
|
...e
|
|
1269
1270
|
})
|
|
1270
1271
|
});
|
|
1271
|
-
|
|
1272
|
+
se({
|
|
1272
1273
|
name: "FloatingMenu",
|
|
1273
1274
|
inheritAttrs: !1,
|
|
1274
1275
|
props: {
|
|
@@ -1302,10 +1303,10 @@ oe({
|
|
|
1302
1303
|
}
|
|
1303
1304
|
},
|
|
1304
1305
|
setup(e, { slots: t, attrs: n }) {
|
|
1305
|
-
let r =
|
|
1306
|
-
return
|
|
1306
|
+
let r = he(null);
|
|
1307
|
+
return me(() => {
|
|
1307
1308
|
let { pluginKey: t, editor: n, updateDelay: i, resizeDelay: a, options: o, appendTo: s, shouldShow: c } = e, l = r.value;
|
|
1308
|
-
l && (l.style.visibility = "hidden", l.style.position = "absolute", l.remove(), n.registerPlugin(
|
|
1309
|
+
l && (l.style.visibility = "hidden", l.style.position = "absolute", l.remove(), n.registerPlugin(dr({
|
|
1309
1310
|
pluginKey: t,
|
|
1310
1311
|
editor: n,
|
|
1311
1312
|
element: l,
|
|
@@ -1315,10 +1316,10 @@ oe({
|
|
|
1315
1316
|
appendTo: s,
|
|
1316
1317
|
shouldShow: c
|
|
1317
1318
|
})));
|
|
1318
|
-
}),
|
|
1319
|
+
}), pe(() => {
|
|
1319
1320
|
let { pluginKey: t, editor: n } = e;
|
|
1320
1321
|
n.unregisterPlugin(t);
|
|
1321
|
-
}), () =>
|
|
1322
|
+
}), () => ce("div", {
|
|
1322
1323
|
ref: r,
|
|
1323
1324
|
...n
|
|
1324
1325
|
}, t.default?.call(t));
|
|
@@ -1330,21 +1331,21 @@ var $ = (e) => ({
|
|
|
1330
1331
|
default: null,
|
|
1331
1332
|
parseHTML: (t) => t.getAttribute(e),
|
|
1332
1333
|
renderHTML: (t) => t[e] ? { [e]: t[e] } : {}
|
|
1333
|
-
}),
|
|
1334
|
+
}), fr = () => {
|
|
1334
1335
|
let e = $("style");
|
|
1335
|
-
return e.renderHTML = (e) => e.style ? { style:
|
|
1336
|
+
return e.renderHTML = (e) => e.style ? { style: pr(e.style) } : {}, e;
|
|
1336
1337
|
};
|
|
1337
|
-
function
|
|
1338
|
+
function pr(e) {
|
|
1338
1339
|
return e.replace(/(?<![a-z-])width\s*:\s*([^;]+);?/gi, (e, t) => /^\s*0\s*[a-z%]*\s*(!important)?\s*$/i.test(t) ? "width: 100%;" : e);
|
|
1339
1340
|
}
|
|
1340
|
-
var
|
|
1341
|
+
var mr = st.extend({
|
|
1341
1342
|
addAttributes() {
|
|
1342
1343
|
return {
|
|
1343
1344
|
...this.parent?.(),
|
|
1344
1345
|
border: $("border"),
|
|
1345
1346
|
cellpadding: $("cellpadding"),
|
|
1346
1347
|
cellspacing: $("cellspacing"),
|
|
1347
|
-
style:
|
|
1348
|
+
style: fr()
|
|
1348
1349
|
};
|
|
1349
1350
|
},
|
|
1350
1351
|
renderHTML({ HTMLAttributes: e }) {
|
|
@@ -1354,26 +1355,26 @@ var pr = ot.extend({
|
|
|
1354
1355
|
["tbody", 0]
|
|
1355
1356
|
];
|
|
1356
1357
|
}
|
|
1357
|
-
}),
|
|
1358
|
+
}), hr = ut.extend({ addAttributes() {
|
|
1358
1359
|
return {
|
|
1359
1360
|
...this.parent?.(),
|
|
1360
1361
|
style: $("style")
|
|
1361
1362
|
};
|
|
1362
|
-
} }),
|
|
1363
|
+
} }), gr = {
|
|
1363
1364
|
style: $("style"),
|
|
1364
1365
|
valign: $("valign"),
|
|
1365
1366
|
width: $("width")
|
|
1366
|
-
},
|
|
1367
|
+
}, _r = ct.extend({ addAttributes() {
|
|
1367
1368
|
return {
|
|
1368
1369
|
...this.parent?.(),
|
|
1369
|
-
...
|
|
1370
|
+
...gr
|
|
1370
1371
|
};
|
|
1371
|
-
} }),
|
|
1372
|
+
} }), vr = lt.extend({ addAttributes() {
|
|
1372
1373
|
return {
|
|
1373
1374
|
...this.parent?.(),
|
|
1374
|
-
...
|
|
1375
|
+
...gr
|
|
1375
1376
|
};
|
|
1376
|
-
} }),
|
|
1377
|
+
} }), yr = dt.extend({ parseHTML() {
|
|
1377
1378
|
return [
|
|
1378
1379
|
...this.parent?.() || [],
|
|
1379
1380
|
{
|
|
@@ -1387,17 +1388,17 @@ var pr = ot.extend({
|
|
|
1387
1388
|
getAttrs: (e) => e.hasAttribute("style") ? {} : !1
|
|
1388
1389
|
}
|
|
1389
1390
|
];
|
|
1390
|
-
} }),
|
|
1391
|
+
} }), br = {
|
|
1391
1392
|
name: "EmojiComponent",
|
|
1392
1393
|
components: {
|
|
1393
|
-
NodeViewWrapper:
|
|
1394
|
+
NodeViewWrapper: C,
|
|
1394
1395
|
DtEmoji: y
|
|
1395
1396
|
},
|
|
1396
|
-
props:
|
|
1397
|
+
props: E
|
|
1397
1398
|
};
|
|
1398
|
-
function
|
|
1399
|
+
function xr(e, t, n, r, i, a) {
|
|
1399
1400
|
let o = N("dt-emoji"), s = N("node-view-wrapper");
|
|
1400
|
-
return M(),
|
|
1401
|
+
return M(), O(s, { class: "d-d-inline-block d-va-bottom d-lh0" }, {
|
|
1401
1402
|
default: F(() => [j(o, {
|
|
1402
1403
|
size: "500",
|
|
1403
1404
|
code: e.node.attrs.code
|
|
@@ -1405,7 +1406,7 @@ function br(e, t, n, r, i, a) {
|
|
|
1405
1406
|
_: 1
|
|
1406
1407
|
});
|
|
1407
1408
|
}
|
|
1408
|
-
var
|
|
1409
|
+
var Sr = /* @__PURE__ */ i(br, [["render", xr]]), Cr = {
|
|
1409
1410
|
name: "SuggestionList",
|
|
1410
1411
|
components: { DtListItem: g },
|
|
1411
1412
|
props: {
|
|
@@ -1481,29 +1482,29 @@ var xr = /* @__PURE__ */ i(yr, [["render", br]]), Sr = {
|
|
|
1481
1482
|
}
|
|
1482
1483
|
}
|
|
1483
1484
|
}
|
|
1484
|
-
},
|
|
1485
|
+
}, wr = { class: "d-popover__dialog d-suggestion-list__container" }, Tr = {
|
|
1485
1486
|
ref: "suggestionList",
|
|
1486
1487
|
class: "d-suggestion-list"
|
|
1487
1488
|
};
|
|
1488
|
-
function
|
|
1489
|
+
function Er(e, t, n, r, i, a) {
|
|
1489
1490
|
let o = N("dt-list-item");
|
|
1490
|
-
return M(), ae("div",
|
|
1491
|
+
return M(), ae("div", wr, [ye(oe("ul", Tr, [(M(!0), ae(ie, null, ge(n.items, (e, t) => (M(), O(o, {
|
|
1491
1492
|
key: e.id,
|
|
1492
|
-
class:
|
|
1493
|
+
class: fe(["d-suggestion-list__item", { "d-list-item--highlighted": t === i.selectedIndex }]),
|
|
1493
1494
|
"navigation-type": "arrow-keys",
|
|
1494
1495
|
onClick: (e) => a.selectItem(t),
|
|
1495
|
-
onKeydown:
|
|
1496
|
+
onKeydown: xe(a.onKeyDown, ["prevent"])
|
|
1496
1497
|
}, {
|
|
1497
|
-
default: F(() => [(M(),
|
|
1498
|
+
default: F(() => [(M(), O(_e(n.itemComponent), { item: e }, null, 8, ["item"]))]),
|
|
1498
1499
|
_: 2
|
|
1499
1500
|
}, 1032, [
|
|
1500
1501
|
"class",
|
|
1501
1502
|
"onClick",
|
|
1502
1503
|
"onKeydown"
|
|
1503
|
-
]))), 128))], 512), [[
|
|
1504
|
+
]))), 128))], 512), [[ve, n.items.length]])]);
|
|
1504
1505
|
}
|
|
1505
|
-
var
|
|
1506
|
-
function
|
|
1506
|
+
var Dr = /* @__PURE__ */ i(Cr, [["render", Er]]), Or = "top-start";
|
|
1507
|
+
function kr() {
|
|
1507
1508
|
return { getBoundingClientRect: () => ({
|
|
1508
1509
|
width: 0,
|
|
1509
1510
|
height: 0,
|
|
@@ -1515,16 +1516,16 @@ function Or() {
|
|
|
1515
1516
|
bottom: 0
|
|
1516
1517
|
}) };
|
|
1517
1518
|
}
|
|
1518
|
-
function
|
|
1519
|
+
function Ar(e) {
|
|
1519
1520
|
return { getBoundingClientRect: e };
|
|
1520
1521
|
}
|
|
1521
|
-
async function
|
|
1522
|
+
async function jr(e, t, n = {}) {
|
|
1522
1523
|
if (!e || !t?.getBoundingClientRect) return;
|
|
1523
|
-
let { placement: r =
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
] } = n, { x: a, y: o } = await
|
|
1524
|
+
let { placement: r = Or, middleware: i = [
|
|
1525
|
+
Zn(0),
|
|
1526
|
+
er(),
|
|
1527
|
+
$n({ padding: 8 })
|
|
1528
|
+
] } = n, { x: a, y: o } = await ar(t, e, {
|
|
1528
1529
|
placement: r,
|
|
1529
1530
|
middleware: i
|
|
1530
1531
|
});
|
|
@@ -1533,65 +1534,65 @@ async function Ar(e, t, n = {}) {
|
|
|
1533
1534
|
top: `${o}px`
|
|
1534
1535
|
});
|
|
1535
1536
|
}
|
|
1536
|
-
function
|
|
1537
|
+
function Mr(e, t = {}) {
|
|
1537
1538
|
let { zIndex: n = "650" } = t;
|
|
1538
1539
|
e.style.position = "absolute", e.style.zIndex = n, e.style.display = "none";
|
|
1539
1540
|
}
|
|
1540
|
-
function
|
|
1541
|
+
function Nr(e) {
|
|
1541
1542
|
e && (e.style.display = "block");
|
|
1542
1543
|
}
|
|
1543
|
-
function
|
|
1544
|
+
function Pr(e) {
|
|
1544
1545
|
e && (e.style.display = "none");
|
|
1545
1546
|
}
|
|
1546
|
-
function
|
|
1547
|
+
function Fr(e, t) {
|
|
1547
1548
|
return (n) => {
|
|
1548
1549
|
n.key === "Escape" && t() && e();
|
|
1549
1550
|
};
|
|
1550
1551
|
}
|
|
1551
|
-
function
|
|
1552
|
+
function Ir(e) {
|
|
1552
1553
|
document.addEventListener("keydown", e);
|
|
1553
1554
|
}
|
|
1554
|
-
function
|
|
1555
|
+
function Lr(e) {
|
|
1555
1556
|
document.removeEventListener("keydown", e);
|
|
1556
1557
|
}
|
|
1557
|
-
function
|
|
1558
|
-
return new
|
|
1558
|
+
function Rr(e, t, n, r) {
|
|
1559
|
+
return new T(e, {
|
|
1559
1560
|
props: {
|
|
1560
|
-
itemComponent:
|
|
1561
|
+
itemComponent: le(t),
|
|
1561
1562
|
itemType: n,
|
|
1562
1563
|
...r
|
|
1563
1564
|
},
|
|
1564
1565
|
editor: r.editor
|
|
1565
1566
|
});
|
|
1566
1567
|
}
|
|
1567
|
-
function
|
|
1568
|
-
e.escHandler &&
|
|
1568
|
+
function zr(e) {
|
|
1569
|
+
e.escHandler && Lr(e.escHandler), e.floatingEl?.remove(), e.component?.destroy();
|
|
1569
1570
|
}
|
|
1570
|
-
function
|
|
1571
|
-
let { listComponent: r =
|
|
1571
|
+
function Br(e, t, n = {}) {
|
|
1572
|
+
let { listComponent: r = Dr, placement: i = Or, zIndex: a = "650" } = n;
|
|
1572
1573
|
return () => {
|
|
1573
|
-
let n = null, o = null, s = !1, c =
|
|
1574
|
+
let n = null, o = null, s = !1, c = kr(), l = null;
|
|
1574
1575
|
function u() {
|
|
1575
|
-
|
|
1576
|
+
jr(o, c, { placement: i });
|
|
1576
1577
|
}
|
|
1577
1578
|
function d() {
|
|
1578
|
-
o && (
|
|
1579
|
+
o && (Nr(o), s = !0, u());
|
|
1579
1580
|
}
|
|
1580
1581
|
function f() {
|
|
1581
|
-
o && (
|
|
1582
|
+
o && (Pr(o), s = !1);
|
|
1582
1583
|
}
|
|
1583
1584
|
return {
|
|
1584
1585
|
onStart: (i) => {
|
|
1585
|
-
n =
|
|
1586
|
+
n = Rr(r, e, t, i), i.clientRect && (o = n.element, Mr(o, { zIndex: a }), document.body.appendChild(o), c = Ar(i.clientRect), l = Fr(f, () => s), Ir(l), i.items.length > 0 && d());
|
|
1586
1587
|
},
|
|
1587
1588
|
onUpdate(e) {
|
|
1588
|
-
n?.updateProps(e), e.items.length > 0 ? d() : f(), e.clientRect && (c =
|
|
1589
|
+
n?.updateProps(e), e.items.length > 0 ? d() : f(), e.clientRect && (c = Ar(e.clientRect), u());
|
|
1589
1590
|
},
|
|
1590
1591
|
onKeyDown(e) {
|
|
1591
1592
|
if (s) return n?.ref?.onKeyDown(e);
|
|
1592
1593
|
},
|
|
1593
1594
|
onExit() {
|
|
1594
|
-
|
|
1595
|
+
zr({
|
|
1595
1596
|
escHandler: l,
|
|
1596
1597
|
floatingEl: o,
|
|
1597
1598
|
component: n
|
|
@@ -1602,7 +1603,7 @@ function zr(e, t, n = {}) {
|
|
|
1602
1603
|
}
|
|
1603
1604
|
//#endregion
|
|
1604
1605
|
//#region components/RichTextEditor/Extensions/Emoji/EmojiSuggestion.vue
|
|
1605
|
-
var
|
|
1606
|
+
var Vr = {
|
|
1606
1607
|
name: "EmojiSuggestion",
|
|
1607
1608
|
components: {
|
|
1608
1609
|
DtEmoji: y,
|
|
@@ -1613,9 +1614,9 @@ var Br = {
|
|
|
1613
1614
|
required: !0
|
|
1614
1615
|
} }
|
|
1615
1616
|
};
|
|
1616
|
-
function
|
|
1617
|
+
function Hr(e, t, n, r, i, a) {
|
|
1617
1618
|
let o = N("dt-emoji"), s = N("dt-stack");
|
|
1618
|
-
return M(),
|
|
1619
|
+
return M(), O(s, {
|
|
1619
1620
|
direction: "row",
|
|
1620
1621
|
gap: "100"
|
|
1621
1622
|
}, {
|
|
@@ -1626,10 +1627,10 @@ function Vr(e, t, n, r, i, a) {
|
|
|
1626
1627
|
_: 1
|
|
1627
1628
|
});
|
|
1628
1629
|
}
|
|
1629
|
-
var
|
|
1630
|
+
var Ur = /* @__PURE__ */ i(Vr, [["render", Hr]]), Wr = 20, Gr = (e, t, n) => {
|
|
1630
1631
|
let r = e.shortname?.replaceAll(":", ""), i = t.shortname?.replaceAll(":", ""), a = r.startsWith(n), o = i.startsWith(n);
|
|
1631
1632
|
return a && !o ? -1 : !a && o ? 1 : r.localeCompare(i);
|
|
1632
|
-
},
|
|
1633
|
+
}, Kr = {
|
|
1633
1634
|
items: ({ query: e }) => {
|
|
1634
1635
|
if (e.length < 2) return [];
|
|
1635
1636
|
let t = Object.values(c());
|
|
@@ -1637,7 +1638,7 @@ var Hr = /* @__PURE__ */ i(Br, [["render", Vr]]), Ur = 20, Wr = (e, t, n) => {
|
|
|
1637
1638
|
t.name,
|
|
1638
1639
|
t.shortname?.replaceAll(":", ""),
|
|
1639
1640
|
...t.keywords || []
|
|
1640
|
-
].some((t) => t && t.startsWith(e))).splice(0,
|
|
1641
|
+
].some((t) => t && t.startsWith(e))).splice(0, Wr).sort((t, n) => Gr(t, n, e)).map((e) => ({ code: e.shortname }));
|
|
1641
1642
|
},
|
|
1642
1643
|
command: ({ editor: e, range: t, props: n }) => {
|
|
1643
1644
|
e.view.state.selection.$to.nodeAfter?.text?.startsWith(" ") && (t.to += 1), e.chain().focus().insertContentAt(t, [{
|
|
@@ -1645,14 +1646,14 @@ var Hr = /* @__PURE__ */ i(Br, [["render", Vr]]), Ur = 20, Wr = (e, t, n) => {
|
|
|
1645
1646
|
attrs: n
|
|
1646
1647
|
}]).run(), window.getSelection()?.collapseToEnd();
|
|
1647
1648
|
},
|
|
1648
|
-
render:
|
|
1649
|
-
},
|
|
1649
|
+
render: Br(Ur, "emoji")
|
|
1650
|
+
}, qr = /(:\w+:)$/, Jr = RegExp(Ce + "$"), Yr = (e) => {
|
|
1650
1651
|
if (e && a(e[0])) return { text: e[2] || e[0] };
|
|
1651
|
-
},
|
|
1652
|
+
}, Xr = (e) => [...e.matchAll(s)].filter((e) => a(e[0])).map((e) => ({
|
|
1652
1653
|
index: e.index,
|
|
1653
1654
|
text: e[0],
|
|
1654
1655
|
match: e
|
|
1655
|
-
})),
|
|
1656
|
+
})), Zr = De.create({
|
|
1656
1657
|
name: "emoji",
|
|
1657
1658
|
addOptions() {
|
|
1658
1659
|
return { HTMLAttributes: {} };
|
|
@@ -1662,7 +1663,7 @@ var Hr = /* @__PURE__ */ i(Br, [["render", Vr]]), Ur = 20, Wr = (e, t, n) => {
|
|
|
1662
1663
|
selectable: !1,
|
|
1663
1664
|
atom: !0,
|
|
1664
1665
|
addNodeView() {
|
|
1665
|
-
return
|
|
1666
|
+
return w(Sr);
|
|
1666
1667
|
},
|
|
1667
1668
|
addAttributes() {
|
|
1668
1669
|
return { code: { default: null } };
|
|
@@ -1678,10 +1679,10 @@ var Hr = /* @__PURE__ */ i(Br, [["render", Vr]]), Ur = 20, Wr = (e, t, n) => {
|
|
|
1678
1679
|
return ["emoji-component", I(this.options.HTMLAttributes, e)];
|
|
1679
1680
|
},
|
|
1680
1681
|
addInputRules() {
|
|
1681
|
-
return [new
|
|
1682
|
+
return [new Te({
|
|
1682
1683
|
find: (e) => {
|
|
1683
|
-
let t = e.match(
|
|
1684
|
-
if (t) return
|
|
1684
|
+
let t = e.match(qr) || e.match(Jr);
|
|
1685
|
+
if (t) return Yr(t);
|
|
1685
1686
|
},
|
|
1686
1687
|
handler: ({ state: e, range: t, match: n }) => {
|
|
1687
1688
|
let { tr: r } = e, i = t.from, a = t.to;
|
|
@@ -1690,13 +1691,13 @@ var Hr = /* @__PURE__ */ i(Br, [["render", Vr]]), Ur = 20, Wr = (e, t, n) => {
|
|
|
1690
1691
|
})];
|
|
1691
1692
|
},
|
|
1692
1693
|
addPasteRules() {
|
|
1693
|
-
return [
|
|
1694
|
-
find:
|
|
1694
|
+
return [Le({
|
|
1695
|
+
find: Xr,
|
|
1695
1696
|
type: this.type,
|
|
1696
1697
|
getAttributes(e) {
|
|
1697
1698
|
return { code: e[0] };
|
|
1698
1699
|
}
|
|
1699
|
-
}),
|
|
1700
|
+
}), Le({
|
|
1700
1701
|
find: o,
|
|
1701
1702
|
type: this.type,
|
|
1702
1703
|
getAttributes(e) {
|
|
@@ -1705,12 +1706,12 @@ var Hr = /* @__PURE__ */ i(Br, [["render", Vr]]), Ur = 20, Wr = (e, t, n) => {
|
|
|
1705
1706
|
})];
|
|
1706
1707
|
},
|
|
1707
1708
|
addProseMirrorPlugins() {
|
|
1708
|
-
return [
|
|
1709
|
+
return [pt({
|
|
1709
1710
|
char: ":",
|
|
1710
1711
|
pluginKey: new L("emoji"),
|
|
1711
1712
|
editor: this.editor,
|
|
1712
1713
|
...this.options.suggestion,
|
|
1713
|
-
...
|
|
1714
|
+
...Kr
|
|
1714
1715
|
})];
|
|
1715
1716
|
},
|
|
1716
1717
|
addKeyboardShortcuts() {
|
|
@@ -1724,21 +1725,21 @@ var Hr = /* @__PURE__ */ i(Br, [["render", Vr]]), Ur = 20, Wr = (e, t, n) => {
|
|
|
1724
1725
|
});
|
|
1725
1726
|
//#endregion
|
|
1726
1727
|
//#region components/RichTextEditor/Extensions/CustomLink/Utils.js
|
|
1727
|
-
function
|
|
1728
|
+
function Qr(e, t, n = () => !0) {
|
|
1728
1729
|
let r = [];
|
|
1729
1730
|
t.lastIndex = 0;
|
|
1730
1731
|
let i;
|
|
1731
1732
|
for (; i = t.exec(e);) n(e, i) && r.push(i);
|
|
1732
1733
|
return r;
|
|
1733
1734
|
}
|
|
1734
|
-
function
|
|
1735
|
+
function $r(e, t) {
|
|
1735
1736
|
return !["#", "@"].includes(e.charAt(t.index)) && !["#", "@"].includes(e.charAt(t.index - 1));
|
|
1736
1737
|
}
|
|
1737
|
-
function
|
|
1738
|
+
function ei(e) {
|
|
1738
1739
|
let t = RegExp("(?:" + ["[!?.,:;'\"]", "(?:&|&)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"].join("|"), "g");
|
|
1739
1740
|
return e.replace(t, "");
|
|
1740
1741
|
}
|
|
1741
|
-
function
|
|
1742
|
+
function ti(e, t) {
|
|
1742
1743
|
let n = e.slice(0, t + 1).search(/\S+\s*$/), r = e.slice(t).search(/\s/);
|
|
1743
1744
|
if (r < 0) {
|
|
1744
1745
|
let t = e.slice(n);
|
|
@@ -1754,69 +1755,69 @@ function ei(e, t) {
|
|
|
1754
1755
|
to: r + t
|
|
1755
1756
|
};
|
|
1756
1757
|
}
|
|
1757
|
-
function
|
|
1758
|
-
let i =
|
|
1758
|
+
function ni(e, t, n, r) {
|
|
1759
|
+
let i = ti(e, t);
|
|
1759
1760
|
if (r.lastIndex = 0, !r.test(i.text)) return i;
|
|
1760
1761
|
let a = n === "left" ? i.from - 1 : i.to + 1;
|
|
1761
|
-
return a <= 0 || a >= e.length || a === t ? i :
|
|
1762
|
+
return a <= 0 || a >= e.length || a === t ? i : ni(e, a, n, r);
|
|
1762
1763
|
}
|
|
1763
|
-
function
|
|
1764
|
-
let i =
|
|
1764
|
+
function ri(e, t, n, r) {
|
|
1765
|
+
let i = Me(Math.max(e.from - 1, 0), Math.min(e.to + 1, t.content.size), t);
|
|
1765
1766
|
for (let e of i) e.mark.type === r && n.removeMark(e.from, e.to, r);
|
|
1766
1767
|
}
|
|
1767
|
-
var
|
|
1768
|
-
function
|
|
1768
|
+
var ii = e(1, 15);
|
|
1769
|
+
function ai(e, n, r, i, a, o) {
|
|
1769
1770
|
if (!e) return;
|
|
1770
1771
|
let s = r - n - 1;
|
|
1771
1772
|
s = s < 0 ? 0 : s;
|
|
1772
|
-
let c = i - n, l =
|
|
1773
|
-
|
|
1774
|
-
let t =
|
|
1773
|
+
let c = i - n, l = ni(e, s, "left", ii), u = ni(e, c, "right", ii);
|
|
1774
|
+
Qr(e.slice(l.from, u.to), t, $r).forEach((e) => {
|
|
1775
|
+
let t = ei(e[0]), r = n + l.from + e.index + 1, i = r + t.length;
|
|
1775
1776
|
a.addMark(r, i, o.create());
|
|
1776
1777
|
});
|
|
1777
1778
|
}
|
|
1778
1779
|
//#endregion
|
|
1779
1780
|
//#region components/RichTextEditor/Extensions/CustomLink/Autolink.js
|
|
1780
|
-
function
|
|
1781
|
+
function oi(e) {
|
|
1781
1782
|
let t = !1;
|
|
1782
|
-
return new
|
|
1783
|
+
return new Be({
|
|
1783
1784
|
key: new L("autolink"),
|
|
1784
1785
|
appendTransaction: (n, r, i) => {
|
|
1785
1786
|
let a = n.some((e) => e.docChanged) && !r.doc.eq(i.doc);
|
|
1786
1787
|
if (t && !a) return;
|
|
1787
1788
|
let { tr: o } = i, { textContent: s } = i.doc;
|
|
1788
|
-
if (!t || !r.doc.textContent) return
|
|
1789
|
+
if (!t || !r.doc.textContent) return ai(s, 0, 0, s.length, o, e.type), t = !0, o;
|
|
1789
1790
|
t = !0;
|
|
1790
|
-
let c =
|
|
1791
|
+
let c = Ae(Oe(r.doc, [...n]));
|
|
1791
1792
|
return c.length ? (c.forEach(({ oldRange: t, newRange: n }) => {
|
|
1792
1793
|
if (n.from === n.to) {
|
|
1793
|
-
|
|
1794
|
+
ai(s, 0, 0, s.length, o, e.type);
|
|
1794
1795
|
return;
|
|
1795
1796
|
}
|
|
1796
|
-
|
|
1797
|
-
|
|
1797
|
+
ri(n, i.doc, o, e.type), ke(i.doc, n, (e) => e.isTextblock).forEach(({ node: r, pos: i }) => {
|
|
1798
|
+
ai(r.textContent, i, t.from, n.to, o, e.type);
|
|
1798
1799
|
});
|
|
1799
|
-
}), o) : (
|
|
1800
|
+
}), o) : (ai(s, 0, 0, s.length, o, e.type), o);
|
|
1800
1801
|
}
|
|
1801
1802
|
});
|
|
1802
1803
|
}
|
|
1803
1804
|
//#endregion
|
|
1804
1805
|
//#region components/RichTextEditor/Extensions/CustomLink/CustomLink.js
|
|
1805
|
-
var
|
|
1806
|
+
var si = {
|
|
1806
1807
|
class: "d-link d-c-text d-d-inline-block d-wb-break-all",
|
|
1807
1808
|
rel: "noopener noreferrer nofollow"
|
|
1808
|
-
},
|
|
1809
|
+
}, ci = Ee.create({
|
|
1809
1810
|
name: "CustomLink",
|
|
1810
1811
|
renderHTML({ HTMLAttributes: e }) {
|
|
1811
|
-
return ["a", I(this.options.HTMLAttributes, e,
|
|
1812
|
+
return ["a", I(this.options.HTMLAttributes, e, si)];
|
|
1812
1813
|
},
|
|
1813
1814
|
renderText({ node: e }) {
|
|
1814
1815
|
return e.attrs.text;
|
|
1815
1816
|
},
|
|
1816
1817
|
addProseMirrorPlugins() {
|
|
1817
|
-
return [
|
|
1818
|
+
return [oi({ type: this.type })];
|
|
1818
1819
|
}
|
|
1819
|
-
}),
|
|
1820
|
+
}), li = Ee.create({
|
|
1820
1821
|
name: "LinkPhoneNumbers",
|
|
1821
1822
|
renderHTML({ HTMLAttributes: e }) {
|
|
1822
1823
|
return ["a", I(e, {
|
|
@@ -1826,17 +1827,17 @@ var oi = {
|
|
|
1826
1827
|
},
|
|
1827
1828
|
addProseMirrorPlugins() {
|
|
1828
1829
|
let e = this.editor, t = this.type;
|
|
1829
|
-
return [new
|
|
1830
|
+
return [new Be({
|
|
1830
1831
|
key: new L("phoneClick"),
|
|
1831
1832
|
props: { handleClick(n, r, i) {
|
|
1832
1833
|
let { state: a } = n, o = a.doc.resolve(r);
|
|
1833
1834
|
if (!o.marks().some((e) => e.type === t)) return !1;
|
|
1834
|
-
let s =
|
|
1835
|
+
let s = je(o, t), c = s ? a.doc.textBetween(s.from, s.to) : "";
|
|
1835
1836
|
return i.preventDefault(), e.emit("phone-click", { phoneNumber: c }), !0;
|
|
1836
1837
|
} }
|
|
1837
1838
|
})];
|
|
1838
1839
|
}
|
|
1839
|
-
}),
|
|
1840
|
+
}), ui = mt.extend({
|
|
1840
1841
|
name: "ConfigurableImage",
|
|
1841
1842
|
addAttributes() {
|
|
1842
1843
|
return {
|
|
@@ -1851,12 +1852,12 @@ var oi = {
|
|
|
1851
1852
|
}).configure({
|
|
1852
1853
|
inline: !0,
|
|
1853
1854
|
allowBase64: !0
|
|
1854
|
-
}),
|
|
1855
|
+
}), di = new Set(/* @__PURE__ */ "address.article.aside.blockquote.dd.details.dialog.div.dl.dt.fieldset.figcaption.figure.footer.form.h1.h2.h3.h4.h5.h6.header.hgroup.hr.li.main.nav.ol.p.pre.section.table.ul".split(".")), fi = Xe.extend({
|
|
1855
1856
|
parseHTML() {
|
|
1856
1857
|
return [{
|
|
1857
1858
|
tag: "div",
|
|
1858
1859
|
getAttrs: (e) => {
|
|
1859
|
-
for (let t of e.children) if (
|
|
1860
|
+
for (let t of e.children) if (di.has(t.tagName.toLowerCase())) return !1;
|
|
1860
1861
|
return null;
|
|
1861
1862
|
}
|
|
1862
1863
|
}];
|
|
@@ -1868,13 +1869,13 @@ var oi = {
|
|
|
1868
1869
|
0
|
|
1869
1870
|
];
|
|
1870
1871
|
}
|
|
1871
|
-
}),
|
|
1872
|
+
}), pi = {
|
|
1872
1873
|
name: "MentionComponent",
|
|
1873
1874
|
components: {
|
|
1874
|
-
NodeViewWrapper:
|
|
1875
|
+
NodeViewWrapper: C,
|
|
1875
1876
|
DtLink: p
|
|
1876
1877
|
},
|
|
1877
|
-
props:
|
|
1878
|
+
props: E,
|
|
1878
1879
|
computed: { text() {
|
|
1879
1880
|
return "@" + this.$props.node.attrs.name;
|
|
1880
1881
|
} },
|
|
@@ -1904,12 +1905,12 @@ var oi = {
|
|
|
1904
1905
|
}
|
|
1905
1906
|
}
|
|
1906
1907
|
};
|
|
1907
|
-
function
|
|
1908
|
+
function mi(e, t, n, r, i, a) {
|
|
1908
1909
|
let o = N("dt-link"), s = N("node-view-wrapper");
|
|
1909
|
-
return M(),
|
|
1910
|
+
return M(), O(s, { class: "d-d-inline-block" }, {
|
|
1910
1911
|
default: F(() => [j(o, {
|
|
1911
1912
|
tone: "mention",
|
|
1912
|
-
onClick:
|
|
1913
|
+
onClick: xe(a.handleClick, ["prevent"]),
|
|
1913
1914
|
onMouseenter: a.handleMouseEnter,
|
|
1914
1915
|
onMouseleave: a.handleMouseLeave,
|
|
1915
1916
|
onFocusin: a.handleMouseEnter,
|
|
@@ -1927,9 +1928,9 @@ function pi(e, t, n, r, i, a) {
|
|
|
1927
1928
|
_: 1
|
|
1928
1929
|
});
|
|
1929
1930
|
}
|
|
1930
|
-
var
|
|
1931
|
+
var hi = /* @__PURE__ */ i(pi, [["render", mi]]), gi = ht.extend({
|
|
1931
1932
|
addNodeView() {
|
|
1932
|
-
return
|
|
1933
|
+
return w(hi);
|
|
1933
1934
|
},
|
|
1934
1935
|
parseHTML() {
|
|
1935
1936
|
return [{ tag: "mention-component" }];
|
|
@@ -1951,15 +1952,15 @@ var mi = /* @__PURE__ */ i(fi, [["render", pi]]), hi = mt.extend({
|
|
|
1951
1952
|
}).configure({ suggestion: {
|
|
1952
1953
|
char: "@",
|
|
1953
1954
|
pluginKey: new L("mentionSuggestion")
|
|
1954
|
-
} }),
|
|
1955
|
+
} }), _i = {
|
|
1955
1956
|
name: "ChannelComponent",
|
|
1956
1957
|
components: {
|
|
1957
|
-
NodeViewWrapper:
|
|
1958
|
+
NodeViewWrapper: C,
|
|
1958
1959
|
DtLink: p,
|
|
1959
|
-
DtIconLock:
|
|
1960
|
+
DtIconLock: Se,
|
|
1960
1961
|
DtStack: _
|
|
1961
1962
|
},
|
|
1962
|
-
props:
|
|
1963
|
+
props: E,
|
|
1963
1964
|
computed: { text() {
|
|
1964
1965
|
return this.$props.node.attrs.locked ? this.$props.node.attrs.name : "#" + this.$props.node.attrs.name;
|
|
1965
1966
|
} },
|
|
@@ -1973,21 +1974,21 @@ var mi = /* @__PURE__ */ i(fi, [["render", pi]]), hi = mt.extend({
|
|
|
1973
1974
|
this.$props.editor.emit("channel-click", e);
|
|
1974
1975
|
} }
|
|
1975
1976
|
};
|
|
1976
|
-
function
|
|
1977
|
+
function vi(e, t, n, r, i, a) {
|
|
1977
1978
|
let o = N("dt-icon-lock"), s = N("dt-stack"), c = N("dt-link"), l = N("node-view-wrapper");
|
|
1978
|
-
return M(),
|
|
1979
|
+
return M(), O(l, { class: "d-d-inline-block" }, {
|
|
1979
1980
|
default: F(() => [j(c, {
|
|
1980
1981
|
tone: "mention",
|
|
1981
|
-
onClick:
|
|
1982
|
+
onClick: xe(a.handleClick, ["prevent"])
|
|
1982
1983
|
}, {
|
|
1983
1984
|
default: F(() => [j(s, {
|
|
1984
1985
|
direction: "row",
|
|
1985
1986
|
gap: "0"
|
|
1986
1987
|
}, {
|
|
1987
|
-
default: F(() => [e.$props.node.attrs.locked ? (M(),
|
|
1988
|
+
default: F(() => [e.$props.node.attrs.locked ? (M(), O(o, {
|
|
1988
1989
|
key: 0,
|
|
1989
1990
|
size: "200"
|
|
1990
|
-
})) :
|
|
1991
|
+
})) : k("", !0), oe("span", null, P(a.text), 1)]),
|
|
1991
1992
|
_: 1
|
|
1992
1993
|
})]),
|
|
1993
1994
|
_: 1
|
|
@@ -1995,10 +1996,10 @@ function _i(e, t, n, r, i, a) {
|
|
|
1995
1996
|
_: 1
|
|
1996
1997
|
});
|
|
1997
1998
|
}
|
|
1998
|
-
var
|
|
1999
|
+
var yi = /* @__PURE__ */ i(_i, [["render", vi]]), bi = ht.extend({
|
|
1999
2000
|
name: "channel",
|
|
2000
2001
|
addNodeView() {
|
|
2001
|
-
return
|
|
2002
|
+
return w(yi);
|
|
2002
2003
|
},
|
|
2003
2004
|
parseHTML() {
|
|
2004
2005
|
return [{ tag: "channel-component" }];
|
|
@@ -2020,10 +2021,10 @@ var vi = /* @__PURE__ */ i(gi, [["render", _i]]), yi = mt.extend({
|
|
|
2020
2021
|
}).configure({ suggestion: {
|
|
2021
2022
|
char: "#",
|
|
2022
2023
|
pluginKey: new L("channelSuggestion")
|
|
2023
|
-
} }),
|
|
2024
|
+
} }), xi = {
|
|
2024
2025
|
name: "SlashCommandsComponent",
|
|
2025
|
-
components: { NodeViewWrapper:
|
|
2026
|
-
props: { ...
|
|
2026
|
+
components: { NodeViewWrapper: C },
|
|
2027
|
+
props: { ...E },
|
|
2027
2028
|
emits: ["selected-command"],
|
|
2028
2029
|
computed: { text() {
|
|
2029
2030
|
return "/" + this.$props.node.attrs.command;
|
|
@@ -2035,21 +2036,21 @@ var vi = /* @__PURE__ */ i(gi, [["render", _i]]), yi = mt.extend({
|
|
|
2035
2036
|
t && typeof t == "function" && t(e);
|
|
2036
2037
|
}
|
|
2037
2038
|
};
|
|
2038
|
-
function
|
|
2039
|
+
function Si(e, t, n, r, i, a) {
|
|
2039
2040
|
let o = N("node-view-wrapper");
|
|
2040
|
-
return M(),
|
|
2041
|
+
return M(), O(o, { class: "d-d-inline-block" }, {
|
|
2041
2042
|
default: F(() => [A(P(a.text), 1)]),
|
|
2042
2043
|
_: 1
|
|
2043
2044
|
});
|
|
2044
2045
|
}
|
|
2045
|
-
var
|
|
2046
|
+
var Ci = /* @__PURE__ */ i(xi, [["render", Si]]), wi = (e, t) => [...e.matchAll(t)].map((e) => {
|
|
2046
2047
|
let t = e[2];
|
|
2047
2048
|
return t.endsWith(" ") || (t += " "), {
|
|
2048
2049
|
index: e.index,
|
|
2049
2050
|
text: t,
|
|
2050
2051
|
match: e
|
|
2051
2052
|
};
|
|
2052
|
-
}),
|
|
2053
|
+
}), Ti = ht.extend({
|
|
2053
2054
|
name: "slash-commands",
|
|
2054
2055
|
group: "inline",
|
|
2055
2056
|
inline: !0,
|
|
@@ -2063,7 +2064,7 @@ var Si = /* @__PURE__ */ i(bi, [["render", xi]]), Ci = (e, t) => [...e.matchAll(
|
|
|
2063
2064
|
return { onSelectedCommand: this.options.onSelectedCommand };
|
|
2064
2065
|
},
|
|
2065
2066
|
addNodeView() {
|
|
2066
|
-
return
|
|
2067
|
+
return w(Ci);
|
|
2067
2068
|
},
|
|
2068
2069
|
parseHTML() {
|
|
2069
2070
|
return [{ tag: "command-component" }];
|
|
@@ -2083,7 +2084,7 @@ var Si = /* @__PURE__ */ i(bi, [["render", xi]]), Ci = (e, t) => [...e.matchAll(
|
|
|
2083
2084
|
},
|
|
2084
2085
|
addInputRules() {
|
|
2085
2086
|
let e = this.options.suggestion?.items({ query: "" }).map((e) => e.command);
|
|
2086
|
-
return [
|
|
2087
|
+
return [Ie({
|
|
2087
2088
|
find: RegExp(`^((?:\\/)(${e.join("|")})) $`),
|
|
2088
2089
|
type: this.type,
|
|
2089
2090
|
getAttributes(e) {
|
|
@@ -2093,8 +2094,8 @@ var Si = /* @__PURE__ */ i(bi, [["render", xi]]), Ci = (e, t) => [...e.matchAll(
|
|
|
2093
2094
|
},
|
|
2094
2095
|
addPasteRules() {
|
|
2095
2096
|
let e = this.options.suggestion?.items({ query: "" }).map((e) => e.command), t = RegExp(`^((?:\\/)(${e.join("|")})) ?$`, "g");
|
|
2096
|
-
return [
|
|
2097
|
-
find: (e) =>
|
|
2097
|
+
return [Le({
|
|
2098
|
+
find: (e) => wi(e, t),
|
|
2098
2099
|
type: this.type,
|
|
2099
2100
|
getAttributes(e) {
|
|
2100
2101
|
return { command: e[0].trim() };
|
|
@@ -2104,20 +2105,20 @@ var Si = /* @__PURE__ */ i(bi, [["render", xi]]), Ci = (e, t) => [...e.matchAll(
|
|
|
2104
2105
|
}).configure({ suggestion: {
|
|
2105
2106
|
char: "/",
|
|
2106
2107
|
pluginKey: new L("slashCommandSuggestion")
|
|
2107
|
-
} }),
|
|
2108
|
+
} }), Ei = 100, Di = {
|
|
2108
2109
|
name: "VariableComponent",
|
|
2109
2110
|
components: {
|
|
2110
2111
|
DtBadge: d,
|
|
2111
2112
|
DtButton: h,
|
|
2112
2113
|
DtPopover: v,
|
|
2113
2114
|
DtInput: b,
|
|
2114
|
-
NodeViewWrapper:
|
|
2115
|
+
NodeViewWrapper: C
|
|
2115
2116
|
},
|
|
2116
|
-
props:
|
|
2117
|
+
props: E,
|
|
2117
2118
|
data() {
|
|
2118
2119
|
return {
|
|
2119
2120
|
i18n: new m(),
|
|
2120
|
-
MAX_VARIABLE_ALT_LENGTH:
|
|
2121
|
+
MAX_VARIABLE_ALT_LENGTH: Ei
|
|
2121
2122
|
};
|
|
2122
2123
|
},
|
|
2123
2124
|
computed: {
|
|
@@ -2152,17 +2153,17 @@ var Si = /* @__PURE__ */ i(bi, [["render", xi]]), Ci = (e, t) => [...e.matchAll(
|
|
|
2152
2153
|
}
|
|
2153
2154
|
}
|
|
2154
2155
|
};
|
|
2155
|
-
function
|
|
2156
|
+
function Oi(e, t, n, r, i, a) {
|
|
2156
2157
|
let o = N("dt-badge"), s = N("dt-button"), c = N("dt-input"), l = N("dt-popover"), u = N("node-view-wrapper");
|
|
2157
|
-
return M(),
|
|
2158
|
-
default: F(() => [a.enableAltText ? (M(),
|
|
2158
|
+
return M(), O(u, { class: "d-d-inline-block" }, {
|
|
2159
|
+
default: F(() => [a.enableAltText ? (M(), O(l, {
|
|
2159
2160
|
key: 0,
|
|
2160
2161
|
padding: "small",
|
|
2161
2162
|
"navigation-type": "arrow-keys",
|
|
2162
2163
|
placement: "top-start",
|
|
2163
2164
|
modal: !1
|
|
2164
2165
|
}, {
|
|
2165
|
-
anchor: F(({ attrs: e }) => [j(s,
|
|
2166
|
+
anchor: F(({ attrs: e }) => [j(s, ue(e, { kind: "unstyled" }), {
|
|
2166
2167
|
default: F(() => [j(o, {
|
|
2167
2168
|
text: a.badgeLabel,
|
|
2168
2169
|
contenteditable: "false"
|
|
@@ -2182,7 +2183,7 @@ function Di(e, t, n, r, i, a) {
|
|
|
2182
2183
|
warn: i.MAX_VARIABLE_ALT_LENGTH,
|
|
2183
2184
|
limitMaxLength: !0
|
|
2184
2185
|
} },
|
|
2185
|
-
onKeyup:
|
|
2186
|
+
onKeyup: be((t) => e(), ["enter"])
|
|
2186
2187
|
}, null, 8, [
|
|
2187
2188
|
"modelValue",
|
|
2188
2189
|
"label",
|
|
@@ -2191,7 +2192,7 @@ function Di(e, t, n, r, i, a) {
|
|
|
2191
2192
|
"onKeyup"
|
|
2192
2193
|
])]),
|
|
2193
2194
|
_: 1
|
|
2194
|
-
})) : (M(),
|
|
2195
|
+
})) : (M(), O(o, {
|
|
2195
2196
|
key: 1,
|
|
2196
2197
|
text: a.badgeLabel,
|
|
2197
2198
|
contenteditable: "false"
|
|
@@ -2199,7 +2200,7 @@ function Di(e, t, n, r, i, a) {
|
|
|
2199
2200
|
_: 1
|
|
2200
2201
|
});
|
|
2201
2202
|
}
|
|
2202
|
-
var
|
|
2203
|
+
var ki = /* @__PURE__ */ i(Di, [["render", Oi]]), Ai = De.create({
|
|
2203
2204
|
name: "variable",
|
|
2204
2205
|
group: "inline",
|
|
2205
2206
|
inline: !0,
|
|
@@ -2212,7 +2213,7 @@ var Oi = /* @__PURE__ */ i(Ei, [["render", Di]]), ki = Ee.create({
|
|
|
2212
2213
|
};
|
|
2213
2214
|
},
|
|
2214
2215
|
addNodeView() {
|
|
2215
|
-
return
|
|
2216
|
+
return w(ki);
|
|
2216
2217
|
},
|
|
2217
2218
|
addAttributes() {
|
|
2218
2219
|
return {
|
|
@@ -2256,7 +2257,7 @@ var Oi = /* @__PURE__ */ i(Ei, [["render", Di]]), ki = Ee.create({
|
|
|
2256
2257
|
}
|
|
2257
2258
|
}) };
|
|
2258
2259
|
}
|
|
2259
|
-
}),
|
|
2260
|
+
}), ji = {
|
|
2260
2261
|
name: "MentionSuggestion",
|
|
2261
2262
|
components: {
|
|
2262
2263
|
DtAvatar: u,
|
|
@@ -2295,10 +2296,10 @@ var Oi = /* @__PURE__ */ i(Ei, [["render", Di]]), ki = Ee.create({
|
|
|
2295
2296
|
return this.item.showDetails;
|
|
2296
2297
|
}
|
|
2297
2298
|
}
|
|
2298
|
-
},
|
|
2299
|
-
function
|
|
2299
|
+
}, Mi = { class: "d-mention-suggestion__name" };
|
|
2300
|
+
function Ni(e, t, n, r, i, a) {
|
|
2300
2301
|
let o = N("dt-avatar"), s = N("dt-text"), c = N("dt-stack");
|
|
2301
|
-
return M(),
|
|
2302
|
+
return M(), O(c, {
|
|
2302
2303
|
direction: "row",
|
|
2303
2304
|
class: "d-mention-suggestion__container",
|
|
2304
2305
|
gap: "100"
|
|
@@ -2320,23 +2321,23 @@ function Mi(e, t, n, r, i, a) {
|
|
|
2320
2321
|
class: "d-mention-suggestion__details-container",
|
|
2321
2322
|
gap: "1"
|
|
2322
2323
|
}, {
|
|
2323
|
-
default: F(() => [
|
|
2324
|
+
default: F(() => [oe("span", Mi, P(a.name), 1), a.showDetails ? (M(), O(c, {
|
|
2324
2325
|
key: 0,
|
|
2325
2326
|
direction: "row",
|
|
2326
2327
|
gap: "50"
|
|
2327
2328
|
}, {
|
|
2328
2329
|
default: F(() => [
|
|
2329
|
-
a.presenceText ? (M(),
|
|
2330
|
+
a.presenceText ? (M(), O(s, {
|
|
2330
2331
|
key: 0,
|
|
2331
2332
|
kind: "label",
|
|
2332
2333
|
size: 200,
|
|
2333
2334
|
strength: "normal",
|
|
2334
|
-
class:
|
|
2335
|
+
class: fe(["d-mention-suggestion__presence", [a.presenceFontColorClass]])
|
|
2335
2336
|
}, {
|
|
2336
2337
|
default: F(() => [A(P(a.presenceText), 1)]),
|
|
2337
2338
|
_: 1
|
|
2338
|
-
}, 8, ["class"])) :
|
|
2339
|
-
a.status && a.presenceText ? (M(),
|
|
2339
|
+
}, 8, ["class"])) : k("", !0),
|
|
2340
|
+
a.status && a.presenceText ? (M(), O(s, {
|
|
2340
2341
|
key: 1,
|
|
2341
2342
|
kind: "label",
|
|
2342
2343
|
size: 200,
|
|
@@ -2346,8 +2347,8 @@ function Mi(e, t, n, r, i, a) {
|
|
|
2346
2347
|
}, {
|
|
2347
2348
|
default: F(() => [...t[0] || (t[0] = [A(" • ", -1)])]),
|
|
2348
2349
|
_: 1
|
|
2349
|
-
})) :
|
|
2350
|
-
a.status ? (M(),
|
|
2350
|
+
})) : k("", !0),
|
|
2351
|
+
a.status ? (M(), O(s, {
|
|
2351
2352
|
key: 2,
|
|
2352
2353
|
kind: "label",
|
|
2353
2354
|
size: 200,
|
|
@@ -2357,10 +2358,10 @@ function Mi(e, t, n, r, i, a) {
|
|
|
2357
2358
|
}, {
|
|
2358
2359
|
default: F(() => [A(P(a.status), 1)]),
|
|
2359
2360
|
_: 1
|
|
2360
|
-
})) :
|
|
2361
|
+
})) : k("", !0)
|
|
2361
2362
|
]),
|
|
2362
2363
|
_: 1
|
|
2363
|
-
})) :
|
|
2364
|
+
})) : k("", !0)]),
|
|
2364
2365
|
_: 1
|
|
2365
2366
|
})]),
|
|
2366
2367
|
_: 1
|
|
@@ -2368,15 +2369,15 @@ function Mi(e, t, n, r, i, a) {
|
|
|
2368
2369
|
}
|
|
2369
2370
|
//#endregion
|
|
2370
2371
|
//#region components/RichTextEditor/Extensions/Mentions/Suggestion.js
|
|
2371
|
-
var
|
|
2372
|
+
var Pi = {
|
|
2372
2373
|
allowSpaces: !0,
|
|
2373
|
-
render:
|
|
2374
|
-
},
|
|
2374
|
+
render: Br(/* @__PURE__ */ i(ji, [["render", Ni]]), "mention")
|
|
2375
|
+
}, Fi = {
|
|
2375
2376
|
name: "ChannelSuggestion",
|
|
2376
2377
|
components: {
|
|
2377
2378
|
DtStack: _,
|
|
2378
|
-
DtIconHash:
|
|
2379
|
-
DtIconLock:
|
|
2379
|
+
DtIconHash: gt,
|
|
2380
|
+
DtIconLock: _t
|
|
2380
2381
|
},
|
|
2381
2382
|
props: { item: {
|
|
2382
2383
|
type: Object,
|
|
@@ -2386,28 +2387,28 @@ var Ni = {
|
|
|
2386
2387
|
return this.item.name;
|
|
2387
2388
|
} }
|
|
2388
2389
|
};
|
|
2389
|
-
function
|
|
2390
|
+
function Ii(e, t, n, r, i, a) {
|
|
2390
2391
|
let o = N("dt-icon-hash"), s = N("dt-icon-lock"), c = N("dt-stack");
|
|
2391
|
-
return M(),
|
|
2392
|
+
return M(), O(c, {
|
|
2392
2393
|
direction: "row",
|
|
2393
2394
|
gap: "100"
|
|
2394
2395
|
}, {
|
|
2395
|
-
default: F(() => [n.item.locked ? (M(),
|
|
2396
|
+
default: F(() => [n.item.locked ? (M(), O(s, {
|
|
2396
2397
|
key: 1,
|
|
2397
2398
|
size: "300"
|
|
2398
|
-
})) : (M(),
|
|
2399
|
+
})) : (M(), O(o, {
|
|
2399
2400
|
key: 0,
|
|
2400
2401
|
size: "300"
|
|
2401
|
-
})),
|
|
2402
|
+
})), oe("span", null, P(a.name), 1)]),
|
|
2402
2403
|
_: 1
|
|
2403
2404
|
});
|
|
2404
2405
|
}
|
|
2405
2406
|
//#endregion
|
|
2406
2407
|
//#region components/RichTextEditor/Extensions/Channels/Suggestion.js
|
|
2407
|
-
var
|
|
2408
|
+
var Li = {
|
|
2408
2409
|
allowSpaces: !0,
|
|
2409
|
-
render:
|
|
2410
|
-
},
|
|
2410
|
+
render: Br(/* @__PURE__ */ i(Fi, [["render", Ii]]), "channel")
|
|
2411
|
+
}, Ri = {
|
|
2411
2412
|
name: "SlashCommandSuggestion",
|
|
2412
2413
|
components: { DtText: f },
|
|
2413
2414
|
props: { item: {
|
|
@@ -2425,8 +2426,8 @@ var Ii = {
|
|
|
2425
2426
|
return this.item.parametersExample;
|
|
2426
2427
|
}
|
|
2427
2428
|
}
|
|
2428
|
-
},
|
|
2429
|
-
function
|
|
2429
|
+
}, zi = { key: 0 };
|
|
2430
|
+
function Bi(e, t, n, r, i, a) {
|
|
2430
2431
|
let o = N("dt-text");
|
|
2431
2432
|
return M(), ae("div", null, [j(o, {
|
|
2432
2433
|
kind: "body",
|
|
@@ -2434,7 +2435,7 @@ function zi(e, t, n, r, i, a) {
|
|
|
2434
2435
|
density: 300,
|
|
2435
2436
|
as: "div"
|
|
2436
2437
|
}, {
|
|
2437
|
-
default: F(() => [
|
|
2438
|
+
default: F(() => [oe("span", null, "/" + P(a.command), 1), a.parametersExample ? (M(), ae("span", zi, P(a.parametersExample), 1)) : k("", !0)]),
|
|
2438
2439
|
_: 1
|
|
2439
2440
|
}), j(o, {
|
|
2440
2441
|
kind: "body",
|
|
@@ -2448,15 +2449,15 @@ function zi(e, t, n, r, i, a) {
|
|
|
2448
2449
|
}
|
|
2449
2450
|
//#endregion
|
|
2450
2451
|
//#region components/RichTextEditor/Extensions/SlashCommand/Suggestion.js
|
|
2451
|
-
var
|
|
2452
|
+
var Vi = {
|
|
2452
2453
|
allowSpaces: !0,
|
|
2453
2454
|
startOfLine: !0,
|
|
2454
|
-
render:
|
|
2455
|
-
},
|
|
2455
|
+
render: Br(/* @__PURE__ */ i(Ri, [["render", Bi]]), "slash-command")
|
|
2456
|
+
}, Hi = {
|
|
2456
2457
|
name: "DtRichTextEditor",
|
|
2457
2458
|
components: {
|
|
2458
|
-
EditorContent:
|
|
2459
|
-
BubbleMenu:
|
|
2459
|
+
EditorContent: S,
|
|
2460
|
+
BubbleMenu: lr,
|
|
2460
2461
|
DtButton: h,
|
|
2461
2462
|
DtStack: _
|
|
2462
2463
|
},
|
|
@@ -2666,15 +2667,15 @@ var Bi = {
|
|
|
2666
2667
|
},
|
|
2667
2668
|
extensions() {
|
|
2668
2669
|
let e = [
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2670
|
+
Ge,
|
|
2671
|
+
at,
|
|
2672
|
+
Je,
|
|
2673
|
+
Ye
|
|
2673
2674
|
];
|
|
2674
|
-
e.push(this.useDivTags ?
|
|
2675
|
+
e.push(this.useDivTags ? fi : Xe), this.allowBold && e.push(Ze), this.allowBlockquote && e.push(He), this.allowBulletList && (e.push(Qe), e.push($e.extend({ renderText({ node: e }) {
|
|
2675
2676
|
return e.textContent;
|
|
2676
|
-
} })), e.push(
|
|
2677
|
-
let t = this, n =
|
|
2677
|
+
} })), e.push(et)), this.allowItalic && e.push(tt), this.allowStrike && e.push(rt), this.allowUnderline && e.push(it), this.placeholder && e.push(qe.configure({ placeholder: this.placeholder }));
|
|
2678
|
+
let t = this, n = we.create({ addKeyboardShortcuts() {
|
|
2678
2679
|
return {
|
|
2679
2680
|
"Shift-Enter": ({ editor: e }) => t.allowLineBreaks ? !1 : (e.commands.first(({ commands: e }) => [
|
|
2680
2681
|
() => e.newlineInCode(),
|
|
@@ -2686,7 +2687,7 @@ var Bi = {
|
|
|
2686
2687
|
Enter: () => t.allowLineBreaks ? !1 : (t.$emit("enter"), !0)
|
|
2687
2688
|
};
|
|
2688
2689
|
} });
|
|
2689
|
-
if (e.push(n), this.link && e.push(
|
|
2690
|
+
if (e.push(n), this.link && e.push(nt.extend({
|
|
2690
2691
|
inclusive: !1,
|
|
2691
2692
|
addKeyboardShortcuts() {
|
|
2692
2693
|
return { "Mod-k": () => (t.$emit("edit-link"), !0) };
|
|
@@ -2695,34 +2696,34 @@ var Bi = {
|
|
|
2695
2696
|
HTMLAttributes: { class: "d-link d-wb-break-all" },
|
|
2696
2697
|
openOnClick: !1,
|
|
2697
2698
|
autolink: !this.customLink,
|
|
2698
|
-
protocols:
|
|
2699
|
-
})), this.customLink && e.push(this.getExtension(
|
|
2699
|
+
protocols: D
|
|
2700
|
+
})), this.customLink && e.push(this.getExtension(ci, this.customLink)), this.linkPhoneNumbers !== null && e.push(li), this.mentionSuggestion) {
|
|
2700
2701
|
let t = {
|
|
2701
2702
|
...this.mentionSuggestion,
|
|
2702
|
-
...
|
|
2703
|
+
...Pi
|
|
2703
2704
|
};
|
|
2704
|
-
e.push(
|
|
2705
|
+
e.push(gi.configure({ suggestion: t }));
|
|
2705
2706
|
}
|
|
2706
2707
|
if (this.channelSuggestion) {
|
|
2707
2708
|
let t = {
|
|
2708
2709
|
...this.channelSuggestion,
|
|
2709
|
-
...
|
|
2710
|
+
...Li
|
|
2710
2711
|
};
|
|
2711
|
-
e.push(
|
|
2712
|
+
e.push(bi.configure({ suggestion: t }));
|
|
2712
2713
|
}
|
|
2713
2714
|
if (this.slashCommandSuggestion) {
|
|
2714
2715
|
let t = {
|
|
2715
2716
|
...this.slashCommandSuggestion,
|
|
2716
|
-
...
|
|
2717
|
+
...Vi
|
|
2717
2718
|
};
|
|
2718
|
-
e.push(
|
|
2719
|
+
e.push(Ti.configure({
|
|
2719
2720
|
suggestion: t,
|
|
2720
2721
|
onSelectedCommand: (e) => {
|
|
2721
2722
|
this.$emit("selected-command", e);
|
|
2722
2723
|
}
|
|
2723
2724
|
}));
|
|
2724
2725
|
}
|
|
2725
|
-
return this.allowVariable && e.push(
|
|
2726
|
+
return this.allowVariable && e.push(Ai.configure({ variableItems: this.variableItems })), e.push(Zr), this.allowTextAlign && e.push(ot.configure({ types: ["paragraph"] })), this.allowCode && e.push(We), this.allowCodeblock && e.push(Ue.extend({
|
|
2726
2727
|
renderText({ node: e, pos: t, range: n }) {
|
|
2727
2728
|
let r = n?.from ?? 0, i = n?.to ?? t + e.nodeSize;
|
|
2728
2729
|
if (r <= t && i >= t + e.nodeSize) return `\`\`\`\n${e.textContent}\n\`\`\``;
|
|
@@ -2749,17 +2750,17 @@ var Bi = {
|
|
|
2749
2750
|
}
|
|
2750
2751
|
};
|
|
2751
2752
|
}
|
|
2752
|
-
}).configure({ HTMLAttributes: { class: "d-rich-text-editor__code-block" } })), this.allowInlineImages && e.push(
|
|
2753
|
+
}).configure({ HTMLAttributes: { class: "d-rich-text-editor__code-block" } })), this.allowInlineImages && e.push(ui.configure({ resize: {
|
|
2753
2754
|
enabled: this.allowImageResize,
|
|
2754
2755
|
alwaysPreserveAspectRatio: !0
|
|
2755
|
-
} })), (this.allowFontFamily || this.allowFontColor || this.allowFontSize || this.allowBackgroundColor || this.allowLineHeight) && (e.push(
|
|
2756
|
+
} })), (this.allowFontFamily || this.allowFontColor || this.allowFontSize || this.allowBackgroundColor || this.allowLineHeight) && (e.push(ft.configure({
|
|
2756
2757
|
textStyle: !1,
|
|
2757
2758
|
color: this.allowFontColor,
|
|
2758
2759
|
backgroundColor: this.allowBackgroundColor,
|
|
2759
2760
|
fontFamily: this.allowFontFamily,
|
|
2760
2761
|
fontSize: this.allowFontSize,
|
|
2761
2762
|
lineHeight: this.allowLineHeight
|
|
2762
|
-
})), e.push(
|
|
2763
|
+
})), e.push(yr)), this.additionalExtensions.length && e.push(...this.additionalExtensions), this.allowTables && e.push(mr.configure({ resizable: !0 }), hr, vr, _r, Ke), e;
|
|
2763
2764
|
},
|
|
2764
2765
|
inputAttrs() {
|
|
2765
2766
|
let e = {
|
|
@@ -2859,7 +2860,10 @@ var Bi = {
|
|
|
2859
2860
|
let e = this.editor.getAttributes("link").href;
|
|
2860
2861
|
window.open(e, "_blank");
|
|
2861
2862
|
},
|
|
2862
|
-
|
|
2863
|
+
forceLinkifyPendingText() {
|
|
2864
|
+
!this.editor || !this.link || this.customLink || ee(this.editor);
|
|
2865
|
+
},
|
|
2866
|
+
setLink(e, t, n, r = D, i) {
|
|
2863
2867
|
if (!e) {
|
|
2864
2868
|
this.removeLink();
|
|
2865
2869
|
return;
|
|
@@ -2877,9 +2881,9 @@ var Bi = {
|
|
|
2877
2881
|
processValue(e, t = !0) {
|
|
2878
2882
|
if (!this.editor) return;
|
|
2879
2883
|
let n = this.getOutput();
|
|
2880
|
-
if (!(t &&
|
|
2884
|
+
if (!(t && vt(e, n))) {
|
|
2881
2885
|
if (typeof e == "string" && this.outputFormat === "text") {
|
|
2882
|
-
let t = RegExp(`(${
|
|
2886
|
+
let t = RegExp(`(${Ce})`, "g");
|
|
2883
2887
|
e = e?.replace(t, "<emoji-component code=\"$1\"></emoji-component>");
|
|
2884
2888
|
}
|
|
2885
2889
|
this.editor.commands.setContent(e, {
|
|
@@ -2962,7 +2966,7 @@ var Bi = {
|
|
|
2962
2966
|
this.$emit("html-input", n);
|
|
2963
2967
|
let r = this.editor.getText({ blockSeparator: "\n" });
|
|
2964
2968
|
this.$emit("text-input", r);
|
|
2965
|
-
let i =
|
|
2969
|
+
let i = re(t, this.extensions);
|
|
2966
2970
|
this.$emit("markdown-input", i);
|
|
2967
2971
|
},
|
|
2968
2972
|
addEditorListeners() {
|
|
@@ -2994,7 +2998,7 @@ var Bi = {
|
|
|
2994
2998
|
switch (this.outputFormat) {
|
|
2995
2999
|
case "json": return this.editor.getJSON();
|
|
2996
3000
|
case "html": return this.editor.getHTML();
|
|
2997
|
-
case "markdown": return
|
|
3001
|
+
case "markdown": return re(this.editor.getJSON(), this.extensions);
|
|
2998
3002
|
default: return this.editor.getText({ blockSeparator: "\n" });
|
|
2999
3003
|
}
|
|
3000
3004
|
},
|
|
@@ -3012,10 +3016,10 @@ var Bi = {
|
|
|
3012
3016
|
this.editor.commands.focus();
|
|
3013
3017
|
}
|
|
3014
3018
|
}
|
|
3015
|
-
},
|
|
3016
|
-
function
|
|
3019
|
+
}, Ui = { class: "d-popover__dialog" };
|
|
3020
|
+
function Wi(e, t, n, r, i, a) {
|
|
3017
3021
|
let o = N("dt-button"), s = N("dt-stack"), c = N("bubble-menu"), l = N("editor-content");
|
|
3018
|
-
return M(), ae("div", null, [i.editor && n.link ? (M(),
|
|
3022
|
+
return M(), ae("div", null, [i.editor && n.link ? (M(), O(c, {
|
|
3019
3023
|
key: 0,
|
|
3020
3024
|
editor: i.editor,
|
|
3021
3025
|
"should-show": a.bubbleMenuShouldShow,
|
|
@@ -3023,7 +3027,7 @@ function Ui(e, t, n, r, i, a) {
|
|
|
3023
3027
|
"append-to": i.appendTo,
|
|
3024
3028
|
style: { visibility: "visible" }
|
|
3025
3029
|
}, {
|
|
3026
|
-
default: F(() => [
|
|
3030
|
+
default: F(() => [oe("div", Ui, [j(s, {
|
|
3027
3031
|
direction: "row",
|
|
3028
3032
|
class: "d-rich-text-editor-bubble-menu__button-stack",
|
|
3029
3033
|
gap: "0"
|
|
@@ -3062,15 +3066,15 @@ function Ui(e, t, n, r, i, a) {
|
|
|
3062
3066
|
"should-show",
|
|
3063
3067
|
"options",
|
|
3064
3068
|
"append-to"
|
|
3065
|
-
])) :
|
|
3069
|
+
])) : k("", !0), j(l, ue({
|
|
3066
3070
|
ref: "editor",
|
|
3067
3071
|
editor: i.editor,
|
|
3068
3072
|
class: "d-rich-text-editor",
|
|
3069
3073
|
"data-qa": "dt-rich-text-editor"
|
|
3070
3074
|
}, a.attrs), null, 16, ["editor"])]);
|
|
3071
3075
|
}
|
|
3072
|
-
var
|
|
3076
|
+
var Gi = /* @__PURE__ */ i(Hi, [["render", Wi]]);
|
|
3073
3077
|
//#endregion
|
|
3074
|
-
export {
|
|
3078
|
+
export { Gi as t };
|
|
3075
3079
|
|
|
3076
|
-
//# sourceMappingURL=RichTextEditor-
|
|
3080
|
+
//# sourceMappingURL=RichTextEditor-Cz2VXb7-.js.map
|