@readme/markdown 7.7.1 → 7.7.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/246.js DELETED
@@ -1,1929 +0,0 @@
1
- "use strict";
2
- (self["webpackChunk_readme_markdown"] = self["webpackChunk_readme_markdown"] || []).push([[246],{
3
-
4
- /***/ 4265:
5
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
-
7
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8
- /* harmony export */ A: () => (/* binding */ getDiagramElement),
9
- /* harmony export */ P: () => (/* binding */ setupViewPortForSVG)
10
- /* harmony export */ });
11
- /* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6322);
12
- /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8066);
13
-
14
-
15
- // src/rendering-util/insertElementsForSize.js
16
-
17
- var getDiagramElement = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((id, securityLevel) => {
18
- let sandboxElement;
19
- if (securityLevel === "sandbox") {
20
- sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#i" + id);
21
- }
22
- const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("body");
23
- const svg = root.select(`[id="${id}"]`);
24
- return svg;
25
- }, "getDiagramElement");
26
-
27
- // src/rendering-util/setupViewPortForSVG.ts
28
- var setupViewPortForSVG = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((svg, padding, cssDiagram, useMaxWidth) => {
29
- svg.attr("class", cssDiagram);
30
- const { width, height, x, y } = calculateDimensionsWithPadding(svg, padding);
31
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .configureSvgSize */ .a$)(svg, height, width, useMaxWidth);
32
- const viewBox = createViewBox(x, y, width, height, padding);
33
- svg.attr("viewBox", viewBox);
34
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .log */ .Rm.debug(`viewBox configured: ${viewBox} with padding: ${padding}`);
35
- }, "setupViewPortForSVG");
36
- var calculateDimensionsWithPadding = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((svg, padding) => {
37
- const bounds = svg.node()?.getBBox() || { width: 0, height: 0, x: 0, y: 0 };
38
- return {
39
- width: bounds.width + padding * 2,
40
- height: bounds.height + padding * 2,
41
- x: bounds.x,
42
- y: bounds.y
43
- };
44
- }, "calculateDimensionsWithPadding");
45
- var createViewBox = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((x, y, width, height, padding) => {
46
- return `${x - padding} ${y - padding} ${width} ${height}`;
47
- }, "createViewBox");
48
-
49
-
50
-
51
-
52
- /***/ }),
53
-
54
- /***/ 3246:
55
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
56
-
57
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
58
- /* harmony export */ Zk: () => (/* binding */ stateDiagram_default),
59
- /* harmony export */ iP: () => (/* binding */ stateDb_default),
60
- /* harmony export */ q7: () => (/* binding */ stateRenderer_v3_unified_default),
61
- /* harmony export */ tM: () => (/* binding */ styles_default)
62
- /* harmony export */ });
63
- /* harmony import */ var _chunk_4LC2V6XN_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4265);
64
- /* harmony import */ var _chunk_U2OMI7UW_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2385);
65
- /* harmony import */ var _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2843);
66
- /* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6322);
67
-
68
-
69
-
70
-
71
-
72
- // src/diagrams/state/parser/stateDiagram.jison
73
- var parser = function() {
74
- var o = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(k, v, o2, l) {
75
- for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
76
- return o2;
77
- }, "o"), $V0 = [1, 2], $V1 = [1, 3], $V2 = [1, 4], $V3 = [2, 4], $V4 = [1, 9], $V5 = [1, 11], $V6 = [1, 16], $V7 = [1, 17], $V8 = [1, 18], $V9 = [1, 19], $Va = [1, 32], $Vb = [1, 20], $Vc = [1, 21], $Vd = [1, 22], $Ve = [1, 23], $Vf = [1, 24], $Vg = [1, 26], $Vh = [1, 27], $Vi = [1, 28], $Vj = [1, 29], $Vk = [1, 30], $Vl = [1, 31], $Vm = [1, 34], $Vn = [1, 35], $Vo = [1, 36], $Vp = [1, 37], $Vq = [1, 33], $Vr = [1, 4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 45, 48, 49, 50, 51, 54], $Vs = [1, 4, 5, 14, 15, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 45, 48, 49, 50, 51, 54], $Vt = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 45, 48, 49, 50, 51, 54];
78
- var parser2 = {
79
- trace: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function trace() {
80
- }, "trace"),
81
- yy: {},
82
- 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, "classDef": 38, "CLASSDEF_ID": 39, "CLASSDEF_STYLEOPTS": 40, "DEFAULT": 41, "style": 42, "STYLE_IDS": 43, "STYLEDEF_STYLEOPTS": 44, "class": 45, "CLASSENTITY_IDS": 46, "STYLECLASS": 47, "direction_tb": 48, "direction_bt": 49, "direction_rl": 50, "direction_lr": 51, "eol": 52, ";": 53, "EDGE_STATE": 54, "STYLE_SEPARATOR": 55, "left_of": 56, "right_of": 57, "$accept": 0, "$end": 1 },
83
- 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: "classDef", 39: "CLASSDEF_ID", 40: "CLASSDEF_STYLEOPTS", 41: "DEFAULT", 42: "style", 43: "STYLE_IDS", 44: "STYLEDEF_STYLEOPTS", 45: "class", 46: "CLASSENTITY_IDS", 47: "STYLECLASS", 48: "direction_tb", 49: "direction_bt", 50: "direction_rl", 51: "direction_lr", 53: ";", 54: "EDGE_STATE", 55: "STYLE_SEPARATOR", 56: "left_of", 57: "right_of" },
84
- 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], [10, 3], [10, 3], [11, 3], [12, 3], [32, 1], [32, 1], [32, 1], [32, 1], [52, 1], [52, 1], [13, 1], [13, 1], [13, 3], [13, 3], [30, 1], [30, 1]],
85
- performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
86
- var $0 = $$.length - 1;
87
- switch (yystate) {
88
- case 3:
89
- yy.setRootDoc($$[$0]);
90
- return $$[$0];
91
- break;
92
- case 4:
93
- this.$ = [];
94
- break;
95
- case 5:
96
- if ($$[$0] != "nl") {
97
- $$[$0 - 1].push($$[$0]);
98
- this.$ = $$[$0 - 1];
99
- }
100
- break;
101
- case 6:
102
- case 7:
103
- this.$ = $$[$0];
104
- break;
105
- case 8:
106
- this.$ = "nl";
107
- break;
108
- case 12:
109
- this.$ = $$[$0];
110
- break;
111
- case 13:
112
- const stateStmt = $$[$0 - 1];
113
- stateStmt.description = yy.trimColon($$[$0]);
114
- this.$ = stateStmt;
115
- break;
116
- case 14:
117
- this.$ = { stmt: "relation", state1: $$[$0 - 2], state2: $$[$0] };
118
- break;
119
- case 15:
120
- const relDescription = yy.trimColon($$[$0]);
121
- this.$ = { stmt: "relation", state1: $$[$0 - 3], state2: $$[$0 - 1], description: relDescription };
122
- break;
123
- case 19:
124
- this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: "", doc: $$[$0 - 1] };
125
- break;
126
- case 20:
127
- var id = $$[$0];
128
- var description = $$[$0 - 2].trim();
129
- if ($$[$0].match(":")) {
130
- var parts = $$[$0].split(":");
131
- id = parts[0];
132
- description = [description, parts[1]];
133
- }
134
- this.$ = { stmt: "state", id, type: "default", description };
135
- break;
136
- case 21:
137
- this.$ = { stmt: "state", id: $$[$0 - 3], type: "default", description: $$[$0 - 5], doc: $$[$0 - 1] };
138
- break;
139
- case 22:
140
- this.$ = { stmt: "state", id: $$[$0], type: "fork" };
141
- break;
142
- case 23:
143
- this.$ = { stmt: "state", id: $$[$0], type: "join" };
144
- break;
145
- case 24:
146
- this.$ = { stmt: "state", id: $$[$0], type: "choice" };
147
- break;
148
- case 25:
149
- this.$ = { stmt: "state", id: yy.getDividerId(), type: "divider" };
150
- break;
151
- case 26:
152
- this.$ = { stmt: "state", id: $$[$0 - 1].trim(), note: { position: $$[$0 - 2].trim(), text: $$[$0].trim() } };
153
- break;
154
- case 29:
155
- this.$ = $$[$0].trim();
156
- yy.setAccTitle(this.$);
157
- break;
158
- case 30:
159
- case 31:
160
- this.$ = $$[$0].trim();
161
- yy.setAccDescription(this.$);
162
- break;
163
- case 32:
164
- case 33:
165
- this.$ = { stmt: "classDef", id: $$[$0 - 1].trim(), classes: $$[$0].trim() };
166
- break;
167
- case 34:
168
- this.$ = { stmt: "style", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() };
169
- break;
170
- case 35:
171
- this.$ = { stmt: "applyClass", id: $$[$0 - 1].trim(), styleClass: $$[$0].trim() };
172
- break;
173
- case 36:
174
- yy.setDirection("TB");
175
- this.$ = { stmt: "dir", value: "TB" };
176
- break;
177
- case 37:
178
- yy.setDirection("BT");
179
- this.$ = { stmt: "dir", value: "BT" };
180
- break;
181
- case 38:
182
- yy.setDirection("RL");
183
- this.$ = { stmt: "dir", value: "RL" };
184
- break;
185
- case 39:
186
- yy.setDirection("LR");
187
- this.$ = { stmt: "dir", value: "LR" };
188
- break;
189
- case 42:
190
- case 43:
191
- this.$ = { stmt: "state", id: $$[$0].trim(), type: "default", description: "" };
192
- break;
193
- case 44:
194
- this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" };
195
- break;
196
- case 45:
197
- this.$ = { stmt: "state", id: $$[$0 - 2].trim(), classes: [$$[$0].trim()], type: "default", description: "" };
198
- break;
199
- }
200
- }, "anonymous"),
201
- table: [{ 3: 1, 4: $V0, 5: $V1, 6: $V2 }, { 1: [3] }, { 3: 5, 4: $V0, 5: $V1, 6: $V2 }, { 3: 6, 4: $V0, 5: $V1, 6: $V2 }, o([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 42, 45, 48, 49, 50, 51, 54], $V3, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: $V6, 17: $V7, 19: $V8, 22: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: $Vd, 28: $Ve, 29: $Vf, 32: 25, 33: $Vg, 35: $Vh, 37: $Vi, 38: $Vj, 42: $Vk, 45: $Vl, 48: $Vm, 49: $Vn, 50: $Vo, 51: $Vp, 54: $Vq }, o($Vr, [2, 5]), { 9: 38, 10: 12, 11: 13, 12: 14, 13: 15, 16: $V6, 17: $V7, 19: $V8, 22: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: $Vd, 28: $Ve, 29: $Vf, 32: 25, 33: $Vg, 35: $Vh, 37: $Vi, 38: $Vj, 42: $Vk, 45: $Vl, 48: $Vm, 49: $Vn, 50: $Vo, 51: $Vp, 54: $Vq }, o($Vr, [2, 7]), o($Vr, [2, 8]), o($Vr, [2, 9]), o($Vr, [2, 10]), o($Vr, [2, 11]), o($Vr, [2, 12], { 14: [1, 39], 15: [1, 40] }), o($Vr, [2, 16]), { 18: [1, 41] }, o($Vr, [2, 18], { 20: [1, 42] }), { 23: [1, 43] }, o($Vr, [2, 22]), o($Vr, [2, 23]), o($Vr, [2, 24]), o($Vr, [2, 25]), { 30: 44, 31: [1, 45], 56: [1, 46], 57: [1, 47] }, o($Vr, [2, 28]), { 34: [1, 48] }, { 36: [1, 49] }, o($Vr, [2, 31]), { 39: [1, 50], 41: [1, 51] }, { 43: [1, 52] }, { 46: [1, 53] }, o($Vs, [2, 42], { 55: [1, 54] }), o($Vs, [2, 43], { 55: [1, 55] }), o($Vr, [2, 36]), o($Vr, [2, 37]), o($Vr, [2, 38]), o($Vr, [2, 39]), o($Vr, [2, 6]), o($Vr, [2, 13]), { 13: 56, 24: $Va, 54: $Vq }, o($Vr, [2, 17]), o($Vt, $V3, { 7: 57 }), { 24: [1, 58] }, { 24: [1, 59] }, { 23: [1, 60] }, { 24: [2, 46] }, { 24: [2, 47] }, o($Vr, [2, 29]), o($Vr, [2, 30]), { 40: [1, 61] }, { 40: [1, 62] }, { 44: [1, 63] }, { 47: [1, 64] }, { 24: [1, 65] }, { 24: [1, 66] }, o($Vr, [2, 14], { 14: [1, 67] }), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: $V6, 17: $V7, 19: $V8, 21: [1, 68], 22: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: $Vd, 28: $Ve, 29: $Vf, 32: 25, 33: $Vg, 35: $Vh, 37: $Vi, 38: $Vj, 42: $Vk, 45: $Vl, 48: $Vm, 49: $Vn, 50: $Vo, 51: $Vp, 54: $Vq }, o($Vr, [2, 20], { 20: [1, 69] }), { 31: [1, 70] }, { 24: [1, 71] }, o($Vr, [2, 32]), o($Vr, [2, 33]), o($Vr, [2, 34]), o($Vr, [2, 35]), o($Vs, [2, 44]), o($Vs, [2, 45]), o($Vr, [2, 15]), o($Vr, [2, 19]), o($Vt, $V3, { 7: 72 }), o($Vr, [2, 26]), o($Vr, [2, 27]), { 4: $V4, 5: $V5, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: $V6, 17: $V7, 19: $V8, 21: [1, 73], 22: $V9, 24: $Va, 25: $Vb, 26: $Vc, 27: $Vd, 28: $Ve, 29: $Vf, 32: 25, 33: $Vg, 35: $Vh, 37: $Vi, 38: $Vj, 42: $Vk, 45: $Vl, 48: $Vm, 49: $Vn, 50: $Vo, 51: $Vp, 54: $Vq }, o($Vr, [2, 21])],
202
- defaultActions: { 5: [2, 1], 6: [2, 2], 46: [2, 46], 47: [2, 47] },
203
- parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parseError(str, hash) {
204
- if (hash.recoverable) {
205
- this.trace(str);
206
- } else {
207
- var error = new Error(str);
208
- error.hash = hash;
209
- throw error;
210
- }
211
- }, "parseError"),
212
- parse: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parse(input) {
213
- var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
214
- var args = lstack.slice.call(arguments, 1);
215
- var lexer2 = Object.create(this.lexer);
216
- var sharedState = { yy: {} };
217
- for (var k in this.yy) {
218
- if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
219
- sharedState.yy[k] = this.yy[k];
220
- }
221
- }
222
- lexer2.setInput(input, sharedState.yy);
223
- sharedState.yy.lexer = lexer2;
224
- sharedState.yy.parser = this;
225
- if (typeof lexer2.yylloc == "undefined") {
226
- lexer2.yylloc = {};
227
- }
228
- var yyloc = lexer2.yylloc;
229
- lstack.push(yyloc);
230
- var ranges = lexer2.options && lexer2.options.ranges;
231
- if (typeof sharedState.yy.parseError === "function") {
232
- this.parseError = sharedState.yy.parseError;
233
- } else {
234
- this.parseError = Object.getPrototypeOf(this).parseError;
235
- }
236
- function popStack(n) {
237
- stack.length = stack.length - 2 * n;
238
- vstack.length = vstack.length - n;
239
- lstack.length = lstack.length - n;
240
- }
241
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(popStack, "popStack");
242
- function lex() {
243
- var token;
244
- token = tstack.pop() || lexer2.lex() || EOF;
245
- if (typeof token !== "number") {
246
- if (token instanceof Array) {
247
- tstack = token;
248
- token = tstack.pop();
249
- }
250
- token = self.symbols_[token] || token;
251
- }
252
- return token;
253
- }
254
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(lex, "lex");
255
- var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
256
- while (true) {
257
- state = stack[stack.length - 1];
258
- if (this.defaultActions[state]) {
259
- action = this.defaultActions[state];
260
- } else {
261
- if (symbol === null || typeof symbol == "undefined") {
262
- symbol = lex();
263
- }
264
- action = table[state] && table[state][symbol];
265
- }
266
- if (typeof action === "undefined" || !action.length || !action[0]) {
267
- var errStr = "";
268
- expected = [];
269
- for (p in table[state]) {
270
- if (this.terminals_[p] && p > TERROR) {
271
- expected.push("'" + this.terminals_[p] + "'");
272
- }
273
- }
274
- if (lexer2.showPosition) {
275
- errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
276
- } else {
277
- errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
278
- }
279
- this.parseError(errStr, {
280
- text: lexer2.match,
281
- token: this.terminals_[symbol] || symbol,
282
- line: lexer2.yylineno,
283
- loc: yyloc,
284
- expected
285
- });
286
- }
287
- if (action[0] instanceof Array && action.length > 1) {
288
- throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
289
- }
290
- switch (action[0]) {
291
- case 1:
292
- stack.push(symbol);
293
- vstack.push(lexer2.yytext);
294
- lstack.push(lexer2.yylloc);
295
- stack.push(action[1]);
296
- symbol = null;
297
- if (!preErrorSymbol) {
298
- yyleng = lexer2.yyleng;
299
- yytext = lexer2.yytext;
300
- yylineno = lexer2.yylineno;
301
- yyloc = lexer2.yylloc;
302
- if (recovering > 0) {
303
- recovering--;
304
- }
305
- } else {
306
- symbol = preErrorSymbol;
307
- preErrorSymbol = null;
308
- }
309
- break;
310
- case 2:
311
- len = this.productions_[action[1]][1];
312
- yyval.$ = vstack[vstack.length - len];
313
- yyval._$ = {
314
- first_line: lstack[lstack.length - (len || 1)].first_line,
315
- last_line: lstack[lstack.length - 1].last_line,
316
- first_column: lstack[lstack.length - (len || 1)].first_column,
317
- last_column: lstack[lstack.length - 1].last_column
318
- };
319
- if (ranges) {
320
- yyval._$.range = [
321
- lstack[lstack.length - (len || 1)].range[0],
322
- lstack[lstack.length - 1].range[1]
323
- ];
324
- }
325
- r = this.performAction.apply(yyval, [
326
- yytext,
327
- yyleng,
328
- yylineno,
329
- sharedState.yy,
330
- action[1],
331
- vstack,
332
- lstack
333
- ].concat(args));
334
- if (typeof r !== "undefined") {
335
- return r;
336
- }
337
- if (len) {
338
- stack = stack.slice(0, -1 * len * 2);
339
- vstack = vstack.slice(0, -1 * len);
340
- lstack = lstack.slice(0, -1 * len);
341
- }
342
- stack.push(this.productions_[action[1]][0]);
343
- vstack.push(yyval.$);
344
- lstack.push(yyval._$);
345
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
346
- stack.push(newState);
347
- break;
348
- case 3:
349
- return true;
350
- }
351
- }
352
- return true;
353
- }, "parse")
354
- };
355
- var lexer = /* @__PURE__ */ function() {
356
- var lexer2 = {
357
- EOF: 1,
358
- parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function parseError(str, hash) {
359
- if (this.yy.parser) {
360
- this.yy.parser.parseError(str, hash);
361
- } else {
362
- throw new Error(str);
363
- }
364
- }, "parseError"),
365
- // resets the lexer, sets new input
366
- setInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(input, yy) {
367
- this.yy = yy || this.yy || {};
368
- this._input = input;
369
- this._more = this._backtrack = this.done = false;
370
- this.yylineno = this.yyleng = 0;
371
- this.yytext = this.matched = this.match = "";
372
- this.conditionStack = ["INITIAL"];
373
- this.yylloc = {
374
- first_line: 1,
375
- first_column: 0,
376
- last_line: 1,
377
- last_column: 0
378
- };
379
- if (this.options.ranges) {
380
- this.yylloc.range = [0, 0];
381
- }
382
- this.offset = 0;
383
- return this;
384
- }, "setInput"),
385
- // consumes and returns one char from the input
386
- input: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
387
- var ch = this._input[0];
388
- this.yytext += ch;
389
- this.yyleng++;
390
- this.offset++;
391
- this.match += ch;
392
- this.matched += ch;
393
- var lines = ch.match(/(?:\r\n?|\n).*/g);
394
- if (lines) {
395
- this.yylineno++;
396
- this.yylloc.last_line++;
397
- } else {
398
- this.yylloc.last_column++;
399
- }
400
- if (this.options.ranges) {
401
- this.yylloc.range[1]++;
402
- }
403
- this._input = this._input.slice(1);
404
- return ch;
405
- }, "input"),
406
- // unshifts one char (or a string) into the input
407
- unput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(ch) {
408
- var len = ch.length;
409
- var lines = ch.split(/(?:\r\n?|\n)/g);
410
- this._input = ch + this._input;
411
- this.yytext = this.yytext.substr(0, this.yytext.length - len);
412
- this.offset -= len;
413
- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
414
- this.match = this.match.substr(0, this.match.length - 1);
415
- this.matched = this.matched.substr(0, this.matched.length - 1);
416
- if (lines.length - 1) {
417
- this.yylineno -= lines.length - 1;
418
- }
419
- var r = this.yylloc.range;
420
- this.yylloc = {
421
- first_line: this.yylloc.first_line,
422
- last_line: this.yylineno + 1,
423
- first_column: this.yylloc.first_column,
424
- 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
425
- };
426
- if (this.options.ranges) {
427
- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
428
- }
429
- this.yyleng = this.yytext.length;
430
- return this;
431
- }, "unput"),
432
- // When called from action, caches matched text and appends it on next action
433
- more: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
434
- this._more = true;
435
- return this;
436
- }, "more"),
437
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
438
- reject: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
439
- if (this.options.backtrack_lexer) {
440
- this._backtrack = true;
441
- } else {
442
- 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(), {
443
- text: "",
444
- token: null,
445
- line: this.yylineno
446
- });
447
- }
448
- return this;
449
- }, "reject"),
450
- // retain first n characters of the match
451
- less: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(n) {
452
- this.unput(this.match.slice(n));
453
- }, "less"),
454
- // displays already matched input, i.e. for error messages
455
- pastInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
456
- var past = this.matched.substr(0, this.matched.length - this.match.length);
457
- return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
458
- }, "pastInput"),
459
- // displays upcoming input, i.e. for error messages
460
- upcomingInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
461
- var next = this.match;
462
- if (next.length < 20) {
463
- next += this._input.substr(0, 20 - next.length);
464
- }
465
- return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
466
- }, "upcomingInput"),
467
- // displays the character position where the lexing error occurred, i.e. for error messages
468
- showPosition: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
469
- var pre = this.pastInput();
470
- var c = new Array(pre.length + 1).join("-");
471
- return pre + this.upcomingInput() + "\n" + c + "^";
472
- }, "showPosition"),
473
- // test the lexed token: return FALSE when not a match, otherwise return token
474
- test_match: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(match, indexed_rule) {
475
- var token, lines, backup;
476
- if (this.options.backtrack_lexer) {
477
- backup = {
478
- yylineno: this.yylineno,
479
- yylloc: {
480
- first_line: this.yylloc.first_line,
481
- last_line: this.last_line,
482
- first_column: this.yylloc.first_column,
483
- last_column: this.yylloc.last_column
484
- },
485
- yytext: this.yytext,
486
- match: this.match,
487
- matches: this.matches,
488
- matched: this.matched,
489
- yyleng: this.yyleng,
490
- offset: this.offset,
491
- _more: this._more,
492
- _input: this._input,
493
- yy: this.yy,
494
- conditionStack: this.conditionStack.slice(0),
495
- done: this.done
496
- };
497
- if (this.options.ranges) {
498
- backup.yylloc.range = this.yylloc.range.slice(0);
499
- }
500
- }
501
- lines = match[0].match(/(?:\r\n?|\n).*/g);
502
- if (lines) {
503
- this.yylineno += lines.length;
504
- }
505
- this.yylloc = {
506
- first_line: this.yylloc.last_line,
507
- last_line: this.yylineno + 1,
508
- first_column: this.yylloc.last_column,
509
- last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
510
- };
511
- this.yytext += match[0];
512
- this.match += match[0];
513
- this.matches = match;
514
- this.yyleng = this.yytext.length;
515
- if (this.options.ranges) {
516
- this.yylloc.range = [this.offset, this.offset += this.yyleng];
517
- }
518
- this._more = false;
519
- this._backtrack = false;
520
- this._input = this._input.slice(match[0].length);
521
- this.matched += match[0];
522
- token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
523
- if (this.done && this._input) {
524
- this.done = false;
525
- }
526
- if (token) {
527
- return token;
528
- } else if (this._backtrack) {
529
- for (var k in backup) {
530
- this[k] = backup[k];
531
- }
532
- return false;
533
- }
534
- return false;
535
- }, "test_match"),
536
- // return next match in input
537
- next: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
538
- if (this.done) {
539
- return this.EOF;
540
- }
541
- if (!this._input) {
542
- this.done = true;
543
- }
544
- var token, match, tempMatch, index;
545
- if (!this._more) {
546
- this.yytext = "";
547
- this.match = "";
548
- }
549
- var rules = this._currentRules();
550
- for (var i = 0; i < rules.length; i++) {
551
- tempMatch = this._input.match(this.rules[rules[i]]);
552
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
553
- match = tempMatch;
554
- index = i;
555
- if (this.options.backtrack_lexer) {
556
- token = this.test_match(tempMatch, rules[i]);
557
- if (token !== false) {
558
- return token;
559
- } else if (this._backtrack) {
560
- match = false;
561
- continue;
562
- } else {
563
- return false;
564
- }
565
- } else if (!this.options.flex) {
566
- break;
567
- }
568
- }
569
- }
570
- if (match) {
571
- token = this.test_match(match, rules[index]);
572
- if (token !== false) {
573
- return token;
574
- }
575
- return false;
576
- }
577
- if (this._input === "") {
578
- return this.EOF;
579
- } else {
580
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
581
- text: "",
582
- token: null,
583
- line: this.yylineno
584
- });
585
- }
586
- }, "next"),
587
- // return next match that has a token
588
- lex: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function lex() {
589
- var r = this.next();
590
- if (r) {
591
- return r;
592
- } else {
593
- return this.lex();
594
- }
595
- }, "lex"),
596
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
597
- begin: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function begin(condition) {
598
- this.conditionStack.push(condition);
599
- }, "begin"),
600
- // pop the previously active lexer condition state off the condition stack
601
- popState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function popState() {
602
- var n = this.conditionStack.length - 1;
603
- if (n > 0) {
604
- return this.conditionStack.pop();
605
- } else {
606
- return this.conditionStack[0];
607
- }
608
- }, "popState"),
609
- // produce the lexer rule set which is active for the currently active lexer condition state
610
- _currentRules: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function _currentRules() {
611
- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
612
- return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
613
- } else {
614
- return this.conditions["INITIAL"].rules;
615
- }
616
- }, "_currentRules"),
617
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
618
- topState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function topState(n) {
619
- n = this.conditionStack.length - 1 - Math.abs(n || 0);
620
- if (n >= 0) {
621
- return this.conditionStack[n];
622
- } else {
623
- return "INITIAL";
624
- }
625
- }, "topState"),
626
- // alias for begin(condition)
627
- pushState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function pushState(condition) {
628
- this.begin(condition);
629
- }, "pushState"),
630
- // return the number of states currently on the stack
631
- stateStackSize: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function stateStackSize() {
632
- return this.conditionStack.length;
633
- }, "stateStackSize"),
634
- options: { "case-insensitive": true },
635
- performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
636
- var YYSTATE = YY_START;
637
- switch ($avoiding_name_collisions) {
638
- case 0:
639
- return 41;
640
- break;
641
- case 1:
642
- return 48;
643
- break;
644
- case 2:
645
- return 49;
646
- break;
647
- case 3:
648
- return 50;
649
- break;
650
- case 4:
651
- return 51;
652
- break;
653
- case 5:
654
- break;
655
- case 6:
656
- {
657
- }
658
- break;
659
- case 7:
660
- return 5;
661
- break;
662
- case 8:
663
- break;
664
- case 9:
665
- break;
666
- case 10:
667
- break;
668
- case 11:
669
- break;
670
- case 12:
671
- this.pushState("SCALE");
672
- return 17;
673
- break;
674
- case 13:
675
- return 18;
676
- break;
677
- case 14:
678
- this.popState();
679
- break;
680
- case 15:
681
- this.begin("acc_title");
682
- return 33;
683
- break;
684
- case 16:
685
- this.popState();
686
- return "acc_title_value";
687
- break;
688
- case 17:
689
- this.begin("acc_descr");
690
- return 35;
691
- break;
692
- case 18:
693
- this.popState();
694
- return "acc_descr_value";
695
- break;
696
- case 19:
697
- this.begin("acc_descr_multiline");
698
- break;
699
- case 20:
700
- this.popState();
701
- break;
702
- case 21:
703
- return "acc_descr_multiline_value";
704
- break;
705
- case 22:
706
- this.pushState("CLASSDEF");
707
- return 38;
708
- break;
709
- case 23:
710
- this.popState();
711
- this.pushState("CLASSDEFID");
712
- return "DEFAULT_CLASSDEF_ID";
713
- break;
714
- case 24:
715
- this.popState();
716
- this.pushState("CLASSDEFID");
717
- return 39;
718
- break;
719
- case 25:
720
- this.popState();
721
- return 40;
722
- break;
723
- case 26:
724
- this.pushState("CLASS");
725
- return 45;
726
- break;
727
- case 27:
728
- this.popState();
729
- this.pushState("CLASS_STYLE");
730
- return 46;
731
- break;
732
- case 28:
733
- this.popState();
734
- return 47;
735
- break;
736
- case 29:
737
- this.pushState("STYLE");
738
- return 42;
739
- break;
740
- case 30:
741
- this.popState();
742
- this.pushState("STYLEDEF_STYLES");
743
- return 43;
744
- break;
745
- case 31:
746
- this.popState();
747
- return 44;
748
- break;
749
- case 32:
750
- this.pushState("SCALE");
751
- return 17;
752
- break;
753
- case 33:
754
- return 18;
755
- break;
756
- case 34:
757
- this.popState();
758
- break;
759
- case 35:
760
- this.pushState("STATE");
761
- break;
762
- case 36:
763
- this.popState();
764
- yy_.yytext = yy_.yytext.slice(0, -8).trim();
765
- return 25;
766
- break;
767
- case 37:
768
- this.popState();
769
- yy_.yytext = yy_.yytext.slice(0, -8).trim();
770
- return 26;
771
- break;
772
- case 38:
773
- this.popState();
774
- yy_.yytext = yy_.yytext.slice(0, -10).trim();
775
- return 27;
776
- break;
777
- case 39:
778
- this.popState();
779
- yy_.yytext = yy_.yytext.slice(0, -8).trim();
780
- return 25;
781
- break;
782
- case 40:
783
- this.popState();
784
- yy_.yytext = yy_.yytext.slice(0, -8).trim();
785
- return 26;
786
- break;
787
- case 41:
788
- this.popState();
789
- yy_.yytext = yy_.yytext.slice(0, -10).trim();
790
- return 27;
791
- break;
792
- case 42:
793
- return 48;
794
- break;
795
- case 43:
796
- return 49;
797
- break;
798
- case 44:
799
- return 50;
800
- break;
801
- case 45:
802
- return 51;
803
- break;
804
- case 46:
805
- this.pushState("STATE_STRING");
806
- break;
807
- case 47:
808
- this.pushState("STATE_ID");
809
- return "AS";
810
- break;
811
- case 48:
812
- this.popState();
813
- return "ID";
814
- break;
815
- case 49:
816
- this.popState();
817
- break;
818
- case 50:
819
- return "STATE_DESCR";
820
- break;
821
- case 51:
822
- return 19;
823
- break;
824
- case 52:
825
- this.popState();
826
- break;
827
- case 53:
828
- this.popState();
829
- this.pushState("struct");
830
- return 20;
831
- break;
832
- case 54:
833
- break;
834
- case 55:
835
- this.popState();
836
- return 21;
837
- break;
838
- case 56:
839
- break;
840
- case 57:
841
- this.begin("NOTE");
842
- return 29;
843
- break;
844
- case 58:
845
- this.popState();
846
- this.pushState("NOTE_ID");
847
- return 56;
848
- break;
849
- case 59:
850
- this.popState();
851
- this.pushState("NOTE_ID");
852
- return 57;
853
- break;
854
- case 60:
855
- this.popState();
856
- this.pushState("FLOATING_NOTE");
857
- break;
858
- case 61:
859
- this.popState();
860
- this.pushState("FLOATING_NOTE_ID");
861
- return "AS";
862
- break;
863
- case 62:
864
- break;
865
- case 63:
866
- return "NOTE_TEXT";
867
- break;
868
- case 64:
869
- this.popState();
870
- return "ID";
871
- break;
872
- case 65:
873
- this.popState();
874
- this.pushState("NOTE_TEXT");
875
- return 24;
876
- break;
877
- case 66:
878
- this.popState();
879
- yy_.yytext = yy_.yytext.substr(2).trim();
880
- return 31;
881
- break;
882
- case 67:
883
- this.popState();
884
- yy_.yytext = yy_.yytext.slice(0, -8).trim();
885
- return 31;
886
- break;
887
- case 68:
888
- return 6;
889
- break;
890
- case 69:
891
- return 6;
892
- break;
893
- case 70:
894
- return 16;
895
- break;
896
- case 71:
897
- return 54;
898
- break;
899
- case 72:
900
- return 24;
901
- break;
902
- case 73:
903
- yy_.yytext = yy_.yytext.trim();
904
- return 14;
905
- break;
906
- case 74:
907
- return 15;
908
- break;
909
- case 75:
910
- return 28;
911
- break;
912
- case 76:
913
- return 55;
914
- break;
915
- case 77:
916
- return 5;
917
- break;
918
- case 78:
919
- return "INVALID";
920
- break;
921
- }
922
- }, "anonymous"),
923
- rules: [/^(?: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, /^(?:[^\}]%%[^\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, /^(?:%%(?!\{)[^\n]*)/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]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i],
924
- conditions: { "LINE": { "rules": [9, 10], "inclusive": false }, "struct": { "rules": [9, 10, 22, 26, 29, 35, 42, 43, 44, 45, 54, 55, 56, 57, 71, 72, 73, 74, 75], "inclusive": false }, "FLOATING_NOTE_ID": { "rules": [64], "inclusive": false }, "FLOATING_NOTE": { "rules": [61, 62, 63], "inclusive": false }, "NOTE_TEXT": { "rules": [66, 67], "inclusive": false }, "NOTE_ID": { "rules": [65], "inclusive": false }, "NOTE": { "rules": [58, 59, 60], "inclusive": false }, "STYLEDEF_STYLEOPTS": { "rules": [], "inclusive": false }, "STYLEDEF_STYLES": { "rules": [31], "inclusive": false }, "STYLE_IDS": { "rules": [], "inclusive": false }, "STYLE": { "rules": [30], "inclusive": false }, "CLASS_STYLE": { "rules": [28], "inclusive": false }, "CLASS": { "rules": [27], "inclusive": false }, "CLASSDEFID": { "rules": [25], "inclusive": false }, "CLASSDEF": { "rules": [23, 24], "inclusive": false }, "acc_descr_multiline": { "rules": [20, 21], "inclusive": false }, "acc_descr": { "rules": [18], "inclusive": false }, "acc_title": { "rules": [16], "inclusive": false }, "SCALE": { "rules": [13, 14, 33, 34], "inclusive": false }, "ALIAS": { "rules": [], "inclusive": false }, "STATE_ID": { "rules": [48], "inclusive": false }, "STATE_STRING": { "rules": [49, 50], "inclusive": false }, "FORK_STATE": { "rules": [], "inclusive": false }, "STATE": { "rules": [9, 10, 36, 37, 38, 39, 40, 41, 46, 47, 51, 52, 53], "inclusive": false }, "ID": { "rules": [9, 10], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 15, 17, 19, 22, 26, 29, 32, 35, 53, 57, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78], "inclusive": true } }
925
- };
926
- return lexer2;
927
- }();
928
- parser2.lexer = lexer;
929
- function Parser() {
930
- this.yy = {};
931
- }
932
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(Parser, "Parser");
933
- Parser.prototype = parser2;
934
- parser2.Parser = Parser;
935
- return new Parser();
936
- }();
937
- parser.parser = parser;
938
- var stateDiagram_default = parser;
939
-
940
- // src/diagrams/state/stateCommon.ts
941
- var DEFAULT_DIAGRAM_DIRECTION = "LR";
942
- var DEFAULT_NESTED_DOC_DIR = "TB";
943
- var STMT_STATE = "state";
944
- var STMT_RELATION = "relation";
945
- var STMT_CLASSDEF = "classDef";
946
- var STMT_STYLEDEF = "style";
947
- var STMT_APPLYCLASS = "applyClass";
948
- var DEFAULT_STATE_TYPE = "default";
949
- var DIVIDER_TYPE = "divider";
950
- var G_EDGE_STYLE = "fill:none";
951
- var G_EDGE_ARROWHEADSTYLE = "fill: #333";
952
- var G_EDGE_LABELPOS = "c";
953
- var G_EDGE_LABELTYPE = "text";
954
- var G_EDGE_THICKNESS = "normal";
955
- var SHAPE_STATE = "rect";
956
- var SHAPE_STATE_WITH_DESC = "rectWithTitle";
957
- var SHAPE_START = "stateStart";
958
- var SHAPE_END = "stateEnd";
959
- var SHAPE_DIVIDER = "divider";
960
- var SHAPE_GROUP = "roundedWithTitle";
961
- var SHAPE_NOTE = "note";
962
- var SHAPE_NOTEGROUP = "noteGroup";
963
- var CSS_DIAGRAM = "statediagram";
964
- var CSS_STATE = "state";
965
- var CSS_DIAGRAM_STATE = `${CSS_DIAGRAM}-${CSS_STATE}`;
966
- var CSS_EDGE = "transition";
967
- var CSS_NOTE = "note";
968
- var CSS_NOTE_EDGE = "note-edge";
969
- var CSS_EDGE_NOTE_EDGE = `${CSS_EDGE} ${CSS_NOTE_EDGE}`;
970
- var CSS_DIAGRAM_NOTE = `${CSS_DIAGRAM}-${CSS_NOTE}`;
971
- var CSS_CLUSTER = "cluster";
972
- var CSS_DIAGRAM_CLUSTER = `${CSS_DIAGRAM}-${CSS_CLUSTER}`;
973
- var CSS_CLUSTER_ALT = "cluster-alt";
974
- var CSS_DIAGRAM_CLUSTER_ALT = `${CSS_DIAGRAM}-${CSS_CLUSTER_ALT}`;
975
- var PARENT = "parent";
976
- var NOTE = "note";
977
- var DOMID_STATE = "state";
978
- var DOMID_TYPE_SPACER = "----";
979
- var NOTE_ID = `${DOMID_TYPE_SPACER}${NOTE}`;
980
- var PARENT_ID = `${DOMID_TYPE_SPACER}${PARENT}`;
981
-
982
- // src/diagrams/state/stateRenderer-v3-unified.ts
983
- var getDir = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => {
984
- if (!parsedItem.doc) {
985
- return defaultDir;
986
- }
987
- let dir = defaultDir;
988
- for (const parsedItemDoc of parsedItem.doc) {
989
- if (parsedItemDoc.stmt === "dir") {
990
- dir = parsedItemDoc.value;
991
- }
992
- }
993
- return dir;
994
- }, "getDir");
995
- var getClasses = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(text, diagramObj) {
996
- diagramObj.db.extract(diagramObj.db.getRootDocV2());
997
- return diagramObj.db.getClasses();
998
- }, "getClasses");
999
- var draw = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(async function(text, id, _version, diag) {
1000
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("REF0:");
1001
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Drawing state diagram (v2)", id);
1002
- const { securityLevel, state: conf, layout } = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)();
1003
- diag.db.extract(diag.db.getRootDocV2());
1004
- const data4Layout = diag.db.getData();
1005
- const svg = (0,_chunk_4LC2V6XN_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getDiagramElement */ .A)(id, securityLevel);
1006
- data4Layout.type = diag.type;
1007
- data4Layout.layoutAlgorithm = layout;
1008
- data4Layout.nodeSpacing = conf?.nodeSpacing || 50;
1009
- data4Layout.rankSpacing = conf?.rankSpacing || 50;
1010
- data4Layout.markers = ["barb"];
1011
- data4Layout.diagramId = id;
1012
- await (0,_chunk_U2OMI7UW_mjs__WEBPACK_IMPORTED_MODULE_1__/* .render */ .XX)(data4Layout, svg);
1013
- const padding = 8;
1014
- _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_2__/* .utils_default */ ._K.insertTitle(
1015
- svg,
1016
- "statediagramTitleText",
1017
- conf?.titleTopMargin ?? 25,
1018
- diag.db.getDiagramTitle()
1019
- );
1020
- (0,_chunk_4LC2V6XN_mjs__WEBPACK_IMPORTED_MODULE_0__/* .setupViewPortForSVG */ .P)(svg, padding, CSS_DIAGRAM, conf?.useMaxWidth ?? true);
1021
- }, "draw");
1022
- var stateRenderer_v3_unified_default = {
1023
- getClasses,
1024
- draw,
1025
- getDir
1026
- };
1027
-
1028
- // src/diagrams/state/dataFetcher.js
1029
- var nodeDb = /* @__PURE__ */ new Map();
1030
- var graphItemCount = 0;
1031
- function stateDomId(itemId = "", counter = 0, type = "", typeSpacer = DOMID_TYPE_SPACER) {
1032
- const typeStr = type !== null && type.length > 0 ? `${typeSpacer}${type}` : "";
1033
- return `${DOMID_STATE}-${itemId}${typeStr}-${counter}`;
1034
- }
1035
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(stateDomId, "stateDomId");
1036
- var setupDoc = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((parentParsedItem, doc, diagramStates, nodes2, edges2, altFlag, look, classes2) => {
1037
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.trace("items", doc);
1038
- doc.forEach((item) => {
1039
- switch (item.stmt) {
1040
- case STMT_STATE:
1041
- dataFetcher(parentParsedItem, item, diagramStates, nodes2, edges2, altFlag, look, classes2);
1042
- break;
1043
- case DEFAULT_STATE_TYPE:
1044
- dataFetcher(parentParsedItem, item, diagramStates, nodes2, edges2, altFlag, look, classes2);
1045
- break;
1046
- case STMT_RELATION:
1047
- {
1048
- dataFetcher(
1049
- parentParsedItem,
1050
- item.state1,
1051
- diagramStates,
1052
- nodes2,
1053
- edges2,
1054
- altFlag,
1055
- look,
1056
- classes2
1057
- );
1058
- dataFetcher(
1059
- parentParsedItem,
1060
- item.state2,
1061
- diagramStates,
1062
- nodes2,
1063
- edges2,
1064
- altFlag,
1065
- look,
1066
- classes2
1067
- );
1068
- const edgeData = {
1069
- id: "edge" + graphItemCount,
1070
- start: item.state1.id,
1071
- end: item.state2.id,
1072
- arrowhead: "normal",
1073
- arrowTypeEnd: "arrow_barb",
1074
- style: G_EDGE_STYLE,
1075
- labelStyle: "",
1076
- label: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .common_default */ .Y2.sanitizeText(item.description, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)()),
1077
- arrowheadStyle: G_EDGE_ARROWHEADSTYLE,
1078
- labelpos: G_EDGE_LABELPOS,
1079
- labelType: G_EDGE_LABELTYPE,
1080
- thickness: G_EDGE_THICKNESS,
1081
- classes: CSS_EDGE,
1082
- look
1083
- };
1084
- edges2.push(edgeData);
1085
- graphItemCount++;
1086
- }
1087
- break;
1088
- }
1089
- });
1090
- }, "setupDoc");
1091
- var getDir2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((parsedItem, defaultDir = DEFAULT_NESTED_DOC_DIR) => {
1092
- let dir = defaultDir;
1093
- if (parsedItem.doc) {
1094
- for (const parsedItemDoc of parsedItem.doc) {
1095
- if (parsedItemDoc.stmt === "dir") {
1096
- dir = parsedItemDoc.value;
1097
- }
1098
- }
1099
- }
1100
- return dir;
1101
- }, "getDir");
1102
- function insertOrUpdateNode(nodes2, nodeData, classes2) {
1103
- if (!nodeData.id || nodeData.id === "</join></fork>" || nodeData.id === "</choice>") {
1104
- return;
1105
- }
1106
- if (nodeData.cssClasses) {
1107
- if (!Array.isArray(nodeData.cssCompiledStyles)) {
1108
- nodeData.cssCompiledStyles = [];
1109
- }
1110
- nodeData.cssClasses.split(" ").forEach((cssClass) => {
1111
- if (classes2.get(cssClass)) {
1112
- const classDef = classes2.get(cssClass);
1113
- nodeData.cssCompiledStyles = [...nodeData.cssCompiledStyles, ...classDef.styles];
1114
- }
1115
- });
1116
- }
1117
- const existingNodeData = nodes2.find((node) => node.id === nodeData.id);
1118
- if (existingNodeData) {
1119
- Object.assign(existingNodeData, nodeData);
1120
- } else {
1121
- nodes2.push(nodeData);
1122
- }
1123
- }
1124
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(insertOrUpdateNode, "insertOrUpdateNode");
1125
- function getClassesFromDbInfo(dbInfoItem) {
1126
- return dbInfoItem?.classes?.join(" ") ?? "";
1127
- }
1128
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getClassesFromDbInfo, "getClassesFromDbInfo");
1129
- function getStylesFromDbInfo(dbInfoItem) {
1130
- return dbInfoItem?.styles ?? [];
1131
- }
1132
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(getStylesFromDbInfo, "getStylesFromDbInfo");
1133
- var dataFetcher = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((parent, parsedItem, diagramStates, nodes2, edges2, altFlag, look, classes2) => {
1134
- const itemId = parsedItem.id;
1135
- const dbState = diagramStates.get(itemId);
1136
- const classStr = getClassesFromDbInfo(dbState);
1137
- const style = getStylesFromDbInfo(dbState);
1138
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("dataFetcher parsedItem", parsedItem, dbState, style);
1139
- if (itemId !== "root") {
1140
- let shape = SHAPE_STATE;
1141
- if (parsedItem.start === true) {
1142
- shape = SHAPE_START;
1143
- } else if (parsedItem.start === false) {
1144
- shape = SHAPE_END;
1145
- }
1146
- if (parsedItem.type !== DEFAULT_STATE_TYPE) {
1147
- shape = parsedItem.type;
1148
- }
1149
- if (!nodeDb.get(itemId)) {
1150
- nodeDb.set(itemId, {
1151
- id: itemId,
1152
- shape,
1153
- description: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .common_default */ .Y2.sanitizeText(itemId, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)()),
1154
- cssClasses: `${classStr} ${CSS_DIAGRAM_STATE}`,
1155
- cssStyles: style
1156
- });
1157
- }
1158
- const newNode = nodeDb.get(itemId);
1159
- if (parsedItem.description) {
1160
- if (Array.isArray(newNode.description)) {
1161
- newNode.shape = SHAPE_STATE_WITH_DESC;
1162
- newNode.description.push(parsedItem.description);
1163
- } else {
1164
- if (newNode.description?.length > 0) {
1165
- newNode.shape = SHAPE_STATE_WITH_DESC;
1166
- if (newNode.description === itemId) {
1167
- newNode.description = [parsedItem.description];
1168
- } else {
1169
- newNode.description = [newNode.description, parsedItem.description];
1170
- }
1171
- } else {
1172
- newNode.shape = SHAPE_STATE;
1173
- newNode.description = parsedItem.description;
1174
- }
1175
- }
1176
- newNode.description = _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .common_default */ .Y2.sanitizeTextOrArray(newNode.description, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)());
1177
- }
1178
- if (newNode.description?.length === 1 && newNode.shape === SHAPE_STATE_WITH_DESC) {
1179
- if (newNode.type === "group") {
1180
- newNode.shape = SHAPE_GROUP;
1181
- } else {
1182
- newNode.shape = SHAPE_STATE;
1183
- }
1184
- }
1185
- if (!newNode.type && parsedItem.doc) {
1186
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Setting cluster for XCX", itemId, getDir2(parsedItem));
1187
- newNode.type = "group";
1188
- newNode.isGroup = true;
1189
- newNode.dir = getDir2(parsedItem);
1190
- newNode.shape = parsedItem.type === DIVIDER_TYPE ? SHAPE_DIVIDER : SHAPE_GROUP;
1191
- newNode.cssClasses = `${newNode.cssClasses} ${CSS_DIAGRAM_CLUSTER} ${altFlag ? CSS_DIAGRAM_CLUSTER_ALT : ""}`;
1192
- }
1193
- const nodeData = {
1194
- labelStyle: "",
1195
- shape: newNode.shape,
1196
- label: newNode.description,
1197
- cssClasses: newNode.cssClasses,
1198
- cssCompiledStyles: [],
1199
- cssStyles: newNode.cssStyles,
1200
- id: itemId,
1201
- dir: newNode.dir,
1202
- domId: stateDomId(itemId, graphItemCount),
1203
- type: newNode.type,
1204
- isGroup: newNode.type === "group",
1205
- padding: 8,
1206
- rx: 10,
1207
- ry: 10,
1208
- look
1209
- };
1210
- if (nodeData.shape === SHAPE_DIVIDER) {
1211
- nodeData.label = "";
1212
- }
1213
- if (parent && parent.id !== "root") {
1214
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.trace("Setting node ", itemId, " to be child of its parent ", parent.id);
1215
- nodeData.parentId = parent.id;
1216
- }
1217
- nodeData.centerLabel = true;
1218
- if (parsedItem.note) {
1219
- const noteData = {
1220
- labelStyle: "",
1221
- shape: SHAPE_NOTE,
1222
- label: parsedItem.note.text,
1223
- cssClasses: CSS_DIAGRAM_NOTE,
1224
- // useHtmlLabels: false,
1225
- cssStyles: [],
1226
- cssCompilesStyles: [],
1227
- id: itemId + NOTE_ID + "-" + graphItemCount,
1228
- domId: stateDomId(itemId, graphItemCount, NOTE),
1229
- type: newNode.type,
1230
- isGroup: newNode.type === "group",
1231
- padding: (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)().flowchart.padding,
1232
- look,
1233
- position: parsedItem.note.position
1234
- };
1235
- const parentNodeId = itemId + PARENT_ID;
1236
- const groupData = {
1237
- labelStyle: "",
1238
- shape: SHAPE_NOTEGROUP,
1239
- label: parsedItem.note.text,
1240
- cssClasses: newNode.cssClasses,
1241
- cssStyles: [],
1242
- id: itemId + PARENT_ID,
1243
- domId: stateDomId(itemId, graphItemCount, PARENT),
1244
- type: "group",
1245
- isGroup: true,
1246
- padding: 16,
1247
- //getConfig().flowchart.padding
1248
- look,
1249
- position: parsedItem.note.position
1250
- };
1251
- graphItemCount++;
1252
- groupData.id = parentNodeId;
1253
- noteData.parentId = parentNodeId;
1254
- insertOrUpdateNode(nodes2, groupData, classes2);
1255
- insertOrUpdateNode(nodes2, noteData, classes2);
1256
- insertOrUpdateNode(nodes2, nodeData, classes2);
1257
- let from = itemId;
1258
- let to = noteData.id;
1259
- if (parsedItem.note.position === "left of") {
1260
- from = noteData.id;
1261
- to = itemId;
1262
- }
1263
- edges2.push({
1264
- id: from + "-" + to,
1265
- start: from,
1266
- end: to,
1267
- arrowhead: "none",
1268
- arrowTypeEnd: "",
1269
- style: G_EDGE_STYLE,
1270
- labelStyle: "",
1271
- classes: CSS_EDGE_NOTE_EDGE,
1272
- arrowheadStyle: G_EDGE_ARROWHEADSTYLE,
1273
- labelpos: G_EDGE_LABELPOS,
1274
- labelType: G_EDGE_LABELTYPE,
1275
- thickness: G_EDGE_THICKNESS,
1276
- look
1277
- });
1278
- } else {
1279
- insertOrUpdateNode(nodes2, nodeData, classes2);
1280
- }
1281
- }
1282
- if (parsedItem.doc) {
1283
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.trace("Adding nodes children ");
1284
- setupDoc(parsedItem, parsedItem.doc, diagramStates, nodes2, edges2, !altFlag, look, classes2);
1285
- }
1286
- }, "dataFetcher");
1287
- var reset = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
1288
- nodeDb.clear();
1289
- graphItemCount = 0;
1290
- }, "reset");
1291
-
1292
- // src/diagrams/state/stateDb.js
1293
- var START_NODE = "[*]";
1294
- var START_TYPE = "start";
1295
- var END_NODE = START_NODE;
1296
- var END_TYPE = "end";
1297
- var COLOR_KEYWORD = "color";
1298
- var FILL_KEYWORD = "fill";
1299
- var BG_FILL = "bgFill";
1300
- var STYLECLASS_SEP = ",";
1301
- function newClassesList() {
1302
- return /* @__PURE__ */ new Map();
1303
- }
1304
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(newClassesList, "newClassesList");
1305
- var nodes = [];
1306
- var edges = [];
1307
- var direction = DEFAULT_DIAGRAM_DIRECTION;
1308
- var rootDoc = [];
1309
- var classes = newClassesList();
1310
- var newDoc = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
1311
- return {
1312
- /** @type {{ id1: string, id2: string, relationTitle: string }[]} */
1313
- relations: [],
1314
- states: /* @__PURE__ */ new Map(),
1315
- documents: {}
1316
- };
1317
- }, "newDoc");
1318
- var documents = {
1319
- root: newDoc()
1320
- };
1321
- var currentDocument = documents.root;
1322
- var startEndCount = 0;
1323
- var dividerCnt = 0;
1324
- var lineType = {
1325
- LINE: 0,
1326
- DOTTED_LINE: 1
1327
- };
1328
- var relationType = {
1329
- AGGREGATION: 0,
1330
- EXTENSION: 1,
1331
- COMPOSITION: 2,
1332
- DEPENDENCY: 3
1333
- };
1334
- var clone = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((o) => JSON.parse(JSON.stringify(o)), "clone");
1335
- var setRootDoc = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((o) => {
1336
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Setting root doc", o);
1337
- rootDoc = o;
1338
- }, "setRootDoc");
1339
- var getRootDoc = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => rootDoc, "getRootDoc");
1340
- var docTranslator = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((parent, node, first) => {
1341
- if (node.stmt === STMT_RELATION) {
1342
- docTranslator(parent, node.state1, true);
1343
- docTranslator(parent, node.state2, false);
1344
- } else {
1345
- if (node.stmt === STMT_STATE) {
1346
- if (node.id === "[*]") {
1347
- node.id = first ? parent.id + "_start" : parent.id + "_end";
1348
- node.start = first;
1349
- } else {
1350
- node.id = node.id.trim();
1351
- }
1352
- }
1353
- if (node.doc) {
1354
- const doc = [];
1355
- let currentDoc = [];
1356
- let i;
1357
- for (i = 0; i < node.doc.length; i++) {
1358
- if (node.doc[i].type === DIVIDER_TYPE) {
1359
- const newNode = clone(node.doc[i]);
1360
- newNode.doc = clone(currentDoc);
1361
- doc.push(newNode);
1362
- currentDoc = [];
1363
- } else {
1364
- currentDoc.push(node.doc[i]);
1365
- }
1366
- }
1367
- if (doc.length > 0 && currentDoc.length > 0) {
1368
- const newNode = {
1369
- stmt: STMT_STATE,
1370
- id: (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_2__/* .generateId */ .$C)(),
1371
- type: "divider",
1372
- doc: clone(currentDoc)
1373
- };
1374
- doc.push(clone(newNode));
1375
- node.doc = doc;
1376
- }
1377
- node.doc.forEach((docNode) => docTranslator(node, docNode, true));
1378
- }
1379
- }
1380
- }, "docTranslator");
1381
- var getRootDocV2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
1382
- docTranslator({ id: "root" }, { id: "root", doc: rootDoc }, true);
1383
- return { id: "root", doc: rootDoc };
1384
- }, "getRootDocV2");
1385
- var extract = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((_doc) => {
1386
- let doc;
1387
- if (_doc.doc) {
1388
- doc = _doc.doc;
1389
- } else {
1390
- doc = _doc;
1391
- }
1392
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info(doc);
1393
- clear2(true);
1394
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Extract initial document:", doc);
1395
- doc.forEach((item) => {
1396
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.warn("Statement", item.stmt);
1397
- switch (item.stmt) {
1398
- case STMT_STATE:
1399
- addState(
1400
- item.id.trim(),
1401
- item.type,
1402
- item.doc,
1403
- item.description,
1404
- item.note,
1405
- item.classes,
1406
- item.styles,
1407
- item.textStyles
1408
- );
1409
- break;
1410
- case STMT_RELATION:
1411
- addRelation(item.state1, item.state2, item.description);
1412
- break;
1413
- case STMT_CLASSDEF:
1414
- addStyleClass(item.id.trim(), item.classes);
1415
- break;
1416
- case STMT_STYLEDEF:
1417
- {
1418
- const ids = item.id.trim().split(",");
1419
- const styles = item.styleClass.split(",");
1420
- ids.forEach((id) => {
1421
- let foundState = getState(id);
1422
- if (foundState === void 0) {
1423
- const trimmedId = id.trim();
1424
- addState(trimmedId);
1425
- foundState = getState(trimmedId);
1426
- }
1427
- foundState.styles = styles.map((s) => s.replace(/;/g, "")?.trim());
1428
- });
1429
- }
1430
- break;
1431
- case STMT_APPLYCLASS:
1432
- setCssClass(item.id.trim(), item.styleClass);
1433
- break;
1434
- }
1435
- });
1436
- const diagramStates = getStates();
1437
- const config = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)();
1438
- const look = config.look;
1439
- reset();
1440
- dataFetcher(void 0, getRootDocV2(), diagramStates, nodes, edges, true, look, classes);
1441
- nodes.forEach((node) => {
1442
- if (Array.isArray(node.label)) {
1443
- node.description = node.label.slice(1);
1444
- if (node.isGroup && node.description.length > 0) {
1445
- throw new Error(
1446
- "Group nodes can only have label. Remove the additional description for node [" + node.id + "]"
1447
- );
1448
- }
1449
- node.label = node.label[0];
1450
- }
1451
- });
1452
- }, "extract");
1453
- var addState = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(id, type = DEFAULT_STATE_TYPE, doc = null, descr = null, note = null, classes2 = null, styles = null, textStyles = null) {
1454
- const trimmedId = id?.trim();
1455
- if (!currentDocument.states.has(trimmedId)) {
1456
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Adding state ", trimmedId, descr);
1457
- currentDocument.states.set(trimmedId, {
1458
- id: trimmedId,
1459
- descriptions: [],
1460
- type,
1461
- doc,
1462
- note,
1463
- classes: [],
1464
- styles: [],
1465
- textStyles: []
1466
- });
1467
- } else {
1468
- if (!currentDocument.states.get(trimmedId).doc) {
1469
- currentDocument.states.get(trimmedId).doc = doc;
1470
- }
1471
- if (!currentDocument.states.get(trimmedId).type) {
1472
- currentDocument.states.get(trimmedId).type = type;
1473
- }
1474
- }
1475
- if (descr) {
1476
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Setting state description", trimmedId, descr);
1477
- if (typeof descr === "string") {
1478
- addDescription(trimmedId, descr.trim());
1479
- }
1480
- if (typeof descr === "object") {
1481
- descr.forEach((des) => addDescription(trimmedId, des.trim()));
1482
- }
1483
- }
1484
- if (note) {
1485
- const doc2 = currentDocument.states.get(trimmedId);
1486
- doc2.note = note;
1487
- doc2.note.text = _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .common_default */ .Y2.sanitizeText(doc2.note.text, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)());
1488
- }
1489
- if (classes2) {
1490
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Setting state classes", trimmedId, classes2);
1491
- const classesList = typeof classes2 === "string" ? [classes2] : classes2;
1492
- classesList.forEach((cssClass) => setCssClass(trimmedId, cssClass.trim()));
1493
- }
1494
- if (styles) {
1495
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Setting state styles", trimmedId, styles);
1496
- const stylesList = typeof styles === "string" ? [styles] : styles;
1497
- stylesList.forEach((style) => setStyle(trimmedId, style.trim()));
1498
- }
1499
- if (textStyles) {
1500
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Setting state styles", trimmedId, styles);
1501
- const textStylesList = typeof textStyles === "string" ? [textStyles] : textStyles;
1502
- textStylesList.forEach((textStyle) => setTextStyle(trimmedId, textStyle.trim()));
1503
- }
1504
- }, "addState");
1505
- var clear2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(saveCommon) {
1506
- nodes = [];
1507
- edges = [];
1508
- documents = {
1509
- root: newDoc()
1510
- };
1511
- currentDocument = documents.root;
1512
- startEndCount = 0;
1513
- classes = newClassesList();
1514
- if (!saveCommon) {
1515
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .clear */ .IU)();
1516
- }
1517
- }, "clear");
1518
- var getState = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(id) {
1519
- return currentDocument.states.get(id);
1520
- }, "getState");
1521
- var getStates = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
1522
- return currentDocument.states;
1523
- }, "getStates");
1524
- var logDocuments = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
1525
- _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.info("Documents = ", documents);
1526
- }, "logDocuments");
1527
- var getRelations = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
1528
- return currentDocument.relations;
1529
- }, "getRelations");
1530
- function startIdIfNeeded(id = "") {
1531
- let fixedId = id;
1532
- if (id === START_NODE) {
1533
- startEndCount++;
1534
- fixedId = `${START_TYPE}${startEndCount}`;
1535
- }
1536
- return fixedId;
1537
- }
1538
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(startIdIfNeeded, "startIdIfNeeded");
1539
- function startTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) {
1540
- return id === START_NODE ? START_TYPE : type;
1541
- }
1542
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(startTypeIfNeeded, "startTypeIfNeeded");
1543
- function endIdIfNeeded(id = "") {
1544
- let fixedId = id;
1545
- if (id === END_NODE) {
1546
- startEndCount++;
1547
- fixedId = `${END_TYPE}${startEndCount}`;
1548
- }
1549
- return fixedId;
1550
- }
1551
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(endIdIfNeeded, "endIdIfNeeded");
1552
- function endTypeIfNeeded(id = "", type = DEFAULT_STATE_TYPE) {
1553
- return id === END_NODE ? END_TYPE : type;
1554
- }
1555
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(endTypeIfNeeded, "endTypeIfNeeded");
1556
- function addRelationObjs(item1, item2, relationTitle) {
1557
- let id1 = startIdIfNeeded(item1.id.trim());
1558
- let type1 = startTypeIfNeeded(item1.id.trim(), item1.type);
1559
- let id2 = startIdIfNeeded(item2.id.trim());
1560
- let type2 = startTypeIfNeeded(item2.id.trim(), item2.type);
1561
- addState(
1562
- id1,
1563
- type1,
1564
- item1.doc,
1565
- item1.description,
1566
- item1.note,
1567
- item1.classes,
1568
- item1.styles,
1569
- item1.textStyles
1570
- );
1571
- addState(
1572
- id2,
1573
- type2,
1574
- item2.doc,
1575
- item2.description,
1576
- item2.note,
1577
- item2.classes,
1578
- item2.styles,
1579
- item2.textStyles
1580
- );
1581
- currentDocument.relations.push({
1582
- id1,
1583
- id2,
1584
- relationTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .common_default */ .Y2.sanitizeText(relationTitle, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)())
1585
- });
1586
- }
1587
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(addRelationObjs, "addRelationObjs");
1588
- var addRelation = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(item1, item2, title) {
1589
- if (typeof item1 === "object") {
1590
- addRelationObjs(item1, item2, title);
1591
- } else {
1592
- const id1 = startIdIfNeeded(item1.trim());
1593
- const type1 = startTypeIfNeeded(item1);
1594
- const id2 = endIdIfNeeded(item2.trim());
1595
- const type2 = endTypeIfNeeded(item2);
1596
- addState(id1, type1);
1597
- addState(id2, type2);
1598
- currentDocument.relations.push({
1599
- id1,
1600
- id2,
1601
- title: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .common_default */ .Y2.sanitizeText(title, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)())
1602
- });
1603
- }
1604
- }, "addRelation");
1605
- var addDescription = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(id, descr) {
1606
- const theState = currentDocument.states.get(id);
1607
- const _descr = descr.startsWith(":") ? descr.replace(":", "").trim() : descr;
1608
- theState.descriptions.push(_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .common_default */ .Y2.sanitizeText(_descr, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)()));
1609
- }, "addDescription");
1610
- var cleanupLabel = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(label) {
1611
- if (label.substring(0, 1) === ":") {
1612
- return label.substr(2).trim();
1613
- } else {
1614
- return label.trim();
1615
- }
1616
- }, "cleanupLabel");
1617
- var getDividerId = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
1618
- dividerCnt++;
1619
- return "divider-id-" + dividerCnt;
1620
- }, "getDividerId");
1621
- var addStyleClass = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(id, styleAttributes = "") {
1622
- if (!classes.has(id)) {
1623
- classes.set(id, { id, styles: [], textStyles: [] });
1624
- }
1625
- const foundClass = classes.get(id);
1626
- if (styleAttributes !== void 0 && styleAttributes !== null) {
1627
- styleAttributes.split(STYLECLASS_SEP).forEach((attrib) => {
1628
- const fixedAttrib = attrib.replace(/([^;]*);/, "$1").trim();
1629
- if (RegExp(COLOR_KEYWORD).exec(attrib)) {
1630
- const newStyle1 = fixedAttrib.replace(FILL_KEYWORD, BG_FILL);
1631
- const newStyle2 = newStyle1.replace(COLOR_KEYWORD, FILL_KEYWORD);
1632
- foundClass.textStyles.push(newStyle2);
1633
- }
1634
- foundClass.styles.push(fixedAttrib);
1635
- });
1636
- }
1637
- }, "addStyleClass");
1638
- var getClasses2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function() {
1639
- return classes;
1640
- }, "getClasses");
1641
- var setCssClass = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(itemIds, cssClassName) {
1642
- itemIds.split(",").forEach(function(id) {
1643
- let foundState = getState(id);
1644
- if (foundState === void 0) {
1645
- const trimmedId = id.trim();
1646
- addState(trimmedId);
1647
- foundState = getState(trimmedId);
1648
- }
1649
- foundState.classes.push(cssClassName);
1650
- });
1651
- }, "setCssClass");
1652
- var setStyle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(itemId, styleText) {
1653
- const item = getState(itemId);
1654
- if (item !== void 0) {
1655
- item.styles.push(styleText);
1656
- }
1657
- }, "setStyle");
1658
- var setTextStyle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(function(itemId, cssClassName) {
1659
- const item = getState(itemId);
1660
- if (item !== void 0) {
1661
- item.textStyles.push(cssClassName);
1662
- }
1663
- }, "setTextStyle");
1664
- var getDirection = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => direction, "getDirection");
1665
- var setDirection = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((dir) => {
1666
- direction = dir;
1667
- }, "setDirection");
1668
- var trimColon = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((str) => str && str[0] === ":" ? str.substr(1).trim() : str.trim(), "trimColon");
1669
- var getData = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
1670
- const config = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)();
1671
- return { nodes, edges, other: {}, config, direction: getDir(getRootDocV2()) };
1672
- }, "getData");
1673
- var stateDb_default = {
1674
- getConfig: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig2 */ .D7)().state, "getConfig"),
1675
- getData,
1676
- addState,
1677
- clear: clear2,
1678
- getState,
1679
- getStates,
1680
- getRelations,
1681
- getClasses: getClasses2,
1682
- getDirection,
1683
- addRelation,
1684
- getDividerId,
1685
- setDirection,
1686
- cleanupLabel,
1687
- lineType,
1688
- relationType,
1689
- logDocuments,
1690
- getRootDoc,
1691
- setRootDoc,
1692
- getRootDocV2,
1693
- extract,
1694
- trimColon,
1695
- getAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getAccTitle */ .iN,
1696
- setAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setAccTitle */ .SV,
1697
- getAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getAccDescription */ .m7,
1698
- setAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setAccDescription */ .EI,
1699
- addStyleClass,
1700
- setCssClass,
1701
- addDescription,
1702
- setDiagramTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setDiagramTitle */ .ke,
1703
- getDiagramTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getDiagramTitle */ .ab
1704
- };
1705
-
1706
- // src/diagrams/state/styles.js
1707
- var getStyles = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((options) => `
1708
- defs #statediagram-barbEnd {
1709
- fill: ${options.transitionColor};
1710
- stroke: ${options.transitionColor};
1711
- }
1712
- g.stateGroup text {
1713
- fill: ${options.nodeBorder};
1714
- stroke: none;
1715
- font-size: 10px;
1716
- }
1717
- g.stateGroup text {
1718
- fill: ${options.textColor};
1719
- stroke: none;
1720
- font-size: 10px;
1721
-
1722
- }
1723
- g.stateGroup .state-title {
1724
- font-weight: bolder;
1725
- fill: ${options.stateLabelColor};
1726
- }
1727
-
1728
- g.stateGroup rect {
1729
- fill: ${options.mainBkg};
1730
- stroke: ${options.nodeBorder};
1731
- }
1732
-
1733
- g.stateGroup line {
1734
- stroke: ${options.lineColor};
1735
- stroke-width: 1;
1736
- }
1737
-
1738
- .transition {
1739
- stroke: ${options.transitionColor};
1740
- stroke-width: 1;
1741
- fill: none;
1742
- }
1743
-
1744
- .stateGroup .composit {
1745
- fill: ${options.background};
1746
- border-bottom: 1px
1747
- }
1748
-
1749
- .stateGroup .alt-composit {
1750
- fill: #e0e0e0;
1751
- border-bottom: 1px
1752
- }
1753
-
1754
- .state-note {
1755
- stroke: ${options.noteBorderColor};
1756
- fill: ${options.noteBkgColor};
1757
-
1758
- text {
1759
- fill: ${options.noteTextColor};
1760
- stroke: none;
1761
- font-size: 10px;
1762
- }
1763
- }
1764
-
1765
- .stateLabel .box {
1766
- stroke: none;
1767
- stroke-width: 0;
1768
- fill: ${options.mainBkg};
1769
- opacity: 0.5;
1770
- }
1771
-
1772
- .edgeLabel .label rect {
1773
- fill: ${options.labelBackgroundColor};
1774
- opacity: 0.5;
1775
- }
1776
- .edgeLabel {
1777
- background-color: ${options.edgeLabelBackground};
1778
- p {
1779
- background-color: ${options.edgeLabelBackground};
1780
- }
1781
- rect {
1782
- opacity: 0.5;
1783
- background-color: ${options.edgeLabelBackground};
1784
- fill: ${options.edgeLabelBackground};
1785
- }
1786
- text-align: center;
1787
- }
1788
- .edgeLabel .label text {
1789
- fill: ${options.transitionLabelColor || options.tertiaryTextColor};
1790
- }
1791
- .label div .edgeLabel {
1792
- color: ${options.transitionLabelColor || options.tertiaryTextColor};
1793
- }
1794
-
1795
- .stateLabel text {
1796
- fill: ${options.stateLabelColor};
1797
- font-size: 10px;
1798
- font-weight: bold;
1799
- }
1800
-
1801
- .node circle.state-start {
1802
- fill: ${options.specialStateColor};
1803
- stroke: ${options.specialStateColor};
1804
- }
1805
-
1806
- .node .fork-join {
1807
- fill: ${options.specialStateColor};
1808
- stroke: ${options.specialStateColor};
1809
- }
1810
-
1811
- .node circle.state-end {
1812
- fill: ${options.innerEndBackground};
1813
- stroke: ${options.background};
1814
- stroke-width: 1.5
1815
- }
1816
- .end-state-inner {
1817
- fill: ${options.compositeBackground || options.background};
1818
- // stroke: ${options.background};
1819
- stroke-width: 1.5
1820
- }
1821
-
1822
- .node rect {
1823
- fill: ${options.stateBkg || options.mainBkg};
1824
- stroke: ${options.stateBorder || options.nodeBorder};
1825
- stroke-width: 1px;
1826
- }
1827
- .node polygon {
1828
- fill: ${options.mainBkg};
1829
- stroke: ${options.stateBorder || options.nodeBorder};;
1830
- stroke-width: 1px;
1831
- }
1832
- #statediagram-barbEnd {
1833
- fill: ${options.lineColor};
1834
- }
1835
-
1836
- .statediagram-cluster rect {
1837
- fill: ${options.compositeTitleBackground};
1838
- stroke: ${options.stateBorder || options.nodeBorder};
1839
- stroke-width: 1px;
1840
- }
1841
-
1842
- .cluster-label, .nodeLabel {
1843
- color: ${options.stateLabelColor};
1844
- // line-height: 1;
1845
- }
1846
-
1847
- .statediagram-cluster rect.outer {
1848
- rx: 5px;
1849
- ry: 5px;
1850
- }
1851
- .statediagram-state .divider {
1852
- stroke: ${options.stateBorder || options.nodeBorder};
1853
- }
1854
-
1855
- .statediagram-state .title-state {
1856
- rx: 5px;
1857
- ry: 5px;
1858
- }
1859
- .statediagram-cluster.statediagram-cluster .inner {
1860
- fill: ${options.compositeBackground || options.background};
1861
- }
1862
- .statediagram-cluster.statediagram-cluster-alt .inner {
1863
- fill: ${options.altBackground ? options.altBackground : "#efefef"};
1864
- }
1865
-
1866
- .statediagram-cluster .inner {
1867
- rx:0;
1868
- ry:0;
1869
- }
1870
-
1871
- .statediagram-state rect.basic {
1872
- rx: 5px;
1873
- ry: 5px;
1874
- }
1875
- .statediagram-state rect.divider {
1876
- stroke-dasharray: 10,10;
1877
- fill: ${options.altBackground ? options.altBackground : "#efefef"};
1878
- }
1879
-
1880
- .note-edge {
1881
- stroke-dasharray: 5;
1882
- }
1883
-
1884
- .statediagram-note rect {
1885
- fill: ${options.noteBkgColor};
1886
- stroke: ${options.noteBorderColor};
1887
- stroke-width: 1px;
1888
- rx: 0;
1889
- ry: 0;
1890
- }
1891
- .statediagram-note rect {
1892
- fill: ${options.noteBkgColor};
1893
- stroke: ${options.noteBorderColor};
1894
- stroke-width: 1px;
1895
- rx: 0;
1896
- ry: 0;
1897
- }
1898
-
1899
- .statediagram-note text {
1900
- fill: ${options.noteTextColor};
1901
- }
1902
-
1903
- .statediagram-note .nodeLabel {
1904
- color: ${options.noteTextColor};
1905
- }
1906
- .statediagram .edgeLabel {
1907
- color: red; // ${options.noteTextColor};
1908
- }
1909
-
1910
- #dependencyStart, #dependencyEnd {
1911
- fill: ${options.lineColor};
1912
- stroke: ${options.lineColor};
1913
- stroke-width: 1;
1914
- }
1915
-
1916
- .statediagramTitleText {
1917
- text-anchor: middle;
1918
- font-size: 18px;
1919
- fill: ${options.textColor};
1920
- }
1921
- `, "getStyles");
1922
- var styles_default = getStyles;
1923
-
1924
-
1925
-
1926
-
1927
- /***/ })
1928
-
1929
- }]);