flow-mindmap 0.5.7 → 0.5.8

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,7 +1,7 @@
1
1
  var Aa = Object.defineProperty;
2
2
  var _a = (e, n, t) => n in e ? Aa(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
3
  var qe = (e, n, t) => _a(e, typeof n != "symbol" ? n + "" : n, t);
4
- import { defineComponent as on, openBlock as v, createElementBlock as y, Fragment as ue, createElementVNode as c, createStaticVNode as Yt, createCommentVNode as V, ref as Y, reactive as yi, onMounted as ki, onBeforeUnmount as Hn, computed as ye, withModifiers as Se, normalizeStyle as Qe, createVNode as he, toDisplayString as xe, normalizeClass as $e, renderList as et, unref as we, Transition as Ho, withCtx as qt, renderSlot as lo, createBlock as Zo, nextTick as it, withDirectives as Bt, vModelText as tn, resolveComponent as Ca, vShow as ir, createTextVNode as _n, watch as Nt, withKeys as Wi } from "vue";
4
+ import { defineComponent as on, openBlock as v, createElementBlock as y, Fragment as ue, createElementVNode as c, createStaticVNode as Yt, createCommentVNode as V, ref as Y, reactive as yi, onMounted as xi, onBeforeUnmount as Hn, computed as ye, withModifiers as Se, normalizeStyle as Qe, createVNode as he, toDisplayString as ke, normalizeClass as $e, renderList as et, unref as we, Transition as Ho, withCtx as qt, renderSlot as lo, createBlock as Zo, nextTick as it, withDirectives as Bt, vModelText as tn, resolveComponent as Ca, vShow as ir, createTextVNode as _n, watch as Nt, withKeys as Wi } from "vue";
5
5
  const Ma = ["width", "height", "stroke-width"], Ra = {
6
6
  key: 4,
7
7
  points: "6 9 12 15 18 9"
@@ -316,7 +316,7 @@ function ls(e, n = 14) {
316
316
  function Pa(e, n = 14) {
317
317
  return Math.round(Ia[wo(e)] * n / 14);
318
318
  }
319
- const Ui = 60, Ba = 30, Ua = 0.75, xi = 14, en = 24;
319
+ const Ui = 60, Ba = 30, Ua = 0.75, ki = 14, en = 24;
320
320
  function tl(e) {
321
321
  return Math.max(Ba, Math.round(Ui * Math.pow(Ua, e)));
322
322
  }
@@ -351,13 +351,13 @@ function ja(e, n, t) {
351
351
  function Ka(e, n, t, i, r) {
352
352
  const a = wo(n), l = ls(n, t), f = Math.min(rr(e.text || "", l, or[a]), cr), u = Da(n, t), h = Math.ceil(f + u * 2 + La * 2), g = (e.text || "").split(`
353
353
  `);
354
- let x = 0;
354
+ let k = 0;
355
355
  for (const me of g) {
356
356
  const Me = rr(me, l, or[a]);
357
- x += Math.max(1, Math.ceil(Me / cr));
357
+ k += Math.max(1, Math.ceil(Me / cr));
358
358
  }
359
- x = Math.max(1, x);
360
- const B = !!(e.richContent && (e.richContent.kind === "code" || e.richContent.kind === "table")) ? Math.ceil(l * 1.2) + 6 + Math.ceil(l * 1.2 * (x - 1)) : Pa(n, t) + Math.ceil(l * 1.2 * (x - 1));
359
+ k = Math.max(1, k);
360
+ const B = !!(e.richContent && (e.richContent.kind === "code" || e.richContent.kind === "table")) ? Math.ceil(l * 1.2) + 6 + Math.ceil(l * 1.2 * (k - 1)) : Pa(n, t) + Math.ceil(l * 1.2 * (k - 1));
361
361
  let N = 0;
362
362
  if (e.link && (N += lr), e.note && (N += lr), N > 0) {
363
363
  const me = (e.link ? 1 : 0) + (e.note ? 1 : 0);
@@ -366,7 +366,7 @@ function Ka(e, n, t, i, r) {
366
366
  const W = 14, I = 2;
367
367
  let M = 0;
368
368
  e.markers && e.markers.length > 0 && (M = e.markers.length * W + (e.markers.length - 1) * I + ar);
369
- const k = 18, d = 4, T = e.tags && e.tags.length > 0 ? k : 0, H = h + N + M, X = (() => {
369
+ const x = 18, d = 4, T = e.tags && e.tags.length > 0 ? x : 0, H = h + N + M, X = (() => {
370
370
  const me = Math.round(Oa[a] * t / 14);
371
371
  if (e.richContent && (e.richContent.kind === "code" || e.richContent.kind === "table")) {
372
372
  const Me = r == null ? void 0 : r[e.id];
@@ -378,7 +378,7 @@ function Ka(e, n, t, i, r) {
378
378
  const me = Math.max(X, H), Me = Math.ceil(B + ve + fe + (T > 0 ? d + T : 0));
379
379
  return { w: me, h: Me };
380
380
  }
381
- const ke = ja(e.image.width, Fa, Wa), ne = Math.max(X, H, Math.ceil(ke + u * 2)), Te = Math.ceil(e.image.height + Ga + B + ve + fe + (T > 0 ? d + T : 0));
381
+ const xe = ja(e.image.width, Fa, Wa), ne = Math.max(X, H, Math.ceil(xe + u * 2)), Te = Math.ceil(e.image.height + Ga + B + ve + fe + (T > 0 ? d + T : 0));
382
382
  return { w: ne, h: Te };
383
383
  }
384
384
  function Ya(e, n = {}) {
@@ -391,17 +391,17 @@ function qa(e, n, t = !1) {
391
391
  if (i.length !== 0) if (i.length === 1)
392
392
  i[0]._dir = "right", i[0].side = 1, i[0]._dirRight = 1;
393
393
  else {
394
- const f = i.reduce((x, C) => x + C._subtreeH, 0);
394
+ const f = i.reduce((k, C) => k + C._subtreeH, 0);
395
395
  let u = 1, h = Math.abs(i[0]._subtreeH - (f - i[0]._subtreeH)), g = 0;
396
- for (let x = 0; x < i.length - 1; x++) {
397
- g += i[x]._subtreeH;
396
+ for (let k = 0; k < i.length - 1; k++) {
397
+ g += i[k]._subtreeH;
398
398
  const C = Math.abs(g - (f - g));
399
- C < h && (h = C, u = x + 1);
399
+ C < h && (h = C, u = k + 1);
400
400
  }
401
- for (let x = 0; x < u; x++)
402
- i[x]._dir = "right", i[x].side = 1, i[x]._dirRight = 1;
403
- for (let x = u; x < i.length; x++)
404
- i[x]._dir = "left", i[x].side = -1, i[x]._dirRight = -1;
401
+ for (let k = 0; k < u; k++)
402
+ i[k]._dir = "right", i[k].side = 1, i[k]._dirRight = 1;
403
+ for (let k = u; k < i.length; k++)
404
+ i[k]._dir = "left", i[k].side = -1, i[k]._dirRight = -1;
405
405
  }
406
406
  const r = e.children.filter((f) => f.side === 1), a = e.children.filter((f) => f.side === -1), l = (f, u) => {
407
407
  const h = u === "right" ? 1 : -1;
@@ -433,25 +433,25 @@ function qa(e, n, t = !1) {
433
433
  function go(e, n, t, i, r = !1) {
434
434
  if (e.children.length === 0) return;
435
435
  const a = e.children.reduce(
436
- (g, x, C) => g + x._subtreeH + (C > 0 ? xi : 0),
436
+ (g, k, C) => g + k._subtreeH + (C > 0 ? ki : 0),
437
437
  0
438
438
  ), l = n === "right" ? 1 : -1, f = i ? l : 1;
439
439
  let u = e.y - f * a / 2;
440
440
  const h = tl(e.depth);
441
441
  e.children.forEach((g) => {
442
- r || (g.x = e.x + l * (e.width / 2 + h + g.width / 2), g.y = u + f * g._subtreeH / 2), g._dir = n, u += f * (g._subtreeH + xi), go(g, n, t, !1, r);
442
+ r || (g.x = e.x + l * (e.width / 2 + h + g.width / 2), g.y = u + f * g._subtreeH / 2), g._dir = n, u += f * (g._subtreeH + ki), go(g, n, t, !1, r);
443
443
  });
444
444
  }
445
445
  function nl(e, n, t = !1) {
446
446
  if (e.children.length === 0) return;
447
447
  const i = e.children.reduce(
448
- (l, f, u) => l + f._subtreeW + (u > 0 ? xi * 2 : 0),
448
+ (l, f, u) => l + f._subtreeW + (u > 0 ? ki * 2 : 0),
449
449
  0
450
450
  );
451
451
  let r = e.x - i / 2;
452
452
  const a = tl(e.depth);
453
453
  e.children.forEach((l) => {
454
- t || (l.x = r + l._subtreeW / 2, l.y = e.y + e.height / 2 + a + l.height / 2), l._dir = "down", r += l._subtreeW + xi * 2, nl(l, n, t);
454
+ t || (l.x = r + l._subtreeW / 2, l.y = e.y + e.height / 2 + a + l.height / 2), l._dir = "down", r += l._subtreeW + ki * 2, nl(l, n, t);
455
455
  });
456
456
  }
457
457
  function il(e, n, t, i, r, a, l, f) {
@@ -484,9 +484,9 @@ function il(e, n, t, i, r, a, l, f) {
484
484
  parent: t
485
485
  };
486
486
  if (e.collapsed) return h;
487
- const g = e.children.length, x = Math.ceil(g / 2);
487
+ const g = e.children.length, k = Math.ceil(g / 2);
488
488
  return h.children = e.children.map((C, B) => {
489
- const N = n === 0 ? B < x ? 1 : -1 : i;
489
+ const N = n === 0 ? B < k ? 1 : -1 : i;
490
490
  return il(C, n + 1, h, N, r, a, l, f);
491
491
  }), h;
492
492
  }
@@ -505,15 +505,15 @@ function Xa(e) {
505
505
  let r = 0, a = 0;
506
506
  for (const l of i.children)
507
507
  r += l._subtreeH, a += l._subtreeW;
508
- i.children.length > 1 && (r += xi * (i.children.length - 1), a += xi * 2 * (i.children.length - 1)), i._subtreeH = Math.max(i.height, r), i._subtreeW = Math.max(i.width, a);
508
+ i.children.length > 1 && (r += ki * (i.children.length - 1), a += ki * 2 * (i.children.length - 1)), i._subtreeH = Math.max(i.height, r), i._subtreeW = Math.max(i.width, a);
509
509
  }
510
510
  }
511
511
  function Va(e, n = !1) {
512
512
  const t = [e];
513
513
  let i = 1 / 0, r = -1 / 0, a = 1 / 0, l = -1 / 0;
514
514
  for (; t.length; ) {
515
- const h = t.pop(), g = h.width / 2, x = h.height / 2;
516
- h.x - g < i && (i = h.x - g), h.x + g > r && (r = h.x + g), h.y - x < a && (a = h.y - x), h.y + x > l && (l = h.y + x), t.push(...h.children);
515
+ const h = t.pop(), g = h.width / 2, k = h.height / 2;
516
+ h.x - g < i && (i = h.x - g), h.x + g > r && (r = h.x + g), h.y - k < a && (a = h.y - k), h.y + k > l && (l = h.y + k), t.push(...h.children);
517
517
  }
518
518
  if (n)
519
519
  return {
@@ -732,10 +732,10 @@ function Ae(e, n) {
732
732
  }
733
733
  return null;
734
734
  }
735
- function kn(e, n, t = null) {
735
+ function xn(e, n, t = null) {
736
736
  if (e.id === n) return t;
737
737
  for (const i of e.children) {
738
- const r = kn(i, n, e);
738
+ const r = xn(i, n, e);
739
739
  if (r !== null) return r;
740
740
  }
741
741
  return null;
@@ -753,15 +753,15 @@ function nc(e, n, t) {
753
753
  return !i || i.text === t ? !1 : (i.text = t, !0);
754
754
  }
755
755
  function ic(e, n, t, i) {
756
- if (!kn(e, n) || n === t || Ae(Ae(e, n), t)) return !1;
757
- const r = kn(e, n), a = r.children.findIndex((h) => h.id === n);
756
+ if (!xn(e, n) || n === t || Ae(Ae(e, n), t)) return !1;
757
+ const r = xn(e, n), a = r.children.findIndex((h) => h.id === n);
758
758
  if (a < 0) return !1;
759
759
  const [l] = r.children.splice(a, 1);
760
760
  if (i === "child") {
761
761
  const h = Ae(e, t);
762
762
  return h ? (h.children.push(l), !0) : (r.children.splice(a, 0, l), !1);
763
763
  }
764
- const f = kn(e, t);
764
+ const f = xn(e, t);
765
765
  if (!f)
766
766
  return r.children.splice(a, 0, l), !1;
767
767
  let u = f.children.findIndex((h) => h.id === t);
@@ -788,7 +788,7 @@ function oc(e, n, t) {
788
788
  return i.children.push(r), r;
789
789
  }
790
790
  function sc(e, n, t) {
791
- const i = kn(e, n);
791
+ const i = xn(e, n);
792
792
  if (!i) return null;
793
793
  const r = i.children.findIndex((l) => l.id === n);
794
794
  if (r < 0) return null;
@@ -796,7 +796,7 @@ function sc(e, n, t) {
796
796
  return i.children.splice(r + 1, 0, a), a;
797
797
  }
798
798
  function rc(e, n, t) {
799
- const i = kn(e, n);
799
+ const i = xn(e, n);
800
800
  if (!i) return null;
801
801
  const r = i.children.findIndex((l) => l.id === n);
802
802
  if (r < 0) return null;
@@ -804,7 +804,7 @@ function rc(e, n, t) {
804
804
  return i.children.splice(r, 0, a), a;
805
805
  }
806
806
  function lc(e, n) {
807
- const t = kn(e, n);
807
+ const t = xn(e, n);
808
808
  if (!t) return null;
809
809
  const i = t.children.findIndex((l) => l.id === n);
810
810
  if (i < 0) return null;
@@ -824,7 +824,7 @@ function ur(e, n) {
824
824
  const mo = "新节点";
825
825
  function Gi(e, n = "导入的导图") {
826
826
  const t = e.split(/\r?\n/), i = { id: Cn(), text: n, children: [] }, r = [i], a = [-1 / 0], l = [], f = /^(#{1,6})\s+(.+?)\s*#*\s*$/, u = /^!\[([^\]]*)\]\((\S+?)(?:\s+"[^"]*")?\)\s*$/, h = /^\[([^\]]+)\]\((\S+?)(?:\s+"[^"]*")?\)\s*$/, g = /^(`{3,}|~{3,})\s*(\S+)?\s*$/;
827
- let x = !1, C = [], B = null;
827
+ let k = !1, C = [], B = null;
828
828
  function N(M) {
829
829
  C.push(M);
830
830
  }
@@ -836,10 +836,10 @@ function Gi(e, n = "导入的导图") {
836
836
  `);
837
837
  M && (B.note = { text: M });
838
838
  }
839
- x = !1, C = [];
839
+ k = !1, C = [];
840
840
  }
841
841
  for (const M of t) {
842
- if (x) {
842
+ if (k) {
843
843
  const X = M.match(g);
844
844
  if (X && X[1][0] === "`") {
845
845
  W();
@@ -848,15 +848,15 @@ function Gi(e, n = "导入的导图") {
848
848
  N(M);
849
849
  continue;
850
850
  }
851
- const k = M.match(f);
852
- if (k) {
853
- const X = k[1].length, Q = k[2].trim();
851
+ const x = M.match(f);
852
+ if (x) {
853
+ const X = x[1].length, Q = x[2].trim();
854
854
  l.push({ level: X, text: Q, body: "" }), B = l[l.length - 1];
855
855
  continue;
856
856
  }
857
857
  const d = M.match(g);
858
858
  if (d && d[2] === "note") {
859
- x = !0, C = [];
859
+ k = !0, C = [];
860
860
  continue;
861
861
  }
862
862
  const T = M.match(u);
@@ -876,15 +876,15 @@ function Gi(e, n = "导入的导图") {
876
876
  ` + X : X;
877
877
  }
878
878
  }
879
- x && W();
879
+ k && W();
880
880
  function I(M) {
881
881
  for (; r.length > 1; ) {
882
882
  const H = r.length - 1, X = a[H];
883
883
  if (X !== void 0 && X < M.level) break;
884
884
  r.pop(), a.pop();
885
885
  }
886
- const k = r[r.length - 1], d = M.text, T = { id: Cn(), text: d, children: [] };
887
- M.image && (T.image = { ...M.image }), M.link && (T.link = { url: M.link.url }), M.note && (T.note = { text: M.note.text }), M.body && (T.note = { text: M.body }), k.children.push(T), r.push(T), a.push(M.level);
886
+ const x = r[r.length - 1], d = M.text, T = { id: Cn(), text: d, children: [] };
887
+ M.image && (T.image = { ...M.image }), M.link && (T.link = { url: M.link.url }), M.note && (T.note = { text: M.note.text }), M.body && (T.note = { text: M.body }), x.children.push(T), r.push(T), a.push(M.level);
888
888
  }
889
889
  for (const M of l) I(M);
890
890
  if (l.length > 0 && l[0].level === 1) {
@@ -909,9 +909,9 @@ function ac(e) {
909
909
  let i = 0;
910
910
  const r = /^(#{1,6})\s+(.+?)\s*#*\s*$/, a = /^(`{3,}|~{3,})\s*(\S+)?\s*$/, l = /^\s*\|?\s*(:?-+:?\s*\|\s*)+(:?-+:?)(\s*\|)?\s*$/, f = /^(\s*)[-*+]\s+(.*)$/, u = /^(\s*)\d+\.\s+(.*)$/;
911
911
  for (; i < n.length; ) {
912
- const x = n[i], C = x.match(a);
912
+ const k = n[i], C = k.match(a);
913
913
  if (C) {
914
- const d = C[1][0], T = C[2] || "", H = [x];
914
+ const d = C[1][0], T = C[2] || "", H = [k];
915
915
  for (i++; i < n.length; ) {
916
916
  const Q = n[i].match(a);
917
917
  if (Q && Q[1][0] === d) {
@@ -932,12 +932,12 @@ function ac(e) {
932
932
  });
933
933
  continue;
934
934
  }
935
- const B = x.match(r);
935
+ const B = k.match(r);
936
936
  if (B) {
937
- t.push({ kind: "heading", level: B[1].length, text: B[2].trim(), raw: x }), i++;
937
+ t.push({ kind: "heading", level: B[1].length, text: B[2].trim(), raw: k }), i++;
938
938
  continue;
939
939
  }
940
- if (/^\s*\|/.test(x)) {
940
+ if (/^\s*\|/.test(k)) {
941
941
  const d = [];
942
942
  let T = i, H = !1;
943
943
  for (; T < n.length && /^\s*\|/.test(n[T]); )
@@ -952,7 +952,7 @@ function ac(e) {
952
952
  continue;
953
953
  }
954
954
  }
955
- const N = x.match(f), W = x.match(u);
955
+ const N = k.match(f), W = k.match(u);
956
956
  if (N || W) {
957
957
  let d = i;
958
958
  for (; d < n.length; ) {
@@ -968,21 +968,21 @@ function ac(e) {
968
968
  i = d;
969
969
  continue;
970
970
  }
971
- if (x.trim() === "") {
971
+ if (k.trim() === "") {
972
972
  i++;
973
973
  continue;
974
974
  }
975
- const I = [x];
975
+ const I = [k];
976
976
  let M = i + 1;
977
977
  for (; M < n.length; ) {
978
978
  const d = n[M];
979
979
  if (d.trim() === "" || r.test(d) || a.test(d) || f.test(d) || u.test(d) || /^\s*\|/.test(d)) break;
980
980
  I.push(d), M++;
981
981
  }
982
- const k = I.join(" ").trim();
982
+ const x = I.join(" ").trim();
983
983
  t.push({
984
984
  kind: "paragraph",
985
- text: k.slice(0, 80) || "(空段落)",
985
+ text: x.slice(0, 80) || "(空段落)",
986
986
  raw: I.join(`
987
987
  `)
988
988
  }), i = M;
@@ -1001,8 +1001,8 @@ function Em(e, n = "导入的导图") {
1001
1001
  l = !0, i.text = u.text, a[0] = 1;
1002
1002
  return;
1003
1003
  }
1004
- const x = { id: Cn(), text: u.text, children: [] };
1005
- r[r.length - 1].children.push(x), r.push(x), a.push(g);
1004
+ const k = { id: Cn(), text: u.text, children: [] };
1005
+ r[r.length - 1].children.push(k), r.push(k), a.push(g);
1006
1006
  return;
1007
1007
  }
1008
1008
  const h = {
@@ -1026,7 +1026,7 @@ function cc(e) {
1026
1026
  y: 0,
1027
1027
  ox: 0,
1028
1028
  oy: 0
1029
- }), g = Y(!1), x = yi({ x: 0, y: 0 }), C = yi({
1029
+ }), g = Y(!1), k = yi({ x: 0, y: 0 }), C = yi({
1030
1030
  x: 0,
1031
1031
  y: 0,
1032
1032
  width: 0,
@@ -1046,7 +1046,7 @@ function cc(e) {
1046
1046
  function M() {
1047
1047
  r.value = Math.min(t, r.value * i);
1048
1048
  }
1049
- function k() {
1049
+ function x() {
1050
1050
  r.value = Math.max(n, r.value / i);
1051
1051
  }
1052
1052
  function d(ne) {
@@ -1062,11 +1062,11 @@ function cc(e) {
1062
1062
  f.value = !1, window.removeEventListener("mousemove", T), window.removeEventListener("mouseup", H);
1063
1063
  }
1064
1064
  function X(ne, Te, me) {
1065
- g.value = !0, x.x = ne, x.y = Te, C.x = ne, C.y = Te, C.width = 0, C.height = 0, C.shiftKey = !!(me != null && me.shift), B.value++, window.addEventListener("mousemove", fe), window.addEventListener("mouseup", E);
1065
+ g.value = !0, k.x = ne, k.y = Te, C.x = ne, C.y = Te, C.width = 0, C.height = 0, C.shiftKey = !!(me != null && me.shift), B.value++, window.addEventListener("mousemove", fe), window.addEventListener("mouseup", E);
1066
1066
  }
1067
1067
  function Q(ne, Te) {
1068
1068
  if (!g.value) return;
1069
- const me = Math.min(x.x, ne), Me = Math.min(x.y, Te), b = Math.max(x.x, ne), P = Math.max(x.y, Te);
1069
+ const me = Math.min(k.x, ne), Me = Math.min(k.y, Te), b = Math.max(k.x, ne), P = Math.max(k.y, Te);
1070
1070
  C.x = me, C.y = Me, C.width = b - me, C.height = P - Me, B.value++;
1071
1071
  }
1072
1072
  function E() {
@@ -1085,7 +1085,7 @@ function cc(e) {
1085
1085
  const P = b.getBoundingClientRect(), q = (P.width - Me * 2) / ne, oe = (P.height - Me * 2) / Te, _e = Math.min(1, Math.max(0.3, Math.min(q, oe)));
1086
1086
  r.value = _e, a.value = P.width / 2, l.value = P.height / 2 - me * _e;
1087
1087
  }
1088
- function ke(ne, Te, me, Me, b = 80) {
1088
+ function xe(ne, Te, me, Me, b = 80) {
1089
1089
  const P = e.getContainer();
1090
1090
  if (!P) return;
1091
1091
  const q = P.getBoundingClientRect();
@@ -1100,7 +1100,7 @@ function cc(e) {
1100
1100
  panMoved: u,
1101
1101
  onWheel: I,
1102
1102
  zoomIn: M,
1103
- zoomOut: k,
1103
+ zoomOut: x,
1104
1104
  startPan: d,
1105
1105
  startMarquee: X,
1106
1106
  updateMarquee: Q,
@@ -1109,7 +1109,7 @@ function cc(e) {
1109
1109
  marqueeVersion: B,
1110
1110
  setOnMarqueeEnd: W,
1111
1111
  resetView: ve,
1112
- centerOn: ke
1112
+ centerOn: xe
1113
1113
  };
1114
1114
  }
1115
1115
  const uc = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform);
@@ -1181,7 +1181,7 @@ function dc(e) {
1181
1181
  else (i.key === "Delete" || i.key === "Backspace") && a && a !== ((h = e.defaultTargetId) == null ? void 0 : h.call(e)) ? (i.preventDefault(), e.onRemove(a)) : i.key === "F2" && a ? (i.preventDefault(), e.onStartEdit(a)) : i.key === "Escape" ? (i.preventDefault(), e.onClearSelection()) : i.key === "ArrowDown" ? (i.preventDefault(), e.onNavigate(0, 1)) : i.key === "ArrowUp" ? (i.preventDefault(), e.onNavigate(0, -1)) : i.key === "ArrowRight" ? (i.preventDefault(), e.onNavigate(1, 0)) : i.key === "ArrowLeft" && (i.preventDefault(), e.onNavigate(-1, 0));
1182
1182
  }
1183
1183
  }
1184
- ki(() => {
1184
+ xi(() => {
1185
1185
  window.addEventListener("keydown", t);
1186
1186
  }), Hn(() => {
1187
1187
  window.removeEventListener("keydown", t);
@@ -1292,7 +1292,7 @@ const mc = {
1292
1292
  svg: '<path d="M12 2 L14.5 8.5 L21 9 L16 13.5 L17.5 20 L12 16.5 L6.5 20 L8 13.5 L3 9 L9.5 8.5 Z" fill="#e2e8f0" stroke="#f59e0b" stroke-width="1.5" stroke-linejoin="round"/><path d="M12 2 L12 16.5 L6.5 20 L8 13.5 L3 9 L9.5 8.5 Z" fill="#f59e0b" stroke="none"/>'
1293
1293
  }
1294
1294
  ]
1295
- }, kc = {
1295
+ }, xc = {
1296
1296
  label: "其他",
1297
1297
  markers: [
1298
1298
  {
@@ -1331,7 +1331,7 @@ const mc = {
1331
1331
  mc,
1332
1332
  vc,
1333
1333
  yc,
1334
- kc
1334
+ xc
1335
1335
  ], So = {};
1336
1336
  for (const e of sl)
1337
1337
  for (const n of e.markers)
@@ -1343,7 +1343,7 @@ function Qo(e) {
1343
1343
  var n;
1344
1344
  return ((n = So[e]) == null ? void 0 : n.svg) ?? "";
1345
1345
  }
1346
- function xc(e) {
1346
+ function kc(e) {
1347
1347
  var n;
1348
1348
  return ((n = So[e]) == null ? void 0 : n.label) ?? e;
1349
1349
  }
@@ -1378,28 +1378,28 @@ const wc = {
1378
1378
  emits: ["pickImage", "setLink", "removeLink", "editNote", "removeNote", "removeImage", "addCode", "editCode", "removeCode", "addTable", "editTable", "removeTable", "toggleMarker", "clearMarkers", "addTag", "removeTags", "close"],
1379
1379
  setup(e, { emit: n }) {
1380
1380
  const t = e, i = n, r = ye(() => {
1381
- let k = t.x + 2, d = t.y + 2;
1381
+ let x = t.x + 2, d = t.y + 2;
1382
1382
  if (t.container) {
1383
1383
  const T = t.container.getBoundingClientRect(), H = 180, Q = 4 + (3 + (t.hasImage ? 1 : 0) + (t.hasLink ? 1 : 0) + (t.hasNote ? 1 : 0) + 1 + (t.hasCode ? 1 : 0) + 1 + (t.hasTable ? 1 : 0)) * 28;
1384
- k + H > T.right && (k = Math.max(T.left + 4, t.x - H - 2)), d + Q > T.bottom && (d = Math.max(T.top + 4, t.y - Q - 2)), k < T.left + 2 && (k = T.left + 2), d < T.top + 2 && (d = T.top + 2);
1384
+ x + H > T.right && (x = Math.max(T.left + 4, t.x - H - 2)), d + Q > T.bottom && (d = Math.max(T.top + 4, t.y - Q - 2)), x < T.left + 2 && (x = T.left + 2), d < T.top + 2 && (d = T.top + 2);
1385
1385
  }
1386
- return { left: k, top: d };
1386
+ return { left: x, top: d };
1387
1387
  }), a = ye(() => t.hasImage), l = ye(() => t.hasLink), f = ye(() => t.hasNote), u = ye(() => t.nodeMarkers.length > 0), h = ye(() => t.nodeTags.length > 0), g = Y(!1);
1388
- function x() {
1388
+ function k() {
1389
1389
  g.value = !g.value;
1390
1390
  }
1391
- function C(k) {
1392
- return t.nodeMarkers.includes(k);
1391
+ function C(x) {
1392
+ return t.nodeMarkers.includes(x);
1393
1393
  }
1394
- function B(k) {
1395
- i("toggleMarker", k);
1394
+ function B(x) {
1395
+ i("toggleMarker", x);
1396
1396
  }
1397
- function N(k) {
1398
- const d = k.target;
1397
+ function N(x) {
1398
+ const d = x.target;
1399
1399
  d && d.closest(".zm-node-menu") || i("close");
1400
1400
  }
1401
- function W(k) {
1402
- k.key === "Escape" && i("close");
1401
+ function W(x) {
1402
+ x.key === "Escape" && i("close");
1403
1403
  }
1404
1404
  function I() {
1405
1405
  i("close");
@@ -1407,10 +1407,10 @@ const wc = {
1407
1407
  window.addEventListener("mousedown", N, !0), window.addEventListener("keydown", W, !0), window.addEventListener("wheel", I, !0), window.addEventListener("scroll", I, !0), Hn(() => {
1408
1408
  window.removeEventListener("mousedown", N, !0), window.removeEventListener("keydown", W, !0), window.removeEventListener("wheel", I, !0), window.removeEventListener("scroll", I, !0);
1409
1409
  });
1410
- function M(k) {
1411
- k(), i("close");
1410
+ function M(x) {
1411
+ x(), i("close");
1412
1412
  }
1413
- return (k, d) => (v(), y("div", {
1413
+ return (x, d) => (v(), y("div", {
1414
1414
  class: "zm-node-menu",
1415
1415
  style: Qe({ left: r.value.left + "px", top: r.value.top + "px" }),
1416
1416
  onContextmenu: d[13] || (d[13] = Se(() => {
@@ -1424,7 +1424,7 @@ const wc = {
1424
1424
  name: "image",
1425
1425
  size: 13
1426
1426
  }),
1427
- c("span", null, xe(a.value ? "替换图片" : "添加图片"), 1)
1427
+ c("span", null, ke(a.value ? "替换图片" : "添加图片"), 1)
1428
1428
  ]),
1429
1429
  a.value ? (v(), y("button", {
1430
1430
  key: 0,
@@ -1445,7 +1445,7 @@ const wc = {
1445
1445
  name: "link",
1446
1446
  size: 13
1447
1447
  }),
1448
- c("span", null, xe(l.value ? "编辑链接" : "添加链接"), 1)
1448
+ c("span", null, ke(l.value ? "编辑链接" : "添加链接"), 1)
1449
1449
  ]),
1450
1450
  l.value ? (v(), y("button", {
1451
1451
  key: 1,
@@ -1466,7 +1466,7 @@ const wc = {
1466
1466
  class: "zm-node-menu-icon zm-node-menu-icon-code",
1467
1467
  "aria-hidden": "true"
1468
1468
  }, "{ }", -1)),
1469
- c("span", null, xe(e.hasCode ? "编辑代码块" : "添加代码块"), 1)
1469
+ c("span", null, ke(e.hasCode ? "编辑代码块" : "添加代码块"), 1)
1470
1470
  ]),
1471
1471
  e.hasCode ? (v(), y("button", {
1472
1472
  key: 2,
@@ -1487,7 +1487,7 @@ const wc = {
1487
1487
  class: "zm-node-menu-icon zm-node-menu-icon-table",
1488
1488
  "aria-hidden": "true"
1489
1489
  }, "▦", -1)),
1490
- c("span", null, xe(e.hasTable ? "编辑表格" : "添加表格"), 1)
1490
+ c("span", null, ke(e.hasTable ? "编辑表格" : "添加表格"), 1)
1491
1491
  ]),
1492
1492
  e.hasTable ? (v(), y("button", {
1493
1493
  key: 3,
@@ -1508,7 +1508,7 @@ const wc = {
1508
1508
  name: "note",
1509
1509
  size: 13
1510
1510
  }),
1511
- c("span", null, xe(f.value ? "编辑笔记" : "添加笔记"), 1)
1511
+ c("span", null, ke(f.value ? "编辑笔记" : "添加笔记"), 1)
1512
1512
  ]),
1513
1513
  f.value ? (v(), y("button", {
1514
1514
  key: 4,
@@ -1524,7 +1524,7 @@ const wc = {
1524
1524
  d[25] || (d[25] = c("div", { class: "zm-node-menu-divider" }, null, -1)),
1525
1525
  c("button", {
1526
1526
  class: "zm-node-menu-item",
1527
- onClick: Se(x, ["stop"])
1527
+ onClick: Se(k, ["stop"])
1528
1528
  }, [
1529
1529
  d[21] || (d[21] = c("span", {
1530
1530
  class: "zm-node-menu-icon",
@@ -1540,7 +1540,7 @@ const wc = {
1540
1540
  key: T.label,
1541
1541
  class: "zm-marker-group"
1542
1542
  }, [
1543
- c("div", Ec, xe(T.label), 1),
1543
+ c("div", Ec, ke(T.label), 1),
1544
1544
  c("div", Sc, [
1545
1545
  (v(!0), y(ue, null, et(T.markers, (H) => (v(), y("button", {
1546
1546
  key: H.id,
@@ -1565,7 +1565,7 @@ const wc = {
1565
1565
  class: "zm-node-menu-icon",
1566
1566
  "aria-hidden": "true"
1567
1567
  }, "#", -1)),
1568
- c("span", null, xe(h.value ? "编辑标签" : "添加标签"), 1)
1568
+ c("span", null, ke(h.value ? "编辑标签" : "添加标签"), 1)
1569
1569
  ]),
1570
1570
  h.value ? (v(), y("button", {
1571
1571
  key: 6,
@@ -1590,23 +1590,23 @@ const wc = {
1590
1590
  emits: ["openSettings", "openData", "openImport", "exportPng", "exportSvg", "close"],
1591
1591
  setup(e, { emit: n }) {
1592
1592
  const t = e, i = n, r = ye(() => {
1593
- let M = t.x + 2, k = t.y + 2;
1593
+ let M = t.x + 2, x = t.y + 2;
1594
1594
  if (t.container) {
1595
1595
  const d = t.container.getBoundingClientRect(), T = 160, H = 4 + 4 * 28 + 5;
1596
- M + T > d.right && (M = Math.max(d.left + 4, t.x - T - 2)), k + H > d.bottom && (k = Math.max(d.top + 4, t.y - H - 2)), M < d.left + 2 && (M = d.left + 2), k < d.top + 2 && (k = d.top + 2);
1596
+ M + T > d.right && (M = Math.max(d.left + 4, t.x - T - 2)), x + H > d.bottom && (x = Math.max(d.top + 4, t.y - H - 2)), M < d.left + 2 && (M = d.left + 2), x < d.top + 2 && (x = d.top + 2);
1597
1597
  }
1598
- return { left: M, top: k };
1598
+ return { left: M, top: x };
1599
1599
  }), a = Y(null), l = Y(null), f = Y(null), u = ye(() => {
1600
1600
  const M = a.value === "import" ? l.value : a.value === "export" ? f.value : null;
1601
1601
  if (!M) return { left: "-9999px", top: "-9999px", display: "none" };
1602
- const k = M.getBoundingClientRect(), d = window.innerWidth, T = window.innerHeight, H = 176, X = 4 + 3 * 28;
1603
- let Q = k.right;
1604
- Q + H > d - 4 && (Q = Math.max(4, k.left - H));
1605
- let E = k.top - 4;
1602
+ const x = M.getBoundingClientRect(), d = window.innerWidth, T = window.innerHeight, H = 176, X = 4 + 3 * 28;
1603
+ let Q = x.right;
1604
+ Q + H > d - 4 && (Q = Math.max(4, x.left - H));
1605
+ let E = x.top - 4;
1606
1606
  return E + X > T - 4 && (E = Math.max(4, T - X - 4)), { left: Q + "px", top: E + "px", display: "block" };
1607
1607
  });
1608
1608
  let h = null, g = null;
1609
- function x(M) {
1609
+ function k(M) {
1610
1610
  g && (clearTimeout(g), g = null), h = setTimeout(() => {
1611
1611
  a.value = M;
1612
1612
  }, 60);
@@ -1620,8 +1620,8 @@ const wc = {
1620
1620
  h && clearTimeout(h), g && clearTimeout(g);
1621
1621
  });
1622
1622
  function B(M) {
1623
- const k = M.target;
1624
- k && k.closest(".zm-canvas-menu") || i("close");
1623
+ const x = M.target;
1624
+ x && x.closest(".zm-canvas-menu") || i("close");
1625
1625
  }
1626
1626
  function N(M) {
1627
1627
  M.key === "Escape" && i("close");
@@ -1635,28 +1635,28 @@ const wc = {
1635
1635
  function I(M) {
1636
1636
  M(), i("close");
1637
1637
  }
1638
- return (M, k) => (v(), y("div", {
1638
+ return (M, x) => (v(), y("div", {
1639
1639
  class: "zm-canvas-menu",
1640
1640
  style: Qe({ left: r.value.left + "px", top: r.value.top + "px" }),
1641
- onContextmenu: k[11] || (k[11] = Se(() => {
1641
+ onContextmenu: x[11] || (x[11] = Se(() => {
1642
1642
  }, ["prevent"]))
1643
1643
  }, [
1644
1644
  c("button", {
1645
1645
  class: "zm-canvas-menu-item",
1646
- onClick: k[0] || (k[0] = Se((d) => I(() => i("openData")), ["stop"]))
1646
+ onClick: x[0] || (x[0] = Se((d) => I(() => i("openData")), ["stop"]))
1647
1647
  }, [
1648
1648
  he(He, {
1649
1649
  name: "database",
1650
1650
  size: 13,
1651
1651
  stroke: 1.6
1652
1652
  }),
1653
- k[12] || (k[12] = c("span", null, "查看数据", -1))
1653
+ x[12] || (x[12] = c("span", null, "查看数据", -1))
1654
1654
  ]),
1655
1655
  c("div", {
1656
1656
  ref_key: "importItemRef",
1657
1657
  ref: l,
1658
1658
  class: $e(["zm-canvas-menu-item zm-canvas-menu-item-has-submenu", { "is-open": a.value === "import" }]),
1659
- onMouseenter: k[5] || (k[5] = (d) => x("import")),
1659
+ onMouseenter: x[5] || (x[5] = (d) => k("import")),
1660
1660
  onMouseleave: C
1661
1661
  }, [
1662
1662
  he(He, {
@@ -1664,8 +1664,8 @@ const wc = {
1664
1664
  size: 13,
1665
1665
  stroke: 1.6
1666
1666
  }),
1667
- k[16] || (k[16] = c("span", null, "导入", -1)),
1668
- k[17] || (k[17] = c("svg", {
1667
+ x[16] || (x[16] = c("span", null, "导入", -1)),
1668
+ x[17] || (x[17] = c("svg", {
1669
1669
  class: "zm-canvas-menu-caret",
1670
1670
  width: "8",
1671
1671
  height: "8",
@@ -1683,61 +1683,61 @@ const wc = {
1683
1683
  key: 0,
1684
1684
  class: "zm-canvas-submenu",
1685
1685
  style: Qe(u.value),
1686
- onMouseenter: k[4] || (k[4] = (d) => x("import")),
1686
+ onMouseenter: x[4] || (x[4] = (d) => k("import")),
1687
1687
  onMouseleave: C
1688
1688
  }, [
1689
1689
  c("button", {
1690
1690
  class: "zm-canvas-menu-item",
1691
- onClick: k[1] || (k[1] = Se((d) => I(() => i("openImport", "markdown")), ["stop"]))
1691
+ onClick: x[1] || (x[1] = Se((d) => I(() => i("openImport", "markdown")), ["stop"]))
1692
1692
  }, [
1693
1693
  he(He, {
1694
1694
  name: "markdown",
1695
1695
  size: 13,
1696
1696
  stroke: 1.6
1697
1697
  }),
1698
- k[13] || (k[13] = c("span", null, "Markdown 导入", -1))
1698
+ x[13] || (x[13] = c("span", null, "Markdown 导入", -1))
1699
1699
  ]),
1700
1700
  c("button", {
1701
1701
  class: "zm-canvas-menu-item",
1702
- onClick: k[2] || (k[2] = Se((d) => I(() => i("openImport", "json")), ["stop"]))
1702
+ onClick: x[2] || (x[2] = Se((d) => I(() => i("openImport", "json")), ["stop"]))
1703
1703
  }, [
1704
1704
  he(He, {
1705
1705
  name: "json",
1706
1706
  size: 13,
1707
1707
  stroke: 1.6
1708
1708
  }),
1709
- k[14] || (k[14] = c("span", null, "JSON 文件导入", -1))
1709
+ x[14] || (x[14] = c("span", null, "JSON 文件导入", -1))
1710
1710
  ]),
1711
1711
  c("button", {
1712
1712
  class: "zm-canvas-menu-item",
1713
- onClick: k[3] || (k[3] = Se((d) => I(() => i("openImport", "txt")), ["stop"]))
1713
+ onClick: x[3] || (x[3] = Se((d) => I(() => i("openImport", "txt")), ["stop"]))
1714
1714
  }, [
1715
1715
  he(He, {
1716
1716
  name: "txt",
1717
1717
  size: 13,
1718
1718
  stroke: 1.6
1719
1719
  }),
1720
- k[15] || (k[15] = c("span", null, "TXT 文件导入", -1))
1720
+ x[15] || (x[15] = c("span", null, "TXT 文件导入", -1))
1721
1721
  ])
1722
1722
  ], 36)) : V("", !0)
1723
1723
  ], 34),
1724
1724
  c("button", {
1725
1725
  class: "zm-canvas-menu-item",
1726
- onClick: k[6] || (k[6] = Se((d) => I(() => i("openSettings")), ["stop"]))
1726
+ onClick: x[6] || (x[6] = Se((d) => I(() => i("openSettings")), ["stop"]))
1727
1727
  }, [
1728
1728
  he(He, {
1729
1729
  name: "settings",
1730
1730
  size: 13,
1731
1731
  stroke: 1.6
1732
1732
  }),
1733
- k[18] || (k[18] = c("span", null, "设置", -1))
1733
+ x[18] || (x[18] = c("span", null, "设置", -1))
1734
1734
  ]),
1735
- k[23] || (k[23] = c("div", { class: "zm-canvas-menu-divider" }, null, -1)),
1735
+ x[23] || (x[23] = c("div", { class: "zm-canvas-menu-divider" }, null, -1)),
1736
1736
  c("div", {
1737
1737
  ref_key: "exportItemRef",
1738
1738
  ref: f,
1739
1739
  class: $e(["zm-canvas-menu-item zm-canvas-menu-item-has-submenu", { "is-open": a.value === "export" }]),
1740
- onMouseenter: k[10] || (k[10] = (d) => x("export")),
1740
+ onMouseenter: x[10] || (x[10] = (d) => k("export")),
1741
1741
  onMouseleave: C
1742
1742
  }, [
1743
1743
  he(He, {
@@ -1745,8 +1745,8 @@ const wc = {
1745
1745
  size: 13,
1746
1746
  stroke: 1.6
1747
1747
  }),
1748
- k[21] || (k[21] = c("span", null, "导出", -1)),
1749
- k[22] || (k[22] = c("svg", {
1748
+ x[21] || (x[21] = c("span", null, "导出", -1)),
1749
+ x[22] || (x[22] = c("svg", {
1750
1750
  class: "zm-canvas-menu-caret",
1751
1751
  width: "8",
1752
1752
  height: "8",
@@ -1764,30 +1764,30 @@ const wc = {
1764
1764
  key: 0,
1765
1765
  class: "zm-canvas-submenu",
1766
1766
  style: Qe(u.value),
1767
- onMouseenter: k[9] || (k[9] = (d) => x("export")),
1767
+ onMouseenter: x[9] || (x[9] = (d) => k("export")),
1768
1768
  onMouseleave: C
1769
1769
  }, [
1770
1770
  c("button", {
1771
1771
  class: "zm-canvas-menu-item",
1772
- onClick: k[7] || (k[7] = Se((d) => I(() => i("exportPng")), ["stop"]))
1772
+ onClick: x[7] || (x[7] = Se((d) => I(() => i("exportPng")), ["stop"]))
1773
1773
  }, [
1774
1774
  he(He, {
1775
1775
  name: "image",
1776
1776
  size: 13,
1777
1777
  stroke: 1.6
1778
1778
  }),
1779
- k[19] || (k[19] = c("span", null, "导出 PNG", -1))
1779
+ x[19] || (x[19] = c("span", null, "导出 PNG", -1))
1780
1780
  ]),
1781
1781
  c("button", {
1782
1782
  class: "zm-canvas-menu-item",
1783
- onClick: k[8] || (k[8] = Se((d) => I(() => i("exportSvg")), ["stop"]))
1783
+ onClick: x[8] || (x[8] = Se((d) => I(() => i("exportSvg")), ["stop"]))
1784
1784
  }, [
1785
1785
  he(He, {
1786
1786
  name: "svg-export",
1787
1787
  size: 13,
1788
1788
  stroke: 1.6
1789
1789
  }),
1790
- k[20] || (k[20] = c("span", null, "导出 SVG", -1))
1790
+ x[20] || (x[20] = c("span", null, "导出 SVG", -1))
1791
1791
  ])
1792
1792
  ], 36)) : V("", !0)
1793
1793
  ], 34)
@@ -1848,7 +1848,7 @@ const wc = {
1848
1848
  "aria-hidden": !e.open
1849
1849
  }, [
1850
1850
  e.title || a.$slots.header ? (v(), y("div", Rc, [
1851
- e.title ? (v(), y("h3", Nc, xe(e.title), 1)) : V("", !0),
1851
+ e.title ? (v(), y("h3", Nc, ke(e.title), 1)) : V("", !0),
1852
1852
  lo(a.$slots, "header"),
1853
1853
  e.closable ? (v(), y("button", {
1854
1854
  key: 1,
@@ -1888,7 +1888,7 @@ const wc = {
1888
1888
  "aria-hidden": !e.open
1889
1889
  }, [
1890
1890
  e.title || a.$slots.header ? (v(), y("div", zc, [
1891
- e.title ? (v(), y("h3", Lc, xe(e.title), 1)) : V("", !0),
1891
+ e.title ? (v(), y("h3", Lc, ke(e.title), 1)) : V("", !0),
1892
1892
  lo(a.$slots, "header"),
1893
1893
  e.closable ? (v(), y("button", {
1894
1894
  key: 1,
@@ -1960,8 +1960,11 @@ const wc = {
1960
1960
  }, Zc = {
1961
1961
  key: 1,
1962
1962
  class: "zm-outline-dot"
1963
- }, Jc = { class: "zm-outline-index" }, Qc = {
1964
- key: 3,
1963
+ }, Jc = {
1964
+ key: 2,
1965
+ class: "zm-outline-index"
1966
+ }, Qc = {
1967
+ key: 4,
1965
1968
  class: "zm-outline-text"
1966
1969
  }, eu = ["onClick"], tu = ["src"], nu = ["onClick"], iu = ["src"], ou = ["title", "onClick"], su = {
1967
1970
  width: "11",
@@ -1988,7 +1991,8 @@ const wc = {
1988
1991
  data: {},
1989
1992
  selectedId: { default: null },
1990
1993
  collapsedIds: { default: () => /* @__PURE__ */ new Set() },
1991
- readonly: { type: Boolean, default: !1 }
1994
+ readonly: { type: Boolean, default: !1 },
1995
+ showIndex: { type: Boolean, default: !1 }
1992
1996
  },
1993
1997
  emits: ["select", "toggleCollapse", "edit", "addChild", "addSibling", "move"],
1994
1998
  setup(e, { emit: n }) {
@@ -2016,7 +2020,7 @@ const wc = {
2016
2020
  for (const ae of j.children) F(ae);
2017
2021
  };
2018
2022
  return F(t.data), S;
2019
- }), g = ye(() => r.value.trim().length > 0), x = ye(() => {
2023
+ }), g = ye(() => r.value.trim().length > 0), k = ye(() => {
2020
2024
  const S = [], F = u.value, j = (ae, Ne, dt) => {
2021
2025
  if (g.value && !F.has(ae.id)) return;
2022
2026
  const Ut = ae.children.length > 0, bt = g.value ? !1 : t.collapsedIds.has(ae.id);
@@ -2028,7 +2032,7 @@ const wc = {
2028
2032
  hasChildren: Ut,
2029
2033
  collapsed: bt,
2030
2034
  node: ae
2031
- }), Ut && !bt && ae.children.forEach((xn, ft) => j(xn, Ne + 1, ft));
2035
+ }), Ut && !bt && ae.children.forEach((kn, ft) => j(kn, Ne + 1, ft));
2032
2036
  };
2033
2037
  return j(t.data, 0, 0), S;
2034
2038
  });
@@ -2049,7 +2053,7 @@ const wc = {
2049
2053
  function I(S) {
2050
2054
  const F = h.value[S];
2051
2055
  if (!F) return;
2052
- const j = x.value.find((ae) => ae.id === F);
2056
+ const j = k.value.find((ae) => ae.id === F);
2053
2057
  j && i("select", j.node), it(() => {
2054
2058
  const ae = document.querySelector(`[data-outline-id="${F}"]`);
2055
2059
  ae == null || ae.scrollIntoView({ block: "nearest", behavior: "smooth" });
@@ -2058,30 +2062,30 @@ const wc = {
2058
2062
  function M() {
2059
2063
  r.value = "", l.value = -1;
2060
2064
  }
2061
- ki(() => {
2065
+ xi(() => {
2062
2066
  it(() => {
2063
2067
  var S;
2064
2068
  return (S = a.value) == null ? void 0 : S.focus();
2065
2069
  });
2066
2070
  });
2067
- const k = Y(null), d = Y("");
2071
+ const x = Y(null), d = Y("");
2068
2072
  let T = null;
2069
2073
  function H(S) {
2070
- t.readonly || (k.value = S.id, d.value = S.text, it(() => {
2074
+ t.readonly || (x.value = S.id, d.value = S.text, it(() => {
2071
2075
  T = document.querySelector(".zm-outline-input"), T == null || T.focus(), T == null || T.select();
2072
2076
  }));
2073
2077
  }
2074
2078
  function X() {
2075
- k.value != null && (i("edit", { id: k.value, text: d.value.trim() || "(无标题)" }), Q());
2079
+ x.value != null && (i("edit", { id: x.value, text: d.value.trim() || "(无标题)" }), Q());
2076
2080
  }
2077
2081
  function Q() {
2078
- k.value = null, d.value = "", T = null;
2082
+ x.value = null, d.value = "", T = null;
2079
2083
  }
2080
2084
  function E(S) {
2081
2085
  S.key === "Enter" ? (S.preventDefault(), X()) : S.key === "Escape" && (S.preventDefault(), Q());
2082
2086
  }
2083
2087
  Hn(Q);
2084
- const fe = Y(null), ve = Y(null), ke = Y(null);
2088
+ const fe = Y(null), ve = Y(null), xe = Y(null);
2085
2089
  function ne(S, F) {
2086
2090
  if (t.readonly) {
2087
2091
  S.preventDefault();
@@ -2090,16 +2094,16 @@ const wc = {
2090
2094
  fe.value = { id: F.id, text: F.text }, S.dataTransfer && (S.dataTransfer.effectAllowed = "move", S.dataTransfer.setData("text/plain", F.id));
2091
2095
  }
2092
2096
  function Te() {
2093
- fe.value = null, ve.value = null, ke.value = null;
2097
+ fe.value = null, ve.value = null, xe.value = null;
2094
2098
  }
2095
2099
  function me(S, F) {
2096
2100
  if (!fe.value) return;
2097
2101
  S.preventDefault(), S.dataTransfer && (S.dataTransfer.dropEffect = "move");
2098
2102
  const j = P(S);
2099
- ve.value = F.id, ke.value = j;
2103
+ ve.value = F.id, xe.value = j;
2100
2104
  }
2101
2105
  function Me(S) {
2102
- ve.value === S.id && (ve.value = null, ke.value = null);
2106
+ ve.value === S.id && (ve.value = null, xe.value = null);
2103
2107
  }
2104
2108
  function b(S, F) {
2105
2109
  S.preventDefault();
@@ -2182,7 +2186,7 @@ const wc = {
2182
2186
  }, null, 544), [
2183
2187
  [tn, r.value]
2184
2188
  ]),
2185
- h.value.length > 0 ? (v(), y("span", Bc, xe(l.value + 1) + "/" + xe(h.value.length), 1)) : g.value ? (v(), y("span", Uc, "无结果")) : V("", !0),
2189
+ h.value.length > 0 ? (v(), y("span", Bc, ke(l.value + 1) + "/" + ke(h.value.length), 1)) : g.value ? (v(), y("span", Uc, "无结果")) : V("", !0),
2186
2190
  r.value ? (v(), y("button", {
2187
2191
  key: 2,
2188
2192
  class: "zm-outline-search-clear",
@@ -2200,22 +2204,22 @@ const wc = {
2200
2204
  le.value ? (v(), y("path", Gc)) : (v(), y("rect", Wc)),
2201
2205
  F[4] || (F[4] = c("path", { d: "M5 15 H4 a2 2 0 0 1 -2 -2 V4 a2 2 0 0 1 2 -2 h9 a2 2 0 0 1 2 2 v1" }, null, -1))
2202
2206
  ])),
2203
- c("span", null, xe(le.value ? "已复制" : "复制大纲"), 1)
2207
+ c("span", null, ke(le.value ? "已复制" : "复制大纲"), 1)
2204
2208
  ], 2)
2205
2209
  ]),
2206
2210
  c("ul", jc, [
2207
- (v(!0), y(ue, null, et(x.value, (j) => (v(), y("li", {
2211
+ (v(!0), y(ue, null, et(k.value, (j) => (v(), y("li", {
2208
2212
  key: j.id,
2209
2213
  "data-outline-id": j.id,
2210
2214
  class: $e(["zm-outline-row", {
2211
2215
  "is-selected": j.id === e.selectedId,
2212
2216
  "is-root": j.depth === 0,
2213
- "is-editing": k.value === j.id,
2217
+ "is-editing": x.value === j.id,
2214
2218
  "is-search-hit": f.value.has(j.id),
2215
2219
  "is-search-current": h.value[l.value] === j.id,
2216
- "is-drag-over-before": ve.value === j.id && ke.value === "before",
2217
- "is-drag-over-after": ve.value === j.id && ke.value === "after",
2218
- "is-drag-over-child": ve.value === j.id && ke.value === "child"
2220
+ "is-drag-over-before": ve.value === j.id && xe.value === "before",
2221
+ "is-drag-over-after": ve.value === j.id && xe.value === "after",
2222
+ "is-drag-over-child": ve.value === j.id && xe.value === "child"
2219
2223
  }]),
2220
2224
  style: Qe({ paddingLeft: 12 + j.depth * 16 + "px" }),
2221
2225
  draggable: "true",
@@ -2237,9 +2241,9 @@ const wc = {
2237
2241
  j.collapsed ? (v(), y("polyline", Vc)) : (v(), y("polyline", Xc))
2238
2242
  ]))
2239
2243
  ], 8, Yc)) : (v(), y("span", Zc)),
2240
- c("span", Jc, xe(j.siblingIndex + 1) + ".", 1),
2241
- k.value === j.id ? Bt((v(), y("input", {
2242
- key: 2,
2244
+ t.showIndex ? (v(), y("span", Jc, ke(j.siblingIndex + 1) + ".", 1)) : V("", !0),
2245
+ x.value === j.id ? Bt((v(), y("input", {
2246
+ key: 3,
2243
2247
  "onUpdate:modelValue": F[1] || (F[1] = (ae) => d.value = ae),
2244
2248
  class: "zm-outline-input",
2245
2249
  onBlur: X,
@@ -2248,9 +2252,9 @@ const wc = {
2248
2252
  }, ["stop"]))
2249
2253
  }, null, 544)), [
2250
2254
  [tn, d.value]
2251
- ]) : (v(), y("span", Qc, xe(j.text), 1)),
2255
+ ]) : (v(), y("span", Qc, ke(j.text), 1)),
2252
2256
  t.readonly ? V("", !0) : (v(), y("button", {
2253
- key: 4,
2257
+ key: 5,
2254
2258
  class: "zm-outline-row-action",
2255
2259
  title: "添加同级",
2256
2260
  onClick: Se((ae) => i("addSibling", j.id), ["stop"])
@@ -2264,7 +2268,7 @@ const wc = {
2264
2268
  }, null, 8, tu)
2265
2269
  ], 8, eu)),
2266
2270
  t.readonly ? V("", !0) : (v(), y("button", {
2267
- key: 5,
2271
+ key: 6,
2268
2272
  class: "zm-outline-row-action",
2269
2273
  title: "添加子节点",
2270
2274
  onClick: Se((ae) => i("addChild", j.id), ["stop"])
@@ -2318,7 +2322,7 @@ const wc = {
2318
2322
  }, mu = { class: "zm-jtv-key" }, bu = {
2319
2323
  key: 0,
2320
2324
  class: "zm-jtv-key"
2321
- }, vu = ["src", "alt"], yu = ["href"], ku = /* @__PURE__ */ on({
2325
+ }, vu = ["src", "alt"], yu = ["href"], xu = /* @__PURE__ */ on({
2322
2326
  __name: "JsonTreeViewer",
2323
2327
  props: {
2324
2328
  value: {},
@@ -2335,64 +2339,64 @@ const wc = {
2335
2339
  const a = ye(() => {
2336
2340
  if (r.value) return `Array(${n.value.length})`;
2337
2341
  if (i.value) {
2338
- const k = n.value, d = Object.keys(k);
2342
+ const x = n.value, d = Object.keys(x);
2339
2343
  return `Object(${d.length} ${d.length === 1 ? "key" : "keys"})`;
2340
2344
  }
2341
2345
  return "";
2342
- }), l = ye(() => r.value ? n.value.map((k, d) => ({ key: String(d), value: k })) : i.value ? Object.entries(n.value).map(([k, d]) => ({ key: k, value: d })) : []), f = ye(() => n.isRoot ? "<root>" : n.path), u = ye(() => n.collapsedPaths.has(f.value));
2343
- function h(k, d, T) {
2344
- k !== "<root>" && (T < 2 || d === null || typeof d != "object" || n.collapsedPaths.has(k) || n.collapsedPaths.add(k));
2346
+ }), l = ye(() => r.value ? n.value.map((x, d) => ({ key: String(d), value: x })) : i.value ? Object.entries(n.value).map(([x, d]) => ({ key: x, value: d })) : []), f = ye(() => n.isRoot ? "<root>" : n.path), u = ye(() => n.collapsedPaths.has(f.value));
2347
+ function h(x, d, T) {
2348
+ x !== "<root>" && (T < 2 || d === null || typeof d != "object" || n.collapsedPaths.has(x) || n.collapsedPaths.add(x));
2345
2349
  }
2346
2350
  n.isRoot || h(f.value, n.value, n.depth);
2347
2351
  function g() {
2348
2352
  u.value ? n.collapsedPaths.delete(f.value) : n.collapsedPaths.add(f.value);
2349
2353
  }
2350
- function x(k) {
2351
- return f.value === "" ? k : `${f.value}.${k}`;
2354
+ function k(x) {
2355
+ return f.value === "" ? x : `${f.value}.${x}`;
2352
2356
  }
2353
- function C(k) {
2357
+ function C(x) {
2354
2358
  if (!n.query) return !0;
2355
2359
  const d = n.query.toLowerCase();
2356
- return typeof k == "string" ? k.toLowerCase().includes(d) : k === null ? "null".includes(d) : String(k).toLowerCase().includes(d);
2360
+ return typeof x == "string" ? x.toLowerCase().includes(d) : x === null ? "null".includes(d) : String(x).toLowerCase().includes(d);
2357
2361
  }
2358
- function B(k) {
2359
- return n.query ? k.toLowerCase().includes(n.query.toLowerCase()) : !0;
2362
+ function B(x) {
2363
+ return n.query ? x.toLowerCase().includes(n.query.toLowerCase()) : !0;
2360
2364
  }
2361
- function N(k, d) {
2362
- return !n.query || B(k) ? !0 : d === null || typeof d != "object" ? C(d) : !0;
2365
+ function N(x, d) {
2366
+ return !n.query || B(x) ? !0 : d === null || typeof d != "object" ? C(d) : !0;
2363
2367
  }
2364
- function W(k) {
2365
- return k === null ? "null" : typeof k == "string" ? k.length > 80 ? `"${k.slice(0, 80)}..."` : `"${k}"` : typeof k == "boolean" ? k ? "true" : "false" : typeof k == "number" ? String(k) : typeof k > "u" ? "undefined" : JSON.stringify(k);
2368
+ function W(x) {
2369
+ return x === null ? "null" : typeof x == "string" ? x.length > 80 ? `"${x.slice(0, 80)}..."` : `"${x}"` : typeof x == "boolean" ? x ? "true" : "false" : typeof x == "number" ? String(x) : typeof x > "u" ? "undefined" : JSON.stringify(x);
2366
2370
  }
2367
- function I(k) {
2368
- if (typeof k != "string") return !1;
2369
- const d = k.trim();
2371
+ function I(x) {
2372
+ if (typeof x != "string") return !1;
2373
+ const d = x.trim();
2370
2374
  return !!(d.startsWith("data:image/") || /^https?:\/\/.+\.(png|jpe?g|gif|webp|svg|bmp|ico)(\?.*)?$/i.test(d) || /^https?:\/\/.+/i.test(d) && /\/[^/]+\.(png|jpe?g|gif|webp|svg|bmp|ico)(\?.*)?$/i.test(d));
2371
2375
  }
2372
- function M(k) {
2376
+ function M(x) {
2373
2377
  if (!n.query) return null;
2374
- const d = k.toLowerCase().indexOf(n.query.toLowerCase());
2375
- return d < 0 ? null : { before: k.slice(0, d), match: k.slice(d, d + n.query.length), after: k.slice(d + n.query.length) };
2378
+ const d = x.toLowerCase().indexOf(n.query.toLowerCase());
2379
+ return d < 0 ? null : { before: x.slice(0, d), match: x.slice(d, d + n.query.length), after: x.slice(d + n.query.length) };
2376
2380
  }
2377
- return (k, d) => {
2381
+ return (x, d) => {
2378
2382
  var H, X, Q, E, fe, ve;
2379
2383
  const T = Ca("JsonTreeViewer", !0);
2380
2384
  return e.isRoot ? (v(), y("div", au, [
2381
- (v(!0), y(ue, null, et(l.value, (ke) => Bt((v(), y("div", {
2382
- key: ke.key,
2385
+ (v(!0), y(ue, null, et(l.value, (xe) => Bt((v(), y("div", {
2386
+ key: xe.key,
2383
2387
  class: "zm-jtv-row"
2384
2388
  }, [
2385
2389
  he(T, {
2386
- "key-name": ke.key,
2387
- value: ke.value,
2388
- path: x(ke.key),
2390
+ "key-name": xe.key,
2391
+ value: xe.value,
2392
+ path: k(xe.key),
2389
2393
  depth: e.depth + 1,
2390
2394
  query: e.query,
2391
2395
  "collapsed-paths": e.collapsedPaths,
2392
2396
  "is-root": !1
2393
2397
  }, null, 8, ["key-name", "value", "path", "depth", "query", "collapsed-paths"])
2394
2398
  ])), [
2395
- [ir, N(ke.key, ke.value)]
2399
+ [ir, N(xe.key, xe.value)]
2396
2400
  ])), 128))
2397
2401
  ])) : i.value || r.value ? (v(), y("div", {
2398
2402
  key: 1,
@@ -2405,30 +2409,30 @@ const wc = {
2405
2409
  }, [
2406
2410
  c("span", {
2407
2411
  class: $e(["zm-jtv-toggle", { "is-leaf": !1 }])
2408
- }, xe(u.value ? "▶" : "▼"), 1),
2409
- r.value ? V("", !0) : (v(), y("span", cu, xe(e.keyName), 1)),
2412
+ }, ke(u.value ? "▶" : "▼"), 1),
2413
+ r.value ? V("", !0) : (v(), y("span", cu, ke(e.keyName), 1)),
2410
2414
  r.value ? V("", !0) : (v(), y("span", uu, ":")),
2411
2415
  r.value ? (v(), y("span", du, "[")) : V("", !0),
2412
- u.value ? (v(), y("span", fu, xe(a.value), 1)) : V("", !0),
2416
+ u.value ? (v(), y("span", fu, ke(a.value), 1)) : V("", !0),
2413
2417
  u.value && r.value ? (v(), y("span", pu, "]")) : V("", !0),
2414
2418
  u.value && i.value ? (v(), y("span", hu, "}")) : V("", !0)
2415
2419
  ], 4),
2416
2420
  u.value ? V("", !0) : (v(), y("div", gu, [
2417
- (v(!0), y(ue, null, et(l.value, (ke) => Bt((v(), y("div", {
2418
- key: ke.key,
2421
+ (v(!0), y(ue, null, et(l.value, (xe) => Bt((v(), y("div", {
2422
+ key: xe.key,
2419
2423
  class: "zm-jtv-row"
2420
2424
  }, [
2421
2425
  he(T, {
2422
- "key-name": ke.key,
2423
- value: ke.value,
2424
- path: x(ke.key),
2426
+ "key-name": xe.key,
2427
+ value: xe.value,
2428
+ path: k(xe.key),
2425
2429
  depth: e.depth + 1,
2426
2430
  query: e.query,
2427
2431
  "collapsed-paths": e.collapsedPaths,
2428
2432
  "is-root": !1
2429
2433
  }, null, 8, ["key-name", "value", "path", "depth", "query", "collapsed-paths"])
2430
2434
  ])), [
2431
- [ir, N(ke.key, ke.value)]
2435
+ [ir, N(xe.key, xe.value)]
2432
2436
  ])), 128))
2433
2437
  ])),
2434
2438
  !u.value && r.value ? (v(), y("div", {
@@ -2447,22 +2451,22 @@ const wc = {
2447
2451
  style: Qe({ paddingLeft: 6 + e.depth * 12 + "px" })
2448
2452
  }, [
2449
2453
  d[2] || (d[2] = c("span", { class: "zm-jtv-toggle is-leaf" }, "·", -1)),
2450
- c("span", mu, xe(e.keyName), 1),
2454
+ c("span", mu, ke(e.keyName), 1),
2451
2455
  d[3] || (d[3] = c("span", { class: "zm-jtv-colon" }, ":", -1)),
2452
2456
  B(e.keyName) && M(e.keyName) ? (v(), y("span", bu, [
2453
- c("span", null, xe((H = M(e.keyName)) == null ? void 0 : H.before), 1),
2454
- c("mark", null, xe((X = M(e.keyName)) == null ? void 0 : X.match), 1),
2455
- c("span", null, xe((Q = M(e.keyName)) == null ? void 0 : Q.after), 1)
2457
+ c("span", null, ke((H = M(e.keyName)) == null ? void 0 : H.before), 1),
2458
+ c("mark", null, ke((X = M(e.keyName)) == null ? void 0 : X.match), 1),
2459
+ c("span", null, ke((Q = M(e.keyName)) == null ? void 0 : Q.after), 1)
2456
2460
  ])) : V("", !0),
2457
2461
  c("span", {
2458
2462
  class: $e(["zm-jtv-value", `zm-jtv-${t.value}`])
2459
2463
  }, [
2460
2464
  M(W(e.value)) ? (v(), y(ue, { key: 0 }, [
2461
- c("span", null, xe((E = M(W(e.value))) == null ? void 0 : E.before), 1),
2462
- c("mark", null, xe((fe = M(W(e.value))) == null ? void 0 : fe.match), 1),
2463
- c("span", null, xe((ve = M(W(e.value))) == null ? void 0 : ve.after), 1)
2465
+ c("span", null, ke((E = M(W(e.value))) == null ? void 0 : E.before), 1),
2466
+ c("mark", null, ke((fe = M(W(e.value))) == null ? void 0 : fe.match), 1),
2467
+ c("span", null, ke((ve = M(W(e.value))) == null ? void 0 : ve.after), 1)
2464
2468
  ], 64)) : (v(), y(ue, { key: 1 }, [
2465
- _n(xe(W(e.value)), 1)
2469
+ _n(ke(W(e.value)), 1)
2466
2470
  ], 64))
2467
2471
  ], 2),
2468
2472
  I(e.value) ? (v(), y("span", {
@@ -2490,7 +2494,7 @@ const wc = {
2490
2494
  ], 4));
2491
2495
  };
2492
2496
  }
2493
- }), xu = { class: "zm-data-panel" }, wu = { class: "zm-data-header" }, Eu = { class: "zm-data-title" }, Su = { class: "zm-data-title-meta" }, Tu = { class: "zm-data-toolbar" }, Au = ["title"], _u = {
2497
+ }), ku = { class: "zm-data-panel" }, wu = { class: "zm-data-header" }, Eu = { class: "zm-data-title" }, Su = { class: "zm-data-title-meta" }, Tu = { class: "zm-data-toolbar" }, Au = ["title"], _u = {
2494
2498
  key: 0,
2495
2499
  width: "13",
2496
2500
  height: "13",
@@ -2524,7 +2528,7 @@ const wc = {
2524
2528
  },
2525
2529
  emits: ["import", "consumed-mode"],
2526
2530
  setup(e, { emit: n }) {
2527
- const t = e, i = n, r = ye(() => JSON.stringify(t.data, null, 2)), a = Y(""), l = Y(null), f = Y(!1), u = Y("json"), h = Y("idle"), g = Y(/* @__PURE__ */ new Set()), x = Y("");
2531
+ const t = e, i = n, r = ye(() => JSON.stringify(t.data, null, 2)), a = Y(""), l = Y(null), f = Y(!1), u = Y("json"), h = Y("idle"), g = Y(/* @__PURE__ */ new Set()), k = Y("");
2528
2532
  Nt(
2529
2533
  () => t.pendingMode,
2530
2534
  (d) => {
@@ -2578,7 +2582,7 @@ const wc = {
2578
2582
  return 1 + d.children.reduce((T, H) => T + W(H), 0);
2579
2583
  }
2580
2584
  const I = ye(() => W(t.data)), M = ye(() => r.value.length);
2581
- function k() {
2585
+ function x() {
2582
2586
  const d = document.createElement("input");
2583
2587
  d.type = "file", d.accept = "application/json", d.onchange = () => {
2584
2588
  var X;
@@ -2590,11 +2594,11 @@ const wc = {
2590
2594
  }, H.readAsText(T);
2591
2595
  }, d.click();
2592
2596
  }
2593
- return (d, T) => (v(), y("div", xu, [
2597
+ return (d, T) => (v(), y("div", ku, [
2594
2598
  c("div", wu, [
2595
2599
  c("div", Eu, [
2596
2600
  T[8] || (T[8] = c("span", { class: "zm-data-title-text" }, "数据 JSON", -1)),
2597
- c("span", Su, xe(I.value) + " 节点 · " + xe(M.value) + " chars", 1)
2601
+ c("span", Su, ke(I.value) + " 节点 · " + ke(M.value) + " chars", 1)
2598
2602
  ])
2599
2603
  ]),
2600
2604
  c("div", Tu, [
@@ -2627,7 +2631,7 @@ const wc = {
2627
2631
  c("button", {
2628
2632
  class: "zm-data-btn is-icon",
2629
2633
  title: "从 JSON 文件导入",
2630
- onClick: k
2634
+ onClick: x
2631
2635
  }, [...T[13] || (T[13] = [
2632
2636
  Yt('<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 15 V4"></path><polyline points="7 9 12 4 17 9"></polyline><path d="M4 19 H20"></path></svg><span class="zm-data-btn-label">导入</span>', 2)
2633
2637
  ])]),
@@ -2640,7 +2644,7 @@ const wc = {
2640
2644
  ])], 2),
2641
2645
  T[16] || (T[16] = c("div", { class: "zm-data-toolbar-spacer" }, null, -1)),
2642
2646
  c("div", {
2643
- class: $e(["zm-data-search", { "is-active": x.value.length > 0 }])
2647
+ class: $e(["zm-data-search", { "is-active": k.value.length > 0 }])
2644
2648
  }, [
2645
2649
  T[15] || (T[15] = c("svg", {
2646
2650
  width: "12",
@@ -2665,18 +2669,18 @@ const wc = {
2665
2669
  })
2666
2670
  ], -1)),
2667
2671
  Bt(c("input", {
2668
- "onUpdate:modelValue": T[1] || (T[1] = (H) => x.value = H),
2672
+ "onUpdate:modelValue": T[1] || (T[1] = (H) => k.value = H),
2669
2673
  type: "text",
2670
2674
  placeholder: "过滤 (键 / 值)",
2671
2675
  spellcheck: "false"
2672
2676
  }, null, 512), [
2673
- [tn, x.value]
2677
+ [tn, k.value]
2674
2678
  ]),
2675
- x.value ? (v(), y("button", {
2679
+ k.value ? (v(), y("button", {
2676
2680
  key: 0,
2677
2681
  class: "zm-data-search-clear",
2678
2682
  title: "清空过滤",
2679
- onClick: T[2] || (T[2] = (H) => x.value = "")
2683
+ onClick: T[2] || (T[2] = (H) => k.value = "")
2680
2684
  }, "×")) : V("", !0)
2681
2685
  ], 2)
2682
2686
  ]),
@@ -2698,7 +2702,7 @@ const wc = {
2698
2702
  }, null, 8, Nu), [
2699
2703
  [tn, a.value]
2700
2704
  ]),
2701
- l.value ? (v(), y("div", Iu, xe(l.value), 1)) : V("", !0),
2705
+ l.value ? (v(), y("div", Iu, ke(l.value), 1)) : V("", !0),
2702
2706
  c("div", Ou, [
2703
2707
  c("button", {
2704
2708
  class: "zm-data-btn is-primary",
@@ -2718,9 +2722,9 @@ const wc = {
2718
2722
  ])
2719
2723
  ])) : V("", !0),
2720
2724
  c("div", Lu, [
2721
- he(ku, {
2725
+ he(xu, {
2722
2726
  value: e.data,
2723
- query: x.value,
2727
+ query: k.value,
2724
2728
  "collapsed-paths": g.value
2725
2729
  }, null, 8, ["value", "query", "collapsed-paths"])
2726
2730
  ]),
@@ -2811,7 +2815,7 @@ const wc = {
2811
2815
  a.value = I.message;
2812
2816
  }
2813
2817
  }
2814
- function x() {
2818
+ function k() {
2815
2819
  r.value = ji(t.data), a.value = null, it(() => {
2816
2820
  var I;
2817
2821
  return (I = l.value) == null ? void 0 : I.resetView();
@@ -2829,20 +2833,20 @@ const wc = {
2829
2833
  var d;
2830
2834
  const M = (d = I.files) == null ? void 0 : d[0];
2831
2835
  if (!M) return;
2832
- const k = new FileReader();
2833
- k.onload = () => {
2834
- typeof k.result == "string" && (r.value = k.result, a.value = null, it(() => {
2836
+ const x = new FileReader();
2837
+ x.onload = () => {
2838
+ typeof x.result == "string" && (r.value = x.result, a.value = null, it(() => {
2835
2839
  var T;
2836
2840
  return (T = l.value) == null ? void 0 : T.resetView();
2837
2841
  }));
2838
- }, k.readAsText(M);
2842
+ }, x.readAsText(M);
2839
2843
  }, I.click();
2840
2844
  }
2841
2845
  function N() {
2842
- const I = new Blob([r.value], { type: "text/markdown;charset=utf-8" }), M = URL.createObjectURL(I), k = document.createElement("a");
2843
- k.href = M;
2846
+ const I = new Blob([r.value], { type: "text/markdown;charset=utf-8" }), M = URL.createObjectURL(I), x = document.createElement("a");
2847
+ x.href = M;
2844
2848
  const d = (t.data.text || "mindmap").trim() || "mindmap";
2845
- k.download = `${d}.md`, k.click(), URL.revokeObjectURL(M);
2849
+ x.download = `${d}.md`, x.click(), URL.revokeObjectURL(M);
2846
2850
  }
2847
2851
  function W() {
2848
2852
  r.value = Gu, a.value = null, it(() => {
@@ -2903,7 +2907,7 @@ const wc = {
2903
2907
  c("button", {
2904
2908
  class: "zm-md-btn",
2905
2909
  title: "覆盖为当前导图",
2906
- onClick: x
2910
+ onClick: k
2907
2911
  }, "同步"),
2908
2912
  c("button", {
2909
2913
  class: "zm-md-btn",
@@ -2911,7 +2915,7 @@ const wc = {
2911
2915
  onClick: C
2912
2916
  }, "清空")
2913
2917
  ]),
2914
- a.value ? (v(), y("div", Du, xe(a.value), 1)) : V("", !0),
2918
+ a.value ? (v(), y("div", Du, ke(a.value), 1)) : V("", !0),
2915
2919
  c("div", Pu, [
2916
2920
  c("div", Bu, [
2917
2921
  M[4] || (M[4] = c("div", { class: "zm-md-pane-header" }, [
@@ -2919,7 +2923,7 @@ const wc = {
2919
2923
  c("span", { class: "zm-md-hint" }, "# 根 · ## 一级 · ### 二级 …")
2920
2924
  ], -1)),
2921
2925
  Bt(c("textarea", {
2922
- "onUpdate:modelValue": M[0] || (M[0] = (k) => r.value = k),
2926
+ "onUpdate:modelValue": M[0] || (M[0] = (x) => r.value = x),
2923
2927
  class: "zm-md-textarea",
2924
2928
  spellcheck: "false",
2925
2929
  placeholder: "# 标题…"
@@ -2952,7 +2956,7 @@ const wc = {
2952
2956
  ])
2953
2957
  ]));
2954
2958
  }
2955
- }), ju = { class: "zm-settings-panel" }, Ku = { class: "zm-settings-section" }, Yu = { class: "zm-settings-field" }, qu = { class: "zm-settings-control" }, Xu = { class: "zm-color-input-wrap" }, Vu = ["value"], Zu = { class: "zm-color-input-text" }, Ju = { class: "zm-swatch-row zm-swatch-row--compact" }, Qu = ["title", "onClick"], ed = { class: "zm-settings-field" }, td = ["value"], nd = { class: "zm-slider" }, id = ["value"], od = { class: "zm-settings-field" }, sd = ["value"], rd = { class: "zm-slider" }, ld = ["value"], ad = { class: "zm-settings-field" }, cd = { class: "zm-line-style-group" }, ud = ["title", "onClick"], dd = ["viewBox"], fd = {
2959
+ }), ju = { class: "zm-settings-panel" }, Ku = { class: "zm-settings-section" }, Yu = { class: "zm-settings-field" }, qu = { class: "zm-settings-control" }, Xu = { class: "zm-color-input-wrap" }, Vu = ["value"], Zu = { class: "zm-color-input-text" }, Ju = { class: "zm-swatch-row zm-swatch-row--compact" }, Qu = ["title", "onClick"], ed = { class: "zm-settings-field" }, td = ["value"], nd = { class: "zm-slider" }, id = ["value"], od = { class: "zm-settings-field" }, sd = ["value"], rd = { class: "zm-slider" }, ld = ["value"], ad = { class: "zm-settings-field zm-line-style-field" }, cd = { class: "zm-line-style-group" }, ud = ["title", "onClick"], dd = ["viewBox"], fd = {
2956
2960
  key: 0,
2957
2961
  d: "M 0 12 Q 14 2, 28 12",
2958
2962
  fill: "none",
@@ -2991,7 +2995,7 @@ const wc = {
2991
2995
  stroke: "currentColor",
2992
2996
  "stroke-width": "2.2",
2993
2997
  "stroke-linecap": "round"
2994
- }, bd = { class: "zm-line-style-label" }, vd = { class: "zm-settings-field" }, yd = { class: "zm-line-style-group" }, kd = ["title", "onClick"], xd = ["viewBox"], wd = {
2998
+ }, bd = { class: "zm-line-style-label" }, vd = { class: "zm-settings-field zm-line-style-field" }, yd = { class: "zm-line-style-group" }, xd = ["title", "onClick"], kd = ["viewBox"], wd = {
2995
2999
  key: 0,
2996
3000
  d: "M 0 12 Q 14 2, 28 12",
2997
3001
  fill: "none",
@@ -3036,7 +3040,7 @@ const wc = {
3036
3040
  }, Md = { class: "zm-settings-label" }, Rd = { class: "zm-settings-sub" }, Nd = ["value"], Id = {
3037
3041
  key: 1,
3038
3042
  class: "zm-slider"
3039
- }, Od = ["value"], zd = { class: "zm-settings-field" }, Ld = { class: "zm-line-style-group" }, $d = ["title", "onClick"], Dd = {
3043
+ }, Od = ["value"], zd = { class: "zm-settings-field zm-line-style-field" }, Ld = { class: "zm-line-style-group" }, $d = ["title", "onClick"], Dd = {
3040
3044
  viewBox: "0 0 28 18",
3041
3045
  width: "28",
3042
3046
  height: "18",
@@ -3088,7 +3092,7 @@ const wc = {
3088
3092
  }, ff = { class: "zm-settings-field" }, pf = { class: "zm-settings-value-tag" }, hf = { class: "zm-swatch-row" }, gf = ["title", "onClick"], mf = {
3089
3093
  class: "zm-swatch zm-swatch--custom",
3090
3094
  title: "自定义颜色"
3091
- }, bf = ["value"], vf = { class: "zm-settings-field" }, yf = { class: "zm-settings-value-tag" }, kf = { class: "zm-swatch-row" }, xf = ["title", "onClick"], wf = {
3095
+ }, bf = ["value"], vf = { class: "zm-settings-field" }, yf = { class: "zm-settings-value-tag" }, xf = { class: "zm-swatch-row" }, kf = ["title", "onClick"], wf = {
3092
3096
  class: "zm-swatch zm-swatch--custom",
3093
3097
  title: "自定义颜色"
3094
3098
  }, Ef = ["value"], Sf = { class: "zm-settings-field" }, Tf = ["value"], Af = ["value"], _f = { class: "zm-settings-field" }, Cf = ["value"], Mf = { class: "zm-slider" }, Rf = ["value"], Nf = { class: "zm-settings-section zm-settings-section--actions" }, If = /* @__PURE__ */ on({
@@ -3132,20 +3136,20 @@ const wc = {
3132
3136
  const g = ye(() => [
3133
3137
  ...Un,
3134
3138
  ...t.settings.customPalettes
3135
- ]), x = yi({});
3139
+ ]), k = yi({});
3136
3140
  function C(Q) {
3137
- return x[Q.id] === void 0 && (x[Q.id] = Q.colors.join(`
3138
- `)), x[Q.id];
3141
+ return k[Q.id] === void 0 && (k[Q.id] = Q.colors.join(`
3142
+ `)), k[Q.id];
3139
3143
  }
3140
3144
  function B(Q) {
3141
- const E = x[Q.id] ?? "", fe = Ja(E);
3145
+ const E = k[Q.id] ?? "", fe = Ja(E);
3142
3146
  if (fe.length === 0) {
3143
- x[Q.id] = Q.colors.join(`
3147
+ k[Q.id] = Q.colors.join(`
3144
3148
  `);
3145
3149
  return;
3146
3150
  }
3147
3151
  const ve = t.settings.customPalettes.map(
3148
- (ke) => ke.id === Q.id ? { ...ke, colors: fe } : ke
3152
+ (xe) => xe.id === Q.id ? { ...xe, colors: fe } : xe
3149
3153
  );
3150
3154
  i("update:settings", { customPalettes: ve });
3151
3155
  }
@@ -3156,15 +3160,15 @@ const wc = {
3156
3160
  let ve = fe + (t.settings.customPalettes.length + 1);
3157
3161
  for (; Un.some((ne) => ne.id === ve) || t.settings.customPalettes.some((ne) => ne.id === ve); )
3158
3162
  ve = fe + Math.random().toString(36).slice(2, 7);
3159
- const ke = {
3163
+ const xe = {
3160
3164
  id: ve,
3161
3165
  name: `我的配色 ${t.settings.customPalettes.length + 1}`,
3162
3166
  colors: E
3163
3167
  };
3164
3168
  i("update:settings", {
3165
- customPalettes: [...t.settings.customPalettes, ke],
3169
+ customPalettes: [...t.settings.customPalettes, xe],
3166
3170
  branchPaletteId: ve
3167
- }), x[ve] = E.join(`
3171
+ }), k[ve] = E.join(`
3168
3172
  `);
3169
3173
  }
3170
3174
  function W(Q) {
@@ -3172,26 +3176,26 @@ const wc = {
3172
3176
  i("update:settings", {
3173
3177
  customPalettes: E,
3174
3178
  ...fe !== t.settings.branchPaletteId ? { branchPaletteId: fe } : {}
3175
- }), delete x[Q.id];
3179
+ }), delete k[Q.id];
3176
3180
  }
3177
- const I = ["#f87171", "#fb923c", "#fbbf24", "#a3e635", "#34d399", "#22d3ee", "#818cf8", "#c084fc", "#1e2937", "#f8fafc", "#94a3b8"], M = ["#f8fafc", "#ffffff", "#e2e8f0", "#1e2937", "#0f172a", "#fef3c7", "#dbeafe", "#dcfce7", "#fce7f3", "#f1f5f9"], k = [0, 1, 2, 3], d = ["#f87171", "#fb923c", "#34d399", "#818cf8"];
3181
+ const I = ["#f87171", "#fb923c", "#fbbf24", "#a3e635", "#34d399", "#22d3ee", "#818cf8", "#c084fc", "#1e2937", "#f8fafc", "#94a3b8"], M = ["#f8fafc", "#ffffff", "#e2e8f0", "#1e2937", "#0f172a", "#fef3c7", "#dbeafe", "#dcfce7", "#fce7f3", "#f1f5f9"], x = [0, 1, 2, 3], d = ["#f87171", "#fb923c", "#34d399", "#818cf8"];
3178
3182
  function T(Q, E, fe, ve) {
3179
3183
  if (E <= 1) return fe;
3180
- const ke = Q / (E - 1);
3181
- return fe + (ve - fe) * ke;
3184
+ const xe = Q / (E - 1);
3185
+ return fe + (ve - fe) * xe;
3182
3186
  }
3183
3187
  function H(Q, E, fe, ve) {
3184
- const ke = E * Math.pow(ve, Q);
3185
- return Math.max(fe, ke);
3188
+ const xe = E * Math.pow(ve, Q);
3189
+ return Math.max(fe, xe);
3186
3190
  }
3187
3191
  const X = ye(() => {
3188
- const Q = t.settings.lineWidthStart, E = t.settings.lineWidthEnd, fe = t.settings.taperedEdge, ve = k.length, ke = 8, ne = 192, Te = g.value.find(
3192
+ const Q = t.settings.lineWidthStart, E = t.settings.lineWidthEnd, fe = t.settings.taperedEdge, ve = x.length, xe = 8, ne = 192, Te = g.value.find(
3189
3193
  (Me) => Me.id === t.settings.branchPaletteId
3190
3194
  ), me = Te && Te.colors.length ? Te.colors : d;
3191
- return k.map((Me, b) => {
3195
+ return x.map((Me, b) => {
3192
3196
  const P = 10 + b * 60 / (ve - 1);
3193
3197
  return {
3194
- x1: ke,
3198
+ x1: xe,
3195
3199
  y1: P,
3196
3200
  x2: ne,
3197
3201
  y2: P,
@@ -3201,7 +3205,7 @@ const wc = {
3201
3205
  });
3202
3206
  });
3203
3207
  return (Q, E) => {
3204
- var fe, ve, ke, ne, Te, me, Me;
3208
+ var fe, ve, xe, ne, Te, me, Me;
3205
3209
  return v(), y("div", ju, [
3206
3210
  c("section", Ku, [
3207
3211
  E[45] || (E[45] = c("h4", { class: "zm-settings-section-title" }, "画布", -1)),
@@ -3215,7 +3219,7 @@ const wc = {
3215
3219
  value: e.settings.canvasBg || "#f8fafc",
3216
3220
  onInput: E[0] || (E[0] = (b) => r("canvasBg", b.target.value))
3217
3221
  }, null, 40, Vu),
3218
- c("span", Zu, xe(e.settings.canvasBg || "默认"), 1)
3222
+ c("span", Zu, ke(e.settings.canvasBg || "默认"), 1)
3219
3223
  ])
3220
3224
  ])
3221
3225
  ]),
@@ -3294,7 +3298,7 @@ const wc = {
3294
3298
  }, [
3295
3299
  b.value === "arc" ? (v(), y("path", fd)) : b.value === "rounded-elbow" ? (v(), y("path", pd)) : b.value === "elbow" ? (v(), y("path", hd)) : b.value === "curve" ? (v(), y("path", gd)) : (v(), y("line", md))
3296
3300
  ], 8, dd)),
3297
- c("span", bd, xe(b.label), 1)
3301
+ c("span", bd, ke(b.label), 1)
3298
3302
  ], 10, ud))), 128))
3299
3303
  ])
3300
3304
  ]),
@@ -3314,15 +3318,15 @@ const wc = {
3314
3318
  preserveAspectRatio: "none"
3315
3319
  }, [
3316
3320
  b.value === "arc" ? (v(), y("path", wd)) : b.value === "rounded-elbow" ? (v(), y("path", Ed)) : b.value === "elbow" ? (v(), y("path", Sd)) : b.value === "curve" ? (v(), y("path", Td)) : (v(), y("line", Ad))
3317
- ], 8, xd)),
3318
- c("span", _d, xe(b.label), 1)
3319
- ], 10, kd)), 64))
3321
+ ], 8, kd)),
3322
+ c("span", _d, ke(b.label), 1)
3323
+ ], 10, xd)), 64))
3320
3324
  ])
3321
3325
  ]),
3322
3326
  e.settings.lineStyle === "rounded-elbow" || e.settings.rootLineStyle === "rounded-elbow" ? (v(), y("div", Cd, [
3323
3327
  c("span", Md, [
3324
3328
  E[31] || (E[31] = _n("圆角大小 ", -1)),
3325
- c("span", Rd, xe(e.settings.elbowRadius) + "px", 1)
3329
+ c("span", Rd, ke(e.settings.elbowRadius) + "px", 1)
3326
3330
  ]),
3327
3331
  c("input", {
3328
3332
  class: "zm-settings-number",
@@ -3368,7 +3372,7 @@ const wc = {
3368
3372
  }, null, -1)),
3369
3373
  b.value === "edge" ? (v(), y("path", Pd)) : b.value === "center" ? (v(), y("path", Bd)) : (v(), y("path", Ud))
3370
3374
  ])),
3371
- c("span", Hd, xe(b.label), 1)
3375
+ c("span", Hd, ke(b.label), 1)
3372
3376
  ], 10, $d)), 64))
3373
3377
  ])
3374
3378
  ]),
@@ -3391,7 +3395,7 @@ const wc = {
3391
3395
  class: $e(["zm-palette-option", { "is-active": e.settings.branchPaletteId === b.id }]),
3392
3396
  onClick: (P) => r("branchPaletteId", b.id)
3393
3397
  }, [
3394
- c("span", Kd, xe(b.name), 1),
3398
+ c("span", Kd, ke(b.name), 1),
3395
3399
  c("span", Yd, [
3396
3400
  (v(!0), y(ue, null, et(b.colors, (P, q) => (v(), y("span", {
3397
3401
  key: q,
@@ -3408,7 +3412,7 @@ const wc = {
3408
3412
  spellcheck: "false",
3409
3413
  placeholder: "一行一个 hex,例如 #f87171",
3410
3414
  value: C(e.settings.customPalettes.find((b) => b.id === e.settings.branchPaletteId)),
3411
- onInput: E[9] || (E[9] = (b) => x[e.settings.customPalettes.find((P) => P.id === e.settings.branchPaletteId).id] = b.target.value)
3415
+ onInput: E[9] || (E[9] = (b) => k[e.settings.customPalettes.find((P) => P.id === e.settings.branchPaletteId).id] = b.target.value)
3412
3416
  }, null, 40, Xd),
3413
3417
  c("div", Vd, [
3414
3418
  c("button", {
@@ -3442,7 +3446,7 @@ const wc = {
3442
3446
  e.settings.taperedEdge ? (v(), y("div", Jd, [
3443
3447
  c("span", Qd, [
3444
3448
  E[40] || (E[40] = _n("层级衰减 ", -1)),
3445
- c("span", ef, xe(Math.round(e.settings.lineWidthTaper * 100)) + "%", 1)
3449
+ c("span", ef, ke(Math.round(e.settings.lineWidthTaper * 100)) + "%", 1)
3446
3450
  ]),
3447
3451
  c("input", {
3448
3452
  class: "zm-settings-number",
@@ -3498,11 +3502,11 @@ const wc = {
3498
3502
  e.hasSelection ? (v(), y("section", cf, [
3499
3503
  c("h4", uf, [
3500
3504
  E[49] || (E[49] = _n(" 节点 ", -1)),
3501
- e.selectedNodeText ? (v(), y("span", df, '"' + xe(e.selectedNodeText) + '"', 1)) : V("", !0)
3505
+ e.selectedNodeText ? (v(), y("span", df, '"' + ke(e.selectedNodeText) + '"', 1)) : V("", !0)
3502
3506
  ]),
3503
3507
  c("div", ff, [
3504
3508
  E[50] || (E[50] = c("span", { class: "zm-settings-label" }, "背景颜色", -1)),
3505
- c("span", pf, xe(((fe = e.nodeStyle) == null ? void 0 : fe.bg) || "默认"), 1)
3509
+ c("span", pf, ke(((fe = e.nodeStyle) == null ? void 0 : fe.bg) || "默认"), 1)
3506
3510
  ]),
3507
3511
  c("div", hf, [
3508
3512
  (v(), y(ue, null, et(I, (b) => {
@@ -3530,9 +3534,9 @@ const wc = {
3530
3534
  ]),
3531
3535
  c("div", vf, [
3532
3536
  E[51] || (E[51] = c("span", { class: "zm-settings-label" }, "文字颜色", -1)),
3533
- c("span", yf, xe(((ke = e.nodeStyle) == null ? void 0 : ke.textColor) || "默认"), 1)
3537
+ c("span", yf, ke(((xe = e.nodeStyle) == null ? void 0 : xe.textColor) || "默认"), 1)
3534
3538
  ]),
3535
- c("div", kf, [
3539
+ c("div", xf, [
3536
3540
  (v(), y(ue, null, et(I, (b) => {
3537
3541
  var P;
3538
3542
  return c("button", {
@@ -3541,7 +3545,7 @@ const wc = {
3541
3545
  style: Qe({ background: b }),
3542
3546
  title: b,
3543
3547
  onClick: (q) => h({ textColor: b })
3544
- }, null, 14, xf);
3548
+ }, null, 14, kf);
3545
3549
  }), 64)),
3546
3550
  c("label", wf, [
3547
3551
  c("input", {
@@ -3567,7 +3571,7 @@ const wc = {
3567
3571
  (v(), y(ue, null, et(u, (b) => c("option", {
3568
3572
  key: b.value,
3569
3573
  value: b.value
3570
- }, xe(b.label), 9, Af)), 64))
3574
+ }, ke(b.label), 9, Af)), 64))
3571
3575
  ], 40, Tf)
3572
3576
  ]),
3573
3577
  c("div", _f, [
@@ -3609,7 +3613,7 @@ const wc = {
3609
3613
  for (const [i, r] of n)
3610
3614
  t[i] = r;
3611
3615
  return t;
3612
- }, ds = /* @__PURE__ */ Of(If, [["__scopeId", "data-v-95a22309"]]), pr = 20;
3616
+ }, ds = /* @__PURE__ */ Of(If, [["__scopeId", "data-v-f1937c03"]]), pr = 20;
3613
3617
  function zf(e, n) {
3614
3618
  e.style.height = "auto";
3615
3619
  const t = n.minRows * pr, i = n.maxRows > 0 ? n.maxRows * pr : 1 / 0, r = Math.max(t, Math.min(i, e.scrollHeight));
@@ -3627,7 +3631,7 @@ function Wo(e, n = {}) {
3627
3631
  function r() {
3628
3632
  i();
3629
3633
  }
3630
- ki(async () => {
3634
+ xi(async () => {
3631
3635
  await it();
3632
3636
  const a = e.value;
3633
3637
  a && (a.addEventListener("input", r), i());
@@ -4152,7 +4156,7 @@ function yp(e) {
4152
4156
  gl(e, e.begin, { key: "beginScope" }), e.begin = hs(e.begin, { joinWith: "" });
4153
4157
  }
4154
4158
  }
4155
- function kp(e) {
4159
+ function xp(e) {
4156
4160
  if (Array.isArray(e.end)) {
4157
4161
  if (e.skip || e.excludeEnd || e.returnEnd)
4158
4162
  throw Xn("skip, excludeEnd, returnEnd not compatible with endScope: {}"), vo;
@@ -4161,11 +4165,11 @@ function kp(e) {
4161
4165
  gl(e, e.end, { key: "endScope" }), e.end = hs(e.end, { joinWith: "" });
4162
4166
  }
4163
4167
  }
4164
- function xp(e) {
4168
+ function kp(e) {
4165
4169
  e.scope && typeof e.scope == "object" && e.scope !== null && (e.beginScope = e.scope, delete e.scope);
4166
4170
  }
4167
4171
  function wp(e) {
4168
- xp(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), yp(e), kp(e);
4172
+ kp(e), typeof e.beginScope == "string" && (e.beginScope = { _wrap: e.beginScope }), typeof e.endScope == "string" && (e.endScope = { _wrap: e.endScope }), yp(e), xp(e);
4169
4173
  }
4170
4174
  function Ep(e) {
4171
4175
  function n(l, f) {
@@ -4193,7 +4197,7 @@ function Ep(e) {
4193
4197
  const u = this.matcherRe.exec(f);
4194
4198
  if (!u)
4195
4199
  return null;
4196
- const h = u.findIndex((x, C) => C > 0 && x !== void 0), g = this.matchIndexes[h];
4200
+ const h = u.findIndex((k, C) => C > 0 && k !== void 0), g = this.matchIndexes[h];
4197
4201
  return u.splice(0, h), Object.assign(u, g);
4198
4202
  }
4199
4203
  }
@@ -4289,7 +4293,7 @@ class Ap extends Error {
4289
4293
  super(n), this.name = "HTMLInjectionError", this.html = t;
4290
4294
  }
4291
4295
  }
4292
- const Go = ll, yr = Bn, kr = Symbol("nomatch"), _p = 7, bl = function(e) {
4296
+ const Go = ll, yr = Bn, xr = Symbol("nomatch"), _p = 7, bl = function(e) {
4293
4297
  const n = /* @__PURE__ */ Object.create(null), t = /* @__PURE__ */ Object.create(null), i = [];
4294
4298
  let r = !0;
4295
4299
  const a = "Could not find the language '{}', did you forget to load/include a language module?", l = { disableAutodetect: !0, name: "Plain text", contains: [] };
@@ -4327,10 +4331,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`), _e = b, oe = P), q ==
4327
4331
  language: _e
4328
4332
  };
4329
4333
  me("before:highlight", D);
4330
- const O = D.result ? D.result : x(D.language, D.code, q);
4334
+ const O = D.result ? D.result : k(D.language, D.code, q);
4331
4335
  return O.code = D.code, me("after:highlight", O), O;
4332
4336
  }
4333
- function x(b, P, q, oe) {
4337
+ function k(b, P, q, oe) {
4334
4338
  const _e = /* @__PURE__ */ Object.create(null);
4335
4339
  function D(ee, pe) {
4336
4340
  return ee.keywords[pe];
@@ -4368,7 +4372,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), _e = b, oe = P), q ==
4368
4372
  Ye.addText(Be);
4369
4373
  return;
4370
4374
  }
4371
- ee = x(ge.subLanguage, Be, !0, Ht[ge.subLanguage]), Ht[ge.subLanguage] = /** @type {CompiledMode} */
4375
+ ee = k(ge.subLanguage, Be, !0, Ht[ge.subLanguage]), Ht[ge.subLanguage] = /** @type {CompiledMode} */
4372
4376
  ee._top;
4373
4377
  } else
4374
4378
  ee = B(Be, ge.subLanguage.length ? ge.subLanguage : null);
@@ -4424,7 +4428,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), _e = b, oe = P), q ==
4424
4428
  function dt(ee) {
4425
4429
  const pe = ee[0], Re = P.substring(ee.index), Pe = j(ge, ee, Re);
4426
4430
  if (!Pe)
4427
- return kr;
4431
+ return xr;
4428
4432
  const tt = ge;
4429
4433
  ge.endScope && ge.endScope._wrap ? (se(), U(pe, ge.endScope._wrap)) : ge.endScope && ge.endScope._multi ? (se(), S(ge.endScope, ee)) : tt.skip ? Be += pe : (tt.returnEnd || tt.excludeEnd || (Be += pe), se(), tt.excludeEnd && (Be = pe));
4430
4434
  do
@@ -4439,7 +4443,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), _e = b, oe = P), q ==
4439
4443
  ee.forEach((pe) => Ye.openNode(pe));
4440
4444
  }
4441
4445
  let bt = {};
4442
- function xn(ee, pe) {
4446
+ function kn(ee, pe) {
4443
4447
  const Re = pe && pe[0];
4444
4448
  if (Be += ee, Re == null)
4445
4449
  return se(), 0;
@@ -4457,7 +4461,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), _e = b, oe = P), q ==
4457
4461
  throw Pe.mode = ge, Pe;
4458
4462
  } else if (pe.type === "end") {
4459
4463
  const Pe = dt(pe);
4460
- if (Pe !== kr)
4464
+ if (Pe !== xr)
4461
4465
  return Pe;
4462
4466
  }
4463
4467
  if (pe.type === "illegal" && Re === "")
@@ -4483,10 +4487,10 @@ https://github.com/highlightjs/highlight.js/issues/2277`), _e = b, oe = P), q ==
4483
4487
  _t++, hn ? hn = !1 : ge.matcher.considerAll(), ge.matcher.lastIndex = pt;
4484
4488
  const ee = ge.matcher.exec(P);
4485
4489
  if (!ee) break;
4486
- const pe = P.substring(pt, ee.index), Re = xn(pe, ee);
4490
+ const pe = P.substring(pt, ee.index), Re = kn(pe, ee);
4487
4491
  pt = ee.index + Re;
4488
4492
  }
4489
- xn(P.substring(pt));
4493
+ kn(P.substring(pt));
4490
4494
  }
4491
4495
  return Ye.finalize(), pn = Ye.toHTML(), {
4492
4496
  language: b,
@@ -4538,7 +4542,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), _e = b, oe = P), q ==
4538
4542
  function B(b, P) {
4539
4543
  P = P || f.languages || Object.keys(n);
4540
4544
  const q = C(b), oe = P.filter(E).filter(ve).map(
4541
- (se) => x(se, b, !1)
4545
+ (se) => k(se, b, !1)
4542
4546
  );
4543
4547
  oe.unshift(q);
4544
4548
  const _e = oe.sort((se, U) => {
@@ -4591,7 +4595,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), _e = b, oe = P), q ==
4591
4595
  const M = () => {
4592
4596
  T(), di("10.6.0", "initHighlighting() deprecated. Use highlightAll() now.");
4593
4597
  };
4594
- function k() {
4598
+ function x() {
4595
4599
  T(), di("10.6.0", "initHighlightingOnLoad() deprecated. Use highlightAll() now.");
4596
4600
  }
4597
4601
  let d = !1;
@@ -4638,7 +4642,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), _e = b, oe = P), q ==
4638
4642
  const P = E(b);
4639
4643
  return P && !P.disableAutodetect;
4640
4644
  }
4641
- function ke(b) {
4645
+ function xe(b) {
4642
4646
  b["before:highlightBlock"] && !b["before:highlightElement"] && (b["before:highlightElement"] = (P) => {
4643
4647
  b["before:highlightBlock"](
4644
4648
  Object.assign({ block: P.el }, P)
@@ -4650,7 +4654,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), _e = b, oe = P), q ==
4650
4654
  });
4651
4655
  }
4652
4656
  function ne(b) {
4653
- ke(b), i.push(b);
4657
+ xe(b), i.push(b);
4654
4658
  }
4655
4659
  function Te(b) {
4656
4660
  const P = i.indexOf(b);
@@ -4674,7 +4678,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`), _e = b, oe = P), q ==
4674
4678
  highlightBlock: Me,
4675
4679
  configure: I,
4676
4680
  initHighlighting: M,
4677
- initHighlightingOnLoad: k,
4681
+ initHighlightingOnLoad: x,
4678
4682
  registerLanguage: H,
4679
4683
  unregisterLanguage: X,
4680
4684
  listLanguages: Q,
@@ -4773,7 +4777,7 @@ function jo(e) {
4773
4777
  end: /'/
4774
4778
  }, g = {
4775
4779
  match: /\\'/
4776
- }, x = {
4780
+ }, k = {
4777
4781
  begin: /\$?\(\(/,
4778
4782
  end: /\)\)/,
4779
4783
  contains: [
@@ -4824,7 +4828,7 @@ function jo(e) {
4824
4828
  ], I = [
4825
4829
  "true",
4826
4830
  "false"
4827
- ], M = { match: /(\/[a-z._-]+)+/ }, k = [
4831
+ ], M = { match: /(\/[a-z._-]+)+/ }, x = [
4828
4832
  "break",
4829
4833
  "cd",
4830
4834
  "continue",
@@ -5051,7 +5055,7 @@ function jo(e) {
5051
5055
  keyword: W,
5052
5056
  literal: I,
5053
5057
  built_in: [
5054
- ...k,
5058
+ ...x,
5055
5059
  ...d,
5056
5060
  // Shell modifiers
5057
5061
  "set",
@@ -5066,7 +5070,7 @@ function jo(e) {
5066
5070
  e.SHEBANG(),
5067
5071
  // to catch unknown shells but still highlight the shebang
5068
5072
  N,
5069
- x,
5073
+ k,
5070
5074
  a,
5071
5075
  l,
5072
5076
  M,
@@ -5998,7 +6002,7 @@ function Dp(e) {
5998
6002
  ]
5999
6003
  };
6000
6004
  }
6001
- function xr(e) {
6005
+ function kr(e) {
6002
6006
  const a = {
6003
6007
  keyword: [
6004
6008
  "break",
@@ -6485,7 +6489,7 @@ const Er = "[A-Za-z$_][0-9A-Za-z$_]*", Bp = [
6485
6489
  "Intl",
6486
6490
  // WebAssembly
6487
6491
  "WebAssembly"
6488
- ], kl = [
6492
+ ], xl = [
6489
6493
  "Error",
6490
6494
  "EvalError",
6491
6495
  "InternalError",
@@ -6494,7 +6498,7 @@ const Er = "[A-Za-z$_][0-9A-Za-z$_]*", Bp = [
6494
6498
  "SyntaxError",
6495
6499
  "TypeError",
6496
6500
  "URIError"
6497
- ], xl = [
6501
+ ], kl = [
6498
6502
  "setInterval",
6499
6503
  "setTimeout",
6500
6504
  "clearInterval",
@@ -6525,9 +6529,9 @@ const Er = "[A-Za-z$_][0-9A-Za-z$_]*", Bp = [
6525
6529
  "global"
6526
6530
  // Node.js
6527
6531
  ], Fp = [].concat(
6528
- xl,
6532
+ kl,
6529
6533
  yl,
6530
- kl
6534
+ xl
6531
6535
  );
6532
6536
  function Sr(e) {
6533
6537
  const n = e.regex, t = (q, { after: oe }) => {
@@ -6574,7 +6578,7 @@ function Sr(e) {
6574
6578
  literal: Up,
6575
6579
  built_in: Fp,
6576
6580
  "variable.language": Hp
6577
- }, u = "[0-9](_?[0-9])*", h = `\\.(${u})`, g = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", x = {
6581
+ }, u = "[0-9](_?[0-9])*", h = `\\.(${u})`, g = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", k = {
6578
6582
  className: "number",
6579
6583
  variants: [
6580
6584
  // DecimalLiteral
@@ -6642,7 +6646,7 @@ function Sr(e) {
6642
6646
  e.BACKSLASH_ESCAPE,
6643
6647
  C
6644
6648
  ]
6645
- }, k = {
6649
+ }, x = {
6646
6650
  className: "comment",
6647
6651
  variants: [
6648
6652
  e.COMMENT(
@@ -6696,7 +6700,7 @@ function Sr(e) {
6696
6700
  I,
6697
6701
  // Skip numbers when they are part of a variable name
6698
6702
  { match: /\$\d+/ },
6699
- x
6703
+ k
6700
6704
  // This is intentional:
6701
6705
  // See https://github.com/highlightjs/highlight.js/issues/3288
6702
6706
  // hljs.REGEXP_MODE
@@ -6711,7 +6715,7 @@ function Sr(e) {
6711
6715
  "self"
6712
6716
  ].concat(d)
6713
6717
  });
6714
- const T = [].concat(k, C.contains), H = T.concat([
6718
+ const T = [].concat(x, C.contains), H = T.concat([
6715
6719
  // eat recursive parens in sub expressions
6716
6720
  {
6717
6721
  begin: /(\s*)\(/,
@@ -6783,7 +6787,7 @@ function Sr(e) {
6783
6787
  _: [
6784
6788
  // se we still get relevance credit for JS library classes
6785
6789
  ...yl,
6786
- ...kl
6790
+ ...xl
6787
6791
  ]
6788
6792
  }
6789
6793
  }, fe = {
@@ -6816,7 +6820,7 @@ function Sr(e) {
6816
6820
  label: "func.def",
6817
6821
  contains: [X],
6818
6822
  illegal: /%/
6819
- }, ke = {
6823
+ }, xe = {
6820
6824
  relevance: 0,
6821
6825
  match: /\b[A-Z][A-Z_0-9]+\b/,
6822
6826
  className: "variable.constant"
@@ -6828,7 +6832,7 @@ function Sr(e) {
6828
6832
  match: n.concat(
6829
6833
  /\b/,
6830
6834
  ne([
6831
- ...xl,
6835
+ ...kl,
6832
6836
  "super",
6833
6837
  "import"
6834
6838
  ].map((q) => `${q}\\s*\\(`)),
@@ -6904,10 +6908,10 @@ function Sr(e) {
6904
6908
  N,
6905
6909
  W,
6906
6910
  I,
6907
- k,
6911
+ x,
6908
6912
  // Skip numbers when they are part of a variable name
6909
6913
  { match: /\$\d+/ },
6910
- x,
6914
+ k,
6911
6915
  E,
6912
6916
  {
6913
6917
  scope: "attr",
@@ -6921,7 +6925,7 @@ function Sr(e) {
6921
6925
  keywords: "return throw case",
6922
6926
  relevance: 0,
6923
6927
  contains: [
6924
- k,
6928
+ x,
6925
6929
  e.REGEXP_MODE,
6926
6930
  {
6927
6931
  className: "function",
@@ -7028,7 +7032,7 @@ function Sr(e) {
7028
7032
  contains: [X]
7029
7033
  },
7030
7034
  Te,
7031
- ke,
7035
+ xe,
7032
7036
  Q,
7033
7037
  Me,
7034
7038
  {
@@ -7222,8 +7226,8 @@ function Tr(e) {
7222
7226
  relevance: 0
7223
7227
  }
7224
7228
  ]
7225
- }, x = e.inherit(h, { contains: [] }), C = e.inherit(g, { contains: [] });
7226
- h.contains.push(C), g.contains.push(x);
7229
+ }, k = e.inherit(h, { contains: [] }), C = e.inherit(g, { contains: [] });
7230
+ h.contains.push(C), g.contains.push(k);
7227
7231
  let B = [
7228
7232
  t,
7229
7233
  u
@@ -7231,7 +7235,7 @@ function Tr(e) {
7231
7235
  return [
7232
7236
  h,
7233
7237
  g,
7234
- x,
7238
+ k,
7235
7239
  C
7236
7240
  ].forEach((M) => {
7237
7241
  M.contains = M.contains.concat(B);
@@ -7431,7 +7435,7 @@ function Ar(e) {
7431
7435
  }, g = {
7432
7436
  begin: /\{\{/,
7433
7437
  relevance: 0
7434
- }, x = {
7438
+ }, k = {
7435
7439
  className: "string",
7436
7440
  contains: [e.BACKSLASH_ESCAPE],
7437
7441
  variants: [
@@ -7592,14 +7596,14 @@ function Ar(e) {
7592
7596
  "self",
7593
7597
  u,
7594
7598
  W,
7595
- x,
7599
+ k,
7596
7600
  e.HASH_COMMENT_MODE
7597
7601
  ]
7598
7602
  }
7599
7603
  ]
7600
7604
  };
7601
7605
  return h.contains = [
7602
- x,
7606
+ k,
7603
7607
  W,
7604
7608
  u
7605
7609
  ], {
@@ -7627,7 +7631,7 @@ function Ar(e) {
7627
7631
  relevance: 0
7628
7632
  },
7629
7633
  { match: /\bor\b/, scope: "keyword" },
7630
- x,
7634
+ k,
7631
7635
  I,
7632
7636
  e.HASH_COMMENT_MODE,
7633
7637
  {
@@ -7676,7 +7680,7 @@ function Ar(e) {
7676
7680
  contains: [
7677
7681
  W,
7678
7682
  M,
7679
- x
7683
+ k
7680
7684
  ]
7681
7685
  }
7682
7686
  ]
@@ -8500,7 +8504,7 @@ function Gp(e) {
8500
8504
  "var_pop",
8501
8505
  "var_samp",
8502
8506
  "width_bucket"
8503
- ], x = [
8507
+ ], k = [
8504
8508
  "current_catalog",
8505
8509
  "current_date",
8506
8510
  "current_default_transform_group",
@@ -8548,7 +8552,7 @@ function Gp(e) {
8548
8552
  relevance: 0,
8549
8553
  keywords: { built_in: B }
8550
8554
  };
8551
- function k(H) {
8555
+ function x(H) {
8552
8556
  return n.concat(
8553
8557
  /\b/,
8554
8558
  n.either(...H.map((X) => X.replace(/\s+/, "\\s+"))),
@@ -8557,7 +8561,7 @@ function Gp(e) {
8557
8561
  }
8558
8562
  const d = {
8559
8563
  scope: "keyword",
8560
- match: k(C),
8564
+ match: x(C),
8561
8565
  relevance: 0
8562
8566
  };
8563
8567
  function T(H, {
@@ -8577,12 +8581,12 @@ function Gp(e) {
8577
8581
  keyword: T(N, { when: (H) => H.length < 3 }),
8578
8582
  literal: a,
8579
8583
  type: f,
8580
- built_in: x
8584
+ built_in: k
8581
8585
  },
8582
8586
  contains: [
8583
8587
  {
8584
8588
  scope: "type",
8585
- match: k(l)
8589
+ match: x(l)
8586
8590
  },
8587
8591
  d,
8588
8592
  M,
@@ -8787,7 +8791,7 @@ function jp(e) {
8787
8791
  literal: El,
8788
8792
  built_in: Cl,
8789
8793
  "variable.language": _l
8790
- }, u = "[0-9](_?[0-9])*", h = `\\.(${u})`, g = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", x = {
8794
+ }, u = "[0-9](_?[0-9])*", h = `\\.(${u})`, g = "0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*", k = {
8791
8795
  className: "number",
8792
8796
  variants: [
8793
8797
  // DecimalLiteral
@@ -8855,7 +8859,7 @@ function jp(e) {
8855
8859
  e.BACKSLASH_ESCAPE,
8856
8860
  C
8857
8861
  ]
8858
- }, k = {
8862
+ }, x = {
8859
8863
  className: "comment",
8860
8864
  variants: [
8861
8865
  e.COMMENT(
@@ -8909,7 +8913,7 @@ function jp(e) {
8909
8913
  I,
8910
8914
  // Skip numbers when they are part of a variable name
8911
8915
  { match: /\$\d+/ },
8912
- x
8916
+ k
8913
8917
  // This is intentional:
8914
8918
  // See https://github.com/highlightjs/highlight.js/issues/3288
8915
8919
  // hljs.REGEXP_MODE
@@ -8924,7 +8928,7 @@ function jp(e) {
8924
8928
  "self"
8925
8929
  ].concat(d)
8926
8930
  });
8927
- const T = [].concat(k, C.contains), H = T.concat([
8931
+ const T = [].concat(x, C.contains), H = T.concat([
8928
8932
  // eat recursive parens in sub expressions
8929
8933
  {
8930
8934
  begin: /(\s*)\(/,
@@ -9029,7 +9033,7 @@ function jp(e) {
9029
9033
  label: "func.def",
9030
9034
  contains: [X],
9031
9035
  illegal: /%/
9032
- }, ke = {
9036
+ }, xe = {
9033
9037
  relevance: 0,
9034
9038
  match: /\b[A-Z][A-Z_0-9]+\b/,
9035
9039
  className: "variable.constant"
@@ -9117,10 +9121,10 @@ function jp(e) {
9117
9121
  N,
9118
9122
  W,
9119
9123
  I,
9120
- k,
9124
+ x,
9121
9125
  // Skip numbers when they are part of a variable name
9122
9126
  { match: /\$\d+/ },
9123
- x,
9127
+ k,
9124
9128
  E,
9125
9129
  {
9126
9130
  scope: "attr",
@@ -9134,7 +9138,7 @@ function jp(e) {
9134
9138
  keywords: "return throw case",
9135
9139
  relevance: 0,
9136
9140
  contains: [
9137
- k,
9141
+ x,
9138
9142
  e.REGEXP_MODE,
9139
9143
  {
9140
9144
  className: "function",
@@ -9241,7 +9245,7 @@ function jp(e) {
9241
9245
  contains: [X]
9242
9246
  },
9243
9247
  Te,
9244
- ke,
9248
+ xe,
9245
9249
  Q,
9246
9250
  Me,
9247
9251
  {
@@ -9309,11 +9313,11 @@ function Cr(e) {
9309
9313
  }, g = {
9310
9314
  className: "meta",
9311
9315
  begin: "@" + i
9312
- }, x = (W, I, M) => {
9313
- const k = W.contains.findIndex((d) => d.label === I);
9314
- if (k === -1)
9316
+ }, k = (W, I, M) => {
9317
+ const x = W.contains.findIndex((d) => d.label === I);
9318
+ if (x === -1)
9315
9319
  throw new Error("can not find mode to replace");
9316
- W.contains.splice(k, 1, M);
9320
+ W.contains.splice(x, 1, M);
9317
9321
  };
9318
9322
  Object.assign(t.keywords, h), t.exports.PARAMS_CONTAINS.push(g);
9319
9323
  const C = t.contains.find((W) => W.scope === "attr"), B = Object.assign(
@@ -9334,7 +9338,7 @@ function Cr(e) {
9334
9338
  l,
9335
9339
  B
9336
9340
  // Added for optional property assignment highlighting
9337
- ]), x(t, "shebang", e.SHEBANG()), x(t, "use_strict", f);
9341
+ ]), k(t, "shebang", e.SHEBANG()), k(t, "use_strict", f);
9338
9342
  const N = t.contains.find((W) => W.label === "func.def");
9339
9343
  return N.relevance = 0, Object.assign(t, {
9340
9344
  name: "TypeScript",
@@ -9747,8 +9751,8 @@ const ms = {
9747
9751
  sh: jo,
9748
9752
  shell: jo,
9749
9753
  css: Dp,
9750
- go: xr,
9751
- golang: xr,
9754
+ go: kr,
9755
+ golang: kr,
9752
9756
  java: Pp,
9753
9757
  javascript: Sr,
9754
9758
  js: Sr,
@@ -9825,8 +9829,8 @@ var Yp = ((e = "") => {
9825
9829
  } catch {
9826
9830
  return !1;
9827
9831
  }
9828
- })(), At = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: fi((e) => new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: fi((e) => new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: fi((e) => new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)), headingBeginRegex: fi((e) => new RegExp(`^ {0,${e}}#`)), htmlBeginRegex: fi((e) => new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: fi((e) => new RegExp(`^ {0,${e}}>`)) }, qp = /^(?:[ \t]*(?:\n|$))+/, Xp = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Vp = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Xi = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Zp = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ys = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Rl = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Nl = Fe(Rl).replace(/bull/g, ys).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Jp = Fe(Rl).replace(/bull/g, ys).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), ks = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Qp = /^[^\n]+/, xs = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, eh = Fe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", xs).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), th = Fe(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, ys).getRegex(), Ao = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", ws = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, nh = Fe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", ws).replace("tag", Ao).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Il = Fe(ks).replace("hr", Xi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ao).getRegex(), ih = Fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Il).getRegex(), Es = { blockquote: ih, code: Xp, def: eh, fences: Vp, heading: Zp, hr: Xi, html: nh, lheading: Nl, list: th, newline: qp, paragraph: Il, table: Yn, text: Qp }, Nr = Fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Xi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ao).getRegex(), oh = { ...Es, lheading: Jp, table: Nr, paragraph: Fe(ks).replace("hr", Xi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Nr).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ao).getRegex() }, sh = { ...Es, html: Fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", ws).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Yn, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: Fe(ks).replace("hr", Xi).replace("heading", ` *#{1,6} *[^
9829
- ]`).replace("lheading", Nl).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, rh = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, lh = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ol = /^( {2,}|\\)\n(?!\s*$)/, ah = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ei = /[\p{P}\p{S}]/u, _o = /[\s\p{P}\p{S}]/u, Ss = /[^\s\p{P}\p{S}]/u, ch = Fe(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, _o).getRegex(), zl = /(?!~)[\p{P}\p{S}]/u, uh = /(?!~)[\s\p{P}\p{S}]/u, dh = /(?:[^\s\p{P}\p{S}]|~)/u, fh = Fe(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Yp ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Ll = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, ph = Fe(Ll, "u").replace(/punct/g, Ei).getRegex(), hh = Fe(Ll, "u").replace(/punct/g, zl).getRegex(), $l = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", gh = Fe($l, "gu").replace(/notPunctSpace/g, Ss).replace(/punctSpace/g, _o).replace(/punct/g, Ei).getRegex(), mh = Fe($l, "gu").replace(/notPunctSpace/g, dh).replace(/punctSpace/g, uh).replace(/punct/g, zl).getRegex(), bh = Fe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Ss).replace(/punctSpace/g, _o).replace(/punct/g, Ei).getRegex(), vh = Fe(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ei).getRegex(), yh = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", kh = Fe(yh, "gu").replace(/notPunctSpace/g, Ss).replace(/punctSpace/g, _o).replace(/punct/g, Ei).getRegex(), xh = Fe(/\\(punct)/, "gu").replace(/punct/g, Ei).getRegex(), wh = Fe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Eh = Fe(ws).replace("(?:-->|$)", "-->").getRegex(), Sh = Fe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Eh).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), ko = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Th = Fe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", ko).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Dl = Fe(/^!?\[(label)\]\[(ref)\]/).replace("label", ko).replace("ref", xs).getRegex(), Pl = Fe(/^!?\[(ref)\](?:\[\])?/).replace("ref", xs).getRegex(), Ah = Fe("reflink|nolink(?!\\()", "g").replace("reflink", Dl).replace("nolink", Pl).getRegex(), Ir = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Ts = { _backpedal: Yn, anyPunctuation: xh, autolink: wh, blockSkip: fh, br: Ol, code: lh, del: Yn, delLDelim: Yn, delRDelim: Yn, emStrongLDelim: ph, emStrongRDelimAst: gh, emStrongRDelimUnd: bh, escape: rh, link: Th, nolink: Pl, punctuation: ch, reflink: Dl, reflinkSearch: Ah, tag: Sh, text: ah, url: Yn }, _h = { ...Ts, link: Fe(/^!?\[(label)\]\((.*?)\)/).replace("label", ko).getRegex(), reflink: Fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", ko).getRegex() }, ns = { ...Ts, emStrongRDelimAst: mh, emStrongLDelim: hh, delLDelim: vh, delRDelim: kh, url: Fe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Ir).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: Fe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Ir).getRegex() }, Ch = { ...ns, br: Fe(Ol).replace("{2,}", "*").getRegex(), text: Fe(ns.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, fo = { normal: Es, gfm: oh, pedantic: sh }, Pi = { normal: Ts, gfm: ns, breaks: Ch, pedantic: _h }, Mh = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Or = (e) => Mh[e];
9832
+ })(), At = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: fi((e) => new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: fi((e) => new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: fi((e) => new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)), headingBeginRegex: fi((e) => new RegExp(`^ {0,${e}}#`)), htmlBeginRegex: fi((e) => new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: fi((e) => new RegExp(`^ {0,${e}}>`)) }, qp = /^(?:[ \t]*(?:\n|$))+/, Xp = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Vp = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, Xi = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Zp = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, ys = / {0,3}(?:[*+-]|\d{1,9}[.)])/, Rl = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, Nl = Fe(Rl).replace(/bull/g, ys).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), Jp = Fe(Rl).replace(/bull/g, ys).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), xs = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, Qp = /^[^\n]+/, ks = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, eh = Fe(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", ks).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), th = Fe(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, ys).getRegex(), Ao = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", ws = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, nh = Fe("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", ws).replace("tag", Ao).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), Il = Fe(xs).replace("hr", Xi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ao).getRegex(), ih = Fe(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Il).getRegex(), Es = { blockquote: ih, code: Xp, def: eh, fences: Vp, heading: Zp, hr: Xi, html: nh, lheading: Nl, list: th, newline: qp, paragraph: Il, table: Yn, text: Qp }, Nr = Fe("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", Xi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ao).getRegex(), oh = { ...Es, lheading: Jp, table: Nr, paragraph: Fe(xs).replace("hr", Xi).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", Nr).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Ao).getRegex() }, sh = { ...Es, html: Fe(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", ws).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: Yn, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: Fe(xs).replace("hr", Xi).replace("heading", ` *#{1,6} *[^
9833
+ ]`).replace("lheading", Nl).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, rh = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, lh = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, Ol = /^( {2,}|\\)\n(?!\s*$)/, ah = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Ei = /[\p{P}\p{S}]/u, _o = /[\s\p{P}\p{S}]/u, Ss = /[^\s\p{P}\p{S}]/u, ch = Fe(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, _o).getRegex(), zl = /(?!~)[\p{P}\p{S}]/u, uh = /(?!~)[\s\p{P}\p{S}]/u, dh = /(?:[^\s\p{P}\p{S}]|~)/u, fh = Fe(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Yp ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Ll = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, ph = Fe(Ll, "u").replace(/punct/g, Ei).getRegex(), hh = Fe(Ll, "u").replace(/punct/g, zl).getRegex(), $l = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", gh = Fe($l, "gu").replace(/notPunctSpace/g, Ss).replace(/punctSpace/g, _o).replace(/punct/g, Ei).getRegex(), mh = Fe($l, "gu").replace(/notPunctSpace/g, dh).replace(/punctSpace/g, uh).replace(/punct/g, zl).getRegex(), bh = Fe("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Ss).replace(/punctSpace/g, _o).replace(/punct/g, Ei).getRegex(), vh = Fe(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, Ei).getRegex(), yh = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", xh = Fe(yh, "gu").replace(/notPunctSpace/g, Ss).replace(/punctSpace/g, _o).replace(/punct/g, Ei).getRegex(), kh = Fe(/\\(punct)/, "gu").replace(/punct/g, Ei).getRegex(), wh = Fe(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Eh = Fe(ws).replace("(?:-->|$)", "-->").getRegex(), Sh = Fe("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Eh).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), xo = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/, Th = Fe(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", xo).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Dl = Fe(/^!?\[(label)\]\[(ref)\]/).replace("label", xo).replace("ref", ks).getRegex(), Pl = Fe(/^!?\[(ref)\](?:\[\])?/).replace("ref", ks).getRegex(), Ah = Fe("reflink|nolink(?!\\()", "g").replace("reflink", Dl).replace("nolink", Pl).getRegex(), Ir = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Ts = { _backpedal: Yn, anyPunctuation: kh, autolink: wh, blockSkip: fh, br: Ol, code: lh, del: Yn, delLDelim: Yn, delRDelim: Yn, emStrongLDelim: ph, emStrongRDelimAst: gh, emStrongRDelimUnd: bh, escape: rh, link: Th, nolink: Pl, punctuation: ch, reflink: Dl, reflinkSearch: Ah, tag: Sh, text: ah, url: Yn }, _h = { ...Ts, link: Fe(/^!?\[(label)\]\((.*?)\)/).replace("label", xo).getRegex(), reflink: Fe(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", xo).getRegex() }, ns = { ...Ts, emStrongRDelimAst: mh, emStrongLDelim: hh, delLDelim: vh, delRDelim: xh, url: Fe(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", Ir).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: Fe(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", Ir).getRegex() }, Ch = { ...ns, br: Fe(Ol).replace("{2,}", "*").getRegex(), text: Fe(ns.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, fo = { normal: Es, gfm: oh, pedantic: sh }, Pi = { normal: Ts, gfm: ns, breaks: Ch, pedantic: _h }, Mh = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, Or = (e) => Mh[e];
9830
9834
  function vn(e, n) {
9831
9835
  if (n) {
9832
9836
  if (At.escapeTest.test(e)) return e.replace(At.escapeReplace, Or);
@@ -9903,7 +9907,7 @@ function Ih(e, n, t) {
9903
9907
  }).join(`
9904
9908
  `);
9905
9909
  }
9906
- var xo = class {
9910
+ var ko = class {
9907
9911
  constructor(e) {
9908
9912
  qe(this, "options");
9909
9913
  qe(this, "rules");
@@ -9963,8 +9967,8 @@ var xo = class {
9963
9967
  i = i ? `${i}
9964
9968
  ${h}` : h, r = r ? `${r}
9965
9969
  ${g}` : g;
9966
- let x = this.lexer.state.top;
9967
- if (this.lexer.state.top = !0, this.lexer.blockTokens(g, a, !0), this.lexer.state.top = x, t.length === 0) break;
9970
+ let k = this.lexer.state.top;
9971
+ if (this.lexer.state.top = !0, this.lexer.blockTokens(g, a, !0), this.lexer.state.top = k, t.length === 0) break;
9968
9972
  let C = a.at(-1);
9969
9973
  if ((C == null ? void 0 : C.type) === "code") break;
9970
9974
  if ((C == null ? void 0 : C.type) === "blockquote") {
@@ -9995,25 +9999,25 @@ ${g}` : g;
9995
9999
  let u = !1, h = "", g = "";
9996
10000
  if (!(n = a.exec(e)) || this.rules.block.hr.test(e)) break;
9997
10001
  h = n[0], e = e.substring(h.length);
9998
- let x = Nh(n[2].split(`
10002
+ let k = Nh(n[2].split(`
9999
10003
  `, 1)[0], n[1].length), C = e.split(`
10000
- `, 1)[0], B = !x.trim(), N = 0;
10001
- if (this.options.pedantic ? (N = 2, g = x.trimStart()) : B ? N = n[1].length + 1 : (N = x.search(this.rules.other.nonSpaceChar), N = N > 4 ? 1 : N, g = x.slice(N), N += n[1].length), B && this.rules.other.blankLine.test(C) && (h += C + `
10004
+ `, 1)[0], B = !k.trim(), N = 0;
10005
+ if (this.options.pedantic ? (N = 2, g = k.trimStart()) : B ? N = n[1].length + 1 : (N = k.search(this.rules.other.nonSpaceChar), N = N > 4 ? 1 : N, g = k.slice(N), N += n[1].length), B && this.rules.other.blankLine.test(C) && (h += C + `
10002
10006
  `, e = e.substring(C.length + 1), u = !0), !u) {
10003
- let W = this.rules.other.nextBulletRegex(N), I = this.rules.other.hrRegex(N), M = this.rules.other.fencesBeginRegex(N), k = this.rules.other.headingBeginRegex(N), d = this.rules.other.htmlBeginRegex(N), T = this.rules.other.blockquoteBeginRegex(N);
10007
+ let W = this.rules.other.nextBulletRegex(N), I = this.rules.other.hrRegex(N), M = this.rules.other.fencesBeginRegex(N), x = this.rules.other.headingBeginRegex(N), d = this.rules.other.htmlBeginRegex(N), T = this.rules.other.blockquoteBeginRegex(N);
10004
10008
  for (; e; ) {
10005
10009
  let H = e.split(`
10006
10010
  `, 1)[0], X;
10007
- if (C = H, this.options.pedantic ? (C = C.replace(this.rules.other.listReplaceNesting, " "), X = C) : X = C.replace(this.rules.other.tabCharGlobal, " "), M.test(C) || k.test(C) || d.test(C) || T.test(C) || W.test(C) || I.test(C)) break;
10011
+ if (C = H, this.options.pedantic ? (C = C.replace(this.rules.other.listReplaceNesting, " "), X = C) : X = C.replace(this.rules.other.tabCharGlobal, " "), M.test(C) || x.test(C) || d.test(C) || T.test(C) || W.test(C) || I.test(C)) break;
10008
10012
  if (X.search(this.rules.other.nonSpaceChar) >= N || !C.trim()) g += `
10009
10013
  ` + X.slice(N);
10010
10014
  else {
10011
- if (B || x.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || M.test(x) || k.test(x) || I.test(x)) break;
10015
+ if (B || k.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || M.test(k) || x.test(k) || I.test(k)) break;
10012
10016
  g += `
10013
10017
  ` + C;
10014
10018
  }
10015
10019
  B = !C.trim(), h += H + `
10016
- `, e = e.substring(H.length + 1), x = X.slice(N);
10020
+ `, e = e.substring(H.length + 1), k = X.slice(N);
10017
10021
  }
10018
10022
  }
10019
10023
  r.loose || (l ? r.loose = !0 : this.rules.other.doubleBlankLine.test(h) && (l = !0)), r.items.push({ type: "list_item", raw: h, task: !!this.options.gfm && this.rules.other.listIsTask.test(g), loose: !1, text: g, tokens: [] }), r.raw += h;
@@ -10027,19 +10031,19 @@ ${g}` : g;
10027
10031
  let h = u.tokens[0];
10028
10032
  if (u.task && ((h == null ? void 0 : h.type) === "text" || (h == null ? void 0 : h.type) === "paragraph")) {
10029
10033
  u.text = u.text.replace(this.rules.other.listReplaceTask, ""), h.raw = h.raw.replace(this.rules.other.listReplaceTask, ""), h.text = h.text.replace(this.rules.other.listReplaceTask, "");
10030
- for (let x = this.lexer.inlineQueue.length - 1; x >= 0; x--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[x].src)) {
10031
- this.lexer.inlineQueue[x].src = this.lexer.inlineQueue[x].src.replace(this.rules.other.listReplaceTask, "");
10034
+ for (let k = this.lexer.inlineQueue.length - 1; k >= 0; k--) if (this.rules.other.listIsTask.test(this.lexer.inlineQueue[k].src)) {
10035
+ this.lexer.inlineQueue[k].src = this.lexer.inlineQueue[k].src.replace(this.rules.other.listReplaceTask, "");
10032
10036
  break;
10033
10037
  }
10034
10038
  let g = this.rules.other.listTaskCheckbox.exec(u.raw);
10035
10039
  if (g) {
10036
- let x = { type: "checkbox", raw: g[0] + " ", checked: g[0] !== "[ ]" };
10037
- u.checked = x.checked, r.loose ? u.tokens[0] && ["paragraph", "text"].includes(u.tokens[0].type) && "tokens" in u.tokens[0] && u.tokens[0].tokens ? (u.tokens[0].raw = x.raw + u.tokens[0].raw, u.tokens[0].text = x.raw + u.tokens[0].text, u.tokens[0].tokens.unshift(x)) : u.tokens.unshift({ type: "paragraph", raw: x.raw, text: x.raw, tokens: [x] }) : u.tokens.unshift(x);
10040
+ let k = { type: "checkbox", raw: g[0] + " ", checked: g[0] !== "[ ]" };
10041
+ u.checked = k.checked, r.loose ? u.tokens[0] && ["paragraph", "text"].includes(u.tokens[0].type) && "tokens" in u.tokens[0] && u.tokens[0].tokens ? (u.tokens[0].raw = k.raw + u.tokens[0].raw, u.tokens[0].text = k.raw + u.tokens[0].text, u.tokens[0].tokens.unshift(k)) : u.tokens.unshift({ type: "paragraph", raw: k.raw, text: k.raw, tokens: [k] }) : u.tokens.unshift(k);
10038
10042
  }
10039
10043
  } else u.task && (u.task = !1);
10040
10044
  if (!r.loose) {
10041
- let g = u.tokens.filter((C) => C.type === "space"), x = g.length > 0 && g.some((C) => this.rules.other.anyLine.test(C.raw));
10042
- r.loose = x;
10045
+ let g = u.tokens.filter((C) => C.type === "space"), k = g.length > 0 && g.some((C) => this.rules.other.anyLine.test(C.raw));
10046
+ r.loose = k;
10043
10047
  }
10044
10048
  }
10045
10049
  if (r.loose) for (let u of r.items) {
@@ -10156,13 +10160,13 @@ ${g}` : g;
10156
10160
  }
10157
10161
  if (f -= l, f > 0) continue;
10158
10162
  l = Math.min(l, l + f + u);
10159
- let g = [...i[0]][0].length, x = e.slice(0, r + i.index + g + l);
10163
+ let g = [...i[0]][0].length, k = e.slice(0, r + i.index + g + l);
10160
10164
  if (Math.min(r, l) % 2) {
10161
- let B = x.slice(1, -1);
10162
- return { type: "em", raw: x, text: B, tokens: this.lexer.inlineTokens(B) };
10165
+ let B = k.slice(1, -1);
10166
+ return { type: "em", raw: k, text: B, tokens: this.lexer.inlineTokens(B) };
10163
10167
  }
10164
- let C = x.slice(2, -2);
10165
- return { type: "strong", raw: x, text: C, tokens: this.lexer.inlineTokens(C) };
10168
+ let C = k.slice(2, -2);
10169
+ return { type: "strong", raw: k, text: C, tokens: this.lexer.inlineTokens(C) };
10166
10170
  }
10167
10171
  }
10168
10172
  }
@@ -10189,8 +10193,8 @@ ${g}` : g;
10189
10193
  }
10190
10194
  if (f -= l, f > 0) continue;
10191
10195
  l = Math.min(l, l + f);
10192
- let h = [...i[0]][0].length, g = e.slice(0, r + i.index + h + l), x = g.slice(r, -r);
10193
- return { type: "del", raw: g, text: x, tokens: this.lexer.inlineTokens(x) };
10196
+ let h = [...i[0]][0].length, g = e.slice(0, r + i.index + h + l), k = g.slice(r, -r);
10197
+ return { type: "del", raw: g, text: k, tokens: this.lexer.inlineTokens(k) };
10194
10198
  }
10195
10199
  }
10196
10200
  }
@@ -10231,7 +10235,7 @@ ${g}` : g;
10231
10235
  qe(this, "state");
10232
10236
  qe(this, "inlineQueue");
10233
10237
  qe(this, "tokenizer");
10234
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = n || Jn, this.options.tokenizer = this.options.tokenizer || new xo(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
10238
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = n || Jn, this.options.tokenizer = this.options.tokenizer || new ko(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
10235
10239
  let t = { other: At, block: fo.normal, inline: Pi.normal };
10236
10240
  this.options.pedantic ? (t.block = fo.pedantic, t.inline = Pi.pedantic) : this.options.gfm && (t.block = fo.gfm, this.options.breaks ? t.inline = Pi.breaks : t.inline = Pi.gfm), this.tokenizer.rules = t;
10237
10241
  }
@@ -10324,9 +10328,9 @@ ${g}` : g;
10324
10328
  }
10325
10329
  let h = n;
10326
10330
  if ((f = this.options.extensions) != null && f.startBlock) {
10327
- let g = 1 / 0, x = n.slice(1), C;
10331
+ let g = 1 / 0, k = n.slice(1), C;
10328
10332
  this.options.extensions.startBlock.forEach((B) => {
10329
- C = B.call({ lexer: this }, x), typeof C == "number" && C >= 0 && (g = Math.min(g, C));
10333
+ C = B.call({ lexer: this }, k), typeof C == "number" && C >= 0 && (g = Math.min(g, C));
10330
10334
  }), g < 1 / 0 && g >= 0 && (h = n.substring(0, g + 1));
10331
10335
  }
10332
10336
  if (this.state.top && (u = this.tokenizer.paragraph(h))) {
@@ -10357,7 +10361,7 @@ ${g}` : g;
10357
10361
  return this.inlineQueue.push({ src: n, tokens: t }), t;
10358
10362
  }
10359
10363
  inlineTokens(n, t = []) {
10360
- var h, g, x, C, B;
10364
+ var h, g, k, C, B;
10361
10365
  this.tokenizer.lexer = this;
10362
10366
  let i = n, r = null;
10363
10367
  if (this.tokens.links) {
@@ -10377,7 +10381,7 @@ ${g}` : g;
10377
10381
  }
10378
10382
  l || (f = ""), l = !1;
10379
10383
  let N;
10380
- if ((C = (x = this.options.extensions) == null ? void 0 : x.inline) != null && C.some((I) => (N = I.call({ lexer: this }, n, t)) ? (n = n.substring(N.raw.length), t.push(N), !0) : !1)) continue;
10384
+ if ((C = (k = this.options.extensions) == null ? void 0 : k.inline) != null && C.some((I) => (N = I.call({ lexer: this }, n, t)) ? (n = n.substring(N.raw.length), t.push(N), !0) : !1)) continue;
10381
10385
  if (N = this.tokenizer.escape(n)) {
10382
10386
  n = n.substring(N.raw.length), t.push(N);
10383
10387
  continue;
@@ -10422,9 +10426,9 @@ ${g}` : g;
10422
10426
  }
10423
10427
  let W = n;
10424
10428
  if ((B = this.options.extensions) != null && B.startInline) {
10425
- let I = 1 / 0, M = n.slice(1), k;
10429
+ let I = 1 / 0, M = n.slice(1), x;
10426
10430
  this.options.extensions.startInline.forEach((d) => {
10427
- k = d.call({ lexer: this }, M), typeof k == "number" && k >= 0 && (I = Math.min(I, k));
10431
+ x = d.call({ lexer: this }, M), typeof x == "number" && x >= 0 && (I = Math.min(I, x));
10428
10432
  }), I < 1 / 0 && I >= 0 && (W = n.substring(0, I + 1));
10429
10433
  }
10430
10434
  if (N = this.tokenizer.inlineText(W)) {
@@ -10781,7 +10785,7 @@ ${e}</tr>
10781
10785
  qe(this, "Renderer", qi);
10782
10786
  qe(this, "TextRenderer", As);
10783
10787
  qe(this, "Lexer", cn);
10784
- qe(this, "Tokenizer", xo);
10788
+ qe(this, "Tokenizer", ko);
10785
10789
  qe(this, "Hooks", Hi);
10786
10790
  this.use(...e);
10787
10791
  }
@@ -10843,7 +10847,7 @@ ${e}</tr>
10843
10847
  i.renderer = r;
10844
10848
  }
10845
10849
  if (t.tokenizer) {
10846
- let r = this.defaults.tokenizer || new xo(this.defaults);
10850
+ let r = this.defaults.tokenizer || new ko(this.defaults);
10847
10851
  for (let a in t.tokenizer) {
10848
10852
  if (!(a in r)) throw new Error(`tokenizer '${a}' does not exist`);
10849
10853
  if (["options", "rules", "lexer"].includes(a)) continue;
@@ -10863,15 +10867,15 @@ ${e}</tr>
10863
10867
  let l = a, f = t.hooks[l], u = r[l];
10864
10868
  Hi.passThroughHooks.has(a) ? r[l] = (h) => {
10865
10869
  if (this.defaults.async && Hi.passThroughHooksRespectAsync.has(a)) return (async () => {
10866
- let x = await f.call(r, h);
10867
- return u.call(r, x);
10870
+ let k = await f.call(r, h);
10871
+ return u.call(r, k);
10868
10872
  })();
10869
10873
  let g = f.call(r, h);
10870
10874
  return u.call(r, g);
10871
10875
  } : r[l] = (...h) => {
10872
10876
  if (this.defaults.async) return (async () => {
10873
- let x = await f.apply(r, h);
10874
- return x === !1 && (x = await u.apply(r, h)), x;
10877
+ let k = await f.apply(r, h);
10878
+ return k === !1 && (k = await u.apply(r, h)), k;
10875
10879
  })();
10876
10880
  let g = f.apply(r, h);
10877
10881
  return g === !1 && (g = u.apply(r, h)), g;
@@ -10954,7 +10958,7 @@ Xe.Renderer = qi;
10954
10958
  Xe.TextRenderer = As;
10955
10959
  Xe.Lexer = cn;
10956
10960
  Xe.lexer = cn.lex;
10957
- Xe.Tokenizer = xo;
10961
+ Xe.Tokenizer = ko;
10958
10962
  Xe.Hooks = Hi;
10959
10963
  Xe.parse = Xe;
10960
10964
  Xe.options;
@@ -11023,7 +11027,7 @@ rs || (rs = function(n) {
11023
11027
  i[r - 1] = arguments[r];
11024
11028
  return new n(...i);
11025
11029
  });
11026
- const jn = ht(Array.prototype.forEach), Hh = ht(Array.prototype.lastIndexOf), Ur = ht(Array.prototype.pop), pi = ht(Array.prototype.push), Fh = ht(Array.prototype.splice), Rt = Array.isArray, Fi = ht(String.prototype.toLowerCase), Ko = ht(String.prototype.toString), Hr = ht(String.prototype.match), hi = ht(String.prototype.replace), Fr = ht(String.prototype.indexOf), Wh = ht(String.prototype.trim), Gh = ht(Number.prototype.toString), jh = ht(Boolean.prototype.toString), Wr = typeof BigInt > "u" ? null : ht(BigInt.prototype.toString), Gr = typeof Symbol > "u" ? null : ht(Symbol.prototype.toString), ut = ht(Object.prototype.hasOwnProperty), Bi = ht(Object.prototype.toString), xt = ht(RegExp.prototype.test), gi = Kh(TypeError);
11030
+ const jn = ht(Array.prototype.forEach), Hh = ht(Array.prototype.lastIndexOf), Ur = ht(Array.prototype.pop), pi = ht(Array.prototype.push), Fh = ht(Array.prototype.splice), Rt = Array.isArray, Fi = ht(String.prototype.toLowerCase), Ko = ht(String.prototype.toString), Hr = ht(String.prototype.match), hi = ht(String.prototype.replace), Fr = ht(String.prototype.indexOf), Wh = ht(String.prototype.trim), Gh = ht(Number.prototype.toString), jh = ht(Boolean.prototype.toString), Wr = typeof BigInt > "u" ? null : ht(BigInt.prototype.toString), Gr = typeof Symbol > "u" ? null : ht(Symbol.prototype.toString), ut = ht(Object.prototype.hasOwnProperty), Bi = ht(Object.prototype.toString), wt = ht(RegExp.prototype.test), gi = Kh(TypeError);
11027
11031
  function ht(e) {
11028
11032
  return function(n) {
11029
11033
  n instanceof RegExp && (n.lastIndex = 0);
@@ -11115,7 +11119,7 @@ function yn(e, n) {
11115
11119
  }
11116
11120
  function Xh(e) {
11117
11121
  try {
11118
- return xt(e, ""), !0;
11122
+ return wt(e, ""), !0;
11119
11123
  } catch {
11120
11124
  return !1;
11121
11125
  }
@@ -11186,7 +11190,7 @@ function Fl() {
11186
11190
  e.DocumentFragment;
11187
11191
  const a = e.HTMLTemplateElement, l = e.Node, f = e.Element, u = e.NodeFilter, h = e.NamedNodeMap;
11188
11192
  h === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
11189
- const g = e.DOMParser, x = e.trustedTypes, C = f.prototype, B = yn(C, "cloneNode"), N = yn(C, "remove"), W = yn(C, "nextSibling"), I = yn(C, "childNodes"), M = yn(C, "parentNode"), k = yn(C, "shadowRoot"), d = yn(C, "attributes"), T = l && l.prototype ? yn(l.prototype, "nodeType") : null, H = l && l.prototype ? yn(l.prototype, "nodeName") : null;
11193
+ const g = e.DOMParser, k = e.trustedTypes, C = f.prototype, B = yn(C, "cloneNode"), N = yn(C, "remove"), W = yn(C, "nextSibling"), I = yn(C, "childNodes"), M = yn(C, "parentNode"), x = yn(C, "shadowRoot"), d = yn(C, "attributes"), T = l && l.prototype ? yn(l.prototype, "nodeType") : null, H = l && l.prototype ? yn(l.prototype, "nodeName") : null;
11190
11194
  if (typeof a == "function") {
11191
11195
  const de = t.createElement("template");
11192
11196
  de.content && de.content.ownerDocument && (t = de.content.ownerDocument);
@@ -11201,9 +11205,9 @@ function Fl() {
11201
11205
  } finally {
11202
11206
  E--;
11203
11207
  }
11204
- }, ve = t, ke = ve.implementation, ne = ve.createNodeIterator, Te = ve.createDocumentFragment, me = ve.getElementsByTagName, Me = i.importNode;
11208
+ }, ve = t, xe = ve.implementation, ne = ve.createNodeIterator, Te = ve.createDocumentFragment, me = ve.getElementsByTagName, Me = i.importNode;
11205
11209
  let b = Vr();
11206
- n.isSupported = typeof Ul == "function" && typeof M == "function" && ke && ke.createHTMLDocument !== void 0;
11210
+ n.isSupported = typeof Ul == "function" && typeof M == "function" && xe && xe.createHTMLDocument !== void 0;
11207
11211
  const P = Jh, q = Qh, oe = eg, _e = tg, D = ng, O = ig, le = og, se = rg;
11208
11212
  let U = Xr, S = null;
11209
11213
  const F = Oe({}, [...jr, ...Yo, ...qo, ...Xo, ...Kr]);
@@ -11243,7 +11247,7 @@ function Fl() {
11243
11247
  value: null
11244
11248
  }
11245
11249
  }));
11246
- let xn = !0, ft = !0, fn = !1, pn = !0, ge = !1, Ht = !0, Ye = !1, Be = !1, Xt = !1, pt = !1, _t = !1, hn = !1, ee = !0, pe = !1;
11250
+ let kn = !0, ft = !0, fn = !1, pn = !0, ge = !1, Ht = !0, Ye = !1, Be = !1, Xt = !1, pt = !1, _t = !1, hn = !1, ee = !0, pe = !1;
11247
11251
  const Re = "user-content-";
11248
11252
  let Pe = !0, tt = !1, vt = {}, Ot = null;
11249
11253
  const Fn = Oe({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
@@ -11265,7 +11269,7 @@ function Fl() {
11265
11269
  if (wn && wn === m)
11266
11270
  return;
11267
11271
  (!m || typeof m != "object") && (m = {}), m = Tt(m), Rn = // eslint-disable-next-line unicorn/prefer-includes
11268
- Ro.indexOf(m.PARSER_MEDIA_TYPE) === -1 ? Qi : m.PARSER_MEDIA_TYPE, ot = Rn === "application/xhtml+xml" ? Ko : Fi, S = ut(m, "ALLOWED_TAGS") && Rt(m.ALLOWED_TAGS) ? Oe({}, m.ALLOWED_TAGS, ot) : F, j = ut(m, "ALLOWED_ATTR") && Rt(m.ALLOWED_ATTR) ? Oe({}, m.ALLOWED_ATTR, ot) : ae, Ai = ut(m, "ALLOWED_NAMESPACES") && Rt(m.ALLOWED_NAMESPACES) ? Oe({}, m.ALLOWED_NAMESPACES, Ko) : Co, Si = ut(m, "ADD_URI_SAFE_ATTR") && Rt(m.ADD_URI_SAFE_ATTR) ? Oe(Tt(Ji), m.ADD_URI_SAFE_ATTR, ot) : Ji, Vi = ut(m, "ADD_DATA_URI_TAGS") && Rt(m.ADD_DATA_URI_TAGS) ? Oe(Tt(Zi), m.ADD_DATA_URI_TAGS, ot) : Zi, Ot = ut(m, "FORBID_CONTENTS") && Rt(m.FORBID_CONTENTS) ? Oe({}, m.FORBID_CONTENTS, ot) : Fn, dt = ut(m, "FORBID_TAGS") && Rt(m.FORBID_TAGS) ? Oe({}, m.FORBID_TAGS, ot) : Tt({}), Ut = ut(m, "FORBID_ATTR") && Rt(m.FORBID_ATTR) ? Oe({}, m.FORBID_ATTR, ot) : Tt({}), vt = ut(m, "USE_PROFILES") ? m.USE_PROFILES && typeof m.USE_PROFILES == "object" ? Tt(m.USE_PROFILES) : m.USE_PROFILES : !1, xn = m.ALLOW_ARIA_ATTR !== !1, ft = m.ALLOW_DATA_ATTR !== !1, fn = m.ALLOW_UNKNOWN_PROTOCOLS || !1, pn = m.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ge = m.SAFE_FOR_TEMPLATES || !1, Ht = m.SAFE_FOR_XML !== !1, Ye = m.WHOLE_DOCUMENT || !1, pt = m.RETURN_DOM || !1, _t = m.RETURN_DOM_FRAGMENT || !1, hn = m.RETURN_TRUSTED_TYPE || !1, Xt = m.FORCE_BODY || !1, ee = m.SANITIZE_DOM !== !1, pe = m.SANITIZE_NAMED_PROPS || !1, Pe = m.KEEP_CONTENT !== !1, tt = m.IN_PLACE || !1, U = Xh(m.ALLOWED_URI_REGEXP) ? m.ALLOWED_URI_REGEXP : Xr, Mn = typeof m.NAMESPACE == "string" ? m.NAMESPACE : Vt, _i = ut(m, "MATHML_TEXT_INTEGRATION_POINTS") && m.MATHML_TEXT_INTEGRATION_POINTS && typeof m.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Tt(m.MATHML_TEXT_INTEGRATION_POINTS) : Oe({}, ["mi", "mo", "mn", "ms", "mtext"]), Ci = ut(m, "HTML_INTEGRATION_POINTS") && m.HTML_INTEGRATION_POINTS && typeof m.HTML_INTEGRATION_POINTS == "object" ? Tt(m.HTML_INTEGRATION_POINTS) : Oe({}, ["annotation-xml"]);
11272
+ Ro.indexOf(m.PARSER_MEDIA_TYPE) === -1 ? Qi : m.PARSER_MEDIA_TYPE, ot = Rn === "application/xhtml+xml" ? Ko : Fi, S = ut(m, "ALLOWED_TAGS") && Rt(m.ALLOWED_TAGS) ? Oe({}, m.ALLOWED_TAGS, ot) : F, j = ut(m, "ALLOWED_ATTR") && Rt(m.ALLOWED_ATTR) ? Oe({}, m.ALLOWED_ATTR, ot) : ae, Ai = ut(m, "ALLOWED_NAMESPACES") && Rt(m.ALLOWED_NAMESPACES) ? Oe({}, m.ALLOWED_NAMESPACES, Ko) : Co, Si = ut(m, "ADD_URI_SAFE_ATTR") && Rt(m.ADD_URI_SAFE_ATTR) ? Oe(Tt(Ji), m.ADD_URI_SAFE_ATTR, ot) : Ji, Vi = ut(m, "ADD_DATA_URI_TAGS") && Rt(m.ADD_DATA_URI_TAGS) ? Oe(Tt(Zi), m.ADD_DATA_URI_TAGS, ot) : Zi, Ot = ut(m, "FORBID_CONTENTS") && Rt(m.FORBID_CONTENTS) ? Oe({}, m.FORBID_CONTENTS, ot) : Fn, dt = ut(m, "FORBID_TAGS") && Rt(m.FORBID_TAGS) ? Oe({}, m.FORBID_TAGS, ot) : Tt({}), Ut = ut(m, "FORBID_ATTR") && Rt(m.FORBID_ATTR) ? Oe({}, m.FORBID_ATTR, ot) : Tt({}), vt = ut(m, "USE_PROFILES") ? m.USE_PROFILES && typeof m.USE_PROFILES == "object" ? Tt(m.USE_PROFILES) : m.USE_PROFILES : !1, kn = m.ALLOW_ARIA_ATTR !== !1, ft = m.ALLOW_DATA_ATTR !== !1, fn = m.ALLOW_UNKNOWN_PROTOCOLS || !1, pn = m.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ge = m.SAFE_FOR_TEMPLATES || !1, Ht = m.SAFE_FOR_XML !== !1, Ye = m.WHOLE_DOCUMENT || !1, pt = m.RETURN_DOM || !1, _t = m.RETURN_DOM_FRAGMENT || !1, hn = m.RETURN_TRUSTED_TYPE || !1, Xt = m.FORCE_BODY || !1, ee = m.SANITIZE_DOM !== !1, pe = m.SANITIZE_NAMED_PROPS || !1, Pe = m.KEEP_CONTENT !== !1, tt = m.IN_PLACE || !1, U = Xh(m.ALLOWED_URI_REGEXP) ? m.ALLOWED_URI_REGEXP : Xr, Mn = typeof m.NAMESPACE == "string" ? m.NAMESPACE : Vt, _i = ut(m, "MATHML_TEXT_INTEGRATION_POINTS") && m.MATHML_TEXT_INTEGRATION_POINTS && typeof m.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Tt(m.MATHML_TEXT_INTEGRATION_POINTS) : Oe({}, ["mi", "mo", "mn", "ms", "mtext"]), Ci = ut(m, "HTML_INTEGRATION_POINTS") && m.HTML_INTEGRATION_POINTS && typeof m.HTML_INTEGRATION_POINTS == "object" ? Tt(m.HTML_INTEGRATION_POINTS) : Oe({}, ["annotation-xml"]);
11269
11273
  const $ = ut(m, "CUSTOM_ELEMENT_HANDLING") && m.CUSTOM_ELEMENT_HANDLING && typeof m.CUSTOM_ELEMENT_HANDLING == "object" ? Tt(m.CUSTOM_ELEMENT_HANDLING) : vi(null);
11270
11274
  if (Ne = vi(null), ut($, "tagNameCheck") && Mi($.tagNameCheck) && (Ne.tagNameCheck = $.tagNameCheck), ut($, "attributeNameCheck") && Mi($.attributeNameCheck) && (Ne.attributeNameCheck = $.attributeNameCheck), ut($, "allowCustomizedBuiltInElements") && typeof $.allowCustomizedBuiltInElements == "boolean" && (Ne.allowCustomizedBuiltInElements = $.allowCustomizedBuiltInElements), ge && (ft = !1), _t && (pt = !0), vt && (S = Oe({}, Kr), j = vi(null), vt.html === !0 && (Oe(S, jr), Oe(j, Yr)), vt.svg === !0 && (Oe(S, Yo), Oe(j, Vo), Oe(j, po)), vt.svgFilters === !0 && (Oe(S, qo), Oe(j, Vo), Oe(j, po)), vt.mathMl === !0 && (Oe(S, Xo), Oe(j, qr), Oe(j, po))), bt.tagCheck = null, bt.attributeCheck = null, ut(m, "ADD_TAGS") && (typeof m.ADD_TAGS == "function" ? bt.tagCheck = m.ADD_TAGS : Rt(m.ADD_TAGS) && (S === F && (S = Tt(S)), Oe(S, m.ADD_TAGS, ot))), ut(m, "ADD_ATTR") && (typeof m.ADD_ATTR == "function" ? bt.attributeCheck = m.ADD_ATTR : Rt(m.ADD_ATTR) && (j === ae && (j = Tt(j)), Oe(j, m.ADD_ATTR, ot))), ut(m, "ADD_URI_SAFE_ATTR") && Rt(m.ADD_URI_SAFE_ATTR) && Oe(Si, m.ADD_URI_SAFE_ATTR, ot), ut(m, "FORBID_CONTENTS") && Rt(m.FORBID_CONTENTS) && (Ot === Fn && (Ot = Tt(Ot)), Oe(Ot, m.FORBID_CONTENTS, ot)), ut(m, "ADD_FORBID_CONTENTS") && Rt(m.ADD_FORBID_CONTENTS) && (Ot === Fn && (Ot = Tt(Ot)), Oe(Ot, m.ADD_FORBID_CONTENTS, ot)), Pe && (S["#text"] = !0), Ye && Oe(S, ["html", "head", "body"]), S.table && (Oe(S, ["tbody"]), delete dt.tbody), m.TRUSTED_TYPES_POLICY) {
11271
11275
  if (typeof m.TRUSTED_TYPES_POLICY.createHTML != "function")
@@ -11280,7 +11284,7 @@ function Fl() {
11280
11284
  throw X = ie, Ue;
11281
11285
  }
11282
11286
  } else
11283
- X === void 0 && m.TRUSTED_TYPES_POLICY !== null && (X = ag(x, r)), X && typeof Q == "string" && (Q = fe(""));
11287
+ X === void 0 && m.TRUSTED_TYPES_POLICY !== null && (X = ag(k, r)), X && typeof Q == "string" && (Q = fe(""));
11284
11288
  (b.uponSanitizeElement.length > 0 || b.uponSanitizeAttribute.length > 0) && S === F && (S = Tt(S)), b.uponSanitizeAttribute.length > 0 && j === ae && (j = Tt(j)), It && It(m), wn = m;
11285
11289
  }, Nn = Oe({}, [...Yo, ...qo, ...Vh]), eo = Oe({}, [...Xo, ...Zh]), Io = function(m) {
11286
11290
  let $ = M(m);
@@ -11338,7 +11342,7 @@ function Fl() {
11338
11342
  } catch {
11339
11343
  }
11340
11344
  if (!$ || !$.documentElement) {
11341
- $ = ke.createDocument(Mn, "template", null);
11345
+ $ = xe.createDocument(Mn, "template", null);
11342
11346
  try {
11343
11347
  $.documentElement.innerHTML = Ti ? Q : Ue;
11344
11348
  } catch {
@@ -11431,10 +11435,10 @@ function Fl() {
11431
11435
  if (Ft(b.uponSanitizeElement, m, {
11432
11436
  tagName: ie,
11433
11437
  allowedTags: S
11434
- }), Ht && m.hasChildNodes() && !On(m.firstElementChild) && xt(/<[/\w!]/g, m.innerHTML) && xt(/<[/\w!]/g, m.textContent) || Ht && m.namespaceURI === Vt && ie === "style" && On(m.firstElementChild) || m.nodeType === bn.progressingInstruction || Ht && m.nodeType === bn.comment && xt(/<[/\w]/g, m.data))
11438
+ }), Ht && m.hasChildNodes() && !On(m.firstElementChild) && wt(/<[/\w!]/g, m.innerHTML) && wt(/<[/\w!]/g, m.textContent) || Ht && m.namespaceURI === Vt && ie === "style" && On(m.firstElementChild) || m.nodeType === bn.progressingInstruction || Ht && m.nodeType === bn.comment && wt(/<[/\w]/g, m.data))
11435
11439
  return zt(m), !0;
11436
11440
  if (dt[ie] || !(bt.tagCheck instanceof Function && bt.tagCheck(ie)) && !S[ie]) {
11437
- if (!dt[ie] && to(ie) && (Ne.tagNameCheck instanceof RegExp && xt(Ne.tagNameCheck, ie) || Ne.tagNameCheck instanceof Function && Ne.tagNameCheck(ie)))
11441
+ if (!dt[ie] && to(ie) && (Ne.tagNameCheck instanceof RegExp && wt(Ne.tagNameCheck, ie) || Ne.tagNameCheck instanceof Function && Ne.tagNameCheck(ie)))
11438
11442
  return !1;
11439
11443
  if (Pe && !Ot[ie]) {
11440
11444
  const Ie = M(m), je = I(m);
@@ -11448,7 +11452,7 @@ function Fl() {
11448
11452
  }
11449
11453
  return zt(m), !0;
11450
11454
  }
11451
- return (T ? T(m) : m.nodeType) === bn.element && !Io(m) || (ie === "noscript" || ie === "noembed" || ie === "noframes") && xt(/<\/no(script|embed|frames)/i, m.innerHTML) ? (zt(m), !0) : (ge && m.nodeType === bn.text && ($ = m.textContent, jn([P, q, oe], (Ie) => {
11455
+ return (T ? T(m) : m.nodeType) === bn.element && !Io(m) || (ie === "noscript" || ie === "noembed" || ie === "noframes") && wt(/<\/no(script|embed|frames)/i, m.innerHTML) ? (zt(m), !0) : (ge && m.nodeType === bn.text && ($ = m.textContent, jn([P, q, oe], (Ie) => {
11452
11456
  $ = hi($, Ie, " ");
11453
11457
  }), m.textContent !== $ && (pi(n.removed, {
11454
11458
  element: m.cloneNode()
@@ -11457,21 +11461,21 @@ function Fl() {
11457
11461
  if (Ut[$] || ee && ($ === "id" || $ === "name") && (ie in t || ie in No))
11458
11462
  return !1;
11459
11463
  const Ue = j[$] || bt.attributeCheck instanceof Function && bt.attributeCheck($, m);
11460
- if (!(ft && !Ut[$] && xt(_e, $))) {
11461
- if (!(xn && xt(D, $))) {
11464
+ if (!(ft && !Ut[$] && wt(_e, $))) {
11465
+ if (!(kn && wt(D, $))) {
11462
11466
  if (!Ue || Ut[$]) {
11463
11467
  if (
11464
11468
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
11465
11469
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
11466
11470
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
11467
- !(to(m) && (Ne.tagNameCheck instanceof RegExp && xt(Ne.tagNameCheck, m) || Ne.tagNameCheck instanceof Function && Ne.tagNameCheck(m)) && (Ne.attributeNameCheck instanceof RegExp && xt(Ne.attributeNameCheck, $) || Ne.attributeNameCheck instanceof Function && Ne.attributeNameCheck($, m)) || // Alternative, second condition checks if it's an `is`-attribute, AND
11471
+ !(to(m) && (Ne.tagNameCheck instanceof RegExp && wt(Ne.tagNameCheck, m) || Ne.tagNameCheck instanceof Function && Ne.tagNameCheck(m)) && (Ne.attributeNameCheck instanceof RegExp && wt(Ne.attributeNameCheck, $) || Ne.attributeNameCheck instanceof Function && Ne.attributeNameCheck($, m)) || // Alternative, second condition checks if it's an `is`-attribute, AND
11468
11472
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
11469
- $ === "is" && Ne.allowCustomizedBuiltInElements && (Ne.tagNameCheck instanceof RegExp && xt(Ne.tagNameCheck, ie) || Ne.tagNameCheck instanceof Function && Ne.tagNameCheck(ie)))
11473
+ $ === "is" && Ne.allowCustomizedBuiltInElements && (Ne.tagNameCheck instanceof RegExp && wt(Ne.tagNameCheck, ie) || Ne.tagNameCheck instanceof Function && Ne.tagNameCheck(ie)))
11470
11474
  ) return !1;
11471
11475
  } else if (!Si[$]) {
11472
- if (!xt(U, hi(ie, le, ""))) {
11476
+ if (!wt(U, hi(ie, le, ""))) {
11473
11477
  if (!(($ === "src" || $ === "xlink:href" || $ === "href") && m !== "script" && Fr(ie, "data:") === 0 && Vi[m])) {
11474
- if (!(fn && !xt(O, hi(ie, le, "")))) {
11478
+ if (!(fn && !wt(O, hi(ie, le, "")))) {
11475
11479
  if (ie)
11476
11480
  return !1;
11477
11481
  }
@@ -11482,7 +11486,7 @@ function Fl() {
11482
11486
  }
11483
11487
  return !0;
11484
11488
  }, Le = Oe({}, ["annotation-xml", "color-profile", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "missing-glyph"]), to = function(m) {
11485
- return !Le[Fi(m)] && xt(se, m);
11489
+ return !Le[Fi(m)] && wt(se, m);
11486
11490
  }, Ct = function(m) {
11487
11491
  Ft(b.beforeSanitizeAttributes, m, null);
11488
11492
  const $ = m.attributes;
@@ -11499,7 +11503,7 @@ function Fl() {
11499
11503
  for (; Ue--; ) {
11500
11504
  const Ie = $[Ue], je = Ie.name, st = Ie.namespaceURI, yt = Ie.value, Wt = ot(je), si = yt;
11501
11505
  let Ve = je === "value" ? si : Wh(si);
11502
- if (ie.attrName = Wt, ie.attrValue = Ve, ie.keepAttr = !0, ie.forceKeepAttr = void 0, Ft(b.uponSanitizeAttribute, m, ie), Ve = ie.attrValue, pe && (Wt === "id" || Wt === "name") && Fr(Ve, Re) !== 0 && (gn(je, m), Ve = Re + Ve), Ht && xt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Ve)) {
11506
+ if (ie.attrName = Wt, ie.attrValue = Ve, ie.keepAttr = !0, ie.forceKeepAttr = void 0, Ft(b.uponSanitizeAttribute, m, ie), Ve = ie.attrValue, pe && (Wt === "id" || Wt === "name") && Fr(Ve, Re) !== 0 && (gn(je, m), Ve = Re + Ve), Ht && wt(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Ve)) {
11503
11507
  gn(je, m);
11504
11508
  continue;
11505
11509
  }
@@ -11513,7 +11517,7 @@ function Fl() {
11513
11517
  gn(je, m);
11514
11518
  continue;
11515
11519
  }
11516
- if (!pn && xt(/\/>/i, Ve)) {
11520
+ if (!pn && wt(/\/>/i, Ve)) {
11517
11521
  gn(je, m);
11518
11522
  continue;
11519
11523
  }
@@ -11525,8 +11529,8 @@ function Fl() {
11525
11529
  gn(je, m);
11526
11530
  continue;
11527
11531
  }
11528
- if (X && typeof x == "object" && typeof x.getAttributeType == "function" && !st)
11529
- switch (x.getAttributeType(Ni, Wt)) {
11532
+ if (X && typeof k == "object" && typeof k.getAttributeType == "function" && !st)
11533
+ switch (k.getAttributeType(Ni, Wt)) {
11530
11534
  case "TrustedHTML": {
11531
11535
  Ve = fe(Ve);
11532
11536
  break;
@@ -11549,14 +11553,14 @@ function Fl() {
11549
11553
  const ie = ii(m);
11550
11554
  for (Ft(b.beforeSanitizeShadowDOM, m, null); $ = ie.nextNode(); )
11551
11555
  if (Ft(b.uponSanitizeShadowNode, $, null), sn($), Ct($), In($.content) && zn($.content), (T ? T($) : $.nodeType) === bn.element) {
11552
- const Ie = k ? k($) : $.shadowRoot;
11556
+ const Ie = x ? x($) : $.shadowRoot;
11553
11557
  In(Ie) && (G(Ie), zn(Ie));
11554
11558
  }
11555
11559
  Ft(b.afterSanitizeShadowDOM, m, null);
11556
11560
  }, G = function(m) {
11557
11561
  const $ = T ? T(m) : m.nodeType;
11558
11562
  if ($ === bn.element) {
11559
- const Ie = k ? k(m) : m.shadowRoot;
11563
+ const Ie = x ? x(m) : m.shadowRoot;
11560
11564
  In(Ie) && (G(Ie), zn(Ie));
11561
11565
  }
11562
11566
  const ie = I ? I(m) : m.childNodes;
@@ -11616,7 +11620,7 @@ function Fl() {
11616
11620
  return (j.shadowroot || j.shadowrootmode) && (Ie = Me.call(i, Ie, !0)), Ie;
11617
11621
  }
11618
11622
  let st = Ye ? $.outerHTML : $.innerHTML;
11619
- return Ye && S["!doctype"] && $.ownerDocument && $.ownerDocument.doctype && $.ownerDocument.doctype.name && xt(sg, $.ownerDocument.doctype.name) && (st = "<!DOCTYPE " + $.ownerDocument.doctype.name + `>
11623
+ return Ye && S["!doctype"] && $.ownerDocument && $.ownerDocument.doctype && $.ownerDocument.doctype.name && wt(sg, $.ownerDocument.doctype.name) && (st = "<!DOCTYPE " + $.ownerDocument.doctype.name + `>
11620
11624
  ` + st), ge && jn([P, q, oe], (yt) => {
11621
11625
  st = hi(st, yt, " ");
11622
11626
  }), X && hn ? fe(st) : st;
@@ -11710,7 +11714,7 @@ function hg(e) {
11710
11714
  const gg = { class: "zm-note-panel" }, mg = {
11711
11715
  key: 0,
11712
11716
  class: "zm-note-empty"
11713
- }, bg = { class: "zm-note-header" }, vg = { class: "zm-note-title-row" }, yg = { class: "zm-note-name" }, kg = { class: "zm-note-meta" }, xg = { class: "zm-note-scroll" }, wg = { class: "zm-note-section" }, Eg = { class: "zm-note-section-head" }, Sg = { class: "zm-note-split" }, Tg = ["disabled"], Ag = {
11717
+ }, bg = { class: "zm-note-header" }, vg = { class: "zm-note-title-row" }, yg = { class: "zm-note-name" }, xg = { class: "zm-note-meta" }, kg = { class: "zm-note-scroll" }, wg = { class: "zm-note-section" }, Eg = { class: "zm-note-section-head" }, Sg = { class: "zm-note-split" }, Tg = ["disabled"], Ag = {
11714
11718
  key: 0,
11715
11719
  class: "zm-note-preview"
11716
11720
  }, _g = ["innerHTML"], Cg = {
@@ -11787,7 +11791,7 @@ const gg = { class: "zm-note-panel" }, mg = {
11787
11791
  const D = r.value, O = ((se = (le = t.selectedNode) == null ? void 0 : le.note) == null ? void 0 : se.text) ?? "";
11788
11792
  D !== O && i("apply", D);
11789
11793
  }
11790
- function x(D) {
11794
+ function k(D) {
11791
11795
  var O, le;
11792
11796
  t.readonly || (D.key === "Escape" ? (D.preventDefault(), r.value = ((le = (O = t.selectedNode) == null ? void 0 : O.note) == null ? void 0 : le.text) ?? "", D.target.blur()) : D.key === "Enter" && (D.ctrlKey || D.metaKey) && (D.preventDefault(), g(), D.target.blur()));
11793
11797
  }
@@ -11803,14 +11807,14 @@ const gg = { class: "zm-note-panel" }, mg = {
11803
11807
  }), W = ye(() => {
11804
11808
  var D, O;
11805
11809
  return (O = (D = t.selectedNode) == null ? void 0 : D.richContent) == null ? void 0 : O.kind;
11806
- }), I = ye(() => W.value === "code"), M = ye(() => W.value === "table"), k = Y(!1), d = Y(!1), T = Y(!1), H = Y(!1);
11810
+ }), I = ye(() => W.value === "code"), M = ye(() => W.value === "table"), x = Y(!1), d = Y(!1), T = Y(!1), H = Y(!1);
11807
11811
  Nt(
11808
11812
  () => {
11809
11813
  var D;
11810
11814
  return (D = t.selectedNode) == null ? void 0 : D.id;
11811
11815
  },
11812
11816
  () => {
11813
- k.value = !1, d.value = !1, T.value = !1, H.value = !1;
11817
+ x.value = !1, d.value = !1, T.value = !1, H.value = !1;
11814
11818
  }
11815
11819
  );
11816
11820
  const X = Y("");
@@ -11853,7 +11857,7 @@ const gg = { class: "zm-note-panel" }, mg = {
11853
11857
  const O = D.target;
11854
11858
  O.style.display = "none";
11855
11859
  }
11856
- function ke(D) {
11860
+ function xe(D) {
11857
11861
  const O = D.target;
11858
11862
  O.style.display = "";
11859
11863
  }
@@ -11907,11 +11911,11 @@ const gg = { class: "zm-note-panel" }, mg = {
11907
11911
  c("div", bg, [
11908
11912
  c("div", vg, [
11909
11913
  O[12] || (O[12] = c("span", { class: "zm-note-label" }, "节点", -1)),
11910
- c("span", yg, xe(e.selectedNode.text || "(无标题)"), 1)
11914
+ c("span", yg, ke(e.selectedNode.text || "(无标题)"), 1)
11911
11915
  ]),
11912
- c("div", kg, xe(_e.value), 1)
11916
+ c("div", xg, ke(_e.value), 1)
11913
11917
  ]),
11914
- c("div", xg, [
11918
+ c("div", kg, [
11915
11919
  c("section", wg, [
11916
11920
  c("header", Eg, [
11917
11921
  O[13] || (O[13] = c("span", { class: "zm-note-section-title" }, "笔记", -1)),
@@ -11921,7 +11925,7 @@ const gg = { class: "zm-note-panel" }, mg = {
11921
11925
  type: "button",
11922
11926
  class: "zm-note-preview-toggle",
11923
11927
  onClick: h
11924
- }, xe(u.value ? "隐藏预览" : "显示预览"), 1))
11928
+ }, ke(u.value ? "隐藏预览" : "显示预览"), 1))
11925
11929
  ]),
11926
11930
  c("div", Sg, [
11927
11931
  Bt(c("textarea", {
@@ -11933,7 +11937,7 @@ const gg = { class: "zm-note-panel" }, mg = {
11933
11937
  spellcheck: "false",
11934
11938
  disabled: e.readonly,
11935
11939
  onBlur: g,
11936
- onKeydown: x
11940
+ onKeydown: k
11937
11941
  }, null, 40, Tg), [
11938
11942
  [tn, r.value]
11939
11943
  ]),
@@ -11953,10 +11957,10 @@ const gg = { class: "zm-note-panel" }, mg = {
11953
11957
  ])) : V("", !0)
11954
11958
  ]),
11955
11959
  e.readonly ? V("", !0) : (v(), y("div", Rg, [
11956
- !B.value && !k.value ? (v(), y("button", {
11960
+ !B.value && !x.value ? (v(), y("button", {
11957
11961
  key: 0,
11958
11962
  class: "zm-note-add-chip",
11959
- onClick: O[1] || (O[1] = (F) => k.value = !0)
11963
+ onClick: O[1] || (O[1] = (F) => x.value = !0)
11960
11964
  }, "+ 链接")) : V("", !0),
11961
11965
  !N.value && !d.value ? (v(), y("button", {
11962
11966
  key: 1,
@@ -11974,7 +11978,7 @@ const gg = { class: "zm-note-panel" }, mg = {
11974
11978
  onClick: O[4] || (O[4] = (F) => H.value = !0)
11975
11979
  }, "+ 表格")) : V("", !0)
11976
11980
  ])),
11977
- B.value || k.value ? (v(), y("section", Ng, [
11981
+ B.value || x.value ? (v(), y("section", Ng, [
11978
11982
  O[15] || (O[15] = c("header", { class: "zm-note-section-head" }, [
11979
11983
  c("span", { class: "zm-note-section-title" }, "链接")
11980
11984
  ], -1)),
@@ -11996,7 +12000,7 @@ const gg = { class: "zm-note-panel" }, mg = {
11996
12000
  target: "_blank",
11997
12001
  rel: "noopener noreferrer",
11998
12002
  title: (se = e.selectedNode.link) == null ? void 0 : se.url
11999
- }, xe((U = e.selectedNode.link) == null ? void 0 : U.url), 9, Og)) : V("", !0)
12003
+ }, ke((U = e.selectedNode.link) == null ? void 0 : U.url), 9, Og)) : V("", !0)
12000
12004
  ])) : V("", !0),
12001
12005
  N.value || d.value ? (v(), y("section", zg, [
12002
12006
  O[16] || (O[16] = c("header", { class: "zm-note-section-head" }, [
@@ -12019,13 +12023,13 @@ const gg = { class: "zm-note-panel" }, mg = {
12019
12023
  src: (S = e.selectedNode.image) == null ? void 0 : S.src,
12020
12024
  alt: e.selectedNode.text,
12021
12025
  onError: ve,
12022
- onLoad: ke
12026
+ onLoad: xe
12023
12027
  }, null, 40, $g)) : V("", !0)
12024
12028
  ])) : V("", !0),
12025
12029
  I.value || T.value ? (v(), y("section", Dg, [
12026
12030
  c("header", Pg, [
12027
12031
  O[17] || (O[17] = c("span", { class: "zm-note-section-title" }, "代码块", -1)),
12028
- we(qn)(ne.value) ? (v(), y("span", Bg, xe(we(qn)(ne.value)), 1)) : V("", !0)
12032
+ we(qn)(ne.value) ? (v(), y("span", Bg, ke(we(qn)(ne.value)), 1)) : V("", !0)
12029
12033
  ]),
12030
12034
  Bt(c("textarea", {
12031
12035
  ref_key: "codeRef",
@@ -12066,9 +12070,9 @@ const gg = { class: "zm-note-panel" }, mg = {
12066
12070
  (v(!0), y(ue, null, et(oe.value, (F, j) => (v(), y("tr", { key: j }, [
12067
12071
  j === 0 ? (v(!0), y(ue, { key: 0 }, et(F, (ae, Ne) => (v(), y("th", {
12068
12072
  key: `h${Ne}`
12069
- }, xe(ae), 1))), 128)) : (v(!0), y(ue, { key: 1 }, et(F, (ae, Ne) => (v(), y("td", {
12073
+ }, ke(ae), 1))), 128)) : (v(!0), y(ue, { key: 1 }, et(F, (ae, Ne) => (v(), y("td", {
12070
12074
  key: `c${Ne}`
12071
- }, xe(ae), 1))), 128))
12075
+ }, ke(ae), 1))), 128))
12072
12076
  ]))), 128))
12073
12077
  ])
12074
12078
  ])) : V("", !0)
@@ -12109,7 +12113,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12109
12113
  },
12110
12114
  emits: ["change", "select", "edit-note", "markdownChange", "canvas-toggle-preview", "canvas-outline", "canvas-settings", "canvas-data", "canvas-import"],
12111
12115
  setup(e, { expose: n, emit: t }) {
12112
- const i = e, r = t, a = Y(null), l = Y(null), f = Y(""), u = Y(/* @__PURE__ */ new Set()), h = ye(() => u.value.values().next().value ?? null), g = Y(/* @__PURE__ */ new Set()), x = Y(!1), C = Y(null), B = Y(0), N = Y(0), W = Y(null), I = Y(null), M = Y(null), k = Y(""), d = Y(an(i.data)), T = Y({}), H = Y({}), X = Y(i.markdown !== void 0);
12116
+ const i = e, r = t, a = Y(null), l = Y(null), f = Y(""), u = Y(/* @__PURE__ */ new Set()), h = ye(() => u.value.values().next().value ?? null), g = Y(/* @__PURE__ */ new Set()), k = Y(!1), C = Y(null), B = Y(0), N = Y(0), W = Y(null), I = Y(null), M = Y(null), x = Y(""), d = Y(an(i.data)), T = Y({}), H = Y({}), X = Y(i.markdown !== void 0);
12113
12117
  let Q = !1;
12114
12118
  Nt(
12115
12119
  () => i.markdown,
@@ -12132,7 +12136,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12132
12136
  { deep: !0 }
12133
12137
  );
12134
12138
  const E = ye(() => G.showOrderBadge === !0), fe = Y(/* @__PURE__ */ new Map()), ve = fe.value;
12135
- function ke(o, s) {
12139
+ function xe(o, s) {
12136
12140
  const p = {};
12137
12141
  s.bg && (p.bg = s.bg), s.textColor && (p.textColor = s.textColor), s.borderColor && (p.borderColor = s.borderColor), s.fontWeight && (p.fontWeight = s.fontWeight), s.fontSize && (p.fontSize = s.fontSize), Object.keys(p).length === 0 ? ve.delete(o) : ve.set(o, p), fe.value = new Map(ve);
12138
12142
  }
@@ -12221,9 +12225,9 @@ const gg = { class: "zm-note-panel" }, mg = {
12221
12225
  const p = Ae(d.value, o);
12222
12226
  p && (s ? p.richContent = s : delete p.richContent, Ge(), Le(), r("change", d.value));
12223
12227
  }
12224
- const se = Y(null), U = Y(null), S = ye(() => ["zm-canvas-fab", "zm-canvas-fab-preview", !i.hideCanvasActions && (!i.previewMode || x.value) ? "is-visible" : ""].filter(Boolean).join(" ")), F = ye(() => ["zm-canvas-fab", "zm-canvas-fab-outline", !i.hideCanvasActions && (!i.previewMode || x.value) ? "is-visible" : ""].filter(Boolean).join(" "));
12228
+ const se = Y(null), U = Y(null), S = ye(() => ["zm-canvas-fab", "zm-canvas-fab-preview", !i.hideCanvasActions && (!i.previewMode || k.value) ? "is-visible" : ""].filter(Boolean).join(" ")), F = ye(() => ["zm-canvas-fab", "zm-canvas-fab-outline", !i.hideCanvasActions && (!i.previewMode || k.value) ? "is-visible" : ""].filter(Boolean).join(" "));
12225
12229
  function j(o, s) {
12226
- i.previewMode || (o.preventDefault(), o.stopPropagation(), U.value = null, u.value = /* @__PURE__ */ new Set([s.id]), Et(), se.value = { nodeId: s.id, x: o.clientX, y: o.clientY });
12230
+ i.previewMode || (o.preventDefault(), o.stopPropagation(), U.value = null, u.value = /* @__PURE__ */ new Set([s.id]), xt(), se.value = { nodeId: s.id, x: o.clientX, y: o.clientY });
12227
12231
  }
12228
12232
  function ae() {
12229
12233
  se.value = null;
@@ -12247,7 +12251,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12247
12251
  function bt() {
12248
12252
  dt(), i.builtInDrawers && (pt(), fn.value = !0), r("canvas-data");
12249
12253
  }
12250
- function xn(o) {
12254
+ function kn(o) {
12251
12255
  dt(), i.builtInDrawers && (pt(), Be.value = o, fn.value = !0), r("canvas-import", o);
12252
12256
  }
12253
12257
  const ft = Y(!1), fn = Y(!1), pn = Y(!1), ge = Y(!1), Ht = Y(!1), Ye = Y(0), Be = Y(null), Xt = Y(/* @__PURE__ */ new Set());
@@ -12262,7 +12266,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12262
12266
  o.autoBalanceOnChange !== void 0 && (G.autoBalanceOnChange = o.autoBalanceOnChange), o.lineWidthStart !== void 0 && (G.lineWidthStart = Math.max(0.5, Math.min(20, o.lineWidthStart))), o.lineWidthEnd !== void 0 && (G.lineWidthEnd = Math.max(0.3, Math.min(10, o.lineWidthEnd))), o.rainbowBranch !== void 0 && (G.rainbowBranch = o.rainbowBranch), o.branchPaletteId !== void 0 && (G.branchPaletteId = o.branchPaletteId), o.customPalettes !== void 0 && (G.customPalettes = o.customPalettes), o.lineStyle !== void 0 && (G.lineStyle = o.lineStyle), o.rootLineStyle !== void 0 && (G.rootLineStyle = o.rootLineStyle), o.lineOrigin !== void 0 && (G.lineOrigin = o.lineOrigin), o.taperedEdge !== void 0 && (G.taperedEdge = o.taperedEdge), o.lineWidthTaper !== void 0 && (G.lineWidthTaper = Math.max(0.3, Math.min(1, o.lineWidthTaper))), o.elbowRadius !== void 0 && (G.elbowRadius = Math.max(2, Math.min(20, o.elbowRadius))), o.showOrderBadge !== void 0 && (G.showOrderBadge = o.showOrderBadge), o.canvasBg !== void 0 && (G.canvasBg = o.canvasBg);
12263
12267
  }
12264
12268
  function pe(o) {
12265
- _t.value && ke(_t.value.id, o);
12269
+ _t.value && xe(_t.value.id, o);
12266
12270
  }
12267
12271
  function Re() {
12268
12272
  const o = {
@@ -12409,7 +12413,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12409
12413
  o && le(o, null);
12410
12414
  }
12411
12415
  function wn(o) {
12412
- i.previewMode || (i.builtInDrawers && (pt(), ge.value = !0, Ye.value++), r("edit-note", o));
12416
+ i.previewMode || (u.value = /* @__PURE__ */ new Set([o]), xt(), i.builtInDrawers && (pt(), ge.value = !0, Ye.value++), r("edit-note", o));
12413
12417
  }
12414
12418
  function No(o, s = 60) {
12415
12419
  const p = o.replace(/\s+/g, " ").trim();
@@ -12439,7 +12443,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12439
12443
  }
12440
12444
  }
12441
12445
  }
12442
- ki(() => {
12446
+ xi(() => {
12443
12447
  window.addEventListener("paste", Mi), window.addEventListener("keydown", ti), Le();
12444
12448
  }), Hn(() => {
12445
12449
  window.removeEventListener("paste", Mi), window.removeEventListener("keydown", ti);
@@ -12498,7 +12502,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12498
12502
  naturalH: s.image.naturalH,
12499
12503
  width: o.pendingW,
12500
12504
  height: o.pendingH
12501
- }), u.value = /* @__PURE__ */ new Set([o.nodeId]), Et(), ii = !0);
12505
+ }), u.value = /* @__PURE__ */ new Set([o.nodeId]), xt(), ii = !0);
12502
12506
  }
12503
12507
  const ni = Y(null);
12504
12508
  let ii = !1;
@@ -12751,7 +12755,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12751
12755
  return `M ${K.x.toFixed(2)} ${K.y.toFixed(2)} L ${De.x.toFixed(2)} ${De.y.toFixed(2)} L ${We.x.toFixed(2)} ${We.y.toFixed(2)} L ${ze.x.toFixed(2)} ${ze.y.toFixed(2)} Z`;
12752
12756
  }
12753
12757
  }
12754
- const yt = ye(() => wt.value.root.children), Wt = Un[0].colors, si = ye(
12758
+ const yt = ye(() => Et.value.root.children), Wt = Un[0].colors, si = ye(
12755
12759
  () => Za(G.branchPaletteId, G.customPalettes)
12756
12760
  ), Ve = ye(() => {
12757
12761
  const o = /* @__PURE__ */ new Map();
@@ -12834,7 +12838,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12834
12838
  onRemove: Gs,
12835
12839
  onStartEdit: Oi,
12836
12840
  onClearSelection: () => {
12837
- u.value = /* @__PURE__ */ new Set(), Et();
12841
+ u.value = /* @__PURE__ */ new Set(), xt();
12838
12842
  },
12839
12843
  onDuplicate: Ds,
12840
12844
  onCopy: Hs,
@@ -12845,10 +12849,10 @@ const gg = { class: "zm-note-panel" }, mg = {
12845
12849
  onRedo: Lo,
12846
12850
  onNavigate: Jl,
12847
12851
  onSelectRoot: () => {
12848
- u.value = /* @__PURE__ */ new Set([d.value.id]), Et();
12852
+ u.value = /* @__PURE__ */ new Set([d.value.id]), xt();
12849
12853
  }
12850
12854
  });
12851
- const wt = ye(() => {
12855
+ const Et = ye(() => {
12852
12856
  const o = an(d.value);
12853
12857
  return zs(o), Ya(o, {
12854
12858
  mode: G.layoutMode,
@@ -12858,7 +12862,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12858
12862
  });
12859
12863
  }), Is = Y([]), ai = ye(() => (On.value, Is.value));
12860
12864
  Nt(
12861
- wt,
12865
+ Et,
12862
12866
  (o) => {
12863
12867
  const s = [], p = (_) => {
12864
12868
  s.push(_);
@@ -12875,7 +12879,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12875
12879
  o.push({ from: s, to: p, key: `${s.id}->${p.id}` });
12876
12880
  return o;
12877
12881
  }), Gl = ye(
12878
- () => `${wt.value.vbX} ${wt.value.vbY} ${wt.value.vbW} ${wt.value.vbH}`
12882
+ () => `${Et.value.vbX} ${Et.value.vbY} ${Et.value.vbW} ${Et.value.vbH}`
12879
12883
  );
12880
12884
  function zs(o) {
12881
12885
  if (g.value.has(o.id)) {
@@ -12887,7 +12891,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12887
12891
  }
12888
12892
  function Oi(o) {
12889
12893
  const s = Ae(d.value, o);
12890
- s && (l.value = o, f.value = s.text, u.value = /* @__PURE__ */ new Set([o]), Et(), it(() => {
12894
+ s && (l.value = o, f.value = s.text, u.value = /* @__PURE__ */ new Set([o]), xt(), it(() => {
12891
12895
  const p = document.querySelector(".zm-input");
12892
12896
  p == null || p.focus(), p == null || p.select(), Ls(p);
12893
12897
  }));
@@ -12909,7 +12913,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12909
12913
  function Yl(o) {
12910
12914
  if (i.previewMode) return;
12911
12915
  const s = Ae(d.value, o);
12912
- s != null && s.richContent && (M.value = o, k.value = s.richContent.raw, it(() => {
12916
+ s != null && s.richContent && (M.value = o, x.value = s.richContent.raw, it(() => {
12913
12917
  const p = document.querySelector(
12914
12918
  ".zm-node .zm-rich textarea"
12915
12919
  );
@@ -12918,7 +12922,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12918
12922
  }
12919
12923
  function $s() {
12920
12924
  if (!M.value) return;
12921
- const o = M.value, s = Ae(d.value, o), p = k.value;
12925
+ const o = M.value, s = Ae(d.value, o), p = x.value;
12922
12926
  if (s && s.richContent && s.richContent.raw !== p)
12923
12927
  if (s.richContent.kind === "code") {
12924
12928
  const _ = qn(p) || void 0;
@@ -12960,7 +12964,7 @@ const gg = { class: "zm-note-panel" }, mg = {
12960
12964
  function Ds(o) {
12961
12965
  if (o === d.value.id) return;
12962
12966
  const s = lc(d.value, o);
12963
- s && (Ge(), u.value = /* @__PURE__ */ new Set([s.id]), Et(), r("change", d.value), Le());
12967
+ s && (Ge(), u.value = /* @__PURE__ */ new Set([s.id]), xt(), r("change", d.value), Le());
12964
12968
  }
12965
12969
  function Ps(o) {
12966
12970
  const s = [], p = /* @__PURE__ */ new Set();
@@ -13004,7 +13008,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13004
13008
  if (p.length !== 0) {
13005
13009
  Ge();
13006
13010
  for (const _ of s) Jo(d.value, _);
13007
- u.value = /* @__PURE__ */ new Set(), Et(), W.value = { nodes: p, originalIds: new Set(s) }, Us(p.map((_) => _.text).join(`
13011
+ u.value = /* @__PURE__ */ new Set(), xt(), W.value = { nodes: p, originalIds: new Set(s) }, Us(p.map((_) => _.text).join(`
13008
13012
  `)), Le(), r("change", d.value);
13009
13013
  }
13010
13014
  }
@@ -13027,13 +13031,13 @@ const gg = { class: "zm-note-panel" }, mg = {
13027
13031
  }
13028
13032
  function zo() {
13029
13033
  const o = sn.undo();
13030
- o && (d.value = o.data, u.value = new Set(o.selectedIds ?? []), Et(), Le(), r("change", d.value));
13034
+ o && (d.value = o.data, u.value = new Set(o.selectedIds ?? []), xt(), Le(), r("change", d.value));
13031
13035
  }
13032
13036
  function Lo() {
13033
13037
  const o = sn.redo();
13034
- o && (d.value = o.data, u.value = new Set(o.selectedIds ?? []), Et(), Le(), r("change", d.value));
13038
+ o && (d.value = o.data, u.value = new Set(o.selectedIds ?? []), xt(), Le(), r("change", d.value));
13035
13039
  }
13036
- function Et() {
13040
+ function xt() {
13037
13041
  const o = [];
13038
13042
  for (const s of u.value) {
13039
13043
  const p = Ae(d.value, s);
@@ -13050,28 +13054,28 @@ const gg = { class: "zm-note-panel" }, mg = {
13050
13054
  if (!_) return;
13051
13055
  let w = null;
13052
13056
  if (s === 1) {
13053
- const L = kn(d.value, _.id);
13057
+ const L = xn(d.value, _.id);
13054
13058
  if (L) {
13055
13059
  const R = L.children.findIndex((z) => z.id === _.id);
13056
13060
  R >= 0 && R < L.children.length - 1 && (w = L.children[R + 1].id);
13057
13061
  }
13058
13062
  } else if (s === -1) {
13059
- const L = kn(d.value, _.id);
13063
+ const L = xn(d.value, _.id);
13060
13064
  if (L) {
13061
13065
  const R = L.children.findIndex((z) => z.id === _.id);
13062
13066
  R > 0 && (w = L.children[R - 1].id);
13063
13067
  }
13064
13068
  } else if (o === 1) {
13065
- const L = kn(d.value, _.id);
13069
+ const L = xn(d.value, _.id);
13066
13070
  L && (w = L.id);
13067
13071
  } else o === -1 && _.children.length > 0 && (w = _.children[0].id);
13068
- w && (u.value = /* @__PURE__ */ new Set([w]), Et());
13072
+ w && (u.value = /* @__PURE__ */ new Set([w]), xt());
13069
13073
  }
13070
13074
  function Gs(o) {
13071
13075
  if (o !== d.value.id && Jo(d.value, o)) {
13072
13076
  if (Ge(), u.value.has(o)) {
13073
13077
  const s = new Set(u.value);
13074
- s.delete(o), u.value = s, Et();
13078
+ s.delete(o), u.value = s, xt();
13075
13079
  }
13076
13080
  Le(), r("change", d.value);
13077
13081
  }
@@ -13113,7 +13117,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13113
13117
  p.has(s.id) ? p.delete(s.id) : p.add(s.id), u.value = p;
13114
13118
  } else
13115
13119
  u.value = /* @__PURE__ */ new Set([s.id]);
13116
- Et();
13120
+ xt();
13117
13121
  }
13118
13122
  function na(o, s, p) {
13119
13123
  let _ = null;
@@ -13166,7 +13170,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13166
13170
  return;
13167
13171
  }
13168
13172
  const s = C.value;
13169
- s && (s.currentTargetId && ($o(s.srcId, s.currentTargetId, "child"), u.value = /* @__PURE__ */ new Set([s.srcId]), Et()), C.value = null, B.value = 0, N.value = 0, document.body.classList.remove("is-dragging"));
13173
+ s && (s.currentTargetId && ($o(s.srcId, s.currentTargetId, "child"), u.value = /* @__PURE__ */ new Set([s.srcId]), xt()), C.value = null, B.value = 0, N.value = 0, document.body.classList.remove("is-dragging"));
13170
13174
  }
13171
13175
  let oo = !1;
13172
13176
  function oa(o) {
@@ -13188,7 +13192,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13188
13192
  const s = o.target;
13189
13193
  if (!s || s.closest(".zm-node")) return;
13190
13194
  const p = Ee.marquee;
13191
- p.width >= 4 || p.height >= 4 || u.value.size > 0 && (u.value = /* @__PURE__ */ new Set(), Et());
13195
+ p.width >= 4 || p.height >= 4 || u.value.size > 0 && (u.value = /* @__PURE__ */ new Set(), xt());
13192
13196
  }
13193
13197
  function ra() {
13194
13198
  const o = Ee.marquee;
@@ -13199,7 +13203,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13199
13203
  const z = R.width / 2, Z = R.height / 2, J = R.x - z, Ce = R.x + z, A = R.y - Z, re = R.y + Z;
13200
13204
  J <= _ && Ce >= s && A <= w && re >= p && L.push(R.id);
13201
13205
  }
13202
- u.value = o.shiftKey ? /* @__PURE__ */ new Set([...u.value, ...L]) : new Set(L), Et();
13206
+ u.value = o.shiftKey ? /* @__PURE__ */ new Set([...u.value, ...L]) : new Set(L), xt();
13203
13207
  }
13204
13208
  function Vs(o) {
13205
13209
  return g.value.has(o);
@@ -13227,7 +13231,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13227
13231
  if (s === "out" && o.isRoot && G.lineOrigin === "center")
13228
13232
  return { x: o.x, y: o.y };
13229
13233
  if (s === "out" && o.isRoot && G.lineOrigin === "proportional" && _) {
13230
- const z = wt.value.root.children;
13234
+ const z = Et.value.root.children;
13231
13235
  if (w === "down") {
13232
13236
  const be = z.reduce((De, ce) => Math.max(De, Math.abs(ce.x - o.x)), 1), K = Math.min(1, Math.abs(_.x - o.x) / be), ze = o.y + o.height / 2, We = o.y;
13233
13237
  return { x: o.x, y: ze + (We - ze) * K };
@@ -13243,7 +13247,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13243
13247
  return { x: o.x + L * (o.width / 2 - R), y: o.y };
13244
13248
  }
13245
13249
  function En() {
13246
- const o = wt.value;
13250
+ const o = Et.value;
13247
13251
  Ee.resetView(o.width, o.height, o.root.y);
13248
13252
  }
13249
13253
  function aa() {
@@ -13308,7 +13312,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13308
13312
  const s = Sn.value[o];
13309
13313
  if (!s) return;
13310
13314
  const p = ai.value.find((_) => _.id === s);
13311
- p && (u.value = /* @__PURE__ */ new Set([s]), Et(), Ee.centerOn(p.x, p.y, p.width, p.height));
13315
+ p && (u.value = /* @__PURE__ */ new Set([s]), xt(), Ee.centerOn(p.x, p.y, p.width, p.height));
13312
13316
  }
13313
13317
  function ba(o, s) {
13314
13318
  const p = Ae(d.value, o);
@@ -13331,12 +13335,12 @@ const gg = { class: "zm-note-panel" }, mg = {
13331
13335
  const s = Ae(d.value, o);
13332
13336
  return s != null && s.markers ? [...s.markers] : [];
13333
13337
  }
13334
- function ka(o) {
13338
+ function xa(o) {
13335
13339
  var p;
13336
13340
  const s = (p = se.value) == null ? void 0 : p.nodeId;
13337
13341
  s && er(s, o);
13338
13342
  }
13339
- function xa() {
13343
+ function ka() {
13340
13344
  var p;
13341
13345
  const o = (p = se.value) == null ? void 0 : p.nodeId;
13342
13346
  if (!o) return;
@@ -13366,7 +13370,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13366
13370
  o && (Bo(o, []), ae());
13367
13371
  }
13368
13372
  function tr() {
13369
- const o = wt.value, s = "http://www.w3.org/2000/svg", p = document.createElementNS(s, "svg");
13373
+ const o = Et.value, s = "http://www.w3.org/2000/svg", p = document.createElementNS(s, "svg");
13370
13374
  p.setAttribute("xmlns", s), p.setAttribute("viewBox", `${o.vbX} ${o.vbY} ${o.vbW} ${o.vbH}`), p.setAttribute("width", String(o.vbW)), p.setAttribute("height", String(o.vbH));
13371
13375
  const _ = document.createElementNS(s, "rect");
13372
13376
  _.setAttribute("x", String(o.vbX)), _.setAttribute("y", String(o.vbY)), _.setAttribute("width", String(o.vbW)), _.setAttribute("height", String(o.vbH)), _.setAttribute("fill", zn.value), p.appendChild(_);
@@ -13522,7 +13526,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13522
13526
  L.href = w, L.download = `${d.value.text || "mindmap"}.svg`, L.click(), URL.revokeObjectURL(w);
13523
13527
  }
13524
13528
  function nr(o = 2) {
13525
- const s = tr(), p = wt.value;
13529
+ const s = tr(), p = Et.value;
13526
13530
  let w = new XMLSerializer().serializeToString(s);
13527
13531
  w.startsWith("<?xml") || (w = `<?xml version="1.0" encoding="UTF-8"?>
13528
13532
  ` + w);
@@ -13614,7 +13618,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13614
13618
  // layout, and re-center the view. This is the action tied to the
13615
13619
  // "balance" toolbar button.
13616
13620
  balance: () => aa(),
13617
- applyNodeStyle: (o, s) => ke(o, s),
13621
+ applyNodeStyle: (o, s) => xe(o, s),
13618
13622
  getNodeStyle: (o) => ne(o),
13619
13623
  applyNodeImage: (o, s) => Te(o, s),
13620
13624
  applyNodeImageByUrl: (o, s) => Me(o, s),
@@ -13674,7 +13678,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13674
13678
  d.value = an(o), Le();
13675
13679
  },
13676
13680
  { deep: !1 }
13677
- ), ki(() => {
13681
+ ), xi(() => {
13678
13682
  Ge(), it(() => En());
13679
13683
  }), (o, s) => {
13680
13684
  var p, _, w, L, R, z, Z, J, Ce;
@@ -13690,25 +13694,25 @@ const gg = { class: "zm-note-panel" }, mg = {
13690
13694
  onContextmenu: Ne,
13691
13695
  onWheel: s[25] || (s[25] = //@ts-ignore
13692
13696
  (...A) => we(Ee).onWheel && we(Ee).onWheel(...A)),
13693
- onMouseenter: s[26] || (s[26] = (A) => x.value = !0),
13694
- onMouseleave: s[27] || (s[27] = (A) => x.value = !1),
13697
+ onMouseenter: s[26] || (s[26] = (A) => k.value = !0),
13698
+ onMouseleave: s[27] || (s[27] = (A) => k.value = !1),
13695
13699
  onClick: sa
13696
13700
  }, [
13697
13701
  c("div", {
13698
13702
  class: "zm-svg-layer",
13699
13703
  style: Qe({
13700
- left: wt.value.vbX * we(Ee).scale.value + we(Ee).offsetX.value + "px",
13701
- top: wt.value.vbY * we(Ee).scale.value + we(Ee).offsetY.value + "px",
13702
- width: wt.value.vbW * we(Ee).scale.value + "px",
13703
- height: wt.value.vbH * we(Ee).scale.value + "px"
13704
+ left: Et.value.vbX * we(Ee).scale.value + we(Ee).offsetX.value + "px",
13705
+ top: Et.value.vbY * we(Ee).scale.value + we(Ee).offsetY.value + "px",
13706
+ width: Et.value.vbW * we(Ee).scale.value + "px",
13707
+ height: Et.value.vbH * we(Ee).scale.value + "px"
13704
13708
  })
13705
13709
  }, [
13706
13710
  (v(), y("svg", {
13707
13711
  class: "zm-svg",
13708
13712
  viewBox: Gl.value,
13709
13713
  preserveAspectRatio: "xMinYMin meet",
13710
- width: wt.value.vbW * we(Ee).scale.value,
13711
- height: wt.value.vbH * we(Ee).scale.value
13714
+ width: Et.value.vbW * we(Ee).scale.value,
13715
+ height: Et.value.vbH * we(Ee).scale.value
13712
13716
  }, [
13713
13717
  c("g", Yg, [
13714
13718
  (v(!0), y(ue, null, et(Os.value, (A) => (v(), y("path", {
@@ -13739,7 +13743,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13739
13743
  transform: `scale(${we(Ee).scale.value})`,
13740
13744
  transformOrigin: "top left"
13741
13745
  })
13742
- }, xe(C.value.srcText), 5)) : V("", !0),
13746
+ }, ke(C.value.srcText), 5)) : V("", !0),
13743
13747
  c("div", {
13744
13748
  class: "zm-world",
13745
13749
  style: Qe({
@@ -13814,13 +13818,13 @@ const gg = { class: "zm-note-panel" }, mg = {
13814
13818
  }, [
13815
13819
  M.value === A.id ? Bt((v(), y("textarea", {
13816
13820
  key: 0,
13817
- "onUpdate:modelValue": s[0] || (s[0] = (K) => k.value = K),
13821
+ "onUpdate:modelValue": s[0] || (s[0] = (K) => x.value = K),
13818
13822
  class: "zm-rich-edit",
13819
13823
  spellcheck: "false",
13820
13824
  onBlur: $s,
13821
13825
  onKeydown: Xl
13822
13826
  }, null, 544)), [
13823
- [tn, k.value]
13827
+ [tn, x.value]
13824
13828
  ]) : (v(), y(ue, { key: 1 }, [
13825
13829
  A.richContent.kind === "code" ? (v(), y("pre", Jg, [
13826
13830
  c("code", {
@@ -13831,9 +13835,9 @@ const gg = { class: "zm-note-panel" }, mg = {
13831
13835
  (v(!0), y(ue, null, et(we(ts)(A.richContent.raw), (K, ze) => (v(), y("tr", { key: ze }, [
13832
13836
  ze === 0 ? (v(!0), y(ue, { key: 0 }, et(K, (We, De) => (v(), y("th", {
13833
13837
  key: `h${De}`
13834
- }, xe(We), 1))), 128)) : (v(!0), y(ue, { key: 1 }, et(K, (We, De) => (v(), y("td", {
13838
+ }, ke(We), 1))), 128)) : (v(!0), y(ue, { key: 1 }, et(K, (We, De) => (v(), y("td", {
13835
13839
  key: `c${De}`
13836
- }, xe(We), 1))), 128))
13840
+ }, ke(We), 1))), 128))
13837
13841
  ]))), 128))
13838
13842
  ])
13839
13843
  ])) : V("", !0)
@@ -13844,11 +13848,11 @@ const gg = { class: "zm-note-panel" }, mg = {
13844
13848
  (v(!0), y(ue, null, et(A.markers, (K) => (v(), y("span", {
13845
13849
  key: K,
13846
13850
  class: "zm-node-marker",
13847
- title: we(xc)(K),
13851
+ title: we(kc)(K),
13848
13852
  innerHTML: '<svg viewBox="0 0 24 24" width="14" height="14">' + we(Qo)(K) + "</svg>"
13849
13853
  }, null, 8, im))), 128))
13850
13854
  ])) : V("", !0),
13851
- c("span", om, xe(A.text), 1),
13855
+ c("span", om, ke(A.text), 1),
13852
13856
  A.link && l.value !== A.id ? (v(), y("a", {
13853
13857
  key: 1,
13854
13858
  class: "zm-node-link",
@@ -13908,13 +13912,13 @@ const gg = { class: "zm-note-panel" }, mg = {
13908
13912
  key: K,
13909
13913
  class: "zm-node-tag",
13910
13914
  style: Qe(we(fr)(K))
13911
- }, xe(K), 5))), 128))
13915
+ }, ke(K), 5))), 128))
13912
13916
  ])) : V("", !0),
13913
13917
  E.value ? (v(), y("span", {
13914
13918
  key: 5,
13915
13919
  class: "zm-order-badge",
13916
13920
  title: `数据顺序:第 ${Zs(A.id) + 1} 个`
13917
- }, xe(Zs(A.id) + 1), 9, am)) : V("", !0),
13921
+ }, ke(Zs(A.id) + 1), 9, am)) : V("", !0),
13918
13922
  Vs(A.id) && Do(A.id) > 0 ? (v(), y("span", {
13919
13923
  key: 6,
13920
13924
  class: $e(["zm-collapse-badge", { "is-on-left": A.side === -1 }]),
@@ -13923,7 +13927,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13923
13927
  onMousedown: s[12] || (s[12] = Se(() => {
13924
13928
  }, ["stop"])),
13925
13929
  onClick: Se((K) => js(A.id), ["stop"])
13926
- }, xe(Do(A.id)), 47, cm)) : V("", !0),
13930
+ }, ke(Do(A.id)), 47, cm)) : V("", !0),
13927
13931
  la(A) && !Vs(A.id) ? (v(), y("button", {
13928
13932
  key: 7,
13929
13933
  class: $e(["zm-btn zm-collapse", { "is-on-left": A.side === -1 }]),
@@ -13955,7 +13959,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13955
13959
  }, [
13956
13960
  he(He, {
13957
13961
  name: "x",
13958
- size: 9,
13962
+ size: 10,
13959
13963
  stroke: 2.2
13960
13964
  })
13961
13965
  ], 40, fm)) : V("", !0)
@@ -13966,7 +13970,7 @@ const gg = { class: "zm-note-panel" }, mg = {
13966
13970
  key: 2,
13967
13971
  class: $e(["zm-tooltip", { "is-below": !I.value.above }]),
13968
13972
  style: Qe({ left: I.value.x + "px", top: I.value.y + "px" })
13969
- }, xe(I.value.text), 7)) : V("", !0),
13973
+ }, ke(I.value.text), 7)) : V("", !0),
13970
13974
  se.value ? (v(), Zo(Ac, {
13971
13975
  key: 3,
13972
13976
  x: se.value.x,
@@ -13991,8 +13995,8 @@ const gg = { class: "zm-note-panel" }, mg = {
13991
13995
  onAddTable: Qi,
13992
13996
  onEditTable: Qi,
13993
13997
  onRemoveTable: ot,
13994
- onToggleMarker: ka,
13995
- onClearMarkers: xa,
13998
+ onToggleMarker: xa,
13999
+ onClearMarkers: ka,
13996
14000
  onAddTag: Ea,
13997
14001
  onRemoveTags: Sa,
13998
14002
  onClose: ae
@@ -14004,7 +14008,7 @@ const gg = { class: "zm-note-panel" }, mg = {
14004
14008
  container: a.value,
14005
14009
  onOpenSettings: Ut,
14006
14010
  onOpenData: bt,
14007
- onOpenImport: xn,
14011
+ onOpenImport: kn,
14008
14012
  onExportPng: nr,
14009
14013
  onExportSvg: Li,
14010
14014
  onClose: dt
@@ -14030,9 +14034,9 @@ const gg = { class: "zm-note-panel" }, mg = {
14030
14034
  })
14031
14035
  ], 2),
14032
14036
  c("div", {
14033
- class: $e(["zm-toolbar", { "is-preview-only": i.previewMode, "is-hovered": x.value }])
14037
+ class: $e(["zm-toolbar", { "is-preview-only": i.previewMode, "is-hovered": k.value }])
14034
14038
  }, [
14035
- c("span", hm, xe(Math.round(we(Ee).scale.value * 100)) + "%", 1),
14039
+ c("span", hm, ke(Math.round(we(Ee).scale.value * 100)) + "%", 1),
14036
14040
  c("button", {
14037
14041
  class: "zm-tb-btn",
14038
14042
  title: "放大",
@@ -14152,13 +14156,14 @@ const gg = { class: "zm-note-panel" }, mg = {
14152
14156
  data: d.value,
14153
14157
  "selected-id": h.value,
14154
14158
  "collapsed-ids": Xt.value,
14159
+ "show-index": E.value,
14155
14160
  onSelect: Zi,
14156
14161
  onToggleCollapse: Vt,
14157
14162
  onEdit: Si,
14158
14163
  onAddChild: Ji,
14159
14164
  onAddSibling: Qn,
14160
14165
  onMove: ei
14161
- }, null, 8, ["data", "selected-id", "collapsed-ids"])
14166
+ }, null, 8, ["data", "selected-id", "collapsed-ids", "show-index"])
14162
14167
  ]),
14163
14168
  _: 1
14164
14169
  }, 8, ["open"]),
@@ -14245,7 +14250,7 @@ const gg = { class: "zm-note-panel" }, mg = {
14245
14250
  ], 4);
14246
14251
  };
14247
14252
  }
14248
- }), bm = { class: "zm-app" }, vm = { class: "zm-app-main" }, ym = { class: "zm-app-canvas" }, km = /* @__PURE__ */ on({
14253
+ }), bm = { class: "zm-app" }, vm = { class: "zm-app-main" }, ym = { class: "zm-app-canvas" }, xm = /* @__PURE__ */ on({
14249
14254
  __name: "App",
14250
14255
  setup(e) {
14251
14256
  const n = {
@@ -14462,14 +14467,14 @@ function walk(n: Node) {
14462
14467
  U("s_r7", "右七")
14463
14468
  ];
14464
14469
  return { id: "root", text: "flow-mindmap 思维导图", children: [...S, ...F] };
14465
- })(), a = Y(n), l = Y(null), f = Y(/* @__PURE__ */ new Set()), u = Y(!1), h = Y(!1), g = Y(!1), x = Y(!1), C = Y(0), B = Y(!1), N = Y(!1), W = Y(null);
14470
+ })(), a = Y(n), l = Y(null), f = Y(/* @__PURE__ */ new Set()), u = Y(!1), h = Y(!1), g = Y(!1), k = Y(!1), C = Y(0), B = Y(!1), N = Y(!1), W = Y(null);
14466
14471
  function I() {
14467
14472
  a.value = t();
14468
14473
  }
14469
14474
  function M() {
14470
- h.value = !0, g.value = !1, x.value = !1;
14475
+ h.value = !0, g.value = !1, k.value = !1;
14471
14476
  }
14472
- function k(U) {
14477
+ function x(U) {
14473
14478
  M();
14474
14479
  }
14475
14480
  const d = yi({
@@ -14530,7 +14535,7 @@ function walk(n: Node) {
14530
14535
  N.value && (N.value = !1, U.stopPropagation());
14531
14536
  }
14532
14537
  }
14533
- ki(() => {
14538
+ xi(() => {
14534
14539
  var U;
14535
14540
  document.addEventListener("keydown", E), window.addEventListener("hashchange", I), (U = W.value) == null || U.applySettings({
14536
14541
  rainbowBranch: d.rainbowBranch,
@@ -14551,19 +14556,19 @@ function walk(n: Node) {
14551
14556
  function ve(U) {
14552
14557
  var F;
14553
14558
  const S = U && U.length > 0 ? U[0] : null;
14554
- l.value = S, S ? !x.value && ((F = W.value) != null && F.nodeHasContent(S.id)) && (h.value = !1, g.value = !1, x.value = !0) : x.value = !1;
14559
+ l.value = S, S ? !k.value && ((F = W.value) != null && F.nodeHasContent(S.id)) && (h.value = !1, g.value = !1, k.value = !0) : k.value = !1;
14555
14560
  }
14556
14561
  Nt(a, (U) => {
14557
14562
  if (!l.value) return;
14558
14563
  const S = ne(U, l.value.id);
14559
14564
  S ? S !== l.value && (l.value = S) : l.value = null;
14560
14565
  }, { deep: !1 });
14561
- function ke(U) {
14566
+ function xe(U) {
14562
14567
  if (!l.value || l.value.id !== U) {
14563
14568
  const S = ne(a.value, U);
14564
14569
  S && (l.value = S);
14565
14570
  }
14566
- h.value = !1, g.value = !1, x.value = !0, C.value++;
14571
+ h.value = !1, g.value = !1, k.value = !0, C.value++;
14567
14572
  }
14568
14573
  function ne(U, S) {
14569
14574
  if (U.id === S) return U;
@@ -14679,10 +14684,10 @@ function walk(n: Node) {
14679
14684
  "built-in-drawers": !1,
14680
14685
  onChange: fe,
14681
14686
  onSelect: ve,
14682
- onEditNote: ke,
14687
+ onEditNote: xe,
14683
14688
  onCanvasSettings: S[2] || (S[2] = (F) => B.value = !0),
14684
14689
  onCanvasData: M,
14685
- onCanvasImport: k,
14690
+ onCanvasImport: x,
14686
14691
  onCanvasTogglePreview: S[3] || (S[3] = (F) => N.value = !N.value),
14687
14692
  onCanvasOutline: S[4] || (S[4] = (F) => u.value = !0)
14688
14693
  }, null, 8, ["data", "preview-mode"])
@@ -14721,9 +14726,9 @@ function walk(n: Node) {
14721
14726
  he(dn, {
14722
14727
  side: "right",
14723
14728
  width: 360,
14724
- open: x.value && !N.value,
14729
+ open: k.value && !N.value,
14725
14730
  title: "节点内容",
14726
- "onUpdate:open": S[9] || (S[9] = (F) => x.value = F)
14731
+ "onUpdate:open": S[9] || (S[9] = (F) => k.value = F)
14727
14732
  }, {
14728
14733
  default: qt(() => [
14729
14734
  he(_s, {
@@ -14764,9 +14769,9 @@ function walk(n: Node) {
14764
14769
  }, 8, ["open"])
14765
14770
  ]));
14766
14771
  }
14767
- }), Am = "0.5.7", _m = {
14772
+ }), Am = "0.5.8", _m = {
14768
14773
  install(e) {
14769
- e.component("FlowMindMap", Cs), e.component("FlowMindMapOutline", as), e.component("FlowMindMapDrawer", dn), e.component("FlowMindMapDataPanel", cs), e.component("FlowMindMapMarkdownPanel", us), e.component("FlowMindMapSettingsPanel", ds), e.component("FlowMindMapNotePanel", _s), e.component("FlowMindMapApp", km);
14774
+ e.component("FlowMindMap", Cs), e.component("FlowMindMapOutline", as), e.component("FlowMindMapDrawer", dn), e.component("FlowMindMapDataPanel", cs), e.component("FlowMindMapMarkdownPanel", us), e.component("FlowMindMapSettingsPanel", ds), e.component("FlowMindMapNotePanel", _s), e.component("FlowMindMapApp", xm);
14770
14775
  }
14771
14776
  };
14772
14777
  export {
@@ -14775,7 +14780,7 @@ export {
14775
14780
  sl as MARKER_LIB,
14776
14781
  us as MarkdownPanel,
14777
14782
  Cs as MindMap,
14778
- km as MindMapApp,
14783
+ xm as MindMapApp,
14779
14784
  _s as NotePanel,
14780
14785
  as as Outline,
14781
14786
  ds as SettingsPanel,
@@ -14785,11 +14790,11 @@ export {
14785
14790
  an as clone,
14786
14791
  _m as default,
14787
14792
  Ae as findNode,
14788
- kn as findParent,
14793
+ xn as findParent,
14789
14794
  Gi as markdownToMindMap,
14790
14795
  Em as markdownToRichMindMap,
14791
14796
  Tm as markerDef,
14792
- xc as markerLabel,
14797
+ kc as markerLabel,
14793
14798
  Qo as markerSvg,
14794
14799
  ji as mindMapToMarkdown,
14795
14800
  Jo as removeNode,