@sourcegraph/amp 0.0.1749585689-g82b91d → 0.0.1749614780-g9a56bd

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