@elmethis/core 1.0.0-alpha.134 → 1.0.0-alpha.136

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