mind-elixir 5.3.6 → 5.3.7
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.
- package/dist/MindElixir.iife.js +4 -4
- package/dist/MindElixir.js +188 -171
- package/dist/MindElixirLite.iife.js +2 -2
- package/dist/MindElixirLite.js +5 -2
- package/dist/types/i18n.d.ts +1 -1
- package/package.json +1 -1
- package/readme.md +1 -1
package/dist/MindElixir.js
CHANGED
|
@@ -69,16 +69,16 @@ const se = function(e, t) {
|
|
|
69
69
|
if (e.parent = t, e.children)
|
|
70
70
|
for (let n = 0; n < e.children.length; n++)
|
|
71
71
|
R(e.children[n], e);
|
|
72
|
-
},
|
|
72
|
+
}, Y = (e, t, n) => {
|
|
73
73
|
if (e.expanded = t, e.children)
|
|
74
74
|
if (n === void 0 || n > 0) {
|
|
75
75
|
const o = n !== void 0 ? n - 1 : void 0;
|
|
76
76
|
e.children.forEach((s) => {
|
|
77
|
-
|
|
77
|
+
Y(s, t, o);
|
|
78
78
|
});
|
|
79
79
|
} else
|
|
80
80
|
e.children.forEach((o) => {
|
|
81
|
-
|
|
81
|
+
Y(o, !1);
|
|
82
82
|
});
|
|
83
83
|
};
|
|
84
84
|
function xe(e) {
|
|
@@ -109,7 +109,7 @@ const ft = function() {
|
|
|
109
109
|
id: e
|
|
110
110
|
};
|
|
111
111
|
};
|
|
112
|
-
function
|
|
112
|
+
function Ce(e) {
|
|
113
113
|
return JSON.parse(
|
|
114
114
|
JSON.stringify(e, (n, o) => {
|
|
115
115
|
if (n !== "parent")
|
|
@@ -122,7 +122,7 @@ const $ = (e, t) => {
|
|
|
122
122
|
for (; t && t !== e; )
|
|
123
123
|
n += t.offsetLeft, o += t.offsetTop, t = t.offsetParent;
|
|
124
124
|
return { offsetLeft: n, offsetTop: o };
|
|
125
|
-
},
|
|
125
|
+
}, N = (e, t) => {
|
|
126
126
|
for (const n in t)
|
|
127
127
|
e.setAttribute(n, t[n]);
|
|
128
128
|
}, pe = (e) => e ? e.tagName === "ME-TPC" : !1, ae = (e) => e.filter((t) => t.nodeObj.parent).filter((t, n, o) => {
|
|
@@ -133,10 +133,10 @@ const $ = (e, t) => {
|
|
|
133
133
|
return !1;
|
|
134
134
|
}
|
|
135
135
|
return !0;
|
|
136
|
-
}),
|
|
136
|
+
}), Ue = (e) => {
|
|
137
137
|
const t = /translate\(([^,]+),\s*([^)]+)\)/, n = e.match(t);
|
|
138
138
|
return n ? { x: parseFloat(n[1]), y: parseFloat(n[2]) } : { x: 0, y: 0 };
|
|
139
|
-
},
|
|
139
|
+
}, Ee = function(e) {
|
|
140
140
|
for (let t = 0; t < e.length; t++) {
|
|
141
141
|
const { dom: n, evt: o, func: s } = e[t];
|
|
142
142
|
n.addEventListener(o, s);
|
|
@@ -200,13 +200,13 @@ function vt(e, t) {
|
|
|
200
200
|
const c = e.nodeData;
|
|
201
201
|
if (r.key === "0")
|
|
202
202
|
for (const a of c.children)
|
|
203
|
-
|
|
203
|
+
Y(a, !1);
|
|
204
204
|
if (r.key === "=")
|
|
205
205
|
for (const a of c.children)
|
|
206
|
-
|
|
206
|
+
Y(a, !0);
|
|
207
207
|
if (["1", "2", "3", "4", "5", "6", "7", "8", "9"].includes(r.key))
|
|
208
208
|
for (const a of c.children)
|
|
209
|
-
|
|
209
|
+
Y(a, !0, Number(r.key) - 1);
|
|
210
210
|
e.refresh(), e.toCenter(), o = !1, s && (clearTimeout(s), s = null, e.container.removeEventListener("keydown", i));
|
|
211
211
|
}, l = {
|
|
212
212
|
Enter: (r) => {
|
|
@@ -311,7 +311,7 @@ function bt(e) {
|
|
|
311
311
|
return;
|
|
312
312
|
const y = f.closest(".svg-label");
|
|
313
313
|
if (y) {
|
|
314
|
-
const
|
|
314
|
+
const C = y.dataset.svgId, x = y.dataset.type, b = document.getElementById(C);
|
|
315
315
|
if (b) {
|
|
316
316
|
if (x === "arrow") {
|
|
317
317
|
e.selectArrow(b);
|
|
@@ -323,16 +323,16 @@ function bt(e) {
|
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
if (f.closest(".topiclinks")) {
|
|
326
|
-
const
|
|
327
|
-
if (
|
|
328
|
-
e.selectArrow(
|
|
326
|
+
const C = f.closest("g");
|
|
327
|
+
if (C) {
|
|
328
|
+
e.selectArrow(C);
|
|
329
329
|
return;
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
if (f.closest(".summary")) {
|
|
333
|
-
const
|
|
334
|
-
if (
|
|
335
|
-
e.selectSummary(
|
|
333
|
+
const C = f.closest("g");
|
|
334
|
+
if (C) {
|
|
335
|
+
e.selectSummary(C);
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
@@ -342,7 +342,7 @@ function bt(e) {
|
|
|
342
342
|
pe(f) && e.beginEdit(f);
|
|
343
343
|
const y = f.closest(".svg-label");
|
|
344
344
|
if (y) {
|
|
345
|
-
const
|
|
345
|
+
const C = y.dataset.svgId, x = y.dataset.type, b = document.getElementById(C);
|
|
346
346
|
if (b) {
|
|
347
347
|
if (x === "arrow") {
|
|
348
348
|
e.editArrowLabel(b);
|
|
@@ -354,16 +354,16 @@ function bt(e) {
|
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
if (f.closest(".topiclinks")) {
|
|
357
|
-
const
|
|
358
|
-
if (
|
|
359
|
-
e.editArrowLabel(
|
|
357
|
+
const C = f.closest("g");
|
|
358
|
+
if (C) {
|
|
359
|
+
e.editArrowLabel(C);
|
|
360
360
|
return;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
if (f.closest(".summary")) {
|
|
364
|
-
const
|
|
365
|
-
if (
|
|
366
|
-
e.editSummary(
|
|
364
|
+
const C = f.closest("g");
|
|
365
|
+
if (C) {
|
|
366
|
+
e.editSummary(C);
|
|
367
367
|
return;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
@@ -403,7 +403,7 @@ function bt(e) {
|
|
|
403
403
|
}, v = (d) => {
|
|
404
404
|
d.stopPropagation(), d.preventDefault(), d.ctrlKey || d.metaKey ? d.deltaY < 0 ? re(e, "in", e.dragMoveHelper) : e.scaleVal - e.scaleSensitivity > 0 && re(e, "out", e.dragMoveHelper) : d.shiftKey ? e.move(-d.deltaY, 0) : e.move(-d.deltaX, -d.deltaY);
|
|
405
405
|
}, { container: m } = e;
|
|
406
|
-
return
|
|
406
|
+
return Ee([
|
|
407
407
|
{ dom: m, evt: "pointerdown", func: c },
|
|
408
408
|
{ dom: m, evt: "pointermove", func: a },
|
|
409
409
|
{ dom: m, evt: "pointerup", func: h },
|
|
@@ -454,8 +454,8 @@ const le = document, xt = function() {
|
|
|
454
454
|
i.direction === 0 ? o += 1 : i.direction === 1 ? s += 1 : o <= s ? (i.direction = 0, o += 1) : (i.direction = 1, s += 1);
|
|
455
455
|
});
|
|
456
456
|
}
|
|
457
|
-
|
|
458
|
-
},
|
|
457
|
+
Ct(this, n, t);
|
|
458
|
+
}, Ct = function(e, t, n) {
|
|
459
459
|
const o = le.createElement("me-main");
|
|
460
460
|
o.className = D.LHS;
|
|
461
461
|
const s = le.createElement("me-main");
|
|
@@ -465,14 +465,14 @@ const le = document, xt = function() {
|
|
|
465
465
|
e.direction === 2 ? l.direction === 0 ? o.appendChild(r) : s.appendChild(r) : e.direction === 0 ? o.appendChild(r) : s.appendChild(r);
|
|
466
466
|
}
|
|
467
467
|
e.nodes.appendChild(o), e.nodes.appendChild(n), e.nodes.appendChild(s), e.nodes.appendChild(e.lines), e.nodes.appendChild(e.labelContainer);
|
|
468
|
-
},
|
|
468
|
+
}, Et = function(e, t) {
|
|
469
469
|
const n = le.createElement("me-children");
|
|
470
470
|
for (let o = 0; o < t.length; o++) {
|
|
471
471
|
const s = t[o], { grp: i } = e.createWrapper(s);
|
|
472
472
|
n.appendChild(i);
|
|
473
473
|
}
|
|
474
474
|
return n;
|
|
475
|
-
}, _ = document,
|
|
475
|
+
}, _ = document, Xe = function(e, t) {
|
|
476
476
|
const o = (this?.el ? this.el : t || document).querySelector(`[data-nodeid="me${e}"]`);
|
|
477
477
|
if (!o) throw new Error(`FindEle: Node ${e} not found, maybe it's collapsed.`);
|
|
478
478
|
return o;
|
|
@@ -515,17 +515,17 @@ const le = document, xt = function() {
|
|
|
515
515
|
}, St = function(e, t) {
|
|
516
516
|
const n = _.createElement("me-wrapper"), { p: o, tpc: s } = this.createParent(e);
|
|
517
517
|
if (n.appendChild(o), !t && e.children && e.children.length > 0) {
|
|
518
|
-
const i =
|
|
518
|
+
const i = ke(e.expanded);
|
|
519
519
|
if (o.appendChild(i), e.expanded !== !1) {
|
|
520
|
-
const l =
|
|
520
|
+
const l = Et(this, e.children);
|
|
521
521
|
n.appendChild(l);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
return { grp: n, top: o, tpc: s };
|
|
525
|
-
},
|
|
525
|
+
}, kt = function(e) {
|
|
526
526
|
const t = _.createElement("me-parent"), n = this.createTopic(e);
|
|
527
527
|
return Se.call(this, n, e), t.appendChild(n), { p: t, tpc: n };
|
|
528
|
-
},
|
|
528
|
+
}, Nt = function(e) {
|
|
529
529
|
const t = _.createElement("me-children");
|
|
530
530
|
return t.append(...e), t;
|
|
531
531
|
}, _t = function(e) {
|
|
@@ -573,10 +573,10 @@ const Tt = function(e) {
|
|
|
573
573
|
origin: o
|
|
574
574
|
}));
|
|
575
575
|
});
|
|
576
|
-
},
|
|
576
|
+
}, ke = function(e) {
|
|
577
577
|
const t = _.createElement("me-epd");
|
|
578
578
|
return t.expanded = e !== !1, t.className = e !== !1 ? "minus" : "", t;
|
|
579
|
-
},
|
|
579
|
+
}, q = document, M = "http://www.w3.org/2000/svg", de = function(e) {
|
|
580
580
|
const t = e.clientWidth, n = e.clientHeight, o = e.dataset, s = Number(o.x), i = Number(o.y), l = o.anchor;
|
|
581
581
|
let r = s;
|
|
582
582
|
l === "middle" ? r = s - t / 2 : l === "end" && (r = s - t), e.style.left = `${r}px`, e.style.top = `${i - n / 2}px`, e.style.visibility = "visible";
|
|
@@ -586,21 +586,21 @@ const Tt = function(e) {
|
|
|
586
586
|
const a = "label-" + r;
|
|
587
587
|
return c.id = a, c.innerHTML = e, c.dataset.type = l, c.dataset.svgId = r, c.dataset.x = t.toString(), c.dataset.y = n.toString(), c.dataset.anchor = s, c;
|
|
588
588
|
}, Ze = function(e, t, n) {
|
|
589
|
-
const o =
|
|
590
|
-
return
|
|
589
|
+
const o = q.createElementNS(M, "path");
|
|
590
|
+
return N(o, {
|
|
591
591
|
d: e,
|
|
592
592
|
stroke: t || "#666",
|
|
593
593
|
fill: "none",
|
|
594
594
|
"stroke-width": n
|
|
595
595
|
}), o;
|
|
596
|
-
},
|
|
597
|
-
const t =
|
|
596
|
+
}, X = function(e) {
|
|
597
|
+
const t = q.createElementNS(M, "svg");
|
|
598
598
|
return t.setAttribute("class", e), t.setAttribute("overflow", "visible"), t;
|
|
599
599
|
}, $e = function() {
|
|
600
|
-
const e =
|
|
600
|
+
const e = q.createElementNS(M, "line");
|
|
601
601
|
return e.setAttribute("stroke", "#4dc4ff"), e.setAttribute("fill", "none"), e.setAttribute("stroke-width", "2"), e.setAttribute("opacity", "0.45"), e;
|
|
602
602
|
}, Lt = function(e, t, n, o) {
|
|
603
|
-
const s =
|
|
603
|
+
const s = q.createElementNS(M, "g");
|
|
604
604
|
return [
|
|
605
605
|
{
|
|
606
606
|
name: "line",
|
|
@@ -615,16 +615,16 @@ const Tt = function(e) {
|
|
|
615
615
|
d: n
|
|
616
616
|
}
|
|
617
617
|
].forEach((l, r) => {
|
|
618
|
-
const c = l.d, a =
|
|
618
|
+
const c = l.d, a = q.createElementNS(M, "path"), h = {
|
|
619
619
|
d: c,
|
|
620
620
|
stroke: o?.stroke || "rgb(227, 125, 116)",
|
|
621
621
|
fill: "none",
|
|
622
622
|
"stroke-linecap": o?.strokeLinecap || "cap",
|
|
623
623
|
"stroke-width": String(o?.strokeWidth || "2")
|
|
624
624
|
};
|
|
625
|
-
o?.opacity !== void 0 && (h.opacity = String(o.opacity)),
|
|
626
|
-
const u =
|
|
627
|
-
|
|
625
|
+
o?.opacity !== void 0 && (h.opacity = String(o.opacity)), N(a, h), r === 0 && a.setAttribute("stroke-dasharray", o?.strokeDasharray || "8,2");
|
|
626
|
+
const u = q.createElementNS(M, "path");
|
|
627
|
+
N(u, {
|
|
628
628
|
d: c,
|
|
629
629
|
stroke: "transparent",
|
|
630
630
|
fill: "none",
|
|
@@ -663,7 +663,7 @@ const Tt = function(e) {
|
|
|
663
663
|
const c = l[r], a = c.querySelector("me-tpc"), { offsetLeft: h, offsetTop: u } = $(this.nodes, a), g = a.offsetWidth, v = a.offsetHeight, m = c.parentNode.className, p = this.generateMainBranch({ pT: n, pL: o, pW: s, pH: i, cT: u, cL: h, cW: g, cH: v, direction: m, containerHeight: this.nodes.offsetHeight }), d = this.theme.palette, f = a.nodeObj.branchColor || d[r % d.length];
|
|
664
664
|
if (a.style.borderColor = f, this.lines.appendChild(Ze(p, f, "3")), e && e !== c)
|
|
665
665
|
continue;
|
|
666
|
-
const y =
|
|
666
|
+
const y = X("subLines"), w = c.lastChild;
|
|
667
667
|
w.tagName === "svg" && w.remove(), c.appendChild(y), et(this, y, f, c, m, !0);
|
|
668
668
|
}
|
|
669
669
|
this.labelContainer.innerHTML = "", this.renderArrow(), this.renderSummary(), this.bus.fire("linkDiv");
|
|
@@ -674,9 +674,9 @@ const Tt = function(e) {
|
|
|
674
674
|
for (let g = 0; g < r.length; g++) {
|
|
675
675
|
const v = r[g], m = v.firstChild, p = m.offsetTop, d = m.offsetLeft, f = m.offsetWidth, y = m.offsetHeight, w = m.firstChild.nodeObj.branchColor || n, S = e.generateSubBranch({ pT: c, pL: a, pW: h, pH: u, cT: p, cL: d, cW: f, cH: y, direction: s, isFirst: i });
|
|
676
676
|
t.appendChild(Ze(S, w, "2"));
|
|
677
|
-
const
|
|
678
|
-
if (
|
|
679
|
-
if (!
|
|
677
|
+
const C = m.children[1];
|
|
678
|
+
if (C) {
|
|
679
|
+
if (!C.expanded) continue;
|
|
680
680
|
} else
|
|
681
681
|
continue;
|
|
682
682
|
et(e, t, w, v, s);
|
|
@@ -822,6 +822,20 @@ const Tt = function(e) {
|
|
|
822
822
|
linkBidirectional: "양방향 연결",
|
|
823
823
|
clickTips: "대상 노드를 클릭하십시오",
|
|
824
824
|
summary: "요약"
|
|
825
|
+
},
|
|
826
|
+
ro: {
|
|
827
|
+
addChild: "Adaugă sub-nod",
|
|
828
|
+
addParent: "Adaugă nod părinte",
|
|
829
|
+
addSibling: "Adaugă nod la același nivel",
|
|
830
|
+
removeNode: "Șterge nodul",
|
|
831
|
+
focus: "Focalizare",
|
|
832
|
+
cancelFocus: "Anulează focalizarea",
|
|
833
|
+
moveUp: "Mută în sus",
|
|
834
|
+
moveDown: "Mută în jos",
|
|
835
|
+
link: "Creează legătură",
|
|
836
|
+
linkBidirectional: "Creează legătură bidirecțională",
|
|
837
|
+
clickTips: "Click pe nodul țintă",
|
|
838
|
+
summary: "Rezumat"
|
|
825
839
|
}
|
|
826
840
|
};
|
|
827
841
|
function Mt(e, t) {
|
|
@@ -832,15 +846,15 @@ function Mt(e, t) {
|
|
|
832
846
|
const n = (x) => {
|
|
833
847
|
const b = document.createElement("div");
|
|
834
848
|
return b.innerText = x, b.className = "tips", b;
|
|
835
|
-
}, o = (x, b,
|
|
836
|
-
const
|
|
837
|
-
return
|
|
849
|
+
}, o = (x, b, E) => {
|
|
850
|
+
const k = document.createElement("li");
|
|
851
|
+
return k.id = x, k.innerHTML = `<span>${ue(b)}</span><span ${E ? 'class="key"' : ""}>${ue(E)}</span>`, k;
|
|
838
852
|
}, s = je[e.locale] ? e.locale : "en", i = je[s], l = o("cm-add_child", i.addChild, "Tab"), r = o("cm-add_parent", i.addParent, "Ctrl + Enter"), c = o("cm-add_sibling", i.addSibling, "Enter"), a = o("cm-remove_child", i.removeNode, "Delete"), h = o("cm-fucus", i.focus, ""), u = o("cm-unfucus", i.cancelFocus, ""), g = o("cm-up", i.moveUp, "PgUp"), v = o("cm-down", i.moveDown, "Pgdn"), m = o("cm-link", i.link, ""), p = o("cm-link-bidirectional", i.linkBidirectional, ""), d = o("cm-summary", i.summary, ""), f = document.createElement("ul");
|
|
839
853
|
if (f.className = "menu-list", f.appendChild(l), f.appendChild(r), f.appendChild(c), f.appendChild(a), t.focus && (f.appendChild(h), f.appendChild(u)), f.appendChild(g), f.appendChild(v), f.appendChild(d), t.link && (f.appendChild(m), f.appendChild(p)), t && t.extend)
|
|
840
854
|
for (let x = 0; x < t.extend.length; x++) {
|
|
841
|
-
const b = t.extend[x],
|
|
842
|
-
f.appendChild(
|
|
843
|
-
b.onclick(
|
|
855
|
+
const b = t.extend[x], E = o(b.name, b.name, b.key || "");
|
|
856
|
+
f.appendChild(E), E.onclick = (k) => {
|
|
857
|
+
b.onclick(k);
|
|
844
858
|
};
|
|
845
859
|
}
|
|
846
860
|
const y = document.createElement("div");
|
|
@@ -850,8 +864,8 @@ function Mt(e, t) {
|
|
|
850
864
|
const b = x.target;
|
|
851
865
|
if (pe(b)) {
|
|
852
866
|
b.parentElement.tagName === "ME-ROOT" ? w = !0 : w = !1, w ? (h.className = "disabled", g.className = "disabled", v.className = "disabled", r.className = "disabled", c.className = "disabled", a.className = "disabled") : (h.className = "", g.className = "", v.className = "", r.className = "", c.className = "", a.className = ""), y.hidden = !1, f.style.top = "", f.style.bottom = "", f.style.left = "", f.style.right = "";
|
|
853
|
-
const
|
|
854
|
-
|
|
867
|
+
const E = f.getBoundingClientRect(), k = f.offsetHeight, L = f.offsetWidth, O = x.clientY - E.top, j = x.clientX - E.left;
|
|
868
|
+
k + O > window.innerHeight ? (f.style.top = "", f.style.bottom = "0px") : (f.style.bottom = "", f.style.top = O + 15 + "px"), L + j > window.innerWidth ? (f.style.left = "", f.style.right = "0px") : (f.style.right = "", f.style.left = j + 10 + "px");
|
|
855
869
|
}
|
|
856
870
|
};
|
|
857
871
|
e.bus.addListener("showContextMenu", S), y.onclick = (x) => {
|
|
@@ -873,14 +887,14 @@ function Mt(e, t) {
|
|
|
873
887
|
}, v.onclick = () => {
|
|
874
888
|
w || (e.moveDownNode(), y.hidden = !0);
|
|
875
889
|
};
|
|
876
|
-
const
|
|
890
|
+
const C = (x) => {
|
|
877
891
|
y.hidden = !0;
|
|
878
|
-
const b = e.currentNode,
|
|
879
|
-
e.container.appendChild(
|
|
892
|
+
const b = e.currentNode, E = n(i.clickTips);
|
|
893
|
+
e.container.appendChild(E), e.map.addEventListener(
|
|
880
894
|
"click",
|
|
881
|
-
(
|
|
882
|
-
|
|
883
|
-
const L =
|
|
895
|
+
(k) => {
|
|
896
|
+
k.preventDefault(), E.remove();
|
|
897
|
+
const L = k.target;
|
|
884
898
|
(L.parentElement.tagName === "ME-PARENT" || L.parentElement.tagName === "ME-ROOT") && e.createArrow(b, L, x);
|
|
885
899
|
},
|
|
886
900
|
{
|
|
@@ -888,7 +902,7 @@ function Mt(e, t) {
|
|
|
888
902
|
}
|
|
889
903
|
);
|
|
890
904
|
};
|
|
891
|
-
return m.onclick = () =>
|
|
905
|
+
return m.onclick = () => C(), p.onclick = () => C({ bidirectional: !0 }), d.onclick = () => {
|
|
892
906
|
y.hidden = !0, e.createSummary(), e.unselectNodes(e.currentNodes);
|
|
893
907
|
}, () => {
|
|
894
908
|
l.onclick = null, r.onclick = null, c.onclick = null, a.onclick = null, h.onclick = null, u.onclick = null, g.onclick = null, v.onclick = null, m.onclick = null, d.onclick = null, y.onclick = null, e.container.oncontextmenu = null;
|
|
@@ -980,7 +994,7 @@ function Ot(e) {
|
|
|
980
994
|
}
|
|
981
995
|
n && Dt(n, t);
|
|
982
996
|
};
|
|
983
|
-
return
|
|
997
|
+
return Ee([
|
|
984
998
|
{ dom: e.map, evt: "dragstart", func: i },
|
|
985
999
|
{ dom: e.map, evt: "dragend", func: l },
|
|
986
1000
|
{ dom: e.map, evt: "dragover", func: r }
|
|
@@ -1045,19 +1059,19 @@ function Ht(e) {
|
|
|
1045
1059
|
e.bus.removeListener("operation", i), e.bus.removeListener("selectNodes", r), e.container.removeEventListener("keydown", l);
|
|
1046
1060
|
};
|
|
1047
1061
|
}
|
|
1048
|
-
const Bt = '<?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>', Rt = '<?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>', It = '<?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>', Ft = '<?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>', Wt = '<?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>', Kt = '<?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>',
|
|
1062
|
+
const Bt = '<?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>', Rt = '<?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>', It = '<?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>', Ft = '<?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>', Wt = '<?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>', Kt = '<?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>', zt = '<?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>', Gt = {
|
|
1049
1063
|
side: Bt,
|
|
1050
1064
|
left: Rt,
|
|
1051
1065
|
right: It,
|
|
1052
1066
|
full: Ft,
|
|
1053
1067
|
living: Wt,
|
|
1054
1068
|
zoomin: Kt,
|
|
1055
|
-
zoomout:
|
|
1069
|
+
zoomout: zt
|
|
1056
1070
|
}, F = (e, t) => {
|
|
1057
1071
|
const n = document.createElement("span");
|
|
1058
|
-
return n.id = e, n.innerHTML =
|
|
1072
|
+
return n.id = e, n.innerHTML = Gt[t], n;
|
|
1059
1073
|
};
|
|
1060
|
-
function
|
|
1074
|
+
function Yt(e) {
|
|
1061
1075
|
const t = document.createElement("div"), n = F("fullscreen", "full"), o = F("toCenter", "living"), s = F("zoomout", "zoomout"), i = F("zoomin", "zoomin"), l = document.createElement("span");
|
|
1062
1076
|
return l.innerText = "100%", t.appendChild(n), t.appendChild(o), t.appendChild(s), t.appendChild(i), t.className = "mind-elixir-toolbar rb", n.onclick = () => {
|
|
1063
1077
|
document.fullscreenElement === e.el ? document.exitFullscreen() : e.el.requestFullscreen();
|
|
@@ -1069,7 +1083,7 @@ function qt(e) {
|
|
|
1069
1083
|
e.scale(e.scaleVal + e.scaleSensitivity);
|
|
1070
1084
|
}, t;
|
|
1071
1085
|
}
|
|
1072
|
-
function
|
|
1086
|
+
function qt(e) {
|
|
1073
1087
|
const t = document.createElement("div"), n = F("tbltl", "left"), o = F("tbltr", "right"), s = F("tblts", "side");
|
|
1074
1088
|
return t.appendChild(n), t.appendChild(o), t.appendChild(s), t.className = "mind-elixir-toolbar lt", n.onclick = () => {
|
|
1075
1089
|
e.initLeft();
|
|
@@ -1080,9 +1094,9 @@ function zt(e) {
|
|
|
1080
1094
|
}, t;
|
|
1081
1095
|
}
|
|
1082
1096
|
function Vt(e) {
|
|
1083
|
-
e.container.append(
|
|
1097
|
+
e.container.append(Yt(e)), e.container.append(qt(e));
|
|
1084
1098
|
}
|
|
1085
|
-
class
|
|
1099
|
+
class Ut {
|
|
1086
1100
|
_listeners = /* @__PURE__ */ new Map();
|
|
1087
1101
|
addEventListener(t, n) {
|
|
1088
1102
|
const o = this._listeners.get(t) ?? /* @__PURE__ */ new Set();
|
|
@@ -1113,7 +1127,7 @@ const Be = (e, t = "px") => typeof e == "number" ? e + t : e, H = ({ style: e },
|
|
|
1113
1127
|
}, Re = (e = 0, t = 0, n = 0, o = 0) => {
|
|
1114
1128
|
const s = { x: e, y: t, width: n, height: o, top: t, left: e, right: e + n, bottom: t + o };
|
|
1115
1129
|
return { ...s, toJSON: () => JSON.stringify(s) };
|
|
1116
|
-
},
|
|
1130
|
+
}, Xt = (e) => {
|
|
1117
1131
|
let t, n = -1, o = !1;
|
|
1118
1132
|
return {
|
|
1119
1133
|
next: (...s) => {
|
|
@@ -1154,18 +1168,18 @@ const Be = (e, t = "px") => typeof e == "number" ? e + t : e, H = ({ style: e },
|
|
|
1154
1168
|
case "shift":
|
|
1155
1169
|
return e.shiftKey;
|
|
1156
1170
|
}
|
|
1157
|
-
}) : !1), { abs: I, max: Fe, min: We, ceil: Ke } = Math,
|
|
1171
|
+
}) : !1), { abs: I, max: Fe, min: We, ceil: Ke } = Math, ze = (e = []) => ({
|
|
1158
1172
|
stored: e,
|
|
1159
1173
|
selected: [],
|
|
1160
1174
|
touched: [],
|
|
1161
1175
|
changed: { added: [], removed: [] }
|
|
1162
1176
|
});
|
|
1163
|
-
class en extends
|
|
1177
|
+
class en extends Ut {
|
|
1164
1178
|
static version = "mind-elixir-fork";
|
|
1165
1179
|
// Options
|
|
1166
1180
|
_options;
|
|
1167
1181
|
// Selection store
|
|
1168
|
-
_selection =
|
|
1182
|
+
_selection = ze();
|
|
1169
1183
|
// Area element and clipping element
|
|
1170
1184
|
_area;
|
|
1171
1185
|
_clippingElement;
|
|
@@ -1245,7 +1259,7 @@ class en extends Xt {
|
|
|
1245
1259
|
// https://stackoverflow.com/a/38268846
|
|
1246
1260
|
pointerEvents: "none",
|
|
1247
1261
|
zIndex: "1"
|
|
1248
|
-
}), this._frame =
|
|
1262
|
+
}), this._frame = Xt((i) => {
|
|
1249
1263
|
this._recalculateSelectionAreaRect(), this._updateElementSelection(), this._emitEvent("move", i), this._redrawSelectionArea();
|
|
1250
1264
|
}), this.enable();
|
|
1251
1265
|
}
|
|
@@ -1493,7 +1507,7 @@ class en extends Xt {
|
|
|
1493
1507
|
*/
|
|
1494
1508
|
clearSelection(t = !0, n = !1) {
|
|
1495
1509
|
const { selected: o, stored: s, changed: i } = this._selection;
|
|
1496
|
-
i.added = [], i.removed.push(...o, ...t ? s : []), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection =
|
|
1510
|
+
i.added = [], i.removed.push(...o, ...t ? s : []), n || (this._emitEvent("move", null), this._emitEvent("stop", null)), this._selection = ze(t ? [] : s);
|
|
1497
1511
|
}
|
|
1498
1512
|
/**
|
|
1499
1513
|
* @returns {Array} Selected elements
|
|
@@ -1691,7 +1705,7 @@ const cn = function({ map: e, direction: t }, n) {
|
|
|
1691
1705
|
s.nextSibling.appendChild(n);
|
|
1692
1706
|
else {
|
|
1693
1707
|
const i = e.createChildren([n]);
|
|
1694
|
-
s.appendChild(
|
|
1708
|
+
s.appendChild(ke(!0)), s.insertAdjacentElement("afterend", i);
|
|
1695
1709
|
}
|
|
1696
1710
|
e.linkDiv(n.offsetParent);
|
|
1697
1711
|
} else s.tagName === "ME-ROOT" && (cn(e, o.nodeObj) === 0 ? e.container.querySelector(".lhs")?.appendChild(n) : e.container.querySelector(".rhs")?.appendChild(n), e.linkDiv());
|
|
@@ -1709,7 +1723,7 @@ const cn = function({ map: e, direction: t }, n) {
|
|
|
1709
1723
|
const n = e.parentElement.parentElement.lastElementChild;
|
|
1710
1724
|
n?.tagName === "svg" && n?.remove();
|
|
1711
1725
|
}, dn = function(e, t) {
|
|
1712
|
-
const n = e.nodeObj, o =
|
|
1726
|
+
const n = e.nodeObj, o = Ce(n);
|
|
1713
1727
|
o.style && t.style && (t.style = Object.assign(o.style, t.style));
|
|
1714
1728
|
const s = Object.assign(n, t);
|
|
1715
1729
|
Se.call(this, e, s), this.linkDiv(), this.bus.fire("operation", {
|
|
@@ -1717,7 +1731,7 @@ const cn = function({ map: e, direction: t }, n) {
|
|
|
1717
1731
|
obj: s,
|
|
1718
1732
|
origin: o
|
|
1719
1733
|
});
|
|
1720
|
-
},
|
|
1734
|
+
}, Ne = function(e, t, n) {
|
|
1721
1735
|
if (!t) return null;
|
|
1722
1736
|
const o = t.nodeObj;
|
|
1723
1737
|
o.expanded === !1 && (e.expandNode(t, !0), t = e.findEle(o.id));
|
|
@@ -1763,7 +1777,7 @@ const cn = function({ map: e, direction: t }, n) {
|
|
|
1763
1777
|
const s = t || this.generateNewObj();
|
|
1764
1778
|
ln(o, s), R(this.nodeData);
|
|
1765
1779
|
const i = n.parentElement.parentElement, { grp: l, top: r } = this.createWrapper(s, !0);
|
|
1766
|
-
r.appendChild(
|
|
1780
|
+
r.appendChild(ke(!0)), i.insertAdjacentElement("afterend", l);
|
|
1767
1781
|
const c = this.createChildren([i]);
|
|
1768
1782
|
r.insertAdjacentElement("afterend", c), this.linkDiv(), t || this.editTopic(r.firstChild), this.selectNode(r.firstChild, !0), this.bus.fire("operation", {
|
|
1769
1783
|
name: "insertParent",
|
|
@@ -1772,7 +1786,7 @@ const cn = function({ map: e, direction: t }, n) {
|
|
|
1772
1786
|
}, un = function(e, t) {
|
|
1773
1787
|
const n = e || this.currentNode;
|
|
1774
1788
|
if (!n) return;
|
|
1775
|
-
const o =
|
|
1789
|
+
const o = Ne(this, n, t);
|
|
1776
1790
|
if (!o) return;
|
|
1777
1791
|
const { newTop: s, newNodeObj: i } = o;
|
|
1778
1792
|
this.bus.fire("operation", {
|
|
@@ -1780,9 +1794,9 @@ const cn = function({ map: e, direction: t }, n) {
|
|
|
1780
1794
|
obj: i
|
|
1781
1795
|
}), t || this.editTopic(s.firstChild), this.selectNode(s.firstChild, !0);
|
|
1782
1796
|
}, pn = function(e, t) {
|
|
1783
|
-
const n =
|
|
1797
|
+
const n = Ce(e.nodeObj);
|
|
1784
1798
|
xe(n);
|
|
1785
|
-
const o =
|
|
1799
|
+
const o = Ne(this, t, n);
|
|
1786
1800
|
if (!o) return;
|
|
1787
1801
|
const { newNodeObj: s } = o;
|
|
1788
1802
|
this.selectNode(this.findEle(s.id)), this.bus.fire("operation", {
|
|
@@ -1793,9 +1807,9 @@ const cn = function({ map: e, direction: t }, n) {
|
|
|
1793
1807
|
e = ae(e);
|
|
1794
1808
|
const n = [];
|
|
1795
1809
|
for (let o = 0; o < e.length; o++) {
|
|
1796
|
-
const s = e[o], i =
|
|
1810
|
+
const s = e[o], i = Ce(s.nodeObj);
|
|
1797
1811
|
xe(i);
|
|
1798
|
-
const l =
|
|
1812
|
+
const l = Ne(this, t, i);
|
|
1799
1813
|
if (!l) return;
|
|
1800
1814
|
const { newNodeObj: r } = l;
|
|
1801
1815
|
n.push(r);
|
|
@@ -1871,15 +1885,15 @@ const cn = function({ map: e, direction: t }, n) {
|
|
|
1871
1885
|
rt(e, "before", t, this);
|
|
1872
1886
|
}, xn = function(e, t) {
|
|
1873
1887
|
rt(e, "after", t, this);
|
|
1874
|
-
},
|
|
1888
|
+
}, Cn = function(e) {
|
|
1875
1889
|
const t = e || this.currentNode;
|
|
1876
1890
|
t && (t.nodeObj.dangerouslySetInnerHTML || this.editTopic(t));
|
|
1877
|
-
},
|
|
1891
|
+
}, En = function(e, t) {
|
|
1878
1892
|
e.text.textContent = t, e.nodeObj.topic = t, this.linkDiv();
|
|
1879
1893
|
}, lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1880
1894
|
__proto__: null,
|
|
1881
1895
|
addChild: un,
|
|
1882
|
-
beginEdit:
|
|
1896
|
+
beginEdit: Cn,
|
|
1883
1897
|
copyNode: pn,
|
|
1884
1898
|
copyNodes: gn,
|
|
1885
1899
|
insertParent: fn,
|
|
@@ -1892,7 +1906,7 @@ const cn = function({ map: e, direction: t }, n) {
|
|
|
1892
1906
|
removeNodes: vn,
|
|
1893
1907
|
reshapeNode: dn,
|
|
1894
1908
|
rmSubline: J,
|
|
1895
|
-
setNodeTopic:
|
|
1909
|
+
setNodeTopic: En
|
|
1896
1910
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1897
1911
|
function Sn(e) {
|
|
1898
1912
|
return {
|
|
@@ -1903,13 +1917,13 @@ function Sn(e) {
|
|
|
1903
1917
|
theme: e.theme
|
|
1904
1918
|
};
|
|
1905
1919
|
}
|
|
1906
|
-
const
|
|
1920
|
+
const kn = function(e) {
|
|
1907
1921
|
const t = this.container, n = e.getBoundingClientRect(), o = t.getBoundingClientRect();
|
|
1908
1922
|
if (n.top > o.bottom || n.bottom < o.top || n.left > o.right || n.right < o.left) {
|
|
1909
1923
|
const i = n.left + n.width / 2, l = n.top + n.height / 2, r = o.left + o.width / 2, c = o.top + o.height / 2, a = i - r, h = l - c;
|
|
1910
1924
|
this.move(-a, -h, !0);
|
|
1911
1925
|
}
|
|
1912
|
-
},
|
|
1926
|
+
}, Nn = function(e, t, n) {
|
|
1913
1927
|
this.clearSelection(), this.scrollIntoView(e), this.selection.select(e), t && this.bus.fire("selectNewNode", e.nodeObj);
|
|
1914
1928
|
}, _n = function(e) {
|
|
1915
1929
|
this.selection.select(e);
|
|
@@ -1931,14 +1945,17 @@ const Nn = function(e) {
|
|
|
1931
1945
|
this.editable = !1;
|
|
1932
1946
|
}, $n = function(e, t = { x: 0, y: 0 }) {
|
|
1933
1947
|
if (e < this.scaleMin || e > this.scaleMax) return;
|
|
1934
|
-
const n = this.container.getBoundingClientRect(), o = t.x ? t.x - n.left - n.width / 2 : 0, s = t.y ? t.y - n.top - n.height / 2 : 0, { dx: i, dy: l } = ct(this), r = this.map.style.transform, { x: c, y: a } =
|
|
1948
|
+
const n = this.container.getBoundingClientRect(), o = t.x ? t.x - n.left - n.width / 2 : 0, s = t.y ? t.y - n.top - n.height / 2 : 0, { dx: i, dy: l } = ct(this), r = this.map.style.transform, { x: c, y: a } = Ue(r), h = c - i, u = a - l, g = this.scaleVal, v = (-o + h) * (1 - e / g), m = (-s + u) * (1 - e / g);
|
|
1935
1949
|
this.map.style.transform = `translate(${c - v}px, ${a - m}px) scale(${e})`, this.scaleVal = e, this.bus.fire("scale", e);
|
|
1936
1950
|
}, On = function() {
|
|
1937
1951
|
const e = this.nodes.offsetHeight / this.container.offsetHeight, t = this.nodes.offsetWidth / this.container.offsetWidth, n = 1 / Math.max(1, Math.max(e, t));
|
|
1938
1952
|
this.scaleVal = n, this.map.style.transform = "scale(" + n + ")", this.bus.fire("scale", n);
|
|
1939
1953
|
}, jn = function(e, t, n = !1) {
|
|
1940
|
-
const { map: o, scaleVal: s, bus: i } = this
|
|
1941
|
-
|
|
1954
|
+
const { map: o, scaleVal: s, bus: i } = this;
|
|
1955
|
+
if (n && o.style.transition === "transform 0.3s")
|
|
1956
|
+
return;
|
|
1957
|
+
const l = o.style.transform;
|
|
1958
|
+
let { x: r, y: c } = Ue(l);
|
|
1942
1959
|
r += e, c += t, n && (o.style.transition = "transform 0.3s", setTimeout(() => {
|
|
1943
1960
|
o.style.transition = "none";
|
|
1944
1961
|
}, 300)), o.style.transform = `translate(${r}px, ${c}px) scale(${s})`, i.fire("move", { dx: e, dy: t });
|
|
@@ -1961,9 +1978,9 @@ const Nn = function(e) {
|
|
|
1961
1978
|
this.direction = 1, this.refresh(), this.toCenter(), this.bus.fire("changeDirection", this.direction);
|
|
1962
1979
|
}, Kn = function() {
|
|
1963
1980
|
this.direction = 2, this.refresh(), this.toCenter(), this.bus.fire("changeDirection", this.direction);
|
|
1964
|
-
},
|
|
1981
|
+
}, zn = function(e) {
|
|
1965
1982
|
this.locale = e, this.refresh();
|
|
1966
|
-
},
|
|
1983
|
+
}, Gn = function(e, t) {
|
|
1967
1984
|
const n = e.nodeObj;
|
|
1968
1985
|
typeof t == "boolean" ? n.expanded = t : n.expanded !== !1 ? n.expanded = !1 : n.expanded = !0;
|
|
1969
1986
|
const o = e.getBoundingClientRect(), s = {
|
|
@@ -1983,18 +2000,18 @@ const Nn = function(e) {
|
|
|
1983
2000
|
y: r.top
|
|
1984
2001
|
}, a = s.x - c.x, h = s.y - c.y;
|
|
1985
2002
|
this.move(a, h), this.bus.fire("expandNode", n);
|
|
1986
|
-
},
|
|
2003
|
+
}, Yn = function(e, t) {
|
|
1987
2004
|
const n = e.nodeObj, o = e.getBoundingClientRect(), s = {
|
|
1988
2005
|
x: o.left,
|
|
1989
2006
|
y: o.top
|
|
1990
2007
|
};
|
|
1991
|
-
|
|
2008
|
+
Y(n, t ?? !n.expanded), this.refresh();
|
|
1992
2009
|
const i = this.findEle(n.id).getBoundingClientRect(), l = {
|
|
1993
2010
|
x: i.left,
|
|
1994
2011
|
y: i.top
|
|
1995
2012
|
}, r = s.x - l.x, c = s.y - l.y;
|
|
1996
2013
|
this.move(r, c);
|
|
1997
|
-
},
|
|
2014
|
+
}, qn = function(e) {
|
|
1998
2015
|
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();
|
|
1999
2016
|
}, Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2000
2017
|
__proto__: null,
|
|
@@ -2002,8 +2019,8 @@ const Nn = function(e) {
|
|
|
2002
2019
|
clearSelection: Ln,
|
|
2003
2020
|
disableEdit: Pn,
|
|
2004
2021
|
enableEdit: Dn,
|
|
2005
|
-
expandNode:
|
|
2006
|
-
expandNodeAll:
|
|
2022
|
+
expandNode: Gn,
|
|
2023
|
+
expandNodeAll: Yn,
|
|
2007
2024
|
focusNode: Rn,
|
|
2008
2025
|
getData: Mn,
|
|
2009
2026
|
getDataString: An,
|
|
@@ -2012,16 +2029,16 @@ const Nn = function(e) {
|
|
|
2012
2029
|
initSide: Kn,
|
|
2013
2030
|
install: Bn,
|
|
2014
2031
|
move: jn,
|
|
2015
|
-
refresh:
|
|
2032
|
+
refresh: qn,
|
|
2016
2033
|
scale: $n,
|
|
2017
2034
|
scaleFit: On,
|
|
2018
|
-
scrollIntoView:
|
|
2019
|
-
selectNode:
|
|
2035
|
+
scrollIntoView: kn,
|
|
2036
|
+
selectNode: Nn,
|
|
2020
2037
|
selectNodes: _n,
|
|
2021
|
-
setLocale:
|
|
2038
|
+
setLocale: zn,
|
|
2022
2039
|
toCenter: Hn,
|
|
2023
2040
|
unselectNodes: Tn
|
|
2024
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
2041
|
+
}, Symbol.toStringTag, { value: "Module" })), Un = function(e) {
|
|
2025
2042
|
return {
|
|
2026
2043
|
dom: e,
|
|
2027
2044
|
moved: !1,
|
|
@@ -2044,7 +2061,7 @@ const Nn = function(e) {
|
|
|
2044
2061
|
},
|
|
2045
2062
|
cb: null,
|
|
2046
2063
|
init(t, n) {
|
|
2047
|
-
this.cb = n, this.handleClear = this.handleClear.bind(this), this.handlePointerMove = this.handlePointerMove.bind(this), this.handlePointerDown = this.handlePointerDown.bind(this), this.destroy =
|
|
2064
|
+
this.cb = n, this.handleClear = this.handleClear.bind(this), this.handlePointerMove = this.handlePointerMove.bind(this), this.handlePointerDown = this.handlePointerDown.bind(this), this.destroy = Ee([
|
|
2048
2065
|
{ dom: t, evt: "pointermove", func: this.handlePointerMove },
|
|
2049
2066
|
{ dom: t, evt: "pointerleave", func: this.handleClear },
|
|
2050
2067
|
{ dom: t, evt: "pointerup", func: this.handleClear },
|
|
@@ -2056,9 +2073,9 @@ const Nn = function(e) {
|
|
|
2056
2073
|
this.moved = !1, this.pointerdown = !1;
|
|
2057
2074
|
}
|
|
2058
2075
|
};
|
|
2059
|
-
},
|
|
2060
|
-
create:
|
|
2061
|
-
},
|
|
2076
|
+
}, Ge = {
|
|
2077
|
+
create: Un
|
|
2078
|
+
}, Xn = "#4dc4ff";
|
|
2062
2079
|
function at(e, t, n, o, s, i, l, r) {
|
|
2063
2080
|
return {
|
|
2064
2081
|
x: e / 8 + n * 3 / 8 + s * 3 / 8 + l / 8,
|
|
@@ -2069,14 +2086,14 @@ function Jn(e, t, n) {
|
|
|
2069
2086
|
e && (e.dataset.x = t.toString(), e.dataset.y = n.toString(), de(e));
|
|
2070
2087
|
}
|
|
2071
2088
|
function te(e, t, n, o, s) {
|
|
2072
|
-
|
|
2089
|
+
N(e, {
|
|
2073
2090
|
x1: t + "",
|
|
2074
2091
|
y1: n + "",
|
|
2075
2092
|
x2: o + "",
|
|
2076
2093
|
y2: s + ""
|
|
2077
2094
|
});
|
|
2078
2095
|
}
|
|
2079
|
-
function
|
|
2096
|
+
function Ye(e, t, n, o, s, i, l, r, c, a) {
|
|
2080
2097
|
const h = `M ${t} ${n} C ${o} ${s} ${i} ${l} ${r} ${c}`;
|
|
2081
2098
|
if (e.line.setAttribute("d", h), a.style) {
|
|
2082
2099
|
const p = a.style;
|
|
@@ -2120,7 +2137,7 @@ function ce(e, t, n) {
|
|
|
2120
2137
|
ctrlY: h
|
|
2121
2138
|
};
|
|
2122
2139
|
}
|
|
2123
|
-
function
|
|
2140
|
+
function G(e) {
|
|
2124
2141
|
let t, n;
|
|
2125
2142
|
const o = (e.cy - e.ctrlY) / (e.ctrlX - e.cx);
|
|
2126
2143
|
return o > e.h / e.w || o < -e.h / e.w ? e.cy - e.ctrlY < 0 ? (t = e.cx - e.h / 2 / o, n = e.cy + e.h / 2) : (t = e.cx + e.h / 2 / o, n = e.cy - e.h / 2) : e.cx - e.ctrlX < 0 ? (t = e.cx + e.w / 2, n = e.cy - e.w * o / 2) : (t = e.cx - e.w / 2, n = e.cy + e.w * o / 2), {
|
|
@@ -2131,24 +2148,24 @@ function Y(e) {
|
|
|
2131
2148
|
const _e = function(e, t, n, o, s) {
|
|
2132
2149
|
if (!t || !n)
|
|
2133
2150
|
return;
|
|
2134
|
-
const i = ce(e, t, o.delta1), l = ce(e, n, o.delta2), { x: r, y: c } =
|
|
2151
|
+
const i = ce(e, t, o.delta1), l = ce(e, n, o.delta2), { x: r, y: c } = G(i), { ctrlX: a, ctrlY: h } = i, { ctrlX: u, ctrlY: g } = l, { x: v, y: m } = G(l), p = ie(u, g, v, m);
|
|
2135
2152
|
if (!p) return;
|
|
2136
2153
|
const d = `M ${p.x1} ${p.y1} L ${v} ${m} L ${p.x2} ${p.y2}`;
|
|
2137
2154
|
let f = "";
|
|
2138
2155
|
if (o.bidirectional) {
|
|
2139
|
-
const
|
|
2140
|
-
if (!
|
|
2141
|
-
f = `M ${
|
|
2156
|
+
const k = ie(a, h, r, c);
|
|
2157
|
+
if (!k) return;
|
|
2158
|
+
f = `M ${k.x1} ${k.y1} L ${r} ${c} L ${k.x2} ${k.y2}`;
|
|
2142
2159
|
}
|
|
2143
|
-
const y = Lt(`M ${r} ${c} C ${a} ${h} ${u} ${g} ${v} ${m}`, d, f, o.style), { x: w, y: S } = at(r, c, a, h, u, g, v, m),
|
|
2160
|
+
const y = Lt(`M ${r} ${c} C ${a} ${h} ${u} ${g} ${v} ${m}`, d, f, o.style), { x: w, y: S } = at(r, c, a, h, u, g, v, m), C = o.style?.labelColor || "rgb(235, 95, 82)", x = "arrow-" + o.id;
|
|
2144
2161
|
y.id = x;
|
|
2145
|
-
const b = e.markdown ? e.markdown(o.label, o) : o.label,
|
|
2162
|
+
const b = e.markdown ? e.markdown(o.label, o) : o.label, E = ge(b, w, S, {
|
|
2146
2163
|
anchor: "middle",
|
|
2147
|
-
color:
|
|
2164
|
+
color: C,
|
|
2148
2165
|
dataType: "arrow",
|
|
2149
2166
|
svgId: x
|
|
2150
2167
|
});
|
|
2151
|
-
y.labelEl =
|
|
2168
|
+
y.labelEl = E, y.arrowObj = o, y.dataset.linkid = o.id, e.labelContainer.appendChild(E), e.linkSvgGroup.appendChild(y), de(E), s || (e.arrows.push(o), e.currentArrow = y, dt(e, o, i, l));
|
|
2152
2169
|
}, Zn = function(e, t, n = {}) {
|
|
2153
2170
|
const o = {
|
|
2154
2171
|
id: W(),
|
|
@@ -2195,7 +2212,7 @@ const _e = function(e, t, n, o, s) {
|
|
|
2195
2212
|
he(this), this.currentArrow = null;
|
|
2196
2213
|
}, fe = function(e, t) {
|
|
2197
2214
|
const n = document.createElementNS(M, "path");
|
|
2198
|
-
return
|
|
2215
|
+
return N(n, {
|
|
2199
2216
|
d: e,
|
|
2200
2217
|
stroke: t,
|
|
2201
2218
|
fill: "none",
|
|
@@ -2227,16 +2244,16 @@ const _e = function(e, t, n, o, s) {
|
|
|
2227
2244
|
}, dt = function(e, t, n, o) {
|
|
2228
2245
|
const { linkController: s, P2: i, P3: l, line1: r, line2: c, nodes: a, map: h, currentArrow: u, bus: g } = e;
|
|
2229
2246
|
if (!u) return;
|
|
2230
|
-
s.style.display = "initial", i.style.display = "initial", l.style.display = "initial", a.appendChild(s), a.appendChild(i), a.appendChild(l), oo(u,
|
|
2231
|
-
let { x: v, y: m } =
|
|
2232
|
-
i.style.cssText = `top:${d}px;left:${p}px;`, l.style.cssText = `top:${y}px;left:${f}px;`, te(r, v, m, p, d), te(c, f, y, w, S), e.helper1 =
|
|
2233
|
-
p = p +
|
|
2234
|
-
const b =
|
|
2235
|
-
v = b.x, m = b.y, i.style.top = d + "px", i.style.left = p + "px",
|
|
2236
|
-
}), e.helper2.init(h, (
|
|
2237
|
-
f = f +
|
|
2238
|
-
const b =
|
|
2239
|
-
w = b.x, S = b.y, l.style.top = y + "px", l.style.left = f + "px",
|
|
2247
|
+
s.style.display = "initial", i.style.display = "initial", l.style.display = "initial", a.appendChild(s), a.appendChild(i), a.appendChild(l), oo(u, Xn);
|
|
2248
|
+
let { x: v, y: m } = G(n), { ctrlX: p, ctrlY: d } = n, { ctrlX: f, ctrlY: y } = o, { x: w, y: S } = G(o);
|
|
2249
|
+
i.style.cssText = `top:${d}px;left:${p}px;`, l.style.cssText = `top:${y}px;left:${f}px;`, te(r, v, m, p, d), te(c, f, y, w, S), e.helper1 = Ge.create(i), e.helper2 = Ge.create(l), e.helper1.init(h, (C, x) => {
|
|
2250
|
+
p = p + C / e.scaleVal, d = d + x / e.scaleVal;
|
|
2251
|
+
const b = G({ ...n, ctrlX: p, ctrlY: d });
|
|
2252
|
+
v = b.x, m = b.y, i.style.top = d + "px", i.style.left = p + "px", Ye(u, v, m, p, d, f, y, w, S, t), te(r, v, m, p, d), t.delta1.x = p - n.cx, t.delta1.y = d - n.cy, g.fire("updateArrowDelta", t);
|
|
2253
|
+
}), e.helper2.init(h, (C, x) => {
|
|
2254
|
+
f = f + C / e.scaleVal, y = y + x / e.scaleVal;
|
|
2255
|
+
const b = G({ ...o, ctrlX: f, ctrlY: y });
|
|
2256
|
+
w = b.x, S = b.y, l.style.top = y + "px", l.style.left = f + "px", Ye(u, v, m, p, d, f, y, w, S, t), te(c, f, y, w, S), t.delta2.x = f - o.cx, t.delta2.y = y - o.cy, g.fire("updateArrowDelta", t);
|
|
2240
2257
|
});
|
|
2241
2258
|
};
|
|
2242
2259
|
function ro() {
|
|
@@ -2306,9 +2323,9 @@ const ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2306
2323
|
}, fo = function(e) {
|
|
2307
2324
|
const t = document.createElementNS(M, "g");
|
|
2308
2325
|
return t.setAttribute("id", e), t;
|
|
2309
|
-
},
|
|
2326
|
+
}, qe = function(e, t) {
|
|
2310
2327
|
const n = document.createElementNS(M, "path");
|
|
2311
|
-
return
|
|
2328
|
+
return N(n, {
|
|
2312
2329
|
d: e,
|
|
2313
2330
|
stroke: t || "#666",
|
|
2314
2331
|
fill: "none",
|
|
@@ -2322,16 +2339,16 @@ const ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2322
2339
|
}, Te = function(e, t) {
|
|
2323
2340
|
const { id: n, label: o, parent: s, start: i, end: l, style: r } = t, { nodes: c, theme: a, summarySvg: h } = e, g = e.findEle(s).nodeObj, v = po(e, t);
|
|
2324
2341
|
let m = 1 / 0, p = 0, d = 0, f = 0;
|
|
2325
|
-
for (let
|
|
2326
|
-
const Le = g.children?.[
|
|
2342
|
+
for (let U = i; U <= l; U++) {
|
|
2343
|
+
const Le = g.children?.[U];
|
|
2327
2344
|
if (!Le)
|
|
2328
2345
|
return e.removeSummary(n), null;
|
|
2329
2346
|
const Z = uo(e.findEle(Le.id)), { offsetLeft: Q, offsetTop: Ae } = $(c, Z), Me = i === l ? 10 : 20;
|
|
2330
|
-
|
|
2347
|
+
U === i && (d = Ae + Me), U === l && (f = Ae + Z.offsetHeight - Me), Q < m && (m = Q), Z.offsetWidth + Q > p && (p = Z.offsetWidth + Q);
|
|
2331
2348
|
}
|
|
2332
2349
|
let y, w;
|
|
2333
|
-
const S = g.parent ? 10 : 0,
|
|
2334
|
-
v === D.LHS ? (y =
|
|
2350
|
+
const S = g.parent ? 10 : 0, C = d + S, x = f + S, b = (C + x) / 2, E = r?.stroke || a.cssVar["--color"], k = r?.labelColor || a.cssVar["--color"], L = "s-" + n, O = e.markdown ? e.markdown(o, t) : o;
|
|
2351
|
+
v === D.LHS ? (y = qe(`M ${m + 10} ${C} c -5 0 -10 5 -10 10 L ${m} ${x - 10} c 0 5 5 10 10 10 M ${m} ${b} h -10`, E), w = ge(O, m - 20, b, { anchor: "end", color: k, dataType: "summary", svgId: L })) : (y = qe(`M ${p - 10} ${C} c 5 0 10 5 10 10 L ${p} ${x - 10} c 0 5 -5 10 -10 10 M ${p} ${b} h 10`, E), w = ge(O, p + 20, b, { anchor: "start", color: k, dataType: "summary", svgId: L }));
|
|
2335
2352
|
const j = fo(L);
|
|
2336
2353
|
return j.appendChild(y), e.labelContainer.appendChild(w), de(w), j.summaryObj = t, j.labelEl = w, h.appendChild(j), j;
|
|
2337
2354
|
}, go = function(e = {}) {
|
|
@@ -2367,7 +2384,7 @@ const ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2367
2384
|
}), this.nodes.insertAdjacentElement("beforeend", this.summarySvg);
|
|
2368
2385
|
}, xo = function(e) {
|
|
2369
2386
|
e && e.labelEl && Qe(this, e.labelEl, e.summaryObj);
|
|
2370
|
-
},
|
|
2387
|
+
}, Co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2371
2388
|
__proto__: null,
|
|
2372
2389
|
createSummary: go,
|
|
2373
2390
|
createSummaryFrom: mo,
|
|
@@ -2377,9 +2394,9 @@ const ao = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2377
2394
|
selectSummary: vo,
|
|
2378
2395
|
unselectSummary: bo
|
|
2379
2396
|
}, Symbol.toStringTag, { value: "Module" })), T = "http://www.w3.org/2000/svg";
|
|
2380
|
-
function
|
|
2397
|
+
function Eo(e, t) {
|
|
2381
2398
|
const n = document.createElementNS(T, "svg");
|
|
2382
|
-
return
|
|
2399
|
+
return N(n, {
|
|
2383
2400
|
version: "1.1",
|
|
2384
2401
|
xmlns: T,
|
|
2385
2402
|
height: e,
|
|
@@ -2389,13 +2406,13 @@ function Co(e, t) {
|
|
|
2389
2406
|
function So(e, t) {
|
|
2390
2407
|
return (parseInt(e) - parseInt(t)) / 2;
|
|
2391
2408
|
}
|
|
2392
|
-
function
|
|
2409
|
+
function ko(e, t, n, o) {
|
|
2393
2410
|
const s = document.createElementNS(T, "g");
|
|
2394
2411
|
let i = "";
|
|
2395
2412
|
return e.text ? i = e.text.textContent : i = e.childNodes[0].textContent, i.split(`
|
|
2396
2413
|
`).forEach((r, c) => {
|
|
2397
2414
|
const a = document.createElementNS(T, "text");
|
|
2398
|
-
|
|
2415
|
+
N(a, {
|
|
2399
2416
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2400
2417
|
y: o + parseInt(t.paddingTop) + So(t.lineHeight, t.fontSize) * (c + 1) + parseFloat(t.fontSize) * (c + 1) + "",
|
|
2401
2418
|
"text-anchor": "start",
|
|
@@ -2406,25 +2423,25 @@ function No(e, t, n, o) {
|
|
|
2406
2423
|
}), a.innerHTML = r, s.appendChild(a);
|
|
2407
2424
|
}), s;
|
|
2408
2425
|
}
|
|
2409
|
-
function
|
|
2426
|
+
function No(e, t, n, o) {
|
|
2410
2427
|
let s = "";
|
|
2411
2428
|
e.nodeObj?.dangerouslySetInnerHTML ? s = e.nodeObj.dangerouslySetInnerHTML : e.text ? s = e.text.textContent : s = e.childNodes[0].textContent;
|
|
2412
2429
|
const i = document.createElementNS(T, "foreignObject");
|
|
2413
|
-
|
|
2430
|
+
N(i, {
|
|
2414
2431
|
x: n + parseInt(t.paddingLeft) + "",
|
|
2415
2432
|
y: o + parseInt(t.paddingTop) + "",
|
|
2416
2433
|
width: t.width,
|
|
2417
2434
|
height: t.height
|
|
2418
2435
|
});
|
|
2419
2436
|
const l = document.createElement("div");
|
|
2420
|
-
return
|
|
2437
|
+
return N(l, {
|
|
2421
2438
|
xmlns: "http://www.w3.org/1999/xhtml",
|
|
2422
2439
|
style: `font-family: ${t.fontFamily}; font-size: ${t.fontSize}; font-weight: ${t.fontWeight}; color: ${t.color}; white-space: pre-wrap;`
|
|
2423
2440
|
}), l.innerHTML = s, i.appendChild(l), i;
|
|
2424
2441
|
}
|
|
2425
2442
|
function _o(e, t) {
|
|
2426
2443
|
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = document.createElementNS(T, "rect");
|
|
2427
|
-
return
|
|
2444
|
+
return N(i, {
|
|
2428
2445
|
x: o + "",
|
|
2429
2446
|
y: s + "",
|
|
2430
2447
|
rx: n.borderRadius,
|
|
@@ -2438,7 +2455,7 @@ function _o(e, t) {
|
|
|
2438
2455
|
}
|
|
2439
2456
|
function ne(e, t, n = !1) {
|
|
2440
2457
|
const o = getComputedStyle(t), { offsetLeft: s, offsetTop: i } = $(e.nodes, t), l = document.createElementNS(T, "rect");
|
|
2441
|
-
|
|
2458
|
+
N(l, {
|
|
2442
2459
|
x: s + "",
|
|
2443
2460
|
y: i + "",
|
|
2444
2461
|
rx: o.borderRadius,
|
|
@@ -2452,11 +2469,11 @@ function ne(e, t, n = !1) {
|
|
|
2452
2469
|
const r = document.createElementNS(T, "g");
|
|
2453
2470
|
r.appendChild(l);
|
|
2454
2471
|
let c;
|
|
2455
|
-
return n ? c =
|
|
2472
|
+
return n ? c = No(t, o, s, i) : c = ko(t, o, s, i), r.appendChild(c), r;
|
|
2456
2473
|
}
|
|
2457
2474
|
function To(e, t) {
|
|
2458
2475
|
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = document.createElementNS(T, "a"), l = document.createElementNS(T, "text");
|
|
2459
|
-
return
|
|
2476
|
+
return N(l, {
|
|
2460
2477
|
x: o + "",
|
|
2461
2478
|
y: s + parseInt(n.fontSize) + "",
|
|
2462
2479
|
"text-anchor": "start",
|
|
@@ -2468,7 +2485,7 @@ function To(e, t) {
|
|
|
2468
2485
|
}
|
|
2469
2486
|
function Lo(e, t) {
|
|
2470
2487
|
const n = getComputedStyle(t), { offsetLeft: o, offsetTop: s } = $(e.nodes, t), i = document.createElementNS(T, "image");
|
|
2471
|
-
return
|
|
2488
|
+
return N(i, {
|
|
2472
2489
|
x: o + "",
|
|
2473
2490
|
y: s + "",
|
|
2474
2491
|
width: n.width + "",
|
|
@@ -2477,8 +2494,8 @@ function Lo(e, t) {
|
|
|
2477
2494
|
}), i;
|
|
2478
2495
|
}
|
|
2479
2496
|
const oe = 100, Ao = '<?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">', Mo = (e, t = !1) => {
|
|
2480
|
-
const n = e.nodes, o = n.offsetHeight + oe * 2, s = n.offsetWidth + oe * 2, i =
|
|
2481
|
-
|
|
2497
|
+
const n = e.nodes, o = n.offsetHeight + oe * 2, s = n.offsetWidth + oe * 2, i = Eo(o + "px", s + "px"), l = document.createElementNS(T, "svg"), r = document.createElementNS(T, "rect");
|
|
2498
|
+
N(r, {
|
|
2482
2499
|
x: "0",
|
|
2483
2500
|
y: "0",
|
|
2484
2501
|
width: `${s}`,
|
|
@@ -2503,7 +2520,7 @@ const oe = 100, Ao = '<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC
|
|
|
2503
2520
|
l.appendChild(To(e, u));
|
|
2504
2521
|
}), n.querySelectorAll("img").forEach((u) => {
|
|
2505
2522
|
l.appendChild(Lo(e, u));
|
|
2506
|
-
}),
|
|
2523
|
+
}), N(l, {
|
|
2507
2524
|
x: oe + "",
|
|
2508
2525
|
y: oe + "",
|
|
2509
2526
|
overflow: "visible"
|
|
@@ -2554,15 +2571,15 @@ const Bo = {
|
|
|
2554
2571
|
linkDiv: At,
|
|
2555
2572
|
editTopic: Tt,
|
|
2556
2573
|
createWrapper: St,
|
|
2557
|
-
createParent:
|
|
2558
|
-
createChildren:
|
|
2574
|
+
createParent: kt,
|
|
2575
|
+
createChildren: Nt,
|
|
2559
2576
|
createTopic: _t,
|
|
2560
|
-
findEle:
|
|
2577
|
+
findEle: Xe,
|
|
2561
2578
|
changeTheme: nn,
|
|
2562
2579
|
...Vn,
|
|
2563
2580
|
...ht,
|
|
2564
2581
|
...ao,
|
|
2565
|
-
...
|
|
2582
|
+
...Co,
|
|
2566
2583
|
...jo,
|
|
2567
2584
|
init(e) {
|
|
2568
2585
|
if (e = JSON.parse(JSON.stringify(e)), !e || !e.nodeData) return new Error("MindElixir: `data` is required");
|
|
@@ -2589,7 +2606,7 @@ function Io({ pT: e, pL: t, pW: n, pH: o, cT: s, cL: i, cW: l, cH: r, direction:
|
|
|
2589
2606
|
const f = Math.abs(u - v) / 300 * h;
|
|
2590
2607
|
return c === D.LHS ? (d = t, m = d + h, p = d - h, g = i + h, `M ${m} ${u} C ${d} ${u} ${d + f} ${v} ${p} ${v} H ${g}`) : (d = t + n, m = d - h, p = d + h, g = i + l - h, `M ${m} ${u} C ${d} ${u} ${d - f} ${v} ${p} ${v} H ${g}`);
|
|
2591
2608
|
}
|
|
2592
|
-
const Fo = "5.3.
|
|
2609
|
+
const Fo = "5.3.7";
|
|
2593
2610
|
function Wo(e) {
|
|
2594
2611
|
return {
|
|
2595
2612
|
x: 0,
|
|
@@ -2605,7 +2622,7 @@ function Wo(e) {
|
|
|
2605
2622
|
}
|
|
2606
2623
|
};
|
|
2607
2624
|
}
|
|
2608
|
-
const
|
|
2625
|
+
const z = document;
|
|
2609
2626
|
function P({
|
|
2610
2627
|
el: e,
|
|
2611
2628
|
direction: t,
|
|
@@ -2628,18 +2645,18 @@ function P({
|
|
|
2628
2645
|
scaleSensitivity: y,
|
|
2629
2646
|
scaleMax: w,
|
|
2630
2647
|
scaleMin: S,
|
|
2631
|
-
handleWheel:
|
|
2648
|
+
handleWheel: C,
|
|
2632
2649
|
markdown: x,
|
|
2633
2650
|
imageProxy: b
|
|
2634
2651
|
}) {
|
|
2635
|
-
let
|
|
2636
|
-
const
|
|
2637
|
-
if (
|
|
2638
|
-
|
|
2652
|
+
let E = null;
|
|
2653
|
+
const k = Object.prototype.toString.call(e);
|
|
2654
|
+
if (k === "[object HTMLDivElement]" ? E = e : k === "[object String]" && (E = document.querySelector(e)), !E) throw new Error("MindElixir: el is not a valid element");
|
|
2655
|
+
E.style.position = "relative", E.innerHTML = "", this.el = E, this.disposable = [], this.before = h || {}, this.locale = n || "en", this.newTopicName = u || "New Node", this.contextMenu = i ?? !0, this.toolBar = l ?? !0, this.keypress = r ?? !0, this.mouseSelectionButton = c ?? 0, this.direction = t ?? 1, this.draggable = o ?? !0, this.editable = s ?? !0, this.allowUndo = g ?? !0, this.scaleSensitivity = y ?? 0.1, this.scaleMax = w ?? 1.4, this.scaleMin = S ?? 0.2, this.generateMainBranch = v || Ro, this.generateSubBranch = m || Io, this.overflowHidden = p ?? !1, this.alignment = f ?? "root", this.handleWheel = C ?? !0, this.markdown = x || void 0, this.imageProxy = b || void 0, this.currentNodes = [], this.currentArrow = null, this.scaleVal = 1, this.tempDirection = null, this.dragMoveHelper = Wo(this), this.bus = wt(), this.container = z.createElement("div"), this.selectionContainer = a || this.container, this.container.className = "map-container";
|
|
2639
2656
|
const L = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2640
2657
|
this.theme = d || (L.matches ? we : be);
|
|
2641
|
-
const O =
|
|
2642
|
-
O.className = "map-canvas", this.map = O, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes =
|
|
2658
|
+
const O = z.createElement("div");
|
|
2659
|
+
O.className = "map-canvas", this.map = O, this.container.setAttribute("tabindex", "0"), this.container.appendChild(this.map), this.el.appendChild(this.container), this.nodes = z.createElement("me-nodes"), this.lines = X("lines"), this.summarySvg = X("summary"), this.linkController = X("linkcontroller"), this.P2 = z.createElement("div"), this.P3 = z.createElement("div"), this.P2.className = this.P3.className = "circle", this.P2.style.display = this.P3.style.display = "none", this.line1 = $e(), this.line2 = $e(), this.linkController.appendChild(this.line1), this.linkController.appendChild(this.line2), this.linkSvgGroup = X("topiclinks"), this.labelContainer = z.createElement("div"), this.labelContainer.className = "label-container", this.map.appendChild(this.nodes), this.overflowHidden ? this.container.style.overflow = "hidden" : this.disposable.push(bt(this));
|
|
2643
2660
|
}
|
|
2644
2661
|
P.prototype = Bo;
|
|
2645
2662
|
Object.defineProperty(P.prototype, "currentNode", {
|
|
@@ -2654,7 +2671,7 @@ P.SIDE = 2;
|
|
|
2654
2671
|
P.THEME = be;
|
|
2655
2672
|
P.DARK_THEME = we;
|
|
2656
2673
|
P.version = Fo;
|
|
2657
|
-
P.E =
|
|
2674
|
+
P.E = Xe;
|
|
2658
2675
|
P.new = (e) => ({
|
|
2659
2676
|
nodeData: {
|
|
2660
2677
|
id: W(),
|