@ucap-llm/ai-ui 1.1.13 → 1.1.15

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 (111) hide show
  1. package/_basePickBy-DMehTBs0-8955b30b.mjs +151 -0
  2. package/_basePickBy-e7598e72.mjs +153 -0
  3. package/{_baseUniq-2bcae05e.mjs → _baseUniq-8cd7fbc4.mjs} +150 -150
  4. package/_baseUniq-DPnX6tpB-5eb6efbd.mjs +615 -0
  5. package/ai-ui.es.js +9 -8
  6. package/ai-ui.umd.js +3425 -923
  7. package/arc-8909f880.mjs +85 -0
  8. package/arc-qimaJRLH-591a6072.mjs +85 -0
  9. package/architecture-4AB2E3PP-DFmEpUnA-62fe65dd.mjs +10 -0
  10. package/architecture-4AB2E3PP-b04ae9dd.mjs +10 -0
  11. package/{architectureDiagram-IEHRJDOE-e4684ef3.mjs → architectureDiagram-IEHRJDOE-1ccc2c64.mjs} +123 -123
  12. package/architectureDiagram-IEHRJDOE-BRVAVUEE-c068faae.mjs +4641 -0
  13. package/{blockDiagram-JOT3LUYC-504ee31e.mjs → blockDiagram-JOT3LUYC-63569de5.mjs} +5 -5
  14. package/blockDiagram-JOT3LUYC-Cs4tSRey-54d8e29b.mjs +2251 -0
  15. package/{c4Diagram-VJAJSXHY-c5ba6af4.mjs → c4Diagram-VJAJSXHY-355a4170.mjs} +23 -23
  16. package/c4Diagram-VJAJSXHY-C3F9fO0L-0df97cd8.mjs +1583 -0
  17. package/channel-CuHzivgY-bb3d765a.mjs +5 -0
  18. package/channel-a1f4f18c.mjs +5 -0
  19. package/{chunk-4BMEZGHF-8d9a2e4f.mjs → chunk-4BMEZGHF-705995af.mjs} +1 -1
  20. package/chunk-4BMEZGHF-btTOjzEX-c9c5432c.mjs +9 -0
  21. package/{chunk-A2AXSNBT-41ae29f2.mjs → chunk-A2AXSNBT-3a857566.mjs} +10 -10
  22. package/chunk-A2AXSNBT-CPBZRsS7-a80df701.mjs +1373 -0
  23. package/{chunk-AEK57VVT-69e121d6.mjs → chunk-AEK57VVT-6c60e1ee.mjs} +45 -45
  24. package/chunk-AEK57VVT-D62Iwyam-238a3d85.mjs +1361 -0
  25. package/{chunk-D6G4REZN-472adc5b.mjs → chunk-D6G4REZN-11c52918.mjs} +5 -5
  26. package/chunk-D6G4REZN-HlFmQTJy-20704636.mjs +64 -0
  27. package/chunk-RZ5BOZE2-DIFgOqDt-495bec03.mjs +24 -0
  28. package/{chunk-RZ5BOZE2-b7d5d4f5.mjs → chunk-RZ5BOZE2-d6db8103.mjs} +9 -9
  29. package/chunk-XZIHB7SX-CCrbsG0u-f30e4124.mjs +15 -0
  30. package/{chunk-XZIHB7SX-56c08d07.mjs → chunk-XZIHB7SX-fafd3ca2.mjs} +1 -1
  31. package/classDiagram-GIVACNV2-Bv5U0XPL-622b22ed.mjs +18 -0
  32. package/{classDiagram-v2-COTLJTTW-1deea5cc.mjs → classDiagram-GIVACNV2-eca9aeb6.mjs} +5 -5
  33. package/classDiagram-v2-COTLJTTW-Bv5U0XPL-622b22ed.mjs +18 -0
  34. package/{classDiagram-GIVACNV2-1deea5cc.mjs → classDiagram-v2-COTLJTTW-eca9aeb6.mjs} +5 -5
  35. package/{clone-1f18a17f.mjs → clone-327a1426.mjs} +1 -1
  36. package/clone-Csc9uFbU-6c4f28bd.mjs +8 -0
  37. package/cytoscape.esm-Swd9B-1A-3101f241.mjs +18730 -0
  38. package/{dagre-OKDRZEBW-74e73dcf.mjs → dagre-OKDRZEBW-9059bb36.mjs} +81 -81
  39. package/dagre-OKDRZEBW-CoMQYlxF-96274fb0.mjs +448 -0
  40. package/{diagram-SSKATNLV-1a562cb0.mjs → diagram-SSKATNLV-70f68e72.mjs} +34 -34
  41. package/diagram-SSKATNLV-CPuZUaGP-50edcaa0.mjs +225 -0
  42. package/{diagram-VNBRO52H-b765e46f.mjs → diagram-VNBRO52H-39273710.mjs} +35 -35
  43. package/diagram-VNBRO52H-DIIZ-Sll-969266e6.mjs +130 -0
  44. package/{erDiagram-Q7BY3M3F-022c4343.mjs → erDiagram-Q7BY3M3F-96ba3906.mjs} +3 -3
  45. package/erDiagram-Q7BY3M3F-ZKWAM_uE-41c0350d.mjs +843 -0
  46. package/{flowDiagram-4HSFHLVR-6036e284.mjs → flowDiagram-4HSFHLVR-795e3830.mjs} +29 -29
  47. package/flowDiagram-4HSFHLVR-CUJXGEG3-801dde13.mjs +1624 -0
  48. package/{ganttDiagram-APWFNJXF-be871387.mjs → ganttDiagram-APWFNJXF-736e67b6.mjs} +398 -398
  49. package/ganttDiagram-APWFNJXF-C1pgubbs-20beffc3.mjs +2527 -0
  50. package/gitGraph-O2Q2CXLX-00465db9.mjs +10 -0
  51. package/gitGraph-O2Q2CXLX-BYavwGzs-e5f1990e.mjs +10 -0
  52. package/{gitGraphDiagram-7IBYFJ6S-da63c888.mjs → gitGraphDiagram-7IBYFJ6S-115329ab.mjs} +88 -88
  53. package/gitGraphDiagram-7IBYFJ6S-CndxirR4-b39d4089.mjs +716 -0
  54. package/{graph-e71f0e3e.mjs → graph-9e073c5f.mjs} +8 -8
  55. package/graph-DOmtxVvg-727f4e14.mjs +247 -0
  56. package/index-433e2395.mjs +168385 -0
  57. package/info-4N47QTOZ-688db415.mjs +10 -0
  58. package/info-4N47QTOZ-DPyDFN1Z-821cf2f7.mjs +10 -0
  59. package/{infoDiagram-PH2N3AL5-3e1c1c1f.mjs → infoDiagram-PH2N3AL5-29e9585a.mjs} +9 -9
  60. package/infoDiagram-PH2N3AL5-BkSS3vpU-ef4bf66d.mjs +26 -0
  61. package/init-DjUOC4st-87c930f1.mjs +16 -0
  62. package/{journeyDiagram-U35MCT3I-6d29748d.mjs → journeyDiagram-U35MCT3I-7c5644d1.mjs} +41 -41
  63. package/journeyDiagram-U35MCT3I-BN-kCDeJ-ac350902.mjs +811 -0
  64. package/{kanban-definition-NDS4AKOZ-c231ae4c.mjs → kanban-definition-NDS4AKOZ-eff441f9.mjs} +47 -47
  65. package/kanban-definition-NDS4AKOZ-gaDUOiKt-efdba942.mjs +720 -0
  66. package/{layout-b9b9e407.mjs → layout-501d22f0.mjs} +19 -19
  67. package/layout-8X5HiOVA-b6e13cf9.mjs +1323 -0
  68. package/linear-BgV5F0PU-8137edad.mjs +447 -0
  69. package/{linear-99040ddc.mjs → linear-fd3cd932.mjs} +56 -56
  70. package/{mermaid-parser.core-55f134dc.mjs → mermaid-parser.core-6eb44241.mjs} +160 -160
  71. package/mermaid-parser.core-BTS3sfcL-8c80284a.mjs +12810 -0
  72. package/{mindmap-definition-ALO5MXBD-938e2e65.mjs → mindmap-definition-ALO5MXBD-2fe3c748.mjs} +1 -1
  73. package/mindmap-definition-ALO5MXBD-B8q_1sIj-c3599d3c.mjs +3225 -0
  74. package/ordinal-DfAQgscy-1c8e46a9.mjs +65 -0
  75. package/package.json +2 -2
  76. package/packet-KVYON367-DcfdOX-U-afac932a.mjs +10 -0
  77. package/packet-KVYON367-c82af3fe.mjs +10 -0
  78. package/pie-R6RNRRYF-DKruFncB-d07f60c2.mjs +10 -0
  79. package/pie-R6RNRRYF-eb27797b.mjs +10 -0
  80. package/pieDiagram-IB7DONF6-Bijui6_Q-db9fdf3a.mjs +166 -0
  81. package/{pieDiagram-IB7DONF6-6a11673b.mjs → pieDiagram-IB7DONF6-e6863984.mjs} +36 -36
  82. package/{quadrantDiagram-7GDLP6J5-a4a4d9ac.mjs → quadrantDiagram-7GDLP6J5-88df12c2.mjs} +15 -15
  83. package/quadrantDiagram-7GDLP6J5-DzIzViUj-b13add98.mjs +1027 -0
  84. package/radar-MK3ICKWK-723229d0.mjs +10 -0
  85. package/radar-MK3ICKWK-D8wbkmr5-3165faf6.mjs +10 -0
  86. package/{requirementDiagram-KVF5MWMF-a7093c74.mjs → requirementDiagram-KVF5MWMF-7228051c.mjs} +50 -50
  87. package/requirementDiagram-KVF5MWMF-Hqsbdpfq-23374f24.mjs +853 -0
  88. package/{sankeyDiagram-QLVOVGJD-f4bcbb2d.mjs → sankeyDiagram-QLVOVGJD-00a31a99.mjs} +87 -87
  89. package/sankeyDiagram-QLVOVGJD-DGCeusqJ-8ca7e64d.mjs +826 -0
  90. package/{sequenceDiagram-X6HHIX6F-9071cfff.mjs → sequenceDiagram-X6HHIX6F-de203309.mjs} +3 -3
  91. package/sequenceDiagram-X6HHIX6F-kuEE9wSd-5f0ec5cd.mjs +2283 -0
  92. package/{stateDiagram-DGXRK772-fb22a7a5.mjs → stateDiagram-DGXRK772-2341237a.mjs} +48 -48
  93. package/stateDiagram-DGXRK772-Cq-Ce3WP-266efa7f.mjs +274 -0
  94. package/{stateDiagram-v2-YXO3MK2T-67326b76.mjs → stateDiagram-v2-YXO3MK2T-8c81deed.mjs} +5 -5
  95. package/stateDiagram-v2-YXO3MK2T-CplwFWn1-c0024e4e.mjs +18 -0
  96. package/style.css +10 -1
  97. package/timeline-definition-BDJGKUSR-USv5sZzx-22548912.mjs +806 -0
  98. package/{timeline-definition-BDJGKUSR-44f50d45.mjs → timeline-definition-BDJGKUSR-e615901b.mjs} +79 -79
  99. package/{xychartDiagram-VJFVF3MP-2df503f6.mjs → xychartDiagram-VJFVF3MP-9ad66a6b.mjs} +28 -28
  100. package/xychartDiagram-VJFVF3MP-CXCfFZBM-e5ca151e.mjs +1306 -0
  101. package/_basePickBy-12958109.mjs +0 -153
  102. package/arc-14f9a207.mjs +0 -85
  103. package/architecture-4AB2E3PP-bb512ddb.mjs +0 -10
  104. package/channel-7bd711b4.mjs +0 -5
  105. package/gitGraph-O2Q2CXLX-83cfcbef.mjs +0 -10
  106. package/index-f83d4b07.mjs +0 -97448
  107. package/info-4N47QTOZ-20cf90f5.mjs +0 -10
  108. package/katex-2e45926a.mjs +0 -11700
  109. package/packet-KVYON367-453a49e8.mjs +0 -10
  110. package/pie-R6RNRRYF-4d95c8dc.mjs +0 -10
  111. package/radar-MK3ICKWK-100e8fa4.mjs +0 -10
