@dialpad/dialtone-vue 2.195.2 → 2.195.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { NodeViewWrapper as _, nodeViewProps as y, VueRenderer as w, VueNodeViewRenderer as v, EditorContent as H, BubbleMenu as j, Editor as F } from "../../node_modules/@tiptap/vue-2.js";
2
- import { Node as N, mergeAttributes as m, InputRule as K, nodePasteRule as E, getMarksBetween as q, combineTransactionSteps as U, getChangedRanges as W, findChildrenInRange as V, Mark as z, nodeInputRule as X, Extension as J } from "@tiptap/core";
1
+ import { NodeViewWrapper as _, nodeViewProps as w, VueRenderer as y, VueNodeViewRenderer as v, EditorContent as H, BubbleMenu as j, Editor as N } from "../../node_modules/@tiptap/vue-2.js";
2
+ import { Node as F, mergeAttributes as m, InputRule as K, nodePasteRule as E, getMarksBetween as q, combineTransactionSteps as U, getChangedRanges as z, findChildrenInRange as W, Mark as V, nodeInputRule as X, Extension as J } from "@tiptap/core";
3
3
  import Y from "@tiptap/extension-blockquote";
4
4
  import G from "@tiptap/extension-code-block";
5
5
  import Q from "@tiptap/extension-code";
@@ -26,39 +26,54 @@ import _e from "@tiptap/suggestion";
26
26
  import { emojiPattern as O } from "regex-combined-emojis";
27
27
  import { n as c } from "../../_plugin-vue2_normalizer-DSLOjnn3.js";
28
28
  import P from "../emoji/emoji.js";
29
- import { stringToUnicode as ye, codeToEmojiData as L, emojiRegex as we, emojiShortCodeRegex as ve } from "../../common/emoji/index.js";
30
- import { emojisIndexed as xe } from "@dialpad/dialtone-emojis";
29
+ import we from "../skeleton/skeleton.js";
30
+ import { codeToEmojiData as L, stringToUnicode as ye, emojiRegex as ve, emojiShortCodeRegex as xe } from "../../common/emoji/index.js";
31
+ import { emojisIndexed as ke } from "@dialpad/dialtone-emojis";
31
32
  import be from "../list-item/list-item.js";
32
33
  import x from "../stack/stack.js";
33
- import b from "tippy.js";
34
- import { linkRegex as ke, getPhoneNumberRegex as Ce, warnIfUnmounted as Te } from "../../common/utils/index.js";
35
- import Ee from "@tiptap/extension-image";
34
+ import k from "tippy.js";
35
+ import { linkRegex as Ce, getPhoneNumberRegex as Te, warnIfUnmounted as Ee } from "../../common/utils/index.js";
36
+ import Se from "@tiptap/extension-image";
36
37
  import R from "@tiptap/extension-mention";
37
38
  import D from "../link/link.js";
