@templatical/editor 0.17.0 → 0.17.1

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 (86) hide show
  1. package/dist/{AiFeatureMenu-zwSmx9ZW.js → AiFeatureMenu-Cr8pLXMj.js} +1 -1
  2. package/dist/{CloudEditor-5ahgKRX8.js → CloudEditor-qzoNS8K4.js} +4 -4
  3. package/dist/{CollaboratorBar-6PtX-1AS.js → CollaboratorBar-BkfR0CyD.js} +1 -1
  4. package/dist/{MergeTagSuggestion-jIpT_jmz.js → MergeTagSuggestion-DCuaSOPQ.js} +148 -162
  5. package/dist/{ModuleBrowserModal-B5IH3-1I.js → ModuleBrowserModal-XEHfEO0O.js} +4 -4
  6. package/dist/{ModulePreviewCanvas-CYOLWoZ9.js → ModulePreviewCanvas-BM8XUgbc.js} +1 -1
  7. package/dist/{ParagraphEditor-duWYA6Vv.js → ParagraphEditor-Cs47wU1V.js} +13 -13
  8. package/dist/{SaveModuleDialog-BPUly5h3.js → SaveModuleDialog-BgOS9vCQ.js} +2 -2
  9. package/dist/{SnapshotHistory-CmwU3nlN.js → SnapshotHistory-CLfYzwv9.js} +1 -1
  10. package/dist/{TestEmailModal-zfomMz9i.js → TestEmailModal-DTLfATNt.js} +2 -2
  11. package/dist/{TitleEditor-v0gtezZE.js → TitleEditor-Bq9S0C8Z.js} +5 -5
  12. package/dist/{TplModal-eGFG7k-y.js → TplModal-BW0FAtYe.js} +1 -1
  13. package/dist/{blockTypeIcons-Dd0w4T0I.js → blockTypeIcons-CvSfLeyV.js} +1 -1
  14. package/dist/bundle-stats.json +6 -6
  15. package/dist/cdn/chunks/{AiFeatureMenu-CtXsam7G.js → AiFeatureMenu-B0zH66nO.js} +2 -2
  16. package/dist/cdn/chunks/{AiFeatureMenu-CtXsam7G.js.map → AiFeatureMenu-B0zH66nO.js.map} +1 -1
  17. package/dist/cdn/chunks/{BlockIssueBadge-DR7cpDfQ.js → BlockIssueBadge-yD4pKsU9.js} +2 -2
  18. package/dist/cdn/chunks/{BlockIssueBadge-DR7cpDfQ.js.map → BlockIssueBadge-yD4pKsU9.js.map} +1 -1
  19. package/dist/cdn/chunks/{CloudEditor-YC5y3AwC.js → CloudEditor-Da-aSmw5.js} +9 -9
  20. package/dist/cdn/chunks/{CloudEditor-YC5y3AwC.js.map → CloudEditor-Da-aSmw5.js.map} +1 -1
  21. package/dist/cdn/chunks/{CollaboratorBar-BOD2j8Kl.js → CollaboratorBar-DixaFis-.js} +3 -3
  22. package/dist/cdn/chunks/{CollaboratorBar-BOD2j8Kl.js.map → CollaboratorBar-DixaFis-.js.map} +1 -1
  23. package/dist/cdn/chunks/{ColorPicker-CPMWLHpa.js → ColorPicker-O6xXCPEg.js} +2 -2
  24. package/dist/cdn/chunks/{ColorPicker-CPMWLHpa.js.map → ColorPicker-O6xXCPEg.js.map} +1 -1
  25. package/dist/cdn/chunks/{CountdownBlock-BmGqb7Zi.js → CountdownBlock-jgBPbI1p.js} +2 -2
  26. package/dist/cdn/chunks/{CountdownBlock-BmGqb7Zi.js.map → CountdownBlock-jgBPbI1p.js.map} +1 -1
  27. package/dist/cdn/chunks/{CountdownToolbar-BBwsdGbV.js → CountdownToolbar-DrmZwvIH.js} +4 -4
  28. package/dist/cdn/chunks/{CountdownToolbar-BBwsdGbV.js.map → CountdownToolbar-DrmZwvIH.js.map} +1 -1
  29. package/dist/cdn/chunks/{IssuesPanel-G0z-j3JS.js → IssuesPanel-CpyhXg9M.js} +3 -3
  30. package/dist/cdn/chunks/{IssuesPanel-G0z-j3JS.js.map → IssuesPanel-CpyhXg9M.js.map} +1 -1
  31. package/dist/cdn/chunks/{MergeTagSuggestion-rpZ6Ol-i.js → MergeTagSuggestion-BmMmdcRg.js} +2 -2
  32. package/dist/cdn/chunks/{MergeTagSuggestion-rpZ6Ol-i.js.map → MergeTagSuggestion-BmMmdcRg.js.map} +1 -1
  33. package/dist/cdn/chunks/{ModuleBrowserModal-DiLTY0ec.js → ModuleBrowserModal-DPQLFTti.js} +5 -5
  34. package/dist/cdn/chunks/{ModuleBrowserModal-DiLTY0ec.js.map → ModuleBrowserModal-DPQLFTti.js.map} +1 -1
  35. package/dist/cdn/chunks/{ModulePreviewCanvas-CdV5mEQ6.js → ModulePreviewCanvas-Csc6M0RA.js} +2 -2
  36. package/dist/cdn/chunks/{ModulePreviewCanvas-CdV5mEQ6.js.map → ModulePreviewCanvas-Csc6M0RA.js.map} +1 -1
  37. package/dist/cdn/chunks/{NumberWithSuffix-lqQlf0Uk.js → NumberWithSuffix-YmcsBmCd.js} +2 -2
  38. package/dist/cdn/chunks/{NumberWithSuffix-lqQlf0Uk.js.map → NumberWithSuffix-YmcsBmCd.js.map} +1 -1
  39. package/dist/cdn/chunks/{ParagraphEditor-BYoZfURd.js → ParagraphEditor-DR5AcHB0.js} +17 -17
  40. package/dist/cdn/chunks/{ParagraphEditor-BYoZfURd.js.map → ParagraphEditor-DR5AcHB0.js.map} +1 -1
  41. package/dist/cdn/chunks/{RichTextEditorContent-BnPRnXxy.js → RichTextEditorContent-52c2EuCT.js} +3 -3
  42. package/dist/cdn/chunks/{RichTextEditorContent-BnPRnXxy.js.map → RichTextEditorContent-52c2EuCT.js.map} +1 -1
  43. package/dist/cdn/chunks/{SaveModuleDialog-C9hUeWyG.js → SaveModuleDialog-dpRlVrrQ.js} +2 -2
  44. package/dist/cdn/chunks/{SaveModuleDialog-C9hUeWyG.js.map → SaveModuleDialog-dpRlVrrQ.js.map} +1 -1
  45. package/dist/cdn/chunks/{TitleEditor-wFvnU3Jr.js → TitleEditor-DtQTPAg3.js} +8 -8
  46. package/dist/cdn/chunks/{TitleEditor-wFvnU3Jr.js.map → TitleEditor-DtQTPAg3.js.map} +1 -1
  47. package/dist/cdn/chunks/{blockTypeIcons-DNMvDz5B.js → blockTypeIcons-B0ktHdUG.js} +3 -3
  48. package/dist/cdn/chunks/{blockTypeIcons-DNMvDz5B.js.map → blockTypeIcons-B0ktHdUG.js.map} +1 -1
  49. package/dist/cdn/chunks/{extensions-DxcxIlwT.js → extensions-CiewgCtw.js} +4 -4
  50. package/dist/cdn/chunks/{extensions-DxcxIlwT.js.map → extensions-CiewgCtw.js.map} +1 -1
  51. package/dist/cdn/chunks/{features-B3qgDBHf.js → features-DLu_D-6j.js} +6 -6
  52. package/dist/cdn/chunks/{features-B3qgDBHf.js.map → features-DLu_D-6j.js.map} +1 -1
  53. package/dist/cdn/chunks/{icons-kiMqh99T.js → icons-B03IY-pm.js} +2 -2
  54. package/dist/cdn/chunks/{icons-kiMqh99T.js.map → icons-B03IY-pm.js.map} +1 -1
  55. package/dist/cdn/chunks/{media-library-C5ogiZ4f.js → media-library-CYF18RNk.js} +3 -3
  56. package/dist/cdn/chunks/{media-library-C5ogiZ4f.js.map → media-library-CYF18RNk.js.map} +1 -1
  57. package/dist/cdn/chunks/{quality-BftAn_AJ.js → quality-LmsngN2B.js} +2 -2
  58. package/dist/cdn/chunks/{quality-BftAn_AJ.js.map → quality-LmsngN2B.js.map} +1 -1
  59. package/dist/cdn/chunks/{renderer-Cdlo4MVX.js → renderer-DAeNIQqa.js} +4 -4
  60. package/dist/cdn/chunks/renderer-DAeNIQqa.js.map +1 -0
  61. package/dist/cdn/chunks/{src-GBA8oUL2.js → src-CModhUDN.js} +4 -4
  62. package/dist/cdn/chunks/{src-GBA8oUL2.js.map → src-CModhUDN.js.map} +1 -1
  63. package/dist/cdn/chunks/{styles-B6rdq9JB.js → styles-hd_LBGaF.js} +10 -10
  64. package/dist/cdn/chunks/{styles-B6rdq9JB.js.map → styles-hd_LBGaF.js.map} +1 -1
  65. package/dist/cdn/chunks/{tiptap-zpXk5mN4.js → tiptap-C2indasq.js} +806 -811
  66. package/dist/cdn/chunks/tiptap-C2indasq.js.map +1 -0
  67. package/dist/cdn/editor.js +5 -5
  68. package/dist/{dist-BReUTadj.js → dist-8TKf-Jpg.js} +2 -2
  69. package/dist/{dist-BE9m_i60.js → dist-BDVm2MrW.js} +1 -1
  70. package/dist/{dist-D1WmF8BF.js → dist-BKKo5wPC.js} +1 -1
  71. package/dist/{dist-DhY2di4U.js → dist-COSN3oDJ.js} +1 -1
  72. package/dist/{dist-CHLoeloJ.js → dist-CcX5sLpz.js} +1 -1
  73. package/dist/{dist-D9g4CSnm.js → dist-CgTKuIUN.js} +300 -298
  74. package/dist/{dist-i_Z7t67A.js → dist-Cx7IUM7J.js} +22 -15
  75. package/dist/{dist-Bm07Z3Es.js → dist-D6M5FAY7.js} +1 -1
  76. package/dist/{dist-DGEaAAIb.js → dist-DXAZUjj3.js} +1 -1
  77. package/dist/{dist-BXR1aBJV.js → dist-DbekZDmJ.js} +1 -1
  78. package/dist/{dist-DcKlLQ8d.js → dist-Dk5AdwoQ.js} +1 -1
  79. package/dist/{dist-BPPeDw62.js → dist-YSCPD13F.js} +1 -1
  80. package/dist/{extensions-B4lu0KkE.js → extensions-DhgbhfBX.js} +3 -3
  81. package/dist/{styles-mBSbDYeX.js → styles-BWC0jc5-.js} +4 -4
  82. package/dist/templatical-editor.js +3 -3
  83. package/dist/{useEditorCore-CaaHPKjm.js → useEditorCore-FLMIhtv1.js} +2 -2
  84. package/package.json +8 -8
  85. package/dist/cdn/chunks/renderer-Cdlo4MVX.js.map +0 -1
  86. package/dist/cdn/chunks/tiptap-zpXk5mN4.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  import { A as e, Et as t, O as n, Ot as r, Y as i, _ as a, c as o, d as s, r as c, u as l, y as u } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
