@kong-ui-public/documentation 0.7.3 → 0.7.4

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 (50) hide show
  1. package/dist/arc-BOwQG9_0-DleiJ5MN.js +86 -0
  2. package/dist/{blockDiagram-9f4a6865-B8YUosP9-Ck5a_RF8.js → blockDiagram-6b2b5046-Nxmf6ECX-CjmiHCoc.js} +106 -106
  3. package/dist/{c4Diagram-ae766693-9gx0flBR-RbGS48yQ.js → c4Diagram-b947cdbb-Cqv3kxuJ-BXRu2bPz.js} +132 -133
  4. package/dist/{channel-bVjn1tQE-Wer9OwST.js → channel-b8lMD3zZ-Ds1AntZz.js} +1 -1
  5. package/dist/{classDiagram-fb54d2a0-BmWHv5ZR-D2x9wzS9.js → classDiagram-35230388-cNSawuF--DF1WKJvq.js} +7 -8
  6. package/dist/{classDiagram-v2-a2b738ad-QP0MZXwY-DUaknQeO.js → classDiagram-v2-412acd34-DL9yPzEL-1zjaSugS.js} +8 -8
  7. package/dist/{clone-DD2Lcv4t-DhvFmnqA.js → clone-DA9j_md9-DOEHuNxk.js} +1 -1
  8. package/dist/{createText-ca0c5216-CUBuCbSf-HdStpTZQ.js → createText-423428c9-Bi8tqKOA-BAeSkls4.js} +1 -2
  9. package/dist/documentation.es.js +2 -2
  10. package/dist/documentation.umd.js +724 -995
  11. package/dist/{edges-066a5561-C4osKU6x-XnDLYo80.js → edges-d417c7a0-CyiospL7-DxH-v6Cl.js} +27 -28
  12. package/dist/{erDiagram-09d1c15f-SHmUd_X2-BD2Zprb5.js → erDiagram-0ea73325-BWWWgAmd-aPslvlbz.js} +38 -38
  13. package/dist/{flowDb-c1833063-hXQxSOZp-BgZsffD-.js → flowDb-d35e309a-BQRCRAKf-Cf6biv5M.js} +4 -4
  14. package/dist/{flowDiagram-b222e15a-D6yXsQur-DAh1PqK2.js → flowDiagram-d949d7c1-D_OK65PK-DS0CyGIC.js} +329 -337
  15. package/dist/{flowDiagram-v2-13329dc7-DSmTE-fH-DK4Aaksl.js → flowDiagram-v2-49332944-CYs4MQAb-C9m-G3JY.js} +5 -5
  16. package/dist/{flowchart-elk-definition-ae0efee6-DeHL5Vyb-C3uoamlG.js → flowchart-elk-definition-27cc417a-OqMBrUum-CbH3NCkB.js} +12750 -12752
  17. package/dist/{ganttDiagram-b62c793e-MpaZ3zUz-n9eAGU5Z.js → ganttDiagram-5c869e3b-Cu9aCqHh-De0u-Oas.js} +477 -488
  18. package/dist/gitGraphDiagram-b9d81de9-DVB2N99Y-C2np-enA.js +1262 -0
  19. package/dist/go-BEtjQGEI-BEtjQGEI.js +7 -0
  20. package/dist/{graph-Ch046BUH-D6losRXJ.js → graph-Ctghcdhb-CqAdUKOZ.js} +3 -3
  21. package/dist/{index-01f381cb-CT_aViff-Bm97PJyb.js → index-8fae9850-CdUaE101-uMPVRleJ.js} +11 -11
  22. package/dist/{index-ylfMj1BB.js → index-BRYBB2aM.js} +6919 -6980
  23. package/dist/{infoDiagram-94cd232f-lx0YonOB-CCDIpRPp.js → infoDiagram-db7b18fc-MHPWI9K2-Cy6tzigE.js} +16 -16
  24. package/dist/{journeyDiagram-6625b456-Bddw5A6D-kEeZiQ4H.js → journeyDiagram-d5636530-O6dkdrZq-BghpQv6u.js} +42 -42
  25. package/dist/{latex-CoJDAuLL-lJGSmtOO.js → latex-BOFs-Cxs-XUibdaju.js} +1 -1
  26. package/dist/{layout-CHOXC5k_-DUAMQEfX.js → layout-Bf4siL6f-B27qrAUf.js} +110 -110
  27. package/dist/{line-DBfBDzAx-Dps8NSDg.js → line-Bs4J8z8n-kq8RtDQA.js} +1 -1
  28. package/dist/{linear-Cx2Fv9Zx-CU3jTW7x.js → linear-DG5qhwMV-BSSd8kt2.js} +21 -21
  29. package/dist/{mindmap-definition-307c710a-gxai40Hx-B5cybnhA.js → mindmap-definition-377f8f1f-BJZNhhv8-Cinm-UDt.js} +6496 -6729
  30. package/dist/{pieDiagram-bb1d19e5-DBUCFC_C-D0U7-L3H.js → pieDiagram-b0208e96-12B2qtCQ-Bl-9vJIA.js} +68 -68
  31. package/dist/{quadrantDiagram-c759a472-C-01TGYx-DbcxgXB1.js → quadrantDiagram-0332be45-B77W50pM-bQiH7XpR.js} +2 -2
  32. package/dist/{requirementDiagram-87253d64-B-l2a_BK-Dx5Ue_Dh.js → requirementDiagram-bf7890df-BfPNYjQ5-CGF46ifn.js} +30 -30
  33. package/dist/{sankeyDiagram-707fac0f-Bbge0MNO-Daiiy5Xs.js → sankeyDiagram-0acdec17-D5aZuYoJ-DIWEEtuf.js} +22 -22
  34. package/dist/{sequenceDiagram-6894f283-icQqpauU-BnsQfpZ8.js → sequenceDiagram-c18d009d-DE6VyN7w-6UaAYk4p.js} +808 -841
  35. package/dist/{stateDiagram-5dee940d-D5DlkHeT-vkteU5K0.js → stateDiagram-43596fc0-CfGH1LmM-km5kjci0.js} +54 -54
  36. package/dist/{stateDiagram-v2-1992cada-B0wOd1mU-uGp4HBId.js → stateDiagram-v2-2ead4f9c-CvDoRhMn-CkUl-Lcu.js} +12 -12
  37. package/dist/style.css +1 -1
  38. package/dist/{styles-b83b31c9-Cl9kVMiN-l7CL0Dl1.js → styles-6860f46c-CJplL-uW-BFTTeCMF.js} +19 -19
  39. package/dist/{styles-483fbfea-D5_DzLlB-CFEFMKxg.js → styles-7383a064-N1ljH9gq-D7Iipjtf.js} +137 -140
  40. package/dist/{styles-0784dbeb-BNHFs860-B4vu0CwB.js → styles-b2c874b6-CKJLyUE4-2C22cylE.js} +24 -24
  41. package/dist/{svgDrawCommon-5e1cfd1d-DOmX8dP4-DFu8Hp1b.js → svgDrawCommon-0ee1b4e9-Dc25Bs_w-QhIkJ1Xp.js} +4 -4
  42. package/dist/{timeline-definition-bf702344-W3hPiAt--ObBtNo01.js → timeline-definition-d977decf-8C3XuDC--DAD2knZY.js} +2 -2
  43. package/dist/{vue-Djs4WzmL-BDWKKO52.js → vue-DoU_Nr9K-Cj2gXb1y.js} +2 -2
  44. package/dist/{vue-html-CdlOxrsR-C0P0LsFn.js → vue-html-iC7i5f9n-Cfh5ktA3.js} +1 -1
  45. package/dist/{xychartDiagram-f11f50a6-DL5V2cSz-1oy5zYHs.js → xychartDiagram-e50adddc-BRQAut2i-DBHY1QQ6.js} +22 -22
  46. package/package.json +5 -5
  47. package/dist/arc-Fs4E7_gE-CkmDW6jG.js +0 -86
  48. package/dist/gitGraphDiagram-942e62fe-DZ9sNSmE-DfnVvdJs.js +0 -1264
  49. package/dist/go-DYNyFS5n-DYNyFS5n.js +0 -7
  50. package/dist/katex-BQC_klMa-CaeA20wX.js +0 -11636
