@readme/markdown 7.6.6 → 7.7.0

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.
Files changed (86) hide show
  1. package/README.md +60 -79
  2. package/components/Code/index.tsx +7 -3
  3. package/components/Code/style.scss +6 -0
  4. package/components/CodeTabs/index.tsx +25 -2
  5. package/components/Image/style.scss +7 -4
  6. package/dist/10.js +22718 -0
  7. package/dist/10.node.js +22721 -0
  8. package/dist/11.js +1440 -0
  9. package/dist/11.node.js +1443 -0
  10. package/dist/120.js +19 -0
  11. package/dist/120.node.js +22 -0
  12. package/dist/134.js +19 -0
  13. package/dist/134.node.js +22 -0
  14. package/dist/150.js +1888 -0
  15. package/dist/150.node.js +1891 -0
  16. package/dist/17.js +1373 -0
  17. package/dist/17.node.js +1376 -0
  18. package/dist/246.js +1929 -0
  19. package/dist/246.node.js +1932 -0
  20. package/dist/351.js +2400 -0
  21. package/dist/351.node.js +2403 -0
  22. package/dist/366.js +1181 -0
  23. package/dist/366.node.js +1184 -0
  24. package/dist/403.js +2192 -0
  25. package/dist/403.node.js +2195 -0
  26. package/dist/429.js +11130 -0
  27. package/dist/429.node.js +11133 -0
  28. package/dist/485.js +514 -0
  29. package/dist/485.node.js +517 -0
  30. package/dist/488.js +55 -0
  31. package/dist/488.node.js +58 -0
  32. package/dist/489.js +18472 -0
  33. package/dist/489.node.js +18475 -0
  34. package/dist/510.js +246 -0
  35. package/dist/510.node.js +249 -0
  36. package/dist/52.js +808 -0
  37. package/dist/52.node.js +811 -0
  38. package/dist/550.node.js +1456 -0
  39. package/dist/551.js +2722 -0
  40. package/dist/551.node.js +2725 -0
  41. package/dist/617.js +19 -0
  42. package/dist/617.node.js +22 -0
  43. package/dist/687.js +3671 -0
  44. package/dist/687.node.js +3674 -0
  45. package/dist/745.js +7504 -0
  46. package/dist/745.node.js +7507 -0
  47. package/dist/775.js +1900 -0
  48. package/dist/775.node.js +1903 -0
  49. package/dist/786.js +31378 -0
  50. package/dist/786.node.js +31381 -0
  51. package/dist/788.js +1021 -0
  52. package/dist/788.node.js +1024 -0
  53. package/dist/81.js +382 -0
  54. package/dist/81.node.js +385 -0
  55. package/dist/849.js +2586 -0
  56. package/dist/849.node.js +2589 -0
  57. package/dist/863.js +19 -0
  58. package/dist/863.node.js +22 -0
  59. package/dist/867.js +1414 -0
  60. package/dist/867.node.js +1417 -0
  61. package/dist/871.js +1533 -0
  62. package/dist/881.js +1276 -0
  63. package/dist/881.node.js +1279 -0
  64. package/dist/885.js +48 -0
  65. package/dist/885.node.js +51 -0
  66. package/dist/896.js +1613 -0
  67. package/dist/896.node.js +1616 -0
  68. package/dist/906.js +1815 -0
  69. package/dist/906.node.js +1818 -0
  70. package/dist/91.js +19 -0
  71. package/dist/91.node.js +22 -0
  72. package/dist/940.js +3359 -0
  73. package/dist/940.node.js +3362 -0
  74. package/dist/952.js +243 -0
  75. package/dist/952.node.js +246 -0
  76. package/dist/995.js +5734 -0
  77. package/dist/995.node.js +5737 -0
  78. package/dist/components/Code/index.d.ts +1 -1
  79. package/dist/lib/ast-processor.d.ts +3 -1
  80. package/dist/lib/compile.d.ts +2 -1
  81. package/dist/main.css +1 -1
  82. package/dist/main.js +94787 -73737
  83. package/dist/main.node.js +103724 -82783
  84. package/dist/processor/transform/code-tabs.d.ts +3 -1
  85. package/dist/processor/transform/index.d.ts +12 -1
  86. package/package.json +3 -3
