@readme/markdown 11.1.1 → 11.1.2
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/components/Code/index.tsx +4 -3
- package/components/CodeTabs/index.tsx +5 -2
- package/dist/10.node.js +419 -207
- package/dist/10.node.js.map +1 -1
- package/dist/101.node.js +23 -0
- package/dist/101.node.js.map +1 -0
- package/dist/109.node.js +63 -0
- package/dist/109.node.js.map +1 -0
- package/dist/197.node.js +63 -0
- package/dist/197.node.js.map +1 -0
- package/dist/213.node.js +23 -0
- package/dist/213.node.js.map +1 -0
- package/dist/{580.node.js → 259.node.js} +98 -79
- package/dist/259.node.js.map +1 -0
- package/dist/339.node.js +4 -4
- package/dist/{912.node.js → 356.node.js} +154 -150
- package/dist/356.node.js.map +1 -0
- package/dist/357.node.js +1352 -0
- package/dist/357.node.js.map +1 -0
- package/dist/387.node.js +23 -0
- package/dist/387.node.js.map +1 -0
- package/dist/398.node.js +63 -0
- package/dist/398.node.js.map +1 -0
- package/dist/{805.node.js → 405.node.js} +110 -91
- package/dist/405.node.js.map +1 -0
- package/dist/{23.node.js → 434.node.js} +178 -118
- package/dist/434.node.js.map +1 -0
- package/dist/{550.node.js → 470.node.js} +105 -80
- package/dist/470.node.js.map +1 -0
- package/dist/{870.node.js → 474.node.js} +84 -77
- package/dist/474.node.js.map +1 -0
- package/dist/{649.node.js → 483.node.js} +70 -67
- package/dist/483.node.js.map +1 -0
- package/dist/486.node.js +23865 -25247
- package/dist/486.node.js.map +1 -1
- package/dist/{982.node.js → 524.node.js} +124 -88
- package/dist/524.node.js.map +1 -0
- package/dist/53.node.js +506 -0
- package/dist/53.node.js.map +1 -0
- package/dist/{898.node.js → 561.node.js} +54 -52
- package/dist/561.node.js.map +1 -0
- package/dist/579.node.js +23 -0
- package/dist/579.node.js.map +1 -0
- package/dist/{881.node.js → 680.node.js} +202 -142
- package/dist/680.node.js.map +1 -0
- package/dist/{915.node.js → 7.node.js} +265 -1210
- package/dist/7.node.js.map +1 -0
- package/dist/{188.node.js → 705.node.js} +135 -132
- package/dist/705.node.js.map +1 -0
- package/dist/713.node.js +23 -0
- package/dist/713.node.js.map +1 -0
- package/dist/{135.node.js → 720.node.js} +230 -138
- package/dist/720.node.js.map +1 -0
- package/dist/{364.node.js → 763.node.js} +488 -432
- package/dist/763.node.js.map +1 -0
- package/dist/{572.node.js → 828.node.js} +229 -185
- package/dist/828.node.js.map +1 -0
- package/dist/{311.node.js → 834.node.js} +106 -104
- package/dist/834.node.js.map +1 -0
- package/dist/{359.node.js → 863.node.js} +290 -236
- package/dist/863.node.js.map +1 -0
- package/dist/872.node.js +630 -0
- package/dist/872.node.js.map +1 -0
- package/dist/879.node.js +61 -0
- package/dist/879.node.js.map +1 -0
- package/dist/{371.node.js → 880.node.js} +401 -400
- package/dist/880.node.js.map +1 -0
- package/dist/{214.node.js → 894.node.js} +116 -114
- package/dist/894.node.js.map +1 -0
- package/dist/{890.node.js → 90.node.js} +134 -129
- package/dist/90.node.js.map +1 -0
- package/dist/{855.node.js → 901.node.js} +510 -522
- package/dist/901.node.js.map +1 -0
- package/dist/903.node.js +23 -0
- package/dist/903.node.js.map +1 -0
- package/dist/{38.node.js → 929.node.js} +920 -442
- package/dist/929.node.js.map +1 -0
- package/dist/941.node.js +23 -0
- package/dist/941.node.js.map +1 -0
- package/dist/995.node.js +2 -2
- package/dist/hooks/useHydrated/index.d.ts +6 -0
- package/dist/main.js +26 -8
- package/dist/main.node.js +32 -6
- package/dist/main.node.js.map +1 -1
- package/package.json +2 -2
- package/dist/122.node.js +0 -23
- package/dist/122.node.js.map +0 -1
- package/dist/135.node.js.map +0 -1
- package/dist/136.node.js +0 -23
- package/dist/136.node.js.map +0 -1
- package/dist/188.node.js.map +0 -1
- package/dist/214.node.js.map +0 -1
- package/dist/23.node.js.map +0 -1
- package/dist/311.node.js.map +0 -1
- package/dist/354.node.js +0 -23
- package/dist/354.node.js.map +0 -1
- package/dist/359.node.js.map +0 -1
- package/dist/364.node.js.map +0 -1
- package/dist/371.node.js.map +0 -1
- package/dist/38.node.js.map +0 -1
- package/dist/391.node.js +0 -522
- package/dist/391.node.js.map +0 -1
- package/dist/462.node.js +0 -23
- package/dist/462.node.js.map +0 -1
- package/dist/48.node.js +0 -57
- package/dist/48.node.js.map +0 -1
- package/dist/537.node.js +0 -59
- package/dist/537.node.js.map +0 -1
- package/dist/550.node.js.map +0 -1
- package/dist/572.node.js.map +0 -1
- package/dist/580.node.js.map +0 -1
- package/dist/649.node.js.map +0 -1
- package/dist/740.node.js +0 -23
- package/dist/740.node.js.map +0 -1
- package/dist/741.node.js +0 -23
- package/dist/741.node.js.map +0 -1
- package/dist/779.node.js +0 -57
- package/dist/779.node.js.map +0 -1
- package/dist/805.node.js.map +0 -1
- package/dist/855.node.js.map +0 -1
- package/dist/870.node.js.map +0 -1
- package/dist/874.node.js +0 -57
- package/dist/874.node.js.map +0 -1
- package/dist/881.node.js.map +0 -1
- package/dist/890.node.js.map +0 -1
- package/dist/898.node.js.map +0 -1
- package/dist/912.node.js.map +0 -1
- package/dist/915.node.js.map +0 -1
- package/dist/982.node.js.map +0 -1
package/dist/357.node.js
ADDED
|
@@ -0,0 +1,1352 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.id = 357;
|
|
3
|
+
exports.ids = [357];
|
|
4
|
+
exports.modules = {
|
|
5
|
+
|
|
6
|
+
/***/ 6884:
|
|
7
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
|
+
|
|
9
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ A: () => (/* binding */ getDiagramElement)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(416);
|
|
13
|
+
/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(796);
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
// src/rendering-util/insertElementsForSize.js
|
|
17
|
+
|
|
18
|
+
var getDiagramElement = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((id, securityLevel) => {
|
|
19
|
+
let sandboxElement;
|
|
20
|
+
if (securityLevel === "sandbox") {
|
|
21
|
+
sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_1__/* .select */ .Ltv)("#i" + id);
|
|
22
|
+
}
|
|
23
|
+
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");
|
|
24
|
+
const svg = root.select(`[id="${id}"]`);
|
|
25
|
+
return svg;
|
|
26
|
+
}, "getDiagramElement");
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
/***/ }),
|
|
32
|
+
|
|
33
|
+
/***/ 7925:
|
|
34
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
35
|
+
|
|
36
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
37
|
+
/* harmony export */ P: () => (/* binding */ setupViewPortForSVG)
|
|
38
|
+
/* harmony export */ });
|
|
39
|
+
/* harmony import */ var _chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6399);
|
|
40
|
+
/* harmony import */ var _chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(416);
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
// src/rendering-util/setupViewPortForSVG.ts
|
|
45
|
+
var setupViewPortForSVG = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)((svg, padding, cssDiagram, useMaxWidth) => {
|
|
46
|
+
svg.attr("class", cssDiagram);
|
|
47
|
+
const { width, height, x, y } = calculateDimensionsWithPadding(svg, padding);
|
|
48
|
+
(0,_chunk_ABZYJK2D_mjs__WEBPACK_IMPORTED_MODULE_0__/* .configureSvgSize */ .a$)(svg, height, width, useMaxWidth);
|
|
49
|
+
const viewBox = createViewBox(x, y, width, height, padding);
|
|
50
|
+
svg.attr("viewBox", viewBox);
|
|
51
|
+
_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_1__/* .log */ .Rm.debug(`viewBox configured: ${viewBox} with padding: ${padding}`);
|
|
52
|
+
}, "setupViewPortForSVG");
|
|
53
|
+
var calculateDimensionsWithPadding = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)((svg, padding) => {
|
|
54
|
+
const bounds = svg.node()?.getBBox() || { width: 0, height: 0, x: 0, y: 0 };
|
|
55
|
+
return {
|
|
56
|
+
width: bounds.width + padding * 2,
|
|
57
|
+
height: bounds.height + padding * 2,
|
|
58
|
+
x: bounds.x,
|
|
59
|
+
y: bounds.y
|
|
60
|
+
};
|
|
61
|
+
}, "calculateDimensionsWithPadding");
|
|
62
|
+
var createViewBox = /* @__PURE__ */ (0,_chunk_AGHRB4JF_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)((x, y, width, height, padding) => {
|
|
63
|
+
return `${x - padding} ${y - padding} ${width} ${height}`;
|
|
64
|
+
}, "createViewBox");
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
/***/ }),
|
|
70
|
+
|
|
71
|
+
/***/ 3357:
|
|
72
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
// EXPORTS
|
|
76
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
77
|
+
diagram: () => (/* binding */ diagram)
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
// EXTERNAL MODULE: ./node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.mjs
|
|
81
|
+
var chunk_55IACEB6 = __webpack_require__(6884);
|
|
82
|
+
// EXTERNAL MODULE: ./node_modules/mermaid/dist/chunks/mermaid.core/chunk-QN33PNHL.mjs
|
|
83
|
+
var chunk_QN33PNHL = __webpack_require__(7925);
|
|
84
|
+
// EXTERNAL MODULE: ./node_modules/mermaid/dist/chunks/mermaid.core/chunk-N4CR4FBY.mjs
|
|
85
|
+
var chunk_N4CR4FBY = __webpack_require__(8188);
|
|
86
|
+
// EXTERNAL MODULE: ./node_modules/mermaid/dist/chunks/mermaid.core/chunk-QXUST7PY.mjs
|
|
87
|
+
var chunk_QXUST7PY = __webpack_require__(5301);
|
|
88
|
+
// EXTERNAL MODULE: ./node_modules/mermaid/dist/chunks/mermaid.core/chunk-HN2XXSSU.mjs
|
|
89
|
+
var chunk_HN2XXSSU = __webpack_require__(6103);
|
|
90
|
+
// EXTERNAL MODULE: ./node_modules/mermaid/dist/chunks/mermaid.core/chunk-JZLCHNYA.mjs
|
|
91
|
+
var chunk_JZLCHNYA = __webpack_require__(7655);
|
|
92
|
+
// EXTERNAL MODULE: ./node_modules/mermaid/dist/chunks/mermaid.core/chunk-CVBHYZKI.mjs
|
|
93
|
+
var chunk_CVBHYZKI = __webpack_require__(5164);
|
|
94
|
+
// EXTERNAL MODULE: ./node_modules/mermaid/dist/chunks/mermaid.core/chunk-ATLVNIR6.mjs
|
|
95
|
+
var chunk_ATLVNIR6 = __webpack_require__(5750);
|
|
96
|
+
// EXTERNAL MODULE: ./node_modules/mermaid/dist/chunks/mermaid.core/chunk-JA3XYJ7Z.mjs + 13 modules
|
|
97
|
+
var chunk_JA3XYJ7Z = __webpack_require__(5866);
|
|
98
|
+
// EXTERNAL MODULE: ./node_modules/mermaid/dist/chunks/mermaid.core/chunk-S3R3BYOJ.mjs
|
|
99
|
+
var chunk_S3R3BYOJ = __webpack_require__(9131);
|
|
100
|
+
// EXTERNAL MODULE: ./node_modules/mermaid/dist/chunks/mermaid.core/chunk-ABZYJK2D.mjs + 3 modules
|
|
101
|
+
var chunk_ABZYJK2D = __webpack_require__(6399);
|
|
102
|
+
// EXTERNAL MODULE: ./node_modules/mermaid/dist/chunks/mermaid.core/chunk-AGHRB4JF.mjs
|
|
103
|
+
var chunk_AGHRB4JF = __webpack_require__(416);
|
|
104
|
+
// EXTERNAL MODULE: external "crypto"
|
|
105
|
+
var external_crypto_ = __webpack_require__(6982);
|
|
106
|
+
;// ./node_modules/mermaid/node_modules/uuid/dist/esm/native.js
|
|
107
|
+
|
|
108
|
+
/* harmony default export */ const esm_native = ({ randomUUID: external_crypto_.randomUUID });
|
|
109
|
+
|
|
110
|
+
;// ./node_modules/mermaid/node_modules/uuid/dist/esm/rng.js
|
|
111
|
+
|
|
112
|
+
const rnds8Pool = new Uint8Array(256);
|
|
113
|
+
let poolPtr = rnds8Pool.length;
|
|
114
|
+
function rng() {
|
|
115
|
+
if (poolPtr > rnds8Pool.length - 16) {
|
|
116
|
+
(0,external_crypto_.randomFillSync)(rnds8Pool);
|
|
117
|
+
poolPtr = 0;
|
|
118
|
+
}
|
|
119
|
+
return rnds8Pool.slice(poolPtr, (poolPtr += 16));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
;// ./node_modules/mermaid/node_modules/uuid/dist/esm/stringify.js
|
|
123
|
+
|
|
124
|
+
const byteToHex = [];
|
|
125
|
+
for (let i = 0; i < 256; ++i) {
|
|
126
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
127
|
+
}
|
|
128
|
+
function unsafeStringify(arr, offset = 0) {
|
|
129
|
+
return (byteToHex[arr[offset + 0]] +
|
|
130
|
+
byteToHex[arr[offset + 1]] +
|
|
131
|
+
byteToHex[arr[offset + 2]] +
|
|
132
|
+
byteToHex[arr[offset + 3]] +
|
|
133
|
+
'-' +
|
|
134
|
+
byteToHex[arr[offset + 4]] +
|
|
135
|
+
byteToHex[arr[offset + 5]] +
|
|
136
|
+
'-' +
|
|
137
|
+
byteToHex[arr[offset + 6]] +
|
|
138
|
+
byteToHex[arr[offset + 7]] +
|
|
139
|
+
'-' +
|
|
140
|
+
byteToHex[arr[offset + 8]] +
|
|
141
|
+
byteToHex[arr[offset + 9]] +
|
|
142
|
+
'-' +
|
|
143
|
+
byteToHex[arr[offset + 10]] +
|
|
144
|
+
byteToHex[arr[offset + 11]] +
|
|
145
|
+
byteToHex[arr[offset + 12]] +
|
|
146
|
+
byteToHex[arr[offset + 13]] +
|
|
147
|
+
byteToHex[arr[offset + 14]] +
|
|
148
|
+
byteToHex[arr[offset + 15]]).toLowerCase();
|
|
149
|
+
}
|
|
150
|
+
function stringify(arr, offset = 0) {
|
|
151
|
+
const uuid = unsafeStringify(arr, offset);
|
|
152
|
+
if (!validate(uuid)) {
|
|
153
|
+
throw TypeError('Stringified UUID is invalid');
|
|
154
|
+
}
|
|
155
|
+
return uuid;
|
|
156
|
+
}
|
|
157
|
+
/* harmony default export */ const esm_stringify = ((/* unused pure expression or super */ null && (stringify)));
|
|
158
|
+
|
|
159
|
+
;// ./node_modules/mermaid/node_modules/uuid/dist/esm/v4.js
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
function v4(options, buf, offset) {
|
|
164
|
+
if (esm_native.randomUUID && !buf && !options) {
|
|
165
|
+
return esm_native.randomUUID();
|
|
166
|
+
}
|
|
167
|
+
options = options || {};
|
|
168
|
+
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
169
|
+
if (rnds.length < 16) {
|
|
170
|
+
throw new Error('Random bytes length must be >= 16');
|
|
171
|
+
}
|
|
172
|
+
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
173
|
+
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
174
|
+
if (buf) {
|
|
175
|
+
offset = offset || 0;
|
|
176
|
+
if (offset < 0 || offset + 16 > buf.length) {
|
|
177
|
+
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
178
|
+
}
|
|
179
|
+
for (let i = 0; i < 16; ++i) {
|
|
180
|
+
buf[offset + i] = rnds[i];
|
|
181
|
+
}
|
|
182
|
+
return buf;
|
|
183
|
+
}
|
|
184
|
+
return unsafeStringify(rnds);
|
|
185
|
+
}
|
|
186
|
+
/* harmony default export */ const esm_v4 = (v4);
|
|
187
|
+
|
|
188
|
+
// EXTERNAL MODULE: ./node_modules/khroma/dist/methods/is_dark.js + 2 modules
|
|
189
|
+
var is_dark = __webpack_require__(5099);
|
|
190
|
+
// EXTERNAL MODULE: ./node_modules/khroma/dist/methods/lighten.js
|
|
191
|
+
var lighten = __webpack_require__(7470);
|
|
192
|
+
// EXTERNAL MODULE: ./node_modules/khroma/dist/methods/darken.js
|
|
193
|
+
var darken = __webpack_require__(8750);
|
|
194
|
+
;// ./node_modules/mermaid/dist/chunks/mermaid.core/mindmap-definition-VGOIOE7T.mjs
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
// src/diagrams/mindmap/parser/mindmap.jison
|
|
209
|
+
var parser = (function() {
|
|
210
|
+
var o = /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function(k, v, o2, l) {
|
|
211
|
+
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
|
|
212
|
+
return o2;
|
|
213
|
+
}, "o"), $V0 = [1, 4], $V1 = [1, 13], $V2 = [1, 12], $V3 = [1, 15], $V4 = [1, 16], $V5 = [1, 20], $V6 = [1, 19], $V7 = [6, 7, 8], $V8 = [1, 26], $V9 = [1, 24], $Va = [1, 25], $Vb = [6, 7, 11], $Vc = [1, 6, 13, 15, 16, 19, 22], $Vd = [1, 33], $Ve = [1, 34], $Vf = [1, 6, 7, 11, 13, 15, 16, 19, 22];
|
|
214
|
+
var parser2 = {
|
|
215
|
+
trace: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function trace() {
|
|
216
|
+
}, "trace"),
|
|
217
|
+
yy: {},
|
|
218
|
+
symbols_: { "error": 2, "start": 3, "mindMap": 4, "spaceLines": 5, "SPACELINE": 6, "NL": 7, "MINDMAP": 8, "document": 9, "stop": 10, "EOF": 11, "statement": 12, "SPACELIST": 13, "node": 14, "ICON": 15, "CLASS": 16, "nodeWithId": 17, "nodeWithoutId": 18, "NODE_DSTART": 19, "NODE_DESCR": 20, "NODE_DEND": 21, "NODE_ID": 22, "$accept": 0, "$end": 1 },
|
|
219
|
+
terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "MINDMAP", 11: "EOF", 13: "SPACELIST", 15: "ICON", 16: "CLASS", 19: "NODE_DSTART", 20: "NODE_DESCR", 21: "NODE_DEND", 22: "NODE_ID" },
|
|
220
|
+
productions_: [0, [3, 1], [3, 2], [5, 1], [5, 2], [5, 2], [4, 2], [4, 3], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [9, 3], [9, 2], [12, 2], [12, 2], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [18, 3], [17, 1], [17, 4]],
|
|
221
|
+
performAction: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
|
222
|
+
var $0 = $$.length - 1;
|
|
223
|
+
switch (yystate) {
|
|
224
|
+
case 6:
|
|
225
|
+
case 7:
|
|
226
|
+
return yy;
|
|
227
|
+
break;
|
|
228
|
+
case 8:
|
|
229
|
+
yy.getLogger().trace("Stop NL ");
|
|
230
|
+
break;
|
|
231
|
+
case 9:
|
|
232
|
+
yy.getLogger().trace("Stop EOF ");
|
|
233
|
+
break;
|
|
234
|
+
case 11:
|
|
235
|
+
yy.getLogger().trace("Stop NL2 ");
|
|
236
|
+
break;
|
|
237
|
+
case 12:
|
|
238
|
+
yy.getLogger().trace("Stop EOF2 ");
|
|
239
|
+
break;
|
|
240
|
+
case 15:
|
|
241
|
+
yy.getLogger().info("Node: ", $$[$0].id);
|
|
242
|
+
yy.addNode($$[$0 - 1].length, $$[$0].id, $$[$0].descr, $$[$0].type);
|
|
243
|
+
break;
|
|
244
|
+
case 16:
|
|
245
|
+
yy.getLogger().trace("Icon: ", $$[$0]);
|
|
246
|
+
yy.decorateNode({ icon: $$[$0] });
|
|
247
|
+
break;
|
|
248
|
+
case 17:
|
|
249
|
+
case 21:
|
|
250
|
+
yy.decorateNode({ class: $$[$0] });
|
|
251
|
+
break;
|
|
252
|
+
case 18:
|
|
253
|
+
yy.getLogger().trace("SPACELIST");
|
|
254
|
+
break;
|
|
255
|
+
case 19:
|
|
256
|
+
yy.getLogger().trace("Node: ", $$[$0].id);
|
|
257
|
+
yy.addNode(0, $$[$0].id, $$[$0].descr, $$[$0].type);
|
|
258
|
+
break;
|
|
259
|
+
case 20:
|
|
260
|
+
yy.decorateNode({ icon: $$[$0] });
|
|
261
|
+
break;
|
|
262
|
+
case 25:
|
|
263
|
+
yy.getLogger().trace("node found ..", $$[$0 - 2]);
|
|
264
|
+
this.$ = { id: $$[$0 - 1], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) };
|
|
265
|
+
break;
|
|
266
|
+
case 26:
|
|
267
|
+
this.$ = { id: $$[$0], descr: $$[$0], type: yy.nodeType.DEFAULT };
|
|
268
|
+
break;
|
|
269
|
+
case 27:
|
|
270
|
+
yy.getLogger().trace("node found ..", $$[$0 - 3]);
|
|
271
|
+
this.$ = { id: $$[$0 - 3], descr: $$[$0 - 1], type: yy.getType($$[$0 - 2], $$[$0]) };
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
}, "anonymous"),
|
|
275
|
+
table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: $V0 }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: $V0 }, { 6: $V1, 7: [1, 10], 9: 9, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($V7, [2, 3]), { 1: [2, 2] }, o($V7, [2, 4]), o($V7, [2, 5]), { 1: [2, 6], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V1, 9: 22, 12: 11, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, { 6: $V8, 7: $V9, 10: 23, 11: $Va }, o($Vb, [2, 22], { 17: 17, 18: 18, 14: 27, 15: [1, 28], 16: [1, 29], 19: $V5, 22: $V6 }), o($Vb, [2, 18]), o($Vb, [2, 19]), o($Vb, [2, 20]), o($Vb, [2, 21]), o($Vb, [2, 23]), o($Vb, [2, 24]), o($Vb, [2, 26], { 19: [1, 30] }), { 20: [1, 31] }, { 6: $V8, 7: $V9, 10: 32, 11: $Va }, { 1: [2, 7], 6: $V1, 12: 21, 13: $V2, 14: 14, 15: $V3, 16: $V4, 17: 17, 18: 18, 19: $V5, 22: $V6 }, o($Vc, [2, 14], { 7: $Vd, 11: $Ve }), o($Vf, [2, 8]), o($Vf, [2, 9]), o($Vf, [2, 10]), o($Vb, [2, 15]), o($Vb, [2, 16]), o($Vb, [2, 17]), { 20: [1, 35] }, { 21: [1, 36] }, o($Vc, [2, 13], { 7: $Vd, 11: $Ve }), o($Vf, [2, 11]), o($Vf, [2, 12]), { 21: [1, 37] }, o($Vb, [2, 25]), o($Vb, [2, 27])],
|
|
276
|
+
defaultActions: { 2: [2, 1], 6: [2, 2] },
|
|
277
|
+
parseError: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function parseError(str, hash) {
|
|
278
|
+
if (hash.recoverable) {
|
|
279
|
+
this.trace(str);
|
|
280
|
+
} else {
|
|
281
|
+
var error = new Error(str);
|
|
282
|
+
error.hash = hash;
|
|
283
|
+
throw error;
|
|
284
|
+
}
|
|
285
|
+
}, "parseError"),
|
|
286
|
+
parse: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function parse(input) {
|
|
287
|
+
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
|
288
|
+
var args = lstack.slice.call(arguments, 1);
|
|
289
|
+
var lexer2 = Object.create(this.lexer);
|
|
290
|
+
var sharedState = { yy: {} };
|
|
291
|
+
for (var k in this.yy) {
|
|
292
|
+
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
|
293
|
+
sharedState.yy[k] = this.yy[k];
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
lexer2.setInput(input, sharedState.yy);
|
|
297
|
+
sharedState.yy.lexer = lexer2;
|
|
298
|
+
sharedState.yy.parser = this;
|
|
299
|
+
if (typeof lexer2.yylloc == "undefined") {
|
|
300
|
+
lexer2.yylloc = {};
|
|
301
|
+
}
|
|
302
|
+
var yyloc = lexer2.yylloc;
|
|
303
|
+
lstack.push(yyloc);
|
|
304
|
+
var ranges = lexer2.options && lexer2.options.ranges;
|
|
305
|
+
if (typeof sharedState.yy.parseError === "function") {
|
|
306
|
+
this.parseError = sharedState.yy.parseError;
|
|
307
|
+
} else {
|
|
308
|
+
this.parseError = Object.getPrototypeOf(this).parseError;
|
|
309
|
+
}
|
|
310
|
+
function popStack(n) {
|
|
311
|
+
stack.length = stack.length - 2 * n;
|
|
312
|
+
vstack.length = vstack.length - n;
|
|
313
|
+
lstack.length = lstack.length - n;
|
|
314
|
+
}
|
|
315
|
+
(0,chunk_AGHRB4JF/* __name */.K2)(popStack, "popStack");
|
|
316
|
+
function lex() {
|
|
317
|
+
var token;
|
|
318
|
+
token = tstack.pop() || lexer2.lex() || EOF;
|
|
319
|
+
if (typeof token !== "number") {
|
|
320
|
+
if (token instanceof Array) {
|
|
321
|
+
tstack = token;
|
|
322
|
+
token = tstack.pop();
|
|
323
|
+
}
|
|
324
|
+
token = self.symbols_[token] || token;
|
|
325
|
+
}
|
|
326
|
+
return token;
|
|
327
|
+
}
|
|
328
|
+
(0,chunk_AGHRB4JF/* __name */.K2)(lex, "lex");
|
|
329
|
+
var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
|
|
330
|
+
while (true) {
|
|
331
|
+
state = stack[stack.length - 1];
|
|
332
|
+
if (this.defaultActions[state]) {
|
|
333
|
+
action = this.defaultActions[state];
|
|
334
|
+
} else {
|
|
335
|
+
if (symbol === null || typeof symbol == "undefined") {
|
|
336
|
+
symbol = lex();
|
|
337
|
+
}
|
|
338
|
+
action = table[state] && table[state][symbol];
|
|
339
|
+
}
|
|
340
|
+
if (typeof action === "undefined" || !action.length || !action[0]) {
|
|
341
|
+
var errStr = "";
|
|
342
|
+
expected = [];
|
|
343
|
+
for (p in table[state]) {
|
|
344
|
+
if (this.terminals_[p] && p > TERROR) {
|
|
345
|
+
expected.push("'" + this.terminals_[p] + "'");
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
if (lexer2.showPosition) {
|
|
349
|
+
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
|
350
|
+
} else {
|
|
351
|
+
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
|
352
|
+
}
|
|
353
|
+
this.parseError(errStr, {
|
|
354
|
+
text: lexer2.match,
|
|
355
|
+
token: this.terminals_[symbol] || symbol,
|
|
356
|
+
line: lexer2.yylineno,
|
|
357
|
+
loc: yyloc,
|
|
358
|
+
expected
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
if (action[0] instanceof Array && action.length > 1) {
|
|
362
|
+
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
|
363
|
+
}
|
|
364
|
+
switch (action[0]) {
|
|
365
|
+
case 1:
|
|
366
|
+
stack.push(symbol);
|
|
367
|
+
vstack.push(lexer2.yytext);
|
|
368
|
+
lstack.push(lexer2.yylloc);
|
|
369
|
+
stack.push(action[1]);
|
|
370
|
+
symbol = null;
|
|
371
|
+
if (!preErrorSymbol) {
|
|
372
|
+
yyleng = lexer2.yyleng;
|
|
373
|
+
yytext = lexer2.yytext;
|
|
374
|
+
yylineno = lexer2.yylineno;
|
|
375
|
+
yyloc = lexer2.yylloc;
|
|
376
|
+
if (recovering > 0) {
|
|
377
|
+
recovering--;
|
|
378
|
+
}
|
|
379
|
+
} else {
|
|
380
|
+
symbol = preErrorSymbol;
|
|
381
|
+
preErrorSymbol = null;
|
|
382
|
+
}
|
|
383
|
+
break;
|
|
384
|
+
case 2:
|
|
385
|
+
len = this.productions_[action[1]][1];
|
|
386
|
+
yyval.$ = vstack[vstack.length - len];
|
|
387
|
+
yyval._$ = {
|
|
388
|
+
first_line: lstack[lstack.length - (len || 1)].first_line,
|
|
389
|
+
last_line: lstack[lstack.length - 1].last_line,
|
|
390
|
+
first_column: lstack[lstack.length - (len || 1)].first_column,
|
|
391
|
+
last_column: lstack[lstack.length - 1].last_column
|
|
392
|
+
};
|
|
393
|
+
if (ranges) {
|
|
394
|
+
yyval._$.range = [
|
|
395
|
+
lstack[lstack.length - (len || 1)].range[0],
|
|
396
|
+
lstack[lstack.length - 1].range[1]
|
|
397
|
+
];
|
|
398
|
+
}
|
|
399
|
+
r = this.performAction.apply(yyval, [
|
|
400
|
+
yytext,
|
|
401
|
+
yyleng,
|
|
402
|
+
yylineno,
|
|
403
|
+
sharedState.yy,
|
|
404
|
+
action[1],
|
|
405
|
+
vstack,
|
|
406
|
+
lstack
|
|
407
|
+
].concat(args));
|
|
408
|
+
if (typeof r !== "undefined") {
|
|
409
|
+
return r;
|
|
410
|
+
}
|
|
411
|
+
if (len) {
|
|
412
|
+
stack = stack.slice(0, -1 * len * 2);
|
|
413
|
+
vstack = vstack.slice(0, -1 * len);
|
|
414
|
+
lstack = lstack.slice(0, -1 * len);
|
|
415
|
+
}
|
|
416
|
+
stack.push(this.productions_[action[1]][0]);
|
|
417
|
+
vstack.push(yyval.$);
|
|
418
|
+
lstack.push(yyval._$);
|
|
419
|
+
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
|
420
|
+
stack.push(newState);
|
|
421
|
+
break;
|
|
422
|
+
case 3:
|
|
423
|
+
return true;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
return true;
|
|
427
|
+
}, "parse")
|
|
428
|
+
};
|
|
429
|
+
var lexer = /* @__PURE__ */ (function() {
|
|
430
|
+
var lexer2 = {
|
|
431
|
+
EOF: 1,
|
|
432
|
+
parseError: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function parseError(str, hash) {
|
|
433
|
+
if (this.yy.parser) {
|
|
434
|
+
this.yy.parser.parseError(str, hash);
|
|
435
|
+
} else {
|
|
436
|
+
throw new Error(str);
|
|
437
|
+
}
|
|
438
|
+
}, "parseError"),
|
|
439
|
+
// resets the lexer, sets new input
|
|
440
|
+
setInput: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function(input, yy) {
|
|
441
|
+
this.yy = yy || this.yy || {};
|
|
442
|
+
this._input = input;
|
|
443
|
+
this._more = this._backtrack = this.done = false;
|
|
444
|
+
this.yylineno = this.yyleng = 0;
|
|
445
|
+
this.yytext = this.matched = this.match = "";
|
|
446
|
+
this.conditionStack = ["INITIAL"];
|
|
447
|
+
this.yylloc = {
|
|
448
|
+
first_line: 1,
|
|
449
|
+
first_column: 0,
|
|
450
|
+
last_line: 1,
|
|
451
|
+
last_column: 0
|
|
452
|
+
};
|
|
453
|
+
if (this.options.ranges) {
|
|
454
|
+
this.yylloc.range = [0, 0];
|
|
455
|
+
}
|
|
456
|
+
this.offset = 0;
|
|
457
|
+
return this;
|
|
458
|
+
}, "setInput"),
|
|
459
|
+
// consumes and returns one char from the input
|
|
460
|
+
input: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function() {
|
|
461
|
+
var ch = this._input[0];
|
|
462
|
+
this.yytext += ch;
|
|
463
|
+
this.yyleng++;
|
|
464
|
+
this.offset++;
|
|
465
|
+
this.match += ch;
|
|
466
|
+
this.matched += ch;
|
|
467
|
+
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
|
468
|
+
if (lines) {
|
|
469
|
+
this.yylineno++;
|
|
470
|
+
this.yylloc.last_line++;
|
|
471
|
+
} else {
|
|
472
|
+
this.yylloc.last_column++;
|
|
473
|
+
}
|
|
474
|
+
if (this.options.ranges) {
|
|
475
|
+
this.yylloc.range[1]++;
|
|
476
|
+
}
|
|
477
|
+
this._input = this._input.slice(1);
|
|
478
|
+
return ch;
|
|
479
|
+
}, "input"),
|
|
480
|
+
// unshifts one char (or a string) into the input
|
|
481
|
+
unput: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function(ch) {
|
|
482
|
+
var len = ch.length;
|
|
483
|
+
var lines = ch.split(/(?:\r\n?|\n)/g);
|
|
484
|
+
this._input = ch + this._input;
|
|
485
|
+
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
|
486
|
+
this.offset -= len;
|
|
487
|
+
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
|
488
|
+
this.match = this.match.substr(0, this.match.length - 1);
|
|
489
|
+
this.matched = this.matched.substr(0, this.matched.length - 1);
|
|
490
|
+
if (lines.length - 1) {
|
|
491
|
+
this.yylineno -= lines.length - 1;
|
|
492
|
+
}
|
|
493
|
+
var r = this.yylloc.range;
|
|
494
|
+
this.yylloc = {
|
|
495
|
+
first_line: this.yylloc.first_line,
|
|
496
|
+
last_line: this.yylineno + 1,
|
|
497
|
+
first_column: this.yylloc.first_column,
|
|
498
|
+
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
|
|
499
|
+
};
|
|
500
|
+
if (this.options.ranges) {
|
|
501
|
+
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
|
502
|
+
}
|
|
503
|
+
this.yyleng = this.yytext.length;
|
|
504
|
+
return this;
|
|
505
|
+
}, "unput"),
|
|
506
|
+
// When called from action, caches matched text and appends it on next action
|
|
507
|
+
more: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function() {
|
|
508
|
+
this._more = true;
|
|
509
|
+
return this;
|
|
510
|
+
}, "more"),
|
|
511
|
+
// 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.
|
|
512
|
+
reject: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function() {
|
|
513
|
+
if (this.options.backtrack_lexer) {
|
|
514
|
+
this._backtrack = true;
|
|
515
|
+
} else {
|
|
516
|
+
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(), {
|
|
517
|
+
text: "",
|
|
518
|
+
token: null,
|
|
519
|
+
line: this.yylineno
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
return this;
|
|
523
|
+
}, "reject"),
|
|
524
|
+
// retain first n characters of the match
|
|
525
|
+
less: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function(n) {
|
|
526
|
+
this.unput(this.match.slice(n));
|
|
527
|
+
}, "less"),
|
|
528
|
+
// displays already matched input, i.e. for error messages
|
|
529
|
+
pastInput: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function() {
|
|
530
|
+
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
531
|
+
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
|
532
|
+
}, "pastInput"),
|
|
533
|
+
// displays upcoming input, i.e. for error messages
|
|
534
|
+
upcomingInput: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function() {
|
|
535
|
+
var next = this.match;
|
|
536
|
+
if (next.length < 20) {
|
|
537
|
+
next += this._input.substr(0, 20 - next.length);
|
|
538
|
+
}
|
|
539
|
+
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
540
|
+
}, "upcomingInput"),
|
|
541
|
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
542
|
+
showPosition: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function() {
|
|
543
|
+
var pre = this.pastInput();
|
|
544
|
+
var c = new Array(pre.length + 1).join("-");
|
|
545
|
+
return pre + this.upcomingInput() + "\n" + c + "^";
|
|
546
|
+
}, "showPosition"),
|
|
547
|
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
548
|
+
test_match: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function(match, indexed_rule) {
|
|
549
|
+
var token, lines, backup;
|
|
550
|
+
if (this.options.backtrack_lexer) {
|
|
551
|
+
backup = {
|
|
552
|
+
yylineno: this.yylineno,
|
|
553
|
+
yylloc: {
|
|
554
|
+
first_line: this.yylloc.first_line,
|
|
555
|
+
last_line: this.last_line,
|
|
556
|
+
first_column: this.yylloc.first_column,
|
|
557
|
+
last_column: this.yylloc.last_column
|
|
558
|
+
},
|
|
559
|
+
yytext: this.yytext,
|
|
560
|
+
match: this.match,
|
|
561
|
+
matches: this.matches,
|
|
562
|
+
matched: this.matched,
|
|
563
|
+
yyleng: this.yyleng,
|
|
564
|
+
offset: this.offset,
|
|
565
|
+
_more: this._more,
|
|
566
|
+
_input: this._input,
|
|
567
|
+
yy: this.yy,
|
|
568
|
+
conditionStack: this.conditionStack.slice(0),
|
|
569
|
+
done: this.done
|
|
570
|
+
};
|
|
571
|
+
if (this.options.ranges) {
|
|
572
|
+
backup.yylloc.range = this.yylloc.range.slice(0);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
|
576
|
+
if (lines) {
|
|
577
|
+
this.yylineno += lines.length;
|
|
578
|
+
}
|
|
579
|
+
this.yylloc = {
|
|
580
|
+
first_line: this.yylloc.last_line,
|
|
581
|
+
last_line: this.yylineno + 1,
|
|
582
|
+
first_column: this.yylloc.last_column,
|
|
583
|
+
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
|
584
|
+
};
|
|
585
|
+
this.yytext += match[0];
|
|
586
|
+
this.match += match[0];
|
|
587
|
+
this.matches = match;
|
|
588
|
+
this.yyleng = this.yytext.length;
|
|
589
|
+
if (this.options.ranges) {
|
|
590
|
+
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
|
591
|
+
}
|
|
592
|
+
this._more = false;
|
|
593
|
+
this._backtrack = false;
|
|
594
|
+
this._input = this._input.slice(match[0].length);
|
|
595
|
+
this.matched += match[0];
|
|
596
|
+
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
|
597
|
+
if (this.done && this._input) {
|
|
598
|
+
this.done = false;
|
|
599
|
+
}
|
|
600
|
+
if (token) {
|
|
601
|
+
return token;
|
|
602
|
+
} else if (this._backtrack) {
|
|
603
|
+
for (var k in backup) {
|
|
604
|
+
this[k] = backup[k];
|
|
605
|
+
}
|
|
606
|
+
return false;
|
|
607
|
+
}
|
|
608
|
+
return false;
|
|
609
|
+
}, "test_match"),
|
|
610
|
+
// return next match in input
|
|
611
|
+
next: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function() {
|
|
612
|
+
if (this.done) {
|
|
613
|
+
return this.EOF;
|
|
614
|
+
}
|
|
615
|
+
if (!this._input) {
|
|
616
|
+
this.done = true;
|
|
617
|
+
}
|
|
618
|
+
var token, match, tempMatch, index;
|
|
619
|
+
if (!this._more) {
|
|
620
|
+
this.yytext = "";
|
|
621
|
+
this.match = "";
|
|
622
|
+
}
|
|
623
|
+
var rules = this._currentRules();
|
|
624
|
+
for (var i = 0; i < rules.length; i++) {
|
|
625
|
+
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
626
|
+
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
627
|
+
match = tempMatch;
|
|
628
|
+
index = i;
|
|
629
|
+
if (this.options.backtrack_lexer) {
|
|
630
|
+
token = this.test_match(tempMatch, rules[i]);
|
|
631
|
+
if (token !== false) {
|
|
632
|
+
return token;
|
|
633
|
+
} else if (this._backtrack) {
|
|
634
|
+
match = false;
|
|
635
|
+
continue;
|
|
636
|
+
} else {
|
|
637
|
+
return false;
|
|
638
|
+
}
|
|
639
|
+
} else if (!this.options.flex) {
|
|
640
|
+
break;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
if (match) {
|
|
645
|
+
token = this.test_match(match, rules[index]);
|
|
646
|
+
if (token !== false) {
|
|
647
|
+
return token;
|
|
648
|
+
}
|
|
649
|
+
return false;
|
|
650
|
+
}
|
|
651
|
+
if (this._input === "") {
|
|
652
|
+
return this.EOF;
|
|
653
|
+
} else {
|
|
654
|
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
655
|
+
text: "",
|
|
656
|
+
token: null,
|
|
657
|
+
line: this.yylineno
|
|
658
|
+
});
|
|
659
|
+
}
|
|
660
|
+
}, "next"),
|
|
661
|
+
// return next match that has a token
|
|
662
|
+
lex: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function lex() {
|
|
663
|
+
var r = this.next();
|
|
664
|
+
if (r) {
|
|
665
|
+
return r;
|
|
666
|
+
} else {
|
|
667
|
+
return this.lex();
|
|
668
|
+
}
|
|
669
|
+
}, "lex"),
|
|
670
|
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
671
|
+
begin: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function begin(condition) {
|
|
672
|
+
this.conditionStack.push(condition);
|
|
673
|
+
}, "begin"),
|
|
674
|
+
// pop the previously active lexer condition state off the condition stack
|
|
675
|
+
popState: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function popState() {
|
|
676
|
+
var n = this.conditionStack.length - 1;
|
|
677
|
+
if (n > 0) {
|
|
678
|
+
return this.conditionStack.pop();
|
|
679
|
+
} else {
|
|
680
|
+
return this.conditionStack[0];
|
|
681
|
+
}
|
|
682
|
+
}, "popState"),
|
|
683
|
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
684
|
+
_currentRules: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function _currentRules() {
|
|
685
|
+
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
|
686
|
+
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
687
|
+
} else {
|
|
688
|
+
return this.conditions["INITIAL"].rules;
|
|
689
|
+
}
|
|
690
|
+
}, "_currentRules"),
|
|
691
|
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
692
|
+
topState: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function topState(n) {
|
|
693
|
+
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
|
694
|
+
if (n >= 0) {
|
|
695
|
+
return this.conditionStack[n];
|
|
696
|
+
} else {
|
|
697
|
+
return "INITIAL";
|
|
698
|
+
}
|
|
699
|
+
}, "topState"),
|
|
700
|
+
// alias for begin(condition)
|
|
701
|
+
pushState: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function pushState(condition) {
|
|
702
|
+
this.begin(condition);
|
|
703
|
+
}, "pushState"),
|
|
704
|
+
// return the number of states currently on the stack
|
|
705
|
+
stateStackSize: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function stateStackSize() {
|
|
706
|
+
return this.conditionStack.length;
|
|
707
|
+
}, "stateStackSize"),
|
|
708
|
+
options: { "case-insensitive": true },
|
|
709
|
+
performAction: /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
|
710
|
+
var YYSTATE = YY_START;
|
|
711
|
+
switch ($avoiding_name_collisions) {
|
|
712
|
+
case 0:
|
|
713
|
+
yy.getLogger().trace("Found comment", yy_.yytext);
|
|
714
|
+
return 6;
|
|
715
|
+
break;
|
|
716
|
+
case 1:
|
|
717
|
+
return 8;
|
|
718
|
+
break;
|
|
719
|
+
case 2:
|
|
720
|
+
this.begin("CLASS");
|
|
721
|
+
break;
|
|
722
|
+
case 3:
|
|
723
|
+
this.popState();
|
|
724
|
+
return 16;
|
|
725
|
+
break;
|
|
726
|
+
case 4:
|
|
727
|
+
this.popState();
|
|
728
|
+
break;
|
|
729
|
+
case 5:
|
|
730
|
+
yy.getLogger().trace("Begin icon");
|
|
731
|
+
this.begin("ICON");
|
|
732
|
+
break;
|
|
733
|
+
case 6:
|
|
734
|
+
yy.getLogger().trace("SPACELINE");
|
|
735
|
+
return 6;
|
|
736
|
+
break;
|
|
737
|
+
case 7:
|
|
738
|
+
return 7;
|
|
739
|
+
break;
|
|
740
|
+
case 8:
|
|
741
|
+
return 15;
|
|
742
|
+
break;
|
|
743
|
+
case 9:
|
|
744
|
+
yy.getLogger().trace("end icon");
|
|
745
|
+
this.popState();
|
|
746
|
+
break;
|
|
747
|
+
case 10:
|
|
748
|
+
yy.getLogger().trace("Exploding node");
|
|
749
|
+
this.begin("NODE");
|
|
750
|
+
return 19;
|
|
751
|
+
break;
|
|
752
|
+
case 11:
|
|
753
|
+
yy.getLogger().trace("Cloud");
|
|
754
|
+
this.begin("NODE");
|
|
755
|
+
return 19;
|
|
756
|
+
break;
|
|
757
|
+
case 12:
|
|
758
|
+
yy.getLogger().trace("Explosion Bang");
|
|
759
|
+
this.begin("NODE");
|
|
760
|
+
return 19;
|
|
761
|
+
break;
|
|
762
|
+
case 13:
|
|
763
|
+
yy.getLogger().trace("Cloud Bang");
|
|
764
|
+
this.begin("NODE");
|
|
765
|
+
return 19;
|
|
766
|
+
break;
|
|
767
|
+
case 14:
|
|
768
|
+
this.begin("NODE");
|
|
769
|
+
return 19;
|
|
770
|
+
break;
|
|
771
|
+
case 15:
|
|
772
|
+
this.begin("NODE");
|
|
773
|
+
return 19;
|
|
774
|
+
break;
|
|
775
|
+
case 16:
|
|
776
|
+
this.begin("NODE");
|
|
777
|
+
return 19;
|
|
778
|
+
break;
|
|
779
|
+
case 17:
|
|
780
|
+
this.begin("NODE");
|
|
781
|
+
return 19;
|
|
782
|
+
break;
|
|
783
|
+
case 18:
|
|
784
|
+
return 13;
|
|
785
|
+
break;
|
|
786
|
+
case 19:
|
|
787
|
+
return 22;
|
|
788
|
+
break;
|
|
789
|
+
case 20:
|
|
790
|
+
return 11;
|
|
791
|
+
break;
|
|
792
|
+
case 21:
|
|
793
|
+
this.begin("NSTR2");
|
|
794
|
+
break;
|
|
795
|
+
case 22:
|
|
796
|
+
return "NODE_DESCR";
|
|
797
|
+
break;
|
|
798
|
+
case 23:
|
|
799
|
+
this.popState();
|
|
800
|
+
break;
|
|
801
|
+
case 24:
|
|
802
|
+
yy.getLogger().trace("Starting NSTR");
|
|
803
|
+
this.begin("NSTR");
|
|
804
|
+
break;
|
|
805
|
+
case 25:
|
|
806
|
+
yy.getLogger().trace("description:", yy_.yytext);
|
|
807
|
+
return "NODE_DESCR";
|
|
808
|
+
break;
|
|
809
|
+
case 26:
|
|
810
|
+
this.popState();
|
|
811
|
+
break;
|
|
812
|
+
case 27:
|
|
813
|
+
this.popState();
|
|
814
|
+
yy.getLogger().trace("node end ))");
|
|
815
|
+
return "NODE_DEND";
|
|
816
|
+
break;
|
|
817
|
+
case 28:
|
|
818
|
+
this.popState();
|
|
819
|
+
yy.getLogger().trace("node end )");
|
|
820
|
+
return "NODE_DEND";
|
|
821
|
+
break;
|
|
822
|
+
case 29:
|
|
823
|
+
this.popState();
|
|
824
|
+
yy.getLogger().trace("node end ...", yy_.yytext);
|
|
825
|
+
return "NODE_DEND";
|
|
826
|
+
break;
|
|
827
|
+
case 30:
|
|
828
|
+
this.popState();
|
|
829
|
+
yy.getLogger().trace("node end ((");
|
|
830
|
+
return "NODE_DEND";
|
|
831
|
+
break;
|
|
832
|
+
case 31:
|
|
833
|
+
this.popState();
|
|
834
|
+
yy.getLogger().trace("node end (-");
|
|
835
|
+
return "NODE_DEND";
|
|
836
|
+
break;
|
|
837
|
+
case 32:
|
|
838
|
+
this.popState();
|
|
839
|
+
yy.getLogger().trace("node end (-");
|
|
840
|
+
return "NODE_DEND";
|
|
841
|
+
break;
|
|
842
|
+
case 33:
|
|
843
|
+
this.popState();
|
|
844
|
+
yy.getLogger().trace("node end ((");
|
|
845
|
+
return "NODE_DEND";
|
|
846
|
+
break;
|
|
847
|
+
case 34:
|
|
848
|
+
this.popState();
|
|
849
|
+
yy.getLogger().trace("node end ((");
|
|
850
|
+
return "NODE_DEND";
|
|
851
|
+
break;
|
|
852
|
+
case 35:
|
|
853
|
+
yy.getLogger().trace("Long description:", yy_.yytext);
|
|
854
|
+
return 20;
|
|
855
|
+
break;
|
|
856
|
+
case 36:
|
|
857
|
+
yy.getLogger().trace("Long description:", yy_.yytext);
|
|
858
|
+
return 20;
|
|
859
|
+
break;
|
|
860
|
+
}
|
|
861
|
+
}, "anonymous"),
|
|
862
|
+
rules: [/^(?:\s*%%.*)/i, /^(?:mindmap\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
|
|
863
|
+
conditions: { "CLASS": { "rules": [3, 4], "inclusive": false }, "ICON": { "rules": [8, 9], "inclusive": false }, "NSTR2": { "rules": [22, 23], "inclusive": false }, "NSTR": { "rules": [25, 26], "inclusive": false }, "NODE": { "rules": [21, 24, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "inclusive": true } }
|
|
864
|
+
};
|
|
865
|
+
return lexer2;
|
|
866
|
+
})();
|
|
867
|
+
parser2.lexer = lexer;
|
|
868
|
+
function Parser() {
|
|
869
|
+
this.yy = {};
|
|
870
|
+
}
|
|
871
|
+
(0,chunk_AGHRB4JF/* __name */.K2)(Parser, "Parser");
|
|
872
|
+
Parser.prototype = parser2;
|
|
873
|
+
parser2.Parser = Parser;
|
|
874
|
+
return new Parser();
|
|
875
|
+
})();
|
|
876
|
+
parser.parser = parser;
|
|
877
|
+
var mindmap_default = parser;
|
|
878
|
+
|
|
879
|
+
// src/diagrams/mindmap/mindmapDb.ts
|
|
880
|
+
|
|
881
|
+
var nodeType = {
|
|
882
|
+
DEFAULT: 0,
|
|
883
|
+
NO_BORDER: 0,
|
|
884
|
+
ROUNDED_RECT: 1,
|
|
885
|
+
RECT: 2,
|
|
886
|
+
CIRCLE: 3,
|
|
887
|
+
CLOUD: 4,
|
|
888
|
+
BANG: 5,
|
|
889
|
+
HEXAGON: 6
|
|
890
|
+
};
|
|
891
|
+
var MindmapDB = class {
|
|
892
|
+
constructor() {
|
|
893
|
+
this.nodes = [];
|
|
894
|
+
this.count = 0;
|
|
895
|
+
this.elements = {};
|
|
896
|
+
this.getLogger = this.getLogger.bind(this);
|
|
897
|
+
this.nodeType = nodeType;
|
|
898
|
+
this.clear();
|
|
899
|
+
this.getType = this.getType.bind(this);
|
|
900
|
+
this.getElementById = this.getElementById.bind(this);
|
|
901
|
+
this.getParent = this.getParent.bind(this);
|
|
902
|
+
this.getMindmap = this.getMindmap.bind(this);
|
|
903
|
+
this.addNode = this.addNode.bind(this);
|
|
904
|
+
this.decorateNode = this.decorateNode.bind(this);
|
|
905
|
+
}
|
|
906
|
+
static {
|
|
907
|
+
(0,chunk_AGHRB4JF/* __name */.K2)(this, "MindmapDB");
|
|
908
|
+
}
|
|
909
|
+
clear() {
|
|
910
|
+
this.nodes = [];
|
|
911
|
+
this.count = 0;
|
|
912
|
+
this.elements = {};
|
|
913
|
+
this.baseLevel = void 0;
|
|
914
|
+
}
|
|
915
|
+
getParent(level) {
|
|
916
|
+
for (let i = this.nodes.length - 1; i >= 0; i--) {
|
|
917
|
+
if (this.nodes[i].level < level) {
|
|
918
|
+
return this.nodes[i];
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
return null;
|
|
922
|
+
}
|
|
923
|
+
getMindmap() {
|
|
924
|
+
return this.nodes.length > 0 ? this.nodes[0] : null;
|
|
925
|
+
}
|
|
926
|
+
addNode(level, id, descr, type) {
|
|
927
|
+
chunk_AGHRB4JF/* log */.Rm.info("addNode", level, id, descr, type);
|
|
928
|
+
let isRoot = false;
|
|
929
|
+
if (this.nodes.length === 0) {
|
|
930
|
+
this.baseLevel = level;
|
|
931
|
+
level = 0;
|
|
932
|
+
isRoot = true;
|
|
933
|
+
} else if (this.baseLevel !== void 0) {
|
|
934
|
+
level = level - this.baseLevel;
|
|
935
|
+
isRoot = false;
|
|
936
|
+
}
|
|
937
|
+
const conf = (0,chunk_ABZYJK2D/* getConfig2 */.D7)();
|
|
938
|
+
let padding = conf.mindmap?.padding ?? chunk_ABZYJK2D/* defaultConfig_default */.UI.mindmap.padding;
|
|
939
|
+
switch (type) {
|
|
940
|
+
case this.nodeType.ROUNDED_RECT:
|
|
941
|
+
case this.nodeType.RECT:
|
|
942
|
+
case this.nodeType.HEXAGON:
|
|
943
|
+
padding *= 2;
|
|
944
|
+
break;
|
|
945
|
+
}
|
|
946
|
+
const node = {
|
|
947
|
+
id: this.count++,
|
|
948
|
+
nodeId: (0,chunk_ABZYJK2D/* sanitizeText */.jZ)(id, conf),
|
|
949
|
+
level,
|
|
950
|
+
descr: (0,chunk_ABZYJK2D/* sanitizeText */.jZ)(descr, conf),
|
|
951
|
+
type,
|
|
952
|
+
children: [],
|
|
953
|
+
width: conf.mindmap?.maxNodeWidth ?? chunk_ABZYJK2D/* defaultConfig_default */.UI.mindmap.maxNodeWidth,
|
|
954
|
+
padding,
|
|
955
|
+
isRoot
|
|
956
|
+
};
|
|
957
|
+
const parent = this.getParent(level);
|
|
958
|
+
if (parent) {
|
|
959
|
+
parent.children.push(node);
|
|
960
|
+
this.nodes.push(node);
|
|
961
|
+
} else {
|
|
962
|
+
if (isRoot) {
|
|
963
|
+
this.nodes.push(node);
|
|
964
|
+
} else {
|
|
965
|
+
throw new Error(
|
|
966
|
+
`There can be only one root. No parent could be found for ("${node.descr}")`
|
|
967
|
+
);
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
getType(startStr, endStr) {
|
|
972
|
+
chunk_AGHRB4JF/* log */.Rm.debug("In get type", startStr, endStr);
|
|
973
|
+
switch (startStr) {
|
|
974
|
+
case "[":
|
|
975
|
+
return this.nodeType.RECT;
|
|
976
|
+
case "(":
|
|
977
|
+
return endStr === ")" ? this.nodeType.ROUNDED_RECT : this.nodeType.CLOUD;
|
|
978
|
+
case "((":
|
|
979
|
+
return this.nodeType.CIRCLE;
|
|
980
|
+
case ")":
|
|
981
|
+
return this.nodeType.CLOUD;
|
|
982
|
+
case "))":
|
|
983
|
+
return this.nodeType.BANG;
|
|
984
|
+
case "{{":
|
|
985
|
+
return this.nodeType.HEXAGON;
|
|
986
|
+
default:
|
|
987
|
+
return this.nodeType.DEFAULT;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
setElementForId(id, element) {
|
|
991
|
+
this.elements[id] = element;
|
|
992
|
+
}
|
|
993
|
+
getElementById(id) {
|
|
994
|
+
return this.elements[id];
|
|
995
|
+
}
|
|
996
|
+
decorateNode(decoration) {
|
|
997
|
+
if (!decoration) {
|
|
998
|
+
return;
|
|
999
|
+
}
|
|
1000
|
+
const config = (0,chunk_ABZYJK2D/* getConfig2 */.D7)();
|
|
1001
|
+
const node = this.nodes[this.nodes.length - 1];
|
|
1002
|
+
if (decoration.icon) {
|
|
1003
|
+
node.icon = (0,chunk_ABZYJK2D/* sanitizeText */.jZ)(decoration.icon, config);
|
|
1004
|
+
}
|
|
1005
|
+
if (decoration.class) {
|
|
1006
|
+
node.class = (0,chunk_ABZYJK2D/* sanitizeText */.jZ)(decoration.class, config);
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
type2Str(type) {
|
|
1010
|
+
switch (type) {
|
|
1011
|
+
case this.nodeType.DEFAULT:
|
|
1012
|
+
return "no-border";
|
|
1013
|
+
case this.nodeType.RECT:
|
|
1014
|
+
return "rect";
|
|
1015
|
+
case this.nodeType.ROUNDED_RECT:
|
|
1016
|
+
return "rounded-rect";
|
|
1017
|
+
case this.nodeType.CIRCLE:
|
|
1018
|
+
return "circle";
|
|
1019
|
+
case this.nodeType.CLOUD:
|
|
1020
|
+
return "cloud";
|
|
1021
|
+
case this.nodeType.BANG:
|
|
1022
|
+
return "bang";
|
|
1023
|
+
case this.nodeType.HEXAGON:
|
|
1024
|
+
return "hexgon";
|
|
1025
|
+
// cspell: disable-line
|
|
1026
|
+
default:
|
|
1027
|
+
return "no-border";
|
|
1028
|
+
}
|
|
1029
|
+
}
|
|
1030
|
+
/**
|
|
1031
|
+
* Assign section numbers to nodes based on their position relative to root
|
|
1032
|
+
* @param node - The mindmap node to process
|
|
1033
|
+
* @param sectionNumber - The section number to assign (undefined for root)
|
|
1034
|
+
*/
|
|
1035
|
+
assignSections(node, sectionNumber) {
|
|
1036
|
+
if (node.level === 0) {
|
|
1037
|
+
node.section = void 0;
|
|
1038
|
+
} else {
|
|
1039
|
+
node.section = sectionNumber;
|
|
1040
|
+
}
|
|
1041
|
+
if (node.children) {
|
|
1042
|
+
for (const [index, child] of node.children.entries()) {
|
|
1043
|
+
const childSectionNumber = node.level === 0 ? index : sectionNumber;
|
|
1044
|
+
this.assignSections(child, childSectionNumber);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
/**
|
|
1049
|
+
* Convert mindmap tree structure to flat array of nodes
|
|
1050
|
+
* @param node - The mindmap node to process
|
|
1051
|
+
* @param processedNodes - Array to collect processed nodes
|
|
1052
|
+
*/
|
|
1053
|
+
flattenNodes(node, processedNodes) {
|
|
1054
|
+
const cssClasses = ["mindmap-node"];
|
|
1055
|
+
if (node.isRoot === true) {
|
|
1056
|
+
cssClasses.push("section-root", "section--1");
|
|
1057
|
+
} else if (node.section !== void 0) {
|
|
1058
|
+
cssClasses.push(`section-${node.section}`);
|
|
1059
|
+
}
|
|
1060
|
+
if (node.class) {
|
|
1061
|
+
cssClasses.push(node.class);
|
|
1062
|
+
}
|
|
1063
|
+
const classes = cssClasses.join(" ");
|
|
1064
|
+
const getShapeFromType = /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)((type) => {
|
|
1065
|
+
switch (type) {
|
|
1066
|
+
case nodeType.CIRCLE:
|
|
1067
|
+
return "mindmapCircle";
|
|
1068
|
+
case nodeType.RECT:
|
|
1069
|
+
return "rect";
|
|
1070
|
+
case nodeType.ROUNDED_RECT:
|
|
1071
|
+
return "rounded";
|
|
1072
|
+
case nodeType.CLOUD:
|
|
1073
|
+
return "cloud";
|
|
1074
|
+
case nodeType.BANG:
|
|
1075
|
+
return "bang";
|
|
1076
|
+
case nodeType.HEXAGON:
|
|
1077
|
+
return "hexagon";
|
|
1078
|
+
case nodeType.DEFAULT:
|
|
1079
|
+
return "defaultMindmapNode";
|
|
1080
|
+
case nodeType.NO_BORDER:
|
|
1081
|
+
default:
|
|
1082
|
+
return "rect";
|
|
1083
|
+
}
|
|
1084
|
+
}, "getShapeFromType");
|
|
1085
|
+
const processedNode = {
|
|
1086
|
+
id: node.id.toString(),
|
|
1087
|
+
domId: "node_" + node.id.toString(),
|
|
1088
|
+
label: node.descr,
|
|
1089
|
+
isGroup: false,
|
|
1090
|
+
shape: getShapeFromType(node.type),
|
|
1091
|
+
width: node.width,
|
|
1092
|
+
height: node.height ?? 0,
|
|
1093
|
+
padding: node.padding,
|
|
1094
|
+
cssClasses: classes,
|
|
1095
|
+
cssStyles: [],
|
|
1096
|
+
look: "default",
|
|
1097
|
+
icon: node.icon,
|
|
1098
|
+
x: node.x,
|
|
1099
|
+
y: node.y,
|
|
1100
|
+
// Mindmap-specific properties
|
|
1101
|
+
level: node.level,
|
|
1102
|
+
nodeId: node.nodeId,
|
|
1103
|
+
type: node.type,
|
|
1104
|
+
section: node.section
|
|
1105
|
+
};
|
|
1106
|
+
processedNodes.push(processedNode);
|
|
1107
|
+
if (node.children) {
|
|
1108
|
+
for (const child of node.children) {
|
|
1109
|
+
this.flattenNodes(child, processedNodes);
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
/**
|
|
1114
|
+
* Generate edges from parent-child relationships in mindmap tree
|
|
1115
|
+
* @param node - The mindmap node to process
|
|
1116
|
+
* @param edges - Array to collect edges
|
|
1117
|
+
*/
|
|
1118
|
+
generateEdges(node, edges) {
|
|
1119
|
+
if (!node.children) {
|
|
1120
|
+
return;
|
|
1121
|
+
}
|
|
1122
|
+
for (const child of node.children) {
|
|
1123
|
+
let edgeClasses = "edge";
|
|
1124
|
+
if (child.section !== void 0) {
|
|
1125
|
+
edgeClasses += ` section-edge-${child.section}`;
|
|
1126
|
+
}
|
|
1127
|
+
const edgeDepth = node.level + 1;
|
|
1128
|
+
edgeClasses += ` edge-depth-${edgeDepth}`;
|
|
1129
|
+
const edge = {
|
|
1130
|
+
id: `edge_${node.id}_${child.id}`,
|
|
1131
|
+
start: node.id.toString(),
|
|
1132
|
+
end: child.id.toString(),
|
|
1133
|
+
type: "normal",
|
|
1134
|
+
curve: "basis",
|
|
1135
|
+
thickness: "normal",
|
|
1136
|
+
look: "default",
|
|
1137
|
+
classes: edgeClasses,
|
|
1138
|
+
// Store mindmap-specific data
|
|
1139
|
+
depth: node.level,
|
|
1140
|
+
section: child.section
|
|
1141
|
+
};
|
|
1142
|
+
edges.push(edge);
|
|
1143
|
+
this.generateEdges(child, edges);
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* Get structured data for layout algorithms
|
|
1148
|
+
* Following the pattern established by ER diagrams
|
|
1149
|
+
* @returns Structured data containing nodes, edges, and config
|
|
1150
|
+
*/
|
|
1151
|
+
getData() {
|
|
1152
|
+
const mindmapRoot = this.getMindmap();
|
|
1153
|
+
const config = (0,chunk_ABZYJK2D/* getConfig2 */.D7)();
|
|
1154
|
+
const userDefinedConfig = (0,chunk_ABZYJK2D/* getUserDefinedConfig */.TM)();
|
|
1155
|
+
const hasUserDefinedLayout = userDefinedConfig.layout !== void 0;
|
|
1156
|
+
const finalConfig = config;
|
|
1157
|
+
if (!hasUserDefinedLayout) {
|
|
1158
|
+
finalConfig.layout = "cose-bilkent";
|
|
1159
|
+
}
|
|
1160
|
+
if (!mindmapRoot) {
|
|
1161
|
+
return {
|
|
1162
|
+
nodes: [],
|
|
1163
|
+
edges: [],
|
|
1164
|
+
config: finalConfig
|
|
1165
|
+
};
|
|
1166
|
+
}
|
|
1167
|
+
chunk_AGHRB4JF/* log */.Rm.debug("getData: mindmapRoot", mindmapRoot, config);
|
|
1168
|
+
this.assignSections(mindmapRoot);
|
|
1169
|
+
const processedNodes = [];
|
|
1170
|
+
const processedEdges = [];
|
|
1171
|
+
this.flattenNodes(mindmapRoot, processedNodes);
|
|
1172
|
+
this.generateEdges(mindmapRoot, processedEdges);
|
|
1173
|
+
chunk_AGHRB4JF/* log */.Rm.debug(
|
|
1174
|
+
`getData: processed ${processedNodes.length} nodes and ${processedEdges.length} edges`
|
|
1175
|
+
);
|
|
1176
|
+
const shapes = /* @__PURE__ */ new Map();
|
|
1177
|
+
for (const node of processedNodes) {
|
|
1178
|
+
shapes.set(node.id, {
|
|
1179
|
+
shape: node.shape,
|
|
1180
|
+
width: node.width,
|
|
1181
|
+
height: node.height,
|
|
1182
|
+
padding: node.padding
|
|
1183
|
+
});
|
|
1184
|
+
}
|
|
1185
|
+
return {
|
|
1186
|
+
nodes: processedNodes,
|
|
1187
|
+
edges: processedEdges,
|
|
1188
|
+
config: finalConfig,
|
|
1189
|
+
// Store the root node for mindmap-specific layout algorithms
|
|
1190
|
+
rootNode: mindmapRoot,
|
|
1191
|
+
// Properties required by dagre layout algorithm
|
|
1192
|
+
markers: ["point"],
|
|
1193
|
+
// Mindmaps don't use markers
|
|
1194
|
+
direction: "TB",
|
|
1195
|
+
// Top-to-bottom direction for mindmaps
|
|
1196
|
+
nodeSpacing: 50,
|
|
1197
|
+
// Default spacing between nodes
|
|
1198
|
+
rankSpacing: 50,
|
|
1199
|
+
// Default spacing between ranks
|
|
1200
|
+
// Add shapes for ELK compatibility
|
|
1201
|
+
shapes: Object.fromEntries(shapes),
|
|
1202
|
+
// Additional properties that layout algorithms might expect
|
|
1203
|
+
type: "mindmap",
|
|
1204
|
+
diagramId: "mindmap-" + esm_v4()
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
// Expose logger to grammar
|
|
1208
|
+
getLogger() {
|
|
1209
|
+
return chunk_AGHRB4JF/* log */.Rm;
|
|
1210
|
+
}
|
|
1211
|
+
};
|
|
1212
|
+
|
|
1213
|
+
// src/diagrams/mindmap/mindmapRenderer.ts
|
|
1214
|
+
var draw = /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)(async (text, id, _version, diagObj) => {
|
|
1215
|
+
chunk_AGHRB4JF/* log */.Rm.debug("Rendering mindmap diagram\n" + text);
|
|
1216
|
+
const db = diagObj.db;
|
|
1217
|
+
const data4Layout = db.getData();
|
|
1218
|
+
const svg = (0,chunk_55IACEB6/* getDiagramElement */.A)(id, data4Layout.config.securityLevel);
|
|
1219
|
+
data4Layout.type = diagObj.type;
|
|
1220
|
+
data4Layout.layoutAlgorithm = (0,chunk_N4CR4FBY/* getRegisteredLayoutAlgorithm */.q7)(data4Layout.config.layout, {
|
|
1221
|
+
fallback: "cose-bilkent"
|
|
1222
|
+
});
|
|
1223
|
+
data4Layout.diagramId = id;
|
|
1224
|
+
const mm = db.getMindmap();
|
|
1225
|
+
if (!mm) {
|
|
1226
|
+
return;
|
|
1227
|
+
}
|
|
1228
|
+
data4Layout.nodes.forEach((node) => {
|
|
1229
|
+
if (node.shape === "rounded") {
|
|
1230
|
+
node.radius = 15;
|
|
1231
|
+
node.taper = 15;
|
|
1232
|
+
node.stroke = "none";
|
|
1233
|
+
node.width = 0;
|
|
1234
|
+
node.padding = 15;
|
|
1235
|
+
} else if (node.shape === "circle") {
|
|
1236
|
+
node.padding = 10;
|
|
1237
|
+
} else if (node.shape === "rect") {
|
|
1238
|
+
node.width = 0;
|
|
1239
|
+
node.padding = 10;
|
|
1240
|
+
}
|
|
1241
|
+
});
|
|
1242
|
+
await (0,chunk_N4CR4FBY/* render */.XX)(data4Layout, svg);
|
|
1243
|
+
(0,chunk_QN33PNHL/* setupViewPortForSVG */.P)(
|
|
1244
|
+
svg,
|
|
1245
|
+
data4Layout.config.mindmap?.padding ?? chunk_ABZYJK2D/* defaultConfig_default */.UI.mindmap.padding,
|
|
1246
|
+
"mindmapDiagram",
|
|
1247
|
+
data4Layout.config.mindmap?.useMaxWidth ?? chunk_ABZYJK2D/* defaultConfig_default */.UI.mindmap.useMaxWidth
|
|
1248
|
+
);
|
|
1249
|
+
}, "draw");
|
|
1250
|
+
var mindmapRenderer_default = {
|
|
1251
|
+
draw
|
|
1252
|
+
};
|
|
1253
|
+
|
|
1254
|
+
// src/diagrams/mindmap/styles.ts
|
|
1255
|
+
|
|
1256
|
+
var genSections = /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)((options) => {
|
|
1257
|
+
let sections = "";
|
|
1258
|
+
for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
|
|
1259
|
+
options["lineColor" + i] = options["lineColor" + i] || options["cScaleInv" + i];
|
|
1260
|
+
if ((0,is_dark/* default */.A)(options["lineColor" + i])) {
|
|
1261
|
+
options["lineColor" + i] = (0,lighten/* default */.A)(options["lineColor" + i], 20);
|
|
1262
|
+
} else {
|
|
1263
|
+
options["lineColor" + i] = (0,darken/* default */.A)(options["lineColor" + i], 20);
|
|
1264
|
+
}
|
|
1265
|
+
}
|
|
1266
|
+
for (let i = 0; i < options.THEME_COLOR_LIMIT; i++) {
|
|
1267
|
+
const sw = "" + (17 - 3 * i);
|
|
1268
|
+
sections += `
|
|
1269
|
+
.section-${i - 1} rect, .section-${i - 1} path, .section-${i - 1} circle, .section-${i - 1} polygon, .section-${i - 1} path {
|
|
1270
|
+
fill: ${options["cScale" + i]};
|
|
1271
|
+
}
|
|
1272
|
+
.section-${i - 1} text {
|
|
1273
|
+
fill: ${options["cScaleLabel" + i]};
|
|
1274
|
+
}
|
|
1275
|
+
.node-icon-${i - 1} {
|
|
1276
|
+
font-size: 40px;
|
|
1277
|
+
color: ${options["cScaleLabel" + i]};
|
|
1278
|
+
}
|
|
1279
|
+
.section-edge-${i - 1}{
|
|
1280
|
+
stroke: ${options["cScale" + i]};
|
|
1281
|
+
}
|
|
1282
|
+
.edge-depth-${i - 1}{
|
|
1283
|
+
stroke-width: ${sw};
|
|
1284
|
+
}
|
|
1285
|
+
.section-${i - 1} line {
|
|
1286
|
+
stroke: ${options["cScaleInv" + i]} ;
|
|
1287
|
+
stroke-width: 3;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
.disabled, .disabled circle, .disabled text {
|
|
1291
|
+
fill: lightgray;
|
|
1292
|
+
}
|
|
1293
|
+
.disabled text {
|
|
1294
|
+
fill: #efefef;
|
|
1295
|
+
}
|
|
1296
|
+
`;
|
|
1297
|
+
}
|
|
1298
|
+
return sections;
|
|
1299
|
+
}, "genSections");
|
|
1300
|
+
var getStyles = /* @__PURE__ */ (0,chunk_AGHRB4JF/* __name */.K2)((options) => `
|
|
1301
|
+
.edge {
|
|
1302
|
+
stroke-width: 3;
|
|
1303
|
+
}
|
|
1304
|
+
${genSections(options)}
|
|
1305
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
1306
|
+
fill: ${options.git0};
|
|
1307
|
+
}
|
|
1308
|
+
.section-root text {
|
|
1309
|
+
fill: ${options.gitBranchLabel0};
|
|
1310
|
+
}
|
|
1311
|
+
.section-root span {
|
|
1312
|
+
color: ${options.gitBranchLabel0};
|
|
1313
|
+
}
|
|
1314
|
+
.section-2 span {
|
|
1315
|
+
color: ${options.gitBranchLabel0};
|
|
1316
|
+
}
|
|
1317
|
+
.icon-container {
|
|
1318
|
+
height:100%;
|
|
1319
|
+
display: flex;
|
|
1320
|
+
justify-content: center;
|
|
1321
|
+
align-items: center;
|
|
1322
|
+
}
|
|
1323
|
+
.edge {
|
|
1324
|
+
fill: none;
|
|
1325
|
+
}
|
|
1326
|
+
.mindmap-node-label {
|
|
1327
|
+
dy: 1em;
|
|
1328
|
+
alignment-baseline: middle;
|
|
1329
|
+
text-anchor: middle;
|
|
1330
|
+
dominant-baseline: middle;
|
|
1331
|
+
text-align: center;
|
|
1332
|
+
}
|
|
1333
|
+
`, "getStyles");
|
|
1334
|
+
var styles_default = getStyles;
|
|
1335
|
+
|
|
1336
|
+
// src/diagrams/mindmap/mindmap-definition.ts
|
|
1337
|
+
var diagram = {
|
|
1338
|
+
get db() {
|
|
1339
|
+
return new MindmapDB();
|
|
1340
|
+
},
|
|
1341
|
+
renderer: mindmapRenderer_default,
|
|
1342
|
+
parser: mindmap_default,
|
|
1343
|
+
styles: styles_default
|
|
1344
|
+
};
|
|
1345
|
+
|
|
1346
|
+
|
|
1347
|
+
|
|
1348
|
+
/***/ })
|
|
1349
|
+
|
|
1350
|
+
};
|
|
1351
|
+
;
|
|
1352
|
+
//# sourceMappingURL=357.node.js.map
|