2
2
  import { c as d, n as f } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
3
- import { F as p, Sn as m, i as h, vn as g, xn as _, yn as v } from "./dist-D9g4CSnm.js";
4
- //#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
3
+ import { F as p, Sn as m, i as h, vn as g, xn as _, yn as v } from "./dist-CgTKuIUN.js";
4
+ //#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
5
5
  var y = Math.min, b = Math.max, x = Math.round, S = Math.floor, C = (e) => ({
6
6
  x: e,
7
7
  y: e
@@ -69,11 +69,10 @@ function N(e) {
69
69
  }
70
70
  function ce(e) {
71
71
  return {
72
- top: 0,
73
- right: 0,
74
- bottom: 0,
75
- left: 0,
76
- ...e
72
+ top: e.top ?? 0,
73
+ right: e.right ?? 0,
74
+ bottom: e.bottom ?? 0,
75
+ left: e.left ?? 0
77
76
  };
78
77
  }
79
78
  function le(e) {
@@ -98,7 +97,7 @@ function P(e) {
98
97
  };
99
98
  }
100
99
  //#endregion
101
- //#region ../../node_modules/.pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
100
+ //#region ../../node_modules/.pnpm/@floating-ui+core@1.8.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
102
101
  function ue(e, t, n) {
103
102
  let { reference: r, floating: i } = e, a = A(t), o = j(t), s = k(o), c = E(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
104
103
  switch (c) {
@@ -131,15 +130,8 @@ function ue(e, t, n) {
131
130
  y: r.y
132
131
  };
133
132
  }
134
- switch (D(t)) {
135
- case "start":
136
- p[o] -= f * (n && l ? -1 : 1);
137
- break;
138
- case "end":
139
- p[o] += f * (n && l ? -1 : 1);
140
- break;
141
- }
142
- return p;
133
+ let m = D(t);
134
+ return m && (p[o] += f * (m === "end" ? 1 : -1) * (n && l ? -1 : 1)), p;
143
135
  }
144
136
  async function de(e, t) {
145
137
  t === void 0 && (t = {});
@@ -298,7 +290,7 @@ var _e = function(e) {
298
290
  };
299
291
  };
300
292
  //#endregion
301
- //#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
293
+ //#region ../../node_modules/.pnpm/@floating-ui+utils@0.2.12/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
302
294
  function F() {
303
295
  return typeof window < "u";
304
296
  }
@@ -380,7 +372,7 @@ function J(e) {
380
372
  }
381
373
  function Ee(e) {
382
374
  let t = J(e);
383
- return G(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : B(t) && V(t) ? t : Ee(t);
375
+ return G(t) ? (e.ownerDocument || e).body : B(t) && V(t) ? t : Ee(t);
384
376
  }
385
377
  function Y(e, t, n) {
386
378
  t === void 0 && (t = []), n === void 0 && (n = !0);
@@ -394,7 +386,7 @@ function De(e) {
394
386
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
395
387
  }
396
388
  //#endregion
397
- //#region ../../node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
389
+ //#region ../../node_modules/.pnpm/@floating-ui+dom@1.8.0/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
398
390
  function Oe(e) {
399
391
  let t = K(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = B(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = x(n) !== a || x(r) !== o;
400
392
  return s && (n = a, r = o), {
@@ -424,16 +416,16 @@ function je(e) {
424
416
  };
425
417
  }
426
418
  function Me(e, t, n) {
427
- return t === void 0 && (t = !1), !n || t && n !== L(e) ? !1 : t;
419
+ return t === void 0 && (t = !1), !!n && t && n === L(e);
428
420
  }
429
421
  function Z(e, t, n, r) {
430
422
  t === void 0 && (t = !1), n === void 0 && (n = !1);
431
423
  let i = e.getBoundingClientRect(), a = ke(e), o = C(1);
432
424
  t && (r ? z(r) && (o = X(r)) : o = X(e));
433
425
  let s = Me(a, n, r) ? je(a) : C(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
434
- if (a) {
435
- let e = L(a), t = r && z(r) ? L(r) : r, n = e, i = De(n);
436
- for (; i && r && t !== n;) {
426
+ if (a && r) {
427
+ let e = L(a), t = z(r) ? L(r) : r, n = e, i = De(n);
428
+ for (; i && t !== n;) {
437
429
  let e = X(i), t = i.getBoundingClientRect(), r = K(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
438
430
  c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = L(i), i = De(n);
439
431
  }
@@ -463,7 +455,7 @@ function Pe(e) {
463
455
  scrollLeft: 0,
464
456
  scrollTop: 0
465
457
  }, l = C(1), u = C(0), d = B(r);
466
- if ((d || !d && !a) && ((I(r) !== "body" || V(o)) && (c = q(r)), d)) {
458
+ if ((d || !a) && ((I(r) !== "body" || V(o)) && (c = q(r)), d)) {
467
459
  let e = Z(r);
468
460
  l = X(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
469
461
  }
@@ -476,39 +468,38 @@ function Pe(e) {
476
468
  };
477
469
  }
478
470
  function Fe(e) {
479
- return Array.from(e.getClientRects());
471
+ return e.getClientRects ? Array.from(e.getClientRects()) : [];
480
472
  }
481
473
  function Ie(e) {
482
- let t = R(e), n = q(e), r = e.ownerDocument.body, i = b(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = b(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + Q(e), s = -n.scrollTop;
483
- return K(r).direction === "rtl" && (o += b(t.clientWidth, r.clientWidth) - i), {
484
- width: i,
485
- height: a,
486
- x: o,
487
- y: s
474
+ let t = q(e), n = e.ownerDocument.body, r = b(e.scrollWidth, e.clientWidth, n.scrollWidth, n.clientWidth), i = b(e.scrollHeight, e.clientHeight, n.scrollHeight, n.clientHeight), a = -t.scrollLeft + Q(e), o = -t.scrollTop;
475
+ return K(n).direction === "rtl" && (a += b(e.clientWidth, n.clientWidth) - r), {
476
+ width: r,
477
+ height: i,
478
+ x: a,
479
+ y: o
488
480
  };
489
481
  }
490
482
  var Le = 25;
491
- function Re(e, t) {
492
- let n = L(e), r = R(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
493
- if (i) {
494
- a = i.width, o = i.height;
495
- let e = Te();
496
- (!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
483
+ function Re(e, t, n) {
484
+ n === void 0 && (n = "viewport");
485
+ let r = n === "layoutViewport", i = L(e), a = R(e), o = i.visualViewport, s = a.clientWidth, c = a.clientHeight, l = 0, u = 0;
486
+ if (o) {
487
+ let e = !Te() || t === "fixed";
488
+ r ? e || (l = -o.offsetLeft, u = -o.offsetTop) : (s = o.width, c = o.height, e && (l = o.offsetLeft, u = o.offsetTop));
489
+ }
490
+ if (Q(a) <= 0) {
491
+ let e = a.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, i = Math.abs(a.clientWidth - t.clientWidth - r), o = getComputedStyle(a).scrollbarGutter === "stable both-edges" ? i / 2 : i;
492
+ o <= Le && (s -= o);
497
493
  }
498
- let l = Q(r);
499
- if (l <= 0) {
500
- let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
501
- o <= Le && (a -= o);
502
- } else l <= Le && (a += l);
503
494
  return {
504
- width: a,
505
- height: o,
506
- x: s,
507
- y: c
495
+ width: s,
496
+ height: c,
497
+ x: l,
498
+ y: u
508
499
  };
509
500
  }
510
501
  function ze(e, t) {
511
- let n = Z(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = B(e) ? X(e) : C(1);
502
+ let n = Z(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = X(e);
512
503
  return {
513
504
  width: e.clientWidth * a.x,
514
505
  height: e.clientHeight * a.y,
@@ -518,7 +509,7 @@ function ze(e, t) {
518
509
  }
519
510
  function Be(e, t, n) {
520
511
  let r;
521
- if (t === "viewport") r = Re(e, n);
512
+ if (t === "viewport" || t === "layoutViewport") r = Re(e, n, t);
522
513
  else if (t === "document") r = Ie(R(e));
523
514
  else if (z(t)) r = ze(t, n);
524
515
  else {
@@ -533,21 +524,17 @@ function Be(e, t, n) {
533
524
  return P(r);
534
525
  }
535
526
  function Ve(e, t) {
536
- let n = J(e);
537
- return n === t || !z(n) || G(n) ? !1 : K(n).position === "fixed" || Ve(n, t);
538
- }
539
- function He(e, t) {
540
527
  let n = t.get(e);
541
528
  if (n) return n;
542
529
  let r = Y(e, [], !1).filter((e) => z(e) && I(e) !== "body"), i = null, a = K(e).position === "fixed", o = a ? J(e) : e;
543
530
  for (; z(o) && !G(o);) {
544
- let t = K(o), n = W(o);
545
- !n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || V(o) && !n && Ve(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = J(o);
531
+ let e = K(o), t = W(o), n = i ? i.position : a ? "fixed" : "";
532
+ !t && (n === "fixed" || n === "absolute" && e.position === "static") ? r = r.filter((e) => e !== o) : i = e, o = J(o);
546
533
  }
547
534
  return t.set(e, r), r;
548
535
  }
549
- function Ue(e) {
550
- let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? H(t) ? [] : He(t, this._c) : [].concat(n), r], o = Be(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
536
+ function He(e) {
537
+ let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? H(t) ? [] : Ve(t, this._c) : [].concat(n), r], o = Be(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
551
538
  for (let e = 1; e < a.length; e++) {
552
539
  let n = Be(t, a[e], i);
553
540
  s = b(n.top, s), c = y(n.right, c), l = y(n.bottom, l), u = b(n.left, u);
@@ -559,30 +546,27 @@ function Ue(e) {
559
546
  y: s
560
547
  };
561
548
  }
562
- function We(e) {
549
+ function Ue(e) {
563
550
  let { width: t, height: n } = Oe(e);
564
551
  return {
565
552
  width: t,
566
553
  height: n
567
554
  };
568
555
  }
569
- function Ge(e, t, n) {
556
+ function We(e, t, n) {
570
557
  let r = B(t), i = R(t), a = n === "fixed", o = Z(e, !0, a, t), s = {
571
558
  scrollLeft: 0,
572
559
  scrollTop: 0
573
560
  }, c = C(0);
574
- function l() {
575
- c.x = Q(i);
576
- }
577
- if (r || !r && !a) if ((I(t) !== "body" || V(i)) && (s = q(t)), r) {
561
+ if ((r || !a) && ((I(t) !== "body" || V(i)) && (s = q(t)), r)) {
578
562
  let e = Z(t, !0, a, t);
579
563
  c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
580
- } else i && l();
581
- a && !r && i && l();
582
- let u = i && !r && !a ? Ne(i, s) : C(0);
564
+ }
565
+ !r && i && (c.x = Q(i));
566
+ let l = i && !r && !a ? Ne(i, s) : C(0);
583
567
  return {
584
- x: o.left + s.scrollLeft - c.x - u.x,
585
- y: o.top + s.scrollTop - c.y - u.y,
568
+ x: o.left + s.scrollLeft - c.x - l.x,
569
+ y: o.top + s.scrollTop - c.y - l.y,
586
570
  width: o.width,
587
571
  height: o.height
588
572
  };
@@ -590,13 +574,13 @@ function Ge(e, t, n) {
590
574
  function $(e) {
591
575
  return K(e).position === "static";
592
576
  }
593
- function Ke(e, t) {
577
+ function Ge(e, t) {
594
578
  if (!B(e) || K(e).position === "fixed") return null;
595
579
  if (t) return t(e);
596
580
  let n = e.offsetParent;
597
581
  return R(e) === n && (n = n.ownerDocument.body), n;
598
582
  }
599
- function qe(e, t) {
583
+ function Ke(e, t) {
600
584
  let n = L(e);
601
585
  if (H(e)) return n;
602
586
  if (!B(e)) {
@@ -607,14 +591,14 @@ function qe(e, t) {
607
591
  }
608
592
  return n;
609
593
  }
610
- let r = Ke(e, t);
611
- for (; r && be(r) && $(r);) r = Ke(r, t);
594
+ let r = Ge(e, t);
595
+ for (; r && be(r) && $(r);) r = Ge(r, t);
612
596
  return r && G(r) && $(r) && !W(r) ? n : r || we(e) || n;
613
597
  }
614
- var Je = async function(e) {
615
- let t = this.getOffsetParent || qe, n = this.getDimensions, r = await n(e.floating);
598
+ var qe = async function(e) {
599
+ let t = this.getOffsetParent || Ke, n = this.getDimensions, r = await n(e.floating);
616
600
  return {
617
- reference: Ge(e.reference, await t(e.floating), e.strategy),
601
+ reference: We(e.reference, await t(e.floating), e.strategy),
618
602
  floating: {
619
603
  x: 0,
620
604
  y: 0,
@@ -623,67 +607,71 @@ var Je = async function(e) {
623
607
  }
624
608
  };
625
609
  };
626
- function Ye(e) {
610
+ function Je(e) {
627
611
  return K(e).direction === "rtl";
628
612
  }
629
- var Xe = {
613
+ var Ye = {
630
614
  convertOffsetParentRelativeRectToViewportRelativeRect: Pe,
631
615
  getDocumentElement: R,
632
- getClippingRect: Ue,
633
- getOffsetParent: qe,
634
- getElementRects: Je,
616
+ getClippingRect: He,
617
+ getOffsetParent: Ke,
618
+ getElementRects: qe,
635
619
  getClientRects: Fe,
636
- getDimensions: We,
620
+ getDimensions: Ue,
637
621
  getScale: X,
638
622
  isElement: z,
639
- isRTL: Ye
623
+ isRTL: Je
640
624
  };
641
- function Ze(e, t) {
625
+ function Xe(e, t) {
642
626
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
643
627
  }
644
- function Qe(e, t) {
645
- let n = null, r, i = R(e);
646
- function a() {
628
+ function Ze(e, t, n) {
629
+ let r = null, i, a = R(e);
630
+ function o() {
647
631
  var e;
648
- clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
632
+ clearTimeout(i), (e = r) == null || e.disconnect(), r = null;
649
633
  }
650
- function o(s, c) {
651
- s === void 0 && (s = !1), c === void 0 && (c = 1), a();
634
+ function s(n, c) {
635
+ n === void 0 && (n = !1), c === void 0 && (c = 1), o();
652
636
  let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
653
- if (s || t(), !f || !p) return;
654
- let m = S(d), h = S(i.clientWidth - (u + f)), g = S(i.clientHeight - (d + p)), _ = S(u), v = {
637
+ if (n || t(), !f || !p) return;
638
+ let m = S(d), h = S(a.clientWidth - (u + f)), g = S(a.clientHeight - (d + p)), _ = S(u), v = {
655
639
  rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
656
640
  threshold: b(0, y(1, c)) || 1
657
641
  }, x = !0;
658
642
  function C(t) {
659
643
  let n = t[0].intersectionRatio;
644
+ if (!Xe(l, e.getBoundingClientRect())) return s();
660
645
  if (n !== c) {
661
- if (!x) return o();
662
- n ? o(!1, n) : r = setTimeout(() => {
663
- o(!1, 1e-7);
646
+ if (!x) return s();
647
+ n ? s(!1, n) : i = setTimeout(() => {
648
+ s(!1, 1e-7);
664
649
  }, 1e3);
665
650
  }
666
- n === 1 && !Ze(l, e.getBoundingClientRect()) && o(), x = !1;
651
+ x = !1;
667
652
  }
668
653
  try {
669
- n = new IntersectionObserver(C, {
654
+ r = new IntersectionObserver(C, {
670
655
  ...v,
671
- root: i.ownerDocument
656
+ root: a.ownerDocument
672
657
  });
673
658
  } catch {
674
- n = new IntersectionObserver(C, v);
659
+ r = new IntersectionObserver(C, v);
675
660
  }
676
- n.observe(e);
661
+ r.observe(e);
677
662
  }
678
- return o(!0), a;
663
+ let c = L(e), l = () => s(n);
664
+ return c.addEventListener("resize", l), s(!0), () => {
665
+ c.removeEventListener("resize", l), o();
666
+ };
679
667
  }
680
- function $e(e, t, n, r) {
668
+ function Qe(e, t, n, r) {
681
669
  r === void 0 && (r = {});
682
670
  let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = ke(e), u = i || a ? [...l ? Y(l) : [], ...t ? Y(t) : []] : [];
683
671
  u.forEach((e) => {
684
- i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
672
+ i && e.addEventListener("scroll", n), a && e.addEventListener("resize", n);
685
673
  });
686
- let d = l && s ? Qe(l, n) : null, f = -1, p = null;
674
+ let d = l && s ? Ze(l, n, a) : null, f = -1, p = null;
687
675
  o && (p = new ResizeObserver((e) => {
688
676
  let [r] = e;
689
677
  r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
@@ -695,7 +683,7 @@ function $e(e, t, n, r) {
695
683
  c && g();
696
684
  function g() {
697
685
  let t = Z(e);
698
- h && !Ze(h, t) && n(), h = t, m = requestAnimationFrame(g);
686
+ h && !Xe(h, t) && n(), h = t, m = requestAnimationFrame(g);
699
687
  }
700
688
  return n(), () => {
701
689
  var e;
@@ -704,11 +692,9 @@ function $e(e, t, n, r) {
704
692
  }), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
705
693
  };
706
694
  }
707
- var et = _e, tt = me, nt = (e, t, n) => {
708
- let r = /* @__PURE__ */ new Map(), i = {
709
- platform: Xe,
710
- ...n
711
- }, a = {
695
+ var $e = _e, et = me, tt = (e, t, n) => {
696
+ let r = /* @__PURE__ */ new Map(), i = n ?? {}, a = {
697
+ ...Ye,
712
698
  ...i.platform,
713
699
  _c: r
714
700
  };
@@ -718,8 +704,8 @@ var et = _e, tt = me, nt = (e, t, n) => {
718
704
  });
719
705
  };
720
706
  //#endregion
721
- //#region ../../node_modules/.pnpm/@tiptap+suggestion@3.28.0_@floating-ui+dom@1.7.6_@tiptap+core@3.28.0_@tiptap+pm@3.28.0__@tiptap+pm@3.28.0/node_modules/@tiptap/suggestion/dist/index.js
722
- function rt(e) {
707
+ //#region ../../node_modules/.pnpm/@tiptap+suggestion@3.28.0_@floating-ui+dom@1.8.0_@tiptap+core@3.28.0_@tiptap+pm@3.28.0__@tiptap+pm@3.28.0/node_modules/@tiptap/suggestion/dist/index.js
708
+ function nt(e) {
723
709
  let { char: t, allowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, $position: o } = e, s = n && !r, c = p(t), l = RegExp(`\\s${c}$`), u = a ? "^" : "", d = r ? "" : c, f = RegExp(s ? `${u}${c}.*?(?=\\s${d}|$)` : `${u}(?:^)?${c}[^\\s${d}]*`, "gm"), m = o.nodeBefore?.isText && o.nodeBefore.text;
724
710
  if (!m) return null;
725
711
  let h = o.pos - m.length, g = Array.from(m.matchAll(f)).pop();
@@ -736,7 +722,7 @@ function rt(e) {
736
722
  text: g[0]
737
723
  } : null;
738
724
  }
739
- function it(e) {
725
+ function rt(e) {
740
726
  return e.docChanged ? e.steps.some((e) => {
741
727
  let t = e.slice;
742
728
  if (!t?.content) return !1;
@@ -744,7 +730,7 @@ function it(e) {
744
730
  return /\s/.test(n);
745
731
  }) : !1;
746
732
  }
747
- function at(e) {
733
+ function it(e) {
748
734
  return () => {
749
735
  let t = e.state.selection.$anchor.pos, { top: n, right: r, bottom: i, left: a } = e.view.coordsAtPos(t);
750
736
  try {
@@ -754,13 +740,13 @@ function at(e) {
754
740
  }
755
741
  };
756
742
  }
757
- function ot(e, t, n, r) {
743
+ function at(e, t, n, r) {
758
744
  return n ? () => {
759
745
  let n = r.getState(e.state)?.decorationId;
760
746
  return t.dom.querySelector(`[data-decoration-id="${n}"]`)?.getBoundingClientRect() || null;
761
- } : at(e);
747
+ } : it(e);
762
748
  }
763
- function st({ match: e, dismissedRange: t, state: n, transaction: r, editor: i, shouldResetDismissed: a, effectiveAllowSpaces: o }) {
749
+ function ot({ match: e, dismissedRange: t, state: n, transaction: r, editor: i, shouldResetDismissed: a, effectiveAllowSpaces: o }) {
764
750
  return a?.({
765
751
  editor: i,
766
752
  state: n,
@@ -768,13 +754,13 @@ function st({ match: e, dismissedRange: t, state: n, transaction: r, editor: i,
768
754
  match: e,
769
755
  transaction: r,
770
756
  allowSpaces: o
771
- }) ? !1 : o ? e.range.from === t.from : e.range.from === t.from && !it(r);
757
+ }) ? !1 : o ? e.range.from === t.from : e.range.from === t.from && !rt(r);
772
758
  }
773
- function ct({ view: e, pluginKeyRef: t }) {
759
+ function st({ view: e, pluginKeyRef: t }) {
774
760
  let n = e.state.tr.setMeta(t, { exit: !0 });
775
761
  e.dispatch(n);
776
762
  }
777
- function lt({ pluginKey: e, decorationTag: t, decorationClass: n, decorationContent: r, decorationEmptyClass: i, renderer: a, dispatchExit: o }) {
763
+ function ct({ pluginKey: e, decorationTag: t, decorationClass: n, decorationContent: r, decorationEmptyClass: i, renderer: a, dispatchExit: o }) {
778
764
  return {
779
765
  handleKeyDown(t, n) {
780
766
  var r;
@@ -802,7 +788,7 @@ function lt({ pluginKey: e, decorationTag: t, decorationClass: n, decorationCont
802
788
  }
803
789
  };
804
790
  }
805
- function ut({ editor: e, char: t, effectiveAllowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, findSuggestionMatch: o, allow: s, shouldShow: c, shouldKeepDismissed: l, pluginKey: u }) {
791
+ function lt({ editor: e, char: t, effectiveAllowSpaces: n, allowToIncludeChar: r, allowedPrefixes: i, startOfLine: a, findSuggestionMatch: o, allow: s, shouldShow: c, shouldKeepDismissed: l, pluginKey: u }) {
806
792
  return {
807
793
  init() {
808
794
  return {
@@ -861,7 +847,7 @@ function ut({ editor: e, char: t, effectiveAllowSpaces: n, allowToIncludeChar: r
861
847
  }
862
848
  };
863
849
  }
864
- function dt({ editor: e, items: t }) {
850
+ function ut({ editor: e, items: t }) {
865
851
  let n = null, r = null, i = null, a = () => {
866
852
  r !== null && (clearTimeout(r), r = null), i?.(), i = null;
867
853
  }, o = (e) => new Promise((t) => {
@@ -895,18 +881,18 @@ function dt({ editor: e, items: t }) {
895
881
  }
896
882
  };
897
883
  }
898
- function ft({ placement: e, offset: t, flip: n, floatingUi: r }) {
899
- let i = [et({
884
+ function dt({ placement: e, offset: t, flip: n, floatingUi: r }) {
885
+ let i = [$e({
900
886
  mainAxis: t.mainAxis ?? 4,
901
887
  crossAxis: t.crossAxis ?? 0
902
888
  })];
903
- return n && i.push(tt()), r?.middleware?.length && i.push(...r.middleware), {
889
+ return n && i.push(et()), r?.middleware?.length && i.push(...r.middleware), {
904
890
  placement: e,
905
891
  strategy: r?.strategy ?? "absolute",
906
892
  middleware: i
907
893
  };
908
894
  }
909
- function pt(e) {
895
+ function ft(e) {
910
896
  if (e instanceof HTMLElement) return e;
911
897
  if (typeof e == "string") try {
912
898
  let t = document.querySelector(e);
@@ -916,15 +902,15 @@ function pt(e) {
916
902
  }
917
903
  return document.body;
918
904
  }
919
- function mt({ getReferenceRect: e, contextElement: t, config: n, container: r, dismissOnOutsideClick: i, dismiss: a }) {
905
+ function pt({ getReferenceRect: e, contextElement: t, config: n, container: r, dismissOnOutsideClick: i, dismiss: a }) {
920
906
  return (o, s = {}) => {
921
907
  let c = {
922
908
  getBoundingClientRect: () => e() ?? new DOMRect(),
923
909
  contextElement: t
924
910
  }, l = !1, u = !o.isConnected;
925
- u && pt(r).appendChild(o), s.onPosition || (o.style.visibility = "hidden", o.style.width = "max-content");
926
- let d = $e(c, o, () => {
927
- nt(c, o, {
911
+ u && ft(r).appendChild(o), s.onPosition || (o.style.visibility = "hidden", o.style.width = "max-content");
912
+ let d = Qe(c, o, () => {
913
+ tt(c, o, {
928
914
  placement: n.placement,
929
915
  strategy: n.strategy,
930
916
  middleware: n.middleware
@@ -953,11 +939,11 @@ function mt({ getReferenceRect: e, contextElement: t, config: n, container: r, d
953
939
  };
954
940
  };
955
941
  }
956
- function ht({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i, debounce: a, initialItems: o, placement: s, offset: c, container: l, flip: u, floatingUi: d, dismissOnOutsideClick: f, command: p, clientRectFor: m, dispatchExit: h }) {
957
- let g, _ = dt({
942
+ function mt({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i, debounce: a, initialItems: o, placement: s, offset: c, container: l, flip: u, floatingUi: d, dismissOnOutsideClick: f, command: p, clientRectFor: m, dispatchExit: h }) {
943
+ let g, _ = ut({
958
944
  editor: e,
959
945
  items: n
960
- }), v = ft({
946
+ }), v = dt({
961
947
  placement: s,
962
948
  offset: c,
963
949
  flip: u,
@@ -1011,7 +997,7 @@ function ht({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i,
1011
997
  container: l,
1012
998
  flip: u,
1013
999
  floatingUi: v,
1014
- mount: mt({
1000
+ mount: pt({
1015
1001
  getReferenceRect: j,
1016
1002
  contextElement: n.dom,
1017
1003
  config: v,
@@ -1057,24 +1043,24 @@ function ht({ editor: e, pluginKey: t, items: n, renderer: r, minQueryLength: i,
1057
1043
  }
1058
1044
  };
1059
1045
  }
1060
- var gt = new m("suggestion");
1061
- function _t({ pluginKey: e = gt, editor: t, char: n = "@", allowSpaces: r = !1, allowToIncludeChar: i = !1, allowedPrefixes: a = [" "], startOfLine: o = !1, decorationTag: s = "span", decorationClass: c = "suggestion", decorationContent: l = "", decorationEmptyClass: u = "is-empty", command: d = () => null, items: f = () => [], minQueryLength: p = 0, debounce: m = 0, initialItems: h, placement: g = "bottom-start", offset: v = {}, container: y, flip: b = !0, floatingUi: x, dismissOnOutsideClick: S = !0, render: C = () => ({}), allow: w = () => !0, findSuggestionMatch: T = rt, shouldShow: E, shouldResetDismissed: D }) {
1062
- let O = C?.(), k = r && !i, A = (n, r) => ot(t, n, r, e);
1046
+ var ht = new m("suggestion");
1047
+ function gt({ pluginKey: e = ht, editor: t, char: n = "@", allowSpaces: r = !1, allowToIncludeChar: i = !1, allowedPrefixes: a = [" "], startOfLine: o = !1, decorationTag: s = "span", decorationClass: c = "suggestion", decorationContent: l = "", decorationEmptyClass: u = "is-empty", command: d = () => null, items: f = () => [], minQueryLength: p = 0, debounce: m = 0, initialItems: h, placement: g = "bottom-start", offset: v = {}, container: y, flip: b = !0, floatingUi: x, dismissOnOutsideClick: S = !0, render: C = () => ({}), allow: w = () => !0, findSuggestionMatch: T = nt, shouldShow: E, shouldResetDismissed: D }) {
1048
+ let O = C?.(), k = r && !i, A = (n, r) => at(t, n, r, e);
1063
1049
  function j(e) {
1064
- return st({
1050
+ return ot({
1065
1051
  ...e,
1066
1052
  editor: t,
1067
1053
  shouldResetDismissed: D,
1068
1054
  effectiveAllowSpaces: k
1069
1055
  });
1070
1056
  }
1071
- let M = (t) => ct({
1057
+ let M = (t) => st({
1072
1058
  view: t,
1073
1059
  pluginKeyRef: e
1074
1060
  });
1075
1061
  return new _({
1076
1062
  key: e,
1077
- view: () => ht({
1063
+ view: () => mt({
1078
1064
  editor: t,
1079
1065
  pluginKey: e,
1080
1066
  items: f,
@@ -1092,7 +1078,7 @@ function _t({ pluginKey: e = gt, editor: t, char: n = "@", allowSpaces: r = !1,
1092
1078
  clientRectFor: A,
1093
1079
  dispatchExit: M
1094
1080
  }),
1095
- state: ut({
1081
+ state: lt({
1096
1082
  editor: t,
1097
1083
  char: n,
1098
1084
  effectiveAllowSpaces: k,
@@ -1105,7 +1091,7 @@ function _t({ pluginKey: e = gt, editor: t, char: n = "@", allowSpaces: r = !1,
1105
1091
  shouldKeepDismissed: j,
1106
1092
  pluginKey: e
1107
1093
  }),
1108
- props: lt({
1094
+ props: ct({
1109
1095
  pluginKey: e,
1110
1096
  decorationTag: s,
1111
1097
  decorationClass: c,
@@ -1116,18 +1102,18 @@ function _t({ pluginKey: e = gt, editor: t, char: n = "@", allowSpaces: r = !1,
1116
1102
  })
1117
1103
  });
1118
1104
  }
1119
- var vt = _t, yt = ["id"], bt = {
1105
+ var _t = gt, vt = ["id"], yt = {
1120
1106
  key: 0,
1121
1107
  class: "tpl:px-3 tpl:py-2 tpl:text-xs tpl:text-[var(--tpl-text-dim)]",
1122
1108
  "data-testid": "merge-tag-suggestion-empty"
1123
- }, xt = [
1109
+ }, bt = [
1124
1110
  "id",
1125
1111
  "aria-selected",
1126
1112
  "data-selected",
1127
1113
  "data-merge-tag-value",
1128
1114
  "onMousedown",
1129
1115
  "onMousemove"
1130
- ], St = { class: "tpl:font-medium" }, Ct = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, wt = /* @__PURE__ */ a({
1116
+ ], xt = { class: "tpl:font-medium" }, St = { class: "tpl:text-[var(--tpl-text-dim)] tpl:font-mono" }, Ct = /* @__PURE__ */ a({
1131
1117
  __name: "MergeTagSuggestionList",
1132
1118
  props: {
1133
1119
  items: {},
@@ -1146,7 +1132,7 @@ var vt = _t, yt = ["id"], bt = {
1146
1132
  class: "tpl:min-w-[200px] tpl:max-w-[320px] tpl:max-h-[50vh] tpl:overflow-y-auto tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:py-1 tpl:shadow-lg",
1147
1133
  role: "listbox",
1148
1134
  "data-testid": "merge-tag-suggestion-list"
1149
- }, [i.items.length === 0 ? (n(), s("div", bt, r(i.emptyText), 1)) : l("", !0), (n(!0), s(c, null, e(i.items, (e, c) => (n(), s("button", {
1135
+ }, [i.items.length === 0 ? (n(), s("div", yt, r(i.emptyText), 1)) : l("", !0), (n(!0), s(c, null, e(i.items, (e, c) => (n(), s("button", {
1150
1136
  key: e.value,
1151
1137
  id: u(c),
1152
1138
  type: "button",
@@ -1157,21 +1143,21 @@ var vt = _t, yt = ["id"], bt = {
1157
1143
  class: t(["tpl:flex tpl:w-full tpl:flex-col tpl:items-start tpl:gap-0.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors", c === i.selectedIndex ? "tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]" : "tpl:text-[var(--tpl-text)] hover:tpl:bg-[var(--tpl-bg-hover)]"]),
1158
1144
  onMousedown: d((t) => a.$emit("select", e), ["prevent", "stop"]),
1159
1145
  onMousemove: (e) => c !== i.selectedIndex && a.$emit("hover", c)
1160
- }, [o("span", St, r(e.label), 1), o("span", Ct, r(e.value), 1)], 42, xt))), 128))], 8, yt));
1146
+ }, [o("span", xt, r(e.label), 1), o("span", St, r(e.value), 1)], 42, bt))), 128))], 8, vt));
1161
1147
  }
1162
- }), Tt = 10, Et = 0;
1163
- function Dt(e, t) {
1148
+ }), wt = 10, Tt = 0;
1149
+ function Et(e, t) {
1164
1150
  let n = t.trim().toLowerCase();
1165
- return n === "" ? e.slice(0, Tt) : e.filter((e) => {
1151
+ return n === "" ? e.slice(0, wt) : e.filter((e) => {
1166
1152
  let t = e.label.toLowerCase(), r = e.value.toLowerCase();
1167
1153
  return t.includes(n) || r.includes(n);
1168
- }).slice(0, Tt);
1154
+ }).slice(0, wt);
1169
1155
  }
1170
- function Ot(e, t, n, r) {
1156
+ function Dt(e, t, n, r) {
1171
1157
  return t.length === 0 ? e.key === "Enter" || e.key === "Tab" : e.key === "ArrowDown" ? (n.value = (n.value + 1) % t.length, !0) : e.key === "ArrowUp" ? (n.value = (n.value - 1 + t.length) % t.length, !0) : e.key === "Enter" || e.key === "Tab" ? (r(t[n.value]), !0) : !1;
1172
1158
  }
1173
- function kt(e, t) {
1174
- let n = null, r = null, a = null, o = i([]), s = i(0), c = null, l = `tpl-merge-tag-suggestion-${++Et}`, d = null, p = [], m = null;
1159
+ function Ot(e, t) {
1160
+ let n = null, r = null, a = null, o = i([]), s = i(0), c = null, l = `tpl-merge-tag-suggestion-${++Tt}`, d = null, p = [], m = null;
1175
1161
  function h() {
1176
1162
  b(d?.() ?? null);
1177
1163
  }
@@ -1241,7 +1227,7 @@ function kt(e, t) {
1241
1227
  return {
1242
1228
  open: ({ items: i, getRect: p, anchorEl: m, onCommand: h }) => {
1243
1229
  o.value = i, s.value = 0, c = h, r = document.createElement("div"), r.setAttribute("data-testid", "merge-tag-suggestion-popup"), a = m, x(r, m), (t?.value ?? document.body).appendChild(r), n = f({ render() {
1244
- return u(wt, {
1230
+ return u(Ct, {
1245
1231
  items: o.value,
1246
1232
  selectedIndex: s.value,
1247
1233
  emptyText: e,
@@ -1257,7 +1243,7 @@ function kt(e, t) {
1257
1243
  o.value = e, s.value >= e.length && (s.value = 0), c = n, C(), d = t, g();
1258
1244
  },
1259
1245
  handleKeyDown: (e) => {
1260
- let t = Ot(e, o.value, s, w);
1246
+ let t = Dt(e, o.value, s, w);
1261
1247
  return t && C(), t;
1262
1248
  },
1263
1249
  close: () => {
@@ -1266,9 +1252,9 @@ function kt(e, t) {
1266
1252
  isOpen: () => r !== null
1267
1253
  };
1268
1254
  }
1269
- function At(e, t) {
1255
+ function kt(e, t) {
1270
1256
  return () => {
1271
- let n = kt(e, t);
1257
+ let n = Ot(e, t);
1272
1258
  return {
1273
1259
  onStart: (e) => {
1274
1260
  let t = e.editor.view?.dom;
@@ -1291,7 +1277,7 @@ function At(e, t) {
1291
1277
  };
1292
1278
  };
1293
1279
  }
1294
- var jt = h.create({
1280
+ var At = h.create({
1295
1281
  name: "mergeTagSuggestion",
1296
1282
  addOptions() {
1297
1283
  return {
@@ -1307,7 +1293,7 @@ var jt = h.create({
1307
1293
  allowSpaces: !1,
1308
1294
  startOfLine: !1,
1309
1295
  allowedPrefixes: null,
1310
- items: ({ query: t }) => Dt(e, t),
1296
+ items: ({ query: t }) => Et(e, t),
1311
1297
  command: ({ editor: e, range: t, props: n }) => {
1312
1298
  e.chain().focus().insertContentAt(t, {
1313
1299
  type: "mergeTagNode",
@@ -1317,13 +1303,13 @@ var jt = h.create({
1317
1303
  }
1318
1304
  }).run();
1319
1305
  },
1320
- render: At(t, n)
1306
+ render: kt(t, n)
1321
1307
  };
1322
- return [vt({
1308
+ return [_t({
1323
1309
  editor: this.editor,
1324
1310
  ...r
1325
1311
  })];
1326
1312
  }
1327
1313
  });
1328
1314
  //#endregion
1329
- export { Ot as i, kt as n, Dt as r, jt as t };
1315
+ export { Dt as i, Ot as n, Et as r, At as t };