@readme/markdown 9.2.2 → 9.3.1
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/TutorialTile.tsx +46 -0
- package/components/index.ts +1 -0
- package/dist/10.node.js +20064 -19229
- package/dist/10.node.js.map +1 -1
- package/dist/122.node.js +23 -0
- package/dist/122.node.js.map +1 -0
- package/dist/{17.node.js → 135.node.js} +109 -110
- package/dist/135.node.js.map +1 -0
- package/dist/136.node.js +23 -0
- package/dist/136.node.js.map +1 -0
- package/dist/{52.node.js → 188.node.js} +211 -196
- package/dist/188.node.js.map +1 -0
- package/dist/214.node.js +1280 -0
- package/dist/214.node.js.map +1 -0
- package/dist/23.node.js +2563 -0
- package/dist/23.node.js.map +1 -0
- package/dist/{867.node.js → 311.node.js} +95 -95
- package/dist/{867.node.js.map → 311.node.js.map} +1 -1
- package/dist/{940.node.js → 339.node.js} +3 -75
- package/dist/339.node.js.map +1 -0
- package/dist/354.node.js +23 -0
- package/dist/354.node.js.map +1 -0
- package/dist/359.node.js +2001 -0
- package/dist/359.node.js.map +1 -0
- package/dist/364.node.js +4435 -0
- package/dist/364.node.js.map +1 -0
- package/dist/{429.node.js → 371.node.js} +196 -139
- package/dist/371.node.js.map +1 -0
- package/dist/{687.node.js → 38.node.js} +761 -761
- package/dist/38.node.js.map +1 -0
- package/dist/391.node.js +522 -0
- package/dist/391.node.js.map +1 -0
- package/dist/462.node.js +23 -0
- package/dist/462.node.js.map +1 -0
- package/dist/48.node.js +57 -0
- package/dist/48.node.js.map +1 -0
- package/dist/486.node.js +16267 -14851
- package/dist/486.node.js.map +1 -1
- package/dist/537.node.js +59 -0
- package/dist/537.node.js.map +1 -0
- package/dist/550.node.js +201 -1408
- package/dist/550.node.js.map +1 -1
- package/dist/{403.node.js → 572.node.js} +118 -118
- package/dist/572.node.js.map +1 -0
- package/dist/580.node.js +1324 -0
- package/dist/580.node.js.map +1 -0
- package/dist/{952.node.js → 649.node.js} +39 -39
- package/dist/{952.node.js.map → 649.node.js.map} +1 -1
- package/dist/740.node.js +23 -0
- package/dist/740.node.js.map +1 -0
- package/dist/741.node.js +23 -0
- package/dist/741.node.js.map +1 -0
- package/dist/779.node.js +57 -0
- package/dist/779.node.js.map +1 -0
- package/dist/805.node.js +1355 -0
- package/dist/805.node.js.map +1 -0
- package/dist/{246.node.js → 855.node.js} +671 -495
- package/dist/855.node.js.map +1 -0
- package/dist/{11.node.js → 870.node.js} +70 -63
- package/dist/870.node.js.map +1 -0
- package/dist/874.node.js +57 -0
- package/dist/874.node.js.map +1 -0
- package/dist/881.node.js +1344 -720
- package/dist/881.node.js.map +1 -1
- package/dist/{906.node.js → 890.node.js} +147 -147
- package/dist/{906.node.js.map → 890.node.js.map} +1 -1
- package/dist/898.node.js +361 -0
- package/dist/898.node.js.map +1 -0
- package/dist/{551.node.js → 912.node.js} +133 -133
- package/dist/{551.node.js.map → 912.node.js.map} +1 -1
- package/dist/{745.node.js → 915.node.js} +86 -85
- package/dist/915.node.js.map +1 -0
- package/dist/982.node.js +1132 -0
- package/dist/982.node.js.map +1 -0
- package/dist/995.node.js +189 -159
- package/dist/995.node.js.map +1 -1
- package/dist/components/TutorialTile.d.ts +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/example/RenderError.d.ts +1 -1
- package/dist/lib/plain.d.ts +1 -1
- package/dist/main.js +1921 -332
- package/dist/main.node.js +1912 -333
- package/dist/main.node.js.map +1 -1
- package/package.json +1 -2
- package/dist/11.node.js.map +0 -1
- package/dist/120.node.js +0 -23
- package/dist/120.node.js.map +0 -1
- package/dist/134.node.js +0 -23
- package/dist/134.node.js.map +0 -1
- package/dist/150.node.js +0 -1892
- package/dist/150.node.js.map +0 -1
- package/dist/17.node.js.map +0 -1
- package/dist/246.node.js.map +0 -1
- package/dist/351.node.js +0 -2404
- package/dist/351.node.js.map +0 -1
- package/dist/366.node.js +0 -1185
- package/dist/366.node.js.map +0 -1
- package/dist/403.node.js.map +0 -1
- package/dist/429.node.js.map +0 -1
- package/dist/485.node.js +0 -518
- package/dist/485.node.js.map +0 -1
- package/dist/488.node.js +0 -59
- package/dist/488.node.js.map +0 -1
- package/dist/510.node.js +0 -250
- package/dist/510.node.js.map +0 -1
- package/dist/52.node.js.map +0 -1
- package/dist/617.node.js +0 -23
- package/dist/617.node.js.map +0 -1
- package/dist/687.node.js.map +0 -1
- package/dist/745.node.js.map +0 -1
- package/dist/775.node.js +0 -1904
- package/dist/775.node.js.map +0 -1
- package/dist/788.node.js +0 -1025
- package/dist/788.node.js.map +0 -1
- package/dist/81.node.js +0 -386
- package/dist/81.node.js.map +0 -1
- package/dist/849.node.js +0 -2590
- package/dist/849.node.js.map +0 -1
- package/dist/863.node.js +0 -23
- package/dist/863.node.js.map +0 -1
- package/dist/885.node.js +0 -52
- package/dist/885.node.js.map +0 -1
- package/dist/896.node.js +0 -1617
- package/dist/896.node.js.map +0 -1
- package/dist/91.node.js +0 -23
- package/dist/91.node.js.map +0 -1
- package/dist/940.node.js.map +0 -1
package/dist/550.node.js
CHANGED
|
@@ -3,1449 +3,242 @@ exports.id = 550;
|
|
|
3
3
|
exports.ids = [550];
|
|
4
4
|
exports.modules = {
|
|
5
5
|
|
|
6
|
-
/***/
|
|
6
|
+
/***/ 9163:
|
|
7
7
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
8
8
|
|
|
9
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ S: () => (/* binding */ populateCommonDb)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* harmony import */ var _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3804);
|
|
9
13
|
|
|
10
|
-
// EXPORTS
|
|
11
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
12
|
-
diagram: () => (/* binding */ diagram)
|
|
13
|
-
});
|
|
14
14
|
|
|
15
|
-
//
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/graphlib/index.js
|
|
20
|
-
var graphlib = __webpack_require__(4416);
|
|
21
|
-
// EXTERNAL MODULE: ./node_modules/d3/src/index.js + 193 modules
|
|
22
|
-
var src = __webpack_require__(8066);
|
|
23
|
-
// EXTERNAL MODULE: ./node_modules/dagre-d3-es/src/dagre/index.js + 62 modules
|
|
24
|
-
var dagre = __webpack_require__(995);
|
|
25
|
-
;// ./node_modules/mermaid/node_modules/uuid/dist/esm-node/stringify.js
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
29
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
const byteToHex = [];
|
|
33
|
-
|
|
34
|
-
for (let i = 0; i < 256; ++i) {
|
|
35
|
-
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function unsafeStringify(arr, offset = 0) {
|
|
39
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
40
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
41
|
-
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function stringify(arr, offset = 0) {
|
|
45
|
-
const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
46
|
-
// of the following:
|
|
47
|
-
// - One or more input array values don't map to a hex octet (leading to
|
|
48
|
-
// "undefined" in the uuid)
|
|
49
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
|
50
|
-
|
|
51
|
-
if (!validate(uuid)) {
|
|
52
|
-
throw TypeError('Stringified UUID is invalid');
|
|
15
|
+
// src/diagrams/common/populateCommonDb.ts
|
|
16
|
+
function populateCommonDb(ast, db) {
|
|
17
|
+
if (ast.accDescr) {
|
|
18
|
+
db.setAccDescription?.(ast.accDescr);
|
|
53
19
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* harmony default export */ const esm_node_stringify = ((/* unused pure expression or super */ null && (stringify)));
|
|
59
|
-
;// ./node_modules/mermaid/node_modules/uuid/dist/esm-node/regex.js
|
|
60
|
-
/* harmony default export */ const regex = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i);
|
|
61
|
-
;// ./node_modules/mermaid/node_modules/uuid/dist/esm-node/validate.js
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
function validate_validate(uuid) {
|
|
65
|
-
return typeof uuid === 'string' && regex.test(uuid);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* harmony default export */ const esm_node_validate = (validate_validate);
|
|
69
|
-
;// ./node_modules/mermaid/node_modules/uuid/dist/esm-node/parse.js
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
function parse(uuid) {
|
|
73
|
-
if (!esm_node_validate(uuid)) {
|
|
74
|
-
throw TypeError('Invalid UUID');
|
|
20
|
+
if (ast.accTitle) {
|
|
21
|
+
db.setAccTitle?.(ast.accTitle);
|
|
75
22
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
const arr = new Uint8Array(16); // Parse ########-....-....-....-............
|
|
79
|
-
|
|
80
|
-
arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
|
|
81
|
-
arr[1] = v >>> 16 & 0xff;
|
|
82
|
-
arr[2] = v >>> 8 & 0xff;
|
|
83
|
-
arr[3] = v & 0xff; // Parse ........-####-....-....-............
|
|
84
|
-
|
|
85
|
-
arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
|
|
86
|
-
arr[5] = v & 0xff; // Parse ........-....-####-....-............
|
|
87
|
-
|
|
88
|
-
arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
|
|
89
|
-
arr[7] = v & 0xff; // Parse ........-....-....-####-............
|
|
90
|
-
|
|
91
|
-
arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
|
|
92
|
-
arr[9] = v & 0xff; // Parse ........-....-....-....-############
|
|
93
|
-
// (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
|
|
94
|
-
|
|
95
|
-
arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
|
|
96
|
-
arr[11] = v / 0x100000000 & 0xff;
|
|
97
|
-
arr[12] = v >>> 24 & 0xff;
|
|
98
|
-
arr[13] = v >>> 16 & 0xff;
|
|
99
|
-
arr[14] = v >>> 8 & 0xff;
|
|
100
|
-
arr[15] = v & 0xff;
|
|
101
|
-
return arr;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/* harmony default export */ const esm_node_parse = (parse);
|
|
105
|
-
;// ./node_modules/mermaid/node_modules/uuid/dist/esm-node/v35.js
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
function stringToBytes(str) {
|
|
110
|
-
str = unescape(encodeURIComponent(str)); // UTF8 escape
|
|
111
|
-
|
|
112
|
-
const bytes = [];
|
|
113
|
-
|
|
114
|
-
for (let i = 0; i < str.length; ++i) {
|
|
115
|
-
bytes.push(str.charCodeAt(i));
|
|
23
|
+
if (ast.title) {
|
|
24
|
+
db.setDiagramTitle?.(ast.title);
|
|
116
25
|
}
|
|
117
|
-
|
|
118
|
-
return bytes;
|
|
119
26
|
}
|
|
27
|
+
(0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(populateCommonDb, "populateCommonDb");
|
|
120
28
|
|
|
121
|
-
const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
|
122
|
-
const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
|
|
123
|
-
function v35(name, version, hashfunc) {
|
|
124
|
-
function generateUUID(value, namespace, buf, offset) {
|
|
125
|
-
var _namespace;
|
|
126
|
-
|
|
127
|
-
if (typeof value === 'string') {
|
|
128
|
-
value = stringToBytes(value);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (typeof namespace === 'string') {
|
|
132
|
-
namespace = esm_node_parse(namespace);
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {
|
|
136
|
-
throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
|
|
137
|
-
} // Compute hash of namespace and value, Per 4.3
|
|
138
|
-
// Future: Use spread syntax when supported on all platforms, e.g. `bytes =
|
|
139
|
-
// hashfunc([...namespace, ... value])`
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
let bytes = new Uint8Array(16 + value.length);
|
|
143
|
-
bytes.set(namespace);
|
|
144
|
-
bytes.set(value, namespace.length);
|
|
145
|
-
bytes = hashfunc(bytes);
|
|
146
|
-
bytes[6] = bytes[6] & 0x0f | version;
|
|
147
|
-
bytes[8] = bytes[8] & 0x3f | 0x80;
|
|
148
|
-
|
|
149
|
-
if (buf) {
|
|
150
|
-
offset = offset || 0;
|
|
151
|
-
|
|
152
|
-
for (let i = 0; i < 16; ++i) {
|
|
153
|
-
buf[offset + i] = bytes[i];
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return buf;
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
return unsafeStringify(bytes);
|
|
160
|
-
} // Function#name is not settable on some platforms (#270)
|
|
161
29
|
|
|
162
30
|
|
|
163
|
-
try {
|
|
164
|
-
generateUUID.name = name; // eslint-disable-next-line no-empty
|
|
165
|
-
} catch (err) {} // For CommonJS default export support
|
|
166
31
|
|
|
32
|
+
/***/ }),
|
|
167
33
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return generateUUID;
|
|
171
|
-
}
|
|
172
|
-
// EXTERNAL MODULE: external "crypto"
|
|
173
|
-
var external_crypto_ = __webpack_require__(6982);
|
|
174
|
-
var external_crypto_default = /*#__PURE__*/__webpack_require__.n(external_crypto_);
|
|
175
|
-
;// ./node_modules/mermaid/node_modules/uuid/dist/esm-node/sha1.js
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
function sha1(bytes) {
|
|
179
|
-
if (Array.isArray(bytes)) {
|
|
180
|
-
bytes = Buffer.from(bytes);
|
|
181
|
-
} else if (typeof bytes === 'string') {
|
|
182
|
-
bytes = Buffer.from(bytes, 'utf8');
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return external_crypto_default().createHash('sha1').update(bytes).digest();
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/* harmony default export */ const esm_node_sha1 = (sha1);
|
|
189
|
-
;// ./node_modules/mermaid/node_modules/uuid/dist/esm-node/v5.js
|
|
34
|
+
/***/ 2550:
|
|
35
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
190
36
|
|
|
37
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
38
|
+
/* harmony export */ diagram: () => (/* binding */ diagram)
|
|
39
|
+
/* harmony export */ });
|
|
40
|
+
/* harmony import */ var _chunk_4BMEZGHF_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9163);
|
|
41
|
+
/* harmony import */ var _chunk_O4NI6UNU_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8430);
|
|
42
|
+
/* harmony import */ var _chunk_7B677QYD_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3113);
|
|
43
|
+
/* harmony import */ var _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3804);
|
|
44
|
+
/* harmony import */ var _mermaid_js_parser__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4010);
|
|
191
45
|
|
|
192
|
-
const v5 = v35('v5', 0x50, esm_node_sha1);
|
|
193
|
-
/* harmony default export */ const esm_node_v5 = (v5);
|
|
194
|
-
;// ./node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-DKC2X5TE.mjs
|
|
195
46
|
|
|
196
47
|
|
|
197
48
|
|
|
198
|
-
// src/diagrams/er/parser/erDiagram.jison
|
|
199
|
-
var parser = function() {
|
|
200
|
-
var o = /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function(k, v, o2, l) {
|
|
201
|
-
for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
|
|
202
|
-
return o2;
|
|
203
|
-
}, "o"), $V0 = [6, 8, 10, 20, 22, 24, 26, 27, 28], $V1 = [1, 10], $V2 = [1, 11], $V3 = [1, 12], $V4 = [1, 13], $V5 = [1, 14], $V6 = [1, 15], $V7 = [1, 21], $V8 = [1, 22], $V9 = [1, 23], $Va = [1, 24], $Vb = [1, 25], $Vc = [6, 8, 10, 13, 15, 18, 19, 20, 22, 24, 26, 27, 28, 41, 42, 43, 44, 45], $Vd = [1, 34], $Ve = [27, 28, 46, 47], $Vf = [41, 42, 43, 44, 45], $Vg = [17, 34], $Vh = [1, 54], $Vi = [1, 53], $Vj = [17, 34, 36, 38];
|
|
204
|
-
var parser2 = {
|
|
205
|
-
trace: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function trace() {
|
|
206
|
-
}, "trace"),
|
|
207
|
-
yy: {},
|
|
208
|
-
symbols_: { "error": 2, "start": 3, "ER_DIAGRAM": 4, "document": 5, "EOF": 6, "line": 7, "SPACE": 8, "statement": 9, "NEWLINE": 10, "entityName": 11, "relSpec": 12, ":": 13, "role": 14, "BLOCK_START": 15, "attributes": 16, "BLOCK_STOP": 17, "SQS": 18, "SQE": 19, "title": 20, "title_value": 21, "acc_title": 22, "acc_title_value": 23, "acc_descr": 24, "acc_descr_value": 25, "acc_descr_multiline_value": 26, "ALPHANUM": 27, "ENTITY_NAME": 28, "attribute": 29, "attributeType": 30, "attributeName": 31, "attributeKeyTypeList": 32, "attributeComment": 33, "ATTRIBUTE_WORD": 34, "attributeKeyType": 35, "COMMA": 36, "ATTRIBUTE_KEY": 37, "COMMENT": 38, "cardinality": 39, "relType": 40, "ZERO_OR_ONE": 41, "ZERO_OR_MORE": 42, "ONE_OR_MORE": 43, "ONLY_ONE": 44, "MD_PARENT": 45, "NON_IDENTIFYING": 46, "IDENTIFYING": 47, "WORD": 48, "$accept": 0, "$end": 1 },
|
|
209
|
-
terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 13: ":", 15: "BLOCK_START", 17: "BLOCK_STOP", 18: "SQS", 19: "SQE", 20: "title", 21: "title_value", 22: "acc_title", 23: "acc_title_value", 24: "acc_descr", 25: "acc_descr_value", 26: "acc_descr_multiline_value", 27: "ALPHANUM", 28: "ENTITY_NAME", 34: "ATTRIBUTE_WORD", 36: "COMMA", 37: "ATTRIBUTE_KEY", 38: "COMMENT", 41: "ZERO_OR_ONE", 42: "ZERO_OR_MORE", 43: "ONE_OR_MORE", 44: "ONLY_ONE", 45: "MD_PARENT", 46: "NON_IDENTIFYING", 47: "IDENTIFYING", 48: "WORD" },
|
|
210
|
-
productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 5], [9, 4], [9, 3], [9, 1], [9, 7], [9, 6], [9, 4], [9, 2], [9, 2], [9, 2], [9, 1], [11, 1], [11, 1], [16, 1], [16, 2], [29, 2], [29, 3], [29, 3], [29, 4], [30, 1], [31, 1], [32, 1], [32, 3], [35, 1], [33, 1], [12, 3], [39, 1], [39, 1], [39, 1], [39, 1], [39, 1], [40, 1], [40, 1], [14, 1], [14, 1], [14, 1]],
|
|
211
|
-
performAction: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
|
|
212
|
-
var $0 = $$.length - 1;
|
|
213
|
-
switch (yystate) {
|
|
214
|
-
case 1:
|
|
215
|
-
break;
|
|
216
|
-
case 2:
|
|
217
|
-
this.$ = [];
|
|
218
|
-
break;
|
|
219
|
-
case 3:
|
|
220
|
-
$$[$0 - 1].push($$[$0]);
|
|
221
|
-
this.$ = $$[$0 - 1];
|
|
222
|
-
break;
|
|
223
|
-
case 4:
|
|
224
|
-
case 5:
|
|
225
|
-
this.$ = $$[$0];
|
|
226
|
-
break;
|
|
227
|
-
case 6:
|
|
228
|
-
case 7:
|
|
229
|
-
this.$ = [];
|
|
230
|
-
break;
|
|
231
|
-
case 8:
|
|
232
|
-
yy.addEntity($$[$0 - 4]);
|
|
233
|
-
yy.addEntity($$[$0 - 2]);
|
|
234
|
-
yy.addRelationship($$[$0 - 4], $$[$0], $$[$0 - 2], $$[$0 - 3]);
|
|
235
|
-
break;
|
|
236
|
-
case 9:
|
|
237
|
-
yy.addEntity($$[$0 - 3]);
|
|
238
|
-
yy.addAttributes($$[$0 - 3], $$[$0 - 1]);
|
|
239
|
-
break;
|
|
240
|
-
case 10:
|
|
241
|
-
yy.addEntity($$[$0 - 2]);
|
|
242
|
-
break;
|
|
243
|
-
case 11:
|
|
244
|
-
yy.addEntity($$[$0]);
|
|
245
|
-
break;
|
|
246
|
-
case 12:
|
|
247
|
-
yy.addEntity($$[$0 - 6], $$[$0 - 4]);
|
|
248
|
-
yy.addAttributes($$[$0 - 6], $$[$0 - 1]);
|
|
249
|
-
break;
|
|
250
|
-
case 13:
|
|
251
|
-
yy.addEntity($$[$0 - 5], $$[$0 - 3]);
|
|
252
|
-
break;
|
|
253
|
-
case 14:
|
|
254
|
-
yy.addEntity($$[$0 - 3], $$[$0 - 1]);
|
|
255
|
-
break;
|
|
256
|
-
case 15:
|
|
257
|
-
case 16:
|
|
258
|
-
this.$ = $$[$0].trim();
|
|
259
|
-
yy.setAccTitle(this.$);
|
|
260
|
-
break;
|
|
261
|
-
case 17:
|
|
262
|
-
case 18:
|
|
263
|
-
this.$ = $$[$0].trim();
|
|
264
|
-
yy.setAccDescription(this.$);
|
|
265
|
-
break;
|
|
266
|
-
case 19:
|
|
267
|
-
case 43:
|
|
268
|
-
this.$ = $$[$0];
|
|
269
|
-
break;
|
|
270
|
-
case 20:
|
|
271
|
-
case 41:
|
|
272
|
-
case 42:
|
|
273
|
-
this.$ = $$[$0].replace(/"/g, "");
|
|
274
|
-
break;
|
|
275
|
-
case 21:
|
|
276
|
-
case 29:
|
|
277
|
-
this.$ = [$$[$0]];
|
|
278
|
-
break;
|
|
279
|
-
case 22:
|
|
280
|
-
$$[$0].push($$[$0 - 1]);
|
|
281
|
-
this.$ = $$[$0];
|
|
282
|
-
break;
|
|
283
|
-
case 23:
|
|
284
|
-
this.$ = { attributeType: $$[$0 - 1], attributeName: $$[$0] };
|
|
285
|
-
break;
|
|
286
|
-
case 24:
|
|
287
|
-
this.$ = { attributeType: $$[$0 - 2], attributeName: $$[$0 - 1], attributeKeyTypeList: $$[$0] };
|
|
288
|
-
break;
|
|
289
|
-
case 25:
|
|
290
|
-
this.$ = { attributeType: $$[$0 - 2], attributeName: $$[$0 - 1], attributeComment: $$[$0] };
|
|
291
|
-
break;
|
|
292
|
-
case 26:
|
|
293
|
-
this.$ = { attributeType: $$[$0 - 3], attributeName: $$[$0 - 2], attributeKeyTypeList: $$[$0 - 1], attributeComment: $$[$0] };
|
|
294
|
-
break;
|
|
295
|
-
case 27:
|
|
296
|
-
case 28:
|
|
297
|
-
case 31:
|
|
298
|
-
this.$ = $$[$0];
|
|
299
|
-
break;
|
|
300
|
-
case 30:
|
|
301
|
-
$$[$0 - 2].push($$[$0]);
|
|
302
|
-
this.$ = $$[$0 - 2];
|
|
303
|
-
break;
|
|
304
|
-
case 32:
|
|
305
|
-
this.$ = $$[$0].replace(/"/g, "");
|
|
306
|
-
break;
|
|
307
|
-
case 33:
|
|
308
|
-
this.$ = { cardA: $$[$0], relType: $$[$0 - 1], cardB: $$[$0 - 2] };
|
|
309
|
-
break;
|
|
310
|
-
case 34:
|
|
311
|
-
this.$ = yy.Cardinality.ZERO_OR_ONE;
|
|
312
|
-
break;
|
|
313
|
-
case 35:
|
|
314
|
-
this.$ = yy.Cardinality.ZERO_OR_MORE;
|
|
315
|
-
break;
|
|
316
|
-
case 36:
|
|
317
|
-
this.$ = yy.Cardinality.ONE_OR_MORE;
|
|
318
|
-
break;
|
|
319
|
-
case 37:
|
|
320
|
-
this.$ = yy.Cardinality.ONLY_ONE;
|
|
321
|
-
break;
|
|
322
|
-
case 38:
|
|
323
|
-
this.$ = yy.Cardinality.MD_PARENT;
|
|
324
|
-
break;
|
|
325
|
-
case 39:
|
|
326
|
-
this.$ = yy.Identification.NON_IDENTIFYING;
|
|
327
|
-
break;
|
|
328
|
-
case 40:
|
|
329
|
-
this.$ = yy.Identification.IDENTIFYING;
|
|
330
|
-
break;
|
|
331
|
-
}
|
|
332
|
-
}, "anonymous"),
|
|
333
|
-
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 20: $V1, 22: $V2, 24: $V3, 26: $V4, 27: $V5, 28: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 16, 11: 9, 20: $V1, 22: $V2, 24: $V3, 26: $V4, 27: $V5, 28: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 11], { 12: 17, 39: 20, 15: [1, 18], 18: [1, 19], 41: $V7, 42: $V8, 43: $V9, 44: $Va, 45: $Vb }), { 21: [1, 26] }, { 23: [1, 27] }, { 25: [1, 28] }, o($V0, [2, 18]), o($Vc, [2, 19]), o($Vc, [2, 20]), o($V0, [2, 4]), { 11: 29, 27: $V5, 28: $V6 }, { 16: 30, 17: [1, 31], 29: 32, 30: 33, 34: $Vd }, { 11: 35, 27: $V5, 28: $V6 }, { 40: 36, 46: [1, 37], 47: [1, 38] }, o($Ve, [2, 34]), o($Ve, [2, 35]), o($Ve, [2, 36]), o($Ve, [2, 37]), o($Ve, [2, 38]), o($V0, [2, 15]), o($V0, [2, 16]), o($V0, [2, 17]), { 13: [1, 39] }, { 17: [1, 40] }, o($V0, [2, 10]), { 16: 41, 17: [2, 21], 29: 32, 30: 33, 34: $Vd }, { 31: 42, 34: [1, 43] }, { 34: [2, 27] }, { 19: [1, 44] }, { 39: 45, 41: $V7, 42: $V8, 43: $V9, 44: $Va, 45: $Vb }, o($Vf, [2, 39]), o($Vf, [2, 40]), { 14: 46, 27: [1, 49], 28: [1, 48], 48: [1, 47] }, o($V0, [2, 9]), { 17: [2, 22] }, o($Vg, [2, 23], { 32: 50, 33: 51, 35: 52, 37: $Vh, 38: $Vi }), o([17, 34, 37, 38], [2, 28]), o($V0, [2, 14], { 15: [1, 55] }), o([27, 28], [2, 33]), o($V0, [2, 8]), o($V0, [2, 41]), o($V0, [2, 42]), o($V0, [2, 43]), o($Vg, [2, 24], { 33: 56, 36: [1, 57], 38: $Vi }), o($Vg, [2, 25]), o($Vj, [2, 29]), o($Vg, [2, 32]), o($Vj, [2, 31]), { 16: 58, 17: [1, 59], 29: 32, 30: 33, 34: $Vd }, o($Vg, [2, 26]), { 35: 60, 37: $Vh }, { 17: [1, 61] }, o($V0, [2, 13]), o($Vj, [2, 30]), o($V0, [2, 12])],
|
|
334
|
-
defaultActions: { 34: [2, 27], 41: [2, 22] },
|
|
335
|
-
parseError: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function parseError(str, hash) {
|
|
336
|
-
if (hash.recoverable) {
|
|
337
|
-
this.trace(str);
|
|
338
|
-
} else {
|
|
339
|
-
var error = new Error(str);
|
|
340
|
-
error.hash = hash;
|
|
341
|
-
throw error;
|
|
342
|
-
}
|
|
343
|
-
}, "parseError"),
|
|
344
|
-
parse: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function parse(input) {
|
|
345
|
-
var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
|
|
346
|
-
var args = lstack.slice.call(arguments, 1);
|
|
347
|
-
var lexer2 = Object.create(this.lexer);
|
|
348
|
-
var sharedState = { yy: {} };
|
|
349
|
-
for (var k in this.yy) {
|
|
350
|
-
if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
|
|
351
|
-
sharedState.yy[k] = this.yy[k];
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
lexer2.setInput(input, sharedState.yy);
|
|
355
|
-
sharedState.yy.lexer = lexer2;
|
|
356
|
-
sharedState.yy.parser = this;
|
|
357
|
-
if (typeof lexer2.yylloc == "undefined") {
|
|
358
|
-
lexer2.yylloc = {};
|
|
359
|
-
}
|
|
360
|
-
var yyloc = lexer2.yylloc;
|
|
361
|
-
lstack.push(yyloc);
|
|
362
|
-
var ranges = lexer2.options && lexer2.options.ranges;
|
|
363
|
-
if (typeof sharedState.yy.parseError === "function") {
|
|
364
|
-
this.parseError = sharedState.yy.parseError;
|
|
365
|
-
} else {
|
|
366
|
-
this.parseError = Object.getPrototypeOf(this).parseError;
|
|
367
|
-
}
|
|
368
|
-
function popStack(n) {
|
|
369
|
-
stack.length = stack.length - 2 * n;
|
|
370
|
-
vstack.length = vstack.length - n;
|
|
371
|
-
lstack.length = lstack.length - n;
|
|
372
|
-
}
|
|
373
|
-
(0,chunk_S24QXQKS/* __name */.K2)(popStack, "popStack");
|
|
374
|
-
function lex() {
|
|
375
|
-
var token;
|
|
376
|
-
token = tstack.pop() || lexer2.lex() || EOF;
|
|
377
|
-
if (typeof token !== "number") {
|
|
378
|
-
if (token instanceof Array) {
|
|
379
|
-
tstack = token;
|
|
380
|
-
token = tstack.pop();
|
|
381
|
-
}
|
|
382
|
-
token = self.symbols_[token] || token;
|
|
383
|
-
}
|
|
384
|
-
return token;
|
|
385
|
-
}
|
|
386
|
-
(0,chunk_S24QXQKS/* __name */.K2)(lex, "lex");
|
|
387
|
-
var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
|
|
388
|
-
while (true) {
|
|
389
|
-
state = stack[stack.length - 1];
|
|
390
|
-
if (this.defaultActions[state]) {
|
|
391
|
-
action = this.defaultActions[state];
|
|
392
|
-
} else {
|
|
393
|
-
if (symbol === null || typeof symbol == "undefined") {
|
|
394
|
-
symbol = lex();
|
|
395
|
-
}
|
|
396
|
-
action = table[state] && table[state][symbol];
|
|
397
|
-
}
|
|
398
|
-
if (typeof action === "undefined" || !action.length || !action[0]) {
|
|
399
|
-
var errStr = "";
|
|
400
|
-
expected = [];
|
|
401
|
-
for (p in table[state]) {
|
|
402
|
-
if (this.terminals_[p] && p > TERROR) {
|
|
403
|
-
expected.push("'" + this.terminals_[p] + "'");
|
|
404
|
-
}
|
|
405
|
-
}
|
|
406
|
-
if (lexer2.showPosition) {
|
|
407
|
-
errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
|
|
408
|
-
} else {
|
|
409
|
-
errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
|
|
410
|
-
}
|
|
411
|
-
this.parseError(errStr, {
|
|
412
|
-
text: lexer2.match,
|
|
413
|
-
token: this.terminals_[symbol] || symbol,
|
|
414
|
-
line: lexer2.yylineno,
|
|
415
|
-
loc: yyloc,
|
|
416
|
-
expected
|
|
417
|
-
});
|
|
418
|
-
}
|
|
419
|
-
if (action[0] instanceof Array && action.length > 1) {
|
|
420
|
-
throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
|
|
421
|
-
}
|
|
422
|
-
switch (action[0]) {
|
|
423
|
-
case 1:
|
|
424
|
-
stack.push(symbol);
|
|
425
|
-
vstack.push(lexer2.yytext);
|
|
426
|
-
lstack.push(lexer2.yylloc);
|
|
427
|
-
stack.push(action[1]);
|
|
428
|
-
symbol = null;
|
|
429
|
-
if (!preErrorSymbol) {
|
|
430
|
-
yyleng = lexer2.yyleng;
|
|
431
|
-
yytext = lexer2.yytext;
|
|
432
|
-
yylineno = lexer2.yylineno;
|
|
433
|
-
yyloc = lexer2.yylloc;
|
|
434
|
-
if (recovering > 0) {
|
|
435
|
-
recovering--;
|
|
436
|
-
}
|
|
437
|
-
} else {
|
|
438
|
-
symbol = preErrorSymbol;
|
|
439
|
-
preErrorSymbol = null;
|
|
440
|
-
}
|
|
441
|
-
break;
|
|
442
|
-
case 2:
|
|
443
|
-
len = this.productions_[action[1]][1];
|
|
444
|
-
yyval.$ = vstack[vstack.length - len];
|
|
445
|
-
yyval._$ = {
|
|
446
|
-
first_line: lstack[lstack.length - (len || 1)].first_line,
|
|
447
|
-
last_line: lstack[lstack.length - 1].last_line,
|
|
448
|
-
first_column: lstack[lstack.length - (len || 1)].first_column,
|
|
449
|
-
last_column: lstack[lstack.length - 1].last_column
|
|
450
|
-
};
|
|
451
|
-
if (ranges) {
|
|
452
|
-
yyval._$.range = [
|
|
453
|
-
lstack[lstack.length - (len || 1)].range[0],
|
|
454
|
-
lstack[lstack.length - 1].range[1]
|
|
455
|
-
];
|
|
456
|
-
}
|
|
457
|
-
r = this.performAction.apply(yyval, [
|
|
458
|
-
yytext,
|
|
459
|
-
yyleng,
|
|
460
|
-
yylineno,
|
|
461
|
-
sharedState.yy,
|
|
462
|
-
action[1],
|
|
463
|
-
vstack,
|
|
464
|
-
lstack
|
|
465
|
-
].concat(args));
|
|
466
|
-
if (typeof r !== "undefined") {
|
|
467
|
-
return r;
|
|
468
|
-
}
|
|
469
|
-
if (len) {
|
|
470
|
-
stack = stack.slice(0, -1 * len * 2);
|
|
471
|
-
vstack = vstack.slice(0, -1 * len);
|
|
472
|
-
lstack = lstack.slice(0, -1 * len);
|
|
473
|
-
}
|
|
474
|
-
stack.push(this.productions_[action[1]][0]);
|
|
475
|
-
vstack.push(yyval.$);
|
|
476
|
-
lstack.push(yyval._$);
|
|
477
|
-
newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
|
|
478
|
-
stack.push(newState);
|
|
479
|
-
break;
|
|
480
|
-
case 3:
|
|
481
|
-
return true;
|
|
482
|
-
}
|
|
483
|
-
}
|
|
484
|
-
return true;
|
|
485
|
-
}, "parse")
|
|
486
|
-
};
|
|
487
|
-
var lexer = /* @__PURE__ */ function() {
|
|
488
|
-
var lexer2 = {
|
|
489
|
-
EOF: 1,
|
|
490
|
-
parseError: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function parseError(str, hash) {
|
|
491
|
-
if (this.yy.parser) {
|
|
492
|
-
this.yy.parser.parseError(str, hash);
|
|
493
|
-
} else {
|
|
494
|
-
throw new Error(str);
|
|
495
|
-
}
|
|
496
|
-
}, "parseError"),
|
|
497
|
-
// resets the lexer, sets new input
|
|
498
|
-
setInput: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function(input, yy) {
|
|
499
|
-
this.yy = yy || this.yy || {};
|
|
500
|
-
this._input = input;
|
|
501
|
-
this._more = this._backtrack = this.done = false;
|
|
502
|
-
this.yylineno = this.yyleng = 0;
|
|
503
|
-
this.yytext = this.matched = this.match = "";
|
|
504
|
-
this.conditionStack = ["INITIAL"];
|
|
505
|
-
this.yylloc = {
|
|
506
|
-
first_line: 1,
|
|
507
|
-
first_column: 0,
|
|
508
|
-
last_line: 1,
|
|
509
|
-
last_column: 0
|
|
510
|
-
};
|
|
511
|
-
if (this.options.ranges) {
|
|
512
|
-
this.yylloc.range = [0, 0];
|
|
513
|
-
}
|
|
514
|
-
this.offset = 0;
|
|
515
|
-
return this;
|
|
516
|
-
}, "setInput"),
|
|
517
|
-
// consumes and returns one char from the input
|
|
518
|
-
input: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function() {
|
|
519
|
-
var ch = this._input[0];
|
|
520
|
-
this.yytext += ch;
|
|
521
|
-
this.yyleng++;
|
|
522
|
-
this.offset++;
|
|
523
|
-
this.match += ch;
|
|
524
|
-
this.matched += ch;
|
|
525
|
-
var lines = ch.match(/(?:\r\n?|\n).*/g);
|
|
526
|
-
if (lines) {
|
|
527
|
-
this.yylineno++;
|
|
528
|
-
this.yylloc.last_line++;
|
|
529
|
-
} else {
|
|
530
|
-
this.yylloc.last_column++;
|
|
531
|
-
}
|
|
532
|
-
if (this.options.ranges) {
|
|
533
|
-
this.yylloc.range[1]++;
|
|
534
|
-
}
|
|
535
|
-
this._input = this._input.slice(1);
|
|
536
|
-
return ch;
|
|
537
|
-
}, "input"),
|
|
538
|
-
// unshifts one char (or a string) into the input
|
|
539
|
-
unput: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function(ch) {
|
|
540
|
-
var len = ch.length;
|
|
541
|
-
var lines = ch.split(/(?:\r\n?|\n)/g);
|
|
542
|
-
this._input = ch + this._input;
|
|
543
|
-
this.yytext = this.yytext.substr(0, this.yytext.length - len);
|
|
544
|
-
this.offset -= len;
|
|
545
|
-
var oldLines = this.match.split(/(?:\r\n?|\n)/g);
|
|
546
|
-
this.match = this.match.substr(0, this.match.length - 1);
|
|
547
|
-
this.matched = this.matched.substr(0, this.matched.length - 1);
|
|
548
|
-
if (lines.length - 1) {
|
|
549
|
-
this.yylineno -= lines.length - 1;
|
|
550
|
-
}
|
|
551
|
-
var r = this.yylloc.range;
|
|
552
|
-
this.yylloc = {
|
|
553
|
-
first_line: this.yylloc.first_line,
|
|
554
|
-
last_line: this.yylineno + 1,
|
|
555
|
-
first_column: this.yylloc.first_column,
|
|
556
|
-
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
|
|
557
|
-
};
|
|
558
|
-
if (this.options.ranges) {
|
|
559
|
-
this.yylloc.range = [r[0], r[0] + this.yyleng - len];
|
|
560
|
-
}
|
|
561
|
-
this.yyleng = this.yytext.length;
|
|
562
|
-
return this;
|
|
563
|
-
}, "unput"),
|
|
564
|
-
// When called from action, caches matched text and appends it on next action
|
|
565
|
-
more: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function() {
|
|
566
|
-
this._more = true;
|
|
567
|
-
return this;
|
|
568
|
-
}, "more"),
|
|
569
|
-
// 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.
|
|
570
|
-
reject: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function() {
|
|
571
|
-
if (this.options.backtrack_lexer) {
|
|
572
|
-
this._backtrack = true;
|
|
573
|
-
} else {
|
|
574
|
-
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(), {
|
|
575
|
-
text: "",
|
|
576
|
-
token: null,
|
|
577
|
-
line: this.yylineno
|
|
578
|
-
});
|
|
579
|
-
}
|
|
580
|
-
return this;
|
|
581
|
-
}, "reject"),
|
|
582
|
-
// retain first n characters of the match
|
|
583
|
-
less: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function(n) {
|
|
584
|
-
this.unput(this.match.slice(n));
|
|
585
|
-
}, "less"),
|
|
586
|
-
// displays already matched input, i.e. for error messages
|
|
587
|
-
pastInput: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function() {
|
|
588
|
-
var past = this.matched.substr(0, this.matched.length - this.match.length);
|
|
589
|
-
return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
|
|
590
|
-
}, "pastInput"),
|
|
591
|
-
// displays upcoming input, i.e. for error messages
|
|
592
|
-
upcomingInput: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function() {
|
|
593
|
-
var next = this.match;
|
|
594
|
-
if (next.length < 20) {
|
|
595
|
-
next += this._input.substr(0, 20 - next.length);
|
|
596
|
-
}
|
|
597
|
-
return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
|
|
598
|
-
}, "upcomingInput"),
|
|
599
|
-
// displays the character position where the lexing error occurred, i.e. for error messages
|
|
600
|
-
showPosition: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function() {
|
|
601
|
-
var pre = this.pastInput();
|
|
602
|
-
var c = new Array(pre.length + 1).join("-");
|
|
603
|
-
return pre + this.upcomingInput() + "\n" + c + "^";
|
|
604
|
-
}, "showPosition"),
|
|
605
|
-
// test the lexed token: return FALSE when not a match, otherwise return token
|
|
606
|
-
test_match: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function(match, indexed_rule) {
|
|
607
|
-
var token, lines, backup;
|
|
608
|
-
if (this.options.backtrack_lexer) {
|
|
609
|
-
backup = {
|
|
610
|
-
yylineno: this.yylineno,
|
|
611
|
-
yylloc: {
|
|
612
|
-
first_line: this.yylloc.first_line,
|
|
613
|
-
last_line: this.last_line,
|
|
614
|
-
first_column: this.yylloc.first_column,
|
|
615
|
-
last_column: this.yylloc.last_column
|
|
616
|
-
},
|
|
617
|
-
yytext: this.yytext,
|
|
618
|
-
match: this.match,
|
|
619
|
-
matches: this.matches,
|
|
620
|
-
matched: this.matched,
|
|
621
|
-
yyleng: this.yyleng,
|
|
622
|
-
offset: this.offset,
|
|
623
|
-
_more: this._more,
|
|
624
|
-
_input: this._input,
|
|
625
|
-
yy: this.yy,
|
|
626
|
-
conditionStack: this.conditionStack.slice(0),
|
|
627
|
-
done: this.done
|
|
628
|
-
};
|
|
629
|
-
if (this.options.ranges) {
|
|
630
|
-
backup.yylloc.range = this.yylloc.range.slice(0);
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
lines = match[0].match(/(?:\r\n?|\n).*/g);
|
|
634
|
-
if (lines) {
|
|
635
|
-
this.yylineno += lines.length;
|
|
636
|
-
}
|
|
637
|
-
this.yylloc = {
|
|
638
|
-
first_line: this.yylloc.last_line,
|
|
639
|
-
last_line: this.yylineno + 1,
|
|
640
|
-
first_column: this.yylloc.last_column,
|
|
641
|
-
last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
|
|
642
|
-
};
|
|
643
|
-
this.yytext += match[0];
|
|
644
|
-
this.match += match[0];
|
|
645
|
-
this.matches = match;
|
|
646
|
-
this.yyleng = this.yytext.length;
|
|
647
|
-
if (this.options.ranges) {
|
|
648
|
-
this.yylloc.range = [this.offset, this.offset += this.yyleng];
|
|
649
|
-
}
|
|
650
|
-
this._more = false;
|
|
651
|
-
this._backtrack = false;
|
|
652
|
-
this._input = this._input.slice(match[0].length);
|
|
653
|
-
this.matched += match[0];
|
|
654
|
-
token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
|
|
655
|
-
if (this.done && this._input) {
|
|
656
|
-
this.done = false;
|
|
657
|
-
}
|
|
658
|
-
if (token) {
|
|
659
|
-
return token;
|
|
660
|
-
} else if (this._backtrack) {
|
|
661
|
-
for (var k in backup) {
|
|
662
|
-
this[k] = backup[k];
|
|
663
|
-
}
|
|
664
|
-
return false;
|
|
665
|
-
}
|
|
666
|
-
return false;
|
|
667
|
-
}, "test_match"),
|
|
668
|
-
// return next match in input
|
|
669
|
-
next: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function() {
|
|
670
|
-
if (this.done) {
|
|
671
|
-
return this.EOF;
|
|
672
|
-
}
|
|
673
|
-
if (!this._input) {
|
|
674
|
-
this.done = true;
|
|
675
|
-
}
|
|
676
|
-
var token, match, tempMatch, index;
|
|
677
|
-
if (!this._more) {
|
|
678
|
-
this.yytext = "";
|
|
679
|
-
this.match = "";
|
|
680
|
-
}
|
|
681
|
-
var rules = this._currentRules();
|
|
682
|
-
for (var i = 0; i < rules.length; i++) {
|
|
683
|
-
tempMatch = this._input.match(this.rules[rules[i]]);
|
|
684
|
-
if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
|
|
685
|
-
match = tempMatch;
|
|
686
|
-
index = i;
|
|
687
|
-
if (this.options.backtrack_lexer) {
|
|
688
|
-
token = this.test_match(tempMatch, rules[i]);
|
|
689
|
-
if (token !== false) {
|
|
690
|
-
return token;
|
|
691
|
-
} else if (this._backtrack) {
|
|
692
|
-
match = false;
|
|
693
|
-
continue;
|
|
694
|
-
} else {
|
|
695
|
-
return false;
|
|
696
|
-
}
|
|
697
|
-
} else if (!this.options.flex) {
|
|
698
|
-
break;
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
if (match) {
|
|
703
|
-
token = this.test_match(match, rules[index]);
|
|
704
|
-
if (token !== false) {
|
|
705
|
-
return token;
|
|
706
|
-
}
|
|
707
|
-
return false;
|
|
708
|
-
}
|
|
709
|
-
if (this._input === "") {
|
|
710
|
-
return this.EOF;
|
|
711
|
-
} else {
|
|
712
|
-
return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
|
|
713
|
-
text: "",
|
|
714
|
-
token: null,
|
|
715
|
-
line: this.yylineno
|
|
716
|
-
});
|
|
717
|
-
}
|
|
718
|
-
}, "next"),
|
|
719
|
-
// return next match that has a token
|
|
720
|
-
lex: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function lex() {
|
|
721
|
-
var r = this.next();
|
|
722
|
-
if (r) {
|
|
723
|
-
return r;
|
|
724
|
-
} else {
|
|
725
|
-
return this.lex();
|
|
726
|
-
}
|
|
727
|
-
}, "lex"),
|
|
728
|
-
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
|
729
|
-
begin: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function begin(condition) {
|
|
730
|
-
this.conditionStack.push(condition);
|
|
731
|
-
}, "begin"),
|
|
732
|
-
// pop the previously active lexer condition state off the condition stack
|
|
733
|
-
popState: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function popState() {
|
|
734
|
-
var n = this.conditionStack.length - 1;
|
|
735
|
-
if (n > 0) {
|
|
736
|
-
return this.conditionStack.pop();
|
|
737
|
-
} else {
|
|
738
|
-
return this.conditionStack[0];
|
|
739
|
-
}
|
|
740
|
-
}, "popState"),
|
|
741
|
-
// produce the lexer rule set which is active for the currently active lexer condition state
|
|
742
|
-
_currentRules: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function _currentRules() {
|
|
743
|
-
if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
|
|
744
|
-
return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
|
|
745
|
-
} else {
|
|
746
|
-
return this.conditions["INITIAL"].rules;
|
|
747
|
-
}
|
|
748
|
-
}, "_currentRules"),
|
|
749
|
-
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
|
750
|
-
topState: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function topState(n) {
|
|
751
|
-
n = this.conditionStack.length - 1 - Math.abs(n || 0);
|
|
752
|
-
if (n >= 0) {
|
|
753
|
-
return this.conditionStack[n];
|
|
754
|
-
} else {
|
|
755
|
-
return "INITIAL";
|
|
756
|
-
}
|
|
757
|
-
}, "topState"),
|
|
758
|
-
// alias for begin(condition)
|
|
759
|
-
pushState: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function pushState(condition) {
|
|
760
|
-
this.begin(condition);
|
|
761
|
-
}, "pushState"),
|
|
762
|
-
// return the number of states currently on the stack
|
|
763
|
-
stateStackSize: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function stateStackSize() {
|
|
764
|
-
return this.conditionStack.length;
|
|
765
|
-
}, "stateStackSize"),
|
|
766
|
-
options: { "case-insensitive": true },
|
|
767
|
-
performAction: /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
|
|
768
|
-
var YYSTATE = YY_START;
|
|
769
|
-
switch ($avoiding_name_collisions) {
|
|
770
|
-
case 0:
|
|
771
|
-
this.begin("acc_title");
|
|
772
|
-
return 22;
|
|
773
|
-
break;
|
|
774
|
-
case 1:
|
|
775
|
-
this.popState();
|
|
776
|
-
return "acc_title_value";
|
|
777
|
-
break;
|
|
778
|
-
case 2:
|
|
779
|
-
this.begin("acc_descr");
|
|
780
|
-
return 24;
|
|
781
|
-
break;
|
|
782
|
-
case 3:
|
|
783
|
-
this.popState();
|
|
784
|
-
return "acc_descr_value";
|
|
785
|
-
break;
|
|
786
|
-
case 4:
|
|
787
|
-
this.begin("acc_descr_multiline");
|
|
788
|
-
break;
|
|
789
|
-
case 5:
|
|
790
|
-
this.popState();
|
|
791
|
-
break;
|
|
792
|
-
case 6:
|
|
793
|
-
return "acc_descr_multiline_value";
|
|
794
|
-
break;
|
|
795
|
-
case 7:
|
|
796
|
-
return 10;
|
|
797
|
-
break;
|
|
798
|
-
case 8:
|
|
799
|
-
break;
|
|
800
|
-
case 9:
|
|
801
|
-
return 8;
|
|
802
|
-
break;
|
|
803
|
-
case 10:
|
|
804
|
-
return 28;
|
|
805
|
-
break;
|
|
806
|
-
case 11:
|
|
807
|
-
return 48;
|
|
808
|
-
break;
|
|
809
|
-
case 12:
|
|
810
|
-
return 4;
|
|
811
|
-
break;
|
|
812
|
-
case 13:
|
|
813
|
-
this.begin("block");
|
|
814
|
-
return 15;
|
|
815
|
-
break;
|
|
816
|
-
case 14:
|
|
817
|
-
return 36;
|
|
818
|
-
break;
|
|
819
|
-
case 15:
|
|
820
|
-
break;
|
|
821
|
-
case 16:
|
|
822
|
-
return 37;
|
|
823
|
-
break;
|
|
824
|
-
case 17:
|
|
825
|
-
return 34;
|
|
826
|
-
break;
|
|
827
|
-
case 18:
|
|
828
|
-
return 34;
|
|
829
|
-
break;
|
|
830
|
-
case 19:
|
|
831
|
-
return 38;
|
|
832
|
-
break;
|
|
833
|
-
case 20:
|
|
834
|
-
break;
|
|
835
|
-
case 21:
|
|
836
|
-
this.popState();
|
|
837
|
-
return 17;
|
|
838
|
-
break;
|
|
839
|
-
case 22:
|
|
840
|
-
return yy_.yytext[0];
|
|
841
|
-
break;
|
|
842
|
-
case 23:
|
|
843
|
-
return 18;
|
|
844
|
-
break;
|
|
845
|
-
case 24:
|
|
846
|
-
return 19;
|
|
847
|
-
break;
|
|
848
|
-
case 25:
|
|
849
|
-
return 41;
|
|
850
|
-
break;
|
|
851
|
-
case 26:
|
|
852
|
-
return 43;
|
|
853
|
-
break;
|
|
854
|
-
case 27:
|
|
855
|
-
return 43;
|
|
856
|
-
break;
|
|
857
|
-
case 28:
|
|
858
|
-
return 43;
|
|
859
|
-
break;
|
|
860
|
-
case 29:
|
|
861
|
-
return 41;
|
|
862
|
-
break;
|
|
863
|
-
case 30:
|
|
864
|
-
return 41;
|
|
865
|
-
break;
|
|
866
|
-
case 31:
|
|
867
|
-
return 42;
|
|
868
|
-
break;
|
|
869
|
-
case 32:
|
|
870
|
-
return 42;
|
|
871
|
-
break;
|
|
872
|
-
case 33:
|
|
873
|
-
return 42;
|
|
874
|
-
break;
|
|
875
|
-
case 34:
|
|
876
|
-
return 42;
|
|
877
|
-
break;
|
|
878
|
-
case 35:
|
|
879
|
-
return 42;
|
|
880
|
-
break;
|
|
881
|
-
case 36:
|
|
882
|
-
return 43;
|
|
883
|
-
break;
|
|
884
|
-
case 37:
|
|
885
|
-
return 42;
|
|
886
|
-
break;
|
|
887
|
-
case 38:
|
|
888
|
-
return 43;
|
|
889
|
-
break;
|
|
890
|
-
case 39:
|
|
891
|
-
return 44;
|
|
892
|
-
break;
|
|
893
|
-
case 40:
|
|
894
|
-
return 44;
|
|
895
|
-
break;
|
|
896
|
-
case 41:
|
|
897
|
-
return 44;
|
|
898
|
-
break;
|
|
899
|
-
case 42:
|
|
900
|
-
return 44;
|
|
901
|
-
break;
|
|
902
|
-
case 43:
|
|
903
|
-
return 41;
|
|
904
|
-
break;
|
|
905
|
-
case 44:
|
|
906
|
-
return 42;
|
|
907
|
-
break;
|
|
908
|
-
case 45:
|
|
909
|
-
return 43;
|
|
910
|
-
break;
|
|
911
|
-
case 46:
|
|
912
|
-
return 45;
|
|
913
|
-
break;
|
|
914
|
-
case 47:
|
|
915
|
-
return 46;
|
|
916
|
-
break;
|
|
917
|
-
case 48:
|
|
918
|
-
return 47;
|
|
919
|
-
break;
|
|
920
|
-
case 49:
|
|
921
|
-
return 47;
|
|
922
|
-
break;
|
|
923
|
-
case 50:
|
|
924
|
-
return 46;
|
|
925
|
-
break;
|
|
926
|
-
case 51:
|
|
927
|
-
return 46;
|
|
928
|
-
break;
|
|
929
|
-
case 52:
|
|
930
|
-
return 46;
|
|
931
|
-
break;
|
|
932
|
-
case 53:
|
|
933
|
-
return 27;
|
|
934
|
-
break;
|
|
935
|
-
case 54:
|
|
936
|
-
return yy_.yytext[0];
|
|
937
|
-
break;
|
|
938
|
-
case 55:
|
|
939
|
-
return 6;
|
|
940
|
-
break;
|
|
941
|
-
}
|
|
942
|
-
}, "anonymous"),
|
|
943
|
-
rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:,)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i, /^(?:(.*?)[~](.*?)*[~])/i, /^(?:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)]*)/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:one or zero\b)/i, /^(?:one or more\b)/i, /^(?:one or many\b)/i, /^(?:1\+)/i, /^(?:\|o\b)/i, /^(?:zero or one\b)/i, /^(?:zero or more\b)/i, /^(?:zero or many\b)/i, /^(?:0\+)/i, /^(?:\}o\b)/i, /^(?:many\(0\))/i, /^(?:many\(1\))/i, /^(?:many\b)/i, /^(?:\}\|)/i, /^(?:one\b)/i, /^(?:only one\b)/i, /^(?:1\b)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\s*u\b)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i, /^(?:.)/i, /^(?:$)/i],
|
|
944
|
-
conditions: { "acc_descr_multiline": { "rules": [5, 6], "inclusive": false }, "acc_descr": { "rules": [3], "inclusive": false }, "acc_title": { "rules": [1], "inclusive": false }, "block": { "rules": [14, 15, 16, 17, 18, 19, 20, 21, 22], "inclusive": false }, "INITIAL": { "rules": [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55], "inclusive": true } }
|
|
945
|
-
};
|
|
946
|
-
return lexer2;
|
|
947
|
-
}();
|
|
948
|
-
parser2.lexer = lexer;
|
|
949
|
-
function Parser() {
|
|
950
|
-
this.yy = {};
|
|
951
|
-
}
|
|
952
|
-
(0,chunk_S24QXQKS/* __name */.K2)(Parser, "Parser");
|
|
953
|
-
Parser.prototype = parser2;
|
|
954
|
-
parser2.Parser = Parser;
|
|
955
|
-
return new Parser();
|
|
956
|
-
}();
|
|
957
|
-
parser.parser = parser;
|
|
958
|
-
var erDiagram_default = parser;
|
|
959
49
|
|
|
960
|
-
// src/diagrams/
|
|
961
|
-
var
|
|
962
|
-
|
|
963
|
-
var Cardinality = {
|
|
964
|
-
ZERO_OR_ONE: "ZERO_OR_ONE",
|
|
965
|
-
ZERO_OR_MORE: "ZERO_OR_MORE",
|
|
966
|
-
ONE_OR_MORE: "ONE_OR_MORE",
|
|
967
|
-
ONLY_ONE: "ONLY_ONE",
|
|
968
|
-
MD_PARENT: "MD_PARENT"
|
|
969
|
-
};
|
|
970
|
-
var Identification = {
|
|
971
|
-
NON_IDENTIFYING: "NON_IDENTIFYING",
|
|
972
|
-
IDENTIFYING: "IDENTIFYING"
|
|
50
|
+
// src/diagrams/packet/db.ts
|
|
51
|
+
var defaultPacketData = {
|
|
52
|
+
packet: []
|
|
973
53
|
};
|
|
974
|
-
var
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
}
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
entityA: entA,
|
|
996
|
-
roleA: rolA,
|
|
997
|
-
entityB: entB,
|
|
998
|
-
relSpec: rSpec
|
|
999
|
-
};
|
|
1000
|
-
relationships.push(rel);
|
|
1001
|
-
chunk_S24QXQKS/* log */.Rm.debug("Added new relationship :", rel);
|
|
1002
|
-
}, "addRelationship");
|
|
1003
|
-
var getRelationships = /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(() => relationships, "getRelationships");
|
|
1004
|
-
var clear2 = /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function() {
|
|
1005
|
-
entities = /* @__PURE__ */ new Map();
|
|
1006
|
-
relationships = [];
|
|
1007
|
-
(0,chunk_S24QXQKS/* clear */.IU)();
|
|
54
|
+
var data = structuredClone(defaultPacketData);
|
|
55
|
+
var DEFAULT_PACKET_CONFIG = _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .defaultConfig_default */ .UI.packet;
|
|
56
|
+
var getConfig2 = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
|
|
57
|
+
const config = (0,_chunk_O4NI6UNU_mjs__WEBPACK_IMPORTED_MODULE_1__/* .cleanAndMerge */ .$t)({
|
|
58
|
+
...DEFAULT_PACKET_CONFIG,
|
|
59
|
+
...(0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getConfig */ .zj)().packet
|
|
60
|
+
});
|
|
61
|
+
if (config.showBits) {
|
|
62
|
+
config.paddingY += 10;
|
|
63
|
+
}
|
|
64
|
+
return config;
|
|
65
|
+
}, "getConfig");
|
|
66
|
+
var getPacket = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => data.packet, "getPacket");
|
|
67
|
+
var pushWord = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((word) => {
|
|
68
|
+
if (word.length > 0) {
|
|
69
|
+
data.packet.push(word);
|
|
70
|
+
}
|
|
71
|
+
}, "pushWord");
|
|
72
|
+
var clear2 = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(() => {
|
|
73
|
+
(0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .clear */ .IU)();
|
|
74
|
+
data = structuredClone(defaultPacketData);
|
|
1008
75
|
}, "clear");
|
|
1009
|
-
var
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
getConfig:
|
|
1013
|
-
addEntity,
|
|
1014
|
-
addAttributes,
|
|
1015
|
-
getEntities,
|
|
1016
|
-
addRelationship,
|
|
1017
|
-
getRelationships,
|
|
76
|
+
var db = {
|
|
77
|
+
pushWord,
|
|
78
|
+
getPacket,
|
|
79
|
+
getConfig: getConfig2,
|
|
1018
80
|
clear: clear2,
|
|
1019
|
-
setAccTitle:
|
|
1020
|
-
getAccTitle:
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
81
|
+
setAccTitle: _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setAccTitle */ .SV,
|
|
82
|
+
getAccTitle: _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getAccTitle */ .iN,
|
|
83
|
+
setDiagramTitle: _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setDiagramTitle */ .ke,
|
|
84
|
+
getDiagramTitle: _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getDiagramTitle */ .ab,
|
|
85
|
+
getAccDescription: _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .getAccDescription */ .m7,
|
|
86
|
+
setAccDescription: _chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .setAccDescription */ .EI
|
|
1025
87
|
};
|
|
1026
88
|
|
|
1027
|
-
// src/diagrams/
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
ONE_OR_MORE_END: "ONE_OR_MORE_END",
|
|
1040
|
-
ZERO_OR_MORE_START: "ZERO_OR_MORE_START",
|
|
1041
|
-
ZERO_OR_MORE_END: "ZERO_OR_MORE_END",
|
|
1042
|
-
MD_PARENT_END: "MD_PARENT_END",
|
|
1043
|
-
MD_PARENT_START: "MD_PARENT_START"
|
|
1044
|
-
};
|
|
1045
|
-
var insertMarkers = /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function(elem, conf2) {
|
|
1046
|
-
let marker;
|
|
1047
|
-
elem.append("defs").append("marker").attr("id", ERMarkers.MD_PARENT_START).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
1048
|
-
elem.append("defs").append("marker").attr("id", ERMarkers.MD_PARENT_END).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
1049
|
-
elem.append("defs").append("marker").attr("id", ERMarkers.ONLY_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M9,0 L9,18 M15,0 L15,18");
|
|
1050
|
-
elem.append("defs").append("marker").attr("id", ERMarkers.ONLY_ONE_END).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M3,0 L3,18 M9,0 L9,18");
|
|
1051
|
-
marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_ONE_START).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
|
|
1052
|
-
marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6);
|
|
1053
|
-
marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M9,0 L9,18");
|
|
1054
|
-
marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_ONE_END).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
|
|
1055
|
-
marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6);
|
|
1056
|
-
marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M21,0 L21,18");
|
|
1057
|
-
elem.append("defs").append("marker").attr("id", ERMarkers.ONE_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27");
|
|
1058
|
-
elem.append("defs").append("marker").attr("id", ERMarkers.ONE_OR_MORE_END).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18");
|
|
1059
|
-
marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_MORE_START).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
|
|
1060
|
-
marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6);
|
|
1061
|
-
marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18");
|
|
1062
|
-
marker = elem.append("defs").append("marker").attr("id", ERMarkers.ZERO_OR_MORE_END).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
|
|
1063
|
-
marker.append("circle").attr("stroke", conf2.stroke).attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6);
|
|
1064
|
-
marker.append("path").attr("stroke", conf2.stroke).attr("fill", "none").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
|
|
1065
|
-
return;
|
|
1066
|
-
}, "insertMarkers");
|
|
1067
|
-
var erMarkers_default = {
|
|
1068
|
-
ERMarkers,
|
|
1069
|
-
insertMarkers
|
|
1070
|
-
};
|
|
1071
|
-
|
|
1072
|
-
// src/diagrams/er/erRenderer.js
|
|
1073
|
-
|
|
1074
|
-
var BAD_ID_CHARS_REGEXP = /[^\dA-Za-z](\W)*/g;
|
|
1075
|
-
var conf = {};
|
|
1076
|
-
var entityNameIds = /* @__PURE__ */ new Map();
|
|
1077
|
-
var setConf = /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function(cnf) {
|
|
1078
|
-
const keys = Object.keys(cnf);
|
|
1079
|
-
for (const key of keys) {
|
|
1080
|
-
conf[key] = cnf[key];
|
|
1081
|
-
}
|
|
1082
|
-
}, "setConf");
|
|
1083
|
-
var drawAttributes = /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)((groupNode, entityTextNode, attributes) => {
|
|
1084
|
-
const heightPadding = conf.entityPadding / 3;
|
|
1085
|
-
const widthPadding = conf.entityPadding / 3;
|
|
1086
|
-
const attrFontSize = conf.fontSize * 0.85;
|
|
1087
|
-
const labelBBox = entityTextNode.node().getBBox();
|
|
1088
|
-
const attributeNodes = [];
|
|
1089
|
-
let hasKeyType = false;
|
|
1090
|
-
let hasComment = false;
|
|
1091
|
-
let maxTypeWidth = 0;
|
|
1092
|
-
let maxNameWidth = 0;
|
|
1093
|
-
let maxKeyWidth = 0;
|
|
1094
|
-
let maxCommentWidth = 0;
|
|
1095
|
-
let cumulativeHeight = labelBBox.height + heightPadding * 2;
|
|
1096
|
-
let attrNum = 1;
|
|
1097
|
-
attributes.forEach((item) => {
|
|
1098
|
-
if (item.attributeKeyTypeList !== void 0 && item.attributeKeyTypeList.length > 0) {
|
|
1099
|
-
hasKeyType = true;
|
|
1100
|
-
}
|
|
1101
|
-
if (item.attributeComment !== void 0) {
|
|
1102
|
-
hasComment = true;
|
|
1103
|
-
}
|
|
1104
|
-
});
|
|
1105
|
-
attributes.forEach((item) => {
|
|
1106
|
-
const attrPrefix = `${entityTextNode.node().id}-attr-${attrNum}`;
|
|
1107
|
-
let nodeHeight = 0;
|
|
1108
|
-
const attributeType = (0,chunk_S24QXQKS/* parseGenericTypes */.QO)(item.attributeType);
|
|
1109
|
-
const typeNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-type`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", (0,chunk_S24QXQKS/* getConfig2 */.D7)().fontFamily).style("font-size", attrFontSize + "px").text(attributeType);
|
|
1110
|
-
const nameNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-name`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", (0,chunk_S24QXQKS/* getConfig2 */.D7)().fontFamily).style("font-size", attrFontSize + "px").text(item.attributeName);
|
|
1111
|
-
const attributeNode = {};
|
|
1112
|
-
attributeNode.tn = typeNode;
|
|
1113
|
-
attributeNode.nn = nameNode;
|
|
1114
|
-
const typeBBox = typeNode.node().getBBox();
|
|
1115
|
-
const nameBBox = nameNode.node().getBBox();
|
|
1116
|
-
maxTypeWidth = Math.max(maxTypeWidth, typeBBox.width);
|
|
1117
|
-
maxNameWidth = Math.max(maxNameWidth, nameBBox.width);
|
|
1118
|
-
nodeHeight = Math.max(typeBBox.height, nameBBox.height);
|
|
1119
|
-
if (hasKeyType) {
|
|
1120
|
-
const keyTypeNodeText = item.attributeKeyTypeList !== void 0 ? item.attributeKeyTypeList.join(",") : "";
|
|
1121
|
-
const keyTypeNode = groupNode.append("text").classed("er entityLabel", true).attr("id", `${attrPrefix}-key`).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "left").style("font-family", (0,chunk_S24QXQKS/* getConfig2 */.D7)().fontFamily).style("font-size", attrFontSize + "px").text(keyTypeNodeText);
|
|
1122
|
-
attributeNode.kn = keyTypeNode;
|
|
1123
|
-
const keyTypeBBox = keyTypeNode.node().getBBox();
|
|
1124
|
-
maxKeyWidth = Math.max(maxKeyWidth, keyTypeBBox.width);
|
|
1125
|
-
nodeHeight = Math.max(nodeHeight, keyTypeBBox.height);
|
|
89
|
+
// src/diagrams/packet/parser.ts
|
|
90
|
+
|
|
91
|
+
var maxPacketSize = 1e4;
|
|
92
|
+
var populate = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((ast) => {
|
|
93
|
+
(0,_chunk_4BMEZGHF_mjs__WEBPACK_IMPORTED_MODULE_0__/* .populateCommonDb */ .S)(ast, db);
|
|
94
|
+
let lastByte = -1;
|
|
95
|
+
let word = [];
|
|
96
|
+
let row = 1;
|
|
97
|
+
const { bitsPerRow } = db.getConfig();
|
|
98
|
+
for (let { start, end, label } of ast.blocks) {
|
|
99
|
+
if (end && end < start) {
|
|
100
|
+
throw new Error(`Packet block ${start} - ${end} is invalid. End must be greater than start.`);
|
|
1126
101
|
}
|
|
1127
|
-
if (
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
const commentNodeBBox = commentNode.node().getBBox();
|
|
1131
|
-
maxCommentWidth = Math.max(maxCommentWidth, commentNodeBBox.width);
|
|
1132
|
-
nodeHeight = Math.max(nodeHeight, commentNodeBBox.height);
|
|
1133
|
-
}
|
|
1134
|
-
attributeNode.height = nodeHeight;
|
|
1135
|
-
attributeNodes.push(attributeNode);
|
|
1136
|
-
cumulativeHeight += nodeHeight + heightPadding * 2;
|
|
1137
|
-
attrNum += 1;
|
|
1138
|
-
});
|
|
1139
|
-
let widthPaddingFactor = 4;
|
|
1140
|
-
if (hasKeyType) {
|
|
1141
|
-
widthPaddingFactor += 2;
|
|
1142
|
-
}
|
|
1143
|
-
if (hasComment) {
|
|
1144
|
-
widthPaddingFactor += 2;
|
|
1145
|
-
}
|
|
1146
|
-
const maxWidth = maxTypeWidth + maxNameWidth + maxKeyWidth + maxCommentWidth;
|
|
1147
|
-
const bBox = {
|
|
1148
|
-
width: Math.max(
|
|
1149
|
-
conf.minEntityWidth,
|
|
1150
|
-
Math.max(
|
|
1151
|
-
labelBBox.width + conf.entityPadding * 2,
|
|
1152
|
-
maxWidth + widthPadding * widthPaddingFactor
|
|
1153
|
-
)
|
|
1154
|
-
),
|
|
1155
|
-
height: attributes.length > 0 ? cumulativeHeight : Math.max(conf.minEntityHeight, labelBBox.height + conf.entityPadding * 2)
|
|
1156
|
-
};
|
|
1157
|
-
if (attributes.length > 0) {
|
|
1158
|
-
const spareColumnWidth = Math.max(
|
|
1159
|
-
0,
|
|
1160
|
-
(bBox.width - maxWidth - widthPadding * widthPaddingFactor) / (widthPaddingFactor / 2)
|
|
1161
|
-
);
|
|
1162
|
-
entityTextNode.attr(
|
|
1163
|
-
"transform",
|
|
1164
|
-
"translate(" + bBox.width / 2 + "," + (heightPadding + labelBBox.height / 2) + ")"
|
|
1165
|
-
);
|
|
1166
|
-
let heightOffset = labelBBox.height + heightPadding * 2;
|
|
1167
|
-
let attribStyle = "attributeBoxOdd";
|
|
1168
|
-
attributeNodes.forEach((attributeNode) => {
|
|
1169
|
-
const alignY = heightOffset + heightPadding + attributeNode.height / 2;
|
|
1170
|
-
attributeNode.tn.attr("transform", "translate(" + widthPadding + "," + alignY + ")");
|
|
1171
|
-
const typeRect = groupNode.insert("rect", "#" + attributeNode.tn.node().id).classed(`er ${attribStyle}`, true).attr("x", 0).attr("y", heightOffset).attr("width", maxTypeWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2);
|
|
1172
|
-
const nameXOffset = parseFloat(typeRect.attr("x")) + parseFloat(typeRect.attr("width"));
|
|
1173
|
-
attributeNode.nn.attr(
|
|
1174
|
-
"transform",
|
|
1175
|
-
"translate(" + (nameXOffset + widthPadding) + "," + alignY + ")"
|
|
102
|
+
if (start !== lastByte + 1) {
|
|
103
|
+
throw new Error(
|
|
104
|
+
`Packet block ${start} - ${end ?? start} is not contiguous. It should start from ${lastByte + 1}.`
|
|
1176
105
|
);
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
106
|
+
}
|
|
107
|
+
lastByte = end ?? start;
|
|
108
|
+
_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.debug(`Packet block ${start} - ${lastByte} with label ${label}`);
|
|
109
|
+
while (word.length <= bitsPerRow + 1 && db.getPacket().length < maxPacketSize) {
|
|
110
|
+
const [block, nextBlock] = getNextFittingBlock({ start, end, label }, row, bitsPerRow);
|
|
111
|
+
word.push(block);
|
|
112
|
+
if (block.end + 1 === row * bitsPerRow) {
|
|
113
|
+
db.pushWord(word);
|
|
114
|
+
word = [];
|
|
115
|
+
row++;
|
|
1186
116
|
}
|
|
1187
|
-
if (
|
|
1188
|
-
|
|
1189
|
-
"transform",
|
|
1190
|
-
"translate(" + (keyTypeAndCommentXOffset + widthPadding) + "," + alignY + ")"
|
|
1191
|
-
);
|
|
1192
|
-
groupNode.insert("rect", "#" + attributeNode.cn.node().id).classed(`er ${attribStyle}`, "true").attr("x", keyTypeAndCommentXOffset).attr("y", heightOffset).attr("width", maxCommentWidth + widthPadding * 2 + spareColumnWidth).attr("height", attributeNode.height + heightPadding * 2);
|
|
117
|
+
if (!nextBlock) {
|
|
118
|
+
break;
|
|
1193
119
|
}
|
|
1194
|
-
|
|
1195
|
-
attribStyle = attribStyle === "attributeBoxOdd" ? "attributeBoxEven" : "attributeBoxOdd";
|
|
1196
|
-
});
|
|
1197
|
-
} else {
|
|
1198
|
-
bBox.height = Math.max(conf.minEntityHeight, cumulativeHeight);
|
|
1199
|
-
entityTextNode.attr("transform", "translate(" + bBox.width / 2 + "," + bBox.height / 2 + ")");
|
|
1200
|
-
}
|
|
1201
|
-
return bBox;
|
|
1202
|
-
}, "drawAttributes");
|
|
1203
|
-
var drawEntities = /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function(svgNode, entities2, graph) {
|
|
1204
|
-
const keys = [...entities2.keys()];
|
|
1205
|
-
let firstOne;
|
|
1206
|
-
keys.forEach(function(entityName) {
|
|
1207
|
-
const entityId = generateId(entityName, "entity");
|
|
1208
|
-
entityNameIds.set(entityName, entityId);
|
|
1209
|
-
const groupNode = svgNode.append("g").attr("id", entityId);
|
|
1210
|
-
firstOne = firstOne === void 0 ? entityId : firstOne;
|
|
1211
|
-
const textId = "text-" + entityId;
|
|
1212
|
-
const textNode = groupNode.append("text").classed("er entityLabel", true).attr("id", textId).attr("x", 0).attr("y", 0).style("dominant-baseline", "middle").style("text-anchor", "middle").style("font-family", (0,chunk_S24QXQKS/* getConfig2 */.D7)().fontFamily).style("font-size", conf.fontSize + "px").text(entities2.get(entityName).alias ?? entityName);
|
|
1213
|
-
const { width: entityWidth, height: entityHeight } = drawAttributes(
|
|
1214
|
-
groupNode,
|
|
1215
|
-
textNode,
|
|
1216
|
-
entities2.get(entityName).attributes
|
|
1217
|
-
);
|
|
1218
|
-
const rectNode = groupNode.insert("rect", "#" + textId).classed("er entityBox", true).attr("x", 0).attr("y", 0).attr("width", entityWidth).attr("height", entityHeight);
|
|
1219
|
-
const rectBBox = rectNode.node().getBBox();
|
|
1220
|
-
graph.setNode(entityId, {
|
|
1221
|
-
width: rectBBox.width,
|
|
1222
|
-
height: rectBBox.height,
|
|
1223
|
-
shape: "rect",
|
|
1224
|
-
id: entityId
|
|
1225
|
-
});
|
|
1226
|
-
});
|
|
1227
|
-
return firstOne;
|
|
1228
|
-
}, "drawEntities");
|
|
1229
|
-
var adjustEntities = /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function(svgNode, graph) {
|
|
1230
|
-
graph.nodes().forEach(function(v) {
|
|
1231
|
-
if (v !== void 0 && graph.node(v) !== void 0) {
|
|
1232
|
-
svgNode.select("#" + v).attr(
|
|
1233
|
-
"transform",
|
|
1234
|
-
"translate(" + (graph.node(v).x - graph.node(v).width / 2) + "," + (graph.node(v).y - graph.node(v).height / 2) + " )"
|
|
1235
|
-
);
|
|
120
|
+
({ start, end, label } = nextBlock);
|
|
1236
121
|
}
|
|
1237
|
-
});
|
|
1238
|
-
}, "adjustEntities");
|
|
1239
|
-
var getEdgeName = /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function(rel) {
|
|
1240
|
-
return (rel.entityA + rel.roleA + rel.entityB).replace(/\s/g, "");
|
|
1241
|
-
}, "getEdgeName");
|
|
1242
|
-
var addRelationships = /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function(relationships2, g) {
|
|
1243
|
-
relationships2.forEach(function(r) {
|
|
1244
|
-
g.setEdge(
|
|
1245
|
-
entityNameIds.get(r.entityA),
|
|
1246
|
-
entityNameIds.get(r.entityB),
|
|
1247
|
-
{ relationship: r },
|
|
1248
|
-
getEdgeName(r)
|
|
1249
|
-
);
|
|
1250
|
-
});
|
|
1251
|
-
return relationships2;
|
|
1252
|
-
}, "addRelationships");
|
|
1253
|
-
var relCnt = 0;
|
|
1254
|
-
var drawRelationshipFromLayout = /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function(svg, rel, g, insert, diagObj) {
|
|
1255
|
-
relCnt++;
|
|
1256
|
-
const edge = g.edge(
|
|
1257
|
-
entityNameIds.get(rel.entityA),
|
|
1258
|
-
entityNameIds.get(rel.entityB),
|
|
1259
|
-
getEdgeName(rel)
|
|
1260
|
-
);
|
|
1261
|
-
const lineFunction = (0,src/* line */.n8j)().x(function(d) {
|
|
1262
|
-
return d.x;
|
|
1263
|
-
}).y(function(d) {
|
|
1264
|
-
return d.y;
|
|
1265
|
-
}).curve(src/* curveBasis */.qrM);
|
|
1266
|
-
const svgPath = svg.insert("path", "#" + insert).classed("er relationshipLine", true).attr("d", lineFunction(edge.points)).style("stroke", conf.stroke).style("fill", "none");
|
|
1267
|
-
if (rel.relSpec.relType === diagObj.db.Identification.NON_IDENTIFYING) {
|
|
1268
|
-
svgPath.attr("stroke-dasharray", "8,8");
|
|
1269
122
|
}
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
}
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
svgPath.attr(
|
|
1302
|
-
"marker-start",
|
|
1303
|
-
"url(" + url + "#" + erMarkers_default.ERMarkers.ZERO_OR_MORE_START + ")"
|
|
1304
|
-
);
|
|
1305
|
-
break;
|
|
1306
|
-
case diagObj.db.Cardinality.ONE_OR_MORE:
|
|
1307
|
-
svgPath.attr(
|
|
1308
|
-
"marker-start",
|
|
1309
|
-
"url(" + url + "#" + erMarkers_default.ERMarkers.ONE_OR_MORE_START + ")"
|
|
1310
|
-
);
|
|
1311
|
-
break;
|
|
1312
|
-
case diagObj.db.Cardinality.ONLY_ONE:
|
|
1313
|
-
svgPath.attr("marker-start", "url(" + url + "#" + erMarkers_default.ERMarkers.ONLY_ONE_START + ")");
|
|
1314
|
-
break;
|
|
1315
|
-
case diagObj.db.Cardinality.MD_PARENT:
|
|
1316
|
-
svgPath.attr("marker-start", "url(" + url + "#" + erMarkers_default.ERMarkers.MD_PARENT_START + ")");
|
|
1317
|
-
break;
|
|
1318
|
-
}
|
|
1319
|
-
const len = svgPath.node().getTotalLength();
|
|
1320
|
-
const labelPoint = svgPath.node().getPointAtLength(len * 0.5);
|
|
1321
|
-
const labelId = "rel" + relCnt;
|
|
1322
|
-
const labelText = rel.roleA.split(/<br ?\/>/g);
|
|
1323
|
-
const labelNode = svg.append("text").classed("er relationshipLabel", true).attr("id", labelId).attr("x", labelPoint.x).attr("y", labelPoint.y).style("text-anchor", "middle").style("dominant-baseline", "middle").style("font-family", (0,chunk_S24QXQKS/* getConfig2 */.D7)().fontFamily).style("font-size", conf.fontSize + "px");
|
|
1324
|
-
if (labelText.length == 1) {
|
|
1325
|
-
labelNode.text(rel.roleA);
|
|
1326
|
-
} else {
|
|
1327
|
-
const firstShift = -(labelText.length - 1) * 0.5;
|
|
1328
|
-
labelText.forEach((txt, i) => {
|
|
1329
|
-
labelNode.append("tspan").attr("x", labelPoint.x).attr("dy", `${i === 0 ? firstShift : 1}em`).text(txt);
|
|
1330
|
-
});
|
|
1331
|
-
}
|
|
1332
|
-
const labelBBox = labelNode.node().getBBox();
|
|
1333
|
-
svg.insert("rect", "#" + labelId).classed("er relationshipLabelBox", true).attr("x", labelPoint.x - labelBBox.width / 2).attr("y", labelPoint.y - labelBBox.height / 2).attr("width", labelBBox.width).attr("height", labelBBox.height);
|
|
1334
|
-
}, "drawRelationshipFromLayout");
|
|
1335
|
-
var draw = /* @__PURE__ */ (0,chunk_S24QXQKS/* __name */.K2)(function(text, id, _version, diagObj) {
|
|
1336
|
-
conf = (0,chunk_S24QXQKS/* getConfig2 */.D7)().er;
|
|
1337
|
-
chunk_S24QXQKS/* log */.Rm.info("Drawing ER diagram");
|
|
1338
|
-
const securityLevel = (0,chunk_S24QXQKS/* getConfig2 */.D7)().securityLevel;
|
|
1339
|
-
let sandboxElement;
|
|
1340
|
-
if (securityLevel === "sandbox") {
|
|
1341
|
-
sandboxElement = (0,src/* select */.Ltv)("#i" + id);
|
|
1342
|
-
}
|
|
1343
|
-
const root = securityLevel === "sandbox" ? (0,src/* select */.Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,src/* select */.Ltv)("body");
|
|
1344
|
-
const svg = root.select(`[id='${id}']`);
|
|
1345
|
-
erMarkers_default.insertMarkers(svg, conf);
|
|
1346
|
-
let g;
|
|
1347
|
-
g = new graphlib/* Graph */.T({
|
|
1348
|
-
multigraph: true,
|
|
1349
|
-
directed: true,
|
|
1350
|
-
compound: false
|
|
1351
|
-
}).setGraph({
|
|
1352
|
-
rankdir: conf.layoutDirection,
|
|
1353
|
-
marginx: 20,
|
|
1354
|
-
marginy: 20,
|
|
1355
|
-
nodesep: 100,
|
|
1356
|
-
edgesep: 100,
|
|
1357
|
-
ranksep: 100
|
|
1358
|
-
}).setDefaultEdgeLabel(function() {
|
|
1359
|
-
return {};
|
|
1360
|
-
});
|
|
1361
|
-
const firstEntity = drawEntities(svg, diagObj.db.getEntities(), g);
|
|
1362
|
-
const relationships2 = addRelationships(diagObj.db.getRelationships(), g);
|
|
1363
|
-
(0,dagre/* layout */.Zp)(g);
|
|
1364
|
-
adjustEntities(svg, g);
|
|
1365
|
-
relationships2.forEach(function(rel) {
|
|
1366
|
-
drawRelationshipFromLayout(svg, rel, g, firstEntity, diagObj);
|
|
1367
|
-
});
|
|
1368
|
-
const padding = conf.diagramPadding;
|
|
1369
|
-
chunk_TLUHKHBO/* utils_default */._K.insertTitle(svg, "entityTitleText", conf.titleTopMargin, diagObj.db.getDiagramTitle());
|
|
1370
|
-
const svgBounds = svg.node().getBBox();
|
|
1371
|
-
const width = svgBounds.width + padding * 2;
|
|
1372
|
-
const height = svgBounds.height + padding * 2;
|
|
1373
|
-
(0,chunk_S24QXQKS/* configureSvgSize */.a$)(svg, height, width, conf.useMaxWidth);
|
|
1374
|
-
svg.attr("viewBox", `${svgBounds.x - padding} ${svgBounds.y - padding} ${width} ${height}`);
|
|
1375
|
-
}, "draw");
|
|
1376
|
-
var MERMAID_ERDIAGRAM_UUID = "28e9f9db-3c8d-5aa5-9faf-44286ae5937c";
|
|
1377
|
-
function generateId(str = "", prefix = "") {
|
|
1378
|
-
const simplifiedStr = str.replace(BAD_ID_CHARS_REGEXP, "");
|
|
1379
|
-
return `${strWithHyphen(prefix)}${strWithHyphen(simplifiedStr)}${esm_node_v5(
|
|
1380
|
-
str,
|
|
1381
|
-
MERMAID_ERDIAGRAM_UUID
|
|
1382
|
-
)}`;
|
|
1383
|
-
}
|
|
1384
|
-
(0,chunk_S24QXQKS/* __name */.K2)(generateId, "generateId");
|
|
1385
|
-
function strWithHyphen(str = "") {
|
|
1386
|
-
return str.length > 0 ? `${str}-` : "";
|
|
1387
|
-
}
|
|
1388
|
-
(0,chunk_S24QXQKS/* __name */.K2)(strWithHyphen, "strWithHyphen");
|
|
1389
|
-
var erRenderer_default = {
|
|
1390
|
-
setConf,
|
|
1391
|
-
draw
|
|
123
|
+
db.pushWord(word);
|
|
124
|
+
}, "populate");
|
|
125
|
+
var getNextFittingBlock = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((block, row, bitsPerRow) => {
|
|
126
|
+
if (block.end === void 0) {
|
|
127
|
+
block.end = block.start;
|
|
128
|
+
}
|
|
129
|
+
if (block.start > block.end) {
|
|
130
|
+
throw new Error(`Block start ${block.start} is greater than block end ${block.end}.`);
|
|
131
|
+
}
|
|
132
|
+
if (block.end + 1 <= row * bitsPerRow) {
|
|
133
|
+
return [block, void 0];
|
|
134
|
+
}
|
|
135
|
+
return [
|
|
136
|
+
{
|
|
137
|
+
start: block.start,
|
|
138
|
+
end: row * bitsPerRow - 1,
|
|
139
|
+
label: block.label
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
start: row * bitsPerRow,
|
|
143
|
+
end: block.end,
|
|
144
|
+
label: block.label
|
|
145
|
+
}
|
|
146
|
+
];
|
|
147
|
+
}, "getNextFittingBlock");
|
|
148
|
+
var parser = {
|
|
149
|
+
parse: /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(async (input) => {
|
|
150
|
+
const ast = await (0,_mermaid_js_parser__WEBPACK_IMPORTED_MODULE_4__/* .parse */ .qg)("packet", input);
|
|
151
|
+
_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .log */ .Rm.debug(ast);
|
|
152
|
+
populate(ast);
|
|
153
|
+
}, "parse")
|
|
1392
154
|
};
|
|
1393
155
|
|
|
1394
|
-
// src/diagrams/
|
|
1395
|
-
var
|
|
1396
|
-
.
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
.
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
}
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
156
|
+
// src/diagrams/packet/renderer.ts
|
|
157
|
+
var draw = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((_text, id, _version, diagram2) => {
|
|
158
|
+
const db2 = diagram2.db;
|
|
159
|
+
const config = db2.getConfig();
|
|
160
|
+
const { rowHeight, paddingY, bitWidth, bitsPerRow } = config;
|
|
161
|
+
const words = db2.getPacket();
|
|
162
|
+
const title = db2.getDiagramTitle();
|
|
163
|
+
const totalRowHeight = rowHeight + paddingY;
|
|
164
|
+
const svgHeight = totalRowHeight * (words.length + 1) - (title ? 0 : rowHeight);
|
|
165
|
+
const svgWidth = bitWidth * bitsPerRow + 2;
|
|
166
|
+
const svg = (0,_chunk_7B677QYD_mjs__WEBPACK_IMPORTED_MODULE_2__/* .selectSvgElement */ .D)(id);
|
|
167
|
+
svg.attr("viewbox", `0 0 ${svgWidth} ${svgHeight}`);
|
|
168
|
+
(0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .configureSvgSize */ .a$)(svg, svgHeight, svgWidth, config.useMaxWidth);
|
|
169
|
+
for (const [word, packet] of words.entries()) {
|
|
170
|
+
drawWord(svg, packet, word, config);
|
|
171
|
+
}
|
|
172
|
+
svg.append("text").text(title).attr("x", svgWidth / 2).attr("y", svgHeight - totalRowHeight / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
|
|
173
|
+
}, "draw");
|
|
174
|
+
var drawWord = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)((svg, word, rowNumber, { rowHeight, paddingX, paddingY, bitWidth, bitsPerRow, showBits }) => {
|
|
175
|
+
const group = svg.append("g");
|
|
176
|
+
const wordY = rowNumber * (rowHeight + paddingY) + paddingY;
|
|
177
|
+
for (const block of word) {
|
|
178
|
+
const blockX = block.start % bitsPerRow * bitWidth + 1;
|
|
179
|
+
const width = (block.end - block.start + 1) * bitWidth - paddingX;
|
|
180
|
+
group.append("rect").attr("x", blockX).attr("y", wordY).attr("width", width).attr("height", rowHeight).attr("class", "packetBlock");
|
|
181
|
+
group.append("text").attr("x", blockX + width / 2).attr("y", wordY + rowHeight / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(block.label);
|
|
182
|
+
if (!showBits) {
|
|
183
|
+
continue;
|
|
184
|
+
}
|
|
185
|
+
const isSingleBlock = block.end === block.start;
|
|
186
|
+
const bitNumberY = wordY - 2;
|
|
187
|
+
group.append("text").attr("x", blockX + (isSingleBlock ? width / 2 : 0)).attr("y", bitNumberY).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", isSingleBlock ? "middle" : "start").text(block.start);
|
|
188
|
+
if (!isSingleBlock) {
|
|
189
|
+
group.append("text").attr("x", blockX + width).attr("y", bitNumberY).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(block.end);
|
|
1422
190
|
}
|
|
1423
|
-
|
|
1424
|
-
.entityTitleText {
|
|
1425
|
-
text-anchor: middle;
|
|
1426
|
-
font-size: 18px;
|
|
1427
|
-
fill: ${options.textColor};
|
|
1428
|
-
}
|
|
1429
|
-
#MD_PARENT_START {
|
|
1430
|
-
fill: #f5f5f5 !important;
|
|
1431
|
-
stroke: ${options.lineColor} !important;
|
|
1432
|
-
stroke-width: 1;
|
|
1433
|
-
}
|
|
1434
|
-
#MD_PARENT_END {
|
|
1435
|
-
fill: #f5f5f5 !important;
|
|
1436
|
-
stroke: ${options.lineColor} !important;
|
|
1437
|
-
stroke-width: 1;
|
|
1438
191
|
}
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
192
|
+
}, "drawWord");
|
|
193
|
+
var renderer = { draw };
|
|
194
|
+
|
|
195
|
+
// src/diagrams/packet/styles.ts
|
|
196
|
+
var defaultPacketStyleOptions = {
|
|
197
|
+
byteFontSize: "10px",
|
|
198
|
+
startByteColor: "black",
|
|
199
|
+
endByteColor: "black",
|
|
200
|
+
labelColor: "black",
|
|
201
|
+
labelFontSize: "12px",
|
|
202
|
+
titleColor: "black",
|
|
203
|
+
titleFontSize: "14px",
|
|
204
|
+
blockStrokeColor: "black",
|
|
205
|
+
blockStrokeWidth: "1",
|
|
206
|
+
blockFillColor: "#efefef"
|
|
207
|
+
};
|
|
208
|
+
var styles = /* @__PURE__ */ (0,_chunk_YTJNT7DU_mjs__WEBPACK_IMPORTED_MODULE_3__/* .__name */ .K2)(({ packet } = {}) => {
|
|
209
|
+
const options = (0,_chunk_O4NI6UNU_mjs__WEBPACK_IMPORTED_MODULE_1__/* .cleanAndMerge */ .$t)(defaultPacketStyleOptions, packet);
|
|
210
|
+
return `
|
|
211
|
+
.packetByte {
|
|
212
|
+
font-size: ${options.byteFontSize};
|
|
213
|
+
}
|
|
214
|
+
.packetByte.start {
|
|
215
|
+
fill: ${options.startByteColor};
|
|
216
|
+
}
|
|
217
|
+
.packetByte.end {
|
|
218
|
+
fill: ${options.endByteColor};
|
|
219
|
+
}
|
|
220
|
+
.packetLabel {
|
|
221
|
+
fill: ${options.labelColor};
|
|
222
|
+
font-size: ${options.labelFontSize};
|
|
223
|
+
}
|
|
224
|
+
.packetTitle {
|
|
225
|
+
fill: ${options.titleColor};
|
|
226
|
+
font-size: ${options.titleFontSize};
|
|
227
|
+
}
|
|
228
|
+
.packetBlock {
|
|
229
|
+
stroke: ${options.blockStrokeColor};
|
|
230
|
+
stroke-width: ${options.blockStrokeWidth};
|
|
231
|
+
fill: ${options.blockFillColor};
|
|
232
|
+
}
|
|
233
|
+
`;
|
|
234
|
+
}, "styles");
|
|
235
|
+
|
|
236
|
+
// src/diagrams/packet/diagram.ts
|
|
1444
237
|
var diagram = {
|
|
1445
|
-
parser
|
|
1446
|
-
db
|
|
1447
|
-
renderer
|
|
1448
|
-
styles
|
|
238
|
+
parser,
|
|
239
|
+
db,
|
|
240
|
+
renderer,
|
|
241
|
+
styles
|
|
1449
242
|
};
|
|
1450
243
|
|
|
1451
244
|
|