@@ -0,0 +1,3225 @@
1
+ import { v as x, $ as _t, J as K, e as Nt, aU as At, a5 as Tt, l as st, a3 as Lt, aD as Dt, A as J, w as tt, aE as Ot, aF as wt, aG as It } from "./index-433e2395.mjs";
2
+ import { J as pt } from "./cytoscape.esm-Swd9B-1A-3101f241.mjs";
3
+ import "vue";
4
+ var it = { exports: {} }, rt = { exports: {} }, nt = { exports: {} }, Ct = nt.exports, gt;
5
+ function Rt() {
6
+ return gt || (gt = 1, function(O, R) {
7
+ (function(p, T) {
8
+ O.exports = T();
9
+ })(Ct, function() {
10
+ return (
11
+ /******/
12
+ function(p) {
13
+ var T = {};
14
+ function y(i) {
15
+ if (T[i])
16
+ return T[i].exports;
17
+ var t = T[i] = {
18
+ /******/
19
+ i,
20
+ /******/
21
+ l: !1,
22
+ /******/
23
+ exports: {}
24
+ /******/
25
+ };
26
+ return p[i].call(t.exports, t, t.exports, y), t.l = !0, t.exports;
27
+ }
28
+ return y.m = p, y.c = T, y.i = function(i) {
29
+ return i;
30
+ }, y.d = function(i, t, e) {
31
+ y.o(i, t) || Object.defineProperty(i, t, {
32
+ /******/
33
+ configurable: !1,
34
+ /******/
35
+ enumerable: !0,
36
+ /******/
37
+ get: e
38
+ /******/
39
+ });
40
+ }, y.n = function(i) {
41
+ var t = i && i.__esModule ? (
42
+ /******/
43
+ function() {
44
+ return i.default;
45
+ }
46
+ ) : (
47
+ /******/
48
+ function() {
49
+ return i;
50
+ }
51
+ );
52
+ return y.d(t, "a", t), t;
53
+ }, y.o = function(i, t) {
54
+ return Object.prototype.hasOwnProperty.call(i, t);
55
+ }, y.p = "", y(y.s = 26);
56
+ }([
57
+ /* 0 */
58
+ /***/
59
+ function(p, T, y) {
60
+ function i() {
61
+ }
62
+ i.QUALITY = 1, i.DEFAULT_CREATE_BENDS_AS_NEEDED = !1, i.DEFAULT_INCREMENTAL = !1, i.DEFAULT_ANIMATION_ON_LAYOUT = !0, i.DEFAULT_ANIMATION_DURING_LAYOUT = !1, i.DEFAULT_ANIMATION_PERIOD = 50, i.DEFAULT_UNIFORM_LEAF_NODE_SIZES = !1, i.DEFAULT_GRAPH_MARGIN = 15, i.NODE_DIMENSIONS_INCLUDE_LABELS = !1, i.SIMPLE_NODE_SIZE = 40, i.SIMPLE_NODE_HALF_SIZE = i.SIMPLE_NODE_SIZE / 2, i.EMPTY_COMPOUND_NODE_SIZE = 40, i.MIN_EDGE_LENGTH = 1, i.WORLD_BOUNDARY = 1e6, i.INITIAL_WORLD_BOUNDARY = i.WORLD_BOUNDARY / 1e3, i.WORLD_CENTER_X = 1200, i.WORLD_CENTER_Y = 900, p.exports = i;
63
+ },
64
+ /* 1 */
65
+ /***/
66
+ function(p, T, y) {
67
+ var i = y(2), t = y(8), e = y(9);
68
+ function r(h, s, f) {
69
+ i.call(this, f), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = f, this.bendpoints = [], this.source = h, this.target = s;
70
+ }
71
+ r.prototype = Object.create(i.prototype);
72
+ for (var a in i)
73
+ r[a] = i[a];
74
+ r.prototype.getSource = function() {
75
+ return this.source;
76
+ }, r.prototype.getTarget = function() {
77
+ return this.target;
78
+ }, r.prototype.isInterGraph = function() {
79
+ return this.isInterGraph;
80
+ }, r.prototype.getLength = function() {
81
+ return this.length;
82
+ }, r.prototype.isOverlapingSourceAndTarget = function() {
83
+ return this.isOverlapingSourceAndTarget;
84
+ }, r.prototype.getBendpoints = function() {
85
+ return this.bendpoints;
86
+ }, r.prototype.getLca = function() {
87
+ return this.lca;
88
+ }, r.prototype.getSourceInLca = function() {
89
+ return this.sourceInLca;
90
+ }, r.prototype.getTargetInLca = function() {
91
+ return this.targetInLca;
92
+ }, r.prototype.getOtherEnd = function(h) {
93
+ if (this.source === h)
94
+ return this.target;
95
+ if (this.target === h)
96
+ return this.source;
97
+ throw "Node is not incident with this edge";
98
+ }, r.prototype.getOtherEndInGraph = function(h, s) {
99
+ for (var f = this.getOtherEnd(h), o = s.getGraphManager().getRoot(); ; ) {
100
+ if (f.getOwner() == s)
101
+ return f;
102
+ if (f.getOwner() == o)
103
+ break;
104
+ f = f.getOwner().getParent();
105
+ }
106
+ return null;
107
+ }, r.prototype.updateLength = function() {
108
+ var h = new Array(4);
109
+ this.isOverlapingSourceAndTarget = t.getIntersection(this.target.getRect(), this.source.getRect(), h), this.isOverlapingSourceAndTarget || (this.lengthX = h[0] - h[2], this.lengthY = h[1] - h[3], Math.abs(this.lengthX) < 1 && (this.lengthX = e.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = e.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY));
110
+ }, r.prototype.updateLengthSimple = function() {
111
+ this.lengthX = this.target.getCenterX() - this.source.getCenterX(), this.lengthY = this.target.getCenterY() - this.source.getCenterY(), Math.abs(this.lengthX) < 1 && (this.lengthX = e.sign(this.lengthX)), Math.abs(this.lengthY) < 1 && (this.lengthY = e.sign(this.lengthY)), this.length = Math.sqrt(this.lengthX * this.lengthX + this.lengthY * this.lengthY);
112
+ }, p.exports = r;
113
+ },
114
+ /* 2 */
115
+ /***/
116
+ function(p, T, y) {
117
+ function i(t) {
118
+ this.vGraphObject = t;
119
+ }
120
+ p.exports = i;
121
+ },
122
+ /* 3 */
123
+ /***/
124
+ function(p, T, y) {
125
+ var i = y(2), t = y(10), e = y(13), r = y(0), a = y(16), h = y(4);
126
+ function s(o, d, c, E) {
127
+ c == null && E == null && (E = d), i.call(this, E), o.graphManager != null && (o = o.graphManager), this.estimatedSize = t.MIN_VALUE, this.inclusionTreeDepth = t.MAX_VALUE, this.vGraphObject = E, this.edges = [], this.graphManager = o, c != null && d != null ? this.rect = new e(d.x, d.y, c.width, c.height) : this.rect = new e();
128
+ }
129
+ s.prototype = Object.create(i.prototype);
130
+ for (var f in i)
131
+ s[f] = i[f];
132
+ s.prototype.getEdges = function() {
133
+ return this.edges;
134
+ }, s.prototype.getChild = function() {
135
+ return this.child;
136
+ }, s.prototype.getOwner = function() {
137
+ return this.owner;
138
+ }, s.prototype.getWidth = function() {
139
+ return this.rect.width;
140
+ }, s.prototype.setWidth = function(o) {
141
+ this.rect.width = o;
142
+ }, s.prototype.getHeight = function() {
143
+ return this.rect.height;
144
+ }, s.prototype.setHeight = function(o) {
145
+ this.rect.height = o;
146
+ }, s.prototype.getCenterX = function() {
147
+ return this.rect.x + this.rect.width / 2;
148
+ }, s.prototype.getCenterY = function() {
149
+ return this.rect.y + this.rect.height / 2;
150
+ }, s.prototype.getCenter = function() {
151
+ return new h(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
152
+ }, s.prototype.getLocation = function() {
153
+ return new h(this.rect.x, this.rect.y);
154
+ }, s.prototype.getRect = function() {
155
+ return this.rect;
156
+ }, s.prototype.getDiagonal = function() {
157
+ return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
158
+ }, s.prototype.getHalfTheDiagonal = function() {
159
+ return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
160
+ }, s.prototype.setRect = function(o, d) {
161
+ this.rect.x = o.x, this.rect.y = o.y, this.rect.width = d.width, this.rect.height = d.height;
162
+ }, s.prototype.setCenter = function(o, d) {
163
+ this.rect.x = o - this.rect.width / 2, this.rect.y = d - this.rect.height / 2;
164
+ }, s.prototype.setLocation = function(o, d) {
165
+ this.rect.x = o, this.rect.y = d;
166
+ }, s.prototype.moveBy = function(o, d) {
167
+ this.rect.x += o, this.rect.y += d;
168
+ }, s.prototype.getEdgeListToNode = function(o) {
169
+ var d = [], c = this;
170
+ return c.edges.forEach(function(E) {
171
+ if (E.target == o) {
172
+ if (E.source != c)
173
+ throw "Incorrect edge source!";
174
+ d.push(E);
175
+ }
176
+ }), d;
177
+ }, s.prototype.getEdgesBetween = function(o) {
178
+ var d = [], c = this;
179
+ return c.edges.forEach(function(E) {
180
+ if (!(E.source == c || E.target == c))
181
+ throw "Incorrect edge source and/or target";
182
+ (E.target == o || E.source == o) && d.push(E);
183
+ }), d;
184
+ }, s.prototype.getNeighborsList = function() {
185
+ var o = /* @__PURE__ */ new Set(), d = this;
186
+ return d.edges.forEach(function(c) {
187
+ if (c.source == d)
188
+ o.add(c.target);
189
+ else {
190
+ if (c.target != d)
191
+ throw "Incorrect incidency!";
192
+ o.add(c.source);
193
+ }
194
+ }), o;
195
+ }, s.prototype.withChildren = function() {
196
+ var o = /* @__PURE__ */ new Set(), d, c;
197
+ if (o.add(this), this.child != null)
198
+ for (var E = this.child.getNodes(), _ = 0; _ < E.length; _++)
199
+ d = E[_], c = d.withChildren(), c.forEach(function(m) {
200
+ o.add(m);
201
+ });
202
+ return o;
203
+ }, s.prototype.getNoOfChildren = function() {
204
+ var o = 0, d;
205
+ if (this.child == null)
206
+ o = 1;
207
+ else
208
+ for (var c = this.child.getNodes(), E = 0; E < c.length; E++)
209
+ d = c[E], o += d.getNoOfChildren();
210
+ return o == 0 && (o = 1), o;
211
+ }, s.prototype.getEstimatedSize = function() {
212
+ if (this.estimatedSize == t.MIN_VALUE)
213
+ throw "assert failed";
214
+ return this.estimatedSize;
215
+ }, s.prototype.calcEstimatedSize = function() {
216
+ return this.child == null ? this.estimatedSize = (this.rect.width + this.rect.height) / 2 : (this.estimatedSize = this.child.calcEstimatedSize(), this.rect.width = this.estimatedSize, this.rect.height = this.estimatedSize, this.estimatedSize);
217
+ }, s.prototype.scatter = function() {
218
+ var o, d, c = -r.INITIAL_WORLD_BOUNDARY, E = r.INITIAL_WORLD_BOUNDARY;
219
+ o = r.WORLD_CENTER_X + a.nextDouble() * (E - c) + c;
220
+ var _ = -r.INITIAL_WORLD_BOUNDARY, m = r.INITIAL_WORLD_BOUNDARY;
221
+ d = r.WORLD_CENTER_Y + a.nextDouble() * (m - _) + _, this.rect.x = o, this.rect.y = d;
222
+ }, s.prototype.updateBounds = function() {
223
+ if (this.getChild() == null)
224
+ throw "assert failed";
225
+ if (this.getChild().getNodes().length != 0) {
226
+ var o = this.getChild();
227
+ if (o.updateBounds(!0), this.rect.x = o.getLeft(), this.rect.y = o.getTop(), this.setWidth(o.getRight() - o.getLeft()), this.setHeight(o.getBottom() - o.getTop()), r.NODE_DIMENSIONS_INCLUDE_LABELS) {
228
+ var d = o.getRight() - o.getLeft(), c = o.getBottom() - o.getTop();
229
+ this.labelWidth > d && (this.rect.x -= (this.labelWidth - d) / 2, this.setWidth(this.labelWidth)), this.labelHeight > c && (this.labelPos == "center" ? this.rect.y -= (this.labelHeight - c) / 2 : this.labelPos == "top" && (this.rect.y -= this.labelHeight - c), this.setHeight(this.labelHeight));
230
+ }
231
+ }
232
+ }, s.prototype.getInclusionTreeDepth = function() {
233
+ if (this.inclusionTreeDepth == t.MAX_VALUE)
234
+ throw "assert failed";
235
+ return this.inclusionTreeDepth;
236
+ }, s.prototype.transform = function(o) {
237
+ var d = this.rect.x;
238
+ d > r.WORLD_BOUNDARY ? d = r.WORLD_BOUNDARY : d < -r.WORLD_BOUNDARY && (d = -r.WORLD_BOUNDARY);
239
+ var c = this.rect.y;
240
+ c > r.WORLD_BOUNDARY ? c = r.WORLD_BOUNDARY : c < -r.WORLD_BOUNDARY && (c = -r.WORLD_BOUNDARY);
241
+ var E = new h(d, c), _ = o.inverseTransformPoint(E);
242
+ this.setLocation(_.x, _.y);
243
+ }, s.prototype.getLeft = function() {
244
+ return this.rect.x;
245
+ }, s.prototype.getRight = function() {
246
+ return this.rect.x + this.rect.width;
247
+ }, s.prototype.getTop = function() {
248
+ return this.rect.y;
249
+ }, s.prototype.getBottom = function() {
250
+ return this.rect.y + this.rect.height;
251
+ }, s.prototype.getParent = function() {
252
+ return this.owner == null ? null : this.owner.getParent();
253
+ }, p.exports = s;
254
+ },
255
+ /* 4 */
256
+ /***/
257
+ function(p, T, y) {
258
+ function i(t, e) {
259
+ t == null && e == null ? (this.x = 0, this.y = 0) : (this.x = t, this.y = e);
260
+ }
261
+ i.prototype.getX = function() {
262
+ return this.x;
263
+ }, i.prototype.getY = function() {
264
+ return this.y;
265
+ }, i.prototype.setX = function(t) {
266
+ this.x = t;
267
+ }, i.prototype.setY = function(t) {
268
+ this.y = t;
269
+ }, i.prototype.getDifference = function(t) {
270
+ return new DimensionD(this.x - t.x, this.y - t.y);
271
+ }, i.prototype.getCopy = function() {
272
+ return new i(this.x, this.y);
273
+ }, i.prototype.translate = function(t) {
274
+ return this.x += t.width, this.y += t.height, this;
275
+ }, p.exports = i;
276
+ },
277
+ /* 5 */
278
+ /***/
279
+ function(p, T, y) {
280
+ var i = y(2), t = y(10), e = y(0), r = y(6), a = y(3), h = y(1), s = y(13), f = y(12), o = y(11);
281
+ function d(E, _, m) {
282
+ i.call(this, m), this.estimatedSize = t.MIN_VALUE, this.margin = e.DEFAULT_GRAPH_MARGIN, this.edges = [], this.nodes = [], this.isConnected = !1, this.parent = E, _ != null && _ instanceof r ? this.graphManager = _ : _ != null && _ instanceof Layout && (this.graphManager = _.graphManager);
283
+ }
284
+ d.prototype = Object.create(i.prototype);
285
+ for (var c in i)
286
+ d[c] = i[c];
287
+ d.prototype.getNodes = function() {
288
+ return this.nodes;
289
+ }, d.prototype.getEdges = function() {
290
+ return this.edges;
291
+ }, d.prototype.getGraphManager = function() {
292
+ return this.graphManager;
293
+ }, d.prototype.getParent = function() {
294
+ return this.parent;
295
+ }, d.prototype.getLeft = function() {
296
+ return this.left;
297
+ }, d.prototype.getRight = function() {
298
+ return this.right;
299
+ }, d.prototype.getTop = function() {
300
+ return this.top;
301
+ }, d.prototype.getBottom = function() {
302
+ return this.bottom;
303
+ }, d.prototype.isConnected = function() {
304
+ return this.isConnected;
305
+ }, d.prototype.add = function(E, _, m) {
306
+ if (_ == null && m == null) {
307
+ var N = E;
308
+ if (this.graphManager == null)
309
+ throw "Graph has no graph mgr!";
310
+ if (this.getNodes().indexOf(N) > -1)
311
+ throw "Node already in graph!";
312
+ return N.owner = this, this.getNodes().push(N), N;
313
+ } else {
314
+ var L = E;
315
+ if (!(this.getNodes().indexOf(_) > -1 && this.getNodes().indexOf(m) > -1))
316
+ throw "Source or target not in graph!";
317
+ if (!(_.owner == m.owner && _.owner == this))
318
+ throw "Both owners must be this graph!";
319
+ return _.owner != m.owner ? null : (L.source = _, L.target = m, L.isInterGraph = !1, this.getEdges().push(L), _.edges.push(L), m != _ && m.edges.push(L), L);
320
+ }
321
+ }, d.prototype.remove = function(E) {
322
+ var _ = E;
323
+ if (E instanceof a) {
324
+ if (_ == null)
325
+ throw "Node is null!";
326
+ if (!(_.owner != null && _.owner == this))
327
+ throw "Owner graph is invalid!";
328
+ if (this.graphManager == null)
329
+ throw "Owner graph manager is invalid!";
330
+ for (var m = _.edges.slice(), N, L = m.length, g = 0; g < L; g++)
331
+ N = m[g], N.isInterGraph ? this.graphManager.remove(N) : N.source.owner.remove(N);
332
+ var D = this.nodes.indexOf(_);
333
+ if (D == -1)
334
+ throw "Node not in owner node list!";
335
+ this.nodes.splice(D, 1);
336
+ } else if (E instanceof h) {
337
+ var N = E;
338
+ if (N == null)
339
+ throw "Edge is null!";
340
+ if (!(N.source != null && N.target != null))
341
+ throw "Source and/or target is null!";
342
+ if (!(N.source.owner != null && N.target.owner != null && N.source.owner == this && N.target.owner == this))
343
+ throw "Source and/or target owner is invalid!";
344
+ var n = N.source.edges.indexOf(N), u = N.target.edges.indexOf(N);
345
+ if (!(n > -1 && u > -1))
346
+ throw "Source and/or target doesn't know this edge!";
347
+ N.source.edges.splice(n, 1), N.target != N.source && N.target.edges.splice(u, 1);
348
+ var D = N.source.owner.getEdges().indexOf(N);
349
+ if (D == -1)
350
+ throw "Not in owner's edge list!";
351
+ N.source.owner.getEdges().splice(D, 1);
352
+ }
353
+ }, d.prototype.updateLeftTop = function() {
354
+ for (var E = t.MAX_VALUE, _ = t.MAX_VALUE, m, N, L, g = this.getNodes(), D = g.length, n = 0; n < D; n++) {
355
+ var u = g[n];
356
+ m = u.getTop(), N = u.getLeft(), E > m && (E = m), _ > N && (_ = N);
357
+ }
358
+ return E == t.MAX_VALUE ? null : (g[0].getParent().paddingLeft != null ? L = g[0].getParent().paddingLeft : L = this.margin, this.left = _ - L, this.top = E - L, new f(this.left, this.top));
359
+ }, d.prototype.updateBounds = function(E) {
360
+ for (var _ = t.MAX_VALUE, m = -t.MAX_VALUE, N = t.MAX_VALUE, L = -t.MAX_VALUE, g, D, n, u, l, v = this.nodes, A = v.length, w = 0; w < A; w++) {
361
+ var I = v[w];
362
+ E && I.child != null && I.updateBounds(), g = I.getLeft(), D = I.getRight(), n = I.getTop(), u = I.getBottom(), _ > g && (_ = g), m < D && (m = D), N > n && (N = n), L < u && (L = u);
363
+ }
364
+ var C = new s(_, N, m - _, L - N);
365
+ _ == t.MAX_VALUE && (this.left = this.parent.getLeft(), this.right = this.parent.getRight(), this.top = this.parent.getTop(), this.bottom = this.parent.getBottom()), v[0].getParent().paddingLeft != null ? l = v[0].getParent().paddingLeft : l = this.margin, this.left = C.x - l, this.right = C.x + C.width + l, this.top = C.y - l, this.bottom = C.y + C.height + l;
366
+ }, d.calculateBounds = function(E) {
367
+ for (var _ = t.MAX_VALUE, m = -t.MAX_VALUE, N = t.MAX_VALUE, L = -t.MAX_VALUE, g, D, n, u, l = E.length, v = 0; v < l; v++) {
368
+ var A = E[v];
369
+ g = A.getLeft(), D = A.getRight(), n = A.getTop(), u = A.getBottom(), _ > g && (_ = g), m < D && (m = D), N > n && (N = n), L < u && (L = u);
370
+ }
371
+ var w = new s(_, N, m - _, L - N);
372
+ return w;
373
+ }, d.prototype.getInclusionTreeDepth = function() {
374
+ return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
375
+ }, d.prototype.getEstimatedSize = function() {
376
+ if (this.estimatedSize == t.MIN_VALUE)
377
+ throw "assert failed";
378
+ return this.estimatedSize;
379
+ }, d.prototype.calcEstimatedSize = function() {
380
+ for (var E = 0, _ = this.nodes, m = _.length, N = 0; N < m; N++) {
381
+ var L = _[N];
382
+ E += L.calcEstimatedSize();
383
+ }
384
+ return E == 0 ? this.estimatedSize = e.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = E / Math.sqrt(this.nodes.length), this.estimatedSize;
385
+ }, d.prototype.updateConnected = function() {
386
+ var E = this;
387
+ if (this.nodes.length == 0) {
388
+ this.isConnected = !0;
389
+ return;
390
+ }
391
+ var _ = new o(), m = /* @__PURE__ */ new Set(), N = this.nodes[0], L, g, D = N.withChildren();
392
+ for (D.forEach(function(w) {
393
+ _.push(w), m.add(w);
394
+ }); _.length !== 0; ) {
395
+ N = _.shift(), L = N.getEdges();
396
+ for (var n = L.length, u = 0; u < n; u++) {
397
+ var l = L[u];
398
+ if (g = l.getOtherEndInGraph(N, this), g != null && !m.has(g)) {
399
+ var v = g.withChildren();
400
+ v.forEach(function(w) {
401
+ _.push(w), m.add(w);
402
+ });
403
+ }
404
+ }
405
+ }
406
+ if (this.isConnected = !1, m.size >= this.nodes.length) {
407
+ var A = 0;
408
+ m.forEach(function(w) {
409
+ w.owner == E && A++;
410
+ }), A == this.nodes.length && (this.isConnected = !0);
411
+ }
412
+ }, p.exports = d;
413
+ },
414
+ /* 6 */
415
+ /***/
416
+ function(p, T, y) {
417
+ var i, t = y(1);
418
+ function e(r) {
419
+ i = y(5), this.layout = r, this.graphs = [], this.edges = [];
420
+ }
421
+ e.prototype.addRoot = function() {
422
+ var r = this.layout.newGraph(), a = this.layout.newNode(null), h = this.add(r, a);
423
+ return this.setRootGraph(h), this.rootGraph;
424
+ }, e.prototype.add = function(r, a, h, s, f) {
425
+ if (h == null && s == null && f == null) {
426
+ if (r == null)
427
+ throw "Graph is null!";
428
+ if (a == null)
429
+ throw "Parent node is null!";
430
+ if (this.graphs.indexOf(r) > -1)
431
+ throw "Graph already in this graph mgr!";
432
+ if (this.graphs.push(r), r.parent != null)
433
+ throw "Already has a parent!";
434
+ if (a.child != null)
435
+ throw "Already has a child!";
436
+ return r.parent = a, a.child = r, r;
437
+ } else {
438
+ f = h, s = a, h = r;
439
+ var o = s.getOwner(), d = f.getOwner();
440
+ if (!(o != null && o.getGraphManager() == this))
441
+ throw "Source not in this graph mgr!";
442
+ if (!(d != null && d.getGraphManager() == this))
443
+ throw "Target not in this graph mgr!";
444
+ if (o == d)
445
+ return h.isInterGraph = !1, o.add(h, s, f);
446
+ if (h.isInterGraph = !0, h.source = s, h.target = f, this.edges.indexOf(h) > -1)
447
+ throw "Edge already in inter-graph edge list!";
448
+ if (this.edges.push(h), !(h.source != null && h.target != null))
449
+ throw "Edge source and/or target is null!";
450
+ if (!(h.source.edges.indexOf(h) == -1 && h.target.edges.indexOf(h) == -1))
451
+ throw "Edge already in source and/or target incidency list!";
452
+ return h.source.edges.push(h), h.target.edges.push(h), h;
453
+ }
454
+ }, e.prototype.remove = function(r) {
455
+ if (r instanceof i) {
456
+ var a = r;
457
+ if (a.getGraphManager() != this)
458
+ throw "Graph not in this graph mgr";
459
+ if (!(a == this.rootGraph || a.parent != null && a.parent.graphManager == this))
460
+ throw "Invalid parent node!";
461
+ var h = [];
462
+ h = h.concat(a.getEdges());
463
+ for (var s, f = h.length, o = 0; o < f; o++)
464
+ s = h[o], a.remove(s);
465
+ var d = [];
466
+ d = d.concat(a.getNodes());
467
+ var c;
468
+ f = d.length;
469
+ for (var o = 0; o < f; o++)
470
+ c = d[o], a.remove(c);
471
+ a == this.rootGraph && this.setRootGraph(null);
472
+ var E = this.graphs.indexOf(a);
473
+ this.graphs.splice(E, 1), a.parent = null;
474
+ } else if (r instanceof t) {
475
+ if (s = r, s == null)
476
+ throw "Edge is null!";
477
+ if (!s.isInterGraph)
478
+ throw "Not an inter-graph edge!";
479
+ if (!(s.source != null && s.target != null))
480
+ throw "Source and/or target is null!";
481
+ if (!(s.source.edges.indexOf(s) != -1 && s.target.edges.indexOf(s) != -1))
482
+ throw "Source and/or target doesn't know this edge!";
483
+ var E = s.source.edges.indexOf(s);
484
+ if (s.source.edges.splice(E, 1), E = s.target.edges.indexOf(s), s.target.edges.splice(E, 1), !(s.source.owner != null && s.source.owner.getGraphManager() != null))
485
+ throw "Edge owner graph or owner graph manager is null!";
486
+ if (s.source.owner.getGraphManager().edges.indexOf(s) == -1)
487
+ throw "Not in owner graph manager's edge list!";
488
+ var E = s.source.owner.getGraphManager().edges.indexOf(s);
489
+ s.source.owner.getGraphManager().edges.splice(E, 1);
490
+ }
491
+ }, e.prototype.updateBounds = function() {
492
+ this.rootGraph.updateBounds(!0);
493
+ }, e.prototype.getGraphs = function() {
494
+ return this.graphs;
495
+ }, e.prototype.getAllNodes = function() {
496
+ if (this.allNodes == null) {
497
+ for (var r = [], a = this.getGraphs(), h = a.length, s = 0; s < h; s++)
498
+ r = r.concat(a[s].getNodes());
499
+ this.allNodes = r;
500
+ }
501
+ return this.allNodes;
502
+ }, e.prototype.resetAllNodes = function() {
503
+ this.allNodes = null;
504
+ }, e.prototype.resetAllEdges = function() {
505
+ this.allEdges = null;
506
+ }, e.prototype.resetAllNodesToApplyGravitation = function() {
507
+ this.allNodesToApplyGravitation = null;
508
+ }, e.prototype.getAllEdges = function() {
509
+ if (this.allEdges == null) {
510
+ var r = [], a = this.getGraphs();
511
+ a.length;
512
+ for (var h = 0; h < a.length; h++)
513
+ r = r.concat(a[h].getEdges());
514
+ r = r.concat(this.edges), this.allEdges = r;
515
+ }
516
+ return this.allEdges;
517
+ }, e.prototype.getAllNodesToApplyGravitation = function() {
518
+ return this.allNodesToApplyGravitation;
519
+ }, e.prototype.setAllNodesToApplyGravitation = function(r) {
520
+ if (this.allNodesToApplyGravitation != null)
521
+ throw "assert failed";
522
+ this.allNodesToApplyGravitation = r;
523
+ }, e.prototype.getRoot = function() {
524
+ return this.rootGraph;
525
+ }, e.prototype.setRootGraph = function(r) {
526
+ if (r.getGraphManager() != this)
527
+ throw "Root not in this graph mgr!";
528
+ this.rootGraph = r, r.parent == null && (r.parent = this.layout.newNode("Root node"));
529
+ }, e.prototype.getLayout = function() {
530
+ return this.layout;
531
+ }, e.prototype.isOneAncestorOfOther = function(r, a) {
532
+ if (!(r != null && a != null))
533
+ throw "assert failed";
534
+ if (r == a)
535
+ return !0;
536
+ var h = r.getOwner(), s;
537
+ do {
538
+ if (s = h.getParent(), s == null)
539
+ break;
540
+ if (s == a)
541
+ return !0;
542
+ if (h = s.getOwner(), h == null)
543
+ break;
544
+ } while (!0);
545
+ h = a.getOwner();
546
+ do {
547
+ if (s = h.getParent(), s == null)
548
+ break;
549
+ if (s == r)
550
+ return !0;
551
+ if (h = s.getOwner(), h == null)
552
+ break;
553
+ } while (!0);
554
+ return !1;
555
+ }, e.prototype.calcLowestCommonAncestors = function() {
556
+ for (var r, a, h, s, f, o = this.getAllEdges(), d = o.length, c = 0; c < d; c++) {
557
+ if (r = o[c], a = r.source, h = r.target, r.lca = null, r.sourceInLca = a, r.targetInLca = h, a == h) {
558
+ r.lca = a.getOwner();
559
+ continue;
560
+ }
561
+ for (s = a.getOwner(); r.lca == null; ) {
562
+ for (r.targetInLca = h, f = h.getOwner(); r.lca == null; ) {
563
+ if (f == s) {
564
+ r.lca = f;
565
+ break;
566
+ }
567
+ if (f == this.rootGraph)
568
+ break;
569
+ if (r.lca != null)
570
+ throw "assert failed";
571
+ r.targetInLca = f.getParent(), f = r.targetInLca.getOwner();
572
+ }
573
+ if (s == this.rootGraph)
574
+ break;
575
+ r.lca == null && (r.sourceInLca = s.getParent(), s = r.sourceInLca.getOwner());
576
+ }
577
+ if (r.lca == null)
578
+ throw "assert failed";
579
+ }
580
+ }, e.prototype.calcLowestCommonAncestor = function(r, a) {
581
+ if (r == a)
582
+ return r.getOwner();
583
+ var h = r.getOwner();
584
+ do {
585
+ if (h == null)
586
+ break;
587
+ var s = a.getOwner();
588
+ do {
589
+ if (s == null)
590
+ break;
591
+ if (s == h)
592
+ return s;
593
+ s = s.getParent().getOwner();
594
+ } while (!0);
595
+ h = h.getParent().getOwner();
596
+ } while (!0);
597
+ return h;
598
+ }, e.prototype.calcInclusionTreeDepths = function(r, a) {
599
+ r == null && a == null && (r = this.rootGraph, a = 1);
600
+ for (var h, s = r.getNodes(), f = s.length, o = 0; o < f; o++)
601
+ h = s[o], h.inclusionTreeDepth = a, h.child != null && this.calcInclusionTreeDepths(h.child, a + 1);
602
+ }, e.prototype.includesInvalidEdge = function() {
603
+ for (var r, a = this.edges.length, h = 0; h < a; h++)
604
+ if (r = this.edges[h], this.isOneAncestorOfOther(r.source, r.target))
605
+ return !0;
606
+ return !1;
607
+ }, p.exports = e;
608
+ },
609
+ /* 7 */
610
+ /***/
611
+ function(p, T, y) {
612
+ var i = y(0);
613
+ function t() {
614
+ }
615
+ for (var e in i)
616
+ t[e] = i[e];
617
+ t.MAX_ITERATIONS = 2500, t.DEFAULT_EDGE_LENGTH = 50, t.DEFAULT_SPRING_STRENGTH = 0.45, t.DEFAULT_REPULSION_STRENGTH = 4500, t.DEFAULT_GRAVITY_STRENGTH = 0.4, t.DEFAULT_COMPOUND_GRAVITY_STRENGTH = 1, t.DEFAULT_GRAVITY_RANGE_FACTOR = 3.8, t.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = 1.5, t.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION = !0, t.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION = !0, t.DEFAULT_COOLING_FACTOR_INCREMENTAL = 0.3, t.COOLING_ADAPTATION_FACTOR = 0.33, t.ADAPTATION_LOWER_NODE_LIMIT = 1e3, t.ADAPTATION_UPPER_NODE_LIMIT = 5e3, t.MAX_NODE_DISPLACEMENT_INCREMENTAL = 100, t.MAX_NODE_DISPLACEMENT = t.MAX_NODE_DISPLACEMENT_INCREMENTAL * 3, t.MIN_REPULSION_DIST = t.DEFAULT_EDGE_LENGTH / 10, t.CONVERGENCE_CHECK_PERIOD = 100, t.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = 0.1, t.MIN_EDGE_LENGTH = 1, t.GRID_CALCULATION_CHECK_PERIOD = 10, p.exports = t;
618
+ },
619
+ /* 8 */
620
+ /***/
621
+ function(p, T, y) {
622
+ var i = y(12);
623
+ function t() {
624
+ }
625
+ t.calcSeparationAmount = function(e, r, a, h) {
626
+ if (!e.intersects(r))
627
+ throw "assert failed";
628
+ var s = new Array(2);
629
+ this.decideDirectionsForOverlappingNodes(e, r, s), a[0] = Math.min(e.getRight(), r.getRight()) - Math.max(e.x, r.x), a[1] = Math.min(e.getBottom(), r.getBottom()) - Math.max(e.y, r.y), e.getX() <= r.getX() && e.getRight() >= r.getRight() ? a[0] += Math.min(r.getX() - e.getX(), e.getRight() - r.getRight()) : r.getX() <= e.getX() && r.getRight() >= e.getRight() && (a[0] += Math.min(e.getX() - r.getX(), r.getRight() - e.getRight())), e.getY() <= r.getY() && e.getBottom() >= r.getBottom() ? a[1] += Math.min(r.getY() - e.getY(), e.getBottom() - r.getBottom()) : r.getY() <= e.getY() && r.getBottom() >= e.getBottom() && (a[1] += Math.min(e.getY() - r.getY(), r.getBottom() - e.getBottom()));
630
+ var f = Math.abs((r.getCenterY() - e.getCenterY()) / (r.getCenterX() - e.getCenterX()));
631
+ r.getCenterY() === e.getCenterY() && r.getCenterX() === e.getCenterX() && (f = 1);
632
+ var o = f * a[0], d = a[1] / f;
633
+ a[0] < d ? d = a[0] : o = a[1], a[0] = -1 * s[0] * (d / 2 + h), a[1] = -1 * s[1] * (o / 2 + h);
634
+ }, t.decideDirectionsForOverlappingNodes = function(e, r, a) {
635
+ e.getCenterX() < r.getCenterX() ? a[0] = -1 : a[0] = 1, e.getCenterY() < r.getCenterY() ? a[1] = -1 : a[1] = 1;
636
+ }, t.getIntersection2 = function(e, r, a) {
637
+ var h = e.getCenterX(), s = e.getCenterY(), f = r.getCenterX(), o = r.getCenterY();
638
+ if (e.intersects(r))
639
+ return a[0] = h, a[1] = s, a[2] = f, a[3] = o, !0;
640
+ var d = e.getX(), c = e.getY(), E = e.getRight(), _ = e.getX(), m = e.getBottom(), N = e.getRight(), L = e.getWidthHalf(), g = e.getHeightHalf(), D = r.getX(), n = r.getY(), u = r.getRight(), l = r.getX(), v = r.getBottom(), A = r.getRight(), w = r.getWidthHalf(), I = r.getHeightHalf(), C = !1, S = !1;
641
+ if (h === f) {
642
+ if (s > o)
643
+ return a[0] = h, a[1] = c, a[2] = f, a[3] = v, !1;
644
+ if (s < o)
645
+ return a[0] = h, a[1] = m, a[2] = f, a[3] = n, !1;
646
+ } else if (s === o) {
647
+ if (h > f)
648
+ return a[0] = d, a[1] = s, a[2] = u, a[3] = o, !1;
649
+ if (h < f)
650
+ return a[0] = E, a[1] = s, a[2] = D, a[3] = o, !1;
651
+ } else {
652
+ var U = e.height / e.width, b = r.height / r.width, M = (o - s) / (f - h), G = void 0, F = void 0, k = void 0, Y = void 0, X = void 0, P = void 0;
653
+ if (-U === M ? h > f ? (a[0] = _, a[1] = m, C = !0) : (a[0] = E, a[1] = c, C = !0) : U === M && (h > f ? (a[0] = d, a[1] = c, C = !0) : (a[0] = N, a[1] = m, C = !0)), -b === M ? f > h ? (a[2] = l, a[3] = v, S = !0) : (a[2] = u, a[3] = n, S = !0) : b === M && (f > h ? (a[2] = D, a[3] = n, S = !0) : (a[2] = A, a[3] = v, S = !0)), C && S)
654
+ return !1;
655
+ if (h > f ? s > o ? (G = this.getCardinalDirection(U, M, 4), F = this.getCardinalDirection(b, M, 2)) : (G = this.getCardinalDirection(-U, M, 3), F = this.getCardinalDirection(-b, M, 1)) : s > o ? (G = this.getCardinalDirection(-U, M, 1), F = this.getCardinalDirection(-b, M, 3)) : (G = this.getCardinalDirection(U, M, 2), F = this.getCardinalDirection(b, M, 4)), !C)
656
+ switch (G) {
657
+ case 1:
658
+ Y = c, k = h + -g / M, a[0] = k, a[1] = Y;
659
+ break;
660
+ case 2:
661
+ k = N, Y = s + L * M, a[0] = k, a[1] = Y;
662
+ break;
663
+ case 3:
664
+ Y = m, k = h + g / M, a[0] = k, a[1] = Y;
665
+ break;
666
+ case 4:
667
+ k = _, Y = s + -L * M, a[0] = k, a[1] = Y;
668
+ break;
669
+ }
670
+ if (!S)
671
+ switch (F) {
672
+ case 1:
673
+ P = n, X = f + -I / M, a[2] = X, a[3] = P;
674
+ break;
675
+ case 2:
676
+ X = A, P = o + w * M, a[2] = X, a[3] = P;
677
+ break;
678
+ case 3:
679
+ P = v, X = f + I / M, a[2] = X, a[3] = P;
680
+ break;
681
+ case 4:
682
+ X = l, P = o + -w * M, a[2] = X, a[3] = P;
683
+ break;
684
+ }
685
+ }
686
+ return !1;
687
+ }, t.getCardinalDirection = function(e, r, a) {
688
+ return e > r ? a : 1 + a % 4;
689
+ }, t.getIntersection = function(e, r, a, h) {
690
+ if (h == null)
691
+ return this.getIntersection2(e, r, a);
692
+ var s = e.x, f = e.y, o = r.x, d = r.y, c = a.x, E = a.y, _ = h.x, m = h.y, N = void 0, L = void 0, g = void 0, D = void 0, n = void 0, u = void 0, l = void 0, v = void 0, A = void 0;
693
+ return g = d - f, n = s - o, l = o * f - s * d, D = m - E, u = c - _, v = _ * E - c * m, A = g * u - D * n, A === 0 ? null : (N = (n * v - u * l) / A, L = (D * l - g * v) / A, new i(N, L));
694
+ }, t.angleOfVector = function(e, r, a, h) {
695
+ var s = void 0;
696
+ return e !== a ? (s = Math.atan((h - r) / (a - e)), a < e ? s += Math.PI : h < r && (s += this.TWO_PI)) : h < r ? s = this.ONE_AND_HALF_PI : s = this.HALF_PI, s;
697
+ }, t.doIntersect = function(e, r, a, h) {
698
+ var s = e.x, f = e.y, o = r.x, d = r.y, c = a.x, E = a.y, _ = h.x, m = h.y, N = (o - s) * (m - E) - (_ - c) * (d - f);
699
+ if (N === 0)
700
+ return !1;
701
+ var L = ((m - E) * (_ - s) + (c - _) * (m - f)) / N, g = ((f - d) * (_ - s) + (o - s) * (m - f)) / N;
702
+ return 0 < L && L < 1 && 0 < g && g < 1;
703
+ }, t.HALF_PI = 0.5 * Math.PI, t.ONE_AND_HALF_PI = 1.5 * Math.PI, t.TWO_PI = 2 * Math.PI, t.THREE_PI = 3 * Math.PI, p.exports = t;
704
+ },
705
+ /* 9 */
706
+ /***/
707
+ function(p, T, y) {
708
+ function i() {
709
+ }
710
+ i.sign = function(t) {
711
+ return t > 0 ? 1 : t < 0 ? -1 : 0;
712
+ }, i.floor = function(t) {
713
+ return t < 0 ? Math.ceil(t) : Math.floor(t);
714
+ }, i.ceil = function(t) {
715
+ return t < 0 ? Math.floor(t) : Math.ceil(t);
716
+ }, p.exports = i;
717
+ },
718
+ /* 10 */
719
+ /***/
720
+ function(p, T, y) {
721
+ function i() {
722
+ }
723
+ i.MAX_VALUE = 2147483647, i.MIN_VALUE = -2147483648, p.exports = i;
724
+ },
725
+ /* 11 */
726
+ /***/
727
+ function(p, T, y) {
728
+ var i = /* @__PURE__ */ function() {
729
+ function s(f, o) {
730
+ for (var d = 0; d < o.length; d++) {
731
+ var c = o[d];
732
+ c.enumerable = c.enumerable || !1, c.configurable = !0, "value" in c && (c.writable = !0), Object.defineProperty(f, c.key, c);
733
+ }
734
+ }
735
+ return function(f, o, d) {
736
+ return o && s(f.prototype, o), d && s(f, d), f;
737
+ };
738
+ }();
739
+ function t(s, f) {
740
+ if (!(s instanceof f))
741
+ throw new TypeError("Cannot call a class as a function");
742
+ }
743
+ var e = function(s) {
744
+ return { value: s, next: null, prev: null };
745
+ }, r = function(s, f, o, d) {
746
+ return s !== null ? s.next = f : d.head = f, o !== null ? o.prev = f : d.tail = f, f.prev = s, f.next = o, d.length++, f;
747
+ }, a = function(s, f) {
748
+ var o = s.prev, d = s.next;
749
+ return o !== null ? o.next = d : f.head = d, d !== null ? d.prev = o : f.tail = o, s.prev = s.next = null, f.length--, s;
750
+ }, h = function() {
751
+ function s(f) {
752
+ var o = this;
753
+ t(this, s), this.length = 0, this.head = null, this.tail = null, f != null && f.forEach(function(d) {
754
+ return o.push(d);
755
+ });
756
+ }
757
+ return i(s, [{
758
+ key: "size",
759
+ value: function() {
760
+ return this.length;
761
+ }
762
+ }, {
763
+ key: "insertBefore",
764
+ value: function(f, o) {
765
+ return r(o.prev, e(f), o, this);
766
+ }
767
+ }, {
768
+ key: "insertAfter",
769
+ value: function(f, o) {
770
+ return r(o, e(f), o.next, this);
771
+ }
772
+ }, {
773
+ key: "insertNodeBefore",
774
+ value: function(f, o) {
775
+ return r(o.prev, f, o, this);
776
+ }
777
+ }, {
778
+ key: "insertNodeAfter",
779
+ value: function(f, o) {
780
+ return r(o, f, o.next, this);
781
+ }
782
+ }, {
783
+ key: "push",
784
+ value: function(f) {
785
+ return r(this.tail, e(f), null, this);
786
+ }
787
+ }, {
788
+ key: "unshift",
789
+ value: function(f) {
790
+ return r(null, e(f), this.head, this);
791
+ }
792
+ }, {
793
+ key: "remove",
794
+ value: function(f) {
795
+ return a(f, this);
796
+ }
797
+ }, {
798
+ key: "pop",
799
+ value: function() {
800
+ return a(this.tail, this).value;
801
+ }
802
+ }, {
803
+ key: "popNode",
804
+ value: function() {
805
+ return a(this.tail, this);
806
+ }
807
+ }, {
808
+ key: "shift",
809
+ value: function() {
810
+ return a(this.head, this).value;
811
+ }
812
+ }, {
813
+ key: "shiftNode",
814
+ value: function() {
815
+ return a(this.head, this);
816
+ }
817
+ }, {
818
+ key: "get_object_at",
819
+ value: function(f) {
820
+ if (f <= this.length()) {
821
+ for (var o = 1, d = this.head; o < f; )
822
+ d = d.next, o++;
823
+ return d.value;
824
+ }
825
+ }
826
+ }, {
827
+ key: "set_object_at",
828
+ value: function(f, o) {
829
+ if (f <= this.length()) {
830
+ for (var d = 1, c = this.head; d < f; )
831
+ c = c.next, d++;
832
+ c.value = o;
833
+ }
834
+ }
835
+ }]), s;
836
+ }();
837
+ p.exports = h;
838
+ },
839
+ /* 12 */
840
+ /***/
841
+ function(p, T, y) {
842
+ function i(t, e, r) {
843
+ this.x = null, this.y = null, t == null && e == null && r == null ? (this.x = 0, this.y = 0) : typeof t == "number" && typeof e == "number" && r == null ? (this.x = t, this.y = e) : t.constructor.name == "Point" && e == null && r == null && (r = t, this.x = r.x, this.y = r.y);
844
+ }
845
+ i.prototype.getX = function() {
846
+ return this.x;
847
+ }, i.prototype.getY = function() {
848
+ return this.y;
849
+ }, i.prototype.getLocation = function() {
850
+ return new i(this.x, this.y);
851
+ }, i.prototype.setLocation = function(t, e, r) {
852
+ t.constructor.name == "Point" && e == null && r == null ? (r = t, this.setLocation(r.x, r.y)) : typeof t == "number" && typeof e == "number" && r == null && (parseInt(t) == t && parseInt(e) == e ? this.move(t, e) : (this.x = Math.floor(t + 0.5), this.y = Math.floor(e + 0.5)));
853
+ }, i.prototype.move = function(t, e) {
854
+ this.x = t, this.y = e;
855
+ }, i.prototype.translate = function(t, e) {
856
+ this.x += t, this.y += e;
857
+ }, i.prototype.equals = function(t) {
858
+ if (t.constructor.name == "Point") {
859
+ var e = t;
860
+ return this.x == e.x && this.y == e.y;
861
+ }
862
+ return this == t;
863
+ }, i.prototype.toString = function() {
864
+ return new i().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
865
+ }, p.exports = i;
866
+ },
867
+ /* 13 */
868
+ /***/
869
+ function(p, T, y) {
870
+ function i(t, e, r, a) {
871
+ this.x = 0, this.y = 0, this.width = 0, this.height = 0, t != null && e != null && r != null && a != null && (this.x = t, this.y = e, this.width = r, this.height = a);
872
+ }
873
+ i.prototype.getX = function() {
874
+ return this.x;
875
+ }, i.prototype.setX = function(t) {
876
+ this.x = t;
877
+ }, i.prototype.getY = function() {
878
+ return this.y;
879
+ }, i.prototype.setY = function(t) {
880
+ this.y = t;
881
+ }, i.prototype.getWidth = function() {
882
+ return this.width;
883
+ }, i.prototype.setWidth = function(t) {
884
+ this.width = t;
885
+ }, i.prototype.getHeight = function() {
886
+ return this.height;
887
+ }, i.prototype.setHeight = function(t) {
888
+ this.height = t;
889
+ }, i.prototype.getRight = function() {
890
+ return this.x + this.width;
891
+ }, i.prototype.getBottom = function() {
892
+ return this.y + this.height;
893
+ }, i.prototype.intersects = function(t) {
894
+ return !(this.getRight() < t.x || this.getBottom() < t.y || t.getRight() < this.x || t.getBottom() < this.y);
895
+ }, i.prototype.getCenterX = function() {
896
+ return this.x + this.width / 2;
897
+ }, i.prototype.getMinX = function() {
898
+ return this.getX();
899
+ }, i.prototype.getMaxX = function() {
900
+ return this.getX() + this.width;
901
+ }, i.prototype.getCenterY = function() {
902
+ return this.y + this.height / 2;
903
+ }, i.prototype.getMinY = function() {
904
+ return this.getY();
905
+ }, i.prototype.getMaxY = function() {
906
+ return this.getY() + this.height;
907
+ }, i.prototype.getWidthHalf = function() {
908
+ return this.width / 2;
909
+ }, i.prototype.getHeightHalf = function() {
910
+ return this.height / 2;
911
+ }, p.exports = i;
912
+ },
913
+ /* 14 */
914
+ /***/
915
+ function(p, T, y) {
916
+ var i = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
917
+ return typeof e;
918
+ } : function(e) {
919
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
920
+ };
921
+ function t() {
922
+ }
923
+ t.lastID = 0, t.createID = function(e) {
924
+ return t.isPrimitive(e) ? e : (e.uniqueID != null || (e.uniqueID = t.getString(), t.lastID++), e.uniqueID);
925
+ }, t.getString = function(e) {
926
+ return e == null && (e = t.lastID), "Object#" + e;
927
+ }, t.isPrimitive = function(e) {
928
+ var r = typeof e > "u" ? "undefined" : i(e);
929
+ return e == null || r != "object" && r != "function";
930
+ }, p.exports = t;
931
+ },
932
+ /* 15 */
933
+ /***/
934
+ function(p, T, y) {
935
+ function i(c) {
936
+ if (Array.isArray(c)) {
937
+ for (var E = 0, _ = Array(c.length); E < c.length; E++)
938
+ _[E] = c[E];
939
+ return _;
940
+ } else
941
+ return Array.from(c);
942
+ }
943
+ var t = y(0), e = y(6), r = y(3), a = y(1), h = y(5), s = y(4), f = y(17), o = y(27);
944
+ function d(c) {
945
+ o.call(this), this.layoutQuality = t.QUALITY, this.createBendsAsNeeded = t.DEFAULT_CREATE_BENDS_AS_NEEDED, this.incremental = t.DEFAULT_INCREMENTAL, this.animationOnLayout = t.DEFAULT_ANIMATION_ON_LAYOUT, this.animationDuringLayout = t.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = t.DEFAULT_ANIMATION_PERIOD, this.uniformLeafNodeSizes = t.DEFAULT_UNIFORM_LEAF_NODE_SIZES, this.edgeToDummyNodes = /* @__PURE__ */ new Map(), this.graphManager = new e(this), this.isLayoutFinished = !1, this.isSubLayout = !1, this.isRemoteUse = !1, c != null && (this.isRemoteUse = c);
946
+ }
947
+ d.RANDOM_SEED = 1, d.prototype = Object.create(o.prototype), d.prototype.getGraphManager = function() {
948
+ return this.graphManager;
949
+ }, d.prototype.getAllNodes = function() {
950
+ return this.graphManager.getAllNodes();
951
+ }, d.prototype.getAllEdges = function() {
952
+ return this.graphManager.getAllEdges();
953
+ }, d.prototype.getAllNodesToApplyGravitation = function() {
954
+ return this.graphManager.getAllNodesToApplyGravitation();
955
+ }, d.prototype.newGraphManager = function() {
956
+ var c = new e(this);
957
+ return this.graphManager = c, c;
958
+ }, d.prototype.newGraph = function(c) {
959
+ return new h(null, this.graphManager, c);
960
+ }, d.prototype.newNode = function(c) {
961
+ return new r(this.graphManager, c);
962
+ }, d.prototype.newEdge = function(c) {
963
+ return new a(null, null, c);
964
+ }, d.prototype.checkLayoutSuccess = function() {
965
+ return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
966
+ }, d.prototype.runLayout = function() {
967
+ this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
968
+ var c;
969
+ return this.checkLayoutSuccess() ? c = !1 : c = this.layout(), t.ANIMATE === "during" ? !1 : (c && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, c);
970
+ }, d.prototype.doPostLayout = function() {
971
+ this.incremental || this.transform(), this.update();
972
+ }, d.prototype.update2 = function() {
973
+ if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
974
+ for (var c = this.graphManager.getAllEdges(), E = 0; E < c.length; E++)
975
+ c[E];
976
+ for (var _ = this.graphManager.getRoot().getNodes(), E = 0; E < _.length; E++)
977
+ _[E];
978
+ this.update(this.graphManager.getRoot());
979
+ }
980
+ }, d.prototype.update = function(c) {
981
+ if (c == null)
982
+ this.update2();
983
+ else if (c instanceof r) {
984
+ var E = c;
985
+ if (E.getChild() != null)
986
+ for (var _ = E.getChild().getNodes(), m = 0; m < _.length; m++)
987
+ update(_[m]);
988
+ if (E.vGraphObject != null) {
989
+ var N = E.vGraphObject;
990
+ N.update(E);
991
+ }
992
+ } else if (c instanceof a) {
993
+ var L = c;
994
+ if (L.vGraphObject != null) {
995
+ var g = L.vGraphObject;
996
+ g.update(L);
997
+ }
998
+ } else if (c instanceof h) {
999
+ var D = c;
1000
+ if (D.vGraphObject != null) {
1001
+ var n = D.vGraphObject;
1002
+ n.update(D);
1003
+ }
1004
+ }
1005
+ }, d.prototype.initParameters = function() {
1006
+ this.isSubLayout || (this.layoutQuality = t.QUALITY, this.animationDuringLayout = t.DEFAULT_ANIMATION_DURING_LAYOUT, this.animationPeriod = t.DEFAULT_ANIMATION_PERIOD, this.animationOnLayout = t.DEFAULT_ANIMATION_ON_LAYOUT, this.incremental = t.DEFAULT_INCREMENTAL, this.createBendsAsNeeded = t.DEFAULT_CREATE_BENDS_AS_NEEDED, this.uniformLeafNodeSizes = t.DEFAULT_UNIFORM_LEAF_NODE_SIZES), this.animationDuringLayout && (this.animationOnLayout = !1);
1007
+ }, d.prototype.transform = function(c) {
1008
+ if (c == null)
1009
+ this.transform(new s(0, 0));
1010
+ else {
1011
+ var E = new f(), _ = this.graphManager.getRoot().updateLeftTop();
1012
+ if (_ != null) {
1013
+ E.setWorldOrgX(c.x), E.setWorldOrgY(c.y), E.setDeviceOrgX(_.x), E.setDeviceOrgY(_.y);
1014
+ for (var m = this.getAllNodes(), N, L = 0; L < m.length; L++)
1015
+ N = m[L], N.transform(E);
1016
+ }
1017
+ }
1018
+ }, d.prototype.positionNodesRandomly = function(c) {
1019
+ if (c == null)
1020
+ this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
1021
+ else
1022
+ for (var E, _, m = c.getNodes(), N = 0; N < m.length; N++)
1023
+ E = m[N], _ = E.getChild(), _ == null || _.getNodes().length == 0 ? E.scatter() : (this.positionNodesRandomly(_), E.updateBounds());
1024
+ }, d.prototype.getFlatForest = function() {
1025
+ for (var c = [], E = !0, _ = this.graphManager.getRoot().getNodes(), m = !0, N = 0; N < _.length; N++)
1026
+ _[N].getChild() != null && (m = !1);
1027
+ if (!m)
1028
+ return c;
1029
+ var L = /* @__PURE__ */ new Set(), g = [], D = /* @__PURE__ */ new Map(), n = [];
1030
+ for (n = n.concat(_); n.length > 0 && E; ) {
1031
+ for (g.push(n[0]); g.length > 0 && E; ) {
1032
+ var u = g[0];
1033
+ g.splice(0, 1), L.add(u);
1034
+ for (var l = u.getEdges(), N = 0; N < l.length; N++) {
1035
+ var v = l[N].getOtherEnd(u);
1036
+ if (D.get(u) != v)
1037
+ if (!L.has(v))
1038
+ g.push(v), D.set(v, u);
1039
+ else {
1040
+ E = !1;
1041
+ break;
1042
+ }
1043
+ }
1044
+ }
1045
+ if (!E)
1046
+ c = [];
1047
+ else {
1048
+ var A = [].concat(i(L));
1049
+ c.push(A);
1050
+ for (var N = 0; N < A.length; N++) {
1051
+ var w = A[N], I = n.indexOf(w);
1052
+ I > -1 && n.splice(I, 1);
1053
+ }
1054
+ L = /* @__PURE__ */ new Set(), D = /* @__PURE__ */ new Map();
1055
+ }
1056
+ }
1057
+ return c;
1058
+ }, d.prototype.createDummyNodesForBendpoints = function(c) {
1059
+ for (var E = [], _ = c.source, m = this.graphManager.calcLowestCommonAncestor(c.source, c.target), N = 0; N < c.bendpoints.length; N++) {
1060
+ var L = this.newNode(null);
1061
+ L.setRect(new Point(0, 0), new Dimension(1, 1)), m.add(L);
1062
+ var g = this.newEdge(null);
1063
+ this.graphManager.add(g, _, L), E.add(L), _ = L;
1064
+ }
1065
+ var g = this.newEdge(null);
1066
+ return this.graphManager.add(g, _, c.target), this.edgeToDummyNodes.set(c, E), c.isInterGraph() ? this.graphManager.remove(c) : m.remove(c), E;
1067
+ }, d.prototype.createBendpointsFromDummyNodes = function() {
1068
+ var c = [];
1069
+ c = c.concat(this.graphManager.getAllEdges()), c = [].concat(i(this.edgeToDummyNodes.keys())).concat(c);
1070
+ for (var E = 0; E < c.length; E++) {
1071
+ var _ = c[E];
1072
+ if (_.bendpoints.length > 0) {
1073
+ for (var m = this.edgeToDummyNodes.get(_), N = 0; N < m.length; N++) {
1074
+ var L = m[N], g = new s(L.getCenterX(), L.getCenterY()), D = _.bendpoints.get(N);
1075
+ D.x = g.x, D.y = g.y, L.getOwner().remove(L);
1076
+ }
1077
+ this.graphManager.add(_, _.source, _.target);
1078
+ }
1079
+ }
1080
+ }, d.transform = function(c, E, _, m) {
1081
+ if (_ != null && m != null) {
1082
+ var N = E;
1083
+ if (c <= 50) {
1084
+ var L = E / _;
1085
+ N -= (E - L) / 50 * (50 - c);
1086
+ } else {
1087
+ var g = E * m;
1088
+ N += (g - E) / 50 * (c - 50);
1089
+ }
1090
+ return N;
1091
+ } else {
1092
+ var D, n;
1093
+ return c <= 50 ? (D = 9 * E / 500, n = E / 10) : (D = 9 * E / 50, n = -8 * E), D * c + n;
1094
+ }
1095
+ }, d.findCenterOfTree = function(c) {
1096
+ var E = [];
1097
+ E = E.concat(c);
1098
+ var _ = [], m = /* @__PURE__ */ new Map(), N = !1, L = null;
1099
+ (E.length == 1 || E.length == 2) && (N = !0, L = E[0]);
1100
+ for (var g = 0; g < E.length; g++) {
1101
+ var D = E[g], n = D.getNeighborsList().size;
1102
+ m.set(D, D.getNeighborsList().size), n == 1 && _.push(D);
1103
+ }
1104
+ var u = [];
1105
+ for (u = u.concat(_); !N; ) {
1106
+ var l = [];
1107
+ l = l.concat(u), u = [];
1108
+ for (var g = 0; g < E.length; g++) {
1109
+ var D = E[g], v = E.indexOf(D);
1110
+ v >= 0 && E.splice(v, 1);
1111
+ var A = D.getNeighborsList();
1112
+ A.forEach(function(C) {
1113
+ if (_.indexOf(C) < 0) {
1114
+ var S = m.get(C), U = S - 1;
1115
+ U == 1 && u.push(C), m.set(C, U);
1116
+ }
1117
+ });
1118
+ }
1119
+ _ = _.concat(u), (E.length == 1 || E.length == 2) && (N = !0, L = E[0]);
1120
+ }
1121
+ return L;
1122
+ }, d.prototype.setGraphManager = function(c) {
1123
+ this.graphManager = c;
1124
+ }, p.exports = d;
1125
+ },
1126
+ /* 16 */
1127
+ /***/
1128
+ function(p, T, y) {
1129
+ function i() {
1130
+ }
1131
+ i.seed = 1, i.x = 0, i.nextDouble = function() {
1132
+ return i.x = Math.sin(i.seed++) * 1e4, i.x - Math.floor(i.x);
1133
+ }, p.exports = i;
1134
+ },
1135
+ /* 17 */
1136
+ /***/
1137
+ function(p, T, y) {
1138
+ var i = y(4);
1139
+ function t(e, r) {
1140
+ this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
1141
+ }
1142
+ t.prototype.getWorldOrgX = function() {
1143
+ return this.lworldOrgX;
1144
+ }, t.prototype.setWorldOrgX = function(e) {
1145
+ this.lworldOrgX = e;
1146
+ }, t.prototype.getWorldOrgY = function() {
1147
+ return this.lworldOrgY;
1148
+ }, t.prototype.setWorldOrgY = function(e) {
1149
+ this.lworldOrgY = e;
1150
+ }, t.prototype.getWorldExtX = function() {
1151
+ return this.lworldExtX;
1152
+ }, t.prototype.setWorldExtX = function(e) {
1153
+ this.lworldExtX = e;
1154
+ }, t.prototype.getWorldExtY = function() {
1155
+ return this.lworldExtY;
1156
+ }, t.prototype.setWorldExtY = function(e) {
1157
+ this.lworldExtY = e;
1158
+ }, t.prototype.getDeviceOrgX = function() {
1159
+ return this.ldeviceOrgX;
1160
+ }, t.prototype.setDeviceOrgX = function(e) {
1161
+ this.ldeviceOrgX = e;
1162
+ }, t.prototype.getDeviceOrgY = function() {
1163
+ return this.ldeviceOrgY;
1164
+ }, t.prototype.setDeviceOrgY = function(e) {
1165
+ this.ldeviceOrgY = e;
1166
+ }, t.prototype.getDeviceExtX = function() {
1167
+ return this.ldeviceExtX;
1168
+ }, t.prototype.setDeviceExtX = function(e) {
1169
+ this.ldeviceExtX = e;
1170
+ }, t.prototype.getDeviceExtY = function() {
1171
+ return this.ldeviceExtY;
1172
+ }, t.prototype.setDeviceExtY = function(e) {
1173
+ this.ldeviceExtY = e;
1174
+ }, t.prototype.transformX = function(e) {
1175
+ var r = 0, a = this.lworldExtX;
1176
+ return a != 0 && (r = this.ldeviceOrgX + (e - this.lworldOrgX) * this.ldeviceExtX / a), r;
1177
+ }, t.prototype.transformY = function(e) {
1178
+ var r = 0, a = this.lworldExtY;
1179
+ return a != 0 && (r = this.ldeviceOrgY + (e - this.lworldOrgY) * this.ldeviceExtY / a), r;
1180
+ }, t.prototype.inverseTransformX = function(e) {
1181
+ var r = 0, a = this.ldeviceExtX;
1182
+ return a != 0 && (r = this.lworldOrgX + (e - this.ldeviceOrgX) * this.lworldExtX / a), r;
1183
+ }, t.prototype.inverseTransformY = function(e) {
1184
+ var r = 0, a = this.ldeviceExtY;
1185
+ return a != 0 && (r = this.lworldOrgY + (e - this.ldeviceOrgY) * this.lworldExtY / a), r;
1186
+ }, t.prototype.inverseTransformPoint = function(e) {
1187
+ var r = new i(this.inverseTransformX(e.x), this.inverseTransformY(e.y));
1188
+ return r;
1189
+ }, p.exports = t;
1190
+ },
1191
+ /* 18 */
1192
+ /***/
1193
+ function(p, T, y) {
1194
+ function i(o) {
1195
+ if (Array.isArray(o)) {
1196
+ for (var d = 0, c = Array(o.length); d < o.length; d++)
1197
+ c[d] = o[d];
1198
+ return c;
1199
+ } else
1200
+ return Array.from(o);
1201
+ }
1202
+ var t = y(15), e = y(7), r = y(0), a = y(8), h = y(9);
1203
+ function s() {
1204
+ t.call(this), this.useSmartIdealEdgeLengthCalculation = e.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.idealEdgeLength = e.DEFAULT_EDGE_LENGTH, this.springConstant = e.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = e.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = e.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = e.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = e.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * e.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = e.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = e.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = e.MAX_ITERATIONS;
1205
+ }
1206
+ s.prototype = Object.create(t.prototype);
1207
+ for (var f in t)
1208
+ s[f] = t[f];
1209
+ s.prototype.initParameters = function() {
1210
+ t.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = e.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1211
+ }, s.prototype.calcIdealEdgeLengths = function() {
1212
+ for (var o, d, c, E, _, m, N = this.getGraphManager().getAllEdges(), L = 0; L < N.length; L++)
1213
+ o = N[L], o.idealLength = this.idealEdgeLength, o.isInterGraph && (c = o.getSource(), E = o.getTarget(), _ = o.getSourceInLca().getEstimatedSize(), m = o.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (o.idealLength += _ + m - 2 * r.SIMPLE_NODE_SIZE), d = o.getLca().getInclusionTreeDepth(), o.idealLength += e.DEFAULT_EDGE_LENGTH * e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (c.getInclusionTreeDepth() + E.getInclusionTreeDepth() - 2 * d));
1214
+ }, s.prototype.initSpringEmbedder = function() {
1215
+ var o = this.getAllNodes().length;
1216
+ this.incremental ? (o > e.ADAPTATION_LOWER_NODE_LIMIT && (this.coolingFactor = Math.max(this.coolingFactor * e.COOLING_ADAPTATION_FACTOR, this.coolingFactor - (o - e.ADAPTATION_LOWER_NODE_LIMIT) / (e.ADAPTATION_UPPER_NODE_LIMIT - e.ADAPTATION_LOWER_NODE_LIMIT) * this.coolingFactor * (1 - e.COOLING_ADAPTATION_FACTOR))), this.maxNodeDisplacement = e.MAX_NODE_DISPLACEMENT_INCREMENTAL) : (o > e.ADAPTATION_LOWER_NODE_LIMIT ? this.coolingFactor = Math.max(e.COOLING_ADAPTATION_FACTOR, 1 - (o - e.ADAPTATION_LOWER_NODE_LIMIT) / (e.ADAPTATION_UPPER_NODE_LIMIT - e.ADAPTATION_LOWER_NODE_LIMIT) * (1 - e.COOLING_ADAPTATION_FACTOR)) : this.coolingFactor = 1, this.initialCoolingFactor = this.coolingFactor, this.maxNodeDisplacement = e.MAX_NODE_DISPLACEMENT), this.maxIterations = Math.max(this.getAllNodes().length * 5, this.maxIterations), this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1217
+ }, s.prototype.calcSpringForces = function() {
1218
+ for (var o = this.getAllEdges(), d, c = 0; c < o.length; c++)
1219
+ d = o[c], this.calcSpringForce(d, d.idealLength);
1220
+ }, s.prototype.calcRepulsionForces = function() {
1221
+ var o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !0, d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, c, E, _, m, N = this.getAllNodes(), L;
1222
+ if (this.useFRGridVariant)
1223
+ for (this.totalIterations % e.GRID_CALCULATION_CHECK_PERIOD == 1 && o && this.updateGrid(), L = /* @__PURE__ */ new Set(), c = 0; c < N.length; c++)
1224
+ _ = N[c], this.calculateRepulsionForceOfANode(_, L, o, d), L.add(_);
1225
+ else
1226
+ for (c = 0; c < N.length; c++)
1227
+ for (_ = N[c], E = c + 1; E < N.length; E++)
1228
+ m = N[E], _.getOwner() == m.getOwner() && this.calcRepulsionForce(_, m);
1229
+ }, s.prototype.calcGravitationalForces = function() {
1230
+ for (var o, d = this.getAllNodesToApplyGravitation(), c = 0; c < d.length; c++)
1231
+ o = d[c], this.calcGravitationalForce(o);
1232
+ }, s.prototype.moveNodes = function() {
1233
+ for (var o = this.getAllNodes(), d, c = 0; c < o.length; c++)
1234
+ d = o[c], d.move();
1235
+ }, s.prototype.calcSpringForce = function(o, d) {
1236
+ var c = o.getSource(), E = o.getTarget(), _, m, N, L;
1237
+ if (this.uniformLeafNodeSizes && c.getChild() == null && E.getChild() == null)
1238
+ o.updateLengthSimple();
1239
+ else if (o.updateLength(), o.isOverlapingSourceAndTarget)
1240
+ return;
1241
+ _ = o.getLength(), _ != 0 && (m = this.springConstant * (_ - d), N = m * (o.lengthX / _), L = m * (o.lengthY / _), c.springForceX += N, c.springForceY += L, E.springForceX -= N, E.springForceY -= L);
1242
+ }, s.prototype.calcRepulsionForce = function(o, d) {
1243
+ var c = o.getRect(), E = d.getRect(), _ = new Array(2), m = new Array(4), N, L, g, D, n, u, l;
1244
+ if (c.intersects(E)) {
1245
+ a.calcSeparationAmount(c, E, _, e.DEFAULT_EDGE_LENGTH / 2), u = 2 * _[0], l = 2 * _[1];
1246
+ var v = o.noOfChildren * d.noOfChildren / (o.noOfChildren + d.noOfChildren);
1247
+ o.repulsionForceX -= v * u, o.repulsionForceY -= v * l, d.repulsionForceX += v * u, d.repulsionForceY += v * l;
1248
+ } else
1249
+ this.uniformLeafNodeSizes && o.getChild() == null && d.getChild() == null ? (N = E.getCenterX() - c.getCenterX(), L = E.getCenterY() - c.getCenterY()) : (a.getIntersection(c, E, m), N = m[2] - m[0], L = m[3] - m[1]), Math.abs(N) < e.MIN_REPULSION_DIST && (N = h.sign(N) * e.MIN_REPULSION_DIST), Math.abs(L) < e.MIN_REPULSION_DIST && (L = h.sign(L) * e.MIN_REPULSION_DIST), g = N * N + L * L, D = Math.sqrt(g), n = this.repulsionConstant * o.noOfChildren * d.noOfChildren / g, u = n * N / D, l = n * L / D, o.repulsionForceX -= u, o.repulsionForceY -= l, d.repulsionForceX += u, d.repulsionForceY += l;
1250
+ }, s.prototype.calcGravitationalForce = function(o) {
1251
+ var d, c, E, _, m, N, L, g;
1252
+ d = o.getOwner(), c = (d.getRight() + d.getLeft()) / 2, E = (d.getTop() + d.getBottom()) / 2, _ = o.getCenterX() - c, m = o.getCenterY() - E, N = Math.abs(_) + o.getWidth() / 2, L = Math.abs(m) + o.getHeight() / 2, o.getOwner() == this.graphManager.getRoot() ? (g = d.getEstimatedSize() * this.gravityRangeFactor, (N > g || L > g) && (o.gravitationForceX = -this.gravityConstant * _, o.gravitationForceY = -this.gravityConstant * m)) : (g = d.getEstimatedSize() * this.compoundGravityRangeFactor, (N > g || L > g) && (o.gravitationForceX = -this.gravityConstant * _ * this.compoundGravityConstant, o.gravitationForceY = -this.gravityConstant * m * this.compoundGravityConstant));
1253
+ }, s.prototype.isConverged = function() {
1254
+ var o, d = !1;
1255
+ return this.totalIterations > this.maxIterations / 3 && (d = Math.abs(this.totalDisplacement - this.oldTotalDisplacement) < 2), o = this.totalDisplacement < this.totalDisplacementThreshold, this.oldTotalDisplacement = this.totalDisplacement, o || d;
1256
+ }, s.prototype.animate = function() {
1257
+ this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1258
+ }, s.prototype.calcNoOfChildrenForAllNodes = function() {
1259
+ for (var o, d = this.graphManager.getAllNodes(), c = 0; c < d.length; c++)
1260
+ o = d[c], o.noOfChildren = o.getNoOfChildren();
1261
+ }, s.prototype.calcGrid = function(o) {
1262
+ var d = 0, c = 0;
1263
+ d = parseInt(Math.ceil((o.getRight() - o.getLeft()) / this.repulsionRange)), c = parseInt(Math.ceil((o.getBottom() - o.getTop()) / this.repulsionRange));
1264
+ for (var E = new Array(d), _ = 0; _ < d; _++)
1265
+ E[_] = new Array(c);
1266
+ for (var _ = 0; _ < d; _++)
1267
+ for (var m = 0; m < c; m++)
1268
+ E[_][m] = new Array();
1269
+ return E;
1270
+ }, s.prototype.addNodeToGrid = function(o, d, c) {
1271
+ var E = 0, _ = 0, m = 0, N = 0;
1272
+ E = parseInt(Math.floor((o.getRect().x - d) / this.repulsionRange)), _ = parseInt(Math.floor((o.getRect().width + o.getRect().x - d) / this.repulsionRange)), m = parseInt(Math.floor((o.getRect().y - c) / this.repulsionRange)), N = parseInt(Math.floor((o.getRect().height + o.getRect().y - c) / this.repulsionRange));
1273
+ for (var L = E; L <= _; L++)
1274
+ for (var g = m; g <= N; g++)
1275
+ this.grid[L][g].push(o), o.setGridCoordinates(E, _, m, N);
1276
+ }, s.prototype.updateGrid = function() {
1277
+ var o, d, c = this.getAllNodes();
1278
+ for (this.grid = this.calcGrid(this.graphManager.getRoot()), o = 0; o < c.length; o++)
1279
+ d = c[o], this.addNodeToGrid(d, this.graphManager.getRoot().getLeft(), this.graphManager.getRoot().getTop());
1280
+ }, s.prototype.calculateRepulsionForceOfANode = function(o, d, c, E) {
1281
+ if (this.totalIterations % e.GRID_CALCULATION_CHECK_PERIOD == 1 && c || E) {
1282
+ var _ = /* @__PURE__ */ new Set();
1283
+ o.surrounding = new Array();
1284
+ for (var m, N = this.grid, L = o.startX - 1; L < o.finishX + 2; L++)
1285
+ for (var g = o.startY - 1; g < o.finishY + 2; g++)
1286
+ if (!(L < 0 || g < 0 || L >= N.length || g >= N[0].length)) {
1287
+ for (var D = 0; D < N[L][g].length; D++)
1288
+ if (m = N[L][g][D], !(o.getOwner() != m.getOwner() || o == m) && !d.has(m) && !_.has(m)) {
1289
+ var n = Math.abs(o.getCenterX() - m.getCenterX()) - (o.getWidth() / 2 + m.getWidth() / 2), u = Math.abs(o.getCenterY() - m.getCenterY()) - (o.getHeight() / 2 + m.getHeight() / 2);
1290
+ n <= this.repulsionRange && u <= this.repulsionRange && _.add(m);
1291
+ }
1292
+ }
1293
+ o.surrounding = [].concat(i(_));
1294
+ }
1295
+ for (L = 0; L < o.surrounding.length; L++)
1296
+ this.calcRepulsionForce(o, o.surrounding[L]);
1297
+ }, s.prototype.calcRepulsionRange = function() {
1298
+ return 0;
1299
+ }, p.exports = s;
1300
+ },
1301
+ /* 19 */
1302
+ /***/
1303
+ function(p, T, y) {
1304
+ var i = y(1), t = y(7);
1305
+ function e(a, h, s) {
1306
+ i.call(this, a, h, s), this.idealLength = t.DEFAULT_EDGE_LENGTH;
1307
+ }
1308
+ e.prototype = Object.create(i.prototype);
1309
+ for (var r in i)
1310
+ e[r] = i[r];
1311
+ p.exports = e;
1312
+ },
1313
+ /* 20 */
1314
+ /***/
1315
+ function(p, T, y) {
1316
+ var i = y(3);
1317
+ function t(r, a, h, s) {
1318
+ i.call(this, r, a, h, s), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0, this.startX = 0, this.finishX = 0, this.startY = 0, this.finishY = 0, this.surrounding = [];
1319
+ }
1320
+ t.prototype = Object.create(i.prototype);
1321
+ for (var e in i)
1322
+ t[e] = i[e];
1323
+ t.prototype.setGridCoordinates = function(r, a, h, s) {
1324
+ this.startX = r, this.finishX = a, this.startY = h, this.finishY = s;
1325
+ }, p.exports = t;
1326
+ },
1327
+ /* 21 */
1328
+ /***/
1329
+ function(p, T, y) {
1330
+ function i(t, e) {
1331
+ this.width = 0, this.height = 0, t !== null && e !== null && (this.height = e, this.width = t);
1332
+ }
1333
+ i.prototype.getWidth = function() {
1334
+ return this.width;
1335
+ }, i.prototype.setWidth = function(t) {
1336
+ this.width = t;
1337
+ }, i.prototype.getHeight = function() {
1338
+ return this.height;
1339
+ }, i.prototype.setHeight = function(t) {
1340
+ this.height = t;
1341
+ }, p.exports = i;
1342
+ },
1343
+ /* 22 */
1344
+ /***/
1345
+ function(p, T, y) {
1346
+ var i = y(14);
1347
+ function t() {
1348
+ this.map = {}, this.keys = [];
1349
+ }
1350
+ t.prototype.put = function(e, r) {
1351
+ var a = i.createID(e);
1352
+ this.contains(a) || (this.map[a] = r, this.keys.push(e));
1353
+ }, t.prototype.contains = function(e) {
1354
+ return i.createID(e), this.map[e] != null;
1355
+ }, t.prototype.get = function(e) {
1356
+ var r = i.createID(e);
1357
+ return this.map[r];
1358
+ }, t.prototype.keySet = function() {
1359
+ return this.keys;
1360
+ }, p.exports = t;
1361
+ },
1362
+ /* 23 */
1363
+ /***/
1364
+ function(p, T, y) {
1365
+ var i = y(14);
1366
+ function t() {
1367
+ this.set = {};
1368
+ }
1369
+ t.prototype.add = function(e) {
1370
+ var r = i.createID(e);
1371
+ this.contains(r) || (this.set[r] = e);
1372
+ }, t.prototype.remove = function(e) {
1373
+ delete this.set[i.createID(e)];
1374
+ }, t.prototype.clear = function() {
1375
+ this.set = {};
1376
+ }, t.prototype.contains = function(e) {
1377
+ return this.set[i.createID(e)] == e;
1378
+ }, t.prototype.isEmpty = function() {
1379
+ return this.size() === 0;
1380
+ }, t.prototype.size = function() {
1381
+ return Object.keys(this.set).length;
1382
+ }, t.prototype.addAllTo = function(e) {
1383
+ for (var r = Object.keys(this.set), a = r.length, h = 0; h < a; h++)
1384
+ e.push(this.set[r[h]]);
1385
+ }, t.prototype.size = function() {
1386
+ return Object.keys(this.set).length;
1387
+ }, t.prototype.addAll = function(e) {
1388
+ for (var r = e.length, a = 0; a < r; a++) {
1389
+ var h = e[a];
1390
+ this.add(h);
1391
+ }
1392
+ }, p.exports = t;
1393
+ },
1394
+ /* 24 */
1395
+ /***/
1396
+ function(p, T, y) {
1397
+ var i = /* @__PURE__ */ function() {
1398
+ function a(h, s) {
1399
+ for (var f = 0; f < s.length; f++) {
1400
+ var o = s[f];
1401
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(h, o.key, o);
1402
+ }
1403
+ }
1404
+ return function(h, s, f) {
1405
+ return s && a(h.prototype, s), f && a(h, f), h;
1406
+ };
1407
+ }();
1408
+ function t(a, h) {
1409
+ if (!(a instanceof h))
1410
+ throw new TypeError("Cannot call a class as a function");
1411
+ }
1412
+ var e = y(11), r = function() {
1413
+ function a(h, s) {
1414
+ t(this, a), (s !== null || s !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1415
+ var f = void 0;
1416
+ h instanceof e ? f = h.size() : f = h.length, this._quicksort(h, 0, f - 1);
1417
+ }
1418
+ return i(a, [{
1419
+ key: "_quicksort",
1420
+ value: function(h, s, f) {
1421
+ if (s < f) {
1422
+ var o = this._partition(h, s, f);
1423
+ this._quicksort(h, s, o), this._quicksort(h, o + 1, f);
1424
+ }
1425
+ }
1426
+ }, {
1427
+ key: "_partition",
1428
+ value: function(h, s, f) {
1429
+ for (var o = this._get(h, s), d = s, c = f; ; ) {
1430
+ for (; this.compareFunction(o, this._get(h, c)); )
1431
+ c--;
1432
+ for (; this.compareFunction(this._get(h, d), o); )
1433
+ d++;
1434
+ if (d < c)
1435
+ this._swap(h, d, c), d++, c--;
1436
+ else
1437
+ return c;
1438
+ }
1439
+ }
1440
+ }, {
1441
+ key: "_get",
1442
+ value: function(h, s) {
1443
+ return h instanceof e ? h.get_object_at(s) : h[s];
1444
+ }
1445
+ }, {
1446
+ key: "_set",
1447
+ value: function(h, s, f) {
1448
+ h instanceof e ? h.set_object_at(s, f) : h[s] = f;
1449
+ }
1450
+ }, {
1451
+ key: "_swap",
1452
+ value: function(h, s, f) {
1453
+ var o = this._get(h, s);
1454
+ this._set(h, s, this._get(h, f)), this._set(h, f, o);
1455
+ }
1456
+ }, {
1457
+ key: "_defaultCompareFunction",
1458
+ value: function(h, s) {
1459
+ return s > h;
1460
+ }
1461
+ }]), a;
1462
+ }();
1463
+ p.exports = r;
1464
+ },
1465
+ /* 25 */
1466
+ /***/
1467
+ function(p, T, y) {
1468
+ var i = /* @__PURE__ */ function() {
1469
+ function r(a, h) {
1470
+ for (var s = 0; s < h.length; s++) {
1471
+ var f = h[s];
1472
+ f.enumerable = f.enumerable || !1, f.configurable = !0, "value" in f && (f.writable = !0), Object.defineProperty(a, f.key, f);
1473
+ }
1474
+ }
1475
+ return function(a, h, s) {
1476
+ return h && r(a.prototype, h), s && r(a, s), a;
1477
+ };
1478
+ }();
1479
+ function t(r, a) {
1480
+ if (!(r instanceof a))
1481
+ throw new TypeError("Cannot call a class as a function");
1482
+ }
1483
+ var e = function() {
1484
+ function r(a, h) {
1485
+ var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 1, f = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : -1, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : -1;
1486
+ t(this, r), this.sequence1 = a, this.sequence2 = h, this.match_score = s, this.mismatch_penalty = f, this.gap_penalty = o, this.iMax = a.length + 1, this.jMax = h.length + 1, this.grid = new Array(this.iMax);
1487
+ for (var d = 0; d < this.iMax; d++) {
1488
+ this.grid[d] = new Array(this.jMax);
1489
+ for (var c = 0; c < this.jMax; c++)
1490
+ this.grid[d][c] = 0;
1491
+ }
1492
+ this.tracebackGrid = new Array(this.iMax);
1493
+ for (var E = 0; E < this.iMax; E++) {
1494
+ this.tracebackGrid[E] = new Array(this.jMax);
1495
+ for (var _ = 0; _ < this.jMax; _++)
1496
+ this.tracebackGrid[E][_] = [null, null, null];
1497
+ }
1498
+ this.alignments = [], this.score = -1, this.computeGrids();
1499
+ }
1500
+ return i(r, [{
1501
+ key: "getScore",
1502
+ value: function() {
1503
+ return this.score;
1504
+ }
1505
+ }, {
1506
+ key: "getAlignments",
1507
+ value: function() {
1508
+ return this.alignments;
1509
+ }
1510
+ // Main dynamic programming procedure
1511
+ }, {
1512
+ key: "computeGrids",
1513
+ value: function() {
1514
+ for (var a = 1; a < this.jMax; a++)
1515
+ this.grid[0][a] = this.grid[0][a - 1] + this.gap_penalty, this.tracebackGrid[0][a] = [!1, !1, !0];
1516
+ for (var h = 1; h < this.iMax; h++)
1517
+ this.grid[h][0] = this.grid[h - 1][0] + this.gap_penalty, this.tracebackGrid[h][0] = [!1, !0, !1];
1518
+ for (var s = 1; s < this.iMax; s++)
1519
+ for (var f = 1; f < this.jMax; f++) {
1520
+ var o = void 0;
1521
+ this.sequence1[s - 1] === this.sequence2[f - 1] ? o = this.grid[s - 1][f - 1] + this.match_score : o = this.grid[s - 1][f - 1] + this.mismatch_penalty;
1522
+ var d = this.grid[s - 1][f] + this.gap_penalty, c = this.grid[s][f - 1] + this.gap_penalty, E = [o, d, c], _ = this.arrayAllMaxIndexes(E);
1523
+ this.grid[s][f] = E[_[0]], this.tracebackGrid[s][f] = [_.includes(0), _.includes(1), _.includes(2)];
1524
+ }
1525
+ this.score = this.grid[this.iMax - 1][this.jMax - 1];
1526
+ }
1527
+ // Gets all possible valid sequence combinations
1528
+ }, {
1529
+ key: "alignmentTraceback",
1530
+ value: function() {
1531
+ var a = [];
1532
+ for (a.push({
1533
+ pos: [this.sequence1.length, this.sequence2.length],
1534
+ seq1: "",
1535
+ seq2: ""
1536
+ }); a[0]; ) {
1537
+ var h = a[0], s = this.tracebackGrid[h.pos[0]][h.pos[1]];
1538
+ s[0] && a.push({
1539
+ pos: [h.pos[0] - 1, h.pos[1] - 1],
1540
+ seq1: this.sequence1[h.pos[0] - 1] + h.seq1,
1541
+ seq2: this.sequence2[h.pos[1] - 1] + h.seq2
1542
+ }), s[1] && a.push({
1543
+ pos: [h.pos[0] - 1, h.pos[1]],
1544
+ seq1: this.sequence1[h.pos[0] - 1] + h.seq1,
1545
+ seq2: "-" + h.seq2
1546
+ }), s[2] && a.push({
1547
+ pos: [h.pos[0], h.pos[1] - 1],
1548
+ seq1: "-" + h.seq1,
1549
+ seq2: this.sequence2[h.pos[1] - 1] + h.seq2
1550
+ }), h.pos[0] === 0 && h.pos[1] === 0 && this.alignments.push({
1551
+ sequence1: h.seq1,
1552
+ sequence2: h.seq2
1553
+ }), a.shift();
1554
+ }
1555
+ return this.alignments;
1556
+ }
1557
+ // Helper Functions
1558
+ }, {
1559
+ key: "getAllIndexes",
1560
+ value: function(a, h) {
1561
+ for (var s = [], f = -1; (f = a.indexOf(h, f + 1)) !== -1; )
1562
+ s.push(f);
1563
+ return s;
1564
+ }
1565
+ }, {
1566
+ key: "arrayAllMaxIndexes",
1567
+ value: function(a) {
1568
+ return this.getAllIndexes(a, Math.max.apply(null, a));
1569
+ }
1570
+ }]), r;
1571
+ }();
1572
+ p.exports = e;
1573
+ },
1574
+ /* 26 */
1575
+ /***/
1576
+ function(p, T, y) {
1577
+ var i = function() {
1578
+ };
1579
+ i.FDLayout = y(18), i.FDLayoutConstants = y(7), i.FDLayoutEdge = y(19), i.FDLayoutNode = y(20), i.DimensionD = y(21), i.HashMap = y(22), i.HashSet = y(23), i.IGeometry = y(8), i.IMath = y(9), i.Integer = y(10), i.Point = y(12), i.PointD = y(4), i.RandomSeed = y(16), i.RectangleD = y(13), i.Transform = y(17), i.UniqueIDGeneretor = y(14), i.Quicksort = y(24), i.LinkedList = y(11), i.LGraphObject = y(2), i.LGraph = y(5), i.LEdge = y(1), i.LGraphManager = y(6), i.LNode = y(3), i.Layout = y(15), i.LayoutConstants = y(0), i.NeedlemanWunsch = y(25), p.exports = i;
1580
+ },
1581
+ /* 27 */
1582
+ /***/
1583
+ function(p, T, y) {
1584
+ function i() {
1585
+ this.listeners = [];
1586
+ }
1587
+ var t = i.prototype;
1588
+ t.addListener = function(e, r) {
1589
+ this.listeners.push({
1590
+ event: e,
1591
+ callback: r
1592
+ });
1593
+ }, t.removeListener = function(e, r) {
1594
+ for (var a = this.listeners.length; a >= 0; a--) {
1595
+ var h = this.listeners[a];
1596
+ h.event === e && h.callback === r && this.listeners.splice(a, 1);
1597
+ }
1598
+ }, t.emit = function(e, r) {
1599
+ for (var a = 0; a < this.listeners.length; a++) {
1600
+ var h = this.listeners[a];
1601
+ e === h.event && h.callback(r);
1602
+ }
1603
+ }, p.exports = i;
1604
+ }
1605
+ /******/
1606
+ ])
1607
+ );
1608
+ });
1609
+ }(nt)), nt.exports;
1610
+ }
1611
+ var xt = rt.exports, ut;
1612
+ function Mt() {
1613
+ return ut || (ut = 1, function(O, R) {
1614
+ (function(p, T) {
1615
+ O.exports = T(Rt());
1616
+ })(xt, function(p) {
1617
+ return (
1618
+ /******/
1619
+ function(T) {
1620
+ var y = {};
1621
+ function i(t) {
1622
+ if (y[t])
1623
+ return y[t].exports;
1624
+ var e = y[t] = {
1625
+ /******/
1626
+ i: t,
1627
+ /******/
1628
+ l: !1,
1629
+ /******/
1630
+ exports: {}
1631
+ /******/
1632
+ };
1633
+ return T[t].call(e.exports, e, e.exports, i), e.l = !0, e.exports;
1634
+ }
1635
+ return i.m = T, i.c = y, i.i = function(t) {
1636
+ return t;
1637
+ }, i.d = function(t, e, r) {
1638
+ i.o(t, e) || Object.defineProperty(t, e, {
1639
+ /******/
1640
+ configurable: !1,
1641
+ /******/
1642
+ enumerable: !0,
1643
+ /******/
1644
+ get: r
1645
+ /******/
1646
+ });
1647
+ }, i.n = function(t) {
1648
+ var e = t && t.__esModule ? (
1649
+ /******/
1650
+ function() {
1651
+ return t.default;
1652
+ }
1653
+ ) : (
1654
+ /******/
1655
+ function() {
1656
+ return t;
1657
+ }
1658
+ );
1659
+ return i.d(e, "a", e), e;
1660
+ }, i.o = function(t, e) {
1661
+ return Object.prototype.hasOwnProperty.call(t, e);
1662
+ }, i.p = "", i(i.s = 7);
1663
+ }([
1664
+ /* 0 */
1665
+ /***/
1666
+ function(T, y) {
1667
+ T.exports = p;
1668
+ },
1669
+ /* 1 */
1670
+ /***/
1671
+ function(T, y, i) {
1672
+ var t = i(0).FDLayoutConstants;
1673
+ function e() {
1674
+ }
1675
+ for (var r in t)
1676
+ e[r] = t[r];
1677
+ e.DEFAULT_USE_MULTI_LEVEL_SCALING = !1, e.DEFAULT_RADIAL_SEPARATION = t.DEFAULT_EDGE_LENGTH, e.DEFAULT_COMPONENT_SEPERATION = 60, e.TILE = !0, e.TILING_PADDING_VERTICAL = 10, e.TILING_PADDING_HORIZONTAL = 10, e.TREE_REDUCTION_ON_INCREMENTAL = !1, T.exports = e;
1678
+ },
1679
+ /* 2 */
1680
+ /***/
1681
+ function(T, y, i) {
1682
+ var t = i(0).FDLayoutEdge;
1683
+ function e(a, h, s) {
1684
+ t.call(this, a, h, s);
1685
+ }
1686
+ e.prototype = Object.create(t.prototype);
1687
+ for (var r in t)
1688
+ e[r] = t[r];
1689
+ T.exports = e;
1690
+ },
1691
+ /* 3 */
1692
+ /***/
1693
+ function(T, y, i) {
1694
+ var t = i(0).LGraph;
1695
+ function e(a, h, s) {
1696
+ t.call(this, a, h, s);
1697
+ }
1698
+ e.prototype = Object.create(t.prototype);
1699
+ for (var r in t)
1700
+ e[r] = t[r];
1701
+ T.exports = e;
1702
+ },
1703
+ /* 4 */
1704
+ /***/
1705
+ function(T, y, i) {
1706
+ var t = i(0).LGraphManager;
1707
+ function e(a) {
1708
+ t.call(this, a);
1709
+ }
1710
+ e.prototype = Object.create(t.prototype);
1711
+ for (var r in t)
1712
+ e[r] = t[r];
1713
+ T.exports = e;
1714
+ },
1715
+ /* 5 */
1716
+ /***/
1717
+ function(T, y, i) {
1718
+ var t = i(0).FDLayoutNode, e = i(0).IMath;
1719
+ function r(h, s, f, o) {
1720
+ t.call(this, h, s, f, o);
1721
+ }
1722
+ r.prototype = Object.create(t.prototype);
1723
+ for (var a in t)
1724
+ r[a] = t[a];
1725
+ r.prototype.move = function() {
1726
+ var h = this.graphManager.getLayout();
1727
+ this.displacementX = h.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.noOfChildren, this.displacementY = h.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.noOfChildren, Math.abs(this.displacementX) > h.coolingFactor * h.maxNodeDisplacement && (this.displacementX = h.coolingFactor * h.maxNodeDisplacement * e.sign(this.displacementX)), Math.abs(this.displacementY) > h.coolingFactor * h.maxNodeDisplacement && (this.displacementY = h.coolingFactor * h.maxNodeDisplacement * e.sign(this.displacementY)), this.child == null ? this.moveBy(this.displacementX, this.displacementY) : this.child.getNodes().length == 0 ? this.moveBy(this.displacementX, this.displacementY) : this.propogateDisplacementToChildren(this.displacementX, this.displacementY), h.totalDisplacement += Math.abs(this.displacementX) + Math.abs(this.displacementY), this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0;
1728
+ }, r.prototype.propogateDisplacementToChildren = function(h, s) {
1729
+ for (var f = this.getChild().getNodes(), o, d = 0; d < f.length; d++)
1730
+ o = f[d], o.getChild() == null ? (o.moveBy(h, s), o.displacementX += h, o.displacementY += s) : o.propogateDisplacementToChildren(h, s);
1731
+ }, r.prototype.setPred1 = function(h) {
1732
+ this.pred1 = h;
1733
+ }, r.prototype.getPred1 = function() {
1734
+ return pred1;
1735
+ }, r.prototype.getPred2 = function() {
1736
+ return pred2;
1737
+ }, r.prototype.setNext = function(h) {
1738
+ this.next = h;
1739
+ }, r.prototype.getNext = function() {
1740
+ return next;
1741
+ }, r.prototype.setProcessed = function(h) {
1742
+ this.processed = h;
1743
+ }, r.prototype.isProcessed = function() {
1744
+ return processed;
1745
+ }, T.exports = r;
1746
+ },
1747
+ /* 6 */
1748
+ /***/
1749
+ function(T, y, i) {
1750
+ var t = i(0).FDLayout, e = i(4), r = i(3), a = i(5), h = i(2), s = i(1), f = i(0).FDLayoutConstants, o = i(0).LayoutConstants, d = i(0).Point, c = i(0).PointD, E = i(0).Layout, _ = i(0).Integer, m = i(0).IGeometry, N = i(0).LGraph, L = i(0).Transform;
1751
+ function g() {
1752
+ t.call(this), this.toBeTiled = {};
1753
+ }
1754
+ g.prototype = Object.create(t.prototype);
1755
+ for (var D in t)
1756
+ g[D] = t[D];
1757
+ g.prototype.newGraphManager = function() {
1758
+ var n = new e(this);
1759
+ return this.graphManager = n, n;
1760
+ }, g.prototype.newGraph = function(n) {
1761
+ return new r(null, this.graphManager, n);
1762
+ }, g.prototype.newNode = function(n) {
1763
+ return new a(this.graphManager, n);
1764
+ }, g.prototype.newEdge = function(n) {
1765
+ return new h(null, null, n);
1766
+ }, g.prototype.initParameters = function() {
1767
+ t.prototype.initParameters.call(this, arguments), this.isSubLayout || (s.DEFAULT_EDGE_LENGTH < 10 ? this.idealEdgeLength = 10 : this.idealEdgeLength = s.DEFAULT_EDGE_LENGTH, this.useSmartIdealEdgeLengthCalculation = s.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.springConstant = f.DEFAULT_SPRING_STRENGTH, this.repulsionConstant = f.DEFAULT_REPULSION_STRENGTH, this.gravityConstant = f.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = f.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = f.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = f.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1, this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / f.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = f.CONVERGENCE_CHECK_PERIOD / this.maxIterations, this.coolingAdjuster = 1);
1768
+ }, g.prototype.layout = function() {
1769
+ var n = o.DEFAULT_CREATE_BENDS_AS_NEEDED;
1770
+ return n && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
1771
+ }, g.prototype.classicLayout = function() {
1772
+ if (this.nodesWithGravity = this.calculateNodesToApplyGravitationTo(), this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity), this.calcNoOfChildrenForAllNodes(), this.graphManager.calcLowestCommonAncestors(), this.graphManager.calcInclusionTreeDepths(), this.graphManager.getRoot().calcEstimatedSize(), this.calcIdealEdgeLengths(), this.incremental) {
1773
+ if (s.TREE_REDUCTION_ON_INCREMENTAL) {
1774
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1775
+ var n = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(v) {
1776
+ return n.has(v);
1777
+ });
1778
+ this.graphManager.setAllNodesToApplyGravitation(u);
1779
+ }
1780
+ } else {
1781
+ var l = this.getFlatForest();
1782
+ if (l.length > 0)
1783
+ this.positionNodesRadially(l);
1784
+ else {
1785
+ this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1786
+ var n = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(w) {
1787
+ return n.has(w);
1788
+ });
1789
+ this.graphManager.setAllNodesToApplyGravitation(u), this.positionNodesRandomly();
1790
+ }
1791
+ }
1792
+ return this.initSpringEmbedder(), this.runSpringEmbedder(), !0;
1793
+ }, g.prototype.tick = function() {
1794
+ if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished)
1795
+ if (this.prunedNodesAll.length > 0)
1796
+ this.isTreeGrowing = !0;
1797
+ else
1798
+ return !0;
1799
+ if (this.totalIterations % f.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
1800
+ if (this.isConverged())
1801
+ if (this.prunedNodesAll.length > 0)
1802
+ this.isTreeGrowing = !0;
1803
+ else
1804
+ return !0;
1805
+ this.coolingCycle++, this.layoutQuality == 0 ? this.coolingAdjuster = this.coolingCycle : this.layoutQuality == 1 && (this.coolingAdjuster = this.coolingCycle / 3), this.coolingFactor = Math.max(this.initialCoolingFactor - Math.pow(this.coolingCycle, Math.log(100 * (this.initialCoolingFactor - this.finalTemperature)) / Math.log(this.maxCoolingCycle)) / 100 * this.coolingAdjuster, this.finalTemperature), this.animationPeriod = Math.ceil(this.initialAnimationPeriod * Math.sqrt(this.coolingFactor));
1806
+ }
1807
+ if (this.isTreeGrowing) {
1808
+ if (this.growTreeIterations % 10 == 0)
1809
+ if (this.prunedNodesAll.length > 0) {
1810
+ this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
1811
+ var n = new Set(this.getAllNodes()), u = this.nodesWithGravity.filter(function(A) {
1812
+ return n.has(A);
1813
+ });
1814
+ this.graphManager.setAllNodesToApplyGravitation(u), this.graphManager.updateBounds(), this.updateGrid(), this.coolingFactor = f.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1815
+ } else
1816
+ this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1817
+ this.growTreeIterations++;
1818
+ }
1819
+ if (this.isGrowthFinished) {
1820
+ if (this.isConverged())
1821
+ return !0;
1822
+ this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), this.coolingFactor = f.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1823
+ }
1824
+ var l = !this.isTreeGrowing && !this.isGrowthFinished, v = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
1825
+ return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(l, v), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
1826
+ }, g.prototype.getPositionsData = function() {
1827
+ for (var n = this.graphManager.getAllNodes(), u = {}, l = 0; l < n.length; l++) {
1828
+ var v = n[l].rect, A = n[l].id;
1829
+ u[A] = {
1830
+ id: A,
1831
+ x: v.getCenterX(),
1832
+ y: v.getCenterY(),
1833
+ w: v.width,
1834
+ h: v.height
1835
+ };
1836
+ }
1837
+ return u;
1838
+ }, g.prototype.runSpringEmbedder = function() {
1839
+ this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
1840
+ var n = !1;
1841
+ if (f.ANIMATE === "during")
1842
+ this.emit("layoutstarted");
1843
+ else {
1844
+ for (; !n; )
1845
+ n = this.tick();
1846
+ this.graphManager.updateBounds();
1847
+ }
1848
+ }, g.prototype.calculateNodesToApplyGravitationTo = function() {
1849
+ var n = [], u, l = this.graphManager.getGraphs(), v = l.length, A;
1850
+ for (A = 0; A < v; A++)
1851
+ u = l[A], u.updateConnected(), u.isConnected || (n = n.concat(u.getNodes()));
1852
+ return n;
1853
+ }, g.prototype.createBendpoints = function() {
1854
+ var n = [];
1855
+ n = n.concat(this.graphManager.getAllEdges());
1856
+ var u = /* @__PURE__ */ new Set(), l;
1857
+ for (l = 0; l < n.length; l++) {
1858
+ var v = n[l];
1859
+ if (!u.has(v)) {
1860
+ var A = v.getSource(), w = v.getTarget();
1861
+ if (A == w)
1862
+ v.getBendpoints().push(new c()), v.getBendpoints().push(new c()), this.createDummyNodesForBendpoints(v), u.add(v);
1863
+ else {
1864
+ var I = [];
1865
+ if (I = I.concat(A.getEdgeListToNode(w)), I = I.concat(w.getEdgeListToNode(A)), !u.has(I[0])) {
1866
+ if (I.length > 1) {
1867
+ var C;
1868
+ for (C = 0; C < I.length; C++) {
1869
+ var S = I[C];
1870
+ S.getBendpoints().push(new c()), this.createDummyNodesForBendpoints(S);
1871
+ }
1872
+ }
1873
+ I.forEach(function(U) {
1874
+ u.add(U);
1875
+ });
1876
+ }
1877
+ }
1878
+ }
1879
+ if (u.size == n.length)
1880
+ break;
1881
+ }
1882
+ }, g.prototype.positionNodesRadially = function(n) {
1883
+ for (var u = new d(0, 0), l = Math.ceil(Math.sqrt(n.length)), v = 0, A = 0, w = 0, I = new c(0, 0), C = 0; C < n.length; C++) {
1884
+ C % l == 0 && (w = 0, A = v, C != 0 && (A += s.DEFAULT_COMPONENT_SEPERATION), v = 0);
1885
+ var S = n[C], U = E.findCenterOfTree(S);
1886
+ u.x = w, u.y = A, I = g.radialLayout(S, U, u), I.y > v && (v = Math.floor(I.y)), w = Math.floor(I.x + s.DEFAULT_COMPONENT_SEPERATION);
1887
+ }
1888
+ this.transform(new c(o.WORLD_CENTER_X - I.x / 2, o.WORLD_CENTER_Y - I.y / 2));
1889
+ }, g.radialLayout = function(n, u, l) {
1890
+ var v = Math.max(this.maxDiagonalInTree(n), s.DEFAULT_RADIAL_SEPARATION);
1891
+ g.branchRadialLayout(u, null, 0, 359, 0, v);
1892
+ var A = N.calculateBounds(n), w = new L();
1893
+ w.setDeviceOrgX(A.getMinX()), w.setDeviceOrgY(A.getMinY()), w.setWorldOrgX(l.x), w.setWorldOrgY(l.y);
1894
+ for (var I = 0; I < n.length; I++) {
1895
+ var C = n[I];
1896
+ C.transform(w);
1897
+ }
1898
+ var S = new c(A.getMaxX(), A.getMaxY());
1899
+ return w.inverseTransformPoint(S);
1900
+ }, g.branchRadialLayout = function(n, u, l, v, A, w) {
1901
+ var I = (v - l + 1) / 2;
1902
+ I < 0 && (I += 180);
1903
+ var C = (I + l) % 360, S = C * m.TWO_PI / 360, U = A * Math.cos(S), b = A * Math.sin(S);
1904
+ n.setCenter(U, b);
1905
+ var M = [];
1906
+ M = M.concat(n.getEdges());
1907
+ var G = M.length;
1908
+ u != null && G--;
1909
+ for (var F = 0, k = M.length, Y, X = n.getEdgesBetween(u); X.length > 1; ) {
1910
+ var P = X[0];
1911
+ X.splice(0, 1);
1912
+ var B = M.indexOf(P);
1913
+ B >= 0 && M.splice(B, 1), k--, G--;
1914
+ }
1915
+ u != null ? Y = (M.indexOf(X[0]) + 1) % k : Y = 0;
1916
+ for (var $ = Math.abs(v - l) / G, W = Y; F != G; W = ++W % k) {
1917
+ var q = M[W].getOtherEnd(n);
1918
+ if (q != u) {
1919
+ var Z = (l + F * $) % 360, j = (Z + $) % 360;
1920
+ g.branchRadialLayout(q, n, Z, j, A + w, w), F++;
1921
+ }
1922
+ }
1923
+ }, g.maxDiagonalInTree = function(n) {
1924
+ for (var u = _.MIN_VALUE, l = 0; l < n.length; l++) {
1925
+ var v = n[l], A = v.getDiagonal();
1926
+ A > u && (u = A);
1927
+ }
1928
+ return u;
1929
+ }, g.prototype.calcRepulsionRange = function() {
1930
+ return 2 * (this.level + 1) * this.idealEdgeLength;
1931
+ }, g.prototype.groupZeroDegreeMembers = function() {
1932
+ var n = this, u = {};
1933
+ this.memberGroups = {}, this.idToDummyNode = {};
1934
+ for (var l = [], v = this.graphManager.getAllNodes(), A = 0; A < v.length; A++) {
1935
+ var w = v[A], I = w.getParent();
1936
+ this.getNodeDegreeWithChildren(w) === 0 && (I.id == null || !this.getToBeTiled(I)) && l.push(w);
1937
+ }
1938
+ for (var A = 0; A < l.length; A++) {
1939
+ var w = l[A], C = w.getParent().id;
1940
+ typeof u[C] > "u" && (u[C] = []), u[C] = u[C].concat(w);
1941
+ }
1942
+ Object.keys(u).forEach(function(S) {
1943
+ if (u[S].length > 1) {
1944
+ var U = "DummyCompound_" + S;
1945
+ n.memberGroups[U] = u[S];
1946
+ var b = u[S][0].getParent(), M = new a(n.graphManager);
1947
+ M.id = U, M.paddingLeft = b.paddingLeft || 0, M.paddingRight = b.paddingRight || 0, M.paddingBottom = b.paddingBottom || 0, M.paddingTop = b.paddingTop || 0, n.idToDummyNode[U] = M;
1948
+ var G = n.getGraphManager().add(n.newGraph(), M), F = b.getChild();
1949
+ F.add(M);
1950
+ for (var k = 0; k < u[S].length; k++) {
1951
+ var Y = u[S][k];
1952
+ F.remove(Y), G.add(Y);
1953
+ }
1954
+ }
1955
+ });
1956
+ }, g.prototype.clearCompounds = function() {
1957
+ var n = {}, u = {};
1958
+ this.performDFSOnCompounds();
1959
+ for (var l = 0; l < this.compoundOrder.length; l++)
1960
+ u[this.compoundOrder[l].id] = this.compoundOrder[l], n[this.compoundOrder[l].id] = [].concat(this.compoundOrder[l].getChild().getNodes()), this.graphManager.remove(this.compoundOrder[l].getChild()), this.compoundOrder[l].child = null;
1961
+ this.graphManager.resetAllNodes(), this.tileCompoundMembers(n, u);
1962
+ }, g.prototype.clearZeroDegreeMembers = function() {
1963
+ var n = this, u = this.tiledZeroDegreePack = [];
1964
+ Object.keys(this.memberGroups).forEach(function(l) {
1965
+ var v = n.idToDummyNode[l];
1966
+ u[l] = n.tileNodes(n.memberGroups[l], v.paddingLeft + v.paddingRight), v.rect.width = u[l].width, v.rect.height = u[l].height;
1967
+ });
1968
+ }, g.prototype.repopulateCompounds = function() {
1969
+ for (var n = this.compoundOrder.length - 1; n >= 0; n--) {
1970
+ var u = this.compoundOrder[n], l = u.id, v = u.paddingLeft, A = u.paddingTop;
1971
+ this.adjustLocations(this.tiledMemberPack[l], u.rect.x, u.rect.y, v, A);
1972
+ }
1973
+ }, g.prototype.repopulateZeroDegreeMembers = function() {
1974
+ var n = this, u = this.tiledZeroDegreePack;
1975
+ Object.keys(u).forEach(function(l) {
1976
+ var v = n.idToDummyNode[l], A = v.paddingLeft, w = v.paddingTop;
1977
+ n.adjustLocations(u[l], v.rect.x, v.rect.y, A, w);
1978
+ });
1979
+ }, g.prototype.getToBeTiled = function(n) {
1980
+ var u = n.id;
1981
+ if (this.toBeTiled[u] != null)
1982
+ return this.toBeTiled[u];
1983
+ var l = n.getChild();
1984
+ if (l == null)
1985
+ return this.toBeTiled[u] = !1, !1;
1986
+ for (var v = l.getNodes(), A = 0; A < v.length; A++) {
1987
+ var w = v[A];
1988
+ if (this.getNodeDegree(w) > 0)
1989
+ return this.toBeTiled[u] = !1, !1;
1990
+ if (w.getChild() == null) {
1991
+ this.toBeTiled[w.id] = !1;
1992
+ continue;
1993
+ }
1994
+ if (!this.getToBeTiled(w))
1995
+ return this.toBeTiled[u] = !1, !1;
1996
+ }
1997
+ return this.toBeTiled[u] = !0, !0;
1998
+ }, g.prototype.getNodeDegree = function(n) {
1999
+ n.id;
2000
+ for (var u = n.getEdges(), l = 0, v = 0; v < u.length; v++) {
2001
+ var A = u[v];
2002
+ A.getSource().id !== A.getTarget().id && (l = l + 1);
2003
+ }
2004
+ return l;
2005
+ }, g.prototype.getNodeDegreeWithChildren = function(n) {
2006
+ var u = this.getNodeDegree(n);
2007
+ if (n.getChild() == null)
2008
+ return u;
2009
+ for (var l = n.getChild().getNodes(), v = 0; v < l.length; v++) {
2010
+ var A = l[v];
2011
+ u += this.getNodeDegreeWithChildren(A);
2012
+ }
2013
+ return u;
2014
+ }, g.prototype.performDFSOnCompounds = function() {
2015
+ this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
2016
+ }, g.prototype.fillCompexOrderByDFS = function(n) {
2017
+ for (var u = 0; u < n.length; u++) {
2018
+ var l = n[u];
2019
+ l.getChild() != null && this.fillCompexOrderByDFS(l.getChild().getNodes()), this.getToBeTiled(l) && this.compoundOrder.push(l);
2020
+ }
2021
+ }, g.prototype.adjustLocations = function(n, u, l, v, A) {
2022
+ u += v, l += A;
2023
+ for (var w = u, I = 0; I < n.rows.length; I++) {
2024
+ var C = n.rows[I];
2025
+ u = w;
2026
+ for (var S = 0, U = 0; U < C.length; U++) {
2027
+ var b = C[U];
2028
+ b.rect.x = u, b.rect.y = l, u += b.rect.width + n.horizontalPadding, b.rect.height > S && (S = b.rect.height);
2029
+ }
2030
+ l += S + n.verticalPadding;
2031
+ }
2032
+ }, g.prototype.tileCompoundMembers = function(n, u) {
2033
+ var l = this;
2034
+ this.tiledMemberPack = [], Object.keys(n).forEach(function(v) {
2035
+ var A = u[v];
2036
+ l.tiledMemberPack[v] = l.tileNodes(n[v], A.paddingLeft + A.paddingRight), A.rect.width = l.tiledMemberPack[v].width, A.rect.height = l.tiledMemberPack[v].height;
2037
+ });
2038
+ }, g.prototype.tileNodes = function(n, u) {
2039
+ var l = s.TILING_PADDING_VERTICAL, v = s.TILING_PADDING_HORIZONTAL, A = {
2040
+ rows: [],
2041
+ rowWidth: [],
2042
+ rowHeight: [],
2043
+ width: 0,
2044
+ height: u,
2045
+ // assume minHeight equals to minWidth
2046
+ verticalPadding: l,
2047
+ horizontalPadding: v
2048
+ };
2049
+ n.sort(function(C, S) {
2050
+ return C.rect.width * C.rect.height > S.rect.width * S.rect.height ? -1 : C.rect.width * C.rect.height < S.rect.width * S.rect.height ? 1 : 0;
2051
+ });
2052
+ for (var w = 0; w < n.length; w++) {
2053
+ var I = n[w];
2054
+ A.rows.length == 0 ? this.insertNodeToRow(A, I, 0, u) : this.canAddHorizontal(A, I.rect.width, I.rect.height) ? this.insertNodeToRow(A, I, this.getShortestRowIndex(A), u) : this.insertNodeToRow(A, I, A.rows.length, u), this.shiftToLastRow(A);
2055
+ }
2056
+ return A;
2057
+ }, g.prototype.insertNodeToRow = function(n, u, l, v) {
2058
+ var A = v;
2059
+ if (l == n.rows.length) {
2060
+ var w = [];
2061
+ n.rows.push(w), n.rowWidth.push(A), n.rowHeight.push(0);
2062
+ }
2063
+ var I = n.rowWidth[l] + u.rect.width;
2064
+ n.rows[l].length > 0 && (I += n.horizontalPadding), n.rowWidth[l] = I, n.width < I && (n.width = I);
2065
+ var C = u.rect.height;
2066
+ l > 0 && (C += n.verticalPadding);
2067
+ var S = 0;
2068
+ C > n.rowHeight[l] && (S = n.rowHeight[l], n.rowHeight[l] = C, S = n.rowHeight[l] - S), n.height += S, n.rows[l].push(u);
2069
+ }, g.prototype.getShortestRowIndex = function(n) {
2070
+ for (var u = -1, l = Number.MAX_VALUE, v = 0; v < n.rows.length; v++)
2071
+ n.rowWidth[v] < l && (u = v, l = n.rowWidth[v]);
2072
+ return u;
2073
+ }, g.prototype.getLongestRowIndex = function(n) {
2074
+ for (var u = -1, l = Number.MIN_VALUE, v = 0; v < n.rows.length; v++)
2075
+ n.rowWidth[v] > l && (u = v, l = n.rowWidth[v]);
2076
+ return u;
2077
+ }, g.prototype.canAddHorizontal = function(n, u, l) {
2078
+ var v = this.getShortestRowIndex(n);
2079
+ if (v < 0)
2080
+ return !0;
2081
+ var A = n.rowWidth[v];
2082
+ if (A + n.horizontalPadding + u <= n.width)
2083
+ return !0;
2084
+ var w = 0;
2085
+ n.rowHeight[v] < l && v > 0 && (w = l + n.verticalPadding - n.rowHeight[v]);
2086
+ var I;
2087
+ n.width - A >= u + n.horizontalPadding ? I = (n.height + w) / (A + u + n.horizontalPadding) : I = (n.height + w) / n.width, w = l + n.verticalPadding;
2088
+ var C;
2089
+ return n.width < u ? C = (n.height + w) / u : C = (n.height + w) / n.width, C < 1 && (C = 1 / C), I < 1 && (I = 1 / I), I < C;
2090
+ }, g.prototype.shiftToLastRow = function(n) {
2091
+ var u = this.getLongestRowIndex(n), l = n.rowWidth.length - 1, v = n.rows[u], A = v[v.length - 1], w = A.width + n.horizontalPadding;
2092
+ if (n.width - n.rowWidth[l] > w && u != l) {
2093
+ v.splice(-1, 1), n.rows[l].push(A), n.rowWidth[u] = n.rowWidth[u] - w, n.rowWidth[l] = n.rowWidth[l] + w, n.width = n.rowWidth[instance.getLongestRowIndex(n)];
2094
+ for (var I = Number.MIN_VALUE, C = 0; C < v.length; C++)
2095
+ v[C].height > I && (I = v[C].height);
2096
+ u > 0 && (I += n.verticalPadding);
2097
+ var S = n.rowHeight[u] + n.rowHeight[l];
2098
+ n.rowHeight[u] = I, n.rowHeight[l] < A.height + n.verticalPadding && (n.rowHeight[l] = A.height + n.verticalPadding);
2099
+ var U = n.rowHeight[u] + n.rowHeight[l];
2100
+ n.height += U - S, this.shiftToLastRow(n);
2101
+ }
2102
+ }, g.prototype.tilingPreLayout = function() {
2103
+ s.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
2104
+ }, g.prototype.tilingPostLayout = function() {
2105
+ s.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
2106
+ }, g.prototype.reduceTrees = function() {
2107
+ for (var n = [], u = !0, l; u; ) {
2108
+ var v = this.graphManager.getAllNodes(), A = [];
2109
+ u = !1;
2110
+ for (var w = 0; w < v.length; w++)
2111
+ l = v[w], l.getEdges().length == 1 && !l.getEdges()[0].isInterGraph && l.getChild() == null && (A.push([l, l.getEdges()[0], l.getOwner()]), u = !0);
2112
+ if (u == !0) {
2113
+ for (var I = [], C = 0; C < A.length; C++)
2114
+ A[C][0].getEdges().length == 1 && (I.push(A[C]), A[C][0].getOwner().remove(A[C][0]));
2115
+ n.push(I), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2116
+ }
2117
+ }
2118
+ this.prunedNodesAll = n;
2119
+ }, g.prototype.growTree = function(n) {
2120
+ for (var u = n.length, l = n[u - 1], v, A = 0; A < l.length; A++)
2121
+ v = l[A], this.findPlaceforPrunedNode(v), v[2].add(v[0]), v[2].add(v[1], v[1].source, v[1].target);
2122
+ n.splice(n.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2123
+ }, g.prototype.findPlaceforPrunedNode = function(n) {
2124
+ var u, l, v = n[0];
2125
+ v == n[1].source ? l = n[1].target : l = n[1].source;
2126
+ var A = l.startX, w = l.finishX, I = l.startY, C = l.finishY, S = 0, U = 0, b = 0, M = 0, G = [S, b, U, M];
2127
+ if (I > 0)
2128
+ for (var F = A; F <= w; F++)
2129
+ G[0] += this.grid[F][I - 1].length + this.grid[F][I].length - 1;
2130
+ if (w < this.grid.length - 1)
2131
+ for (var F = I; F <= C; F++)
2132
+ G[1] += this.grid[w + 1][F].length + this.grid[w][F].length - 1;
2133
+ if (C < this.grid[0].length - 1)
2134
+ for (var F = A; F <= w; F++)
2135
+ G[2] += this.grid[F][C + 1].length + this.grid[F][C].length - 1;
2136
+ if (A > 0)
2137
+ for (var F = I; F <= C; F++)
2138
+ G[3] += this.grid[A - 1][F].length + this.grid[A][F].length - 1;
2139
+ for (var k = _.MAX_VALUE, Y, X, P = 0; P < G.length; P++)
2140
+ G[P] < k ? (k = G[P], Y = 1, X = P) : G[P] == k && Y++;
2141
+ if (Y == 3 && k == 0)
2142
+ G[0] == 0 && G[1] == 0 && G[2] == 0 ? u = 1 : G[0] == 0 && G[1] == 0 && G[3] == 0 ? u = 0 : G[0] == 0 && G[2] == 0 && G[3] == 0 ? u = 3 : G[1] == 0 && G[2] == 0 && G[3] == 0 && (u = 2);
2143
+ else if (Y == 2 && k == 0) {
2144
+ var B = Math.floor(Math.random() * 2);
2145
+ G[0] == 0 && G[1] == 0 ? B == 0 ? u = 0 : u = 1 : G[0] == 0 && G[2] == 0 ? B == 0 ? u = 0 : u = 2 : G[0] == 0 && G[3] == 0 ? B == 0 ? u = 0 : u = 3 : G[1] == 0 && G[2] == 0 ? B == 0 ? u = 1 : u = 2 : G[1] == 0 && G[3] == 0 ? B == 0 ? u = 1 : u = 3 : B == 0 ? u = 2 : u = 3;
2146
+ } else if (Y == 4 && k == 0) {
2147
+ var B = Math.floor(Math.random() * 4);
2148
+ u = B;
2149
+ } else
2150
+ u = X;
2151
+ u == 0 ? v.setCenter(l.getCenterX(), l.getCenterY() - l.getHeight() / 2 - f.DEFAULT_EDGE_LENGTH - v.getHeight() / 2) : u == 1 ? v.setCenter(l.getCenterX() + l.getWidth() / 2 + f.DEFAULT_EDGE_LENGTH + v.getWidth() / 2, l.getCenterY()) : u == 2 ? v.setCenter(l.getCenterX(), l.getCenterY() + l.getHeight() / 2 + f.DEFAULT_EDGE_LENGTH + v.getHeight() / 2) : v.setCenter(l.getCenterX() - l.getWidth() / 2 - f.DEFAULT_EDGE_LENGTH - v.getWidth() / 2, l.getCenterY());
2152
+ }, T.exports = g;
2153
+ },
2154
+ /* 7 */
2155
+ /***/
2156
+ function(T, y, i) {
2157
+ var t = {};
2158
+ t.layoutBase = i(0), t.CoSEConstants = i(1), t.CoSEEdge = i(2), t.CoSEGraph = i(3), t.CoSEGraphManager = i(4), t.CoSELayout = i(6), t.CoSENode = i(5), T.exports = t;
2159
+ }
2160
+ /******/
2161
+ ])
2162
+ );
2163
+ });
2164
+ }(rt)), rt.exports;
2165
+ }
2166
+ var Gt = it.exports, dt;
2167
+ function St() {
2168
+ return dt || (dt = 1, function(O, R) {
2169
+ (function(p, T) {
2170
+ O.exports = T(Mt());
2171
+ })(Gt, function(p) {
2172
+ return (
2173
+ /******/
2174
+ function(T) {
2175
+ var y = {};
2176
+ function i(t) {
2177
+ if (y[t])
2178
+ return y[t].exports;
2179
+ var e = y[t] = {
2180
+ /******/
2181
+ i: t,
2182
+ /******/
2183
+ l: !1,
2184
+ /******/
2185
+ exports: {}
2186
+ /******/
2187
+ };
2188
+ return T[t].call(e.exports, e, e.exports, i), e.l = !0, e.exports;
2189
+ }
2190
+ return i.m = T, i.c = y, i.i = function(t) {
2191
+ return t;
2192
+ }, i.d = function(t, e, r) {
2193
+ i.o(t, e) || Object.defineProperty(t, e, {
2194
+ /******/
2195
+ configurable: !1,
2196
+ /******/
2197
+ enumerable: !0,
2198
+ /******/
2199
+ get: r
2200
+ /******/
2201
+ });
2202
+ }, i.n = function(t) {
2203
+ var e = t && t.__esModule ? (
2204
+ /******/
2205
+ function() {
2206
+ return t.default;
2207
+ }
2208
+ ) : (
2209
+ /******/
2210
+ function() {
2211
+ return t;
2212
+ }
2213
+ );
2214
+ return i.d(e, "a", e), e;
2215
+ }, i.o = function(t, e) {
2216
+ return Object.prototype.hasOwnProperty.call(t, e);
2217
+ }, i.p = "", i(i.s = 1);
2218
+ }([
2219
+ /* 0 */
2220
+ /***/
2221
+ function(T, y) {
2222
+ T.exports = p;
2223
+ },
2224
+ /* 1 */
2225
+ /***/
2226
+ function(T, y, i) {
2227
+ var t = i(0).layoutBase.LayoutConstants, e = i(0).layoutBase.FDLayoutConstants, r = i(0).CoSEConstants, a = i(0).CoSELayout, h = i(0).CoSENode, s = i(0).layoutBase.PointD, f = i(0).layoutBase.DimensionD, o = {
2228
+ // Called on `layoutready`
2229
+ ready: function() {
2230
+ },
2231
+ // Called on `layoutstop`
2232
+ stop: function() {
2233
+ },
2234
+ // 'draft', 'default' or 'proof"
2235
+ // - 'draft' fast cooling rate
2236
+ // - 'default' moderate cooling rate
2237
+ // - "proof" slow cooling rate
2238
+ quality: "default",
2239
+ // include labels in node dimensions
2240
+ nodeDimensionsIncludeLabels: !1,
2241
+ // number of ticks per frame; higher is faster but more jerky
2242
+ refresh: 30,
2243
+ // Whether to fit the network view after when done
2244
+ fit: !0,
2245
+ // Padding on fit
2246
+ padding: 10,
2247
+ // Whether to enable incremental mode
2248
+ randomize: !0,
2249
+ // Node repulsion (non overlapping) multiplier
2250
+ nodeRepulsion: 4500,
2251
+ // Ideal edge (non nested) length
2252
+ idealEdgeLength: 50,
2253
+ // Divisor to compute edge forces
2254
+ edgeElasticity: 0.45,
2255
+ // Nesting factor (multiplier) to compute ideal edge length for nested edges
2256
+ nestingFactor: 0.1,
2257
+ // Gravity force (constant)
2258
+ gravity: 0.25,
2259
+ // Maximum number of iterations to perform
2260
+ numIter: 2500,
2261
+ // For enabling tiling
2262
+ tile: !0,
2263
+ // Type of layout animation. The option set is {'during', 'end', false}
2264
+ animate: "end",
2265
+ // Duration for animate:end
2266
+ animationDuration: 500,
2267
+ // Represents the amount of the vertical space to put between the zero degree members during the tiling operation(can also be a function)
2268
+ tilingPaddingVertical: 10,
2269
+ // Represents the amount of the horizontal space to put between the zero degree members during the tiling operation(can also be a function)
2270
+ tilingPaddingHorizontal: 10,
2271
+ // Gravity range (constant) for compounds
2272
+ gravityRangeCompound: 1.5,
2273
+ // Gravity force (constant) for compounds
2274
+ gravityCompound: 1,
2275
+ // Gravity range (constant)
2276
+ gravityRange: 3.8,
2277
+ // Initial cooling factor for incremental layout
2278
+ initialEnergyOnIncremental: 0.5
2279
+ };
2280
+ function d(m, N) {
2281
+ var L = {};
2282
+ for (var g in m)
2283
+ L[g] = m[g];
2284
+ for (var g in N)
2285
+ L[g] = N[g];
2286
+ return L;
2287
+ }
2288
+ function c(m) {
2289
+ this.options = d(o, m), E(this.options);
2290
+ }
2291
+ var E = function(m) {
2292
+ m.nodeRepulsion != null && (r.DEFAULT_REPULSION_STRENGTH = e.DEFAULT_REPULSION_STRENGTH = m.nodeRepulsion), m.idealEdgeLength != null && (r.DEFAULT_EDGE_LENGTH = e.DEFAULT_EDGE_LENGTH = m.idealEdgeLength), m.edgeElasticity != null && (r.DEFAULT_SPRING_STRENGTH = e.DEFAULT_SPRING_STRENGTH = m.edgeElasticity), m.nestingFactor != null && (r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = m.nestingFactor), m.gravity != null && (r.DEFAULT_GRAVITY_STRENGTH = e.DEFAULT_GRAVITY_STRENGTH = m.gravity), m.numIter != null && (r.MAX_ITERATIONS = e.MAX_ITERATIONS = m.numIter), m.gravityRange != null && (r.DEFAULT_GRAVITY_RANGE_FACTOR = e.DEFAULT_GRAVITY_RANGE_FACTOR = m.gravityRange), m.gravityCompound != null && (r.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.DEFAULT_COMPOUND_GRAVITY_STRENGTH = m.gravityCompound), m.gravityRangeCompound != null && (r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = m.gravityRangeCompound), m.initialEnergyOnIncremental != null && (r.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.DEFAULT_COOLING_FACTOR_INCREMENTAL = m.initialEnergyOnIncremental), m.quality == "draft" ? t.QUALITY = 0 : m.quality == "proof" ? t.QUALITY = 2 : t.QUALITY = 1, r.NODE_DIMENSIONS_INCLUDE_LABELS = e.NODE_DIMENSIONS_INCLUDE_LABELS = t.NODE_DIMENSIONS_INCLUDE_LABELS = m.nodeDimensionsIncludeLabels, r.DEFAULT_INCREMENTAL = e.DEFAULT_INCREMENTAL = t.DEFAULT_INCREMENTAL = !m.randomize, r.ANIMATE = e.ANIMATE = t.ANIMATE = m.animate, r.TILE = m.tile, r.TILING_PADDING_VERTICAL = typeof m.tilingPaddingVertical == "function" ? m.tilingPaddingVertical.call() : m.tilingPaddingVertical, r.TILING_PADDING_HORIZONTAL = typeof m.tilingPaddingHorizontal == "function" ? m.tilingPaddingHorizontal.call() : m.tilingPaddingHorizontal;
2293
+ };
2294
+ c.prototype.run = function() {
2295
+ var m, N, L = this.options;
2296
+ this.idToLNode = {};
2297
+ var g = this.layout = new a(), D = this;
2298
+ D.stopped = !1, this.cy = this.options.cy, this.cy.trigger({ type: "layoutstart", layout: this });
2299
+ var n = g.newGraphManager();
2300
+ this.gm = n;
2301
+ var u = this.options.eles.nodes(), l = this.options.eles.edges();
2302
+ this.root = n.addRoot(), this.processChildrenList(this.root, this.getTopMostNodes(u), g);
2303
+ for (var v = 0; v < l.length; v++) {
2304
+ var A = l[v], w = this.idToLNode[A.data("source")], I = this.idToLNode[A.data("target")];
2305
+ if (w !== I && w.getEdgesBetween(I).length == 0) {
2306
+ var C = n.add(g.newEdge(), w, I);
2307
+ C.id = A.id();
2308
+ }
2309
+ }
2310
+ var S = function(b, M) {
2311
+ typeof b == "number" && (b = M);
2312
+ var G = b.data("id"), F = D.idToLNode[G];
2313
+ return {
2314
+ x: F.getRect().getCenterX(),
2315
+ y: F.getRect().getCenterY()
2316
+ };
2317
+ }, U = function b() {
2318
+ for (var M = function() {
2319
+ L.fit && L.cy.fit(L.eles, L.padding), m || (m = !0, D.cy.one("layoutready", L.ready), D.cy.trigger({ type: "layoutready", layout: D }));
2320
+ }, G = D.options.refresh, F, k = 0; k < G && !F; k++)
2321
+ F = D.stopped || D.layout.tick();
2322
+ if (F) {
2323
+ g.checkLayoutSuccess() && !g.isSubLayout && g.doPostLayout(), g.tilingPostLayout && g.tilingPostLayout(), g.isLayoutFinished = !0, D.options.eles.nodes().positions(S), M(), D.cy.one("layoutstop", D.options.stop), D.cy.trigger({ type: "layoutstop", layout: D }), N && cancelAnimationFrame(N), m = !1;
2324
+ return;
2325
+ }
2326
+ var Y = D.layout.getPositionsData();
2327
+ L.eles.nodes().positions(function(X, P) {
2328
+ if (typeof X == "number" && (X = P), !X.isParent()) {
2329
+ for (var B = X.id(), $ = Y[B], W = X; $ == null && ($ = Y[W.data("parent")] || Y["DummyCompound_" + W.data("parent")], Y[B] = $, W = W.parent()[0], W != null); )
2330
+ ;
2331
+ return $ != null ? {
2332
+ x: $.x,
2333
+ y: $.y
2334
+ } : {
2335
+ x: X.position("x"),
2336
+ y: X.position("y")
2337
+ };
2338
+ }
2339
+ }), M(), N = requestAnimationFrame(b);
2340
+ };
2341
+ return g.addListener("layoutstarted", function() {
2342
+ D.options.animate === "during" && (N = requestAnimationFrame(U));
2343
+ }), g.runLayout(), this.options.animate !== "during" && (D.options.eles.nodes().not(":parent").layoutPositions(D, D.options, S), m = !1), this;
2344
+ }, c.prototype.getTopMostNodes = function(m) {
2345
+ for (var N = {}, L = 0; L < m.length; L++)
2346
+ N[m[L].id()] = !0;
2347
+ var g = m.filter(function(D, n) {
2348
+ typeof D == "number" && (D = n);
2349
+ for (var u = D.parent()[0]; u != null; ) {
2350
+ if (N[u.id()])
2351
+ return !1;
2352
+ u = u.parent()[0];
2353
+ }
2354
+ return !0;
2355
+ });
2356
+ return g;
2357
+ }, c.prototype.processChildrenList = function(m, N, L) {
2358
+ for (var g = N.length, D = 0; D < g; D++) {
2359
+ var n = N[D], u = n.children(), l, v = n.layoutDimensions({
2360
+ nodeDimensionsIncludeLabels: this.options.nodeDimensionsIncludeLabels
2361
+ });
2362
+ if (n.outerWidth() != null && n.outerHeight() != null ? l = m.add(new h(L.graphManager, new s(n.position("x") - v.w / 2, n.position("y") - v.h / 2), new f(parseFloat(v.w), parseFloat(v.h)))) : l = m.add(new h(this.graphManager)), l.id = n.data("id"), l.paddingLeft = parseInt(n.css("padding")), l.paddingTop = parseInt(n.css("padding")), l.paddingRight = parseInt(n.css("padding")), l.paddingBottom = parseInt(n.css("padding")), this.options.nodeDimensionsIncludeLabels && n.isParent()) {
2363
+ var A = n.boundingBox({ includeLabels: !0, includeNodes: !1 }).w, w = n.boundingBox({ includeLabels: !0, includeNodes: !1 }).h, I = n.css("text-halign");
2364
+ l.labelWidth = A, l.labelHeight = w, l.labelPos = I;
2365
+ }
2366
+ if (this.idToLNode[n.data("id")] = l, isNaN(l.rect.x) && (l.rect.x = 0), isNaN(l.rect.y) && (l.rect.y = 0), u != null && u.length > 0) {
2367
+ var C;
2368
+ C = L.getGraphManager().add(L.newGraph(), l), this.processChildrenList(C, u, L);
2369
+ }
2370
+ }
2371
+ }, c.prototype.stop = function() {
2372
+ return this.stopped = !0, this;
2373
+ };
2374
+ var _ = function(m) {
2375
+ m("layout", "cose-bilkent", c);
2376
+ };
2377
+ typeof cytoscape < "u" && _(cytoscape), T.exports = _;
2378
+ }
2379
+ /******/
2380
+ ])
2381
+ );
2382
+ });
2383
+ }(it)), it.exports;
2384
+ }
2385
+ var bt = St();
2386
+ const Ft = /* @__PURE__ */ _t(bt);
2387
+ var ot = function() {
2388
+ var O = /* @__PURE__ */ x(function(L, g, D, n) {
2389
+ for (D = D || {}, n = L.length; n--; D[L[n]] = g)
2390
+ ;
2391
+ return D;
2392
+ }, "o"), R = [1, 4], p = [1, 13], T = [1, 12], y = [1, 15], i = [1, 16], t = [1, 20], e = [1, 19], r = [6, 7, 8], a = [1, 26], h = [1, 24], s = [1, 25], f = [6, 7, 11], o = [1, 6, 13, 15, 16, 19, 22], d = [1, 33], c = [1, 34], E = [1, 6, 7, 11, 13, 15, 16, 19, 22], _ = {
2393
+ trace: /* @__PURE__ */ x(function() {
2394
+ }, "trace"),
2395
+ yy: {},
2396
+ symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, MINDMAP: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, ICON: 15, CLASS: 16, nodeWithId: 17, nodeWithoutId: 18, NODE_DSTART: 19, NODE_DESCR: 20, NODE_DEND: 21, NODE_ID: 22, $accept: 0, $end: 1 },
2397
+ terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" },
2398
+ productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]],
2399
+ performAction: /* @__PURE__ */ x(function(L, g, D, n, u, l, v) {
2400
+ var A = l.length - 1;
2401
+ switch (u) {
2402
+ case 6:
2403
+ case 7:
2404
+ return n;
2405
+ case 8:
2406
+ n.getLogger().trace("Stop NL ");
2407
+ break;
2408
+ case 9:
2409
+ n.getLogger().trace("Stop EOF ");
2410
+ break;
2411
+ case 11:
2412
+ n.getLogger().trace("Stop NL2 ");
2413
+ break;
2414
+ case 12:
2415
+ n.getLogger().trace("Stop EOF2 ");
2416
+ break;
2417
+ case 15:
2418
+ n.getLogger().info("Node: ", l[A].id), n.addNode(l[A - 1].length, l[A].id, l[A].descr, l[A].type);
2419
+ break;
2420
+ case 16:
2421
+ n.getLogger().trace("Icon: ", l[A]), n.decorateNode({ icon: l[A] });
2422
+ break;
2423
+ case 17:
2424
+ case 21:
2425
+ n.decorateNode({ class: l[A] });
2426
+ break;
2427
+ case 18:
2428
+ n.getLogger().trace("SPACELIST");
2429
+ break;
2430
+ case 19:
2431
+ n.getLogger().trace("Node: ", l[A].id), n.addNode(0, l[A].id, l[A].descr, l[A].type);
2432
+ break;
2433
+ case 20:
2434
+ n.decorateNode({ icon: l[A] });
2435
+ break;
2436
+ case 25:
2437
+ n.getLogger().trace("node found ..", l[A - 2]), this.$ = { id: l[A - 1], descr: l[A - 1], type: n.getType(l[A - 2], l[A]) };
2438
+ break;
2439
+ case 26:
2440
+ this.$ = { id: l[A], descr: l[A], type: n.nodeType.DEFAULT };
2441
+ break;
2442
+ case 27:
2443
+ n.getLogger().trace("node found ..", l[A - 3]), this.$ = { id: l[A - 3], descr: l[A - 1], type: n.getType(l[A - 2], l[A]) };
2444
+ break;
2445
+ }
2446
+ }, "anonymous"),
2447
+ table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: R }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: R }, { 6: p, 7: [1, 10], 9: 9, 12: 11, 13: T, 14: 14, 15: y, 16: i, 17: 17, 18: 18, 19: t, 22: e }, O(r, [2, 3]), { 1: [2, 2] }, O(r, [2, 4]), O(r, [2, 5]), { 1: [2, 6], 6: p, 12: 21, 13: T, 14: 14, 15: y, 16: i, 17: 17, 18: 18, 19: t, 22: e }, { 6: p, 9: 22, 12: 11, 13: T, 14: 14, 15: y, 16: i, 17: 17, 18: 18, 19: t, 22: e }, { 6: a, 7: h, 10: 23, 11: s }, O(f, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: t, 22: e }), O(f, [2, 18]), O(f, [2, 19]), O(f, [2, 20]), O(f, [2, 21]), O(f, [2, 23]), O(f, [2, 24]), O(f, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: a, 7: h, 10: 32, 11: s }, { 1: [2, 7], 6: p, 12: 21, 13: T, 14: 14, 15: y, 16: i, 17: 17, 18: 18, 19: t, 22: e }, O(o, [2, 14], { 7: d, 11: c }), O(E, [2, 8]), O(E, [2, 9]), O(E, [2, 10]), O(f, [2, 15]), O(f, [2, 16]), O(f, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, O(o, [2, 13], { 7: d, 11: c }), O(E, [2, 11]), O(E, [2, 12]), { 21: [1, 37] }, O(f, [2, 25]), O(f, [2, 27])],
2448
+ defaultActions: { 2: [2, 1], 6: [2, 2] },
2449
+ parseError: /* @__PURE__ */ x(function(L, g) {
2450
+ if (g.recoverable)
2451
+ this.trace(L);
2452
+ else {
2453
+ var D = new Error(L);
2454
+ throw D.hash = g, D;
2455
+ }
2456
+ }, "parseError"),
2457
+ parse: /* @__PURE__ */ x(function(L) {
2458
+ var g = this, D = [0], n = [], u = [null], l = [], v = this.table, A = "", w = 0, I = 0, C = 2, S = 1, U = l.slice.call(arguments, 1), b = Object.create(this.lexer), M = { yy: {} };
2459
+ for (var G in this.yy)
2460
+ Object.prototype.hasOwnProperty.call(this.yy, G) && (M.yy[G] = this.yy[G]);
2461
+ b.setInput(L, M.yy), M.yy.lexer = b, M.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
2462
+ var F = b.yylloc;
2463
+ l.push(F);
2464
+ var k = b.options && b.options.ranges;
2465
+ typeof M.yy.parseError == "function" ? this.parseError = M.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
2466
+ function Y(V) {
2467
+ D.length = D.length - 2 * V, u.length = u.length - V, l.length = l.length - V;
2468
+ }
2469
+ x(Y, "popStack");
2470
+ function X() {
2471
+ var V;
2472
+ return V = n.pop() || b.lex() || S, typeof V != "number" && (V instanceof Array && (n = V, V = n.pop()), V = g.symbols_[V] || V), V;
2473
+ }
2474
+ x(X, "lex");
2475
+ for (var P, B, $, W, q = {}, Z, j, ct, Q; ; ) {
2476
+ if (B = D[D.length - 1], this.defaultActions[B] ? $ = this.defaultActions[B] : ((P === null || typeof P > "u") && (P = X()), $ = v[B] && v[B][P]), typeof $ > "u" || !$.length || !$[0]) {
2477
+ var et = "";
2478
+ Q = [];
2479
+ for (Z in v[B])
2480
+ this.terminals_[Z] && Z > C && Q.push("'" + this.terminals_[Z] + "'");
2481
+ b.showPosition ? et = "Parse error on line " + (w + 1) + `:
2482
+ ` + b.showPosition() + `
2483
+ Expecting ` + Q.join(", ") + ", got '" + (this.terminals_[P] || P) + "'" : et = "Parse error on line " + (w + 1) + ": Unexpected " + (P == S ? "end of input" : "'" + (this.terminals_[P] || P) + "'"), this.parseError(et, {
2484
+ text: b.match,
2485
+ token: this.terminals_[P] || P,
2486
+ line: b.yylineno,
2487
+ loc: F,
2488
+ expected: Q
2489
+ });
2490
+ }
2491
+ if ($[0] instanceof Array && $.length > 1)
2492
+ throw new Error("Parse Error: multiple actions possible at state: " + B + ", token: " + P);
2493
+ switch ($[0]) {
2494
+ case 1:
2495
+ D.push(P), u.push(b.yytext), l.push(b.yylloc), D.push($[1]), P = null, I = b.yyleng, A = b.yytext, w = b.yylineno, F = b.yylloc;
2496
+ break;
2497
+ case 2:
2498
+ if (j = this.productions_[$[1]][1], q.$ = u[u.length - j], q._$ = {
2499
+ first_line: l[l.length - (j || 1)].first_line,
2500
+ last_line: l[l.length - 1].last_line,
2501
+ first_column: l[l.length - (j || 1)].first_column,
2502
+ last_column: l[l.length - 1].last_column
2503
+ }, k && (q._$.range = [
2504
+ l[l.length - (j || 1)].range[0],
2505
+ l[l.length - 1].range[1]
2506
+ ]), W = this.performAction.apply(q, [
2507
+ A,
2508
+ I,
2509
+ w,
2510
+ M.yy,
2511
+ $[1],
2512
+ u,
2513
+ l
2514
+ ].concat(U)), typeof W < "u")
2515
+ return W;
2516
+ j && (D = D.slice(0, -1 * j * 2), u = u.slice(0, -1 * j), l = l.slice(0, -1 * j)), D.push(this.productions_[$[1]][0]), u.push(q.$), l.push(q._$), ct = v[D[D.length - 2]][D[D.length - 1]], D.push(ct);
2517
+ break;
2518
+ case 3:
2519
+ return !0;
2520
+ }
2521
+ }
2522
+ return !0;
2523
+ }, "parse")
2524
+ }, m = /* @__PURE__ */ function() {
2525
+ var L = {
2526
+ EOF: 1,
2527
+ parseError: /* @__PURE__ */ x(function(g, D) {
2528
+ if (this.yy.parser)
2529
+ this.yy.parser.parseError(g, D);
2530
+ else
2531
+ throw new Error(g);
2532
+ }, "parseError"),
2533
+ // resets the lexer, sets new input
2534
+ setInput: /* @__PURE__ */ x(function(g, D) {
2535
+ return this.yy = D || this.yy || {}, this._input = g, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
2536
+ first_line: 1,
2537
+ first_column: 0,
2538
+ last_line: 1,
2539
+ last_column: 0
2540
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
2541
+ }, "setInput"),
2542
+ // consumes and returns one char from the input
2543
+ input: /* @__PURE__ */ x(function() {
2544
+ var g = this._input[0];
2545
+ this.yytext += g, this.yyleng++, this.offset++, this.match += g, this.matched += g;
2546
+ var D = g.match(/(?:\r\n?|\n).*/g);
2547
+ return D ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), g;
2548
+ }, "input"),
2549
+ // unshifts one char (or a string) into the input
2550
+ unput: /* @__PURE__ */ x(function(g) {
2551
+ var D = g.length, n = g.split(/(?:\r\n?|\n)/g);
2552
+ this._input = g + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - D), this.offset -= D;
2553
+ var u = this.match.split(/(?:\r\n?|\n)/g);
2554
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
2555
+ var l = this.yylloc.range;
2556
+ return this.yylloc = {
2557
+ first_line: this.yylloc.first_line,
2558
+ last_line: this.yylineno + 1,
2559
+ first_column: this.yylloc.first_column,
2560
+ last_column: n ? (n.length === u.length ? this.yylloc.first_column : 0) + u[u.length - n.length].length - n[0].length : this.yylloc.first_column - D
2561
+ }, this.options.ranges && (this.yylloc.range = [l[0], l[0] + this.yyleng - D]), this.yyleng = this.yytext.length, this;
2562
+ }, "unput"),
2563
+ // When called from action, caches matched text and appends it on next action
2564
+ more: /* @__PURE__ */ x(function() {
2565
+ return this._more = !0, this;
2566
+ }, "more"),
2567
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
2568
+ reject: /* @__PURE__ */ x(function() {
2569
+ if (this.options.backtrack_lexer)
2570
+ this._backtrack = !0;
2571
+ else
2572
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
2573
+ ` + this.showPosition(), {
2574
+ text: "",
2575
+ token: null,
2576
+ line: this.yylineno
2577
+ });
2578
+ return this;
2579
+ }, "reject"),
2580
+ // retain first n characters of the match
2581
+ less: /* @__PURE__ */ x(function(g) {
2582
+ this.unput(this.match.slice(g));
2583
+ }, "less"),
2584
+ // displays already matched input, i.e. for error messages
2585
+ pastInput: /* @__PURE__ */ x(function() {
2586
+ var g = this.matched.substr(0, this.matched.length - this.match.length);
2587
+ return (g.length > 20 ? "..." : "") + g.substr(-20).replace(/\n/g, "");
2588
+ }, "pastInput"),
2589
+ // displays upcoming input, i.e. for error messages
2590
+ upcomingInput: /* @__PURE__ */ x(function() {
2591
+ var g = this.match;
2592
+ return g.length < 20 && (g += this._input.substr(0, 20 - g.length)), (g.substr(0, 20) + (g.length > 20 ? "..." : "")).replace(/\n/g, "");
2593
+ }, "upcomingInput"),
2594
+ // displays the character position where the lexing error occurred, i.e. for error messages
2595
+ showPosition: /* @__PURE__ */ x(function() {
2596
+ var g = this.pastInput(), D = new Array(g.length + 1).join("-");
2597
+ return g + this.upcomingInput() + `
2598
+ ` + D + "^";
2599
+ }, "showPosition"),
2600
+ // test the lexed token: return FALSE when not a match, otherwise return token
2601
+ test_match: /* @__PURE__ */ x(function(g, D) {
2602
+ var n, u, l;
2603
+ if (this.options.backtrack_lexer && (l = {
2604
+ yylineno: this.yylineno,
2605
+ yylloc: {
2606
+ first_line: this.yylloc.first_line,
2607
+ last_line: this.last_line,
2608
+ first_column: this.yylloc.first_column,
2609
+ last_column: this.yylloc.last_column
2610
+ },
2611
+ yytext: this.yytext,
2612
+ match: this.match,
2613
+ matches: this.matches,
2614
+ matched: this.matched,
2615
+ yyleng: this.yyleng,
2616
+ offset: this.offset,
2617
+ _more: this._more,
2618
+ _input: this._input,
2619
+ yy: this.yy,
2620
+ conditionStack: this.conditionStack.slice(0),
2621
+ done: this.done
2622
+ }, this.options.ranges && (l.yylloc.range = this.yylloc.range.slice(0))), u = g[0].match(/(?:\r\n?|\n).*/g), u && (this.yylineno += u.length), this.yylloc = {
2623
+ first_line: this.yylloc.last_line,
2624
+ last_line: this.yylineno + 1,
2625
+ first_column: this.yylloc.last_column,
2626
+ last_column: u ? u[u.length - 1].length - u[u.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + g[0].length
2627
+ }, this.yytext += g[0], this.match += g[0], this.matches = g, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(g[0].length), this.matched += g[0], n = this.performAction.call(this, this.yy, this, D, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
2628
+ return n;
2629
+ if (this._backtrack) {
2630
+ for (var v in l)
2631
+ this[v] = l[v];
2632
+ return !1;
2633
+ }
2634
+ return !1;
2635
+ }, "test_match"),
2636
+ // return next match in input
2637
+ next: /* @__PURE__ */ x(function() {
2638
+ if (this.done)
2639
+ return this.EOF;
2640
+ this._input || (this.done = !0);
2641
+ var g, D, n, u;
2642
+ this._more || (this.yytext = "", this.match = "");
2643
+ for (var l = this._currentRules(), v = 0; v < l.length; v++)
2644
+ if (n = this._input.match(this.rules[l[v]]), n && (!D || n[0].length > D[0].length)) {
2645
+ if (D = n, u = v, this.options.backtrack_lexer) {
2646
+ if (g = this.test_match(n, l[v]), g !== !1)
2647
+ return g;
2648
+ if (this._backtrack) {
2649
+ D = !1;
2650
+ continue;
2651
+ } else
2652
+ return !1;
2653
+ } else if (!this.options.flex)
2654
+ break;
2655
+ }
2656
+ return D ? (g = this.test_match(D, l[u]), g !== !1 ? g : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
2657
+ ` + this.showPosition(), {
2658
+ text: "",
2659
+ token: null,
2660
+ line: this.yylineno
2661
+ });
2662
+ }, "next"),
2663
+ // return next match that has a token
2664
+ lex: /* @__PURE__ */ x(function() {
2665
+ var g = this.next();
2666
+ return g || this.lex();
2667
+ }, "lex"),
2668
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
2669
+ begin: /* @__PURE__ */ x(function(g) {
2670
+ this.conditionStack.push(g);
2671
+ }, "begin"),
2672
+ // pop the previously active lexer condition state off the condition stack
2673
+ popState: /* @__PURE__ */ x(function() {
2674
+ var g = this.conditionStack.length - 1;
2675
+ return g > 0 ? this.conditionStack.pop() : this.conditionStack[0];
2676
+ }, "popState"),
2677
+ // produce the lexer rule set which is active for the currently active lexer condition state
2678
+ _currentRules: /* @__PURE__ */ x(function() {
2679
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
2680
+ }, "_currentRules"),
2681
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
2682
+ topState: /* @__PURE__ */ x(function(g) {
2683
+ return g = this.conditionStack.length - 1 - Math.abs(g || 0), g >= 0 ? this.conditionStack[g] : "INITIAL";
2684
+ }, "topState"),
2685
+ // alias for begin(condition)
2686
+ pushState: /* @__PURE__ */ x(function(g) {
2687
+ this.begin(g);
2688
+ }, "pushState"),
2689
+ // return the number of states currently on the stack
2690
+ stateStackSize: /* @__PURE__ */ x(function() {
2691
+ return this.conditionStack.length;
2692
+ }, "stateStackSize"),
2693
+ options: { "case-insensitive": !0 },
2694
+ performAction: /* @__PURE__ */ x(function(g, D, n, u) {
2695
+ switch (n) {
2696
+ case 0:
2697
+ return g.getLogger().trace("Found comment", D.yytext), 6;
2698
+ case 1:
2699
+ return 8;
2700
+ case 2:
2701
+ this.begin("CLASS");
2702
+ break;
2703
+ case 3:
2704
+ return this.popState(), 16;
2705
+ case 4:
2706
+ this.popState();
2707
+ break;
2708
+ case 5:
2709
+ g.getLogger().trace("Begin icon"), this.begin("ICON");
2710
+ break;
2711
+ case 6:
2712
+ return g.getLogger().trace("SPACELINE"), 6;
2713
+ case 7:
2714
+ return 7;
2715
+ case 8:
2716
+ return 15;
2717
+ case 9:
2718
+ g.getLogger().trace("end icon"), this.popState();
2719
+ break;
2720
+ case 10:
2721
+ return g.getLogger().trace("Exploding node"), this.begin("NODE"), 19;
2722
+ case 11:
2723
+ return g.getLogger().trace("Cloud"), this.begin("NODE"), 19;
2724
+ case 12:
2725
+ return g.getLogger().trace("Explosion Bang"), this.begin("NODE"), 19;
2726
+ case 13:
2727
+ return g.getLogger().trace("Cloud Bang"), this.begin("NODE"), 19;
2728
+ case 14:
2729
+ return this.begin("NODE"), 19;
2730
+ case 15:
2731
+ return this.begin("NODE"), 19;
2732
+ case 16:
2733
+ return this.begin("NODE"), 19;
2734
+ case 17:
2735
+ return this.begin("NODE"), 19;
2736
+ case 18:
2737
+ return 13;
2738
+ case 19:
2739
+ return 22;
2740
+ case 20:
2741
+ return 11;
2742
+ case 21:
2743
+ this.begin("NSTR2");
2744
+ break;
2745
+ case 22:
2746
+ return "NODE_DESCR";
2747
+ case 23:
2748
+ this.popState();
2749
+ break;
2750
+ case 24:
2751
+ g.getLogger().trace("Starting NSTR"), this.begin("NSTR");
2752
+ break;
2753
+ case 25:
2754
+ return g.getLogger().trace("description:", D.yytext), "NODE_DESCR";
2755
+ case 26:
2756
+ this.popState();
2757
+ break;
2758
+ case 27:
2759
+ return this.popState(), g.getLogger().trace("node end ))"), "NODE_DEND";
2760
+ case 28:
2761
+ return this.popState(), g.getLogger().trace("node end )"), "NODE_DEND";
2762
+ case 29:
2763
+ return this.popState(), g.getLogger().trace("node end ...", D.yytext), "NODE_DEND";
2764
+ case 30:
2765
+ return this.popState(), g.getLogger().trace("node end (("), "NODE_DEND";
2766
+ case 31:
2767
+ return this.popState(), g.getLogger().trace("node end (-"), "NODE_DEND";
2768
+ case 32:
2769
+ return this.popState(), g.getLogger().trace("node end (-"), "NODE_DEND";
2770
+ case 33:
2771
+ return this.popState(), g.getLogger().trace("node end (("), "NODE_DEND";
2772
+ case 34:
2773
+ return this.popState(), g.getLogger().trace("node end (("), "NODE_DEND";
2774
+ case 35:
2775
+ return g.getLogger().trace("Long description:", D.yytext), 20;
2776
+ case 36:
2777
+ return g.getLogger().trace("Long description:", D.yytext), 20;
2778
+ }
2779
+ }, "anonymous"),
2780
+ rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
2781
+ conditions: { CLASS: { rules: [3, 4], inclusive: !1 }, ICON: { rules: [8, 9], inclusive: !1 }, NSTR2: { rules: [22, 23], inclusive: !1 }, NSTR: { rules: [25, 26], inclusive: !1 }, NODE: { rules: [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], inclusive: !0 } }
2782
+ };
2783
+ return L;
2784
+ }();
2785
+ _.lexer = m;
2786
+ function N() {
2787
+ this.yy = {};
2788
+ }
2789
+ return x(N, "Parser"), N.prototype = _, _.Parser = N, new N();
2790
+ }();
2791
+ ot.parser = ot;
2792
+ var Pt = ot, z = [], ft = 0, at = {}, Ut = /* @__PURE__ */ x(() => {
2793
+ z = [], ft = 0, at = {};
2794
+ }, "clear"), kt = /* @__PURE__ */ x(function(O) {
2795
+ for (let R = z.length - 1; R >= 0; R--)
2796
+ if (z[R].level < O)
2797
+ return z[R];
2798
+ return null;
2799
+ }, "getParent"), Yt = /* @__PURE__ */ x(() => z.length > 0 ? z[0] : null, "getMindmap"), Xt = /* @__PURE__ */ x((O, R, p, T) => {
2800
+ var y, i;
2801
+ K.info("addNode", O, R, p, T);
2802
+ const t = st();
2803
+ let e = ((y = t.mindmap) == null ? void 0 : y.padding) ?? J.mindmap.padding;
2804
+ switch (T) {
2805
+ case H.ROUNDED_RECT:
2806
+ case H.RECT:
2807
+ case H.HEXAGON:
2808
+ e *= 2;
2809
+ }
2810
+ const r = {
2811
+ id: ft++,
2812
+ nodeId: tt(R, t),
2813
+ level: O,
2814
+ descr: tt(p, t),
2815
+ type: T,
2816
+ children: [],
2817
+ width: ((i = t.mindmap) == null ? void 0 : i.maxNodeWidth) ?? J.mindmap.maxNodeWidth,
2818
+ padding: e
2819
+ }, a = kt(O);
2820
+ if (a)
2821
+ a.children.push(r), z.push(r);
2822
+ else if (z.length === 0)
2823
+ z.push(r);
2824
+ else
2825
+ throw new Error(
2826
+ 'There can be only one root. No parent could be found for ("' + r.descr + '")'
2827
+ );
2828
+ }, "addNode"), H = {
2829
+ DEFAULT: 0,
2830
+ NO_BORDER: 0,
2831
+ ROUNDED_RECT: 1,
2832
+ RECT: 2,
2833
+ CIRCLE: 3,
2834
+ CLOUD: 4,
2835
+ BANG: 5,
2836
+ HEXAGON: 6
2837
+ }, Bt = /* @__PURE__ */ x((O, R) => {
2838
+ switch (K.debug("In get type", O, R), O) {
2839
+ case "[":
2840
+ return H.RECT;
2841
+ case "(":
2842
+ return R === ")" ? H.ROUNDED_RECT : H.CLOUD;
2843
+ case "((":
2844
+ return H.CIRCLE;
2845
+ case ")":
2846
+ return H.CLOUD;
2847
+ case "))":
2848
+ return H.BANG;
2849
+ case "{{":
2850
+ return H.HEXAGON;
2851
+ default:
2852
+ return H.DEFAULT;
2853
+ }
2854
+ }, "getType"), $t = /* @__PURE__ */ x((O, R) => {
2855
+ at[O] = R;
2856
+ }, "setElementForId"), Ht = /* @__PURE__ */ x((O) => {
2857
+ if (!O)
2858
+ return;
2859
+ const R = st(), p = z[z.length - 1];
2860
+ O.icon && (p.icon = tt(O.icon, R)), O.class && (p.class = tt(O.class, R));
2861
+ }, "decorateNode"), Wt = /* @__PURE__ */ x((O) => {
2862
+ switch (O) {
2863
+ case H.DEFAULT:
2864
+ return "no-border";
2865
+ case H.RECT:
2866
+ return "rect";
2867
+ case H.ROUNDED_RECT:
2868
+ return "rounded-rect";
2869
+ case H.CIRCLE:
2870
+ return "circle";
2871
+ case H.CLOUD:
2872
+ return "cloud";
2873
+ case H.BANG:
2874
+ return "bang";
2875
+ case H.HEXAGON:
2876
+ return "hexgon";
2877
+ default:
2878
+ return "no-border";
2879
+ }
2880
+ }, "type2Str"), Vt = /* @__PURE__ */ x(() => K, "getLogger"), jt = /* @__PURE__ */ x((O) => at[O], "getElementById"), zt = {
2881
+ clear: Ut,
2882
+ addNode: Xt,
2883
+ getMindmap: Yt,
2884
+ nodeType: H,
2885
+ getType: Bt,
2886
+ setElementForId: $t,
2887
+ decorateNode: Ht,
2888
+ type2Str: Wt,
2889
+ getLogger: Vt,
2890
+ getElementById: jt
2891
+ }, qt = zt, Zt = 12, Kt = /* @__PURE__ */ x(function(O, R, p, T) {
2892
+ R.append("path").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr(
2893
+ "d",
2894
+ `M0 ${p.height - 5} v${-p.height + 2 * 5} q0,-5 5,-5 h${p.width - 2 * 5} q5,0 5,5 v${p.height - 5} H0 Z`
2895
+ ), R.append("line").attr("class", "node-line-" + T).attr("x1", 0).attr("y1", p.height).attr("x2", p.width).attr("y2", p.height);
2896
+ }, "defaultBkg"), Qt = /* @__PURE__ */ x(function(O, R, p) {
2897
+ R.append("rect").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr("height", p.height).attr("width", p.width);
2898
+ }, "rectBkg"), Jt = /* @__PURE__ */ x(function(O, R, p) {
2899
+ const T = p.width, y = p.height, i = 0.15 * T, t = 0.25 * T, e = 0.35 * T, r = 0.2 * T;
2900
+ R.append("path").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr(
2901
+ "d",
2902
+ `M0 0 a${i},${i} 0 0,1 ${T * 0.25},${-1 * T * 0.1}
2903
+ a${e},${e} 1 0,1 ${T * 0.4},${-1 * T * 0.1}
2904
+ a${t},${t} 1 0,1 ${T * 0.35},${1 * T * 0.2}
2905
+
2906
+ a${i},${i} 1 0,1 ${T * 0.15},${1 * y * 0.35}
2907
+ a${r},${r} 1 0,1 ${-1 * T * 0.15},${1 * y * 0.65}
2908
+
2909
+ a${t},${i} 1 0,1 ${-1 * T * 0.25},${T * 0.15}
2910
+ a${e},${e} 1 0,1 ${-1 * T * 0.5},0
2911
+ a${i},${i} 1 0,1 ${-1 * T * 0.25},${-1 * T * 0.15}
2912
+
2913
+ a${i},${i} 1 0,1 ${-1 * T * 0.1},${-1 * y * 0.35}
2914
+ a${r},${r} 1 0,1 ${T * 0.1},${-1 * y * 0.65}
2915
+
2916
+ H0 V0 Z`
2917
+ );
2918
+ }, "cloudBkg"), te = /* @__PURE__ */ x(function(O, R, p) {
2919
+ const T = p.width, y = p.height, i = 0.15 * T;
2920
+ R.append("path").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr(
2921
+ "d",
2922
+ `M0 0 a${i},${i} 1 0,0 ${T * 0.25},${-1 * y * 0.1}
2923
+ a${i},${i} 1 0,0 ${T * 0.25},0
2924
+ a${i},${i} 1 0,0 ${T * 0.25},0
2925
+ a${i},${i} 1 0,0 ${T * 0.25},${1 * y * 0.1}
2926
+
2927
+ a${i},${i} 1 0,0 ${T * 0.15},${1 * y * 0.33}
2928
+ a${i * 0.8},${i * 0.8} 1 0,0 0,${1 * y * 0.34}
2929
+ a${i},${i} 1 0,0 ${-1 * T * 0.15},${1 * y * 0.33}
2930
+
2931
+ a${i},${i} 1 0,0 ${-1 * T * 0.25},${y * 0.15}
2932
+ a${i},${i} 1 0,0 ${-1 * T * 0.25},0
2933
+ a${i},${i} 1 0,0 ${-1 * T * 0.25},0
2934
+ a${i},${i} 1 0,0 ${-1 * T * 0.25},${-1 * y * 0.15}
2935
+
2936
+ a${i},${i} 1 0,0 ${-1 * T * 0.1},${-1 * y * 0.33}
2937
+ a${i * 0.8},${i * 0.8} 1 0,0 0,${-1 * y * 0.34}
2938
+ a${i},${i} 1 0,0 ${T * 0.1},${-1 * y * 0.33}
2939
+
2940
+ H0 V0 Z`
2941
+ );
2942
+ }, "bangBkg"), ee = /* @__PURE__ */ x(function(O, R, p) {
2943
+ R.append("circle").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr("r", p.width / 2);
2944
+ }, "circleBkg");
2945
+ function yt(O, R, p, T, y) {
2946
+ return O.insert("polygon", ":first-child").attr(
2947
+ "points",
2948
+ T.map(function(i) {
2949
+ return i.x + "," + i.y;
2950
+ }).join(" ")
2951
+ ).attr("transform", "translate(" + (y.width - R) / 2 + ", " + p + ")");
2952
+ }
2953
+ x(yt, "insertPolygonShape");
2954
+ var ie = /* @__PURE__ */ x(function(O, R, p) {
2955
+ const T = p.height, y = T / 4, i = p.width - p.padding + 2 * y, t = [
2956
+ { x: y, y: 0 },
2957
+ { x: i - y, y: 0 },
2958
+ { x: i, y: -T / 2 },
2959
+ { x: i - y, y: -T },
2960
+ { x: y, y: -T },
2961
+ { x: 0, y: -T / 2 }
2962
+ ];
2963
+ yt(R, i, T, t, p);
2964
+ }, "hexagonBkg"), re = /* @__PURE__ */ x(function(O, R, p) {
2965
+ R.append("rect").attr("id", "node-" + p.id).attr("class", "node-bkg node-" + O.type2Str(p.type)).attr("height", p.height).attr("rx", p.padding).attr("ry", p.padding).attr("width", p.width);
2966
+ }, "roundedRectBkg"), ne = /* @__PURE__ */ x(async function(O, R, p, T, y) {
2967
+ const i = y.htmlLabels, t = T % (Zt - 1), e = R.append("g");
2968
+ p.section = t;
2969
+ let r = "section-" + t;
2970
+ t < 0 && (r += " section-root"), e.attr("class", (p.class ? p.class + " " : "") + "mindmap-node " + r);
2971
+ const a = e.append("g"), h = e.append("g"), s = p.descr.replace(/(<br\/*>)/g, `
2972
+ `);
2973
+ await At(
2974
+ h,
2975
+ s,
2976
+ {
2977
+ useHtmlLabels: i,
2978
+ width: p.width,
2979
+ classes: "mindmap-node-label"
2980
+ },
2981
+ y
2982
+ ), i || h.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle");
2983
+ const f = h.node().getBBox(), [o] = Tt(y.fontSize);
2984
+ if (p.height = f.height + o * 1.1 * 0.5 + p.padding, p.width = f.width + 2 * p.padding, p.icon)
2985
+ if (p.type === O.nodeType.CIRCLE)
2986
+ p.height += 50, p.width += 50, e.append("foreignObject").attr("height", "50px").attr("width", p.width).attr("style", "text-align: center;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + t + " " + p.icon), h.attr(
2987
+ "transform",
2988
+ "translate(" + p.width / 2 + ", " + (p.height / 2 - 1.5 * p.padding) + ")"
2989
+ );
2990
+ else {
2991
+ p.width += 50;
2992
+ const d = p.height;
2993
+ p.height = Math.max(d, 60);
2994
+ const c = Math.abs(p.height - d);
2995
+ e.append("foreignObject").attr("width", "60px").attr("height", p.height).attr("style", "text-align: center;margin-top:" + c / 2 + "px;").append("div").attr("class", "icon-container").append("i").attr("class", "node-icon-" + t + " " + p.icon), h.attr(
2996
+ "transform",
2997
+ "translate(" + (25 + p.width / 2) + ", " + (c / 2 + p.padding / 2) + ")"
2998
+ );
2999
+ }
3000
+ else if (i) {
3001
+ const d = (p.width - f.width) / 2, c = (p.height - f.height) / 2;
3002
+ h.attr("transform", "translate(" + d + ", " + c + ")");
3003
+ } else {
3004
+ const d = p.width / 2, c = p.padding / 2;
3005
+ h.attr("transform", "translate(" + d + ", " + c + ")");
3006
+ }
3007
+ switch (p.type) {
3008
+ case O.nodeType.DEFAULT:
3009
+ Kt(O, a, p, t);
3010
+ break;
3011
+ case O.nodeType.ROUNDED_RECT:
3012
+ re(O, a, p, t);
3013
+ break;
3014
+ case O.nodeType.RECT:
3015
+ Qt(O, a, p, t);
3016
+ break;
3017
+ case O.nodeType.CIRCLE:
3018
+ a.attr("transform", "translate(" + p.width / 2 + ", " + +p.height / 2 + ")"), ee(O, a, p, t);
3019
+ break;
3020
+ case O.nodeType.CLOUD:
3021
+ Jt(O, a, p, t);
3022
+ break;
3023
+ case O.nodeType.BANG:
3024
+ te(O, a, p, t);
3025
+ break;
3026
+ case O.nodeType.HEXAGON:
3027
+ ie(O, a, p, t);
3028
+ break;
3029
+ }
3030
+ return O.setElementForId(p.id, e), p.height;
3031
+ }, "drawNode"), oe = /* @__PURE__ */ x(function(O, R) {
3032
+ const p = O.getElementById(R.id), T = R.x || 0, y = R.y || 0;
3033
+ p.attr("transform", "translate(" + T + "," + y + ")");
3034
+ }, "positionNode");
3035
+ pt.use(Ft);
3036
+ async function ht(O, R, p, T, y) {
3037
+ await ne(O, R, p, T, y), p.children && await Promise.all(
3038
+ p.children.map(
3039
+ (i, t) => ht(O, R, i, T < 0 ? t : T, y)
3040
+ )
3041
+ );
3042
+ }
3043
+ x(ht, "drawNodes");
3044
+ function Et(O, R) {
3045
+ R.edges().map((p, T) => {
3046
+ const y = p.data();
3047
+ if (p[0]._private.bodyBounds) {
3048
+ const i = p[0]._private.rscratch;
3049
+ K.trace("Edge: ", T, y), O.insert("path").attr(
3050
+ "d",
3051
+ `M ${i.startX},${i.startY} L ${i.midX},${i.midY} L${i.endX},${i.endY} `
3052
+ ).attr("class", "edge section-edge-" + y.section + " edge-depth-" + y.depth);
3053
+ }
3054
+ });
3055
+ }
3056
+ x(Et, "drawEdges");
3057
+ function lt(O, R, p, T) {
3058
+ R.add({
3059
+ group: "nodes",
3060
+ data: {
3061
+ id: O.id.toString(),
3062
+ labelText: O.descr,
3063
+ height: O.height,
3064
+ width: O.width,
3065
+ level: T,
3066
+ nodeId: O.id,
3067
+ padding: O.padding,
3068
+ type: O.type
3069
+ },
3070
+ position: {
3071
+ x: O.x,
3072
+ y: O.y
3073
+ }
3074
+ }), O.children && O.children.forEach((y) => {
3075
+ lt(y, R, p, T + 1), R.add({
3076
+ group: "edges",
3077
+ data: {
3078
+ id: `${O.id}_${y.id}`,
3079
+ source: O.id,
3080
+ target: y.id,
3081
+ depth: T,
3082
+ section: y.section
3083
+ }
3084
+ });
3085
+ });
3086
+ }
3087
+ x(lt, "addNodes");
3088
+ function mt(O, R) {
3089
+ return new Promise((p) => {
3090
+ const T = Nt("body").append("div").attr("id", "cy").attr("style", "display:none"), y = pt({
3091
+ container: document.getElementById("cy"),
3092
+ // container to render in
3093
+ style: [
3094
+ {
3095
+ selector: "edge",
3096
+ style: {
3097
+ "curve-style": "bezier"
3098
+ }
3099
+ }
3100
+ ]
3101
+ });
3102
+ T.remove(), lt(O, y, R, 0), y.nodes().forEach(function(i) {
3103
+ i.layoutDimensions = () => {
3104
+ const t = i.data();
3105
+ return { w: t.width, h: t.height };
3106
+ };
3107
+ }), y.layout({
3108
+ name: "cose-bilkent",
3109
+ // @ts-ignore Types for cose-bilkent are not correct?
3110
+ quality: "proof",
3111
+ styleEnabled: !1,
3112
+ animate: !1
3113
+ }).run(), y.ready((i) => {
3114
+ K.info("Ready", i), p(y);
3115
+ });
3116
+ });
3117
+ }
3118
+ x(mt, "layoutMindmap");
3119
+ function vt(O, R) {
3120
+ R.nodes().map((p, T) => {
3121
+ const y = p.data();
3122
+ y.x = p.position().x, y.y = p.position().y, oe(O, y);
3123
+ const i = O.getElementById(y.nodeId);
3124
+ K.info("Id:", T, "Position: (", p.position().x, ", ", p.position().y, ")", y), i.attr(
3125
+ "transform",
3126
+ `translate(${p.position().x - y.width / 2}, ${p.position().y - y.height / 2})`
3127
+ ), i.attr("attr", `apa-${T})`);
3128
+ });
3129
+ }
3130
+ x(vt, "positionNodes");
3131
+ var se = /* @__PURE__ */ x(async (O, R, p, T) => {
3132
+ var y, i;
3133
+ K.debug(`Rendering mindmap diagram
3134
+ ` + O);
3135
+ const t = T.db, e = t.getMindmap();
3136
+ if (!e)
3137
+ return;
3138
+ const r = st();
3139
+ r.htmlLabels = !1;
3140
+ const a = Lt(R), h = a.append("g");
3141
+ h.attr("class", "mindmap-edges");
3142
+ const s = a.append("g");
3143
+ s.attr("class", "mindmap-nodes"), await ht(t, s, e, -1, r);
3144
+ const f = await mt(e, r);
3145
+ Et(h, f), vt(t, f), Dt(
3146
+ void 0,
3147
+ a,
3148
+ ((y = r.mindmap) == null ? void 0 : y.padding) ?? J.mindmap.padding,
3149
+ ((i = r.mindmap) == null ? void 0 : i.useMaxWidth) ?? J.mindmap.useMaxWidth
3150
+ );
3151
+ }, "draw"), ae = {
3152
+ draw: se
3153
+ }, he = /* @__PURE__ */ x((O) => {
3154
+ let R = "";
3155
+ for (let p = 0; p < O.THEME_COLOR_LIMIT; p++)
3156
+ O["lineColor" + p] = O["lineColor" + p] || O["cScaleInv" + p], Ot(O["lineColor" + p]) ? O["lineColor" + p] = wt(O["lineColor" + p], 20) : O["lineColor" + p] = It(O["lineColor" + p], 20);
3157
+ for (let p = 0; p < O.THEME_COLOR_LIMIT; p++) {
3158
+ const T = "" + (17 - 3 * p);
3159
+ R += `
3160
+ .section-${p - 1} rect, .section-${p - 1} path, .section-${p - 1} circle, .section-${p - 1} polygon, .section-${p - 1} path {
3161
+ fill: ${O["cScale" + p]};
3162
+ }
3163
+ .section-${p - 1} text {
3164
+ fill: ${O["cScaleLabel" + p]};
3165
+ }
3166
+ .node-icon-${p - 1} {
3167
+ font-size: 40px;
3168
+ color: ${O["cScaleLabel" + p]};
3169
+ }
3170
+ .section-edge-${p - 1}{
3171
+ stroke: ${O["cScale" + p]};
3172
+ }
3173
+ .edge-depth-${p - 1}{
3174
+ stroke-width: ${T};
3175
+ }
3176
+ .section-${p - 1} line {
3177
+ stroke: ${O["cScaleInv" + p]} ;
3178
+ stroke-width: 3;
3179
+ }
3180
+
3181
+ .disabled, .disabled circle, .disabled text {
3182
+ fill: lightgray;
3183
+ }
3184
+ .disabled text {
3185
+ fill: #efefef;
3186
+ }
3187
+ `;
3188
+ }
3189
+ return R;
3190
+ }, "genSections"), le = /* @__PURE__ */ x((O) => `
3191
+ .edge {
3192
+ stroke-width: 3;
3193
+ }
3194
+ ${he(O)}
3195
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
3196
+ fill: ${O.git0};
3197
+ }
3198
+ .section-root text {
3199
+ fill: ${O.gitBranchLabel0};
3200
+ }
3201
+ .icon-container {
3202
+ height:100%;
3203
+ display: flex;
3204
+ justify-content: center;
3205
+ align-items: center;
3206
+ }
3207
+ .edge {
3208
+ fill: none;
3209
+ }
3210
+ .mindmap-node-label {
3211
+ dy: 1em;
3212
+ alignment-baseline: middle;
3213
+ text-anchor: middle;
3214
+ dominant-baseline: middle;
3215
+ text-align: center;
3216
+ }
3217
+ `, "getStyles"), ce = le, pe = {
3218
+ db: qt,
3219
+ renderer: ae,
3220
+ parser: Pt,
3221
+ styles: ce
3222
+ };
3223
+ export {
3224
+ pe as diagram
3225
+ };