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