package/dist/551.js ADDED
@@ -0,0 +1,2722 @@
1
+ "use strict";
2
+ (self["webpackChunk_readme_markdown"] = self["webpackChunk_readme_markdown"] || []).push([[551],{
3
+
4
+ /***/ 9551:
5
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
+
7
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8
+ /* harmony export */ diagram: () => (/* binding */ diagram)
9
+ /* harmony export */ });
10
+ /* harmony import */ var _chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(242);
11
+ /* harmony import */ var _chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2843);
12
+ /* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6322);
13
+ /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8066);
14
+ /* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6750);
15
+
16
+
17
+
18
+
19
+ // src/diagrams/c4/parser/c4Diagram.jison
20
+ var parser = function() {
21
+ var o = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(k, v, o2, l) {
22
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
23
+ return o2;
24
+ }, "o"), $V0 = [1, 24], $V1 = [1, 25], $V2 = [1, 26], $V3 = [1, 27], $V4 = [1, 28], $V5 = [1, 63], $V6 = [1, 64], $V7 = [1, 65], $V8 = [1, 66], $V9 = [1, 67], $Va = [1, 68], $Vb = [1, 69], $Vc = [1, 29], $Vd = [1, 30], $Ve = [1, 31], $Vf = [1, 32], $Vg = [1, 33], $Vh = [1, 34], $Vi = [1, 35], $Vj = [1, 36], $Vk = [1, 37], $Vl = [1, 38], $Vm = [1, 39], $Vn = [1, 40], $Vo = [1, 41], $Vp = [1, 42], $Vq = [1, 43], $Vr = [1, 44], $Vs = [1, 45], $Vt = [1, 46], $Vu = [1, 47], $Vv = [1, 48], $Vw = [1, 50], $Vx = [1, 51], $Vy = [1, 52], $Vz = [1, 53], $VA = [1, 54], $VB = [1, 55], $VC = [1, 56], $VD = [1, 57], $VE = [1, 58], $VF = [1, 59], $VG = [1, 60], $VH = [14, 42], $VI = [14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VJ = [12, 14, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74], $VK = [1, 82], $VL = [1, 83], $VM = [1, 84], $VN = [1, 85], $VO = [12, 14, 42], $VP = [12, 14, 33, 42], $VQ = [12, 14, 33, 42, 76, 77, 79, 80], $VR = [12, 33], $VS = [34, 36, 37, 38, 39, 40, 41, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74];
25
+ var parser2 = {
26
+ trace: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function trace() {
27
+ }, "trace"),
28
+ yy: {},
29
+ symbols_: { "error": 2, "start": 3, "mermaidDoc": 4, "direction": 5, "direction_tb": 6, "direction_bt": 7, "direction_rl": 8, "direction_lr": 9, "graphConfig": 10, "C4_CONTEXT": 11, "NEWLINE": 12, "statements": 13, "EOF": 14, "C4_CONTAINER": 15, "C4_COMPONENT": 16, "C4_DYNAMIC": 17, "C4_DEPLOYMENT": 18, "otherStatements": 19, "diagramStatements": 20, "otherStatement": 21, "title": 22, "accDescription": 23, "acc_title": 24, "acc_title_value": 25, "acc_descr": 26, "acc_descr_value": 27, "acc_descr_multiline_value": 28, "boundaryStatement": 29, "boundaryStartStatement": 30, "boundaryStopStatement": 31, "boundaryStart": 32, "LBRACE": 33, "ENTERPRISE_BOUNDARY": 34, "attributes": 35, "SYSTEM_BOUNDARY": 36, "BOUNDARY": 37, "CONTAINER_BOUNDARY": 38, "NODE": 39, "NODE_L": 40, "NODE_R": 41, "RBRACE": 42, "diagramStatement": 43, "PERSON": 44, "PERSON_EXT": 45, "SYSTEM": 46, "SYSTEM_DB": 47, "SYSTEM_QUEUE": 48, "SYSTEM_EXT": 49, "SYSTEM_EXT_DB": 50, "SYSTEM_EXT_QUEUE": 51, "CONTAINER": 52, "CONTAINER_DB": 53, "CONTAINER_QUEUE": 54, "CONTAINER_EXT": 55, "CONTAINER_EXT_DB": 56, "CONTAINER_EXT_QUEUE": 57, "COMPONENT": 58, "COMPONENT_DB": 59, "COMPONENT_QUEUE": 60, "COMPONENT_EXT": 61, "COMPONENT_EXT_DB": 62, "COMPONENT_EXT_QUEUE": 63, "REL": 64, "BIREL": 65, "REL_U": 66, "REL_D": 67, "REL_L": 68, "REL_R": 69, "REL_B": 70, "REL_INDEX": 71, "UPDATE_EL_STYLE": 72, "UPDATE_REL_STYLE": 73, "UPDATE_LAYOUT_CONFIG": 74, "attribute": 75, "STR": 76, "STR_KEY": 77, "STR_VALUE": 78, "ATTRIBUTE": 79, "ATTRIBUTE_EMPTY": 80, "$accept": 0, "$end": 1 },
30
+ terminals_: { 2: "error", 6: "direction_tb", 7: "direction_bt", 8: "direction_rl", 9: "direction_lr", 11: "C4_CONTEXT", 12: "NEWLINE", 14: "EOF", 15: "C4_CONTAINER", 16: "C4_COMPONENT", 17: "C4_DYNAMIC", 18: "C4_DEPLOYMENT", 22: "title", 23: "accDescription", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "LBRACE", 34: "ENTERPRISE_BOUNDARY", 36: "SYSTEM_BOUNDARY", 37: "BOUNDARY", 38: "CONTAINER_BOUNDARY", 39: "NODE", 40: "NODE_L", 41: "NODE_R", 42: "RBRACE", 44: "PERSON", 45: "PERSON_EXT", 46: "SYSTEM", 47: "SYSTEM_DB", 48: "SYSTEM_QUEUE", 49: "SYSTEM_EXT", 50: "SYSTEM_EXT_DB", 51: "SYSTEM_EXT_QUEUE", 52: "CONTAINER", 53: "CONTAINER_DB", 54: "CONTAINER_QUEUE", 55: "CONTAINER_EXT", 56: "CONTAINER_EXT_DB", 57: "CONTAINER_EXT_QUEUE", 58: "COMPONENT", 59: "COMPONENT_DB", 60: "COMPONENT_QUEUE", 61: "COMPONENT_EXT", 62: "COMPONENT_EXT_DB", 63: "COMPONENT_EXT_QUEUE", 64: "REL", 65: "BIREL", 66: "REL_U", 67: "REL_D", 68: "REL_L", 69: "REL_R", 70: "REL_B", 71: "REL_INDEX", 72: "UPDATE_EL_STYLE", 73: "UPDATE_REL_STYLE", 74: "UPDATE_LAYOUT_CONFIG", 76: "STR", 77: "STR_KEY", 78: "STR_VALUE", 79: "ATTRIBUTE", 80: "ATTRIBUTE_EMPTY" },
31
+ productions_: [0, [3, 1], [3, 1], [5, 1], [5, 1], [5, 1], [5, 1], [4, 1], [10, 4], [10, 4], [10, 4], [10, 4], [10, 4], [13, 1], [13, 1], [13, 2], [19, 1], [19, 2], [19, 3], [21, 1], [21, 1], [21, 2], [21, 2], [21, 1], [29, 3], [30, 3], [30, 3], [30, 4], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [32, 2], [31, 1], [20, 1], [20, 2], [20, 3], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 1], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [43, 2], [35, 1], [35, 2], [75, 1], [75, 2], [75, 1], [75, 1]],
32
+ performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
33
+ var $0 = $$.length - 1;
34
+ switch (yystate) {
35
+ case 3:
36
+ yy.setDirection("TB");
37
+ break;
38
+ case 4:
39
+ yy.setDirection("BT");
40
+ break;
41
+ case 5:
42
+ yy.setDirection("RL");
43
+ break;
44
+ case 6:
45
+ yy.setDirection("LR");
46
+ break;
47
+ case 8:
48
+ case 9:
49
+ case 10:
50
+ case 11:
51
+ case 12:
52
+ yy.setC4Type($$[$0 - 3]);
53
+ break;
54
+ case 19:
55
+ yy.setTitle($$[$0].substring(6));
56
+ this.$ = $$[$0].substring(6);
57
+ break;
58
+ case 20:
59
+ yy.setAccDescription($$[$0].substring(15));
60
+ this.$ = $$[$0].substring(15);
61
+ break;
62
+ case 21:
63
+ this.$ = $$[$0].trim();
64
+ yy.setTitle(this.$);
65
+ break;
66
+ case 22:
67
+ case 23:
68
+ this.$ = $$[$0].trim();
69
+ yy.setAccDescription(this.$);
70
+ break;
71
+ case 28:
72
+ $$[$0].splice(2, 0, "ENTERPRISE");
73
+ yy.addPersonOrSystemBoundary(...$$[$0]);
74
+ this.$ = $$[$0];
75
+ break;
76
+ case 29:
77
+ $$[$0].splice(2, 0, "SYSTEM");
78
+ yy.addPersonOrSystemBoundary(...$$[$0]);
79
+ this.$ = $$[$0];
80
+ break;
81
+ case 30:
82
+ yy.addPersonOrSystemBoundary(...$$[$0]);
83
+ this.$ = $$[$0];
84
+ break;
85
+ case 31:
86
+ $$[$0].splice(2, 0, "CONTAINER");
87
+ yy.addContainerBoundary(...$$[$0]);
88
+ this.$ = $$[$0];
89
+ break;
90
+ case 32:
91
+ yy.addDeploymentNode("node", ...$$[$0]);
92
+ this.$ = $$[$0];
93
+ break;
94
+ case 33:
95
+ yy.addDeploymentNode("nodeL", ...$$[$0]);
96
+ this.$ = $$[$0];
97
+ break;
98
+ case 34:
99
+ yy.addDeploymentNode("nodeR", ...$$[$0]);
100
+ this.$ = $$[$0];
101
+ break;
102
+ case 35:
103
+ yy.popBoundaryParseStack();
104
+ break;
105
+ case 39:
106
+ yy.addPersonOrSystem("person", ...$$[$0]);
107
+ this.$ = $$[$0];
108
+ break;
109
+ case 40:
110
+ yy.addPersonOrSystem("external_person", ...$$[$0]);
111
+ this.$ = $$[$0];
112
+ break;
113
+ case 41:
114
+ yy.addPersonOrSystem("system", ...$$[$0]);
115
+ this.$ = $$[$0];
116
+ break;
117
+ case 42:
118
+ yy.addPersonOrSystem("system_db", ...$$[$0]);
119
+ this.$ = $$[$0];
120
+ break;
121
+ case 43:
122
+ yy.addPersonOrSystem("system_queue", ...$$[$0]);
123
+ this.$ = $$[$0];
124
+ break;
125
+ case 44:
126
+ yy.addPersonOrSystem("external_system", ...$$[$0]);
127
+ this.$ = $$[$0];
128
+ break;
129
+ case 45:
130
+ yy.addPersonOrSystem("external_system_db", ...$$[$0]);
131
+ this.$ = $$[$0];
132
+ break;
133
+ case 46:
134
+ yy.addPersonOrSystem("external_system_queue", ...$$[$0]);
135
+ this.$ = $$[$0];
136
+ break;
137
+ case 47:
138
+ yy.addContainer("container", ...$$[$0]);
139
+ this.$ = $$[$0];
140
+ break;
141
+ case 48:
142
+ yy.addContainer("container_db", ...$$[$0]);
143
+ this.$ = $$[$0];
144
+ break;
145
+ case 49:
146
+ yy.addContainer("container_queue", ...$$[$0]);
147
+ this.$ = $$[$0];
148
+ break;
149
+ case 50:
150
+ yy.addContainer("external_container", ...$$[$0]);
151
+ this.$ = $$[$0];
152
+ break;
153
+ case 51:
154
+ yy.addContainer("external_container_db", ...$$[$0]);
155
+ this.$ = $$[$0];
156
+ break;
157
+ case 52:
158
+ yy.addContainer("external_container_queue", ...$$[$0]);
159
+ this.$ = $$[$0];
160
+ break;
161
+ case 53:
162
+ yy.addComponent("component", ...$$[$0]);
163
+ this.$ = $$[$0];
164
+ break;
165
+ case 54:
166
+ yy.addComponent("component_db", ...$$[$0]);
167
+ this.$ = $$[$0];
168
+ break;
169
+ case 55:
170
+ yy.addComponent("component_queue", ...$$[$0]);
171
+ this.$ = $$[$0];
172
+ break;
173
+ case 56:
174
+ yy.addComponent("external_component", ...$$[$0]);
175
+ this.$ = $$[$0];
176
+ break;
177
+ case 57:
178
+ yy.addComponent("external_component_db", ...$$[$0]);
179
+ this.$ = $$[$0];
180
+ break;
181
+ case 58:
182
+ yy.addComponent("external_component_queue", ...$$[$0]);
183
+ this.$ = $$[$0];
184
+ break;
185
+ case 60:
186
+ yy.addRel("rel", ...$$[$0]);
187
+ this.$ = $$[$0];
188
+ break;
189
+ case 61:
190
+ yy.addRel("birel", ...$$[$0]);
191
+ this.$ = $$[$0];
192
+ break;
193
+ case 62:
194
+ yy.addRel("rel_u", ...$$[$0]);
195
+ this.$ = $$[$0];
196
+ break;
197
+ case 63:
198
+ yy.addRel("rel_d", ...$$[$0]);
199
+ this.$ = $$[$0];
200
+ break;
201
+ case 64:
202
+ yy.addRel("rel_l", ...$$[$0]);
203
+ this.$ = $$[$0];
204
+ break;
205
+ case 65:
206
+ yy.addRel("rel_r", ...$$[$0]);
207
+ this.$ = $$[$0];
208
+ break;
209
+ case 66:
210
+ yy.addRel("rel_b", ...$$[$0]);
211
+ this.$ = $$[$0];
212
+ break;
213
+ case 67:
214
+ $$[$0].splice(0, 1);
215
+ yy.addRel("rel", ...$$[$0]);
216
+ this.$ = $$[$0];
217
+ break;
218
+ case 68:
219
+ yy.updateElStyle("update_el_style", ...$$[$0]);
220
+ this.$ = $$[$0];
221
+ break;
222
+ case 69:
223
+ yy.updateRelStyle("update_rel_style", ...$$[$0]);
224
+ this.$ = $$[$0];
225
+ break;
226
+ case 70:
227
+ yy.updateLayoutConfig("update_layout_config", ...$$[$0]);
228
+ this.$ = $$[$0];
229
+ break;
230
+ case 71:
231
+ this.$ = [$$[$0]];
232
+ break;
233
+ case 72:
234
+ $$[$0].unshift($$[$0 - 1]);
235
+ this.$ = $$[$0];
236
+ break;
237
+ case 73:
238
+ case 75:
239
+ this.$ = $$[$0].trim();
240
+ break;
241
+ case 74:
242
+ let kv = {};
243
+ kv[$$[$0 - 1].trim()] = $$[$0].trim();
244
+ this.$ = kv;
245
+ break;
246
+ case 76:
247
+ this.$ = "";
248
+ break;
249
+ }
250
+ }, "anonymous"),
251
+ table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 7: [1, 6], 8: [1, 7], 9: [1, 8], 10: 4, 11: [1, 9], 15: [1, 10], 16: [1, 11], 17: [1, 12], 18: [1, 13] }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 7] }, { 1: [2, 3] }, { 1: [2, 4] }, { 1: [2, 5] }, { 1: [2, 6] }, { 12: [1, 14] }, { 12: [1, 15] }, { 12: [1, 16] }, { 12: [1, 17] }, { 12: [1, 18] }, { 13: 19, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 14: [1, 74] }, o($VH, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VH, [2, 14]), o($VI, [2, 16], { 12: [1, 76] }), o($VH, [2, 36], { 12: [1, 77] }), o($VJ, [2, 19]), o($VJ, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, o($VJ, [2, 23]), { 35: 80, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 86, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 87, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 88, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 89, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 90, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 91, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 92, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 93, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 94, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 95, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 96, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 97, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 98, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 99, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 100, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 101, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 102, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 103, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 104, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, o($VO, [2, 59]), { 35: 105, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 106, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 107, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 108, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 109, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 110, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 111, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 112, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 113, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 114, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 115, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 43: 23, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 120, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 121, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 122, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 123, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 124, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 35: 125, 75: 81, 76: $VK, 77: $VL, 79: $VM, 80: $VN }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, o($VH, [2, 15]), o($VI, [2, 17], { 21: 22, 19: 130, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4 }), o($VH, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: $V0, 23: $V1, 24: $V2, 26: $V3, 28: $V4, 34: $V5, 36: $V6, 37: $V7, 38: $V8, 39: $V9, 40: $Va, 41: $Vb, 44: $Vc, 45: $Vd, 46: $Ve, 47: $Vf, 48: $Vg, 49: $Vh, 50: $Vi, 51: $Vj, 52: $Vk, 53: $Vl, 54: $Vm, 55: $Vn, 56: $Vo, 57: $Vp, 58: $Vq, 59: $Vr, 60: $Vs, 61: $Vt, 62: $Vu, 63: $Vv, 64: $Vw, 65: $Vx, 66: $Vy, 67: $Vz, 68: $VA, 69: $VB, 70: $VC, 71: $VD, 72: $VE, 73: $VF, 74: $VG }), o($VJ, [2, 21]), o($VJ, [2, 22]), o($VO, [2, 39]), o($VP, [2, 71], { 75: 81, 35: 132, 76: $VK, 77: $VL, 79: $VM, 80: $VN }), o($VQ, [2, 73]), { 78: [1, 133] }, o($VQ, [2, 75]), o($VQ, [2, 76]), o($VO, [2, 40]), o($VO, [2, 41]), o($VO, [2, 42]), o($VO, [2, 43]), o($VO, [2, 44]), o($VO, [2, 45]), o($VO, [2, 46]), o($VO, [2, 47]), o($VO, [2, 48]), o($VO, [2, 49]), o($VO, [2, 50]), o($VO, [2, 51]), o($VO, [2, 52]), o($VO, [2, 53]), o($VO, [2, 54]), o($VO, [2, 55]), o($VO, [2, 56]), o($VO, [2, 57]), o($VO, [2, 58]), o($VO, [2, 60]), o($VO, [2, 61]), o($VO, [2, 62]), o($VO, [2, 63]), o($VO, [2, 64]), o($VO, [2, 65]), o($VO, [2, 66]), o($VO, [2, 67]), o($VO, [2, 68]), o($VO, [2, 69]), o($VO, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, o($VR, [2, 28]), o($VR, [2, 29]), o($VR, [2, 30]), o($VR, [2, 31]), o($VR, [2, 32]), o($VR, [2, 33]), o($VR, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, o($VI, [2, 18]), o($VH, [2, 38]), o($VP, [2, 72]), o($VQ, [2, 74]), o($VO, [2, 24]), o($VO, [2, 35]), o($VS, [2, 25]), o($VS, [2, 26], { 12: [1, 138] }), o($VS, [2, 27])],
252
+ defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 7], 5: [2, 3], 6: [2, 4], 7: [2, 5], 8: [2, 6], 74: [2, 8], 126: [2, 9], 127: [2, 10], 128: [2, 11], 129: [2, 12] },
253
+ parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function parseError(str, hash) {
254
+ if (hash.recoverable) {
255
+ this.trace(str);
256
+ } else {
257
+ var error = new Error(str);
258
+ error.hash = hash;
259
+ throw error;
260
+ }
261
+ }, "parseError"),
262
+ parse: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function parse(input) {
263
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
264
+ var args = lstack.slice.call(arguments, 1);
265
+ var lexer2 = Object.create(this.lexer);
266
+ var sharedState = { yy: {} };
267
+ for (var k in this.yy) {
268
+ if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
269
+ sharedState.yy[k] = this.yy[k];
270
+ }
271
+ }
272
+ lexer2.setInput(input, sharedState.yy);
273
+ sharedState.yy.lexer = lexer2;
274
+ sharedState.yy.parser = this;
275
+ if (typeof lexer2.yylloc == "undefined") {
276
+ lexer2.yylloc = {};
277
+ }
278
+ var yyloc = lexer2.yylloc;
279
+ lstack.push(yyloc);
280
+ var ranges = lexer2.options && lexer2.options.ranges;
281
+ if (typeof sharedState.yy.parseError === "function") {
282
+ this.parseError = sharedState.yy.parseError;
283
+ } else {
284
+ this.parseError = Object.getPrototypeOf(this).parseError;
285
+ }
286
+ function popStack(n) {
287
+ stack.length = stack.length - 2 * n;
288
+ vstack.length = vstack.length - n;
289
+ lstack.length = lstack.length - n;
290
+ }
291
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(popStack, "popStack");
292
+ function lex() {
293
+ var token;
294
+ token = tstack.pop() || lexer2.lex() || EOF;
295
+ if (typeof token !== "number") {
296
+ if (token instanceof Array) {
297
+ tstack = token;
298
+ token = tstack.pop();
299
+ }
300
+ token = self.symbols_[token] || token;
301
+ }
302
+ return token;
303
+ }
304
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(lex, "lex");
305
+ var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
306
+ while (true) {
307
+ state = stack[stack.length - 1];
308
+ if (this.defaultActions[state]) {
309
+ action = this.defaultActions[state];
310
+ } else {
311
+ if (symbol === null || typeof symbol == "undefined") {
312
+ symbol = lex();
313
+ }
314
+ action = table[state] && table[state][symbol];
315
+ }
316
+ if (typeof action === "undefined" || !action.length || !action[0]) {
317
+ var errStr = "";
318
+ expected = [];
319
+ for (p in table[state]) {
320
+ if (this.terminals_[p] && p > TERROR) {
321
+ expected.push("'" + this.terminals_[p] + "'");
322
+ }
323
+ }
324
+ if (lexer2.showPosition) {
325
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
326
+ } else {
327
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
328
+ }
329
+ this.parseError(errStr, {
330
+ text: lexer2.match,
331
+ token: this.terminals_[symbol] || symbol,
332
+ line: lexer2.yylineno,
333
+ loc: yyloc,
334
+ expected
335
+ });
336
+ }
337
+ if (action[0] instanceof Array && action.length > 1) {
338
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
339
+ }
340
+ switch (action[0]) {
341
+ case 1:
342
+ stack.push(symbol);
343
+ vstack.push(lexer2.yytext);
344
+ lstack.push(lexer2.yylloc);
345
+ stack.push(action[1]);
346
+ symbol = null;
347
+ if (!preErrorSymbol) {
348
+ yyleng = lexer2.yyleng;
349
+ yytext = lexer2.yytext;
350
+ yylineno = lexer2.yylineno;
351
+ yyloc = lexer2.yylloc;
352
+ if (recovering > 0) {
353
+ recovering--;
354
+ }
355
+ } else {
356
+ symbol = preErrorSymbol;
357
+ preErrorSymbol = null;
358
+ }
359
+ break;
360
+ case 2:
361
+ len = this.productions_[action[1]][1];
362
+ yyval.$ = vstack[vstack.length - len];
363
+ yyval._$ = {
364
+ first_line: lstack[lstack.length - (len || 1)].first_line,
365
+ last_line: lstack[lstack.length - 1].last_line,
366
+ first_column: lstack[lstack.length - (len || 1)].first_column,
367
+ last_column: lstack[lstack.length - 1].last_column
368
+ };
369
+ if (ranges) {
370
+ yyval._$.range = [
371
+ lstack[lstack.length - (len || 1)].range[0],
372
+ lstack[lstack.length - 1].range[1]
373
+ ];
374
+ }
375
+ r = this.performAction.apply(yyval, [
376
+ yytext,
377
+ yyleng,
378
+ yylineno,
379
+ sharedState.yy,
380
+ action[1],
381
+ vstack,
382
+ lstack
383
+ ].concat(args));
384
+ if (typeof r !== "undefined") {
385
+ return r;
386
+ }
387
+ if (len) {
388
+ stack = stack.slice(0, -1 * len * 2);
389
+ vstack = vstack.slice(0, -1 * len);
390
+ lstack = lstack.slice(0, -1 * len);
391
+ }
392
+ stack.push(this.productions_[action[1]][0]);
393
+ vstack.push(yyval.$);
394
+ lstack.push(yyval._$);
395
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
396
+ stack.push(newState);
397
+ break;
398
+ case 3:
399
+ return true;
400
+ }
401
+ }
402
+ return true;
403
+ }, "parse")
404
+ };
405
+ var lexer = /* @__PURE__ */ function() {
406
+ var lexer2 = {
407
+ EOF: 1,
408
+ parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function parseError(str, hash) {
409
+ if (this.yy.parser) {
410
+ this.yy.parser.parseError(str, hash);
411
+ } else {
412
+ throw new Error(str);
413
+ }
414
+ }, "parseError"),
415
+ // resets the lexer, sets new input
416
+ setInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(input, yy) {
417
+ this.yy = yy || this.yy || {};
418
+ this._input = input;
419
+ this._more = this._backtrack = this.done = false;
420
+ this.yylineno = this.yyleng = 0;
421
+ this.yytext = this.matched = this.match = "";
422
+ this.conditionStack = ["INITIAL"];
423
+ this.yylloc = {
424
+ first_line: 1,
425
+ first_column: 0,
426
+ last_line: 1,
427
+ last_column: 0
428
+ };
429
+ if (this.options.ranges) {
430
+ this.yylloc.range = [0, 0];
431
+ }
432
+ this.offset = 0;
433
+ return this;
434
+ }, "setInput"),
435
+ // consumes and returns one char from the input
436
+ input: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
437
+ var ch = this._input[0];
438
+ this.yytext += ch;
439
+ this.yyleng++;
440
+ this.offset++;
441
+ this.match += ch;
442
+ this.matched += ch;
443
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
444
+ if (lines) {
445
+ this.yylineno++;
446
+ this.yylloc.last_line++;
447
+ } else {
448
+ this.yylloc.last_column++;
449
+ }
450
+ if (this.options.ranges) {
451
+ this.yylloc.range[1]++;
452
+ }
453
+ this._input = this._input.slice(1);
454
+ return ch;
455
+ }, "input"),
456
+ // unshifts one char (or a string) into the input
457
+ unput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(ch) {
458
+ var len = ch.length;
459
+ var lines = ch.split(/(?:\r\n?|\n)/g);
460
+ this._input = ch + this._input;
461
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
462
+ this.offset -= len;
463
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
464
+ this.match = this.match.substr(0, this.match.length - 1);
465
+ this.matched = this.matched.substr(0, this.matched.length - 1);
466
+ if (lines.length - 1) {
467
+ this.yylineno -= lines.length - 1;
468
+ }
469
+ var r = this.yylloc.range;
470
+ this.yylloc = {
471
+ first_line: this.yylloc.first_line,
472
+ last_line: this.yylineno + 1,
473
+ first_column: this.yylloc.first_column,
474
+ 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
475
+ };
476
+ if (this.options.ranges) {
477
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
478
+ }
479
+ this.yyleng = this.yytext.length;
480
+ return this;
481
+ }, "unput"),
482
+ // When called from action, caches matched text and appends it on next action
483
+ more: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
484
+ this._more = true;
485
+ return this;
486
+ }, "more"),
487
+ // 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.
488
+ reject: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
489
+ if (this.options.backtrack_lexer) {
490
+ this._backtrack = true;
491
+ } else {
492
+ 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(), {
493
+ text: "",
494
+ token: null,
495
+ line: this.yylineno
496
+ });
497
+ }
498
+ return this;
499
+ }, "reject"),
500
+ // retain first n characters of the match
501
+ less: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(n) {
502
+ this.unput(this.match.slice(n));
503
+ }, "less"),
504
+ // displays already matched input, i.e. for error messages
505
+ pastInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
506
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
507
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
508
+ }, "pastInput"),
509
+ // displays upcoming input, i.e. for error messages
510
+ upcomingInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
511
+ var next = this.match;
512
+ if (next.length < 20) {
513
+ next += this._input.substr(0, 20 - next.length);
514
+ }
515
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
516
+ }, "upcomingInput"),
517
+ // displays the character position where the lexing error occurred, i.e. for error messages
518
+ showPosition: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
519
+ var pre = this.pastInput();
520
+ var c2 = new Array(pre.length + 1).join("-");
521
+ return pre + this.upcomingInput() + "\n" + c2 + "^";
522
+ }, "showPosition"),
523
+ // test the lexed token: return FALSE when not a match, otherwise return token
524
+ test_match: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(match, indexed_rule) {
525
+ var token, lines, backup;
526
+ if (this.options.backtrack_lexer) {
527
+ backup = {
528
+ yylineno: this.yylineno,
529
+ yylloc: {
530
+ first_line: this.yylloc.first_line,
531
+ last_line: this.last_line,
532
+ first_column: this.yylloc.first_column,
533
+ last_column: this.yylloc.last_column
534
+ },
535
+ yytext: this.yytext,
536
+ match: this.match,
537
+ matches: this.matches,
538
+ matched: this.matched,
539
+ yyleng: this.yyleng,
540
+ offset: this.offset,
541
+ _more: this._more,
542
+ _input: this._input,
543
+ yy: this.yy,
544
+ conditionStack: this.conditionStack.slice(0),
545
+ done: this.done
546
+ };
547
+ if (this.options.ranges) {
548
+ backup.yylloc.range = this.yylloc.range.slice(0);
549
+ }
550
+ }
551
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
552
+ if (lines) {
553
+ this.yylineno += lines.length;
554
+ }
555
+ this.yylloc = {
556
+ first_line: this.yylloc.last_line,
557
+ last_line: this.yylineno + 1,
558
+ first_column: this.yylloc.last_column,
559
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
560
+ };
561
+ this.yytext += match[0];
562
+ this.match += match[0];
563
+ this.matches = match;
564
+ this.yyleng = this.yytext.length;
565
+ if (this.options.ranges) {
566
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
567
+ }
568
+ this._more = false;
569
+ this._backtrack = false;
570
+ this._input = this._input.slice(match[0].length);
571
+ this.matched += match[0];
572
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
573
+ if (this.done && this._input) {
574
+ this.done = false;
575
+ }
576
+ if (token) {
577
+ return token;
578
+ } else if (this._backtrack) {
579
+ for (var k in backup) {
580
+ this[k] = backup[k];
581
+ }
582
+ return false;
583
+ }
584
+ return false;
585
+ }, "test_match"),
586
+ // return next match in input
587
+ next: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
588
+ if (this.done) {
589
+ return this.EOF;
590
+ }
591
+ if (!this._input) {
592
+ this.done = true;
593
+ }
594
+ var token, match, tempMatch, index;
595
+ if (!this._more) {
596
+ this.yytext = "";
597
+ this.match = "";
598
+ }
599
+ var rules = this._currentRules();
600
+ for (var i = 0; i < rules.length; i++) {
601
+ tempMatch = this._input.match(this.rules[rules[i]]);
602
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
603
+ match = tempMatch;
604
+ index = i;
605
+ if (this.options.backtrack_lexer) {
606
+ token = this.test_match(tempMatch, rules[i]);
607
+ if (token !== false) {
608
+ return token;
609
+ } else if (this._backtrack) {
610
+ match = false;
611
+ continue;
612
+ } else {
613
+ return false;
614
+ }
615
+ } else if (!this.options.flex) {
616
+ break;
617
+ }
618
+ }
619
+ }
620
+ if (match) {
621
+ token = this.test_match(match, rules[index]);
622
+ if (token !== false) {
623
+ return token;
624
+ }
625
+ return false;
626
+ }
627
+ if (this._input === "") {
628
+ return this.EOF;
629
+ } else {
630
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
631
+ text: "",
632
+ token: null,
633
+ line: this.yylineno
634
+ });
635
+ }
636
+ }, "next"),
637
+ // return next match that has a token
638
+ lex: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function lex() {
639
+ var r = this.next();
640
+ if (r) {
641
+ return r;
642
+ } else {
643
+ return this.lex();
644
+ }
645
+ }, "lex"),
646
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
647
+ begin: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function begin(condition) {
648
+ this.conditionStack.push(condition);
649
+ }, "begin"),
650
+ // pop the previously active lexer condition state off the condition stack
651
+ popState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function popState() {
652
+ var n = this.conditionStack.length - 1;
653
+ if (n > 0) {
654
+ return this.conditionStack.pop();
655
+ } else {
656
+ return this.conditionStack[0];
657
+ }
658
+ }, "popState"),
659
+ // produce the lexer rule set which is active for the currently active lexer condition state
660
+ _currentRules: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function _currentRules() {
661
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
662
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
663
+ } else {
664
+ return this.conditions["INITIAL"].rules;
665
+ }
666
+ }, "_currentRules"),
667
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
668
+ topState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function topState(n) {
669
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
670
+ if (n >= 0) {
671
+ return this.conditionStack[n];
672
+ } else {
673
+ return "INITIAL";
674
+ }
675
+ }, "topState"),
676
+ // alias for begin(condition)
677
+ pushState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function pushState(condition) {
678
+ this.begin(condition);
679
+ }, "pushState"),
680
+ // return the number of states currently on the stack
681
+ stateStackSize: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function stateStackSize() {
682
+ return this.conditionStack.length;
683
+ }, "stateStackSize"),
684
+ options: {},
685
+ performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
686
+ var YYSTATE = YY_START;
687
+ switch ($avoiding_name_collisions) {
688
+ case 0:
689
+ return 6;
690
+ break;
691
+ case 1:
692
+ return 7;
693
+ break;
694
+ case 2:
695
+ return 8;
696
+ break;
697
+ case 3:
698
+ return 9;
699
+ break;
700
+ case 4:
701
+ return 22;
702
+ break;
703
+ case 5:
704
+ return 23;
705
+ break;
706
+ case 6:
707
+ this.begin("acc_title");
708
+ return 24;
709
+ break;
710
+ case 7:
711
+ this.popState();
712
+ return "acc_title_value";
713
+ break;
714
+ case 8:
715
+ this.begin("acc_descr");
716
+ return 26;
717
+ break;
718
+ case 9:
719
+ this.popState();
720
+ return "acc_descr_value";
721
+ break;
722
+ case 10:
723
+ this.begin("acc_descr_multiline");
724
+ break;
725
+ case 11:
726
+ this.popState();
727
+ break;
728
+ case 12:
729
+ return "acc_descr_multiline_value";
730
+ break;
731
+ case 13:
732
+ break;
733
+ case 14:
734
+ c;
735
+ break;
736
+ case 15:
737
+ return 12;
738
+ break;
739
+ case 16:
740
+ break;
741
+ case 17:
742
+ return 11;
743
+ break;
744
+ case 18:
745
+ return 15;
746
+ break;
747
+ case 19:
748
+ return 16;
749
+ break;
750
+ case 20:
751
+ return 17;
752
+ break;
753
+ case 21:
754
+ return 18;
755
+ break;
756
+ case 22:
757
+ this.begin("person_ext");
758
+ return 45;
759
+ break;
760
+ case 23:
761
+ this.begin("person");
762
+ return 44;
763
+ break;
764
+ case 24:
765
+ this.begin("system_ext_queue");
766
+ return 51;
767
+ break;
768
+ case 25:
769
+ this.begin("system_ext_db");
770
+ return 50;
771
+ break;
772
+ case 26:
773
+ this.begin("system_ext");
774
+ return 49;
775
+ break;
776
+ case 27:
777
+ this.begin("system_queue");
778
+ return 48;
779
+ break;
780
+ case 28:
781
+ this.begin("system_db");
782
+ return 47;
783
+ break;
784
+ case 29:
785
+ this.begin("system");
786
+ return 46;
787
+ break;
788
+ case 30:
789
+ this.begin("boundary");
790
+ return 37;
791
+ break;
792
+ case 31:
793
+ this.begin("enterprise_boundary");
794
+ return 34;
795
+ break;
796
+ case 32:
797
+ this.begin("system_boundary");
798
+ return 36;
799
+ break;
800
+ case 33:
801
+ this.begin("container_ext_queue");
802
+ return 57;
803
+ break;
804
+ case 34:
805
+ this.begin("container_ext_db");
806
+ return 56;
807
+ break;
808
+ case 35:
809
+ this.begin("container_ext");
810
+ return 55;
811
+ break;
812
+ case 36:
813
+ this.begin("container_queue");
814
+ return 54;
815
+ break;
816
+ case 37:
817
+ this.begin("container_db");
818
+ return 53;
819
+ break;
820
+ case 38:
821
+ this.begin("container");
822
+ return 52;
823
+ break;
824
+ case 39:
825
+ this.begin("container_boundary");
826
+ return 38;
827
+ break;
828
+ case 40:
829
+ this.begin("component_ext_queue");
830
+ return 63;
831
+ break;
832
+ case 41:
833
+ this.begin("component_ext_db");
834
+ return 62;
835
+ break;
836
+ case 42:
837
+ this.begin("component_ext");
838
+ return 61;
839
+ break;
840
+ case 43:
841
+ this.begin("component_queue");
842
+ return 60;
843
+ break;
844
+ case 44:
845
+ this.begin("component_db");
846
+ return 59;
847
+ break;
848
+ case 45:
849
+ this.begin("component");
850
+ return 58;
851
+ break;
852
+ case 46:
853
+ this.begin("node");
854
+ return 39;
855
+ break;
856
+ case 47:
857
+ this.begin("node");
858
+ return 39;
859
+ break;
860
+ case 48:
861
+ this.begin("node_l");
862
+ return 40;
863
+ break;
864
+ case 49:
865
+ this.begin("node_r");
866
+ return 41;
867
+ break;
868
+ case 50:
869
+ this.begin("rel");
870
+ return 64;
871
+ break;
872
+ case 51:
873
+ this.begin("birel");
874
+ return 65;
875
+ break;
876
+ case 52:
877
+ this.begin("rel_u");
878
+ return 66;
879
+ break;
880
+ case 53:
881
+ this.begin("rel_u");
882
+ return 66;
883
+ break;
884
+ case 54:
885
+ this.begin("rel_d");
886
+ return 67;
887
+ break;
888
+ case 55:
889
+ this.begin("rel_d");
890
+ return 67;
891
+ break;
892
+ case 56:
893
+ this.begin("rel_l");
894
+ return 68;
895
+ break;
896
+ case 57:
897
+ this.begin("rel_l");
898
+ return 68;
899
+ break;
900
+ case 58:
901
+ this.begin("rel_r");
902
+ return 69;
903
+ break;
904
+ case 59:
905
+ this.begin("rel_r");
906
+ return 69;
907
+ break;
908
+ case 60:
909
+ this.begin("rel_b");
910
+ return 70;
911
+ break;
912
+ case 61:
913
+ this.begin("rel_index");
914
+ return 71;
915
+ break;
916
+ case 62:
917
+ this.begin("update_el_style");
918
+ return 72;
919
+ break;
920
+ case 63:
921
+ this.begin("update_rel_style");
922
+ return 73;
923
+ break;
924
+ case 64:
925
+ this.begin("update_layout_config");
926
+ return 74;
927
+ break;
928
+ case 65:
929
+ return "EOF_IN_STRUCT";
930
+ break;
931
+ case 66:
932
+ this.begin("attribute");
933
+ return "ATTRIBUTE_EMPTY";
934
+ break;
935
+ case 67:
936
+ this.begin("attribute");
937
+ break;
938
+ case 68:
939
+ this.popState();
940
+ this.popState();
941
+ break;
942
+ case 69:
943
+ return 80;
944
+ break;
945
+ case 70:
946
+ break;
947
+ case 71:
948
+ return 80;
949
+ break;
950
+ case 72:
951
+ this.begin("string");
952
+ break;
953
+ case 73:
954
+ this.popState();
955
+ break;
956
+ case 74:
957
+ return "STR";
958
+ break;
959
+ case 75:
960
+ this.begin("string_kv");
961
+ break;
962
+ case 76:
963
+ this.begin("string_kv_key");
964
+ return "STR_KEY";
965
+ break;
966
+ case 77:
967
+ this.popState();
968
+ this.begin("string_kv_value");
969
+ break;
970
+ case 78:
971
+ return "STR_VALUE";
972
+ break;
973
+ case 79:
974
+ this.popState();
975
+ this.popState();
976
+ break;
977
+ case 80:
978
+ return "STR";
979
+ break;
980
+ case 81:
981
+ return "LBRACE";
982
+ break;
983
+ case 82:
984
+ return "RBRACE";
985
+ break;
986
+ case 83:
987
+ return "SPACE";
988
+ break;
989
+ case 84:
990
+ return "EOL";
991
+ break;
992
+ case 85:
993
+ return 14;
994
+ break;
995
+ }
996
+ }, "anonymous"),
997
+ rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/],
998
+ conditions: { "acc_descr_multiline": { "rules": [11, 12], "inclusive": false }, "acc_descr": { "rules": [9], "inclusive": false }, "acc_title": { "rules": [7], "inclusive": false }, "string_kv_value": { "rules": [78, 79], "inclusive": false }, "string_kv_key": { "rules": [77], "inclusive": false }, "string_kv": { "rules": [76], "inclusive": false }, "string": { "rules": [73, 74], "inclusive": false }, "attribute": { "rules": [68, 69, 70, 71, 72, 75, 80], "inclusive": false }, "update_layout_config": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_rel_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "update_el_style": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_b": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_d": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_u": { "rules": [65, 66, 67, 68], "inclusive": false }, "rel_bi": { "rules": [], "inclusive": false }, "rel": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_r": { "rules": [65, 66, 67, 68], "inclusive": false }, "node_l": { "rules": [65, 66, 67, 68], "inclusive": false }, "node": { "rules": [65, 66, 67, 68], "inclusive": false }, "index": { "rules": [], "inclusive": false }, "rel_index": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext_queue": { "rules": [], "inclusive": false }, "component_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "component_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "component": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "container_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "container": { "rules": [65, 66, 67, 68], "inclusive": false }, "birel": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "enterprise_boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "boundary": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_queue": { "rules": [65, 66, 67, 68], "inclusive": false }, "system_db": { "rules": [65, 66, 67, 68], "inclusive": false }, "system": { "rules": [65, 66, 67, 68], "inclusive": false }, "person_ext": { "rules": [65, 66, 67, 68], "inclusive": false }, "person": { "rules": [65, 66, 67, 68], "inclusive": false }, "INITIAL": { "rules": [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 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, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 82, 83, 84, 85], "inclusive": true } }
999
+ };
1000
+ return lexer2;
1001
+ }();
1002
+ parser2.lexer = lexer;
1003
+ function Parser() {
1004
+ this.yy = {};
1005
+ }
1006
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(Parser, "Parser");
1007
+ Parser.prototype = parser2;
1008
+ parser2.Parser = Parser;
1009
+ return new Parser();
1010
+ }();
1011
+ parser.parser = parser;
1012
+ var c4Diagram_default = parser;
1013
+
1014
+ // src/diagrams/c4/c4Db.js
1015
+ var c4ShapeArray = [];
1016
+ var boundaryParseStack = [""];
1017
+ var currentBoundaryParse = "global";
1018
+ var parentBoundaryParse = "";
1019
+ var boundaries = [
1020
+ {
1021
+ alias: "global",
1022
+ label: { text: "global" },
1023
+ type: { text: "global" },
1024
+ tags: null,
1025
+ link: null,
1026
+ parentBoundary: ""
1027
+ }
1028
+ ];
1029
+ var rels = [];
1030
+ var title = "";
1031
+ var wrapEnabled = false;
1032
+ var c4ShapeInRow = 4;
1033
+ var c4BoundaryInRow = 2;
1034
+ var c4Type;
1035
+ var getC4Type = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1036
+ return c4Type;
1037
+ }, "getC4Type");
1038
+ var setC4Type = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(c4TypeParam) {
1039
+ let sanitizedText = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .sanitizeText */ .jZ)(c4TypeParam, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getConfig2 */ .D7)());
1040
+ c4Type = sanitizedText;
1041
+ }, "setC4Type");
1042
+ var addRel = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(type, from, to, label, techn, descr, sprite, tags, link) {
1043
+ if (type === void 0 || type === null || from === void 0 || from === null || to === void 0 || to === null || label === void 0 || label === null) {
1044
+ return;
1045
+ }
1046
+ let rel = {};
1047
+ const old = rels.find((rel2) => rel2.from === from && rel2.to === to);
1048
+ if (old) {
1049
+ rel = old;
1050
+ } else {
1051
+ rels.push(rel);
1052
+ }
1053
+ rel.type = type;
1054
+ rel.from = from;
1055
+ rel.to = to;
1056
+ rel.label = { text: label };
1057
+ if (techn === void 0 || techn === null) {
1058
+ rel.techn = { text: "" };
1059
+ } else {
1060
+ if (typeof techn === "object") {
1061
+ let [key, value] = Object.entries(techn)[0];
1062
+ rel[key] = { text: value };
1063
+ } else {
1064
+ rel.techn = { text: techn };
1065
+ }
1066
+ }
1067
+ if (descr === void 0 || descr === null) {
1068
+ rel.descr = { text: "" };
1069
+ } else {
1070
+ if (typeof descr === "object") {
1071
+ let [key, value] = Object.entries(descr)[0];
1072
+ rel[key] = { text: value };
1073
+ } else {
1074
+ rel.descr = { text: descr };
1075
+ }
1076
+ }
1077
+ if (typeof sprite === "object") {
1078
+ let [key, value] = Object.entries(sprite)[0];
1079
+ rel[key] = value;
1080
+ } else {
1081
+ rel.sprite = sprite;
1082
+ }
1083
+ if (typeof tags === "object") {
1084
+ let [key, value] = Object.entries(tags)[0];
1085
+ rel[key] = value;
1086
+ } else {
1087
+ rel.tags = tags;
1088
+ }
1089
+ if (typeof link === "object") {
1090
+ let [key, value] = Object.entries(link)[0];
1091
+ rel[key] = value;
1092
+ } else {
1093
+ rel.link = link;
1094
+ }
1095
+ rel.wrap = autoWrap();
1096
+ }, "addRel");
1097
+ var addPersonOrSystem = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(typeC4Shape, alias, label, descr, sprite, tags, link) {
1098
+ if (alias === null || label === null) {
1099
+ return;
1100
+ }
1101
+ let personOrSystem = {};
1102
+ const old = c4ShapeArray.find((personOrSystem2) => personOrSystem2.alias === alias);
1103
+ if (old && alias === old.alias) {
1104
+ personOrSystem = old;
1105
+ } else {
1106
+ personOrSystem.alias = alias;
1107
+ c4ShapeArray.push(personOrSystem);
1108
+ }
1109
+ if (label === void 0 || label === null) {
1110
+ personOrSystem.label = { text: "" };
1111
+ } else {
1112
+ personOrSystem.label = { text: label };
1113
+ }
1114
+ if (descr === void 0 || descr === null) {
1115
+ personOrSystem.descr = { text: "" };
1116
+ } else {
1117
+ if (typeof descr === "object") {
1118
+ let [key, value] = Object.entries(descr)[0];
1119
+ personOrSystem[key] = { text: value };
1120
+ } else {
1121
+ personOrSystem.descr = { text: descr };
1122
+ }
1123
+ }
1124
+ if (typeof sprite === "object") {
1125
+ let [key, value] = Object.entries(sprite)[0];
1126
+ personOrSystem[key] = value;
1127
+ } else {
1128
+ personOrSystem.sprite = sprite;
1129
+ }
1130
+ if (typeof tags === "object") {
1131
+ let [key, value] = Object.entries(tags)[0];
1132
+ personOrSystem[key] = value;
1133
+ } else {
1134
+ personOrSystem.tags = tags;
1135
+ }
1136
+ if (typeof link === "object") {
1137
+ let [key, value] = Object.entries(link)[0];
1138
+ personOrSystem[key] = value;
1139
+ } else {
1140
+ personOrSystem.link = link;
1141
+ }
1142
+ personOrSystem.typeC4Shape = { text: typeC4Shape };
1143
+ personOrSystem.parentBoundary = currentBoundaryParse;
1144
+ personOrSystem.wrap = autoWrap();
1145
+ }, "addPersonOrSystem");
1146
+ var addContainer = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
1147
+ if (alias === null || label === null) {
1148
+ return;
1149
+ }
1150
+ let container = {};
1151
+ const old = c4ShapeArray.find((container2) => container2.alias === alias);
1152
+ if (old && alias === old.alias) {
1153
+ container = old;
1154
+ } else {
1155
+ container.alias = alias;
1156
+ c4ShapeArray.push(container);
1157
+ }
1158
+ if (label === void 0 || label === null) {
1159
+ container.label = { text: "" };
1160
+ } else {
1161
+ container.label = { text: label };
1162
+ }
1163
+ if (techn === void 0 || techn === null) {
1164
+ container.techn = { text: "" };
1165
+ } else {
1166
+ if (typeof techn === "object") {
1167
+ let [key, value] = Object.entries(techn)[0];
1168
+ container[key] = { text: value };
1169
+ } else {
1170
+ container.techn = { text: techn };
1171
+ }
1172
+ }
1173
+ if (descr === void 0 || descr === null) {
1174
+ container.descr = { text: "" };
1175
+ } else {
1176
+ if (typeof descr === "object") {
1177
+ let [key, value] = Object.entries(descr)[0];
1178
+ container[key] = { text: value };
1179
+ } else {
1180
+ container.descr = { text: descr };
1181
+ }
1182
+ }
1183
+ if (typeof sprite === "object") {
1184
+ let [key, value] = Object.entries(sprite)[0];
1185
+ container[key] = value;
1186
+ } else {
1187
+ container.sprite = sprite;
1188
+ }
1189
+ if (typeof tags === "object") {
1190
+ let [key, value] = Object.entries(tags)[0];
1191
+ container[key] = value;
1192
+ } else {
1193
+ container.tags = tags;
1194
+ }
1195
+ if (typeof link === "object") {
1196
+ let [key, value] = Object.entries(link)[0];
1197
+ container[key] = value;
1198
+ } else {
1199
+ container.link = link;
1200
+ }
1201
+ container.wrap = autoWrap();
1202
+ container.typeC4Shape = { text: typeC4Shape };
1203
+ container.parentBoundary = currentBoundaryParse;
1204
+ }, "addContainer");
1205
+ var addComponent = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
1206
+ if (alias === null || label === null) {
1207
+ return;
1208
+ }
1209
+ let component = {};
1210
+ const old = c4ShapeArray.find((component2) => component2.alias === alias);
1211
+ if (old && alias === old.alias) {
1212
+ component = old;
1213
+ } else {
1214
+ component.alias = alias;
1215
+ c4ShapeArray.push(component);
1216
+ }
1217
+ if (label === void 0 || label === null) {
1218
+ component.label = { text: "" };
1219
+ } else {
1220
+ component.label = { text: label };
1221
+ }
1222
+ if (techn === void 0 || techn === null) {
1223
+ component.techn = { text: "" };
1224
+ } else {
1225
+ if (typeof techn === "object") {
1226
+ let [key, value] = Object.entries(techn)[0];
1227
+ component[key] = { text: value };
1228
+ } else {
1229
+ component.techn = { text: techn };
1230
+ }
1231
+ }
1232
+ if (descr === void 0 || descr === null) {
1233
+ component.descr = { text: "" };
1234
+ } else {
1235
+ if (typeof descr === "object") {
1236
+ let [key, value] = Object.entries(descr)[0];
1237
+ component[key] = { text: value };
1238
+ } else {
1239
+ component.descr = { text: descr };
1240
+ }
1241
+ }
1242
+ if (typeof sprite === "object") {
1243
+ let [key, value] = Object.entries(sprite)[0];
1244
+ component[key] = value;
1245
+ } else {
1246
+ component.sprite = sprite;
1247
+ }
1248
+ if (typeof tags === "object") {
1249
+ let [key, value] = Object.entries(tags)[0];
1250
+ component[key] = value;
1251
+ } else {
1252
+ component.tags = tags;
1253
+ }
1254
+ if (typeof link === "object") {
1255
+ let [key, value] = Object.entries(link)[0];
1256
+ component[key] = value;
1257
+ } else {
1258
+ component.link = link;
1259
+ }
1260
+ component.wrap = autoWrap();
1261
+ component.typeC4Shape = { text: typeC4Shape };
1262
+ component.parentBoundary = currentBoundaryParse;
1263
+ }, "addComponent");
1264
+ var addPersonOrSystemBoundary = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(alias, label, type, tags, link) {
1265
+ if (alias === null || label === null) {
1266
+ return;
1267
+ }
1268
+ let boundary = {};
1269
+ const old = boundaries.find((boundary2) => boundary2.alias === alias);
1270
+ if (old && alias === old.alias) {
1271
+ boundary = old;
1272
+ } else {
1273
+ boundary.alias = alias;
1274
+ boundaries.push(boundary);
1275
+ }
1276
+ if (label === void 0 || label === null) {
1277
+ boundary.label = { text: "" };
1278
+ } else {
1279
+ boundary.label = { text: label };
1280
+ }
1281
+ if (type === void 0 || type === null) {
1282
+ boundary.type = { text: "system" };
1283
+ } else {
1284
+ if (typeof type === "object") {
1285
+ let [key, value] = Object.entries(type)[0];
1286
+ boundary[key] = { text: value };
1287
+ } else {
1288
+ boundary.type = { text: type };
1289
+ }
1290
+ }
1291
+ if (typeof tags === "object") {
1292
+ let [key, value] = Object.entries(tags)[0];
1293
+ boundary[key] = value;
1294
+ } else {
1295
+ boundary.tags = tags;
1296
+ }
1297
+ if (typeof link === "object") {
1298
+ let [key, value] = Object.entries(link)[0];
1299
+ boundary[key] = value;
1300
+ } else {
1301
+ boundary.link = link;
1302
+ }
1303
+ boundary.parentBoundary = currentBoundaryParse;
1304
+ boundary.wrap = autoWrap();
1305
+ parentBoundaryParse = currentBoundaryParse;
1306
+ currentBoundaryParse = alias;
1307
+ boundaryParseStack.push(parentBoundaryParse);
1308
+ }, "addPersonOrSystemBoundary");
1309
+ var addContainerBoundary = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(alias, label, type, tags, link) {
1310
+ if (alias === null || label === null) {
1311
+ return;
1312
+ }
1313
+ let boundary = {};
1314
+ const old = boundaries.find((boundary2) => boundary2.alias === alias);
1315
+ if (old && alias === old.alias) {
1316
+ boundary = old;
1317
+ } else {
1318
+ boundary.alias = alias;
1319
+ boundaries.push(boundary);
1320
+ }
1321
+ if (label === void 0 || label === null) {
1322
+ boundary.label = { text: "" };
1323
+ } else {
1324
+ boundary.label = { text: label };
1325
+ }
1326
+ if (type === void 0 || type === null) {
1327
+ boundary.type = { text: "container" };
1328
+ } else {
1329
+ if (typeof type === "object") {
1330
+ let [key, value] = Object.entries(type)[0];
1331
+ boundary[key] = { text: value };
1332
+ } else {
1333
+ boundary.type = { text: type };
1334
+ }
1335
+ }
1336
+ if (typeof tags === "object") {
1337
+ let [key, value] = Object.entries(tags)[0];
1338
+ boundary[key] = value;
1339
+ } else {
1340
+ boundary.tags = tags;
1341
+ }
1342
+ if (typeof link === "object") {
1343
+ let [key, value] = Object.entries(link)[0];
1344
+ boundary[key] = value;
1345
+ } else {
1346
+ boundary.link = link;
1347
+ }
1348
+ boundary.parentBoundary = currentBoundaryParse;
1349
+ boundary.wrap = autoWrap();
1350
+ parentBoundaryParse = currentBoundaryParse;
1351
+ currentBoundaryParse = alias;
1352
+ boundaryParseStack.push(parentBoundaryParse);
1353
+ }, "addContainerBoundary");
1354
+ var addDeploymentNode = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(nodeType, alias, label, type, descr, sprite, tags, link) {
1355
+ if (alias === null || label === null) {
1356
+ return;
1357
+ }
1358
+ let boundary = {};
1359
+ const old = boundaries.find((boundary2) => boundary2.alias === alias);
1360
+ if (old && alias === old.alias) {
1361
+ boundary = old;
1362
+ } else {
1363
+ boundary.alias = alias;
1364
+ boundaries.push(boundary);
1365
+ }
1366
+ if (label === void 0 || label === null) {
1367
+ boundary.label = { text: "" };
1368
+ } else {
1369
+ boundary.label = { text: label };
1370
+ }
1371
+ if (type === void 0 || type === null) {
1372
+ boundary.type = { text: "node" };
1373
+ } else {
1374
+ if (typeof type === "object") {
1375
+ let [key, value] = Object.entries(type)[0];
1376
+ boundary[key] = { text: value };
1377
+ } else {
1378
+ boundary.type = { text: type };
1379
+ }
1380
+ }
1381
+ if (descr === void 0 || descr === null) {
1382
+ boundary.descr = { text: "" };
1383
+ } else {
1384
+ if (typeof descr === "object") {
1385
+ let [key, value] = Object.entries(descr)[0];
1386
+ boundary[key] = { text: value };
1387
+ } else {
1388
+ boundary.descr = { text: descr };
1389
+ }
1390
+ }
1391
+ if (typeof tags === "object") {
1392
+ let [key, value] = Object.entries(tags)[0];
1393
+ boundary[key] = value;
1394
+ } else {
1395
+ boundary.tags = tags;
1396
+ }
1397
+ if (typeof link === "object") {
1398
+ let [key, value] = Object.entries(link)[0];
1399
+ boundary[key] = value;
1400
+ } else {
1401
+ boundary.link = link;
1402
+ }
1403
+ boundary.nodeType = nodeType;
1404
+ boundary.parentBoundary = currentBoundaryParse;
1405
+ boundary.wrap = autoWrap();
1406
+ parentBoundaryParse = currentBoundaryParse;
1407
+ currentBoundaryParse = alias;
1408
+ boundaryParseStack.push(parentBoundaryParse);
1409
+ }, "addDeploymentNode");
1410
+ var popBoundaryParseStack = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1411
+ currentBoundaryParse = parentBoundaryParse;
1412
+ boundaryParseStack.pop();
1413
+ parentBoundaryParse = boundaryParseStack.pop();
1414
+ boundaryParseStack.push(parentBoundaryParse);
1415
+ }, "popBoundaryParseStack");
1416
+ var updateElStyle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(typeC4Shape, elementName, bgColor, fontColor, borderColor, shadowing, shape, sprite, techn, legendText, legendSprite) {
1417
+ let old = c4ShapeArray.find((element) => element.alias === elementName);
1418
+ if (old === void 0) {
1419
+ old = boundaries.find((element) => element.alias === elementName);
1420
+ if (old === void 0) {
1421
+ return;
1422
+ }
1423
+ }
1424
+ if (bgColor !== void 0 && bgColor !== null) {
1425
+ if (typeof bgColor === "object") {
1426
+ let [key, value] = Object.entries(bgColor)[0];
1427
+ old[key] = value;
1428
+ } else {
1429
+ old.bgColor = bgColor;
1430
+ }
1431
+ }
1432
+ if (fontColor !== void 0 && fontColor !== null) {
1433
+ if (typeof fontColor === "object") {
1434
+ let [key, value] = Object.entries(fontColor)[0];
1435
+ old[key] = value;
1436
+ } else {
1437
+ old.fontColor = fontColor;
1438
+ }
1439
+ }
1440
+ if (borderColor !== void 0 && borderColor !== null) {
1441
+ if (typeof borderColor === "object") {
1442
+ let [key, value] = Object.entries(borderColor)[0];
1443
+ old[key] = value;
1444
+ } else {
1445
+ old.borderColor = borderColor;
1446
+ }
1447
+ }
1448
+ if (shadowing !== void 0 && shadowing !== null) {
1449
+ if (typeof shadowing === "object") {
1450
+ let [key, value] = Object.entries(shadowing)[0];
1451
+ old[key] = value;
1452
+ } else {
1453
+ old.shadowing = shadowing;
1454
+ }
1455
+ }
1456
+ if (shape !== void 0 && shape !== null) {
1457
+ if (typeof shape === "object") {
1458
+ let [key, value] = Object.entries(shape)[0];
1459
+ old[key] = value;
1460
+ } else {
1461
+ old.shape = shape;
1462
+ }
1463
+ }
1464
+ if (sprite !== void 0 && sprite !== null) {
1465
+ if (typeof sprite === "object") {
1466
+ let [key, value] = Object.entries(sprite)[0];
1467
+ old[key] = value;
1468
+ } else {
1469
+ old.sprite = sprite;
1470
+ }
1471
+ }
1472
+ if (techn !== void 0 && techn !== null) {
1473
+ if (typeof techn === "object") {
1474
+ let [key, value] = Object.entries(techn)[0];
1475
+ old[key] = value;
1476
+ } else {
1477
+ old.techn = techn;
1478
+ }
1479
+ }
1480
+ if (legendText !== void 0 && legendText !== null) {
1481
+ if (typeof legendText === "object") {
1482
+ let [key, value] = Object.entries(legendText)[0];
1483
+ old[key] = value;
1484
+ } else {
1485
+ old.legendText = legendText;
1486
+ }
1487
+ }
1488
+ if (legendSprite !== void 0 && legendSprite !== null) {
1489
+ if (typeof legendSprite === "object") {
1490
+ let [key, value] = Object.entries(legendSprite)[0];
1491
+ old[key] = value;
1492
+ } else {
1493
+ old.legendSprite = legendSprite;
1494
+ }
1495
+ }
1496
+ }, "updateElStyle");
1497
+ var updateRelStyle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(typeC4Shape, from, to, textColor, lineColor, offsetX, offsetY) {
1498
+ const old = rels.find((rel) => rel.from === from && rel.to === to);
1499
+ if (old === void 0) {
1500
+ return;
1501
+ }
1502
+ if (textColor !== void 0 && textColor !== null) {
1503
+ if (typeof textColor === "object") {
1504
+ let [key, value] = Object.entries(textColor)[0];
1505
+ old[key] = value;
1506
+ } else {
1507
+ old.textColor = textColor;
1508
+ }
1509
+ }
1510
+ if (lineColor !== void 0 && lineColor !== null) {
1511
+ if (typeof lineColor === "object") {
1512
+ let [key, value] = Object.entries(lineColor)[0];
1513
+ old[key] = value;
1514
+ } else {
1515
+ old.lineColor = lineColor;
1516
+ }
1517
+ }
1518
+ if (offsetX !== void 0 && offsetX !== null) {
1519
+ if (typeof offsetX === "object") {
1520
+ let [key, value] = Object.entries(offsetX)[0];
1521
+ old[key] = parseInt(value);
1522
+ } else {
1523
+ old.offsetX = parseInt(offsetX);
1524
+ }
1525
+ }
1526
+ if (offsetY !== void 0 && offsetY !== null) {
1527
+ if (typeof offsetY === "object") {
1528
+ let [key, value] = Object.entries(offsetY)[0];
1529
+ old[key] = parseInt(value);
1530
+ } else {
1531
+ old.offsetY = parseInt(offsetY);
1532
+ }
1533
+ }
1534
+ }, "updateRelStyle");
1535
+ var updateLayoutConfig = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) {
1536
+ let c4ShapeInRowValue = c4ShapeInRow;
1537
+ let c4BoundaryInRowValue = c4BoundaryInRow;
1538
+ if (typeof c4ShapeInRowParam === "object") {
1539
+ const value = Object.values(c4ShapeInRowParam)[0];
1540
+ c4ShapeInRowValue = parseInt(value);
1541
+ } else {
1542
+ c4ShapeInRowValue = parseInt(c4ShapeInRowParam);
1543
+ }
1544
+ if (typeof c4BoundaryInRowParam === "object") {
1545
+ const value = Object.values(c4BoundaryInRowParam)[0];
1546
+ c4BoundaryInRowValue = parseInt(value);
1547
+ } else {
1548
+ c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam);
1549
+ }
1550
+ if (c4ShapeInRowValue >= 1) {
1551
+ c4ShapeInRow = c4ShapeInRowValue;
1552
+ }
1553
+ if (c4BoundaryInRowValue >= 1) {
1554
+ c4BoundaryInRow = c4BoundaryInRowValue;
1555
+ }
1556
+ }, "updateLayoutConfig");
1557
+ var getC4ShapeInRow = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1558
+ return c4ShapeInRow;
1559
+ }, "getC4ShapeInRow");
1560
+ var getC4BoundaryInRow = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1561
+ return c4BoundaryInRow;
1562
+ }, "getC4BoundaryInRow");
1563
+ var getCurrentBoundaryParse = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1564
+ return currentBoundaryParse;
1565
+ }, "getCurrentBoundaryParse");
1566
+ var getParentBoundaryParse = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1567
+ return parentBoundaryParse;
1568
+ }, "getParentBoundaryParse");
1569
+ var getC4ShapeArray = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(parentBoundary) {
1570
+ if (parentBoundary === void 0 || parentBoundary === null) {
1571
+ return c4ShapeArray;
1572
+ } else {
1573
+ return c4ShapeArray.filter((personOrSystem) => {
1574
+ return personOrSystem.parentBoundary === parentBoundary;
1575
+ });
1576
+ }
1577
+ }, "getC4ShapeArray");
1578
+ var getC4Shape = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(alias) {
1579
+ return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);
1580
+ }, "getC4Shape");
1581
+ var getC4ShapeKeys = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(parentBoundary) {
1582
+ return Object.keys(getC4ShapeArray(parentBoundary));
1583
+ }, "getC4ShapeKeys");
1584
+ var getBoundaries = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(parentBoundary) {
1585
+ if (parentBoundary === void 0 || parentBoundary === null) {
1586
+ return boundaries;
1587
+ } else {
1588
+ return boundaries.filter((boundary) => boundary.parentBoundary === parentBoundary);
1589
+ }
1590
+ }, "getBoundaries");
1591
+ var getBoundarys = getBoundaries;
1592
+ var getRels = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1593
+ return rels;
1594
+ }, "getRels");
1595
+ var getTitle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1596
+ return title;
1597
+ }, "getTitle");
1598
+ var setWrap = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(wrapSetting) {
1599
+ wrapEnabled = wrapSetting;
1600
+ }, "setWrap");
1601
+ var autoWrap = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1602
+ return wrapEnabled;
1603
+ }, "autoWrap");
1604
+ var clear = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function() {
1605
+ c4ShapeArray = [];
1606
+ boundaries = [
1607
+ {
1608
+ alias: "global",
1609
+ label: { text: "global" },
1610
+ type: { text: "global" },
1611
+ tags: null,
1612
+ link: null,
1613
+ parentBoundary: ""
1614
+ }
1615
+ ];
1616
+ parentBoundaryParse = "";
1617
+ currentBoundaryParse = "global";
1618
+ boundaryParseStack = [""];
1619
+ rels = [];
1620
+ boundaryParseStack = [""];
1621
+ title = "";
1622
+ wrapEnabled = false;
1623
+ c4ShapeInRow = 4;
1624
+ c4BoundaryInRow = 2;
1625
+ }, "clear");
1626
+ var LINETYPE = {
1627
+ SOLID: 0,
1628
+ DOTTED: 1,
1629
+ NOTE: 2,
1630
+ SOLID_CROSS: 3,
1631
+ DOTTED_CROSS: 4,
1632
+ SOLID_OPEN: 5,
1633
+ DOTTED_OPEN: 6,
1634
+ LOOP_START: 10,
1635
+ LOOP_END: 11,
1636
+ ALT_START: 12,
1637
+ ALT_ELSE: 13,
1638
+ ALT_END: 14,
1639
+ OPT_START: 15,
1640
+ OPT_END: 16,
1641
+ ACTIVE_START: 17,
1642
+ ACTIVE_END: 18,
1643
+ PAR_START: 19,
1644
+ PAR_AND: 20,
1645
+ PAR_END: 21,
1646
+ RECT_START: 22,
1647
+ RECT_END: 23,
1648
+ SOLID_POINT: 24,
1649
+ DOTTED_POINT: 25
1650
+ };
1651
+ var ARROWTYPE = {
1652
+ FILLED: 0,
1653
+ OPEN: 1
1654
+ };
1655
+ var PLACEMENT = {
1656
+ LEFTOF: 0,
1657
+ RIGHTOF: 1,
1658
+ OVER: 2
1659
+ };
1660
+ var setTitle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(txt) {
1661
+ let sanitizedText = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .sanitizeText */ .jZ)(txt, (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getConfig2 */ .D7)());
1662
+ title = sanitizedText;
1663
+ }, "setTitle");
1664
+ var c4Db_default = {
1665
+ addPersonOrSystem,
1666
+ addPersonOrSystemBoundary,
1667
+ addContainer,
1668
+ addContainerBoundary,
1669
+ addComponent,
1670
+ addDeploymentNode,
1671
+ popBoundaryParseStack,
1672
+ addRel,
1673
+ updateElStyle,
1674
+ updateRelStyle,
1675
+ updateLayoutConfig,
1676
+ autoWrap,
1677
+ setWrap,
1678
+ getC4ShapeArray,
1679
+ getC4Shape,
1680
+ getC4ShapeKeys,
1681
+ getBoundaries,
1682
+ getBoundarys,
1683
+ getCurrentBoundaryParse,
1684
+ getParentBoundaryParse,
1685
+ getRels,
1686
+ getTitle,
1687
+ getC4Type,
1688
+ getC4ShapeInRow,
1689
+ getC4BoundaryInRow,
1690
+ setAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .setAccTitle */ .SV,
1691
+ getAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getAccTitle */ .iN,
1692
+ getAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getAccDescription */ .m7,
1693
+ setAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .setAccDescription */ .EI,
1694
+ getConfig: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(() => (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getConfig2 */ .D7)().c4, "getConfig"),
1695
+ clear,
1696
+ LINETYPE,
1697
+ ARROWTYPE,
1698
+ PLACEMENT,
1699
+ setTitle,
1700
+ setC4Type
1701
+ // apply,
1702
+ };
1703
+
1704
+ // src/diagrams/c4/c4Renderer.js
1705
+
1706
+
1707
+ // src/diagrams/c4/svgDraw.js
1708
+
1709
+ var drawRect2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem, rectData) {
1710
+ return (0,_chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__/* .drawRect */ .tk)(elem, rectData);
1711
+ }, "drawRect");
1712
+ var drawImage = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem, width, height, x, y, link) {
1713
+ const imageElem = elem.append("image");
1714
+ imageElem.attr("width", width);
1715
+ imageElem.attr("height", height);
1716
+ imageElem.attr("x", x);
1717
+ imageElem.attr("y", y);
1718
+ let sanitizedLink = link.startsWith("data:image/png;base64") ? link : (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_4__/* .sanitizeUrl */ .J)(link);
1719
+ imageElem.attr("xlink:href", sanitizedLink);
1720
+ }, "drawImage");
1721
+ var drawRels = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)((elem, rels2, conf2) => {
1722
+ const relsElem = elem.append("g");
1723
+ let i = 0;
1724
+ for (let rel of rels2) {
1725
+ let textColor = rel.textColor ? rel.textColor : "#444444";
1726
+ let strokeColor = rel.lineColor ? rel.lineColor : "#444444";
1727
+ let offsetX = rel.offsetX ? parseInt(rel.offsetX) : 0;
1728
+ let offsetY = rel.offsetY ? parseInt(rel.offsetY) : 0;
1729
+ let url = "";
1730
+ if (i === 0) {
1731
+ let line = relsElem.append("line");
1732
+ line.attr("x1", rel.startPoint.x);
1733
+ line.attr("y1", rel.startPoint.y);
1734
+ line.attr("x2", rel.endPoint.x);
1735
+ line.attr("y2", rel.endPoint.y);
1736
+ line.attr("stroke-width", "1");
1737
+ line.attr("stroke", strokeColor);
1738
+ line.style("fill", "none");
1739
+ if (rel.type !== "rel_b") {
1740
+ line.attr("marker-end", "url(" + url + "#arrowhead)");
1741
+ }
1742
+ if (rel.type === "birel" || rel.type === "rel_b") {
1743
+ line.attr("marker-start", "url(" + url + "#arrowend)");
1744
+ }
1745
+ i = -1;
1746
+ } else {
1747
+ let line = relsElem.append("path");
1748
+ line.attr("fill", "none").attr("stroke-width", "1").attr("stroke", strokeColor).attr(
1749
+ "d",
1750
+ "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", rel.startPoint.x).replaceAll("starty", rel.startPoint.y).replaceAll(
1751
+ "controlx",
1752
+ rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4
1753
+ ).replaceAll("controly", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll("stopx", rel.endPoint.x).replaceAll("stopy", rel.endPoint.y)
1754
+ );
1755
+ if (rel.type !== "rel_b") {
1756
+ line.attr("marker-end", "url(" + url + "#arrowhead)");
1757
+ }
1758
+ if (rel.type === "birel" || rel.type === "rel_b") {
1759
+ line.attr("marker-start", "url(" + url + "#arrowend)");
1760
+ }
1761
+ }
1762
+ let messageConf = conf2.messageFont();
1763
+ _drawTextCandidateFunc(conf2)(
1764
+ rel.label.text,
1765
+ relsElem,
1766
+ Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX,
1767
+ Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + offsetY,
1768
+ rel.label.width,
1769
+ rel.label.height,
1770
+ { fill: textColor },
1771
+ messageConf
1772
+ );
1773
+ if (rel.techn && rel.techn.text !== "") {
1774
+ messageConf = conf2.messageFont();
1775
+ _drawTextCandidateFunc(conf2)(
1776
+ "[" + rel.techn.text + "]",
1777
+ relsElem,
1778
+ Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX,
1779
+ Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + conf2.messageFontSize + 5 + offsetY,
1780
+ Math.max(rel.label.width, rel.techn.width),
1781
+ rel.techn.height,
1782
+ { fill: textColor, "font-style": "italic" },
1783
+ messageConf
1784
+ );
1785
+ }
1786
+ }
1787
+ }, "drawRels");
1788
+ var drawBoundary = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem, boundary, conf2) {
1789
+ const boundaryElem = elem.append("g");
1790
+ let fillColor = boundary.bgColor ? boundary.bgColor : "none";
1791
+ let strokeColor = boundary.borderColor ? boundary.borderColor : "#444444";
1792
+ let fontColor = boundary.fontColor ? boundary.fontColor : "black";
1793
+ let attrsValue = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" };
1794
+ if (boundary.nodeType) {
1795
+ attrsValue = { "stroke-width": 1 };
1796
+ }
1797
+ let rectData = {
1798
+ x: boundary.x,
1799
+ y: boundary.y,
1800
+ fill: fillColor,
1801
+ stroke: strokeColor,
1802
+ width: boundary.width,
1803
+ height: boundary.height,
1804
+ rx: 2.5,
1805
+ ry: 2.5,
1806
+ attrs: attrsValue
1807
+ };
1808
+ drawRect2(boundaryElem, rectData);
1809
+ let boundaryConf = conf2.boundaryFont();
1810
+ boundaryConf.fontWeight = "bold";
1811
+ boundaryConf.fontSize = boundaryConf.fontSize + 2;
1812
+ boundaryConf.fontColor = fontColor;
1813
+ _drawTextCandidateFunc(conf2)(
1814
+ boundary.label.text,
1815
+ boundaryElem,
1816
+ boundary.x,
1817
+ boundary.y + boundary.label.Y,
1818
+ boundary.width,
1819
+ boundary.height,
1820
+ { fill: "#444444" },
1821
+ boundaryConf
1822
+ );
1823
+ if (boundary.type && boundary.type.text !== "") {
1824
+ boundaryConf = conf2.boundaryFont();
1825
+ boundaryConf.fontColor = fontColor;
1826
+ _drawTextCandidateFunc(conf2)(
1827
+ boundary.type.text,
1828
+ boundaryElem,
1829
+ boundary.x,
1830
+ boundary.y + boundary.type.Y,
1831
+ boundary.width,
1832
+ boundary.height,
1833
+ { fill: "#444444" },
1834
+ boundaryConf
1835
+ );
1836
+ }
1837
+ if (boundary.descr && boundary.descr.text !== "") {
1838
+ boundaryConf = conf2.boundaryFont();
1839
+ boundaryConf.fontSize = boundaryConf.fontSize - 2;
1840
+ boundaryConf.fontColor = fontColor;
1841
+ _drawTextCandidateFunc(conf2)(
1842
+ boundary.descr.text,
1843
+ boundaryElem,
1844
+ boundary.x,
1845
+ boundary.y + boundary.descr.Y,
1846
+ boundary.width,
1847
+ boundary.height,
1848
+ { fill: "#444444" },
1849
+ boundaryConf
1850
+ );
1851
+ }
1852
+ }, "drawBoundary");
1853
+ var drawC4Shape = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem, c4Shape, conf2) {
1854
+ let fillColor = c4Shape.bgColor ? c4Shape.bgColor : conf2[c4Shape.typeC4Shape.text + "_bg_color"];
1855
+ let strokeColor = c4Shape.borderColor ? c4Shape.borderColor : conf2[c4Shape.typeC4Shape.text + "_border_color"];
1856
+ let fontColor = c4Shape.fontColor ? c4Shape.fontColor : "#FFFFFF";
1857
+ let personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
1858
+ switch (c4Shape.typeC4Shape.text) {
1859
+ case "person":
1860
+ personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";
1861
+ break;
1862
+ case "external_person":
1863
+ personImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
1864
+ break;
1865
+ }
1866
+ const c4ShapeElem = elem.append("g");
1867
+ c4ShapeElem.attr("class", "person-man");
1868
+ const rect = (0,_chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getNoteRect */ .PB)();
1869
+ switch (c4Shape.typeC4Shape.text) {
1870
+ case "person":
1871
+ case "external_person":
1872
+ case "system":
1873
+ case "external_system":
1874
+ case "container":
1875
+ case "external_container":
1876
+ case "component":
1877
+ case "external_component":
1878
+ rect.x = c4Shape.x;
1879
+ rect.y = c4Shape.y;
1880
+ rect.fill = fillColor;
1881
+ rect.width = c4Shape.width;
1882
+ rect.height = c4Shape.height;
1883
+ rect.stroke = strokeColor;
1884
+ rect.rx = 2.5;
1885
+ rect.ry = 2.5;
1886
+ rect.attrs = { "stroke-width": 0.5 };
1887
+ drawRect2(c4ShapeElem, rect);
1888
+ break;
1889
+ case "system_db":
1890
+ case "external_system_db":
1891
+ case "container_db":
1892
+ case "external_container_db":
1893
+ case "component_db":
1894
+ case "external_component_db":
1895
+ c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
1896
+ "d",
1897
+ "Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2).replaceAll("height", c4Shape.height)
1898
+ );
1899
+ c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
1900
+ "d",
1901
+ "Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.width / 2)
1902
+ );
1903
+ break;
1904
+ case "system_queue":
1905
+ case "external_system_queue":
1906
+ case "container_queue":
1907
+ case "external_container_queue":
1908
+ case "component_queue":
1909
+ case "external_component_queue":
1910
+ c4ShapeElem.append("path").attr("fill", fillColor).attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
1911
+ "d",
1912
+ "Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx", c4Shape.x).replaceAll("starty", c4Shape.y).replaceAll("width", c4Shape.width).replaceAll("half", c4Shape.height / 2)
1913
+ );
1914
+ c4ShapeElem.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", strokeColor).attr(
1915
+ "d",
1916
+ "Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", c4Shape.x + c4Shape.width).replaceAll("starty", c4Shape.y).replaceAll("half", c4Shape.height / 2)
1917
+ );
1918
+ break;
1919
+ }
1920
+ let c4ShapeFontConf = getC4ShapeFont(conf2, c4Shape.typeC4Shape.text);
1921
+ c4ShapeElem.append("text").attr("fill", fontColor).attr("font-family", c4ShapeFontConf.fontFamily).attr("font-size", c4ShapeFontConf.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", c4Shape.typeC4Shape.width).attr("x", c4Shape.x + c4Shape.width / 2 - c4Shape.typeC4Shape.width / 2).attr("y", c4Shape.y + c4Shape.typeC4Shape.Y).text("<<" + c4Shape.typeC4Shape.text + ">>");
1922
+ switch (c4Shape.typeC4Shape.text) {
1923
+ case "person":
1924
+ case "external_person":
1925
+ drawImage(
1926
+ c4ShapeElem,
1927
+ 48,
1928
+ 48,
1929
+ c4Shape.x + c4Shape.width / 2 - 24,
1930
+ c4Shape.y + c4Shape.image.Y,
1931
+ personImg
1932
+ );
1933
+ break;
1934
+ }
1935
+ let textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"]();
1936
+ textFontConf.fontWeight = "bold";
1937
+ textFontConf.fontSize = textFontConf.fontSize + 2;
1938
+ textFontConf.fontColor = fontColor;
1939
+ _drawTextCandidateFunc(conf2)(
1940
+ c4Shape.label.text,
1941
+ c4ShapeElem,
1942
+ c4Shape.x,
1943
+ c4Shape.y + c4Shape.label.Y,
1944
+ c4Shape.width,
1945
+ c4Shape.height,
1946
+ { fill: fontColor },
1947
+ textFontConf
1948
+ );
1949
+ textFontConf = conf2[c4Shape.typeC4Shape.text + "Font"]();
1950
+ textFontConf.fontColor = fontColor;
1951
+ if (c4Shape.techn && c4Shape.techn?.text !== "") {
1952
+ _drawTextCandidateFunc(conf2)(
1953
+ c4Shape.techn.text,
1954
+ c4ShapeElem,
1955
+ c4Shape.x,
1956
+ c4Shape.y + c4Shape.techn.Y,
1957
+ c4Shape.width,
1958
+ c4Shape.height,
1959
+ { fill: fontColor, "font-style": "italic" },
1960
+ textFontConf
1961
+ );
1962
+ } else if (c4Shape.type && c4Shape.type.text !== "") {
1963
+ _drawTextCandidateFunc(conf2)(
1964
+ c4Shape.type.text,
1965
+ c4ShapeElem,
1966
+ c4Shape.x,
1967
+ c4Shape.y + c4Shape.type.Y,
1968
+ c4Shape.width,
1969
+ c4Shape.height,
1970
+ { fill: fontColor, "font-style": "italic" },
1971
+ textFontConf
1972
+ );
1973
+ }
1974
+ if (c4Shape.descr && c4Shape.descr.text !== "") {
1975
+ textFontConf = conf2.personFont();
1976
+ textFontConf.fontColor = fontColor;
1977
+ _drawTextCandidateFunc(conf2)(
1978
+ c4Shape.descr.text,
1979
+ c4ShapeElem,
1980
+ c4Shape.x,
1981
+ c4Shape.y + c4Shape.descr.Y,
1982
+ c4Shape.width,
1983
+ c4Shape.height,
1984
+ { fill: fontColor },
1985
+ textFontConf
1986
+ );
1987
+ }
1988
+ return c4Shape.height;
1989
+ }, "drawC4Shape");
1990
+ var insertDatabaseIcon = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
1991
+ elem.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
1992
+ "d",
1993
+ "M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z"
1994
+ );
1995
+ }, "insertDatabaseIcon");
1996
+ var insertComputerIcon = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
1997
+ elem.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
1998
+ "d",
1999
+ "M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z"
2000
+ );
2001
+ }, "insertComputerIcon");
2002
+ var insertClockIcon = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
2003
+ elem.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
2004
+ "d",
2005
+ "M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z"
2006
+ );
2007
+ }, "insertClockIcon");
2008
+ var insertArrowHead = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
2009
+ elem.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z");
2010
+ }, "insertArrowHead");
2011
+ var insertArrowEnd = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
2012
+ elem.append("defs").append("marker").attr("id", "arrowend").attr("refX", 1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z");
2013
+ }, "insertArrowEnd");
2014
+ var insertArrowFilledHead = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
2015
+ elem.append("defs").append("marker").attr("id", "filled-head").attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
2016
+ }, "insertArrowFilledHead");
2017
+ var insertDynamicNumber = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
2018
+ elem.append("defs").append("marker").attr("id", "sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
2019
+ }, "insertDynamicNumber");
2020
+ var insertArrowCrossHead = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(elem) {
2021
+ const defs = elem.append("defs");
2022
+ const marker = defs.append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
2023
+ marker.append("path").attr("fill", "black").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 9,2 V 6 L16,4 Z");
2024
+ marker.append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1px").attr("d", "M 0,1 L 6,7 M 6,1 L 0,7");
2025
+ }, "insertArrowCrossHead");
2026
+ var getC4ShapeFont = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)((cnf, typeC4Shape) => {
2027
+ return {
2028
+ fontFamily: cnf[typeC4Shape + "FontFamily"],
2029
+ fontSize: cnf[typeC4Shape + "FontSize"],
2030
+ fontWeight: cnf[typeC4Shape + "FontWeight"]
2031
+ };
2032
+ }, "getC4ShapeFont");
2033
+ var _drawTextCandidateFunc = /* @__PURE__ */ function() {
2034
+ function byText(content, g, x, y, width, height, textAttrs) {
2035
+ const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content);
2036
+ _setTextAttrs(text, textAttrs);
2037
+ }
2038
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(byText, "byText");
2039
+ function byTspan(content, g, x, y, width, height, textAttrs, conf2) {
2040
+ const { fontSize, fontFamily, fontWeight } = conf2;
2041
+ const lines = content.split(_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .common_default */ .Y2.lineBreakRegex);
2042
+ for (let i = 0; i < lines.length; i++) {
2043
+ const dy = i * fontSize - fontSize * (lines.length - 1) / 2;
2044
+ const text = g.append("text").attr("x", x + width / 2).attr("y", y).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", fontSize).style("font-weight", fontWeight).style("font-family", fontFamily);
2045
+ text.append("tspan").attr("dy", dy).text(lines[i]).attr("alignment-baseline", "mathematical");
2046
+ _setTextAttrs(text, textAttrs);
2047
+ }
2048
+ }
2049
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(byTspan, "byTspan");
2050
+ function byFo(content, g, x, y, width, height, textAttrs, conf2) {
2051
+ const s = g.append("switch");
2052
+ const f = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height);
2053
+ const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
2054
+ text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
2055
+ byTspan(content, s, x, y, width, height, textAttrs, conf2);
2056
+ _setTextAttrs(text, textAttrs);
2057
+ }
2058
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(byFo, "byFo");
2059
+ function _setTextAttrs(toText, fromTextAttrsDict) {
2060
+ for (const key in fromTextAttrsDict) {
2061
+ if (fromTextAttrsDict.hasOwnProperty(key)) {
2062
+ toText.attr(key, fromTextAttrsDict[key]);
2063
+ }
2064
+ }
2065
+ }
2066
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(_setTextAttrs, "_setTextAttrs");
2067
+ return function(conf2) {
2068
+ return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
2069
+ };
2070
+ }();
2071
+ var svgDraw_default = {
2072
+ drawRect: drawRect2,
2073
+ drawBoundary,
2074
+ drawC4Shape,
2075
+ drawRels,
2076
+ drawImage,
2077
+ insertArrowHead,
2078
+ insertArrowEnd,
2079
+ insertArrowFilledHead,
2080
+ insertDynamicNumber,
2081
+ insertArrowCrossHead,
2082
+ insertDatabaseIcon,
2083
+ insertComputerIcon,
2084
+ insertClockIcon
2085
+ };
2086
+
2087
+ // src/diagrams/c4/c4Renderer.js
2088
+ var globalBoundaryMaxX = 0;
2089
+ var globalBoundaryMaxY = 0;
2090
+ var c4ShapeInRow2 = 4;
2091
+ var c4BoundaryInRow2 = 2;
2092
+ parser.yy = c4Db_default;
2093
+ var conf = {};
2094
+ var Bounds = class {
2095
+ static {
2096
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(this, "Bounds");
2097
+ }
2098
+ constructor(diagObj) {
2099
+ this.name = "";
2100
+ this.data = {};
2101
+ this.data.startx = void 0;
2102
+ this.data.stopx = void 0;
2103
+ this.data.starty = void 0;
2104
+ this.data.stopy = void 0;
2105
+ this.data.widthLimit = void 0;
2106
+ this.nextData = {};
2107
+ this.nextData.startx = void 0;
2108
+ this.nextData.stopx = void 0;
2109
+ this.nextData.starty = void 0;
2110
+ this.nextData.stopy = void 0;
2111
+ this.nextData.cnt = 0;
2112
+ setConf(diagObj.db.getConfig());
2113
+ }
2114
+ setData(startx, stopx, starty, stopy) {
2115
+ this.nextData.startx = this.data.startx = startx;
2116
+ this.nextData.stopx = this.data.stopx = stopx;
2117
+ this.nextData.starty = this.data.starty = starty;
2118
+ this.nextData.stopy = this.data.stopy = stopy;
2119
+ }
2120
+ updateVal(obj, key, val, fun) {
2121
+ if (obj[key] === void 0) {
2122
+ obj[key] = val;
2123
+ } else {
2124
+ obj[key] = fun(val, obj[key]);
2125
+ }
2126
+ }
2127
+ insert(c4Shape) {
2128
+ this.nextData.cnt = this.nextData.cnt + 1;
2129
+ let _startx = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + c4Shape.margin : this.nextData.stopx + c4Shape.margin * 2;
2130
+ let _stopx = _startx + c4Shape.width;
2131
+ let _starty = this.nextData.starty + c4Shape.margin * 2;
2132
+ let _stopy = _starty + c4Shape.height;
2133
+ if (_startx >= this.data.widthLimit || _stopx >= this.data.widthLimit || this.nextData.cnt > c4ShapeInRow2) {
2134
+ _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX;
2135
+ _starty = this.nextData.stopy + c4Shape.margin * 2;
2136
+ this.nextData.stopx = _stopx = _startx + c4Shape.width;
2137
+ this.nextData.starty = this.nextData.stopy;
2138
+ this.nextData.stopy = _stopy = _starty + c4Shape.height;
2139
+ this.nextData.cnt = 1;
2140
+ }
2141
+ c4Shape.x = _startx;
2142
+ c4Shape.y = _starty;
2143
+ this.updateVal(this.data, "startx", _startx, Math.min);
2144
+ this.updateVal(this.data, "starty", _starty, Math.min);
2145
+ this.updateVal(this.data, "stopx", _stopx, Math.max);
2146
+ this.updateVal(this.data, "stopy", _stopy, Math.max);
2147
+ this.updateVal(this.nextData, "startx", _startx, Math.min);
2148
+ this.updateVal(this.nextData, "starty", _starty, Math.min);
2149
+ this.updateVal(this.nextData, "stopx", _stopx, Math.max);
2150
+ this.updateVal(this.nextData, "stopy", _stopy, Math.max);
2151
+ }
2152
+ init(diagObj) {
2153
+ this.name = "";
2154
+ this.data = {
2155
+ startx: void 0,
2156
+ stopx: void 0,
2157
+ starty: void 0,
2158
+ stopy: void 0,
2159
+ widthLimit: void 0
2160
+ };
2161
+ this.nextData = {
2162
+ startx: void 0,
2163
+ stopx: void 0,
2164
+ starty: void 0,
2165
+ stopy: void 0,
2166
+ cnt: 0
2167
+ };
2168
+ setConf(diagObj.db.getConfig());
2169
+ }
2170
+ bumpLastMargin(margin) {
2171
+ this.data.stopx += margin;
2172
+ this.data.stopy += margin;
2173
+ }
2174
+ };
2175
+ var setConf = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(cnf) {
2176
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .assignWithDepth_default */ .hH)(conf, cnf);
2177
+ if (cnf.fontFamily) {
2178
+ conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily;
2179
+ }
2180
+ if (cnf.fontSize) {
2181
+ conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize;
2182
+ }
2183
+ if (cnf.fontWeight) {
2184
+ conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight;
2185
+ }
2186
+ }, "setConf");
2187
+ var c4ShapeFont = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)((cnf, typeC4Shape) => {
2188
+ return {
2189
+ fontFamily: cnf[typeC4Shape + "FontFamily"],
2190
+ fontSize: cnf[typeC4Shape + "FontSize"],
2191
+ fontWeight: cnf[typeC4Shape + "FontWeight"]
2192
+ };
2193
+ }, "c4ShapeFont");
2194
+ var boundaryFont = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)((cnf) => {
2195
+ return {
2196
+ fontFamily: cnf.boundaryFontFamily,
2197
+ fontSize: cnf.boundaryFontSize,
2198
+ fontWeight: cnf.boundaryFontWeight
2199
+ };
2200
+ }, "boundaryFont");
2201
+ var messageFont = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)((cnf) => {
2202
+ return {
2203
+ fontFamily: cnf.messageFontFamily,
2204
+ fontSize: cnf.messageFontSize,
2205
+ fontWeight: cnf.messageFontWeight
2206
+ };
2207
+ }, "messageFont");
2208
+ function calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) {
2209
+ if (!c4Shape[textType].width) {
2210
+ if (c4ShapeTextWrap) {
2211
+ c4Shape[textType].text = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .wrapLabel */ .bH)(c4Shape[textType].text, textLimitWidth, textConf);
2212
+ c4Shape[textType].textLines = c4Shape[textType].text.split(_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .common_default */ .Y2.lineBreakRegex).length;
2213
+ c4Shape[textType].width = textLimitWidth;
2214
+ c4Shape[textType].height = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextHeight */ .ru)(c4Shape[textType].text, textConf);
2215
+ } else {
2216
+ let lines = c4Shape[textType].text.split(_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .common_default */ .Y2.lineBreakRegex);
2217
+ c4Shape[textType].textLines = lines.length;
2218
+ let lineHeight = 0;
2219
+ c4Shape[textType].height = 0;
2220
+ c4Shape[textType].width = 0;
2221
+ for (const line of lines) {
2222
+ c4Shape[textType].width = Math.max(
2223
+ (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextWidth */ .Un)(line, textConf),
2224
+ c4Shape[textType].width
2225
+ );
2226
+ lineHeight = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextHeight */ .ru)(line, textConf);
2227
+ c4Shape[textType].height = c4Shape[textType].height + lineHeight;
2228
+ }
2229
+ }
2230
+ }
2231
+ }
2232
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(calcC4ShapeTextWH, "calcC4ShapeTextWH");
2233
+ var drawBoundary2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(diagram2, boundary, bounds) {
2234
+ boundary.x = bounds.data.startx;
2235
+ boundary.y = bounds.data.starty;
2236
+ boundary.width = bounds.data.stopx - bounds.data.startx;
2237
+ boundary.height = bounds.data.stopy - bounds.data.starty;
2238
+ boundary.label.y = conf.c4ShapeMargin - 35;
2239
+ let boundaryTextWrap = boundary.wrap && conf.wrap;
2240
+ let boundaryLabelConf = boundaryFont(conf);
2241
+ boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2;
2242
+ boundaryLabelConf.fontWeight = "bold";
2243
+ let textLimitWidth = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextWidth */ .Un)(boundary.label.text, boundaryLabelConf);
2244
+ calcC4ShapeTextWH("label", boundary, boundaryTextWrap, boundaryLabelConf, textLimitWidth);
2245
+ svgDraw_default.drawBoundary(diagram2, boundary, conf);
2246
+ }, "drawBoundary");
2247
+ var drawC4ShapeArray = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(currentBounds, diagram2, c4ShapeArray2, c4ShapeKeys) {
2248
+ let Y = 0;
2249
+ for (const c4ShapeKey of c4ShapeKeys) {
2250
+ Y = 0;
2251
+ const c4Shape = c4ShapeArray2[c4ShapeKey];
2252
+ let c4ShapeTypeConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
2253
+ c4ShapeTypeConf.fontSize = c4ShapeTypeConf.fontSize - 2;
2254
+ c4Shape.typeC4Shape.width = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextWidth */ .Un)(
2255
+ "\xAB" + c4Shape.typeC4Shape.text + "\xBB",
2256
+ c4ShapeTypeConf
2257
+ );
2258
+ c4Shape.typeC4Shape.height = c4ShapeTypeConf.fontSize + 2;
2259
+ c4Shape.typeC4Shape.Y = conf.c4ShapePadding;
2260
+ Y = c4Shape.typeC4Shape.Y + c4Shape.typeC4Shape.height - 4;
2261
+ c4Shape.image = { width: 0, height: 0, Y: 0 };
2262
+ switch (c4Shape.typeC4Shape.text) {
2263
+ case "person":
2264
+ case "external_person":
2265
+ c4Shape.image.width = 48;
2266
+ c4Shape.image.height = 48;
2267
+ c4Shape.image.Y = Y;
2268
+ Y = c4Shape.image.Y + c4Shape.image.height;
2269
+ break;
2270
+ }
2271
+ if (c4Shape.sprite) {
2272
+ c4Shape.image.width = 48;
2273
+ c4Shape.image.height = 48;
2274
+ c4Shape.image.Y = Y;
2275
+ Y = c4Shape.image.Y + c4Shape.image.height;
2276
+ }
2277
+ let c4ShapeTextWrap = c4Shape.wrap && conf.wrap;
2278
+ let textLimitWidth = conf.width - conf.c4ShapePadding * 2;
2279
+ let c4ShapeLabelConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
2280
+ c4ShapeLabelConf.fontSize = c4ShapeLabelConf.fontSize + 2;
2281
+ c4ShapeLabelConf.fontWeight = "bold";
2282
+ calcC4ShapeTextWH("label", c4Shape, c4ShapeTextWrap, c4ShapeLabelConf, textLimitWidth);
2283
+ c4Shape.label.Y = Y + 8;
2284
+ Y = c4Shape.label.Y + c4Shape.label.height;
2285
+ if (c4Shape.type && c4Shape.type.text !== "") {
2286
+ c4Shape.type.text = "[" + c4Shape.type.text + "]";
2287
+ let c4ShapeTypeConf2 = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
2288
+ calcC4ShapeTextWH("type", c4Shape, c4ShapeTextWrap, c4ShapeTypeConf2, textLimitWidth);
2289
+ c4Shape.type.Y = Y + 5;
2290
+ Y = c4Shape.type.Y + c4Shape.type.height;
2291
+ } else if (c4Shape.techn && c4Shape.techn.text !== "") {
2292
+ c4Shape.techn.text = "[" + c4Shape.techn.text + "]";
2293
+ let c4ShapeTechnConf = c4ShapeFont(conf, c4Shape.techn.text);
2294
+ calcC4ShapeTextWH("techn", c4Shape, c4ShapeTextWrap, c4ShapeTechnConf, textLimitWidth);
2295
+ c4Shape.techn.Y = Y + 5;
2296
+ Y = c4Shape.techn.Y + c4Shape.techn.height;
2297
+ }
2298
+ let rectHeight = Y;
2299
+ let rectWidth = c4Shape.label.width;
2300
+ if (c4Shape.descr && c4Shape.descr.text !== "") {
2301
+ let c4ShapeDescrConf = c4ShapeFont(conf, c4Shape.typeC4Shape.text);
2302
+ calcC4ShapeTextWH("descr", c4Shape, c4ShapeTextWrap, c4ShapeDescrConf, textLimitWidth);
2303
+ c4Shape.descr.Y = Y + 20;
2304
+ Y = c4Shape.descr.Y + c4Shape.descr.height;
2305
+ rectWidth = Math.max(c4Shape.label.width, c4Shape.descr.width);
2306
+ rectHeight = Y - c4Shape.descr.textLines * 5;
2307
+ }
2308
+ rectWidth = rectWidth + conf.c4ShapePadding;
2309
+ c4Shape.width = Math.max(c4Shape.width || conf.width, rectWidth, conf.width);
2310
+ c4Shape.height = Math.max(c4Shape.height || conf.height, rectHeight, conf.height);
2311
+ c4Shape.margin = c4Shape.margin || conf.c4ShapeMargin;
2312
+ currentBounds.insert(c4Shape);
2313
+ svgDraw_default.drawC4Shape(diagram2, c4Shape, conf);
2314
+ }
2315
+ currentBounds.bumpLastMargin(conf.c4ShapeMargin);
2316
+ }, "drawC4ShapeArray");
2317
+ var Point = class {
2318
+ static {
2319
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(this, "Point");
2320
+ }
2321
+ constructor(x, y) {
2322
+ this.x = x;
2323
+ this.y = y;
2324
+ }
2325
+ };
2326
+ var getIntersectPoint = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(fromNode, endPoint) {
2327
+ let x1 = fromNode.x;
2328
+ let y1 = fromNode.y;
2329
+ let x2 = endPoint.x;
2330
+ let y2 = endPoint.y;
2331
+ let fromCenterX = x1 + fromNode.width / 2;
2332
+ let fromCenterY = y1 + fromNode.height / 2;
2333
+ let dx = Math.abs(x1 - x2);
2334
+ let dy = Math.abs(y1 - y2);
2335
+ let tanDYX = dy / dx;
2336
+ let fromDYX = fromNode.height / fromNode.width;
2337
+ let returnPoint = null;
2338
+ if (y1 == y2 && x1 < x2) {
2339
+ returnPoint = new Point(x1 + fromNode.width, fromCenterY);
2340
+ } else if (y1 == y2 && x1 > x2) {
2341
+ returnPoint = new Point(x1, fromCenterY);
2342
+ } else if (x1 == x2 && y1 < y2) {
2343
+ returnPoint = new Point(fromCenterX, y1 + fromNode.height);
2344
+ } else if (x1 == x2 && y1 > y2) {
2345
+ returnPoint = new Point(fromCenterX, y1);
2346
+ }
2347
+ if (x1 > x2 && y1 < y2) {
2348
+ if (fromDYX >= tanDYX) {
2349
+ returnPoint = new Point(x1, fromCenterY + tanDYX * fromNode.width / 2);
2350
+ } else {
2351
+ returnPoint = new Point(
2352
+ fromCenterX - dx / dy * fromNode.height / 2,
2353
+ y1 + fromNode.height
2354
+ );
2355
+ }
2356
+ } else if (x1 < x2 && y1 < y2) {
2357
+ if (fromDYX >= tanDYX) {
2358
+ returnPoint = new Point(x1 + fromNode.width, fromCenterY + tanDYX * fromNode.width / 2);
2359
+ } else {
2360
+ returnPoint = new Point(
2361
+ fromCenterX + dx / dy * fromNode.height / 2,
2362
+ y1 + fromNode.height
2363
+ );
2364
+ }
2365
+ } else if (x1 < x2 && y1 > y2) {
2366
+ if (fromDYX >= tanDYX) {
2367
+ returnPoint = new Point(x1 + fromNode.width, fromCenterY - tanDYX * fromNode.width / 2);
2368
+ } else {
2369
+ returnPoint = new Point(fromCenterX + fromNode.height / 2 * dx / dy, y1);
2370
+ }
2371
+ } else if (x1 > x2 && y1 > y2) {
2372
+ if (fromDYX >= tanDYX) {
2373
+ returnPoint = new Point(x1, fromCenterY - fromNode.width / 2 * tanDYX);
2374
+ } else {
2375
+ returnPoint = new Point(fromCenterX - fromNode.height / 2 * dx / dy, y1);
2376
+ }
2377
+ }
2378
+ return returnPoint;
2379
+ }, "getIntersectPoint");
2380
+ var getIntersectPoints = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(fromNode, endNode) {
2381
+ let endIntersectPoint = { x: 0, y: 0 };
2382
+ endIntersectPoint.x = endNode.x + endNode.width / 2;
2383
+ endIntersectPoint.y = endNode.y + endNode.height / 2;
2384
+ let startPoint = getIntersectPoint(fromNode, endIntersectPoint);
2385
+ endIntersectPoint.x = fromNode.x + fromNode.width / 2;
2386
+ endIntersectPoint.y = fromNode.y + fromNode.height / 2;
2387
+ let endPoint = getIntersectPoint(endNode, endIntersectPoint);
2388
+ return { startPoint, endPoint };
2389
+ }, "getIntersectPoints");
2390
+ var drawRels2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(diagram2, rels2, getC4ShapeObj, diagObj) {
2391
+ let i = 0;
2392
+ for (let rel of rels2) {
2393
+ i = i + 1;
2394
+ let relTextWrap = rel.wrap && conf.wrap;
2395
+ let relConf = messageFont(conf);
2396
+ let diagramType = diagObj.db.getC4Type();
2397
+ if (diagramType === "C4Dynamic") {
2398
+ rel.label.text = i + ": " + rel.label.text;
2399
+ }
2400
+ let textLimitWidth = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextWidth */ .Un)(rel.label.text, relConf);
2401
+ calcC4ShapeTextWH("label", rel, relTextWrap, relConf, textLimitWidth);
2402
+ if (rel.techn && rel.techn.text !== "") {
2403
+ textLimitWidth = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextWidth */ .Un)(rel.techn.text, relConf);
2404
+ calcC4ShapeTextWH("techn", rel, relTextWrap, relConf, textLimitWidth);
2405
+ }
2406
+ if (rel.descr && rel.descr.text !== "") {
2407
+ textLimitWidth = (0,_chunk_TLUHKHBO_mjs__WEBPACK_IMPORTED_MODULE_1__/* .calculateTextWidth */ .Un)(rel.descr.text, relConf);
2408
+ calcC4ShapeTextWH("descr", rel, relTextWrap, relConf, textLimitWidth);
2409
+ }
2410
+ let fromNode = getC4ShapeObj(rel.from);
2411
+ let endNode = getC4ShapeObj(rel.to);
2412
+ let points = getIntersectPoints(fromNode, endNode);
2413
+ rel.startPoint = points.startPoint;
2414
+ rel.endPoint = points.endPoint;
2415
+ }
2416
+ svgDraw_default.drawRels(diagram2, rels2, conf);
2417
+ }, "drawRels");
2418
+ function drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, currentBoundaries, diagObj) {
2419
+ let currentBounds = new Bounds(diagObj);
2420
+ currentBounds.data.widthLimit = parentBounds.data.widthLimit / Math.min(c4BoundaryInRow2, currentBoundaries.length);
2421
+ for (let [i, currentBoundary] of currentBoundaries.entries()) {
2422
+ let Y = 0;
2423
+ currentBoundary.image = { width: 0, height: 0, Y: 0 };
2424
+ if (currentBoundary.sprite) {
2425
+ currentBoundary.image.width = 48;
2426
+ currentBoundary.image.height = 48;
2427
+ currentBoundary.image.Y = Y;
2428
+ Y = currentBoundary.image.Y + currentBoundary.image.height;
2429
+ }
2430
+ let currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap;
2431
+ let currentBoundaryLabelConf = boundaryFont(conf);
2432
+ currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2;
2433
+ currentBoundaryLabelConf.fontWeight = "bold";
2434
+ calcC4ShapeTextWH(
2435
+ "label",
2436
+ currentBoundary,
2437
+ currentBoundaryTextWrap,
2438
+ currentBoundaryLabelConf,
2439
+ currentBounds.data.widthLimit
2440
+ );
2441
+ currentBoundary.label.Y = Y + 8;
2442
+ Y = currentBoundary.label.Y + currentBoundary.label.height;
2443
+ if (currentBoundary.type && currentBoundary.type.text !== "") {
2444
+ currentBoundary.type.text = "[" + currentBoundary.type.text + "]";
2445
+ let currentBoundaryTypeConf = boundaryFont(conf);
2446
+ calcC4ShapeTextWH(
2447
+ "type",
2448
+ currentBoundary,
2449
+ currentBoundaryTextWrap,
2450
+ currentBoundaryTypeConf,
2451
+ currentBounds.data.widthLimit
2452
+ );
2453
+ currentBoundary.type.Y = Y + 5;
2454
+ Y = currentBoundary.type.Y + currentBoundary.type.height;
2455
+ }
2456
+ if (currentBoundary.descr && currentBoundary.descr.text !== "") {
2457
+ let currentBoundaryDescrConf = boundaryFont(conf);
2458
+ currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2;
2459
+ calcC4ShapeTextWH(
2460
+ "descr",
2461
+ currentBoundary,
2462
+ currentBoundaryTextWrap,
2463
+ currentBoundaryDescrConf,
2464
+ currentBounds.data.widthLimit
2465
+ );
2466
+ currentBoundary.descr.Y = Y + 20;
2467
+ Y = currentBoundary.descr.Y + currentBoundary.descr.height;
2468
+ }
2469
+ if (i == 0 || i % c4BoundaryInRow2 === 0) {
2470
+ let _x = parentBounds.data.startx + conf.diagramMarginX;
2471
+ let _y = parentBounds.data.stopy + conf.diagramMarginY + Y;
2472
+ currentBounds.setData(_x, _x, _y, _y);
2473
+ } else {
2474
+ let _x = currentBounds.data.stopx !== currentBounds.data.startx ? currentBounds.data.stopx + conf.diagramMarginX : currentBounds.data.startx;
2475
+ let _y = currentBounds.data.starty;
2476
+ currentBounds.setData(_x, _x, _y, _y);
2477
+ }
2478
+ currentBounds.name = currentBoundary.alias;
2479
+ let currentPersonOrSystemArray = diagObj.db.getC4ShapeArray(currentBoundary.alias);
2480
+ let currentPersonOrSystemKeys = diagObj.db.getC4ShapeKeys(currentBoundary.alias);
2481
+ if (currentPersonOrSystemKeys.length > 0) {
2482
+ drawC4ShapeArray(
2483
+ currentBounds,
2484
+ diagram2,
2485
+ currentPersonOrSystemArray,
2486
+ currentPersonOrSystemKeys
2487
+ );
2488
+ }
2489
+ parentBoundaryAlias = currentBoundary.alias;
2490
+ let nextCurrentBoundaries = diagObj.db.getBoundarys(parentBoundaryAlias);
2491
+ if (nextCurrentBoundaries.length > 0) {
2492
+ drawInsideBoundary(
2493
+ diagram2,
2494
+ parentBoundaryAlias,
2495
+ currentBounds,
2496
+ nextCurrentBoundaries,
2497
+ diagObj
2498
+ );
2499
+ }
2500
+ if (currentBoundary.alias !== "global") {
2501
+ drawBoundary2(diagram2, currentBoundary, currentBounds);
2502
+ }
2503
+ parentBounds.data.stopy = Math.max(
2504
+ currentBounds.data.stopy + conf.c4ShapeMargin,
2505
+ parentBounds.data.stopy
2506
+ );
2507
+ parentBounds.data.stopx = Math.max(
2508
+ currentBounds.data.stopx + conf.c4ShapeMargin,
2509
+ parentBounds.data.stopx
2510
+ );
2511
+ globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx);
2512
+ globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy);
2513
+ }
2514
+ }
2515
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(drawInsideBoundary, "drawInsideBoundary");
2516
+ var draw = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(function(_text, id, _version, diagObj) {
2517
+ conf = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getConfig2 */ .D7)().c4;
2518
+ const securityLevel = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .getConfig2 */ .D7)().securityLevel;
2519
+ let sandboxElement;
2520
+ if (securityLevel === "sandbox") {
2521
+ sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)("#i" + id);
2522
+ }
2523
+ const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)("body");
2524
+ let db = diagObj.db;
2525
+ diagObj.db.setWrap(conf.wrap);
2526
+ c4ShapeInRow2 = db.getC4ShapeInRow();
2527
+ c4BoundaryInRow2 = db.getC4BoundaryInRow();
2528
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug(`C:${JSON.stringify(conf, null, 2)}`);
2529
+ const diagram2 = securityLevel === "sandbox" ? root.select(`[id="${id}"]`) : (0,d3__WEBPACK_IMPORTED_MODULE_3__/* .select */ .Ltv)(`[id="${id}"]`);
2530
+ svgDraw_default.insertComputerIcon(diagram2);
2531
+ svgDraw_default.insertDatabaseIcon(diagram2);
2532
+ svgDraw_default.insertClockIcon(diagram2);
2533
+ let screenBounds = new Bounds(diagObj);
2534
+ screenBounds.setData(
2535
+ conf.diagramMarginX,
2536
+ conf.diagramMarginX,
2537
+ conf.diagramMarginY,
2538
+ conf.diagramMarginY
2539
+ );
2540
+ screenBounds.data.widthLimit = screen.availWidth;
2541
+ globalBoundaryMaxX = conf.diagramMarginX;
2542
+ globalBoundaryMaxY = conf.diagramMarginY;
2543
+ const title2 = diagObj.db.getTitle();
2544
+ let currentBoundaries = diagObj.db.getBoundarys("");
2545
+ drawInsideBoundary(diagram2, "", screenBounds, currentBoundaries, diagObj);
2546
+ svgDraw_default.insertArrowHead(diagram2);
2547
+ svgDraw_default.insertArrowEnd(diagram2);
2548
+ svgDraw_default.insertArrowCrossHead(diagram2);
2549
+ svgDraw_default.insertArrowFilledHead(diagram2);
2550
+ drawRels2(diagram2, diagObj.db.getRels(), diagObj.db.getC4Shape, diagObj);
2551
+ screenBounds.data.stopx = globalBoundaryMaxX;
2552
+ screenBounds.data.stopy = globalBoundaryMaxY;
2553
+ const box = screenBounds.data;
2554
+ let boxHeight = box.stopy - box.starty;
2555
+ let height = boxHeight + 2 * conf.diagramMarginY;
2556
+ let boxWidth = box.stopx - box.startx;
2557
+ const width = boxWidth + 2 * conf.diagramMarginX;
2558
+ if (title2) {
2559
+ diagram2.append("text").text(title2).attr("x", (box.stopx - box.startx) / 2 - 4 * conf.diagramMarginX).attr("y", box.starty + conf.diagramMarginY);
2560
+ }
2561
+ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .configureSvgSize */ .a$)(diagram2, height, width, conf.useMaxWidth);
2562
+ const extraVertForTitle = title2 ? 60 : 0;
2563
+ diagram2.attr(
2564
+ "viewBox",
2565
+ box.startx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle)
2566
+ );
2567
+ _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .log */ .Rm.debug(`models:`, box);
2568
+ }, "draw");
2569
+ var c4Renderer_default = {
2570
+ drawPersonOrSystemArray: drawC4ShapeArray,
2571
+ drawBoundary: drawBoundary2,
2572
+ setConf,
2573
+ draw
2574
+ };
2575
+
2576
+ // src/diagrams/c4/styles.js
2577
+ var getStyles = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)((options) => `.person {
2578
+ stroke: ${options.personBorder};
2579
+ fill: ${options.personBkg};
2580
+ }
2581
+ `, "getStyles");
2582
+ var styles_default = getStyles;
2583
+
2584
+ // src/diagrams/c4/c4Diagram.ts
2585
+ var diagram = {
2586
+ parser: c4Diagram_default,
2587
+ db: c4Db_default,
2588
+ renderer: c4Renderer_default,
2589
+ styles: styles_default,
2590
+ init: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_2__/* .__name */ .K2)(({ c4, wrap }) => {
2591
+ c4Renderer_default.setConf(c4);
2592
+ c4Db_default.setWrap(wrap);
2593
+ }, "init")
2594
+ };
2595
+
2596
+
2597
+
2598
+ /***/ }),
2599
+
2600
+ /***/ 242:
2601
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2602
+
2603
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2604
+ /* harmony export */ CP: () => (/* binding */ drawEmbeddedImage),
2605
+ /* harmony export */ HT: () => (/* binding */ getTextObj),
2606
+ /* harmony export */ PB: () => (/* binding */ getNoteRect),
2607
+ /* harmony export */ aC: () => (/* binding */ drawImage),
2608
+ /* harmony export */ lC: () => (/* binding */ drawBackgroundRect),
2609
+ /* harmony export */ m: () => (/* binding */ drawText),
2610
+ /* harmony export */ tk: () => (/* binding */ drawRect)
2611
+ /* harmony export */ });
2612
+ /* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6322);
2613
+ /* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6750);
2614
+
2615
+
2616
+ // src/diagrams/common/svgDrawCommon.ts
2617
+
2618
+ var drawRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, rectData) => {
2619
+ const rectElement = element.append("rect");
2620
+ rectElement.attr("x", rectData.x);
2621
+ rectElement.attr("y", rectData.y);
2622
+ rectElement.attr("fill", rectData.fill);
2623
+ rectElement.attr("stroke", rectData.stroke);
2624
+ rectElement.attr("width", rectData.width);
2625
+ rectElement.attr("height", rectData.height);
2626
+ if (rectData.name) {
2627
+ rectElement.attr("name", rectData.name);
2628
+ }
2629
+ if (rectData.rx) {
2630
+ rectElement.attr("rx", rectData.rx);
2631
+ }
2632
+ if (rectData.ry) {
2633
+ rectElement.attr("ry", rectData.ry);
2634
+ }
2635
+ if (rectData.attrs !== void 0) {
2636
+ for (const attrKey in rectData.attrs) {
2637
+ rectElement.attr(attrKey, rectData.attrs[attrKey]);
2638
+ }
2639
+ }
2640
+ if (rectData.class) {
2641
+ rectElement.attr("class", rectData.class);
2642
+ }
2643
+ return rectElement;
2644
+ }, "drawRect");
2645
+ var drawBackgroundRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, bounds) => {
2646
+ const rectData = {
2647
+ x: bounds.startx,
2648
+ y: bounds.starty,
2649
+ width: bounds.stopx - bounds.startx,
2650
+ height: bounds.stopy - bounds.starty,
2651
+ fill: bounds.fill,
2652
+ stroke: bounds.stroke,
2653
+ class: "rect"
2654
+ };
2655
+ const rectElement = drawRect(element, rectData);
2656
+ rectElement.lower();
2657
+ }, "drawBackgroundRect");
2658
+ var drawText = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, textData) => {
2659
+ const nText = textData.text.replace(_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .lineBreakRegex */ .H1, " ");
2660
+ const textElem = element.append("text");
2661
+ textElem.attr("x", textData.x);
2662
+ textElem.attr("y", textData.y);
2663
+ textElem.attr("class", "legend");
2664
+ textElem.style("text-anchor", textData.anchor);
2665
+ if (textData.class) {
2666
+ textElem.attr("class", textData.class);
2667
+ }
2668
+ const tspan = textElem.append("tspan");
2669
+ tspan.attr("x", textData.x + textData.textMargin * 2);
2670
+ tspan.text(nText);
2671
+ return textElem;
2672
+ }, "drawText");
2673
+ var drawImage = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((elem, x, y, link) => {
2674
+ const imageElement = elem.append("image");
2675
+ imageElement.attr("x", x);
2676
+ imageElement.attr("y", y);
2677
+ const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .J)(link);
2678
+ imageElement.attr("xlink:href", sanitizedLink);
2679
+ }, "drawImage");
2680
+ var drawEmbeddedImage = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, x, y, link) => {
2681
+ const imageElement = element.append("use");
2682
+ imageElement.attr("x", x);
2683
+ imageElement.attr("y", y);
2684
+ const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .J)(link);
2685
+ imageElement.attr("xlink:href", `#${sanitizedLink}`);
2686
+ }, "drawEmbeddedImage");
2687
+ var getNoteRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(() => {
2688
+ const noteRectData = {
2689
+ x: 0,
2690
+ y: 0,
2691
+ width: 100,
2692
+ height: 100,
2693
+ fill: "#EDF2AE",
2694
+ stroke: "#666",
2695
+ anchor: "start",
2696
+ rx: 0,
2697
+ ry: 0
2698
+ };
2699
+ return noteRectData;
2700
+ }, "getNoteRect");
2701
+ var getTextObj = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(() => {
2702
+ const testObject = {
2703
+ x: 0,
2704
+ y: 0,
2705
+ width: 100,
2706
+ height: 100,
2707
+ "text-anchor": "start",
2708
+ style: "#666",
2709
+ textMargin: 0,
2710
+ rx: 0,
2711
+ ry: 0,
2712
+ tspan: true
2713
+ };
2714
+ return testObject;
2715
+ }, "getTextObj");
2716
+
2717
+
2718
+
2719
+
2720
+ /***/ })
2721
+
2722
+ }]);