1 | import { select } from "d3";
|
2 | import { d as sanitizeText$1, c as getConfig, x as parseGenericTypes, s as setAccTitle, g as getAccTitle, a as getAccDescription, b as setAccDescription, q as setDiagramTitle, t as getDiagramTitle, e as common, v as clear$1, l as log, u as utils } from "./mermaid-6dc72991.js";
|
3 | var parser = function() {
|
4 | var o = function(k, v, o2, l) {
|
5 | for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v)
|
6 | ;
|
7 | return o2;
|
8 | }, $V0 = [1, 17], $V1 = [1, 18], $V2 = [1, 19], $V3 = [1, 39], $V4 = [1, 40], $V5 = [1, 25], $V6 = [1, 23], $V7 = [1, 24], $V8 = [1, 31], $V9 = [1, 32], $Va = [1, 33], $Vb = [1, 34], $Vc = [1, 35], $Vd = [1, 36], $Ve = [1, 26], $Vf = [1, 27], $Vg = [1, 28], $Vh = [1, 29], $Vi = [1, 43], $Vj = [1, 30], $Vk = [1, 42], $Vl = [1, 44], $Vm = [1, 41], $Vn = [1, 45], $Vo = [1, 9], $Vp = [1, 8, 9], $Vq = [1, 56], $Vr = [1, 57], $Vs = [1, 58], $Vt = [1, 59], $Vu = [1, 60], $Vv = [1, 61], $Vw = [1, 62], $Vx = [1, 8, 9, 39], $Vy = [1, 74], $Vz = [1, 8, 9, 12, 13, 21, 37, 39, 42, 59, 60, 61, 62, 63, 64, 65, 70, 72], $VA = [1, 8, 9, 12, 13, 19, 21, 37, 39, 42, 46, 59, 60, 61, 62, 63, 64, 65, 70, 72, 74, 80, 95, 97, 98], $VB = [13, 74, 80, 95, 97, 98], $VC = [13, 64, 65, 74, 80, 95, 97, 98], $VD = [13, 59, 60, 61, 62, 63, 74, 80, 95, 97, 98], $VE = [1, 93], $VF = [1, 110], $VG = [1, 108], $VH = [1, 102], $VI = [1, 103], $VJ = [1, 104], $VK = [1, 105], $VL = [1, 106], $VM = [1, 107], $VN = [1, 109], $VO = [1, 8, 9, 37, 39, 42], $VP = [1, 8, 9, 21], $VQ = [1, 8, 9, 78], $VR = [1, 8, 9, 21, 73, 74, 78, 80, 81, 82, 83, 84, 85];
|
9 | var parser2 = {
|
10 | trace: function trace() {
|
11 | },
|
12 | yy: {},
|
13 | symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "statements": 5, "graphConfig": 6, "CLASS_DIAGRAM": 7, "NEWLINE": 8, "EOF": 9, "statement": 10, "classLabel": 11, "SQS": 12, "STR": 13, "SQE": 14, "namespaceName": 15, "alphaNumToken": 16, "className": 17, "classLiteralName": 18, "GENERICTYPE": 19, "relationStatement": 20, "LABEL": 21, "namespaceStatement": 22, "classStatement": 23, "memberStatement": 24, "annotationStatement": 25, "clickStatement": 26, "styleStatement": 27, "cssClassStatement": 28, "noteStatement": 29, "direction": 30, "acc_title": 31, "acc_title_value": 32, "acc_descr": 33, "acc_descr_value": 34, "acc_descr_multiline_value": 35, "namespaceIdentifier": 36, "STRUCT_START": 37, "classStatements": 38, "STRUCT_STOP": 39, "NAMESPACE": 40, "classIdentifier": 41, "STYLE_SEPARATOR": 42, "members": 43, "CLASS": 44, "ANNOTATION_START": 45, "ANNOTATION_END": 46, "MEMBER": 47, "SEPARATOR": 48, "relation": 49, "NOTE_FOR": 50, "noteText": 51, "NOTE": 52, "direction_tb": 53, "direction_bt": 54, "direction_rl": 55, "direction_lr": 56, "relationType": 57, "lineType": 58, "AGGREGATION": 59, "EXTENSION": 60, "COMPOSITION": 61, "DEPENDENCY": 62, "LOLLIPOP": 63, "LINE": 64, "DOTTED_LINE": 65, "CALLBACK": 66, "LINK": 67, "LINK_TARGET": 68, "CLICK": 69, "CALLBACK_NAME": 70, "CALLBACK_ARGS": 71, "HREF": 72, "STYLE": 73, "ALPHA": 74, "stylesOpt": 75, "CSSCLASS": 76, "style": 77, "COMMA": 78, "styleComponent": 79, "NUM": 80, "COLON": 81, "UNIT": 82, "SPACE": 83, "BRKT": 84, "PCT": 85, "commentToken": 86, "textToken": 87, "graphCodeTokens": 88, "textNoTagsToken": 89, "TAGSTART": 90, "TAGEND": 91, "==": 92, "--": 93, "DEFAULT": 94, "MINUS": 95, "keywords": 96, "UNICODE_TEXT": 97, "BQUOTE_STR": 98, "$accept": 0, "$end": 1 },
|
14 | terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 19: "GENERICTYPE", 21: "LABEL", 31: "acc_title", 32: "acc_title_value", 33: "acc_descr", 34: "acc_descr_value", 35: "acc_descr_multiline_value", 37: "STRUCT_START", 39: "STRUCT_STOP", 40: "NAMESPACE", 42: "STYLE_SEPARATOR", 44: "CLASS", 45: "ANNOTATION_START", 46: "ANNOTATION_END", 47: "MEMBER", 48: "SEPARATOR", 50: "NOTE_FOR", 52: "NOTE", 53: "direction_tb", 54: "direction_bt", 55: "direction_rl", 56: "direction_lr", 59: "AGGREGATION", 60: "EXTENSION", 61: "COMPOSITION", 62: "DEPENDENCY", 63: "LOLLIPOP", 64: "LINE", 65: "DOTTED_LINE", 66: "CALLBACK", 67: "LINK", 68: "LINK_TARGET", 69: "CLICK", 70: "CALLBACK_NAME", 71: "CALLBACK_ARGS", 72: "HREF", 73: "STYLE", 74: "ALPHA", 76: "CSSCLASS", 78: "COMMA", 80: "NUM", 81: "COLON", 82: "UNIT", 83: "SPACE", 84: "BRKT", 85: "PCT", 88: "graphCodeTokens", 90: "TAGSTART", 91: "TAGEND", 92: "==", 93: "--", 94: "DEFAULT", 95: "MINUS", 96: "keywords", 97: "UNICODE_TEXT", 98: "BQUOTE_STR" },
|
15 | productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 2], [17, 1], [17, 1], [17, 2], [17, 2], [17, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [22, 4], [22, 5], [36, 2], [38, 1], [38, 2], [38, 3], [23, 1], [23, 3], [23, 4], [23, 6], [41, 2], [41, 3], [25, 4], [43, 1], [43, 2], [24, 1], [24, 2], [24, 1], [24, 1], [20, 3], [20, 4], [20, 4], [20, 5], [29, 3], [29, 2], [30, 1], [30, 1], [30, 1], [30, 1], [49, 3], [49, 2], [49, 2], [49, 1], [57, 1], [57, 1], [57, 1], [57, 1], [57, 1], [58, 1], [58, 1], [26, 3], [26, 4], [26, 3], [26, 4], [26, 4], [26, 5], [26, 3], [26, 4], [26, 4], [26, 5], [26, 4], [26, 5], [26, 5], [26, 6], [27, 3], [28, 3], [75, 1], [75, 3], [77, 1], [77, 2], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [79, 1], [86, 1], [86, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [87, 1], [89, 1], [89, 1], [89, 1], [89, 1], [16, 1], [16, 1], [16, 1], [16, 1], [18, 1], [51, 1]],
|
16 | performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
17 | var $0 = $$.length - 1;
|
18 | switch (yystate) {
|
19 | case 8:
|
20 | this.$ = $$[$0 - 1];
|
21 | break;
|
22 | case 9:
|
23 | case 11:
|
24 | case 12:
|
25 | this.$ = $$[$0];
|
26 | break;
|
27 | case 10:
|
28 | case 13:
|
29 | this.$ = $$[$0 - 1] + $$[$0];
|
30 | break;
|
31 | case 14:
|
32 | case 15:
|
33 | this.$ = $$[$0 - 1] + "~" + $$[$0] + "~";
|
34 | break;
|
35 | case 16:
|
36 | yy.addRelation($$[$0]);
|
37 | break;
|
38 | case 17:
|
39 | $$[$0 - 1].title = yy.cleanupLabel($$[$0]);
|
40 | yy.addRelation($$[$0 - 1]);
|
41 | break;
|
42 | case 27:
|
43 | this.$ = $$[$0].trim();
|
44 | yy.setAccTitle(this.$);
|
45 | break;
|
46 | case 28:
|
47 | case 29:
|
48 | this.$ = $$[$0].trim();
|
49 | yy.setAccDescription(this.$);
|
50 | break;
|
51 | case 30:
|
52 | yy.addClassesToNamespace($$[$0 - 3], $$[$0 - 1]);
|
53 | break;
|
54 | case 31:
|
55 | yy.addClassesToNamespace($$[$0 - 4], $$[$0 - 1]);
|
56 | break;
|
57 | case 32:
|
58 | this.$ = $$[$0];
|
59 | yy.addNamespace($$[$0]);
|
60 | break;
|
61 | case 33:
|
62 | this.$ = [$$[$0]];
|
63 | break;
|
64 | case 34:
|
65 | this.$ = [$$[$0 - 1]];
|
66 | break;
|
67 | case 35:
|
68 | $$[$0].unshift($$[$0 - 2]);
|
69 | this.$ = $$[$0];
|
70 | break;
|
71 | case 37:
|
72 | yy.setCssClass($$[$0 - 2], $$[$0]);
|
73 | break;
|
74 | case 38:
|
75 | yy.addMembers($$[$0 - 3], $$[$0 - 1]);
|
76 | break;
|
77 | case 39:
|
78 | yy.setCssClass($$[$0 - 5], $$[$0 - 3]);
|
79 | yy.addMembers($$[$0 - 5], $$[$0 - 1]);
|
80 | break;
|
81 | case 40:
|
82 | this.$ = $$[$0];
|
83 | yy.addClass($$[$0]);
|
84 | break;
|
85 | case 41:
|
86 | this.$ = $$[$0 - 1];
|
87 | yy.addClass($$[$0 - 1]);
|
88 | yy.setClassLabel($$[$0 - 1], $$[$0]);
|
89 | break;
|
90 | case 42:
|
91 | yy.addAnnotation($$[$0], $$[$0 - 2]);
|
92 | break;
|
93 | case 43:
|
94 | this.$ = [$$[$0]];
|
95 | break;
|
96 | case 44:
|
97 | $$[$0].push($$[$0 - 1]);
|
98 | this.$ = $$[$0];
|
99 | break;
|
100 | case 45:
|
101 | break;
|
102 | case 46:
|
103 | yy.addMember($$[$0 - 1], yy.cleanupLabel($$[$0]));
|
104 | break;
|
105 | case 47:
|
106 | break;
|
107 | case 48:
|
108 | break;
|
109 | case 49:
|
110 | this.$ = { "id1": $$[$0 - 2], "id2": $$[$0], relation: $$[$0 - 1], relationTitle1: "none", relationTitle2: "none" };
|
111 | break;
|
112 | case 50:
|
113 | this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 1], relationTitle1: $$[$0 - 2], relationTitle2: "none" };
|
114 | break;
|
115 | case 51:
|
116 | this.$ = { id1: $$[$0 - 3], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: "none", relationTitle2: $$[$0 - 1] };
|
117 | break;
|
118 | case 52:
|
119 | this.$ = { id1: $$[$0 - 4], id2: $$[$0], relation: $$[$0 - 2], relationTitle1: $$[$0 - 3], relationTitle2: $$[$0 - 1] };
|
120 | break;
|
121 | case 53:
|
122 | yy.addNote($$[$0], $$[$0 - 1]);
|
123 | break;
|
124 | case 54:
|
125 | yy.addNote($$[$0]);
|
126 | break;
|
127 | case 55:
|
128 | yy.setDirection("TB");
|
129 | break;
|
130 | case 56:
|
131 | yy.setDirection("BT");
|
132 | break;
|
133 | case 57:
|
134 | yy.setDirection("RL");
|
135 | break;
|
136 | case 58:
|
137 | yy.setDirection("LR");
|
138 | break;
|
139 | case 59:
|
140 | this.$ = { type1: $$[$0 - 2], type2: $$[$0], lineType: $$[$0 - 1] };
|
141 | break;
|
142 | case 60:
|
143 | this.$ = { type1: "none", type2: $$[$0], lineType: $$[$0 - 1] };
|
144 | break;
|
145 | case 61:
|
146 | this.$ = { type1: $$[$0 - 1], type2: "none", lineType: $$[$0] };
|
147 | break;
|
148 | case 62:
|
149 | this.$ = { type1: "none", type2: "none", lineType: $$[$0] };
|
150 | break;
|
151 | case 63:
|
152 | this.$ = yy.relationType.AGGREGATION;
|
153 | break;
|
154 | case 64:
|
155 | this.$ = yy.relationType.EXTENSION;
|
156 | break;
|
157 | case 65:
|
158 | this.$ = yy.relationType.COMPOSITION;
|
159 | break;
|
160 | case 66:
|
161 | this.$ = yy.relationType.DEPENDENCY;
|
162 | break;
|
163 | case 67:
|
164 | this.$ = yy.relationType.LOLLIPOP;
|
165 | break;
|
166 | case 68:
|
167 | this.$ = yy.lineType.LINE;
|
168 | break;
|
169 | case 69:
|
170 | this.$ = yy.lineType.DOTTED_LINE;
|
171 | break;
|
172 | case 70:
|
173 | case 76:
|
174 | this.$ = $$[$0 - 2];
|
175 | yy.setClickEvent($$[$0 - 1], $$[$0]);
|
176 | break;
|
177 | case 71:
|
178 | case 77:
|
179 | this.$ = $$[$0 - 3];
|
180 | yy.setClickEvent($$[$0 - 2], $$[$0 - 1]);
|
181 | yy.setTooltip($$[$0 - 2], $$[$0]);
|
182 | break;
|
183 | case 72:
|
184 | this.$ = $$[$0 - 2];
|
185 | yy.setLink($$[$0 - 1], $$[$0]);
|
186 | break;
|
187 | case 73:
|
188 | this.$ = $$[$0 - 3];
|
189 | yy.setLink($$[$0 - 2], $$[$0 - 1], $$[$0]);
|
190 | break;
|
191 | case 74:
|
192 | this.$ = $$[$0 - 3];
|
193 | yy.setLink($$[$0 - 2], $$[$0 - 1]);
|
194 | yy.setTooltip($$[$0 - 2], $$[$0]);
|
195 | break;
|
196 | case 75:
|
197 | this.$ = $$[$0 - 4];
|
198 | yy.setLink($$[$0 - 3], $$[$0 - 2], $$[$0]);
|
199 | yy.setTooltip($$[$0 - 3], $$[$0 - 1]);
|
200 | break;
|
201 | case 78:
|
202 | this.$ = $$[$0 - 3];
|
203 | yy.setClickEvent($$[$0 - 2], $$[$0 - 1], $$[$0]);
|
204 | break;
|
205 | case 79:
|
206 | this.$ = $$[$0 - 4];
|
207 | yy.setClickEvent($$[$0 - 3], $$[$0 - 2], $$[$0 - 1]);
|
208 | yy.setTooltip($$[$0 - 3], $$[$0]);
|
209 | break;
|
210 | case 80:
|
211 | this.$ = $$[$0 - 3];
|
212 | yy.setLink($$[$0 - 2], $$[$0]);
|
213 | break;
|
214 | case 81:
|
215 | this.$ = $$[$0 - 4];
|
216 | yy.setLink($$[$0 - 3], $$[$0 - 1], $$[$0]);
|
217 | break;
|
218 | case 82:
|
219 | this.$ = $$[$0 - 4];
|
220 | yy.setLink($$[$0 - 3], $$[$0 - 1]);
|
221 | yy.setTooltip($$[$0 - 3], $$[$0]);
|
222 | break;
|
223 | case 83:
|
224 | this.$ = $$[$0 - 5];
|
225 | yy.setLink($$[$0 - 4], $$[$0 - 2], $$[$0]);
|
226 | yy.setTooltip($$[$0 - 4], $$[$0 - 1]);
|
227 | break;
|
228 | case 84:
|
229 | this.$ = $$[$0 - 2];
|
230 | yy.setCssStyle($$[$0 - 1], $$[$0]);
|
231 | break;
|
232 | case 85:
|
233 | yy.setCssClass($$[$0 - 1], $$[$0]);
|
234 | break;
|
235 | case 86:
|
236 | this.$ = [$$[$0]];
|
237 | break;
|
238 | case 87:
|
239 | $$[$0 - 2].push($$[$0]);
|
240 | this.$ = $$[$0 - 2];
|
241 | break;
|
242 | case 89:
|
243 | this.$ = $$[$0 - 1] + $$[$0];
|
244 | break;
|
245 | }
|
246 | },
|
247 | table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 37, 17: 20, 18: 38, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 31: $V0, 33: $V1, 35: $V2, 36: 21, 40: $V3, 41: 22, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, o($Vo, [2, 5], { 8: [1, 46] }), { 8: [1, 47] }, o($Vp, [2, 16], { 21: [1, 48] }), o($Vp, [2, 18]), o($Vp, [2, 19]), o($Vp, [2, 20]), o($Vp, [2, 21]), o($Vp, [2, 22]), o($Vp, [2, 23]), o($Vp, [2, 24]), o($Vp, [2, 25]), o($Vp, [2, 26]), { 32: [1, 49] }, { 34: [1, 50] }, o($Vp, [2, 29]), o($Vp, [2, 45], { 49: 51, 57: 54, 58: 55, 13: [1, 52], 21: [1, 53], 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv, 65: $Vw }), { 37: [1, 63] }, o($Vx, [2, 36], { 37: [1, 65], 42: [1, 64] }), o($Vp, [2, 47]), o($Vp, [2, 48]), { 16: 66, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 16: 37, 17: 67, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 16: 37, 17: 68, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 16: 37, 17: 69, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 74: [1, 70] }, { 13: [1, 71] }, { 16: 37, 17: 72, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 13: $Vy, 51: 73 }, o($Vp, [2, 55]), o($Vp, [2, 56]), o($Vp, [2, 57]), o($Vp, [2, 58]), o($Vz, [2, 11], { 16: 37, 18: 38, 17: 75, 19: [1, 76], 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }), o($Vz, [2, 12], { 19: [1, 77] }), { 15: 78, 16: 79, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 16: 37, 17: 80, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VA, [2, 112]), o($VA, [2, 113]), o($VA, [2, 114]), o($VA, [2, 115]), o([1, 8, 9, 12, 13, 19, 21, 37, 39, 42, 59, 60, 61, 62, 63, 64, 65, 70, 72], [2, 116]), o($Vo, [2, 6], { 10: 5, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 17: 20, 36: 21, 41: 22, 16: 37, 18: 38, 5: 81, 31: $V0, 33: $V1, 35: $V2, 40: $V3, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }), { 5: 82, 10: 5, 16: 37, 17: 20, 18: 38, 20: 7, 22: 8, 23: 9, 24: 10, 25: 11, 26: 12, 27: 13, 28: 14, 29: 15, 30: 16, 31: $V0, 33: $V1, 35: $V2, 36: 21, 40: $V3, 41: 22, 44: $V4, 45: $V5, 47: $V6, 48: $V7, 50: $V8, 52: $V9, 53: $Va, 54: $Vb, 55: $Vc, 56: $Vd, 66: $Ve, 67: $Vf, 69: $Vg, 73: $Vh, 74: $Vi, 76: $Vj, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($Vp, [2, 17]), o($Vp, [2, 27]), o($Vp, [2, 28]), { 13: [1, 84], 16: 37, 17: 83, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 49: 85, 57: 54, 58: 55, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu, 64: $Vv, 65: $Vw }, o($Vp, [2, 46]), { 58: 86, 64: $Vv, 65: $Vw }, o($VB, [2, 62], { 57: 87, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu }), o($VC, [2, 63]), o($VC, [2, 64]), o($VC, [2, 65]), o($VC, [2, 66]), o($VC, [2, 67]), o($VD, [2, 68]), o($VD, [2, 69]), { 8: [1, 89], 23: 90, 38: 88, 41: 22, 44: $V4 }, { 16: 91, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, { 43: 92, 47: $VE }, { 46: [1, 94] }, { 13: [1, 95] }, { 13: [1, 96] }, { 70: [1, 97], 72: [1, 98] }, { 21: $VF, 73: $VG, 74: $VH, 75: 99, 77: 100, 79: 101, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }, { 74: [1, 111] }, { 13: $Vy, 51: 112 }, o($Vp, [2, 54]), o($Vp, [2, 117]), o($Vz, [2, 13]), o($Vz, [2, 14]), o($Vz, [2, 15]), { 37: [2, 32] }, { 15: 113, 16: 79, 37: [2, 9], 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm }, o($VO, [2, 40], { 11: 114, 12: [1, 115] }), o($Vo, [2, 7]), { 9: [1, 116] }, o($VP, [2, 49]), { 16: 37, 17: 117, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, { 13: [1, 119], 16: 37, 17: 118, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VB, [2, 61], { 57: 120, 59: $Vq, 60: $Vr, 61: $Vs, 62: $Vt, 63: $Vu }), o($VB, [2, 60]), { 39: [1, 121] }, { 23: 90, 38: 122, 41: 22, 44: $V4 }, { 8: [1, 123], 39: [2, 33] }, o($Vx, [2, 37], { 37: [1, 124] }), { 39: [1, 125] }, { 39: [2, 43], 43: 126, 47: $VE }, { 16: 37, 17: 127, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($Vp, [2, 70], { 13: [1, 128] }), o($Vp, [2, 72], { 13: [1, 130], 68: [1, 129] }), o($Vp, [2, 76], { 13: [1, 131], 71: [1, 132] }), { 13: [1, 133] }, o($Vp, [2, 84], { 78: [1, 134] }), o($VQ, [2, 86], { 79: 135, 21: $VF, 73: $VG, 74: $VH, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }), o($VR, [2, 88]), o($VR, [2, 90]), o($VR, [2, 91]), o($VR, [2, 92]), o($VR, [2, 93]), o($VR, [2, 94]), o($VR, [2, 95]), o($VR, [2, 96]), o($VR, [2, 97]), o($VR, [2, 98]), o($Vp, [2, 85]), o($Vp, [2, 53]), { 37: [2, 10] }, o($VO, [2, 41]), { 13: [1, 136] }, { 1: [2, 4] }, o($VP, [2, 51]), o($VP, [2, 50]), { 16: 37, 17: 137, 18: 38, 74: $Vi, 80: $Vk, 95: $Vl, 97: $Vm, 98: $Vn }, o($VB, [2, 59]), o($Vp, [2, 30]), { 39: [1, 138] }, { 23: 90, 38: 139, 39: [2, 34], 41: 22, 44: $V4 }, { 43: 140, 47: $VE }, o($Vx, [2, 38]), { 39: [2, 44] }, o($Vp, [2, 42]), o($Vp, [2, 71]), o($Vp, [2, 73]), o($Vp, [2, 74], { 68: [1, 141] }), o($Vp, [2, 77]), o($Vp, [2, 78], { 13: [1, 142] }), o($Vp, [2, 80], { 13: [1, 144], 68: [1, 143] }), { 21: $VF, 73: $VG, 74: $VH, 77: 145, 79: 101, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }, o($VR, [2, 89]), { 14: [1, 146] }, o($VP, [2, 52]), o($Vp, [2, 31]), { 39: [2, 35] }, { 39: [1, 147] }, o($Vp, [2, 75]), o($Vp, [2, 79]), o($Vp, [2, 81]), o($Vp, [2, 82], { 68: [1, 148] }), o($VQ, [2, 87], { 79: 135, 21: $VF, 73: $VG, 74: $VH, 80: $VI, 81: $VJ, 82: $VK, 83: $VL, 84: $VM, 85: $VN }), o($VO, [2, 8]), o($Vx, [2, 39]), o($Vp, [2, 83])],
|
248 | defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 78: [2, 32], 113: [2, 10], 116: [2, 4], 126: [2, 44], 139: [2, 35] },
|
249 | parseError: function parseError(str, hash) {
|
250 | if (hash.recoverable) {
|
251 | this.trace(str);
|
252 | } else {
|
253 | var error = new Error(str);
|
254 | error.hash = hash;
|
255 | throw error;
|
256 | }
|
257 | },
|
258 | parse: function parse(input) {
|
259 | var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, TERROR = 2, EOF = 1;
|
260 | var args = lstack.slice.call(arguments, 1);
|
261 | var lexer2 = Object.create(this.lexer);
|
262 | var sharedState = { yy: {} };
|
263 | for (var k in this.yy) {
|
264 | if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
265 | sharedState.yy[k] = this.yy[k];
|
266 | }
|
267 | }
|
268 | lexer2.setInput(input, sharedState.yy);
|
269 | sharedState.yy.lexer = lexer2;
|
270 | sharedState.yy.parser = this;
|
271 | if (typeof lexer2.yylloc == "undefined") {
|
272 | lexer2.yylloc = {};
|
273 | }
|
274 | var yyloc = lexer2.yylloc;
|
275 | lstack.push(yyloc);
|
276 | var ranges = lexer2.options && lexer2.options.ranges;
|
277 | if (typeof sharedState.yy.parseError === "function") {
|
278 | this.parseError = sharedState.yy.parseError;
|
279 | } else {
|
280 | this.parseError = Object.getPrototypeOf(this).parseError;
|
281 | }
|
282 | function lex() {
|
283 | var token;
|
284 | token = tstack.pop() || lexer2.lex() || EOF;
|
285 | if (typeof token !== "number") {
|
286 | if (token instanceof Array) {
|
287 | tstack = token;
|
288 | token = tstack.pop();
|
289 | }
|
290 | token = self.symbols_[token] || token;
|
291 | }
|
292 | return token;
|
293 | }
|
294 | var symbol, state, action, r, yyval = {}, p, len, newState, expected;
|
295 | while (true) {
|
296 | state = stack[stack.length - 1];
|
297 | if (this.defaultActions[state]) {
|
298 | action = this.defaultActions[state];
|
299 | } else {
|
300 | if (symbol === null || typeof symbol == "undefined") {
|
301 | symbol = lex();
|
302 | }
|
303 | action = table[state] && table[state][symbol];
|
304 | }
|
305 | if (typeof action === "undefined" || !action.length || !action[0]) {
|
306 | var errStr = "";
|
307 | expected = [];
|
308 | for (p in table[state]) {
|
309 | if (this.terminals_[p] && p > TERROR) {
|
310 | expected.push("'" + this.terminals_[p] + "'");
|
311 | }
|
312 | }
|
313 | if (lexer2.showPosition) {
|
314 | errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
315 | } else {
|
316 | errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
317 | }
|
318 | this.parseError(errStr, {
|
319 | text: lexer2.match,
|
320 | token: this.terminals_[symbol] || symbol,
|
321 | line: lexer2.yylineno,
|
322 | loc: yyloc,
|
323 | expected
|
324 | });
|
325 | }
|
326 | if (action[0] instanceof Array && action.length > 1) {
|
327 | throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
328 | }
|
329 | switch (action[0]) {
|
330 | case 1:
|
331 | stack.push(symbol);
|
332 | vstack.push(lexer2.yytext);
|
333 | lstack.push(lexer2.yylloc);
|
334 | stack.push(action[1]);
|
335 | symbol = null;
|
336 | {
|
337 | yyleng = lexer2.yyleng;
|
338 | yytext = lexer2.yytext;
|
339 | yylineno = lexer2.yylineno;
|
340 | yyloc = lexer2.yylloc;
|
341 | }
|
342 | break;
|
343 | case 2:
|
344 | len = this.productions_[action[1]][1];
|
345 | yyval.$ = vstack[vstack.length - len];
|
346 | yyval._$ = {
|
347 | first_line: lstack[lstack.length - (len || 1)].first_line,
|
348 | last_line: lstack[lstack.length - 1].last_line,
|
349 | first_column: lstack[lstack.length - (len || 1)].first_column,
|
350 | last_column: lstack[lstack.length - 1].last_column
|
351 | };
|
352 | if (ranges) {
|
353 | yyval._$.range = [
|
354 | lstack[lstack.length - (len || 1)].range[0],
|
355 | lstack[lstack.length - 1].range[1]
|
356 | ];
|
357 | }
|
358 | r = this.performAction.apply(yyval, [
|
359 | yytext,
|
360 | yyleng,
|
361 | yylineno,
|
362 | sharedState.yy,
|
363 | action[1],
|
364 | vstack,
|
365 | lstack
|
366 | ].concat(args));
|
367 | if (typeof r !== "undefined") {
|
368 | return r;
|
369 | }
|
370 | if (len) {
|
371 | stack = stack.slice(0, -1 * len * 2);
|
372 | vstack = vstack.slice(0, -1 * len);
|
373 | lstack = lstack.slice(0, -1 * len);
|
374 | }
|
375 | stack.push(this.productions_[action[1]][0]);
|
376 | vstack.push(yyval.$);
|
377 | lstack.push(yyval._$);
|
378 | newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
379 | stack.push(newState);
|
380 | break;
|
381 | case 3:
|
382 | return true;
|
383 | }
|
384 | }
|
385 | return true;
|
386 | }
|
387 | };
|
388 | var lexer = function() {
|
389 | var lexer2 = {
|
390 | EOF: 1,
|
391 | parseError: function parseError(str, hash) {
|
392 | if (this.yy.parser) {
|
393 | this.yy.parser.parseError(str, hash);
|
394 | } else {
|
395 | throw new Error(str);
|
396 | }
|
397 | },
|
398 |
|
399 | setInput: function(input, yy) {
|
400 | this.yy = yy || this.yy || {};
|
401 | this._input = input;
|
402 | this._more = this._backtrack = this.done = false;
|
403 | this.yylineno = this.yyleng = 0;
|
404 | this.yytext = this.matched = this.match = "";
|
405 | this.conditionStack = ["INITIAL"];
|
406 | this.yylloc = {
|
407 | first_line: 1,
|
408 | first_column: 0,
|
409 | last_line: 1,
|
410 | last_column: 0
|
411 | };
|
412 | if (this.options.ranges) {
|
413 | this.yylloc.range = [0, 0];
|
414 | }
|
415 | this.offset = 0;
|
416 | return this;
|
417 | },
|
418 |
|
419 | input: function() {
|
420 | var ch = this._input[0];
|
421 | this.yytext += ch;
|
422 | this.yyleng++;
|
423 | this.offset++;
|
424 | this.match += ch;
|
425 | this.matched += ch;
|
426 | var lines = ch.match(/(?:\r\n?|\n).*/g);
|
427 | if (lines) {
|
428 | this.yylineno++;
|
429 | this.yylloc.last_line++;
|
430 | } else {
|
431 | this.yylloc.last_column++;
|
432 | }
|
433 | if (this.options.ranges) {
|
434 | this.yylloc.range[1]++;
|
435 | }
|
436 | this._input = this._input.slice(1);
|
437 | return ch;
|
438 | },
|
439 |
|
440 | unput: function(ch) {
|
441 | var len = ch.length;
|
442 | var lines = ch.split(/(?:\r\n?|\n)/g);
|
443 | this._input = ch + this._input;
|
444 | this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
445 | this.offset -= len;
|
446 | var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
447 | this.match = this.match.substr(0, this.match.length - 1);
|
448 | this.matched = this.matched.substr(0, this.matched.length - 1);
|
449 | if (lines.length - 1) {
|
450 | this.yylineno -= lines.length - 1;
|
451 | }
|
452 | var r = this.yylloc.range;
|
453 | this.yylloc = {
|
454 | first_line: this.yylloc.first_line,
|
455 | last_line: this.yylineno + 1,
|
456 | first_column: this.yylloc.first_column,
|
457 | last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
|
458 | };
|
459 | if (this.options.ranges) {
|
460 | this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
461 | }
|
462 | this.yyleng = this.yytext.length;
|
463 | return this;
|
464 | },
|
465 |
|
466 | more: function() {
|
467 | this._more = true;
|
468 | return this;
|
469 | },
|
470 |
|
471 | reject: function() {
|
472 | if (this.options.backtrack_lexer) {
|
473 | this._backtrack = true;
|
474 | } else {
|
475 | 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).\n" + this.showPosition(), {
|
476 | text: "",
|
477 | token: null,
|
478 | line: this.yylineno
|
479 | });
|
480 | }
|
481 | return this;
|
482 | },
|
483 |
|
484 | less: function(n) {
|
485 | this.unput(this.match.slice(n));
|
486 | },
|
487 |
|
488 | pastInput: function() {
|
489 | var past = this.matched.substr(0, this.matched.length - this.match.length);
|
490 | return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
491 | },
|
492 |
|
493 | upcomingInput: function() {
|
494 | var next = this.match;
|
495 | if (next.length < 20) {
|
496 | next += this._input.substr(0, 20 - next.length);
|
497 | }
|
498 | return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
499 | },
|
500 |
|
501 | showPosition: function() {
|
502 | var pre = this.pastInput();
|
503 | var c = new Array(pre.length + 1).join("-");
|
504 | return pre + this.upcomingInput() + "\n" + c + "^";
|
505 | },
|
506 |
|
507 | test_match: function(match, indexed_rule) {
|
508 | var token, lines, backup;
|
509 | if (this.options.backtrack_lexer) {
|
510 | backup = {
|
511 | yylineno: this.yylineno,
|
512 | yylloc: {
|
513 | first_line: this.yylloc.first_line,
|
514 | last_line: this.last_line,
|
515 | first_column: this.yylloc.first_column,
|
516 | last_column: this.yylloc.last_column
|
517 | },
|
518 | yytext: this.yytext,
|
519 | match: this.match,
|
520 | matches: this.matches,
|
521 | matched: this.matched,
|
522 | yyleng: this.yyleng,
|
523 | offset: this.offset,
|
524 | _more: this._more,
|
525 | _input: this._input,
|
526 | yy: this.yy,
|
527 | conditionStack: this.conditionStack.slice(0),
|
528 | done: this.done
|
529 | };
|
530 | if (this.options.ranges) {
|
531 | backup.yylloc.range = this.yylloc.range.slice(0);
|
532 | }
|
533 | }
|
534 | lines = match[0].match(/(?:\r\n?|\n).*/g);
|
535 | if (lines) {
|
536 | this.yylineno += lines.length;
|
537 | }
|
538 | this.yylloc = {
|
539 | first_line: this.yylloc.last_line,
|
540 | last_line: this.yylineno + 1,
|
541 | first_column: this.yylloc.last_column,
|
542 | last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
543 | };
|
544 | this.yytext += match[0];
|
545 | this.match += match[0];
|
546 | this.matches = match;
|
547 | this.yyleng = this.yytext.length;
|
548 | if (this.options.ranges) {
|
549 | this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
550 | }
|
551 | this._more = false;
|
552 | this._backtrack = false;
|
553 | this._input = this._input.slice(match[0].length);
|
554 | this.matched += match[0];
|
555 | token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
556 | if (this.done && this._input) {
|
557 | this.done = false;
|
558 | }
|
559 | if (token) {
|
560 | return token;
|
561 | } else if (this._backtrack) {
|
562 | for (var k in backup) {
|
563 | this[k] = backup[k];
|
564 | }
|
565 | return false;
|
566 | }
|
567 | return false;
|
568 | },
|
569 |
|
570 | next: function() {
|
571 | if (this.done) {
|
572 | return this.EOF;
|
573 | }
|
574 | if (!this._input) {
|
575 | this.done = true;
|
576 | }
|
577 | var token, match, tempMatch, index;
|
578 | if (!this._more) {
|
579 | this.yytext = "";
|
580 | this.match = "";
|
581 | }
|
582 | var rules = this._currentRules();
|
583 | for (var i = 0; i < rules.length; i++) {
|
584 | tempMatch = this._input.match(this.rules[rules[i]]);
|
585 | if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
586 | match = tempMatch;
|
587 | index = i;
|
588 | if (this.options.backtrack_lexer) {
|
589 | token = this.test_match(tempMatch, rules[i]);
|
590 | if (token !== false) {
|
591 | return token;
|
592 | } else if (this._backtrack) {
|
593 | match = false;
|
594 | continue;
|
595 | } else {
|
596 | return false;
|
597 | }
|
598 | } else if (!this.options.flex) {
|
599 | break;
|
600 | }
|
601 | }
|
602 | }
|
603 | if (match) {
|
604 | token = this.test_match(match, rules[index]);
|
605 | if (token !== false) {
|
606 | return token;
|
607 | }
|
608 | return false;
|
609 | }
|
610 | if (this._input === "") {
|
611 | return this.EOF;
|
612 | } else {
|
613 | return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
614 | text: "",
|
615 | token: null,
|
616 | line: this.yylineno
|
617 | });
|
618 | }
|
619 | },
|
620 |
|
621 | lex: function lex() {
|
622 | var r = this.next();
|
623 | if (r) {
|
624 | return r;
|
625 | } else {
|
626 | return this.lex();
|
627 | }
|
628 | },
|
629 |
|
630 | begin: function begin(condition) {
|
631 | this.conditionStack.push(condition);
|
632 | },
|
633 |
|
634 | popState: function popState() {
|
635 | var n = this.conditionStack.length - 1;
|
636 | if (n > 0) {
|
637 | return this.conditionStack.pop();
|
638 | } else {
|
639 | return this.conditionStack[0];
|
640 | }
|
641 | },
|
642 |
|
643 | _currentRules: function _currentRules() {
|
644 | if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
645 | return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
646 | } else {
|
647 | return this.conditions["INITIAL"].rules;
|
648 | }
|
649 | },
|
650 |
|
651 | topState: function topState(n) {
|
652 | n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
653 | if (n >= 0) {
|
654 | return this.conditionStack[n];
|
655 | } else {
|
656 | return "INITIAL";
|
657 | }
|
658 | },
|
659 |
|
660 | pushState: function pushState(condition) {
|
661 | this.begin(condition);
|
662 | },
|
663 |
|
664 | stateStackSize: function stateStackSize() {
|
665 | return this.conditionStack.length;
|
666 | },
|
667 | options: {},
|
668 | performAction: function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
669 | switch ($avoiding_name_collisions) {
|
670 | case 0:
|
671 | return 53;
|
672 | case 1:
|
673 | return 54;
|
674 | case 2:
|
675 | return 55;
|
676 | case 3:
|
677 | return 56;
|
678 | case 4:
|
679 | break;
|
680 | case 5:
|
681 | break;
|
682 | case 6:
|
683 | this.begin("acc_title");
|
684 | return 31;
|
685 | case 7:
|
686 | this.popState();
|
687 | return "acc_title_value";
|
688 | case 8:
|
689 | this.begin("acc_descr");
|
690 | return 33;
|
691 | case 9:
|
692 | this.popState();
|
693 | return "acc_descr_value";
|
694 | case 10:
|
695 | this.begin("acc_descr_multiline");
|
696 | break;
|
697 | case 11:
|
698 | this.popState();
|
699 | break;
|
700 | case 12:
|
701 | return "acc_descr_multiline_value";
|
702 | case 13:
|
703 | return 8;
|
704 | case 14:
|
705 | break;
|
706 | case 15:
|
707 | return 7;
|
708 | case 16:
|
709 | return 7;
|
710 | case 17:
|
711 | return "EDGE_STATE";
|
712 | case 18:
|
713 | this.begin("callback_name");
|
714 | break;
|
715 | case 19:
|
716 | this.popState();
|
717 | break;
|
718 | case 20:
|
719 | this.popState();
|
720 | this.begin("callback_args");
|
721 | break;
|
722 | case 21:
|
723 | return 70;
|
724 | case 22:
|
725 | this.popState();
|
726 | break;
|
727 | case 23:
|
728 | return 71;
|
729 | case 24:
|
730 | this.popState();
|
731 | break;
|
732 | case 25:
|
733 | return "STR";
|
734 | case 26:
|
735 | this.begin("string");
|
736 | break;
|
737 | case 27:
|
738 | return 73;
|
739 | case 28:
|
740 | this.begin("namespace");
|
741 | return 40;
|
742 | case 29:
|
743 | this.popState();
|
744 | return 8;
|
745 | case 30:
|
746 | break;
|
747 | case 31:
|
748 | this.begin("namespace-body");
|
749 | return 37;
|
750 | case 32:
|
751 | this.popState();
|
752 | return 39;
|
753 | case 33:
|
754 | return "EOF_IN_STRUCT";
|
755 | case 34:
|
756 | return 8;
|
757 | case 35:
|
758 | break;
|
759 | case 36:
|
760 | return "EDGE_STATE";
|
761 | case 37:
|
762 | this.begin("class");
|
763 | return 44;
|
764 | case 38:
|
765 | this.popState();
|
766 | return 8;
|
767 | case 39:
|
768 | break;
|
769 | case 40:
|
770 | this.popState();
|
771 | this.popState();
|
772 | return 39;
|
773 | case 41:
|
774 | this.begin("class-body");
|
775 | return 37;
|
776 | case 42:
|
777 | this.popState();
|
778 | return 39;
|
779 | case 43:
|
780 | return "EOF_IN_STRUCT";
|
781 | case 44:
|
782 | return "EDGE_STATE";
|
783 | case 45:
|
784 | return "OPEN_IN_STRUCT";
|
785 | case 46:
|
786 | break;
|
787 | case 47:
|
788 | return "MEMBER";
|
789 | case 48:
|
790 | return 76;
|
791 | case 49:
|
792 | return 66;
|
793 | case 50:
|
794 | return 67;
|
795 | case 51:
|
796 | return 69;
|
797 | case 52:
|
798 | return 50;
|
799 | case 53:
|
800 | return 52;
|
801 | case 54:
|
802 | return 45;
|
803 | case 55:
|
804 | return 46;
|
805 | case 56:
|
806 | return 72;
|
807 | case 57:
|
808 | this.popState();
|
809 | break;
|
810 | case 58:
|
811 | return "GENERICTYPE";
|
812 | case 59:
|
813 | this.begin("generic");
|
814 | break;
|
815 | case 60:
|
816 | this.popState();
|
817 | break;
|
818 | case 61:
|
819 | return "BQUOTE_STR";
|
820 | case 62:
|
821 | this.begin("bqstring");
|
822 | break;
|
823 | case 63:
|
824 | return 68;
|
825 | case 64:
|
826 | return 68;
|
827 | case 65:
|
828 | return 68;
|
829 | case 66:
|
830 | return 68;
|
831 | case 67:
|
832 | return 60;
|
833 | case 68:
|
834 | return 60;
|
835 | case 69:
|
836 | return 62;
|
837 | case 70:
|
838 | return 62;
|
839 | case 71:
|
840 | return 61;
|
841 | case 72:
|
842 | return 59;
|
843 | case 73:
|
844 | return 63;
|
845 | case 74:
|
846 | return 64;
|
847 | case 75:
|
848 | return 65;
|
849 | case 76:
|
850 | return 21;
|
851 | case 77:
|
852 | return 42;
|
853 | case 78:
|
854 | return 95;
|
855 | case 79:
|
856 | return "DOT";
|
857 | case 80:
|
858 | return "PLUS";
|
859 | case 81:
|
860 | return 81;
|
861 | case 82:
|
862 | return 78;
|
863 | case 83:
|
864 | return 84;
|
865 | case 84:
|
866 | return 84;
|
867 | case 85:
|
868 | return 85;
|
869 | case 86:
|
870 | return "EQUALS";
|
871 | case 87:
|
872 | return "EQUALS";
|
873 | case 88:
|
874 | return 74;
|
875 | case 89:
|
876 | return 12;
|
877 | case 90:
|
878 | return 14;
|
879 | case 91:
|
880 | return "PUNCTUATION";
|
881 | case 92:
|
882 | return 80;
|
883 | case 93:
|
884 | return 97;
|
885 | case 94:
|
886 | return 83;
|
887 | case 95:
|
888 | return 83;
|
889 | case 96:
|
890 | return 9;
|
891 | }
|
892 | },
|
893 | rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:style\b)/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?:href\b)/, /^(?:[~])/, /^(?:[^~]*)/, /^(?:~)/, /^(?:[`])/, /^(?:[^`]+)/, /^(?:[`])/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:\s*<\|)/, /^(?:\s*\|>)/, /^(?:\s*>)/, /^(?:\s*<)/, /^(?:\s*\*)/, /^(?:\s*o\b)/, /^(?:\s*\(\))/, /^(?:--)/, /^(?:\.\.)/, /^(?::{1}[^:\n;]+)/, /^(?::{3})/, /^(?:-)/, /^(?:\.)/, /^(?:\+)/, /^(?::)/, /^(?:,)/, /^(?:#)/, /^(?:#)/, /^(?:%)/, /^(?:=)/, /^(?:=)/, /^(?:\w+)/, /^(?:\[)/, /^(?:\])/, /^(?:[!"#$%&'*+,-.`?\\/])/, /^(?:[0-9]+)/, /^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/, /^(?:\s)/, /^(?:\s)/, /^(?:$)/],
|
894 | conditions: { "namespace-body": { "rules": [26, 32, 33, 34, 35, 36, 37, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "namespace": { "rules": [26, 28, 29, 30, 31, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "class-body": { "rules": [26, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "class": { "rules": [26, 38, 39, 40, 41, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_descr_multiline": { "rules": [11, 12, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_descr": { "rules": [9, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "acc_title": { "rules": [7, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "callback_args": { "rules": [22, 23, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "callback_name": { "rules": [19, 20, 21, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "href": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "struct": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "generic": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "bqstring": { "rules": [26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "string": { "rules": [24, 25, 26, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 28, 37, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96], "inclusive": true } }
|
895 | };
|
896 | return lexer2;
|
897 | }();
|
898 | parser2.lexer = lexer;
|
899 | function Parser() {
|
900 | this.yy = {};
|
901 | }
|
902 | Parser.prototype = parser2;
|
903 | parser2.Parser = Parser;
|
904 | return new Parser();
|
905 | }();
|
906 | parser.parser = parser;
|
907 | const parser$1 = parser;
|
908 | const visibilityValues = ["#", "+", "~", "-", ""];
|
909 | class ClassMember {
|
910 | constructor(input, memberType) {
|
911 | this.memberType = memberType;
|
912 | this.visibility = "";
|
913 | this.classifier = "";
|
914 | const sanitizedInput = sanitizeText$1(input, getConfig());
|
915 | this.parseMember(sanitizedInput);
|
916 | }
|
917 | getDisplayDetails() {
|
918 | let displayText = this.visibility + parseGenericTypes(this.id);
|
919 | if (this.memberType === "method") {
|
920 | displayText += `(${parseGenericTypes(this.parameters.trim())})`;
|
921 | if (this.returnType) {
|
922 | displayText += " : " + parseGenericTypes(this.returnType);
|
923 | }
|
924 | }
|
925 | displayText = displayText.trim();
|
926 | const cssStyle = this.parseClassifier();
|
927 | return {
|
928 | displayText,
|
929 | cssStyle
|
930 | };
|
931 | }
|
932 | parseMember(input) {
|
933 | let potentialClassifier = "";
|
934 | if (this.memberType === "method") {
|
935 | const methodRegEx = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/;
|
936 | const match = input.match(methodRegEx);
|
937 | if (match) {
|
938 | const detectedVisibility = match[1] ? match[1].trim() : "";
|
939 | if (visibilityValues.includes(detectedVisibility)) {
|
940 | this.visibility = detectedVisibility;
|
941 | }
|
942 | this.id = match[2].trim();
|
943 | this.parameters = match[3] ? match[3].trim() : "";
|
944 | potentialClassifier = match[4] ? match[4].trim() : "";
|
945 | this.returnType = match[5] ? match[5].trim() : "";
|
946 | if (potentialClassifier === "") {
|
947 | const lastChar = this.returnType.substring(this.returnType.length - 1);
|
948 | if (lastChar.match(/[$*]/)) {
|
949 | potentialClassifier = lastChar;
|
950 | this.returnType = this.returnType.substring(0, this.returnType.length - 1);
|
951 | }
|
952 | }
|
953 | }
|
954 | } else {
|
955 | const length = input.length;
|
956 | const firstChar = input.substring(0, 1);
|
957 | const lastChar = input.substring(length - 1);
|
958 | if (visibilityValues.includes(firstChar)) {
|
959 | this.visibility = firstChar;
|
960 | }
|
961 | if (lastChar.match(/[$*]/)) {
|
962 | potentialClassifier = lastChar;
|
963 | }
|
964 | this.id = input.substring(
|
965 | this.visibility === "" ? 0 : 1,
|
966 | potentialClassifier === "" ? length : length - 1
|
967 | );
|
968 | }
|
969 | this.classifier = potentialClassifier;
|
970 | }
|
971 | parseClassifier() {
|
972 | switch (this.classifier) {
|
973 | case "*":
|
974 | return "font-style:italic;";
|
975 | case "$":
|
976 | return "text-decoration:underline;";
|
977 | default:
|
978 | return "";
|
979 | }
|
980 | }
|
981 | }
|
982 | const MERMAID_DOM_ID_PREFIX = "classId-";
|
983 | let relations = [];
|
984 | let classes = {};
|
985 | let notes = [];
|
986 | let classCounter = 0;
|
987 | let namespaces = {};
|
988 | let namespaceCounter = 0;
|
989 | let functions = [];
|
990 | const sanitizeText = (txt) => common.sanitizeText(txt, getConfig());
|
991 | const splitClassNameAndType = function(_id) {
|
992 | const id = common.sanitizeText(_id, getConfig());
|
993 | let genericType = "";
|
994 | let className = id;
|
995 | if (id.indexOf("~") > 0) {
|
996 | const split = id.split("~");
|
997 | className = sanitizeText(split[0]);
|
998 | genericType = sanitizeText(split[1]);
|
999 | }
|
1000 | return { className, type: genericType };
|
1001 | };
|
1002 | const setClassLabel = function(_id, label) {
|
1003 | const id = common.sanitizeText(_id, getConfig());
|
1004 | if (label) {
|
1005 | label = sanitizeText(label);
|
1006 | }
|
1007 | const { className } = splitClassNameAndType(id);
|
1008 | classes[className].label = label;
|
1009 | };
|
1010 | const addClass = function(_id) {
|
1011 | const id = common.sanitizeText(_id, getConfig());
|
1012 | const { className, type } = splitClassNameAndType(id);
|
1013 | if (Object.hasOwn(classes, className)) {
|
1014 | return;
|
1015 | }
|
1016 | const name = common.sanitizeText(className, getConfig());
|
1017 | classes[name] = {
|
1018 | id: name,
|
1019 | type,
|
1020 | label: name,
|
1021 | cssClasses: [],
|
1022 | methods: [],
|
1023 | members: [],
|
1024 | annotations: [],
|
1025 | styles: [],
|
1026 | domId: MERMAID_DOM_ID_PREFIX + name + "-" + classCounter
|
1027 | };
|
1028 | classCounter++;
|
1029 | };
|
1030 | const lookUpDomId = function(_id) {
|
1031 | const id = common.sanitizeText(_id, getConfig());
|
1032 | if (id in classes) {
|
1033 | return classes[id].domId;
|
1034 | }
|
1035 | throw new Error("Class not found: " + id);
|
1036 | };
|
1037 | const clear = function() {
|
1038 | relations = [];
|
1039 | classes = {};
|
1040 | notes = [];
|
1041 | functions = [];
|
1042 | functions.push(setupToolTips);
|
1043 | namespaces = {};
|
1044 | namespaceCounter = 0;
|
1045 | clear$1();
|
1046 | };
|
1047 | const getClass = function(id) {
|
1048 | return classes[id];
|
1049 | };
|
1050 | const getClasses = function() {
|
1051 | return classes;
|
1052 | };
|
1053 | const getRelations = function() {
|
1054 | return relations;
|
1055 | };
|
1056 | const getNotes = function() {
|
1057 | return notes;
|
1058 | };
|
1059 | const addRelation = function(relation) {
|
1060 | log.debug("Adding relation: " + JSON.stringify(relation));
|
1061 | addClass(relation.id1);
|
1062 | addClass(relation.id2);
|
1063 | relation.id1 = splitClassNameAndType(relation.id1).className;
|
1064 | relation.id2 = splitClassNameAndType(relation.id2).className;
|
1065 | relation.relationTitle1 = common.sanitizeText(relation.relationTitle1.trim(), getConfig());
|
1066 | relation.relationTitle2 = common.sanitizeText(relation.relationTitle2.trim(), getConfig());
|
1067 | relations.push(relation);
|
1068 | };
|
1069 | const addAnnotation = function(className, annotation) {
|
1070 | const validatedClassName = splitClassNameAndType(className).className;
|
1071 | classes[validatedClassName].annotations.push(annotation);
|
1072 | };
|
1073 | const addMember = function(className, member) {
|
1074 | addClass(className);
|
1075 | const validatedClassName = splitClassNameAndType(className).className;
|
1076 | const theClass = classes[validatedClassName];
|
1077 | if (typeof member === "string") {
|
1078 | const memberString = member.trim();
|
1079 | if (memberString.startsWith("<<") && memberString.endsWith(">>")) {
|
1080 | theClass.annotations.push(sanitizeText(memberString.substring(2, memberString.length - 2)));
|
1081 | } else if (memberString.indexOf(")") > 0) {
|
1082 | theClass.methods.push(new ClassMember(memberString, "method"));
|
1083 | } else if (memberString) {
|
1084 | theClass.members.push(new ClassMember(memberString, "attribute"));
|
1085 | }
|
1086 | }
|
1087 | };
|
1088 | const addMembers = function(className, members) {
|
1089 | if (Array.isArray(members)) {
|
1090 | members.reverse();
|
1091 | members.forEach((member) => addMember(className, member));
|
1092 | }
|
1093 | };
|
1094 | const addNote = function(text, className) {
|
1095 | const note = {
|
1096 | id: `note${notes.length}`,
|
1097 | class: className,
|
1098 | text
|
1099 | };
|
1100 | notes.push(note);
|
1101 | };
|
1102 | const cleanupLabel = function(label) {
|
1103 | if (label.startsWith(":")) {
|
1104 | label = label.substring(1);
|
1105 | }
|
1106 | return sanitizeText(label.trim());
|
1107 | };
|
1108 | const setCssClass = function(ids, className) {
|
1109 | ids.split(",").forEach(function(_id) {
|
1110 | let id = _id;
|
1111 | if (_id[0].match(/\d/)) {
|
1112 | id = MERMAID_DOM_ID_PREFIX + id;
|
1113 | }
|
1114 | if (classes[id] !== void 0) {
|
1115 | classes[id].cssClasses.push(className);
|
1116 | }
|
1117 | });
|
1118 | };
|
1119 | const setTooltip = function(ids, tooltip) {
|
1120 | ids.split(",").forEach(function(id) {
|
1121 | if (tooltip !== void 0) {
|
1122 | classes[id].tooltip = sanitizeText(tooltip);
|
1123 | }
|
1124 | });
|
1125 | };
|
1126 | const getTooltip = function(id, namespace) {
|
1127 | if (namespace) {
|
1128 | return namespaces[namespace].classes[id].tooltip;
|
1129 | }
|
1130 | return classes[id].tooltip;
|
1131 | };
|
1132 | const setLink = function(ids, linkStr, target) {
|
1133 | const config = getConfig();
|
1134 | ids.split(",").forEach(function(_id) {
|
1135 | let id = _id;
|
1136 | if (_id[0].match(/\d/)) {
|
1137 | id = MERMAID_DOM_ID_PREFIX + id;
|
1138 | }
|
1139 | if (classes[id] !== void 0) {
|
1140 | classes[id].link = utils.formatUrl(linkStr, config);
|
1141 | if (config.securityLevel === "sandbox") {
|
1142 | classes[id].linkTarget = "_top";
|
1143 | } else if (typeof target === "string") {
|
1144 | classes[id].linkTarget = sanitizeText(target);
|
1145 | } else {
|
1146 | classes[id].linkTarget = "_blank";
|
1147 | }
|
1148 | }
|
1149 | });
|
1150 | setCssClass(ids, "clickable");
|
1151 | };
|
1152 | const setClickEvent = function(ids, functionName, functionArgs) {
|
1153 | ids.split(",").forEach(function(id) {
|
1154 | setClickFunc(id, functionName, functionArgs);
|
1155 | classes[id].haveCallback = true;
|
1156 | });
|
1157 | setCssClass(ids, "clickable");
|
1158 | };
|
1159 | const setClickFunc = function(_domId, functionName, functionArgs) {
|
1160 | const domId = common.sanitizeText(_domId, getConfig());
|
1161 | const config = getConfig();
|
1162 | if (config.securityLevel !== "loose") {
|
1163 | return;
|
1164 | }
|
1165 | if (functionName === void 0) {
|
1166 | return;
|
1167 | }
|
1168 | const id = domId;
|
1169 | if (classes[id] !== void 0) {
|
1170 | const elemId = lookUpDomId(id);
|
1171 | let argList = [];
|
1172 | if (typeof functionArgs === "string") {
|
1173 | argList = functionArgs.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
|
1174 | for (let i = 0; i < argList.length; i++) {
|
1175 | let item = argList[i].trim();
|
1176 | if (item.charAt(0) === '"' && item.charAt(item.length - 1) === '"') {
|
1177 | item = item.substr(1, item.length - 2);
|
1178 | }
|
1179 | argList[i] = item;
|
1180 | }
|
1181 | }
|
1182 | if (argList.length === 0) {
|
1183 | argList.push(elemId);
|
1184 | }
|
1185 | functions.push(function() {
|
1186 | const elem = document.querySelector(`[id="${elemId}"]`);
|
1187 | if (elem !== null) {
|
1188 | elem.addEventListener(
|
1189 | "click",
|
1190 | function() {
|
1191 | utils.runFunc(functionName, ...argList);
|
1192 | },
|
1193 | false
|
1194 | );
|
1195 | }
|
1196 | });
|
1197 | }
|
1198 | };
|
1199 | const bindFunctions = function(element) {
|
1200 | functions.forEach(function(fun) {
|
1201 | fun(element);
|
1202 | });
|
1203 | };
|
1204 | const lineType = {
|
1205 | LINE: 0,
|
1206 | DOTTED_LINE: 1
|
1207 | };
|
1208 | const relationType = {
|
1209 | AGGREGATION: 0,
|
1210 | EXTENSION: 1,
|
1211 | COMPOSITION: 2,
|
1212 | DEPENDENCY: 3,
|
1213 | LOLLIPOP: 4
|
1214 | };
|
1215 | const setupToolTips = function(element) {
|
1216 | let tooltipElem = select(".mermaidTooltip");
|
1217 | if ((tooltipElem._groups || tooltipElem)[0][0] === null) {
|
1218 | tooltipElem = select("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0);
|
1219 | }
|
1220 | const svg = select(element).select("svg");
|
1221 | const nodes = svg.selectAll("g.node");
|
1222 | nodes.on("mouseover", function() {
|
1223 | const el = select(this);
|
1224 | const title = el.attr("title");
|
1225 | if (title === null) {
|
1226 | return;
|
1227 | }
|
1228 | const rect = this.getBoundingClientRect();
|
1229 | tooltipElem.transition().duration(200).style("opacity", ".9");
|
1230 | tooltipElem.text(el.attr("title")).style("left", window.scrollX + rect.left + (rect.right - rect.left) / 2 + "px").style("top", window.scrollY + rect.top - 14 + document.body.scrollTop + "px");
|
1231 | tooltipElem.html(tooltipElem.html().replace(/<br\/>/g, "<br/>"));
|
1232 | el.classed("hover", true);
|
1233 | }).on("mouseout", function() {
|
1234 | tooltipElem.transition().duration(500).style("opacity", 0);
|
1235 | const el = select(this);
|
1236 | el.classed("hover", false);
|
1237 | });
|
1238 | };
|
1239 | functions.push(setupToolTips);
|
1240 | let direction = "TB";
|
1241 | const getDirection = () => direction;
|
1242 | const setDirection = (dir) => {
|
1243 | direction = dir;
|
1244 | };
|
1245 | const addNamespace = function(id) {
|
1246 | if (namespaces[id] !== void 0) {
|
1247 | return;
|
1248 | }
|
1249 | namespaces[id] = {
|
1250 | id,
|
1251 | classes: {},
|
1252 | children: {},
|
1253 | domId: MERMAID_DOM_ID_PREFIX + id + "-" + namespaceCounter
|
1254 | };
|
1255 | namespaceCounter++;
|
1256 | };
|
1257 | const getNamespace = function(name) {
|
1258 | return namespaces[name];
|
1259 | };
|
1260 | const getNamespaces = function() {
|
1261 | return namespaces;
|
1262 | };
|
1263 | const addClassesToNamespace = function(id, classNames) {
|
1264 | if (namespaces[id] === void 0) {
|
1265 | return;
|
1266 | }
|
1267 | for (const name of classNames) {
|
1268 | const { className } = splitClassNameAndType(name);
|
1269 | classes[className].parent = id;
|
1270 | namespaces[id].classes[className] = classes[className];
|
1271 | }
|
1272 | };
|
1273 | const setCssStyle = function(id, styles2) {
|
1274 | const thisClass = classes[id];
|
1275 | if (!styles2 || !thisClass) {
|
1276 | return;
|
1277 | }
|
1278 | for (const s of styles2) {
|
1279 | if (s.includes(",")) {
|
1280 | thisClass.styles.push(...s.split(","));
|
1281 | } else {
|
1282 | thisClass.styles.push(s);
|
1283 | }
|
1284 | }
|
1285 | };
|
1286 | const db = {
|
1287 | setAccTitle,
|
1288 | getAccTitle,
|
1289 | getAccDescription,
|
1290 | setAccDescription,
|
1291 | getConfig: () => getConfig().class,
|
1292 | addClass,
|
1293 | bindFunctions,
|
1294 | clear,
|
1295 | getClass,
|
1296 | getClasses,
|
1297 | getNotes,
|
1298 | addAnnotation,
|
1299 | addNote,
|
1300 | getRelations,
|
1301 | addRelation,
|
1302 | getDirection,
|
1303 | setDirection,
|
1304 | addMember,
|
1305 | addMembers,
|
1306 | cleanupLabel,
|
1307 | lineType,
|
1308 | relationType,
|
1309 | setClickEvent,
|
1310 | setCssClass,
|
1311 | setLink,
|
1312 | getTooltip,
|
1313 | setTooltip,
|
1314 | lookUpDomId,
|
1315 | setDiagramTitle,
|
1316 | getDiagramTitle,
|
1317 | setClassLabel,
|
1318 | addNamespace,
|
1319 | addClassesToNamespace,
|
1320 | getNamespace,
|
1321 | getNamespaces,
|
1322 | setCssStyle
|
1323 | };
|
1324 | const getStyles = (options) => `g.classGroup text {
|
1325 | fill: ${options.nodeBorder || options.classText};
|
1326 | stroke: none;
|
1327 | font-family: ${options.fontFamily};
|
1328 | font-size: 10px;
|
1329 |
|
1330 | .title {
|
1331 | font-weight: bolder;
|
1332 | }
|
1333 |
|
1334 | }
|
1335 |
|
1336 | .nodeLabel, .edgeLabel {
|
1337 | color: ${options.classText};
|
1338 | }
|
1339 | .edgeLabel .label rect {
|
1340 | fill: ${options.mainBkg};
|
1341 | }
|
1342 | .label text {
|
1343 | fill: ${options.classText};
|
1344 | }
|
1345 | .edgeLabel .label span {
|
1346 | background: ${options.mainBkg};
|
1347 | }
|
1348 |
|
1349 | .classTitle {
|
1350 | font-weight: bolder;
|
1351 | }
|
1352 | .node rect,
|
1353 | .node circle,
|
1354 | .node ellipse,
|
1355 | .node polygon,
|
1356 | .node path {
|
1357 | fill: ${options.mainBkg};
|
1358 | stroke: ${options.nodeBorder};
|
1359 | stroke-width: 1px;
|
1360 | }
|
1361 |
|
1362 |
|
1363 | .divider {
|
1364 | stroke: ${options.nodeBorder};
|
1365 | stroke-width: 1;
|
1366 | }
|
1367 |
|
1368 | g.clickable {
|
1369 | cursor: pointer;
|
1370 | }
|
1371 |
|
1372 | g.classGroup rect {
|
1373 | fill: ${options.mainBkg};
|
1374 | stroke: ${options.nodeBorder};
|
1375 | }
|
1376 |
|
1377 | g.classGroup line {
|
1378 | stroke: ${options.nodeBorder};
|
1379 | stroke-width: 1;
|
1380 | }
|
1381 |
|
1382 | .classLabel .box {
|
1383 | stroke: none;
|
1384 | stroke-width: 0;
|
1385 | fill: ${options.mainBkg};
|
1386 | opacity: 0.5;
|
1387 | }
|
1388 |
|
1389 | .classLabel .label {
|
1390 | fill: ${options.nodeBorder};
|
1391 | font-size: 10px;
|
1392 | }
|
1393 |
|
1394 | .relation {
|
1395 | stroke: ${options.lineColor};
|
1396 | stroke-width: 1;
|
1397 | fill: none;
|
1398 | }
|
1399 |
|
1400 | .dashed-line{
|
1401 | stroke-dasharray: 3;
|
1402 | }
|
1403 |
|
1404 | .dotted-line{
|
1405 | stroke-dasharray: 1 2;
|
1406 | }
|
1407 |
|
1408 | #compositionStart, .composition {
|
1409 | fill: ${options.lineColor} !important;
|
1410 | stroke: ${options.lineColor} !important;
|
1411 | stroke-width: 1;
|
1412 | }
|
1413 |
|
1414 | #compositionEnd, .composition {
|
1415 | fill: ${options.lineColor} !important;
|
1416 | stroke: ${options.lineColor} !important;
|
1417 | stroke-width: 1;
|
1418 | }
|
1419 |
|
1420 | #dependencyStart, .dependency {
|
1421 | fill: ${options.lineColor} !important;
|
1422 | stroke: ${options.lineColor} !important;
|
1423 | stroke-width: 1;
|
1424 | }
|
1425 |
|
1426 | #dependencyStart, .dependency {
|
1427 | fill: ${options.lineColor} !important;
|
1428 | stroke: ${options.lineColor} !important;
|
1429 | stroke-width: 1;
|
1430 | }
|
1431 |
|
1432 | #extensionStart, .extension {
|
1433 | fill: transparent !important;
|
1434 | stroke: ${options.lineColor} !important;
|
1435 | stroke-width: 1;
|
1436 | }
|
1437 |
|
1438 | #extensionEnd, .extension {
|
1439 | fill: transparent !important;
|
1440 | stroke: ${options.lineColor} !important;
|
1441 | stroke-width: 1;
|
1442 | }
|
1443 |
|
1444 | #aggregationStart, .aggregation {
|
1445 | fill: transparent !important;
|
1446 | stroke: ${options.lineColor} !important;
|
1447 | stroke-width: 1;
|
1448 | }
|
1449 |
|
1450 | #aggregationEnd, .aggregation {
|
1451 | fill: transparent !important;
|
1452 | stroke: ${options.lineColor} !important;
|
1453 | stroke-width: 1;
|
1454 | }
|
1455 |
|
1456 | #lollipopStart, .lollipop {
|
1457 | fill: ${options.mainBkg} !important;
|
1458 | stroke: ${options.lineColor} !important;
|
1459 | stroke-width: 1;
|
1460 | }
|
1461 |
|
1462 | #lollipopEnd, .lollipop {
|
1463 | fill: ${options.mainBkg} !important;
|
1464 | stroke: ${options.lineColor} !important;
|
1465 | stroke-width: 1;
|
1466 | }
|
1467 |
|
1468 | .edgeTerminals {
|
1469 | font-size: 11px;
|
1470 | line-height: initial;
|
1471 | }
|
1472 |
|
1473 | .classTitleText {
|
1474 | text-anchor: middle;
|
1475 | font-size: 18px;
|
1476 | fill: ${options.textColor};
|
1477 | }
|
1478 | `;
|
1479 | const styles = getStyles;
|
1480 | export {
|
1481 | db as d,
|
1482 | parser$1 as p,
|
1483 | styles as s
|
1484 | };
|