hub-ui-x 0.0.1

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