@ucap-llm/ai-ui 1.1.6 → 1.1.7

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