@@ -1,51 +1,51 @@
1
- import { X as kt, j as P } from "./flowDb-c1833063-hXQxSOZp-BgZsffD-.js";
2
- import { Y as St, E as S, v as K } from "./graph-Ch046BUH-D6losRXJ.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-ylfMj1BB.js";
4
- import { e as Lt, N as At, V as It, O as Tt, k as C } from "./layout-CHOXC5k_-DUAMQEfX.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-D5_DzLlB-CFEFMKxg.js";
6
- import { P as $t } from "./line-DBfBDzAx-Dps8NSDg.js";
7
- function Et(r) {
1
+ import { X as mt, j as O } from "./flowDb-d35e309a-BQRCRAKf-Cf6biv5M.js";
2
+ import { Y as kt, E as k, v as K } from "./graph-Ctghcdhb-CqAdUKOZ.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-BRYBB2aM.js";
4
+ import { e as _t, N as Lt, V as It, O as At, k as C } from "./layout-Bf4siL6f-B27qrAUf.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-N1ljH9gq-D7Iipjtf.js";
6
+ import { P as Nt } from "./line-Bs4J8z8n-kq8RtDQA.js";
7
+ function Bt(r) {
8
8
  if (!r.ok)
9
9
  throw new Error(r.status + " " + r.statusText);
10
10
  return r.text();
11
11
  }
12
- function Ct(r, e) {
13
- return fetch(r, e).then(Et);
12
+ function $t(r, e) {
13
+ return fetch(r, e).then(Bt);
14
14
  }
15
- function Dt(r) {
16
- return (e, t) => Ct(e, t).then((a) => new DOMParser().parseFromString(a, r));
15
+ function Ct(r) {
16
+ return (e, t) => $t(e, t).then((a) => new DOMParser().parseFromString(a, r));
17
17
  }
18
- var Ut = Dt("image/svg+xml"), z = {
19
- normal: Wt,
20
- vee: Pt,
21
- undirected: qt
18
+ var Dt = Ct("image/svg+xml"), P = {
19
+ normal: Rt,
20
+ vee: Ot,
21
+ undirected: Wt
22
22
  };
23
- function Rt(r) {
24
- z = r;
23
+ function Ut(r) {
24
+ P = r;
25
25
  }
26
- function Wt(r, e, t, a) {
26
+ function Rt(r, e, t, a) {
27
27
  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
28
  T(i, t[a + "Style"]), t[a + "Class"] && i.attr("class", t[a + "Class"]);
29
29
  }
30
- function Pt(r, e, t, a) {
30
+ function Ot(r, e, t, a) {
31
31
  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
32
  T(i, t[a + "Style"]), t[a + "Class"] && i.attr("class", t[a + "Class"]);
33
33
  }
34
- function qt(r, e, t, a) {
34
+ function Wt(r, e, t, a) {
35
35
  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
36
  T(i, t[a + "Style"]), t[a + "Class"] && i.attr("class", t[a + "Class"]);
37
37
  }
38
- function Ot(r, e) {
38
+ function qt(r, e) {
39
39
  var t = r;
40
40
  return t.node().appendChild(e.label), T(t, e.labelStyle), t;
41
41
  }
42
- function zt(r, e) {
43
- for (var t = r.append("text"), a = Vt(e.label).split(`
42
+ function Pt(r, e) {
43
+ for (var t = r.append("text"), a = Yt(e.label).split(`
44
44
  `), n = 0; n < a.length; n++)
45
45
  t.append("tspan").attr("xml:space", "preserve").attr("dy", "1em").attr("x", "1").text(a[n]);
46
46
  return T(t, e.labelStyle), t;
47
47
  }
48
- function Vt(r) {
48
+ function Yt(r) {
49
49
  for (var e = "", t = !1, a, n = 0; n < r.length; ++n)
50
50
  if (a = r[n], t) {
51
51
  switch (a) {
@@ -63,7 +63,7 @@ function Vt(r) {
63
63
  }
64
64
  function G(r, e, t) {
65
65
  var a = e.label, n = r.append("g");
66
- e.labelType === "svg" ? Ot(n, e) : typeof a != "string" || e.labelType === "html" ? rt(n, e) : zt(n, e);
66
+ e.labelType === "svg" ? qt(n, e) : typeof a != "string" || e.labelType === "html" ? et(n, e) : Pt(n, e);
67
67
  var i = n.node().getBBox(), s;
68
68
  switch (t) {
69
69
  case "top":
@@ -77,152 +77,152 @@ function G(r, e, t) {
77
77
  }
78
78
  return n.attr("transform", "translate(" + -i.width / 2 + "," + s + ")"), n;
79
79
  }
80
- var V = function(r, e) {
80
+ var Y = function(r, e) {
81
81
  var t = e.nodes().filter(function(i) {
82
- return at(e, i);
82
+ return rt(e, i);
83
83
  }), a = r.selectAll("g.cluster").data(t, function(i) {
84
84
  return i;
85
85
  });
86
- A(a.exit(), e).style("opacity", 0).remove();
86
+ L(a.exit(), e).style("opacity", 0).remove();
87
87
  var n = a.enter().append("g").attr("class", "cluster").attr("id", function(i) {
88
88
  var s = e.node(i);
89
89
  return s.id;
90
90
  }).style("opacity", 0).each(function(i) {
91
- var s = e.node(i), o = v(this);
92
- v(this).append("rect");
93
- var d = o.append("g").attr("class", "label");
94
- G(d, s, s.clusterLabelPos);
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);
95
95
  });
96
- return a = a.merge(n), a = A(a, e).style("opacity", 1), a.selectAll("rect").each(function(i) {
97
- var s = e.node(i), o = v(this);
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);
98
98
  T(o, s.style);
99
99
  }), a;
100
100
  };
101
- function Xt(r) {
102
- V = r;
101
+ function zt(r) {
102
+ Y = r;
103
103
  }
104
- let X = function(r, e) {
104
+ let z = function(r, e) {
105
105
  var t = r.selectAll("g.edgeLabel").data(e.edges(), function(n) {
106
- return nt(n);
106
+ return at(n);
107
107
  }).classed("update", !0);
108
108
  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 = v(this);
109
+ var i = w(this);
110
110
  i.select(".label").remove();
111
- var s = e.edge(n), o = G(i, e.edge(n), 0).classed("label", !0), d = o.node().getBBox();
112
- s.labelId && o.attr("id", s.labelId), S(s, "width") || (s.width = d.width), S(s, "height") || (s.height = d.height);
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);
113
113
  });
114
114
  var a;
115
- return t.exit ? a = t.exit() : a = t.selectAll(null), A(a, e).style("opacity", 0).remove(), t;
115
+ return t.exit ? a = t.exit() : a = t.selectAll(null), L(a, e).style("opacity", 0).remove(), t;
116
116
  };
117
- function Yt(r) {
118
- X = r;
117
+ function Vt(r) {
118
+ z = r;
119
119
  }
120
120
  function Q(r, e) {
121
121
  return r.intersect(e);
122
122
  }
123
- var Y = function(r, e, t) {
123
+ var V = function(r, e, t) {
124
124
  var a = r.selectAll("g.edgePath").data(e.edges(), function(s) {
125
- return nt(s);
126
- }).classed("update", !0), n = Qt(a, e);
127
- Zt(a, e);
125
+ return at(s);
126
+ }).classed("update", !0), n = Ft(a, e);
127
+ Qt(a, e);
128
128
  var i = a.merge !== void 0 ? a.merge(n) : a;
129
- return A(i, e).style("opacity", 1), i.each(function(s) {
130
- var o = v(this), d = e.edge(s);
131
- d.elem = this, d.id && o.attr("id", d.id), it(
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(
132
132
  o,
133
- d.class,
133
+ l.class,
134
134
  (o.classed("update") ? "update " : "") + "edgePath"
135
135
  );
136
136
  }), i.selectAll("path.path").each(function(s) {
137
137
  var o = e.edge(s);
138
- o.arrowheadId = Lt("arrowhead");
139
- var d = v(this).attr("marker-end", function() {
140
- return "url(" + Ht(location.href, o.arrowheadId) + ")";
138
+ o.arrowheadId = _t("arrowhead");
139
+ var l = w(this).attr("marker-end", function() {
140
+ return "url(" + jt(location.href, o.arrowheadId) + ")";
141
141
  }).style("fill", "none");
142
- A(d, e).attr("d", function(u) {
143
- return Gt(e, u);
144
- }), T(d, o.style);
142
+ L(l, e).attr("d", function(c) {
143
+ return Ht(e, c);
144
+ }), T(l, o.style);
145
145
  }), i.selectAll("defs *").remove(), i.selectAll("defs").each(function(s) {
146
- var o = e.edge(s), d = t[o.arrowhead];
147
- d(v(this), o.arrowheadId, o, "arrowhead");
146
+ var o = e.edge(s), l = t[o.arrowhead];
147
+ l(w(this), o.arrowheadId, o, "arrowhead");
148
148
  }), i;
149
149
  };
150
- function jt(r) {
151
- Y = r;
150
+ function Xt(r) {
151
+ V = r;
152
152
  }
153
- function Ht(r, e) {
153
+ function jt(r, e) {
154
154
  var t = r.split("#")[0];
155
155
  return t + "#" + e;
156
156
  }
157
- function Gt(r, e) {
157
+ function Ht(r, e) {
158
158
  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])), st(t, i);
159
+ return i.unshift(Q(a, i[0])), i.push(Q(n, i[i.length - 1])), it(t, i);
160
160
  }
161
- function st(r, e) {
162
- var t = ($t || Ut.line)().x(function(a) {
161
+ function it(r, e) {
162
+ var t = (Nt || Dt.line)().x(function(a) {
163
163
  return a.x;
164
164
  }).y(function(a) {
165
165
  return a.y;
166
166
  });
167
167
  return (t.curve || t.interpolate)(r.curve), t(e);
168
168
  }
169
- function Ft(r) {
169
+ function Gt(r) {
170
170
  var e = r.getBBox(), t = r.ownerSVGElement.getScreenCTM().inverse().multiply(r.getScreenCTM()).translate(e.width / 2, e.height / 2);
171
171
  return { x: t.e, y: t.f };
172
172
  }
173
- function Qt(r, e) {
173
+ function Ft(r, e) {
174
174
  var t = r.enter().append("g").attr("class", "edgePath").style("opacity", 0);
175
175
  return t.append("path").attr("class", "path").attr("d", function(a) {
176
- var n = e.edge(a), i = e.node(a.v).elem, s = At(n.points.length).map(function() {
177
- return Ft(i);
176
+ var n = e.edge(a), i = e.node(a.v).elem, s = Lt(n.points.length).map(function() {
177
+ return Gt(i);
178
178
  });
179
- return st(n, s);
179
+ return it(n, s);
180
180
  }), t.append("defs"), t;
181
181
  }
182
- function Zt(r, e) {
182
+ function Qt(r, e) {
183
183
  var t = r.exit();
184
- A(t, e).style("opacity", 0).remove();
184
+ L(t, e).style("opacity", 0).remove();
185
185
  }
186
- var j = function(r, e, t) {
186
+ var X = function(r, e, t) {
187
187
  var a = e.nodes().filter(function(s) {
188
- return !at(e, s);
188
+ return !rt(e, s);
189
189
  }), n = r.selectAll("g.node").data(a, function(s) {
190
190
  return s;
191
191
  }).classed("update", !0);
192
192
  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), d = v(this);
194
- it(
195
- d,
193
+ var o = e.node(s), l = w(this);
194
+ nt(
195
+ l,
196
196
  o.class,
197
- (d.classed("update") ? "update " : "") + "node"
198
- ), d.select("g.label").remove();
199
- var u = d.append("g").attr("class", "label"), l = G(u, o), g = t[o.shape], c = It(l.node().getBBox(), "width", "height");
200
- 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(
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(
201
201
  "transform",
202
202
  "translate(" + (o.paddingLeft - o.paddingRight) / 2 + "," + (o.paddingTop - o.paddingBottom) / 2 + ")"
203
203
  );
204
- var h = v(this);
204
+ var h = w(this);
205
205
  h.select(".label-container").remove();
206
- var p = g(h, c, o).classed("label-container", !0);
206
+ var p = g(h, f, o).classed("label-container", !0);
207
207
  T(p, o.style);
208
- var w = p.node().getBBox();
209
- o.width = w.width, o.height = w.height;
208
+ var u = p.node().getBBox();
209
+ o.width = u.width, o.height = u.height;
210
210
  });
211
211
  var i;
212
- return n.exit ? i = n.exit() : i = n.selectAll(null), A(i, e).style("opacity", 0).remove(), n;
212
+ return n.exit ? i = n.exit() : i = n.selectAll(null), L(i, e).style("opacity", 0).remove(), n;
213
213
  };
214
- function Kt(r) {
215
- j = r;
214
+ function Zt(r) {
215
+ X = r;
216
216
  }
217
- function Jt(r, e) {
217
+ function Kt(r, e) {
218
218
  var t = r.filter(function() {
219
- return !v(this).classed("update");
219
+ return !w(this).classed("update");
220
220
  });
221
221
  function a(n) {
222
222
  var i = e.node(n);
223
223
  return "translate(" + i.x + "," + i.y + ")";
224
224
  }
225
- t.attr("transform", a), A(r, e).style("opacity", 1).attr("transform", a), A(t.selectAll("rect"), e).attr("width", function(n) {
225
+ t.attr("transform", a), L(r, e).style("opacity", 1).attr("transform", a), L(t.selectAll("rect"), e).attr("width", function(n) {
226
226
  return e.node(n).width;
227
227
  }).attr("height", function(n) {
228
228
  return e.node(n).height;
@@ -234,94 +234,94 @@ function Jt(r, e) {
234
234
  return -i.height / 2;
235
235
  });
236
236
  }
237
- function te(r, e) {
237
+ function Jt(r, e) {
238
238
  var t = r.filter(function() {
239
- return !v(this).classed("update");
239
+ return !w(this).classed("update");
240
240
  });
241
241
  function a(n) {
242
242
  var i = e.edge(n);
243
- return S(i, "x") ? "translate(" + i.x + "," + i.y + ")" : "";
243
+ return k(i, "x") ? "translate(" + i.x + "," + i.y + ")" : "";
244
244
  }
245
- t.attr("transform", a), A(r, e).style("opacity", 1).attr("transform", a);
245
+ t.attr("transform", a), L(r, e).style("opacity", 1).attr("transform", a);
246
246
  }
247
- function ee(r, e) {
247
+ function te(r, e) {
248
248
  var t = r.filter(function() {
249
- return !v(this).classed("update");
249
+ return !w(this).classed("update");
250
250
  });
251
251
  function a(n) {
252
252
  var i = e.node(n);
253
253
  return "translate(" + i.x + "," + i.y + ")";
254
254
  }
255
- t.attr("transform", a), A(r, e).style("opacity", 1).attr("transform", a);
255
+ t.attr("transform", a), L(r, e).style("opacity", 1).attr("transform", a);
256
256
  }
257
- function ot(r, e, t, a) {
258
- 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);
259
- a.x < n && (u = -u);
260
- var l = Math.abs(e * t * o / d);
261
- return a.y < i && (l = -l), { x: n + u, y: i + l };
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 };
262
262
  }
263
- function re(r, e, t) {
264
- return ot(r, e, e, t);
263
+ function ee(r, e, t) {
264
+ return st(r, e, e, t);
265
265
  }
266
- function ae(r, e, t, a) {
267
- var n, i, s, o, d, u, l, g, c, h, p, w, f, x, k;
268
- 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)))
269
- 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 };
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 };
270
270
  }
271
271
  function Z(r, e) {
272
272
  return r * e > 0;
273
273
  }
274
- function I(r, e, t) {
274
+ function A(r, e, t) {
275
275
  var a = r.x, n = r.y, i = [], s = Number.POSITIVE_INFINITY, o = Number.POSITIVE_INFINITY;
276
276
  e.forEach(function(p) {
277
277
  s = Math.min(s, p.x), o = Math.min(o, p.y);
278
278
  });
279
- for (var d = a - r.width / 2 - s, u = n - r.height / 2 - o, l = 0; l < e.length; l++) {
280
- var g = e[l], c = e[l < e.length - 1 ? l + 1 : 0], h = ae(
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(
281
281
  r,
282
282
  t,
283
- { x: d + g.x, y: u + g.y },
284
- { x: d + c.x, y: u + c.y }
283
+ { x: l + g.x, y: c + g.y },
284
+ { x: l + f.x, y: c + f.y }
285
285
  );
286
286
  h && i.push(h);
287
287
  }
288
- return i.length ? (i.length > 1 && i.sort(function(p, w) {
289
- 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 + _ * _);
290
- return k < y ? -1 : k === y ? 0 : 1;
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;
291
291
  }), i[0]) : (console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", r), r);
292
292
  }
293
293
  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, d, u;
295
- 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 };
296
- }
297
- var H = {
298
- rect: ie,
299
- ellipse: se,
300
- circle: oe,
301
- diamond: le
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
302
302
  };
303
- function ne(r) {
304
- H = r;
303
+ function ae(r) {
304
+ j = r;
305
305
  }
306
- function ie(r, e, t) {
306
+ function ne(r, e, t) {
307
307
  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
308
  return t.intersect = function(n) {
309
309
  return F(t, n);
310
310
  }, a;
311
311
  }
312
- function se(r, e, t) {
312
+ function ie(r, e, t) {
313
313
  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
314
  return t.intersect = function(s) {
315
- return ot(t, a, n, s);
315
+ return st(t, a, n, s);
316
316
  }, i;
317
317
  }
318
- function oe(r, e, t) {
318
+ function se(r, e, t) {
319
319
  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
320
  return t.intersect = function(i) {
321
- return re(t, a, i);
321
+ return ee(t, a, i);
322
322
  }, n;
323
323
  }
324
- function le(r, e, t) {
324
+ function oe(r, e, t) {
325
325
  var a = e.width * Math.SQRT2 / 2, n = e.height * Math.SQRT2 / 2, i = [
326
326
  { x: 0, y: -n },
327
327
  { x: -a, y: 0 },
@@ -334,32 +334,32 @@ function le(r, e, t) {
334
334
  }).join(" ")
335
335
  );
336
336
  return t.intersect = function(o) {
337
- return I(t, i, o);
337
+ return A(t, i, o);
338
338
  }, s;
339
339
  }
340
- function de() {
340
+ function le() {
341
341
  var r = function(e, t) {
342
- ue(t);
343
- 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);
344
- Tt(t), ee(o, t), te(s, t), Y(i, t, z);
345
- var d = V(n, t);
346
- Jt(d, t), fe(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);
347
347
  };
348
348
  return r.createNodes = function(e) {
349
- return arguments.length ? (Kt(e), r) : j;
349
+ return arguments.length ? (Zt(e), r) : X;
350
350
  }, r.createClusters = function(e) {
351
- return arguments.length ? (Xt(e), r) : V;
351
+ return arguments.length ? (zt(e), r) : Y;
352
352
  }, r.createEdgeLabels = function(e) {
353
- return arguments.length ? (Yt(e), r) : X;
353
+ return arguments.length ? (Vt(e), r) : z;
354
354
  }, r.createEdgePaths = function(e) {
355
- return arguments.length ? (jt(e), r) : Y;
355
+ return arguments.length ? (Xt(e), r) : V;
356
356
  }, r.shapes = function(e) {
357
- return arguments.length ? (ne(e), r) : H;
357
+ return arguments.length ? (ae(e), r) : j;
358
358
  }, r.arrows = function(e) {
359
- return arguments.length ? (Rt(e), r) : z;
359
+ return arguments.length ? (Ut(e), r) : P;
360
360
  }, r;
361
361
  }
362
- var ce = {
362
+ var de = {
363
363
  paddingLeft: 10,
364
364
  paddingRight: 10,
365
365
  paddingTop: 10,
@@ -367,54 +367,54 @@ var ce = {
367
367
  rx: 0,
368
368
  ry: 0,
369
369
  shape: "rect"
370
- }, he = {
370
+ }, ce = {
371
371
  arrowhead: "normal",
372
- curve: W
372
+ curve: R
373
373
  };
374
- function ue(r) {
374
+ function he(r) {
375
375
  r.nodes().forEach(function(e) {
376
376
  var t = r.node(e);
377
- !S(t, "label") && !r.children(e).length && (t.label = e), S(t, "paddingX") && C(t, {
377
+ !k(t, "label") && !r.children(e).length && (t.label = e), k(t, "paddingX") && C(t, {
378
378
  paddingLeft: t.paddingX,
379
379
  paddingRight: t.paddingX
380
- }), S(t, "paddingY") && C(t, {
380
+ }), k(t, "paddingY") && C(t, {
381
381
  paddingTop: t.paddingY,
382
382
  paddingBottom: t.paddingY
383
- }), S(t, "padding") && C(t, {
383
+ }), k(t, "padding") && C(t, {
384
384
  paddingLeft: t.padding,
385
385
  paddingRight: t.padding,
386
386
  paddingTop: t.padding,
387
387
  paddingBottom: t.padding
388
- }), C(t, ce), K(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(a) {
388
+ }), C(t, de), K(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(a) {
389
389
  t[a] = Number(t[a]);
390
- }), S(t, "width") && (t._prevWidth = t.width), S(t, "height") && (t._prevHeight = t.height);
390
+ }), k(t, "width") && (t._prevWidth = t.width), k(t, "height") && (t._prevHeight = t.height);
391
391
  }), r.edges().forEach(function(e) {
392
392
  var t = r.edge(e);
393
- S(t, "label") || (t.label = ""), C(t, he);
393
+ k(t, "label") || (t.label = ""), C(t, ce);
394
394
  });
395
395
  }
396
- function fe(r) {
396
+ function ue(r) {
397
397
  K(r.nodes(), function(e) {
398
398
  var t = r.node(e);
399
- 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;
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;
400
400
  });
401
401
  }
402
402
  function D(r, e) {
403
403
  var t = r.select("g." + e);
404
404
  return t.empty() && (t = r.append("g").attr("class", e)), t;
405
405
  }
406
- function lt(r, e, t) {
406
+ function ot(r, e, t) {
407
407
  const a = e.width, n = e.height, i = (a + n) * 0.9, s = [
408
408
  { x: i / 2, y: 0 },
409
409
  { x: i, y: -i / 2 },
410
410
  { x: i / 2, y: -i },
411
411
  { x: 0, y: -i / 2 }
412
- ], o = M(r, i, i, s);
413
- return t.intersect = function(d) {
414
- return I(t, s, d);
412
+ ], o = E(r, i, i, s);
413
+ return t.intersect = function(l) {
414
+ return A(t, s, l);
415
415
  }, o;
416
416
  }
417
- function dt(r, e, t) {
417
+ function lt(r, e, t) {
418
418
  const a = e.height, n = a / 4, i = e.width + 2 * n, s = [
419
419
  { x: n, y: 0 },
420
420
  { x: i - n, y: 0 },
@@ -422,86 +422,86 @@ function dt(r, e, t) {
422
422
  { x: i - n, y: -a },
423
423
  { x: n, y: -a },
424
424
  { x: 0, y: -a / 2 }
425
- ], o = M(r, i, a, s);
426
- return t.intersect = function(d) {
427
- return I(t, s, d);
425
+ ], o = E(r, i, a, s);
426
+ return t.intersect = function(l) {
427
+ return A(t, s, l);
428
428
  }, o;
429
429
  }
430
- function ct(r, e, t) {
430
+ function dt(r, e, t) {
431
431
  const a = e.width, n = e.height, i = [
432
432
  { x: -n / 2, y: 0 },
433
433
  { x: a, y: 0 },
434
434
  { x: a, y: -n },
435
435
  { x: -n / 2, y: -n },
436
436
  { x: 0, y: -n / 2 }
437
- ], s = M(r, a, n, i);
437
+ ], s = E(r, a, n, i);
438
438
  return t.intersect = function(o) {
439
- return I(t, i, o);
439
+ return A(t, i, o);
440
440
  }, s;
441
441
  }
442
- function ht(r, e, t) {
442
+ function ct(r, e, t) {
443
443
  const a = e.width, n = e.height, i = [
444
444
  { x: -2 * n / 6, y: 0 },
445
445
  { x: a - n / 6, y: 0 },
446
446
  { x: a + 2 * n / 6, y: -n },
447
447
  { x: n / 6, y: -n }
448
- ], s = M(r, a, n, i);
448
+ ], s = E(r, a, n, i);
449
449
  return t.intersect = function(o) {
450
- return I(t, i, o);
450
+ return A(t, i, o);
451
451
  }, s;
452
452
  }
453
- function ut(r, e, t) {
453
+ function ht(r, e, t) {
454
454
  const a = e.width, n = e.height, i = [
455
455
  { x: 2 * n / 6, y: 0 },
456
456
  { x: a + n / 6, y: 0 },
457
457
  { x: a - 2 * n / 6, y: -n },
458
458
  { x: -n / 6, y: -n }
459
- ], s = M(r, a, n, i);
459
+ ], s = E(r, a, n, i);
460
460
  return t.intersect = function(o) {
461
- return I(t, i, o);
461
+ return A(t, i, o);
462
462
  }, s;
463
463
  }
464
- function ft(r, e, t) {
464
+ function ut(r, e, t) {
465
465
  const a = e.width, n = e.height, i = [
466
466
  { x: -2 * n / 6, y: 0 },
467
467
  { x: a + 2 * n / 6, y: 0 },
468
468
  { x: a - n / 6, y: -n },
469
469
  { x: n / 6, y: -n }
470
- ], s = M(r, a, n, i);
470
+ ], s = E(r, a, n, i);
471
471
  return t.intersect = function(o) {
472
- return I(t, i, o);
472
+ return A(t, i, o);
473
473
  }, s;
474
474
  }
475
- function pt(r, e, t) {
475
+ function ft(r, e, t) {
476
476
  const a = e.width, n = e.height, i = [
477
477
  { x: n / 6, y: 0 },
478
478
  { x: a - n / 6, y: 0 },
479
479
  { x: a + 2 * n / 6, y: -n },
480
480
  { x: -2 * n / 6, y: -n }
481
- ], s = M(r, a, n, i);
481
+ ], s = E(r, a, n, i);
482
482
  return t.intersect = function(o) {
483
- return I(t, i, o);
483
+ return A(t, i, o);
484
484
  }, s;
485
485
  }
486
- function gt(r, e, t) {
486
+ function pt(r, e, t) {
487
487
  const a = e.width, n = e.height, i = [
488
488
  { x: 0, y: 0 },
489
489
  { x: a + n / 2, y: 0 },
490
490
  { x: a, y: -n / 2 },
491
491
  { x: a + n / 2, y: -n },
492
492
  { x: 0, y: -n }
493
- ], s = M(r, a, n, i);
493
+ ], s = E(r, a, n, i);
494
494
  return t.intersect = function(o) {
495
- return I(t, i, o);
495
+ return A(t, i, o);
496
496
  }, s;
497
497
  }
498
- function yt(r, e, t) {
498
+ function gt(r, e, t) {
499
499
  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
500
  return t.intersect = function(s) {
501
501
  return F(t, s);
502
502
  }, i;
503
503
  }
504
- function xt(r, e, t) {
504
+ function yt(r, e, t) {
505
505
  const a = e.width, n = e.height, i = [
506
506
  { x: 0, y: 0 },
507
507
  { x: a, y: 0 },
@@ -513,29 +513,29 @@ function xt(r, e, t) {
513
513
  { x: a + 8, y: -n },
514
514
  { x: -8, y: -n },
515
515
  { x: -8, y: 0 }
516
- ], s = M(r, a, n, i);
516
+ ], s = E(r, a, n, i);
517
517
  return t.intersect = function(o) {
518
- return I(t, i, o);
518
+ return A(t, i, o);
519
519
  }, s;
520
520
  }
521
- function wt(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, d = 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(u) {
524
- const l = F(t, u), g = l.x - t.x;
525
- 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)) {
526
- let c = i * i * (1 - g * g / (n * n));
527
- c != 0 && (c = Math.sqrt(c)), c = i - c, u.y - t.y > 0 && (c = -c), l.y += c;
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;
528
528
  }
529
- return l;
530
- }, d;
529
+ return d;
530
+ }, l;
531
531
  }
532
- function pe(r) {
533
- 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
+ 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;
534
534
  }
535
- function ge(r) {
536
- 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 });
535
+ 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 });
537
537
  }
538
- function M(r, e, t, a) {
538
+ function E(r, e, t, a) {
539
539
  return r.insert("polygon", ":first-child").attr(
540
540
  "points",
541
541
  a.map(function(n) {
@@ -543,126 +543,122 @@ function M(r, e, t, a) {
543
543
  }).join(" ")
544
544
  ).attr("transform", "translate(" + -e / 2 + "," + t / 2 + ")");
545
545
  }
546
- const ye = {
547
- addToRender: pe,
548
- addToRenderV2: ge
549
- }, vt = {}, xe = function(r) {
546
+ const ge = {
547
+ addToRender: fe,
548
+ addToRenderV2: pe
549
+ }, vt = {}, ye = function(r) {
550
550
  const e = Object.keys(r);
551
551
  for (const t of e)
552
552
  vt[t] = r[t];
553
- }, bt = async function(r, e, t, a, n, i) {
554
- const s = a ? a.select(`[id="${t}"]`) : v(`[id="${t}"]`), o = n || document, d = Object.keys(r);
555
- for (const u of d) {
556
- const l = r[u];
557
- let g = "default";
558
- l.classes.length > 0 && (g = l.classes.join(" "));
559
- const c = O(l.styles);
560
- let h = l.text !== void 0 ? l.text : l.id, p;
561
- if (J(R().flowchart.htmlLabels)) {
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)) {
562
562
  const x = {
563
- label: await tt(
564
- h.replace(
565
- /fa[blrs]?:fa-[\w-]+/g,
566
- // cspell:disable-line
567
- (k) => `<i class='${k.replace(":", " ")}'></i>`
568
- ),
569
- R()
563
+ label: f.replace(
564
+ /fa[blrs]?:fa-[\w-]+/g,
565
+ (v) => `<i class='${v.replace(":", " ")}'></i>`
570
566
  )
571
567
  };
572
- p = rt(s, x).node(), p.parentNode.removeChild(p);
568
+ h = et(s, x).node(), h.parentNode.removeChild(h);
573
569
  } else {
574
570
  const x = o.createElementNS("http://www.w3.org/2000/svg", "text");
575
- x.setAttribute("style", c.labelStyle.replace("color:", "fill:"));
576
- const k = h.split(et.lineBreakRegex);
577
- for (const N of k) {
578
- const _ = o.createElementNS("http://www.w3.org/2000/svg", "tspan");
579
- _.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), _.setAttribute("dy", "1em"), _.setAttribute("x", "1"), _.textContent = N, x.appendChild(_);
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);
580
576
  }
581
- p = x;
577
+ h = x;
582
578
  }
583
- let w = 0, f = "";
584
- switch (l.type) {
579
+ let p = 0, u = "";
580
+ switch (c.type) {
585
581
  case "round":
586
- w = 5, f = "rect";
582
+ p = 5, u = "rect";
587
583
  break;
588
584
  case "square":
589
- f = "rect";
585
+ u = "rect";
590
586
  break;
591
587
  case "diamond":
592
- f = "question";
588
+ u = "question";
593
589
  break;
594
590
  case "hexagon":
595
- f = "hexagon";
591
+ u = "hexagon";
596
592
  break;
597
593
  case "odd":
598
- f = "rect_left_inv_arrow";
594
+ u = "rect_left_inv_arrow";
599
595
  break;
600
596
  case "lean_right":
601
- f = "lean_right";
597
+ u = "lean_right";
602
598
  break;
603
599
  case "lean_left":
604
- f = "lean_left";
600
+ u = "lean_left";
605
601
  break;
606
602
  case "trapezoid":
607
- f = "trapezoid";
603
+ u = "trapezoid";
608
604
  break;
609
605
  case "inv_trapezoid":
610
- f = "inv_trapezoid";
606
+ u = "inv_trapezoid";
611
607
  break;
612
608
  case "odd_right":
613
- f = "rect_left_inv_arrow";
609
+ u = "rect_left_inv_arrow";
614
610
  break;
615
611
  case "circle":
616
- f = "circle";
612
+ u = "circle";
617
613
  break;
618
614
  case "ellipse":
619
- f = "ellipse";
615
+ u = "ellipse";
620
616
  break;
621
617
  case "stadium":
622
- f = "stadium";
618
+ u = "stadium";
623
619
  break;
624
620
  case "subroutine":
625
- f = "subroutine";
621
+ u = "subroutine";
626
622
  break;
627
623
  case "cylinder":
628
- f = "cylinder";
624
+ u = "cylinder";
629
625
  break;
630
626
  case "group":
631
- f = "rect";
627
+ u = "rect";
632
628
  break;
633
629
  default:
634
- f = "rect";
630
+ u = "rect";
635
631
  }
636
- U.warn("Adding node", l.id, l.domId), e.setNode(i.db.lookUpDomId(l.id), {
632
+ U.warn("Adding node", c.id, c.domId), e.setNode(i.db.lookUpDomId(c.id), {
637
633
  labelType: "svg",
638
- labelStyle: c.labelStyle,
639
- shape: f,
640
- label: p,
641
- rx: w,
642
- ry: w,
643
- class: g,
644
- style: c.style,
645
- id: i.db.lookUpDomId(l.id)
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)
646
642
  });
647
- }
648
- }, mt = async function(r, e, t) {
643
+ });
644
+ }, bt = function(r, e, t) {
649
645
  let a = 0, n, i;
650
646
  if (r.defaultStyle !== void 0) {
651
- const s = O(r.defaultStyle);
647
+ const s = q(r.defaultStyle);
652
648
  n = s.style, i = s.labelStyle;
653
649
  }
654
- for (const s of r) {
650
+ r.forEach(function(s) {
655
651
  a++;
656
- const o = "L-" + s.start + "-" + s.end, d = "LS-" + s.start, u = "LE-" + s.end, l = {};
657
- s.type === "arrow_open" ? l.arrowhead = "none" : l.arrowhead = "normal";
658
- let g = "", c = "";
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 = "";
659
655
  if (s.style !== void 0) {
660
- const h = O(s.style);
661
- g = h.style, c = h.labelStyle;
656
+ const h = q(s.style);
657
+ g = h.style, f = h.labelStyle;
662
658
  } else
663
659
  switch (s.stroke) {
664
660
  case "normal":
665
- g = "fill:none", n !== void 0 && (g = n), i !== void 0 && (c = i);
661
+ g = "fill:none", n !== void 0 && (g = n), i !== void 0 && (f = i);
666
662
  break;
667
663
  case "dotted":
668
664
  g = "fill:none;stroke-width:2px;stroke-dasharray:3;";
@@ -671,32 +667,28 @@ const ye = {
671
667
  g = " stroke-width: 3.5px;fill:none";
672
668
  break;
673
669
  }
674
- 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(
675
- s.text.replace(
676
- /fa[blrs]?:fa-[\w-]+/g,
677
- // cspell:disable-line
678
- (h) => `<i class='${h.replace(":", " ")}'></i>`
679
- ),
680
- R()
681
- )}</span>`) : (l.labelType = "text", l.label = s.text.replace(et.lineBreakRegex, `
682
- `), 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);
683
- }
684
- }, we = function(r, e) {
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) {
685
677
  return U.info("Extracting classes"), e.db.getClasses();
686
- }, ve = async function(r, e, t, a) {
678
+ }, ve = function(r, e, t, a) {
687
679
  U.info("Drawing flowchart");
688
- const { securityLevel: n, flowchart: i } = R();
680
+ const { securityLevel: n, flowchart: i } = H();
689
681
  let s;
690
- n === "sandbox" && (s = v("#i" + e));
691
- const o = n === "sandbox" ? v(s.nodes()[0].contentDocument.body) : v("body"), d = n === "sandbox" ? s.nodes()[0].contentDocument : document;
692
- let u = a.db.getDirection();
693
- u === void 0 && (u = "TD");
694
- const l = i.nodeSpacing || 50, g = i.rankSpacing || 50, c = new St({
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({
695
687
  multigraph: !0,
696
688
  compound: !0
697
689
  }).setGraph({
698
- rankdir: u,
699
- nodesep: l,
690
+ rankdir: c,
691
+ nodesep: d,
700
692
  ranksep: g,
701
693
  marginx: 8,
702
694
  marginy: 8
@@ -707,82 +699,82 @@ const ye = {
707
699
  const p = a.db.getSubGraphs();
708
700
  for (let y = p.length - 1; y >= 0; y--)
709
701
  h = p[y], a.db.addVertex(h.id, h.title, "group", void 0, h.classes);
710
- const w = a.db.getVertices();
711
- U.warn("Get vertices", w);
712
- const f = a.db.getEdges();
713
- let x = 0;
714
- for (x = p.length - 1; x >= 0; x--) {
715
- h = p[x], Bt("cluster").append("text");
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");
716
708
  for (let y = 0; y < h.nodes.length; y++)
717
709
  U.warn(
718
710
  "Setting subgraph",
719
711
  h.nodes[y],
720
712
  a.db.lookUpDomId(h.nodes[y]),
721
713
  a.db.lookUpDomId(h.id)
722
- ), c.setParent(a.db.lookUpDomId(h.nodes[y]), a.db.lookUpDomId(h.id));
714
+ ), f.setParent(a.db.lookUpDomId(h.nodes[y]), a.db.lookUpDomId(h.id));
723
715
  }
724
- await bt(w, c, e, o, d, a), await mt(f, c, a);
725
- const k = new de();
726
- ye.addToRender(k), k.arrows().none = function(y, b, L, m) {
727
- 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");
728
- T(B, L[m + "Style"]);
729
- }, k.arrows().normal = function(y, b) {
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) {
730
722
  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");
731
723
  };
732
- const N = o.select(`[id="${e}"]`), _ = o.select("#" + e + " g");
733
- for (k(_, c), _.selectAll("g.node").attr("title", function() {
724
+ const I = o.select(`[id="${e}"]`), B = o.select("#" + e + " g");
725
+ for (S(B, f), B.selectAll("g.node").attr("title", function() {
734
726
  return a.db.getTooltip(this.id);
735
- }), a.db.indexNodes("subGraph" + x), x = 0; x < p.length; x++)
736
- if (h = p[x], h.title !== "undefined") {
737
- const y = d.querySelectorAll(
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(
738
730
  "#" + e + ' [id="' + a.db.lookUpDomId(h.id) + '"] rect'
739
- ), b = d.querySelectorAll(
731
+ ), b = l.querySelectorAll(
740
732
  "#" + e + ' [id="' + a.db.lookUpDomId(h.id) + '"]'
741
- ), L = y[0].x.baseVal.value, m = y[0].y.baseVal.value, B = y[0].width.baseVal.value, E = v(b[0]).select(".label");
742
- E.attr("transform", `translate(${L + B / 2}, ${m + 14})`), E.attr("id", e + "Text");
743
- for (let $ = 0; $ < h.classes.length; $++)
744
- b[0].classList.add(h.classes[$]);
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]);
745
737
  }
746
738
  if (!i.htmlLabels) {
747
- const y = d.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
739
+ const y = l.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
748
740
  for (const b of y) {
749
- const L = b.getBBox(), m = d.createElementNS("http://www.w3.org/2000/svg", "rect");
750
- m.setAttribute("rx", 0), m.setAttribute("ry", 0), m.setAttribute("width", L.width), m.setAttribute("height", L.height), b.insertBefore(m, b.firstChild);
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);
751
743
  }
752
744
  }
753
- _t(c, N, i.diagramPadding, i.useMaxWidth), Object.keys(w).forEach(function(y) {
754
- const b = w[y];
745
+ St(f, I, i.diagramPadding, i.useMaxWidth), Object.keys(u).forEach(function(y) {
746
+ const b = u[y];
755
747
  if (b.link) {
756
- const L = o.select("#" + e + ' [id="' + a.db.lookUpDomId(y) + '"]');
757
- if (L) {
758
- const m = d.createElementNS("http://www.w3.org/2000/svg", "a");
748
+ const _ = o.select("#" + e + ' [id="' + a.db.lookUpDomId(y) + '"]');
749
+ if (_) {
750
+ const m = l.createElementNS("http://www.w3.org/2000/svg", "a");
759
751
  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);
760
- const B = L.insert(function() {
752
+ const M = _.insert(function() {
761
753
  return m;
762
- }, ":first-child"), E = L.select(".label-container");
763
- E && B.append(function() {
764
- return E.node();
765
- });
766
- const $ = L.select(".label");
767
- $ && B.append(function() {
754
+ }, ":first-child"), $ = _.select(".label-container");
755
+ $ && M.append(function() {
768
756
  return $.node();
769
757
  });
758
+ const N = _.select(".label");
759
+ N && M.append(function() {
760
+ return N.node();
761
+ });
770
762
  }
771
763
  }
772
764
  });
773
- }, be = {
774
- setConf: xe,
775
- addVertices: bt,
776
- addEdges: mt,
777
- getClasses: we,
765
+ }, we = {
766
+ setConf: ye,
767
+ addVertices: wt,
768
+ addEdges: bt,
769
+ getClasses: xe,
778
770
  draw: ve
779
771
  }, Ie = {
780
- parser: kt,
781
- db: P,
782
- renderer: Mt,
783
- styles: Nt,
772
+ parser: mt,
773
+ db: O,
774
+ renderer: Tt,
775
+ styles: Et,
784
776
  init: (r) => {
785
- r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, be.setConf(r.flowchart), P.clear(), P.setGen("gen-1");
777
+ r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, we.setConf(r.flowchart), O.clear(), O.setGen("gen-1");
786
778
  }
787
779
  };
788
780
  export {