@belonguniverseai/react-sdk 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/agent-grants.d.ts +6 -0
- package/dist/api/client.d.ts +30 -1
- package/dist/app/call-summary.d.ts +30 -0
- package/dist/component/abnfDiagram-N423BO3Z-C1O9dfJJ.js +90 -0
- package/dist/component/arc-Cpnt_LFj.js +86 -0
- package/dist/component/{architectureDiagram-3BPJPVTR-DYcaPx2M.js → architectureDiagram-T3A2C74G-iakL6yUj.js} +1872 -1785
- package/dist/component/{blockDiagram-GPEHLZMM-BdjruLO5.js → blockDiagram-VBNYF7ZC-D7t0jIvW.js} +895 -894
- package/dist/component/{c4Diagram-AAUBKEIU-Bd2ebSgB.js → c4Diagram-5PPSVZJV-CRX1o0CJ.js} +3 -3
- package/dist/component/{channel-CYFijF_t.js → channel-DnM50Ep0.js} +2 -2
- package/dist/component/{chunk-ND2GUHAM-OX1-DIU1.js → chunk-2GRJ4B5K-ChTMjM-v.js} +5 -5
- package/dist/component/{chunk-QZHKN3VN-DLQ8oUCc.js → chunk-2Q5K7J3B-F2Rpvtwm.js} +2 -2
- package/dist/component/{chunk-AQP2D5EJ-D4G4syYu.js → chunk-5RXB4S5H-B1WLx-ex.js} +399 -378
- package/dist/component/{chunk-FMBD7UC4-CbRxWx_A.js → chunk-5VM5RSS4-D35VMAuN.js} +2 -2
- package/dist/component/chunk-6Q2QTUOP-DGVp_gyk.js +673 -0
- package/dist/component/{chunk-727SXJPM-A5r5oL1_.js → chunk-GF5L2VYU-CZOQEv_q.js} +244 -239
- package/dist/component/{chunk-4BX2VUAB-DVpS0I_p.js → chunk-JWPE2WC7-BbwyDj9g.js} +2 -2
- package/dist/component/{chunk-2J33WTMH-B06Y_xVy.js → chunk-KBJHAD2P-B9qL0VLM.js} +2 -2
- package/dist/component/chunk-RYQCIY6F-5eaMbXXL.js +316 -0
- package/dist/component/{chunk-55IACEB6-DmZctFkK.js → chunk-XXDRQBXY-XJadTIK5.js} +2 -2
- package/dist/component/{classDiagram-4FO5ZUOK-4S9mdFC1.js → classDiagram-JCYQIIEL-DVaEk7uT.js} +3 -3
- package/dist/component/{classDiagram-v2-Q7XG4LA2-4S9mdFC1.js → classDiagram-v2-OCEON4UE-DVaEk7uT.js} +3 -3
- package/dist/component/{cose-bilkent-S5V4N54A-BIrVaakt.js → cose-bilkent-JH36ORCC-DZA30AqI.js} +2 -2
- package/dist/component/{wardley-L42UT6IY-HA1eSIS_.js → cynefin-VYW2F7L2-DAyxamLw.js} +9199 -7918
- package/dist/component/cynefinDiagram-MW4NZA55-CutZScTQ.js +302 -0
- package/dist/component/dagre-VZM6K2ZE-CelPLP8N.js +343 -0
- package/dist/component/diagram-7IWD3JNH-Cr5piwKc.js +353 -0
- package/dist/component/{diagram-KO2AKTUF-Da1E68Eo.js → diagram-B4RE2ZJO-DgLNdZkh.js} +24 -24
- package/dist/component/{diagram-LMA3HP47-dRbk5sBa.js → diagram-LBJQPF4R-DxeIMTjN.js} +23 -23
- package/dist/component/{diagram-OG6HWLK6-CcKT8mhn.js → diagram-Q27KOJAE-WACyk_gr.js} +197 -197
- package/dist/component/diagram-UB23O5K3-DbhVYU5T.js +222 -0
- package/dist/component/ebnfDiagram-BXEA7PRR-DoGrYW10.js +112 -0
- package/dist/component/{erDiagram-TEJ5UH35-3ATYT9J-.js → erDiagram-JOGREHBK-BgewA6fH.js} +142 -131
- package/dist/component/{flowDiagram-I6XJVG4X-D9PLm9Od.js → flowDiagram-UKHOOZJN-1YmYJYcE.js} +268 -258
- package/dist/component/ganttDiagram-PKOTCBZU-BFAEPYkH.js +2714 -0
- package/dist/component/{gitGraphDiagram-PVQCEYII-13gVhAGc.js → gitGraphDiagram-DS77QQ5N-CSiPuE-l.js} +33 -33
- package/dist/component/{graph-BZLHvygk.js → graph-CWpEkm4G.js} +35 -35
- package/dist/component/{highlighted-body-OFNGDK62-DCxRI4UV.js → highlighted-body-OFNGDK62-CSJNGt18.js} +2 -2
- package/dist/component/index.js +2 -2
- package/dist/component/{infoDiagram-5YYISTIA-DymxA7AN.js → infoDiagram-6WML65LV-CoMVfONe.js} +4 -4
- package/dist/component/{ishikawaDiagram-YF4QCWOH-C3sTn76C.js → ishikawaDiagram-WSZJBQD7-B2YEkQ4b.js} +27 -27
- package/dist/component/{journeyDiagram-JHISSGLW-Cq0hOAfJ.js → journeyDiagram-NVQOT4AX-B7b5ZwlF.js} +5 -5
- package/dist/component/{kanban-definition-UN3LZRKU-5tBWjkp7.js → kanban-definition-27J2QSJJ-C9GPAsBR.js} +35 -35
- package/dist/component/layout-Br2UjHRU.js +1522 -0
- package/dist/component/{linear-BT4blD8s.js → linear-Bi0C-9d1.js} +13 -13
- package/dist/component/map-CdwokNh2.js +227 -0
- package/dist/component/{mermaid-GHXKKRXX-DXPXjnb7.js → mermaid-GHXKKRXX-BaBCeViM.js} +25220 -24784
- package/dist/component/{mindmap-definition-RKZ34NQL-DO-OuAQQ.js → mindmap-definition-FAOFIHXS-tHIAo7Ms.js} +26 -26
- package/dist/component/pegDiagram-VL7TDLO6-Db_7lLRV.js +98 -0
- package/dist/component/pieDiagram-7S7Q4E2Y-C4fs4XCK.js +210 -0
- package/dist/component/{quadrantDiagram-W4KKPZXB-CaJWg9ep.js → quadrantDiagram-CIZ2JOQS-Bw7vXO0q.js} +14 -15
- package/dist/component/railroadDiagram-AXF67PYL-kY0VoZEg.js +80 -0
- package/dist/component/{requirementDiagram-4Y6WPE33-CmZrtZqe.js → requirementDiagram-LRYGKXZP-BkNtSZm5.js} +15 -15
- package/dist/component/{sankeyDiagram-5OEKKPKP-Cp95M1aj.js → sankeyDiagram-W5VNT64P-BK_C1BYE.js} +2 -2
- package/dist/component/{sequenceDiagram-3UESZ5HK-C0x0WvhR.js → sequenceDiagram-SI44F4Z6-CEmgVZaE.js} +960 -963
- package/dist/component/sizeCapture-X5ZJPWSS-J5ZNXT4c.js +49 -0
- package/dist/component/{stateDiagram-AJRCARHV-H10vaGL3.js → stateDiagram-OKZ733FA-DrwrNuNs.js} +5 -5
- package/dist/component/{stateDiagram-v2-BHNVJYJU-rj7ljkc-.js → stateDiagram-v2-UEYNNEHI-DHD85VTD.js} +3 -3
- package/dist/component/swimlanes-SLNWSIFB-FOK5tys1.js +5335 -0
- package/dist/component/swimlanesDiagram-ULZ7WXOC-edTvZTge.js +16 -0
- package/dist/component/{timeline-definition-PNZ67QCA-Cil1QaqZ.js → timeline-definition-Z64GVDOM-Cc4fTsjY.js} +15 -15
- package/dist/component/vennDiagram-T6HMQDX7-DYZl8srI.js +1581 -0
- package/dist/component/{wardleyDiagram-YWT4CUSO-Xq5Hnmio.js → wardleyDiagram-T6FBY63Y-BEvv3PjS.js} +15 -15
- package/dist/component/{xychartDiagram-2RQKCTM6-dinwR4Zm.js → xychartDiagram-ELKLHX3M-79AgTtk-.js} +464 -418
- package/dist/embed/voice/line-slots.d.ts +37 -2
- package/dist/embed/voice-call.d.ts +12 -0
- package/dist/i18n/messages/en.d.ts +1 -2
- package/dist/lib/web-storage.d.ts +8 -0
- package/dist/stream/stream-state-store.d.ts +13 -0
- package/dist/types/public.d.ts +3 -0
- package/package.json +1 -1
- package/dist/component/arc-TLcl3N8_.js +0 -86
- package/dist/component/dagre-BM42HDAG-BoPUzTvD.js +0 -448
- package/dist/component/diagram-2AECGRRQ-PIXCGxIt.js +0 -220
- package/dist/component/diagram-5GNKFQAL-CbJxbGBh.js +0 -126
- package/dist/component/ganttDiagram-6RSMTGT7-F_XUzD1p.js +0 -2709
- package/dist/component/layout-Bu6nRdWm.js +0 -1731
- package/dist/component/pieDiagram-4H26LBE5-BkEktPwZ.js +0 -166
- package/dist/component/vennDiagram-CIIHVFJN-Dk8PKmfb.js +0 -1560
|
@@ -1,207 +1,208 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
import { s as
|
|
3
|
-
import { _ as f, l as _, c as
|
|
1
|
+
import { g as te } from "./chunk-XXDRQBXY-XJadTIK5.js";
|
|
2
|
+
import { s as ee } from "./chunk-KBJHAD2P-B9qL0VLM.js";
|
|
3
|
+
import { _ as f, l as _, c as $, x as se, y as ie, a as re, b as ae, g as ne, s as oe, o as le, p as ce, ac as he, k as j, q as ue, d as bt, a8 as de } from "./mermaid-GHXKKRXX-BaBCeViM.js";
|
|
4
|
+
import { f as fe } from "./chunk-2GRJ4B5K-ChTMjM-v.js";
|
|
4
5
|
globalThis.process = globalThis.process || { env: {} };
|
|
5
6
|
globalThis.global = globalThis.global || globalThis;
|
|
6
|
-
var
|
|
7
|
-
var t = /* @__PURE__ */ f(function(
|
|
8
|
-
for (
|
|
9
|
-
return
|
|
10
|
-
}, "o"), e = [1, 2],
|
|
7
|
+
var vt = (function() {
|
|
8
|
+
var t = /* @__PURE__ */ f(function(V, a, d, r) {
|
|
9
|
+
for (d = d || {}, r = V.length; r--; d[V[r]] = a) ;
|
|
10
|
+
return d;
|
|
11
|
+
}, "o"), e = [1, 2], o = [1, 3], s = [1, 4], c = [2, 4], h = [1, 9], p = [1, 11], y = [1, 16], n = [1, 17], T = [1, 18], m = [1, 19], O = [1, 33], x = [1, 20], k = [1, 21], u = [1, 22], L = [1, 23], I = [1, 24], v = [1, 26], F = [1, 27], C = [1, 28], P = [1, 29], w = [1, 30], H = [1, 31], it = [1, 32], rt = [1, 35], at = [1, 36], nt = [1, 37], ot = [1, 38], z = [1, 34], S = [1, 4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], lt = [1, 4, 5, 14, 15, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 39, 40, 41, 45, 48, 51, 52, 53, 54, 57], xt = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], yt = {
|
|
11
12
|
trace: /* @__PURE__ */ f(function() {
|
|
12
13
|
}, "trace"),
|
|
13
14
|
yy: {},
|
|
14
15
|
symbols_: { error: 2, start: 3, SPACE: 4, NL: 5, SD: 6, document: 7, line: 8, statement: 9, classDefStatement: 10, styleStatement: 11, cssClassStatement: 12, idStatement: 13, DESCR: 14, "-->": 15, HIDE_EMPTY: 16, scale: 17, WIDTH: 18, COMPOSIT_STATE: 19, STRUCT_START: 20, STRUCT_STOP: 21, STATE_DESCR: 22, AS: 23, ID: 24, FORK: 25, JOIN: 26, CHOICE: 27, CONCURRENT: 28, note: 29, notePosition: 30, NOTE_TEXT: 31, direction: 32, acc_title: 33, acc_title_value: 34, acc_descr: 35, acc_descr_value: 36, acc_descr_multiline_value: 37, CLICK: 38, STRING: 39, HREF: 40, classDef: 41, CLASSDEF_ID: 42, CLASSDEF_STYLEOPTS: 43, DEFAULT: 44, style: 45, STYLE_IDS: 46, STYLEDEF_STYLEOPTS: 47, class: 48, CLASSENTITY_IDS: 49, STYLECLASS: 50, direction_tb: 51, direction_bt: 52, direction_rl: 53, direction_lr: 54, eol: 55, ";": 56, EDGE_STATE: 57, STYLE_SEPARATOR: 58, left_of: 59, right_of: 60, $accept: 0, $end: 1 },
|
|
15
16
|
terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 14: "DESCR", 15: "-->", 16: "HIDE_EMPTY", 17: "scale", 18: "WIDTH", 19: "COMPOSIT_STATE", 20: "STRUCT_START", 21: "STRUCT_STOP", 22: "STATE_DESCR", 23: "AS", 24: "ID", 25: "FORK", 26: "JOIN", 27: "CHOICE", 28: "CONCURRENT", 29: "note", 31: "NOTE_TEXT", 33: "acc_title", 34: "acc_title_value", 35: "acc_descr", 36: "acc_descr_value", 37: "acc_descr_multiline_value", 38: "CLICK", 39: "STRING", 40: "HREF", 41: "classDef", 42: "CLASSDEF_ID", 43: "CLASSDEF_STYLEOPTS", 44: "DEFAULT", 45: "style", 46: "STYLE_IDS", 47: "STYLEDEF_STYLEOPTS", 48: "class", 49: "CLASSENTITY_IDS", 50: "STYLECLASS", 51: "direction_tb", 52: "direction_bt", 53: "direction_rl", 54: "direction_lr", 56: ";", 57: "EDGE_STATE", 58: "STYLE_SEPARATOR", 59: "left_of", 60: "right_of" },
|
|
16
17
|
productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [9, 5], [9, 5], [10, 3], [10, 3], [11, 3], [12, 3], [32, 1], [32, 1], [32, 1], [32, 1], [55, 1], [55, 1], [13, 1], [13, 1], [13, 3], [13, 3], [30, 1], [30, 1]],
|
|
17
|
-
performAction: /* @__PURE__ */ f(function(a,
|
|
18
|
-
var
|
|
18
|
+
performAction: /* @__PURE__ */ f(function(a, d, r, g, E, i, B) {
|
|
19
|
+
var l = i.length - 1;
|
|
19
20
|
switch (E) {
|
|
20
21
|
case 3:
|
|
21
|
-
return
|
|
22
|
+
return g.setRootDoc(i[l]), i[l];
|
|
22
23
|
case 4:
|
|
23
24
|
this.$ = [];
|
|
24
25
|
break;
|
|
25
26
|
case 5:
|
|
26
|
-
i[
|
|
27
|
+
i[l] != "nl" && (i[l - 1].push(i[l]), this.$ = i[l - 1]);
|
|
27
28
|
break;
|
|
28
29
|
case 6:
|
|
29
30
|
case 7:
|
|
30
|
-
this.$ = i[
|
|
31
|
+
this.$ = i[l];
|
|
31
32
|
break;
|
|
32
33
|
case 8:
|
|
33
34
|
this.$ = "nl";
|
|
34
35
|
break;
|
|
35
36
|
case 12:
|
|
36
|
-
this.$ = i[
|
|
37
|
+
this.$ = i[l];
|
|
37
38
|
break;
|
|
38
39
|
case 13:
|
|
39
|
-
const
|
|
40
|
-
|
|
40
|
+
const Q = i[l - 1];
|
|
41
|
+
Q.description = g.trimColon(i[l]), this.$ = Q;
|
|
41
42
|
break;
|
|
42
43
|
case 14:
|
|
43
|
-
this.$ = { stmt: "relation", state1: i[
|
|
44
|
+
this.$ = { stmt: "relation", state1: i[l - 2], state2: i[l] };
|
|
44
45
|
break;
|
|
45
46
|
case 15:
|
|
46
|
-
const gt =
|
|
47
|
-
this.$ = { stmt: "relation", state1: i[
|
|
47
|
+
const gt = g.trimColon(i[l]);
|
|
48
|
+
this.$ = { stmt: "relation", state1: i[l - 3], state2: i[l - 1], description: gt };
|
|
48
49
|
break;
|
|
49
50
|
case 19:
|
|
50
|
-
this.$ = { stmt: "state", id: i[
|
|
51
|
+
this.$ = { stmt: "state", id: i[l - 3], type: "default", description: "", doc: i[l - 1] };
|
|
51
52
|
break;
|
|
52
53
|
case 20:
|
|
53
|
-
var
|
|
54
|
-
if (i[
|
|
55
|
-
var ht = i[
|
|
56
|
-
|
|
54
|
+
var Y = i[l], K = i[l - 2].trim();
|
|
55
|
+
if (i[l].match(":")) {
|
|
56
|
+
var ht = i[l].split(":");
|
|
57
|
+
Y = ht[0], K = [K, ht[1]];
|
|
57
58
|
}
|
|
58
|
-
this.$ = { stmt: "state", id:
|
|
59
|
+
this.$ = { stmt: "state", id: Y, type: "default", description: K };
|
|
59
60
|
break;
|
|
60
61
|
case 21:
|
|
61
|
-
this.$ = { stmt: "state", id: i[
|
|
62
|
+
this.$ = { stmt: "state", id: i[l - 3], type: "default", description: i[l - 5], doc: i[l - 1] };
|
|
62
63
|
break;
|
|
63
64
|
case 22:
|
|
64
|
-
this.$ = { stmt: "state", id: i[
|
|
65
|
+
this.$ = { stmt: "state", id: i[l], type: "fork" };
|
|
65
66
|
break;
|
|
66
67
|
case 23:
|
|
67
|
-
this.$ = { stmt: "state", id: i[
|
|
68
|
+
this.$ = { stmt: "state", id: i[l], type: "join" };
|
|
68
69
|
break;
|
|
69
70
|
case 24:
|
|
70
|
-
this.$ = { stmt: "state", id: i[
|
|
71
|
+
this.$ = { stmt: "state", id: i[l], type: "choice" };
|
|
71
72
|
break;
|
|
72
73
|
case 25:
|
|
73
|
-
this.$ = { stmt: "state", id:
|
|
74
|
+
this.$ = { stmt: "state", id: g.getDividerId(), type: "divider" };
|
|
74
75
|
break;
|
|
75
76
|
case 26:
|
|
76
|
-
this.$ = { stmt: "state", id: i[
|
|
77
|
+
this.$ = { stmt: "state", id: i[l - 1].trim(), note: { position: i[l - 2].trim(), text: i[l].trim() } };
|
|
77
78
|
break;
|
|
78
79
|
case 29:
|
|
79
|
-
this.$ = i[
|
|
80
|
+
this.$ = i[l].trim(), g.setAccTitle(this.$);
|
|
80
81
|
break;
|
|
81
82
|
case 30:
|
|
82
83
|
case 31:
|
|
83
|
-
this.$ = i[
|
|
84
|
+
this.$ = i[l].trim(), g.setAccDescription(this.$);
|
|
84
85
|
break;
|
|
85
86
|
case 32:
|
|
86
87
|
this.$ = {
|
|
87
88
|
stmt: "click",
|
|
88
|
-
id: i[
|
|
89
|
-
url: i[
|
|
90
|
-
tooltip: i[
|
|
89
|
+
id: i[l - 3],
|
|
90
|
+
url: i[l - 2],
|
|
91
|
+
tooltip: i[l - 1]
|
|
91
92
|
};
|
|
92
93
|
break;
|
|
93
94
|
case 33:
|
|
94
95
|
this.$ = {
|
|
95
96
|
stmt: "click",
|
|
96
|
-
id: i[
|
|
97
|
-
url: i[
|
|
97
|
+
id: i[l - 3],
|
|
98
|
+
url: i[l - 1],
|
|
98
99
|
tooltip: ""
|
|
99
100
|
};
|
|
100
101
|
break;
|
|
101
102
|
case 34:
|
|
102
103
|
case 35:
|
|
103
|
-
this.$ = { stmt: "classDef", id: i[
|
|
104
|
+
this.$ = { stmt: "classDef", id: i[l - 1].trim(), classes: i[l].trim() };
|
|
104
105
|
break;
|
|
105
106
|
case 36:
|
|
106
|
-
this.$ = { stmt: "style", id: i[
|
|
107
|
+
this.$ = { stmt: "style", id: i[l - 1].trim(), styleClass: i[l].trim() };
|
|
107
108
|
break;
|
|
108
109
|
case 37:
|
|
109
|
-
this.$ = { stmt: "applyClass", id: i[
|
|
110
|
+
this.$ = { stmt: "applyClass", id: i[l - 1].trim(), styleClass: i[l].trim() };
|
|
110
111
|
break;
|
|
111
112
|
case 38:
|
|
112
|
-
|
|
113
|
+
g.setDirection("TB"), this.$ = { stmt: "dir", value: "TB" };
|
|
113
114
|
break;
|
|
114
115
|
case 39:
|
|
115
|
-
|
|
116
|
+
g.setDirection("BT"), this.$ = { stmt: "dir", value: "BT" };
|
|
116
117
|
break;
|
|
117
118
|
case 40:
|
|
118
|
-
|
|
119
|
+
g.setDirection("RL"), this.$ = { stmt: "dir", value: "RL" };
|
|
119
120
|
break;
|
|
120
121
|
case 41:
|
|
121
|
-
|
|
122
|
+
g.setDirection("LR"), this.$ = { stmt: "dir", value: "LR" };
|
|
122
123
|
break;
|
|
123
124
|
case 44:
|
|
124
125
|
case 45:
|
|
125
|
-
this.$ = { stmt: "state", id: i[
|
|
126
|
+
this.$ = { stmt: "state", id: i[l].trim(), type: "default", description: "" };
|
|
126
127
|
break;
|
|
127
128
|
case 46:
|
|
128
|
-
this.$ = { stmt: "state", id: i[
|
|
129
|
+
this.$ = { stmt: "state", id: i[l - 2].trim(), classes: [i[l].trim()], type: "default", description: "" };
|
|
129
130
|
break;
|
|
130
131
|
case 47:
|
|
131
|
-
this.$ = { stmt: "state", id: i[
|
|
132
|
+
this.$ = { stmt: "state", id: i[l - 2].trim(), classes: [i[l].trim()], type: "default", description: "" };
|
|
132
133
|
break;
|
|
133
134
|
}
|
|
134
135
|
}, "anonymous"),
|
|
135
|
-
table: [{ 3: 1, 4: e, 5:
|
|
136
|
+
table: [{ 3: 1, 4: e, 5: o, 6: s }, { 1: [3] }, { 3: 5, 4: e, 5: o, 6: s }, { 3: 6, 4: e, 5: o, 6: s }, t([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], c, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: h, 5: p, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: y, 17: n, 19: T, 22: m, 24: O, 25: x, 26: k, 27: u, 28: L, 29: I, 32: 25, 33: v, 35: F, 37: C, 38: P, 41: w, 45: H, 48: it, 51: rt, 52: at, 53: nt, 54: ot, 57: z }, t(S, [2, 5]), { 9: 39, 10: 12, 11: 13, 12: 14, 13: 15, 16: y, 17: n, 19: T, 22: m, 24: O, 25: x, 26: k, 27: u, 28: L, 29: I, 32: 25, 33: v, 35: F, 37: C, 38: P, 41: w, 45: H, 48: it, 51: rt, 52: at, 53: nt, 54: ot, 57: z }, t(S, [2, 7]), t(S, [2, 8]), t(S, [2, 9]), t(S, [2, 10]), t(S, [2, 11]), t(S, [2, 12], { 14: [1, 40], 15: [1, 41] }), t(S, [2, 16]), { 18: [1, 42] }, t(S, [2, 18], { 20: [1, 43] }), { 23: [1, 44] }, t(S, [2, 22]), t(S, [2, 23]), t(S, [2, 24]), t(S, [2, 25]), { 30: 45, 31: [1, 46], 59: [1, 47], 60: [1, 48] }, t(S, [2, 28]), { 34: [1, 49] }, { 36: [1, 50] }, t(S, [2, 31]), { 13: 51, 24: O, 57: z }, { 42: [1, 52], 44: [1, 53] }, { 46: [1, 54] }, { 49: [1, 55] }, t(lt, [2, 44], { 58: [1, 56] }), t(lt, [2, 45], { 58: [1, 57] }), t(S, [2, 38]), t(S, [2, 39]), t(S, [2, 40]), t(S, [2, 41]), t(S, [2, 6]), t(S, [2, 13]), { 13: 58, 24: O, 57: z }, t(S, [2, 17]), t(xt, c, { 7: 59 }), { 24: [1, 60] }, { 24: [1, 61] }, { 23: [1, 62] }, { 24: [2, 48] }, { 24: [2, 49] }, t(S, [2, 29]), t(S, [2, 30]), { 39: [1, 63], 40: [1, 64] }, { 43: [1, 65] }, { 43: [1, 66] }, { 47: [1, 67] }, { 50: [1, 68] }, { 24: [1, 69] }, { 24: [1, 70] }, t(S, [2, 14], { 14: [1, 71] }), { 4: h, 5: p, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: y, 17: n, 19: T, 21: [1, 72], 22: m, 24: O, 25: x, 26: k, 27: u, 28: L, 29: I, 32: 25, 33: v, 35: F, 37: C, 38: P, 41: w, 45: H, 48: it, 51: rt, 52: at, 53: nt, 54: ot, 57: z }, t(S, [2, 20], { 20: [1, 73] }), { 31: [1, 74] }, { 24: [1, 75] }, { 39: [1, 76] }, { 39: [1, 77] }, t(S, [2, 34]), t(S, [2, 35]), t(S, [2, 36]), t(S, [2, 37]), t(lt, [2, 46]), t(lt, [2, 47]), t(S, [2, 15]), t(S, [2, 19]), t(xt, c, { 7: 78 }), t(S, [2, 26]), t(S, [2, 27]), { 5: [1, 79] }, { 5: [1, 80] }, { 4: h, 5: p, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: y, 17: n, 19: T, 21: [1, 81], 22: m, 24: O, 25: x, 26: k, 27: u, 28: L, 29: I, 32: 25, 33: v, 35: F, 37: C, 38: P, 41: w, 45: H, 48: it, 51: rt, 52: at, 53: nt, 54: ot, 57: z }, t(S, [2, 32]), t(S, [2, 33]), t(S, [2, 21])],
|
|
136
137
|
defaultActions: { 5: [2, 1], 6: [2, 2], 47: [2, 48], 48: [2, 49] },
|
|
137
|
-
parseError: /* @__PURE__ */ f(function(a,
|
|
138
|
-
if (
|
|
138
|
+
parseError: /* @__PURE__ */ f(function(a, d) {
|
|
139
|
+
if (d.recoverable)
|
|
139
140
|
this.trace(a);
|
|
140
141
|
else {
|
|
141
142
|
var r = new Error(a);
|
|
142
|
-
throw r.hash =
|
|
143
|
+
throw r.hash = d, r;
|
|
143
144
|
}
|
|
144
145
|
}, "parseError"),
|
|
145
146
|
parse: /* @__PURE__ */ f(function(a) {
|
|
146
|
-
var
|
|
147
|
+
var d = this, r = [0], g = [], E = [null], i = [], B = this.table, l = "", Y = 0, K = 0, ht = 2, Q = 1, gt = i.slice.call(arguments, 1), b = Object.create(this.lexer), U = { yy: {} };
|
|
147
148
|
for (var Tt in this.yy)
|
|
148
|
-
Object.prototype.hasOwnProperty.call(this.yy, Tt) && (
|
|
149
|
-
b.setInput(a,
|
|
149
|
+
Object.prototype.hasOwnProperty.call(this.yy, Tt) && (U.yy[Tt] = this.yy[Tt]);
|
|
150
|
+
b.setInput(a, U.yy), U.yy.lexer = b, U.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
|
|
150
151
|
var Et = b.yylloc;
|
|
151
152
|
i.push(Et);
|
|
152
|
-
var
|
|
153
|
-
typeof
|
|
154
|
-
function
|
|
155
|
-
r.length = r.length - 2 *
|
|
153
|
+
var Qt = b.options && b.options.ranges;
|
|
154
|
+
typeof U.yy.parseError == "function" ? this.parseError = U.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
155
|
+
function Zt(N) {
|
|
156
|
+
r.length = r.length - 2 * N, E.length = E.length - N, i.length = i.length - N;
|
|
156
157
|
}
|
|
157
|
-
f(
|
|
158
|
-
function
|
|
159
|
-
var
|
|
160
|
-
return
|
|
158
|
+
f(Zt, "popStack");
|
|
159
|
+
function Lt() {
|
|
160
|
+
var N;
|
|
161
|
+
return N = g.pop() || b.lex() || Q, typeof N != "number" && (N instanceof Array && (g = N, N = g.pop()), N = d.symbols_[N] || N), N;
|
|
161
162
|
}
|
|
162
|
-
f(
|
|
163
|
-
for (var
|
|
164
|
-
if (
|
|
163
|
+
f(Lt, "lex");
|
|
164
|
+
for (var A, W, R, _t, X = {}, ut, G, It, dt; ; ) {
|
|
165
|
+
if (W = r[r.length - 1], this.defaultActions[W] ? R = this.defaultActions[W] : ((A === null || typeof A > "u") && (A = Lt()), R = B[W] && B[W][A]), typeof R > "u" || !R.length || !R[0]) {
|
|
165
166
|
var mt = "";
|
|
166
167
|
dt = [];
|
|
167
|
-
for (ut in
|
|
168
|
+
for (ut in B[W])
|
|
168
169
|
this.terminals_[ut] && ut > ht && dt.push("'" + this.terminals_[ut] + "'");
|
|
169
|
-
b.showPosition ? mt = "Parse error on line " + (
|
|
170
|
+
b.showPosition ? mt = "Parse error on line " + (Y + 1) + `:
|
|
170
171
|
` + b.showPosition() + `
|
|
171
|
-
Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[
|
|
172
|
+
Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[A] || A) + "'" : mt = "Parse error on line " + (Y + 1) + ": Unexpected " + (A == Q ? "end of input" : "'" + (this.terminals_[A] || A) + "'"), this.parseError(mt, {
|
|
172
173
|
text: b.match,
|
|
173
|
-
token: this.terminals_[
|
|
174
|
+
token: this.terminals_[A] || A,
|
|
174
175
|
line: b.yylineno,
|
|
175
176
|
loc: Et,
|
|
176
177
|
expected: dt
|
|
177
178
|
});
|
|
178
179
|
}
|
|
179
180
|
if (R[0] instanceof Array && R.length > 1)
|
|
180
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
181
|
+
throw new Error("Parse Error: multiple actions possible at state: " + W + ", token: " + A);
|
|
181
182
|
switch (R[0]) {
|
|
182
183
|
case 1:
|
|
183
|
-
r.push(
|
|
184
|
+
r.push(A), E.push(b.yytext), i.push(b.yylloc), r.push(R[1]), A = null, K = b.yyleng, l = b.yytext, Y = b.yylineno, Et = b.yylloc;
|
|
184
185
|
break;
|
|
185
186
|
case 2:
|
|
186
|
-
if (G = this.productions_[R[1]][1],
|
|
187
|
+
if (G = this.productions_[R[1]][1], X.$ = E[E.length - G], X._$ = {
|
|
187
188
|
first_line: i[i.length - (G || 1)].first_line,
|
|
188
189
|
last_line: i[i.length - 1].last_line,
|
|
189
190
|
first_column: i[i.length - (G || 1)].first_column,
|
|
190
191
|
last_column: i[i.length - 1].last_column
|
|
191
|
-
},
|
|
192
|
+
}, Qt && (X._$.range = [
|
|
192
193
|
i[i.length - (G || 1)].range[0],
|
|
193
194
|
i[i.length - 1].range[1]
|
|
194
|
-
]), _t = this.performAction.apply(
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
]), _t = this.performAction.apply(X, [
|
|
196
|
+
l,
|
|
197
|
+
K,
|
|
198
|
+
Y,
|
|
199
|
+
U.yy,
|
|
199
200
|
R[1],
|
|
200
201
|
E,
|
|
201
202
|
i
|
|
202
203
|
].concat(gt)), typeof _t < "u")
|
|
203
204
|
return _t;
|
|
204
|
-
G && (r = r.slice(0, -1 * G * 2), E = E.slice(0, -1 * G), i = i.slice(0, -1 * G)), r.push(this.productions_[R[1]][0]), E.push(
|
|
205
|
+
G && (r = r.slice(0, -1 * G * 2), E = E.slice(0, -1 * G), i = i.slice(0, -1 * G)), r.push(this.productions_[R[1]][0]), E.push(X.$), i.push(X._$), It = B[r[r.length - 2]][r[r.length - 1]], r.push(It);
|
|
205
206
|
break;
|
|
206
207
|
case 3:
|
|
207
208
|
return !0;
|
|
@@ -209,18 +210,18 @@ Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : mt =
|
|
|
209
210
|
}
|
|
210
211
|
return !0;
|
|
211
212
|
}, "parse")
|
|
212
|
-
},
|
|
213
|
-
var
|
|
213
|
+
}, qt = /* @__PURE__ */ (function() {
|
|
214
|
+
var V = {
|
|
214
215
|
EOF: 1,
|
|
215
|
-
parseError: /* @__PURE__ */ f(function(
|
|
216
|
+
parseError: /* @__PURE__ */ f(function(d, r) {
|
|
216
217
|
if (this.yy.parser)
|
|
217
|
-
this.yy.parser.parseError(
|
|
218
|
+
this.yy.parser.parseError(d, r);
|
|
218
219
|
else
|
|
219
|
-
throw new Error(
|
|
220
|
+
throw new Error(d);
|
|
220
221
|
}, "parseError"),
|
|
221
222
|
// resets the lexer, sets new input
|
|
222
|
-
setInput: /* @__PURE__ */ f(function(a,
|
|
223
|
-
return this.yy =
|
|
223
|
+
setInput: /* @__PURE__ */ f(function(a, d) {
|
|
224
|
+
return this.yy = d || this.yy || {}, this._input = a, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
|
224
225
|
first_line: 1,
|
|
225
226
|
first_column: 0,
|
|
226
227
|
last_line: 1,
|
|
@@ -231,22 +232,22 @@ Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : mt =
|
|
|
231
232
|
input: /* @__PURE__ */ f(function() {
|
|
232
233
|
var a = this._input[0];
|
|
233
234
|
this.yytext += a, this.yyleng++, this.offset++, this.match += a, this.matched += a;
|
|
234
|
-
var
|
|
235
|
-
return
|
|
235
|
+
var d = a.match(/(?:\r\n?|\n).*/g);
|
|
236
|
+
return d ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), a;
|
|
236
237
|
}, "input"),
|
|
237
238
|
// unshifts one char (or a string) into the input
|
|
238
239
|
unput: /* @__PURE__ */ f(function(a) {
|
|
239
|
-
var
|
|
240
|
-
this._input = a + this._input, this.yytext = this.yytext.substr(0, this.yytext.length -
|
|
241
|
-
var
|
|
240
|
+
var d = a.length, r = a.split(/(?:\r\n?|\n)/g);
|
|
241
|
+
this._input = a + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - d), this.offset -= d;
|
|
242
|
+
var g = this.match.split(/(?:\r\n?|\n)/g);
|
|
242
243
|
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), r.length - 1 && (this.yylineno -= r.length - 1);
|
|
243
244
|
var E = this.yylloc.range;
|
|
244
245
|
return this.yylloc = {
|
|
245
246
|
first_line: this.yylloc.first_line,
|
|
246
247
|
last_line: this.yylineno + 1,
|
|
247
248
|
first_column: this.yylloc.first_column,
|
|
248
|
-
last_column: r ? (r.length ===
|
|
249
|
-
}, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng -
|
|
249
|
+
last_column: r ? (r.length === g.length ? this.yylloc.first_column : 0) + g[g.length - r.length].length - r[0].length : this.yylloc.first_column - d
|
|
250
|
+
}, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - d]), this.yyleng = this.yytext.length, this;
|
|
250
251
|
}, "unput"),
|
|
251
252
|
// When called from action, caches matched text and appends it on next action
|
|
252
253
|
more: /* @__PURE__ */ f(function() {
|
|
@@ -281,13 +282,13 @@ Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : mt =
|
|
|
281
282
|
}, "upcomingInput"),
|
|
282
283
|
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
283
284
|
showPosition: /* @__PURE__ */ f(function() {
|
|
284
|
-
var a = this.pastInput(),
|
|
285
|
+
var a = this.pastInput(), d = new Array(a.length + 1).join("-");
|
|
285
286
|
return a + this.upcomingInput() + `
|
|
286
|
-
` +
|
|
287
|
+
` + d + "^";
|
|
287
288
|
}, "showPosition"),
|
|
288
289
|
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
289
|
-
test_match: /* @__PURE__ */ f(function(a,
|
|
290
|
-
var r,
|
|
290
|
+
test_match: /* @__PURE__ */ f(function(a, d) {
|
|
291
|
+
var r, g, E;
|
|
291
292
|
if (this.options.backtrack_lexer && (E = {
|
|
292
293
|
yylineno: this.yylineno,
|
|
293
294
|
yylloc: {
|
|
@@ -307,12 +308,12 @@ Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : mt =
|
|
|
307
308
|
yy: this.yy,
|
|
308
309
|
conditionStack: this.conditionStack.slice(0),
|
|
309
310
|
done: this.done
|
|
310
|
-
}, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))),
|
|
311
|
+
}, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), g = a[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
|
|
311
312
|
first_line: this.yylloc.last_line,
|
|
312
313
|
last_line: this.yylineno + 1,
|
|
313
314
|
first_column: this.yylloc.last_column,
|
|
314
|
-
last_column:
|
|
315
|
-
}, this.yytext += a[0], this.match += a[0], this.matches = a, 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(a[0].length), this.matched += a[0], r = this.performAction.call(this, this.yy, this,
|
|
315
|
+
last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + a[0].length
|
|
316
|
+
}, this.yytext += a[0], this.match += a[0], this.matches = a, 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(a[0].length), this.matched += a[0], r = this.performAction.call(this, this.yy, this, d, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), r)
|
|
316
317
|
return r;
|
|
317
318
|
if (this._backtrack) {
|
|
318
319
|
for (var i in E)
|
|
@@ -326,22 +327,22 @@ Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : mt =
|
|
|
326
327
|
if (this.done)
|
|
327
328
|
return this.EOF;
|
|
328
329
|
this._input || (this.done = !0);
|
|
329
|
-
var a,
|
|
330
|
+
var a, d, r, g;
|
|
330
331
|
this._more || (this.yytext = "", this.match = "");
|
|
331
332
|
for (var E = this._currentRules(), i = 0; i < E.length; i++)
|
|
332
|
-
if (r = this._input.match(this.rules[E[i]]), r && (!
|
|
333
|
-
if (
|
|
333
|
+
if (r = this._input.match(this.rules[E[i]]), r && (!d || r[0].length > d[0].length)) {
|
|
334
|
+
if (d = r, g = i, this.options.backtrack_lexer) {
|
|
334
335
|
if (a = this.test_match(r, E[i]), a !== !1)
|
|
335
336
|
return a;
|
|
336
337
|
if (this._backtrack) {
|
|
337
|
-
|
|
338
|
+
d = !1;
|
|
338
339
|
continue;
|
|
339
340
|
} else
|
|
340
341
|
return !1;
|
|
341
342
|
} else if (!this.options.flex)
|
|
342
343
|
break;
|
|
343
344
|
}
|
|
344
|
-
return
|
|
345
|
+
return d ? (a = this.test_match(d, E[g]), a !== !1 ? a : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
|
345
346
|
` + this.showPosition(), {
|
|
346
347
|
text: "",
|
|
347
348
|
token: null,
|
|
@@ -350,47 +351,47 @@ Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : mt =
|
|
|
350
351
|
}, "next"),
|
|
351
352
|
// return next match that has a token
|
|
352
353
|
lex: /* @__PURE__ */ f(function() {
|
|
353
|
-
var
|
|
354
|
-
return
|
|
354
|
+
var d = this.next();
|
|
355
|
+
return d || this.lex();
|
|
355
356
|
}, "lex"),
|
|
356
357
|
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
357
|
-
begin: /* @__PURE__ */ f(function(
|
|
358
|
-
this.conditionStack.push(
|
|
358
|
+
begin: /* @__PURE__ */ f(function(d) {
|
|
359
|
+
this.conditionStack.push(d);
|
|
359
360
|
}, "begin"),
|
|
360
361
|
// pop the previously active lexer condition state off the condition stack
|
|
361
362
|
popState: /* @__PURE__ */ f(function() {
|
|
362
|
-
var
|
|
363
|
-
return
|
|
363
|
+
var d = this.conditionStack.length - 1;
|
|
364
|
+
return d > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
364
365
|
}, "popState"),
|
|
365
366
|
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
366
367
|
_currentRules: /* @__PURE__ */ f(function() {
|
|
367
368
|
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
|
368
369
|
}, "_currentRules"),
|
|
369
370
|
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
370
|
-
topState: /* @__PURE__ */ f(function(
|
|
371
|
-
return
|
|
371
|
+
topState: /* @__PURE__ */ f(function(d) {
|
|
372
|
+
return d = this.conditionStack.length - 1 - Math.abs(d || 0), d >= 0 ? this.conditionStack[d] : "INITIAL";
|
|
372
373
|
}, "topState"),
|
|
373
374
|
// alias for begin(condition)
|
|
374
|
-
pushState: /* @__PURE__ */ f(function(
|
|
375
|
-
this.begin(
|
|
375
|
+
pushState: /* @__PURE__ */ f(function(d) {
|
|
376
|
+
this.begin(d);
|
|
376
377
|
}, "pushState"),
|
|
377
378
|
// return the number of states currently on the stack
|
|
378
379
|
stateStackSize: /* @__PURE__ */ f(function() {
|
|
379
380
|
return this.conditionStack.length;
|
|
380
381
|
}, "stateStackSize"),
|
|
381
382
|
options: { "case-insensitive": !0 },
|
|
382
|
-
performAction: /* @__PURE__ */ f(function(
|
|
383
|
+
performAction: /* @__PURE__ */ f(function(d, r, g, E) {
|
|
383
384
|
function i() {
|
|
384
|
-
const
|
|
385
|
-
if (
|
|
385
|
+
const B = r.yytext.indexOf("%%");
|
|
386
|
+
if (B === 0)
|
|
386
387
|
return !1;
|
|
387
|
-
if (
|
|
388
|
-
const
|
|
389
|
-
|
|
388
|
+
if (B > 0) {
|
|
389
|
+
const l = r.yytext.slice(0, B), Y = r.yytext.slice(B);
|
|
390
|
+
Y && d.lexer.unput(Y), r.yytext = l;
|
|
390
391
|
}
|
|
391
392
|
return !0;
|
|
392
393
|
}
|
|
393
|
-
switch (f(i, "processId"),
|
|
394
|
+
switch (f(i, "processId"), g) {
|
|
394
395
|
case 0:
|
|
395
396
|
return 38;
|
|
396
397
|
case 1:
|
|
@@ -503,301 +504,304 @@ Expecting ` + dt.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : mt =
|
|
|
503
504
|
case 51:
|
|
504
505
|
return "STATE_DESCR";
|
|
505
506
|
case 52:
|
|
506
|
-
|
|
507
|
+
throw new Error('Error: State name must be a single word. Found: "' + r.yytext.trim() + '"');
|
|
507
508
|
case 53:
|
|
509
|
+
return 19;
|
|
510
|
+
case 54:
|
|
508
511
|
this.popState();
|
|
509
512
|
break;
|
|
510
|
-
case 54:
|
|
511
|
-
return this.popState(), this.pushState("struct"), 20;
|
|
512
513
|
case 55:
|
|
513
|
-
return this.popState(),
|
|
514
|
+
return this.popState(), this.pushState("struct"), 20;
|
|
514
515
|
case 56:
|
|
515
|
-
|
|
516
|
+
return this.popState(), 21;
|
|
516
517
|
case 57:
|
|
517
|
-
|
|
518
|
+
break;
|
|
518
519
|
case 58:
|
|
519
|
-
return this.
|
|
520
|
+
return this.begin("NOTE"), 29;
|
|
520
521
|
case 59:
|
|
521
|
-
return this.popState(), this.pushState("NOTE_ID"),
|
|
522
|
+
return this.popState(), this.pushState("NOTE_ID"), 59;
|
|
522
523
|
case 60:
|
|
524
|
+
return this.popState(), this.pushState("NOTE_ID"), 60;
|
|
525
|
+
case 61:
|
|
523
526
|
this.popState(), this.pushState("FLOATING_NOTE");
|
|
524
527
|
break;
|
|
525
|
-
case 61:
|
|
526
|
-
return this.popState(), this.pushState("FLOATING_NOTE_ID"), "AS";
|
|
527
528
|
case 62:
|
|
528
|
-
|
|
529
|
+
return this.popState(), this.pushState("FLOATING_NOTE_ID"), "AS";
|
|
529
530
|
case 63:
|
|
530
|
-
|
|
531
|
+
break;
|
|
531
532
|
case 64:
|
|
532
|
-
return
|
|
533
|
+
return "NOTE_TEXT";
|
|
533
534
|
case 65:
|
|
534
|
-
return i() ? (this.popState(),
|
|
535
|
+
return i() ? (this.popState(), "ID") : void 0;
|
|
535
536
|
case 66:
|
|
536
|
-
return this.popState(),
|
|
537
|
+
return i() ? (this.popState(), this.pushState("NOTE_TEXT"), 24) : void 0;
|
|
537
538
|
case 67:
|
|
538
|
-
return this.popState(), r.yytext = r.yytext.
|
|
539
|
+
return this.popState(), r.yytext = r.yytext.substr(2).trim(), 31;
|
|
539
540
|
case 68:
|
|
540
|
-
return
|
|
541
|
+
return this.popState(), r.yytext = r.yytext.slice(0, -8).trim(), 31;
|
|
541
542
|
case 69:
|
|
542
543
|
return 6;
|
|
543
544
|
case 70:
|
|
544
|
-
return
|
|
545
|
+
return 6;
|
|
545
546
|
case 71:
|
|
546
|
-
return
|
|
547
|
+
return 16;
|
|
547
548
|
case 72:
|
|
548
|
-
return
|
|
549
|
+
return 57;
|
|
549
550
|
case 73:
|
|
550
|
-
return
|
|
551
|
+
return i() ? 24 : void 0;
|
|
551
552
|
case 74:
|
|
552
|
-
return
|
|
553
|
+
return r.yytext = r.yytext.trim(), 14;
|
|
553
554
|
case 75:
|
|
554
|
-
return
|
|
555
|
+
return 15;
|
|
555
556
|
case 76:
|
|
556
|
-
return
|
|
557
|
+
return 28;
|
|
557
558
|
case 77:
|
|
558
|
-
return
|
|
559
|
+
return 58;
|
|
559
560
|
case 78:
|
|
561
|
+
return 5;
|
|
562
|
+
case 79:
|
|
560
563
|
return "INVALID";
|
|
561
564
|
}
|
|
562
565
|
}, "anonymous"),
|
|
563
|
-
rules: [/^(?:click\b)/i, /^(?:href\b)/i, /^(?:"[^"]*")/i, /^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:style\s+)/i, /^(?:[\w,]+\s+)/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<<fork>>)/i, /^(?:.*<<join>>)/i, /^(?:.*<<choice>>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?\n\s*end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i],
|
|
564
|
-
conditions: { LINE: { rules: [10, 11, 12], inclusive: !1 }, struct: { rules: [10, 11, 12, 23, 27, 30, 36, 43, 44, 45, 46,
|
|
566
|
+
rules: [/^(?:click\b)/i, /^(?:href\b)/i, /^(?:"[^"]*")/i, /^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:style\s+)/i, /^(?:[\w,]+\s+)/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<<fork>>)/i, /^(?:.*<<join>>)/i, /^(?:.*<<choice>>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:\w+\s+\w+.*?\{)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?\n\s*end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i],
|
|
567
|
+
conditions: { LINE: { rules: [10, 11, 12], inclusive: !1 }, struct: { rules: [10, 11, 12, 23, 27, 30, 36, 43, 44, 45, 46, 56, 57, 58, 72, 73, 74, 75, 76, 77], inclusive: !1 }, FLOATING_NOTE_ID: { rules: [65], inclusive: !1 }, FLOATING_NOTE: { rules: [62, 63, 64], inclusive: !1 }, NOTE_TEXT: { rules: [67, 68], inclusive: !1 }, NOTE_ID: { rules: [66], inclusive: !1 }, NOTE: { rules: [59, 60, 61], inclusive: !1 }, STYLEDEF_STYLEOPTS: { rules: [], inclusive: !1 }, STYLEDEF_STYLES: { rules: [32], inclusive: !1 }, STYLE_IDS: { rules: [], inclusive: !1 }, STYLE: { rules: [31], inclusive: !1 }, CLASS_STYLE: { rules: [29], inclusive: !1 }, CLASS: { rules: [28], inclusive: !1 }, CLASSDEFID: { rules: [26], inclusive: !1 }, CLASSDEF: { rules: [24, 25], inclusive: !1 }, acc_descr_multiline: { rules: [21, 22], inclusive: !1 }, acc_descr: { rules: [19], inclusive: !1 }, acc_title: { rules: [17], inclusive: !1 }, SCALE: { rules: [14, 15, 34, 35], inclusive: !1 }, ALIAS: { rules: [], inclusive: !1 }, STATE_ID: { rules: [49], inclusive: !1 }, STATE_STRING: { rules: [50, 51], inclusive: !1 }, FORK_STATE: { rules: [], inclusive: !1 }, STATE: { rules: [10, 11, 12, 37, 38, 39, 40, 41, 42, 47, 48, 52, 53, 54, 55], inclusive: !1 }, ID: { rules: [10, 11, 12], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 16, 18, 20, 23, 27, 30, 33, 36, 55, 58, 69, 70, 71, 72, 73, 74, 75, 77, 78, 79], inclusive: !0 } }
|
|
565
568
|
};
|
|
566
|
-
return
|
|
569
|
+
return V;
|
|
567
570
|
})();
|
|
568
|
-
yt.lexer =
|
|
571
|
+
yt.lexer = qt;
|
|
569
572
|
function ct() {
|
|
570
573
|
this.yy = {};
|
|
571
574
|
}
|
|
572
575
|
return f(ct, "Parser"), ct.prototype = yt, yt.Parser = ct, new ct();
|
|
573
576
|
})();
|
|
574
|
-
|
|
575
|
-
var
|
|
577
|
+
vt.parser = vt;
|
|
578
|
+
var Ue = vt, pe = "TB", Bt = "TB", wt = "dir", q = "state", J = "root", Ct = "relation", Se = "classDef", ye = "style", ge = "applyClass", et = "default", Yt = "divider", Gt = "fill:none", Vt = "fill: #333", Mt = "c", Ut = "markdown", Wt = "normal", kt = "rect", Dt = "rectWithTitle", Te = "stateStart", Ee = "stateEnd", Nt = "divider", Ot = "roundedWithTitle", _e = "note", me = "noteGroup", st = "statediagram", be = "state", ke = `${st}-${be}`, jt = "transition", De = "note", ve = "note-edge", Ce = `${jt} ${ve}`, Ae = `${st}-${De}`, xe = "cluster", Le = `${st}-${xe}`, Ie = "cluster-alt", we = `${st}-${Ie}`, Ht = "parent", zt = "note", Ne = "state", At = "----", Oe = `${At}${zt}`, Rt = `${At}${Ht}`, Kt = /* @__PURE__ */ f((t, e = Bt) => {
|
|
576
579
|
if (!t.doc)
|
|
577
580
|
return e;
|
|
578
|
-
let
|
|
581
|
+
let o = e;
|
|
579
582
|
for (const s of t.doc)
|
|
580
|
-
s.stmt === "dir" && (
|
|
581
|
-
return
|
|
582
|
-
}, "getDir"),
|
|
583
|
+
s.stmt === "dir" && (o = s.value);
|
|
584
|
+
return o;
|
|
585
|
+
}, "getDir"), Re = /* @__PURE__ */ f(function(t, e) {
|
|
583
586
|
return e.db.getClasses();
|
|
584
|
-
}, "getClasses"),
|
|
587
|
+
}, "getClasses"), $e = /* @__PURE__ */ f(async function(t, e, o, s) {
|
|
585
588
|
_.info("REF0:"), _.info("Drawing state diagram (v2)", e);
|
|
586
|
-
const { securityLevel:
|
|
589
|
+
const { securityLevel: c, state: h, layout: p } = $();
|
|
587
590
|
s.db.extract(s.db.getRootDocV2());
|
|
588
|
-
const
|
|
589
|
-
|
|
591
|
+
const y = s.db.getData(), n = te(e, c);
|
|
592
|
+
y.type = s.type, y.layoutAlgorithm = p, y.nodeSpacing = h?.nodeSpacing || 50, y.rankSpacing = h?.rankSpacing || 50, $().look === "neo" ? y.markers = ["barbNeo"] : y.markers = ["barb"], y.diagramId = e, await se(y, n);
|
|
590
593
|
const m = 8;
|
|
591
594
|
try {
|
|
592
|
-
(typeof s.db.getLinks == "function" ? s.db.getLinks() : /* @__PURE__ */ new Map()).forEach((
|
|
593
|
-
const
|
|
594
|
-
if (!
|
|
595
|
+
(typeof s.db.getLinks == "function" ? s.db.getLinks() : /* @__PURE__ */ new Map()).forEach((x, k) => {
|
|
596
|
+
const u = typeof k == "string" ? k : typeof k?.id == "string" ? k.id : "", L = y.nodes.find((w) => w.id === u);
|
|
597
|
+
if (!u) {
|
|
595
598
|
_.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(k));
|
|
596
599
|
return;
|
|
597
600
|
}
|
|
598
|
-
const
|
|
599
|
-
let
|
|
600
|
-
if (
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
601
|
+
const I = n.node()?.querySelectorAll("g.node, g.rough-node");
|
|
602
|
+
let v;
|
|
603
|
+
if (I?.forEach((w) => {
|
|
604
|
+
const H = w.textContent?.trim();
|
|
605
|
+
(w.id === L?.domId || H === u) && (v = w);
|
|
606
|
+
}), !v) {
|
|
607
|
+
_.warn("⚠️ Could not find node matching text:", u);
|
|
604
608
|
return;
|
|
605
609
|
}
|
|
606
|
-
const
|
|
607
|
-
if (
|
|
608
|
-
_.warn("⚠️ Node has no parent, cannot wrap:",
|
|
610
|
+
const F = v.parentNode;
|
|
611
|
+
if (!F) {
|
|
612
|
+
_.warn("⚠️ Node has no parent, cannot wrap:", u);
|
|
609
613
|
return;
|
|
610
614
|
}
|
|
611
|
-
const
|
|
612
|
-
if (
|
|
613
|
-
const
|
|
614
|
-
|
|
615
|
+
const C = document.createElementNS("http://www.w3.org/2000/svg", "a"), P = x.url.replace(/^"+|"+$/g, "");
|
|
616
|
+
if (C.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", P), C.setAttribute("target", "_blank"), x.tooltip) {
|
|
617
|
+
const w = x.tooltip.replace(/^"+|"+$/g, "");
|
|
618
|
+
C.setAttribute("title", w), v.setAttribute("title", w);
|
|
615
619
|
}
|
|
616
|
-
|
|
620
|
+
F.replaceChild(C, v), C.appendChild(v), _.info("🔗 Wrapped node in <a> tag for:", u, x.url);
|
|
617
621
|
});
|
|
618
|
-
} catch (
|
|
619
|
-
_.error("❌ Error injecting clickable links:",
|
|
622
|
+
} catch (O) {
|
|
623
|
+
_.error("❌ Error injecting clickable links:", O);
|
|
620
624
|
}
|
|
621
|
-
|
|
625
|
+
ie.insertTitle(
|
|
622
626
|
n,
|
|
623
627
|
"statediagramTitleText",
|
|
624
|
-
|
|
628
|
+
h?.titleTopMargin ?? 25,
|
|
625
629
|
s.db.getDiagramTitle()
|
|
626
|
-
),
|
|
627
|
-
}, "draw"),
|
|
628
|
-
getClasses:
|
|
629
|
-
draw:
|
|
630
|
-
getDir:
|
|
631
|
-
}, pt = /* @__PURE__ */ new Map(),
|
|
632
|
-
function St(t = "", e = 0,
|
|
633
|
-
const
|
|
634
|
-
return `${
|
|
630
|
+
), ee(n, m, st, h?.useMaxWidth ?? !0);
|
|
631
|
+
}, "draw"), We = {
|
|
632
|
+
getClasses: Re,
|
|
633
|
+
draw: $e,
|
|
634
|
+
getDir: Kt
|
|
635
|
+
}, pt = /* @__PURE__ */ new Map(), M = 0;
|
|
636
|
+
function St(t = "", e = 0, o = "", s = At) {
|
|
637
|
+
const c = o !== null && o.length > 0 ? `${s}${o}` : "";
|
|
638
|
+
return `${Ne}-${t}${c}-${e}`;
|
|
635
639
|
}
|
|
636
640
|
f(St, "stateDomId");
|
|
637
|
-
var
|
|
641
|
+
var Fe = /* @__PURE__ */ f((t, e, o, s, c, h, p, y) => {
|
|
638
642
|
_.trace("items", e), e.forEach((n) => {
|
|
639
643
|
switch (n.stmt) {
|
|
640
|
-
case
|
|
641
|
-
|
|
644
|
+
case q:
|
|
645
|
+
tt(t, n, o, s, c, h, p, y);
|
|
642
646
|
break;
|
|
643
|
-
case
|
|
644
|
-
|
|
647
|
+
case et:
|
|
648
|
+
tt(t, n, o, s, c, h, p, y);
|
|
645
649
|
break;
|
|
646
|
-
case
|
|
650
|
+
case Ct:
|
|
647
651
|
{
|
|
648
|
-
|
|
652
|
+
tt(
|
|
649
653
|
t,
|
|
650
654
|
n.state1,
|
|
651
|
-
|
|
655
|
+
o,
|
|
652
656
|
s,
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
),
|
|
657
|
+
c,
|
|
658
|
+
h,
|
|
659
|
+
p,
|
|
660
|
+
y
|
|
661
|
+
), tt(
|
|
658
662
|
t,
|
|
659
663
|
n.state2,
|
|
660
|
-
|
|
664
|
+
o,
|
|
661
665
|
s,
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
+
c,
|
|
667
|
+
h,
|
|
668
|
+
p,
|
|
669
|
+
y
|
|
666
670
|
);
|
|
667
|
-
const T =
|
|
668
|
-
id: "edge" +
|
|
671
|
+
const T = p === "neo", m = {
|
|
672
|
+
id: "edge" + M,
|
|
669
673
|
start: n.state1.id,
|
|
670
674
|
end: n.state2.id,
|
|
671
675
|
arrowhead: "normal",
|
|
672
676
|
arrowTypeEnd: T ? "arrow_barb_neo" : "arrow_barb",
|
|
673
677
|
style: Gt,
|
|
674
678
|
labelStyle: "",
|
|
675
|
-
label:
|
|
676
|
-
arrowheadStyle:
|
|
677
|
-
labelpos:
|
|
678
|
-
labelType:
|
|
679
|
-
thickness:
|
|
680
|
-
classes:
|
|
681
|
-
look:
|
|
679
|
+
label: j.sanitizeText(n.description ?? "", $()),
|
|
680
|
+
arrowheadStyle: Vt,
|
|
681
|
+
labelpos: Mt,
|
|
682
|
+
labelType: Ut,
|
|
683
|
+
thickness: Wt,
|
|
684
|
+
classes: jt,
|
|
685
|
+
look: p
|
|
682
686
|
};
|
|
683
|
-
|
|
687
|
+
c.push(m), M++;
|
|
684
688
|
}
|
|
685
689
|
break;
|
|
686
690
|
}
|
|
687
691
|
});
|
|
688
|
-
}, "setupDoc"),
|
|
689
|
-
let
|
|
692
|
+
}, "setupDoc"), $t = /* @__PURE__ */ f((t, e = Bt) => {
|
|
693
|
+
let o = e;
|
|
690
694
|
if (t.doc)
|
|
691
695
|
for (const s of t.doc)
|
|
692
|
-
s.stmt === "dir" && (
|
|
693
|
-
return
|
|
696
|
+
s.stmt === "dir" && (o = s.value);
|
|
697
|
+
return o;
|
|
694
698
|
}, "getDir");
|
|
695
|
-
function
|
|
699
|
+
function Z(t, e, o) {
|
|
696
700
|
if (!e.id || e.id === "</join></fork>" || e.id === "</choice>")
|
|
697
701
|
return;
|
|
698
|
-
e.cssClasses && (Array.isArray(e.cssCompiledStyles) || (e.cssCompiledStyles = []), e.cssClasses.split(" ").forEach((
|
|
699
|
-
const
|
|
700
|
-
|
|
702
|
+
e.cssClasses && (Array.isArray(e.cssCompiledStyles) || (e.cssCompiledStyles = []), e.cssClasses.split(" ").forEach((c) => {
|
|
703
|
+
const h = o.get(c);
|
|
704
|
+
h && (e.cssCompiledStyles = [...e.cssCompiledStyles ?? [], ...h.styles]);
|
|
701
705
|
}));
|
|
702
|
-
const s = t.find((
|
|
706
|
+
const s = t.find((c) => c.id === e.id);
|
|
703
707
|
s ? Object.assign(s, e) : t.push(e);
|
|
704
708
|
}
|
|
705
|
-
f(
|
|
706
|
-
function
|
|
709
|
+
f(Z, "insertOrUpdateNode");
|
|
710
|
+
function Xt(t) {
|
|
707
711
|
return t?.classes?.join(" ") ?? "";
|
|
708
712
|
}
|
|
709
|
-
f(
|
|
710
|
-
function
|
|
713
|
+
f(Xt, "getClassesFromDbInfo");
|
|
714
|
+
function Jt(t) {
|
|
711
715
|
return t?.styles ?? [];
|
|
712
716
|
}
|
|
713
|
-
f(
|
|
714
|
-
var
|
|
715
|
-
const n = e.id, T =
|
|
716
|
-
if (_.info("dataFetcher parsedItem", e, T,
|
|
717
|
-
let k =
|
|
718
|
-
e.start === !0 ? k =
|
|
717
|
+
f(Jt, "getStylesFromDbInfo");
|
|
718
|
+
var tt = /* @__PURE__ */ f((t, e, o, s, c, h, p, y) => {
|
|
719
|
+
const n = e.id, T = o.get(n), m = Xt(T), O = Jt(T), x = $();
|
|
720
|
+
if (_.info("dataFetcher parsedItem", e, T, O), n !== "root") {
|
|
721
|
+
let k = kt;
|
|
722
|
+
e.start === !0 ? k = Te : e.start === !1 && (k = Ee), e.type !== et && (k = e.type), pt.get(n) || pt.set(n, {
|
|
719
723
|
id: n,
|
|
720
724
|
shape: k,
|
|
721
|
-
description:
|
|
722
|
-
cssClasses: `${m} ${
|
|
723
|
-
cssStyles:
|
|
725
|
+
description: j.sanitizeText(n, x),
|
|
726
|
+
cssClasses: `${m} ${ke}`,
|
|
727
|
+
cssStyles: O
|
|
724
728
|
});
|
|
725
|
-
const
|
|
726
|
-
e.description && (Array.isArray(
|
|
727
|
-
const
|
|
729
|
+
const u = pt.get(n);
|
|
730
|
+
e.description && (Array.isArray(u.description) ? (u.shape = Dt, u.description.push(e.description)) : u.description?.length && u.description.length > 0 ? (u.shape = Dt, u.description === n ? u.description = [e.description] : u.description = [u.description, e.description]) : (u.shape = kt, u.description = e.description), u.description = j.sanitizeTextOrArray(u.description, x)), u.description?.length === 1 && u.shape === Dt && (u.type === "group" ? u.shape = Ot : u.shape = kt), !u.type && e.doc && (_.info("Setting cluster for XCX", n, $t(e)), u.type = "group", u.isGroup = !0, u.dir = $t(e), u.explicitDir = e.doc.some((I) => I.stmt === "dir"), u.shape = e.type === Yt ? Nt : Ot, u.cssClasses = `${u.cssClasses} ${Le} ${h ? we : ""}`);
|
|
731
|
+
const L = {
|
|
728
732
|
labelStyle: "",
|
|
729
|
-
shape:
|
|
730
|
-
label:
|
|
731
|
-
cssClasses:
|
|
733
|
+
shape: u.shape,
|
|
734
|
+
label: u.description,
|
|
735
|
+
cssClasses: u.cssClasses,
|
|
732
736
|
cssCompiledStyles: [],
|
|
733
|
-
cssStyles:
|
|
737
|
+
cssStyles: u.cssStyles,
|
|
734
738
|
id: n,
|
|
735
|
-
dir:
|
|
736
|
-
domId: St(n,
|
|
737
|
-
type:
|
|
738
|
-
isGroup:
|
|
739
|
+
dir: u.dir,
|
|
740
|
+
domId: St(n, M),
|
|
741
|
+
type: u.type,
|
|
742
|
+
isGroup: u.type === "group",
|
|
739
743
|
padding: 8,
|
|
740
744
|
rx: 10,
|
|
741
745
|
ry: 10,
|
|
742
|
-
look:
|
|
746
|
+
look: p,
|
|
743
747
|
labelType: "markdown"
|
|
744
748
|
};
|
|
745
|
-
if (
|
|
746
|
-
const
|
|
749
|
+
if (L.shape === Nt && (L.label = ""), t && t.id !== "root" && (_.trace("Setting node ", n, " to be child of its parent ", t.id), L.parentId = t.id), L.centerLabel = !0, e.note) {
|
|
750
|
+
const I = {
|
|
747
751
|
labelStyle: "",
|
|
748
|
-
shape:
|
|
752
|
+
shape: _e,
|
|
749
753
|
label: e.note.text,
|
|
750
754
|
labelType: "markdown",
|
|
751
|
-
cssClasses:
|
|
755
|
+
cssClasses: Ae,
|
|
752
756
|
// useHtmlLabels: false,
|
|
753
757
|
cssStyles: [],
|
|
754
758
|
cssCompiledStyles: [],
|
|
755
|
-
id: n +
|
|
756
|
-
domId: St(n,
|
|
757
|
-
type:
|
|
758
|
-
isGroup:
|
|
759
|
-
padding:
|
|
760
|
-
look:
|
|
759
|
+
id: n + Oe + "-" + M,
|
|
760
|
+
domId: St(n, M, zt),
|
|
761
|
+
type: u.type,
|
|
762
|
+
isGroup: u.type === "group",
|
|
763
|
+
padding: x.flowchart?.padding,
|
|
764
|
+
look: p,
|
|
761
765
|
position: e.note.position
|
|
762
|
-
},
|
|
766
|
+
}, v = n + Rt, F = {
|
|
763
767
|
labelStyle: "",
|
|
764
|
-
shape:
|
|
768
|
+
shape: me,
|
|
765
769
|
label: e.note.text,
|
|
766
|
-
cssClasses:
|
|
770
|
+
cssClasses: u.cssClasses,
|
|
767
771
|
cssStyles: [],
|
|
768
772
|
id: n + Rt,
|
|
769
|
-
domId: St(n,
|
|
773
|
+
domId: St(n, M, Ht),
|
|
770
774
|
type: "group",
|
|
771
775
|
isGroup: !0,
|
|
772
776
|
padding: 16,
|
|
773
777
|
//getConfig().flowchart.padding
|
|
774
|
-
look:
|
|
778
|
+
look: p,
|
|
775
779
|
position: e.note.position
|
|
776
780
|
};
|
|
777
|
-
|
|
778
|
-
let
|
|
779
|
-
e.note.position === "left of" && (
|
|
780
|
-
id:
|
|
781
|
-
start:
|
|
782
|
-
end:
|
|
781
|
+
M++, F.id = v, I.parentId = v, Z(s, F, y), Z(s, I, y), Z(s, L, y);
|
|
782
|
+
let C = n, P = I.id;
|
|
783
|
+
e.note.position === "left of" && (C = I.id, P = n), c.push({
|
|
784
|
+
id: C + "-" + P,
|
|
785
|
+
start: C,
|
|
786
|
+
end: P,
|
|
783
787
|
arrowhead: "none",
|
|
784
788
|
arrowTypeEnd: "",
|
|
785
789
|
style: Gt,
|
|
786
790
|
labelStyle: "",
|
|
787
|
-
classes:
|
|
788
|
-
arrowheadStyle:
|
|
789
|
-
labelpos:
|
|
790
|
-
labelType:
|
|
791
|
-
thickness:
|
|
792
|
-
look:
|
|
791
|
+
classes: Ce,
|
|
792
|
+
arrowheadStyle: Vt,
|
|
793
|
+
labelpos: Mt,
|
|
794
|
+
labelType: Ut,
|
|
795
|
+
thickness: Wt,
|
|
796
|
+
look: p
|
|
793
797
|
});
|
|
794
798
|
} else
|
|
795
|
-
|
|
799
|
+
Z(s, L, y);
|
|
796
800
|
}
|
|
797
|
-
e.doc && (_.trace("Adding nodes children "),
|
|
798
|
-
}, "dataFetcher"),
|
|
799
|
-
pt.clear(),
|
|
800
|
-
}, "reset"),
|
|
801
|
+
e.doc && (_.trace("Adding nodes children "), Fe(e, e.doc, o, s, c, !h, p, y));
|
|
802
|
+
}, "dataFetcher"), Pe = /* @__PURE__ */ f(() => {
|
|
803
|
+
pt.clear(), M = 0;
|
|
804
|
+
}, "reset"), D = {
|
|
801
805
|
START_NODE: "[*]",
|
|
802
806
|
START_TYPE: "start",
|
|
803
807
|
END_NODE: "[*]",
|
|
@@ -806,13 +810,13 @@ var Z = /* @__PURE__ */ f((t, e, l, s, u, d, S, g) => {
|
|
|
806
810
|
FILL_KEYWORD: "fill",
|
|
807
811
|
BG_FILL: "bgFill",
|
|
808
812
|
STYLECLASS_SEP: ","
|
|
809
|
-
},
|
|
813
|
+
}, Ft = /* @__PURE__ */ f(() => /* @__PURE__ */ new Map(), "newClassesList"), Pt = /* @__PURE__ */ f(() => ({
|
|
810
814
|
relations: [],
|
|
811
815
|
states: /* @__PURE__ */ new Map(),
|
|
812
816
|
documents: {}
|
|
813
|
-
}), "newDoc"), ft = /* @__PURE__ */ f((t) => JSON.parse(JSON.stringify(t)), "clone"),
|
|
817
|
+
}), "newDoc"), ft = /* @__PURE__ */ f((t) => JSON.parse(JSON.stringify(t)), "clone"), je = class {
|
|
814
818
|
constructor(t) {
|
|
815
|
-
this.version = t, this.nodes = [], this.edges = [], this.rootDoc = [], this.classes =
|
|
819
|
+
this.version = t, this.nodes = [], this.edges = [], this.rootDoc = [], this.classes = Ft(), this.documents = { root: Pt() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.dividerCnt = 0, this.links = /* @__PURE__ */ new Map(), this.funs = [], this.getAccTitle = re, this.setAccTitle = ae, this.getAccDescription = ne, this.setAccDescription = oe, this.setDiagramTitle = le, this.getDiagramTitle = ce, this.clear(), this.setRootDoc = this.setRootDoc.bind(this), this.getDividerId = this.getDividerId.bind(this), this.setDirection = this.setDirection.bind(this), this.trimColon = this.trimColon.bind(this), this.bindFunctions = this.bindFunctions.bind(this);
|
|
816
820
|
}
|
|
817
821
|
static {
|
|
818
822
|
f(this, "StateDB");
|
|
@@ -838,34 +842,34 @@ var Z = /* @__PURE__ */ f((t, e, l, s, u, d, S, g) => {
|
|
|
838
842
|
this.clear(!0);
|
|
839
843
|
for (const s of Array.isArray(t) ? t : t.doc)
|
|
840
844
|
switch (s.stmt) {
|
|
841
|
-
case
|
|
845
|
+
case q:
|
|
842
846
|
this.addState(s.id.trim(), s.type, s.doc, s.description, s.note);
|
|
843
847
|
break;
|
|
844
|
-
case
|
|
848
|
+
case Ct:
|
|
845
849
|
this.addRelation(s.state1, s.state2, s.description);
|
|
846
850
|
break;
|
|
847
|
-
case
|
|
851
|
+
case Se:
|
|
848
852
|
this.addStyleClass(s.id.trim(), s.classes);
|
|
849
853
|
break;
|
|
850
|
-
case
|
|
854
|
+
case ye:
|
|
851
855
|
this.handleStyleDef(s);
|
|
852
856
|
break;
|
|
853
|
-
case
|
|
857
|
+
case ge:
|
|
854
858
|
this.setCssClass(s.id.trim(), s.styleClass);
|
|
855
859
|
break;
|
|
856
860
|
case "click":
|
|
857
861
|
this.addLink(s.id, s.url, s.tooltip);
|
|
858
862
|
break;
|
|
859
863
|
}
|
|
860
|
-
const e = this.getStates(),
|
|
861
|
-
|
|
864
|
+
const e = this.getStates(), o = $();
|
|
865
|
+
Pe(), tt(
|
|
862
866
|
void 0,
|
|
863
867
|
this.getRootDocV2(),
|
|
864
868
|
e,
|
|
865
869
|
this.nodes,
|
|
866
870
|
this.edges,
|
|
867
871
|
!0,
|
|
868
|
-
|
|
872
|
+
o.look,
|
|
869
873
|
this.classes
|
|
870
874
|
);
|
|
871
875
|
for (const s of this.nodes)
|
|
@@ -878,51 +882,51 @@ var Z = /* @__PURE__ */ f((t, e, l, s, u, d, S, g) => {
|
|
|
878
882
|
}
|
|
879
883
|
}
|
|
880
884
|
handleStyleDef(t) {
|
|
881
|
-
const e = t.id.trim().split(","),
|
|
885
|
+
const e = t.id.trim().split(","), o = t.styleClass.split(",");
|
|
882
886
|
for (const s of e) {
|
|
883
|
-
let
|
|
884
|
-
if (!
|
|
885
|
-
const
|
|
886
|
-
this.addState(
|
|
887
|
+
let c = this.getState(s);
|
|
888
|
+
if (!c) {
|
|
889
|
+
const h = s.trim();
|
|
890
|
+
this.addState(h), c = this.getState(h);
|
|
887
891
|
}
|
|
888
|
-
|
|
892
|
+
c && (c.styles = o.map((h) => h.replace(/;/g, "")?.trim()));
|
|
889
893
|
}
|
|
890
894
|
}
|
|
891
895
|
setRootDoc(t) {
|
|
892
896
|
_.info("Setting root doc", t), this.rootDoc = t, this.version === 1 ? this.extract(t) : this.extract(this.getRootDocV2());
|
|
893
897
|
}
|
|
894
|
-
docTranslator(t, e,
|
|
895
|
-
if (e.stmt ===
|
|
898
|
+
docTranslator(t, e, o) {
|
|
899
|
+
if (e.stmt === Ct) {
|
|
896
900
|
this.docTranslator(t, e.state1, !0), this.docTranslator(t, e.state2, !1);
|
|
897
901
|
return;
|
|
898
902
|
}
|
|
899
|
-
if (e.stmt ===
|
|
903
|
+
if (e.stmt === q && (e.id === D.START_NODE ? (e.id = t.id + (o ? "_start" : "_end"), e.start = o) : e.id = e.id.trim()), e.stmt !== J && e.stmt !== q || !e.doc)
|
|
900
904
|
return;
|
|
901
905
|
const s = [];
|
|
902
|
-
let
|
|
903
|
-
for (const
|
|
904
|
-
if (
|
|
905
|
-
const
|
|
906
|
-
|
|
906
|
+
let c = [];
|
|
907
|
+
for (const h of e.doc)
|
|
908
|
+
if (h.type === Yt) {
|
|
909
|
+
const p = ft(h);
|
|
910
|
+
p.doc = ft(c), s.push(p), c = [];
|
|
907
911
|
} else
|
|
908
|
-
|
|
909
|
-
if (s.length > 0 &&
|
|
910
|
-
const
|
|
911
|
-
stmt:
|
|
912
|
-
id:
|
|
912
|
+
c.push(h);
|
|
913
|
+
if (s.length > 0 && c.length > 0) {
|
|
914
|
+
const h = {
|
|
915
|
+
stmt: q,
|
|
916
|
+
id: he(),
|
|
913
917
|
type: "divider",
|
|
914
|
-
doc: ft(
|
|
918
|
+
doc: ft(c)
|
|
915
919
|
};
|
|
916
|
-
s.push(ft(
|
|
920
|
+
s.push(ft(h)), e.doc = s;
|
|
917
921
|
}
|
|
918
|
-
e.doc.forEach((
|
|
922
|
+
e.doc.forEach((h) => this.docTranslator(e, h, !0));
|
|
919
923
|
}
|
|
920
924
|
getRootDocV2() {
|
|
921
925
|
return this.docTranslator(
|
|
922
|
-
{ id:
|
|
923
|
-
{ id:
|
|
926
|
+
{ id: J, stmt: J },
|
|
927
|
+
{ id: J, stmt: J, doc: this.rootDoc },
|
|
924
928
|
!0
|
|
925
|
-
), { id:
|
|
929
|
+
), { id: J, doc: this.rootDoc };
|
|
926
930
|
}
|
|
927
931
|
/**
|
|
928
932
|
* Function called by parser when a node definition has been found.
|
|
@@ -932,16 +936,16 @@ var Z = /* @__PURE__ */ f((t, e, l, s, u, d, S, g) => {
|
|
|
932
936
|
* @param styles - styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 style, convert it to an array of that 1 style.
|
|
933
937
|
* @param textStyles - text styles to apply to this state. Can be a string (1 text test) or an array of text styles. If it's just 1 text style, convert it to an array of that 1 text style.
|
|
934
938
|
*/
|
|
935
|
-
addState(t, e =
|
|
939
|
+
addState(t, e = et, o = void 0, s = void 0, c = void 0, h = void 0, p = void 0, y = void 0) {
|
|
936
940
|
const n = t?.trim();
|
|
937
941
|
if (!this.currentDocument.states.has(n))
|
|
938
942
|
_.info("Adding state ", n, s), this.currentDocument.states.set(n, {
|
|
939
|
-
stmt:
|
|
943
|
+
stmt: q,
|
|
940
944
|
id: n,
|
|
941
945
|
descriptions: [],
|
|
942
946
|
type: e,
|
|
943
|
-
doc:
|
|
944
|
-
note:
|
|
947
|
+
doc: o,
|
|
948
|
+
note: c,
|
|
945
949
|
classes: [],
|
|
946
950
|
styles: [],
|
|
947
951
|
textStyles: []
|
|
@@ -950,18 +954,18 @@ var Z = /* @__PURE__ */ f((t, e, l, s, u, d, S, g) => {
|
|
|
950
954
|
const T = this.currentDocument.states.get(n);
|
|
951
955
|
if (!T)
|
|
952
956
|
throw new Error(`State not found: ${n}`);
|
|
953
|
-
T.doc || (T.doc =
|
|
957
|
+
T.doc || (T.doc = o), T.type || (T.type = e);
|
|
954
958
|
}
|
|
955
|
-
if (s && (_.info("Setting state description", n, s), (Array.isArray(s) ? s : [s]).forEach((m) => this.addDescription(n, m.trim()))),
|
|
959
|
+
if (s && (_.info("Setting state description", n, s), (Array.isArray(s) ? s : [s]).forEach((m) => this.addDescription(n, m.trim()))), c) {
|
|
956
960
|
const T = this.currentDocument.states.get(n);
|
|
957
961
|
if (!T)
|
|
958
962
|
throw new Error(`State not found: ${n}`);
|
|
959
|
-
T.note =
|
|
963
|
+
T.note = c, T.note.text = j.sanitizeText(T.note.text, $());
|
|
960
964
|
}
|
|
961
|
-
|
|
965
|
+
h && (_.info("Setting state classes", n, h), (Array.isArray(h) ? h : [h]).forEach((m) => this.setCssClass(n, m.trim()))), p && (_.info("Setting state styles", n, p), (Array.isArray(p) ? p : [p]).forEach((m) => this.setStyle(n, m.trim()))), y && (_.info("Setting state styles", n, p), (Array.isArray(y) ? y : [y]).forEach((m) => this.setTextStyle(n, m.trim())));
|
|
962
966
|
}
|
|
963
967
|
clear(t) {
|
|
964
|
-
this.nodes = [], this.edges = [], this.documents = { root: Pt() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes =
|
|
968
|
+
this.nodes = [], this.edges = [], this.funs = [this.setupToolTips.bind(this)], this.documents = { root: Pt() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes = Ft(), t || (this.links = /* @__PURE__ */ new Map(), ue());
|
|
965
969
|
}
|
|
966
970
|
getState(t) {
|
|
967
971
|
return this.currentDocument.states.get(t);
|
|
@@ -978,8 +982,8 @@ var Z = /* @__PURE__ */ f((t, e, l, s, u, d, S, g) => {
|
|
|
978
982
|
/**
|
|
979
983
|
* Adds a clickable link to a state.
|
|
980
984
|
*/
|
|
981
|
-
addLink(t, e,
|
|
982
|
-
this.links.set(t, { url: e, tooltip:
|
|
985
|
+
addLink(t, e, o) {
|
|
986
|
+
this.links.set(t, { url: e, tooltip: o }), _.warn("Adding link", t, e, o);
|
|
983
987
|
}
|
|
984
988
|
/**
|
|
985
989
|
* Get all registered links.
|
|
@@ -993,14 +997,14 @@ var Z = /* @__PURE__ */ f((t, e, l, s, u, d, S, g) => {
|
|
|
993
997
|
* else return the given id
|
|
994
998
|
*/
|
|
995
999
|
startIdIfNeeded(t = "") {
|
|
996
|
-
return t ===
|
|
1000
|
+
return t === D.START_NODE ? (this.startEndCount++, `${D.START_TYPE}${this.startEndCount}`) : t;
|
|
997
1001
|
}
|
|
998
1002
|
/**
|
|
999
1003
|
* If the id is a start node ( [*] ), then return the start type ('start')
|
|
1000
1004
|
* else return the given type
|
|
1001
1005
|
*/
|
|
1002
|
-
startTypeIfNeeded(t = "", e =
|
|
1003
|
-
return t ===
|
|
1006
|
+
startTypeIfNeeded(t = "", e = et) {
|
|
1007
|
+
return t === D.START_NODE ? D.START_TYPE : e;
|
|
1004
1008
|
}
|
|
1005
1009
|
/**
|
|
1006
1010
|
* If the id is an end node ( [*] ), then return a new id constructed from
|
|
@@ -1008,21 +1012,21 @@ var Z = /* @__PURE__ */ f((t, e, l, s, u, d, S, g) => {
|
|
|
1008
1012
|
* else return the given id
|
|
1009
1013
|
*/
|
|
1010
1014
|
endIdIfNeeded(t = "") {
|
|
1011
|
-
return t ===
|
|
1015
|
+
return t === D.END_NODE ? (this.startEndCount++, `${D.END_TYPE}${this.startEndCount}`) : t;
|
|
1012
1016
|
}
|
|
1013
1017
|
/**
|
|
1014
1018
|
* If the id is an end node ( [*] ), then return the end type
|
|
1015
1019
|
* else return the given type
|
|
1016
1020
|
*
|
|
1017
1021
|
*/
|
|
1018
|
-
endTypeIfNeeded(t = "", e =
|
|
1019
|
-
return t ===
|
|
1022
|
+
endTypeIfNeeded(t = "", e = et) {
|
|
1023
|
+
return t === D.END_NODE ? D.END_TYPE : e;
|
|
1020
1024
|
}
|
|
1021
|
-
addRelationObjs(t, e,
|
|
1022
|
-
const s = this.startIdIfNeeded(t.id.trim()),
|
|
1025
|
+
addRelationObjs(t, e, o = "") {
|
|
1026
|
+
const s = this.startIdIfNeeded(t.id.trim()), c = this.startTypeIfNeeded(t.id.trim(), t.type), h = this.startIdIfNeeded(e.id.trim()), p = this.startTypeIfNeeded(e.id.trim(), e.type);
|
|
1023
1027
|
this.addState(
|
|
1024
1028
|
s,
|
|
1025
|
-
|
|
1029
|
+
c,
|
|
1026
1030
|
t.doc,
|
|
1027
1031
|
t.description,
|
|
1028
1032
|
t.note,
|
|
@@ -1030,8 +1034,8 @@ var Z = /* @__PURE__ */ f((t, e, l, s, u, d, S, g) => {
|
|
|
1030
1034
|
t.styles,
|
|
1031
1035
|
t.textStyles
|
|
1032
1036
|
), this.addState(
|
|
1033
|
-
|
|
1034
|
-
|
|
1037
|
+
h,
|
|
1038
|
+
p,
|
|
1035
1039
|
e.doc,
|
|
1036
1040
|
e.description,
|
|
1037
1041
|
e.note,
|
|
@@ -1040,28 +1044,28 @@ var Z = /* @__PURE__ */ f((t, e, l, s, u, d, S, g) => {
|
|
|
1040
1044
|
e.textStyles
|
|
1041
1045
|
), this.currentDocument.relations.push({
|
|
1042
1046
|
id1: s,
|
|
1043
|
-
id2:
|
|
1044
|
-
relationTitle:
|
|
1047
|
+
id2: h,
|
|
1048
|
+
relationTitle: j.sanitizeText(o, $())
|
|
1045
1049
|
});
|
|
1046
1050
|
}
|
|
1047
1051
|
/**
|
|
1048
1052
|
* Add a relation between two items. The items may be full objects or just the string id of a state.
|
|
1049
1053
|
*/
|
|
1050
|
-
addRelation(t, e,
|
|
1054
|
+
addRelation(t, e, o) {
|
|
1051
1055
|
if (typeof t == "object" && typeof e == "object")
|
|
1052
|
-
this.addRelationObjs(t, e,
|
|
1056
|
+
this.addRelationObjs(t, e, o);
|
|
1053
1057
|
else if (typeof t == "string" && typeof e == "string") {
|
|
1054
|
-
const s = this.startIdIfNeeded(t.trim()),
|
|
1055
|
-
this.addState(s,
|
|
1058
|
+
const s = this.startIdIfNeeded(t.trim()), c = this.startTypeIfNeeded(t), h = this.endIdIfNeeded(e.trim()), p = this.endTypeIfNeeded(e);
|
|
1059
|
+
this.addState(s, c), this.addState(h, p), this.currentDocument.relations.push({
|
|
1056
1060
|
id1: s,
|
|
1057
|
-
id2:
|
|
1058
|
-
relationTitle:
|
|
1061
|
+
id2: h,
|
|
1062
|
+
relationTitle: o ? j.sanitizeText(o, $()) : void 0
|
|
1059
1063
|
});
|
|
1060
1064
|
}
|
|
1061
1065
|
}
|
|
1062
1066
|
addDescription(t, e) {
|
|
1063
|
-
const
|
|
1064
|
-
|
|
1067
|
+
const o = this.currentDocument.states.get(t), s = e.startsWith(":") ? e.replace(":", "").trim() : e;
|
|
1068
|
+
o?.descriptions?.push(j.sanitizeText(s, $()));
|
|
1065
1069
|
}
|
|
1066
1070
|
cleanupLabel(t) {
|
|
1067
1071
|
return t.startsWith(":") ? t.slice(2).trim() : t.trim();
|
|
@@ -1078,19 +1082,31 @@ var Z = /* @__PURE__ */ f((t, e, l, s, u, d, S, g) => {
|
|
|
1078
1082
|
*/
|
|
1079
1083
|
addStyleClass(t, e = "") {
|
|
1080
1084
|
this.classes.has(t) || this.classes.set(t, { id: t, styles: [], textStyles: [] });
|
|
1081
|
-
const
|
|
1082
|
-
e &&
|
|
1083
|
-
const
|
|
1084
|
-
if (RegExp(
|
|
1085
|
-
const
|
|
1086
|
-
|
|
1085
|
+
const o = this.classes.get(t);
|
|
1086
|
+
e && o && e.split(D.STYLECLASS_SEP).forEach((s) => {
|
|
1087
|
+
const c = s.replace(/([^;]*);/, "$1").trim();
|
|
1088
|
+
if (RegExp(D.COLOR_KEYWORD).exec(s)) {
|
|
1089
|
+
const p = c.replace(D.FILL_KEYWORD, D.BG_FILL).replace(D.COLOR_KEYWORD, D.FILL_KEYWORD);
|
|
1090
|
+
o.textStyles.push(p);
|
|
1087
1091
|
}
|
|
1088
|
-
|
|
1092
|
+
o.styles.push(c);
|
|
1089
1093
|
});
|
|
1090
1094
|
}
|
|
1091
1095
|
getClasses() {
|
|
1092
1096
|
return this.classes;
|
|
1093
1097
|
}
|
|
1098
|
+
setupToolTips(t) {
|
|
1099
|
+
const e = fe();
|
|
1100
|
+
bt(t).select("svg").selectAll("g.node, g.rough-node").on("mouseover", (c) => {
|
|
1101
|
+
const h = bt(c.currentTarget), p = h.attr("title");
|
|
1102
|
+
if (p === null)
|
|
1103
|
+
return;
|
|
1104
|
+
const y = c.currentTarget?.getBoundingClientRect();
|
|
1105
|
+
e.transition().duration(200).style("opacity", ".9"), e.style("left", window.scrollX + y.left + (y.right - y.left) / 2 + "px").style("top", window.scrollY + y.bottom + "px"), e.html(de.sanitize(p)), h.classed("hover", !0);
|
|
1106
|
+
}).on("mouseout", (c) => {
|
|
1107
|
+
e.transition().duration(500).style("opacity", 0), bt(c.currentTarget).classed("hover", !1);
|
|
1108
|
+
});
|
|
1109
|
+
}
|
|
1094
1110
|
/**
|
|
1095
1111
|
* Add a (style) class or css class to a state with the given id.
|
|
1096
1112
|
* If the state isn't already in the list of known states, add it.
|
|
@@ -1100,11 +1116,11 @@ var Z = /* @__PURE__ */ f((t, e, l, s, u, d, S, g) => {
|
|
|
1100
1116
|
* @param cssClassName - CSS class name
|
|
1101
1117
|
*/
|
|
1102
1118
|
setCssClass(t, e) {
|
|
1103
|
-
t.split(",").forEach((
|
|
1104
|
-
let s = this.getState(
|
|
1119
|
+
t.split(",").forEach((o) => {
|
|
1120
|
+
let s = this.getState(o);
|
|
1105
1121
|
if (!s) {
|
|
1106
|
-
const
|
|
1107
|
-
this.addState(
|
|
1122
|
+
const c = o.trim();
|
|
1123
|
+
this.addState(c), s = this.getState(c);
|
|
1108
1124
|
}
|
|
1109
1125
|
s?.classes?.push(e);
|
|
1110
1126
|
});
|
|
@@ -1131,37 +1147,42 @@ var Z = /* @__PURE__ */ f((t, e, l, s, u, d, S, g) => {
|
|
|
1131
1147
|
setTextStyle(t, e) {
|
|
1132
1148
|
this.getState(t)?.textStyles?.push(e);
|
|
1133
1149
|
}
|
|
1150
|
+
bindFunctions(t) {
|
|
1151
|
+
this.funs.forEach((e) => {
|
|
1152
|
+
e(t);
|
|
1153
|
+
});
|
|
1154
|
+
}
|
|
1134
1155
|
/**
|
|
1135
1156
|
* Finds the direction statement in the root document.
|
|
1136
1157
|
* @returns the direction statement if present
|
|
1137
1158
|
*/
|
|
1138
1159
|
getDirectionStatement() {
|
|
1139
|
-
return this.rootDoc.find((t) => t.stmt ===
|
|
1160
|
+
return this.rootDoc.find((t) => t.stmt === wt);
|
|
1140
1161
|
}
|
|
1141
1162
|
getDirection() {
|
|
1142
|
-
return this.getDirectionStatement()?.value ??
|
|
1163
|
+
return this.getDirectionStatement()?.value ?? pe;
|
|
1143
1164
|
}
|
|
1144
1165
|
setDirection(t) {
|
|
1145
1166
|
const e = this.getDirectionStatement();
|
|
1146
|
-
e ? e.value = t : this.rootDoc.unshift({ stmt:
|
|
1167
|
+
e ? e.value = t : this.rootDoc.unshift({ stmt: wt, value: t });
|
|
1147
1168
|
}
|
|
1148
1169
|
trimColon(t) {
|
|
1149
1170
|
return t.startsWith(":") ? t.slice(1).trim() : t.trim();
|
|
1150
1171
|
}
|
|
1151
1172
|
getData() {
|
|
1152
|
-
const t =
|
|
1173
|
+
const t = $();
|
|
1153
1174
|
return {
|
|
1154
1175
|
nodes: this.nodes,
|
|
1155
1176
|
edges: this.edges,
|
|
1156
1177
|
other: {},
|
|
1157
1178
|
config: t,
|
|
1158
|
-
direction:
|
|
1179
|
+
direction: Kt(this.getRootDocV2())
|
|
1159
1180
|
};
|
|
1160
1181
|
}
|
|
1161
1182
|
getConfig() {
|
|
1162
|
-
return
|
|
1183
|
+
return $().state;
|
|
1163
1184
|
}
|
|
1164
|
-
},
|
|
1185
|
+
}, Be = /* @__PURE__ */ f((t) => `
|
|
1165
1186
|
defs [id$="-barbEnd"] {
|
|
1166
1187
|
fill: ${t.transitionColor};
|
|
1167
1188
|
stroke: ${t.transitionColor};
|
|
@@ -1386,11 +1407,11 @@ g.stateGroup line {
|
|
|
1386
1407
|
ry: ${t.radius}px;
|
|
1387
1408
|
filter: ${t.dropShadow ? t.dropShadow.replace("url(#drop-shadow)", `url(${t.svgId}-drop-shadow)`) : "none"}
|
|
1388
1409
|
}
|
|
1389
|
-
`, "getStyles"),
|
|
1410
|
+
`, "getStyles"), He = Be;
|
|
1390
1411
|
export {
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1412
|
+
je as S,
|
|
1413
|
+
Ue as a,
|
|
1414
|
+
We as b,
|
|
1415
|
+
He as s
|
|
1395
1416
|
};
|
|
1396
|
-
//# sourceMappingURL=chunk-
|
|
1417
|
+
//# sourceMappingURL=chunk-5RXB4S5H-B1WLx-ex.js.map
|