mind-elixir 5.12.0 → 5.12.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const es = 0, ts = 1, ns = 2, fe = {
1
+ const es = 0, ts = 1, ns = 2, G = {
2
2
  name: "Latte",
3
3
  type: "light",
4
4
  palette: ["#dd7878", "#ea76cb", "#8839ef", "#e64553", "#fe640b", "#df8e1d", "#40a02b", "#209fb5", "#1e66f5", "#7287fd"],
@@ -53,24 +53,24 @@ const es = 0, ts = 1, ns = 2, fe = {
53
53
  "--map-padding": "50px 80px"
54
54
  }
55
55
  };
56
- function ae(e) {
56
+ function de(e) {
57
57
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/"/g, "&quot;");
58
58
  }
59
- const ne = function(e, t) {
59
+ const oe = function(e, t) {
60
60
  if (t.id === e)
61
61
  return t;
62
62
  if (t.children && t.children.length) {
63
63
  for (let n = 0; n < t.children.length; n++) {
64
- const o = ne(e, t.children[n]);
64
+ const o = oe(e, t.children[n]);
65
65
  if (o) return o;
66
66
  }
67
67
  return null;
68
68
  } else
69
69
  return null;
70
- }, R = (e, t) => {
70
+ }, B = (e, t) => {
71
71
  if (e.parent = t, e.children)
72
72
  for (let n = 0; n < e.children.length; n++)
73
- R(e.children[n], e);
73
+ B(e.children[n], e);
74
74
  }, F = (e, t, n) => {
75
75
  if (e.expanded = t, e.children)
76
76
  if (n === void 0 || n > 0) {
@@ -84,11 +84,11 @@ const ne = function(e, t) {
84
84
  });
85
85
  };
86
86
  function pe(e) {
87
- if (e.id = B(), e.children)
87
+ if (e.id = R(), e.children)
88
88
  for (let t = 0; t < e.children.length; t++)
89
89
  pe(e.children[t]);
90
90
  }
91
- function oe(e, t, n, o) {
91
+ function se(e, t, n, o) {
92
92
  const s = n - e, i = o - t, c = Math.atan2(i, s) * 180 / Math.PI, r = 12, a = 30, d = (c + 180 - a) * Math.PI / 180, h = (c + 180 + a) * Math.PI / 180;
93
93
  return {
94
94
  x1: n + Math.cos(d) * r,
@@ -97,11 +97,11 @@ function oe(e, t, n, o) {
97
97
  y2: o + Math.sin(h) * r
98
98
  };
99
99
  }
100
- function B() {
100
+ function R() {
101
101
  return ((/* @__PURE__ */ new Date()).getTime().toString(16) + Math.random().toString(16).substring(2)).substring(2, 18);
102
102
  }
103
103
  const pt = function() {
104
- const e = B();
104
+ const e = R();
105
105
  return {
106
106
  topic: this.newTopicName,
107
107
  id: e
@@ -123,7 +123,7 @@ const M = (e, t) => {
123
123
  }, k = (e, t) => {
124
124
  for (const n in t)
125
125
  e.setAttribute(n, t[n]);
126
- }, te = (e) => e ? e.tagName === "ME-TPC" : !1, me = (e) => e.filter((t) => t.nodeObj.parent).filter((t, n, o) => {
126
+ }, ne = (e) => e ? e.tagName === "ME-TPC" : !1, me = (e) => e.filter((t) => t.nodeObj.parent).filter((t, n, o) => {
127
127
  for (let s = 0; s < o.length; s++) {
128
128
  if (t === o[s]) continue;
129
129
  const { parent: i } = t.nodeObj;
@@ -150,11 +150,11 @@ const M = (e, t) => {
150
150
  return Math.sqrt(n * n + o * o);
151
151
  }, gt = function(e, t) {
152
152
  if (!t)
153
- return ie(e), e;
153
+ return re(e), e;
154
154
  let n = e.querySelector(".insert-preview");
155
155
  const o = `insert-preview ${t} show`;
156
156
  return n || (n = document.createElement("div"), e.appendChild(n)), n.className = o, e;
157
- }, ie = function(e) {
157
+ }, re = function(e) {
158
158
  if (!e) return;
159
159
  const t = e.querySelectorAll(".insert-preview");
160
160
  for (const n of t || [])
@@ -228,7 +228,7 @@ function wt(e, t, n) {
228
228
  const s = n.clientX - t.startX, i = n.clientY - t.startY, l = Math.sqrt(s * s + i * i);
229
229
  if (!t.isDragging && l > vt && Je(e, t), !t.isDragging) return;
230
230
  const c = e.container.getBoundingClientRect();
231
- Ue(t.ghost, n.clientX - c.x, n.clientY - c.y), n.clientX < c.x + 50 ? t.edgeMoveController.move(1, 0) : n.clientX > c.x + c.width - 50 ? t.edgeMoveController.move(-1, 0) : n.clientY < c.y + 50 ? t.edgeMoveController.move(0, 1) : n.clientY > c.y + c.height - 50 ? t.edgeMoveController.move(0, -1) : t.edgeMoveController.stop(), ie(t.meet);
231
+ Ue(t.ghost, n.clientX - c.x, n.clientY - c.y), n.clientX < c.x + 50 ? t.edgeMoveController.move(1, 0) : n.clientX > c.x + c.width - 50 ? t.edgeMoveController.move(-1, 0) : n.clientY < c.y + 50 ? t.edgeMoveController.move(0, 1) : n.clientY > c.y + c.height - 50 ? t.edgeMoveController.move(0, -1) : t.edgeMoveController.stop(), re(t.meet);
232
232
  const r = 12 * e.scaleVal, a = document.elementFromPoint(n.clientX, n.clientY - r);
233
233
  if (Le(a, o)) {
234
234
  t.meet = a;
@@ -251,7 +251,7 @@ function xt(e, t, n) {
251
251
  t.edgeMoveController.stop();
252
252
  for (const s of o)
253
253
  s.parentElement.parentElement.style.opacity = "1";
254
- t.ghost.style.display = "none", t.ghost.innerHTML = "", t.isDragging && t.meet && (ie(t.meet), t.insertType === "before" ? e.moveNodeBefore(o, t.meet) : t.insertType === "after" ? e.moveNodeAfter(o, t.meet) : t.insertType === "in" && e.moveNodeIn(o, t.meet)), e.dragged = null, t.isDragging = !1, t.insertType = null, t.meet = null, t.pointerId = null;
254
+ t.ghost.style.display = "none", t.ghost.innerHTML = "", t.isDragging && t.meet && (re(t.meet), t.insertType === "before" ? e.moveNodeBefore(o, t.meet) : t.insertType === "after" ? e.moveNodeAfter(o, t.meet) : t.insertType === "in" && e.moveNodeIn(o, t.meet)), e.dragged = null, t.isDragging = !1, t.insertType = null, t.meet = null, t.pointerId = null;
255
255
  }
256
256
  }
257
257
  function Ae(e, t) {
@@ -260,7 +260,7 @@ function Ae(e, t) {
260
260
  t.edgeMoveController.stop();
261
261
  for (const o of n)
262
262
  o.parentElement.parentElement.style.opacity = "1";
263
- t.meet && ie(t.meet), t.ghost.style.display = "none", t.ghost.innerHTML = "", e.dragged = null, t.isDragging = !1, t.insertType = null, t.meet = null, t.pointerId = null;
263
+ t.meet && re(t.meet), t.ghost.style.display = "none", t.ghost.innerHTML = "", e.dragged = null, t.isDragging = !1, t.insertType = null, t.meet = null, t.pointerId = null;
264
264
  }
265
265
  }
266
266
  function Et(e) {
@@ -332,7 +332,7 @@ const H = {
332
332
  } else e.link && (e.link = void 0);
333
333
  if (t.icons && t.icons.length) {
334
334
  const n = document.createElement("span");
335
- n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${ae(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
335
+ n.className = "icons", n.innerHTML = t.icons.map((o) => `<span>${de(o)}</span>`).join(""), e.appendChild(n), e.icons = n;
336
336
  } else e.icons && (e.icons = void 0);
337
337
  if (t.tags && t.tags.length) {
338
338
  const n = document.createElement("div");
@@ -405,32 +405,32 @@ const Lt = function(e) {
405
405
  }, ve = function(e) {
406
406
  const t = document.createElement("me-epd");
407
407
  return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
408
- }, K = (e) => {
408
+ }, V = (e) => {
409
409
  const t = e.parent?.children, n = t?.indexOf(e) ?? 0;
410
410
  return { siblings: t, index: n };
411
411
  };
412
412
  function Mt(e) {
413
- const { siblings: t, index: n } = K(e);
413
+ const { siblings: t, index: n } = V(e);
414
414
  if (t === void 0) return;
415
415
  const o = t[n];
416
416
  n === 0 ? (t[n] = t[t.length - 1], t[t.length - 1] = o) : (t[n] = t[n - 1], t[n - 1] = o);
417
417
  }
418
418
  function At(e) {
419
- const { siblings: t, index: n } = K(e);
419
+ const { siblings: t, index: n } = V(e);
420
420
  if (t === void 0) return;
421
421
  const o = t[n];
422
422
  n === t.length - 1 ? (t[n] = t[0], t[0] = o) : (t[n] = t[n + 1], t[n + 1] = o);
423
423
  }
424
424
  function et(e) {
425
- const { siblings: t, index: n } = K(e);
425
+ const { siblings: t, index: n } = V(e);
426
426
  return t === void 0 ? 0 : (t.splice(n, 1), t.length);
427
427
  }
428
428
  function Pt(e, t, n) {
429
- const { siblings: o, index: s } = K(n);
429
+ const { siblings: o, index: s } = V(n);
430
430
  o !== void 0 && (t === "before" ? o.splice(s, 0, e) : o.splice(s + 1, 0, e));
431
431
  }
432
432
  function Ot(e, t) {
433
- const { siblings: n, index: o } = K(e);
433
+ const { siblings: n, index: o } = V(e);
434
434
  n !== void 0 && (n[o] = t, t.children = [e]);
435
435
  }
436
436
  function Ht(e, t, n) {
@@ -438,7 +438,7 @@ function Ht(e, t, n) {
438
438
  n.children ? n.children.push(t) : n.children = [t];
439
439
  else {
440
440
  t.direction !== void 0 && (t.direction = n.direction);
441
- const { siblings: o, index: s } = K(n);
441
+ const { siblings: o, index: s } = V(n);
442
442
  if (o === void 0) return;
443
443
  e === "before" ? o.splice(s, 0, t) : o.splice(s + 1, 0, t);
444
444
  }
@@ -455,7 +455,7 @@ const $t = function({ map: e, direction: t }, n) {
455
455
  }, tt = function(e, t, n) {
456
456
  const o = n.children[0].children[0], s = t.parentElement;
457
457
  if (s.tagName === "ME-PARENT") {
458
- if (G(o), s.children[1])
458
+ if (q(o), s.children[1])
459
459
  s.nextSibling.appendChild(n);
460
460
  else {
461
461
  const i = e.createChildren([n]);
@@ -473,7 +473,7 @@ const $t = function({ map: e, direction: t }, n) {
473
473
  }, nt = {
474
474
  before: "beforebegin",
475
475
  after: "afterend"
476
- }, G = function(e) {
476
+ }, q = function(e) {
477
477
  const n = e.parentElement.parentElement.lastElementChild;
478
478
  n?.tagName === "svg" && n?.remove();
479
479
  }, It = function(e, t) {
@@ -490,10 +490,10 @@ const $t = function({ map: e, direction: t }, n) {
490
490
  const o = t.nodeObj;
491
491
  o.expanded === !1 && (e.expandNode(t, !0), t = e.findEle(o.id));
492
492
  const s = n || e.generateNewObj();
493
- o.children ? o.children.push(s) : o.children = [s], R(e.nodeData);
493
+ o.children ? o.children.push(s) : o.children = [s], B(e.nodeData);
494
494
  const { grp: i, top: l } = e.createWrapper(s);
495
495
  return tt(e, t, i), { newTop: l, newNodeObj: s };
496
- }, Rt = function(e, t, n) {
496
+ }, Bt = function(e, t, n) {
497
497
  const o = t || this.currentNode;
498
498
  if (!o) return;
499
499
  const s = o.nodeObj;
@@ -514,22 +514,22 @@ const $t = function({ map: e, direction: t }, n) {
514
514
  const a = o.closest("me-main").className === H.LHS ? 0 : 1;
515
515
  i.direction = a;
516
516
  }
517
- Pt(i, e, s), R(this.nodeData);
517
+ Pt(i, e, s), B(this.nodeData);
518
518
  const l = o.parentElement, { grp: c, top: r } = this.createWrapper(i);
519
519
  l.parentElement.insertAdjacentElement(nt[e], c), this.linkDiv(c.offsetParent), n || this.editTopic(r.firstChild), this.bus.fire("operation", {
520
520
  name: "insertSibling",
521
521
  type: e,
522
522
  obj: i
523
523
  }), this.selectNode(r.firstChild, !0);
524
- }, Bt = function(e, t) {
524
+ }, Rt = function(e, t) {
525
525
  const n = e || this.currentNode;
526
526
  if (!n) return;
527
- G(n);
527
+ q(n);
528
528
  const o = n.nodeObj;
529
529
  if (!o.parent)
530
530
  return;
531
531
  const s = t || this.generateNewObj();
532
- Ot(o, s), R(this.nodeData);
532
+ Ot(o, s), B(this.nodeData);
533
533
  const i = n.parentElement.parentElement, { grp: l, top: c } = this.createWrapper(s, !0);
534
534
  c.appendChild(ve(!0)), i.insertAdjacentElement("afterend", l);
535
535
  const r = this.createChildren([i]);
@@ -581,7 +581,7 @@ const $t = function({ map: e, direction: t }, n) {
581
581
  name: "moveUpNode",
582
582
  obj: n
583
583
  });
584
- }, Kt = function(e) {
584
+ }, Vt = function(e) {
585
585
  const t = e || this.currentNode;
586
586
  if (!t) return;
587
587
  const n = t.nodeObj;
@@ -591,7 +591,7 @@ const $t = function({ map: e, direction: t }, n) {
591
591
  name: "moveDownNode",
592
592
  obj: n
593
593
  });
594
- }, Vt = function(e) {
594
+ }, Kt = function(e) {
595
595
  if (e = me(e), e.length === 0) return;
596
596
  for (const n of e) {
597
597
  const o = n.nodeObj, s = et(o);
@@ -609,11 +609,11 @@ const $t = function({ map: e, direction: t }, n) {
609
609
  const i = [];
610
610
  for (const c of e) {
611
611
  const r = c.nodeObj;
612
- if (Ht(t, r, s), R(o.nodeData), t === "in") {
612
+ if (Ht(t, r, s), B(o.nodeData), t === "in") {
613
613
  const a = c.parentElement;
614
614
  tt(o, n, a.parentElement);
615
615
  } else {
616
- G(c);
616
+ q(c);
617
617
  const a = c.parentElement.parentNode;
618
618
  i.includes(a.parentElement) || i.push(a.parentElement), n.parentElement.parentNode.insertAdjacentElement(nt[t], a);
619
619
  }
@@ -644,16 +644,16 @@ const $t = function({ map: e, direction: t }, n) {
644
644
  beginEdit: Ut,
645
645
  copyNode: Yt,
646
646
  copyNodes: Xt,
647
- insertParent: Bt,
648
- insertSibling: Rt,
649
- moveDownNode: Kt,
647
+ insertParent: Rt,
648
+ insertSibling: Bt,
649
+ moveDownNode: Vt,
650
650
  moveNodeAfter: qt,
651
651
  moveNodeBefore: Gt,
652
652
  moveNodeIn: zt,
653
653
  moveUpNode: Ft,
654
- removeNodes: Vt,
654
+ removeNodes: Kt,
655
655
  reshapeNode: It,
656
- rmSubline: G,
656
+ rmSubline: q,
657
657
  setNodeTopic: Jt
658
658
  }, Symbol.toStringTag, { value: "Module" }));
659
659
  function Zt(e) {
@@ -662,7 +662,9 @@ function Zt(e) {
662
662
  arrows: e.arrows,
663
663
  summaries: e.summaries,
664
664
  direction: e.direction,
665
- theme: e.theme
665
+ theme: e.theme,
666
+ compact: e.compact,
667
+ meta: e.meta
666
668
  };
667
669
  }
668
670
  const Qt = function(e, t = !1) {
@@ -752,7 +754,7 @@ const Qt = function(e, t = !1) {
752
754
  x: o.left,
753
755
  y: o.top
754
756
  }, i = e.parentNode, l = i.children[1];
755
- if (l.expanded = n.expanded, l.className = n.expanded ? "minus" : "", G(e), n.expanded) {
757
+ if (l.expanded = n.expanded, l.className = n.expanded ? "minus" : "", q(e), n.expanded) {
756
758
  const h = this.createChildren(
757
759
  n.children.map((u) => this.createWrapper(u).grp)
758
760
  );
@@ -777,7 +779,7 @@ const Qt = function(e, t = !1) {
777
779
  }, c = s.x - l.x, r = s.y - l.y;
778
780
  this.move(c, r);
779
781
  }, xn = function(e) {
780
- this.clearSelection(), e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || [], e.theme && this.changeTheme(e.theme)), R(this.nodeData), this.layout(), this.linkDiv();
782
+ this.clearSelection(), e && (e = JSON.parse(JSON.stringify(e)), this.nodeData = e.nodeData, this.arrows = e.arrows || [], this.summaries = e.summaries || [], e.meta && (this.meta = e.meta), e.theme && this.changeTheme(e.theme)), B(this.nodeData), this.layout(), this.linkDiv();
781
783
  }, En = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
782
784
  __proto__: null,
783
785
  cancelFocus: gn,
@@ -1066,7 +1068,7 @@ function Pn(e) {
1066
1068
  }, h = (f) => {
1067
1069
  if (!e.editable) return;
1068
1070
  const y = f.target;
1069
- if (te(y)) {
1071
+ if (ne(y)) {
1070
1072
  e.selectNode(y), e.beginEdit(y);
1071
1073
  return;
1072
1074
  }
@@ -1083,7 +1085,7 @@ function Pn(e) {
1083
1085
  return;
1084
1086
  }
1085
1087
  if (t.handlePointerDown(f), t.mousedown && (e.ptState = i.Pan), f.button === 0 || f.pointerType === "touch")
1086
- if (te(y)) {
1088
+ if (ne(y)) {
1087
1089
  e.selection?.cancel();
1088
1090
  const S = e.currentNodes || [];
1089
1091
  if (f.ctrlKey || f.metaKey || e.mobileMultiSelect ? S.includes(y) ? o = y : ((e.currentArrow || e.currentSummary) && e.clearSelection(), e.selection?.select(y)) : S.includes(y) || e.selectNode(y), !e.editable) return;
@@ -1128,7 +1130,7 @@ function Pn(e) {
1128
1130
  f.preventDefault(), f.button === 2 && e.editable && setTimeout(() => {
1129
1131
  if (e.panHelper.moved || e.ptState !== i.Idle && e.ptState !== i.Pan) return;
1130
1132
  const y = f.target;
1131
- te(y) && !y.classList.contains("selected") && e.selectNode(y), e.bus.fire("showContextMenu", f);
1133
+ ne(y) && !y.classList.contains("selected") && e.selectNode(y), e.bus.fire("showContextMenu", f);
1132
1134
  }, 200);
1133
1135
  }, m = (f) => {
1134
1136
  if (f.stopPropagation(), f.preventDefault(), f.ctrlKey || f.metaKey) return Mn(e, f);
@@ -1176,11 +1178,11 @@ function On() {
1176
1178
  }
1177
1179
  };
1178
1180
  }
1179
- const A = "http://www.w3.org/2000/svg", re = function(e) {
1181
+ const A = "http://www.w3.org/2000/svg", le = function(e) {
1180
1182
  const t = e.clientWidth, n = e.clientHeight, o = e.dataset, s = Number(o.x), i = Number(o.y), l = o.anchor;
1181
1183
  let c = s;
1182
1184
  l === "middle" ? c = s - t / 2 : l === "end" && (c = s - t), e.style.left = `${c}px`, e.style.top = `${i - n / 2}px`, e.style.visibility = "visible";
1183
- }, de = function(e, t, n, o) {
1185
+ }, he = function(e, t, n, o) {
1184
1186
  const { anchor: s = "middle", color: i, dataType: l, svgId: c } = o, r = document.createElement("div");
1185
1187
  r.className = "svg-label", r.style.color = i || "#666";
1186
1188
  const a = "label-" + c;
@@ -1250,7 +1252,7 @@ const A = "http://www.w3.org/2000/svg", re = function(e) {
1250
1252
  }), s.addEventListener("blur", () => {
1251
1253
  if (!s) return;
1252
1254
  const i = s.innerText?.trim() || "";
1253
- i === "" ? n.label = o : n.label = i, t.style.opacity = "1", s.remove(), i !== o && (e.markdown ? t.innerHTML = e.markdown(n.label, n) : t.textContent = n.label, re(t), "parent" in n ? e.bus.fire("operation", {
1255
+ i === "" ? n.label = o : n.label = i, t.style.opacity = "1", s.remove(), i !== o && (e.markdown ? t.innerHTML = e.markdown(n.label, n) : t.textContent = n.label, le(t), "parent" in n ? e.bus.fire("operation", {
1254
1256
  name: "finishEditSummary",
1255
1257
  obj: n
1256
1258
  }) : e.bus.fire("operation", {
@@ -1309,7 +1311,7 @@ function In(e, t) {
1309
1311
  return x.innerText = y, x.className = "tips", x;
1310
1312
  }, s = (y, x, S) => {
1311
1313
  const C = document.createElement("li");
1312
- return C.id = y, C.innerHTML = `<span>${ae(x)}</span><span ${S ? 'class="key"' : ""}>${ae(S)}</span>`, C;
1314
+ return C.id = y, C.innerHTML = `<span>${de(x)}</span><span ${S ? 'class="key"' : ""}>${de(S)}</span>`, C;
1313
1315
  }, i = t.locale, l = s("cm-add_child", i.addChild, "Tab"), c = s("cm-add_parent", i.addParent, "Ctrl + Enter"), r = s("cm-add_sibling", i.addSibling, "Enter"), a = s("cm-remove_child", i.removeNode, "Delete"), d = s("cm-fucus", i.focus, ""), h = s("cm-unfucus", i.cancelFocus, ""), u = s("cm-up", i.moveUp, "PgUp"), b = s("cm-down", i.moveDown, "Pgdn"), v = s("cm-link", i.link, ""), p = s("cm-link-bidirectional", i.linkBidirectional, ""), g = s("cm-summary", i.summary, ""), m = document.createElement("ul");
1314
1316
  if (m.className = "menu-list", m.appendChild(l), m.appendChild(c), m.appendChild(r), m.appendChild(a), t.focus && (m.appendChild(d), m.appendChild(h)), m.appendChild(u), m.appendChild(b), m.appendChild(g), t.link && (m.appendChild(v), m.appendChild(p)), t && t.extend)
1315
1317
  for (let y = 0; y < t.extend.length; y++) {
@@ -1323,7 +1325,7 @@ function In(e, t) {
1323
1325
  let E = !0;
1324
1326
  const N = (y) => {
1325
1327
  const x = y.target;
1326
- if (te(x)) {
1328
+ if (ne(x)) {
1327
1329
  x.parentElement.tagName === "ME-ROOT" ? E = !0 : E = !1, E ? (d.className = "disabled", u.className = "disabled", b.className = "disabled", c.className = "disabled", r.className = "disabled", a.className = "disabled") : (d.className = "", u.className = "", b.className = "", c.className = "", r.className = "", a.className = ""), w.hidden = !1, m.style.top = "", m.style.bottom = "", m.style.left = "", m.style.right = "";
1328
1330
  const S = m.offsetHeight, C = m.offsetWidth, T = m.getBoundingClientRect(), D = y.clientY - T.top, L = y.clientX - T.left;
1329
1331
  S + D > window.innerHeight ? (m.style.top = "", m.style.bottom = "0px") : (m.style.bottom = "", m.style.top = D + 15 + "px"), C + L > window.innerWidth ? (m.style.left = "", m.style.right = "0px") : (m.style.right = "", m.style.left = L + 10 + "px");
@@ -1369,7 +1371,7 @@ function In(e, t) {
1369
1371
  l.onclick = null, c.onclick = null, r.onclick = null, a.onclick = null, d.onclick = null, h.onclick = null, u.onclick = null, b.onclick = null, v.onclick = null, g.onclick = null, w.onclick = null, e.container.oncontextmenu = null;
1370
1372
  };
1371
1373
  }
1372
- const Rn = function(e) {
1374
+ const Bn = function(e) {
1373
1375
  return ["createSummary", "removeSummary", "finishEditSummary"].includes(e.name) ? {
1374
1376
  type: "summary",
1375
1377
  value: e.obj.id
@@ -1384,7 +1386,7 @@ const Rn = function(e) {
1384
1386
  value: [e.obj.id]
1385
1387
  };
1386
1388
  };
1387
- function Bn(e) {
1389
+ function Rn(e) {
1388
1390
  let t = [], n = -1, o = e.getData(), s = [];
1389
1391
  e.undo = function() {
1390
1392
  if (n > -1) {
@@ -1417,7 +1419,7 @@ function Bn(e) {
1417
1419
  prev: o,
1418
1420
  operation: r.name,
1419
1421
  currentSelected: s.map((h) => h.id),
1420
- currentTarget: Rn(r),
1422
+ currentTarget: Bn(r),
1421
1423
  next: a
1422
1424
  };
1423
1425
  t.push(d), o = a, n = t.length - 1;
@@ -1430,13 +1432,13 @@ function Bn(e) {
1430
1432
  e.bus.removeListener("operation", i), e.bus.removeListener("selectNodes", c), e.container.removeEventListener("keydown", l);
1431
1433
  };
1432
1434
  }
1433
- const Wn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169394918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2021" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" p-id="2022"></path></svg>', Yn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169375313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="currentColor" p-id="1776"></path></svg>', Xn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169667709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3037" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="currentColor" p-id="3038"></path></svg>', Fn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169402629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2170" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" p-id="2171"></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" p-id="2172"></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" p-id="2173"></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" p-id="2174"></path></svg>', Kn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169573443" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="currentColor" p-id="2884"></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="currentColor" p-id="2885"></path></svg>', Vn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" p-id="2481"></path></svg>', zn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169426515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2730" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" p-id="2731"></path></svg>', Gn = {
1435
+ const Wn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169394918" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2021" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M851.91168 328.45312c-59.97056 0-108.6208 48.47104-108.91264 108.36992l-137.92768 38.4a109.14304 109.14304 0 0 0-63.46752-46.58688l1.39264-137.11872c47.29344-11.86816 82.31936-54.66624 82.31936-105.64096 0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.76288-108.91776 108.91776c0 49.18784 32.60928 90.75712 77.38368 104.27392l-1.41312 138.87488a109.19936 109.19936 0 0 0-63.50336 48.55808l-138.93632-39.48544 0.01024-0.72704c0-60.15488-48.76288-108.91776-108.91776-108.91776s-108.91776 48.75776-108.91776 108.91776c0 60.15488 48.76288 108.91264 108.91776 108.91264 39.3984 0 73.91232-20.92032 93.03552-52.2496l139.19232 39.552-0.00512 0.2304c0 25.8304 9.00096 49.5616 24.02816 68.23424l-90.14272 132.63872a108.7488 108.7488 0 0 0-34.2528-5.504c-60.15488 0-108.91776 48.768-108.91776 108.91776 0 60.16 48.76288 108.91776 108.91776 108.91776 60.16 0 108.92288-48.75776 108.92288-108.91776 0-27.14624-9.9328-51.968-26.36288-71.04l89.04704-131.03104a108.544 108.544 0 0 0 37.6832 6.70208 108.672 108.672 0 0 0 36.48512-6.272l93.13792 132.57216a108.48256 108.48256 0 0 0-24.69888 69.0688c0 60.16 48.768 108.92288 108.91776 108.92288 60.16 0 108.91776-48.76288 108.91776-108.92288 0-60.14976-48.75776-108.91776-108.91776-108.91776a108.80512 108.80512 0 0 0-36.69504 6.3488l-93.07136-132.48a108.48768 108.48768 0 0 0 24.79616-72.22784l136.09984-37.888c18.99008 31.93856 53.84192 53.3504 93.69088 53.3504 60.16 0 108.92288-48.75776 108.92288-108.91264-0.00512-60.15488-48.77312-108.92288-108.92288-108.92288z" p-id="2022"></path></svg>', Yn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169375313" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1775" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639 463.30000001L639 285.1c0-36.90000001-26.4-68.5-61.3-68.5l-150.2 0c-1.5 0-3 0.1-4.5 0.3-10.2-38.7-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c42 0 77.3-28.6 87.5-67.39999999 1.4 0.3 2.9 0.4 4.5 0.39999999L577.7 263.6c6.8 0 14.3 8.9 14.3 21.49999999l0 427.00000001c0 12.7-7.40000001 21.5-14.30000001 21.5l-150.19999999 0c-1.5 0-3 0.2-4.5 0.4-10.2-38.8-45.5-67.3-87.5-67.3-50 0-90.5 40.5-90.5 90.4 0 49.9 40.5 90.6 90.5 90.59999999 42 0 77.3-28.6 87.5-67.39999999 1.4 0.2 2.9 0.4 4.49999999 0.4L577.7 780.7c34.80000001 0 61.3-31.6 61.3-68.50000001L639 510.3l79.1 0c10.4 38.5 45.49999999 67 87.4 67 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-41.79999999 0-77.00000001 28.4-87.4 67L639 463.30000001z" fill="currentColor" p-id="1776"></path></svg>', Xn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169667709" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3037" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M385 560.69999999L385 738.9c0 36.90000001 26.4 68.5 61.3 68.5l150.2 0c1.5 0 3-0.1 4.5-0.3 10.2 38.7 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.5s-40.5-90.5-90.5-90.5c-42 0-77.3 28.6-87.5 67.39999999-1.4-0.3-2.9-0.4-4.5-0.39999999L446.3 760.4c-6.8 0-14.3-8.9-14.3-21.49999999l0-427.00000001c0-12.7 7.40000001-21.5 14.30000001-21.5l150.19999999 0c1.5 0 3-0.2 4.5-0.4 10.2 38.8 45.5 67.3 87.5 67.3 50 0 90.5-40.5 90.5-90.4 0-49.9-40.5-90.6-90.5-90.59999999-42 0-77.3 28.6-87.5 67.39999999-1.4-0.2-2.9-0.4-4.49999999-0.4L446.3 243.3c-34.80000001 0-61.3 31.6-61.3 68.50000001L385 513.7l-79.1 0c-10.4-38.5-45.49999999-67-87.4-67-50 0-90.5 40.5-90.5 90.5s40.5 90.5 90.5 90.5c41.79999999 0 77.00000001-28.4 87.4-67L385 560.69999999z" fill="currentColor" p-id="3038"></path></svg>', Fn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169402629" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2170" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M639.328 416c8.032 0 16.096-3.008 22.304-9.056l202.624-197.184-0.8 143.808c-0.096 17.696 14.144 32.096 31.808 32.192 0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808l1.248-222.208c0-0.672-0.352-1.248-0.384-1.92 0.032-0.512 0.288-0.896 0.288-1.408 0.032-17.664-14.272-32-31.968-32.032L671.552 96l-0.032 0c-17.664 0-31.968 14.304-32 31.968C639.488 145.632 653.824 160 671.488 160l151.872 0.224-206.368 200.8c-12.672 12.32-12.928 32.608-0.64 45.248C622.656 412.736 630.976 416 639.328 416z" p-id="2171"></path><path d="M896.032 639.552 896.032 639.552c-17.696 0-32 14.304-32.032 31.968l-0.224 151.872-200.832-206.4c-12.32-12.64-32.576-12.96-45.248-0.64-12.672 12.352-12.928 32.608-0.64 45.248l197.184 202.624-143.808-0.8c-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808-0.096 17.696 14.144 32.096 31.808 32.192l222.24 1.248c0.064 0 0.128 0 0.192 0 0.64 0 1.12-0.32 1.76-0.352 0.512 0.032 0.896 0.288 1.408 0.288l0.032 0c17.664 0 31.968-14.304 32-31.968L928 671.584C928.032 653.952 913.728 639.584 896.032 639.552z" p-id="2172"></path><path d="M209.76 159.744l143.808 0.8c0.064 0 0.128 0 0.192 0 17.6 0 31.904-14.208 32-31.808 0.096-17.696-14.144-32.096-31.808-32.192L131.68 95.328c-0.064 0-0.128 0-0.192 0-0.672 0-1.248 0.352-1.888 0.384-0.448 0-0.8-0.256-1.248-0.256 0 0-0.032 0-0.032 0-17.664 0-31.968 14.304-32 31.968L96 352.448c-0.032 17.664 14.272 32 31.968 32.032 0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968l0.224-151.936 200.832 206.4c6.272 6.464 14.624 9.696 22.944 9.696 8.032 0 16.096-3.008 22.304-9.056 12.672-12.32 12.96-32.608 0.64-45.248L209.76 159.744z" p-id="2173"></path><path d="M362.368 617.056l-202.624 197.184 0.8-143.808c0.096-17.696-14.144-32.096-31.808-32.192-0.064 0-0.128 0-0.192 0-17.6 0-31.904 14.208-32 31.808l-1.248 222.24c0 0.704 0.352 1.312 0.384 2.016 0 0.448-0.256 0.832-0.256 1.312-0.032 17.664 14.272 32 31.968 32.032L352.448 928c0 0 0.032 0 0.032 0 17.664 0 31.968-14.304 32-31.968s-14.272-32-31.968-32.032l-151.936-0.224 206.4-200.832c12.672-12.352 12.96-32.608 0.64-45.248S375.008 604.704 362.368 617.056z" p-id="2174"></path></svg>', Vn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169573443" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2883" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M514.133333 488.533333m-106.666666 0a106.666667 106.666667 0 1 0 213.333333 0 106.666667 106.666667 0 1 0-213.333333 0Z" fill="currentColor" p-id="2884"></path><path d="M512 64C264.533333 64 64 264.533333 64 512c0 236.8 183.466667 428.8 416 445.866667v-134.4c-53.333333-59.733333-200.533333-230.4-200.533333-334.933334 0-130.133333 104.533333-234.666667 234.666666-234.666666s234.666667 104.533333 234.666667 234.666666c0 61.866667-49.066667 153.6-145.066667 270.933334l-59.733333 68.266666V960C776.533333 942.933333 960 748.8 960 512c0-247.466667-200.533333-448-448-448z" fill="currentColor" p-id="2885"></path></svg>', Kn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169419447" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2480" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.328 482.56l-317.344-1.12L545.984 162.816c0-17.664-14.336-32-32-32s-32 14.336-32 32l0 318.4L159.616 480.064c-0.032 0-0.064 0-0.096 0-17.632 0-31.936 14.24-32 31.904C127.424 529.632 141.728 544 159.392 544.064l322.592 1.152 0 319.168c0 17.696 14.336 32 32 32s32-14.304 32-32l0-318.944 317.088 1.12c0.064 0 0.096 0 0.128 0 17.632 0 31.936-14.24 32-31.904C895.264 496.992 880.96 482.624 863.328 482.56z" p-id="2481"></path></svg>', zn = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1750169426515" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2730" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M863.744 544 163.424 544c-17.664 0-32-14.336-32-32s14.336-32 32-32l700.32 0c17.696 0 32 14.336 32 32S881.44 544 863.744 544z" p-id="2731"></path></svg>', Gn = {
1434
1436
  side: Wn,
1435
1437
  left: Yn,
1436
1438
  right: Xn,
1437
1439
  full: Fn,
1438
- living: Kn,
1439
- zoomin: Vn,
1440
+ living: Vn,
1441
+ zoomin: Kn,
1440
1442
  zoomout: zn
1441
1443
  }, I = (e, t) => {
1442
1444
  const n = document.createElement("span");
@@ -1511,7 +1513,7 @@ const Ie = (e, t = "px") => typeof e == "number" ? e + t : e, $ = ({ style: e },
1511
1513
  for (const [o, s] of Object.entries(t))
1512
1514
  s !== void 0 && (e[o] = Ie(s));
1513
1515
  else n !== void 0 && (e[t] = Ie(n));
1514
- }, Re = (e = 0, t = 0, n = 0, o = 0) => {
1516
+ }, Be = (e = 0, t = 0, n = 0, o = 0) => {
1515
1517
  const s = { x: e, y: t, width: n, height: o, top: t, left: e, right: e + n, bottom: t + o };
1516
1518
  return { ...s, toJSON: () => JSON.stringify(s) };
1517
1519
  }, Qn = (e) => {
@@ -1526,7 +1528,7 @@ const Ie = (e, t = "px") => typeof e == "number" ? e + t : e, $ = ({ style: e },
1526
1528
  cancelAnimationFrame(n), o = !1;
1527
1529
  }
1528
1530
  };
1529
- }, Be = (e, t, n = "touch") => {
1531
+ }, Re = (e, t, n = "touch") => {
1530
1532
  switch (n) {
1531
1533
  case "center": {
1532
1534
  const o = t.left + t.width / 2, s = t.top + t.height / 2;
@@ -1537,16 +1539,16 @@ const Ie = (e, t = "px") => typeof e == "number" ? e + t : e, $ = ({ style: e },
1537
1539
  case "touch":
1538
1540
  return e.right >= t.left && e.left <= t.right && e.bottom >= t.top && e.top <= t.bottom;
1539
1541
  }
1540
- }, eo = () => matchMedia("(hover: none), (pointer: coarse)").matches, to = () => "safari" in window, he = (e) => Array.isArray(e) ? e : [e], ct = (e) => (t, n, o, s = {}) => {
1541
- (t instanceof HTMLCollection || t instanceof NodeList) && (t = Array.from(t)), n = he(n), t = he(t);
1542
+ }, eo = () => matchMedia("(hover: none), (pointer: coarse)").matches, to = () => "safari" in window, fe = (e) => Array.isArray(e) ? e : [e], ct = (e) => (t, n, o, s = {}) => {
1543
+ (t instanceof HTMLCollection || t instanceof NodeList) && (t = Array.from(t)), n = fe(n), t = fe(t);
1542
1544
  for (const i of t)
1543
1545
  if (i)
1544
1546
  for (const l of n)
1545
1547
  i[e](l, o, { capture: !1, ...s });
1546
- }, W = ct("addEventListener"), O = ct("removeEventListener"), J = (e) => {
1548
+ }, W = ct("addEventListener"), O = ct("removeEventListener"), Z = (e) => {
1547
1549
  const { clientX: t, clientY: n, target: o } = e.touches?.[0] ?? e;
1548
1550
  return { x: t, y: n, target: o };
1549
- }, Y = (e, t = document) => he(e).map((n) => typeof n == "string" ? Array.from(t.querySelectorAll(n)) : n instanceof Element ? n : null).flat().filter(Boolean), no = (e, t) => t.some((n) => typeof n == "number" ? e.button === n : typeof n == "object" ? n.button !== e.button ? !1 : n.modifiers.every((o) => {
1551
+ }, Y = (e, t = document) => fe(e).map((n) => typeof n == "string" ? Array.from(t.querySelectorAll(n)) : n instanceof Element ? n : null).flat().filter(Boolean), no = (e, t) => t.some((n) => typeof n == "number" ? e.button === n : typeof n == "object" ? n.button !== e.button ? !1 : n.modifiers.every((o) => {
1550
1552
  switch (o) {
1551
1553
  case "alt":
1552
1554
  return e.altKey;
@@ -1579,7 +1581,7 @@ class oo extends Zn {
1579
1581
  _latestElement;
1580
1582
  // Dynamically constructed area rect
1581
1583
  _areaLocation = { y1: 0, x2: 0, y2: 0, x1: 0 };
1582
- _areaRect = Re();
1584
+ _areaRect = Be();
1583
1585
  // If a single click is being performed, it's a single-click until the user dragged the mouse
1584
1586
  _singleClick = !0;
1585
1587
  _frame;
@@ -1652,11 +1654,11 @@ class oo extends Zn {
1652
1654
  (t ? W : O)(n, "pointerdown", this._onTapStart);
1653
1655
  }
1654
1656
  _onTapStart(t, n = !1) {
1655
- const { x: o, y: s, target: i } = J(t), { document: l, startAreas: c, boundaries: r, behaviour: a, features: d } = this._options, h = i.getBoundingClientRect();
1657
+ const { x: o, y: s, target: i } = Z(t), { document: l, startAreas: c, boundaries: r, behaviour: a, features: d } = this._options, h = i.getBoundingClientRect();
1656
1658
  if (!no(t, a.triggers))
1657
1659
  return;
1658
1660
  const u = Y(c, l), b = Y(r, l);
1659
- this._targetElement = b.find((m) => Be(m.getBoundingClientRect(), h));
1661
+ this._targetElement = b.find((m) => Re(m.getBoundingClientRect(), h));
1660
1662
  const v = t.composedPath(), p = u.find((m) => v.includes(m));
1661
1663
  if (this._targetBoundary = b.find((m) => v.includes(m)), !this._targetElement || !p || !this._targetBoundary || !n && this._emitEvent("beforestart", t) === !1)
1662
1664
  return;
@@ -1668,7 +1670,7 @@ class oo extends Zn {
1668
1670
  const {
1669
1671
  singleTap: { intersect: n },
1670
1672
  range: o
1671
- } = this._options.features, s = J(t);
1673
+ } = this._options.features, s = Z(t);
1672
1674
  let i;
1673
1675
  if (n === "native")
1674
1676
  i = s.target;
@@ -1704,7 +1706,7 @@ class oo extends Zn {
1704
1706
  container: n,
1705
1707
  document: o,
1706
1708
  behaviour: { startThreshold: s }
1707
- } = this._options, { x1: i, y1: l } = this._areaLocation, { x: c, y: r } = J(t);
1709
+ } = this._options, { x1: i, y1: l } = this._areaLocation, { x: c, y: r } = Z(t);
1708
1710
  if (
1709
1711
  // Single number for both coordinates
1710
1712
  typeof s == "number" && j(c + r - (i + l)) >= s || // Different x and y threshold
@@ -1739,7 +1741,7 @@ class oo extends Zn {
1739
1741
  }));
1740
1742
  }
1741
1743
  _onTapMove(t) {
1742
- const { _scrollSpeed: n, _areaLocation: o, _options: s, _frame: i } = this, { speedDivider: l } = s.behaviour.scrolling, { x: c, y: r } = J(t);
1744
+ const { _scrollSpeed: n, _areaLocation: o, _options: s, _frame: i } = this, { speedDivider: l } = s.behaviour.scrolling, { x: c, y: r } = Z(t);
1743
1745
  if (o.x2 = c, o.y2 = r, this._scrollAvailable && !this._scrollingActive && (n.y || n.x)) {
1744
1746
  this._scrollingActive = !0;
1745
1747
  const a = () => {
@@ -1783,7 +1785,7 @@ class oo extends Zn {
1783
1785
  } = s;
1784
1786
  r < i.left + d.x ? (t.x = -j(i.left - r + d.x), r = r < i.left ? i.left : r) : r > i.right - d.x ? (t.x = j(i.left + i.width - r - d.x), r = r > i.right ? i.right : r) : t.x = 0, a < i.top + d.y ? (t.y = -j(i.top - a + d.y), a = a < i.top ? i.top : a) : a > i.bottom - d.y ? (t.y = j(i.top + i.height - a - d.y), a = a > i.bottom ? i.bottom : a) : t.y = 0;
1785
1787
  const h = Ye(l, r), u = Ye(c, a), b = We(l, r), v = We(c, a);
1786
- this._areaRect = Re(h, u, b - h, v - u);
1788
+ this._areaRect = Be(h, u, b - h, v - u);
1787
1789
  }
1788
1790
  _redrawSelectionArea() {
1789
1791
  const { x: t, y: n, width: o, height: s } = this._areaRect, { style: i } = this._area;
@@ -1797,7 +1799,7 @@ class oo extends Zn {
1797
1799
  const { _selectables: t, _options: n, _selection: o, _areaRect: s } = this, { stored: i, selected: l, touched: c } = o, { intersect: r, overlap: a } = n.behaviour, d = a === "invert", h = [], u = [], b = [];
1798
1800
  for (let p = 0; p < t.length; p++) {
1799
1801
  const g = t[p];
1800
- if (Be(s, g.getBoundingClientRect(), r)) {
1802
+ if (Re(s, g.getBoundingClientRect(), r)) {
1801
1803
  if (l.includes(g))
1802
1804
  i.includes(g) && !c.includes(g) && c.push(g);
1803
1805
  else if (d && i.includes(g)) {
@@ -2014,10 +2016,17 @@ function so(e) {
2014
2016
  e.selection = n;
2015
2017
  }
2016
2018
  const io = function(e, t = !0) {
2017
- this.theme = e;
2019
+ this.theme = {
2020
+ ...this.theme || G,
2021
+ ...e,
2022
+ cssVar: {
2023
+ ...this.theme?.cssVar || G.cssVar,
2024
+ ...e.cssVar || {}
2025
+ }
2026
+ }, this.theme.generateMainBranch !== void 0 && (this.generateMainBranch = this.theme.generateMainBranch), this.theme.generateSubBranch !== void 0 && (this.generateSubBranch = this.theme.generateSubBranch);
2018
2027
  const o = {
2019
- ...(e.type === "dark" ? ue : fe).cssVar,
2020
- ...e.cssVar
2028
+ ...(this.theme.type === "dark" ? ue : G).cssVar,
2029
+ ...this.theme.cssVar
2021
2030
  };
2022
2031
  this.compact && (o["--node-gap-x"] = "15px", o["--node-gap-y"] = "2px", o["--main-gap-x"] = "30px", o["--main-gap-y"] = "6px");
2023
2032
  const s = Object.keys(o);
@@ -2063,7 +2072,7 @@ const io = function(e, t = !0) {
2063
2072
  this.moved = !1, this.pointerdown = !1;
2064
2073
  }
2065
2074
  };
2066
- }, Ke = {
2075
+ }, Ve = {
2067
2076
  create: lo
2068
2077
  }, at = "#4dc4ff";
2069
2078
  function dt(e, t, n, o, s, i, l, c) {
@@ -2073,9 +2082,9 @@ function dt(e, t, n, o, s, i, l, c) {
2073
2082
  };
2074
2083
  }
2075
2084
  function co(e, t, n) {
2076
- e && (e.dataset.x = t.toString(), e.dataset.y = n.toString(), re(e));
2085
+ e && (e.dataset.x = t.toString(), e.dataset.y = n.toString(), le(e));
2077
2086
  }
2078
- function Z(e, t, n, o, s) {
2087
+ function Q(e, t, n, o, s) {
2079
2088
  k(e, {
2080
2089
  x1: t + "",
2081
2090
  y1: n + "",
@@ -2083,7 +2092,7 @@ function Z(e, t, n, o, s) {
2083
2092
  y2: s + ""
2084
2093
  });
2085
2094
  }
2086
- function Ve(e, t, n, o, s, i, l, c, r, a) {
2095
+ function Ke(e, t, n, o, s, i, l, c, r, a) {
2087
2096
  const d = `M ${t} ${n} C ${o} ${s} ${i} ${l} ${c} ${r}`;
2088
2097
  if (e.line.setAttribute("d", d), a.style) {
2089
2098
  const p = a.style;
@@ -2091,7 +2100,7 @@ function Ve(e, t, n, o, s, i, l, c, r, a) {
2091
2100
  }
2092
2101
  const h = e.querySelectorAll('path[stroke="transparent"]');
2093
2102
  h.length > 0 && h[0].setAttribute("d", d);
2094
- const u = oe(i, l, c, r);
2103
+ const u = se(i, l, c, r);
2095
2104
  if (u) {
2096
2105
  const p = `M ${u.x1} ${u.y1} L ${c} ${r} L ${u.x2} ${u.y2}`;
2097
2106
  if (e.arrow1.setAttribute("d", p), h.length > 1 && h[1].setAttribute("d", p), a.style) {
@@ -2100,7 +2109,7 @@ function Ve(e, t, n, o, s, i, l, c, r, a) {
2100
2109
  }
2101
2110
  }
2102
2111
  if (a.bidirectional) {
2103
- const p = oe(o, s, t, n);
2112
+ const p = se(o, s, t, n);
2104
2113
  if (p) {
2105
2114
  const g = `M ${p.x1} ${p.y1} L ${t} ${n} L ${p.x2} ${p.y2}`;
2106
2115
  if (e.arrow2.setAttribute("d", g), h.length > 2 && h[2].setAttribute("d", g), a.style) {
@@ -2116,7 +2125,7 @@ function Ve(e, t, n, o, s, i, l, c, r, a) {
2116
2125
  }
2117
2126
  yo(e);
2118
2127
  }
2119
- function se(e, t, n) {
2128
+ function ie(e, t, n) {
2120
2129
  const { offsetLeft: o, offsetTop: s } = M(e.nodes, t), i = t.offsetWidth, l = t.offsetHeight, c = o + i / 2, r = s + l / 2, a = c + n.x, d = r + n.y;
2121
2130
  return {
2122
2131
  w: i,
@@ -2162,27 +2171,27 @@ const ao = function(e, t, n) {
2162
2171
  const C = ao(e, t, n);
2163
2172
  o.delta1 = C.delta1, o.delta2 = C.delta2;
2164
2173
  }
2165
- const i = se(e, t, o.delta1), l = se(e, n, o.delta2), { x: c, y: r } = X(i), { ctrlX: a, ctrlY: d } = i, { ctrlX: h, ctrlY: u } = l, { x: b, y: v } = X(l), p = oe(h, u, b, v);
2174
+ const i = ie(e, t, o.delta1), l = ie(e, n, o.delta2), { x: c, y: r } = X(i), { ctrlX: a, ctrlY: d } = i, { ctrlX: h, ctrlY: u } = l, { x: b, y: v } = X(l), p = se(h, u, b, v);
2166
2175
  if (!p) return;
2167
2176
  const g = `M ${p.x1} ${p.y1} L ${b} ${v} L ${p.x2} ${p.y2}`;
2168
2177
  let m = "";
2169
2178
  if (o.bidirectional) {
2170
- const C = oe(a, d, c, r);
2179
+ const C = se(a, d, c, r);
2171
2180
  if (!C) return;
2172
2181
  m = `M ${C.x1} ${C.y1} L ${c} ${r} L ${C.x2} ${C.y2}`;
2173
2182
  }
2174
2183
  const w = Hn(`M ${c} ${r} C ${a} ${d} ${h} ${u} ${b} ${v}`, g, m, o.style), { x: E, y: N } = dt(c, r, a, d, h, u, b, v), f = o.style?.labelColor || "rgb(235, 95, 82)", y = "a-" + o.id;
2175
2184
  w.id = y;
2176
- const x = e.markdown ? e.markdown(o.label, o) : o.label, S = de(x, E, N, {
2185
+ const x = e.markdown ? e.markdown(o.label, o) : o.label, S = he(x, E, N, {
2177
2186
  anchor: "middle",
2178
2187
  color: f,
2179
2188
  dataType: "arrow",
2180
2189
  svgId: y
2181
2190
  });
2182
- w.labelEl = S, w.arrowObj = o, w.dataset.linkid = o.id, e.labelContainer.appendChild(S), e.arrowSvg.appendChild(w), re(S), s || (e.arrows.push(o), e.currentArrow = w, ft(e, o, i, l));
2191
+ w.labelEl = S, w.arrowObj = o, w.dataset.linkid = o.id, e.labelContainer.appendChild(S), e.arrowSvg.appendChild(w), le(S), s || (e.arrows.push(o), e.currentArrow = w, ft(e, o, i, l));
2183
2192
  }, ho = function(e, t, n = {}) {
2184
2193
  const o = {
2185
- id: B(),
2194
+ id: R(),
2186
2195
  label: "Custom Link",
2187
2196
  from: e.nodeObj.id,
2188
2197
  to: t.nodeObj.id,
@@ -2193,8 +2202,8 @@ const ao = function(e, t, n) {
2193
2202
  obj: o
2194
2203
  });
2195
2204
  }, fo = function(e) {
2196
- le(this);
2197
- const t = { ...e, id: B() };
2205
+ ce(this);
2206
+ const t = { ...e, id: R() };
2198
2207
  Se(this, this.findEle(t.from), this.findEle(t.to), t), this.bus.fire("operation", {
2199
2208
  name: "createArrow",
2200
2209
  obj: t
@@ -2202,7 +2211,7 @@ const ao = function(e, t, n) {
2202
2211
  }, uo = function(e) {
2203
2212
  let t;
2204
2213
  if (e ? t = e : t = this.currentArrow, !t) return;
2205
- le(this);
2214
+ ce(this);
2206
2215
  const n = t.arrowObj.id;
2207
2216
  this.arrows = this.arrows.filter((o) => o.id !== n), t.labelEl?.remove(), t.remove(), this.bus.fire("operation", {
2208
2217
  name: "removeArrow",
@@ -2212,11 +2221,11 @@ const ao = function(e, t, n) {
2212
2221
  });
2213
2222
  }, po = function(e) {
2214
2223
  this.currentArrow = e;
2215
- const t = e.arrowObj, n = this.findEle(t.from), o = this.findEle(t.to), s = se(this, n, t.delta1), i = se(this, o, t.delta2);
2224
+ const t = e.arrowObj, n = this.findEle(t.from), o = this.findEle(t.to), s = ie(this, n, t.delta1), i = ie(this, o, t.delta2);
2216
2225
  this.editable ? ft(this, t, s, i) : ht(e, at), this.bus.fire("selectArrow", t);
2217
2226
  }, go = function() {
2218
- le(this), this.currentArrow = null, this.bus.fire("unselectArrow");
2219
- }, ce = function(e, t) {
2227
+ ce(this), this.currentArrow = null, this.bus.fire("unselectArrow");
2228
+ }, ae = function(e, t) {
2220
2229
  const n = document.createElementNS(A, "path");
2221
2230
  return k(n, {
2222
2231
  d: e,
@@ -2229,11 +2238,11 @@ const ao = function(e, t, n) {
2229
2238
  }, ht = function(e, t) {
2230
2239
  const n = document.createElementNS(A, "g");
2231
2240
  n.setAttribute("class", "arrow-highlight"), n.setAttribute("opacity", "0.45");
2232
- const o = ce(e.line.getAttribute("d"), t);
2241
+ const o = ae(e.line.getAttribute("d"), t);
2233
2242
  n.appendChild(o);
2234
- const s = ce(e.arrow1.getAttribute("d"), t);
2243
+ const s = ae(e.arrow1.getAttribute("d"), t);
2235
2244
  if (n.appendChild(s), e.arrow2.getAttribute("d")) {
2236
- const i = ce(e.arrow2.getAttribute("d"), t);
2245
+ const i = ae(e.arrow2.getAttribute("d"), t);
2237
2246
  n.appendChild(i);
2238
2247
  }
2239
2248
  e.insertBefore(n, e.firstChild);
@@ -2245,21 +2254,21 @@ const ao = function(e, t, n) {
2245
2254
  if (!t) return;
2246
2255
  const n = t.querySelectorAll("path");
2247
2256
  n.length >= 1 && n[0].setAttribute("d", e.line.getAttribute("d")), n.length >= 2 && n[1].setAttribute("d", e.arrow1.getAttribute("d")), n.length >= 3 && e.arrow2.getAttribute("d") && n[2].setAttribute("d", e.arrow2.getAttribute("d"));
2248
- }, le = function(e) {
2257
+ }, ce = function(e) {
2249
2258
  e.helper1?.destroy(), e.helper2?.destroy(), e.linkController.style.display = "none", e.P2.style.display = "none", e.P3.style.display = "none", e.currentArrow && mo(e.currentArrow);
2250
2259
  }, ft = function(e, t, n, o) {
2251
2260
  const { linkController: s, P2: i, P3: l, line1: c, line2: r, nodes: a, map: d, currentArrow: h, bus: u } = e;
2252
2261
  if (!h) return;
2253
2262
  s.style.display = "initial", i.style.display = "initial", l.style.display = "initial", a.appendChild(s), a.appendChild(i), a.appendChild(l), ht(h, at);
2254
2263
  let { x: b, y: v } = X(n), { ctrlX: p, ctrlY: g } = n, { ctrlX: m, ctrlY: w } = o, { x: E, y: N } = X(o);
2255
- i.style.cssText = `top:${g}px;left:${p}px;`, l.style.cssText = `top:${w}px;left:${m}px;`, Z(c, b, v, p, g), Z(r, m, w, E, N), e.helper1 = Ke.create(i), e.helper2 = Ke.create(l), e.helper1.init(d, (f, y) => {
2264
+ i.style.cssText = `top:${g}px;left:${p}px;`, l.style.cssText = `top:${w}px;left:${m}px;`, Q(c, b, v, p, g), Q(r, m, w, E, N), e.helper1 = Ve.create(i), e.helper2 = Ve.create(l), e.helper1.init(d, (f, y) => {
2256
2265
  p = p + f / e.scaleVal, g = g + y / e.scaleVal;
2257
2266
  const x = X({ ...n, ctrlX: p, ctrlY: g });
2258
- b = x.x, v = x.y, i.style.top = g + "px", i.style.left = p + "px", Ve(h, b, v, p, g, m, w, E, N, t), Z(c, b, v, p, g), t.delta1.x = Math.round(p - n.cx), t.delta1.y = Math.round(g - n.cy), u.fire("updateArrowDelta", t);
2267
+ b = x.x, v = x.y, i.style.top = g + "px", i.style.left = p + "px", Ke(h, b, v, p, g, m, w, E, N, t), Q(c, b, v, p, g), t.delta1.x = Math.round(p - n.cx), t.delta1.y = Math.round(g - n.cy), u.fire("updateArrowDelta", t);
2259
2268
  }), e.helper2.init(d, (f, y) => {
2260
2269
  m = m + f / e.scaleVal, w = w + y / e.scaleVal;
2261
2270
  const x = X({ ...o, ctrlX: m, ctrlY: w });
2262
- E = x.x, N = x.y, l.style.top = w + "px", l.style.left = m + "px", Ve(h, b, v, p, g, m, w, E, N, t), Z(r, m, w, E, N), t.delta2.x = Math.round(m - o.cx), t.delta2.y = Math.round(w - o.cy), u.fire("updateArrowDelta", t);
2271
+ E = x.x, N = x.y, l.style.top = w + "px", l.style.left = m + "px", Ke(h, b, v, p, g, m, w, E, N, t), Q(r, m, w, E, N), t.delta2.x = Math.round(m - o.cx), t.delta2.y = Math.round(w - o.cy), u.fire("updateArrowDelta", t);
2263
2272
  });
2264
2273
  };
2265
2274
  function bo() {
@@ -2274,10 +2283,10 @@ function bo() {
2274
2283
  this.nodes.appendChild(this.arrowSvg);
2275
2284
  }
2276
2285
  function vo(e) {
2277
- le(this), e && e.labelEl && rt(this, e.labelEl, e.arrowObj);
2286
+ ce(this), e && e.labelEl && rt(this, e.labelEl, e.arrowObj);
2278
2287
  }
2279
2288
  function wo() {
2280
- this.arrows = this.arrows.filter((e) => ne(e.from, this.nodeData) && ne(e.to, this.nodeData));
2289
+ this.arrows = this.arrows.filter((e) => oe(e.from, this.nodeData) && oe(e.to, this.nodeData));
2281
2290
  }
2282
2291
  const xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2283
2292
  __proto__: null,
@@ -2345,27 +2354,27 @@ const xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2345
2354
  }, Ne = function(e, t) {
2346
2355
  const { id: n, label: o, parent: s, start: i, end: l, style: c } = t, { nodes: r, theme: a, summarySvg: d } = e, u = e.findEle(s).nodeObj, b = No(e, t);
2347
2356
  let v = 1 / 0, p = 0, g = 0, m = 0;
2348
- for (let V = i; V <= l; V++) {
2349
- const Te = u.children?.[V];
2357
+ for (let K = i; K <= l; K++) {
2358
+ const Te = u.children?.[K];
2350
2359
  if (!Te)
2351
2360
  return e.removeSummary(n), null;
2352
- const q = So(e.findEle(Te.id)), { offsetLeft: U, offsetTop: ke } = M(r, q), _e = i === l ? 10 : 20;
2353
- V === i && (g = ke + _e), V === l && (m = ke + q.offsetHeight - _e), U < v && (v = U), q.offsetWidth + U > p && (p = q.offsetWidth + U);
2361
+ const U = So(e.findEle(Te.id)), { offsetLeft: J, offsetTop: ke } = M(r, U), _e = i === l ? 10 : 20;
2362
+ K === i && (g = ke + _e), K === l && (m = ke + U.offsetHeight - _e), J < v && (v = J), U.offsetWidth + J > p && (p = U.offsetWidth + J);
2354
2363
  }
2355
2364
  let w, E;
2356
2365
  const N = u.parent ? 10 : 0, f = g + N, y = m + N, x = (f + y) / 2, S = c?.stroke || a.cssVar["--color"], C = c?.labelColor || a.cssVar["--color"], T = "s-" + n, D = e.markdown ? e.markdown(o, t) : o;
2357
- b === H.LHS ? (w = ze(`M ${v + 10} ${f} c -5 0 -10 5 -10 10 L ${v} ${y - 10} c 0 5 5 10 10 10 M ${v} ${x} h -10`, S), E = de(D, v - 20, x, { anchor: "end", color: C, dataType: "summary", svgId: T })) : (w = ze(`M ${p - 10} ${f} c 5 0 10 5 10 10 L ${p} ${y - 10} c 0 5 -5 10 -10 10 M ${p} ${x} h 10`, S), E = de(D, p + 20, x, { anchor: "start", color: C, dataType: "summary", svgId: T }));
2366
+ b === H.LHS ? (w = ze(`M ${v + 10} ${f} c -5 0 -10 5 -10 10 L ${v} ${y - 10} c 0 5 5 10 10 10 M ${v} ${x} h -10`, S), E = he(D, v - 20, x, { anchor: "end", color: C, dataType: "summary", svgId: T })) : (w = ze(`M ${p - 10} ${f} c 5 0 10 5 10 10 L ${p} ${y - 10} c 0 5 -5 10 -10 10 M ${p} ${x} h 10`, S), E = he(D, p + 20, x, { anchor: "start", color: C, dataType: "summary", svgId: T }));
2358
2367
  const L = Co(T);
2359
- return L.appendChild(w), e.labelContainer.appendChild(E), re(E), L.summaryObj = t, L.labelEl = E, d.appendChild(L), L;
2368
+ return L.appendChild(w), e.labelContainer.appendChild(E), le(E), L.summaryObj = t, L.labelEl = E, d.appendChild(L), L;
2360
2369
  }, To = function(e = {}) {
2361
2370
  if (!this.currentNodes) return;
2362
- const { currentNodes: t, summaries: n, bus: o } = this, { parent: s, start: i, end: l } = Eo(t), c = { id: B(), parent: s, start: i, end: l, label: "summary", style: e.style }, r = Ne(this, c);
2371
+ const { currentNodes: t, summaries: n, bus: o } = this, { parent: s, start: i, end: l } = Eo(t), c = { id: R(), parent: s, start: i, end: l, label: "summary", style: e.style }, r = Ne(this, c);
2363
2372
  n.push(c), this.editSummary(r), o.fire("operation", {
2364
2373
  name: "createSummary",
2365
2374
  obj: c
2366
2375
  });
2367
2376
  }, ko = function(e) {
2368
- const t = B(), n = { ...e, id: t };
2377
+ const t = R(), n = { ...e, id: t };
2369
2378
  Ne(this, n), this.summaries.push(n), this.bus.fire("operation", {
2370
2379
  name: "createSummary",
2371
2380
  obj: n
@@ -2459,7 +2468,7 @@ function Io(e, t) {
2459
2468
  "stroke-width": n.borderWidth
2460
2469
  }), i;
2461
2470
  }
2462
- function Q(e, t, n = !1) {
2471
+ function ee(e, t, n = !1) {
2463
2472
  const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = M(e.nodes, t), l = document.createElementNS(_, "rect");
2464
2473
  k(l, {
2465
2474
  x: s + "",
@@ -2477,7 +2486,7 @@ function Q(e, t, n = !1) {
2477
2486
  let r;
2478
2487
  return n ? r = jo(t, o, s, i) : r = $o(t, o, s, i), c.appendChild(r), c;
2479
2488
  }
2480
- function Ro(e, t) {
2489
+ function Bo(e, t) {
2481
2490
  const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = M(e.nodes, t), i = document.createElementNS(_, "a"), l = document.createElementNS(_, "text");
2482
2491
  return k(l, {
2483
2492
  x: o + "",
@@ -2489,7 +2498,7 @@ function Ro(e, t) {
2489
2498
  fill: `${n.color}`
2490
2499
  }), l.innerHTML = t.textContent, i.appendChild(l), i.setAttribute("href", t.href), i;
2491
2500
  }
2492
- function Bo(e, t) {
2501
+ function Ro(e, t) {
2493
2502
  const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = M(e.nodes, t), i = document.createElementNS(_, "image");
2494
2503
  return k(i, {
2495
2504
  x: o + "",
@@ -2499,8 +2508,8 @@ function Bo(e, t) {
2499
2508
  href: t.src
2500
2509
  }), i;
2501
2510
  }
2502
- const ee = 100, Wo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">', Yo = (e, t = !1) => {
2503
- const n = e.nodes, o = n.offsetHeight + ee * 2, s = n.offsetWidth + ee * 2, i = Oo(o + "px", s + "px"), l = document.createElementNS(_, "svg"), c = document.createElementNS(_, "rect");
2511
+ const te = 100, Wo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">', Yo = (e, t = !1) => {
2512
+ const n = e.nodes, o = n.offsetHeight + te * 2, s = n.offsetWidth + te * 2, i = Oo(o + "px", s + "px"), l = document.createElementNS(_, "svg"), c = document.createElementNS(_, "rect");
2504
2513
  k(c, {
2505
2514
  x: "0",
2506
2515
  y: "0",
@@ -2517,18 +2526,18 @@ const ee = 100, Wo = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC
2517
2526
  a && l.appendChild(a);
2518
2527
  const d = n.querySelector(".summary")?.cloneNode(!0);
2519
2528
  return d && l.appendChild(d), n.querySelectorAll("me-tpc").forEach((h) => {
2520
- h.nodeObj.dangerouslySetInnerHTML ? l.appendChild(Q(e, h, !t)) : (l.appendChild(Io(e, h)), l.appendChild(Q(e, h.text, !t)));
2529
+ h.nodeObj.dangerouslySetInnerHTML ? l.appendChild(ee(e, h, !t)) : (l.appendChild(Io(e, h)), l.appendChild(ee(e, h.text, !t)));
2521
2530
  }), n.querySelectorAll(".tags > span").forEach((h) => {
2522
- l.appendChild(Q(e, h));
2531
+ l.appendChild(ee(e, h));
2523
2532
  }), n.querySelectorAll(".icons > span").forEach((h) => {
2524
- l.appendChild(Q(e, h));
2533
+ l.appendChild(ee(e, h));
2525
2534
  }), n.querySelectorAll(".hyper-link").forEach((h) => {
2526
- l.appendChild(Ro(e, h));
2527
- }), n.querySelectorAll("img").forEach((h) => {
2528
2535
  l.appendChild(Bo(e, h));
2536
+ }), n.querySelectorAll("img").forEach((h) => {
2537
+ l.appendChild(Ro(e, h));
2529
2538
  }), k(l, {
2530
- x: ee + "",
2531
- y: ee + "",
2539
+ x: te + "",
2540
+ y: te + "",
2532
2541
  overflow: "visible"
2533
2542
  }), i.appendChild(l), i;
2534
2543
  }, Xo = (e, t) => (t && e.insertAdjacentHTML("afterbegin", "<style>" + t + "</style>"), Wo + e.outerHTML);
@@ -2542,10 +2551,10 @@ function Fo(e) {
2542
2551
  }, o.readAsDataURL(e);
2543
2552
  });
2544
2553
  }
2545
- const Ko = function(e = !1, t) {
2554
+ const Vo = function(e = !1, t) {
2546
2555
  const n = Yo(this, e), o = Xo(n, t);
2547
2556
  return new Blob([o], { type: "image/svg+xml" });
2548
- }, Vo = async function(e = !1, t) {
2557
+ }, Ko = async function(e = !1, t) {
2549
2558
  const n = this.exportSvg(e, t), o = await Fo(n);
2550
2559
  return new Promise((s, i) => {
2551
2560
  const l = new Image();
@@ -2556,8 +2565,8 @@ const Ko = function(e = !1, t) {
2556
2565
  });
2557
2566
  }, zo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2558
2567
  __proto__: null,
2559
- exportPng: Vo,
2560
- exportSvg: Ko
2568
+ exportPng: Ko,
2569
+ exportSvg: Vo
2561
2570
  }, Symbol.toStringTag, { value: "Module" }));
2562
2571
  function Go(e, t) {
2563
2572
  return async function(...n) {
@@ -2571,7 +2580,7 @@ for (let e = 0; e < Ge.length; e++) {
2571
2580
  ut[t] = Go(ot[t], t);
2572
2581
  }
2573
2582
  const qo = {
2574
- getObjById: ne,
2583
+ getObjById: oe,
2575
2584
  generateNewObj: pt,
2576
2585
  layout: Ct,
2577
2586
  linkDiv: $n,
@@ -2590,7 +2599,7 @@ const qo = {
2590
2599
  ...zo,
2591
2600
  init(e) {
2592
2601
  if (e = JSON.parse(JSON.stringify(e)), !e || !e.nodeData) return new Error("MindElixir: `data` is required");
2593
- e.direction !== void 0 && (this.direction = e.direction), this.changeTheme(e.theme || this.theme, !1), this.nodeData = e.nodeData, R(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && Jn(this), this.keypress && An(this, this.keypress), so(this), this.disposable.push(Et()), this.contextMenu && this.disposable.push(In(this, this.contextMenu)), this.allowUndo && this.disposable.push(Bn(this)), this.layout(), this.linkDiv(), this.toCenter();
2602
+ e.direction !== void 0 && (this.direction = e.direction), e.compact !== void 0 && (this.compact = e.compact), this.changeTheme(e.theme || this.theme, !1), e.meta && (this.meta = e.meta), this.nodeData = e.nodeData, B(this.nodeData), this.arrows = e.arrows || [], this.summaries = e.summaries || [], this.tidyArrow(), this.toolBar && Jn(this), this.keypress && An(this, this.keypress), so(this), this.disposable.push(Et()), this.contextMenu && this.disposable.push(In(this, this.contextMenu)), this.allowUndo && this.disposable.push(Rn(this)), this.layout(), this.linkDiv(), this.toCenter();
2594
2603
  },
2595
2604
  destroy() {
2596
2605
  this.disposable.forEach((e) => e()), this.el && (this.el.innerHTML = ""), this.el = void 0, this.nodeData = void 0, this.arrows = void 0, this.summaries = void 0, this.currentArrow = void 0, this.currentNodes = void 0, this.currentSummary = void 0, this.theme = void 0, this.direction = void 0, this.bus = void 0, this.container = void 0, this.map = void 0, this.lines = void 0, this.linkController = void 0, this.arrowSvg = void 0, this.P2 = void 0, this.P3 = void 0, this.line1 = void 0, this.line2 = void 0, this.nodes = void 0, this.selection?.destroy(), this.selection = void 0;
@@ -2620,7 +2629,7 @@ function Jo({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: l, cH: c, direction:
2620
2629
  const m = Math.abs(h - b) / 300 * d;
2621
2630
  return r === H.LHS ? (g = t, v = g + d, p = g - d, u = i + d, `M ${v} ${h} C ${g} ${h} ${g + m} ${b} ${p} ${b} H ${u}`) : (g = t + n, v = g - d, p = g + d, u = i + l - d, `M ${v} ${h} C ${g} ${h} ${g - m} ${b} ${p} ${b} H ${u}`);
2622
2631
  }
2623
- const Zo = "5.12.0";
2632
+ const Zo = "5.12.2-beta.0";
2624
2633
  function Qo(e) {
2625
2634
  return {
2626
2635
  x: 0,
@@ -2680,7 +2689,7 @@ function P({
2680
2689
  if (T === "[object HTMLDivElement]" ? C = e : T === "[object String]" && (C = document.querySelector(e)), !C) throw new Error("MindElixir: el is not a valid element");
2681
2690
  C.style.position = "relative", C.innerHTML = "", this.el = C, this.disposable = [], this.before = r || {}, this.newTopicName = a || "New Node", this.contextMenu = o ?? !0, this.toolBar = s ?? !0, this.keypress = i ?? !0, this.mouseSelectionButton = l ?? 0, this.direction = t ?? 1, this.editable = n ?? !0, this.allowUndo = d ?? !0, this.scaleSensitivity = m ?? 0.1, this.scaleMax = w ?? 1.4, this.scaleMin = E ?? 0.2, this.generateMainBranch = h || Uo, this.generateSubBranch = u || Jo, this.overflowHidden = b ?? !1, this.compact = v ?? !1, this.alignment = g ?? "root", this.handleWheel = N ?? !0, this.markdown = f || void 0, this.imageProxy = y || void 0, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.mobileMultiSelect = S ?? !1, this.panHelper = Qo(this), this.bus = On(), this.container = document.createElement("div"), this.selectionContainer = c || this.container, this.container.className = "map-container";
2682
2691
  const D = window.matchMedia("(prefers-color-scheme: dark)");
2683
- this.theme = p || (D.matches ? ue : fe);
2692
+ this.theme = p || (D.matches ? ue : G);
2684
2693
  const L = document.createElement("div");
2685
2694
  L.className = "map-canvas", this.map = L, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = document.createElement("me-nodes"), this.lines = z("lines"), this.summarySvg = z("summary"), this.linkController = z("linkcontroller"), this.P2 = document.createElement("div"), this.P3 = document.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = je(), this.line2 = je(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.arrowSvg = z("topiclinks"), this.labelContainer = document.createElement("div"), this.labelContainer.className = "label-container", this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : this.disposable.push(Pn(this)), x && (this.pasteHandler = x);
2686
2695
  }
@@ -2694,13 +2703,13 @@ Object.defineProperty(P.prototype, "currentNode", {
2694
2703
  P.LEFT = 0;
2695
2704
  P.RIGHT = 1;
2696
2705
  P.SIDE = 2;
2697
- P.THEME = fe;
2706
+ P.THEME = G;
2698
2707
  P.DARK_THEME = ue;
2699
2708
  P.version = Zo;
2700
2709
  P.E = Ze;
2701
2710
  P.new = (e) => ({
2702
2711
  nodeData: {
2703
- id: B(),
2712
+ id: R(),
2704
2713
  topic: e || "new topic",
2705
2714
  children: []
2706
2715
  }
@@ -2710,6 +2719,6 @@ export {
2710
2719
  es as LEFT,
2711
2720
  ts as RIGHT,
2712
2721
  ns as SIDE,
2713
- fe as THEME,
2722
+ G as THEME,
2714
2723
  P as default
2715
2724
  };