@projectfive/v-richtext-vue2 0.0.0-stage → 3.0.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.
Files changed (106) hide show
  1. package/Readme.md +69 -0
  2. package/dist/style.css +1 -0
  3. package/dist/types/richtext-vue/src/components/input-richtext/CharacterCount.vue.d.ts +19 -0
  4. package/dist/types/richtext-vue/src/components/input-richtext/InputRichtext.vue.d.ts +135 -0
  5. package/dist/types/richtext-vue/src/components/input-richtext/MediaControls.vue.d.ts +3 -0
  6. package/dist/types/richtext-vue/src/components/input-richtext/MentionMenu.vue.d.ts +21 -0
  7. package/dist/types/richtext-vue/src/components/input-richtext/TableMenu.vue.d.ts +19 -0
  8. package/dist/types/richtext-vue/src/components/input-richtext/TableOfContents.vue.d.ts +3 -0
  9. package/dist/types/richtext-vue/src/components/input-richtext/TemplatesMenu.vue.d.ts +18 -0
  10. package/dist/types/richtext-vue/src/components/input-richtext/UploadPopover.vue.d.ts +24 -0
  11. package/dist/types/richtext-vue/src/components/input-richtext/VisibilityConditionsMenu.vue.d.ts +20 -0
  12. package/dist/types/richtext-vue/src/components/input-richtext/YoutubePopover.vue.d.ts +4 -0
  13. package/dist/types/richtext-vue/src/components/input-richtext/extensions/file-drop.d.ts +22 -0
  14. package/dist/types/richtext-vue/src/components/input-richtext/extensions/file-node.d.ts +18 -0
  15. package/dist/types/richtext-vue/src/components/input-richtext/extensions/heading-id.d.ts +14 -0
  16. package/dist/types/richtext-vue/src/components/input-richtext/extensions/index.d.ts +36 -0
  17. package/dist/types/richtext-vue/src/components/input-richtext/extensions/link.d.ts +8 -0
  18. package/dist/types/richtext-vue/src/components/input-richtext/extensions/media-attributes.d.ts +8 -0
  19. package/dist/types/richtext-vue/src/components/input-richtext/extensions/mention-menu.d.ts +62 -0
  20. package/dist/types/richtext-vue/src/components/input-richtext/extensions/mention.d.ts +16 -0
  21. package/dist/types/richtext-vue/src/components/input-richtext/extensions/previews.d.ts +8 -0
  22. package/dist/types/richtext-vue/src/components/input-richtext/extensions/task-item.d.ts +8 -0
  23. package/dist/types/richtext-vue/src/components/input-richtext/extensions/visibility-conditions.d.ts +32 -0
  24. package/dist/types/richtext-vue/src/components/input-richtext/liquid.d.ts +11 -0
  25. package/dist/types/richtext-vue/src/components/input-richtext/types.d.ts +122 -0
  26. package/dist/types/richtext-vue/src/components/tiptap-icons/Icon.vue.d.ts +15 -0
  27. package/dist/types/richtext-vue/src/components/tiptap-icons/index.d.ts +40 -0
  28. package/dist/types/richtext-vue/src/components/tiptap-ui/CommandButton.vue.d.ts +36 -0
  29. package/dist/types/richtext-vue/src/components/tiptap-ui/blockquote-button/index.d.ts +1 -0
  30. package/dist/types/richtext-vue/src/components/tiptap-ui/blockquote-button/use-blockquote.d.ts +12 -0
  31. package/dist/types/richtext-vue/src/components/tiptap-ui/code-block-button/index.d.ts +1 -0
  32. package/dist/types/richtext-vue/src/components/tiptap-ui/code-block-button/use-code-block.d.ts +12 -0
  33. package/dist/types/richtext-vue/src/components/tiptap-ui/color-highlight-button/index.d.ts +1 -0
  34. package/dist/types/richtext-vue/src/components/tiptap-ui/color-highlight-button/use-color-highlight.d.ts +125 -0
  35. package/dist/types/richtext-vue/src/components/tiptap-ui/color-highlight-popover/ColorHighlightPopover.vue.d.ts +3 -0
  36. package/dist/types/richtext-vue/src/components/tiptap-ui/color-highlight-popover/ColorHighlightPopoverButton.vue.d.ts +17 -0
  37. package/dist/types/richtext-vue/src/components/tiptap-ui/color-highlight-popover/ColorHighlightPopoverContent.vue.d.ts +183 -0
  38. package/dist/types/richtext-vue/src/components/tiptap-ui/color-highlight-popover/index.d.ts +3 -0
  39. package/dist/types/richtext-vue/src/components/tiptap-ui/command.d.ts +26 -0
  40. package/dist/types/richtext-vue/src/components/tiptap-ui/heading-button/index.d.ts +1 -0
  41. package/dist/types/richtext-vue/src/components/tiptap-ui/heading-button/use-heading.d.ts +25 -0
  42. package/dist/types/richtext-vue/src/components/tiptap-ui/heading-dropdown-menu/HeadingDropdownMenu.vue.d.ts +32 -0
  43. package/dist/types/richtext-vue/src/components/tiptap-ui/heading-dropdown-menu/index.d.ts +2 -0
  44. package/dist/types/richtext-vue/src/components/tiptap-ui/heading-dropdown-menu/use-heading-dropdown-menu.d.ts +6 -0
  45. package/dist/types/richtext-vue/src/components/tiptap-ui/link-popover/LinkButton.vue.d.ts +17 -0
  46. package/dist/types/richtext-vue/src/components/tiptap-ui/link-popover/LinkContent.vue.d.ts +18 -0
  47. package/dist/types/richtext-vue/src/components/tiptap-ui/link-popover/LinkMain.vue.d.ts +28 -0
  48. package/dist/types/richtext-vue/src/components/tiptap-ui/link-popover/LinkPopover.vue.d.ts +62 -0
  49. package/dist/types/richtext-vue/src/components/tiptap-ui/link-popover/index.d.ts +4 -0
  50. package/dist/types/richtext-vue/src/components/tiptap-ui/link-popover/use-link-popover.d.ts +96 -0
  51. package/dist/types/richtext-vue/src/components/tiptap-ui/list-button/index.d.ts +1 -0
  52. package/dist/types/richtext-vue/src/components/tiptap-ui/list-button/use-list.d.ts +22 -0
  53. package/dist/types/richtext-vue/src/components/tiptap-ui/list-dropdown-menu/ListDropdownMenu.vue.d.ts +32 -0
  54. package/dist/types/richtext-vue/src/components/tiptap-ui/list-dropdown-menu/index.d.ts +2 -0
  55. package/dist/types/richtext-vue/src/components/tiptap-ui/list-dropdown-menu/use-list-dropdown-menu.d.ts +15 -0
  56. package/dist/types/richtext-vue/src/components/tiptap-ui/mark-button/index.d.ts +1 -0
  57. package/dist/types/richtext-vue/src/components/tiptap-ui/mark-button/use-mark.d.ts +29 -0
  58. package/dist/types/richtext-vue/src/components/tiptap-ui/text-align-button/index.d.ts +1 -0
  59. package/dist/types/richtext-vue/src/components/tiptap-ui/text-align-button/use-text-align.d.ts +27 -0
  60. package/dist/types/richtext-vue/src/components/tiptap-ui/undo-redo-button/index.d.ts +1 -0
  61. package/dist/types/richtext-vue/src/components/tiptap-ui/undo-redo-button/use-undo-redo.d.ts +17 -0
  62. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/button/Button.vue.d.ts +53 -0
  63. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/button/index.d.ts +1 -0
  64. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/button-group/ButtonGroup.vue.d.ts +43 -0
  65. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/button-group/index.d.ts +1 -0
  66. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/card/Card.vue.d.ts +16 -0
  67. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/card/CardBody.vue.d.ts +15 -0
  68. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/card/CardItemGroup.vue.d.ts +42 -0
  69. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/card/index.d.ts +3 -0
  70. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/dropdown-menu/DropdownMenu.vue.d.ts +66 -0
  71. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/dropdown-menu/index.d.ts +1 -0
  72. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/input/Input.vue.d.ts +20 -0
  73. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/input/index.d.ts +1 -0
  74. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/popover/Popover.vue.d.ts +65 -0
  75. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/popover/index.d.ts +1 -0
  76. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/separator/Separator.vue.d.ts +35 -0
  77. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/separator/index.d.ts +1 -0
  78. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/spacer/Spacer.vue.d.ts +31 -0
  79. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/spacer/index.d.ts +1 -0
  80. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/toolbar/Toolbar.vue.d.ts +45 -0
  81. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/toolbar/ToolbarGroup.vue.d.ts +15 -0
  82. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/toolbar/ToolbarSeparator.vue.d.ts +3 -0
  83. package/dist/types/richtext-vue/src/components/tiptap-ui-primitive/toolbar/index.d.ts +3 -0
  84. package/dist/types/richtext-vue/src/composables/use-editor-state.d.ts +32 -0
  85. package/dist/types/richtext-vue/src/composables/use-is-breakpoint.d.ts +10 -0
  86. package/dist/types/richtext-vue/src/composables/use-menu-navigation.d.ts +55 -0
  87. package/dist/types/richtext-vue/src/composables/use-popover.d.ts +45 -0
  88. package/dist/types/richtext-vue/src/composables/use-tiptap-editor.d.ts +16 -0
  89. package/dist/types/richtext-vue/src/composables/use-top-layer.d.ts +9 -0
  90. package/dist/types/richtext-vue/src/composables/use-translations.d.ts +7 -0
  91. package/dist/types/richtext-vue/src/composables/utils.d.ts +21 -0
  92. package/dist/types/richtext-vue/src/index.d.ts +14 -0
  93. package/dist/types/richtext-vue/src/lib/pointer.d.ts +6 -0
  94. package/dist/types/richtext-vue/src/lib/resize-image.d.ts +6 -0
  95. package/dist/types/richtext-vue/src/lib/shortcuts.d.ts +24 -0
  96. package/dist/types/richtext-vue/src/lib/throttle.d.ts +10 -0
  97. package/dist/types/richtext-vue/src/lib/tiptap-utils.d.ts +109 -0
  98. package/dist/types/richtext-vue/src/locales/en.d.ts +140 -0
  99. package/dist/types/richtext-vue/src/locales/index.d.ts +5 -0
  100. package/dist/types/richtext-vue/src/locales/nl.d.ts +2 -0
  101. package/dist/types/richtext-vue2/src/components/tiptap-ui-primitive/portal/Portal.vue.d.ts +15 -0
  102. package/dist/types/richtext-vue2/src/lib/tiptap-vue.d.ts +9 -0
  103. package/dist/v-richtext.js +3318 -0
  104. package/dist/v-richtext.js.map +1 -0
  105. package/package.json +64 -6
  106. package/README.md +0 -3
