@kong-ui-public/documentation 0.7.20 → 0.7.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/{Tableau10-GLA_9iAD-BMurskAd.js → Tableau10-D7jGxypv-D3w6FIcJ.js} +1 -2
  2. package/dist/arc-CJ96KFKf-ZAEyyrBI.js +84 -0
  3. package/dist/{blockDiagram-6b2b5046-ZGxr7RGf-D4pbh8vR.js → blockDiagram-9f4a6865-DOUkHJlG-BPuF5-tK.js} +107 -108
  4. package/dist/{c4Diagram-b947cdbb-Bo6xALld-D8DXBmHw.js → c4Diagram-ae766693-qW59_Cjl-BSBtINzy.js} +133 -132
  5. package/dist/{channel-BX3TjCqa-Cdtt6hB1.js → channel-BkEGjNbZ-CzBFLYvk.js} +1 -1
  6. package/dist/{classDiagram-35230388-C60SAKfJ-FQHXcc4J.js → classDiagram-fb54d2a0-DaEnSnV7-BgUSoTGU.js} +8 -7
  7. package/dist/{classDiagram-v2-412acd34-CHK1KDqU-CiKmarbv.js → classDiagram-v2-a2b738ad-DVF-sdZH-lL0m0fQD.js} +8 -8
  8. package/dist/{clone-BSWoNj0I-CW2QP79u.js → clone-Bz5840kP-D3Uvm_gp.js} +1 -1
  9. package/dist/{createText-423428c9-DeHbckoy-r2CCACGx.js → createText-ca0c5216-DGjoI7Oz-8Az9WSXK.js} +14 -20
  10. package/dist/documentation.es.js +3 -3
  11. package/dist/documentation.umd.js +993 -723
  12. package/dist/{edges-d417c7a0-D7e9Y4V--DVOSTCB5.js → edges-066a5561-ByMuMaff-ipHdGCa_.js} +28 -27
  13. package/dist/{erDiagram-0ea73325-E3jchkiK-CfTqZxm6.js → erDiagram-09d1c15f-Ctl-zT4O-B9E7LRcs.js} +71 -72
  14. package/dist/{flowDb-d35e309a-Dch1VW7i-Bk557s4E.js → flowDb-c1833063-nJUM9bYy-B5f_hjwI.js} +4 -4
  15. package/dist/{flowDiagram-d949d7c1-CxjmKfBF-CuFUEya4.js → flowDiagram-b222e15a-BlrP8xne-DJ_sATm6.js} +339 -333
  16. package/dist/{flowDiagram-v2-49332944-Duf6j7PN-DgsEJ4Bo.js → flowDiagram-v2-13329dc7-DlqVPxH6-CgXruRZr.js} +5 -5
  17. package/dist/{flowchart-elk-definition-27cc417a-M-lK4i48-Bs8Ix10e.js → flowchart-elk-definition-ae0efee6-B2FZpaI4-C8o8y5J1.js} +343 -590
  18. package/dist/{ganttDiagram-5c869e3b-CgjZsm2H-Bon0v47P.js → ganttDiagram-b62c793e-BUkrtLIU-roFbcEhP.js} +513 -534
  19. package/dist/gitGraphDiagram-942e62fe-BIndO562-dNVJJzzm.js +1264 -0
  20. package/dist/{graph-Ch18bQn5-BLEKw6WT.js → graph-BN58fiEq-CyCz6HB3.js} +3 -4
  21. package/dist/{index-8fae9850-kUIz8xNo-CDn9_qZB.js → index-01f381cb-DHHDXut0-C1FToHnX.js} +11 -11
  22. package/dist/{index-CVS7cBlb.js → index-Dz46e5bv.js} +2354 -2515
  23. package/dist/{infoDiagram-db7b18fc-BpBtHVy2-DuX4gmA7.js → infoDiagram-94cd232f-CSzv-wTE-Bnonj1Cb.js} +7 -7
  24. package/dist/{journeyDiagram-d5636530-CZUFMDTA-D5VAFQAG.js → journeyDiagram-6625b456-Ca9U8tWI-DoKEPckV.js} +16 -16
  25. package/dist/katex-BXNjbZo7-CF_fuFJb.js +11637 -0
  26. package/dist/{layout-BzV691RN-Br8Ir03a.js → layout-DU4VNk5y-DEbr0_Pk.js} +112 -114
  27. package/dist/{line-JCh8JM-V-T9MVIZIE.js → line-CwSAou3c-dgS2jcU_.js} +3 -4
  28. package/dist/{linear-cwTFOJBq-B6q6qtlZ.js → linear-CngEzq0a-B6fRdJQY.js} +70 -94
  29. package/dist/{mindmap-definition-377f8f1f-BzIPdpBG-DD8FIpST.js → mindmap-definition-307c710a-CvpxqRPj-AB15RcM6.js} +343 -378
  30. package/dist/{ordinal-MUacOSdK-B1MUT0BL.js → ordinal-DfAQgscy-BEJTu10r.js} +3 -7
  31. package/dist/{path-Crsf9Nsj-SiSjwXsf.js → path-DLwuMfdd-EbErTa4c.js} +12 -19
  32. package/dist/{pieDiagram-b0208e96-BQfpnZHG-E8AMqTd3.js → pieDiagram-bb1d19e5-LP-9WGAS-DwilsWxb.js} +61 -61
  33. package/dist/{quadrantDiagram-0332be45-CNL4JCrn-BYyiYlYH.js → quadrantDiagram-c759a472-B_TsLXO0-BviiuQRe.js} +2 -2
  34. package/dist/{requirementDiagram-bf7890df-NBqqCuPF-CIHJhGNa.js → requirementDiagram-87253d64-o6jrBKBt-BDXpXGpQ.js} +30 -30
  35. package/dist/{sankeyDiagram-0acdec17-YE0ROy8d-CU1TmQZx.js → sankeyDiagram-707fac0f-BoEHDAJv-BBNylsjT.js} +44 -58
  36. package/dist/{sequenceDiagram-c18d009d-Yucxrjw7-D_cnXQcd.js → sequenceDiagram-6894f283-Dsj52Wsi-TDdIX1Wn.js} +845 -812
  37. package/dist/{stateDiagram-43596fc0-D9IY4Ssi-KJp_o1Vc.js → stateDiagram-5dee940d-COfohDXu-Dra8cHnR.js} +54 -54
  38. package/dist/{stateDiagram-v2-2ead4f9c-5IZQWbnV-Chm6qgaK.js → stateDiagram-v2-1992cada-v9z1blk7-b2WlcHGI.js} +12 -12
  39. package/dist/{styles-b2c874b6-pUAi9-OK-C7HwN-ih.js → styles-0784dbeb-DHDYpA72-BTX0XQJ5.js} +24 -24
  40. package/dist/{styles-7383a064-DLbSva3T-DWY6NPMf.js → styles-483fbfea-DUrqZeOP-BPfiLFkT.js} +140 -137
  41. package/dist/{styles-6860f46c-DHqkrPDU-JiuD19BB.js → styles-b83b31c9-R9NNyYA0-DnoGi25s.js} +29 -29
  42. package/dist/{svgDrawCommon-0ee1b4e9-rbw7BPwi-Boin581S.js → svgDrawCommon-5e1cfd1d-DeHC_PTd-44CTrnyq.js} +5 -5
  43. package/dist/{timeline-definition-d977decf-CtlVf6FF-BqqlH53Y.js → timeline-definition-bf702344-BzpRV6Z8-DHqazJ7N.js} +2 -2
  44. package/dist/{xychartDiagram-e50adddc-B9qgoJob-CqAKcFLo.js → xychartDiagram-f11f50a6-BMDfQSWf-CixUys_w.js} +40 -40
  45. package/package.json +6 -6
  46. package/dist/arc-TomPQHIy-B0wkvDWU.js +0 -86
  47. package/dist/gitGraphDiagram-b9d81de9-DhOfBQfl-BvCcUYjg.js +0 -1262
