@kong-ui-public/documentation 1.4.31 → 1.4.32-pr.2694.d983d66d0.0
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/package.json +2 -2
- package/dist/_basePickBy-BCsiP0lE-DJBdvZNn.js +0 -151
- package/dist/_baseUniq-CsvgMmt0-CCBG5z_B.js +0 -614
- package/dist/arc-DYb5Ak6k-js8YHzj6.js +0 -83
- package/dist/architecture-U656AL7Q-LZu-yAfZ-CQD6AyxA.js +0 -5
- package/dist/architectureDiagram-KFL7JDKH-BK_an8l5-D20M_MXF.js +0 -4665
- package/dist/astro-Uf8_VxKJ-CZxoSljj.js +0 -16
- package/dist/blockDiagram-ZYB65J3Q-C0KtqCEe-pwEm3-ie.js +0 -2265
- package/dist/c-DASdrs7p-DASdrs7p.js +0 -6
- package/dist/c4Diagram-AAMF2YG6-DYHWlrmc-C6NWDsTV.js +0 -1581
- package/dist/channel-3QVQMCTA-BwyrTaJi.js +0 -5
- package/dist/chunk-ANTBXLJU-BhR1MDfy-Bec7kb00.js +0 -9
- package/dist/chunk-FHKO5MBM-z_nuC8Da-Dge2Nbr5.js +0 -15
- package/dist/chunk-GLLZNHP4-DgwBbAOT-BUrsAxH8.js +0 -19
- package/dist/chunk-JBRWN2VN-CHua2TSC-BYWS19Oz.js +0 -1374
- package/dist/chunk-LXBSTHXV-CoED0jHL-Cc8w4JL1.js +0 -1382
- package/dist/chunk-NRVI72HA-DxsqT4Dt-Bo_vu9qn.js +0 -20
- package/dist/chunk-OMD6QJNC-_VI6zVGr-Bb4P7zNG.js +0 -64
- package/dist/chunk-WVR4S24B-C4HIWky3-CkJ0DHSJ.js +0 -8
- package/dist/classDiagram-3BZAVTQC-DrmNjTt_-CS9fxl_R.js +0 -16
- package/dist/classDiagram-v2-QTMF73CY-DrmNjTt_-CS9fxl_R.js +0 -16
- package/dist/clone-C0dvnYv6-BozdSvey.js +0 -8
- package/dist/csharp-CYWRhZ2R-CYWRhZ2R.js +0 -6
- package/dist/css-D1aVdRIU-D1aVdRIU.js +0 -6
- package/dist/csv-DvCncUGQ-Tno401i9.js +0 -6
- package/dist/cytoscape.esm-CjI2IsL8-DYIumutE.js +0 -18721
- package/dist/dagre-2BBEFEWP-Bh_bYuL8-Cej31YXN.js +0 -447
- package/dist/defaultLocale-D7EN2tov-CK6dgF7Y.js +0 -171
- package/dist/diagram-4IRLE6MV-34TaesxP-XfF-gcP2.js +0 -533
- package/dist/diagram-GUPCWM2R-Cr4-5_uX-B8mxM1Uc.js +0 -143
- package/dist/diagram-RP2FKANI-COpvHjzI-C-_mZxuk.js +0 -221
- package/dist/diff-XmNrvgM1-XmNrvgM1.js +0 -6
- package/dist/docker-DWH2onkn-DWH2onkn.js +0 -6
- package/dist/documentation.es.js +0 -7
- package/dist/documentation.umd.js +0 -2865
- package/dist/erDiagram-HZWUO2LU-Cu2MerRS-KziSgDQg.js +0 -840
- package/dist/flowDiagram-THRYKUMA-CfrQTB8C-BYn8LF24.js +0 -1627
- package/dist/ganttDiagram-WV7ZQ7D5-gkieebY_-C7YOriZ4.js +0 -2504
- package/dist/git-commit-BspYIY3P-VkbIfR3L.js +0 -8
- package/dist/git-rebase--zLBTjUa-DEW2tfKx.js +0 -8
- package/dist/gitGraph-F6HP7TQM-suE5ufvy-CQDQV2yP.js +0 -5
- package/dist/gitGraphDiagram-OJR772UL-CYA7EIoU-Bqc1qZk4.js +0 -712
- package/dist/go-BErP6iv1-BErP6iv1.js +0 -6
- package/dist/graph-B_1gOUDz-Dm6REFzZ.js +0 -247
- package/dist/graphql-DWpQF4JI-C-3VJmtp.js +0 -14
- package/dist/haml-CMN0hQaL-BV5BsZTy.js +0 -10
- package/dist/handlebars-Cc-7fXX5-B9YgDKzT.js +0 -14
- package/dist/haskell-CtlGos0K-CtlGos0K.js +0 -6
- package/dist/html-B0P_v3yU-BojM9zZg.js +0 -10
- package/dist/html-derivative-BJFFAxYV-iD6NAoKm.js +0 -8
- package/dist/http-Dcjm_K1m-1LFSbOE1.js +0 -14
- package/dist/index-BDD0CD9m.js +0 -37385
- package/dist/info-NVLQJR56-CdsHk-Jf-tf8zb8tD.js +0 -5
- package/dist/infoDiagram-6WOFNB3A-ajp3t5Lm-D80dGo5F.js +0 -24
- package/dist/ini-BUcvsX-U-BUcvsX-U.js +0 -6
- package/dist/init-DjUOC4st-C8Nwz6AJ.js +0 -16
- package/dist/java-B7odJ7Ap-B7odJ7Ap.js +0 -6
- package/dist/javascript-fa8UlHZE-fa8UlHZE.js +0 -6
- package/dist/journeyDiagram-FFXJYRFH-kgCEEPLo-CakI8CyJ.js +0 -834
- package/dist/json-71t8ZF9g-71t8ZF9g.js +0 -6
- package/dist/json5-Z7F6rA6a-Z7F6rA6a.js +0 -6
- package/dist/jsonc-Dphhs4m2-Dphhs4m2.js +0 -6
- package/dist/jsonl-D9jj92Gg-D9jj92Gg.js +0 -6
- package/dist/jsx-Bkesy5tT-Bkesy5tT.js +0 -6
- package/dist/kanban-definition-KOZQBZVT-CmM4CHe6-rjuufCiO.js +0 -720
- package/dist/katex-C0Lgw_Sx-CbX2I1cQ.js +0 -11687
- package/dist/kotlin-DCgZY7Ii-DCgZY7Ii.js +0 -6
- package/dist/latex-CZXk8SiZ-DbjDPp_f.js +0 -11
- package/dist/layout-9vIfpCf3-FfABA43y.js +0 -1321
- package/dist/less-DQA4v-Nm-DQA4v-Nm.js +0 -6
- package/dist/linear-C-k9vokG-Md9dfBfB.js +0 -259
- package/dist/liquid-CvufO3kO-D90bBAdm.js +0 -14
- package/dist/lua-BVfhNLDr-DAa90qLN.js +0 -8
- package/dist/make-BjuHP00g-BjuHP00g.js +0 -6
- package/dist/markdown-B6guhLWd-B6guhLWd.js +0 -6
- package/dist/material-theme-lighter-BUBw43Yz-BUBw43Yz.js +0 -4
- package/dist/material-theme-palenight-C1RVm8K1-C1RVm8K1.js +0 -4
- package/dist/mdc-Bq810vct-Dr8CpN8f.js +0 -12
- package/dist/mdx-DIoECIFU-DIoECIFU.js +0 -6
- package/dist/mermaid-BZ7WHNIe-BZ7WHNIe.js +0 -6
- package/dist/mermaid-parser.core-DHL9WXVx-DeKF3RZx.js +0 -12890
- package/dist/mindmap-definition-LNHGMQRG-BsypuFYj-DSVrvuog.js +0 -3231
- package/dist/nginx-Can2eAjw-DKMoypYC.js +0 -8
- package/dist/objective-c-BGg9R27G-BGg9R27G.js +0 -6
- package/dist/ordinal-DfAQgscy-BEJTu10r.js +0 -61
- package/dist/packet-BFZMPI3H-BcK9kJ-B-BxxCPBGn.js +0 -5
- package/dist/pascal-l2bqd7Dz-l2bqd7Dz.js +0 -6
- package/dist/perl-DaMQyPwp-Cxx4wmV7.js +0 -16
- package/dist/php-BL3EfPBi-BZu5YwDX.js +0 -18
- package/dist/pie-7BOR55EZ-Vt5px0F3-BM7egbMh.js +0 -5
- package/dist/pieDiagram-DBDJKBY4-Bam6gKTi-BOqYeC6c.js +0 -161
- package/dist/plsql-oVq_K_wH-oVq_K_wH.js +0 -6
- package/dist/postcss-BZ3MNRIJ-BZ3MNRIJ.js +0 -6
- package/dist/powershell-Diwyv8Eh-Diwyv8Eh.js +0 -6
- package/dist/proto-o9HLmF90-o9HLmF90.js +0 -6
- package/dist/pug-HKe4Luo3-BYb0El_4.js +0 -12
- package/dist/python-xYxLFJY--xYxLFJY-.js +0 -6
- package/dist/quadrantDiagram-YPSRARAO-CJwMw09m-CN2OO-Le.js +0 -1024
- package/dist/r-F-9I-ITZ-F-9I-ITZ.js +0 -6
- package/dist/radar-NHE76QYJ-Br11XWE4-4RP4MPFA.js +0 -5
- package/dist/reg-CMUdAgIP-CMUdAgIP.js +0 -6
- package/dist/requirementDiagram-EGVEC5DT-DkRytT0X-C2zigskn.js +0 -850
- package/dist/rst-B8JEEtLI-Dyxh6LOj.js +0 -22
- package/dist/ruby-FDlfLkNa-nf7VLvCK.js +0 -50
- package/dist/rust-Pc7DCsZD-Pc7DCsZD.js +0 -6
- package/dist/sankeyDiagram-HRAUVNP4-08s1UHMk-2j8idkNs.js +0 -810
- package/dist/sass-iCyS6eP9-iCyS6eP9.js +0 -6
- package/dist/scss-DhHc4lxB-D1lMETuy.js +0 -8
- package/dist/sequenceDiagram-WFGC7UMF-6_s7-CN7-D-oTpLFJ.js +0 -2283
- package/dist/shellscript-Dn0-btNd-Dn0-btNd.js +0 -6
- package/dist/shellsession-8OLo3sB6-DD6AdPYk.js +0 -8
- package/dist/splunk-CTqDjQdo-CTqDjQdo.js +0 -6
- package/dist/sql-DCkt643--DCkt643-.js +0 -6
- package/dist/ssh-config-DHHGll-v-DHHGll-v.js +0 -6
- package/dist/stateDiagram-UUKSUZ4H-eWajY90l-BlM614AN.js +0 -263
- package/dist/stateDiagram-v2-EYPG3UTE-Dh7Ngu1O-YVMiocHE.js +0 -16
- package/dist/style.css +0 -1
- package/dist/stylus-n_9f0QQ5-n_9f0QQ5.js +0 -6
- package/dist/svelte-01qw6Rxm-Cjp5Srko.js +0 -14
- package/dist/swift-BAWqNR8A-BAWqNR8A.js +0 -6
- package/dist/timeline-definition-3HZDQTIS-4TPEOhE8-fDDLVlO8.js +0 -799
- package/dist/toml-CQSfOn0e-CQSfOn0e.js +0 -6
- package/dist/treemap-KMMF4GRG-nu7WEuPi-C1YG24W8.js +0 -5
- package/dist/tsx-DiGsgWT8-DiGsgWT8.js +0 -6
- package/dist/twig-DxrNSc26-BIWbKTFO.js +0 -18
- package/dist/types/components/DiscardChangesPrompt.vue.d.ts +0 -35
- package/dist/types/components/DiscardChangesPrompt.vue.d.ts.map +0 -1
- package/dist/types/components/DocumentationContent.vue.d.ts +0 -175
- package/dist/types/components/DocumentationContent.vue.d.ts.map +0 -1
- package/dist/types/components/DocumentationDisplay.vue.d.ts +0 -94
- package/dist/types/components/DocumentationDisplay.vue.d.ts.map +0 -1
- package/dist/types/components/DocumentationPageEmptyState.vue.d.ts +0 -31
- package/dist/types/components/DocumentationPageEmptyState.vue.d.ts.map +0 -1
- package/dist/types/components/ProductDocumentModal.vue.d.ts +0 -72
- package/dist/types/components/ProductDocumentModal.vue.d.ts.map +0 -1
- package/dist/types/composables/index.d.ts +0 -6
- package/dist/types/composables/index.d.ts.map +0 -1
- package/dist/types/composables/useI18n.d.ts +0 -9
- package/dist/types/composables/useI18n.d.ts.map +0 -1
- package/dist/types/external-links.d.ts +0 -5
- package/dist/types/external-links.d.ts.map +0 -1
- package/dist/types/helpers.d.ts +0 -8
- package/dist/types/helpers.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -7
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/types/document-list.d.ts +0 -28
- package/dist/types/types/document-list.d.ts.map +0 -1
- package/dist/types/types/document-modal.d.ts +0 -8
- package/dist/types/types/document-modal.d.ts.map +0 -1
- package/dist/types/types/index.d.ts +0 -3
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/typescript-buWNZFwO-buWNZFwO.js +0 -6
- package/dist/v-wa8Orrdd-wa8Orrdd.js +0 -6
- package/dist/vb-E2_-jk4M-E2_-jk4M.js +0 -6
- package/dist/viml-B-zWOd7Z-B-zWOd7Z.js +0 -6
- package/dist/vue-DdqTpW8B-BrYVXV7A.js +0 -31
- package/dist/vue-html-B9t4RWro-D1UeMTSX.js +0 -10
- package/dist/wasm-Bv5f0gKv-Bv5f0gKv.js +0 -6
- package/dist/wgsl-DnPoPGDU-DnPoPGDU.js +0 -6
- package/dist/xml-ChBsf5uy-0Ovnixsj.js +0 -8
- package/dist/xsl-BefjlXrd-CZ7IlB9K.js +0 -8
- package/dist/xychartDiagram-FDP5SA34-BbtKlU7T-D1BI5nWs.js +0 -1340
- package/dist/yaml-Bbg74JKr-Bbg74JKr.js +0 -6
|
@@ -1,2265 +0,0 @@
|
|
|
1
|
-
import { l as ce } from "./chunk-GLLZNHP4-DgwBbAOT-BUrsAxH8.js";
|
|
2
|
-
import { _ as g, aB as at, a9 as B, aa as he, l as w, at as ue, av as ge, bs as ye, bd as pe, bk as be, g as z, bh as xe, bt as G, br as Wt, e as fe, am as tt, ag as me, bu as we, bv as bt, ad as xt, bw as Le } from "./index-BDD0CD9m.js";
|
|
3
|
-
import { a as Se } from "./clone-C0dvnYv6-BozdSvey.js";
|
|
4
|
-
import { L as ke } from "./graph-B_1gOUDz-Dm6REFzZ.js";
|
|
5
|
-
import { t as _e } from "./channel-3QVQMCTA-BwyrTaJi.js";
|
|
6
|
-
var ft = function() {
|
|
7
|
-
var e = /* @__PURE__ */ g(function(D, c, p, f) {
|
|
8
|
-
for (p = p || {}, f = D.length; f--; p[D[f]] = c) ;
|
|
9
|
-
return p;
|
|
10
|
-
}, "o"), t = [1, 15], s = [1, 7], i = [1, 13], l = [1, 14], a = [1, 19], r = [1, 16], n = [1, 17], o = [1, 18], u = [8, 30], y = [8, 10, 21, 28, 29, 30, 31, 39, 43, 46], b = [1, 23], x = [1, 24], S = [8, 10, 15, 16, 21, 28, 29, 30, 31, 39, 43, 46], L = [8, 10, 15, 16, 21, 27, 28, 29, 30, 31, 39, 43, 46], _ = [1, 49], k = {
|
|
11
|
-
trace: /* @__PURE__ */ g(function() {
|
|
12
|
-
}, "trace"),
|
|
13
|
-
yy: {},
|
|
14
|
-
symbols_: { error: 2, spaceLines: 3, SPACELINE: 4, NL: 5, separator: 6, SPACE: 7, EOF: 8, start: 9, BLOCK_DIAGRAM_KEY: 10, document: 11, stop: 12, statement: 13, link: 14, LINK: 15, START_LINK: 16, LINK_LABEL: 17, STR: 18, nodeStatement: 19, columnsStatement: 20, SPACE_BLOCK: 21, blockStatement: 22, classDefStatement: 23, cssClassStatement: 24, styleStatement: 25, node: 26, SIZE: 27, COLUMNS: 28, "id-block": 29, end: 30, NODE_ID: 31, nodeShapeNLabel: 32, dirList: 33, DIR: 34, NODE_DSTART: 35, NODE_DEND: 36, BLOCK_ARROW_START: 37, BLOCK_ARROW_END: 38, classDef: 39, CLASSDEF_ID: 40, CLASSDEF_STYLEOPTS: 41, DEFAULT: 42, class: 43, CLASSENTITY_IDS: 44, STYLECLASS: 45, style: 46, STYLE_ENTITY_IDS: 47, STYLE_DEFINITION_DATA: 48, $accept: 0, $end: 1 },
|
|
15
|
-
terminals_: { 2: "error", 4: "SPACELINE", 5: "NL", 7: "SPACE", 8: "EOF", 10: "BLOCK_DIAGRAM_KEY", 15: "LINK", 16: "START_LINK", 17: "LINK_LABEL", 18: "STR", 21: "SPACE_BLOCK", 27: "SIZE", 28: "COLUMNS", 29: "id-block", 30: "end", 31: "NODE_ID", 34: "DIR", 35: "NODE_DSTART", 36: "NODE_DEND", 37: "BLOCK_ARROW_START", 38: "BLOCK_ARROW_END", 39: "classDef", 40: "CLASSDEF_ID", 41: "CLASSDEF_STYLEOPTS", 42: "DEFAULT", 43: "class", 44: "CLASSENTITY_IDS", 45: "STYLECLASS", 46: "style", 47: "STYLE_ENTITY_IDS", 48: "STYLE_DEFINITION_DATA" },
|
|
16
|
-
productions_: [0, [3, 1], [3, 2], [3, 2], [6, 1], [6, 1], [6, 1], [9, 3], [12, 1], [12, 1], [12, 2], [12, 2], [11, 1], [11, 2], [14, 1], [14, 4], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [13, 1], [19, 3], [19, 2], [19, 1], [20, 1], [22, 4], [22, 3], [26, 1], [26, 2], [33, 1], [33, 2], [32, 3], [32, 4], [23, 3], [23, 3], [24, 3], [25, 3]],
|
|
17
|
-
performAction: /* @__PURE__ */ g(function(D, c, p, f, E, d, m) {
|
|
18
|
-
var h = d.length - 1;
|
|
19
|
-
switch (E) {
|
|
20
|
-
case 4:
|
|
21
|
-
f.getLogger().debug("Rule: separator (NL) ");
|
|
22
|
-
break;
|
|
23
|
-
case 5:
|
|
24
|
-
f.getLogger().debug("Rule: separator (Space) ");
|
|
25
|
-
break;
|
|
26
|
-
case 6:
|
|
27
|
-
f.getLogger().debug("Rule: separator (EOF) ");
|
|
28
|
-
break;
|
|
29
|
-
case 7:
|
|
30
|
-
f.getLogger().debug("Rule: hierarchy: ", d[h - 1]), f.setHierarchy(d[h - 1]);
|
|
31
|
-
break;
|
|
32
|
-
case 8:
|
|
33
|
-
f.getLogger().debug("Stop NL ");
|
|
34
|
-
break;
|
|
35
|
-
case 9:
|
|
36
|
-
f.getLogger().debug("Stop EOF ");
|
|
37
|
-
break;
|
|
38
|
-
case 10:
|
|
39
|
-
f.getLogger().debug("Stop NL2 ");
|
|
40
|
-
break;
|
|
41
|
-
case 11:
|
|
42
|
-
f.getLogger().debug("Stop EOF2 ");
|
|
43
|
-
break;
|
|
44
|
-
case 12:
|
|
45
|
-
f.getLogger().debug("Rule: statement: ", d[h]), typeof d[h].length == "number" ? this.$ = d[h] : this.$ = [d[h]];
|
|
46
|
-
break;
|
|
47
|
-
case 13:
|
|
48
|
-
f.getLogger().debug("Rule: statement #2: ", d[h - 1]), this.$ = [d[h - 1]].concat(d[h]);
|
|
49
|
-
break;
|
|
50
|
-
case 14:
|
|
51
|
-
f.getLogger().debug("Rule: link: ", d[h], D), this.$ = { edgeTypeStr: d[h], label: "" };
|
|
52
|
-
break;
|
|
53
|
-
case 15:
|
|
54
|
-
f.getLogger().debug("Rule: LABEL link: ", d[h - 3], d[h - 1], d[h]), this.$ = { edgeTypeStr: d[h], label: d[h - 1] };
|
|
55
|
-
break;
|
|
56
|
-
case 18:
|
|
57
|
-
const O = parseInt(d[h]), M = f.generateId();
|
|
58
|
-
this.$ = { id: M, type: "space", label: "", width: O, children: [] };
|
|
59
|
-
break;
|
|
60
|
-
case 23:
|
|
61
|
-
f.getLogger().debug("Rule: (nodeStatement link node) ", d[h - 2], d[h - 1], d[h], " typestr: ", d[h - 1].edgeTypeStr);
|
|
62
|
-
const A = f.edgeStrToEdgeData(d[h - 1].edgeTypeStr);
|
|
63
|
-
this.$ = [
|
|
64
|
-
{ id: d[h - 2].id, label: d[h - 2].label, type: d[h - 2].type, directions: d[h - 2].directions },
|
|
65
|
-
{ id: d[h - 2].id + "-" + d[h].id, start: d[h - 2].id, end: d[h].id, label: d[h - 1].label, type: "edge", directions: d[h].directions, arrowTypeEnd: A, arrowTypeStart: "arrow_open" },
|
|
66
|
-
{ id: d[h].id, label: d[h].label, type: f.typeStr2Type(d[h].typeStr), directions: d[h].directions }
|
|
67
|
-
];
|
|
68
|
-
break;
|
|
69
|
-
case 24:
|
|
70
|
-
f.getLogger().debug("Rule: nodeStatement (abc88 node size) ", d[h - 1], d[h]), this.$ = { id: d[h - 1].id, label: d[h - 1].label, type: f.typeStr2Type(d[h - 1].typeStr), directions: d[h - 1].directions, widthInColumns: parseInt(d[h], 10) };
|
|
71
|
-
break;
|
|
72
|
-
case 25:
|
|
73
|
-
f.getLogger().debug("Rule: nodeStatement (node) ", d[h]), this.$ = { id: d[h].id, label: d[h].label, type: f.typeStr2Type(d[h].typeStr), directions: d[h].directions, widthInColumns: 1 };
|
|
74
|
-
break;
|
|
75
|
-
case 26:
|
|
76
|
-
f.getLogger().debug("APA123", this ? this : "na"), f.getLogger().debug("COLUMNS: ", d[h]), this.$ = { type: "column-setting", columns: d[h] === "auto" ? -1 : parseInt(d[h]) };
|
|
77
|
-
break;
|
|
78
|
-
case 27:
|
|
79
|
-
f.getLogger().debug("Rule: id-block statement : ", d[h - 2], d[h - 1]), f.generateId(), this.$ = { ...d[h - 2], type: "composite", children: d[h - 1] };
|
|
80
|
-
break;
|
|
81
|
-
case 28:
|
|
82
|
-
f.getLogger().debug("Rule: blockStatement : ", d[h - 2], d[h - 1], d[h]);
|
|
83
|
-
const W = f.generateId();
|
|
84
|
-
this.$ = { id: W, type: "composite", label: "", children: d[h - 1] };
|
|
85
|
-
break;
|
|
86
|
-
case 29:
|
|
87
|
-
f.getLogger().debug("Rule: node (NODE_ID separator): ", d[h]), this.$ = { id: d[h] };
|
|
88
|
-
break;
|
|
89
|
-
case 30:
|
|
90
|
-
f.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ", d[h - 1], d[h]), this.$ = { id: d[h - 1], label: d[h].label, typeStr: d[h].typeStr, directions: d[h].directions };
|
|
91
|
-
break;
|
|
92
|
-
case 31:
|
|
93
|
-
f.getLogger().debug("Rule: dirList: ", d[h]), this.$ = [d[h]];
|
|
94
|
-
break;
|
|
95
|
-
case 32:
|
|
96
|
-
f.getLogger().debug("Rule: dirList: ", d[h - 1], d[h]), this.$ = [d[h - 1]].concat(d[h]);
|
|
97
|
-
break;
|
|
98
|
-
case 33:
|
|
99
|
-
f.getLogger().debug("Rule: nodeShapeNLabel: ", d[h - 2], d[h - 1], d[h]), this.$ = { typeStr: d[h - 2] + d[h], label: d[h - 1] };
|
|
100
|
-
break;
|
|
101
|
-
case 34:
|
|
102
|
-
f.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ", d[h - 3], d[h - 2], " #3:", d[h - 1], d[h]), this.$ = { typeStr: d[h - 3] + d[h], label: d[h - 2], directions: d[h - 1] };
|
|
103
|
-
break;
|
|
104
|
-
case 35:
|
|
105
|
-
case 36:
|
|
106
|
-
this.$ = { type: "classDef", id: d[h - 1].trim(), css: d[h].trim() };
|
|
107
|
-
break;
|
|
108
|
-
case 37:
|
|
109
|
-
this.$ = { type: "applyClass", id: d[h - 1].trim(), styleClass: d[h].trim() };
|
|
110
|
-
break;
|
|
111
|
-
case 38:
|
|
112
|
-
this.$ = { type: "applyStyles", id: d[h - 1].trim(), stylesStr: d[h].trim() };
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
}, "anonymous"),
|
|
116
|
-
table: [{ 9: 1, 10: [1, 2] }, { 1: [3] }, { 10: t, 11: 3, 13: 4, 19: 5, 20: 6, 21: s, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: a, 39: r, 43: n, 46: o }, { 8: [1, 20] }, e(u, [2, 12], { 13: 4, 19: 5, 20: 6, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 11: 21, 10: t, 21: s, 28: i, 29: l, 31: a, 39: r, 43: n, 46: o }), e(y, [2, 16], { 14: 22, 15: b, 16: x }), e(y, [2, 17]), e(y, [2, 18]), e(y, [2, 19]), e(y, [2, 20]), e(y, [2, 21]), e(y, [2, 22]), e(S, [2, 25], { 27: [1, 25] }), e(y, [2, 26]), { 19: 26, 26: 12, 31: a }, { 10: t, 11: 27, 13: 4, 19: 5, 20: 6, 21: s, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: a, 39: r, 43: n, 46: o }, { 40: [1, 28], 42: [1, 29] }, { 44: [1, 30] }, { 47: [1, 31] }, e(L, [2, 29], { 32: 32, 35: [1, 33], 37: [1, 34] }), { 1: [2, 7] }, e(u, [2, 13]), { 26: 35, 31: a }, { 31: [2, 14] }, { 17: [1, 36] }, e(S, [2, 24]), { 10: t, 11: 37, 13: 4, 14: 22, 15: b, 16: x, 19: 5, 20: 6, 21: s, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 28: i, 29: l, 31: a, 39: r, 43: n, 46: o }, { 30: [1, 38] }, { 41: [1, 39] }, { 41: [1, 40] }, { 45: [1, 41] }, { 48: [1, 42] }, e(L, [2, 30]), { 18: [1, 43] }, { 18: [1, 44] }, e(S, [2, 23]), { 18: [1, 45] }, { 30: [1, 46] }, e(y, [2, 28]), e(y, [2, 35]), e(y, [2, 36]), e(y, [2, 37]), e(y, [2, 38]), { 36: [1, 47] }, { 33: 48, 34: _ }, { 15: [1, 50] }, e(y, [2, 27]), e(L, [2, 33]), { 38: [1, 51] }, { 33: 52, 34: _, 38: [2, 31] }, { 31: [2, 15] }, e(L, [2, 34]), { 38: [2, 32] }],
|
|
117
|
-
defaultActions: { 20: [2, 7], 23: [2, 14], 50: [2, 15], 52: [2, 32] },
|
|
118
|
-
parseError: /* @__PURE__ */ g(function(D, c) {
|
|
119
|
-
if (c.recoverable)
|
|
120
|
-
this.trace(D);
|
|
121
|
-
else {
|
|
122
|
-
var p = new Error(D);
|
|
123
|
-
throw p.hash = c, p;
|
|
124
|
-
}
|
|
125
|
-
}, "parseError"),
|
|
126
|
-
parse: /* @__PURE__ */ g(function(D) {
|
|
127
|
-
var c = this, p = [0], f = [], E = [null], d = [], m = this.table, h = "", O = 0, M = 0, A = 2, W = 1, j = d.slice.call(arguments, 1), T = Object.create(this.lexer), V = { yy: {} };
|
|
128
|
-
for (var ut in this.yy)
|
|
129
|
-
Object.prototype.hasOwnProperty.call(this.yy, ut) && (V.yy[ut] = this.yy[ut]);
|
|
130
|
-
T.setInput(D, V.yy), V.yy.lexer = T, V.yy.parser = this, typeof T.yylloc > "u" && (T.yylloc = {});
|
|
131
|
-
var gt = T.yylloc;
|
|
132
|
-
d.push(gt);
|
|
133
|
-
var oe = T.options && T.options.ranges;
|
|
134
|
-
typeof V.yy.parseError == "function" ? this.parseError = V.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
135
|
-
function de(F) {
|
|
136
|
-
p.length = p.length - 2 * F, E.length = E.length - F, d.length = d.length - F;
|
|
137
|
-
}
|
|
138
|
-
g(de, "popStack");
|
|
139
|
-
function Nt() {
|
|
140
|
-
var F;
|
|
141
|
-
return F = f.pop() || T.lex() || W, typeof F != "number" && (F instanceof Array && (f = F, F = f.pop()), F = c.symbols_[F] || F), F;
|
|
142
|
-
}
|
|
143
|
-
g(Nt, "lex");
|
|
144
|
-
for (var X, Q, K, yt, q = {}, st, J, Tt, it; ; ) {
|
|
145
|
-
if (Q = p[p.length - 1], this.defaultActions[Q] ? K = this.defaultActions[Q] : ((X === null || typeof X > "u") && (X = Nt()), K = m[Q] && m[Q][X]), typeof K > "u" || !K.length || !K[0]) {
|
|
146
|
-
var pt = "";
|
|
147
|
-
it = [];
|
|
148
|
-
for (st in m[Q])
|
|
149
|
-
this.terminals_[st] && st > A && it.push("'" + this.terminals_[st] + "'");
|
|
150
|
-
T.showPosition ? pt = "Parse error on line " + (O + 1) + `:
|
|
151
|
-
` + T.showPosition() + `
|
|
152
|
-
Expecting ` + it.join(", ") + ", got '" + (this.terminals_[X] || X) + "'" : pt = "Parse error on line " + (O + 1) + ": Unexpected " + (X == W ? "end of input" : "'" + (this.terminals_[X] || X) + "'"), this.parseError(pt, {
|
|
153
|
-
text: T.match,
|
|
154
|
-
token: this.terminals_[X] || X,
|
|
155
|
-
line: T.yylineno,
|
|
156
|
-
loc: gt,
|
|
157
|
-
expected: it
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
if (K[0] instanceof Array && K.length > 1)
|
|
161
|
-
throw new Error("Parse Error: multiple actions possible at state: " + Q + ", token: " + X);
|
|
162
|
-
switch (K[0]) {
|
|
163
|
-
case 1:
|
|
164
|
-
p.push(X), E.push(T.yytext), d.push(T.yylloc), p.push(K[1]), X = null, M = T.yyleng, h = T.yytext, O = T.yylineno, gt = T.yylloc;
|
|
165
|
-
break;
|
|
166
|
-
case 2:
|
|
167
|
-
if (J = this.productions_[K[1]][1], q.$ = E[E.length - J], q._$ = {
|
|
168
|
-
first_line: d[d.length - (J || 1)].first_line,
|
|
169
|
-
last_line: d[d.length - 1].last_line,
|
|
170
|
-
first_column: d[d.length - (J || 1)].first_column,
|
|
171
|
-
last_column: d[d.length - 1].last_column
|
|
172
|
-
}, oe && (q._$.range = [
|
|
173
|
-
d[d.length - (J || 1)].range[0],
|
|
174
|
-
d[d.length - 1].range[1]
|
|
175
|
-
]), yt = this.performAction.apply(q, [
|
|
176
|
-
h,
|
|
177
|
-
M,
|
|
178
|
-
O,
|
|
179
|
-
V.yy,
|
|
180
|
-
K[1],
|
|
181
|
-
E,
|
|
182
|
-
d
|
|
183
|
-
].concat(j)), typeof yt < "u")
|
|
184
|
-
return yt;
|
|
185
|
-
J && (p = p.slice(0, -1 * J * 2), E = E.slice(0, -1 * J), d = d.slice(0, -1 * J)), p.push(this.productions_[K[1]][0]), E.push(q.$), d.push(q._$), Tt = m[p[p.length - 2]][p[p.length - 1]], p.push(Tt);
|
|
186
|
-
break;
|
|
187
|
-
case 3:
|
|
188
|
-
return !0;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
return !0;
|
|
192
|
-
}, "parse")
|
|
193
|
-
}, N = /* @__PURE__ */ function() {
|
|
194
|
-
var D = {
|
|
195
|
-
EOF: 1,
|
|
196
|
-
parseError: /* @__PURE__ */ g(function(c, p) {
|
|
197
|
-
if (this.yy.parser)
|
|
198
|
-
this.yy.parser.parseError(c, p);
|
|
199
|
-
else
|
|
200
|
-
throw new Error(c);
|
|
201
|
-
}, "parseError"),
|
|
202
|
-
// resets the lexer, sets new input
|
|
203
|
-
setInput: /* @__PURE__ */ g(function(c, p) {
|
|
204
|
-
return this.yy = p || this.yy || {}, this._input = c, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
205
|
-
first_line: 1,
|
|
206
|
-
first_column: 0,
|
|
207
|
-
last_line: 1,
|
|
208
|
-
last_column: 0
|
|
209
|
-
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
|
210
|
-
}, "setInput"),
|
|
211
|
-
// consumes and returns one char from the input
|
|
212
|
-
input: /* @__PURE__ */ g(function() {
|
|
213
|
-
var c = this._input[0];
|
|
214
|
-
this.yytext += c, this.yyleng++, this.offset++, this.match += c, this.matched += c;
|
|
215
|
-
var p = c.match(/(?:\r\n?|\n).*/g);
|
|
216
|
-
return p ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), c;
|
|
217
|
-
}, "input"),
|
|
218
|
-
// unshifts one char (or a string) into the input
|
|
219
|
-
unput: /* @__PURE__ */ g(function(c) {
|
|
220
|
-
var p = c.length, f = c.split(/(?:\r\n?|\n)/g);
|
|
221
|
-
this._input = c + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - p), this.offset -= p;
|
|
222
|
-
var E = this.match.split(/(?:\r\n?|\n)/g);
|
|
223
|
-
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), f.length - 1 && (this.yylineno -= f.length - 1);
|
|
224
|
-
var d = this.yylloc.range;
|
|
225
|
-
return this.yylloc = {
|
|
226
|
-
first_line: this.yylloc.first_line,
|
|
227
|
-
last_line: this.yylineno + 1,
|
|
228
|
-
first_column: this.yylloc.first_column,
|
|
229
|
-
last_column: f ? (f.length === E.length ? this.yylloc.first_column : 0) + E[E.length - f.length].length - f[0].length : this.yylloc.first_column - p
|
|
230
|
-
}, this.options.ranges && (this.yylloc.range = [d[0], d[0] + this.yyleng - p]), this.yyleng = this.yytext.length, this;
|
|
231
|
-
}, "unput"),
|
|
232
|
-
// When called from action, caches matched text and appends it on next action
|
|
233
|
-
more: /* @__PURE__ */ g(function() {
|
|
234
|
-
return this._more = !0, this;
|
|
235
|
-
}, "more"),
|
|
236
|
-
// 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.
|
|
237
|
-
reject: /* @__PURE__ */ g(function() {
|
|
238
|
-
if (this.options.backtrack_lexer)
|
|
239
|
-
this._backtrack = !0;
|
|
240
|
-
else
|
|
241
|
-
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).
|
|
242
|
-
` + this.showPosition(), {
|
|
243
|
-
text: "",
|
|
244
|
-
token: null,
|
|
245
|
-
line: this.yylineno
|
|
246
|
-
});
|
|
247
|
-
return this;
|
|
248
|
-
}, "reject"),
|
|
249
|
-
// retain first n characters of the match
|
|
250
|
-
less: /* @__PURE__ */ g(function(c) {
|
|
251
|
-
this.unput(this.match.slice(c));
|
|
252
|
-
}, "less"),
|
|
253
|
-
// displays already matched input, i.e. for error messages
|
|
254
|
-
pastInput: /* @__PURE__ */ g(function() {
|
|
255
|
-
var c = this.matched.substr(0, this.matched.length - this.match.length);
|
|
256
|
-
return (c.length > 20 ? "..." : "") + c.substr(-20).replace(/\n/g, "");
|
|
257
|
-
}, "pastInput"),
|
|
258
|
-
// displays upcoming input, i.e. for error messages
|
|
259
|
-
upcomingInput: /* @__PURE__ */ g(function() {
|
|
260
|
-
var c = this.match;
|
|
261
|
-
return c.length < 20 && (c += this._input.substr(0, 20 - c.length)), (c.substr(0, 20) + (c.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
262
|
-
}, "upcomingInput"),
|
|
263
|
-
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
264
|
-
showPosition: /* @__PURE__ */ g(function() {
|
|
265
|
-
var c = this.pastInput(), p = new Array(c.length + 1).join("-");
|
|
266
|
-
return c + this.upcomingInput() + `
|
|
267
|
-
` + p + "^";
|
|
268
|
-
}, "showPosition"),
|
|
269
|
-
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
270
|
-
test_match: /* @__PURE__ */ g(function(c, p) {
|
|
271
|
-
var f, E, d;
|
|
272
|
-
if (this.options.backtrack_lexer && (d = {
|
|
273
|
-
yylineno: this.yylineno,
|
|
274
|
-
yylloc: {
|
|
275
|
-
first_line: this.yylloc.first_line,
|
|
276
|
-
last_line: this.last_line,
|
|
277
|
-
first_column: this.yylloc.first_column,
|
|
278
|
-
last_column: this.yylloc.last_column
|
|
279
|
-
},
|
|
280
|
-
yytext: this.yytext,
|
|
281
|
-
match: this.match,
|
|
282
|
-
matches: this.matches,
|
|
283
|
-
matched: this.matched,
|
|
284
|
-
yyleng: this.yyleng,
|
|
285
|
-
offset: this.offset,
|
|
286
|
-
_more: this._more,
|
|
287
|
-
_input: this._input,
|
|
288
|
-
yy: this.yy,
|
|
289
|
-
conditionStack: this.conditionStack.slice(0),
|
|
290
|
-
done: this.done
|
|
291
|
-
}, this.options.ranges && (d.yylloc.range = this.yylloc.range.slice(0))), E = c[0].match(/(?:\r\n?|\n).*/g), E && (this.yylineno += E.length), this.yylloc = {
|
|
292
|
-
first_line: this.yylloc.last_line,
|
|
293
|
-
last_line: this.yylineno + 1,
|
|
294
|
-
first_column: this.yylloc.last_column,
|
|
295
|
-
last_column: E ? E[E.length - 1].length - E[E.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + c[0].length
|
|
296
|
-
}, this.yytext += c[0], this.match += c[0], this.matches = c, 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(c[0].length), this.matched += c[0], f = this.performAction.call(this, this.yy, this, p, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), f)
|
|
297
|
-
return f;
|
|
298
|
-
if (this._backtrack) {
|
|
299
|
-
for (var m in d)
|
|
300
|
-
this[m] = d[m];
|
|
301
|
-
return !1;
|
|
302
|
-
}
|
|
303
|
-
return !1;
|
|
304
|
-
}, "test_match"),
|
|
305
|
-
// return next match in input
|
|
306
|
-
next: /* @__PURE__ */ g(function() {
|
|
307
|
-
if (this.done)
|
|
308
|
-
return this.EOF;
|
|
309
|
-
this._input || (this.done = !0);
|
|
310
|
-
var c, p, f, E;
|
|
311
|
-
this._more || (this.yytext = "", this.match = "");
|
|
312
|
-
for (var d = this._currentRules(), m = 0; m < d.length; m++)
|
|
313
|
-
if (f = this._input.match(this.rules[d[m]]), f && (!p || f[0].length > p[0].length)) {
|
|
314
|
-
if (p = f, E = m, this.options.backtrack_lexer) {
|
|
315
|
-
if (c = this.test_match(f, d[m]), c !== !1)
|
|
316
|
-
return c;
|
|
317
|
-
if (this._backtrack) {
|
|
318
|
-
p = !1;
|
|
319
|
-
continue;
|
|
320
|
-
} else
|
|
321
|
-
return !1;
|
|
322
|
-
} else if (!this.options.flex)
|
|
323
|
-
break;
|
|
324
|
-
}
|
|
325
|
-
return p ? (c = this.test_match(p, d[E]), c !== !1 ? c : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
326
|
-
` + this.showPosition(), {
|
|
327
|
-
text: "",
|
|
328
|
-
token: null,
|
|
329
|
-
line: this.yylineno
|
|
330
|
-
});
|
|
331
|
-
}, "next"),
|
|
332
|
-
// return next match that has a token
|
|
333
|
-
lex: /* @__PURE__ */ g(function() {
|
|
334
|
-
var c = this.next();
|
|
335
|
-
return c || this.lex();
|
|
336
|
-
}, "lex"),
|
|
337
|
-
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
338
|
-
begin: /* @__PURE__ */ g(function(c) {
|
|
339
|
-
this.conditionStack.push(c);
|
|
340
|
-
}, "begin"),
|
|
341
|
-
// pop the previously active lexer condition state off the condition stack
|
|
342
|
-
popState: /* @__PURE__ */ g(function() {
|
|
343
|
-
var c = this.conditionStack.length - 1;
|
|
344
|
-
return c > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
345
|
-
}, "popState"),
|
|
346
|
-
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
347
|
-
_currentRules: /* @__PURE__ */ g(function() {
|
|
348
|
-
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
349
|
-
}, "_currentRules"),
|
|
350
|
-
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
351
|
-
topState: /* @__PURE__ */ g(function(c) {
|
|
352
|
-
return c = this.conditionStack.length - 1 - Math.abs(c || 0), c >= 0 ? this.conditionStack[c] : "INITIAL";
|
|
353
|
-
}, "topState"),
|
|
354
|
-
// alias for begin(condition)
|
|
355
|
-
pushState: /* @__PURE__ */ g(function(c) {
|
|
356
|
-
this.begin(c);
|
|
357
|
-
}, "pushState"),
|
|
358
|
-
// return the number of states currently on the stack
|
|
359
|
-
stateStackSize: /* @__PURE__ */ g(function() {
|
|
360
|
-
return this.conditionStack.length;
|
|
361
|
-
}, "stateStackSize"),
|
|
362
|
-
options: {},
|
|
363
|
-
performAction: /* @__PURE__ */ g(function(c, p, f, E) {
|
|
364
|
-
switch (f) {
|
|
365
|
-
case 0:
|
|
366
|
-
return c.getLogger().debug("Found block-beta"), 10;
|
|
367
|
-
case 1:
|
|
368
|
-
return c.getLogger().debug("Found id-block"), 29;
|
|
369
|
-
case 2:
|
|
370
|
-
return c.getLogger().debug("Found block"), 10;
|
|
371
|
-
case 3:
|
|
372
|
-
c.getLogger().debug(".", p.yytext);
|
|
373
|
-
break;
|
|
374
|
-
case 4:
|
|
375
|
-
c.getLogger().debug("_", p.yytext);
|
|
376
|
-
break;
|
|
377
|
-
case 5:
|
|
378
|
-
return 5;
|
|
379
|
-
case 6:
|
|
380
|
-
return p.yytext = -1, 28;
|
|
381
|
-
case 7:
|
|
382
|
-
return p.yytext = p.yytext.replace(/columns\s+/, ""), c.getLogger().debug("COLUMNS (LEX)", p.yytext), 28;
|
|
383
|
-
case 8:
|
|
384
|
-
this.pushState("md_string");
|
|
385
|
-
break;
|
|
386
|
-
case 9:
|
|
387
|
-
return "MD_STR";
|
|
388
|
-
case 10:
|
|
389
|
-
this.popState();
|
|
390
|
-
break;
|
|
391
|
-
case 11:
|
|
392
|
-
this.pushState("string");
|
|
393
|
-
break;
|
|
394
|
-
case 12:
|
|
395
|
-
c.getLogger().debug("LEX: POPPING STR:", p.yytext), this.popState();
|
|
396
|
-
break;
|
|
397
|
-
case 13:
|
|
398
|
-
return c.getLogger().debug("LEX: STR end:", p.yytext), "STR";
|
|
399
|
-
case 14:
|
|
400
|
-
return p.yytext = p.yytext.replace(/space\:/, ""), c.getLogger().debug("SPACE NUM (LEX)", p.yytext), 21;
|
|
401
|
-
case 15:
|
|
402
|
-
return p.yytext = "1", c.getLogger().debug("COLUMNS (LEX)", p.yytext), 21;
|
|
403
|
-
case 16:
|
|
404
|
-
return 42;
|
|
405
|
-
case 17:
|
|
406
|
-
return "LINKSTYLE";
|
|
407
|
-
case 18:
|
|
408
|
-
return "INTERPOLATE";
|
|
409
|
-
case 19:
|
|
410
|
-
return this.pushState("CLASSDEF"), 39;
|
|
411
|
-
case 20:
|
|
412
|
-
return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
|
|
413
|
-
case 21:
|
|
414
|
-
return this.popState(), this.pushState("CLASSDEFID"), 40;
|
|
415
|
-
case 22:
|
|
416
|
-
return this.popState(), 41;
|
|
417
|
-
case 23:
|
|
418
|
-
return this.pushState("CLASS"), 43;
|
|
419
|
-
case 24:
|
|
420
|
-
return this.popState(), this.pushState("CLASS_STYLE"), 44;
|
|
421
|
-
case 25:
|
|
422
|
-
return this.popState(), 45;
|
|
423
|
-
case 26:
|
|
424
|
-
return this.pushState("STYLE_STMNT"), 46;
|
|
425
|
-
case 27:
|
|
426
|
-
return this.popState(), this.pushState("STYLE_DEFINITION"), 47;
|
|
427
|
-
case 28:
|
|
428
|
-
return this.popState(), 48;
|
|
429
|
-
case 29:
|
|
430
|
-
return this.pushState("acc_title"), "acc_title";
|
|
431
|
-
case 30:
|
|
432
|
-
return this.popState(), "acc_title_value";
|
|
433
|
-
case 31:
|
|
434
|
-
return this.pushState("acc_descr"), "acc_descr";
|
|
435
|
-
case 32:
|
|
436
|
-
return this.popState(), "acc_descr_value";
|
|
437
|
-
case 33:
|
|
438
|
-
this.pushState("acc_descr_multiline");
|
|
439
|
-
break;
|
|
440
|
-
case 34:
|
|
441
|
-
this.popState();
|
|
442
|
-
break;
|
|
443
|
-
case 35:
|
|
444
|
-
return "acc_descr_multiline_value";
|
|
445
|
-
case 36:
|
|
446
|
-
return 30;
|
|
447
|
-
case 37:
|
|
448
|
-
return this.popState(), c.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
449
|
-
case 38:
|
|
450
|
-
return this.popState(), c.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
451
|
-
case 39:
|
|
452
|
-
return this.popState(), c.getLogger().debug("Lex: ))"), "NODE_DEND";
|
|
453
|
-
case 40:
|
|
454
|
-
return this.popState(), c.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
455
|
-
case 41:
|
|
456
|
-
return this.popState(), c.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
457
|
-
case 42:
|
|
458
|
-
return this.popState(), c.getLogger().debug("Lex: (-"), "NODE_DEND";
|
|
459
|
-
case 43:
|
|
460
|
-
return this.popState(), c.getLogger().debug("Lex: -)"), "NODE_DEND";
|
|
461
|
-
case 44:
|
|
462
|
-
return this.popState(), c.getLogger().debug("Lex: (("), "NODE_DEND";
|
|
463
|
-
case 45:
|
|
464
|
-
return this.popState(), c.getLogger().debug("Lex: ]]"), "NODE_DEND";
|
|
465
|
-
case 46:
|
|
466
|
-
return this.popState(), c.getLogger().debug("Lex: ("), "NODE_DEND";
|
|
467
|
-
case 47:
|
|
468
|
-
return this.popState(), c.getLogger().debug("Lex: ])"), "NODE_DEND";
|
|
469
|
-
case 48:
|
|
470
|
-
return this.popState(), c.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
471
|
-
case 49:
|
|
472
|
-
return this.popState(), c.getLogger().debug("Lex: /]"), "NODE_DEND";
|
|
473
|
-
case 50:
|
|
474
|
-
return this.popState(), c.getLogger().debug("Lex: )]"), "NODE_DEND";
|
|
475
|
-
case 51:
|
|
476
|
-
return this.popState(), c.getLogger().debug("Lex: )"), "NODE_DEND";
|
|
477
|
-
case 52:
|
|
478
|
-
return this.popState(), c.getLogger().debug("Lex: ]>"), "NODE_DEND";
|
|
479
|
-
case 53:
|
|
480
|
-
return this.popState(), c.getLogger().debug("Lex: ]"), "NODE_DEND";
|
|
481
|
-
case 54:
|
|
482
|
-
return c.getLogger().debug("Lexa: -)"), this.pushState("NODE"), 35;
|
|
483
|
-
case 55:
|
|
484
|
-
return c.getLogger().debug("Lexa: (-"), this.pushState("NODE"), 35;
|
|
485
|
-
case 56:
|
|
486
|
-
return c.getLogger().debug("Lexa: ))"), this.pushState("NODE"), 35;
|
|
487
|
-
case 57:
|
|
488
|
-
return c.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
489
|
-
case 58:
|
|
490
|
-
return c.getLogger().debug("Lex: ((("), this.pushState("NODE"), 35;
|
|
491
|
-
case 59:
|
|
492
|
-
return c.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
493
|
-
case 60:
|
|
494
|
-
return c.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
495
|
-
case 61:
|
|
496
|
-
return c.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
497
|
-
case 62:
|
|
498
|
-
return c.getLogger().debug("Lexc: >"), this.pushState("NODE"), 35;
|
|
499
|
-
case 63:
|
|
500
|
-
return c.getLogger().debug("Lexa: (["), this.pushState("NODE"), 35;
|
|
501
|
-
case 64:
|
|
502
|
-
return c.getLogger().debug("Lexa: )"), this.pushState("NODE"), 35;
|
|
503
|
-
case 65:
|
|
504
|
-
return this.pushState("NODE"), 35;
|
|
505
|
-
case 66:
|
|
506
|
-
return this.pushState("NODE"), 35;
|
|
507
|
-
case 67:
|
|
508
|
-
return this.pushState("NODE"), 35;
|
|
509
|
-
case 68:
|
|
510
|
-
return this.pushState("NODE"), 35;
|
|
511
|
-
case 69:
|
|
512
|
-
return this.pushState("NODE"), 35;
|
|
513
|
-
case 70:
|
|
514
|
-
return this.pushState("NODE"), 35;
|
|
515
|
-
case 71:
|
|
516
|
-
return this.pushState("NODE"), 35;
|
|
517
|
-
case 72:
|
|
518
|
-
return c.getLogger().debug("Lexa: ["), this.pushState("NODE"), 35;
|
|
519
|
-
case 73:
|
|
520
|
-
return this.pushState("BLOCK_ARROW"), c.getLogger().debug("LEX ARR START"), 37;
|
|
521
|
-
case 74:
|
|
522
|
-
return c.getLogger().debug("Lex: NODE_ID", p.yytext), 31;
|
|
523
|
-
case 75:
|
|
524
|
-
return c.getLogger().debug("Lex: EOF", p.yytext), 8;
|
|
525
|
-
case 76:
|
|
526
|
-
this.pushState("md_string");
|
|
527
|
-
break;
|
|
528
|
-
case 77:
|
|
529
|
-
this.pushState("md_string");
|
|
530
|
-
break;
|
|
531
|
-
case 78:
|
|
532
|
-
return "NODE_DESCR";
|
|
533
|
-
case 79:
|
|
534
|
-
this.popState();
|
|
535
|
-
break;
|
|
536
|
-
case 80:
|
|
537
|
-
c.getLogger().debug("Lex: Starting string"), this.pushState("string");
|
|
538
|
-
break;
|
|
539
|
-
case 81:
|
|
540
|
-
c.getLogger().debug("LEX ARR: Starting string"), this.pushState("string");
|
|
541
|
-
break;
|
|
542
|
-
case 82:
|
|
543
|
-
return c.getLogger().debug("LEX: NODE_DESCR:", p.yytext), "NODE_DESCR";
|
|
544
|
-
case 83:
|
|
545
|
-
c.getLogger().debug("LEX POPPING"), this.popState();
|
|
546
|
-
break;
|
|
547
|
-
case 84:
|
|
548
|
-
c.getLogger().debug("Lex: =>BAE"), this.pushState("ARROW_DIR");
|
|
549
|
-
break;
|
|
550
|
-
case 85:
|
|
551
|
-
return p.yytext = p.yytext.replace(/^,\s*/, ""), c.getLogger().debug("Lex (right): dir:", p.yytext), "DIR";
|
|
552
|
-
case 86:
|
|
553
|
-
return p.yytext = p.yytext.replace(/^,\s*/, ""), c.getLogger().debug("Lex (left):", p.yytext), "DIR";
|
|
554
|
-
case 87:
|
|
555
|
-
return p.yytext = p.yytext.replace(/^,\s*/, ""), c.getLogger().debug("Lex (x):", p.yytext), "DIR";
|
|
556
|
-
case 88:
|
|
557
|
-
return p.yytext = p.yytext.replace(/^,\s*/, ""), c.getLogger().debug("Lex (y):", p.yytext), "DIR";
|
|
558
|
-
case 89:
|
|
559
|
-
return p.yytext = p.yytext.replace(/^,\s*/, ""), c.getLogger().debug("Lex (up):", p.yytext), "DIR";
|
|
560
|
-
case 90:
|
|
561
|
-
return p.yytext = p.yytext.replace(/^,\s*/, ""), c.getLogger().debug("Lex (down):", p.yytext), "DIR";
|
|
562
|
-
case 91:
|
|
563
|
-
return p.yytext = "]>", c.getLogger().debug("Lex (ARROW_DIR end):", p.yytext), this.popState(), this.popState(), "BLOCK_ARROW_END";
|
|
564
|
-
case 92:
|
|
565
|
-
return c.getLogger().debug("Lex: LINK", "#" + p.yytext + "#"), 15;
|
|
566
|
-
case 93:
|
|
567
|
-
return c.getLogger().debug("Lex: LINK", p.yytext), 15;
|
|
568
|
-
case 94:
|
|
569
|
-
return c.getLogger().debug("Lex: LINK", p.yytext), 15;
|
|
570
|
-
case 95:
|
|
571
|
-
return c.getLogger().debug("Lex: LINK", p.yytext), 15;
|
|
572
|
-
case 96:
|
|
573
|
-
return c.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
|
|
574
|
-
case 97:
|
|
575
|
-
return c.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
|
|
576
|
-
case 98:
|
|
577
|
-
return c.getLogger().debug("Lex: START_LINK", p.yytext), this.pushState("LLABEL"), 16;
|
|
578
|
-
case 99:
|
|
579
|
-
this.pushState("md_string");
|
|
580
|
-
break;
|
|
581
|
-
case 100:
|
|
582
|
-
return c.getLogger().debug("Lex: Starting string"), this.pushState("string"), "LINK_LABEL";
|
|
583
|
-
case 101:
|
|
584
|
-
return this.popState(), c.getLogger().debug("Lex: LINK", "#" + p.yytext + "#"), 15;
|
|
585
|
-
case 102:
|
|
586
|
-
return this.popState(), c.getLogger().debug("Lex: LINK", p.yytext), 15;
|
|
587
|
-
case 103:
|
|
588
|
-
return this.popState(), c.getLogger().debug("Lex: LINK", p.yytext), 15;
|
|
589
|
-
case 104:
|
|
590
|
-
return c.getLogger().debug("Lex: COLON", p.yytext), p.yytext = p.yytext.slice(1), 27;
|
|
591
|
-
}
|
|
592
|
-
}, "anonymous"),
|
|
593
|
-
rules: [/^(?:block-beta\b)/, /^(?:block:)/, /^(?:block\b)/, /^(?:[\s]+)/, /^(?:[\n]+)/, /^(?:((\u000D\u000A)|(\u000A)))/, /^(?:columns\s+auto\b)/, /^(?:columns\s+[\d]+)/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:space[:]\d+)/, /^(?:space\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\s+)/, /^(?:DEFAULT\s+)/, /^(?:\w+\s+)/, /^(?:[^\n]*)/, /^(?:class\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:style\s+)/, /^(?:(\w+)+((,\s*\w+)*))/, /^(?:[^\n]*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:end\b\s*)/, /^(?:\(\(\()/, /^(?:\)\)\))/, /^(?:[\)]\))/, /^(?:\}\})/, /^(?:\})/, /^(?:\(-)/, /^(?:-\))/, /^(?:\(\()/, /^(?:\]\])/, /^(?:\()/, /^(?:\]\))/, /^(?:\\\])/, /^(?:\/\])/, /^(?:\)\])/, /^(?:[\)])/, /^(?:\]>)/, /^(?:[\]])/, /^(?:-\))/, /^(?:\(-)/, /^(?:\)\))/, /^(?:\))/, /^(?:\(\(\()/, /^(?:\(\()/, /^(?:\{\{)/, /^(?:\{)/, /^(?:>)/, /^(?:\(\[)/, /^(?:\()/, /^(?:\[\[)/, /^(?:\[\|)/, /^(?:\[\()/, /^(?:\)\)\))/, /^(?:\[\\)/, /^(?:\[\/)/, /^(?:\[\\)/, /^(?:\[)/, /^(?:<\[)/, /^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/, /^(?:$)/, /^(?:["][`])/, /^(?:["][`])/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["])/, /^(?:["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:\]>\s*\()/, /^(?:,?\s*right\s*)/, /^(?:,?\s*left\s*)/, /^(?:,?\s*x\s*)/, /^(?:,?\s*y\s*)/, /^(?:,?\s*up\s*)/, /^(?:,?\s*down\s*)/, /^(?:\)\s*)/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?:\s*~~[\~]+\s*)/, /^(?:\s*[xo<]?--\s*)/, /^(?:\s*[xo<]?==\s*)/, /^(?:\s*[xo<]?-\.\s*)/, /^(?:["][`])/, /^(?:["])/, /^(?:\s*[xo<]?--+[-xo>]\s*)/, /^(?:\s*[xo<]?==+[=xo>]\s*)/, /^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/, /^(?::\d+)/],
|
|
594
|
-
conditions: { STYLE_DEFINITION: { rules: [28], inclusive: !1 }, STYLE_STMNT: { rules: [27], inclusive: !1 }, CLASSDEFID: { rules: [22], inclusive: !1 }, CLASSDEF: { rules: [20, 21], inclusive: !1 }, CLASS_STYLE: { rules: [25], inclusive: !1 }, CLASS: { rules: [24], inclusive: !1 }, LLABEL: { rules: [99, 100, 101, 102, 103], inclusive: !1 }, ARROW_DIR: { rules: [85, 86, 87, 88, 89, 90, 91], inclusive: !1 }, BLOCK_ARROW: { rules: [76, 81, 84], inclusive: !1 }, NODE: { rules: [37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 77, 80], inclusive: !1 }, md_string: { rules: [9, 10, 78, 79], inclusive: !1 }, space: { rules: [], inclusive: !1 }, string: { rules: [12, 13, 82, 83], inclusive: !1 }, acc_descr_multiline: { rules: [34, 35], inclusive: !1 }, acc_descr: { rules: [32], inclusive: !1 }, acc_title: { rules: [30], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 14, 15, 16, 17, 18, 19, 23, 26, 29, 31, 33, 36, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 92, 93, 94, 95, 96, 97, 98, 104], inclusive: !0 } }
|
|
595
|
-
};
|
|
596
|
-
return D;
|
|
597
|
-
}();
|
|
598
|
-
k.lexer = N;
|
|
599
|
-
function v() {
|
|
600
|
-
this.yy = {};
|
|
601
|
-
}
|
|
602
|
-
return g(v, "Parser"), v.prototype = k, k.Parser = v, new v();
|
|
603
|
-
}();
|
|
604
|
-
ft.parser = ft;
|
|
605
|
-
var ve = ft, U = /* @__PURE__ */ new Map(), kt = [], mt = /* @__PURE__ */ new Map(), $t = "color", Ct = "fill", Ee = "bgFill", Ft = ",", De = z(), ot = /* @__PURE__ */ new Map(), Ne = /* @__PURE__ */ g((e) => me.sanitizeText(e, De), "sanitizeText"), Te = /* @__PURE__ */ g(function(e, t = "") {
|
|
606
|
-
let s = ot.get(e);
|
|
607
|
-
s || (s = { id: e, styles: [], textStyles: [] }, ot.set(e, s)), t != null && t.split(Ft).forEach((i) => {
|
|
608
|
-
const l = i.replace(/([^;]*);/, "$1").trim();
|
|
609
|
-
if (RegExp($t).exec(i)) {
|
|
610
|
-
const a = l.replace(Ct, Ee).replace($t, Ct);
|
|
611
|
-
s.textStyles.push(a);
|
|
612
|
-
}
|
|
613
|
-
s.styles.push(l);
|
|
614
|
-
});
|
|
615
|
-
}, "addStyleClass"), $e = /* @__PURE__ */ g(function(e, t = "") {
|
|
616
|
-
const s = U.get(e);
|
|
617
|
-
t != null && (s.styles = t.split(Ft));
|
|
618
|
-
}, "addStyle2Node"), Ce = /* @__PURE__ */ g(function(e, t) {
|
|
619
|
-
e.split(",").forEach(function(s) {
|
|
620
|
-
let i = U.get(s);
|
|
621
|
-
if (i === void 0) {
|
|
622
|
-
const l = s.trim();
|
|
623
|
-
i = { id: l, type: "na", children: [] }, U.set(l, i);
|
|
624
|
-
}
|
|
625
|
-
i.classes || (i.classes = []), i.classes.push(t);
|
|
626
|
-
});
|
|
627
|
-
}, "setCssClass"), Yt = /* @__PURE__ */ g((e, t) => {
|
|
628
|
-
const s = e.flat(), i = [], l = s.find((r) => (r == null ? void 0 : r.type) === "column-setting"), a = (l == null ? void 0 : l.columns) ?? -1;
|
|
629
|
-
for (const r of s) {
|
|
630
|
-
if (typeof a == "number" && a > 0 && r.type !== "column-setting" && typeof r.widthInColumns == "number" && r.widthInColumns > a && w.warn(
|
|
631
|
-
`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${a}`
|
|
632
|
-
), r.label && (r.label = Ne(r.label)), r.type === "classDef") {
|
|
633
|
-
Te(r.id, r.css);
|
|
634
|
-
continue;
|
|
635
|
-
}
|
|
636
|
-
if (r.type === "applyClass") {
|
|
637
|
-
Ce(r.id, (r == null ? void 0 : r.styleClass) ?? "");
|
|
638
|
-
continue;
|
|
639
|
-
}
|
|
640
|
-
if (r.type === "applyStyles") {
|
|
641
|
-
r != null && r.stylesStr && $e(r.id, r == null ? void 0 : r.stylesStr);
|
|
642
|
-
continue;
|
|
643
|
-
}
|
|
644
|
-
if (r.type === "column-setting")
|
|
645
|
-
t.columns = r.columns ?? -1;
|
|
646
|
-
else if (r.type === "edge") {
|
|
647
|
-
const n = (mt.get(r.id) ?? 0) + 1;
|
|
648
|
-
mt.set(r.id, n), r.id = n + "-" + r.id, kt.push(r);
|
|
649
|
-
} else {
|
|
650
|
-
r.label || (r.type === "composite" ? r.label = "" : r.label = r.id);
|
|
651
|
-
const n = U.get(r.id);
|
|
652
|
-
if (n === void 0 ? U.set(r.id, r) : (r.type !== "na" && (n.type = r.type), r.label !== r.id && (n.label = r.label)), r.children && Yt(r.children, r), r.type === "space") {
|
|
653
|
-
const o = r.width ?? 1;
|
|
654
|
-
for (let u = 0; u < o; u++) {
|
|
655
|
-
const y = Se(r);
|
|
656
|
-
y.id = y.id + "-" + u, U.set(y.id, y), i.push(y);
|
|
657
|
-
}
|
|
658
|
-
} else n === void 0 && i.push(r);
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
t.children = i;
|
|
662
|
-
}, "populateBlockDatabase"), _t = [], rt = { id: "root", type: "composite", children: [], columns: -1 }, Ie = /* @__PURE__ */ g(() => {
|
|
663
|
-
w.debug("Clear called"), ue(), rt = { id: "root", type: "composite", children: [], columns: -1 }, U = /* @__PURE__ */ new Map([["root", rt]]), _t = [], ot = /* @__PURE__ */ new Map(), kt = [], mt = /* @__PURE__ */ new Map();
|
|
664
|
-
}, "clear");
|
|
665
|
-
function Kt(e) {
|
|
666
|
-
switch (w.debug("typeStr2Type", e), e) {
|
|
667
|
-
case "[]":
|
|
668
|
-
return "square";
|
|
669
|
-
case "()":
|
|
670
|
-
return w.debug("we have a round"), "round";
|
|
671
|
-
case "(())":
|
|
672
|
-
return "circle";
|
|
673
|
-
case ">]":
|
|
674
|
-
return "rect_left_inv_arrow";
|
|
675
|
-
case "{}":
|
|
676
|
-
return "diamond";
|
|
677
|
-
case "{{}}":
|
|
678
|
-
return "hexagon";
|
|
679
|
-
case "([])":
|
|
680
|
-
return "stadium";
|
|
681
|
-
case "[[]]":
|
|
682
|
-
return "subroutine";
|
|
683
|
-
case "[()]":
|
|
684
|
-
return "cylinder";
|
|
685
|
-
case "((()))":
|
|
686
|
-
return "doublecircle";
|
|
687
|
-
case "[//]":
|
|
688
|
-
return "lean_right";
|
|
689
|
-
case "[\\\\]":
|
|
690
|
-
return "lean_left";
|
|
691
|
-
case "[/\\]":
|
|
692
|
-
return "trapezoid";
|
|
693
|
-
case "[\\/]":
|
|
694
|
-
return "inv_trapezoid";
|
|
695
|
-
case "<[]>":
|
|
696
|
-
return "block_arrow";
|
|
697
|
-
default:
|
|
698
|
-
return "na";
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
g(Kt, "typeStr2Type");
|
|
702
|
-
function Ht(e) {
|
|
703
|
-
switch (w.debug("typeStr2Type", e), e) {
|
|
704
|
-
case "==":
|
|
705
|
-
return "thick";
|
|
706
|
-
default:
|
|
707
|
-
return "normal";
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
g(Ht, "edgeTypeStr2Type");
|
|
711
|
-
function jt(e) {
|
|
712
|
-
switch (e.replace(/^[\s-]+|[\s-]+$/g, "")) {
|
|
713
|
-
case "x":
|
|
714
|
-
return "arrow_cross";
|
|
715
|
-
case "o":
|
|
716
|
-
return "arrow_circle";
|
|
717
|
-
case ">":
|
|
718
|
-
return "arrow_point";
|
|
719
|
-
default:
|
|
720
|
-
return "";
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
g(jt, "edgeStrToEdgeData");
|
|
724
|
-
var It = 0, Oe = /* @__PURE__ */ g(() => (It++, "id-" + Math.random().toString(36).substr(2, 12) + "-" + It), "generateId"), Be = /* @__PURE__ */ g((e) => {
|
|
725
|
-
rt.children = e, Yt(e, rt), _t = rt.children;
|
|
726
|
-
}, "setHierarchy"), ze = /* @__PURE__ */ g((e) => {
|
|
727
|
-
const t = U.get(e);
|
|
728
|
-
return t ? t.columns ? t.columns : t.children ? t.children.length : -1 : -1;
|
|
729
|
-
}, "getColumns"), Ae = /* @__PURE__ */ g(() => [...U.values()], "getBlocksFlat"), Re = /* @__PURE__ */ g(() => _t || [], "getBlocks"), Me = /* @__PURE__ */ g(() => kt, "getEdges"), Pe = /* @__PURE__ */ g((e) => U.get(e), "getBlock"), Xe = /* @__PURE__ */ g((e) => {
|
|
730
|
-
U.set(e.id, e);
|
|
731
|
-
}, "setBlock"), We = /* @__PURE__ */ g(() => w, "getLogger"), Fe = /* @__PURE__ */ g(function() {
|
|
732
|
-
return ot;
|
|
733
|
-
}, "getClasses"), Ye = {
|
|
734
|
-
getConfig: /* @__PURE__ */ g(() => at().block, "getConfig"),
|
|
735
|
-
typeStr2Type: Kt,
|
|
736
|
-
edgeTypeStr2Type: Ht,
|
|
737
|
-
edgeStrToEdgeData: jt,
|
|
738
|
-
getLogger: We,
|
|
739
|
-
getBlocksFlat: Ae,
|
|
740
|
-
getBlocks: Re,
|
|
741
|
-
getEdges: Me,
|
|
742
|
-
setHierarchy: Be,
|
|
743
|
-
getBlock: Pe,
|
|
744
|
-
setBlock: Xe,
|
|
745
|
-
getColumns: ze,
|
|
746
|
-
getClasses: Fe,
|
|
747
|
-
clear: Ie,
|
|
748
|
-
generateId: Oe
|
|
749
|
-
}, Ke = Ye, nt = /* @__PURE__ */ g((e, t) => {
|
|
750
|
-
const s = _e, i = s(e, "r"), l = s(e, "g"), a = s(e, "b");
|
|
751
|
-
return ge(i, l, a, t);
|
|
752
|
-
}, "fade"), He = /* @__PURE__ */ g((e) => `.label {
|
|
753
|
-
font-family: ${e.fontFamily};
|
|
754
|
-
color: ${e.nodeTextColor || e.textColor};
|
|
755
|
-
}
|
|
756
|
-
.cluster-label text {
|
|
757
|
-
fill: ${e.titleColor};
|
|
758
|
-
}
|
|
759
|
-
.cluster-label span,p {
|
|
760
|
-
color: ${e.titleColor};
|
|
761
|
-
}
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
.label text,span,p {
|
|
766
|
-
fill: ${e.nodeTextColor || e.textColor};
|
|
767
|
-
color: ${e.nodeTextColor || e.textColor};
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
.node rect,
|
|
771
|
-
.node circle,
|
|
772
|
-
.node ellipse,
|
|
773
|
-
.node polygon,
|
|
774
|
-
.node path {
|
|
775
|
-
fill: ${e.mainBkg};
|
|
776
|
-
stroke: ${e.nodeBorder};
|
|
777
|
-
stroke-width: 1px;
|
|
778
|
-
}
|
|
779
|
-
.flowchart-label text {
|
|
780
|
-
text-anchor: middle;
|
|
781
|
-
}
|
|
782
|
-
// .flowchart-label .text-outer-tspan {
|
|
783
|
-
// text-anchor: middle;
|
|
784
|
-
// }
|
|
785
|
-
// .flowchart-label .text-inner-tspan {
|
|
786
|
-
// text-anchor: start;
|
|
787
|
-
// }
|
|
788
|
-
|
|
789
|
-
.node .label {
|
|
790
|
-
text-align: center;
|
|
791
|
-
}
|
|
792
|
-
.node.clickable {
|
|
793
|
-
cursor: pointer;
|
|
794
|
-
}
|
|
795
|
-
|
|
796
|
-
.arrowheadPath {
|
|
797
|
-
fill: ${e.arrowheadColor};
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
.edgePath .path {
|
|
801
|
-
stroke: ${e.lineColor};
|
|
802
|
-
stroke-width: 2.0px;
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
.flowchart-link {
|
|
806
|
-
stroke: ${e.lineColor};
|
|
807
|
-
fill: none;
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
.edgeLabel {
|
|
811
|
-
background-color: ${e.edgeLabelBackground};
|
|
812
|
-
rect {
|
|
813
|
-
opacity: 0.5;
|
|
814
|
-
background-color: ${e.edgeLabelBackground};
|
|
815
|
-
fill: ${e.edgeLabelBackground};
|
|
816
|
-
}
|
|
817
|
-
text-align: center;
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
/* For html labels only */
|
|
821
|
-
.labelBkg {
|
|
822
|
-
background-color: ${nt(e.edgeLabelBackground, 0.5)};
|
|
823
|
-
// background-color:
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
.node .cluster {
|
|
827
|
-
// fill: ${nt(e.mainBkg, 0.5)};
|
|
828
|
-
fill: ${nt(e.clusterBkg, 0.5)};
|
|
829
|
-
stroke: ${nt(e.clusterBorder, 0.2)};
|
|
830
|
-
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
831
|
-
stroke-width: 1px;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
.cluster text {
|
|
835
|
-
fill: ${e.titleColor};
|
|
836
|
-
}
|
|
837
|
-
|
|
838
|
-
.cluster span,p {
|
|
839
|
-
color: ${e.titleColor};
|
|
840
|
-
}
|
|
841
|
-
/* .cluster div {
|
|
842
|
-
color: ${e.titleColor};
|
|
843
|
-
} */
|
|
844
|
-
|
|
845
|
-
div.mermaidTooltip {
|
|
846
|
-
position: absolute;
|
|
847
|
-
text-align: center;
|
|
848
|
-
max-width: 200px;
|
|
849
|
-
padding: 2px;
|
|
850
|
-
font-family: ${e.fontFamily};
|
|
851
|
-
font-size: 12px;
|
|
852
|
-
background: ${e.tertiaryColor};
|
|
853
|
-
border: 1px solid ${e.border2};
|
|
854
|
-
border-radius: 2px;
|
|
855
|
-
pointer-events: none;
|
|
856
|
-
z-index: 100;
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
.flowchartTitleText {
|
|
860
|
-
text-anchor: middle;
|
|
861
|
-
font-size: 18px;
|
|
862
|
-
fill: ${e.textColor};
|
|
863
|
-
}
|
|
864
|
-
${ce()}
|
|
865
|
-
`, "getStyles"), je = He, Ue = /* @__PURE__ */ g((e, t, s, i) => {
|
|
866
|
-
t.forEach((l) => {
|
|
867
|
-
ar[l](e, s, i);
|
|
868
|
-
});
|
|
869
|
-
}, "insertMarkers"), Ze = /* @__PURE__ */ g((e, t, s) => {
|
|
870
|
-
w.trace("Making markers for ", s), e.append("defs").append("marker").attr("id", s + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", s + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
871
|
-
}, "extension"), Ge = /* @__PURE__ */ g((e, t, s) => {
|
|
872
|
-
e.append("defs").append("marker").attr("id", s + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", s + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
873
|
-
}, "composition"), Je = /* @__PURE__ */ g((e, t, s) => {
|
|
874
|
-
e.append("defs").append("marker").attr("id", s + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", s + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
875
|
-
}, "aggregation"), Ve = /* @__PURE__ */ g((e, t, s) => {
|
|
876
|
-
e.append("defs").append("marker").attr("id", s + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", s + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
877
|
-
}, "dependency"), Qe = /* @__PURE__ */ g((e, t, s) => {
|
|
878
|
-
e.append("defs").append("marker").attr("id", s + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", s + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
|
|
879
|
-
}, "lollipop"), qe = /* @__PURE__ */ g((e, t, s) => {
|
|
880
|
-
e.append("marker").attr("id", s + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 6).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", s + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
881
|
-
}, "point"), tr = /* @__PURE__ */ g((e, t, s) => {
|
|
882
|
-
e.append("marker").attr("id", s + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", s + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
883
|
-
}, "circle"), er = /* @__PURE__ */ g((e, t, s) => {
|
|
884
|
-
e.append("marker").attr("id", s + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", s + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
885
|
-
}, "cross"), rr = /* @__PURE__ */ g((e, t, s) => {
|
|
886
|
-
e.append("defs").append("marker").attr("id", s + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
887
|
-
}, "barb"), ar = {
|
|
888
|
-
extension: Ze,
|
|
889
|
-
composition: Ge,
|
|
890
|
-
aggregation: Je,
|
|
891
|
-
dependency: Ve,
|
|
892
|
-
lollipop: Qe,
|
|
893
|
-
point: qe,
|
|
894
|
-
circle: tr,
|
|
895
|
-
cross: er,
|
|
896
|
-
barb: rr
|
|
897
|
-
}, sr = Ue, Ot, Bt, I = ((Bt = (Ot = z()) == null ? void 0 : Ot.block) == null ? void 0 : Bt.padding) ?? 8;
|
|
898
|
-
function Ut(e, t) {
|
|
899
|
-
if (e === 0 || !Number.isInteger(e))
|
|
900
|
-
throw new Error("Columns must be an integer !== 0.");
|
|
901
|
-
if (t < 0 || !Number.isInteger(t))
|
|
902
|
-
throw new Error("Position must be a non-negative integer." + t);
|
|
903
|
-
if (e < 0)
|
|
904
|
-
return { px: t, py: 0 };
|
|
905
|
-
if (e === 1)
|
|
906
|
-
return { px: 0, py: t };
|
|
907
|
-
const s = t % e, i = Math.floor(t / e);
|
|
908
|
-
return { px: s, py: i };
|
|
909
|
-
}
|
|
910
|
-
g(Ut, "calculateBlockPosition");
|
|
911
|
-
var ir = /* @__PURE__ */ g((e) => {
|
|
912
|
-
let t = 0, s = 0;
|
|
913
|
-
for (const i of e.children) {
|
|
914
|
-
const { width: l, height: a, x: r, y: n } = i.size ?? { width: 0, height: 0, x: 0, y: 0 };
|
|
915
|
-
w.debug(
|
|
916
|
-
"getMaxChildSize abc95 child:",
|
|
917
|
-
i.id,
|
|
918
|
-
"width:",
|
|
919
|
-
l,
|
|
920
|
-
"height:",
|
|
921
|
-
a,
|
|
922
|
-
"x:",
|
|
923
|
-
r,
|
|
924
|
-
"y:",
|
|
925
|
-
n,
|
|
926
|
-
i.type
|
|
927
|
-
), i.type !== "space" && (l > t && (t = l / (e.widthInColumns ?? 1)), a > s && (s = a));
|
|
928
|
-
}
|
|
929
|
-
return { width: t, height: s };
|
|
930
|
-
}, "getMaxChildSize");
|
|
931
|
-
function dt(e, t, s = 0, i = 0) {
|
|
932
|
-
var l, a, r, n, o, u, y, b, x, S, L;
|
|
933
|
-
w.debug(
|
|
934
|
-
"setBlockSizes abc95 (start)",
|
|
935
|
-
e.id,
|
|
936
|
-
(l = e == null ? void 0 : e.size) == null ? void 0 : l.x,
|
|
937
|
-
"block width =",
|
|
938
|
-
e == null ? void 0 : e.size,
|
|
939
|
-
"siblingWidth",
|
|
940
|
-
s
|
|
941
|
-
), (a = e == null ? void 0 : e.size) != null && a.width || (e.size = {
|
|
942
|
-
width: s,
|
|
943
|
-
height: i,
|
|
944
|
-
x: 0,
|
|
945
|
-
y: 0
|
|
946
|
-
});
|
|
947
|
-
let _ = 0, k = 0;
|
|
948
|
-
if (((r = e.children) == null ? void 0 : r.length) > 0) {
|
|
949
|
-
for (const d of e.children)
|
|
950
|
-
dt(d, t);
|
|
951
|
-
const N = ir(e);
|
|
952
|
-
_ = N.width, k = N.height, w.debug("setBlockSizes abc95 maxWidth of", e.id, ":s children is ", _, k);
|
|
953
|
-
for (const d of e.children)
|
|
954
|
-
d.size && (w.debug(
|
|
955
|
-
`abc95 Setting size of children of ${e.id} id=${d.id} ${_} ${k} ${JSON.stringify(d.size)}`
|
|
956
|
-
), d.size.width = _ * (d.widthInColumns ?? 1) + I * ((d.widthInColumns ?? 1) - 1), d.size.height = k, d.size.x = 0, d.size.y = 0, w.debug(
|
|
957
|
-
`abc95 updating size of ${e.id} children child:${d.id} maxWidth:${_} maxHeight:${k}`
|
|
958
|
-
));
|
|
959
|
-
for (const d of e.children)
|
|
960
|
-
dt(d, t, _, k);
|
|
961
|
-
const v = e.columns ?? -1;
|
|
962
|
-
let D = 0;
|
|
963
|
-
for (const d of e.children)
|
|
964
|
-
D += d.widthInColumns ?? 1;
|
|
965
|
-
let c = e.children.length;
|
|
966
|
-
v > 0 && v < D && (c = v);
|
|
967
|
-
const p = Math.ceil(D / c);
|
|
968
|
-
let f = c * (_ + I) + I, E = p * (k + I) + I;
|
|
969
|
-
if (f < s) {
|
|
970
|
-
w.debug(
|
|
971
|
-
`Detected to small sibling: abc95 ${e.id} siblingWidth ${s} siblingHeight ${i} width ${f}`
|
|
972
|
-
), f = s, E = i;
|
|
973
|
-
const d = (s - c * I - I) / c, m = (i - p * I - I) / p;
|
|
974
|
-
w.debug("Size indata abc88", e.id, "childWidth", d, "maxWidth", _), w.debug("Size indata abc88", e.id, "childHeight", m, "maxHeight", k), w.debug("Size indata abc88 xSize", c, "padding", I);
|
|
975
|
-
for (const h of e.children)
|
|
976
|
-
h.size && (h.size.width = d, h.size.height = m, h.size.x = 0, h.size.y = 0);
|
|
977
|
-
}
|
|
978
|
-
if (w.debug(
|
|
979
|
-
`abc95 (finale calc) ${e.id} xSize ${c} ySize ${p} columns ${v}${e.children.length} width=${Math.max(f, ((n = e.size) == null ? void 0 : n.width) || 0)}`
|
|
980
|
-
), f < (((o = e == null ? void 0 : e.size) == null ? void 0 : o.width) || 0)) {
|
|
981
|
-
f = ((u = e == null ? void 0 : e.size) == null ? void 0 : u.width) || 0;
|
|
982
|
-
const d = v > 0 ? Math.min(e.children.length, v) : e.children.length;
|
|
983
|
-
if (d > 0) {
|
|
984
|
-
const m = (f - d * I - I) / d;
|
|
985
|
-
w.debug("abc95 (growing to fit) width", e.id, f, (y = e.size) == null ? void 0 : y.width, m);
|
|
986
|
-
for (const h of e.children)
|
|
987
|
-
h.size && (h.size.width = m);
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
e.size = {
|
|
991
|
-
width: f,
|
|
992
|
-
height: E,
|
|
993
|
-
x: 0,
|
|
994
|
-
y: 0
|
|
995
|
-
};
|
|
996
|
-
}
|
|
997
|
-
w.debug(
|
|
998
|
-
"setBlockSizes abc94 (done)",
|
|
999
|
-
e.id,
|
|
1000
|
-
(b = e == null ? void 0 : e.size) == null ? void 0 : b.x,
|
|
1001
|
-
(x = e == null ? void 0 : e.size) == null ? void 0 : x.width,
|
|
1002
|
-
(S = e == null ? void 0 : e.size) == null ? void 0 : S.y,
|
|
1003
|
-
(L = e == null ? void 0 : e.size) == null ? void 0 : L.height
|
|
1004
|
-
);
|
|
1005
|
-
}
|
|
1006
|
-
g(dt, "setBlockSizes");
|
|
1007
|
-
function vt(e, t) {
|
|
1008
|
-
var s, i, l, a, r, n, o, u, y, b, x, S, L, _, k, N, v;
|
|
1009
|
-
w.debug(
|
|
1010
|
-
`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(s = e == null ? void 0 : e.size) == null ? void 0 : s.x} y: ${(i = e == null ? void 0 : e.size) == null ? void 0 : i.y} width: ${(l = e == null ? void 0 : e.size) == null ? void 0 : l.width}`
|
|
1011
|
-
);
|
|
1012
|
-
const D = e.columns ?? -1;
|
|
1013
|
-
if (w.debug("layoutBlocks columns abc95", e.id, "=>", D, e), e.children && // find max width of children
|
|
1014
|
-
e.children.length > 0) {
|
|
1015
|
-
const c = ((r = (a = e == null ? void 0 : e.children[0]) == null ? void 0 : a.size) == null ? void 0 : r.width) ?? 0, p = e.children.length * c + (e.children.length - 1) * I;
|
|
1016
|
-
w.debug("widthOfChildren 88", p, "posX");
|
|
1017
|
-
let f = 0;
|
|
1018
|
-
w.debug("abc91 block?.size?.x", e.id, (n = e == null ? void 0 : e.size) == null ? void 0 : n.x);
|
|
1019
|
-
let E = (o = e == null ? void 0 : e.size) != null && o.x ? ((u = e == null ? void 0 : e.size) == null ? void 0 : u.x) + (-((y = e == null ? void 0 : e.size) == null ? void 0 : y.width) / 2 || 0) : -I, d = 0;
|
|
1020
|
-
for (const m of e.children) {
|
|
1021
|
-
const h = e;
|
|
1022
|
-
if (!m.size)
|
|
1023
|
-
continue;
|
|
1024
|
-
const { width: O, height: M } = m.size, { px: A, py: W } = Ut(D, f);
|
|
1025
|
-
if (W != d && (d = W, E = (b = e == null ? void 0 : e.size) != null && b.x ? ((x = e == null ? void 0 : e.size) == null ? void 0 : x.x) + (-((S = e == null ? void 0 : e.size) == null ? void 0 : S.width) / 2 || 0) : -I, w.debug("New row in layout for block", e.id, " and child ", m.id, d)), w.debug(
|
|
1026
|
-
`abc89 layout blocks (child) id: ${m.id} Pos: ${f} (px, py) ${A},${W} (${(L = h == null ? void 0 : h.size) == null ? void 0 : L.x},${(_ = h == null ? void 0 : h.size) == null ? void 0 : _.y}) parent: ${h.id} width: ${O}${I}`
|
|
1027
|
-
), h.size) {
|
|
1028
|
-
const T = O / 2;
|
|
1029
|
-
m.size.x = E + I + T, w.debug(
|
|
1030
|
-
`abc91 layout blocks (calc) px, pyid:${m.id} startingPos=X${E} new startingPosX${m.size.x} ${T} padding=${I} width=${O} halfWidth=${T} => x:${m.size.x} y:${m.size.y} ${m.widthInColumns} (width * (child?.w || 1)) / 2 ${O * ((m == null ? void 0 : m.widthInColumns) ?? 1) / 2}`
|
|
1031
|
-
), E = m.size.x + T, m.size.y = h.size.y - h.size.height / 2 + W * (M + I) + M / 2 + I, w.debug(
|
|
1032
|
-
`abc88 layout blocks (calc) px, pyid:${m.id}startingPosX${E}${I}${T}=>x:${m.size.x}y:${m.size.y}${m.widthInColumns}(width * (child?.w || 1)) / 2${O * ((m == null ? void 0 : m.widthInColumns) ?? 1) / 2}`
|
|
1033
|
-
);
|
|
1034
|
-
}
|
|
1035
|
-
m.children && vt(m);
|
|
1036
|
-
let j = (m == null ? void 0 : m.widthInColumns) ?? 1;
|
|
1037
|
-
D > 0 && (j = Math.min(j, D - f % D)), f += j, w.debug("abc88 columnsPos", m, f);
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
w.debug(
|
|
1041
|
-
`layout blocks (<==layoutBlocks) ${e.id} x: ${(k = e == null ? void 0 : e.size) == null ? void 0 : k.x} y: ${(N = e == null ? void 0 : e.size) == null ? void 0 : N.y} width: ${(v = e == null ? void 0 : e.size) == null ? void 0 : v.width}`
|
|
1042
|
-
);
|
|
1043
|
-
}
|
|
1044
|
-
g(vt, "layoutBlocks");
|
|
1045
|
-
function Et(e, { minX: t, minY: s, maxX: i, maxY: l } = { minX: 0, minY: 0, maxX: 0, maxY: 0 }) {
|
|
1046
|
-
if (e.size && e.id !== "root") {
|
|
1047
|
-
const { x: a, y: r, width: n, height: o } = e.size;
|
|
1048
|
-
a - n / 2 < t && (t = a - n / 2), r - o / 2 < s && (s = r - o / 2), a + n / 2 > i && (i = a + n / 2), r + o / 2 > l && (l = r + o / 2);
|
|
1049
|
-
}
|
|
1050
|
-
if (e.children)
|
|
1051
|
-
for (const a of e.children)
|
|
1052
|
-
({ minX: t, minY: s, maxX: i, maxY: l } = Et(a, { minX: t, minY: s, maxX: i, maxY: l }));
|
|
1053
|
-
return { minX: t, minY: s, maxX: i, maxY: l };
|
|
1054
|
-
}
|
|
1055
|
-
g(Et, "findBounds");
|
|
1056
|
-
function Zt(e) {
|
|
1057
|
-
const t = e.getBlock("root");
|
|
1058
|
-
if (!t)
|
|
1059
|
-
return;
|
|
1060
|
-
dt(t, e, 0, 0), vt(t), w.debug("getBlocks", JSON.stringify(t, null, 2));
|
|
1061
|
-
const { minX: s, minY: i, maxX: l, maxY: a } = Et(t), r = a - i, n = l - s;
|
|
1062
|
-
return { x: s, y: i, width: n, height: r };
|
|
1063
|
-
}
|
|
1064
|
-
g(Zt, "layout");
|
|
1065
|
-
function wt(e, t) {
|
|
1066
|
-
t && e.attr("style", t);
|
|
1067
|
-
}
|
|
1068
|
-
g(wt, "applyStyle");
|
|
1069
|
-
function Gt(e, t) {
|
|
1070
|
-
const s = B(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), i = s.append("xhtml:div"), l = e.label, a = e.isNode ? "nodeLabel" : "edgeLabel", r = i.append("span");
|
|
1071
|
-
return r.html(xt(l, t)), wt(r, e.labelStyle), r.attr("class", a), wt(i, e.labelStyle), i.style("display", "inline-block"), i.style("white-space", "nowrap"), i.attr("xmlns", "http://www.w3.org/1999/xhtml"), s.node();
|
|
1072
|
-
}
|
|
1073
|
-
g(Gt, "addHtmlLabel");
|
|
1074
|
-
var nr = /* @__PURE__ */ g(async (e, t, s, i) => {
|
|
1075
|
-
let l = e || "";
|
|
1076
|
-
typeof l == "object" && (l = l[0]);
|
|
1077
|
-
const a = z();
|
|
1078
|
-
if (G(a.flowchart.htmlLabels)) {
|
|
1079
|
-
l = l.replace(/\\n|\n/g, "<br />"), w.debug("vertexText" + l);
|
|
1080
|
-
const r = await we(bt(l)), n = {
|
|
1081
|
-
isNode: i,
|
|
1082
|
-
label: r,
|
|
1083
|
-
labelStyle: t.replace("fill:", "color:")
|
|
1084
|
-
};
|
|
1085
|
-
return Gt(n, a);
|
|
1086
|
-
} else {
|
|
1087
|
-
const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
1088
|
-
r.setAttribute("style", t.replace("color:", "fill:"));
|
|
1089
|
-
let n = [];
|
|
1090
|
-
typeof l == "string" ? n = l.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(l) ? n = l : n = [];
|
|
1091
|
-
for (const o of n) {
|
|
1092
|
-
const u = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
1093
|
-
u.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), u.setAttribute("dy", "1em"), u.setAttribute("x", "0"), s ? u.setAttribute("class", "title-row") : u.setAttribute("class", "row"), u.textContent = o.trim(), r.appendChild(u);
|
|
1094
|
-
}
|
|
1095
|
-
return r;
|
|
1096
|
-
}
|
|
1097
|
-
}, "createLabel"), H = nr, lr = /* @__PURE__ */ g((e, t, s, i, l) => {
|
|
1098
|
-
t.arrowTypeStart && zt(e, "start", t.arrowTypeStart, s, i, l), t.arrowTypeEnd && zt(e, "end", t.arrowTypeEnd, s, i, l);
|
|
1099
|
-
}, "addEdgeMarkers"), or = {
|
|
1100
|
-
arrow_cross: "cross",
|
|
1101
|
-
arrow_point: "point",
|
|
1102
|
-
arrow_barb: "barb",
|
|
1103
|
-
arrow_circle: "circle",
|
|
1104
|
-
aggregation: "aggregation",
|
|
1105
|
-
extension: "extension",
|
|
1106
|
-
composition: "composition",
|
|
1107
|
-
dependency: "dependency",
|
|
1108
|
-
lollipop: "lollipop"
|
|
1109
|
-
}, zt = /* @__PURE__ */ g((e, t, s, i, l, a) => {
|
|
1110
|
-
const r = or[s];
|
|
1111
|
-
if (!r) {
|
|
1112
|
-
w.warn(`Unknown arrow type: ${s}`);
|
|
1113
|
-
return;
|
|
1114
|
-
}
|
|
1115
|
-
const n = t === "start" ? "Start" : "End";
|
|
1116
|
-
e.attr(`marker-${t}`, `url(${i}#${l}_${a}-${r}${n})`);
|
|
1117
|
-
}, "addEdgeMarker"), Lt = {}, P = {}, dr = /* @__PURE__ */ g(async (e, t) => {
|
|
1118
|
-
const s = z(), i = G(s.flowchart.htmlLabels), l = t.labelType === "markdown" ? Wt(
|
|
1119
|
-
e,
|
|
1120
|
-
t.label,
|
|
1121
|
-
{
|
|
1122
|
-
style: t.labelStyle,
|
|
1123
|
-
useHtmlLabels: i,
|
|
1124
|
-
addSvgBackground: !0
|
|
1125
|
-
},
|
|
1126
|
-
s
|
|
1127
|
-
) : await H(t.label, t.labelStyle), a = e.insert("g").attr("class", "edgeLabel"), r = a.insert("g").attr("class", "label");
|
|
1128
|
-
r.node().appendChild(l);
|
|
1129
|
-
let n = l.getBBox();
|
|
1130
|
-
if (i) {
|
|
1131
|
-
const u = l.children[0], y = B(l);
|
|
1132
|
-
n = u.getBoundingClientRect(), y.attr("width", n.width), y.attr("height", n.height);
|
|
1133
|
-
}
|
|
1134
|
-
r.attr("transform", "translate(" + -n.width / 2 + ", " + -n.height / 2 + ")"), Lt[t.id] = a, t.width = n.width, t.height = n.height;
|
|
1135
|
-
let o;
|
|
1136
|
-
if (t.startLabelLeft) {
|
|
1137
|
-
const u = await H(t.startLabelLeft, t.labelStyle), y = e.insert("g").attr("class", "edgeTerminals"), b = y.insert("g").attr("class", "inner");
|
|
1138
|
-
o = b.node().appendChild(u);
|
|
1139
|
-
const x = u.getBBox();
|
|
1140
|
-
b.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), P[t.id] || (P[t.id] = {}), P[t.id].startLeft = y, et(o, t.startLabelLeft);
|
|
1141
|
-
}
|
|
1142
|
-
if (t.startLabelRight) {
|
|
1143
|
-
const u = await H(t.startLabelRight, t.labelStyle), y = e.insert("g").attr("class", "edgeTerminals"), b = y.insert("g").attr("class", "inner");
|
|
1144
|
-
o = y.node().appendChild(u), b.node().appendChild(u);
|
|
1145
|
-
const x = u.getBBox();
|
|
1146
|
-
b.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), P[t.id] || (P[t.id] = {}), P[t.id].startRight = y, et(o, t.startLabelRight);
|
|
1147
|
-
}
|
|
1148
|
-
if (t.endLabelLeft) {
|
|
1149
|
-
const u = await H(t.endLabelLeft, t.labelStyle), y = e.insert("g").attr("class", "edgeTerminals"), b = y.insert("g").attr("class", "inner");
|
|
1150
|
-
o = b.node().appendChild(u);
|
|
1151
|
-
const x = u.getBBox();
|
|
1152
|
-
b.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), y.node().appendChild(u), P[t.id] || (P[t.id] = {}), P[t.id].endLeft = y, et(o, t.endLabelLeft);
|
|
1153
|
-
}
|
|
1154
|
-
if (t.endLabelRight) {
|
|
1155
|
-
const u = await H(t.endLabelRight, t.labelStyle), y = e.insert("g").attr("class", "edgeTerminals"), b = y.insert("g").attr("class", "inner");
|
|
1156
|
-
o = b.node().appendChild(u);
|
|
1157
|
-
const x = u.getBBox();
|
|
1158
|
-
b.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), y.node().appendChild(u), P[t.id] || (P[t.id] = {}), P[t.id].endRight = y, et(o, t.endLabelRight);
|
|
1159
|
-
}
|
|
1160
|
-
return l;
|
|
1161
|
-
}, "insertEdgeLabel");
|
|
1162
|
-
function et(e, t) {
|
|
1163
|
-
z().flowchart.htmlLabels && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
|
|
1164
|
-
}
|
|
1165
|
-
g(et, "setTerminalWidth");
|
|
1166
|
-
var cr = /* @__PURE__ */ g((e, t) => {
|
|
1167
|
-
w.debug("Moving label abc88 ", e.id, e.label, Lt[e.id], t);
|
|
1168
|
-
let s = t.updatedPath ? t.updatedPath : t.originalPath;
|
|
1169
|
-
const i = z(), { subGraphTitleTotalMargin: l } = fe(i);
|
|
1170
|
-
if (e.label) {
|
|
1171
|
-
const a = Lt[e.id];
|
|
1172
|
-
let r = e.x, n = e.y;
|
|
1173
|
-
if (s) {
|
|
1174
|
-
const o = tt.calcLabelPosition(s);
|
|
1175
|
-
w.debug(
|
|
1176
|
-
"Moving label " + e.label + " from (",
|
|
1177
|
-
r,
|
|
1178
|
-
",",
|
|
1179
|
-
n,
|
|
1180
|
-
") to (",
|
|
1181
|
-
o.x,
|
|
1182
|
-
",",
|
|
1183
|
-
o.y,
|
|
1184
|
-
") abc88"
|
|
1185
|
-
), t.updatedPath && (r = o.x, n = o.y);
|
|
1186
|
-
}
|
|
1187
|
-
a.attr("transform", `translate(${r}, ${n + l / 2})`);
|
|
1188
|
-
}
|
|
1189
|
-
if (e.startLabelLeft) {
|
|
1190
|
-
const a = P[e.id].startLeft;
|
|
1191
|
-
let r = e.x, n = e.y;
|
|
1192
|
-
if (s) {
|
|
1193
|
-
const o = tt.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", s);
|
|
1194
|
-
r = o.x, n = o.y;
|
|
1195
|
-
}
|
|
1196
|
-
a.attr("transform", `translate(${r}, ${n})`);
|
|
1197
|
-
}
|
|
1198
|
-
if (e.startLabelRight) {
|
|
1199
|
-
const a = P[e.id].startRight;
|
|
1200
|
-
let r = e.x, n = e.y;
|
|
1201
|
-
if (s) {
|
|
1202
|
-
const o = tt.calcTerminalLabelPosition(
|
|
1203
|
-
e.arrowTypeStart ? 10 : 0,
|
|
1204
|
-
"start_right",
|
|
1205
|
-
s
|
|
1206
|
-
);
|
|
1207
|
-
r = o.x, n = o.y;
|
|
1208
|
-
}
|
|
1209
|
-
a.attr("transform", `translate(${r}, ${n})`);
|
|
1210
|
-
}
|
|
1211
|
-
if (e.endLabelLeft) {
|
|
1212
|
-
const a = P[e.id].endLeft;
|
|
1213
|
-
let r = e.x, n = e.y;
|
|
1214
|
-
if (s) {
|
|
1215
|
-
const o = tt.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", s);
|
|
1216
|
-
r = o.x, n = o.y;
|
|
1217
|
-
}
|
|
1218
|
-
a.attr("transform", `translate(${r}, ${n})`);
|
|
1219
|
-
}
|
|
1220
|
-
if (e.endLabelRight) {
|
|
1221
|
-
const a = P[e.id].endRight;
|
|
1222
|
-
let r = e.x, n = e.y;
|
|
1223
|
-
if (s) {
|
|
1224
|
-
const o = tt.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", s);
|
|
1225
|
-
r = o.x, n = o.y;
|
|
1226
|
-
}
|
|
1227
|
-
a.attr("transform", `translate(${r}, ${n})`);
|
|
1228
|
-
}
|
|
1229
|
-
}, "positionEdgeLabel"), hr = /* @__PURE__ */ g((e, t) => {
|
|
1230
|
-
const s = e.x, i = e.y, l = Math.abs(t.x - s), a = Math.abs(t.y - i), r = e.width / 2, n = e.height / 2;
|
|
1231
|
-
return l >= r || a >= n;
|
|
1232
|
-
}, "outsideNode"), ur = /* @__PURE__ */ g((e, t, s) => {
|
|
1233
|
-
w.debug(`intersection calc abc89:
|
|
1234
|
-
outsidePoint: ${JSON.stringify(t)}
|
|
1235
|
-
insidePoint : ${JSON.stringify(s)}
|
|
1236
|
-
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
|
|
1237
|
-
const i = e.x, l = e.y, a = Math.abs(i - s.x), r = e.width / 2;
|
|
1238
|
-
let n = s.x < t.x ? r - a : r + a;
|
|
1239
|
-
const o = e.height / 2, u = Math.abs(t.y - s.y), y = Math.abs(t.x - s.x);
|
|
1240
|
-
if (Math.abs(l - t.y) * r > Math.abs(i - t.x) * o) {
|
|
1241
|
-
let b = s.y < t.y ? t.y - o - l : l - o - t.y;
|
|
1242
|
-
n = y * b / u;
|
|
1243
|
-
const x = {
|
|
1244
|
-
x: s.x < t.x ? s.x + n : s.x - y + n,
|
|
1245
|
-
y: s.y < t.y ? s.y + u - b : s.y - u + b
|
|
1246
|
-
};
|
|
1247
|
-
return n === 0 && (x.x = t.x, x.y = t.y), y === 0 && (x.x = t.x), u === 0 && (x.y = t.y), w.debug(`abc89 topp/bott calc, Q ${u}, q ${b}, R ${y}, r ${n}`, x), x;
|
|
1248
|
-
} else {
|
|
1249
|
-
s.x < t.x ? n = t.x - r - i : n = i - r - t.x;
|
|
1250
|
-
let b = u * n / y, x = s.x < t.x ? s.x + y - n : s.x - y + n, S = s.y < t.y ? s.y + b : s.y - b;
|
|
1251
|
-
return w.debug(`sides calc abc89, Q ${u}, q ${b}, R ${y}, r ${n}`, { _x: x, _y: S }), n === 0 && (x = t.x, S = t.y), y === 0 && (x = t.x), u === 0 && (S = t.y), { x, y: S };
|
|
1252
|
-
}
|
|
1253
|
-
}, "intersection"), At = /* @__PURE__ */ g((e, t) => {
|
|
1254
|
-
w.debug("abc88 cutPathAtIntersect", e, t);
|
|
1255
|
-
let s = [], i = e[0], l = !1;
|
|
1256
|
-
return e.forEach((a) => {
|
|
1257
|
-
if (!hr(t, a) && !l) {
|
|
1258
|
-
const r = ur(t, i, a);
|
|
1259
|
-
let n = !1;
|
|
1260
|
-
s.forEach((o) => {
|
|
1261
|
-
n = n || o.x === r.x && o.y === r.y;
|
|
1262
|
-
}), s.some((o) => o.x === r.x && o.y === r.y) || s.push(r), l = !0;
|
|
1263
|
-
} else
|
|
1264
|
-
i = a, l || s.push(a);
|
|
1265
|
-
}), s;
|
|
1266
|
-
}, "cutPathAtIntersect"), gr = /* @__PURE__ */ g(function(e, t, s, i, l, a, r) {
|
|
1267
|
-
let n = s.points;
|
|
1268
|
-
w.debug("abc88 InsertEdge: edge=", s, "e=", t);
|
|
1269
|
-
let o = !1;
|
|
1270
|
-
const u = a.node(t.v);
|
|
1271
|
-
var y = a.node(t.w);
|
|
1272
|
-
y != null && y.intersect && u != null && u.intersect && (n = n.slice(1, s.points.length - 1), n.unshift(u.intersect(n[0])), n.push(y.intersect(n[n.length - 1]))), s.toCluster && (w.debug("to cluster abc88", i[s.toCluster]), n = At(s.points, i[s.toCluster].node), o = !0), s.fromCluster && (w.debug("from cluster abc88", i[s.fromCluster]), n = At(n.reverse(), i[s.fromCluster].node).reverse(), o = !0);
|
|
1273
|
-
const b = n.filter((c) => !Number.isNaN(c.y));
|
|
1274
|
-
let x = be;
|
|
1275
|
-
s.curve && (l === "graph" || l === "flowchart") && (x = s.curve);
|
|
1276
|
-
const { x: S, y: L } = ye(s), _ = pe().x(S).y(L).curve(x);
|
|
1277
|
-
let k;
|
|
1278
|
-
switch (s.thickness) {
|
|
1279
|
-
case "normal":
|
|
1280
|
-
k = "edge-thickness-normal";
|
|
1281
|
-
break;
|
|
1282
|
-
case "thick":
|
|
1283
|
-
k = "edge-thickness-thick";
|
|
1284
|
-
break;
|
|
1285
|
-
case "invisible":
|
|
1286
|
-
k = "edge-thickness-thick";
|
|
1287
|
-
break;
|
|
1288
|
-
default:
|
|
1289
|
-
k = "";
|
|
1290
|
-
}
|
|
1291
|
-
switch (s.pattern) {
|
|
1292
|
-
case "solid":
|
|
1293
|
-
k += " edge-pattern-solid";
|
|
1294
|
-
break;
|
|
1295
|
-
case "dotted":
|
|
1296
|
-
k += " edge-pattern-dotted";
|
|
1297
|
-
break;
|
|
1298
|
-
case "dashed":
|
|
1299
|
-
k += " edge-pattern-dashed";
|
|
1300
|
-
break;
|
|
1301
|
-
}
|
|
1302
|
-
const N = e.append("path").attr("d", _(b)).attr("id", s.id).attr("class", " " + k + (s.classes ? " " + s.classes : "")).attr("style", s.style);
|
|
1303
|
-
let v = "";
|
|
1304
|
-
(z().flowchart.arrowMarkerAbsolute || z().state.arrowMarkerAbsolute) && (v = xe(!0)), lr(N, s, v, r, l);
|
|
1305
|
-
let D = {};
|
|
1306
|
-
return o && (D.updatedPath = n), D.originalPath = s.points, D;
|
|
1307
|
-
}, "insertEdge"), yr = /* @__PURE__ */ g((e) => {
|
|
1308
|
-
const t = /* @__PURE__ */ new Set();
|
|
1309
|
-
for (const s of e)
|
|
1310
|
-
switch (s) {
|
|
1311
|
-
case "x":
|
|
1312
|
-
t.add("right"), t.add("left");
|
|
1313
|
-
break;
|
|
1314
|
-
case "y":
|
|
1315
|
-
t.add("up"), t.add("down");
|
|
1316
|
-
break;
|
|
1317
|
-
default:
|
|
1318
|
-
t.add(s);
|
|
1319
|
-
break;
|
|
1320
|
-
}
|
|
1321
|
-
return t;
|
|
1322
|
-
}, "expandAndDeduplicateDirections"), pr = /* @__PURE__ */ g((e, t, s) => {
|
|
1323
|
-
const i = yr(e), l = 2, a = t.height + 2 * s.padding, r = a / l, n = t.width + 2 * r + s.padding, o = s.padding / 2;
|
|
1324
|
-
return i.has("right") && i.has("left") && i.has("up") && i.has("down") ? [
|
|
1325
|
-
// Bottom
|
|
1326
|
-
{ x: 0, y: 0 },
|
|
1327
|
-
{ x: r, y: 0 },
|
|
1328
|
-
{ x: n / 2, y: 2 * o },
|
|
1329
|
-
{ x: n - r, y: 0 },
|
|
1330
|
-
{ x: n, y: 0 },
|
|
1331
|
-
// Right
|
|
1332
|
-
{ x: n, y: -a / 3 },
|
|
1333
|
-
{ x: n + 2 * o, y: -a / 2 },
|
|
1334
|
-
{ x: n, y: -2 * a / 3 },
|
|
1335
|
-
{ x: n, y: -a },
|
|
1336
|
-
// Top
|
|
1337
|
-
{ x: n - r, y: -a },
|
|
1338
|
-
{ x: n / 2, y: -a - 2 * o },
|
|
1339
|
-
{ x: r, y: -a },
|
|
1340
|
-
// Left
|
|
1341
|
-
{ x: 0, y: -a },
|
|
1342
|
-
{ x: 0, y: -2 * a / 3 },
|
|
1343
|
-
{ x: -2 * o, y: -a / 2 },
|
|
1344
|
-
{ x: 0, y: -a / 3 }
|
|
1345
|
-
] : i.has("right") && i.has("left") && i.has("up") ? [
|
|
1346
|
-
{ x: r, y: 0 },
|
|
1347
|
-
{ x: n - r, y: 0 },
|
|
1348
|
-
{ x: n, y: -a / 2 },
|
|
1349
|
-
{ x: n - r, y: -a },
|
|
1350
|
-
{ x: r, y: -a },
|
|
1351
|
-
{ x: 0, y: -a / 2 }
|
|
1352
|
-
] : i.has("right") && i.has("left") && i.has("down") ? [
|
|
1353
|
-
{ x: 0, y: 0 },
|
|
1354
|
-
{ x: r, y: -a },
|
|
1355
|
-
{ x: n - r, y: -a },
|
|
1356
|
-
{ x: n, y: 0 }
|
|
1357
|
-
] : i.has("right") && i.has("up") && i.has("down") ? [
|
|
1358
|
-
{ x: 0, y: 0 },
|
|
1359
|
-
{ x: n, y: -r },
|
|
1360
|
-
{ x: n, y: -a + r },
|
|
1361
|
-
{ x: 0, y: -a }
|
|
1362
|
-
] : i.has("left") && i.has("up") && i.has("down") ? [
|
|
1363
|
-
{ x: n, y: 0 },
|
|
1364
|
-
{ x: 0, y: -r },
|
|
1365
|
-
{ x: 0, y: -a + r },
|
|
1366
|
-
{ x: n, y: -a }
|
|
1367
|
-
] : i.has("right") && i.has("left") ? [
|
|
1368
|
-
{ x: r, y: 0 },
|
|
1369
|
-
{ x: r, y: -o },
|
|
1370
|
-
{ x: n - r, y: -o },
|
|
1371
|
-
{ x: n - r, y: 0 },
|
|
1372
|
-
{ x: n, y: -a / 2 },
|
|
1373
|
-
{ x: n - r, y: -a },
|
|
1374
|
-
{ x: n - r, y: -a + o },
|
|
1375
|
-
{ x: r, y: -a + o },
|
|
1376
|
-
{ x: r, y: -a },
|
|
1377
|
-
{ x: 0, y: -a / 2 }
|
|
1378
|
-
] : i.has("up") && i.has("down") ? [
|
|
1379
|
-
// Bottom center
|
|
1380
|
-
{ x: n / 2, y: 0 },
|
|
1381
|
-
// Left pont of bottom arrow
|
|
1382
|
-
{ x: 0, y: -o },
|
|
1383
|
-
{ x: r, y: -o },
|
|
1384
|
-
// Left top over vertical section
|
|
1385
|
-
{ x: r, y: -a + o },
|
|
1386
|
-
{ x: 0, y: -a + o },
|
|
1387
|
-
// Top of arrow
|
|
1388
|
-
{ x: n / 2, y: -a },
|
|
1389
|
-
{ x: n, y: -a + o },
|
|
1390
|
-
// Top of right vertical bar
|
|
1391
|
-
{ x: n - r, y: -a + o },
|
|
1392
|
-
{ x: n - r, y: -o },
|
|
1393
|
-
{ x: n, y: -o }
|
|
1394
|
-
] : i.has("right") && i.has("up") ? [
|
|
1395
|
-
{ x: 0, y: 0 },
|
|
1396
|
-
{ x: n, y: -r },
|
|
1397
|
-
{ x: 0, y: -a }
|
|
1398
|
-
] : i.has("right") && i.has("down") ? [
|
|
1399
|
-
{ x: 0, y: 0 },
|
|
1400
|
-
{ x: n, y: 0 },
|
|
1401
|
-
{ x: 0, y: -a }
|
|
1402
|
-
] : i.has("left") && i.has("up") ? [
|
|
1403
|
-
{ x: n, y: 0 },
|
|
1404
|
-
{ x: 0, y: -r },
|
|
1405
|
-
{ x: n, y: -a }
|
|
1406
|
-
] : i.has("left") && i.has("down") ? [
|
|
1407
|
-
{ x: n, y: 0 },
|
|
1408
|
-
{ x: 0, y: 0 },
|
|
1409
|
-
{ x: n, y: -a }
|
|
1410
|
-
] : i.has("right") ? [
|
|
1411
|
-
{ x: r, y: -o },
|
|
1412
|
-
{ x: r, y: -o },
|
|
1413
|
-
{ x: n - r, y: -o },
|
|
1414
|
-
{ x: n - r, y: 0 },
|
|
1415
|
-
{ x: n, y: -a / 2 },
|
|
1416
|
-
{ x: n - r, y: -a },
|
|
1417
|
-
{ x: n - r, y: -a + o },
|
|
1418
|
-
// top left corner of arrow
|
|
1419
|
-
{ x: r, y: -a + o },
|
|
1420
|
-
{ x: r, y: -a + o }
|
|
1421
|
-
] : i.has("left") ? [
|
|
1422
|
-
{ x: r, y: 0 },
|
|
1423
|
-
{ x: r, y: -o },
|
|
1424
|
-
// Two points, the right corners
|
|
1425
|
-
{ x: n - r, y: -o },
|
|
1426
|
-
{ x: n - r, y: -a + o },
|
|
1427
|
-
{ x: r, y: -a + o },
|
|
1428
|
-
{ x: r, y: -a },
|
|
1429
|
-
{ x: 0, y: -a / 2 }
|
|
1430
|
-
] : i.has("up") ? [
|
|
1431
|
-
// Bottom center
|
|
1432
|
-
{ x: r, y: -o },
|
|
1433
|
-
// Left top over vertical section
|
|
1434
|
-
{ x: r, y: -a + o },
|
|
1435
|
-
{ x: 0, y: -a + o },
|
|
1436
|
-
// Top of arrow
|
|
1437
|
-
{ x: n / 2, y: -a },
|
|
1438
|
-
{ x: n, y: -a + o },
|
|
1439
|
-
// Top of right vertical bar
|
|
1440
|
-
{ x: n - r, y: -a + o },
|
|
1441
|
-
{ x: n - r, y: -o }
|
|
1442
|
-
] : i.has("down") ? [
|
|
1443
|
-
// Bottom center
|
|
1444
|
-
{ x: n / 2, y: 0 },
|
|
1445
|
-
// Left pont of bottom arrow
|
|
1446
|
-
{ x: 0, y: -o },
|
|
1447
|
-
{ x: r, y: -o },
|
|
1448
|
-
// Left top over vertical section
|
|
1449
|
-
{ x: r, y: -a + o },
|
|
1450
|
-
{ x: n - r, y: -a + o },
|
|
1451
|
-
{ x: n - r, y: -o },
|
|
1452
|
-
{ x: n, y: -o }
|
|
1453
|
-
] : [{ x: 0, y: 0 }];
|
|
1454
|
-
}, "getArrowPoints");
|
|
1455
|
-
function Jt(e, t) {
|
|
1456
|
-
return e.intersect(t);
|
|
1457
|
-
}
|
|
1458
|
-
g(Jt, "intersectNode");
|
|
1459
|
-
var br = Jt;
|
|
1460
|
-
function Vt(e, t, s, i) {
|
|
1461
|
-
var l = e.x, a = e.y, r = l - i.x, n = a - i.y, o = Math.sqrt(t * t * n * n + s * s * r * r), u = Math.abs(t * s * r / o);
|
|
1462
|
-
i.x < l && (u = -u);
|
|
1463
|
-
var y = Math.abs(t * s * n / o);
|
|
1464
|
-
return i.y < a && (y = -y), { x: l + u, y: a + y };
|
|
1465
|
-
}
|
|
1466
|
-
g(Vt, "intersectEllipse");
|
|
1467
|
-
var Qt = Vt;
|
|
1468
|
-
function qt(e, t, s) {
|
|
1469
|
-
return Qt(e, t, t, s);
|
|
1470
|
-
}
|
|
1471
|
-
g(qt, "intersectCircle");
|
|
1472
|
-
var xr = qt;
|
|
1473
|
-
function te(e, t, s, i) {
|
|
1474
|
-
var l, a, r, n, o, u, y, b, x, S, L, _, k, N, v;
|
|
1475
|
-
if (l = t.y - e.y, r = e.x - t.x, o = t.x * e.y - e.x * t.y, x = l * s.x + r * s.y + o, S = l * i.x + r * i.y + o, !(x !== 0 && S !== 0 && St(x, S)) && (a = i.y - s.y, n = s.x - i.x, u = i.x * s.y - s.x * i.y, y = a * e.x + n * e.y + u, b = a * t.x + n * t.y + u, !(y !== 0 && b !== 0 && St(y, b)) && (L = l * n - a * r, L !== 0)))
|
|
1476
|
-
return _ = Math.abs(L / 2), k = r * u - n * o, N = k < 0 ? (k - _) / L : (k + _) / L, k = a * o - l * u, v = k < 0 ? (k - _) / L : (k + _) / L, { x: N, y: v };
|
|
1477
|
-
}
|
|
1478
|
-
g(te, "intersectLine");
|
|
1479
|
-
function St(e, t) {
|
|
1480
|
-
return e * t > 0;
|
|
1481
|
-
}
|
|
1482
|
-
g(St, "sameSign");
|
|
1483
|
-
var fr = te, mr = ee;
|
|
1484
|
-
function ee(e, t, s) {
|
|
1485
|
-
var i = e.x, l = e.y, a = [], r = Number.POSITIVE_INFINITY, n = Number.POSITIVE_INFINITY;
|
|
1486
|
-
typeof t.forEach == "function" ? t.forEach(function(L) {
|
|
1487
|
-
r = Math.min(r, L.x), n = Math.min(n, L.y);
|
|
1488
|
-
}) : (r = Math.min(r, t.x), n = Math.min(n, t.y));
|
|
1489
|
-
for (var o = i - e.width / 2 - r, u = l - e.height / 2 - n, y = 0; y < t.length; y++) {
|
|
1490
|
-
var b = t[y], x = t[y < t.length - 1 ? y + 1 : 0], S = fr(
|
|
1491
|
-
e,
|
|
1492
|
-
s,
|
|
1493
|
-
{ x: o + b.x, y: u + b.y },
|
|
1494
|
-
{ x: o + x.x, y: u + x.y }
|
|
1495
|
-
);
|
|
1496
|
-
S && a.push(S);
|
|
1497
|
-
}
|
|
1498
|
-
return a.length ? (a.length > 1 && a.sort(function(L, _) {
|
|
1499
|
-
var k = L.x - s.x, N = L.y - s.y, v = Math.sqrt(k * k + N * N), D = _.x - s.x, c = _.y - s.y, p = Math.sqrt(D * D + c * c);
|
|
1500
|
-
return v < p ? -1 : v === p ? 0 : 1;
|
|
1501
|
-
}), a[0]) : e;
|
|
1502
|
-
}
|
|
1503
|
-
g(ee, "intersectPolygon");
|
|
1504
|
-
var wr = /* @__PURE__ */ g((e, t) => {
|
|
1505
|
-
var s = e.x, i = e.y, l = t.x - s, a = t.y - i, r = e.width / 2, n = e.height / 2, o, u;
|
|
1506
|
-
return Math.abs(a) * r > Math.abs(l) * n ? (a < 0 && (n = -n), o = a === 0 ? 0 : n * l / a, u = n) : (l < 0 && (r = -r), o = r, u = l === 0 ? 0 : r * a / l), { x: s + o, y: i + u };
|
|
1507
|
-
}, "intersectRect"), Lr = wr, $ = {
|
|
1508
|
-
node: br,
|
|
1509
|
-
circle: xr,
|
|
1510
|
-
ellipse: Qt,
|
|
1511
|
-
polygon: mr,
|
|
1512
|
-
rect: Lr
|
|
1513
|
-
}, R = /* @__PURE__ */ g(async (e, t, s, i) => {
|
|
1514
|
-
const l = z();
|
|
1515
|
-
let a;
|
|
1516
|
-
const r = t.useHtmlLabels || G(l.flowchart.htmlLabels);
|
|
1517
|
-
s ? a = s : a = "node default";
|
|
1518
|
-
const n = e.insert("g").attr("class", a).attr("id", t.domId || t.id), o = n.insert("g").attr("class", "label").attr("style", t.labelStyle);
|
|
1519
|
-
let u;
|
|
1520
|
-
t.labelText === void 0 ? u = "" : u = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
|
|
1521
|
-
const y = o.node();
|
|
1522
|
-
let b;
|
|
1523
|
-
t.labelType === "markdown" ? b = Wt(
|
|
1524
|
-
o,
|
|
1525
|
-
xt(bt(u), l),
|
|
1526
|
-
{
|
|
1527
|
-
useHtmlLabels: r,
|
|
1528
|
-
width: t.width || l.flowchart.wrappingWidth,
|
|
1529
|
-
classes: "markdown-node-label"
|
|
1530
|
-
},
|
|
1531
|
-
l
|
|
1532
|
-
) : b = y.appendChild(
|
|
1533
|
-
await H(
|
|
1534
|
-
xt(bt(u), l),
|
|
1535
|
-
t.labelStyle,
|
|
1536
|
-
!1,
|
|
1537
|
-
i
|
|
1538
|
-
)
|
|
1539
|
-
);
|
|
1540
|
-
let x = b.getBBox();
|
|
1541
|
-
const S = t.padding / 2;
|
|
1542
|
-
if (G(l.flowchart.htmlLabels)) {
|
|
1543
|
-
const L = b.children[0], _ = B(b), k = L.getElementsByTagName("img");
|
|
1544
|
-
if (k) {
|
|
1545
|
-
const N = u.replace(/<img[^>]*>/g, "").trim() === "";
|
|
1546
|
-
await Promise.all(
|
|
1547
|
-
[...k].map(
|
|
1548
|
-
(v) => new Promise((D) => {
|
|
1549
|
-
function c() {
|
|
1550
|
-
if (v.style.display = "flex", v.style.flexDirection = "column", N) {
|
|
1551
|
-
const p = l.fontSize ? l.fontSize : window.getComputedStyle(document.body).fontSize, f = parseInt(p, 10) * 5 + "px";
|
|
1552
|
-
v.style.minWidth = f, v.style.maxWidth = f;
|
|
1553
|
-
} else
|
|
1554
|
-
v.style.width = "100%";
|
|
1555
|
-
D(v);
|
|
1556
|
-
}
|
|
1557
|
-
g(c, "setupImage"), setTimeout(() => {
|
|
1558
|
-
v.complete && c();
|
|
1559
|
-
}), v.addEventListener("error", c), v.addEventListener("load", c);
|
|
1560
|
-
})
|
|
1561
|
-
)
|
|
1562
|
-
);
|
|
1563
|
-
}
|
|
1564
|
-
x = L.getBoundingClientRect(), _.attr("width", x.width), _.attr("height", x.height);
|
|
1565
|
-
}
|
|
1566
|
-
return r ? o.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")") : o.attr("transform", "translate(0, " + -x.height / 2 + ")"), t.centerLabel && o.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), o.insert("rect", ":first-child"), { shapeSvg: n, bbox: x, halfPadding: S, label: o };
|
|
1567
|
-
}, "labelHelper"), C = /* @__PURE__ */ g((e, t) => {
|
|
1568
|
-
const s = t.node().getBBox();
|
|
1569
|
-
e.width = s.width, e.height = s.height;
|
|
1570
|
-
}, "updateNodeBounds");
|
|
1571
|
-
function Z(e, t, s, i) {
|
|
1572
|
-
return e.insert("polygon", ":first-child").attr(
|
|
1573
|
-
"points",
|
|
1574
|
-
i.map(function(l) {
|
|
1575
|
-
return l.x + "," + l.y;
|
|
1576
|
-
}).join(" ")
|
|
1577
|
-
).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + s / 2 + ")");
|
|
1578
|
-
}
|
|
1579
|
-
g(Z, "insertPolygonShape");
|
|
1580
|
-
var Sr = /* @__PURE__ */ g(async (e, t) => {
|
|
1581
|
-
t.useHtmlLabels || z().flowchart.htmlLabels || (t.centerLabel = !0);
|
|
1582
|
-
const { shapeSvg: s, bbox: i, halfPadding: l } = await R(
|
|
1583
|
-
e,
|
|
1584
|
-
t,
|
|
1585
|
-
"node " + t.classes,
|
|
1586
|
-
!0
|
|
1587
|
-
);
|
|
1588
|
-
w.info("Classes = ", t.classes);
|
|
1589
|
-
const a = s.insert("rect", ":first-child");
|
|
1590
|
-
return a.attr("rx", t.rx).attr("ry", t.ry).attr("x", -i.width / 2 - l).attr("y", -i.height / 2 - l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), C(t, a), t.intersect = function(r) {
|
|
1591
|
-
return $.rect(t, r);
|
|
1592
|
-
}, s;
|
|
1593
|
-
}, "note"), kr = Sr, Rt = /* @__PURE__ */ g((e) => e ? " " + e : "", "formatClass"), Y = /* @__PURE__ */ g((e, t) => `${t || "node default"}${Rt(e.classes)} ${Rt(
|
|
1594
|
-
e.class
|
|
1595
|
-
)}`, "getClassesFromNode"), Mt = /* @__PURE__ */ g(async (e, t) => {
|
|
1596
|
-
const { shapeSvg: s, bbox: i } = await R(
|
|
1597
|
-
e,
|
|
1598
|
-
t,
|
|
1599
|
-
Y(t, void 0),
|
|
1600
|
-
!0
|
|
1601
|
-
), l = i.width + t.padding, a = i.height + t.padding, r = l + a, n = [
|
|
1602
|
-
{ x: r / 2, y: 0 },
|
|
1603
|
-
{ x: r, y: -r / 2 },
|
|
1604
|
-
{ x: r / 2, y: -r },
|
|
1605
|
-
{ x: 0, y: -r / 2 }
|
|
1606
|
-
];
|
|
1607
|
-
w.info("Question main (Circle)");
|
|
1608
|
-
const o = Z(s, r, r, n);
|
|
1609
|
-
return o.attr("style", t.style), C(t, o), t.intersect = function(u) {
|
|
1610
|
-
return w.warn("Intersect called"), $.polygon(t, n, u);
|
|
1611
|
-
}, s;
|
|
1612
|
-
}, "question"), _r = /* @__PURE__ */ g((e, t) => {
|
|
1613
|
-
const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = 28, l = [
|
|
1614
|
-
{ x: 0, y: i / 2 },
|
|
1615
|
-
{ x: i / 2, y: 0 },
|
|
1616
|
-
{ x: 0, y: -i / 2 },
|
|
1617
|
-
{ x: -i / 2, y: 0 }
|
|
1618
|
-
];
|
|
1619
|
-
return s.insert("polygon", ":first-child").attr(
|
|
1620
|
-
"points",
|
|
1621
|
-
l.map(function(a) {
|
|
1622
|
-
return a.x + "," + a.y;
|
|
1623
|
-
}).join(" ")
|
|
1624
|
-
).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(a) {
|
|
1625
|
-
return $.circle(t, 14, a);
|
|
1626
|
-
}, s;
|
|
1627
|
-
}, "choice"), vr = /* @__PURE__ */ g(async (e, t) => {
|
|
1628
|
-
const { shapeSvg: s, bbox: i } = await R(
|
|
1629
|
-
e,
|
|
1630
|
-
t,
|
|
1631
|
-
Y(t, void 0),
|
|
1632
|
-
!0
|
|
1633
|
-
), l = 4, a = i.height + t.padding, r = a / l, n = i.width + 2 * r + t.padding, o = [
|
|
1634
|
-
{ x: r, y: 0 },
|
|
1635
|
-
{ x: n - r, y: 0 },
|
|
1636
|
-
{ x: n, y: -a / 2 },
|
|
1637
|
-
{ x: n - r, y: -a },
|
|
1638
|
-
{ x: r, y: -a },
|
|
1639
|
-
{ x: 0, y: -a / 2 }
|
|
1640
|
-
], u = Z(s, n, a, o);
|
|
1641
|
-
return u.attr("style", t.style), C(t, u), t.intersect = function(y) {
|
|
1642
|
-
return $.polygon(t, o, y);
|
|
1643
|
-
}, s;
|
|
1644
|
-
}, "hexagon"), Er = /* @__PURE__ */ g(async (e, t) => {
|
|
1645
|
-
const { shapeSvg: s, bbox: i } = await R(e, t, void 0, !0), l = 2, a = i.height + 2 * t.padding, r = a / l, n = i.width + 2 * r + t.padding, o = pr(t.directions, i, t), u = Z(s, n, a, o);
|
|
1646
|
-
return u.attr("style", t.style), C(t, u), t.intersect = function(y) {
|
|
1647
|
-
return $.polygon(t, o, y);
|
|
1648
|
-
}, s;
|
|
1649
|
-
}, "block_arrow"), Dr = /* @__PURE__ */ g(async (e, t) => {
|
|
1650
|
-
const { shapeSvg: s, bbox: i } = await R(
|
|
1651
|
-
e,
|
|
1652
|
-
t,
|
|
1653
|
-
Y(t, void 0),
|
|
1654
|
-
!0
|
|
1655
|
-
), l = i.width + t.padding, a = i.height + t.padding, r = [
|
|
1656
|
-
{ x: -a / 2, y: 0 },
|
|
1657
|
-
{ x: l, y: 0 },
|
|
1658
|
-
{ x: l, y: -a },
|
|
1659
|
-
{ x: -a / 2, y: -a },
|
|
1660
|
-
{ x: 0, y: -a / 2 }
|
|
1661
|
-
];
|
|
1662
|
-
return Z(s, l, a, r).attr("style", t.style), t.width = l + a, t.height = a, t.intersect = function(n) {
|
|
1663
|
-
return $.polygon(t, r, n);
|
|
1664
|
-
}, s;
|
|
1665
|
-
}, "rect_left_inv_arrow"), Nr = /* @__PURE__ */ g(async (e, t) => {
|
|
1666
|
-
const { shapeSvg: s, bbox: i } = await R(e, t, Y(t), !0), l = i.width + t.padding, a = i.height + t.padding, r = [
|
|
1667
|
-
{ x: -2 * a / 6, y: 0 },
|
|
1668
|
-
{ x: l - a / 6, y: 0 },
|
|
1669
|
-
{ x: l + 2 * a / 6, y: -a },
|
|
1670
|
-
{ x: a / 6, y: -a }
|
|
1671
|
-
], n = Z(s, l, a, r);
|
|
1672
|
-
return n.attr("style", t.style), C(t, n), t.intersect = function(o) {
|
|
1673
|
-
return $.polygon(t, r, o);
|
|
1674
|
-
}, s;
|
|
1675
|
-
}, "lean_right"), Tr = /* @__PURE__ */ g(async (e, t) => {
|
|
1676
|
-
const { shapeSvg: s, bbox: i } = await R(
|
|
1677
|
-
e,
|
|
1678
|
-
t,
|
|
1679
|
-
Y(t, void 0),
|
|
1680
|
-
!0
|
|
1681
|
-
), l = i.width + t.padding, a = i.height + t.padding, r = [
|
|
1682
|
-
{ x: 2 * a / 6, y: 0 },
|
|
1683
|
-
{ x: l + a / 6, y: 0 },
|
|
1684
|
-
{ x: l - 2 * a / 6, y: -a },
|
|
1685
|
-
{ x: -a / 6, y: -a }
|
|
1686
|
-
], n = Z(s, l, a, r);
|
|
1687
|
-
return n.attr("style", t.style), C(t, n), t.intersect = function(o) {
|
|
1688
|
-
return $.polygon(t, r, o);
|
|
1689
|
-
}, s;
|
|
1690
|
-
}, "lean_left"), $r = /* @__PURE__ */ g(async (e, t) => {
|
|
1691
|
-
const { shapeSvg: s, bbox: i } = await R(
|
|
1692
|
-
e,
|
|
1693
|
-
t,
|
|
1694
|
-
Y(t, void 0),
|
|
1695
|
-
!0
|
|
1696
|
-
), l = i.width + t.padding, a = i.height + t.padding, r = [
|
|
1697
|
-
{ x: -2 * a / 6, y: 0 },
|
|
1698
|
-
{ x: l + 2 * a / 6, y: 0 },
|
|
1699
|
-
{ x: l - a / 6, y: -a },
|
|
1700
|
-
{ x: a / 6, y: -a }
|
|
1701
|
-
], n = Z(s, l, a, r);
|
|
1702
|
-
return n.attr("style", t.style), C(t, n), t.intersect = function(o) {
|
|
1703
|
-
return $.polygon(t, r, o);
|
|
1704
|
-
}, s;
|
|
1705
|
-
}, "trapezoid"), Cr = /* @__PURE__ */ g(async (e, t) => {
|
|
1706
|
-
const { shapeSvg: s, bbox: i } = await R(
|
|
1707
|
-
e,
|
|
1708
|
-
t,
|
|
1709
|
-
Y(t, void 0),
|
|
1710
|
-
!0
|
|
1711
|
-
), l = i.width + t.padding, a = i.height + t.padding, r = [
|
|
1712
|
-
{ x: a / 6, y: 0 },
|
|
1713
|
-
{ x: l - a / 6, y: 0 },
|
|
1714
|
-
{ x: l + 2 * a / 6, y: -a },
|
|
1715
|
-
{ x: -2 * a / 6, y: -a }
|
|
1716
|
-
], n = Z(s, l, a, r);
|
|
1717
|
-
return n.attr("style", t.style), C(t, n), t.intersect = function(o) {
|
|
1718
|
-
return $.polygon(t, r, o);
|
|
1719
|
-
}, s;
|
|
1720
|
-
}, "inv_trapezoid"), Ir = /* @__PURE__ */ g(async (e, t) => {
|
|
1721
|
-
const { shapeSvg: s, bbox: i } = await R(
|
|
1722
|
-
e,
|
|
1723
|
-
t,
|
|
1724
|
-
Y(t, void 0),
|
|
1725
|
-
!0
|
|
1726
|
-
), l = i.width + t.padding, a = i.height + t.padding, r = [
|
|
1727
|
-
{ x: 0, y: 0 },
|
|
1728
|
-
{ x: l + a / 2, y: 0 },
|
|
1729
|
-
{ x: l, y: -a / 2 },
|
|
1730
|
-
{ x: l + a / 2, y: -a },
|
|
1731
|
-
{ x: 0, y: -a }
|
|
1732
|
-
], n = Z(s, l, a, r);
|
|
1733
|
-
return n.attr("style", t.style), C(t, n), t.intersect = function(o) {
|
|
1734
|
-
return $.polygon(t, r, o);
|
|
1735
|
-
}, s;
|
|
1736
|
-
}, "rect_right_inv_arrow"), Or = /* @__PURE__ */ g(async (e, t) => {
|
|
1737
|
-
const { shapeSvg: s, bbox: i } = await R(
|
|
1738
|
-
e,
|
|
1739
|
-
t,
|
|
1740
|
-
Y(t, void 0),
|
|
1741
|
-
!0
|
|
1742
|
-
), l = i.width + t.padding, a = l / 2, r = a / (2.5 + l / 50), n = i.height + r + t.padding, o = "M 0," + r + " a " + a + "," + r + " 0,0,0 " + l + " 0 a " + a + "," + r + " 0,0,0 " + -l + " 0 l 0," + n + " a " + a + "," + r + " 0,0,0 " + l + " 0 l 0," + -n, u = s.attr("label-offset-y", r).insert("path", ":first-child").attr("style", t.style).attr("d", o).attr("transform", "translate(" + -l / 2 + "," + -(n / 2 + r) + ")");
|
|
1743
|
-
return C(t, u), t.intersect = function(y) {
|
|
1744
|
-
const b = $.rect(t, y), x = b.x - t.x;
|
|
1745
|
-
if (a != 0 && (Math.abs(x) < t.width / 2 || Math.abs(x) == t.width / 2 && Math.abs(b.y - t.y) > t.height / 2 - r)) {
|
|
1746
|
-
let S = r * r * (1 - x * x / (a * a));
|
|
1747
|
-
S != 0 && (S = Math.sqrt(S)), S = r - S, y.y - t.y > 0 && (S = -S), b.y += S;
|
|
1748
|
-
}
|
|
1749
|
-
return b;
|
|
1750
|
-
}, s;
|
|
1751
|
-
}, "cylinder"), Br = /* @__PURE__ */ g(async (e, t) => {
|
|
1752
|
-
const { shapeSvg: s, bbox: i, halfPadding: l } = await R(
|
|
1753
|
-
e,
|
|
1754
|
-
t,
|
|
1755
|
-
"node " + t.classes + " " + t.class,
|
|
1756
|
-
!0
|
|
1757
|
-
), a = s.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, o = t.positioned ? -r / 2 : -i.width / 2 - l, u = t.positioned ? -n / 2 : -i.height / 2 - l;
|
|
1758
|
-
if (a.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", u).attr("width", r).attr("height", n), t.props) {
|
|
1759
|
-
const y = new Set(Object.keys(t.props));
|
|
1760
|
-
t.props.borders && (ct(a, t.props.borders, r, n), y.delete("borders")), y.forEach((b) => {
|
|
1761
|
-
w.warn(`Unknown node property ${b}`);
|
|
1762
|
-
});
|
|
1763
|
-
}
|
|
1764
|
-
return C(t, a), t.intersect = function(y) {
|
|
1765
|
-
return $.rect(t, y);
|
|
1766
|
-
}, s;
|
|
1767
|
-
}, "rect"), zr = /* @__PURE__ */ g(async (e, t) => {
|
|
1768
|
-
const { shapeSvg: s, bbox: i, halfPadding: l } = await R(
|
|
1769
|
-
e,
|
|
1770
|
-
t,
|
|
1771
|
-
"node " + t.classes,
|
|
1772
|
-
!0
|
|
1773
|
-
), a = s.insert("rect", ":first-child"), r = t.positioned ? t.width : i.width + t.padding, n = t.positioned ? t.height : i.height + t.padding, o = t.positioned ? -r / 2 : -i.width / 2 - l, u = t.positioned ? -n / 2 : -i.height / 2 - l;
|
|
1774
|
-
if (a.attr("class", "basic cluster composite label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", o).attr("y", u).attr("width", r).attr("height", n), t.props) {
|
|
1775
|
-
const y = new Set(Object.keys(t.props));
|
|
1776
|
-
t.props.borders && (ct(a, t.props.borders, r, n), y.delete("borders")), y.forEach((b) => {
|
|
1777
|
-
w.warn(`Unknown node property ${b}`);
|
|
1778
|
-
});
|
|
1779
|
-
}
|
|
1780
|
-
return C(t, a), t.intersect = function(y) {
|
|
1781
|
-
return $.rect(t, y);
|
|
1782
|
-
}, s;
|
|
1783
|
-
}, "composite"), Ar = /* @__PURE__ */ g(async (e, t) => {
|
|
1784
|
-
const { shapeSvg: s } = await R(e, t, "label", !0);
|
|
1785
|
-
w.trace("Classes = ", t.class);
|
|
1786
|
-
const i = s.insert("rect", ":first-child"), l = 0, a = 0;
|
|
1787
|
-
if (i.attr("width", l).attr("height", a), s.attr("class", "label edgeLabel"), t.props) {
|
|
1788
|
-
const r = new Set(Object.keys(t.props));
|
|
1789
|
-
t.props.borders && (ct(i, t.props.borders, l, a), r.delete("borders")), r.forEach((n) => {
|
|
1790
|
-
w.warn(`Unknown node property ${n}`);
|
|
1791
|
-
});
|
|
1792
|
-
}
|
|
1793
|
-
return C(t, i), t.intersect = function(r) {
|
|
1794
|
-
return $.rect(t, r);
|
|
1795
|
-
}, s;
|
|
1796
|
-
}, "labelRect");
|
|
1797
|
-
function ct(e, t, s, i) {
|
|
1798
|
-
const l = [], a = /* @__PURE__ */ g((n) => {
|
|
1799
|
-
l.push(n, 0);
|
|
1800
|
-
}, "addBorder"), r = /* @__PURE__ */ g((n) => {
|
|
1801
|
-
l.push(0, n);
|
|
1802
|
-
}, "skipBorder");
|
|
1803
|
-
t.includes("t") ? (w.debug("add top border"), a(s)) : r(s), t.includes("r") ? (w.debug("add right border"), a(i)) : r(i), t.includes("b") ? (w.debug("add bottom border"), a(s)) : r(s), t.includes("l") ? (w.debug("add left border"), a(i)) : r(i), e.attr("stroke-dasharray", l.join(" "));
|
|
1804
|
-
}
|
|
1805
|
-
g(ct, "applyNodePropertyBorders");
|
|
1806
|
-
var Rr = /* @__PURE__ */ g(async (e, t) => {
|
|
1807
|
-
let s;
|
|
1808
|
-
t.classes ? s = "node " + t.classes : s = "node default";
|
|
1809
|
-
const i = e.insert("g").attr("class", s).attr("id", t.domId || t.id), l = i.insert("rect", ":first-child"), a = i.insert("line"), r = i.insert("g").attr("class", "label"), n = t.labelText.flat ? t.labelText.flat() : t.labelText;
|
|
1810
|
-
let o = "";
|
|
1811
|
-
typeof n == "object" ? o = n[0] : o = n, w.info("Label text abc79", o, n, typeof n == "object");
|
|
1812
|
-
const u = r.node().appendChild(await H(o, t.labelStyle, !0, !0));
|
|
1813
|
-
let y = { width: 0, height: 0 };
|
|
1814
|
-
if (G(z().flowchart.htmlLabels)) {
|
|
1815
|
-
const _ = u.children[0], k = B(u);
|
|
1816
|
-
y = _.getBoundingClientRect(), k.attr("width", y.width), k.attr("height", y.height);
|
|
1817
|
-
}
|
|
1818
|
-
w.info("Text 2", n);
|
|
1819
|
-
const b = n.slice(1, n.length);
|
|
1820
|
-
let x = u.getBBox();
|
|
1821
|
-
const S = r.node().appendChild(
|
|
1822
|
-
await H(
|
|
1823
|
-
b.join ? b.join("<br/>") : b,
|
|
1824
|
-
t.labelStyle,
|
|
1825
|
-
!0,
|
|
1826
|
-
!0
|
|
1827
|
-
)
|
|
1828
|
-
);
|
|
1829
|
-
if (G(z().flowchart.htmlLabels)) {
|
|
1830
|
-
const _ = S.children[0], k = B(S);
|
|
1831
|
-
y = _.getBoundingClientRect(), k.attr("width", y.width), k.attr("height", y.height);
|
|
1832
|
-
}
|
|
1833
|
-
const L = t.padding / 2;
|
|
1834
|
-
return B(S).attr(
|
|
1835
|
-
"transform",
|
|
1836
|
-
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
1837
|
-
(y.width > x.width ? 0 : (x.width - y.width) / 2) + ", " + (x.height + L + 5) + ")"
|
|
1838
|
-
), B(u).attr(
|
|
1839
|
-
"transform",
|
|
1840
|
-
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
1841
|
-
(y.width < x.width ? 0 : -(x.width - y.width) / 2) + ", 0)"
|
|
1842
|
-
), y = r.node().getBBox(), r.attr(
|
|
1843
|
-
"transform",
|
|
1844
|
-
"translate(" + -y.width / 2 + ", " + (-y.height / 2 - L + 3) + ")"
|
|
1845
|
-
), l.attr("class", "outer title-state").attr("x", -y.width / 2 - L).attr("y", -y.height / 2 - L).attr("width", y.width + t.padding).attr("height", y.height + t.padding), a.attr("class", "divider").attr("x1", -y.width / 2 - L).attr("x2", y.width / 2 + L).attr("y1", -y.height / 2 - L + x.height + L).attr("y2", -y.height / 2 - L + x.height + L), C(t, l), t.intersect = function(_) {
|
|
1846
|
-
return $.rect(t, _);
|
|
1847
|
-
}, i;
|
|
1848
|
-
}, "rectWithTitle"), Mr = /* @__PURE__ */ g(async (e, t) => {
|
|
1849
|
-
const { shapeSvg: s, bbox: i } = await R(
|
|
1850
|
-
e,
|
|
1851
|
-
t,
|
|
1852
|
-
Y(t, void 0),
|
|
1853
|
-
!0
|
|
1854
|
-
), l = i.height + t.padding, a = i.width + l / 4 + t.padding, r = s.insert("rect", ":first-child").attr("style", t.style).attr("rx", l / 2).attr("ry", l / 2).attr("x", -a / 2).attr("y", -l / 2).attr("width", a).attr("height", l);
|
|
1855
|
-
return C(t, r), t.intersect = function(n) {
|
|
1856
|
-
return $.rect(t, n);
|
|
1857
|
-
}, s;
|
|
1858
|
-
}, "stadium"), Pr = /* @__PURE__ */ g(async (e, t) => {
|
|
1859
|
-
const { shapeSvg: s, bbox: i, halfPadding: l } = await R(
|
|
1860
|
-
e,
|
|
1861
|
-
t,
|
|
1862
|
-
Y(t, void 0),
|
|
1863
|
-
!0
|
|
1864
|
-
), a = s.insert("circle", ":first-child");
|
|
1865
|
-
return a.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), w.info("Circle main"), C(t, a), t.intersect = function(r) {
|
|
1866
|
-
return w.info("Circle intersect", t, i.width / 2 + l, r), $.circle(t, i.width / 2 + l, r);
|
|
1867
|
-
}, s;
|
|
1868
|
-
}, "circle"), Xr = /* @__PURE__ */ g(async (e, t) => {
|
|
1869
|
-
const { shapeSvg: s, bbox: i, halfPadding: l } = await R(
|
|
1870
|
-
e,
|
|
1871
|
-
t,
|
|
1872
|
-
Y(t, void 0),
|
|
1873
|
-
!0
|
|
1874
|
-
), a = 5, r = s.insert("g", ":first-child"), n = r.insert("circle"), o = r.insert("circle");
|
|
1875
|
-
return r.attr("class", t.class), n.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l + a).attr("width", i.width + t.padding + a * 2).attr("height", i.height + t.padding + a * 2), o.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", i.width / 2 + l).attr("width", i.width + t.padding).attr("height", i.height + t.padding), w.info("DoubleCircle main"), C(t, n), t.intersect = function(u) {
|
|
1876
|
-
return w.info("DoubleCircle intersect", t, i.width / 2 + l + a, u), $.circle(t, i.width / 2 + l + a, u);
|
|
1877
|
-
}, s;
|
|
1878
|
-
}, "doublecircle"), Wr = /* @__PURE__ */ g(async (e, t) => {
|
|
1879
|
-
const { shapeSvg: s, bbox: i } = await R(
|
|
1880
|
-
e,
|
|
1881
|
-
t,
|
|
1882
|
-
Y(t, void 0),
|
|
1883
|
-
!0
|
|
1884
|
-
), l = i.width + t.padding, a = i.height + t.padding, r = [
|
|
1885
|
-
{ x: 0, y: 0 },
|
|
1886
|
-
{ x: l, y: 0 },
|
|
1887
|
-
{ x: l, y: -a },
|
|
1888
|
-
{ x: 0, y: -a },
|
|
1889
|
-
{ x: 0, y: 0 },
|
|
1890
|
-
{ x: -8, y: 0 },
|
|
1891
|
-
{ x: l + 8, y: 0 },
|
|
1892
|
-
{ x: l + 8, y: -a },
|
|
1893
|
-
{ x: -8, y: -a },
|
|
1894
|
-
{ x: -8, y: 0 }
|
|
1895
|
-
], n = Z(s, l, a, r);
|
|
1896
|
-
return n.attr("style", t.style), C(t, n), t.intersect = function(o) {
|
|
1897
|
-
return $.polygon(t, r, o);
|
|
1898
|
-
}, s;
|
|
1899
|
-
}, "subroutine"), Fr = /* @__PURE__ */ g((e, t) => {
|
|
1900
|
-
const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = s.insert("circle", ":first-child");
|
|
1901
|
-
return i.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), C(t, i), t.intersect = function(l) {
|
|
1902
|
-
return $.circle(t, 7, l);
|
|
1903
|
-
}, s;
|
|
1904
|
-
}, "start"), Pt = /* @__PURE__ */ g((e, t, s) => {
|
|
1905
|
-
const i = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
|
|
1906
|
-
let l = 70, a = 10;
|
|
1907
|
-
s === "LR" && (l = 10, a = 70);
|
|
1908
|
-
const r = i.append("rect").attr("x", -1 * l / 2).attr("y", -1 * a / 2).attr("width", l).attr("height", a).attr("class", "fork-join");
|
|
1909
|
-
return C(t, r), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(n) {
|
|
1910
|
-
return $.rect(t, n);
|
|
1911
|
-
}, i;
|
|
1912
|
-
}, "forkJoin"), Yr = /* @__PURE__ */ g((e, t) => {
|
|
1913
|
-
const s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), i = s.insert("circle", ":first-child"), l = s.insert("circle", ":first-child");
|
|
1914
|
-
return l.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), i.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), C(t, l), t.intersect = function(a) {
|
|
1915
|
-
return $.circle(t, 7, a);
|
|
1916
|
-
}, s;
|
|
1917
|
-
}, "end"), Kr = /* @__PURE__ */ g(async (e, t) => {
|
|
1918
|
-
var s;
|
|
1919
|
-
const i = t.padding / 2, l = 4, a = 8;
|
|
1920
|
-
let r;
|
|
1921
|
-
t.classes ? r = "node " + t.classes : r = "node default";
|
|
1922
|
-
const n = e.insert("g").attr("class", r).attr("id", t.domId || t.id), o = n.insert("rect", ":first-child"), u = n.insert("line"), y = n.insert("line");
|
|
1923
|
-
let b = 0, x = l;
|
|
1924
|
-
const S = n.insert("g").attr("class", "label");
|
|
1925
|
-
let L = 0;
|
|
1926
|
-
const _ = (s = t.classData.annotations) == null ? void 0 : s[0], k = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", N = S.node().appendChild(await H(k, t.labelStyle, !0, !0));
|
|
1927
|
-
let v = N.getBBox();
|
|
1928
|
-
if (G(z().flowchart.htmlLabels)) {
|
|
1929
|
-
const m = N.children[0], h = B(N);
|
|
1930
|
-
v = m.getBoundingClientRect(), h.attr("width", v.width), h.attr("height", v.height);
|
|
1931
|
-
}
|
|
1932
|
-
t.classData.annotations[0] && (x += v.height + l, b += v.width);
|
|
1933
|
-
let D = t.classData.label;
|
|
1934
|
-
t.classData.type !== void 0 && t.classData.type !== "" && (z().flowchart.htmlLabels ? D += "<" + t.classData.type + ">" : D += "<" + t.classData.type + ">");
|
|
1935
|
-
const c = S.node().appendChild(await H(D, t.labelStyle, !0, !0));
|
|
1936
|
-
B(c).attr("class", "classTitle");
|
|
1937
|
-
let p = c.getBBox();
|
|
1938
|
-
if (G(z().flowchart.htmlLabels)) {
|
|
1939
|
-
const m = c.children[0], h = B(c);
|
|
1940
|
-
p = m.getBoundingClientRect(), h.attr("width", p.width), h.attr("height", p.height);
|
|
1941
|
-
}
|
|
1942
|
-
x += p.height + l, p.width > b && (b = p.width);
|
|
1943
|
-
const f = [];
|
|
1944
|
-
t.classData.members.forEach(async (m) => {
|
|
1945
|
-
const h = m.getDisplayDetails();
|
|
1946
|
-
let O = h.displayText;
|
|
1947
|
-
z().flowchart.htmlLabels && (O = O.replace(/</g, "<").replace(/>/g, ">"));
|
|
1948
|
-
const M = S.node().appendChild(
|
|
1949
|
-
await H(
|
|
1950
|
-
O,
|
|
1951
|
-
h.cssStyle ? h.cssStyle : t.labelStyle,
|
|
1952
|
-
!0,
|
|
1953
|
-
!0
|
|
1954
|
-
)
|
|
1955
|
-
);
|
|
1956
|
-
let A = M.getBBox();
|
|
1957
|
-
if (G(z().flowchart.htmlLabels)) {
|
|
1958
|
-
const W = M.children[0], j = B(M);
|
|
1959
|
-
A = W.getBoundingClientRect(), j.attr("width", A.width), j.attr("height", A.height);
|
|
1960
|
-
}
|
|
1961
|
-
A.width > b && (b = A.width), x += A.height + l, f.push(M);
|
|
1962
|
-
}), x += a;
|
|
1963
|
-
const E = [];
|
|
1964
|
-
if (t.classData.methods.forEach(async (m) => {
|
|
1965
|
-
const h = m.getDisplayDetails();
|
|
1966
|
-
let O = h.displayText;
|
|
1967
|
-
z().flowchart.htmlLabels && (O = O.replace(/</g, "<").replace(/>/g, ">"));
|
|
1968
|
-
const M = S.node().appendChild(
|
|
1969
|
-
await H(
|
|
1970
|
-
O,
|
|
1971
|
-
h.cssStyle ? h.cssStyle : t.labelStyle,
|
|
1972
|
-
!0,
|
|
1973
|
-
!0
|
|
1974
|
-
)
|
|
1975
|
-
);
|
|
1976
|
-
let A = M.getBBox();
|
|
1977
|
-
if (G(z().flowchart.htmlLabels)) {
|
|
1978
|
-
const W = M.children[0], j = B(M);
|
|
1979
|
-
A = W.getBoundingClientRect(), j.attr("width", A.width), j.attr("height", A.height);
|
|
1980
|
-
}
|
|
1981
|
-
A.width > b && (b = A.width), x += A.height + l, E.push(M);
|
|
1982
|
-
}), x += a, _) {
|
|
1983
|
-
let m = (b - v.width) / 2;
|
|
1984
|
-
B(N).attr(
|
|
1985
|
-
"transform",
|
|
1986
|
-
"translate( " + (-1 * b / 2 + m) + ", " + -1 * x / 2 + ")"
|
|
1987
|
-
), L = v.height + l;
|
|
1988
|
-
}
|
|
1989
|
-
let d = (b - p.width) / 2;
|
|
1990
|
-
return B(c).attr(
|
|
1991
|
-
"transform",
|
|
1992
|
-
"translate( " + (-1 * b / 2 + d) + ", " + (-1 * x / 2 + L) + ")"
|
|
1993
|
-
), L += p.height + l, u.attr("class", "divider").attr("x1", -b / 2 - i).attr("x2", b / 2 + i).attr("y1", -x / 2 - i + a + L).attr("y2", -x / 2 - i + a + L), L += a, f.forEach((m) => {
|
|
1994
|
-
B(m).attr(
|
|
1995
|
-
"transform",
|
|
1996
|
-
"translate( " + -b / 2 + ", " + (-1 * x / 2 + L + a / 2) + ")"
|
|
1997
|
-
);
|
|
1998
|
-
const h = m == null ? void 0 : m.getBBox();
|
|
1999
|
-
L += ((h == null ? void 0 : h.height) ?? 0) + l;
|
|
2000
|
-
}), L += a, y.attr("class", "divider").attr("x1", -b / 2 - i).attr("x2", b / 2 + i).attr("y1", -x / 2 - i + a + L).attr("y2", -x / 2 - i + a + L), L += a, E.forEach((m) => {
|
|
2001
|
-
B(m).attr(
|
|
2002
|
-
"transform",
|
|
2003
|
-
"translate( " + -b / 2 + ", " + (-1 * x / 2 + L) + ")"
|
|
2004
|
-
);
|
|
2005
|
-
const h = m == null ? void 0 : m.getBBox();
|
|
2006
|
-
L += ((h == null ? void 0 : h.height) ?? 0) + l;
|
|
2007
|
-
}), o.attr("style", t.style).attr("class", "outer title-state").attr("x", -b / 2 - i).attr("y", -(x / 2) - i).attr("width", b + t.padding).attr("height", x + t.padding), C(t, o), t.intersect = function(m) {
|
|
2008
|
-
return $.rect(t, m);
|
|
2009
|
-
}, n;
|
|
2010
|
-
}, "class_box"), Xt = {
|
|
2011
|
-
rhombus: Mt,
|
|
2012
|
-
composite: zr,
|
|
2013
|
-
question: Mt,
|
|
2014
|
-
rect: Br,
|
|
2015
|
-
labelRect: Ar,
|
|
2016
|
-
rectWithTitle: Rr,
|
|
2017
|
-
choice: _r,
|
|
2018
|
-
circle: Pr,
|
|
2019
|
-
doublecircle: Xr,
|
|
2020
|
-
stadium: Mr,
|
|
2021
|
-
hexagon: vr,
|
|
2022
|
-
block_arrow: Er,
|
|
2023
|
-
rect_left_inv_arrow: Dr,
|
|
2024
|
-
lean_right: Nr,
|
|
2025
|
-
lean_left: Tr,
|
|
2026
|
-
trapezoid: $r,
|
|
2027
|
-
inv_trapezoid: Cr,
|
|
2028
|
-
rect_right_inv_arrow: Ir,
|
|
2029
|
-
cylinder: Or,
|
|
2030
|
-
start: Fr,
|
|
2031
|
-
end: Yr,
|
|
2032
|
-
note: kr,
|
|
2033
|
-
subroutine: Wr,
|
|
2034
|
-
fork: Pt,
|
|
2035
|
-
join: Pt,
|
|
2036
|
-
class_box: Kr
|
|
2037
|
-
}, lt = {}, re = /* @__PURE__ */ g(async (e, t, s) => {
|
|
2038
|
-
let i, l;
|
|
2039
|
-
if (t.link) {
|
|
2040
|
-
let a;
|
|
2041
|
-
z().securityLevel === "sandbox" ? a = "_top" : t.linkTarget && (a = t.linkTarget || "_blank"), i = e.insert("svg:a").attr("xlink:href", t.link).attr("target", a), l = await Xt[t.shape](i, t, s);
|
|
2042
|
-
} else
|
|
2043
|
-
l = await Xt[t.shape](e, t, s), i = l;
|
|
2044
|
-
return t.tooltip && l.attr("title", t.tooltip), t.class && l.attr("class", "node default " + t.class), lt[t.id] = i, t.haveCallback && lt[t.id].attr("class", lt[t.id].attr("class") + " clickable"), i;
|
|
2045
|
-
}, "insertNode"), Hr = /* @__PURE__ */ g((e) => {
|
|
2046
|
-
const t = lt[e.id];
|
|
2047
|
-
w.trace(
|
|
2048
|
-
"Transforming node",
|
|
2049
|
-
e.diff,
|
|
2050
|
-
e,
|
|
2051
|
-
"translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")"
|
|
2052
|
-
);
|
|
2053
|
-
const s = 8, i = e.diff || 0;
|
|
2054
|
-
return e.clusterNode ? t.attr(
|
|
2055
|
-
"transform",
|
|
2056
|
-
"translate(" + (e.x + i - e.width / 2) + ", " + (e.y - e.height / 2 - s) + ")"
|
|
2057
|
-
) : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), i;
|
|
2058
|
-
}, "positionNode");
|
|
2059
|
-
function Dt(e, t, s = !1) {
|
|
2060
|
-
var i, l, a;
|
|
2061
|
-
const r = e;
|
|
2062
|
-
let n = "default";
|
|
2063
|
-
(((i = r == null ? void 0 : r.classes) == null ? void 0 : i.length) || 0) > 0 && (n = ((r == null ? void 0 : r.classes) ?? []).join(" ")), n = n + " flowchart-label";
|
|
2064
|
-
let o = 0, u = "", y;
|
|
2065
|
-
switch (r.type) {
|
|
2066
|
-
case "round":
|
|
2067
|
-
o = 5, u = "rect";
|
|
2068
|
-
break;
|
|
2069
|
-
case "composite":
|
|
2070
|
-
o = 0, u = "composite", y = 0;
|
|
2071
|
-
break;
|
|
2072
|
-
case "square":
|
|
2073
|
-
u = "rect";
|
|
2074
|
-
break;
|
|
2075
|
-
case "diamond":
|
|
2076
|
-
u = "question";
|
|
2077
|
-
break;
|
|
2078
|
-
case "hexagon":
|
|
2079
|
-
u = "hexagon";
|
|
2080
|
-
break;
|
|
2081
|
-
case "block_arrow":
|
|
2082
|
-
u = "block_arrow";
|
|
2083
|
-
break;
|
|
2084
|
-
case "odd":
|
|
2085
|
-
u = "rect_left_inv_arrow";
|
|
2086
|
-
break;
|
|
2087
|
-
case "lean_right":
|
|
2088
|
-
u = "lean_right";
|
|
2089
|
-
break;
|
|
2090
|
-
case "lean_left":
|
|
2091
|
-
u = "lean_left";
|
|
2092
|
-
break;
|
|
2093
|
-
case "trapezoid":
|
|
2094
|
-
u = "trapezoid";
|
|
2095
|
-
break;
|
|
2096
|
-
case "inv_trapezoid":
|
|
2097
|
-
u = "inv_trapezoid";
|
|
2098
|
-
break;
|
|
2099
|
-
case "rect_left_inv_arrow":
|
|
2100
|
-
u = "rect_left_inv_arrow";
|
|
2101
|
-
break;
|
|
2102
|
-
case "circle":
|
|
2103
|
-
u = "circle";
|
|
2104
|
-
break;
|
|
2105
|
-
case "ellipse":
|
|
2106
|
-
u = "ellipse";
|
|
2107
|
-
break;
|
|
2108
|
-
case "stadium":
|
|
2109
|
-
u = "stadium";
|
|
2110
|
-
break;
|
|
2111
|
-
case "subroutine":
|
|
2112
|
-
u = "subroutine";
|
|
2113
|
-
break;
|
|
2114
|
-
case "cylinder":
|
|
2115
|
-
u = "cylinder";
|
|
2116
|
-
break;
|
|
2117
|
-
case "group":
|
|
2118
|
-
u = "rect";
|
|
2119
|
-
break;
|
|
2120
|
-
case "doublecircle":
|
|
2121
|
-
u = "doublecircle";
|
|
2122
|
-
break;
|
|
2123
|
-
default:
|
|
2124
|
-
u = "rect";
|
|
2125
|
-
}
|
|
2126
|
-
const b = Le((r == null ? void 0 : r.styles) ?? []), x = r.label, S = r.size ?? { width: 0, height: 0, x: 0, y: 0 };
|
|
2127
|
-
return {
|
|
2128
|
-
labelStyle: b.labelStyle,
|
|
2129
|
-
shape: u,
|
|
2130
|
-
labelText: x,
|
|
2131
|
-
rx: o,
|
|
2132
|
-
ry: o,
|
|
2133
|
-
class: n,
|
|
2134
|
-
style: b.style,
|
|
2135
|
-
id: r.id,
|
|
2136
|
-
directions: r.directions,
|
|
2137
|
-
width: S.width,
|
|
2138
|
-
height: S.height,
|
|
2139
|
-
x: S.x,
|
|
2140
|
-
y: S.y,
|
|
2141
|
-
positioned: s,
|
|
2142
|
-
intersect: void 0,
|
|
2143
|
-
type: r.type,
|
|
2144
|
-
padding: y ?? ((a = (l = at()) == null ? void 0 : l.block) == null ? void 0 : a.padding) ?? 0
|
|
2145
|
-
};
|
|
2146
|
-
}
|
|
2147
|
-
g(Dt, "getNodeFromBlock");
|
|
2148
|
-
async function ae(e, t, s) {
|
|
2149
|
-
const i = Dt(t, s, !1);
|
|
2150
|
-
if (i.type === "group")
|
|
2151
|
-
return;
|
|
2152
|
-
const l = at(), a = await re(e, i, { config: l }), r = a.node().getBBox(), n = s.getBlock(i.id);
|
|
2153
|
-
n.size = { width: r.width, height: r.height, x: 0, y: 0, node: a }, s.setBlock(n), a.remove();
|
|
2154
|
-
}
|
|
2155
|
-
g(ae, "calculateBlockSize");
|
|
2156
|
-
async function se(e, t, s) {
|
|
2157
|
-
const i = Dt(t, s, !0);
|
|
2158
|
-
if (s.getBlock(i.id).type !== "space") {
|
|
2159
|
-
const l = at();
|
|
2160
|
-
await re(e, i, { config: l }), t.intersect = i == null ? void 0 : i.intersect, Hr(i);
|
|
2161
|
-
}
|
|
2162
|
-
}
|
|
2163
|
-
g(se, "insertBlockPositioned");
|
|
2164
|
-
async function ht(e, t, s, i) {
|
|
2165
|
-
for (const l of t)
|
|
2166
|
-
await i(e, l, s), l.children && await ht(e, l.children, s, i);
|
|
2167
|
-
}
|
|
2168
|
-
g(ht, "performOperations");
|
|
2169
|
-
async function ie(e, t, s) {
|
|
2170
|
-
await ht(e, t, s, ae);
|
|
2171
|
-
}
|
|
2172
|
-
g(ie, "calculateBlockSizes");
|
|
2173
|
-
async function ne(e, t, s) {
|
|
2174
|
-
await ht(e, t, s, se);
|
|
2175
|
-
}
|
|
2176
|
-
g(ne, "insertBlocks");
|
|
2177
|
-
async function le(e, t, s, i, l) {
|
|
2178
|
-
const a = new ke({
|
|
2179
|
-
multigraph: !0,
|
|
2180
|
-
compound: !0
|
|
2181
|
-
});
|
|
2182
|
-
a.setGraph({
|
|
2183
|
-
rankdir: "TB",
|
|
2184
|
-
nodesep: 10,
|
|
2185
|
-
ranksep: 10,
|
|
2186
|
-
marginx: 8,
|
|
2187
|
-
marginy: 8
|
|
2188
|
-
});
|
|
2189
|
-
for (const r of s)
|
|
2190
|
-
r.size && a.setNode(r.id, {
|
|
2191
|
-
width: r.size.width,
|
|
2192
|
-
height: r.size.height,
|
|
2193
|
-
intersect: r.intersect
|
|
2194
|
-
});
|
|
2195
|
-
for (const r of t)
|
|
2196
|
-
if (r.start && r.end) {
|
|
2197
|
-
const n = i.getBlock(r.start), o = i.getBlock(r.end);
|
|
2198
|
-
if (n != null && n.size && o != null && o.size) {
|
|
2199
|
-
const u = n.size, y = o.size, b = [
|
|
2200
|
-
{ x: u.x, y: u.y },
|
|
2201
|
-
{ x: u.x + (y.x - u.x) / 2, y: u.y + (y.y - u.y) / 2 },
|
|
2202
|
-
{ x: y.x, y: y.y }
|
|
2203
|
-
];
|
|
2204
|
-
gr(
|
|
2205
|
-
e,
|
|
2206
|
-
{ v: r.start, w: r.end, name: r.id },
|
|
2207
|
-
{
|
|
2208
|
-
...r,
|
|
2209
|
-
arrowTypeEnd: r.arrowTypeEnd,
|
|
2210
|
-
arrowTypeStart: r.arrowTypeStart,
|
|
2211
|
-
points: b,
|
|
2212
|
-
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
2213
|
-
},
|
|
2214
|
-
void 0,
|
|
2215
|
-
"block",
|
|
2216
|
-
a,
|
|
2217
|
-
l
|
|
2218
|
-
), r.label && (await dr(e, {
|
|
2219
|
-
...r,
|
|
2220
|
-
label: r.label,
|
|
2221
|
-
labelStyle: "stroke: #333; stroke-width: 1.5px;fill:none;",
|
|
2222
|
-
arrowTypeEnd: r.arrowTypeEnd,
|
|
2223
|
-
arrowTypeStart: r.arrowTypeStart,
|
|
2224
|
-
points: b,
|
|
2225
|
-
classes: "edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"
|
|
2226
|
-
}), cr(
|
|
2227
|
-
{ ...r, x: b[1].x, y: b[1].y },
|
|
2228
|
-
{
|
|
2229
|
-
originalPath: b
|
|
2230
|
-
}
|
|
2231
|
-
));
|
|
2232
|
-
}
|
|
2233
|
-
}
|
|
2234
|
-
}
|
|
2235
|
-
g(le, "insertEdges");
|
|
2236
|
-
var jr = /* @__PURE__ */ g(function(e, t) {
|
|
2237
|
-
return t.db.getClasses();
|
|
2238
|
-
}, "getClasses"), Ur = /* @__PURE__ */ g(async function(e, t, s, i) {
|
|
2239
|
-
const { securityLevel: l, block: a } = at(), r = i.db;
|
|
2240
|
-
let n;
|
|
2241
|
-
l === "sandbox" && (n = B("#i" + t));
|
|
2242
|
-
const o = l === "sandbox" ? B(n.nodes()[0].contentDocument.body) : B("body"), u = l === "sandbox" ? o.select(`[id="${t}"]`) : B(`[id="${t}"]`);
|
|
2243
|
-
sr(u, ["point", "circle", "cross"], i.type, t);
|
|
2244
|
-
const y = r.getBlocks(), b = r.getBlocksFlat(), x = r.getEdges(), S = u.insert("g").attr("class", "block");
|
|
2245
|
-
await ie(S, y, r);
|
|
2246
|
-
const L = Zt(r);
|
|
2247
|
-
if (await ne(S, y, r), await le(S, x, b, r, t), L) {
|
|
2248
|
-
const _ = L, k = Math.max(1, Math.round(0.125 * (_.width / _.height))), N = _.height + k + 10, v = _.width + 10, { useMaxWidth: D } = a;
|
|
2249
|
-
he(u, N, v, !!D), w.debug("Here Bounds", L, _), u.attr(
|
|
2250
|
-
"viewBox",
|
|
2251
|
-
`${_.x - 5} ${_.y - 5} ${_.width + 10} ${_.height + 10}`
|
|
2252
|
-
);
|
|
2253
|
-
}
|
|
2254
|
-
}, "draw"), Zr = {
|
|
2255
|
-
draw: Ur,
|
|
2256
|
-
getClasses: jr
|
|
2257
|
-
}, ta = {
|
|
2258
|
-
parser: ve,
|
|
2259
|
-
db: Ke,
|
|
2260
|
-
renderer: Zr,
|
|
2261
|
-
styles: je
|
|
2262
|
-
};
|
|
2263
|
-
export {
|
|
2264
|
-
ta as diagram
|
|
2265
|
-
};
|