@@ -0,0 +1,3318 @@
1
+ import { shallowRef as fe, onMounted as G, onBeforeUnmount as q, defineComponent as b, computed as L, provide as lt, inject as ct, isRef as Jt, ref as g, watch as x, nextTick as ee, getCurrentInstance as Xt, reactive as Qt, watchEffect as en } from "vue";
2
+ import { Editor as tn, EditorContent as nn } from "@tiptap/vue-2";
3
+ import { NodeSelection as P, TextSelection as F, AllSelection as on, Plugin as Se, PluginKey as me } from "@tiptap/pm/state";
4
+ import { Node as ut, mergeAttributes as dt, Extension as pt } from "@tiptap/core";
5
+ import { DecorationSet as te, Decoration as de } from "@tiptap/pm/view";
6
+ import { StarterKit as rn } from "@tiptap/starter-kit";
7
+ import { Image as sn } from "@tiptap/extension-image";
8
+ import { TaskItem as an, TaskList as ln } from "@tiptap/extension-list";
9
+ import { TextAlign as cn } from "@tiptap/extension-text-align";
10
+ import { Typography as un } from "@tiptap/extension-typography";
11
+ import { Highlight as dn } from "@tiptap/extension-highlight";
12
+ import { Subscript as pn } from "@tiptap/extension-subscript";
13
+ import { Superscript as fn } from "@tiptap/extension-superscript";
14
+ import { Selection as mn, Placeholder as Cn, CharacterCount as hn } from "@tiptap/extensions";
15
+ import vn from "@tiptap/extension-youtube";
16
+ import { TableKit as _n } from "@tiptap/extension-table";
17
+ import { Mention as gn } from "@tiptap/extension-mention";
18
+ import { DOMSerializer as bn } from "@tiptap/pm/model";
19
+ import { Link as yn } from "@tiptap/extension-link";
20
+ function kn(n = {}) {
21
+ const t = fe();
22
+ return G(() => {
23
+ t.value = new tn(n);
24
+ }), q(() => {
25
+ t.value?.destroy();
26
+ }), t;
27
+ }
28
+ function wn(n, t) {
29
+ let o = null, e = !1;
30
+ const r = () => {
31
+ e = !1, n();
32
+ }, s = () => {
33
+ if (o) {
34
+ e = !0;
35
+ return;
36
+ }
37
+ r(), o = setTimeout(function i() {
38
+ e ? (r(), o = setTimeout(i, t)) : o = null;
39
+ }, t);
40
+ };
41
+ return s.flush = () => {
42
+ e && r();
43
+ }, s.cancel = () => {
44
+ e = !1, o && clearTimeout(o), o = null;
45
+ }, s;
46
+ }
47
+ const Ln = ["image/jpeg", "image/png", "image/webp"];
48
+ async function xn(n, t) {
49
+ if (!t || !Ln.includes(n.type)) return n;
50
+ let o;
51
+ try {
52
+ o = await createImageBitmap(n);
53
+ } catch {
54
+ return n;
55
+ }
56
+ try {
57
+ if (o.width <= t) return n;
58
+ const e = t, r = Math.round(o.height * t / o.width), s = document.createElement("canvas");
59
+ s.width = e, s.height = r;
60
+ const i = s.getContext("2d");
61
+ if (!i) return n;
62
+ i.imageSmoothingQuality = "high", i.drawImage(o, 0, 0, e, r);
63
+ const l = await new Promise(
64
+ (a) => s.toBlob(a, n.type, 0.9)
65
+ );
66
+ return l ? new File([l], n.name, { type: n.type, lastModified: n.lastModified }) : n;
67
+ } finally {
68
+ o.close();
69
+ }
70
+ }
71
+ let He = !1;
72
+ if (typeof document < "u") {
73
+ const n = () => He = !1;
74
+ document.addEventListener("pointerdown", () => He = !0, !0), document.addEventListener("pointerup", n, !0), document.addEventListener("pointercancel", n, !0);
75
+ }
76
+ const Tn = () => He;
77
+ function ft(n) {
78
+ const t = () => {
79
+ document.removeEventListener("pointerup", t, !0), document.removeEventListener("pointercancel", t, !0), setTimeout(n);
80
+ };
81
+ document.addEventListener("pointerup", t, !0), document.addEventListener("pointercancel", t, !0);
82
+ }
83
+ const We = 5 * 1024 * 1024, In = {
84
+ mod: "⌘",
85
+ command: "⌘",
86
+ meta: "⌘",
87
+ ctrl: "⌃",
88
+ control: "⌃",
89
+ alt: "⌥",
90
+ option: "⌥",
91
+ shift: "⇧",
92
+ backspace: "Del",
93
+ delete: "⌦",
94
+ enter: "⏎",
95
+ escape: "⎋",
96
+ capslock: "⇪"
97
+ };
98
+ function pe() {
99
+ return typeof navigator < "u" && navigator.platform.toLowerCase().includes("mac");
100
+ }
101
+ const Hn = (n, t, o = !0) => {
102
+ if (t) {
103
+ const e = n.toLowerCase();
104
+ return In[e] || (o ? n.toUpperCase() : n);
105
+ }
106
+ return n.toLowerCase() === "mod" ? "Ctrl" : o ? n.charAt(0).toUpperCase() + n.slice(1) : n;
107
+ }, Mn = (n) => {
108
+ const { shortcutKeys: t, delimiter: o = "+", capitalize: e = !0 } = n;
109
+ return t ? t.split(o).map((r) => r.trim()).map((r) => Hn(r, pe(), e)) : [];
110
+ }, $e = (n, t) => t?.schema ? t.schema.spec.marks.get(n) !== void 0 : !1, Ce = (n, t) => t?.schema ? t.schema.spec.nodes.get(n) !== void 0 : !1;
111
+ function re(n) {
112
+ return typeof n == "number" && n >= 0;
113
+ }
114
+ const Je = /* @__PURE__ */ new Set();
115
+ function An(n, t) {
116
+ if (!n || n.isDestroyed) return !1;
117
+ const o = Array.isArray(t) ? t : [t], e = n.extensionManager?.extensions;
118
+ if (!e) return !1;
119
+ const r = o.some(
120
+ (s) => e.some((i) => i.name === s)
121
+ );
122
+ if (!r) {
123
+ const s = o.join(", ");
124
+ Je.has(s) || (Je.add(s), console.warn(
125
+ `None of the extensions [${s}] were found in the editor schema. Ensure they are included in the editor configuration.`
126
+ ));
127
+ }
128
+ return r;
129
+ }
130
+ function Sn(n, t) {
131
+ try {
132
+ const o = n.state.doc.nodeAt(t);
133
+ return o || (console.warn(`No node found at position ${t}`), null);
134
+ } catch (o) {
135
+ return console.error(`Error getting node at position ${t}:`, o), null;
136
+ }
137
+ }
138
+ function he(n) {
139
+ const { editor: t, node: o, nodePos: e } = n;
140
+ if (!t || !t.state?.doc) return null;
141
+ const r = o != null, s = re(e);
142
+ if (!r && !s)
143
+ return null;
144
+ if (r) {
145
+ let i = -1, l = null;
146
+ if (t.state.doc.descendants((a, u) => a === o ? (i = u, l = a, !1) : !0), i !== -1 && l !== null)
147
+ return { pos: i, node: l };
148
+ }
149
+ if (s) {
150
+ const i = Sn(t, e);
151
+ if (i)
152
+ return { pos: e, node: i };
153
+ }
154
+ return null;
155
+ }
156
+ function N(n, t = [], o = !1) {
157
+ if (!n || !n.state.selection) return !1;
158
+ const { selection: e } = n.state;
159
+ if (e.empty) return !1;
160
+ if (e instanceof P) {
161
+ const r = e.node;
162
+ return r ? t.includes(r.type.name) : !1;
163
+ }
164
+ if (o) {
165
+ const { $from: r } = e;
166
+ for (let s = r.depth; s > 0; s--) {
167
+ const i = r.node(s);
168
+ if (t.includes(i.type.name))
169
+ return !0;
170
+ }
171
+ }
172
+ return !1;
173
+ }
174
+ function K(n, t = []) {
175
+ if (!n || t.length === 0) return !1;
176
+ const { state: o } = n, { selection: e } = o, r = new Set(t);
177
+ if (e instanceof P) {
178
+ const s = e.node?.type?.name;
179
+ return !!s && r.has(s);
180
+ }
181
+ if (e instanceof F || e instanceof on) {
182
+ let s = !0;
183
+ return o.doc.nodesBetween(e.from, e.to, (i) => i.isTextblock && !r.has(i.type.name) ? (s = !1, !1) : s), s;
184
+ }
185
+ return !1;
186
+ }
187
+ const $n = (
188
+ // eslint-disable-next-line no-control-regex
189
+ /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
190
+ );
191
+ function Bn(n, t) {
192
+ const o = [
193
+ "http",
194
+ "https",
195
+ "ftp",
196
+ "ftps",
197
+ "mailto",
198
+ "tel",
199
+ "callto",
200
+ "sms",
201
+ "cid",
202
+ "xmpp"
203
+ ];
204
+ return !n || n.replace($n, "").match(
205
+ new RegExp(
206
+ // eslint-disable-next-line no-useless-escape
207
+ `^(?:(?:${o.join("|")}):|[^a-z]|[a-z0-9+.-]+(?:[^a-z+.-:]|$))`,
208
+ "i"
209
+ )
210
+ );
211
+ }
212
+ function mt(n, t, o) {
213
+ try {
214
+ const e = new URL(n, t);
215
+ if (Bn(e.href, o))
216
+ return e.href;
217
+ } catch {
218
+ }
219
+ return "#";
220
+ }
221
+ function ve(n) {
222
+ const { doc: t } = n.state, { from: o, to: e } = n.state.selection, r = [], s = /* @__PURE__ */ new Set();
223
+ return t.nodesBetween(o, e, (i, l) => {
224
+ if (i.isBlock)
225
+ return s.has(l) || (s.add(l), r.push(i)), !1;
226
+ }), r;
227
+ }
228
+ const En = /* @__PURE__ */ b({
229
+ __name: "Button",
230
+ props: {
231
+ tooltip: null,
232
+ showTooltip: { type: Boolean, default: !0 },
233
+ shortcutKeys: null
234
+ },
235
+ emits: ["click", "mousedown"],
236
+ setup(n, { emit: t }) {
237
+ const o = n, e = L(() => {
238
+ if (!o.tooltip || !o.showTooltip) return;
239
+ const r = Mn({ shortcutKeys: o.shortcutKeys }).join(
240
+ pe() ? "" : "+"
241
+ );
242
+ return r ? `${o.tooltip} (${r})` : o.tooltip;
243
+ });
244
+ return { __sfc: !0, props: o, emit: t, title: e };
245
+ }
246
+ });
247
+ function _(n, t, o, e, r, s, i, l) {
248
+ var a = typeof n == "function" ? n.options : n;
249
+ return t && (a.render = t, a.staticRenderFns = o, a._compiled = !0), {
250
+ exports: n,
251
+ options: a
252
+ };
253
+ }
254
+ var Rn = function() {
255
+ var t = this, o = t._self._c, e = t._self._setupProxy;
256
+ return o("button", { staticClass: "tiptap-button", attrs: { "data-slot": "tiptap-button", title: e.title }, on: { click: function(r) {
257
+ return e.emit("click", r);
258
+ }, mousedown: function(r) {
259
+ return e.emit("mousedown", r);
260
+ } } }, [t._t("default")], 2);
261
+ }, Vn = [], On = /* @__PURE__ */ _(
262
+ En,
263
+ Rn,
264
+ Vn
265
+ );
266
+ const S = On.exports, Pn = /* @__PURE__ */ b({
267
+ __name: "Spacer",
268
+ props: {
269
+ orientation: { default: "horizontal" },
270
+ size: null
271
+ },
272
+ setup(n) {
273
+ const t = n, o = L(() => ({
274
+ ...t.orientation === "horizontal" && !t.size && { flex: 1 },
275
+ ...t.size && {
276
+ width: t.orientation === "vertical" ? "1px" : t.size,
277
+ height: t.orientation === "horizontal" ? "1px" : t.size
278
+ }
279
+ }));
280
+ return { __sfc: !0, props: t, style: o };
281
+ }
282
+ });
283
+ var Dn = function() {
284
+ var t = this, o = t._self._c, e = t._self._setupProxy;
285
+ return o("div", { style: e.style });
286
+ }, Fn = [], Nn = /* @__PURE__ */ _(
287
+ Pn,
288
+ Dn,
289
+ Fn
290
+ );
291
+ const Zn = Nn.exports, Un = {
292
+ placeholder: "Start typing...",
293
+ toolbar: "Toolbar",
294
+ tableOfContents: "Contents",
295
+ back: "Back",
296
+ undo: "Undo",
297
+ redo: "Redo",
298
+ marks: {
299
+ bold: "Bold",
300
+ italic: "Italic",
301
+ strike: "Strikethrough",
302
+ underline: "Underline",
303
+ code: "Code",
304
+ superscript: "Superscript",
305
+ subscript: "Subscript"
306
+ },
307
+ heading: {
308
+ button: "Heading",
309
+ menu: "Format text as heading",
310
+ level: (n) => `Heading ${n}`
311
+ },
312
+ list: {
313
+ button: "List",
314
+ menu: "List options",
315
+ bulletList: "Bullet list",
316
+ orderedList: "Numbered list",
317
+ taskList: "Task list",
318
+ /** Screen reader label of a task's checkbox */
319
+ taskCheckbox: (n) => `Task: ${n || "empty task"}`
320
+ },
321
+ blockquote: "Blockquote",
322
+ codeBlock: "Code block",
323
+ align: {
324
+ left: "Align left",
325
+ center: "Align center",
326
+ right: "Align right",
327
+ justify: "Justify"
328
+ },
329
+ highlight: {
330
+ button: "Highlight",
331
+ menu: "Highlight colors",
332
+ remove: "Remove highlight",
333
+ colors: {
334
+ default: "Default",
335
+ gray: "Gray",
336
+ brown: "Brown",
337
+ orange: "Orange",
338
+ yellow: "Yellow",
339
+ green: "Green",
340
+ blue: "Blue",
341
+ purple: "Purple",
342
+ pink: "Pink",
343
+ red: "Red"
344
+ }
345
+ },
346
+ link: {
347
+ button: "Link",
348
+ placeholder: "Paste a link...",
349
+ apply: "Apply link",
350
+ newTab: "Open in new tab",
351
+ open: "Open link",
352
+ remove: "Remove link"
353
+ },
354
+ image: {
355
+ button: "Image",
356
+ choose: "Choose image",
357
+ open: "Open image",
358
+ remove: "Remove image",
359
+ add: "Add image"
360
+ },
361
+ file: {
362
+ button: "File",
363
+ choose: "Choose file",
364
+ open: "Open file",
365
+ remove: "Remove file",
366
+ add: "Add file"
367
+ },
368
+ upload: {
369
+ pasteLink: "Paste a link...",
370
+ orPasteLink: "Or paste a link...",
371
+ uploading: "Uploading…",
372
+ uploadingFile: (n) => `Uploading ${n}…`,
373
+ dismiss: "Dismiss",
374
+ failed: "Upload failed",
375
+ tooLarge: (n) => `Larger than ${n} MB`
376
+ },
377
+ youtube: {
378
+ button: "YouTube video",
379
+ placeholder: "Paste a YouTube link...",
380
+ add: "Add video",
381
+ remove: "Remove video",
382
+ invalid: "That doesn't look like a YouTube link"
383
+ },
384
+ table: {
385
+ button: "Table",
386
+ insert: "Insert table",
387
+ addRowBefore: "Add row above",
388
+ addRowAfter: "Add row below",
389
+ deleteRow: "Delete row",
390
+ addColumnBefore: "Add column before",
391
+ addColumnAfter: "Add column after",
392
+ deleteColumn: "Delete column",
393
+ toggleHeaderRow: "Toggle header row",
394
+ mergeOrSplit: "Merge or split cells",
395
+ delete: "Delete table"
396
+ },
397
+ templates: {
398
+ button: "Insert template"
399
+ },
400
+ visibilityConditions: {
401
+ button: "Visibility condition",
402
+ remove: "Remove condition",
403
+ hidden: (n) => `Block not visible: ${n}`
404
+ },
405
+ media: {
406
+ toolbar: "Media options",
407
+ caption: "Caption",
408
+ small: "Small",
409
+ medium: "Medium",
410
+ large: "Large (full width)",
411
+ floatLeft: "Float left",
412
+ floatNone: "Centered, no float",
413
+ floatRight: "Float right"
414
+ },
415
+ mentions: {
416
+ noResults: "No results"
417
+ },
418
+ characterCount: {
419
+ count: (n) => n === 1 ? "1 character" : `${n} characters`,
420
+ atLeast: (n) => `At least ${n}`
421
+ },
422
+ validation: {
423
+ minCharacters: (n, t) => `Use at least ${n} characters (currently ${t}).`
424
+ }
425
+ }, jn = {
426
+ placeholder: "Begin met typen...",
427
+ toolbar: "Werkbalk",
428
+ tableOfContents: "Inhoud",
429
+ back: "Terug",
430
+ undo: "Ongedaan maken",
431
+ redo: "Opnieuw",
432
+ marks: {
433
+ bold: "Vet",
434
+ italic: "Cursief",
435
+ strike: "Doorhalen",
436
+ underline: "Onderstrepen",
437
+ code: "Code",
438
+ superscript: "Superscript",
439
+ subscript: "Subscript"
440
+ },
441
+ heading: {
442
+ button: "Kop",
443
+ menu: "Tekst opmaken als kop",
444
+ level: (n) => `Kop ${n}`
445
+ },
446
+ list: {
447
+ button: "Lijst",
448
+ menu: "Lijstopties",
449
+ bulletList: "Opsomming",
450
+ orderedList: "Genummerde lijst",
451
+ taskList: "Takenlijst",
452
+ taskCheckbox: (n) => `Taak: ${n || "lege taak"}`
453
+ },
454
+ blockquote: "Citaat",
455
+ codeBlock: "Codeblok",
456
+ align: {
457
+ left: "Links uitlijnen",
458
+ center: "Centreren",
459
+ right: "Rechts uitlijnen",
460
+ justify: "Uitvullen"
461
+ },
462
+ highlight: {
463
+ button: "Markeren",
464
+ menu: "Markeerkleuren",
465
+ remove: "Markering verwijderen",
466
+ colors: {
467
+ default: "Standaard",
468
+ gray: "Grijs",
469
+ brown: "Bruin",
470
+ orange: "Oranje",
471
+ yellow: "Geel",
472
+ green: "Groen",
473
+ blue: "Blauw",
474
+ purple: "Paars",
475
+ pink: "Roze",
476
+ red: "Rood"
477
+ }
478
+ },
479
+ link: {
480
+ button: "Link",
481
+ placeholder: "Plak een link...",
482
+ apply: "Link toepassen",
483
+ newTab: "Openen in nieuw tabblad",
484
+ open: "Link openen",
485
+ remove: "Link verwijderen"
486
+ },
487
+ image: {
488
+ button: "Afbeelding",
489
+ choose: "Kies afbeelding",
490
+ open: "Afbeelding openen",
491
+ remove: "Afbeelding verwijderen",
492
+ add: "Afbeelding toevoegen"
493
+ },
494
+ file: {
495
+ button: "Bestand",
496
+ choose: "Kies bestand",
497
+ open: "Bestand openen",
498
+ remove: "Bestand verwijderen",
499
+ add: "Bestand toevoegen"
500
+ },
501
+ upload: {
502
+ pasteLink: "Plak een link...",
503
+ orPasteLink: "Of plak een link...",
504
+ uploading: "Uploaden…",
505
+ uploadingFile: (n) => `${n} uploaden…`,
506
+ dismiss: "Sluiten",
507
+ failed: "Uploaden mislukt",
508
+ tooLarge: (n) => `Groter dan ${n} MB`
509
+ },
510
+ youtube: {
511
+ button: "YouTube-video",
512
+ placeholder: "Plak een YouTube-link...",
513
+ add: "Video toevoegen",
514
+ remove: "Video verwijderen",
515
+ invalid: "Dit lijkt geen YouTube-link"
516
+ },
517
+ table: {
518
+ button: "Tabel",
519
+ insert: "Tabel invoegen",
520
+ addRowBefore: "Rij erboven invoegen",
521
+ addRowAfter: "Rij eronder invoegen",
522
+ deleteRow: "Rij verwijderen",
523
+ addColumnBefore: "Kolom links invoegen",
524
+ addColumnAfter: "Kolom rechts invoegen",
525
+ deleteColumn: "Kolom verwijderen",
526
+ toggleHeaderRow: "Koprij aan/uit",
527
+ mergeOrSplit: "Cellen samenvoegen of splitsen",
528
+ delete: "Tabel verwijderen"
529
+ },
530
+ templates: {
531
+ button: "Sjabloon invoegen"
532
+ },
533
+ visibilityConditions: {
534
+ button: "Zichtbaarheidsvoorwaarde",
535
+ remove: "Voorwaarde verwijderen",
536
+ hidden: (n) => `Blok niet zichtbaar: ${n}`
537
+ },
538
+ media: {
539
+ toolbar: "Media-opties",
540
+ caption: "Bijschrift",
541
+ small: "Klein",
542
+ medium: "Middel",
543
+ large: "Groot (volle breedte)",
544
+ floatLeft: "Links, tekst ernaast",
545
+ floatNone: "Gecentreerd, zonder tekst ernaast",
546
+ floatRight: "Rechts, tekst ernaast"
547
+ },
548
+ mentions: {
549
+ noResults: "Geen resultaten"
550
+ },
551
+ characterCount: {
552
+ count: (n) => n === 1 ? "1 teken" : `${n} tekens`,
553
+ atLeast: (n) => `Minimaal ${n}`
554
+ },
555
+ validation: {
556
+ minCharacters: (n, t) => `Gebruik minimaal ${n} tekens (nu ${t}).`
557
+ }
558
+ }, ne = "nl", oe = { nl: jn, en: Un }, Ct = /* @__PURE__ */ Symbol("richtext-translations");
559
+ function Kn(n) {
560
+ const t = L(() => oe[n() ?? ne] ?? oe[ne]);
561
+ return lt(Ct, t), t;
562
+ }
563
+ function M() {
564
+ return ct(Ct, () => L(() => oe[ne]), !0);
565
+ }
566
+ function J(n) {
567
+ return typeof n == "function" ? n() : Jt(n) ? n.value : n;
568
+ }
569
+ function qn(n, t) {
570
+ if (Object.is(n, t)) return !0;
571
+ if (typeof n != "object" || typeof t != "object" || n === null || t === null)
572
+ return !1;
573
+ const o = Object.keys(n), e = Object.keys(t);
574
+ return o.length !== e.length ? !1 : o.every(
575
+ (r) => Object.is(
576
+ n[r],
577
+ t[r]
578
+ )
579
+ );
580
+ }
581
+ function ht({
582
+ editor: n,
583
+ containerRef: t,
584
+ query: o,
585
+ items: e,
586
+ onSelect: r,
587
+ onClose: s,
588
+ orientation: i = "vertical",
589
+ autoSelectFirstItem: l = !0,
590
+ loopOnTab: a = !0
591
+ }) {
592
+ const u = g(l ? 0 : -1), c = (d) => u.value = d, p = (d) => {
593
+ const f = J(e);
594
+ if (!f.length) return !1;
595
+ const m = () => u.value = u.value === -1 ? 0 : (u.value + 1) % f.length, h = () => u.value = u.value === -1 ? f.length - 1 : (u.value - 1 + f.length) % f.length;
596
+ switch (d.key) {
597
+ case "ArrowUp":
598
+ return i === "horizontal" ? !1 : (d.preventDefault(), h(), !0);
599
+ case "ArrowDown":
600
+ return i === "horizontal" ? !1 : (d.preventDefault(), m(), !0);
601
+ case "ArrowLeft":
602
+ return i === "vertical" ? !1 : (d.preventDefault(), h(), !0);
603
+ case "ArrowRight":
604
+ return i === "vertical" ? !1 : (d.preventDefault(), m(), !0);
605
+ case "Tab":
606
+ return a ? (d.preventDefault(), d.shiftKey ? h() : m(), !0) : !1;
607
+ case "Home":
608
+ return d.preventDefault(), u.value = 0, !0;
609
+ case "End":
610
+ return d.preventDefault(), u.value = f.length - 1, !0;
611
+ case "Enter":
612
+ return d.isComposing ? !1 : (d.preventDefault(), u.value !== -1 && f[u.value] && r?.(f[u.value]), !0);
613
+ case "Escape":
614
+ return s ? (d.preventDefault(), s(), !0) : !1;
615
+ default:
616
+ return !1;
617
+ }
618
+ };
619
+ return x(
620
+ () => n?.value?.view.dom ?? t?.value ?? null,
621
+ (d, f, m) => {
622
+ d && (d.addEventListener("keydown", p, !0), m(
623
+ () => d.removeEventListener("keydown", p, !0)
624
+ ));
625
+ },
626
+ { immediate: !0 }
627
+ ), x(
628
+ () => J(o),
629
+ (d) => {
630
+ d && (u.value = l ? 0 : -1);
631
+ }
632
+ ), {
633
+ selectedIndex: L(
634
+ () => J(e).length ? u.value : void 0
635
+ ),
636
+ setSelectedIndex: c
637
+ };
638
+ }
639
+ const Gn = /* @__PURE__ */ b({
640
+ __name: "Toolbar",
641
+ props: {
642
+ variant: { default: "fixed" }
643
+ },
644
+ setup(n, { expose: t }) {
645
+ const o = M(), e = g(null);
646
+ t({ el: e });
647
+ const r = fe([]);
648
+ let s, i = null;
649
+ const l = () => Array.from(
650
+ e.value?.querySelectorAll(
651
+ 'button:not([disabled]), [role="button"]:not([disabled]), [tabindex="0"]:not([disabled])'
652
+ ) ?? []
653
+ ), { selectedIndex: a, setSelectedIndex: u } = ht({
654
+ containerRef: e,
655
+ items: () => r.value,
656
+ orientation: "horizontal",
657
+ onSelect: (d) => d.click(),
658
+ autoSelectFirstItem: !1,
659
+ loopOnTab: !1
660
+ }), c = (d) => {
661
+ const f = e.value, m = d.target;
662
+ if (!f?.contains(m)) return;
663
+ m.setAttribute("data-focus-visible", "true");
664
+ const h = r.value.indexOf(m);
665
+ h >= 0 && u(h);
666
+ }, p = (d) => {
667
+ const f = e.value;
668
+ if (!f) return;
669
+ const m = d.target;
670
+ f.contains(m) && m.removeAttribute("data-focus-visible");
671
+ const h = d.relatedTarget;
672
+ (!(h instanceof Node) || !f.contains(h)) && s != null && queueMicrotask(() => {
673
+ f.isConnected && !f.contains(document.activeElement) && (f.tabIndex = s, u(-1));
674
+ });
675
+ };
676
+ return G(() => {
677
+ const d = e.value;
678
+ s = d.hasAttribute("tabindex") && d.tabIndex >= 0 ? d.tabIndex : null;
679
+ const f = () => r.value = l();
680
+ f(), i = new MutationObserver(f), i.observe(d, {
681
+ childList: !0,
682
+ subtree: !0,
683
+ attributes: !0,
684
+ attributeFilter: ["disabled"]
685
+ }), d.addEventListener("focus", c, !0), d.addEventListener("blur", p, !0);
686
+ }), q(() => {
687
+ i?.disconnect(), e.value?.removeEventListener("focus", c, !0), e.value?.removeEventListener("blur", p, !0);
688
+ }), x([a, r], ([d, f]) => {
689
+ const m = e.value;
690
+ if (!f.length || !m) return;
691
+ const h = d ?? -1, w = m.contains(document.activeElement);
692
+ if (s != null) {
693
+ f.forEach((k) => k.tabIndex = -1), h >= 0 && f[h] ? (m.tabIndex = -1, w && f[h].focus()) : m.tabIndex = s;
694
+ return;
695
+ }
696
+ const I = f.findIndex((k) => k.tabIndex === 0), H = h >= 0 && f[h] ? h : I >= 0 ? I : 0;
697
+ f.forEach((k, y) => k.tabIndex = y === H ? 0 : -1), h >= 0 && w && f[H]?.focus();
698
+ }), { __sfc: !0, t: o, toolbarRef: e, items: r, initialContainerTabIndex: s, observer: i, collectItems: l, selectedIndex: a, setSelectedIndex: u, handleFocus: c, handleBlur: p };
699
+ }
700
+ });
701
+ var zn = function() {
702
+ var t = this, o = t._self._c, e = t._self._setupProxy;
703
+ return o("div", { ref: "toolbarRef", staticClass: "tiptap-toolbar", attrs: { role: "toolbar", "aria-label": e.t.toolbar, "data-variant": t.variant } }, [t._t("default")], 2);
704
+ }, Yn = [], Wn = /* @__PURE__ */ _(
705
+ Gn,
706
+ zn,
707
+ Yn
708
+ );
709
+ const Jn = Wn.exports, Xn = {};
710
+ var Qn = function() {
711
+ var t = this, o = t._self._c;
712
+ return o("div", { staticClass: "tiptap-toolbar-group", attrs: { role: "group" } }, [t._t("default")], 2);
713
+ }, eo = [], to = /* @__PURE__ */ _(
714
+ Xn,
715
+ Qn,
716
+ eo
717
+ );
718
+ const vt = to.exports, no = /* @__PURE__ */ b({
719
+ __name: "Separator",
720
+ props: {
721
+ orientation: { default: "vertical" },
722
+ decorative: { type: Boolean, default: !1 }
723
+ },
724
+ setup(n) {
725
+ return { __sfc: !0 };
726
+ }
727
+ });
728
+ var oo = function() {
729
+ var t = this, o = t._self._c;
730
+ return t._self._setupProxy, o("div", { staticClass: "tiptap-separator", attrs: { "data-orientation": t.orientation, role: t.decorative ? "none" : "separator", "aria-orientation": !t.decorative && t.orientation === "vertical" ? "vertical" : void 0 } });
731
+ }, ro = [], io = /* @__PURE__ */ _(
732
+ no,
733
+ oo,
734
+ ro
735
+ );
736
+ const ie = io.exports, so = /* @__PURE__ */ b({
737
+ __name: "ToolbarSeparator",
738
+ setup(n) {
739
+ return { __sfc: !0, Separator: ie };
740
+ }
741
+ });
742
+ var ao = function() {
743
+ var t = this, o = t._self._c, e = t._self._setupProxy;
744
+ return o(e.Separator, { attrs: { orientation: "vertical", decorative: "" } });
745
+ }, lo = [], co = /* @__PURE__ */ _(
746
+ so,
747
+ ao,
748
+ lo
749
+ );
750
+ const _t = co.exports, gt = /* @__PURE__ */ Symbol("tiptap-editor");
751
+ function uo(n) {
752
+ lt(gt, n);
753
+ }
754
+ function $(n) {
755
+ const t = ct(gt, fe(null));
756
+ return L(
757
+ () => J(n) ?? t.value ?? null
758
+ );
759
+ }
760
+ const Xe = ["transaction", "focus", "blur"];
761
+ function B(n, t, o = {}) {
762
+ const { deps: e, equals: r = qn } = o, s = fe(t(n.value)), i = () => {
763
+ const l = t(n.value);
764
+ r(s.value, l) || (s.value = l);
765
+ };
766
+ return x(
767
+ n,
768
+ (l, a, u) => {
769
+ i(), l && (Xe.forEach((c) => l.on(c, i)), u(
770
+ () => Xe.forEach((c) => l.off(c, i))
771
+ ));
772
+ },
773
+ { immediate: !0 }
774
+ ), e && x(e, i), s;
775
+ }
776
+ function Z(n) {
777
+ const t = {};
778
+ for (const o of Object.keys(n.value))
779
+ t[o] = L(() => n.value[o]);
780
+ return t;
781
+ }
782
+ const Qe = /* @__PURE__ */ new Map();
783
+ function U(n, t) {
784
+ let o = Qe.get(n);
785
+ return o || (o = t(), Qe.set(n, o)), o;
786
+ }
787
+ const bt = "align-center", po = "align-justify", yt = "align-left", kt = "align-right", fo = "arrow-left", wt = "ban", mo = "blockquote", Co = "bold", se = "chevron-down", ho = "code-block", vo = "code2", Be = "corner-down-left", _o = "external-link", go = "heading-five", bo = "heading-four", yo = "heading", ko = "heading-one", wo = "heading-six", Lo = "heading-three", xo = "heading-two", Ee = "highlighter", To = "image-plus", Io = "italic", Re = "link", Ve = "list", Lt = "list-ordered", xt = "list-todo", Ho = "redo2", Mo = "strike", Ao = "subscript", So = "superscript", Oe = "trash", $o = "underline", Bo = "undo2", Pe = "eye", Eo = "paperclip", Ro = "youtube", Vo = "table", Oo = "file-text", Tt = {
788
+ 1: ko,
789
+ 2: xo,
790
+ 3: Lo,
791
+ 4: bo,
792
+ 5: go,
793
+ 6: wo
794
+ }, Po = {
795
+ 1: "ctrl+alt+1",
796
+ 2: "ctrl+alt+2",
797
+ 3: "ctrl+alt+3",
798
+ 4: "ctrl+alt+4",
799
+ 5: "ctrl+alt+5",
800
+ 6: "ctrl+alt+6"
801
+ };
802
+ function De(n, t, o = !0) {
803
+ return !n || !n.isEditable || !Ce("heading", n) || N(n, ["image"]) ? !1 : o ? K(n, [
804
+ "paragraph",
805
+ "heading",
806
+ "bulletList",
807
+ "orderedList",
808
+ "taskList",
809
+ "blockquote",
810
+ "codeBlock"
811
+ ]) ? t ? n.can().setNode("heading", { level: t }) || n.can().clearNodes() : n.can().setNode("heading") || n.can().clearNodes() : !1 : t ? n.can().setNode("heading", { level: t }) : n.can().setNode("heading");
812
+ }
813
+ function Fe(n, t) {
814
+ return !n || !n.isEditable ? !1 : Array.isArray(t) ? t.some((o) => n.isActive("heading", { level: o })) : t ? n.isActive("heading", { level: t }) : n.isActive("heading");
815
+ }
816
+ function Do(n, t) {
817
+ if (!n || !n.isEditable) return !1;
818
+ const o = Array.isArray(t) ? t : [t], e = o.find((r) => De(n, r));
819
+ if (!e) return !1;
820
+ try {
821
+ const r = n.view;
822
+ let s = r.state, i = s.tr;
823
+ const l = ve(n), a = K(n, [
824
+ "paragraph",
825
+ "heading",
826
+ "bulletList",
827
+ "orderedList",
828
+ "taskList",
829
+ "blockquote",
830
+ "codeBlock"
831
+ ]) && l.length === 1;
832
+ if ((s.selection.empty || s.selection instanceof F) && a) {
833
+ const f = he({
834
+ editor: n,
835
+ node: s.selection.$anchor.node(1)
836
+ })?.pos;
837
+ if (!re(f)) return !1;
838
+ i = i.setSelection(P.create(s.doc, f)), r.dispatch(i), s = r.state;
839
+ }
840
+ const u = s.selection;
841
+ let c = n.chain().focus();
842
+ if (u instanceof P) {
843
+ const f = u.node.firstChild?.firstChild, m = u.node.lastChild?.lastChild, h = f ? u.from + f.nodeSize : u.from + 1, w = m ? u.to - m.nodeSize : u.to - 1, I = s.doc.resolve(h), H = s.doc.resolve(w);
844
+ c = c.setTextSelection(F.between(I, H)).clearNodes();
845
+ }
846
+ return (o.some(
847
+ (f) => n.isActive("heading", { level: f })
848
+ ) ? c.setNode("paragraph") : c.setNode("heading", { level: e })).run(), n.chain().focus().selectTextblockEnd().run(), !0;
849
+ } catch {
850
+ return !1;
851
+ }
852
+ }
853
+ const Fo = (n) => U(`heading:${n}`, () => ({
854
+ label: (t) => t.heading.level(n),
855
+ icon: Tt[n],
856
+ shortcutKeys: Po[n],
857
+ isActive: (t) => Fe(t, n),
858
+ canRun: (t) => De(t, n),
859
+ run: (t) => Do(t, n)
860
+ }));
861
+ function No(n, t = [1, 2, 3, 4, 5, 6]) {
862
+ if (!(!n || !n.isEditable))
863
+ return t.find((o) => Fe(n, o));
864
+ }
865
+ const Zo = `<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
866
+ <symbol id="tt-icon-align-center" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6C2 5.44772 2.44772 5 3 5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H3C2.44772 7 2 6.55228 2 6Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M6 12C6 11.4477 6.44772 11 7 11H17C17.5523 11 18 11.4477 18 12C18 12.5523 17.5523 13 17 13H7C6.44772 13 6 12.5523 6 12Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M4 18C4 17.4477 4.44772 17 5 17H19C19.5523 17 20 17.4477 20 18C20 18.5523 19.5523 19 19 19H5C4.44772 19 4 18.5523 4 18Z" fill="currentColor" /></symbol>
867
+ <symbol id="tt-icon-align-justify" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6C2 5.44772 2.44772 5 3 5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H3C2.44772 7 2 6.55228 2 6Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M2 12C2 11.4477 2.44772 11 3 11H21C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H3C2.44772 13 2 12.5523 2 12Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M2 18C2 17.4477 2.44772 17 3 17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H3C2.44772 19 2 18.5523 2 18Z" fill="currentColor" /></symbol>
868
+ <symbol id="tt-icon-align-left" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6C2 5.44772 2.44772 5 3 5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H3C2.44772 7 2 6.55228 2 6Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M2 12C2 11.4477 2.44772 11 3 11H15C15.5523 11 16 11.4477 16 12C16 12.5523 15.5523 13 15 13H3C2.44772 13 2 12.5523 2 12Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M2 18C2 17.4477 2.44772 17 3 17H17C17.5523 17 18 17.4477 18 18C18 18.5523 17.5523 19 17 19H3C2.44772 19 2 18.5523 2 18Z" fill="currentColor" /></symbol>
869
+ <symbol id="tt-icon-align-right" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6C2 5.44772 2.44772 5 3 5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H3C2.44772 7 2 6.55228 2 6Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M8 12C8 11.4477 8.44772 11 9 11H21C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H9C8.44772 13 8 12.5523 8 12Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M6 18C6 17.4477 6.44772 17 7 17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H7C6.44772 19 6 18.5523 6 18Z" fill="currentColor" /></symbol>
870
+ <symbol id="tt-icon-arrow-left" viewBox="0 0 24 24"><path d="M12.7071 5.70711C13.0976 5.31658 13.0976 4.68342 12.7071 4.29289C12.3166 3.90237 11.6834 3.90237 11.2929 4.29289L4.29289 11.2929C3.90237 11.6834 3.90237 12.3166 4.29289 12.7071L11.2929 19.7071C11.6834 20.0976 12.3166 20.0976 12.7071 19.7071C13.0976 19.3166 13.0976 18.6834 12.7071 18.2929L7.41421 13L19 13C19.5523 13 20 12.5523 20 12C20 11.4477 19.5523 11 19 11L7.41421 11L12.7071 5.70711Z" fill="currentColor" /></symbol>
871
+ <symbol id="tt-icon-ban" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.43471 4.01458C4.34773 4.06032 4.26607 4.11977 4.19292 4.19292C4.11977 4.26607 4.06032 4.34773 4.01458 4.43471C2.14611 6.40628 1 9.0693 1 12C1 18.0751 5.92487 23 12 23C14.9306 23 17.5936 21.854 19.5651 19.9856C19.6522 19.9398 19.7339 19.8803 19.8071 19.8071C19.8803 19.7339 19.9398 19.6522 19.9856 19.5651C21.854 17.5936 23 14.9306 23 12C23 5.92487 18.0751 1 12 1C9.0693 1 6.40628 2.14611 4.43471 4.01458ZM6.38231 4.9681C7.92199 3.73647 9.87499 3 12 3C16.9706 3 21 7.02944 21 12C21 14.125 20.2635 16.078 19.0319 17.6177L6.38231 4.9681ZM17.6177 19.0319C16.078 20.2635 14.125 21 12 21C7.02944 21 3 16.9706 3 12C3 9.87499 3.73647 7.92199 4.9681 6.38231L17.6177 19.0319Z" fill="currentColor" /></symbol>
872
+ <symbol id="tt-icon-blockquote" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M8 6C8 5.44772 8.44772 5 9 5H16C16.5523 5 17 5.44772 17 6C17 6.55228 16.5523 7 16 7H9C8.44772 7 8 6.55228 8 6Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M4 3C4.55228 3 5 3.44772 5 4L5 20C5 20.5523 4.55229 21 4 21C3.44772 21 3 20.5523 3 20L3 4C3 3.44772 3.44772 3 4 3Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M8 12C8 11.4477 8.44772 11 9 11H20C20.5523 11 21 11.4477 21 12C21 12.5523 20.5523 13 20 13H9C8.44772 13 8 12.5523 8 12Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M8 18C8 17.4477 8.44772 17 9 17H16C16.5523 17 17 17.4477 17 18C17 18.5523 16.5523 19 16 19H9C8.44772 19 8 18.5523 8 18Z" fill="currentColor" /></symbol>
873
+ <symbol id="tt-icon-bold" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M6 2.5C5.17157 2.5 4.5 3.17157 4.5 4V20C4.5 20.8284 5.17157 21.5 6 21.5H15C16.4587 21.5 17.8576 20.9205 18.8891 19.8891C19.9205 18.8576 20.5 17.4587 20.5 16C20.5 14.5413 19.9205 13.1424 18.8891 12.1109C18.6781 11.9 18.4518 11.7079 18.2128 11.5359C19.041 10.5492 19.5 9.29829 19.5 8C19.5 6.54131 18.9205 5.14236 17.8891 4.11091C16.8576 3.07946 15.4587 2.5 14 2.5H6ZM14 10.5C14.663 10.5 15.2989 10.2366 15.7678 9.76777C16.2366 9.29893 16.5 8.66304 16.5 8C16.5 7.33696 16.2366 6.70107 15.7678 6.23223C15.2989 5.76339 14.663 5.5 14 5.5H7.5V10.5H14ZM7.5 18.5V13.5H15C15.663 13.5 16.2989 13.7634 16.7678 14.2322C17.2366 14.7011 17.5 15.337 17.5 16C17.5 16.663 17.2366 17.2989 16.7678 17.7678C16.2989 18.2366 15.663 18.5 15 18.5H7.5Z" fill="currentColor" /></symbol>
874
+ <symbol id="tt-icon-chevron-down" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L12 13.5858L17.2929 8.29289C17.6834 7.90237 18.3166 7.90237 18.7071 8.29289C19.0976 8.68342 19.0976 9.31658 18.7071 9.70711L12.7071 15.7071C12.3166 16.0976 11.6834 16.0976 11.2929 15.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289Z" fill="currentColor" /></symbol>
875
+ <symbol id="tt-icon-code-block" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.70711 2.29289C7.09763 2.68342 7.09763 3.31658 6.70711 3.70711L4.41421 6L6.70711 8.29289C7.09763 8.68342 7.09763 9.31658 6.70711 9.70711C6.31658 10.0976 5.68342 10.0976 5.29289 9.70711L2.29289 6.70711C1.90237 6.31658 1.90237 5.68342 2.29289 5.29289L5.29289 2.29289C5.68342 1.90237 6.31658 1.90237 6.70711 2.29289Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M10.2929 2.29289C10.6834 1.90237 11.3166 1.90237 11.7071 2.29289L14.7071 5.29289C15.0976 5.68342 15.0976 6.31658 14.7071 6.70711L11.7071 9.70711C11.3166 10.0976 10.6834 10.0976 10.2929 9.70711C9.90237 9.31658 9.90237 8.68342 10.2929 8.29289L12.5858 6L10.2929 3.70711C9.90237 3.31658 9.90237 2.68342 10.2929 2.29289Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M17 4C17 3.44772 17.4477 3 18 3H19C20.6569 3 22 4.34315 22 6V18C22 19.6569 20.6569 21 19 21H5C3.34315 21 2 19.6569 2 18V12C2 11.4477 2.44772 11 3 11C3.55228 11 4 11.4477 4 12V18C4 18.5523 4.44772 19 5 19H19C19.5523 19 20 18.5523 20 18V6C20 5.44772 19.5523 5 19 5H18C17.4477 5 17 4.55228 17 4Z" fill="currentColor" /></symbol>
876
+ <symbol id="tt-icon-code2" viewBox="0 0 24 24"><path d="M15.4545 4.2983C15.6192 3.77115 15.3254 3.21028 14.7983 3.04554C14.2712 2.88081 13.7103 3.1746 13.5455 3.70175L8.54554 19.7017C8.38081 20.2289 8.6746 20.7898 9.20175 20.9545C9.72889 21.1192 10.2898 20.8254 10.4545 20.2983L15.4545 4.2983Z" fill="currentColor" /><path d="M6.70711 7.29289C7.09763 7.68342 7.09763 8.31658 6.70711 8.70711L3.41421 12L6.70711 15.2929C7.09763 15.6834 7.09763 16.3166 6.70711 16.7071C6.31658 17.0976 5.68342 17.0976 5.29289 16.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289Z" fill="currentColor" /><path d="M17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289L22.7071 11.2929C23.0976 11.6834 23.0976 12.3166 22.7071 12.7071L18.7071 16.7071C18.3166 17.0976 17.6834 17.0976 17.2929 16.7071C16.9024 16.3166 16.9024 15.6834 17.2929 15.2929L20.5858 12L17.2929 8.70711C16.9024 8.31658 16.9024 7.68342 17.2929 7.29289Z" fill="currentColor" /></symbol>
877
+ <symbol id="tt-icon-corner-down-left" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M21 4C21 3.44772 20.5523 3 20 3C19.4477 3 19 3.44772 19 4V11C19 11.7956 18.6839 12.5587 18.1213 13.1213C17.5587 13.6839 16.7956 14 16 14H6.41421L9.70711 10.7071C10.0976 10.3166 10.0976 9.68342 9.70711 9.29289C9.31658 8.90237 8.68342 8.90237 8.29289 9.29289L3.29289 14.2929C2.90237 14.6834 2.90237 15.3166 3.29289 15.7071L8.29289 20.7071C8.68342 21.0976 9.31658 21.0976 9.70711 20.7071C10.0976 20.3166 10.0976 19.6834 9.70711 19.2929L6.41421 16H16C17.3261 16 18.5979 15.4732 19.5355 14.5355C20.4732 13.5979 21 12.3261 21 11V4Z" fill="currentColor" /></symbol>
878
+ <symbol id="tt-icon-eye" viewBox="0 0 24 24"><path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><circle cx="12" cy="12" r="3" fill="none" stroke="currentColor" stroke-width="2" /></symbol>
879
+ <symbol id="tt-icon-external-link" viewBox="0 0 24 24"><path d="M14 3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55228 21.5523 10 21 10C20.4477 10 20 9.55228 20 9V5.41421L10.7071 14.7071C10.3166 15.0976 9.68342 15.0976 9.29289 14.7071C8.90237 14.3166 8.90237 13.6834 9.29289 13.2929L18.5858 4H15C14.4477 4 14 3.55228 14 3Z" fill="currentColor" /><path d="M4.29289 7.29289C4.48043 7.10536 4.73478 7 5 7H11C11.5523 7 12 6.55228 12 6C12 5.44772 11.5523 5 11 5H5C4.20435 5 3.44129 5.31607 2.87868 5.87868C2.31607 6.44129 2 7.20435 2 8V19C2 19.7957 2.31607 20.5587 2.87868 21.1213C3.44129 21.6839 4.20435 22 5 22H16C16.7957 22 17.5587 21.6839 18.1213 21.1213C18.6839 20.5587 19 19.7957 19 19V13C19 12.4477 18.5523 12 18 12C17.4477 12 17 12.4477 17 13V19C17 19.2652 16.8946 19.5196 16.7071 19.7071C16.5196 19.8946 16.2652 20 16 20H5C4.73478 20 4.48043 19.8946 4.29289 19.7071C4.10536 19.5196 4 19.2652 4 19V8C4 7.73478 4.10536 7.48043 4.29289 7.29289Z" fill="currentColor" /></symbol>
880
+ <symbol id="tt-icon-heading-five" viewBox="0 0 24 24"><path d="M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z" fill="currentColor" /><path d="M16 10C16 9.44772 16.4477 9 17 9H21C21.5523 9 22 9.44772 22 10C22 10.5523 21.5523 11 21 11H18V12H18.3C20.2754 12 22 13.4739 22 15.5C22 17.5261 20.2754 19 18.3 19C17.6457 19 17.0925 18.8643 16.5528 18.5944C16.0588 18.3474 15.8586 17.7468 16.1055 17.2528C16.3525 16.7588 16.9532 16.5586 17.4472 16.8056C17.7074 16.9357 17.9542 17 18.3 17C19.3246 17 20 16.2739 20 15.5C20 14.7261 19.3246 14 18.3 14H17C16.4477 14 16 13.5523 16 13L16 12.9928V10Z" fill="currentColor" /></symbol>
881
+ <symbol id="tt-icon-heading-four" viewBox="0 0 24 24"><path d="M4 5C4.55228 5 5 5.44772 5 6V11H11V6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H5V18C5 18.5523 4.55228 19 4 19C3.44772 19 3 18.5523 3 18V6C3 5.44772 3.44772 5 4 5Z" fill="currentColor" /><path d="M17 9C17.5523 9 18 9.44772 18 10V13H20V10C20 9.44772 20.4477 9 21 9C21.5523 9 22 9.44772 22 10V18C22 18.5523 21.5523 19 21 19C20.4477 19 20 18.5523 20 18V15H17C16.4477 15 16 14.5523 16 14V10C16 9.44772 16.4477 9 17 9Z" fill="currentColor" /></symbol>
882
+ <symbol id="tt-icon-heading" viewBox="0 0 24 24"><path d="M6 3C6.55228 3 7 3.44772 7 4V11H17V4C17 3.44772 17.4477 3 18 3C18.5523 3 19 3.44772 19 4V20C19 20.5523 18.5523 21 18 21C17.4477 21 17 20.5523 17 20V13H7V20C7 20.5523 6.55228 21 6 21C5.44772 21 5 20.5523 5 20V4C5 3.44772 5.44772 3 6 3Z" fill="currentColor" /></symbol>
883
+ <symbol id="tt-icon-heading-one" viewBox="0 0 24 24"><path d="M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z" fill="currentColor" /><path d="M21.0001 10C21.0001 9.63121 20.7971 9.29235 20.472 9.11833C20.1468 8.94431 19.7523 8.96338 19.4454 9.16795L16.4454 11.168C15.9859 11.4743 15.8617 12.0952 16.1681 12.5547C16.4744 13.0142 17.0953 13.1384 17.5548 12.8321L19.0001 11.8685V18C19.0001 18.5523 19.4478 19 20.0001 19C20.5524 19 21.0001 18.5523 21.0001 18V10Z" fill="currentColor" /></symbol>
884
+ <symbol id="tt-icon-heading-six" viewBox="0 0 24 24"><path d="M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M20.7071 9.29289C21.0976 9.68342 21.0976 10.3166 20.7071 10.7071C19.8392 11.575 19.2179 12.2949 18.7889 13.0073C18.8587 13.0025 18.929 13 19 13C20.6569 13 22 14.3431 22 16C22 17.6569 20.6569 19 19 19C17.3431 19 16 17.6569 16 16C16 14.6007 16.2837 13.4368 16.8676 12.3419C17.4384 11.2717 18.2728 10.3129 19.2929 9.29289C19.6834 8.90237 20.3166 8.90237 20.7071 9.29289ZM19 17C18.4477 17 18 16.5523 18 16C18 15.4477 18.4477 15 19 15C19.5523 15 20 15.4477 20 16C20 16.5523 19.5523 17 19 17Z" fill="currentColor" /></symbol>
885
+ <symbol id="tt-icon-heading-three" viewBox="0 0 24 24"><path d="M4 5C4.55228 5 5 5.44772 5 6V11H11V6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H5V18C5 18.5523 4.55228 19 4 19C3.44772 19 3 18.5523 3 18V6C3 5.44772 3.44772 5 4 5Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M19.4608 11.2169C19.1135 11.0531 18.5876 11.0204 18.0069 11.3619C17.5309 11.642 16.918 11.4831 16.638 11.007C16.358 10.531 16.5169 9.91809 16.9929 9.63807C18.1123 8.97962 19.3364 8.94691 20.314 9.40808C21.2839 9.86558 21.9999 10.818 21.9999 12C21.9999 12.7957 21.6838 13.5587 21.1212 14.1213C20.5586 14.6839 19.7956 15 18.9999 15C18.4476 15 17.9999 14.5523 17.9999 14C17.9999 13.4477 18.4476 13 18.9999 13C19.2651 13 19.5195 12.8947 19.707 12.7071C19.8946 12.5196 19.9999 12.2652 19.9999 12C19.9999 11.6821 19.8159 11.3844 19.4608 11.2169Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M18.0001 14C18.0001 13.4477 18.4478 13 19.0001 13C19.7957 13 20.5588 13.3161 21.1214 13.8787C21.684 14.4413 22.0001 15.2043 22.0001 16C22.0001 17.2853 21.2767 18.3971 20.1604 18.8994C19.0257 19.41 17.642 19.2315 16.4001 18.3C15.9582 17.9686 15.8687 17.3418 16.2001 16.9C16.5314 16.4582 17.1582 16.3686 17.6001 16.7C18.3581 17.2685 18.9744 17.24 19.3397 17.0756C19.7234 16.9029 20.0001 16.5147 20.0001 16C20.0001 15.7348 19.8947 15.4804 19.7072 15.2929C19.5196 15.1054 19.2653 15 19.0001 15C18.4478 15 18.0001 14.5523 18.0001 14Z" fill="currentColor" /></symbol>
886
+ <symbol id="tt-icon-heading-two" viewBox="0 0 24 24"><path d="M5 6C5 5.44772 4.55228 5 4 5C3.44772 5 3 5.44772 3 6V18C3 18.5523 3.44772 19 4 19C4.55228 19 5 18.5523 5 18V13H11V18C11 18.5523 11.4477 19 12 19C12.5523 19 13 18.5523 13 18V6C13 5.44772 12.5523 5 12 5C11.4477 5 11 5.44772 11 6V11H5V6Z" fill="currentColor" /><path d="M22.0001 12C22.0001 10.7611 21.1663 9.79297 20.0663 9.42632C18.9547 9.05578 17.6171 9.28724 16.4001 10.2C15.9582 10.5314 15.8687 11.1582 16.2001 11.6C16.5314 12.0418 17.1582 12.1314 17.6001 11.8C18.383 11.2128 19.0455 11.1942 19.4338 11.3237C19.8339 11.457 20.0001 11.7389 20.0001 12C20.0001 12.4839 19.8554 12.7379 19.6537 12.9481C19.4275 13.1837 19.1378 13.363 18.7055 13.6307C18.6313 13.6767 18.553 13.7252 18.4701 13.777C17.9572 14.0975 17.3128 14.5261 16.8163 15.2087C16.3007 15.9177 16.0001 16.8183 16.0001 18C16.0001 18.5523 16.4478 19 17.0001 19H21.0001C21.5523 19 22.0001 18.5523 22.0001 18C22.0001 17.4477 21.5523 17 21.0001 17H18.131C18.21 16.742 18.3176 16.5448 18.4338 16.385C18.6873 16.0364 19.0429 15.7775 19.5301 15.473C19.5898 15.4357 19.6536 15.3966 19.7205 15.3556C20.139 15.0992 20.6783 14.7687 21.0964 14.3332C21.6447 13.7621 22.0001 13.0161 22.0001 12Z" fill="currentColor" /></symbol>
887
+ <symbol id="tt-icon-highlighter" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.7072 4.70711C15.0977 4.31658 15.0977 3.68342 14.7072 3.29289C14.3167 2.90237 13.6835 2.90237 13.293 3.29289L8.69294 7.89286L8.68594 7.9C8.13626 8.46079 7.82837 9.21474 7.82837 10C7.82837 10.2306 7.85491 10.4584 7.90631 10.6795L2.29289 16.2929C2.10536 16.4804 2 16.7348 2 17V20C2 20.5523 2.44772 21 3 21H12C12.2652 21 12.5196 20.8946 12.7071 20.7071L15.3205 18.0937C15.5416 18.1452 15.7695 18.1717 16.0001 18.1717C16.7853 18.1717 17.5393 17.8639 18.1001 17.3142L22.7072 12.7071C23.0977 12.3166 23.0977 11.6834 22.7072 11.2929C22.3167 10.9024 21.6835 10.9024 21.293 11.2929L16.6971 15.8887C16.5105 16.0702 16.2605 16.1717 16.0001 16.1717C15.7397 16.1717 15.4897 16.0702 15.303 15.8887L10.1113 10.697C9.92992 10.5104 9.82837 10.2604 9.82837 10C9.82837 9.73963 9.92992 9.48958 10.1113 9.30297L14.7072 4.70711ZM13.5858 17L9.00004 12.4142L4 17.4142V19H11.5858L13.5858 17Z" fill="currentColor" /></symbol>
888
+ <symbol id="tt-icon-image-plus" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M20 2C20 1.44772 19.5523 1 19 1C18.4477 1 18 1.44772 18 2V4H16C15.4477 4 15 4.44772 15 5C15 5.55228 15.4477 6 16 6H18V8C18 8.55228 18.4477 9 19 9C19.5523 9 20 8.55228 20 8V6H22C22.5523 6 23 5.55228 23 5C23 4.44772 22.5523 4 22 4H20V2ZM5 4C4.73478 4 4.48043 4.10536 4.29289 4.29289C4.10536 4.48043 4 4.73478 4 5V19C4 19.2652 4.10536 19.5196 4.29289 19.7071C4.48043 19.8946 4.73478 20 5 20H5.58579L14.379 11.2068C14.9416 10.6444 15.7045 10.3284 16.5 10.3284C17.2955 10.3284 18.0584 10.6444 18.621 11.2068L20 12.5858V12C20 11.4477 20.4477 11 21 11C21.5523 11 22 11.4477 22 12V14.998C22 14.9994 22 15.0007 22 15.002V19C22 19.7957 21.6839 20.5587 21.1213 21.1213C20.5587 21.6839 19.7957 22 19 22H6.00219C6.00073 22 5.99927 22 5.99781 22H5C4.20435 22 3.44129 21.6839 2.87868 21.1213C2.31607 20.5587 2 19.7957 2 19V5C2 4.20435 2.31607 3.44129 2.87868 2.87868C3.44129 2.31607 4.20435 2 5 2H12C12.5523 2 13 2.44772 13 3C13 3.55228 12.5523 4 12 4H5ZM8.41422 20H19C19.2652 20 19.5196 19.8946 19.7071 19.7071C19.8946 19.5196 20 19.2652 20 19V15.4142L17.207 12.6212C17.0195 12.4338 16.7651 12.3284 16.5 12.3284C16.2349 12.3284 15.9806 12.4337 15.7931 12.6211L8.41422 20ZM6.87868 6.87868C7.44129 6.31607 8.20435 6 9 6C9.79565 6 10.5587 6.31607 11.1213 6.87868C11.6839 7.44129 12 8.20435 12 9C12 9.79565 11.6839 10.5587 11.1213 11.1213C10.5587 11.6839 9.79565 12 9 12C8.20435 12 7.44129 11.6839 6.87868 11.1213C6.31607 10.5587 6 9.79565 6 9C6 8.20435 6.31607 7.44129 6.87868 6.87868ZM9 8C8.73478 8 8.48043 8.10536 8.29289 8.29289C8.10536 8.48043 8 8.73478 8 9C8 9.26522 8.10536 9.51957 8.29289 9.70711C8.48043 9.89464 8.73478 10 9 10C9.26522 10 9.51957 9.89464 9.70711 9.70711C9.89464 9.51957 10 9.26522 10 9C10 8.73478 9.89464 8.48043 9.70711 8.29289C9.51957 8.10536 9.26522 8 9 8Z" fill="currentColor" /></symbol>
889
+ <symbol id="tt-icon-italic" viewBox="0 0 24 24"><path d="M15.0222 3H19C19.5523 3 20 3.44772 20 4C20 4.55228 19.5523 5 19 5H15.693L10.443 19H14C14.5523 19 15 19.4477 15 20C15 20.5523 14.5523 21 14 21H9.02418C9.00802 21.0004 8.99181 21.0004 8.97557 21H5C4.44772 21 4 20.5523 4 20C4 19.4477 4.44772 19 5 19H8.30704L13.557 5H10C9.44772 5 9 4.55228 9 4C9 3.44772 9.44772 3 10 3H14.9782C14.9928 2.99968 15.0075 2.99967 15.0222 3Z" fill="currentColor" /></symbol>
890
+ <symbol id="tt-icon-link" viewBox="0 0 24 24"><path d="M16.9958 1.06669C15.4226 1.05302 13.907 1.65779 12.7753 2.75074L12.765 2.76086L11.045 4.47086C10.6534 4.86024 10.6515 5.49341 11.0409 5.88507C11.4303 6.27673 12.0634 6.27858 12.4551 5.88919L14.1697 4.18456C14.9236 3.45893 15.9319 3.05752 16.9784 3.06662C18.0272 3.07573 19.0304 3.49641 19.772 4.23804C20.5137 4.97967 20.9344 5.98292 20.9435 7.03171C20.9526 8.07776 20.5515 9.08563 19.8265 9.83941L16.833 12.8329C16.4274 13.2386 15.9393 13.5524 15.4019 13.7529C14.8645 13.9533 14.2903 14.0359 13.7181 13.9949C13.146 13.9539 12.5894 13.7904 12.0861 13.5154C11.5827 13.2404 11.1444 12.8604 10.8008 12.401C10.47 11.9588 9.84333 11.8685 9.40108 12.1993C8.95883 12.5301 8.86849 13.1568 9.1993 13.599C9.71464 14.288 10.3721 14.858 11.1272 15.2705C11.8822 15.683 12.7171 15.9283 13.5753 15.9898C14.4334 16.0513 15.2948 15.9274 16.1009 15.6267C16.907 15.326 17.639 14.8555 18.2473 14.247L21.2472 11.2471L21.2593 11.2347C22.3523 10.1031 22.9571 8.58751 22.9434 7.01433C22.9297 5.44115 22.2987 3.93628 21.1863 2.82383C20.0738 1.71138 18.5689 1.08036 16.9958 1.06669Z" fill="currentColor" /><path d="M10.4247 8.0102C9.56657 7.94874 8.70522 8.07256 7.89911 8.37326C7.09305 8.67395 6.36096 9.14458 5.75272 9.753L2.75285 12.7529L2.74067 12.7653C1.64772 13.8969 1.04295 15.4125 1.05662 16.9857C1.07029 18.5589 1.70131 20.0637 2.81376 21.1762C3.9262 22.2886 5.43108 22.9196 7.00426 22.9333C8.57744 22.947 10.0931 22.3422 11.2247 21.2493L11.2371 21.2371L12.9471 19.5271C13.3376 19.1366 13.3376 18.5034 12.9471 18.1129C12.5565 17.7223 11.9234 17.7223 11.5328 18.1129L9.82932 19.8164C9.07555 20.5414 8.06768 20.9425 7.02164 20.9334C5.97285 20.9243 4.9696 20.5036 4.22797 19.762C3.48634 19.0203 3.06566 18.0171 3.05655 16.9683C3.04746 15.9222 3.44851 14.9144 4.17355 14.1606L7.16719 11.167C7.5727 10.7613 8.06071 10.4476 8.59811 10.2471C9.13552 10.0467 9.70976 9.96412 10.2819 10.0051C10.854 10.0461 11.4106 10.2096 11.9139 10.4846C12.4173 10.7596 12.8556 11.1397 13.1992 11.599C13.53 12.0412 14.1567 12.1316 14.5989 11.8007C15.0412 11.4699 15.1315 10.8433 14.8007 10.401C14.2854 9.71205 13.6279 9.14198 12.8729 8.72948C12.1178 8.31697 11.2829 8.07166 10.4247 8.0102Z" fill="currentColor" /></symbol>
891
+ <symbol id="tt-icon-list" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 6C7 5.44772 7.44772 5 8 5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H8C7.44772 7 7 6.55228 7 6Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M7 12C7 11.4477 7.44772 11 8 11H21C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H8C7.44772 13 7 12.5523 7 12Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M7 18C7 17.4477 7.44772 17 8 17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H8C7.44772 19 7 18.5523 7 18Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6C2 5.44772 2.44772 5 3 5H3.01C3.56228 5 4.01 5.44772 4.01 6C4.01 6.55228 3.56228 7 3.01 7H3C2.44772 7 2 6.55228 2 6Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M2 12C2 11.4477 2.44772 11 3 11H3.01C3.56228 11 4.01 11.4477 4.01 12C4.01 12.5523 3.56228 13 3.01 13H3C2.44772 13 2 12.5523 2 12Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M2 18C2 17.4477 2.44772 17 3 17H3.01C3.56228 17 4.01 17.4477 4.01 18C4.01 18.5523 3.56228 19 3.01 19H3C2.44772 19 2 18.5523 2 18Z" fill="currentColor" /></symbol>
892
+ <symbol id="tt-icon-list-ordered" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 6C9 5.44772 9.44772 5 10 5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H10C9.44772 7 9 6.55228 9 6Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M9 12C9 11.4477 9.44772 11 10 11H21C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H10C9.44772 13 9 12.5523 9 12Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M9 18C9 17.4477 9.44772 17 10 17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H10C9.44772 19 9 18.5523 9 18Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M3 6C3 5.44772 3.44772 5 4 5H5C5.55228 5 6 5.44772 6 6V10C6 10.5523 5.55228 11 5 11C4.44772 11 4 10.5523 4 10V7C3.44772 7 3 6.55228 3 6Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M3 10C3 9.44772 3.44772 9 4 9H6C6.55228 9 7 9.44772 7 10C7 10.5523 6.55228 11 6 11H4C3.44772 11 3 10.5523 3 10Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M5.82219 13.0431C6.54543 13.4047 6.99997 14.1319 6.99997 15C6.99997 15.5763 6.71806 16.0426 6.48747 16.35C6.31395 16.5814 6.1052 16.8044 5.91309 17H5.99997C6.55226 17 6.99997 17.4477 6.99997 18C6.99997 18.5523 6.55226 19 5.99997 19H3.99997C3.44769 19 2.99997 18.5523 2.99997 18C2.99997 17.4237 3.28189 16.9575 3.51247 16.65C3.74323 16.3424 4.03626 16.0494 4.26965 15.8161C4.27745 15.8083 4.2852 15.8006 4.29287 15.7929C4.55594 15.5298 4.75095 15.3321 4.88748 15.15C4.96287 15.0495 4.99021 14.9922 4.99911 14.9714C4.99535 14.9112 4.9803 14.882 4.9739 14.8715C4.96613 14.8588 4.95382 14.845 4.92776 14.8319C4.87723 14.8067 4.71156 14.7623 4.44719 14.8944C3.95321 15.1414 3.35254 14.9412 3.10555 14.4472C2.85856 13.9533 3.05878 13.3526 3.55276 13.1056C4.28839 12.7378 5.12272 12.6934 5.82219 13.0431Z" fill="currentColor" /></symbol>
893
+ <symbol id="tt-icon-list-todo" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6C2 4.89543 2.89543 4 4 4H8C9.10457 4 10 4.89543 10 6V10C10 11.1046 9.10457 12 8 12H4C2.89543 12 2 11.1046 2 10V6ZM8 6H4V10H8V6Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M9.70711 14.2929C10.0976 14.6834 10.0976 15.3166 9.70711 15.7071L5.70711 19.7071C5.31658 20.0976 4.68342 20.0976 4.29289 19.7071L2.29289 17.7071C1.90237 17.3166 1.90237 16.6834 2.29289 16.2929C2.68342 15.9024 3.31658 15.9024 3.70711 16.2929L5 17.5858L8.29289 14.2929C8.68342 13.9024 9.31658 13.9024 9.70711 14.2929Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M12 6C12 5.44772 12.4477 5 13 5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H13C12.4477 7 12 6.55228 12 6Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M12 12C12 11.4477 12.4477 11 13 11H21C21.5523 11 22 11.4477 22 12C22 12.5523 21.5523 13 21 13H13C12.4477 13 12 12.5523 12 12Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M12 18C12 17.4477 12.4477 17 13 17H21C21.5523 17 22 17.4477 22 18C22 18.5523 21.5523 19 21 19H13C12.4477 19 12 18.5523 12 18Z" fill="currentColor" /></symbol>
894
+ <symbol id="tt-icon-redo2" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M15.7071 2.29289C15.3166 1.90237 14.6834 1.90237 14.2929 2.29289C13.9024 2.68342 13.9024 3.31658 14.2929 3.70711L17.5858 7H9.5C7.77609 7 6.12279 7.68482 4.90381 8.90381C3.68482 10.1228 3 11.7761 3 13.5C3 14.3536 3.16813 15.1988 3.49478 15.9874C3.82144 16.7761 4.30023 17.4926 4.90381 18.0962C6.12279 19.3152 7.77609 20 9.5 20H13C13.5523 20 14 19.5523 14 19C14 18.4477 13.5523 18 13 18H9.5C8.30653 18 7.16193 17.5259 6.31802 16.682C5.90016 16.2641 5.56869 15.768 5.34254 15.2221C5.1164 14.6761 5 14.0909 5 13.5C5 12.3065 5.47411 11.1619 6.31802 10.318C7.16193 9.47411 8.30653 9 9.5 9H17.5858L14.2929 12.2929C13.9024 12.6834 13.9024 13.3166 14.2929 13.7071C14.6834 14.0976 15.3166 14.0976 15.7071 13.7071L20.7071 8.70711C21.0976 8.31658 21.0976 7.68342 20.7071 7.29289L15.7071 2.29289Z" fill="currentColor" /></symbol>
895
+ <symbol id="tt-icon-strike" viewBox="0 0 24 24"><path d="M9.00039 3H16.0001C16.5524 3 17.0001 3.44772 17.0001 4C17.0001 4.55229 16.5524 5 16.0001 5H9.00011C8.68006 4.99983 8.36412 5.07648 8.07983 5.22349C7.79555 5.37051 7.55069 5.5836 7.36585 5.84487C7.181 6.10614 7.06155 6.40796 7.01754 6.72497C6.97352 7.04198 7.00623 7.36492 7.11292 7.66667C7.29701 8.18737 7.02414 8.75872 6.50344 8.94281C5.98274 9.1269 5.4114 8.85403 5.2273 8.33333C5.01393 7.72984 4.94851 7.08396 5.03654 6.44994C5.12456 5.81592 5.36346 5.21229 5.73316 4.68974C6.10285 4.1672 6.59256 3.74101 7.16113 3.44698C7.72955 3.15303 8.36047 2.99975 9.00039 3Z" fill="currentColor" /><path d="M18 13H20C20.5523 13 21 12.5523 21 12C21 11.4477 20.5523 11 20 11H4C3.44772 11 3 11.4477 3 12C3 12.5523 3.44772 13 4 13H14C14.7956 13 15.5587 13.3161 16.1213 13.8787C16.6839 14.4413 17 15.2044 17 16C17 16.7956 16.6839 17.5587 16.1213 18.1213C15.5587 18.6839 14.7956 19 14 19H6C5.44772 19 5 19.4477 5 20C5 20.5523 5.44772 21 6 21H14C15.3261 21 16.5979 20.4732 17.5355 19.5355C18.4732 18.5979 19 17.3261 19 16C19 14.9119 18.6453 13.8604 18 13Z" fill="currentColor" /></symbol>
896
+ <symbol id="tt-icon-subscript" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.29289 7.29289C3.68342 6.90237 4.31658 6.90237 4.70711 7.29289L12.7071 15.2929C13.0976 15.6834 13.0976 16.3166 12.7071 16.7071C12.3166 17.0976 11.6834 17.0976 11.2929 16.7071L3.29289 8.70711C2.90237 8.31658 2.90237 7.68342 3.29289 7.29289Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7071 7.29289C13.0976 7.68342 13.0976 8.31658 12.7071 8.70711L4.70711 16.7071C4.31658 17.0976 3.68342 17.0976 3.29289 16.7071C2.90237 16.3166 2.90237 15.6834 3.29289 15.2929L11.2929 7.29289C11.6834 6.90237 12.3166 6.90237 12.7071 7.29289Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M17.4079 14.3995C18.0284 14.0487 18.7506 13.9217 19.4536 14.0397C20.1566 14.1578 20.7977 14.5138 21.2696 15.0481L21.2779 15.0574L21.2778 15.0575C21.7439 15.5988 22 16.2903 22 17C22 18.0823 21.3962 18.8401 20.7744 19.3404C20.194 19.8073 19.4858 20.141 18.9828 20.378C18.9638 20.387 18.9451 20.3958 18.9266 20.4045C18.4473 20.6306 18.2804 20.7817 18.1922 20.918C18.1773 20.9412 18.1619 20.9681 18.1467 21H21C21.5523 21 22 21.4477 22 22C22 22.5523 21.5523 23 21 23H17C16.4477 23 16 22.5523 16 22C16 21.1708 16.1176 20.4431 16.5128 19.832C16.9096 19.2184 17.4928 18.8695 18.0734 18.5956C18.6279 18.334 19.138 18.0901 19.5207 17.7821C19.8838 17.49 20 17.2477 20 17C20 16.7718 19.9176 16.5452 19.7663 16.3672C19.5983 16.1792 19.3712 16.0539 19.1224 16.0121C18.8722 15.9701 18.6152 16.015 18.3942 16.1394C18.1794 16.2628 18.0205 16.4549 17.9422 16.675C17.7572 17.1954 17.1854 17.4673 16.665 17.2822C16.1446 17.0972 15.8728 16.5254 16.0578 16.005C16.2993 15.3259 16.7797 14.7584 17.4039 14.4018L17.4079 14.3995L17.4079 14.3995Z" fill="currentColor" /></symbol>
897
+ <symbol id="tt-icon-superscript" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.7071 7.29289C13.0976 7.68342 13.0976 8.31658 12.7071 8.70711L4.70711 16.7071C4.31658 17.0976 3.68342 17.0976 3.29289 16.7071C2.90237 16.3166 2.90237 15.6834 3.29289 15.2929L11.2929 7.29289C11.6834 6.90237 12.3166 6.90237 12.7071 7.29289Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M3.29289 7.29289C3.68342 6.90237 4.31658 6.90237 4.70711 7.29289L12.7071 15.2929C13.0976 15.6834 13.0976 16.3166 12.7071 16.7071C12.3166 17.0976 11.6834 17.0976 11.2929 16.7071L3.29289 8.70711C2.90237 8.31658 2.90237 7.68342 3.29289 7.29289Z" fill="currentColor" /><path fill-rule="evenodd" clip-rule="evenodd" d="M17.405 1.40657C18.0246 1.05456 18.7463 0.92634 19.4492 1.04344C20.1521 1.16054 20.7933 1.51583 21.2652 2.0497L21.2697 2.05469L21.2696 2.05471C21.7431 2.5975 22 3.28922 22 4.00203C22 5.08579 21.3952 5.84326 20.7727 6.34289C20.1966 6.80531 19.4941 7.13675 18.9941 7.37261C18.9714 7.38332 18.9491 7.39383 18.9273 7.40415C18.4487 7.63034 18.2814 7.78152 18.1927 7.91844C18.1778 7.94155 18.1625 7.96834 18.1473 8.00003H21C21.5523 8.00003 22 8.44774 22 9.00003C22 9.55231 21.5523 10 21 10H17C16.4477 10 16 9.55231 16 9.00003C16 8.17007 16.1183 7.44255 16.5138 6.83161C16.9107 6.21854 17.4934 5.86971 18.0728 5.59591C18.6281 5.33347 19.1376 5.09075 19.5208 4.78316C19.8838 4.49179 20 4.25026 20 4.00203C20 3.77192 19.9178 3.54865 19.7646 3.37182C19.5968 3.18324 19.3696 3.05774 19.1205 3.01625C18.8705 2.97459 18.6137 3.02017 18.3933 3.14533C18.1762 3.26898 18.0191 3.45826 17.9406 3.67557C17.7531 4.19504 17.18 4.46414 16.6605 4.27662C16.141 4.0891 15.8719 3.51596 16.0594 2.99649C16.303 2.3219 16.7817 1.76125 17.4045 1.40689L17.405 1.40657Z" fill="currentColor" /></symbol>
898
+ <symbol id="tt-icon-trash" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 5V4C7 3.17477 7.40255 2.43324 7.91789 1.91789C8.43324 1.40255 9.17477 1 10 1H14C14.8252 1 15.5668 1.40255 16.0821 1.91789C16.5975 2.43324 17 3.17477 17 4V5H21C21.5523 5 22 5.44772 22 6C22 6.55228 21.5523 7 21 7H20V20C20 20.8252 19.5975 21.5668 19.0821 22.0821C18.5668 22.5975 17.8252 23 17 23H7C6.17477 23 5.43324 22.5975 4.91789 22.0821C4.40255 21.5668 4 20.8252 4 20V7H3C2.44772 7 2 6.55228 2 6C2 5.44772 2.44772 5 3 5H7ZM9 4C9 3.82523 9.09745 3.56676 9.33211 3.33211C9.56676 3.09745 9.82523 3 10 3H14C14.1748 3 14.4332 3.09745 14.6679 3.33211C14.9025 3.56676 15 3.82523 15 4V5H9V4ZM6 7V20C6 20.1748 6.09745 20.4332 6.33211 20.6679C6.56676 20.9025 6.82523 21 7 21H17C17.1748 21 17.4332 20.9025 17.6679 20.6679C17.9025 20.4332 18 20.1748 18 20V7H6Z" fill="currentColor" /></symbol>
899
+ <symbol id="tt-icon-underline" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M7 4C7 3.44772 6.55228 3 6 3C5.44772 3 5 3.44772 5 4V10C5 11.8565 5.7375 13.637 7.05025 14.9497C8.36301 16.2625 10.1435 17 12 17C13.8565 17 15.637 16.2625 16.9497 14.9497C18.2625 13.637 19 11.8565 19 10V4C19 3.44772 18.5523 3 18 3C17.4477 3 17 3.44772 17 4V10C17 11.3261 16.4732 12.5979 15.5355 13.5355C14.5979 14.4732 13.3261 15 12 15C10.6739 15 9.40215 14.4732 8.46447 13.5355C7.52678 12.5979 7 11.3261 7 10V4ZM4 19C3.44772 19 3 19.4477 3 20C3 20.5523 3.44772 21 4 21H20C20.5523 21 21 20.5523 21 20C21 19.4477 20.5523 19 20 19H4Z" fill="currentColor" /></symbol>
900
+ <symbol id="tt-icon-undo2" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M9.70711 3.70711C10.0976 3.31658 10.0976 2.68342 9.70711 2.29289C9.31658 1.90237 8.68342 1.90237 8.29289 2.29289L3.29289 7.29289C2.90237 7.68342 2.90237 8.31658 3.29289 8.70711L8.29289 13.7071C8.68342 14.0976 9.31658 14.0976 9.70711 13.7071C10.0976 13.3166 10.0976 12.6834 9.70711 12.2929L6.41421 9H14.5C15.0909 9 15.6761 9.1164 16.2221 9.34254C16.768 9.56869 17.2641 9.90016 17.682 10.318C18.0998 10.7359 18.4313 11.232 18.6575 11.7779C18.8836 12.3239 19 12.9091 19 13.5C19 14.0909 18.8836 14.6761 18.6575 15.2221C18.4313 15.768 18.0998 16.2641 17.682 16.682C17.2641 17.0998 16.768 17.4313 16.2221 17.6575C15.6761 17.8836 15.0909 18 14.5 18H11C10.4477 18 10 18.4477 10 19C10 19.5523 10.4477 20 11 20H14.5C15.3536 20 16.1988 19.8319 16.9874 19.5052C17.7761 19.1786 18.4926 18.6998 19.0962 18.0962C19.6998 17.4926 20.1786 16.7761 20.5052 15.9874C20.8319 15.1988 21 14.3536 21 13.5C21 12.6464 20.8319 11.8012 20.5052 11.0126C20.1786 10.2239 19.6998 9.50739 19.0962 8.90381C18.4926 8.30022 17.7761 7.82144 16.9874 7.49478C16.1988 7.16813 15.3536 7 14.5 7H6.41421L9.70711 3.70711Z" fill="currentColor" /></symbol>
901
+ <symbol id="tt-icon-paperclip" viewBox="0 0 24 24"><path d="m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></symbol>
902
+ <symbol id="tt-icon-youtube" viewBox="0 0 24 24"><path d="M2.5 17a24.12 24.12 0 0 1 0-10 2 2 0 0 1 1.4-1.4 49.56 49.56 0 0 1 16.2 0A2 2 0 0 1 21.5 7a24.12 24.12 0 0 1 0 10 2 2 0 0 1-1.4 1.4 49.55 49.55 0 0 1-16.2 0A2 2 0 0 1 2.5 17" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="m10 15 5-3-5-3z" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></symbol>
903
+ <symbol id="tt-icon-table" viewBox="0 0 24 24"><path d="M12 3v18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><rect width="18" height="18" x="3" y="3" rx="2" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M3 9h18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M3 15h18" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></symbol>
904
+ <symbol id="tt-icon-file-text" viewBox="0 0 24 24"><path d="M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M14 2v4a2 2 0 0 0 2 2h4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M10 9H8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M16 13H8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /><path d="M16 17H8" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" /></symbol>
905
+ </svg>
906
+ `, Uo = /* @__PURE__ */ b({
907
+ __name: "Icon",
908
+ props: {
909
+ name: null
910
+ },
911
+ setup(n) {
912
+ const t = "tiptap-icon-sprite";
913
+ if (typeof document < "u" && !document.getElementById(t)) {
914
+ const o = document.createElement("div");
915
+ o.id = t, o.hidden = !0, o.innerHTML = Zo, document.body.prepend(o);
916
+ }
917
+ return { __sfc: !0, SPRITE_ID: t };
918
+ }
919
+ });
920
+ var jo = function() {
921
+ var t = this, o = t._self._c;
922
+ return t._self._setupProxy, o("svg", { attrs: { width: "24", height: "24", "aria-hidden": "true", focusable: "false" } }, [o("use", { attrs: { href: `#tt-icon-${t.name}` } })]);
923
+ }, Ko = [], qo = /* @__PURE__ */ _(
924
+ Uo,
925
+ jo,
926
+ Ko
927
+ );
928
+ const E = qo.exports, Go = /* @__PURE__ */ b({
929
+ __name: "CommandButton",
930
+ props: {
931
+ command: null,
932
+ text: null,
933
+ editor: null
934
+ },
935
+ setup(n) {
936
+ const t = n, o = M(), e = $(() => t.editor), { isActive: r, canRun: s } = Z(
937
+ B(
938
+ e,
939
+ (i) => ({
940
+ isActive: t.command.isActive?.(i) ?? !1,
941
+ canRun: t.command.canRun(i)
942
+ }),
943
+ { deps: () => t.command }
944
+ )
945
+ );
946
+ return { __sfc: !0, t: o, props: t, editor: e, isActive: r, canRun: s, Button: S, Icon: E };
947
+ }
948
+ });
949
+ var zo = function() {
950
+ var t = this, o = t._self._c, e = t._self._setupProxy;
951
+ return o(e.Button, { attrs: { type: "button", role: "button", tabindex: -1, disabled: !e.canRun, "data-disabled": !e.canRun, "data-active-state": e.isActive ? "on" : "off", "aria-pressed": t.command.isActive ? String(e.isActive) : void 0, "aria-label": t.command.label(e.t), tooltip: t.command.label(e.t), "shortcut-keys": t.command.shortcutKeys }, on: { click: function(r) {
952
+ return t.command.run(e.editor);
953
+ } } }, [t._t("default", function() {
954
+ return [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: t.command.icon } }), t.text ? o("span", { staticClass: "tiptap-button-text" }, [t._v(t._s(t.text))]) : t._e()];
955
+ })], 2);
956
+ }, Yo = [], Wo = /* @__PURE__ */ _(
957
+ Go,
958
+ zo,
959
+ Yo
960
+ );
961
+ const _e = Wo.exports;
962
+ let Jo = 0;
963
+ const Xo = typeof CSS < "u" && CSS.supports("anchor-name: --a");
964
+ function It({
965
+ open: n,
966
+ setOpen: t,
967
+ align: o = () => "center",
968
+ sideOffset: e = () => 4
969
+ }) {
970
+ const r = `tiptap-popover-${++Jo}`, s = `--${r}`, i = g(null), l = () => i.value?.matches(":popover-open") ?? !1, a = () => {
971
+ const m = i.value, h = document.querySelector(`[popovertarget="${r}"]`);
972
+ if (Xo || !m || !h) return;
973
+ const w = h.getBoundingClientRect(), I = m.offsetWidth, H = o() === "start" ? w.left : o() === "end" ? w.right - I : w.left + w.width / 2 - I / 2;
974
+ m.style.top = `${w.bottom + e()}px`, m.style.left = `${Math.max(4, Math.min(H, window.innerWidth - I - 4))}px`;
975
+ }, u = () => {
976
+ n() && !l() && i.value?.showPopover();
977
+ };
978
+ x(
979
+ n,
980
+ (m) => {
981
+ const h = i.value;
982
+ if (!(!h || m === l())) {
983
+ if (!m) return h.hidePopover();
984
+ Tn() ? ft(u) : u();
985
+ }
986
+ },
987
+ { flush: "post" }
988
+ );
989
+ const c = (m) => {
990
+ const h = m.newState === "open";
991
+ h !== n() && t(h), h && (requestAnimationFrame(a), ee(
992
+ () => i.value?.querySelector("[autofocus]")?.focus()
993
+ ));
994
+ }, p = L(() => ({
995
+ popovertarget: r,
996
+ "aria-controls": r,
997
+ // A string: Vue 2 would drop the attribute when `false`
998
+ "aria-expanded": String(n()),
999
+ "data-state": n() ? "open" : "closed",
1000
+ style: { anchorName: s }
1001
+ })), d = L(() => ({
1002
+ id: r,
1003
+ popover: "auto",
1004
+ "data-state": n() ? "open" : "closed",
1005
+ "data-side": "bottom",
1006
+ "data-align": o(),
1007
+ style: {
1008
+ positionAnchor: s,
1009
+ "--tt-popover-offset": `${e()}px`
1010
+ }
1011
+ }));
1012
+ return { id: r, contentRef: i, triggerAttrs: p, contentAttrs: d, onToggle: c, close: () => t(!1) };
1013
+ }
1014
+ const Qo = /* @__PURE__ */ b({
1015
+ __name: "Portal",
1016
+ setup(n) {
1017
+ const t = Xt(), o = () => t?.proxy.$el;
1018
+ return G(() => {
1019
+ const e = o();
1020
+ e instanceof HTMLElement && document.body.appendChild(e);
1021
+ }), q(() => {
1022
+ o()?.remove();
1023
+ }), { __sfc: !0, instance: t, element: o };
1024
+ }
1025
+ });
1026
+ var er = function() {
1027
+ var t = this, o = t._self._c;
1028
+ return t._self._setupProxy, o("div", { staticClass: "rt-portal" }, [t._t("default")], 2);
1029
+ }, tr = [], nr = /* @__PURE__ */ _(
1030
+ Qo,
1031
+ er,
1032
+ tr
1033
+ );
1034
+ const ge = nr.exports, or = { inheritAttrs: !1 }, rr = /* @__PURE__ */ b({
1035
+ ...or,
1036
+ __name: "DropdownMenu",
1037
+ props: {
1038
+ open: { type: Boolean, default: !1 },
1039
+ align: { default: "start" },
1040
+ sideOffset: { default: 4 }
1041
+ },
1042
+ emits: ["update:open"],
1043
+ setup(n, { emit: t }) {
1044
+ const o = n, { contentRef: e, triggerAttrs: r, contentAttrs: s, onToggle: i, close: l } = It({
1045
+ open: () => o.open,
1046
+ setOpen: (p) => t("update:open", p),
1047
+ align: () => o.align,
1048
+ sideOffset: () => o.sideOffset
1049
+ }), a = () => Array.from(
1050
+ e.value?.querySelectorAll(
1051
+ '[role="menuitem"]:not([disabled]), button:not([disabled])'
1052
+ ) ?? []
1053
+ );
1054
+ x(
1055
+ () => o.open,
1056
+ async (p) => {
1057
+ p && (await ee(), a()[0]?.focus());
1058
+ }
1059
+ );
1060
+ function u(p) {
1061
+ const d = a();
1062
+ if (!d.length) return;
1063
+ const f = d.indexOf(document.activeElement), m = (h) => {
1064
+ p.preventDefault(), d[(h + d.length) % d.length]?.focus();
1065
+ };
1066
+ switch (p.key) {
1067
+ case "ArrowDown":
1068
+ return m(f + 1);
1069
+ case "ArrowUp":
1070
+ return m(f - 1);
1071
+ case "Home":
1072
+ return m(0);
1073
+ case "End":
1074
+ return m(d.length - 1);
1075
+ }
1076
+ }
1077
+ function c(p) {
1078
+ const d = p.target.closest("button");
1079
+ d && e.value?.contains(d) && l();
1080
+ }
1081
+ return { __sfc: !0, props: o, emit: t, contentRef: e, triggerAttrs: r, contentAttrs: s, onToggle: i, close: l, getItems: a, onKeyDown: u, onClick: c, Portal: ge };
1082
+ }
1083
+ });
1084
+ var ir = function() {
1085
+ var t = this, o = t._self._c, e = t._self._setupProxy;
1086
+ return o("span", { staticClass: "tiptap-popover-root" }, [t._t("trigger", null, { attrs: { ...e.triggerAttrs, "aria-haspopup": "menu" } }), o(e.Portal, [o("div", t._b({ ref: "contentRef", staticClass: "tiptap-dropdown-menu-content tiptap-anchored", attrs: { role: "menu" }, on: { toggle: e.onToggle, keydown: e.onKeyDown, click: e.onClick } }, "div", { ...e.contentAttrs, ...t.$attrs }, !1), [t.open ? t._t("default") : t._e()], 2)])], 2);
1087
+ }, sr = [], ar = /* @__PURE__ */ _(
1088
+ rr,
1089
+ ir,
1090
+ sr
1091
+ );
1092
+ const ae = ar.exports, lr = /* @__PURE__ */ b({
1093
+ __name: "HeadingDropdownMenu",
1094
+ props: {
1095
+ levels: { default: () => [1, 2, 3, 4, 5, 6] }
1096
+ },
1097
+ setup(n) {
1098
+ const t = n, o = M(), e = $(), r = g(!1), {
1099
+ activeLevel: s,
1100
+ isActive: i,
1101
+ canToggle: l
1102
+ } = Z(
1103
+ B(
1104
+ e,
1105
+ (a) => ({
1106
+ activeLevel: No(a, t.levels),
1107
+ isActive: Fe(a),
1108
+ canToggle: De(a)
1109
+ }),
1110
+ { deps: () => t.levels.join() }
1111
+ )
1112
+ );
1113
+ return { __sfc: !0, t: o, props: t, editor: e, isOpen: r, activeLevel: s, isActive: i, canToggleHeading: l, headingCommand: Fo, headingIcons: Tt, CommandButton: _e, Button: S, DropdownMenu: ae, Icon: E, ChevronDownIcon: se, HeadingIcon: yo };
1114
+ }
1115
+ });
1116
+ var cr = function() {
1117
+ var t = this, o = t._self._c, e = t._self._setupProxy;
1118
+ return o(e.DropdownMenu, { attrs: { open: e.isOpen, align: "start" }, on: { "update:open": function(r) {
1119
+ e.isOpen = r;
1120
+ } }, scopedSlots: t._u([{ key: "trigger", fn: function({ attrs: r }) {
1121
+ return [o(e.Button, t._b({ attrs: { type: "button", "data-active-state": e.isActive ? "on" : "off", role: "button", tabindex: -1, disabled: !e.canToggleHeading, "data-disabled": !e.canToggleHeading, "aria-label": e.t.heading.menu, "aria-pressed": String(e.isActive), tooltip: e.t.heading.button } }, "Button", r, !1), [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.activeLevel ? e.headingIcons[e.activeLevel] : e.HeadingIcon } }), o(e.Icon, { staticClass: "tiptap-button-dropdown-small", attrs: { name: e.ChevronDownIcon } })], 1)];
1122
+ } }]) }, [o("div", { staticClass: "tiptap-dropdown-menu-group" }, t._l(t.levels, function(r) {
1123
+ return o(e.CommandButton, { key: r, attrs: { command: e.headingCommand(r), text: e.t.heading.level(r), role: "menuitem", "show-tooltip": !1 } });
1124
+ }), 1)]);
1125
+ }, ur = [], dr = /* @__PURE__ */ _(
1126
+ lr,
1127
+ cr,
1128
+ ur
1129
+ );
1130
+ const pr = dr.exports, Ht = {
1131
+ bulletList: Ve,
1132
+ orderedList: Lt,
1133
+ taskList: xt
1134
+ }, fr = {
1135
+ bulletList: "mod+shift+8",
1136
+ orderedList: "mod+shift+7",
1137
+ taskList: "mod+shift+9"
1138
+ };
1139
+ function Ne(n, t, o = !0) {
1140
+ if (!n || !n.isEditable || !Ce(t, n) || N(n, ["image"]))
1141
+ return !1;
1142
+ if (!o)
1143
+ switch (t) {
1144
+ case "bulletList":
1145
+ return n.can().toggleBulletList();
1146
+ case "orderedList":
1147
+ return n.can().toggleOrderedList();
1148
+ case "taskList":
1149
+ return n.can().toggleList("taskList", "taskItem");
1150
+ default:
1151
+ return !1;
1152
+ }
1153
+ if (!K(n, [
1154
+ "paragraph",
1155
+ "heading",
1156
+ "bulletList",
1157
+ "orderedList",
1158
+ "taskList",
1159
+ "blockquote",
1160
+ "codeBlock"
1161
+ ]))
1162
+ return !1;
1163
+ switch (t) {
1164
+ case "bulletList":
1165
+ return n.can().toggleBulletList() || n.can().clearNodes();
1166
+ case "orderedList":
1167
+ return n.can().toggleOrderedList() || n.can().clearNodes();
1168
+ case "taskList":
1169
+ return n.can().toggleList("taskList", "taskItem") || n.can().clearNodes();
1170
+ default:
1171
+ return !1;
1172
+ }
1173
+ }
1174
+ function Ze(n, t) {
1175
+ if (!n || !n.isEditable) return !1;
1176
+ switch (t) {
1177
+ case "bulletList":
1178
+ return n.isActive("bulletList");
1179
+ case "orderedList":
1180
+ return n.isActive("orderedList");
1181
+ case "taskList":
1182
+ return n.isActive("taskList");
1183
+ default:
1184
+ return !1;
1185
+ }
1186
+ }
1187
+ function mr(n, t) {
1188
+ if (!n || !n.isEditable || !Ne(n, t)) return !1;
1189
+ try {
1190
+ const o = n.view;
1191
+ let e = o.state, r = e.tr;
1192
+ const s = ve(n), i = K(n, [
1193
+ "paragraph",
1194
+ "heading",
1195
+ "bulletList",
1196
+ "orderedList",
1197
+ "taskList",
1198
+ "blockquote",
1199
+ "codeBlock"
1200
+ ]) && s.length === 1;
1201
+ if ((e.selection.empty || e.selection instanceof F) && i) {
1202
+ const u = he({
1203
+ editor: n,
1204
+ node: e.selection.$anchor.node(1)
1205
+ })?.pos;
1206
+ if (!re(u)) return !1;
1207
+ r = r.setSelection(P.create(e.doc, u)), o.dispatch(r), e = o.state;
1208
+ }
1209
+ const l = e.selection;
1210
+ let a = n.chain().focus();
1211
+ if (l instanceof P) {
1212
+ const u = l.node.firstChild?.firstChild, c = l.node.lastChild?.lastChild, p = u ? l.from + u.nodeSize : l.from + 1, d = c ? l.to - c.nodeSize : l.to - 1, f = e.doc.resolve(p), m = e.doc.resolve(d);
1213
+ a = a.setTextSelection(F.between(f, m)).clearNodes();
1214
+ }
1215
+ if (n.isActive(t))
1216
+ a.liftListItem("listItem").lift("bulletList").lift("orderedList").lift("taskList").run();
1217
+ else {
1218
+ const c = {
1219
+ bulletList: () => a.toggleBulletList(),
1220
+ orderedList: () => a.toggleOrderedList(),
1221
+ taskList: () => a.toggleList("taskList", "taskItem")
1222
+ }[t];
1223
+ if (!c) return !1;
1224
+ c().run();
1225
+ }
1226
+ return n.chain().focus().selectTextblockEnd().run(), !0;
1227
+ } catch {
1228
+ return !1;
1229
+ }
1230
+ }
1231
+ const Cr = (n) => U(`list:${n}`, () => ({
1232
+ label: (t) => t.list[n],
1233
+ icon: Ht[n],
1234
+ shortcutKeys: fr[n],
1235
+ isActive: (t) => Ze(t, n),
1236
+ canRun: (t) => Ne(t, n),
1237
+ run: (t) => mr(t, n)
1238
+ })), hr = [
1239
+ {
1240
+ type: "bulletList",
1241
+ icon: Ve
1242
+ },
1243
+ {
1244
+ type: "orderedList",
1245
+ icon: Lt
1246
+ },
1247
+ {
1248
+ type: "taskList",
1249
+ icon: xt
1250
+ }
1251
+ ];
1252
+ function vr(n, t) {
1253
+ return !n || !n.isEditable ? !1 : t.some((o) => Ne(n, o));
1254
+ }
1255
+ function _r(n, t) {
1256
+ return !n || !n.isEditable ? !1 : t.some((o) => Ze(n, o));
1257
+ }
1258
+ function gr(n) {
1259
+ return hr.filter(
1260
+ (t) => !t.type || n.includes(t.type)
1261
+ );
1262
+ }
1263
+ function br(n, t) {
1264
+ if (!(!n || !n.isEditable))
1265
+ return t.find((o) => Ze(n, o));
1266
+ }
1267
+ const yr = /* @__PURE__ */ b({
1268
+ __name: "ListDropdownMenu",
1269
+ props: {
1270
+ types: { default: () => ["bulletList", "orderedList", "taskList"] }
1271
+ },
1272
+ setup(n) {
1273
+ const t = n, o = M(), e = $(), r = g(!1), { activeType: s, isActive: i, canToggle: l } = Z(
1274
+ B(
1275
+ e,
1276
+ (a) => ({
1277
+ activeType: br(a, t.types),
1278
+ isActive: _r(a, t.types),
1279
+ canToggle: vr(a, t.types)
1280
+ }),
1281
+ { deps: () => t.types.join() }
1282
+ )
1283
+ );
1284
+ return { __sfc: !0, t: o, props: t, editor: e, isOpen: r, activeType: s, isActive: i, canToggle: l, getFilteredListOptions: gr, listCommand: Cr, listIcons: Ht, CommandButton: _e, Button: S, DropdownMenu: ae, Icon: E, ChevronDownIcon: se, ListIcon: Ve };
1285
+ }
1286
+ });
1287
+ var kr = function() {
1288
+ var t = this, o = t._self._c, e = t._self._setupProxy;
1289
+ return o(e.DropdownMenu, { attrs: { open: e.isOpen, align: "start" }, on: { "update:open": function(r) {
1290
+ e.isOpen = r;
1291
+ } }, scopedSlots: t._u([{ key: "trigger", fn: function({ attrs: r }) {
1292
+ return [o(e.Button, t._b({ attrs: { type: "button", "data-active-state": e.isActive ? "on" : "off", role: "button", tabindex: -1, disabled: !e.canToggle, "data-disabled": !e.canToggle, "aria-label": e.t.list.menu, tooltip: e.t.list.button } }, "Button", r, !1), [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.activeType ? e.listIcons[e.activeType] : e.ListIcon } }), o(e.Icon, { staticClass: "tiptap-button-dropdown-small", attrs: { name: e.ChevronDownIcon } })], 1)];
1293
+ } }]) }, [o("div", { staticClass: "tiptap-dropdown-menu-group" }, t._l(e.getFilteredListOptions(t.types), function(r) {
1294
+ return o(e.CommandButton, { key: r.type, attrs: { command: e.listCommand(r.type), text: e.t.list[r.type], role: "menuitem", "show-tooltip": !1 } });
1295
+ }), 1)]);
1296
+ }, wr = [], Lr = /* @__PURE__ */ _(
1297
+ yr,
1298
+ kr,
1299
+ wr
1300
+ );
1301
+ const xr = Lr.exports, Tr = "mod+shift+b";
1302
+ function Mt(n, t = !0) {
1303
+ return !n || !n.isEditable || !Ce("blockquote", n) || N(n, ["image"]) ? !1 : t ? K(n, [
1304
+ "paragraph",
1305
+ "heading",
1306
+ "bulletList",
1307
+ "orderedList",
1308
+ "taskList",
1309
+ "blockquote",
1310
+ "codeBlock"
1311
+ ]) ? n.can().toggleWrap("blockquote") || n.can().clearNodes() : !1 : n.can().toggleWrap("blockquote");
1312
+ }
1313
+ function Ir(n) {
1314
+ if (!n || !n.isEditable || !Mt(n)) return !1;
1315
+ try {
1316
+ const t = n.view;
1317
+ let o = t.state, e = o.tr;
1318
+ const r = ve(n), s = K(n, [
1319
+ "paragraph",
1320
+ "heading",
1321
+ "bulletList",
1322
+ "orderedList",
1323
+ "taskList",
1324
+ "blockquote",
1325
+ "codeBlock"
1326
+ ]) && r.length === 1;
1327
+ if ((o.selection.empty || o.selection instanceof F) && s) {
1328
+ const u = he({
1329
+ editor: n,
1330
+ node: o.selection.$anchor.node(1)
1331
+ })?.pos;
1332
+ if (!re(u)) return !1;
1333
+ e = e.setSelection(P.create(o.doc, u)), t.dispatch(e), o = t.state;
1334
+ }
1335
+ const i = o.selection;
1336
+ let l = n.chain().focus();
1337
+ if (i instanceof P) {
1338
+ const u = i.node.firstChild?.firstChild, c = i.node.lastChild?.lastChild, p = u ? i.from + u.nodeSize : i.from + 1, d = c ? i.to - c.nodeSize : i.to - 1, f = o.doc.resolve(p), m = o.doc.resolve(d);
1339
+ l = l.setTextSelection(F.between(f, m)).clearNodes();
1340
+ }
1341
+ return (n.isActive("blockquote") ? l.lift("blockquote") : l.wrapIn("blockquote")).run(), n.chain().focus().selectTextblockEnd().run(), !0;
1342
+ } catch {
1343
+ return !1;
1344
+ }
1345
+ }
1346
+ const Hr = () => U("blockquote", () => ({
1347
+ label: (n) => n.blockquote,
1348
+ icon: mo,
1349
+ shortcutKeys: Tr,
1350
+ isActive: (n) => n?.isActive("blockquote") ?? !1,
1351
+ canRun: (n) => Mt(n),
1352
+ run: (n) => Ir(n)
1353
+ })), Mr = "mod+alt+c";
1354
+ function At(n, t = !0) {
1355
+ return !n || !n.isEditable || !Ce("codeBlock", n) || N(n, ["image"]) ? !1 : t ? K(n, [
1356
+ "paragraph",
1357
+ "heading",
1358
+ "bulletList",
1359
+ "orderedList",
1360
+ "taskList",
1361
+ "blockquote",
1362
+ "codeBlock"
1363
+ ]) ? n.can().toggleNode("codeBlock", "paragraph") || n.can().clearNodes() : !1 : n.can().toggleNode("codeBlock", "paragraph");
1364
+ }
1365
+ function Ar(n) {
1366
+ if (!n || !n.isEditable || !At(n)) return !1;
1367
+ try {
1368
+ const t = n.view;
1369
+ let o = t.state, e = o.tr;
1370
+ const r = ve(n), s = K(n, [
1371
+ "paragraph",
1372
+ "heading",
1373
+ "bulletList",
1374
+ "orderedList",
1375
+ "taskList",
1376
+ "blockquote",
1377
+ "codeBlock"
1378
+ ]) && r.length === 1;
1379
+ if ((o.selection.empty || o.selection instanceof F) && s) {
1380
+ const u = he({
1381
+ editor: n,
1382
+ node: o.selection.$anchor.node(1)
1383
+ })?.pos;
1384
+ if (!re(u)) return !1;
1385
+ e = e.setSelection(P.create(o.doc, u)), t.dispatch(e), o = t.state;
1386
+ }
1387
+ const i = o.selection;
1388
+ let l = n.chain().focus();
1389
+ if (i instanceof P) {
1390
+ const u = i.node.firstChild?.firstChild, c = i.node.lastChild?.lastChild, p = u ? i.from + u.nodeSize : i.from + 1, d = c ? i.to - c.nodeSize : i.to - 1, f = o.doc.resolve(p), m = o.doc.resolve(d);
1391
+ l = l.setTextSelection(F.between(f, m)).clearNodes();
1392
+ }
1393
+ return (n.isActive("codeBlock") ? l.setNode("paragraph") : l.toggleNode("codeBlock", "paragraph")).run(), n.chain().focus().selectTextblockEnd().run(), !0;
1394
+ } catch {
1395
+ return !1;
1396
+ }
1397
+ }
1398
+ const Sr = () => U("codeBlock", () => ({
1399
+ label: (n) => n.codeBlock,
1400
+ icon: ho,
1401
+ shortcutKeys: Mr,
1402
+ isActive: (n) => n?.isActive("codeBlock") ?? !1,
1403
+ canRun: (n) => At(n),
1404
+ run: (n) => Ar(n)
1405
+ })), $r = "mod+shift+h", Br = [
1406
+ {
1407
+ name: "default",
1408
+ value: "var(--tt-bg-color)",
1409
+ colorValue: "#ffffff",
1410
+ border: "var(--tt-bg-color-contrast)"
1411
+ },
1412
+ {
1413
+ name: "gray",
1414
+ value: "var(--tt-color-highlight-gray)",
1415
+ colorValue: "#f8f8f7",
1416
+ border: "var(--tt-color-highlight-gray-contrast)"
1417
+ },
1418
+ {
1419
+ name: "brown",
1420
+ value: "var(--tt-color-highlight-brown)",
1421
+ colorValue: "#f4eeee",
1422
+ border: "var(--tt-color-highlight-brown-contrast)"
1423
+ },
1424
+ {
1425
+ name: "orange",
1426
+ value: "var(--tt-color-highlight-orange)",
1427
+ colorValue: "#fbecdd",
1428
+ border: "var(--tt-color-highlight-orange-contrast)"
1429
+ },
1430
+ {
1431
+ name: "yellow",
1432
+ value: "var(--tt-color-highlight-yellow)",
1433
+ colorValue: "#fef9c3",
1434
+ border: "var(--tt-color-highlight-yellow-contrast)"
1435
+ },
1436
+ {
1437
+ name: "green",
1438
+ value: "var(--tt-color-highlight-green)",
1439
+ colorValue: "#dcfce7",
1440
+ border: "var(--tt-color-highlight-green-contrast)"
1441
+ },
1442
+ {
1443
+ name: "blue",
1444
+ value: "var(--tt-color-highlight-blue)",
1445
+ colorValue: "#e0f2fe",
1446
+ border: "var(--tt-color-highlight-blue-contrast)"
1447
+ },
1448
+ {
1449
+ name: "purple",
1450
+ value: "var(--tt-color-highlight-purple)",
1451
+ colorValue: "#f3e8ff",
1452
+ border: "var(--tt-color-highlight-purple-contrast)"
1453
+ },
1454
+ {
1455
+ name: "pink",
1456
+ value: "var(--tt-color-highlight-pink)",
1457
+ colorValue: "#fcf1f6",
1458
+ border: "var(--tt-color-highlight-pink-contrast)"
1459
+ },
1460
+ {
1461
+ name: "red",
1462
+ value: "var(--tt-color-highlight-red)",
1463
+ colorValue: "#ffe4e6",
1464
+ border: "var(--tt-color-highlight-red-contrast)"
1465
+ }
1466
+ ];
1467
+ function Er(n) {
1468
+ const t = new Map(
1469
+ Br.map((o) => [o.value, o])
1470
+ );
1471
+ return n.map((o) => t.get(o)).filter((o) => !!o);
1472
+ }
1473
+ function le(n) {
1474
+ return !n || !n.isEditable || !$e("highlight", n) || N(n, ["image"]) ? !1 : n.can().setMark("highlight");
1475
+ }
1476
+ function St(n, t) {
1477
+ return !n || !n.isEditable ? !1 : t ? n.isActive("highlight", { color: t }) : n.isActive("highlight");
1478
+ }
1479
+ function Rr(n, t) {
1480
+ if (!n || !le(n)) return !1;
1481
+ const o = n.schema.marks.highlight;
1482
+ return n.state.storedMarks && o && n.view.dispatch(n.state.tr.removeStoredMark(o)), setTimeout(() => n.chain().focus().toggleHighlight({ color: t }).run(), 0), !0;
1483
+ }
1484
+ function Vr(n) {
1485
+ return !n || !le(n) ? !1 : n.chain().focus().unsetMark("highlight").run();
1486
+ }
1487
+ const Or = (n) => U(`highlight:${n.value}`, () => ({
1488
+ label: (t) => t.highlight.colors[n.name],
1489
+ icon: Ee,
1490
+ isActive: (t) => St(t, n.value),
1491
+ canRun: (t) => le(t),
1492
+ run: (t) => Rr(t, n.value)
1493
+ })), Pr = () => U("highlight:none", () => ({
1494
+ label: (n) => n.highlight.remove,
1495
+ icon: wt,
1496
+ canRun: (n) => le(n),
1497
+ run: (n) => Vr(n)
1498
+ })), Dr = { inheritAttrs: !1 }, Fr = /* @__PURE__ */ b({
1499
+ ...Dr,
1500
+ __name: "Popover",
1501
+ props: {
1502
+ open: { type: Boolean, default: !1 },
1503
+ align: { default: "center" },
1504
+ sideOffset: { default: 4 }
1505
+ },
1506
+ emits: ["update:open"],
1507
+ setup(n, { emit: t }) {
1508
+ const o = n, { contentRef: e, triggerAttrs: r, contentAttrs: s, onToggle: i } = It({
1509
+ open: () => o.open,
1510
+ setOpen: (l) => t("update:open", l),
1511
+ align: () => o.align,
1512
+ sideOffset: () => o.sideOffset
1513
+ });
1514
+ return { __sfc: !0, props: o, emit: t, contentRef: e, triggerAttrs: r, contentAttrs: s, onToggle: i, Portal: ge };
1515
+ }
1516
+ });
1517
+ var Nr = function() {
1518
+ var t = this, o = t._self._c, e = t._self._setupProxy;
1519
+ return o("span", { staticClass: "tiptap-popover-root" }, [t._t("trigger", null, { attrs: e.triggerAttrs }), o(e.Portal, [o("div", t._b({ ref: "contentRef", staticClass: "tiptap-popover tiptap-anchored", on: { toggle: e.onToggle } }, "div", { ...e.contentAttrs, ...t.$attrs }, !1), [t.open ? t._t("default") : t._e()], 2)])], 2);
1520
+ }, Zr = [], Ur = /* @__PURE__ */ _(
1521
+ Fr,
1522
+ Nr,
1523
+ Zr
1524
+ );
1525
+ const be = Ur.exports, jr = /* @__PURE__ */ b({
1526
+ __name: "ColorHighlightPopoverButton",
1527
+ emits: ["click"],
1528
+ setup(n, { emit: t }) {
1529
+ return { __sfc: !0, t: M(), emit: t, Button: S, Icon: E, HighlighterIcon: Ee };
1530
+ }
1531
+ });
1532
+ var Kr = function() {
1533
+ var t = this, o = t._self._c, e = t._self._setupProxy;
1534
+ return o(e.Button, { attrs: { type: "button", role: "button", tabindex: -1, "aria-label": e.t.highlight.button, tooltip: e.t.highlight.button }, on: { click: function(r) {
1535
+ return e.emit("click", r);
1536
+ } } }, [t._t("default", function() {
1537
+ return [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.HighlighterIcon } })];
1538
+ })], 2);
1539
+ }, qr = [], Gr = /* @__PURE__ */ _(
1540
+ jr,
1541
+ Kr,
1542
+ qr
1543
+ );
1544
+ const $t = Gr.exports;
1545
+ function Ue(n = "max", t = 768) {
1546
+ const o = g(!1);
1547
+ let e = null;
1548
+ const r = (s) => o.value = s.matches;
1549
+ return G(() => {
1550
+ const s = n === "min" ? `(min-width: ${t}px)` : `(max-width: ${t - 1}px)`;
1551
+ e = window.matchMedia(s), o.value = e.matches, e.addEventListener("change", r);
1552
+ }), q(() => e?.removeEventListener("change", r)), o;
1553
+ }
1554
+ const zr = /* @__PURE__ */ b({
1555
+ __name: "ButtonGroup",
1556
+ props: {
1557
+ orientation: { default: "horizontal" }
1558
+ },
1559
+ setup(n) {
1560
+ return { __sfc: !0 };
1561
+ }
1562
+ });
1563
+ var Yr = function() {
1564
+ var t = this, o = t._self._c;
1565
+ return t._self._setupProxy, o("div", { class: ["tiptap-button-group", `tiptap-button-group-${t.orientation}`], attrs: { role: "group", "data-slot": "tiptap-button-group", "data-orientation": t.orientation } }, [t._t("default")], 2);
1566
+ }, Wr = [], Jr = /* @__PURE__ */ _(
1567
+ zr,
1568
+ Yr,
1569
+ Wr
1570
+ );
1571
+ const ye = Jr.exports, Xr = /* @__PURE__ */ b({
1572
+ __name: "Card",
1573
+ setup(n) {
1574
+ return { __sfc: !0 };
1575
+ }
1576
+ });
1577
+ var Qr = function() {
1578
+ var t = this, o = t._self._c;
1579
+ return t._self._setupProxy, o("div", { staticClass: "tiptap-card" }, [t._t("default")], 2);
1580
+ }, ei = [], ti = /* @__PURE__ */ _(
1581
+ Xr,
1582
+ Qr,
1583
+ ei
1584
+ );
1585
+ const ke = ti.exports, ni = {};
1586
+ var oi = function() {
1587
+ var t = this, o = t._self._c;
1588
+ return o("div", { staticClass: "tiptap-card-body" }, [t._t("default")], 2);
1589
+ }, ri = [], ii = /* @__PURE__ */ _(
1590
+ ni,
1591
+ oi,
1592
+ ri
1593
+ );
1594
+ const we = ii.exports, si = /* @__PURE__ */ b({
1595
+ __name: "CardItemGroup",
1596
+ props: {
1597
+ orientation: { default: "vertical" }
1598
+ },
1599
+ setup(n) {
1600
+ return { __sfc: !0 };
1601
+ }
1602
+ });
1603
+ var ai = function() {
1604
+ var t = this, o = t._self._c;
1605
+ return t._self._setupProxy, o("div", { staticClass: "tiptap-card-item-group", attrs: { "data-orientation": t.orientation } }, [t._t("default")], 2);
1606
+ }, li = [], ci = /* @__PURE__ */ _(
1607
+ si,
1608
+ ai,
1609
+ li
1610
+ );
1611
+ const Le = ci.exports, ui = /* @__PURE__ */ b({
1612
+ __name: "ColorHighlightPopoverContent",
1613
+ props: {
1614
+ colors: { default: () => Er([
1615
+ "var(--tt-color-highlight-green)",
1616
+ "var(--tt-color-highlight-blue)",
1617
+ "var(--tt-color-highlight-red)",
1618
+ "var(--tt-color-highlight-purple)",
1619
+ "var(--tt-color-highlight-yellow)"
1620
+ ]) }
1621
+ },
1622
+ setup(n) {
1623
+ const t = n, o = Ue(), e = g(null), r = L(() => e.value?.$el ?? null), { selectedIndex: s } = ht({
1624
+ containerRef: r,
1625
+ items: () => [...t.colors, null],
1626
+ orientation: "both",
1627
+ onSelect: () => r.value?.querySelector('[data-highlighted="true"]')?.click(),
1628
+ autoSelectFirstItem: !1
1629
+ });
1630
+ return { __sfc: !0, props: t, isMobile: o, cardRef: e, containerRef: r, selectedIndex: s, highlightCommand: Or, removeHighlightCommand: Pr, CommandButton: _e, ButtonGroup: ye, Card: ke, CardBody: we, CardItemGroup: Le, Separator: ie };
1631
+ }
1632
+ });
1633
+ var di = function() {
1634
+ var t = this, o = t._self._c, e = t._self._setupProxy;
1635
+ return o(e.Card, { ref: "cardRef", style: e.isMobile ? { boxShadow: "none", border: 0 } : {}, attrs: { tabindex: 0 } }, [o(e.CardBody, { style: e.isMobile ? { padding: 0 } : {} }, [o(e.CardItemGroup, { attrs: { orientation: "horizontal" } }, [o(e.ButtonGroup, t._l(t.colors, function(r, s) {
1636
+ return o(e.ButtonGroup, { key: r.value }, [o(e.CommandButton, { style: { "--highlight-color": r.value }, attrs: { command: e.highlightCommand(r), tabindex: s === e.selectedIndex ? 0 : -1, "data-highlighted": e.selectedIndex === s } }, [o("span", { staticClass: "tiptap-button-highlight" })])], 1);
1637
+ }), 1), o(e.Separator), o(e.ButtonGroup, [o(e.CommandButton, { attrs: { command: e.removeHighlightCommand(), role: "menuitem", tabindex: e.selectedIndex === t.colors.length ? 0 : -1, "data-highlighted": e.selectedIndex === t.colors.length } })], 1)], 1)], 1)], 1);
1638
+ }, pi = [], fi = /* @__PURE__ */ _(
1639
+ ui,
1640
+ di,
1641
+ pi
1642
+ );
1643
+ const Bt = fi.exports, mi = /* @__PURE__ */ b({
1644
+ __name: "ColorHighlightPopover",
1645
+ setup(n) {
1646
+ const t = M(), o = $(), e = g(!1), { isActive: r, canHighlight: s } = Z(
1647
+ B(o, (i) => ({
1648
+ isActive: St(i),
1649
+ canHighlight: le(i)
1650
+ }))
1651
+ );
1652
+ return { __sfc: !0, t, editor: o, isOpen: e, isActive: r, canHighlight: s, COLOR_HIGHLIGHT_SHORTCUT_KEY: $r, Popover: be, ColorHighlightPopoverButton: $t, ColorHighlightPopoverContent: Bt };
1653
+ }
1654
+ });
1655
+ var Ci = function() {
1656
+ var t = this, o = t._self._c, e = t._self._setupProxy;
1657
+ return o(e.Popover, { attrs: { open: e.isOpen, "aria-label": e.t.highlight.menu }, on: { "update:open": function(r) {
1658
+ e.isOpen = r;
1659
+ } }, scopedSlots: t._u([{ key: "trigger", fn: function({ attrs: r }) {
1660
+ return [o(e.ColorHighlightPopoverButton, t._b({ attrs: { disabled: !e.canHighlight, "data-active-state": e.isActive ? "on" : "off", "data-disabled": !e.canHighlight, "aria-pressed": String(e.isActive), "shortcut-keys": e.COLOR_HIGHLIGHT_SHORTCUT_KEY, "data-rt-shortcut": e.COLOR_HIGHLIGHT_SHORTCUT_KEY } }, "ColorHighlightPopoverButton", r, !1))];
1661
+ } }]) }, [o(e.ColorHighlightPopoverContent)], 1);
1662
+ }, hi = [], vi = /* @__PURE__ */ _(
1663
+ mi,
1664
+ Ci,
1665
+ hi
1666
+ );
1667
+ const _i = vi.exports, X = {
1668
+ focusToolbar: "alt+f10",
1669
+ clearFormatting: "mod+\\",
1670
+ link: "mod+k",
1671
+ highlight: "mod+shift+h",
1672
+ image: "mod+alt+i",
1673
+ file: "mod+alt+f",
1674
+ table: "mod+alt+t",
1675
+ visibilityCondition: "mod+alt+v"
1676
+ };
1677
+ function ue(n, t) {
1678
+ const o = t.toLowerCase().split("+"), e = o.pop() ?? "", r = (i) => o.includes(i), s = pe() ? n.metaKey : n.ctrlKey;
1679
+ return r("mod") !== s || r("shift") !== n.shiftKey || r("alt") !== n.altKey ? !1 : n.key.toLowerCase() === e ? !0 : pe() && n.altKey && /^[a-z]$/.test(e) && n.code === `Key${e.toUpperCase()}`;
1680
+ }
1681
+ const gi = "mod+k";
1682
+ function Et(n) {
1683
+ if (!n || !n.isEditable || N(n, ["image"], !0)) return !1;
1684
+ try {
1685
+ return n.can().setMark("link");
1686
+ } catch {
1687
+ return !1;
1688
+ }
1689
+ }
1690
+ function Me(n) {
1691
+ return !n || !n.isEditable ? !1 : n.isActive("link");
1692
+ }
1693
+ function bi(n) {
1694
+ const { editor: t, hideWhenUnavailable: o } = n;
1695
+ if (!t || !t.isEditable) return !1;
1696
+ const e = $e("link", t);
1697
+ return o ? e ? t.isActive("code") ? !0 : Et(t) : !1 : !0;
1698
+ }
1699
+ function yi(n) {
1700
+ const { editor: t, onSetLink: o } = n, e = g(null), r = g(!0), s = () => {
1701
+ const { href: c, target: p } = t.value?.getAttributes("link") ?? {};
1702
+ e.value = c || "", r.value = c ? p !== "_self" : !0;
1703
+ };
1704
+ x(
1705
+ t,
1706
+ (c, p, d) => {
1707
+ c && (Me(c) && e.value === null && s(), c.on("selectionUpdate", s), d(() => c.off("selectionUpdate", s)));
1708
+ },
1709
+ { immediate: !0 }
1710
+ );
1711
+ const i = () => {
1712
+ const c = t.value;
1713
+ if (!e.value || !c) return;
1714
+ const p = c.state.selection.empty;
1715
+ let d = c.chain().focus().extendMarkRange("link").setLink({ href: e.value, target: r.value ? "_blank" : "_self" });
1716
+ p && (d = d.insertContent({ type: "text", text: e.value })), d.run(), e.value = null, o?.();
1717
+ }, l = () => {
1718
+ t.value?.chain().focus().extendMarkRange("link").unsetLink().setMeta("preventAutolink", !0).run(), e.value = "";
1719
+ }, a = () => {
1720
+ r.value = !r.value;
1721
+ const c = t.value;
1722
+ !c || !Me(c) || c.chain().extendMarkRange("link").updateAttributes("link", { target: r.value ? "_blank" : "_self" }).run();
1723
+ }, u = (c = "_blank", p = "noopener,noreferrer") => {
1724
+ if (!e.value) return;
1725
+ const d = mt(e.value, window.location.href);
1726
+ d !== "#" && window.open(d, c, p);
1727
+ };
1728
+ return {
1729
+ /** Writable, so it can be used with v-model */
1730
+ url: L({
1731
+ get: () => e.value || "",
1732
+ set: (c) => e.value = c
1733
+ }),
1734
+ openInNewTab: L(() => r.value),
1735
+ toggleNewTab: a,
1736
+ setLink: i,
1737
+ removeLink: l,
1738
+ openLink: u
1739
+ };
1740
+ }
1741
+ function ki(n) {
1742
+ const t = B(
1743
+ n.editor,
1744
+ (o) => ({
1745
+ isVisible: bi({ editor: o, hideWhenUnavailable: n.hideWhenUnavailable() }),
1746
+ canSet: Et(o),
1747
+ isActive: Me(o),
1748
+ isFocused: !!o?.isFocused
1749
+ }),
1750
+ { deps: n.hideWhenUnavailable }
1751
+ );
1752
+ return Z(t);
1753
+ }
1754
+ function Rt(n = {}) {
1755
+ const t = $(n.editor), o = ki({
1756
+ editor: t,
1757
+ hideWhenUnavailable: () => J(n.hideWhenUnavailable) ?? !1
1758
+ }), e = yi({
1759
+ editor: t,
1760
+ onSetLink: n.onSetLink
1761
+ });
1762
+ return {
1763
+ ...o,
1764
+ shortcutKeys: gi,
1765
+ icon: Re,
1766
+ ...e
1767
+ };
1768
+ }
1769
+ const wi = /* @__PURE__ */ b({
1770
+ __name: "LinkButton",
1771
+ emits: ["click"],
1772
+ setup(n, { emit: t }) {
1773
+ return { __sfc: !0, t: M(), emit: t, Button: S, Icon: E, LinkIcon: Re };
1774
+ }
1775
+ });
1776
+ var Li = function() {
1777
+ var t = this, o = t._self._c, e = t._self._setupProxy;
1778
+ return o(e.Button, { attrs: { type: "button", role: "button", tabindex: -1, "aria-label": e.t.link.button, tooltip: e.t.link.button }, on: { click: function(r) {
1779
+ return e.emit("click", r);
1780
+ } } }, [t._t("default", function() {
1781
+ return [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.LinkIcon } })];
1782
+ })], 2);
1783
+ }, xi = [], Ti = /* @__PURE__ */ _(
1784
+ wi,
1785
+ Li,
1786
+ xi
1787
+ );
1788
+ const Vt = Ti.exports, Ii = { model: { prop: "modelValue", event: "update:modelValue" } }, Hi = /* @__PURE__ */ b({
1789
+ ...Ii,
1790
+ __name: "Input",
1791
+ props: {
1792
+ modelValue: null
1793
+ },
1794
+ emits: ["update:modelValue", "change", "keydown"],
1795
+ setup(n, { emit: t }) {
1796
+ return { __sfc: !0, emit: t, onInput: (e) => t("update:modelValue", e.target.value) };
1797
+ }
1798
+ });
1799
+ var Mi = function() {
1800
+ var t = this, o = t._self._c, e = t._self._setupProxy;
1801
+ return o("input", { staticClass: "tiptap-input", attrs: { "data-slot": "tiptap-input" }, domProps: { value: t.modelValue }, on: { input: e.onInput, change: function(r) {
1802
+ return e.emit("change", r);
1803
+ }, keydown: function(r) {
1804
+ return e.emit("keydown", r);
1805
+ } } });
1806
+ }, Ai = [], Si = /* @__PURE__ */ _(
1807
+ Hi,
1808
+ Mi,
1809
+ Ai
1810
+ );
1811
+ const xe = Si.exports, $i = /* @__PURE__ */ b({
1812
+ __name: "LinkMain",
1813
+ props: {
1814
+ url: null,
1815
+ isActive: { type: Boolean },
1816
+ openInNewTab: { type: Boolean }
1817
+ },
1818
+ emits: ["update:url", "set-link", "remove-link", "open-link", "toggle-new-tab"],
1819
+ setup(n, { emit: t }) {
1820
+ const o = M(), e = Ue(), r = g(null);
1821
+ return G(() => r.value?.$el.focus()), { __sfc: !0, t: o, emit: t, isMobile: e, inputRef: r, Button: S, ButtonGroup: ye, Card: ke, CardBody: we, CardItemGroup: Le, Input: xe, Separator: ie, Icon: E, CornerDownLeftIcon: Be, ExternalLinkIcon: _o, EyeIcon: Pe, TrashIcon: Oe };
1822
+ }
1823
+ });
1824
+ var Bi = function() {
1825
+ var t = this, o = t._self._c, e = t._self._setupProxy;
1826
+ return o(e.Card, { style: e.isMobile ? { boxShadow: "none", border: 0 } : {} }, [o(e.CardBody, { style: e.isMobile ? { padding: 0 } : {} }, [o(e.CardItemGroup, { attrs: { orientation: "horizontal" } }, [o(e.Input, { ref: "inputRef", staticClass: "tiptap-link-input", attrs: { "model-value": t.url, type: "url", placeholder: e.t.link.placeholder, autofocus: "", autocomplete: "off", autocorrect: "off", autocapitalize: "off" }, on: { "update:modelValue": function(r) {
1827
+ return e.emit("update:url", r);
1828
+ }, keydown: function(r) {
1829
+ return !r.type.indexOf("key") && t._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : (r.preventDefault(), e.emit("set-link"));
1830
+ } } }), o(e.ButtonGroup, [o(e.Button, { attrs: { type: "button", title: e.t.link.apply, disabled: !t.url && !t.isActive }, on: { click: function(r) {
1831
+ return e.emit("set-link");
1832
+ } } }, [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.CornerDownLeftIcon } })], 1)], 1), o(e.ButtonGroup, [o(e.Button, { attrs: { type: "button", title: e.t.link.newTab, "aria-pressed": String(t.openInNewTab), "data-active-state": t.openInNewTab ? "on" : "off" }, on: { click: function(r) {
1833
+ return e.emit("toggle-new-tab");
1834
+ } } }, [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.ExternalLinkIcon } })], 1)], 1), o(e.Separator), o(e.ButtonGroup, [o(e.ButtonGroup, [o(e.Button, { attrs: { type: "button", title: e.t.link.open, disabled: !t.url && !t.isActive }, on: { click: function(r) {
1835
+ return e.emit("open-link");
1836
+ } } }, [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.EyeIcon } })], 1)], 1), o(e.ButtonGroup, [o(e.Button, { attrs: { type: "button", title: e.t.link.remove, disabled: !t.url && !t.isActive }, on: { click: function(r) {
1837
+ return e.emit("remove-link");
1838
+ } } }, [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.TrashIcon } })], 1)], 1)], 1)], 1)], 1)], 1);
1839
+ }, Ei = [], Ri = /* @__PURE__ */ _(
1840
+ $i,
1841
+ Bi,
1842
+ Ei
1843
+ );
1844
+ const Ot = Ri.exports, Vi = /* @__PURE__ */ b({
1845
+ __name: "LinkPopover",
1846
+ props: {
1847
+ editor: null,
1848
+ hideWhenUnavailable: { type: Boolean, default: !1 },
1849
+ autoOpenOnLinkActive: { type: Boolean, default: !0 }
1850
+ },
1851
+ emits: ["set-link", "open-change"],
1852
+ setup(n, { emit: t }) {
1853
+ const o = n, e = M(), r = $(() => o.editor), s = g(!1), {
1854
+ isVisible: i,
1855
+ canSet: l,
1856
+ isActive: a,
1857
+ isFocused: u,
1858
+ url: c,
1859
+ openInNewTab: p,
1860
+ toggleNewTab: d,
1861
+ setLink: f,
1862
+ removeLink: m,
1863
+ openLink: h,
1864
+ shortcutKeys: w,
1865
+ icon: I
1866
+ } = Rt({
1867
+ editor: r,
1868
+ hideWhenUnavailable: () => o.hideWhenUnavailable,
1869
+ onSetLink: () => t("set-link")
1870
+ }), H = L(
1871
+ () => o.autoOpenOnLinkActive && u.value && a.value
1872
+ );
1873
+ x(H, (v) => {
1874
+ v && (s.value = !0);
1875
+ }), x(s, (v) => t("open-change", v));
1876
+ function k(v) {
1877
+ ue(v, w) && (v.preventDefault(), s.value = !1);
1878
+ }
1879
+ function y() {
1880
+ f(), s.value = !1;
1881
+ }
1882
+ return { __sfc: !0, t: e, props: o, emit: t, editor: r, isOpen: s, isVisible: i, canSet: l, isActive: a, isFocused: u, url: c, openInNewTab: p, toggleNewTab: d, setLink: f, removeLink: m, openLink: h, shortcutKeys: w, icon: I, shouldAutoOpen: H, onKeydown: k, handleSetLink: y, Popover: be, Icon: E, LinkButton: Vt, LinkMain: Ot };
1883
+ }
1884
+ });
1885
+ var Oi = function() {
1886
+ var t = this, o = t._self._c, e = t._self._setupProxy;
1887
+ return e.isVisible ? o(e.Popover, { attrs: { open: e.isOpen }, on: { "update:open": function(r) {
1888
+ e.isOpen = r;
1889
+ } }, scopedSlots: t._u([{ key: "trigger", fn: function({ attrs: r }) {
1890
+ return [o(e.LinkButton, t._b({ attrs: { disabled: !e.canSet, "data-active-state": e.isActive ? "on" : "off", "data-disabled": !e.canSet, "aria-label": e.t.link.button, "aria-pressed": String(e.isActive), "shortcut-keys": e.shortcutKeys, "data-rt-shortcut": e.shortcutKeys } }, "LinkButton", r, !1), [t._t("default", function() {
1891
+ return [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.icon } })];
1892
+ })], 2)];
1893
+ } }], null, !0) }, [o("div", { on: { keydown: e.onKeydown } }, [o(e.LinkMain, { attrs: { url: e.url, "is-active": e.isActive, "open-in-new-tab": e.openInNewTab }, on: { "update:url": function(r) {
1894
+ e.url = r;
1895
+ }, "toggle-new-tab": e.toggleNewTab, "set-link": e.handleSetLink, "remove-link": e.removeLink, "open-link": function(r) {
1896
+ return e.openLink();
1897
+ } } })], 1)]) : t._e();
1898
+ }, Pi = [], Di = /* @__PURE__ */ _(
1899
+ Vi,
1900
+ Oi,
1901
+ Pi
1902
+ );
1903
+ const Fi = Di.exports, Ni = /* @__PURE__ */ b({
1904
+ __name: "LinkContent",
1905
+ props: {
1906
+ editor: null
1907
+ },
1908
+ setup(n) {
1909
+ const t = n, { url: o, isActive: e, openInNewTab: r, toggleNewTab: s, setLink: i, removeLink: l, openLink: a } = Rt({
1910
+ editor: () => t.editor
1911
+ });
1912
+ return { __sfc: !0, props: t, url: o, isActive: e, openInNewTab: r, toggleNewTab: s, setLink: i, removeLink: l, openLink: a, LinkMain: Ot };
1913
+ }
1914
+ });
1915
+ var Zi = function() {
1916
+ var t = this, o = t._self._c, e = t._self._setupProxy;
1917
+ return o(e.LinkMain, { attrs: { url: e.url, "is-active": e.isActive, "open-in-new-tab": e.openInNewTab }, on: { "update:url": function(r) {
1918
+ e.url = r;
1919
+ }, "toggle-new-tab": e.toggleNewTab, "set-link": e.setLink, "remove-link": e.removeLink, "open-link": function(r) {
1920
+ return e.openLink();
1921
+ } } });
1922
+ }, Ui = [], ji = /* @__PURE__ */ _(
1923
+ Ni,
1924
+ Zi,
1925
+ Ui
1926
+ );
1927
+ const Ki = ji.exports, qi = {
1928
+ bold: Co,
1929
+ italic: Io,
1930
+ underline: $o,
1931
+ strike: Mo,
1932
+ code: vo,
1933
+ superscript: So,
1934
+ subscript: Ao
1935
+ }, Gi = {
1936
+ bold: "mod+b",
1937
+ italic: "mod+i",
1938
+ underline: "mod+u",
1939
+ strike: "mod+shift+s",
1940
+ code: "mod+e",
1941
+ superscript: "mod+.",
1942
+ subscript: "mod+,"
1943
+ };
1944
+ function Pt(n, t) {
1945
+ return !n || !n.isEditable || !$e(t, n) || N(n, ["image"]) ? !1 : n.can().toggleMark(t);
1946
+ }
1947
+ function zi(n, t) {
1948
+ return !n || !n.isEditable ? !1 : n.isActive(t);
1949
+ }
1950
+ function Yi(n, t) {
1951
+ return !n || !n.isEditable || !Pt(n, t) ? !1 : n.chain().focus().toggleMark(t).run();
1952
+ }
1953
+ const Wi = (n) => U(`mark:${n}`, () => ({
1954
+ label: (t) => t.marks[n],
1955
+ icon: qi[n],
1956
+ shortcutKeys: Gi[n],
1957
+ isActive: (t) => zi(t, n),
1958
+ canRun: (t) => Pt(t, n),
1959
+ run: (t) => Yi(t, n)
1960
+ })), Ji = {
1961
+ left: "mod+shift+l",
1962
+ center: "mod+shift+e",
1963
+ right: "mod+shift+r",
1964
+ justify: "mod+shift+j"
1965
+ }, Xi = {
1966
+ left: yt,
1967
+ center: bt,
1968
+ right: kt,
1969
+ justify: po
1970
+ };
1971
+ function Dt(n, t) {
1972
+ if (!n || n.isDestroyed || !n.isEditable || !An(n, "textAlign") || N(n, ["image", "horizontalRule"]))
1973
+ return !1;
1974
+ try {
1975
+ return n.can().setTextAlign(t);
1976
+ } catch {
1977
+ return !1;
1978
+ }
1979
+ }
1980
+ function Qi(n) {
1981
+ return "setTextAlign" in n;
1982
+ }
1983
+ function es(n, t) {
1984
+ return !n || !n.isEditable ? !1 : n.isActive({ textAlign: t });
1985
+ }
1986
+ function ts(n, t) {
1987
+ if (!n || n.isDestroyed || !n.isEditable || !Dt(n, t)) return !1;
1988
+ try {
1989
+ const o = n.chain().focus();
1990
+ if (Qi(o))
1991
+ return o.setTextAlign(t).run();
1992
+ } catch {
1993
+ return !1;
1994
+ }
1995
+ return !1;
1996
+ }
1997
+ const ns = (n) => U(`textAlign:${n}`, () => ({
1998
+ label: (t) => t.align[n],
1999
+ icon: Xi[n],
2000
+ shortcutKeys: Ji[n],
2001
+ isActive: (t) => es(t, n),
2002
+ canRun: (t) => Dt(t, n),
2003
+ run: (t) => ts(t, n)
2004
+ })), os = {
2005
+ undo: "mod+z",
2006
+ redo: "mod+shift+z"
2007
+ }, rs = {
2008
+ undo: Bo,
2009
+ redo: Ho
2010
+ };
2011
+ function Ft(n, t) {
2012
+ if (!n || n.isDestroyed || !n.isEditable) return !1;
2013
+ try {
2014
+ if (N(n, ["image"])) return !1;
2015
+ const o = n.can(), e = t === "undo" ? o.undo : o.redo;
2016
+ return typeof e == "function" ? e() : !1;
2017
+ } catch {
2018
+ return !1;
2019
+ }
2020
+ }
2021
+ function is(n, t) {
2022
+ if (!n || n.isDestroyed || !n.isEditable || !Ft(n, t)) return !1;
2023
+ try {
2024
+ const o = n.chain().focus();
2025
+ return t === "undo" ? o.undo().run() : o.redo().run();
2026
+ } catch {
2027
+ return !1;
2028
+ }
2029
+ }
2030
+ const ss = (n) => U(`history:${n}`, () => ({
2031
+ label: (t) => t[n],
2032
+ icon: rs[n],
2033
+ shortcutKeys: os[n],
2034
+ canRun: (t) => Ft(t, n),
2035
+ run: (t) => is(t, n)
2036
+ }));
2037
+ function Nt(n, t) {
2038
+ x(
2039
+ n,
2040
+ (o) => {
2041
+ o && (o.matches(":popover-open") || o.showPopover?.(), t?.());
2042
+ },
2043
+ { flush: "post" }
2044
+ );
2045
+ }
2046
+ const as = /* @__PURE__ */ b({
2047
+ __name: "MentionMenu",
2048
+ props: {
2049
+ state: null
2050
+ },
2051
+ emits: ["select"],
2052
+ setup(n, { emit: t }) {
2053
+ const o = n, e = M(), r = 4, s = g(null), i = g({ width: 0, height: 0 }), l = () => {
2054
+ i.value = {
2055
+ width: s.value?.offsetWidth ?? 0,
2056
+ height: s.value?.offsetHeight ?? 0
2057
+ };
2058
+ };
2059
+ Nt(s, l), x(
2060
+ () => [o.state.open, o.state.items],
2061
+ async () => {
2062
+ await ee(), l();
2063
+ }
2064
+ ), x(
2065
+ () => o.state.selectedIndex,
2066
+ async () => {
2067
+ await ee(), s.value?.querySelector('[data-highlighted="true"]')?.scrollIntoView({ block: "nearest" });
2068
+ }
2069
+ );
2070
+ const a = L(() => {
2071
+ const u = o.state.rect;
2072
+ if (!u) return { visibility: "hidden" };
2073
+ const { width: c, height: p } = i.value;
2074
+ return {
2075
+ top: `${u.bottom + r + p <= window.innerHeight ? u.bottom + r : Math.max(r, u.top - r - p)}px`,
2076
+ left: `${Math.max(r, Math.min(u.left, window.innerWidth - c - r))}px`
2077
+ };
2078
+ });
2079
+ return { __sfc: !0, t: e, props: o, emit: t, OFFSET: r, menuRef: s, menuSize: i, measure: l, position: a, Portal: ge, Button: S };
2080
+ }
2081
+ });
2082
+ var ls = function() {
2083
+ var t = this, o = t._self._c, e = t._self._setupProxy;
2084
+ return o(e.Portal, [t.state.open ? o("div", { ref: "menuRef", staticClass: "tiptap-dropdown-menu-content rt-mention-menu", style: e.position, attrs: { popover: "manual", "data-state": "open", role: "listbox" } }, [t.state.items.length ? o("div", { staticClass: "tiptap-dropdown-menu-group" }, [t._l(t.state.items, function(r, s) {
2085
+ return [r.group && r.group !== t.state.items[s - 1]?.group ? o("div", { staticClass: "tiptap-dropdown-menu-label" }, [t._v(" " + t._s(r.group) + " ")]) : t._e(), o(e.Button, { attrs: { type: "button", role: "option", "aria-selected": String(s === t.state.selectedIndex), "data-highlighted": s === t.state.selectedIndex }, on: { mousedown: function(i) {
2086
+ i.preventDefault();
2087
+ }, click: function(i) {
2088
+ return e.emit("select", s);
2089
+ } } }, [o("span", { staticClass: "tiptap-button-text" }, [t._v(t._s(r.label))])])];
2090
+ })], 2) : o("div", { staticClass: "rt-mention-menu-empty" }, [t._v(t._s(e.t.mentions.noResults))])]) : t._e()]);
2091
+ }, cs = [], us = /* @__PURE__ */ _(
2092
+ as,
2093
+ ls,
2094
+ cs
2095
+ );
2096
+ const ds = us.exports, je = "rt-previews-changed";
2097
+ function ps(n) {
2098
+ n.view.dispatch(n.state.tr.setMeta(je, !0));
2099
+ }
2100
+ const Q = "visibilityConditions", et = new me("hiddenConditions");
2101
+ function fs(n) {
2102
+ if (n != null)
2103
+ return !(n === !1 || n === 0 || ["", "0", "false"].includes(String(n).trim()));
2104
+ }
2105
+ function tt(n, t) {
2106
+ const o = t.getPreviews();
2107
+ if (!Object.keys(o).length) return te.empty;
2108
+ const e = [];
2109
+ return n.descendants((r, s) => {
2110
+ if (r.type.name !== Q) return;
2111
+ const { condition: i } = r.attrs;
2112
+ if (!i || fs(o[i]) !== !1) return;
2113
+ const l = r.attrs["condition-label"] || i;
2114
+ e.push(
2115
+ de.node(s, s + r.nodeSize, {
2116
+ "data-hidden-label": t.messages().visibilityConditions.hidden(l)
2117
+ })
2118
+ );
2119
+ }), te.create(n, e);
2120
+ }
2121
+ const ms = ut.create({
2122
+ name: Q,
2123
+ group: "block",
2124
+ content: "block+",
2125
+ defining: !0,
2126
+ addOptions() {
2127
+ return {
2128
+ getPreviews: () => ({}),
2129
+ messages: () => oe[ne]
2130
+ };
2131
+ },
2132
+ addAttributes() {
2133
+ return {
2134
+ condition: {
2135
+ default: null,
2136
+ parseHTML: (n) => n.getAttribute("condition"),
2137
+ renderHTML: (n) => n.condition ? { condition: n.condition } : {}
2138
+ },
2139
+ "condition-label": {
2140
+ default: null,
2141
+ parseHTML: (n) => n.getAttribute("condition-label"),
2142
+ renderHTML: (n) => n["condition-label"] ? { "condition-label": n["condition-label"] } : {}
2143
+ }
2144
+ };
2145
+ },
2146
+ parseHTML() {
2147
+ return [{ tag: "div.conditionally-visible" }];
2148
+ },
2149
+ renderHTML({ HTMLAttributes: n }) {
2150
+ return [
2151
+ "div",
2152
+ dt(n, { class: "conditionally-visible" }),
2153
+ 0
2154
+ ];
2155
+ },
2156
+ addCommands() {
2157
+ return {
2158
+ toggleCondition: (n) => ({ editor: t, commands: o }) => {
2159
+ const e = {
2160
+ condition: n.if,
2161
+ "condition-label": n.label
2162
+ };
2163
+ return t.isActive(this.name, { condition: n.if }) ? o.lift(this.name) : t.isActive(this.name) ? o.updateAttributes(this.name, e) : o.wrapIn(this.name, e);
2164
+ },
2165
+ unsetCondition: () => ({ commands: n }) => n.lift(this.name)
2166
+ };
2167
+ },
2168
+ addProseMirrorPlugins() {
2169
+ return [
2170
+ new Se({
2171
+ key: et,
2172
+ state: {
2173
+ init: (n, t) => tt(t.doc, this.options),
2174
+ apply: (n, t) => n.docChanged || n.getMeta(je) ? tt(n.doc, this.options) : t
2175
+ },
2176
+ props: {
2177
+ decorations: (n) => et.getState(n)
2178
+ }
2179
+ })
2180
+ ];
2181
+ }
2182
+ }), Cs = /* @__PURE__ */ b({
2183
+ __name: "VisibilityConditionsMenu",
2184
+ props: {
2185
+ editor: null,
2186
+ conditions: null
2187
+ },
2188
+ setup(n) {
2189
+ const t = n, o = M(), e = $(() => t.editor), r = g(!1), { activeCondition: s, canToggle: i } = Z(
2190
+ B(e, (l) => {
2191
+ const a = !!l?.isActive(Q);
2192
+ return {
2193
+ activeCondition: a ? l.getAttributes(Q).condition : null,
2194
+ canToggle: !!l?.isEditable && (a || l.can().wrapIn(Q))
2195
+ };
2196
+ })
2197
+ );
2198
+ return { __sfc: !0, t: o, props: t, editor: e, isOpen: r, activeCondition: s, canToggle: i, Button: S, DropdownMenu: ae, Icon: E, BanIcon: wt, ChevronDownIcon: se, EyeIcon: Pe, SHORTCUTS: X };
2199
+ }
2200
+ });
2201
+ var hs = function() {
2202
+ var t = this, o = t._self._c, e = t._self._setupProxy;
2203
+ return t.conditions.length ? o(e.DropdownMenu, { attrs: { open: e.isOpen, align: "start" }, on: { "update:open": function(r) {
2204
+ e.isOpen = r;
2205
+ } }, scopedSlots: t._u([{ key: "trigger", fn: function({ attrs: r }) {
2206
+ return [o(e.Button, t._b({ attrs: { type: "button", role: "button", tabindex: -1, disabled: !e.canToggle, "data-disabled": !e.canToggle, "data-active-state": e.activeCondition ? "on" : "off", "aria-pressed": String(!!e.activeCondition), "aria-label": e.t.visibilityConditions.button, tooltip: e.t.visibilityConditions.button, "shortcut-keys": e.SHORTCUTS.visibilityCondition, "data-rt-shortcut": e.SHORTCUTS.visibilityCondition } }, "Button", r, !1), [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.EyeIcon } }), o(e.Icon, { staticClass: "tiptap-button-dropdown-small", attrs: { name: e.ChevronDownIcon } })], 1)];
2207
+ } }], null, !1, 1585966136) }, [o("div", { staticClass: "tiptap-dropdown-menu-group" }, [t._l(t.conditions, function(r) {
2208
+ return o(e.Button, { key: r.if, attrs: { type: "button", role: "menuitem", "data-active-state": e.activeCondition === r.if ? "on" : "off" }, on: { click: function(s) {
2209
+ e.editor?.chain().focus().toggleCondition(r).run();
2210
+ } } }, [o("span", { staticClass: "tiptap-button-text" }, [t._v(t._s(r.label))])]);
2211
+ }), e.activeCondition ? o(e.Button, { attrs: { type: "button", role: "menuitem" }, on: { click: function(r) {
2212
+ e.editor?.chain().focus().unsetCondition().run();
2213
+ } } }, [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.BanIcon } }), o("span", { staticClass: "tiptap-button-text" }, [t._v(t._s(e.t.visibilityConditions.remove))])], 1) : t._e()], 2)]) : t._e();
2214
+ }, vs = [], _s = /* @__PURE__ */ _(
2215
+ Cs,
2216
+ hs,
2217
+ vs
2218
+ );
2219
+ const gs = _s.exports;
2220
+ function Zt(n) {
2221
+ try {
2222
+ const t = new URL(n, window.location.href).pathname;
2223
+ return decodeURIComponent(t.split("/").filter(Boolean).pop() ?? "") || n;
2224
+ } catch {
2225
+ return n;
2226
+ }
2227
+ }
2228
+ const bs = ut.create({
2229
+ name: "file",
2230
+ group: "block",
2231
+ content: "text*",
2232
+ selectable: !0,
2233
+ draggable: !0,
2234
+ defining: !0,
2235
+ atom: !0,
2236
+ marks: "",
2237
+ addAttributes() {
2238
+ return {
2239
+ href: { default: null },
2240
+ title: { default: null },
2241
+ target: { default: "_blank" },
2242
+ "data-type": { default: "file" }
2243
+ };
2244
+ },
2245
+ parseHTML() {
2246
+ return [{ tag: 'a[data-type="file"]', priority: 100 }];
2247
+ },
2248
+ renderHTML({ HTMLAttributes: n }) {
2249
+ const { title: t, ...o } = n;
2250
+ return ["a", o, t || 0];
2251
+ },
2252
+ addCommands() {
2253
+ return {
2254
+ setFile: ({ href: n, name: t }) => ({ commands: o }) => o.insertContent({
2255
+ type: this.name,
2256
+ attrs: { href: n },
2257
+ content: [{ type: "text", text: t || Zt(n) }]
2258
+ })
2259
+ };
2260
+ }
2261
+ }), ys = /* @__PURE__ */ b({
2262
+ __name: "UploadPopover",
2263
+ props: {
2264
+ type: null,
2265
+ upload: null,
2266
+ shortcutKeys: null
2267
+ },
2268
+ setup(n) {
2269
+ const t = n, o = M(), e = L(() => o.value[t.type]), r = L(() => t.type === "image" ? To : Eo), s = $(), i = g(!1), l = g(""), a = g(""), u = g(!1), c = g(null), { isActive: p, href: d, name: f, canInsert: m } = Z(
2270
+ B(
2271
+ s,
2272
+ (y) => {
2273
+ const { selection: v } = y?.state ?? {}, A = v instanceof P && v.node.type.name === t.type ? v.node : null, j = (t.type === "image" ? A?.attrs.src : A?.attrs.href) ?? "";
2274
+ return {
2275
+ isActive: !!A,
2276
+ href: j,
2277
+ name: t.type === "image" ? A?.attrs.alt || Zt(j) : A?.textContent ?? "",
2278
+ canInsert: !!y?.isEditable && (t.type === "image" ? y.can().setImage({ src: "#" }) : y.can().setFile({ href: "#" }))
2279
+ };
2280
+ },
2281
+ { deps: () => t.type }
2282
+ )
2283
+ );
2284
+ x(i, (y) => {
2285
+ y && (l.value = "", a.value = "");
2286
+ });
2287
+ function h(y, v) {
2288
+ const A = s.value?.chain().focus();
2289
+ t.type === "image" ? A?.setImage({ src: y, alt: v?.replace(/\.[^/.]+$/, "") }).run() : A?.setFile({ href: y, name: v }).run(), i.value = !1;
2290
+ }
2291
+ function w() {
2292
+ l.value && h(l.value);
2293
+ }
2294
+ async function I(y) {
2295
+ const v = y.target, A = v.files?.[0];
2296
+ if (v.value = "", !(!A || !t.upload)) {
2297
+ a.value = "", u.value = !0;
2298
+ try {
2299
+ h(await t.upload(A, t.type), A.name);
2300
+ } catch (j) {
2301
+ a.value = j instanceof Error ? j.message : o.value.upload.failed;
2302
+ } finally {
2303
+ u.value = !1;
2304
+ }
2305
+ }
2306
+ }
2307
+ function H() {
2308
+ const y = mt(d.value, window.location.href);
2309
+ y !== "#" && window.open(y, "_blank", "noopener,noreferrer");
2310
+ }
2311
+ function k() {
2312
+ s.value?.chain().focus().deleteSelection().run(), i.value = !1;
2313
+ }
2314
+ return { __sfc: !0, t: o, props: t, text: e, icon: r, editor: s, isOpen: i, url: l, error: a, isUploading: u, fileInput: c, isActive: p, href: d, name: f, canInsert: m, insert: h, insertUrl: w, onFileChosen: I, openSelected: H, removeSelected: k, Button: S, ButtonGroup: ye, Card: ke, CardBody: we, CardItemGroup: Le, Input: xe, Popover: be, Separator: ie, Icon: E, CornerDownLeftIcon: Be, EyeIcon: Pe, TrashIcon: Oe };
2315
+ }
2316
+ });
2317
+ var ks = function() {
2318
+ var t = this, o = t._self._c, e = t._self._setupProxy;
2319
+ return o(e.Popover, { attrs: { open: e.isOpen }, on: { "update:open": function(r) {
2320
+ e.isOpen = r;
2321
+ } }, scopedSlots: t._u([{ key: "trigger", fn: function({ attrs: r }) {
2322
+ return [o(e.Button, t._b({ attrs: { type: "button", role: "button", tabindex: -1, disabled: !e.canInsert && !e.isActive, "data-disabled": !e.canInsert && !e.isActive, "data-active-state": e.isActive ? "on" : "off", "aria-pressed": String(e.isActive), "aria-label": e.text.button, tooltip: e.text.button, "shortcut-keys": t.shortcutKeys, "data-rt-shortcut": t.shortcutKeys } }, "Button", r, !1), [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.icon } })], 1)];
2323
+ } }]) }, [o(e.Card, [o(e.CardBody, [e.isActive ? o(e.CardItemGroup, { attrs: { orientation: "horizontal" } }, [o("span", { staticClass: "rt-popover-text", attrs: { title: e.href } }, [t._v(t._s(e.name))]), o(e.Separator), o(e.ButtonGroup, [o(e.Button, { attrs: { type: "button", title: e.text.open }, on: { click: e.openSelected } }, [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.EyeIcon } })], 1), o(e.Button, { attrs: { type: "button", title: e.text.remove }, on: { click: e.removeSelected } }, [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.TrashIcon } })], 1)], 1)], 1) : [o(e.CardItemGroup, { attrs: { orientation: "horizontal" } }, [t.upload ? [o(e.Button, { staticClass: "rt-upload-button", attrs: { type: "button", disabled: e.isUploading }, on: { click: function(r) {
2324
+ e.fileInput?.click();
2325
+ } } }, [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.icon } }), o("span", { staticClass: "tiptap-button-text" }, [t._v(" " + t._s(e.isUploading ? e.t.upload.uploading : e.text.choose) + " ")])], 1), o("input", { ref: "fileInput", attrs: { type: "file", accept: t.type === "image" ? "image/*" : void 0, hidden: "" }, on: { change: e.onFileChosen } }), o(e.Separator)] : t._e(), o(e.Input, { staticClass: "tiptap-link-input", attrs: { type: "url", placeholder: t.upload ? e.t.upload.orPasteLink : e.t.upload.pasteLink, autofocus: "", autocomplete: "off" }, on: { keydown: function(r) {
2326
+ return !r.type.indexOf("key") && t._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : (r.preventDefault(), e.insertUrl.apply(null, arguments));
2327
+ } }, model: { value: e.url, callback: function(r) {
2328
+ e.url = r;
2329
+ }, expression: "url" } }), o(e.ButtonGroup, [o(e.Button, { attrs: { type: "button", title: e.text.add, disabled: !e.url }, on: { click: e.insertUrl } }, [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.CornerDownLeftIcon } })], 1)], 1)], 2), e.error ? o("p", { staticClass: "rt-popover-error" }, [t._v(t._s(e.error))]) : t._e()]], 2)], 1)], 1);
2330
+ }, ws = [], Ls = /* @__PURE__ */ _(
2331
+ ys,
2332
+ ks,
2333
+ ws
2334
+ );
2335
+ const xs = Ls.exports, Ts = /* @__PURE__ */ b({
2336
+ __name: "YoutubePopover",
2337
+ setup(n) {
2338
+ const t = M(), o = $(), e = g(!1), r = g(""), s = g(""), { isActive: i, src: l, canInsert: a } = Z(
2339
+ B(o, (p) => {
2340
+ const { selection: d } = p?.state ?? {}, f = d instanceof P && d.node.type.name === "youtube" ? d.node : null;
2341
+ return {
2342
+ isActive: !!f,
2343
+ src: f?.attrs.src ?? "",
2344
+ canInsert: !!p?.isEditable && p.can().insertContent({ type: "youtube", attrs: { src: "#" } })
2345
+ };
2346
+ })
2347
+ );
2348
+ x(e, (p) => {
2349
+ p && (r.value = "", s.value = "");
2350
+ });
2351
+ function u() {
2352
+ if (!r.value) return;
2353
+ o.value?.chain().focus().setYoutubeVideo({ src: r.value }).run() ? e.value = !1 : s.value = t.value.youtube.invalid;
2354
+ }
2355
+ function c() {
2356
+ o.value?.chain().focus().deleteSelection().run(), e.value = !1;
2357
+ }
2358
+ return { __sfc: !0, t, editor: o, isOpen: e, url: r, error: s, isActive: i, src: l, canInsert: a, insertVideo: u, removeVideo: c, Button: S, ButtonGroup: ye, Card: ke, CardBody: we, CardItemGroup: Le, Input: xe, Popover: be, Separator: ie, Icon: E, CornerDownLeftIcon: Be, TrashIcon: Oe, YoutubeIcon: Ro };
2359
+ }
2360
+ });
2361
+ var Is = function() {
2362
+ var t = this, o = t._self._c, e = t._self._setupProxy;
2363
+ return o(e.Popover, { attrs: { open: e.isOpen }, on: { "update:open": function(r) {
2364
+ e.isOpen = r;
2365
+ } }, scopedSlots: t._u([{ key: "trigger", fn: function({ attrs: r }) {
2366
+ return [o(e.Button, t._b({ attrs: { type: "button", role: "button", tabindex: -1, disabled: !e.canInsert && !e.isActive, "data-disabled": !e.canInsert && !e.isActive, "data-active-state": e.isActive ? "on" : "off", "aria-pressed": String(e.isActive), "aria-label": e.t.youtube.button, tooltip: e.t.youtube.button } }, "Button", r, !1), [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.YoutubeIcon } })], 1)];
2367
+ } }]) }, [o(e.Card, [o(e.CardBody, [e.isActive ? o(e.CardItemGroup, { attrs: { orientation: "horizontal" } }, [o("span", { staticClass: "rt-popover-text", attrs: { title: e.src } }, [t._v(t._s(e.src))]), o(e.Separator), o(e.ButtonGroup, [o(e.Button, { attrs: { type: "button", title: e.t.youtube.remove }, on: { click: e.removeVideo } }, [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.TrashIcon } })], 1)], 1)], 1) : [o(e.CardItemGroup, { attrs: { orientation: "horizontal" } }, [o(e.Input, { staticClass: "tiptap-link-input", attrs: { type: "url", placeholder: e.t.youtube.placeholder, autofocus: "", autocomplete: "off" }, on: { keydown: function(r) {
2368
+ return !r.type.indexOf("key") && t._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : (r.preventDefault(), e.insertVideo.apply(null, arguments));
2369
+ } }, model: { value: e.url, callback: function(r) {
2370
+ e.url = r;
2371
+ }, expression: "url" } }), o(e.ButtonGroup, [o(e.Button, { attrs: { type: "button", title: e.t.youtube.add, disabled: !e.url }, on: { click: e.insertVideo } }, [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.CornerDownLeftIcon } })], 1)], 1)], 1), e.error ? o("p", { staticClass: "rt-popover-error" }, [t._v(t._s(e.error))]) : t._e()]], 2)], 1)], 1);
2372
+ }, Hs = [], Ms = /* @__PURE__ */ _(
2373
+ Ts,
2374
+ Is,
2375
+ Hs
2376
+ );
2377
+ const As = Ms.exports, Ss = /* @__PURE__ */ b({
2378
+ __name: "TableMenu",
2379
+ props: {
2380
+ insertDefaults: null
2381
+ },
2382
+ setup(n) {
2383
+ const t = n, o = M(), e = $(), r = g(!1), s = L(
2384
+ () => t.insertDefaults ?? { rows: 3, cols: 3, withHeaderRow: !0 }
2385
+ ), { isInTable: i, canInsert: l } = Z(
2386
+ B(e, (u) => ({
2387
+ isInTable: !!u?.isActive("table"),
2388
+ canInsert: !!u?.isEditable && u.can().insertTable(s.value)
2389
+ }))
2390
+ ), a = L(() => {
2391
+ const u = e.value;
2392
+ if (!r.value || !u) return [];
2393
+ const c = (p, d) => ({
2394
+ label: o.value.table[p],
2395
+ enabled: d(u.can().chain()).run(),
2396
+ run: () => d(u.chain().focus()).run()
2397
+ });
2398
+ return i.value ? [
2399
+ [
2400
+ c("addRowBefore", (p) => p.addRowBefore()),
2401
+ c("addRowAfter", (p) => p.addRowAfter()),
2402
+ c("deleteRow", (p) => p.deleteRow())
2403
+ ],
2404
+ [
2405
+ c("addColumnBefore", (p) => p.addColumnBefore()),
2406
+ c("addColumnAfter", (p) => p.addColumnAfter()),
2407
+ c("deleteColumn", (p) => p.deleteColumn())
2408
+ ],
2409
+ [
2410
+ c("toggleHeaderRow", (p) => p.toggleHeaderRow()),
2411
+ c("mergeOrSplit", (p) => p.mergeOrSplit())
2412
+ ],
2413
+ [c("delete", (p) => p.deleteTable())]
2414
+ ] : [[c("insert", (p) => p.insertTable(s.value))]];
2415
+ });
2416
+ return { __sfc: !0, t: o, props: t, editor: e, isOpen: r, insertOptions: s, isInTable: i, canInsert: l, groups: a, Button: S, DropdownMenu: ae, Icon: E, ChevronDownIcon: se, TableIcon: Vo, SHORTCUTS: X };
2417
+ }
2418
+ });
2419
+ var $s = function() {
2420
+ var t = this, o = t._self._c, e = t._self._setupProxy;
2421
+ return o(e.DropdownMenu, { attrs: { open: e.isOpen, align: "start" }, on: { "update:open": function(r) {
2422
+ e.isOpen = r;
2423
+ } }, scopedSlots: t._u([{ key: "trigger", fn: function({ attrs: r }) {
2424
+ return [o(e.Button, t._b({ attrs: { type: "button", role: "button", tabindex: -1, disabled: !e.isInTable && !e.canInsert, "data-disabled": !e.isInTable && !e.canInsert, "data-active-state": e.isInTable ? "on" : "off", "aria-pressed": String(e.isInTable), "aria-label": e.t.table.button, tooltip: e.t.table.button, "shortcut-keys": e.SHORTCUTS.table, "data-rt-shortcut": e.SHORTCUTS.table } }, "Button", r, !1), [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.TableIcon } }), o(e.Icon, { staticClass: "tiptap-button-dropdown-small", attrs: { name: e.ChevronDownIcon } })], 1)];
2425
+ } }]) }, [o("div", { staticClass: "tiptap-dropdown-menu-group" }, [t._l(e.groups, function(r, s) {
2426
+ return [s > 0 ? o("div", { staticClass: "tiptap-dropdown-menu-separator", attrs: { role: "separator" } }) : t._e(), t._l(r, function(i) {
2427
+ return o(e.Button, { key: i.label, attrs: { type: "button", role: "menuitem", disabled: !i.enabled }, on: { click: i.run } }, [o("span", { staticClass: "tiptap-button-text" }, [t._v(t._s(i.label))])]);
2428
+ })];
2429
+ })], 2)]);
2430
+ }, Bs = [], Es = /* @__PURE__ */ _(
2431
+ Ss,
2432
+ $s,
2433
+ Bs
2434
+ );
2435
+ const Rs = Es.exports, Ut = "div.conditionally-visible", Vs = (n) => `{% if ${n} %}`, Ae = "{% endif %}", Os = /^\{% if .* %\}$/, jt = (n) => {
2436
+ const t = document.createElement("template");
2437
+ return t.innerHTML = n, t;
2438
+ };
2439
+ function Ps(n) {
2440
+ if (!n.includes("conditionally-visible")) return n;
2441
+ const t = jt(n), o = [];
2442
+ return t.content.querySelectorAll(Ut).forEach((e) => {
2443
+ const r = e.getAttribute("condition");
2444
+ if (!r) return;
2445
+ const s = o.push(r) - 1;
2446
+ e.before(document.createComment(`rt-if:${s}`)), e.after(document.createComment("rt-endif"));
2447
+ }), t.innerHTML.replace(/<!--rt-if:(\d+)-->/g, (e, r) => Vs(o[+r])).split("<!--rt-endif-->").join(Ae);
2448
+ }
2449
+ function Kt(n) {
2450
+ if (!n.includes("{%")) return n;
2451
+ const t = jt(n), o = (e, r) => {
2452
+ if (e?.nodeType !== Node.TEXT_NODE) return;
2453
+ const s = e.textContent ?? "", i = r(s);
2454
+ i !== s && (i.trim() ? e.textContent = i : e.remove());
2455
+ };
2456
+ return t.content.querySelectorAll(Ut).forEach((e) => {
2457
+ o(e.previousSibling, (r) => {
2458
+ const s = r.lastIndexOf("{% if ");
2459
+ return s !== -1 && Os.test(r.slice(s).trimEnd()) ? r.slice(0, s) : r;
2460
+ }), o(
2461
+ e.nextSibling,
2462
+ (r) => r.trimStart().startsWith(Ae) ? r.trimStart().slice(Ae.length) : r
2463
+ );
2464
+ }), t.innerHTML;
2465
+ }
2466
+ const Ds = /* @__PURE__ */ b({
2467
+ __name: "TemplatesMenu",
2468
+ props: {
2469
+ templates: null
2470
+ },
2471
+ setup(n) {
2472
+ const t = M(), o = $(), e = g(!1), r = B(o, (a) => !!a?.isEditable), s = (a) => a.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
2473
+ function i(a) {
2474
+ return /<[a-z][\s\S]*>/i.test(a) ? Kt(a) : a.split(/\r?\n/).map((u) => `<p>${s(u)}</p>`).join("");
2475
+ }
2476
+ function l(a) {
2477
+ o.value?.chain().focus().insertContent(i(a.text)).run();
2478
+ }
2479
+ return { __sfc: !0, t, editor: o, isOpen: e, canInsert: r, escapeHtml: s, toContent: i, insert: l, Button: S, DropdownMenu: ae, Icon: E, ChevronDownIcon: se, FileTextIcon: Oo };
2480
+ }
2481
+ });
2482
+ var Fs = function() {
2483
+ var t = this, o = t._self._c, e = t._self._setupProxy;
2484
+ return o(e.DropdownMenu, { attrs: { open: e.isOpen, align: "start" }, on: { "update:open": function(r) {
2485
+ e.isOpen = r;
2486
+ } }, scopedSlots: t._u([{ key: "trigger", fn: function({ attrs: r }) {
2487
+ return [o(e.Button, t._b({ attrs: { type: "button", role: "button", tabindex: -1, disabled: !e.canInsert, "data-disabled": !e.canInsert, "aria-label": e.t.templates.button, tooltip: e.t.templates.button } }, "Button", r, !1), [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.FileTextIcon } }), o(e.Icon, { staticClass: "tiptap-button-dropdown-small", attrs: { name: e.ChevronDownIcon } })], 1)];
2488
+ } }]) }, [o("div", { staticClass: "tiptap-dropdown-menu-group" }, t._l(t.templates, function(r, s) {
2489
+ return o(e.Button, { key: s, attrs: { type: "button", role: "menuitem" }, on: { click: function(i) {
2490
+ return e.insert(r);
2491
+ } } }, [o("span", { staticClass: "tiptap-button-text" }, [t._v(t._s(r.name))])]);
2492
+ }), 1)]);
2493
+ }, Ns = [], Zs = /* @__PURE__ */ _(
2494
+ Ds,
2495
+ Fs,
2496
+ Ns
2497
+ );
2498
+ const Us = Zs.exports, js = /* @__PURE__ */ b({
2499
+ __name: "MediaControls",
2500
+ setup(n) {
2501
+ const t = M(), o = ["image", "youtube"], e = 8, r = [
2502
+ { value: "small", label: "S" },
2503
+ { value: "medium", label: "M" },
2504
+ { value: "large", label: "L" }
2505
+ ], s = [
2506
+ { value: "left", icon: yt, title: "floatLeft" },
2507
+ { value: "none", icon: bt, title: "floatNone" },
2508
+ { value: "right", icon: kt, title: "floatRight" }
2509
+ ], i = $(), l = g(null), a = g(!1), u = g(""), c = B(i, (k) => {
2510
+ const y = k?.state.selection;
2511
+ if (!(y instanceof P) || !o.includes(y.node.type.name))
2512
+ return null;
2513
+ const { attrs: v } = y.node;
2514
+ return {
2515
+ type: y.node.type.name,
2516
+ pos: y.from,
2517
+ size: v.size ?? "large",
2518
+ float: v.float ?? "none",
2519
+ alt: v.alt ?? "",
2520
+ editorFocused: !!k?.isFocused
2521
+ };
2522
+ }), p = L(
2523
+ () => !!c.value && (c.value.editorFocused || a.value)
2524
+ );
2525
+ function d(k) {
2526
+ l.value?.contains(k.relatedTarget) || (a.value = !1);
2527
+ }
2528
+ x(
2529
+ () => c.value && `${c.value.pos}:${c.value.alt}`,
2530
+ () => u.value = c.value?.alt ?? ""
2531
+ );
2532
+ function f(k) {
2533
+ if (!c.value || !i.value) return;
2534
+ const y = k.size === "large" ? { ...k, float: "none" } : k;
2535
+ i.value.chain().setNodeSelection(c.value.pos).updateAttributes(c.value.type, y).run();
2536
+ }
2537
+ const m = g(null), h = g({ width: 0, height: 0 }), w = () => {
2538
+ if (!c.value || !i.value) return;
2539
+ const k = i.value.view.nodeDOM(c.value.pos);
2540
+ m.value = k instanceof HTMLElement ? k.getBoundingClientRect() : null, h.value = {
2541
+ width: l.value?.offsetWidth ?? 0,
2542
+ height: l.value?.offsetHeight ?? 0
2543
+ };
2544
+ }, I = L(() => {
2545
+ if (!m.value) return { visibility: "hidden" };
2546
+ const { width: k, height: y } = h.value, v = m.value.top - y - e, A = m.value.left + m.value.width / 2 - k / 2;
2547
+ return {
2548
+ top: `${v >= e ? v : m.value.bottom + e}px`,
2549
+ left: `${Math.max(e, Math.min(A, window.innerWidth - k - e))}px`
2550
+ };
2551
+ });
2552
+ Nt(l, w), x(
2553
+ () => [p.value, c.value],
2554
+ async () => {
2555
+ await ee(), w();
2556
+ }
2557
+ );
2558
+ const H = () => {
2559
+ p.value && w();
2560
+ };
2561
+ return window.addEventListener("scroll", H, !0), window.addEventListener("resize", H), q(() => {
2562
+ window.removeEventListener("scroll", H, !0), window.removeEventListener("resize", H);
2563
+ }), { __sfc: !0, t, MEDIA_TYPES: o, GAP: e, SIZES: r, FLOATS: s, editor: i, toolbarRef: l, focusInside: a, caption: u, media: c, isVisible: p, onFocusOut: d, setAttributes: f, rect: m, size: h, measure: w, position: I, onViewportChange: H, Portal: ge, Button: S, Input: xe, ToolbarGroup: vt, ToolbarSeparator: _t, Icon: E };
2564
+ }
2565
+ });
2566
+ var Ks = function() {
2567
+ var t = this, o = t._self._c, e = t._self._setupProxy;
2568
+ return o(e.Portal, [e.isVisible && e.media ? o("div", { ref: "toolbarRef", staticClass: "tiptap-toolbar rt-media-controls", style: e.position, attrs: { popover: "manual", "data-variant": "floating", role: "toolbar", "aria-label": e.t.media.toolbar }, on: { focusin: function(r) {
2569
+ e.focusInside = !0;
2570
+ }, focusout: e.onFocusOut } }, [o(e.ToolbarGroup, t._l(e.SIZES, function(r) {
2571
+ return o(e.Button, { key: r.value, attrs: { type: "button", title: e.t.media[r.value], "data-active-state": e.media.size === r.value ? "on" : "off", "aria-pressed": String(e.media.size === r.value) }, on: { mousedown: function(s) {
2572
+ s.preventDefault();
2573
+ }, click: function(s) {
2574
+ return e.setAttributes({ size: r.value });
2575
+ } } }, [o("span", { staticClass: "tiptap-button-text" }, [t._v(t._s(r.label))])]);
2576
+ }), 1), o(e.ToolbarSeparator), o(e.ToolbarGroup, t._l(e.FLOATS, function(r) {
2577
+ return o(e.Button, { key: r.value, attrs: { type: "button", title: e.t.media[r.title], "data-active-state": e.media.float === r.value ? "on" : "off", "aria-pressed": String(e.media.float === r.value) }, on: { mousedown: function(s) {
2578
+ s.preventDefault();
2579
+ }, click: function(s) {
2580
+ return e.setAttributes({ float: r.value });
2581
+ } } }, [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: r.icon } })], 1);
2582
+ }), 1), e.media.type === "image" ? [o(e.ToolbarSeparator), o(e.Input, { staticClass: "rt-media-caption", attrs: { placeholder: e.t.media.caption, "aria-label": e.t.media.caption }, on: { change: function(r) {
2583
+ return e.setAttributes({ alt: e.caption });
2584
+ }, keydown: function(r) {
2585
+ return !r.type.indexOf("key") && t._k(r.keyCode, "enter", 13, r.key, "Enter") ? null : (r.preventDefault(), e.setAttributes({ alt: e.caption }));
2586
+ } }, model: { value: e.caption, callback: function(r) {
2587
+ e.caption = r;
2588
+ }, expression: "caption" } })] : t._e()], 2) : t._e()]);
2589
+ }, qs = [], Gs = /* @__PURE__ */ _(
2590
+ js,
2591
+ Ks,
2592
+ qs
2593
+ );
2594
+ const zs = Gs.exports, Ys = /* @__PURE__ */ b({
2595
+ __name: "CharacterCount",
2596
+ props: {
2597
+ min: null,
2598
+ limit: null
2599
+ },
2600
+ setup(n) {
2601
+ const t = n, o = M(), e = $(), r = B(
2602
+ e,
2603
+ (i) => i?.storage.characterCount?.characters() ?? 0
2604
+ ), s = L(() => {
2605
+ if (t.limit && r.value >= t.limit) return "at-limit";
2606
+ if (t.min && r.value < t.min) return "below-min";
2607
+ });
2608
+ return { __sfc: !0, t: o, props: t, editor: e, characters: r, state: s };
2609
+ }
2610
+ });
2611
+ var Ws = function() {
2612
+ var t = this, o = t._self._c, e = t._self._setupProxy;
2613
+ return o("div", { staticClass: "rt-character-count", attrs: { "data-state": e.state, "aria-live": "polite" } }, [o("span", [t.limit ? [t._v(t._s(e.characters) + " / " + t._s(t.limit))] : [t._v(t._s(e.t.characterCount.count(e.characters)))]], 2), e.state === "below-min" ? o("span", { staticClass: "rt-character-count-hint" }, [t._v(" " + t._s(e.t.characterCount.atLeast(t.min ?? 0)) + " ")]) : t._e()]);
2614
+ }, Js = [], Xs = /* @__PURE__ */ _(
2615
+ Ys,
2616
+ Ws,
2617
+ Js
2618
+ );
2619
+ const Qs = Xs.exports, ea = /* @__PURE__ */ b({
2620
+ __name: "TableOfContents",
2621
+ setup(n) {
2622
+ const o = M(), e = $(), r = (u) => {
2623
+ const c = [];
2624
+ return u.descendants((p, d) => (p.type.name === "heading" && p.textContent.trim() && c.push(d), !p.isTextblock)), c;
2625
+ };
2626
+ let s = null, i = [];
2627
+ const l = B(
2628
+ e,
2629
+ (u) => {
2630
+ const c = u?.state.doc;
2631
+ if (!c) return [];
2632
+ if (c === s) return i;
2633
+ const p = r(c).map((f) => c.nodeAt(f)), d = Math.min(...p.map((f) => f.attrs.level));
2634
+ return s = c, i = p.map((f) => ({
2635
+ text: f.textContent.trim(),
2636
+ rank: Math.min(f.attrs.level - d, 3)
2637
+ })), i;
2638
+ },
2639
+ { equals: (u, c) => JSON.stringify(u) === JSON.stringify(c) }
2640
+ );
2641
+ function a(u) {
2642
+ const c = e.value?.view, p = c && r(c.state.doc)[u];
2643
+ if (!c || p == null) return;
2644
+ const d = c.nodeDOM(p);
2645
+ d instanceof HTMLElement && d.scrollIntoView({ behavior: "smooth", block: "start" });
2646
+ }
2647
+ return { __sfc: !0, MIN_HEADINGS: 2, t: o, editor: e, headingPositions: r, lastDoc: s, lastHeadings: i, headings: l, scrollTo: a };
2648
+ }
2649
+ });
2650
+ var ta = function() {
2651
+ var t = this, o = t._self._c, e = t._self._setupProxy;
2652
+ return e.headings.length >= e.MIN_HEADINGS ? o("nav", { staticClass: "rt-toc", attrs: { "aria-label": e.t.tableOfContents } }, [o("button", { staticClass: "rt-toc-lines", attrs: { type: "button", "aria-label": e.t.tableOfContents } }, t._l(e.headings, function(r, s) {
2653
+ return o("span", { key: s, staticClass: "rt-toc-line", attrs: { "data-rank": r.rank } });
2654
+ }), 0), o("ol", { staticClass: "rt-toc-list" }, t._l(e.headings, function(r, s) {
2655
+ return o("li", { key: s }, [o("button", { staticClass: "rt-toc-item", attrs: { type: "button", "data-rank": r.rank, title: r.text }, on: { click: function(i) {
2656
+ return e.scrollTo(s);
2657
+ } } }, [t._v(" " + t._s(r.text) + " ")])]);
2658
+ }), 0)]) : t._e();
2659
+ }, na = [], oa = /* @__PURE__ */ _(
2660
+ ea,
2661
+ ta,
2662
+ na
2663
+ );
2664
+ const ra = oa.exports, ia = 10, nt = new me("mentionPreviews");
2665
+ function ot(n, t) {
2666
+ if (!Object.keys(t).length) return te.empty;
2667
+ const o = [];
2668
+ return n.descendants((e, r) => {
2669
+ if (e.type.name !== "mention") return;
2670
+ const s = t[String(e.attrs.id)];
2671
+ s == null || s === "" || o.push(
2672
+ de.node(r, r + e.nodeSize, { preview: String(s) })
2673
+ );
2674
+ }), te.create(n, o);
2675
+ }
2676
+ function sa(n, t) {
2677
+ const o = t.toLowerCase();
2678
+ return n.suggestions.filter((e) => e.name.toLowerCase().includes(o)).sort((e, r) => e.name.localeCompare(r.name)).slice(0, ia).map((e) => {
2679
+ const [r, ...s] = e.name.split(":"), i = s.length > 0;
2680
+ return {
2681
+ id: e.id,
2682
+ // "Women: Paula" is listed as "Paula" under a "Women" heading
2683
+ label: i ? s.join(":").trim() : e.name,
2684
+ group: i ? r.trim() : void 0,
2685
+ suggestion: e
2686
+ };
2687
+ });
2688
+ }
2689
+ function aa({ groups: n, menu: t, getPreviews: o, onAction: e }) {
2690
+ const r = Object.entries(n), s = new Map(
2691
+ r.map(([l, a]) => [a.key || "@", { name: l, group: a }])
2692
+ ), i = (l) => {
2693
+ const a = l.attrs.mentionSuggestionChar ?? "@";
2694
+ return {
2695
+ char: s.get(a)?.group.keyInMention === !1 ? "" : a,
2696
+ label: String(l.attrs.label ?? l.attrs.id ?? "")
2697
+ };
2698
+ };
2699
+ return gn.extend({
2700
+ /**
2701
+ * The editor shows the key and label as separate spans, so the key can be
2702
+ * dimmed and a preview can replace both (input-richtext.scss). The stored
2703
+ * HTML (renderHTML below) is plain text: `<span data-type="mention">@Name</span>`.
2704
+ */
2705
+ addNodeView() {
2706
+ return ({ node: l }) => {
2707
+ const a = l.type.spec.toDOM, u = bn.renderSpec(document, a(l)).dom, { char: c, label: p } = i(l), d = (f, m) => Object.assign(document.createElement("span"), { className: f, textContent: m });
2708
+ return u.replaceChildren(
2709
+ ...c ? [d("mention-char", c)] : [],
2710
+ d("mention-label", p)
2711
+ ), { dom: u };
2712
+ };
2713
+ },
2714
+ addProseMirrorPlugins() {
2715
+ return [
2716
+ ...this.parent?.() ?? [],
2717
+ new Se({
2718
+ key: nt,
2719
+ state: {
2720
+ init: (l, a) => ot(a.doc, o()),
2721
+ apply: (l, a) => l.docChanged || l.getMeta(je) ? ot(l.doc, o()) : a
2722
+ },
2723
+ props: {
2724
+ decorations: (l) => nt.getState(l)
2725
+ }
2726
+ })
2727
+ ];
2728
+ }
2729
+ }).configure({
2730
+ HTMLAttributes: { class: "mention" },
2731
+ suggestions: r.map(([l, a]) => {
2732
+ const u = a.key || "@";
2733
+ return {
2734
+ char: u,
2735
+ pluginKey: new me(`mention-${l}`),
2736
+ items: ({ query: c }) => sa(a, c),
2737
+ render: t.render,
2738
+ command: ({ editor: c, range: p, props: d }) => {
2739
+ const { suggestion: f, label: m, group: h } = d;
2740
+ if ((f.hooks || a.hooks) && e({
2741
+ action: "select_mention",
2742
+ name: l,
2743
+ options: a,
2744
+ suggestion: f,
2745
+ hooks: [...f.hooks ?? [], ...a.hooks ?? []]
2746
+ }), f.apply === !1 || a.apply === !1) {
2747
+ c.chain().focus().deleteRange(p).run();
2748
+ return;
2749
+ }
2750
+ const I = c.view.state.selection.$to.nodeAfter?.text?.startsWith(" ") ? p.to + 1 : p.to;
2751
+ c.chain().focus().insertContentAt({ from: p.from, to: I }, [
2752
+ {
2753
+ type: "mention",
2754
+ attrs: {
2755
+ id: f.id,
2756
+ // Stored with its group, e.g. "Women: Paula"
2757
+ label: h ? `${h}: ${m}` : m,
2758
+ mentionSuggestionChar: u
2759
+ }
2760
+ },
2761
+ { type: "text", text: " " }
2762
+ ]).run(), c.view.dom.ownerDocument.defaultView?.getSelection()?.collapseToEnd();
2763
+ }
2764
+ };
2765
+ }),
2766
+ renderHTML({ options: l, node: a }) {
2767
+ const u = s.get(a.attrs.mentionSuggestionChar ?? "@"), c = u ? [`mention-${u.name}`, u.group.class].filter(Boolean).join(" ") : void 0, { char: p, label: d } = i(a);
2768
+ return [
2769
+ "span",
2770
+ dt(l.HTMLAttributes, c ? { class: c } : {}),
2771
+ `${p}${d}`
2772
+ ];
2773
+ },
2774
+ renderText({ node: l }) {
2775
+ return `${l.attrs.mentionSuggestionChar ?? "@"}${l.attrs.label ?? l.attrs.id}`;
2776
+ }
2777
+ });
2778
+ }
2779
+ function rt(n, t) {
2780
+ const o = t === "size" ? /(?:^|\s)custom-image-(small|medium|large)(?:\s|$)/ : /(?:^|\s)custom-image-float-(left|right|none)(?:\s|$)/;
2781
+ return n.className.match(o)?.[1] ?? null;
2782
+ }
2783
+ const it = {
2784
+ addAttributes() {
2785
+ return {
2786
+ ...this.parent?.(),
2787
+ loading: { default: "lazy" },
2788
+ size: {
2789
+ default: "large",
2790
+ parseHTML: (n) => n.getAttribute("size") ?? rt(n, "size") ?? "large"
2791
+ },
2792
+ float: {
2793
+ default: "none",
2794
+ parseHTML: (n) => n.getAttribute("float") ?? rt(n, "float") ?? "none"
2795
+ }
2796
+ };
2797
+ }
2798
+ }, W = new me("fileDropPlaceholders");
2799
+ let la = 0;
2800
+ function ca(n, t) {
2801
+ const o = n.doc.resolve(Math.min(t, n.doc.content.size));
2802
+ return o.parent.isTextblock ? o.parentOffset === 0 ? o.before() : o.after() : o.pos;
2803
+ }
2804
+ function st(n, t, o, e) {
2805
+ const r = document.createElement("div");
2806
+ r.className = "rt-upload-placeholder", r.contentEditable = "false", o && (r.dataset.state = "error");
2807
+ const s = document.createElement("span");
2808
+ if (s.textContent = o ? `${t}: ${o}` : n.upload.uploadingFile(t), r.append(s), e) {
2809
+ const i = document.createElement("button");
2810
+ i.type = "button", i.className = "rt-upload-placeholder-close", i.title = n.upload.dismiss, i.textContent = "×", i.addEventListener("mousedown", (l) => l.preventDefault()), i.addEventListener("click", e), r.append(i);
2811
+ }
2812
+ return r;
2813
+ }
2814
+ const ua = pt.create({
2815
+ name: "fileDrop",
2816
+ addOptions() {
2817
+ return {
2818
+ upload: () => Promise.reject(new Error("No upload function")),
2819
+ images: !1,
2820
+ files: !1,
2821
+ messages: () => oe[ne]
2822
+ };
2823
+ },
2824
+ addProseMirrorPlugins() {
2825
+ const { editor: n, options: t } = this, o = (a) => n.view.dispatch(n.state.tr.setMeta(W, a)), e = (a) => W.getState(n.state)?.find(void 0, void 0, (u) => u.id === a)[0], r = (a) => t.images && a.type.startsWith("image/") ? "image" : t.files ? "file" : null, s = (a) => a.filter((u) => r(u)), i = async (a, u) => {
2826
+ const c = r(a), p = `upload-${++la}`;
2827
+ o({ add: { id: p, pos: u, name: a.name } });
2828
+ try {
2829
+ const d = await t.upload(a, c), f = e(p);
2830
+ if (o({ remove: p }), !f) return;
2831
+ const m = c === "image" ? { type: "image", attrs: { src: d, alt: a.name.replace(/\.[^/.]+$/, "") } } : { type: "file", attrs: { href: d }, content: [{ type: "text", text: a.name }] };
2832
+ n.chain().insertContentAt(f.from, m).run();
2833
+ } catch (d) {
2834
+ o({
2835
+ fail: { id: p, message: d instanceof Error ? d.message : t.messages().upload.failed }
2836
+ });
2837
+ }
2838
+ }, l = (a, u) => {
2839
+ const c = ca(n.state, u);
2840
+ a.forEach((p) => i(p, c));
2841
+ };
2842
+ return [
2843
+ new Se({
2844
+ key: W,
2845
+ state: {
2846
+ init: () => te.empty,
2847
+ apply: (a, u) => {
2848
+ let c = u.map(a.mapping, a.doc);
2849
+ const p = a.getMeta(W);
2850
+ if (!p) return c;
2851
+ if ("add" in p) {
2852
+ const { id: d, pos: f, name: m } = p.add;
2853
+ c = c.add(a.doc, [
2854
+ de.widget(f, () => st(t.messages(), m), { id: d, name: m, side: 1 })
2855
+ ]);
2856
+ } else if ("fail" in p) {
2857
+ const { id: d, message: f } = p.fail, [m] = c.find(void 0, void 0, (h) => h.id === d);
2858
+ if (!m) return c;
2859
+ c = c.remove([m]).add(a.doc, [
2860
+ de.widget(
2861
+ m.from,
2862
+ () => st(t.messages(), m.spec.name, f, () => o({ remove: d })),
2863
+ { id: d, name: m.spec.name, side: 1 }
2864
+ )
2865
+ ]);
2866
+ } else {
2867
+ const d = p.remove;
2868
+ c = c.remove(c.find(void 0, void 0, (f) => f.id === d));
2869
+ }
2870
+ return c;
2871
+ }
2872
+ },
2873
+ props: {
2874
+ decorations: (a) => W.getState(a),
2875
+ handleDrop: (a, u, c, p) => {
2876
+ if (p) return !1;
2877
+ const d = s(Array.from(u.dataTransfer?.files ?? []));
2878
+ if (!d.length) return !1;
2879
+ u.preventDefault();
2880
+ const f = a.posAtCoords({ left: u.clientX, top: u.clientY })?.pos ?? a.state.selection.from;
2881
+ return l(d, f), !0;
2882
+ },
2883
+ handlePaste: (a, u) => {
2884
+ const c = u.clipboardData, p = s(Array.from(c?.files ?? []));
2885
+ return !p.length || c?.types.includes("text/html") || c?.types.includes("text/plain") ? !1 : (l(p, a.state.selection.from), !0);
2886
+ }
2887
+ }
2888
+ })
2889
+ ];
2890
+ }
2891
+ }), da = yn.extend({
2892
+ addAttributes() {
2893
+ return {
2894
+ ...this.parent?.(),
2895
+ target: {
2896
+ default: "_blank",
2897
+ parseHTML: (n) => n.getAttribute("target") || "_self"
2898
+ }
2899
+ };
2900
+ }
2901
+ });
2902
+ function pa(n, t) {
2903
+ return an.extend({
2904
+ addNodeView() {
2905
+ const o = this.parent?.();
2906
+ return o ? (e) => {
2907
+ const r = o(e), s = r.dom.querySelector(
2908
+ ":scope > label > input[type='checkbox']"
2909
+ );
2910
+ return s?.addEventListener("change", () => {
2911
+ const { editor: i, getPos: l } = e;
2912
+ if (i.isEditable || !n()) return;
2913
+ const a = typeof l == "function" ? l() : void 0, u = typeof a == "number" ? i.state.doc.nodeAt(a) : null;
2914
+ typeof a != "number" || u?.type.name !== this.name || i.view.dispatch(
2915
+ i.state.tr.setNodeMarkup(a, void 0, {
2916
+ ...u.attrs,
2917
+ checked: s.checked
2918
+ })
2919
+ );
2920
+ }), r;
2921
+ } : null;
2922
+ }
2923
+ }).configure({
2924
+ nested: !0,
2925
+ // Without this, Tiptap unchecks the box again while read-only
2926
+ onReadOnlyChecked: () => n(),
2927
+ a11y: { checkboxLabel: (o) => t().list.taskCheckbox(o.textContent) }
2928
+ });
2929
+ }
2930
+ const fa = pt.create({
2931
+ name: "headingId",
2932
+ addGlobalAttributes() {
2933
+ return [
2934
+ {
2935
+ types: ["heading"],
2936
+ attributes: {
2937
+ id: {
2938
+ default: null,
2939
+ parseHTML: (n) => n.getAttribute("id") || null,
2940
+ renderHTML: (n) => n.id ? { id: n.id } : {}
2941
+ }
2942
+ }
2943
+ }
2944
+ ];
2945
+ },
2946
+ addCommands() {
2947
+ return {
2948
+ setHeadingId: (n) => ({ commands: t }) => t.updateAttributes("heading", { id: n?.trim() || null })
2949
+ };
2950
+ }
2951
+ }), qt = [
2952
+ "bold",
2953
+ "italic",
2954
+ "strike",
2955
+ "underline",
2956
+ "link",
2957
+ "heading",
2958
+ "bulletList",
2959
+ "orderedList",
2960
+ "placeholder",
2961
+ "typography",
2962
+ "mediaControls",
2963
+ "tableOfContents"
2964
+ ], ma = {
2965
+ addAttributes() {
2966
+ return {
2967
+ ...this.parent?.(),
2968
+ width: { default: 640, parseHTML: () => 640 },
2969
+ height: { default: 360, parseHTML: () => 360 }
2970
+ };
2971
+ }
2972
+ }, Gt = [2, 3], Ca = /* @__PURE__ */ new Set([
2973
+ "bold",
2974
+ "italic",
2975
+ "strike",
2976
+ "underline",
2977
+ "code",
2978
+ "superscript",
2979
+ "subscript",
2980
+ "blockquote",
2981
+ "codeBlock",
2982
+ "textAlign",
2983
+ "visibilityConditions"
2984
+ ]), at = /* @__PURE__ */ new Set([
2985
+ ...qt,
2986
+ "taskList",
2987
+ "undoRedo",
2988
+ "code",
2989
+ "highlight",
2990
+ "subscript",
2991
+ "superscript",
2992
+ "blockquote",
2993
+ "codeBlock",
2994
+ "horizontalRule",
2995
+ "textAlign",
2996
+ "image",
2997
+ "file",
2998
+ "youtube",
2999
+ "table",
3000
+ "characterCount",
3001
+ "templates",
3002
+ "mention",
3003
+ "visibilityConditions"
3004
+ ]);
3005
+ function ha(n = {}, t) {
3006
+ const o = /* @__PURE__ */ new Set(), e = [];
3007
+ return n.hidden?.forEach((r) => {
3008
+ Ca.has(r) ? o.add(r) : e.push(r);
3009
+ }), e.length && console.warn(
3010
+ `[richtext] These buttons can't be hidden and stay visible: ${e.join(", ")}`
3011
+ ), new Set([...o].filter((r) => t.has(r)));
3012
+ }
3013
+ function va(n = {}) {
3014
+ const t = new Set(qt);
3015
+ n.enabled?.forEach((e) => t.add(e)), n.characterCount && t.add("characterCount"), n.templates?.length && t.add("templates"), Object.keys(n.mentions ?? {}).length && t.add("mention"), n.visibilityConditions?.conditions?.length && t.add("visibilityConditions"), n.disabled?.forEach((e) => t.delete(e));
3016
+ const o = [...t].filter((e) => !at.has(e));
3017
+ return o.length && console.warn(
3018
+ `[richtext] Unsupported extensions are ignored: ${o.join(", ")}`
3019
+ ), new Set(
3020
+ [...t].filter((e) => at.has(e))
3021
+ );
3022
+ }
3023
+ function _a(n, t, o) {
3024
+ const e = (l) => n.has(l), r = (l, a) => e(l) ? a ?? {} : !1, s = e("bulletList") || e("orderedList"), i = [
3025
+ rn.configure({
3026
+ bold: r("bold"),
3027
+ italic: r("italic"),
3028
+ strike: r("strike"),
3029
+ underline: r("underline"),
3030
+ code: r("code"),
3031
+ blockquote: r("blockquote"),
3032
+ codeBlock: r("codeBlock"),
3033
+ heading: r("heading", {
3034
+ levels: t.heading?.levels ?? Gt
3035
+ }),
3036
+ bulletList: r("bulletList"),
3037
+ orderedList: r("orderedList"),
3038
+ listItem: s ? {} : !1,
3039
+ listKeymap: s ? {} : !1,
3040
+ // Added below, with a target that survives a round trip
3041
+ link: !1,
3042
+ // p5: StarterKit's <hr> instead of the template's <div><hr></div> wrapper
3043
+ horizontalRule: r("horizontalRule")
3044
+ }),
3045
+ mn,
3046
+ fa
3047
+ ];
3048
+ return e("link") && i.push(da.configure({ openOnClick: !1, enableClickSelection: !0 })), e("textAlign") && i.push(cn.configure({ types: ["heading", "paragraph"] })), e("taskList") && i.push(ln, pa(o.canCheckTasksReadonly, o.messages)), e("highlight") && i.push(dn.configure({ multicolor: !0 })), e("subscript") && i.push(pn), e("superscript") && i.push(fn), e("typography") && i.push(un), e("placeholder") && i.push(Cn.configure({ placeholder: o.placeholder })), e("image") && i.push(sn.extend(it)), e("file") && i.push(bs), (e("image") || e("file")) && i.push(
3049
+ ua.configure({
3050
+ upload: o.uploadFile,
3051
+ images: e("image"),
3052
+ files: e("file"),
3053
+ messages: o.messages
3054
+ })
3055
+ ), e("table") && i.push(_n.configure({ table: { resizable: !1 } })), e("characterCount") && i.push(hn.configure({ limit: t.characterCount?.limit })), e("youtube") && i.push(
3056
+ vn.extend(it).extend(ma).configure({
3057
+ nocookie: !0,
3058
+ modestBranding: !0,
3059
+ ivLoadPolicy: 3,
3060
+ width: 640,
3061
+ height: 360
3062
+ })
3063
+ ), e("mention") && t.mentions && o.mentionMenu && i.push(
3064
+ aa({
3065
+ groups: t.mentions,
3066
+ menu: o.mentionMenu,
3067
+ getPreviews: o.getMentionPreviews,
3068
+ onAction: o.onAction
3069
+ })
3070
+ ), e("visibilityConditions") && i.push(
3071
+ ms.configure({
3072
+ getPreviews: o.getMentionPreviews,
3073
+ messages: o.messages
3074
+ })
3075
+ ), i;
3076
+ }
3077
+ function ga() {
3078
+ const n = Qt({
3079
+ open: !1,
3080
+ items: [],
3081
+ selectedIndex: 0,
3082
+ rect: null
3083
+ });
3084
+ let t = null;
3085
+ const o = (i) => {
3086
+ n.items = i.items, n.rect = i.clientRect?.() ?? null, n.selectedIndex = 0, t = i.command;
3087
+ }, e = (i = n.selectedIndex) => {
3088
+ const l = n.items[i];
3089
+ l && t?.(l);
3090
+ }, r = ({ event: i }) => {
3091
+ if (!n.open || !n.items.length) return !1;
3092
+ const l = n.items.length;
3093
+ switch (i.key) {
3094
+ case "ArrowDown":
3095
+ return n.selectedIndex = (n.selectedIndex + 1) % l, !0;
3096
+ case "ArrowUp":
3097
+ return n.selectedIndex = (n.selectedIndex - 1 + l) % l, !0;
3098
+ case "Enter":
3099
+ case "Tab":
3100
+ return e(), !0;
3101
+ default:
3102
+ return !1;
3103
+ }
3104
+ };
3105
+ return { state: n, select: e, render: () => ({
3106
+ onStart: (i) => {
3107
+ o(i), n.open = !0;
3108
+ },
3109
+ onUpdate: o,
3110
+ onKeyDown: r,
3111
+ onExit: () => {
3112
+ n.open = !1, t = null;
3113
+ }
3114
+ }) };
3115
+ }
3116
+ const ba = { model: { prop: "modelValue", event: "update:modelValue" } }, ya = /* @__PURE__ */ b({
3117
+ ...ba,
3118
+ __name: "InputRichtext",
3119
+ props: {
3120
+ modelValue: { default: "" },
3121
+ outputFormat: { default: "html" },
3122
+ options: { default: () => ({}) },
3123
+ mentionPreviews: { default: () => ({}) },
3124
+ onUploadFile: { default: void 0 },
3125
+ placeholder: { default: void 0 },
3126
+ readonly: { type: [Boolean, String], default: !1 },
3127
+ autofocus: { type: Boolean, default: !1 },
3128
+ name: { default: void 0 },
3129
+ required: { type: Boolean, default: !1 },
3130
+ toolbarPosition: { default: "top" },
3131
+ compact: { type: Boolean, default: !1 },
3132
+ locale: { default: "nl" }
3133
+ },
3134
+ emits: ["update:modelValue", "action", "keydown-ctrl-enter", "error"],
3135
+ setup(n, { expose: t, emit: o }) {
3136
+ const e = n, r = Kn(() => e.locale), s = va(e.options), i = (C) => s.has(C), l = ha(e.options, s), a = (C) => i(C) && !l.has(C), u = e.options.heading?.levels ?? Gt, c = ["bulletList", "orderedList", "taskList"].filter(i), p = {
3137
+ blocks: i("heading") || c.length > 0 || a("blockquote") || a("codeBlock") || a("visibilityConditions"),
3138
+ marks: ["bold", "italic", "strike", "code", "underline", "highlight", "link"].some(a),
3139
+ scripts: a("superscript") || a("subscript"),
3140
+ align: a("textAlign"),
3141
+ media: ["image", "file", "youtube", "table", "templates"].some(i),
3142
+ mediaControls: i("mediaControls") && (i("image") || i("youtube"))
3143
+ }, d = ["bold", "italic", "strike", "code", "underline"].filter(a), f = ["left", "center", "right", "justify"], m = i("mention") ? ga() : null, h = (C) => typeof C == "string" ? Kt(C) : C ?? "", w = (C) => e.outputFormat === "html" ? Ps(C.getHTML()) : C.getJSON();
3144
+ let I;
3145
+ const H = wn(() => {
3146
+ v.value && (I = w(v.value), o("update:modelValue", I));
3147
+ }, 200);
3148
+ q(() => H.flush());
3149
+ const k = 1200, y = async (C, T) => {
3150
+ const D = (R, V) => {
3151
+ const O = V instanceof Error ? V : new Error(R);
3152
+ return o("error", { type: "upload", file: C, message: O.message, error: O }), O;
3153
+ };
3154
+ if (!e.onUploadFile)
3155
+ throw D("<InputRichtext> needs an onUploadFile function to upload files");
3156
+ if (T === "image" && (C = await xn(C, e.options.image?.maxWidth ?? k)), C.size > We)
3157
+ throw D(r.value.upload.tooLarge(We / 1024 / 1024));
3158
+ try {
3159
+ return await e.onUploadFile(C, T);
3160
+ } catch (R) {
3161
+ throw D(r.value.upload.failed, R);
3162
+ }
3163
+ }, v = kn({
3164
+ content: h(e.modelValue),
3165
+ editable: !e.readonly,
3166
+ autofocus: e.autofocus,
3167
+ extensions: _a(s, e.options, {
3168
+ placeholder: () => e.placeholder ?? r.value.placeholder,
3169
+ mentionMenu: m,
3170
+ getMentionPreviews: () => e.mentionPreviews,
3171
+ onAction: (C) => o("action", C),
3172
+ uploadFile: y,
3173
+ canCheckTasksReadonly: () => e.readonly === "tasks",
3174
+ messages: () => r.value
3175
+ }),
3176
+ editorProps: {
3177
+ handleKeyDown: (C, T) => T.key === "Enter" && (T.ctrlKey || T.metaKey) ? (o("keydown-ctrl-enter", T), !0) : !1
3178
+ },
3179
+ onUpdate: () => H()
3180
+ });
3181
+ uo(v);
3182
+ const A = (C, T) => C === T || typeof C == "object" && typeof T == "object" && JSON.stringify(C) === JSON.stringify(T);
3183
+ x(
3184
+ () => e.modelValue,
3185
+ (C) => {
3186
+ !v.value || A(C, I) || (H.cancel(), v.value.commands.setContent(h(C), { emitUpdate: !1 }), I = C);
3187
+ }
3188
+ ), x(
3189
+ () => e.readonly,
3190
+ (C) => v.value?.setEditable(!C)
3191
+ ), x(
3192
+ () => e.autofocus,
3193
+ (C) => {
3194
+ C && v.value?.commands.focus();
3195
+ }
3196
+ ), x(
3197
+ [() => e.mentionPreviews, () => e.locale],
3198
+ () => v.value && ps(v.value),
3199
+ { deep: !0 }
3200
+ );
3201
+ const j = g(null);
3202
+ function Te() {
3203
+ const C = j.value, T = C?.querySelector(".rt-editor-toolbar");
3204
+ !e.compact || !C || !T || (C.dataset.toolbarHold = getComputedStyle(T).display === "none" ? "hidden" : "shown", ft(() => {
3205
+ delete C.dataset.toolbarHold;
3206
+ }));
3207
+ }
3208
+ G(() => document.addEventListener("pointerdown", Te, !0)), q(() => document.removeEventListener("pointerdown", Te, !0));
3209
+ const z = e.options.characterCount?.min, zt = L(() => !!(e.name || e.required || z)), ce = g(null), Ke = g(!1), Y = B(
3210
+ L(() => v.value ?? null),
3211
+ (C) => ({
3212
+ empty: C?.isEmpty ?? !0,
3213
+ characters: C?.storage.characterCount?.characters() ?? 0
3214
+ })
3215
+ ), Ie = L(
3216
+ () => !!z && !Y.value.empty && Y.value.characters < z
3217
+ ), qe = L(() => !(e.required && Y.value.empty) && !Ie.value);
3218
+ en(() => {
3219
+ ce.value?.setCustomValidity(
3220
+ Ie.value ? r.value.validation.minCharacters(z ?? 0, Y.value.characters) : ""
3221
+ );
3222
+ }), x(qe, (C) => {
3223
+ C && (Ke.value = !1);
3224
+ });
3225
+ function Yt(C) {
3226
+ C.key !== "Tab" && v.value?.view.focus();
3227
+ }
3228
+ x(
3229
+ () => e.name ? ce.value?.form : null,
3230
+ (C, T, D) => {
3231
+ if (!C) return;
3232
+ const R = (V) => {
3233
+ if (!v.value || !e.name) return;
3234
+ const O = w(v.value);
3235
+ V.formData.set(e.name, typeof O == "string" ? O : JSON.stringify(O));
3236
+ };
3237
+ C.addEventListener("formdata", R), D(() => C.removeEventListener("formdata", R));
3238
+ },
3239
+ { flush: "post" }
3240
+ );
3241
+ function Wt(C) {
3242
+ const T = v.value;
3243
+ if (C.defaultPrevented || !T) return;
3244
+ const D = C.currentTarget;
3245
+ if (ue(C, X.focusToolbar)) {
3246
+ C.preventDefault(), D.querySelector(
3247
+ '.tiptap-toolbar [tabindex="0"]:not([disabled]), .tiptap-toolbar button:not([disabled])'
3248
+ )?.focus();
3249
+ return;
3250
+ }
3251
+ if (C.key === "Escape" && C.target.closest(".tiptap-toolbar")) {
3252
+ T.commands.focus();
3253
+ return;
3254
+ }
3255
+ if (ue(C, X.clearFormatting)) {
3256
+ C.preventDefault(), Object.keys(T.schema.marks).filter((V) => V !== "link").reduce((V, O) => V.unsetMark(O), T.chain().focus()).run();
3257
+ return;
3258
+ }
3259
+ const R = Array.from(
3260
+ D.querySelectorAll("button[data-rt-shortcut]")
3261
+ ).find((V) => !V.disabled && ue(C, V.dataset.rtShortcut));
3262
+ R && (C.preventDefault(), R.click(), Ge(R));
3263
+ }
3264
+ function Ge(C) {
3265
+ const T = C.getAttribute("popovertarget"), D = T ? document.getElementById(T) : null;
3266
+ if (!D) return;
3267
+ const R = (V) => {
3268
+ if (V.newState !== "closed") return;
3269
+ D.removeEventListener("toggle", R);
3270
+ const O = document.activeElement;
3271
+ (!O || O === document.body || C.contains(O)) && v.value?.commands.focus();
3272
+ };
3273
+ D.addEventListener("toggle", R);
3274
+ }
3275
+ const ze = Ue(), Ye = g("main");
3276
+ return x(ze, (C) => {
3277
+ C || (Ye.value = "main");
3278
+ }), t({
3279
+ editor: L(() => v.value),
3280
+ /** Same as a form field's checkValidity(); true when not part of form validation */
3281
+ checkValidity: () => ce.value?.checkValidity() ?? !0
3282
+ }), { __sfc: !0, props: e, emit: o, t: r, enabled: s, has: i, hiddenButtons: l, showButton: a, headingLevels: u, listTypes: c, groups: p, formattingMarks: d, textAligns: f, mentionMenu: m, toEditorContent: h, getValue: w, lastEmitted: I, emitValue: H, DEFAULT_IMAGE_MAX_WIDTH: k, uploadFile: y, editor: v, isSameValue: A, rootRef: j, holdToolbar: Te, minCharacters: z, isFormField: zt, formField: ce, showInvalid: Ke, validity: Y, tooShort: Ie, isValid: qe, onFormFieldKeydown: Yt, onKeydown: Wt, returnFocusOnClose: Ge, isMobile: ze, mobileView: Ye, EditorContent: nn, Button: S, Spacer: Zn, Toolbar: Jn, ToolbarGroup: vt, ToolbarSeparator: _t, HeadingDropdownMenu: pr, ListDropdownMenu: xr, CommandButton: _e, blockquoteCommand: Hr, codeBlockCommand: Sr, ColorHighlightPopover: _i, ColorHighlightPopoverContent: Bt, ColorHighlightPopoverButton: $t, LinkPopover: Fi, LinkContent: Ki, LinkButton: Vt, markCommand: Wi, textAlignCommand: ns, undoRedoCommand: ss, Icon: E, ArrowLeftIcon: fo, HighlighterIcon: Ee, LinkIcon: Re, MentionMenu: ds, VisibilityConditionsMenu: gs, UploadPopover: xs, YoutubePopover: As, TableMenu: Rs, TemplatesMenu: Us, MediaControls: zs, CharacterCount: Qs, TableOfContents: ra, SHORTCUTS: X };
3283
+ }
3284
+ });
3285
+ var ka = function() {
3286
+ var t = this, o = t._self._c, e = t._self._setupProxy;
3287
+ return o("div", { ref: "rootRef", staticClass: "rt-editor", attrs: { "data-readonly": t.readonly || void 0, "data-toolbar": t.toolbarPosition, "data-compact": t.compact || void 0, "data-invalid": e.showInvalid || void 0 }, on: { keydown: e.onKeydown } }, [e.editor && !t.readonly ? o(e.Toolbar, { staticClass: "rt-editor-toolbar" }, [e.mobileView === "main" ? [o(e.ToolbarGroup, [e.has("undoRedo") ? [o(e.CommandButton, { attrs: { command: e.undoRedoCommand("undo") } }), o(e.CommandButton, { attrs: { command: e.undoRedoCommand("redo") } })] : t._e()], 2), e.groups.blocks ? [o(e.ToolbarSeparator), o(e.ToolbarGroup, [e.has("heading") ? o(e.HeadingDropdownMenu, { attrs: { levels: e.headingLevels } }) : t._e(), e.listTypes.length ? o(e.ListDropdownMenu, { attrs: { types: e.listTypes } }) : t._e(), e.showButton("blockquote") ? o(e.CommandButton, { attrs: { command: e.blockquoteCommand() } }) : t._e(), e.showButton("codeBlock") ? o(e.CommandButton, { attrs: { command: e.codeBlockCommand() } }) : t._e(), e.showButton("visibilityConditions") ? o(e.VisibilityConditionsMenu, { attrs: { conditions: t.options.visibilityConditions?.conditions ?? [] } }) : t._e()], 1)] : t._e(), e.groups.marks ? [o(e.ToolbarSeparator), o(e.ToolbarGroup, [t._l(e.formattingMarks, function(r) {
3288
+ return o(e.CommandButton, { key: r, attrs: { command: e.markCommand(r) } });
3289
+ }), e.has("highlight") ? [e.isMobile ? o(e.ColorHighlightPopoverButton, { attrs: { "data-rt-shortcut": e.SHORTCUTS.highlight }, on: { click: function(r) {
3290
+ e.mobileView = "highlighter";
3291
+ } } }) : o(e.ColorHighlightPopover)] : t._e(), e.has("link") ? [e.isMobile ? o(e.LinkButton, { attrs: { "data-rt-shortcut": e.SHORTCUTS.link }, on: { click: function(r) {
3292
+ e.mobileView = "link";
3293
+ } } }) : o(e.LinkPopover)] : t._e()], 2)] : t._e(), e.groups.scripts ? [o(e.ToolbarSeparator), o(e.ToolbarGroup, [e.showButton("superscript") ? o(e.CommandButton, { attrs: { command: e.markCommand("superscript") } }) : t._e(), e.showButton("subscript") ? o(e.CommandButton, { attrs: { command: e.markCommand("subscript") } }) : t._e()], 1)] : t._e(), e.groups.align ? [o(e.ToolbarSeparator), o(e.ToolbarGroup, t._l(e.textAligns, function(r) {
3294
+ return o(e.CommandButton, { key: r, attrs: { command: e.textAlignCommand(r) } });
3295
+ }), 1)] : t._e(), e.groups.media ? [o(e.ToolbarSeparator), o(e.ToolbarGroup, [e.has("image") ? o(e.UploadPopover, { attrs: { type: "image", upload: t.onUploadFile ? e.uploadFile : void 0, "shortcut-keys": e.SHORTCUTS.image } }) : t._e(), e.has("file") ? o(e.UploadPopover, { attrs: { type: "file", upload: t.onUploadFile ? e.uploadFile : void 0, "shortcut-keys": e.SHORTCUTS.file } }) : t._e(), e.has("youtube") ? o(e.YoutubePopover) : t._e(), e.has("table") ? o(e.TableMenu, { attrs: { "insert-defaults": t.options.table?.insertDefaults } }) : t._e(), e.has("templates") ? o(e.TemplatesMenu, { attrs: { templates: t.options.templates ?? [] } }) : t._e()], 1)] : t._e()] : [o(e.ToolbarGroup, [o(e.Button, { attrs: { "aria-label": e.t.back, tooltip: e.t.back }, on: { click: function(r) {
3296
+ e.mobileView = "main";
3297
+ } } }, [o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.ArrowLeftIcon } }), o(e.Icon, { staticClass: "tiptap-button-icon", attrs: { name: e.mobileView === "highlighter" ? e.HighlighterIcon : e.LinkIcon } })], 1)], 1), o(e.ToolbarSeparator), e.mobileView === "highlighter" ? o(e.ColorHighlightPopoverContent) : o(e.LinkContent)], o(e.Spacer), t._t("after-menu")], 2) : t._e(), e.editor && e.has("tableOfContents") ? o(e.TableOfContents) : t._e(), o(e.EditorContent, { staticClass: "rt-editor-content", attrs: { editor: e.editor } }), e.isFormField ? o("textarea", { ref: "formField", staticClass: "rt-form-field", attrs: { required: t.required, tabindex: "-1", "aria-hidden": "true" }, domProps: { value: e.validity.empty ? "" : " " }, on: { keydown: e.onFormFieldKeydown, invalid: function(r) {
3298
+ e.showInvalid = !0;
3299
+ } } }) : t._e(), e.editor && !t.readonly && e.has("characterCount") ? o("div", { staticClass: "rt-editor-footer" }, [o(e.CharacterCount, { attrs: { min: t.options.characterCount?.min, limit: t.options.characterCount?.limit } })], 1) : t._e(), e.editor && !t.readonly && e.groups.mediaControls ? o(e.MediaControls) : t._e(), e.mentionMenu ? o(e.MentionMenu, { attrs: { state: e.mentionMenu.state }, on: { select: e.mentionMenu.select } }) : t._e()], 1);
3300
+ }, wa = [], La = /* @__PURE__ */ _(
3301
+ ya,
3302
+ ka,
3303
+ wa
3304
+ );
3305
+ const xa = La.exports, Ka = {
3306
+ // `app` is a Vue 3 app, or the Vue 2 constructor (Vue.use)
3307
+ install(n) {
3308
+ n.component("InputRichtext", xa);
3309
+ }
3310
+ };
3311
+ export {
3312
+ xa as InputRichtext,
3313
+ Ka as RichtextPlugin,
3314
+ Ps as addLiquidConditions,
3315
+ Ka as default,
3316
+ Kt as stripLiquidConditions
3317
+ };
3318
+ //# sourceMappingURL=v-richtext.js.map