@@ -1,51 +1,50 @@
1
- import { X as mt, j as O } from "./flowDb-d35e309a-Dch1VW7i-Bk557s4E.js";
2
- import { Y as kt, E as k, v as K } from "./graph-Ch18bQn5-BLEKw6WT.js";
3
- import { h as w, o as q, p as J, c as H, j as tt, l as U, q as W, r as R, t as St } from "./index-CVS7cBlb.js";
4
- import { e as _t, N as Lt, V as It, O as At, k as C } from "./layout-BzV691RN-Br8Ir03a.js";
5
- import { u as Tt, w as Et, O as et, Q as Mt, Z as T, d as rt, f as L, p as at, b as nt } from "./styles-7383a064-DLbSva3T-DWY6NPMf.js";
6
- import { P as Nt } from "./line-JCh8JM-V-T9MVIZIE.js";
7
- function Bt(r) {
8
- if (!r.ok)
9
- throw new Error(r.status + " " + r.statusText);
1
+ import { X as kt, j as P } from "./flowDb-c1833063-nJUM9bYy-B5f_hjwI.js";
2
+ import { Y as St, E as S, v as K } from "./graph-BN58fiEq-CyCz6HB3.js";
3
+ import { h as v, o as O, p as J, c as R, r as tt, j as et, l as U, q, t as W, u as _t } from "./index-Dz46e5bv.js";
4
+ import { e as Lt, N as At, V as It, O as Tt, k as C } from "./layout-DU4VNk5y-DEbr0_Pk.js";
5
+ import { w as Mt, h as Nt, t as rt, Z as Bt, e as T, p as at, u as A, b as nt, f as it } from "./styles-483fbfea-DUrqZeOP-BPfiLFkT.js";
6
+ import { P as $t } from "./line-CwSAou3c-dgS2jcU_.js";
7
+ function Et(r) {
8
+ if (!r.ok) throw new Error(r.status + " " + r.statusText);
10
9
  return r.text();
11
10
  }
12
- function $t(r, e) {
13
- return fetch(r, e).then(Bt);
11
+ function Ct(r, e) {
12
+ return fetch(r, e).then(Et);
14
13
  }
15
- function Ct(r) {
16
- return (e, t) => $t(e, t).then((a) => new DOMParser().parseFromString(a, r));
14
+ function Dt(r) {
15
+ return (e, t) => Ct(e, t).then((a) => new DOMParser().parseFromString(a, r));
17
16
  }
18
- var Dt = Ct("image/svg+xml"), P = {
19
- normal: Rt,
20
- vee: Ot,
21
- undirected: Wt
17
+ var Ut = Dt("image/svg+xml"), z = {
18
+ normal: Wt,
19
+ vee: Pt,
20
+ undirected: qt
22
21
  };
23
- function Ut(r) {
24
- P = r;
22
+ function Rt(r) {
23
+ z = r;
25
24
  }
26
- function Rt(r, e, t, a) {
25
+ function Wt(r, e, t, a) {
27
26
  var n = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), i = n.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").style("stroke-width", 1).style("stroke-dasharray", "1,0");
28
27
  T(i, t[a + "Style"]), t[a + "Class"] && i.attr("class", t[a + "Class"]);
29
28
  }
30
- function Ot(r, e, t, a) {
29
+ function Pt(r, e, t, a) {
31
30
  var n = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), i = n.append("path").attr("d", "M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width", 1).style("stroke-dasharray", "1,0");
32
31
  T(i, t[a + "Style"]), t[a + "Class"] && i.attr("class", t[a + "Class"]);
33
32
  }
34
- function Wt(r, e, t, a) {
33
+ function qt(r, e, t, a) {
35
34
  var n = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), i = n.append("path").attr("d", "M 0 5 L 10 5").style("stroke-width", 1).style("stroke-dasharray", "1,0");
36
35
  T(i, t[a + "Style"]), t[a + "Class"] && i.attr("class", t[a + "Class"]);
37
36
  }
38
- function qt(r, e) {
37
+ function Ot(r, e) {
39
38
  var t = r;
40
39
  return t.node().appendChild(e.label), T(t, e.labelStyle), t;
41
40
  }
42
- function Pt(r, e) {
43
- for (var t = r.append("text"), a = Yt(e.label).split(`
41
+ function zt(r, e) {
42
+ for (var t = r.append("text"), a = Vt(e.label).split(`
44
43
  `), n = 0; n < a.length; n++)
45
44
  t.append("tspan").attr("xml:space", "preserve").attr("dy", "1em").attr("x", "1").text(a[n]);
46
45
  return T(t, e.labelStyle), t;
47
46
  }
48
- function Yt(r) {
47
+ function Vt(r) {
49
48
  for (var e = "", t = !1, a, n = 0; n < r.length; ++n)
50
49
  if (a = r[n], t) {
51
50
  switch (a) {
@@ -57,13 +56,12 @@ function Yt(r) {
57
56
  e += a;
58
57
  }
59
58
  t = !1;
60
- } else
61
- a === "\\" ? t = !0 : e += a;
59
+ } else a === "\\" ? t = !0 : e += a;
62
60
  return e;
63
61
  }
64
62
  function G(r, e, t) {
65
63
  var a = e.label, n = r.append("g");
66
- e.labelType === "svg" ? qt(n, e) : typeof a != "string" || e.labelType === "html" ? et(n, e) : Pt(n, e);
64
+ e.labelType === "svg" ? Ot(n, e) : typeof a != "string" || e.labelType === "html" ? rt(n, e) : zt(n, e);
67
65
  var i = n.node().getBBox(), s;
68
66
  switch (t) {
69
67
  case "top":
@@ -77,152 +75,152 @@ function G(r, e, t) {
77
75
  }
78
76
  return n.attr("transform", "translate(" + -i.width / 2 + "," + s + ")"), n;
79
77
  }
80
- var Y = function(r, e) {
78
+ var V = function(r, e) {
81
79
  var t = e.nodes().filter(function(i) {
82
- return rt(e, i);
80
+ return at(e, i);
83
81
  }), a = r.selectAll("g.cluster").data(t, function(i) {
84
82
  return i;
85
83
  });
86
- L(a.exit(), e).style("opacity", 0).remove();
84
+ A(a.exit(), e).style("opacity", 0).remove();
87
85
  var n = a.enter().append("g").attr("class", "cluster").attr("id", function(i) {
88
86
  var s = e.node(i);
89
87
  return s.id;
90
88
  }).style("opacity", 0).each(function(i) {
91
- var s = e.node(i), o = w(this);
92
- w(this).append("rect");
93
- var l = o.append("g").attr("class", "label");
94
- G(l, s, s.clusterLabelPos);
89
+ var s = e.node(i), o = v(this);
90
+ v(this).append("rect");
91
+ var d = o.append("g").attr("class", "label");
92
+ G(d, s, s.clusterLabelPos);
95
93
  });
96
- return a = a.merge(n), a = L(a, e).style("opacity", 1), a.selectAll("rect").each(function(i) {
97
- var s = e.node(i), o = w(this);
94
+ return a = a.merge(n), a = A(a, e).style("opacity", 1), a.selectAll("rect").each(function(i) {
95
+ var s = e.node(i), o = v(this);
98
96
  T(o, s.style);
99
97
  }), a;
100
98
  };
101
- function zt(r) {
102
- Y = r;
99
+ function Xt(r) {
100
+ V = r;
103
101
  }
104
- let z = function(r, e) {
102
+ let X = function(r, e) {
105
103
  var t = r.selectAll("g.edgeLabel").data(e.edges(), function(n) {
106
- return at(n);
104
+ return nt(n);
107
105
  }).classed("update", !0);
108
106
  t.exit().remove(), t.enter().append("g").classed("edgeLabel", !0).style("opacity", 0), t = r.selectAll("g.edgeLabel"), t.each(function(n) {
109
- var i = w(this);
107
+ var i = v(this);
110
108
  i.select(".label").remove();
111
- var s = e.edge(n), o = G(i, e.edge(n), 0).classed("label", !0), l = o.node().getBBox();
112
- s.labelId && o.attr("id", s.labelId), k(s, "width") || (s.width = l.width), k(s, "height") || (s.height = l.height);
109
+ var s = e.edge(n), o = G(i, e.edge(n), 0).classed("label", !0), d = o.node().getBBox();
110
+ s.labelId && o.attr("id", s.labelId), S(s, "width") || (s.width = d.width), S(s, "height") || (s.height = d.height);
113
111
  });
114
112
  var a;
115
- return t.exit ? a = t.exit() : a = t.selectAll(null), L(a, e).style("opacity", 0).remove(), t;
113
+ return t.exit ? a = t.exit() : a = t.selectAll(null), A(a, e).style("opacity", 0).remove(), t;
116
114
  };
117
- function Vt(r) {
118
- z = r;
115
+ function Yt(r) {
116
+ X = r;
119
117
  }
120
118
  function Q(r, e) {
121
119
  return r.intersect(e);
122
120
  }
123
- var V = function(r, e, t) {
121
+ var Y = function(r, e, t) {
124
122
  var a = r.selectAll("g.edgePath").data(e.edges(), function(s) {
125
- return at(s);
126
- }).classed("update", !0), n = Ft(a, e);
127
- Qt(a, e);
123
+ return nt(s);
124
+ }).classed("update", !0), n = Qt(a, e);
125
+ Zt(a, e);
128
126
  var i = a.merge !== void 0 ? a.merge(n) : a;
129
- return L(i, e).style("opacity", 1), i.each(function(s) {
130
- var o = w(this), l = e.edge(s);
131
- l.elem = this, l.id && o.attr("id", l.id), nt(
127
+ return A(i, e).style("opacity", 1), i.each(function(s) {
128
+ var o = v(this), d = e.edge(s);
129
+ d.elem = this, d.id && o.attr("id", d.id), it(
132
130
  o,
133
- l.class,
131
+ d.class,
134
132
  (o.classed("update") ? "update " : "") + "edgePath"
135
133
  );
136
134
  }), i.selectAll("path.path").each(function(s) {
137
135
  var o = e.edge(s);
138
- o.arrowheadId = _t("arrowhead");
139
- var l = w(this).attr("marker-end", function() {
140
- return "url(" + jt(location.href, o.arrowheadId) + ")";
136
+ o.arrowheadId = Lt("arrowhead");
137
+ var d = v(this).attr("marker-end", function() {
138
+ return "url(" + Ht(location.href, o.arrowheadId) + ")";
141
139
  }).style("fill", "none");
142
- L(l, e).attr("d", function(c) {
143
- return Ht(e, c);
144
- }), T(l, o.style);
140
+ A(d, e).attr("d", function(u) {
141
+ return Gt(e, u);
142
+ }), T(d, o.style);
145
143
  }), i.selectAll("defs *").remove(), i.selectAll("defs").each(function(s) {
146
- var o = e.edge(s), l = t[o.arrowhead];
147
- l(w(this), o.arrowheadId, o, "arrowhead");
144
+ var o = e.edge(s), d = t[o.arrowhead];
145
+ d(v(this), o.arrowheadId, o, "arrowhead");
148
146
  }), i;
149
147
  };
150
- function Xt(r) {
151
- V = r;
148
+ function jt(r) {
149
+ Y = r;
152
150
  }
153
- function jt(r, e) {
151
+ function Ht(r, e) {
154
152
  var t = r.split("#")[0];
155
153
  return t + "#" + e;
156
154
  }
157
- function Ht(r, e) {
155
+ function Gt(r, e) {
158
156
  var t = r.edge(e), a = r.node(e.v), n = r.node(e.w), i = t.points.slice(1, t.points.length - 1);
159
- return i.unshift(Q(a, i[0])), i.push(Q(n, i[i.length - 1])), it(t, i);
157
+ return i.unshift(Q(a, i[0])), i.push(Q(n, i[i.length - 1])), st(t, i);
160
158
  }
161
- function it(r, e) {
162
- var t = (Nt || Dt.line)().x(function(a) {
159
+ function st(r, e) {
160
+ var t = ($t || Ut.line)().x(function(a) {
163
161
  return a.x;
164
162
  }).y(function(a) {
165
163
  return a.y;
166
164
  });
167
165
  return (t.curve || t.interpolate)(r.curve), t(e);
168
166
  }
169
- function Gt(r) {
167
+ function Ft(r) {
170
168
  var e = r.getBBox(), t = r.ownerSVGElement.getScreenCTM().inverse().multiply(r.getScreenCTM()).translate(e.width / 2, e.height / 2);
171
169
  return { x: t.e, y: t.f };
172
170
  }
173
- function Ft(r, e) {
171
+ function Qt(r, e) {
174
172
  var t = r.enter().append("g").attr("class", "edgePath").style("opacity", 0);
175
173
  return t.append("path").attr("class", "path").attr("d", function(a) {
176
- var n = e.edge(a), i = e.node(a.v).elem, s = Lt(n.points.length).map(function() {
177
- return Gt(i);
174
+ var n = e.edge(a), i = e.node(a.v).elem, s = At(n.points.length).map(function() {
175
+ return Ft(i);
178
176
  });
179
- return it(n, s);
177
+ return st(n, s);
180
178
  }), t.append("defs"), t;
181
179
  }
182
- function Qt(r, e) {
180
+ function Zt(r, e) {
183
181
  var t = r.exit();
184
- L(t, e).style("opacity", 0).remove();
182
+ A(t, e).style("opacity", 0).remove();
185
183
  }
186
- var X = function(r, e, t) {
184
+ var j = function(r, e, t) {
187
185
  var a = e.nodes().filter(function(s) {
188
- return !rt(e, s);
186
+ return !at(e, s);
189
187
  }), n = r.selectAll("g.node").data(a, function(s) {
190
188
  return s;
191
189
  }).classed("update", !0);
192
190
  n.exit().remove(), n.enter().append("g").attr("class", "node").style("opacity", 0), n = r.selectAll("g.node"), n.each(function(s) {
193
- var o = e.node(s), l = w(this);
194
- nt(
195
- l,
191
+ var o = e.node(s), d = v(this);
192
+ it(
193
+ d,
196
194
  o.class,
197
- (l.classed("update") ? "update " : "") + "node"
198
- ), l.select("g.label").remove();
199
- var c = l.append("g").attr("class", "label"), d = G(c, o), g = t[o.shape], f = It(d.node().getBBox(), "width", "height");
200
- o.elem = this, o.id && l.attr("id", o.id), o.labelId && c.attr("id", o.labelId), k(o, "width") && (f.width = o.width), k(o, "height") && (f.height = o.height), f.width += o.paddingLeft + o.paddingRight, f.height += o.paddingTop + o.paddingBottom, c.attr(
195
+ (d.classed("update") ? "update " : "") + "node"
196
+ ), d.select("g.label").remove();
197
+ var u = d.append("g").attr("class", "label"), l = G(u, o), g = t[o.shape], c = It(l.node().getBBox(), "width", "height");
198
+ o.elem = this, o.id && d.attr("id", o.id), o.labelId && u.attr("id", o.labelId), S(o, "width") && (c.width = o.width), S(o, "height") && (c.height = o.height), c.width += o.paddingLeft + o.paddingRight, c.height += o.paddingTop + o.paddingBottom, u.attr(
201
199
  "transform",
202
200
  "translate(" + (o.paddingLeft - o.paddingRight) / 2 + "," + (o.paddingTop - o.paddingBottom) / 2 + ")"
203
201
  );
204
- var h = w(this);
202
+ var h = v(this);
205
203
  h.select(".label-container").remove();
206
- var p = g(h, f, o).classed("label-container", !0);
204
+ var p = g(h, c, o).classed("label-container", !0);
207
205
  T(p, o.style);
208
- var u = p.node().getBBox();
209
- o.width = u.width, o.height = u.height;
206
+ var w = p.node().getBBox();
207
+ o.width = w.width, o.height = w.height;
210
208
  });
211
209
  var i;
212
- return n.exit ? i = n.exit() : i = n.selectAll(null), L(i, e).style("opacity", 0).remove(), n;
210
+ return n.exit ? i = n.exit() : i = n.selectAll(null), A(i, e).style("opacity", 0).remove(), n;
213
211
  };
214
- function Zt(r) {
215
- X = r;
212
+ function Kt(r) {
213
+ j = r;
216
214
  }
217
- function Kt(r, e) {
215
+ function Jt(r, e) {
218
216
  var t = r.filter(function() {
219
- return !w(this).classed("update");
217
+ return !v(this).classed("update");
220
218
  });
221
219
  function a(n) {
222
220
  var i = e.node(n);
223
221
  return "translate(" + i.x + "," + i.y + ")";
224
222
  }
225
- t.attr("transform", a), L(r, e).style("opacity", 1).attr("transform", a), L(t.selectAll("rect"), e).attr("width", function(n) {
223
+ t.attr("transform", a), A(r, e).style("opacity", 1).attr("transform", a), A(t.selectAll("rect"), e).attr("width", function(n) {
226
224
  return e.node(n).width;
227
225
  }).attr("height", function(n) {
228
226
  return e.node(n).height;
@@ -234,94 +232,94 @@ function Kt(r, e) {
234
232
  return -i.height / 2;
235
233
  });
236
234
  }
237
- function Jt(r, e) {
235
+ function te(r, e) {
238
236
  var t = r.filter(function() {
239
- return !w(this).classed("update");
237
+ return !v(this).classed("update");
240
238
  });
241
239
  function a(n) {
242
240
  var i = e.edge(n);
243
- return k(i, "x") ? "translate(" + i.x + "," + i.y + ")" : "";
241
+ return S(i, "x") ? "translate(" + i.x + "," + i.y + ")" : "";
244
242
  }
245
- t.attr("transform", a), L(r, e).style("opacity", 1).attr("transform", a);
243
+ t.attr("transform", a), A(r, e).style("opacity", 1).attr("transform", a);
246
244
  }
247
- function te(r, e) {
245
+ function ee(r, e) {
248
246
  var t = r.filter(function() {
249
- return !w(this).classed("update");
247
+ return !v(this).classed("update");
250
248
  });
251
249
  function a(n) {
252
250
  var i = e.node(n);
253
251
  return "translate(" + i.x + "," + i.y + ")";
254
252
  }
255
- t.attr("transform", a), L(r, e).style("opacity", 1).attr("transform", a);
253
+ t.attr("transform", a), A(r, e).style("opacity", 1).attr("transform", a);
256
254
  }
257
- function st(r, e, t, a) {
258
- var n = r.x, i = r.y, s = n - a.x, o = i - a.y, l = Math.sqrt(e * e * o * o + t * t * s * s), c = Math.abs(e * t * s / l);
259
- a.x < n && (c = -c);
260
- var d = Math.abs(e * t * o / l);
261
- return a.y < i && (d = -d), { x: n + c, y: i + d };
255
+ function ot(r, e, t, a) {
256
+ var n = r.x, i = r.y, s = n - a.x, o = i - a.y, d = Math.sqrt(e * e * o * o + t * t * s * s), u = Math.abs(e * t * s / d);
257
+ a.x < n && (u = -u);
258
+ var l = Math.abs(e * t * o / d);
259
+ return a.y < i && (l = -l), { x: n + u, y: i + l };
262
260
  }
263
- function ee(r, e, t) {
264
- return st(r, e, e, t);
261
+ function re(r, e, t) {
262
+ return ot(r, e, e, t);
265
263
  }
266
- function re(r, e, t, a) {
267
- var n, i, s, o, l, c, d, g, f, h, p, u, x, v, S;
268
- if (n = e.y - r.y, s = r.x - e.x, l = e.x * r.y - r.x * e.y, f = n * t.x + s * t.y + l, h = n * a.x + s * a.y + l, !(f !== 0 && h !== 0 && Z(f, h)) && (i = a.y - t.y, o = t.x - a.x, c = a.x * t.y - t.x * a.y, d = i * r.x + o * r.y + c, g = i * e.x + o * e.y + c, !(d !== 0 && g !== 0 && Z(d, g)) && (p = n * o - i * s, p !== 0)))
269
- return u = Math.abs(p / 2), x = s * c - o * l, v = x < 0 ? (x - u) / p : (x + u) / p, x = i * l - n * c, S = x < 0 ? (x - u) / p : (x + u) / p, { x: v, y: S };
264
+ function ae(r, e, t, a) {
265
+ var n, i, s, o, d, u, l, g, c, h, p, w, f, x, k;
266
+ if (n = e.y - r.y, s = r.x - e.x, d = e.x * r.y - r.x * e.y, c = n * t.x + s * t.y + d, h = n * a.x + s * a.y + d, !(c !== 0 && h !== 0 && Z(c, h)) && (i = a.y - t.y, o = t.x - a.x, u = a.x * t.y - t.x * a.y, l = i * r.x + o * r.y + u, g = i * e.x + o * e.y + u, !(l !== 0 && g !== 0 && Z(l, g)) && (p = n * o - i * s, p !== 0)))
267
+ return w = Math.abs(p / 2), f = s * u - o * d, x = f < 0 ? (f - w) / p : (f + w) / p, f = i * d - n * u, k = f < 0 ? (f - w) / p : (f + w) / p, { x, y: k };
270
268
  }
271
269
  function Z(r, e) {
272
270
  return r * e > 0;
273
271
  }
274
- function A(r, e, t) {
272
+ function I(r, e, t) {
275
273
  var a = r.x, n = r.y, i = [], s = Number.POSITIVE_INFINITY, o = Number.POSITIVE_INFINITY;
276
274
  e.forEach(function(p) {
277
275
  s = Math.min(s, p.x), o = Math.min(o, p.y);
278
276
  });
279
- for (var l = a - r.width / 2 - s, c = n - r.height / 2 - o, d = 0; d < e.length; d++) {
280
- var g = e[d], f = e[d < e.length - 1 ? d + 1 : 0], h = re(
277
+ for (var d = a - r.width / 2 - s, u = n - r.height / 2 - o, l = 0; l < e.length; l++) {
278
+ var g = e[l], c = e[l < e.length - 1 ? l + 1 : 0], h = ae(
281
279
  r,
282
280
  t,
283
- { x: l + g.x, y: c + g.y },
284
- { x: l + f.x, y: c + f.y }
281
+ { x: d + g.x, y: u + g.y },
282
+ { x: d + c.x, y: u + c.y }
285
283
  );
286
284
  h && i.push(h);
287
285
  }
288
- return i.length ? (i.length > 1 && i.sort(function(p, u) {
289
- var x = p.x - t.x, v = p.y - t.y, S = Math.sqrt(x * x + v * v), I = u.x - t.x, B = u.y - t.y, y = Math.sqrt(I * I + B * B);
290
- return S < y ? -1 : S === y ? 0 : 1;
286
+ return i.length ? (i.length > 1 && i.sort(function(p, w) {
287
+ var f = p.x - t.x, x = p.y - t.y, k = Math.sqrt(f * f + x * x), N = w.x - t.x, _ = w.y - t.y, y = Math.sqrt(N * N + _ * _);
288
+ return k < y ? -1 : k === y ? 0 : 1;
291
289
  }), i[0]) : (console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", r), r);
292
290
  }
293
291
  function F(r, e) {
294
- var t = r.x, a = r.y, n = e.x - t, i = e.y - a, s = r.width / 2, o = r.height / 2, l, c;
295
- return Math.abs(i) * s > Math.abs(n) * o ? (i < 0 && (o = -o), l = i === 0 ? 0 : o * n / i, c = o) : (n < 0 && (s = -s), l = s, c = n === 0 ? 0 : s * i / n), { x: t + l, y: a + c };
296
- }
297
- var j = {
298
- rect: ne,
299
- ellipse: ie,
300
- circle: se,
301
- diamond: oe
292
+ var t = r.x, a = r.y, n = e.x - t, i = e.y - a, s = r.width / 2, o = r.height / 2, d, u;
293
+ return Math.abs(i) * s > Math.abs(n) * o ? (i < 0 && (o = -o), d = i === 0 ? 0 : o * n / i, u = o) : (n < 0 && (s = -s), d = s, u = n === 0 ? 0 : s * i / n), { x: t + d, y: a + u };
294
+ }
295
+ var H = {
296
+ rect: ie,
297
+ ellipse: se,
298
+ circle: oe,
299
+ diamond: le
302
300
  };
303
- function ae(r) {
304
- j = r;
301
+ function ne(r) {
302
+ H = r;
305
303
  }
306
- function ne(r, e, t) {
304
+ function ie(r, e, t) {
307
305
  var a = r.insert("rect", ":first-child").attr("rx", t.rx).attr("ry", t.ry).attr("x", -e.width / 2).attr("y", -e.height / 2).attr("width", e.width).attr("height", e.height);
308
306
  return t.intersect = function(n) {
309
307
  return F(t, n);
310
308
  }, a;
311
309
  }
312
- function ie(r, e, t) {
310
+ function se(r, e, t) {
313
311
  var a = e.width / 2, n = e.height / 2, i = r.insert("ellipse", ":first-child").attr("x", -e.width / 2).attr("y", -e.height / 2).attr("rx", a).attr("ry", n);
314
312
  return t.intersect = function(s) {
315
- return st(t, a, n, s);
313
+ return ot(t, a, n, s);
316
314
  }, i;
317
315
  }
318
- function se(r, e, t) {
316
+ function oe(r, e, t) {
319
317
  var a = Math.max(e.width, e.height) / 2, n = r.insert("circle", ":first-child").attr("x", -e.width / 2).attr("y", -e.height / 2).attr("r", a);
320
318
  return t.intersect = function(i) {
321
- return ee(t, a, i);
319
+ return re(t, a, i);
322
320
  }, n;
323
321
  }
324
- function oe(r, e, t) {
322
+ function le(r, e, t) {
325
323
  var a = e.width * Math.SQRT2 / 2, n = e.height * Math.SQRT2 / 2, i = [
326
324
  { x: 0, y: -n },
327
325
  { x: -a, y: 0 },
@@ -334,32 +332,32 @@ function oe(r, e, t) {
334
332
  }).join(" ")
335
333
  );
336
334
  return t.intersect = function(o) {
337
- return A(t, i, o);
335
+ return I(t, i, o);
338
336
  }, s;
339
337
  }
340
- function le() {
338
+ function de() {
341
339
  var r = function(e, t) {
342
- he(t);
343
- var a = D(e, "output"), n = D(a, "clusters"), i = D(a, "edgePaths"), s = z(D(a, "edgeLabels"), t), o = X(D(a, "nodes"), t, j);
344
- At(t), te(o, t), Jt(s, t), V(i, t, P);
345
- var l = Y(n, t);
346
- Kt(l, t), ue(t);
340
+ ue(t);
341
+ var a = D(e, "output"), n = D(a, "clusters"), i = D(a, "edgePaths"), s = X(D(a, "edgeLabels"), t), o = j(D(a, "nodes"), t, H);
342
+ Tt(t), ee(o, t), te(s, t), Y(i, t, z);
343
+ var d = V(n, t);
344
+ Jt(d, t), fe(t);
347
345
  };
348
346
  return r.createNodes = function(e) {
349
- return arguments.length ? (Zt(e), r) : X;
347
+ return arguments.length ? (Kt(e), r) : j;
350
348
  }, r.createClusters = function(e) {
351
- return arguments.length ? (zt(e), r) : Y;
349
+ return arguments.length ? (Xt(e), r) : V;
352
350
  }, r.createEdgeLabels = function(e) {
353
- return arguments.length ? (Vt(e), r) : z;
351
+ return arguments.length ? (Yt(e), r) : X;
354
352
  }, r.createEdgePaths = function(e) {
355
- return arguments.length ? (Xt(e), r) : V;
353
+ return arguments.length ? (jt(e), r) : Y;
356
354
  }, r.shapes = function(e) {
357
- return arguments.length ? (ae(e), r) : j;
355
+ return arguments.length ? (ne(e), r) : H;
358
356
  }, r.arrows = function(e) {
359
- return arguments.length ? (Ut(e), r) : P;
357
+ return arguments.length ? (Rt(e), r) : z;
360
358
  }, r;
361
359
  }
362
- var de = {
360
+ var ce = {
363
361
  paddingLeft: 10,
364
362
  paddingRight: 10,
365
363
  paddingTop: 10,
@@ -367,54 +365,54 @@ var de = {
367
365
  rx: 0,
368
366
  ry: 0,
369
367
  shape: "rect"
370
- }, ce = {
368
+ }, he = {
371
369
  arrowhead: "normal",
372
- curve: R
370
+ curve: W
373
371
  };
374
- function he(r) {
372
+ function ue(r) {
375
373
  r.nodes().forEach(function(e) {
376
374
  var t = r.node(e);
377
- !k(t, "label") && !r.children(e).length && (t.label = e), k(t, "paddingX") && C(t, {
375
+ !S(t, "label") && !r.children(e).length && (t.label = e), S(t, "paddingX") && C(t, {
378
376
  paddingLeft: t.paddingX,
379
377
  paddingRight: t.paddingX
380
- }), k(t, "paddingY") && C(t, {
378
+ }), S(t, "paddingY") && C(t, {
381
379
  paddingTop: t.paddingY,
382
380
  paddingBottom: t.paddingY
383
- }), k(t, "padding") && C(t, {
381
+ }), S(t, "padding") && C(t, {
384
382
  paddingLeft: t.padding,
385
383
  paddingRight: t.padding,
386
384
  paddingTop: t.padding,
387
385
  paddingBottom: t.padding
388
- }), C(t, de), K(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(a) {
386
+ }), C(t, ce), K(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(a) {
389
387
  t[a] = Number(t[a]);
390
- }), k(t, "width") && (t._prevWidth = t.width), k(t, "height") && (t._prevHeight = t.height);
388
+ }), S(t, "width") && (t._prevWidth = t.width), S(t, "height") && (t._prevHeight = t.height);
391
389
  }), r.edges().forEach(function(e) {
392
390
  var t = r.edge(e);
393
- k(t, "label") || (t.label = ""), C(t, ce);
391
+ S(t, "label") || (t.label = ""), C(t, he);
394
392
  });
395
393
  }
396
- function ue(r) {
394
+ function fe(r) {
397
395
  K(r.nodes(), function(e) {
398
396
  var t = r.node(e);
399
- k(t, "_prevWidth") ? t.width = t._prevWidth : delete t.width, k(t, "_prevHeight") ? t.height = t._prevHeight : delete t.height, delete t._prevWidth, delete t._prevHeight;
397
+ S(t, "_prevWidth") ? t.width = t._prevWidth : delete t.width, S(t, "_prevHeight") ? t.height = t._prevHeight : delete t.height, delete t._prevWidth, delete t._prevHeight;
400
398
  });
401
399
  }
402
400
  function D(r, e) {
403
401
  var t = r.select("g." + e);
404
402
  return t.empty() && (t = r.append("g").attr("class", e)), t;
405
403
  }
406
- function ot(r, e, t) {
404
+ function lt(r, e, t) {
407
405
  const a = e.width, n = e.height, i = (a + n) * 0.9, s = [
408
406
  { x: i / 2, y: 0 },
409
407
  { x: i, y: -i / 2 },
410
408
  { x: i / 2, y: -i },
411
409
  { x: 0, y: -i / 2 }
412
- ], o = E(r, i, i, s);
413
- return t.intersect = function(l) {
414
- return A(t, s, l);
410
+ ], o = M(r, i, i, s);
411
+ return t.intersect = function(d) {
412
+ return I(t, s, d);
415
413
  }, o;
416
414
  }
417
- function lt(r, e, t) {
415
+ function dt(r, e, t) {
418
416
  const a = e.height, n = a / 4, i = e.width + 2 * n, s = [
419
417
  { x: n, y: 0 },
420
418
  { x: i - n, y: 0 },
@@ -422,86 +420,86 @@ function lt(r, e, t) {
422
420
  { x: i - n, y: -a },
423
421
  { x: n, y: -a },
424
422
  { x: 0, y: -a / 2 }
425
- ], o = E(r, i, a, s);
426
- return t.intersect = function(l) {
427
- return A(t, s, l);
423
+ ], o = M(r, i, a, s);
424
+ return t.intersect = function(d) {
425
+ return I(t, s, d);
428
426
  }, o;
429
427
  }
430
- function dt(r, e, t) {
428
+ function ct(r, e, t) {
431
429
  const a = e.width, n = e.height, i = [
432
430
  { x: -n / 2, y: 0 },
433
431
  { x: a, y: 0 },
434
432
  { x: a, y: -n },
435
433
  { x: -n / 2, y: -n },
436
434
  { x: 0, y: -n / 2 }
437
- ], s = E(r, a, n, i);
435
+ ], s = M(r, a, n, i);
438
436
  return t.intersect = function(o) {
439
- return A(t, i, o);
437
+ return I(t, i, o);
440
438
  }, s;
441
439
  }
442
- function ct(r, e, t) {
440
+ function ht(r, e, t) {
443
441
  const a = e.width, n = e.height, i = [
444
442
  { x: -2 * n / 6, y: 0 },
445
443
  { x: a - n / 6, y: 0 },
446
444
  { x: a + 2 * n / 6, y: -n },
447
445
  { x: n / 6, y: -n }
448
- ], s = E(r, a, n, i);
446
+ ], s = M(r, a, n, i);
449
447
  return t.intersect = function(o) {
450
- return A(t, i, o);
448
+ return I(t, i, o);
451
449
  }, s;
452
450
  }
453
- function ht(r, e, t) {
451
+ function ut(r, e, t) {
454
452
  const a = e.width, n = e.height, i = [
455
453
  { x: 2 * n / 6, y: 0 },
456
454
  { x: a + n / 6, y: 0 },
457
455
  { x: a - 2 * n / 6, y: -n },
458
456
  { x: -n / 6, y: -n }
459
- ], s = E(r, a, n, i);
457
+ ], s = M(r, a, n, i);
460
458
  return t.intersect = function(o) {
461
- return A(t, i, o);
459
+ return I(t, i, o);
462
460
  }, s;
463
461
  }
464
- function ut(r, e, t) {
462
+ function ft(r, e, t) {
465
463
  const a = e.width, n = e.height, i = [
466
464
  { x: -2 * n / 6, y: 0 },
467
465
  { x: a + 2 * n / 6, y: 0 },
468
466
  { x: a - n / 6, y: -n },
469
467
  { x: n / 6, y: -n }
470
- ], s = E(r, a, n, i);
468
+ ], s = M(r, a, n, i);
471
469
  return t.intersect = function(o) {
472
- return A(t, i, o);
470
+ return I(t, i, o);
473
471
  }, s;
474
472
  }
475
- function ft(r, e, t) {
473
+ function pt(r, e, t) {
476
474
  const a = e.width, n = e.height, i = [
477
475
  { x: n / 6, y: 0 },
478
476
  { x: a - n / 6, y: 0 },
479
477
  { x: a + 2 * n / 6, y: -n },
480
478
  { x: -2 * n / 6, y: -n }
481
- ], s = E(r, a, n, i);
479
+ ], s = M(r, a, n, i);
482
480
  return t.intersect = function(o) {
483
- return A(t, i, o);
481
+ return I(t, i, o);
484
482
  }, s;
485
483
  }
486
- function pt(r, e, t) {
484
+ function gt(r, e, t) {
487
485
  const a = e.width, n = e.height, i = [
488
486
  { x: 0, y: 0 },
489
487
  { x: a + n / 2, y: 0 },
490
488
  { x: a, y: -n / 2 },
491
489
  { x: a + n / 2, y: -n },
492
490
  { x: 0, y: -n }
493
- ], s = E(r, a, n, i);
491
+ ], s = M(r, a, n, i);
494
492
  return t.intersect = function(o) {
495
- return A(t, i, o);
493
+ return I(t, i, o);
496
494
  }, s;
497
495
  }
498
- function gt(r, e, t) {
496
+ function yt(r, e, t) {
499
497
  const a = e.height, n = e.width + a / 4, i = r.insert("rect", ":first-child").attr("rx", a / 2).attr("ry", a / 2).attr("x", -n / 2).attr("y", -a / 2).attr("width", n).attr("height", a);
500
498
  return t.intersect = function(s) {
501
499
  return F(t, s);
502
500
  }, i;
503
501
  }
504
- function yt(r, e, t) {
502
+ function xt(r, e, t) {
505
503
  const a = e.width, n = e.height, i = [
506
504
  { x: 0, y: 0 },
507
505
  { x: a, y: 0 },
@@ -513,29 +511,29 @@ function yt(r, e, t) {
513
511
  { x: a + 8, y: -n },
514
512
  { x: -8, y: -n },
515
513
  { x: -8, y: 0 }
516
- ], s = E(r, a, n, i);
514
+ ], s = M(r, a, n, i);
517
515
  return t.intersect = function(o) {
518
- return A(t, i, o);
516
+ return I(t, i, o);
519
517
  }, s;
520
518
  }
521
- function xt(r, e, t) {
522
- const a = e.width, n = a / 2, i = n / (2.5 + a / 50), s = e.height + i, o = "M 0," + i + " a " + n + "," + i + " 0,0,0 " + a + " 0 a " + n + "," + i + " 0,0,0 " + -a + " 0 l 0," + s + " a " + n + "," + i + " 0,0,0 " + a + " 0 l 0," + -s, l = r.attr("label-offset-y", i).insert("path", ":first-child").attr("d", o).attr("transform", "translate(" + -a / 2 + "," + -(s / 2 + i) + ")");
523
- return t.intersect = function(c) {
524
- const d = F(t, c), g = d.x - t.x;
525
- if (n != 0 && (Math.abs(g) < t.width / 2 || Math.abs(g) == t.width / 2 && Math.abs(d.y - t.y) > t.height / 2 - i)) {
526
- let f = i * i * (1 - g * g / (n * n));
527
- f != 0 && (f = Math.sqrt(f)), f = i - f, c.y - t.y > 0 && (f = -f), d.y += f;
519
+ function wt(r, e, t) {
520
+ const a = e.width, n = a / 2, i = n / (2.5 + a / 50), s = e.height + i, o = "M 0," + i + " a " + n + "," + i + " 0,0,0 " + a + " 0 a " + n + "," + i + " 0,0,0 " + -a + " 0 l 0," + s + " a " + n + "," + i + " 0,0,0 " + a + " 0 l 0," + -s, d = r.attr("label-offset-y", i).insert("path", ":first-child").attr("d", o).attr("transform", "translate(" + -a / 2 + "," + -(s / 2 + i) + ")");
521
+ return t.intersect = function(u) {
522
+ const l = F(t, u), g = l.x - t.x;
523
+ if (n != 0 && (Math.abs(g) < t.width / 2 || Math.abs(g) == t.width / 2 && Math.abs(l.y - t.y) > t.height / 2 - i)) {
524
+ let c = i * i * (1 - g * g / (n * n));
525
+ c != 0 && (c = Math.sqrt(c)), c = i - c, u.y - t.y > 0 && (c = -c), l.y += c;
528
526
  }
529
- return d;
530
- }, l;
531
- }
532
- function fe(r) {
533
- r.shapes().question = ot, r.shapes().hexagon = lt, r.shapes().stadium = gt, r.shapes().subroutine = yt, r.shapes().cylinder = xt, r.shapes().rect_left_inv_arrow = dt, r.shapes().lean_right = ct, r.shapes().lean_left = ht, r.shapes().trapezoid = ut, r.shapes().inv_trapezoid = ft, r.shapes().rect_right_inv_arrow = pt;
527
+ return l;
528
+ }, d;
534
529
  }
535
530
  function pe(r) {
536
- r({ question: ot }), r({ hexagon: lt }), r({ stadium: gt }), r({ subroutine: yt }), r({ cylinder: xt }), r({ rect_left_inv_arrow: dt }), r({ lean_right: ct }), r({ lean_left: ht }), r({ trapezoid: ut }), r({ inv_trapezoid: ft }), r({ rect_right_inv_arrow: pt });
531
+ r.shapes().question = lt, r.shapes().hexagon = dt, r.shapes().stadium = yt, r.shapes().subroutine = xt, r.shapes().cylinder = wt, r.shapes().rect_left_inv_arrow = ct, r.shapes().lean_right = ht, r.shapes().lean_left = ut, r.shapes().trapezoid = ft, r.shapes().inv_trapezoid = pt, r.shapes().rect_right_inv_arrow = gt;
532
+ }
533
+ function ge(r) {
534
+ r({ question: lt }), r({ hexagon: dt }), r({ stadium: yt }), r({ subroutine: xt }), r({ cylinder: wt }), r({ rect_left_inv_arrow: ct }), r({ lean_right: ht }), r({ lean_left: ut }), r({ trapezoid: ft }), r({ inv_trapezoid: pt }), r({ rect_right_inv_arrow: gt });
537
535
  }
538
- function E(r, e, t, a) {
536
+ function M(r, e, t, a) {
539
537
  return r.insert("polygon", ":first-child").attr(
540
538
  "points",
541
539
  a.map(function(n) {
@@ -543,122 +541,126 @@ function E(r, e, t, a) {
543
541
  }).join(" ")
544
542
  ).attr("transform", "translate(" + -e / 2 + "," + t / 2 + ")");
545
543
  }
546
- const ge = {
547
- addToRender: fe,
548
- addToRenderV2: pe
549
- }, vt = {}, ye = function(r) {
544
+ const ye = {
545
+ addToRender: pe,
546
+ addToRenderV2: ge
547
+ }, vt = {}, xe = function(r) {
550
548
  const e = Object.keys(r);
551
549
  for (const t of e)
552
550
  vt[t] = r[t];
553
- }, wt = function(r, e, t, a, n, i) {
554
- const s = a ? a.select(`[id="${t}"]`) : w(`[id="${t}"]`), o = n || document;
555
- Object.keys(r).forEach(function(l) {
556
- const c = r[l];
557
- let d = "default";
558
- c.classes.length > 0 && (d = c.classes.join(" "));
559
- const g = q(c.styles);
560
- let f = c.text !== void 0 ? c.text : c.id, h;
561
- if (J(H().flowchart.htmlLabels)) {
551
+ }, bt = async function(r, e, t, a, n, i) {
552
+ const s = a ? a.select(`[id="${t}"]`) : v(`[id="${t}"]`), o = n || document, d = Object.keys(r);
553
+ for (const u of d) {
554
+ const l = r[u];
555
+ let g = "default";
556
+ l.classes.length > 0 && (g = l.classes.join(" "));
557
+ const c = O(l.styles);
558
+ let h = l.text !== void 0 ? l.text : l.id, p;
559
+ if (J(R().flowchart.htmlLabels)) {
562
560
  const x = {
563
- label: f.replace(
564
- /fa[blrs]?:fa-[\w-]+/g,
565
- (v) => `<i class='${v.replace(":", " ")}'></i>`
561
+ label: await tt(
562
+ h.replace(
563
+ /fa[blrs]?:fa-[\w-]+/g,
564
+ // cspell:disable-line
565
+ (k) => `<i class='${k.replace(":", " ")}'></i>`
566
+ ),
567
+ R()
566
568
  )
567
569
  };
568
- h = et(s, x).node(), h.parentNode.removeChild(h);
570
+ p = rt(s, x).node(), p.parentNode.removeChild(p);
569
571
  } else {
570
572
  const x = o.createElementNS("http://www.w3.org/2000/svg", "text");
571
- x.setAttribute("style", g.labelStyle.replace("color:", "fill:"));
572
- const v = f.split(tt.lineBreakRegex);
573
- for (const S of v) {
574
- const I = o.createElementNS("http://www.w3.org/2000/svg", "tspan");
575
- I.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), I.setAttribute("dy", "1em"), I.setAttribute("x", "1"), I.textContent = S, x.appendChild(I);
573
+ x.setAttribute("style", c.labelStyle.replace("color:", "fill:"));
574
+ const k = h.split(et.lineBreakRegex);
575
+ for (const N of k) {
576
+ const _ = o.createElementNS("http://www.w3.org/2000/svg", "tspan");
577
+ _.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), _.setAttribute("dy", "1em"), _.setAttribute("x", "1"), _.textContent = N, x.appendChild(_);
576
578
  }
577
- h = x;
579
+ p = x;
578
580
  }
579
- let p = 0, u = "";
580
- switch (c.type) {
581
+ let w = 0, f = "";
582
+ switch (l.type) {
581
583
  case "round":
582
- p = 5, u = "rect";
584
+ w = 5, f = "rect";
583
585
  break;
584
586
  case "square":
585
- u = "rect";
587
+ f = "rect";
586
588
  break;
587
589
  case "diamond":
588
- u = "question";
590
+ f = "question";
589
591
  break;
590
592
  case "hexagon":
591
- u = "hexagon";
593
+ f = "hexagon";
592
594
  break;
593
595
  case "odd":
594
- u = "rect_left_inv_arrow";
596
+ f = "rect_left_inv_arrow";
595
597
  break;
596
598
  case "lean_right":
597
- u = "lean_right";
599
+ f = "lean_right";
598
600
  break;
599
601
  case "lean_left":
600
- u = "lean_left";
602
+ f = "lean_left";
601
603
  break;
602
604
  case "trapezoid":
603
- u = "trapezoid";
605
+ f = "trapezoid";
604
606
  break;
605
607
  case "inv_trapezoid":
606
- u = "inv_trapezoid";
608
+ f = "inv_trapezoid";
607
609
  break;
608
610
  case "odd_right":
609
- u = "rect_left_inv_arrow";
611
+ f = "rect_left_inv_arrow";
610
612
  break;
611
613
  case "circle":
612
- u = "circle";
614
+ f = "circle";
613
615
  break;
614
616
  case "ellipse":
615
- u = "ellipse";
617
+ f = "ellipse";
616
618
  break;
617
619
  case "stadium":
618
- u = "stadium";
620
+ f = "stadium";
619
621
  break;
620
622
  case "subroutine":
621
- u = "subroutine";
623
+ f = "subroutine";
622
624
  break;
623
625
  case "cylinder":
624
- u = "cylinder";
626
+ f = "cylinder";
625
627
  break;
626
628
  case "group":
627
- u = "rect";
629
+ f = "rect";
628
630
  break;
629
631
  default:
630
- u = "rect";
632
+ f = "rect";
631
633
  }
632
- U.warn("Adding node", c.id, c.domId), e.setNode(i.db.lookUpDomId(c.id), {
634
+ U.warn("Adding node", l.id, l.domId), e.setNode(i.db.lookUpDomId(l.id), {
633
635
  labelType: "svg",
634
- labelStyle: g.labelStyle,
635
- shape: u,
636
- label: h,
637
- rx: p,
638
- ry: p,
639
- class: d,
640
- style: g.style,
641
- id: i.db.lookUpDomId(c.id)
636
+ labelStyle: c.labelStyle,
637
+ shape: f,
638
+ label: p,
639
+ rx: w,
640
+ ry: w,
641
+ class: g,
642
+ style: c.style,
643
+ id: i.db.lookUpDomId(l.id)
642
644
  });
643
- });
644
- }, bt = function(r, e, t) {
645
+ }
646
+ }, mt = async function(r, e, t) {
645
647
  let a = 0, n, i;
646
648
  if (r.defaultStyle !== void 0) {
647
- const s = q(r.defaultStyle);
649
+ const s = O(r.defaultStyle);
648
650
  n = s.style, i = s.labelStyle;
649
651
  }
650
- r.forEach(function(s) {
652
+ for (const s of r) {
651
653
  a++;
652
- const o = "L-" + s.start + "-" + s.end, l = "LS-" + s.start, c = "LE-" + s.end, d = {};
653
- s.type === "arrow_open" ? d.arrowhead = "none" : d.arrowhead = "normal";
654
- let g = "", f = "";
654
+ const o = "L-" + s.start + "-" + s.end, d = "LS-" + s.start, u = "LE-" + s.end, l = {};
655
+ s.type === "arrow_open" ? l.arrowhead = "none" : l.arrowhead = "normal";
656
+ let g = "", c = "";
655
657
  if (s.style !== void 0) {
656
- const h = q(s.style);
657
- g = h.style, f = h.labelStyle;
658
+ const h = O(s.style);
659
+ g = h.style, c = h.labelStyle;
658
660
  } else
659
661
  switch (s.stroke) {
660
662
  case "normal":
661
- g = "fill:none", n !== void 0 && (g = n), i !== void 0 && (f = i);
663
+ g = "fill:none", n !== void 0 && (g = n), i !== void 0 && (c = i);
662
664
  break;
663
665
  case "dotted":
664
666
  g = "fill:none;stroke-width:2px;stroke-dasharray:3;";
@@ -667,28 +669,32 @@ const ge = {
667
669
  g = " stroke-width: 3.5px;fill:none";
668
670
  break;
669
671
  }
670
- d.style = g, d.labelStyle = f, s.interpolate !== void 0 ? d.curve = W(s.interpolate, R) : r.defaultInterpolate !== void 0 ? d.curve = W(r.defaultInterpolate, R) : d.curve = W(vt.curve, R), s.text === void 0 ? s.style !== void 0 && (d.arrowheadStyle = "fill: #333") : (d.arrowheadStyle = "fill: #333", d.labelpos = "c", J(H().flowchart.htmlLabels) ? (d.labelType = "html", d.label = `<span id="L-${o}" class="edgeLabel L-${l}' L-${c}" style="${d.labelStyle}">${s.text.replace(
671
- /fa[blrs]?:fa-[\w-]+/g,
672
- (h) => `<i class='${h.replace(":", " ")}'></i>`
673
- )}</span>`) : (d.labelType = "text", d.label = s.text.replace(tt.lineBreakRegex, `
674
- `), s.style === void 0 && (d.style = d.style || "stroke: #333; stroke-width: 1.5px;fill:none"), d.labelStyle = d.labelStyle.replace("color:", "fill:"))), d.id = o, d.class = l + " " + c, d.minlen = s.length || 1, e.setEdge(t.db.lookUpDomId(s.start), t.db.lookUpDomId(s.end), d, a);
675
- });
676
- }, xe = function(r, e) {
672
+ l.style = g, l.labelStyle = c, s.interpolate !== void 0 ? l.curve = q(s.interpolate, W) : r.defaultInterpolate !== void 0 ? l.curve = q(r.defaultInterpolate, W) : l.curve = q(vt.curve, W), s.text === void 0 ? s.style !== void 0 && (l.arrowheadStyle = "fill: #333") : (l.arrowheadStyle = "fill: #333", l.labelpos = "c", J(R().flowchart.htmlLabels) ? (l.labelType = "html", l.label = `<span id="L-${o}" class="edgeLabel L-${d}' L-${u}" style="${l.labelStyle}">${await tt(
673
+ s.text.replace(
674
+ /fa[blrs]?:fa-[\w-]+/g,
675
+ // cspell:disable-line
676
+ (h) => `<i class='${h.replace(":", " ")}'></i>`
677
+ ),
678
+ R()
679
+ )}</span>`) : (l.labelType = "text", l.label = s.text.replace(et.lineBreakRegex, `
680
+ `), s.style === void 0 && (l.style = l.style || "stroke: #333; stroke-width: 1.5px;fill:none"), l.labelStyle = l.labelStyle.replace("color:", "fill:"))), l.id = o, l.class = d + " " + u, l.minlen = s.length || 1, e.setEdge(t.db.lookUpDomId(s.start), t.db.lookUpDomId(s.end), l, a);
681
+ }
682
+ }, we = function(r, e) {
677
683
  return U.info("Extracting classes"), e.db.getClasses();
678
- }, ve = function(r, e, t, a) {
684
+ }, ve = async function(r, e, t, a) {
679
685
  U.info("Drawing flowchart");
680
- const { securityLevel: n, flowchart: i } = H();
686
+ const { securityLevel: n, flowchart: i } = R();
681
687
  let s;
682
- n === "sandbox" && (s = w("#i" + e));
683
- const o = n === "sandbox" ? w(s.nodes()[0].contentDocument.body) : w("body"), l = n === "sandbox" ? s.nodes()[0].contentDocument : document;
684
- let c = a.db.getDirection();
685
- c === void 0 && (c = "TD");
686
- const d = i.nodeSpacing || 50, g = i.rankSpacing || 50, f = new kt({
688
+ n === "sandbox" && (s = v("#i" + e));
689
+ const o = n === "sandbox" ? v(s.nodes()[0].contentDocument.body) : v("body"), d = n === "sandbox" ? s.nodes()[0].contentDocument : document;
690
+ let u = a.db.getDirection();
691
+ u === void 0 && (u = "TD");
692
+ const l = i.nodeSpacing || 50, g = i.rankSpacing || 50, c = new St({
687
693
  multigraph: !0,
688
694
  compound: !0
689
695
  }).setGraph({
690
- rankdir: c,
691
- nodesep: d,
696
+ rankdir: u,
697
+ nodesep: l,
692
698
  ranksep: g,
693
699
  marginx: 8,
694
700
  marginy: 8
@@ -699,82 +705,82 @@ const ge = {
699
705
  const p = a.db.getSubGraphs();
700
706
  for (let y = p.length - 1; y >= 0; y--)
701
707
  h = p[y], a.db.addVertex(h.id, h.title, "group", void 0, h.classes);
702
- const u = a.db.getVertices();
703
- U.warn("Get vertices", u);
704
- const x = a.db.getEdges();
705
- let v = 0;
706
- for (v = p.length - 1; v >= 0; v--) {
707
- h = p[v], Mt("cluster").append("text");
708
+ const w = a.db.getVertices();
709
+ U.warn("Get vertices", w);
710
+ const f = a.db.getEdges();
711
+ let x = 0;
712
+ for (x = p.length - 1; x >= 0; x--) {
713
+ h = p[x], Bt("cluster").append("text");
708
714
  for (let y = 0; y < h.nodes.length; y++)
709
715
  U.warn(
710
716
  "Setting subgraph",
711
717
  h.nodes[y],
712
718
  a.db.lookUpDomId(h.nodes[y]),
713
719
  a.db.lookUpDomId(h.id)
714
- ), f.setParent(a.db.lookUpDomId(h.nodes[y]), a.db.lookUpDomId(h.id));
720
+ ), c.setParent(a.db.lookUpDomId(h.nodes[y]), a.db.lookUpDomId(h.id));
715
721
  }
716
- wt(u, f, e, o, l, a), bt(x, f, a);
717
- const S = new le();
718
- ge.addToRender(S), S.arrows().none = function(y, b, _, m) {
719
- const M = y.append("marker").attr("id", b).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 0 0 L 0 0 z");
720
- T(M, _[m + "Style"]);
721
- }, S.arrows().normal = function(y, b) {
722
+ await bt(w, c, e, o, d, a), await mt(f, c, a);
723
+ const k = new de();
724
+ ye.addToRender(k), k.arrows().none = function(y, b, L, m) {
725
+ const B = y.append("marker").attr("id", b).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 0 0 L 0 0 z");
726
+ T(B, L[m + "Style"]);
727
+ }, k.arrows().normal = function(y, b) {
722
728
  y.append("marker").attr("id", b).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowheadPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
723
729
  };
724
- const I = o.select(`[id="${e}"]`), B = o.select("#" + e + " g");
725
- for (S(B, f), B.selectAll("g.node").attr("title", function() {
730
+ const N = o.select(`[id="${e}"]`), _ = o.select("#" + e + " g");
731
+ for (k(_, c), _.selectAll("g.node").attr("title", function() {
726
732
  return a.db.getTooltip(this.id);
727
- }), a.db.indexNodes("subGraph" + v), v = 0; v < p.length; v++)
728
- if (h = p[v], h.title !== "undefined") {
729
- const y = l.querySelectorAll(
733
+ }), a.db.indexNodes("subGraph" + x), x = 0; x < p.length; x++)
734
+ if (h = p[x], h.title !== "undefined") {
735
+ const y = d.querySelectorAll(
730
736
  "#" + e + ' [id="' + a.db.lookUpDomId(h.id) + '"] rect'
731
- ), b = l.querySelectorAll(
737
+ ), b = d.querySelectorAll(
732
738
  "#" + e + ' [id="' + a.db.lookUpDomId(h.id) + '"]'
733
- ), _ = y[0].x.baseVal.value, m = y[0].y.baseVal.value, M = y[0].width.baseVal.value, $ = w(b[0]).select(".label");
734
- $.attr("transform", `translate(${_ + M / 2}, ${m + 14})`), $.attr("id", e + "Text");
735
- for (let N = 0; N < h.classes.length; N++)
736
- b[0].classList.add(h.classes[N]);
739
+ ), L = y[0].x.baseVal.value, m = y[0].y.baseVal.value, B = y[0].width.baseVal.value, E = v(b[0]).select(".label");
740
+ E.attr("transform", `translate(${L + B / 2}, ${m + 14})`), E.attr("id", e + "Text");
741
+ for (let $ = 0; $ < h.classes.length; $++)
742
+ b[0].classList.add(h.classes[$]);
737
743
  }
738
744
  if (!i.htmlLabels) {
739
- const y = l.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
745
+ const y = d.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
740
746
  for (const b of y) {
741
- const _ = b.getBBox(), m = l.createElementNS("http://www.w3.org/2000/svg", "rect");
742
- m.setAttribute("rx", 0), m.setAttribute("ry", 0), m.setAttribute("width", _.width), m.setAttribute("height", _.height), b.insertBefore(m, b.firstChild);
747
+ const L = b.getBBox(), m = d.createElementNS("http://www.w3.org/2000/svg", "rect");
748
+ m.setAttribute("rx", 0), m.setAttribute("ry", 0), m.setAttribute("width", L.width), m.setAttribute("height", L.height), b.insertBefore(m, b.firstChild);
743
749
  }
744
750
  }
745
- St(f, I, i.diagramPadding, i.useMaxWidth), Object.keys(u).forEach(function(y) {
746
- const b = u[y];
751
+ _t(c, N, i.diagramPadding, i.useMaxWidth), Object.keys(w).forEach(function(y) {
752
+ const b = w[y];
747
753
  if (b.link) {
748
- const _ = o.select("#" + e + ' [id="' + a.db.lookUpDomId(y) + '"]');
749
- if (_) {
750
- const m = l.createElementNS("http://www.w3.org/2000/svg", "a");
754
+ const L = o.select("#" + e + ' [id="' + a.db.lookUpDomId(y) + '"]');
755
+ if (L) {
756
+ const m = d.createElementNS("http://www.w3.org/2000/svg", "a");
751
757
  m.setAttributeNS("http://www.w3.org/2000/svg", "class", b.classes.join(" ")), m.setAttributeNS("http://www.w3.org/2000/svg", "href", b.link), m.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), n === "sandbox" ? m.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : b.linkTarget && m.setAttributeNS("http://www.w3.org/2000/svg", "target", b.linkTarget);
752
- const M = _.insert(function() {
758
+ const B = L.insert(function() {
753
759
  return m;
754
- }, ":first-child"), $ = _.select(".label-container");
755
- $ && M.append(function() {
756
- return $.node();
760
+ }, ":first-child"), E = L.select(".label-container");
761
+ E && B.append(function() {
762
+ return E.node();
757
763
  });
758
- const N = _.select(".label");
759
- N && M.append(function() {
760
- return N.node();
764
+ const $ = L.select(".label");
765
+ $ && B.append(function() {
766
+ return $.node();
761
767
  });
762
768
  }
763
769
  }
764
770
  });
765
- }, we = {
766
- setConf: ye,
767
- addVertices: wt,
768
- addEdges: bt,
769
- getClasses: xe,
771
+ }, be = {
772
+ setConf: xe,
773
+ addVertices: bt,
774
+ addEdges: mt,
775
+ getClasses: we,
770
776
  draw: ve
771
777
  }, Ie = {
772
- parser: mt,
773
- db: O,
774
- renderer: Tt,
775
- styles: Et,
778
+ parser: kt,
779
+ db: P,
780
+ renderer: Mt,
781
+ styles: Nt,
776
782
  init: (r) => {
777
- r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, we.setConf(r.flowchart), O.clear(), O.setGen("gen-1");
783
+ r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, be.setConf(r.flowchart), P.clear(), P.setGen("gen-1");
778
784
  }
779
785
  };
780
786
  export {