38
- import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as Se, RICH_TEXT_EDITOR_OUTPUT_FORMATS as Le, RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as $ } from "./rich-text-editor-constants.js";
39
- import Re from "../avatar/avatar.js";
40
- import $e from "@dialpad/dialtone-icons/vue2/hash";
41
- import Ie from "@dialpad/dialtone-icons/vue2/lock";
42
- import Ae from "deep-equal";
43
- import { DialtoneLocalization as Be } from "../../localization/index.js";
44
- import Oe from "../button/button.js";
45
- const Pe = {
39
+ import { RICH_TEXT_EDITOR_AUTOFOCUS_TYPES as Le, RICH_TEXT_EDITOR_OUTPUT_FORMATS as Re, RICH_TEXT_EDITOR_SUPPORTED_LINK_PROTOCOLS as $ } from "./rich-text-editor-constants.js";
40
+ import $e from "../avatar/avatar.js";
41
+ import Ie from "@dialpad/dialtone-icons/vue2/hash";
42
+ import Ae from "@dialpad/dialtone-icons/vue2/lock";
43
+ import Be from "deep-equal";
44
+ import { DialtoneLocalization as Oe } from "../../localization/index.js";
45
+ import Pe from "../button/button.js";
46
+ const De = {
46
47
  name: "EmojiComponent",
47
48
  components: {
48
49
  NodeViewWrapper: _,
49
- DtEmoji: P
50
+ DtEmoji: P,
51
+ DtSkeleton: we
52
+ },
53
+ props: w,
54
+ data() {
55
+ return {
56
+ showSkeleton: !0
57
+ };
50
58
  },
51
- props: y
59
+ methods: {
60
+ handleImageLoad() {
61
+ this.showSkeleton = !1;
62
+ },
63
+ handleImageError: function(t) {
64
+ this.showSkeleton = !1, t.target.parentNode.remove();
65
+ }
66
+ }
52
67
  };
53
- var De = function() {
54
- var t = this, n = t._self._c;
55
- return n("node-view-wrapper", { staticClass: "d-d-inline-block d-va-bottom d-lh0" }, [n("dt-emoji", { attrs: { size: "500", code: t.node.attrs.code } })], 1);
56
- }, Me = [], He = /* @__PURE__ */ c(
57
- Pe,
68
+ var Me = function() {
69
+ var e = this, n = e._self._c;
70
+ return n("node-view-wrapper", { staticClass: "d-d-inline-block d-va-bottom d-lh0" }, [e.node.attrs.code ? n("dt-emoji", { attrs: { size: "500", code: e.node.attrs.code } }) : [e.showSkeleton ? n("dt-skeleton", { staticClass: "d-icon d-icon--size-500", attrs: { offset: 0, "shape-option": { shape: "circle", size: "100%" } } }) : e._e(), n("img", { directives: [{ name: "show", rawName: "v-show", value: !e.showSkeleton, expression: "!showSkeleton" }], staticClass: "d-icon d-icon--size-500", attrs: { alt: e.node.attrs.name, "aria-label": e.node.attrs.name, title: e.node.attrs.name, src: e.node.attrs.image }, on: { load: e.handleImageLoad, error: e.handleImageError } })]], 2);
71
+ }, He = [], je = /* @__PURE__ */ c(
58
72
  De,
59
- Me
73
+ Me,
74
+ He
60
75
  );
61
- const je = He.exports, Fe = {
76
+ const Ne = je.exports, Fe = {
62
77
  name: "SuggestionList",
63
78
  components: {
64
79
  DtListItem: be
@@ -92,8 +107,8 @@ const je = He.exports, Fe = {
92
107
  }
93
108
  },
94
109
  methods: {
95
- onKeyDown({ event: e }) {
96
- return e.key === "ArrowUp" ? (this.upHandler(), !0) : e.key === "ArrowDown" ? (this.downHandler(), !0) : e.key === "Enter" || e.key === "Tab" ? (this.selectHandler(), !0) : !1;
110
+ onKeyDown({ event: t }) {
111
+ return t.key === "ArrowUp" ? (this.upHandler(), !0) : t.key === "ArrowDown" ? (this.downHandler(), !0) : t.key === "Enter" || t.key === "Tab" ? (this.selectHandler(), !0) : !1;
97
112
  },
98
113
  upHandler() {
99
114
  this.selectedIndex = (this.selectedIndex + this.items.length - 1) % this.items.length, this.scrollActiveElementIntoView();
@@ -103,8 +118,8 @@ const je = He.exports, Fe = {
103
118
  },
104
119
  async scrollActiveElementIntoView() {
105
120
  await this.$nextTick();
106
- const e = this.$refs.suggestionList.querySelector(".d-list-item--highlighted");
107
- e && e.scrollIntoView({
121
+ const t = this.$refs.suggestionList.querySelector(".d-list-item--highlighted");
122
+ t && t.scrollIntoView({
108
123
  behaviour: "smooth",
109
124
  block: "center"
110
125
  });
@@ -112,43 +127,43 @@ const je = He.exports, Fe = {
112
127
  selectHandler() {
113
128
  this.selectItem(this.selectedIndex);
114
129
  },
115
- selectItem(e) {
116
- const t = this.items[e];
130
+ selectItem(t) {
131
+ const e = this.items[t];
117
132
  switch (this.itemType) {
118
133
  case "emoji":
119
- this.command(t);
134
+ this.command(e);
120
135
  return;
121
136
  case "mention":
122
- this.command({ name: t.name, id: t.id, avatarSrc: t.avatarSrc });
137
+ this.command({ name: e.name, id: e.id, avatarSrc: e.avatarSrc });
123
138
  break;
124
139
  case "channel":
125
- this.command({ name: t.name, id: t.id });
140
+ this.command({ name: e.name, id: e.id });
126
141
  break;
127
142
  case "slash-command":
128
- this.command({ command: t.command });
143
+ this.command({ command: e.command });
129
144
  break;
130
145
  }
131
146
  }
132
147
  }
133
148
  };
134
- var Ne = function() {
135
- var t = this, n = t._self._c;
136
- return n("div", { staticClass: "d-popover__dialog d-suggestion-list__container" }, [n("ul", { directives: [{ name: "show", rawName: "v-show", value: t.items.length, expression: "items.length" }], ref: "suggestionList", staticClass: "d-suggestion-list" }, t._l(t.items, function(r, s) {
149
+ var Ke = function() {
150
+ var e = this, n = e._self._c;
151
+ return n("div", { staticClass: "d-popover__dialog d-suggestion-list__container" }, [n("ul", { directives: [{ name: "show", rawName: "v-show", value: e.items.length, expression: "items.length" }], ref: "suggestionList", staticClass: "d-suggestion-list" }, e._l(e.items, function(r, s) {
137
152
  return n("dt-list-item", { key: r.id, class: [
138
153
  "d-suggestion-list__item",
139
- { "d-list-item--highlighted": s === t.selectedIndex }
154
+ { "d-list-item--highlighted": s === e.selectedIndex }
140
155
  ], attrs: { "navigation-type": "arrow-keys" }, on: { click: function(o) {
141
- return t.selectItem(s);
156
+ return e.selectItem(s);
142
157
  }, keydown: function(o) {
143
- return o.preventDefault(), t.onKeyDown.apply(null, arguments);
144
- } } }, [n(t.itemComponent, { tag: "component", attrs: { item: r } })], 1);
158
+ return o.preventDefault(), e.onKeyDown.apply(null, arguments);
159
+ } } }, [n(e.itemComponent, { tag: "component", attrs: { item: r } })], 1);
145
160
  }), 1)]);
146
- }, Ke = [], qe = /* @__PURE__ */ c(
161
+ }, qe = [], Ue = /* @__PURE__ */ c(
147
162
  Fe,
148
- Ne,
149
- Ke
163
+ Ke,
164
+ qe
150
165
  );
151
- const k = qe.exports, Ue = {
166
+ const b = Ue.exports, ze = {
152
167
  name: "EmojiSuggestion",
153
168
  components: {
154
169
  DtEmoji: P,
@@ -162,46 +177,46 @@ const k = qe.exports, Ue = {
162
177
  }
163
178
  };
164
179
  var We = function() {
165
- var t = this, n = t._self._c;
166
- return n("dt-stack", { attrs: { direction: "row", gap: "400" } }, [n("dt-emoji", { attrs: { size: "200", code: t.item.code } }), t._v(" " + t._s(t.item.code) + " ")], 1);
167
- }, Ve = [], ze = /* @__PURE__ */ c(
168
- Ue,
180
+ var e = this, n = e._self._c;
181
+ return n("dt-stack", { attrs: { direction: "row", gap: "400" } }, [n("dt-emoji", { attrs: { size: "200", code: e.item.code } }), e._v(" " + e._s(e.item.code) + " ")], 1);
182
+ }, Ve = [], Xe = /* @__PURE__ */ c(
183
+ ze,
169
184
  We,
170
185
  Ve
171
186
  );
172
- const Xe = ze.exports, C = {
187
+ const Je = Xe.exports, C = {
173
188
  name: "hideOnEsc",
174
189
  defaultValue: !0,
175
- fn({ hide: e }) {
176
- function t(n) {
177
- n.keyCode === 27 && e();
190
+ fn({ hide: t }) {
191
+ function e(n) {
192
+ n.keyCode === 27 && t();
178
193
  }
179
194
  return {
180
195
  onShow() {
181
- document.addEventListener("keydown", t);
196
+ document.addEventListener("keydown", e);
182
197
  },
183
198
  onHide() {
184
- document.removeEventListener("keydown", t);
199
+ document.removeEventListener("keydown", e);
185
200
  }
186
201
  };
187
202
  }
188
- }, Je = 20, Ye = {
189
- items: ({ query: e }) => {
190
- if (e.length < 2)
203
+ }, Ye = 20, Ge = {
204
+ items: ({ query: t }) => {
205
+ if (t.length < 2)
191
206
  return [];
192
- const t = Object.values(xe);
193
- return e = e.toLowerCase(), t.filter(
207
+ const e = Object.values(ke);
208
+ return t = t.toLowerCase(), e.filter(
194
209
  (r) => [
195
210
  r.name,
196
211
  r.shortname.replaceAll(":", ""),
197
212
  ...r.keywords
198
- ].some((s) => s.startsWith(e))
199
- ).splice(0, Je).map((r) => ({ code: r.shortname }));
213
+ ].some((s) => s.startsWith(t))
214
+ ).splice(0, Ye).map((r) => ({ code: r.shortname }));
200
215
  },
201
- command: ({ editor: e, range: t, props: n }) => {
216
+ command: ({ editor: t, range: e, props: n }) => {
202
217
  var o, i;
203
- const r = e.view.state.selection.$to.nodeAfter;
204
- ((o = r == null ? void 0 : r.text) == null ? void 0 : o.startsWith(" ")) && (t.to += 1), e.chain().focus().insertContentAt(t, [
218
+ const r = t.view.state.selection.$to.nodeAfter;
219
+ ((o = r == null ? void 0 : r.text) == null ? void 0 : o.startsWith(" ")) && (e.to += 1), t.chain().focus().insertContentAt(e, [
205
220
  {
206
221
  type: "emoji",
207
222
  attrs: n
@@ -209,21 +224,21 @@ const Xe = ze.exports, C = {
209
224
  ]).run(), (i = window.getSelection()) == null || i.collapseToEnd();
210
225
  },
211
226
  render: () => {
212
- let e, t, n = !1;
227
+ let t, e, n = !1;
213
228
  return {
214
229
  onStart: (r) => {
215
- e = new w(k, {
230
+ t = new y(b, {
216
231
  parent: void 0,
217
232
  propsData: {
218
- itemComponent: Xe,
233
+ itemComponent: Je,
219
234
  itemType: "emoji",
220
235
  ...r
221
236
  },
222
237
  editor: r.editor
223
- }), r.clientRect && (t = b("body", {
238
+ }), r.clientRect && (e = k("body", {
224
239
  getReferenceClientRect: r.clientRect,
225
240
  appendTo: () => document.body,
226
- content: e.element,
241
+ content: t.element,
227
242
  showOnCreate: !1,
228
243
  onShow: () => {
229
244
  n = !0;
@@ -236,31 +251,31 @@ const Xe = ze.exports, C = {
236
251
  placement: "top-start",
237
252
  zIndex: 650,
238
253
  plugins: [C]
239
- }), r.items.length > 0 && (t == null || t[0].show()));
254
+ }), r.items.length > 0 && (e == null || e[0].show()));
240
255
  },
241
256
  onUpdate(r) {
242
- e == null || e.updateProps(r), r.items.length > 0 ? t == null || t[0].show() : t == null || t[0].hide(), t == null || t[0].setProps({
257
+ t == null || t.updateProps(r), r.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), e == null || e[0].setProps({
243
258
  getReferenceClientRect: r.clientRect
244
259
  });
245
260
  },
246
261
  onKeyDown(r) {
247
262
  var s;
248
263
  if (n)
249
- return (s = e == null ? void 0 : e.ref) == null ? void 0 : s.onKeyDown(r);
264
+ return (s = t == null ? void 0 : t.ref) == null ? void 0 : s.onKeyDown(r);
250
265
  },
251
266
  onExit() {
252
- t == null || t[0].destroy(), t = null, e == null || e.destroy(), e = null;
267
+ e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
253
268
  }
254
269
  };
255
270
  }
256
- }, Ge = /(:\w+:)$/, Qe = new RegExp(O + "$"), Ze = (e) => {
257
- if (e && L(e[0]))
258
- return { text: e[2] || e[0] };
259
- }, et = (e) => [...e.matchAll(ve)].filter((n) => L(n[0])).map((n) => ({
271
+ }, Qe = /(:\w+:)$/, Ze = new RegExp(O + "$"), et = (t) => {
272
+ if (t && L(t[0]))
273
+ return { text: t[2] || t[0] };
274
+ }, tt = (t) => [...t.matchAll(xe)].filter((n) => L(n[0])).map((n) => ({
260
275
  index: n.index,
261
276
  text: n[0],
262
277
  match: n
263
- })), tt = N.create({
278
+ })), nt = F.create({
264
279
  name: "emoji",
265
280
  addOptions() {
266
281
  return {
@@ -272,12 +287,18 @@ const Xe = ze.exports, C = {
272
287
  selectable: !1,
273
288
  atom: !0,
274
289
  addNodeView() {
275
- return v(je);
290
+ return v(Ne);
276
291
  },
277
292
  addAttributes() {
278
293
  return {
279
294
  code: {
280
295
  default: null
296
+ },
297
+ image: {
298
+ default: null
299
+ },
300
+ name: {
301
+ default: null
281
302
  }
282
303
  };
283
304
  },
@@ -288,22 +309,28 @@ const Xe = ze.exports, C = {
288
309
  }
289
310
  ];
290
311
  },
291
- renderText({ node: e }) {
292
- return ye(L(e.attrs.code).unicode_output);
312
+ renderText({ node: t }) {
313
+ const { image: e, code: n } = t.attrs;
314
+ if (e !== null)
315
+ return e;
316
+ {
317
+ const r = L(n);
318
+ return ye(r.unicode_output);
319
+ }
293
320
  },
294
- renderHTML({ HTMLAttributes: e }) {
295
- return ["emoji-component", m(this.options.HTMLAttributes, e)];
321
+ renderHTML({ HTMLAttributes: t }) {
322
+ return ["emoji-component", m(this.options.HTMLAttributes, t)];
296
323
  },
297
324
  addInputRules() {
298
325
  return [
299
326
  new K({
300
- find: (e) => {
301
- const t = e.match(Ge) || e.match(Qe);
302
- if (t)
303
- return Ze(t);
327
+ find: (t) => {
328
+ const e = t.match(Qe) || t.match(Ze);
329
+ if (e)
330
+ return et(e);
304
331
  },
305
- handler: ({ state: e, range: t, match: n, commands: r, chain: s, can: o }) => {
306
- const { tr: i } = e, a = t.from, l = t.to;
332
+ handler: ({ state: t, range: e, match: n, commands: r, chain: s, can: o }) => {
333
+ const { tr: i } = t, a = e.from, l = e.to;
307
334
  i.replaceWith(a, l, this.type.create({ code: n[0] }));
308
335
  }
309
336
  })
@@ -312,20 +339,24 @@ const Xe = ze.exports, C = {
312
339
  addPasteRules() {
313
340
  return [
314
341
  E({
315
- find: et,
342
+ find: tt,
316
343
  type: this.type,
317
- getAttributes(e) {
344
+ getAttributes(t) {
318
345
  return {
319
- code: e[0]
346
+ code: t[0],
347
+ image: t[1],
348
+ name: t[2]
320
349
  };
321
350
  }
322
351
  }),
323
352
  E({
324
- find: we,
353
+ find: ve,
325
354
  type: this.type,
326
- getAttributes(e) {
355
+ getAttributes(t) {
327
356
  return {
328
- code: e[0]
357
+ code: t[0],
358
+ image: t[1],
359
+ name: t[2]
329
360
  };
330
361
  }
331
362
  })
@@ -338,48 +369,48 @@ const Xe = ze.exports, C = {
338
369
  pluginKey: new f("emoji"),
339
370
  editor: this.editor,
340
371
  ...this.options.suggestion,
341
- ...Ye
372
+ ...Ge
342
373
  })
343
374
  ];
344
375
  },
345
376
  addKeyboardShortcuts() {
346
377
  return {
347
- Backspace: () => this.editor.commands.command(({ tr: e, state: t }) => {
378
+ Backspace: () => this.editor.commands.command(({ tr: t, state: e }) => {
348
379
  let n = !1;
349
- const { selection: r } = t, { empty: s, anchor: o } = r;
350
- return s ? (t.doc.nodesBetween(o - 1, o, (i, a) => {
380
+ const { selection: r } = e, { empty: s, anchor: o } = r;
381
+ return s ? (e.doc.nodesBetween(o - 1, o, (i, a) => {
351
382
  if (i.type.name === this.name)
352
- return n = !0, e.insertText("", a, a + i.nodeSize), !1;
383
+ return n = !0, t.insertText("", a, a + i.nodeSize), !1;
353
384
  }), n) : !1;
354
385
  })
355
386
  };
356
387
  }
357
388
  });
358
- function nt(e, t, n = () => !0) {
389
+ function rt(t, e, n = () => !0) {
359
390
  const r = [];
360
- t.lastIndex = 0;
391
+ e.lastIndex = 0;
361
392
  let s;
362
- for (; s = t.exec(e); )
363
- n(e, s) && r.push(s);
393
+ for (; s = e.exec(t); )
394
+ n(t, s) && r.push(s);
364
395
  return r;
365
396
  }
366
- function rt(e, t) {
367
- return !["#", "@"].includes(e.charAt(t.index)) && !["#", "@"].includes(e.charAt(t.index - 1));
397
+ function st(t, e) {
398
+ return !["#", "@"].includes(t.charAt(e.index)) && !["#", "@"].includes(t.charAt(e.index - 1));
368
399
  }
369
- function st(e) {
370
- const t = new RegExp(
400
+ function it(t) {
401
+ const e = new RegExp(
371
402
  "(?:" + [
372
403
  `[!?.,:;'"]`,
373
404
  "(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"
374
405
  ].join("|"),
375
406
  "g"
376
407
  );
377
- return e.replace(t, "");
408
+ return t.replace(e, "");
378
409
  }
379
- function it(e, t) {
380
- const n = e.slice(0, t + 1).search(/\S+\s*$/), r = e.slice(t).search(/\s/);
410
+ function ot(t, e) {
411
+ const n = t.slice(0, e + 1).search(/\S+\s*$/), r = t.slice(e).search(/\s/);
381
412
  if (r < 0) {
382
- const s = e.slice(n);
413
+ const s = t.slice(n);
383
414
  return {
384
415
  text: s,
385
416
  from: n,
@@ -387,61 +418,61 @@ function it(e, t) {
387
418
  };
388
419
  }
389
420
  return {
390
- text: e.slice(n, r + t),
421
+ text: t.slice(n, r + e),
391
422
  from: n,
392
- to: r + t
423
+ to: r + e
393
424
  };
394
425
  }
395
- function S(e, t, n, r) {
396
- const s = it(e, t);
426
+ function S(t, e, n, r) {
427
+ const s = ot(t, e);
397
428
  if (r.lastIndex = 0, !r.test(s.text))
398
429
  return s;
399
430
  const o = n === "left" ? s.from - 1 : s.to + 1;
400
- return o <= 0 || o >= e.length || o === t ? s : S(e, o, n, r);
431
+ return o <= 0 || o >= t.length || o === e ? s : S(t, o, n, r);
401
432
  }
402
- function ot(e, t, n, r) {
403
- const s = Math.max(e.from - 1, 0), o = Math.min(e.to + 1, t.content.size), i = q(s, o, t);
433
+ function at(t, e, n, r) {
434
+ const s = Math.max(t.from - 1, 0), o = Math.min(t.to + 1, e.content.size), i = q(s, o, e);
404
435
  for (const a of i)
405
436
  a.mark.type === r && n.removeMark(a.from, a.to, r);
406
437
  }
407
- const I = Ce(1, 15);
408
- function A(e, t, n, r, s, o) {
409
- if (!e)
438
+ const I = Te(1, 15);
439
+ function A(t, e, n, r, s, o) {
440
+ if (!t)
410
441
  return;
411
- let i = n - t - 1;
442
+ let i = n - e - 1;
412
443
  i = i < 0 ? 0 : i;
413
- const a = r - t, l = S(
414
- e,
444
+ const a = r - e, l = S(
445
+ t,
415
446
  i,
416
447
  "left",
417
448
  I
418
449
  ), d = S(
419
- e,
450
+ t,
420
451
  a,
421
452
  "right",
422
453
  I
423
- ), u = e.slice(l.from, d.to);
424
- nt(u, ke, rt).forEach((T) => {
425
- const h = st(T[0]), g = t + l.from + T.index + 1, M = g + h.length;
454
+ ), u = t.slice(l.from, d.to);
455
+ rt(u, Ce, st).forEach((T) => {
456
+ const h = it(T[0]), g = e + l.from + T.index + 1, M = g + h.length;
426
457
  s.addMark(g, M, o.create());
427
458
  });
428
459
  }
429
- function at(e) {
430
- let t = !1;
460
+ function lt(t) {
461
+ let e = !1;
431
462
  return new ge({
432
463
  key: new f("autolink"),
433
464
  appendTransaction: (n, r, s) => {
434
465
  const o = n.some((u) => u.docChanged) && !r.doc.eq(s.doc);
435
- if (t && !o)
466
+ if (e && !o)
436
467
  return;
437
468
  const { tr: i } = s, { textContent: a } = s.doc;
438
- t || A(a, 0, 0, a.length, i, e.type), t = !0;
469
+ e || A(a, 0, 0, a.length, i, t.type), e = !0;
439
470
  const l = U(
440
471
  r.doc,
441
472
  [...n]
442
473
  );
443
- return W(l).forEach(({ oldRange: u, newRange: p }) => {
444
- ot(p, s.doc, i, e.type), V(
474
+ return z(l).forEach(({ oldRange: u, newRange: p }) => {
475
+ at(p, s.doc, i, t.type), W(
445
476
  s.doc,
446
477
  p,
447
478
  (h) => h.isTextblock
@@ -452,37 +483,37 @@ function at(e) {
452
483
  u.from,
453
484
  p.to,
454
485
  i,
455
- e.type
486
+ t.type
456
487
  );
457
488
  });
458
489
  }), i;
459
490
  }
460
491
  });
461
492
  }
462
- const lt = {
493
+ const ct = {
463
494
  class: "d-link d-c-text d-d-inline-block d-wb-break-all",
464
495
  rel: "noopener noreferrer nofollow"
465
- }, ct = z.create({
496
+ }, dt = V.create({
466
497
  name: "CustomLink",
467
- renderHTML({ HTMLAttributes: e }) {
498
+ renderHTML({ HTMLAttributes: t }) {
468
499
  return [
469
500
  "a",
470
501
  m(
471
502
  this.options.HTMLAttributes,
472
- e,
473
- lt
503
+ t,
504
+ ct
474
505
  )
475
506
  ];
476
507
  },
477
- renderText({ node: e }) {
478
- return e.attrs.text;
508
+ renderText({ node: t }) {
509
+ return t.attrs.text;
479
510
  },
480
511
  addProseMirrorPlugins() {
481
512
  return [
482
- at({ type: this.type })
513
+ lt({ type: this.type })
483
514
  ];
484
515
  }
485
- }), dt = Ee.extend({
516
+ }), ut = Se.extend({
486
517
  name: "ConfigurableImage",
487
518
  addAttributes() {
488
519
  return {
@@ -506,37 +537,37 @@ const lt = {
506
537
  }
507
538
  };
508
539
  }
509
- }).configure({ inline: !0, allowBase64: !0 }), ut = B.extend({
540
+ }).configure({ inline: !0, allowBase64: !0 }), mt = B.extend({
510
541
  parseHTML() {
511
542
  return [{ tag: "div" }];
512
543
  },
513
- renderHTML({ HTMLAttributes: e }) {
514
- return ["div", m(this.options.HTMLAttributes, e), 0];
544
+ renderHTML({ HTMLAttributes: t }) {
545
+ return ["div", m(this.options.HTMLAttributes, t), 0];
515
546
  }
516
- }), mt = {
547
+ }), ht = {
517
548
  name: "MentionComponent",
518
549
  components: {
519
550
  NodeViewWrapper: _,
520
551
  DtLink: D
521
552
  },
522
- props: y,
553
+ props: w,
523
554
  computed: {
524
555
  text() {
525
556
  return "@" + this.$props.node.attrs.name;
526
557
  }
527
558
  }
528
559
  };
529
- var ht = function() {
530
- var t = this, n = t._self._c;
531
- return n("node-view-wrapper", { staticClass: "d-d-inline-block" }, [n("dt-link", { attrs: { kind: "mention" } }, [t._v(" " + t._s(t.text) + " ")])], 1);
532
- }, ft = [], pt = /* @__PURE__ */ c(
533
- mt,
560
+ var ft = function() {
561
+ var e = this, n = e._self._c;
562
+ return n("node-view-wrapper", { staticClass: "d-d-inline-block" }, [n("dt-link", { attrs: { kind: "mention" } }, [e._v(" " + e._s(e.text) + " ")])], 1);
563
+ }, pt = [], gt = /* @__PURE__ */ c(
534
564
  ht,
535
- ft
565
+ ft,
566
+ pt
536
567
  );
537
- const gt = pt.exports, _t = R.extend({
568
+ const _t = gt.exports, wt = R.extend({
538
569
  addNodeView() {
539
- return v(gt);
570
+ return v(_t);
540
571
  },
541
572
  parseHTML() {
542
573
  return [
@@ -558,11 +589,11 @@ const gt = pt.exports, _t = R.extend({
558
589
  }
559
590
  };
560
591
  },
561
- renderText({ node: e }) {
562
- return `@${e.attrs.id}`;
592
+ renderText({ node: t }) {
593
+ return `@${t.attrs.id}`;
563
594
  },
564
- renderHTML({ HTMLAttributes: e }) {
565
- return ["mention-component", m(this.options.HTMLAttributes, e)];
595
+ renderHTML({ HTMLAttributes: t }) {
596
+ return ["mention-component", m(this.options.HTMLAttributes, t)];
566
597
  }
567
598
  }).configure({
568
599
  suggestion: {
@@ -575,22 +606,22 @@ const gt = pt.exports, _t = R.extend({
575
606
  NodeViewWrapper: _,
576
607
  DtLink: D
577
608
  },
578
- props: y,
609
+ props: w,
579
610
  computed: {
580
611
  text() {
581
612
  return "#" + this.$props.node.attrs.name;
582
613
  }
583
614
  }
584
615
  };
585
- var wt = function() {
586
- var t = this, n = t._self._c;
587
- return n("node-view-wrapper", { staticClass: "d-d-inline-block" }, [n("dt-link", { attrs: { kind: "mention" } }, [t._v(" " + t._s(t.text) + " ")])], 1);
588
- }, vt = [], xt = /* @__PURE__ */ c(
616
+ var vt = function() {
617
+ var e = this, n = e._self._c;
618
+ return n("node-view-wrapper", { staticClass: "d-d-inline-block" }, [n("dt-link", { attrs: { kind: "mention" } }, [e._v(" " + e._s(e.text) + " ")])], 1);
619
+ }, xt = [], kt = /* @__PURE__ */ c(
589
620
  yt,
590
- wt,
591
- vt
621
+ vt,
622
+ xt
592
623
  );
593
- const bt = xt.exports, kt = R.extend({
624
+ const bt = kt.exports, Ct = R.extend({
594
625
  name: "channel",
595
626
  addNodeView() {
596
627
  return v(bt);
@@ -615,24 +646,24 @@ const bt = xt.exports, kt = R.extend({
615
646
  }
616
647
  };
617
648
  },
618
- renderText({ node: e }) {
619
- return `#${e.attrs.id}`;
649
+ renderText({ node: t }) {
650
+ return `#${t.attrs.id}`;
620
651
  },
621
- renderHTML({ HTMLAttributes: e }) {
622
- return ["channel-component", m(this.options.HTMLAttributes, e)];
652
+ renderHTML({ HTMLAttributes: t }) {
653
+ return ["channel-component", m(this.options.HTMLAttributes, t)];
623
654
  }
624
655
  }).configure({
625
656
  suggestion: {
626
657
  char: "#",
627
658
  pluginKey: new f("channelSuggestion")
628
659
  }
629
- }), Ct = {
660
+ }), Tt = {
630
661
  name: "SlashCommandsComponent",
631
662
  components: {
632
663
  NodeViewWrapper: _
633
664
  },
634
665
  props: {
635
- ...y
666
+ ...w
636
667
  },
637
668
  emits: ["selected-command"],
638
669
  computed: {
@@ -642,35 +673,35 @@ const bt = xt.exports, kt = R.extend({
642
673
  },
643
674
  created() {
644
675
  var n, r, s;
645
- const e = this.$props.node.attrs.command;
646
- this.$emit("selected-command", e);
647
- const t = (s = (r = (n = this.editor) == null ? void 0 : n.storage) == null ? void 0 : r["slash-commands"]) == null ? void 0 : s.onSelectedCommand;
648
- t && typeof t == "function" && t(e);
676
+ const t = this.$props.node.attrs.command;
677
+ this.$emit("selected-command", t);
678
+ const e = (s = (r = (n = this.editor) == null ? void 0 : n.storage) == null ? void 0 : r["slash-commands"]) == null ? void 0 : s.onSelectedCommand;
679
+ e && typeof e == "function" && e(t);
649
680
  }
650
681
  };
651
- var Tt = function() {
652
- var t = this, n = t._self._c;
653
- return n("node-view-wrapper", { staticClass: "d-d-inline-block" }, [t._v(" " + t._s(t.text) + " ")]);
654
- }, Et = [], St = /* @__PURE__ */ c(
655
- Ct,
682
+ var Et = function() {
683
+ var e = this, n = e._self._c;
684
+ return n("node-view-wrapper", { staticClass: "d-d-inline-block" }, [e._v(" " + e._s(e.text) + " ")]);
685
+ }, St = [], Lt = /* @__PURE__ */ c(
656
686
  Tt,
657
- Et
687
+ Et,
688
+ St
658
689
  );
659
- const Lt = St.exports, Rt = (e, t) => [...e.matchAll(t)].map((r) => {
690
+ const Rt = Lt.exports, $t = (t, e) => [...t.matchAll(e)].map((r) => {
660
691
  let s = r[2];
661
692
  return s.endsWith(" ") || (s += " "), {
662
693
  index: r.index,
663
694
  text: s,
664
695
  match: r
665
696
  };
666
- }), $t = R.extend({
697
+ }), It = R.extend({
667
698
  name: "slash-commands",
668
699
  group: "inline",
669
700
  inline: !0,
670
701
  addOptions() {
671
- var e;
702
+ var t;
672
703
  return {
673
- ...(e = this.parent) == null ? void 0 : e.call(this),
704
+ ...(t = this.parent) == null ? void 0 : t.call(this),
674
705
  onSelectedCommand: null
675
706
  };
676
707
  },
@@ -680,7 +711,7 @@ const Lt = St.exports, Rt = (e, t) => [...e.matchAll(t)].map((r) => {
680
711
  };
681
712
  },
682
713
  addNodeView() {
683
- return v(Lt);
714
+ return v(Rt);
684
715
  },
685
716
  parseHTML() {
686
717
  return [
@@ -702,18 +733,18 @@ const Lt = St.exports, Rt = (e, t) => [...e.matchAll(t)].map((r) => {
702
733
  }
703
734
  };
704
735
  },
705
- renderText({ node: e }) {
706
- return `/${e.attrs.command}`;
736
+ renderText({ node: t }) {
737
+ return `/${t.attrs.command}`;
707
738
  },
708
- renderHTML({ HTMLAttributes: e }) {
709
- return ["command-component", m(this.options.HTMLAttributes, e)];
739
+ renderHTML({ HTMLAttributes: t }) {
740
+ return ["command-component", m(this.options.HTMLAttributes, t)];
710
741
  },
711
742
  addInputRules() {
712
743
  var n;
713
- const e = (n = this.options.suggestion) == null ? void 0 : n.items({ query: "" }).map((r) => r.command), t = new RegExp(`^((?:\\/)(${e.join("|")})) $`);
744
+ const t = (n = this.options.suggestion) == null ? void 0 : n.items({ query: "" }).map((r) => r.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) $`);
714
745
  return [
715
746
  X({
716
- find: t,
747
+ find: e,
717
748
  type: this.type,
718
749
  getAttributes(r) {
719
750
  return { command: r[2] };
@@ -723,10 +754,10 @@ const Lt = St.exports, Rt = (e, t) => [...e.matchAll(t)].map((r) => {
723
754
  },
724
755
  addPasteRules() {
725
756
  var n;
726
- const e = (n = this.options.suggestion) == null ? void 0 : n.items({ query: "" }).map((r) => r.command), t = new RegExp(`^((?:\\/)(${e.join("|")})) ?$`, "g");
757
+ const t = (n = this.options.suggestion) == null ? void 0 : n.items({ query: "" }).map((r) => r.command), e = new RegExp(`^((?:\\/)(${t.join("|")})) ?$`, "g");
727
758
  return [
728
759
  E({
729
- find: (r) => Rt(r, t),
760
+ find: (r) => $t(r, e),
730
761
  type: this.type,
731
762
  getAttributes(r) {
732
763
  return { command: r[0].trim() };
@@ -739,10 +770,10 @@ const Lt = St.exports, Rt = (e, t) => [...e.matchAll(t)].map((r) => {
739
770
  char: "/",
740
771
  pluginKey: new f("slashCommandSuggestion")
741
772
  }
742
- }), It = {
773
+ }), At = {
743
774
  name: "MentionSuggestion",
744
775
  components: {
745
- DtAvatar: Re,
776
+ DtAvatar: $e,
746
777
  DtStack: x
747
778
  },
748
779
  props: {
@@ -780,35 +811,35 @@ const Lt = St.exports, Rt = (e, t) => [...e.matchAll(t)].map((r) => {
780
811
  }
781
812
  }
782
813
  };
783
- var At = function() {
784
- var t = this, n = t._self._c;
785
- return n("dt-stack", { staticClass: "d-mention-suggestion__container", attrs: { direction: "row", gap: "400" } }, [n("dt-avatar", { attrs: { "full-name": t.name, "image-src": t.avatarSrc, "image-alt": t.name, "show-presence": t.showDetails, presence: t.presence, size: "sm" } }), n("dt-stack", { staticClass: "d-mention-suggestion__details-container", attrs: { gap: "100" } }, [n("span", { staticClass: "d-mention-suggestion__name" }, [t._v(" " + t._s(t.name) + " ")]), t.showDetails ? n("dt-stack", { staticClass: "d-label--sm-plain", attrs: { direction: "row", gap: "300" } }, [t.presenceText ? n("span", { staticClass: "d-mention-suggestion__presence", class: [t.presenceFontColorClass] }, [t._v(" " + t._s(t.presenceText) + " ")]) : t._e(), t.status && t.presenceText ? n("div", { staticClass: "d-mention-suggestion__divider" }, [t._v(" • ")]) : t._e(), t.status ? n("div", { staticClass: "d-mention-suggestion__status" }, [t._v(" " + t._s(t.status) + " ")]) : t._e()]) : t._e()], 1)], 1);
786
- }, Bt = [], Ot = /* @__PURE__ */ c(
787
- It,
814
+ var Bt = function() {
815
+ var e = this, n = e._self._c;
816
+ return n("dt-stack", { staticClass: "d-mention-suggestion__container", attrs: { direction: "row", gap: "400" } }, [n("dt-avatar", { attrs: { "full-name": e.name, "image-src": e.avatarSrc, "image-alt": e.name, "show-presence": e.showDetails, presence: e.presence, size: "sm" } }), n("dt-stack", { staticClass: "d-mention-suggestion__details-container", attrs: { gap: "100" } }, [n("span", { staticClass: "d-mention-suggestion__name" }, [e._v(" " + e._s(e.name) + " ")]), e.showDetails ? n("dt-stack", { staticClass: "d-label--sm-plain", attrs: { direction: "row", gap: "300" } }, [e.presenceText ? n("span", { staticClass: "d-mention-suggestion__presence", class: [e.presenceFontColorClass] }, [e._v(" " + e._s(e.presenceText) + " ")]) : e._e(), e.status && e.presenceText ? n("div", { staticClass: "d-mention-suggestion__divider" }, [e._v(" • ")]) : e._e(), e.status ? n("div", { staticClass: "d-mention-suggestion__status" }, [e._v(" " + e._s(e.status) + " ")]) : e._e()]) : e._e()], 1)], 1);
817
+ }, Ot = [], Pt = /* @__PURE__ */ c(
788
818
  At,
789
- Bt
819
+ Bt,
820
+ Ot
790
821
  );
791
- const Pt = Ot.exports, Dt = {
822
+ const Dt = Pt.exports, Mt = {
792
823
  // This function comes from the user and passed to the editor directly.
793
824
  // This will also activate the mention plugin on the editor
794
825
  // items: ({ query }) => { return [] },
795
826
  allowSpaces: !0,
796
827
  render: () => {
797
- let e, t, n = !1;
828
+ let t, e, n = !1;
798
829
  return {
799
830
  onStart: (r) => {
800
- e = new w(k, {
831
+ t = new y(b, {
801
832
  parent: void 0,
802
833
  propsData: {
803
- itemComponent: Pt,
834
+ itemComponent: Dt,
804
835
  itemType: "mention",
805
836
  ...r
806
837
  },
807
838
  editor: r.editor
808
- }), r.clientRect && (t = b("body", {
839
+ }), r.clientRect && (e = k("body", {
809
840
  getReferenceClientRect: r.clientRect,
810
841
  appendTo: () => document.body,
811
- content: e.element,
842
+ content: t.element,
812
843
  showOnCreate: !1,
813
844
  onShow: () => {
814
845
  n = !0;
@@ -821,29 +852,29 @@ const Pt = Ot.exports, Dt = {
821
852
  placement: "top-start",
822
853
  zIndex: 650,
823
854
  plugins: [C]
824
- }), r.items.length > 0 && (t == null || t[0].show()));
855
+ }), r.items.length > 0 && (e == null || e[0].show()));
825
856
  },
826
857
  onUpdate(r) {
827
- e == null || e.updateProps(r), r.items.length > 0 ? t == null || t[0].show() : t == null || t[0].hide(), r.clientRect && (t == null || t[0].setProps({
858
+ t == null || t.updateProps(r), r.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), r.clientRect && (e == null || e[0].setProps({
828
859
  getReferenceClientRect: r.clientRect
829
860
  }));
830
861
  },
831
862
  onKeyDown(r) {
832
863
  var s;
833
864
  if (n)
834
- return (s = e == null ? void 0 : e.ref) == null ? void 0 : s.onKeyDown(r);
865
+ return (s = t == null ? void 0 : t.ref) == null ? void 0 : s.onKeyDown(r);
835
866
  },
836
867
  onExit() {
837
- t == null || t[0].destroy(), t = null, e == null || e.destroy(), e = null;
868
+ e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
838
869
  }
839
870
  };
840
871
  }
841
- }, Mt = {
872
+ }, Ht = {
842
873
  name: "ChannelSuggestion",
843
874
  components: {
844
875
  DtStack: x,
845
- DtIconHash: $e,
846
- DtIconLock: Ie
876
+ DtIconHash: Ie,
877
+ DtIconLock: Ae
847
878
  },
848
879
  props: {
849
880
  item: {
@@ -857,35 +888,35 @@ const Pt = Ot.exports, Dt = {
857
888
  }
858
889
  }
859
890
  };
860
- var Ht = function() {
861
- var t = this, n = t._self._c;
862
- return n("dt-stack", { attrs: { direction: "row", gap: "400" } }, [t.item.locked ? n("dt-icon-lock", { attrs: { size: "300" } }) : n("dt-icon-hash", { attrs: { size: "300" } }), n("span", [t._v(t._s(t.name))])], 1);
863
- }, jt = [], Ft = /* @__PURE__ */ c(
864
- Mt,
891
+ var jt = function() {
892
+ var e = this, n = e._self._c;
893
+ return n("dt-stack", { attrs: { direction: "row", gap: "400" } }, [e.item.locked ? n("dt-icon-lock", { attrs: { size: "300" } }) : n("dt-icon-hash", { attrs: { size: "300" } }), n("span", [e._v(e._s(e.name))])], 1);
894
+ }, Nt = [], Ft = /* @__PURE__ */ c(
865
895
  Ht,
866
- jt
896
+ jt,
897
+ Nt
867
898
  );
868
- const Nt = Ft.exports, Kt = {
899
+ const Kt = Ft.exports, qt = {
869
900
  // This function comes from the user and passed to the editor directly.
870
901
  // This will also activate the mention plugin on the editor
871
902
  // items: ({ query }) => { return [] },
872
903
  allowSpaces: !0,
873
904
  render: () => {
874
- let e, t, n = !1;
905
+ let t, e, n = !1;
875
906
  return {
876
907
  onStart: (r) => {
877
- e = new w(k, {
908
+ t = new y(b, {
878
909
  parent: void 0,
879
910
  propsData: {
880
- itemComponent: Nt,
911
+ itemComponent: Kt,
881
912
  itemType: "channel",
882
913
  ...r
883
914
  },
884
915
  editor: r.editor
885
- }), r.clientRect && (t = b("body", {
916
+ }), r.clientRect && (e = k("body", {
886
917
  getReferenceClientRect: r.clientRect,
887
918
  appendTo: () => document.body,
888
- content: e.element,
919
+ content: t.element,
889
920
  showOnCreate: !1,
890
921
  onShow: () => {
891
922
  n = !0;
@@ -898,24 +929,24 @@ const Nt = Ft.exports, Kt = {
898
929
  placement: "top-start",
899
930
  zIndex: 650,
900
931
  plugins: [C]
901
- }), r.items.length > 0 && (t == null || t[0].show()));
932
+ }), r.items.length > 0 && (e == null || e[0].show()));
902
933
  },
903
934
  onUpdate(r) {
904
- e == null || e.updateProps(r), r.items.length > 0 ? t == null || t[0].show() : t == null || t[0].hide(), r.clientRect && (t == null || t[0].setProps({
935
+ t == null || t.updateProps(r), r.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), r.clientRect && (e == null || e[0].setProps({
905
936
  getReferenceClientRect: r.clientRect
906
937
  }));
907
938
  },
908
939
  onKeyDown(r) {
909
940
  var s;
910
941
  if (n)
911
- return (s = e == null ? void 0 : e.ref) == null ? void 0 : s.onKeyDown(r);
942
+ return (s = t == null ? void 0 : t.ref) == null ? void 0 : s.onKeyDown(r);
912
943
  },
913
944
  onExit() {
914
- t == null || t[0].destroy(), t = null, e == null || e.destroy(), e = null;
945
+ e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
915
946
  }
916
947
  };
917
948
  }
918
- }, qt = {
949
+ }, Ut = {
919
950
  name: "SlashCommandSuggestion",
920
951
  props: {
921
952
  item: {
@@ -935,36 +966,36 @@ const Nt = Ft.exports, Kt = {
935
966
  }
936
967
  }
937
968
  };
938
- var Ut = function() {
939
- var t = this, n = t._self._c;
940
- return n("div", [n("div", { staticClass: "d-body--md-compact" }, [n("span", [t._v("/" + t._s(t.command))]), t.parametersExample ? n("span", [t._v(" " + t._s(t.parametersExample))]) : t._e()]), n("div", { staticClass: "d-body--sm d-fc-tertiary" }, [t._v(" " + t._s(t.description) + " ")])]);
969
+ var zt = function() {
970
+ var e = this, n = e._self._c;
971
+ return n("div", [n("div", { staticClass: "d-body--md-compact" }, [n("span", [e._v("/" + e._s(e.command))]), e.parametersExample ? n("span", [e._v(" " + e._s(e.parametersExample))]) : e._e()]), n("div", { staticClass: "d-body--sm d-fc-tertiary" }, [e._v(" " + e._s(e.description) + " ")])]);
941
972
  }, Wt = [], Vt = /* @__PURE__ */ c(
942
- qt,
943
973
  Ut,
974
+ zt,
944
975
  Wt
945
976
  );
946
- const zt = Vt.exports, Xt = {
977
+ const Xt = Vt.exports, Jt = {
947
978
  // This function comes from the user and passed to the editor directly.
948
979
  // This will also activate the mention plugin on the editor
949
980
  // items: ({ query }) => { return [] },
950
981
  allowSpaces: !0,
951
982
  startOfLine: !0,
952
983
  render: () => {
953
- let e, t, n = !1;
984
+ let t, e, n = !1;
954
985
  return {
955
986
  onStart: (r) => {
956
- e = new w(k, {
987
+ t = new y(b, {
957
988
  parent: void 0,
958
989
  propsData: {
959
- itemComponent: zt,
990
+ itemComponent: Xt,
960
991
  itemType: "slash-command",
961
992
  ...r
962
993
  },
963
994
  editor: r.editor
964
- }), r.clientRect && (t = b("body", {
995
+ }), r.clientRect && (e = k("body", {
965
996
  getReferenceClientRect: r.clientRect,
966
997
  appendTo: () => document.body,
967
- content: e.element,
998
+ content: t.element,
968
999
  showOnCreate: !1,
969
1000
  onShow: () => {
970
1001
  n = !0;
@@ -977,29 +1008,29 @@ const zt = Vt.exports, Xt = {
977
1008
  placement: "top-start",
978
1009
  zIndex: 650,
979
1010
  plugins: [C]
980
- }), r.items.length > 0 && (t == null || t[0].show()));
1011
+ }), r.items.length > 0 && (e == null || e[0].show()));
981
1012
  },
982
1013
  onUpdate(r) {
983
- e == null || e.updateProps(r), r.items.length > 0 ? t == null || t[0].show() : t == null || t[0].hide(), r.clientRect && (t == null || t[0].setProps({
1014
+ t == null || t.updateProps(r), r.items.length > 0 ? e == null || e[0].show() : e == null || e[0].hide(), r.clientRect && (e == null || e[0].setProps({
984
1015
  getReferenceClientRect: r.clientRect
985
1016
  }));
986
1017
  },
987
1018
  onKeyDown(r) {
988
1019
  var s;
989
1020
  if (n)
990
- return (s = e == null ? void 0 : e.ref) == null ? void 0 : s.onKeyDown(r);
1021
+ return (s = t == null ? void 0 : t.ref) == null ? void 0 : s.onKeyDown(r);
991
1022
  },
992
1023
  onExit() {
993
- t == null || t[0].destroy(), t = null, e == null || e.destroy(), e = null;
1024
+ e == null || e[0].destroy(), e = null, t == null || t.destroy(), t = null;
994
1025
  }
995
1026
  };
996
1027
  }
997
- }, Jt = {
1028
+ }, Yt = {
998
1029
  name: "DtRichTextEditor",
999
1030
  components: {
1000
1031
  EditorContent: H,
1001
1032
  BubbleMenu: j,
1002
- DtButton: Oe,
1033
+ DtButton: Pe,
1003
1034
  DtStack: x
1004
1035
  },
1005
1036
  props: {
@@ -1071,8 +1102,8 @@ const zt = Vt.exports, Xt = {
1071
1102
  autoFocus: {
1072
1103
  type: [Boolean, String, Number],
1073
1104
  default: !1,
1074
- validator(e) {
1075
- return typeof e == "string" ? Se.includes(e) : !0;
1105
+ validator(t) {
1106
+ return typeof t == "string" ? Le.includes(t) : !0;
1076
1107
  }
1077
1108
  },
1078
1109
  /**
@@ -1084,8 +1115,8 @@ const zt = Vt.exports, Xt = {
1084
1115
  outputFormat: {
1085
1116
  type: String,
1086
1117
  default: "html",
1087
- validator(e) {
1088
- return Le.includes(e);
1118
+ validator(t) {
1119
+ return Re.includes(t);
1089
1120
  }
1090
1121
  },
1091
1122
  /**
@@ -1343,12 +1374,12 @@ const zt = Vt.exports, Xt = {
1343
1374
  editor: null,
1344
1375
  tippyOptions: {
1345
1376
  appendTo: () => {
1346
- var e;
1347
- return (e = this.$refs.editor.$el.getRootNode()) == null ? void 0 : e.querySelector("body");
1377
+ var t;
1378
+ return (t = this.$refs.editor.$el.getRootNode()) == null ? void 0 : t.querySelector("body");
1348
1379
  },
1349
1380
  placement: "top-start"
1350
1381
  },
1351
- i18n: new Be()
1382
+ i18n: new Oe()
1352
1383
  };
1353
1384
  },
1354
1385
  computed: {
@@ -1365,55 +1396,55 @@ const zt = Vt.exports, Xt = {
1365
1396
  },
1366
1397
  // eslint-disable-next-line complexity
1367
1398
  extensions() {
1368
- const e = [Z, de, me, te];
1369
- e.push(this.useDivTags ? ut : B), this.allowBlockquote && e.push(Y), this.allowBold && e.push(ne), this.allowBulletList && (e.push(re), e.push(oe.extend({
1399
+ const t = [Z, de, me, te];
1400
+ t.push(this.useDivTags ? mt : B), this.allowBlockquote && t.push(Y), this.allowBold && t.push(ne), this.allowBulletList && (t.push(re), t.push(oe.extend({
1370
1401
  renderText({ node: r }) {
1371
1402
  return r.textContent;
1372
1403
  }
1373
- })), e.push(ae)), this.allowItalic && e.push(se), this.allowStrike && e.push(le), this.allowUnderline && e.push(ce), this.placeholder && e.push(
1404
+ })), t.push(ae)), this.allowItalic && t.push(se), this.allowStrike && t.push(le), this.allowUnderline && t.push(ce), this.placeholder && t.push(
1374
1405
  ee.configure({ placeholder: this.placeholder })
1375
1406
  );
1376
- const t = this, n = J.create({
1407
+ const e = this, n = J.create({
1377
1408
  addKeyboardShortcuts() {
1378
1409
  return {
1379
- "Shift-Enter": ({ editor: r }) => t.allowLineBreaks ? !1 : (r.commands.first(({ commands: s }) => [
1410
+ "Shift-Enter": ({ editor: r }) => e.allowLineBreaks ? !1 : (r.commands.first(({ commands: s }) => [
1380
1411
  () => s.newlineInCode(),
1381
- () => t.allowBulletList && s.splitListItem("listItem"),
1412
+ () => e.allowBulletList && s.splitListItem("listItem"),
1382
1413
  () => s.createParagraphNear(),
1383
1414
  () => s.liftEmptyBlock(),
1384
1415
  () => s.splitBlock()
1385
1416
  ]), !0),
1386
- Enter: () => t.allowLineBreaks ? !1 : (t.$emit("enter"), !0)
1417
+ Enter: () => e.allowLineBreaks ? !1 : (e.$emit("enter"), !0)
1387
1418
  };
1388
1419
  }
1389
1420
  });
1390
- if (e.push(n), this.link && e.push(ie.extend({ inclusive: !1 }).configure({
1421
+ if (t.push(n), this.link && t.push(ie.extend({ inclusive: !1 }).configure({
1391
1422
  HTMLAttributes: {
1392
1423
  class: "d-link d-wb-break-all"
1393
1424
  },
1394
1425
  openOnClick: !1,
1395
1426
  autolink: !0,
1396
1427
  protocols: $
1397
- })), this.customLink && e.push(this.getExtension(ct, this.customLink)), this.mentionSuggestion) {
1398
- const r = { ...this.mentionSuggestion, ...Dt };
1399
- e.push(_t.configure({ suggestion: r }));
1428
+ })), this.customLink && t.push(this.getExtension(dt, this.customLink)), this.mentionSuggestion) {
1429
+ const r = { ...this.mentionSuggestion, ...Mt };
1430
+ t.push(wt.configure({ suggestion: r }));
1400
1431
  }
1401
1432
  if (this.channelSuggestion) {
1402
- const r = { ...this.channelSuggestion, ...Kt };
1403
- e.push(kt.configure({ suggestion: r }));
1433
+ const r = { ...this.channelSuggestion, ...qt };
1434
+ t.push(Ct.configure({ suggestion: r }));
1404
1435
  }
1405
1436
  if (this.slashCommandSuggestion) {
1406
- const r = { ...this.slashCommandSuggestion, ...Xt };
1407
- e.push($t.configure({
1437
+ const r = { ...this.slashCommandSuggestion, ...Jt };
1438
+ t.push(It.configure({
1408
1439
  suggestion: r,
1409
1440
  onSelectedCommand: (s) => {
1410
1441
  this.$emit("selected-command", s);
1411
1442
  }
1412
1443
  }));
1413
1444
  }
1414
- return e.push(tt), e.push(ue.configure({
1445
+ return t.push(nt), t.push(ue.configure({
1415
1446
  types: ["paragraph"]
1416
- })), this.allowCode && e.push(Q), this.allowCodeblock && e.push(G.extend({
1447
+ })), this.allowCode && t.push(Q), this.allowCodeblock && t.push(G.extend({
1417
1448
  renderText({ node: r }) {
1418
1449
  return `\`\`\`
1419
1450
  ${r.textContent}
@@ -1423,15 +1454,15 @@ ${r.textContent}
1423
1454
  HTMLAttributes: {
1424
1455
  class: "d-rich-text-editor__code-block"
1425
1456
  }
1426
- })), this.allowInlineImages && e.push(dt), (this.allowFontFamily || this.allowFontColor) && (e.push(he), this.allowFontColor && e.push(fe), this.allowFontFamily && e.push(pe)), this.additionalExtensions.length && e.push(...this.additionalExtensions), e;
1457
+ })), this.allowInlineImages && t.push(ut), (this.allowFontFamily || this.allowFontColor) && (t.push(he), this.allowFontColor && t.push(fe), this.allowFontFamily && t.push(pe)), this.additionalExtensions.length && t.push(...this.additionalExtensions), t;
1427
1458
  },
1428
1459
  inputAttrs() {
1429
- const e = {
1460
+ const t = {
1430
1461
  "aria-label": this.inputAriaLabel,
1431
1462
  "aria-multiline": !0,
1432
1463
  role: "textbox"
1433
1464
  };
1434
- return this.editable || (e["aria-readonly"] = !0), e;
1465
+ return this.editable || (t["aria-readonly"] = !0), t;
1435
1466
  }
1436
1467
  },
1437
1468
  /**
@@ -1440,20 +1471,20 @@ ${r.textContent}
1440
1471
  * to be hooked up to the Editor's own API.
1441
1472
  */
1442
1473
  watch: {
1443
- editable(e) {
1444
- this.editor.setEditable(e), this.updateEditorAttributes({ "aria-readonly": !e });
1474
+ editable(t) {
1475
+ this.editor.setEditable(t), this.updateEditorAttributes({ "aria-readonly": !t });
1445
1476
  },
1446
- inputClass(e) {
1447
- this.updateEditorAttributes({ class: e });
1477
+ inputClass(t) {
1478
+ this.updateEditorAttributes({ class: t });
1448
1479
  },
1449
- inputAriaLabel(e) {
1450
- this.updateEditorAttributes({ "aria-label": e });
1480
+ inputAriaLabel(t) {
1481
+ this.updateEditorAttributes({ "aria-label": t });
1451
1482
  },
1452
1483
  extensions() {
1453
1484
  this.destroyEditor(), this.createEditor();
1454
1485
  },
1455
- value(e) {
1456
- this.processValue(e);
1486
+ value(t) {
1487
+ this.processValue(t);
1457
1488
  }
1458
1489
  },
1459
1490
  created() {
@@ -1463,11 +1494,11 @@ ${r.textContent}
1463
1494
  this.destroyEditor();
1464
1495
  },
1465
1496
  mounted() {
1466
- Te(this.$el, this.$options.name), this.processValue(this.value, !1);
1497
+ Ee(this.$el, this.$options.name), this.processValue(this.value, !1);
1467
1498
  },
1468
1499
  methods: {
1469
1500
  createEditor() {
1470
- this.editor = new F({
1501
+ this.editor = new N({
1471
1502
  autofocus: this.autoFocus,
1472
1503
  content: this.value,
1473
1504
  editable: this.editable,
@@ -1480,147 +1511,147 @@ ${r.textContent}
1480
1511
  ...this.inputAttrs,
1481
1512
  class: this.inputClass
1482
1513
  },
1483
- handleKeyDown: (e, t) => {
1514
+ handleKeyDown: (t, e) => {
1484
1515
  if (!this.preventTyping) return !1;
1485
1516
  const n = ["Backspace"];
1486
- return !this.allowLineBreaks && !t.shiftKey && n.push("Enter"), !n.includes(t.key);
1517
+ return !this.allowLineBreaks && !e.shiftKey && n.push("Enter"), !n.includes(e.key);
1487
1518
  },
1488
- handlePaste: (e, t, n) => {
1489
- const r = t.clipboardData || window.clipboardData, s = r.getData("text/plain"), o = r.getData("text/html");
1490
- return this.processPasteData(e, s, o);
1519
+ handlePaste: (t, e, n) => {
1520
+ const r = e.clipboardData || window.clipboardData, s = r.getData("text/plain"), o = r.getData("text/html");
1521
+ return this.processPasteData(t, s, o);
1491
1522
  },
1492
1523
  // Moves the <br /> tags inside the previous closing tag to avoid
1493
1524
  // Prosemirror wrapping them within another </p> tag.
1494
- transformPastedHTML(e) {
1495
- return e.replace(/(<\/\w+>)((<br \/>)+)/g, "$2$3$1");
1525
+ transformPastedHTML(t) {
1526
+ return t.replace(/(<\/\w+>)((<br \/>)+)/g, "$2$3$1");
1496
1527
  }
1497
1528
  }
1498
1529
  }), this.addEditorListeners();
1499
1530
  },
1500
- bubbleMenuShouldShow({ editor: e, view: t, state: n, oldState: r, from: s, to: o }) {
1501
- return e.isActive("link");
1531
+ bubbleMenuShouldShow({ editor: t, view: e, state: n, oldState: r, from: s, to: o }) {
1532
+ return t.isActive("link");
1502
1533
  },
1503
1534
  /**
1504
1535
  * If the selection contains a link, return the existing link text.
1505
1536
  * Otherwise, use just the selected text.
1506
1537
  * @param editor the editor instance.
1507
1538
  */
1508
- getSelectedLinkText(e) {
1539
+ getSelectedLinkText(t) {
1509
1540
  var a, l, d;
1510
- const { view: t, state: n } = e, { from: r, to: s } = t.state.selection, o = n.doc.textBetween(r, s, ""), i = this.editor.state.doc.nodeAt(r);
1541
+ const { view: e, state: n } = t, { from: r, to: s } = e.state.selection, o = n.doc.textBetween(r, s, ""), i = this.editor.state.doc.nodeAt(r);
1511
1542
  return i && ((d = (l = (a = i.marks) == null ? void 0 : a.at(0)) == null ? void 0 : l.type) == null ? void 0 : d.name) === "link" ? i.textContent : o;
1512
1543
  },
1513
1544
  editLink() {
1514
- const e = this.getSelectedLinkText(this.editor), t = {
1545
+ const t = this.getSelectedLinkText(this.editor), e = {
1515
1546
  href: this.editor.getAttributes("link").href,
1516
- text: e
1547
+ text: t
1517
1548
  };
1518
- this.$emit("edit-link", t);
1549
+ this.$emit("edit-link", e);
1519
1550
  },
1520
1551
  removeLink() {
1521
- var e, t, n, r;
1522
- (r = (n = (t = (e = this.editor) == null ? void 0 : e.chain()) == null ? void 0 : t.focus()) == null ? void 0 : n.unsetLink()) == null || r.run();
1552
+ var t, e, n, r;
1553
+ (r = (n = (e = (t = this.editor) == null ? void 0 : t.chain()) == null ? void 0 : e.focus()) == null ? void 0 : n.unsetLink()) == null || r.run();
1523
1554
  },
1524
1555
  openLink() {
1525
- var t, n;
1526
- (n = (t = this.editor) == null ? void 0 : t.chain()) == null || n.focus();
1527
- const e = this.editor.getAttributes("link").href;
1528
- window.open(e, "_blank");
1556
+ var e, n;
1557
+ (n = (e = this.editor) == null ? void 0 : e.chain()) == null || n.focus();
1558
+ const t = this.editor.getAttributes("link").href;
1559
+ window.open(t, "_blank");
1529
1560
  },
1530
1561
  // eslint-disable-next-line complexity
1531
- setLink(e, t, n, r = $, s) {
1562
+ setLink(t, e, n, r = $, s) {
1532
1563
  var a, l, d;
1533
- if (!e) {
1564
+ if (!t) {
1534
1565
  this.removeLink();
1535
1566
  return;
1536
1567
  }
1537
- r.find((u) => u.test(e)) || (e = `${s}${e}`), this.editor.chain().focus().extendMarkRange("link").run();
1568
+ r.find((u) => u.test(t)) || (t = `${s}${t}`), this.editor.chain().focus().extendMarkRange("link").run();
1538
1569
  const i = (d = (l = (a = this.editor) == null ? void 0 : a.view) == null ? void 0 : l.state) == null ? void 0 : d.selection;
1539
- this.editor.chain().focus().insertContent(t).setTextSelection({ from: i.from, to: i.from + t.length }).setLink({ href: e, class: n.class }).run();
1570
+ this.editor.chain().focus().insertContent(e).setTextSelection({ from: i.from, to: i.from + e.length }).setLink({ href: t, class: n.class }).run();
1540
1571
  },
1541
1572
  // eslint-disable-next-line complexity
1542
- processValue(e, t = !0) {
1573
+ processValue(t, e = !0) {
1543
1574
  const n = this.getOutput();
1544
- if (!(t && Ae(e, n))) {
1545
- if (typeof e == "string" && this.outputFormat === "text") {
1575
+ if (!(e && Be(t, n))) {
1576
+ if (typeof t == "string" && this.outputFormat === "text") {
1546
1577
  const r = new RegExp(`(${O})`, "g");
1547
- e = e == null ? void 0 : e.replace(r, '<emoji-component code="$1"></emoji-component>');
1578
+ t = t == null ? void 0 : t.replace(r, '<emoji-component code="$1"></emoji-component>');
1548
1579
  }
1549
- this.editor.commands.setContent(e, !1, { preserveWhitespace: "full" });
1580
+ this.editor.commands.setContent(t, !1, { preserveWhitespace: "full" });
1550
1581
  }
1551
1582
  },
1552
1583
  destroyEditor() {
1553
1584
  this.editor.destroy();
1554
1585
  },
1555
- insertPlainTextWithHardBreaks(e, t) {
1556
- const { tr: n } = e.state, { from: r, to: s } = e.state.selection;
1586
+ insertPlainTextWithHardBreaks(t, e) {
1587
+ const { tr: n } = t.state, { from: r, to: s } = t.state.selection;
1557
1588
  n.deleteRange(r, s);
1558
- const o = t.split(/\r?\n/);
1589
+ const o = e.split(/\r?\n/);
1559
1590
  let i = r;
1560
1591
  for (let a = 0; a < o.length; a++)
1561
- a > 0 && (n.insert(i, e.state.schema.nodes.hardBreak.create()), i++), n.insertText(o[a], i), i += o[a].length;
1562
- e.dispatch(n);
1592
+ a > 0 && (n.insert(i, t.state.schema.nodes.hardBreak.create()), i++), n.insertText(o[a], i), i += o[a].length;
1593
+ t.dispatch(n);
1563
1594
  },
1564
- shouldPreserveLineBreaks(e, t) {
1565
- return this.pasteRichText ? !t && e && this.hasBlankLines(e) : !!e;
1595
+ shouldPreserveLineBreaks(t, e) {
1596
+ return this.pasteRichText ? !e && t && this.hasBlankLines(t) : !!t;
1566
1597
  },
1567
- processPasteData(e, t, n) {
1568
- if (this.shouldPreserveLineBreaks(t, n))
1569
- return this.insertPlainTextWithHardBreaks(e, t), !0;
1598
+ processPasteData(t, e, n) {
1599
+ if (this.shouldPreserveLineBreaks(e, n))
1600
+ return this.insertPlainTextWithHardBreaks(t, e), !0;
1570
1601
  if (this.shouldHandlePreformattedHTML(n)) {
1571
1602
  const r = this.extractPreformattedText(n);
1572
1603
  if (r && r.includes(`
1573
1604
  `))
1574
- return this.insertPlainTextWithHardBreaks(e, r), !0;
1605
+ return this.insertPlainTextWithHardBreaks(t, r), !0;
1575
1606
  }
1576
1607
  return !1;
1577
1608
  },
1578
- shouldHandlePreformattedHTML(e) {
1579
- return this.pasteRichText && e && this.containsPreformattedContent(e);
1609
+ shouldHandlePreformattedHTML(t) {
1610
+ return this.pasteRichText && t && this.containsPreformattedContent(t);
1580
1611
  },
1581
- containsPreformattedContent(e) {
1582
- const t = document.createElement("div");
1583
- t.innerHTML = e;
1584
- const n = t.querySelectorAll("*");
1612
+ containsPreformattedContent(t) {
1613
+ const e = document.createElement("div");
1614
+ e.innerHTML = t;
1615
+ const n = e.querySelectorAll("*");
1585
1616
  for (const r of n)
1586
1617
  if (this.hasPreWhitespace(r) && this.hasLineBreaks(r))
1587
1618
  return !0;
1588
1619
  return !1;
1589
1620
  },
1590
- hasPreWhitespace(e) {
1591
- const t = e.getAttribute("style") || "", n = e.style.whiteSpace || "", r = n === "pre" || n === "pre-wrap", s = t.includes("white-space: pre");
1621
+ hasPreWhitespace(t) {
1622
+ const e = t.getAttribute("style") || "", n = t.style.whiteSpace || "", r = n === "pre" || n === "pre-wrap", s = e.includes("white-space: pre");
1592
1623
  return r || s;
1593
1624
  },
1594
- hasLineBreaks(e) {
1595
- return e.textContent && e.textContent.includes(`
1625
+ hasLineBreaks(t) {
1626
+ return t.textContent && t.textContent.includes(`
1596
1627
  `);
1597
1628
  },
1598
- hasBlankLines(e) {
1599
- return e.includes(`
1629
+ hasBlankLines(t) {
1630
+ return t.includes(`
1600
1631
 
1601
- `) || /\n\s*\n/.test(e);
1602
- },
1603
- extractPreformattedText(e) {
1604
- const t = document.createElement("div");
1605
- return t.innerHTML = e, this.walkAndExtractText(t);
1606
- },
1607
- walkAndExtractText(e) {
1608
- let t = "";
1609
- if (e.nodeType === Node.TEXT_NODE)
1610
- t += e.textContent;
1611
- else if (e.nodeType === Node.ELEMENT_NODE)
1612
- if (this.hasPreWhitespace(e))
1613
- t += e.textContent;
1632
+ `) || /\n\s*\n/.test(t);
1633
+ },
1634
+ extractPreformattedText(t) {
1635
+ const e = document.createElement("div");
1636
+ return e.innerHTML = t, this.walkAndExtractText(e);
1637
+ },
1638
+ walkAndExtractText(t) {
1639
+ let e = "";
1640
+ if (t.nodeType === Node.TEXT_NODE)
1641
+ e += t.textContent;
1642
+ else if (t.nodeType === Node.ELEMENT_NODE)
1643
+ if (this.hasPreWhitespace(t))
1644
+ e += t.textContent;
1614
1645
  else
1615
- for (const n of e.childNodes)
1616
- t += this.walkAndExtractText(n);
1617
- return t;
1646
+ for (const n of t.childNodes)
1647
+ e += this.walkAndExtractText(n);
1648
+ return e;
1618
1649
  },
1619
1650
  triggerInputChangeEvents() {
1620
- const e = this.getOutput();
1621
- this.$emit("input", e), this.$emit("update:value", e);
1622
- const t = this.editor.getJSON();
1623
- this.$emit("json-input", t);
1651
+ const t = this.getOutput();
1652
+ this.$emit("input", t), this.$emit("update:value", t);
1653
+ const e = this.editor.getJSON();
1654
+ this.$emit("json-input", e);
1624
1655
  const n = this.editor.getHTML();
1625
1656
  this.$emit("html-input", n);
1626
1657
  const r = this.editor.getText({ blockSeparator: `
@@ -1636,12 +1667,12 @@ ${r.textContent}
1636
1667
  this.triggerInputChangeEvents();
1637
1668
  }), this.editor.on("update", () => {
1638
1669
  this.triggerInputChangeEvents();
1639
- }), this.editor.on("selectionUpdate", ({ editor: e }) => {
1640
- this.$emit("selected", this.getSelectedLinkText(e));
1641
- }), this.editor.on("focus", ({ event: e }) => {
1642
- this.$emit("focus", e);
1643
- }), this.editor.on("blur", ({ event: e }) => {
1644
- this.$emit("blur", e);
1670
+ }), this.editor.on("selectionUpdate", ({ editor: t }) => {
1671
+ this.$emit("selected", this.getSelectedLinkText(t));
1672
+ }), this.editor.on("focus", ({ event: t }) => {
1673
+ this.$emit("focus", t);
1674
+ }), this.editor.on("blur", ({ event: t }) => {
1675
+ this.$emit("blur", t);
1645
1676
  });
1646
1677
  },
1647
1678
  getOutput() {
@@ -1656,17 +1687,17 @@ ${r.textContent}
1656
1687
  ` });
1657
1688
  }
1658
1689
  },
1659
- getExtension(e, t) {
1690
+ getExtension(t, e) {
1660
1691
  var n;
1661
- return typeof t == "boolean" ? e : (n = e.configure) == null ? void 0 : n.call(e, t);
1692
+ return typeof e == "boolean" ? t : (n = t.configure) == null ? void 0 : n.call(t, e);
1662
1693
  },
1663
- updateEditorAttributes(e) {
1694
+ updateEditorAttributes(t) {
1664
1695
  this.editor.setOptions({
1665
1696
  editorProps: {
1666
1697
  attributes: {
1667
1698
  ...this.inputAttrs,
1668
1699
  class: this.inputClass,
1669
- ...e
1700
+ ...t
1670
1701
  }
1671
1702
  }
1672
1703
  });
@@ -1676,16 +1707,16 @@ ${r.textContent}
1676
1707
  }
1677
1708
  }
1678
1709
  };
1679
- var Yt = function() {
1680
- var t = this, n = t._self._c;
1681
- return n("div", [t.editor && t.link && !t.hideLinkBubbleMenu ? n("bubble-menu", { staticStyle: { visibility: "visible" }, attrs: { editor: t.editor, "should-show": t.bubbleMenuShouldShow, "tippy-options": t.tippyOptions } }, [n("div", { staticClass: "d-popover__dialog" }, [n("dt-stack", { staticClass: "d-rich-text-editor-bubble-menu__button-stack", attrs: { direction: "row", gap: "0" } }, [n("dt-button", { attrs: { kind: "muted", importance: "clear" }, on: { click: t.editLink } }, [t._v(" " + t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL")) + " ")]), n("dt-button", { attrs: { kind: "muted", importance: "clear" }, on: { click: t.openLink } }, [t._v(" " + t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL")) + " ")]), n("dt-button", { attrs: { kind: "danger", importance: "clear" }, on: { click: t.removeLink } }, [t._v(" " + t._s(t.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL")) + " ")])], 1)], 1)]) : t._e(), n("editor-content", t._g({ ref: "editor", staticClass: "d-rich-text-editor", attrs: { editor: t.editor, "data-qa": "dt-rich-text-editor" } }, t.editorListeners))], 1);
1682
- }, Gt = [], Qt = /* @__PURE__ */ c(
1683
- Jt,
1710
+ var Gt = function() {
1711
+ var e = this, n = e._self._c;
1712
+ return n("div", [e.editor && e.link && !e.hideLinkBubbleMenu ? n("bubble-menu", { staticStyle: { visibility: "visible" }, attrs: { editor: e.editor, "should-show": e.bubbleMenuShouldShow, "tippy-options": e.tippyOptions } }, [n("div", { staticClass: "d-popover__dialog" }, [n("dt-stack", { staticClass: "d-rich-text-editor-bubble-menu__button-stack", attrs: { direction: "row", gap: "0" } }, [n("dt-button", { attrs: { kind: "muted", importance: "clear" }, on: { click: e.editLink } }, [e._v(" " + e._s(e.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_EDIT_BUTTON_LABEL")) + " ")]), n("dt-button", { attrs: { kind: "muted", importance: "clear" }, on: { click: e.openLink } }, [e._v(" " + e._s(e.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_OPEN_LINK_BUTTON_LABEL")) + " ")]), n("dt-button", { attrs: { kind: "danger", importance: "clear" }, on: { click: e.removeLink } }, [e._v(" " + e._s(e.i18n.$t("DIALTONE_RICH_TEXT_EDITOR_REMOVE_BUTTON_LABEL")) + " ")])], 1)], 1)]) : e._e(), n("editor-content", e._g({ ref: "editor", staticClass: "d-rich-text-editor", attrs: { editor: e.editor, "data-qa": "dt-rich-text-editor" } }, e.editorListeners))], 1);
1713
+ }, Qt = [], Zt = /* @__PURE__ */ c(
1684
1714
  Yt,
1685
- Gt
1715
+ Gt,
1716
+ Qt
1686
1717
  );
1687
- const Un = Qt.exports;
1718
+ const Wn = Zt.exports;
1688
1719
  export {
1689
- Un as default
1720
+ Wn as default
1690
1721
  };
1691
1722
  //# sourceMappingURL=rich-text-editor.js.map