@umami/shiso 1.12.0 → 1.13.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 (121) hide show
  1. package/dist/chunks/App.js +76 -49
  2. package/dist/chunks/abnfDiagram-VCTEODGH.js +109 -0
  3. package/dist/chunks/arc.js +130 -0
  4. package/dist/chunks/architecture-7GRP2DOG.js +4 -0
  5. package/dist/chunks/architectureDiagram-5GKGNRK7.js +7466 -0
  6. package/dist/chunks/array.js +8 -0
  7. package/dist/chunks/blockDiagram-I7D4REHJ.js +2546 -0
  8. package/dist/chunks/c4Diagram-7LVT6UL2.js +3654 -0
  9. package/dist/chunks/channel.js +9 -0
  10. package/dist/chunks/chunk-2Q5K7J3B.js +21 -0
  11. package/dist/chunks/chunk-4HAMMTFA.js +6106 -0
  12. package/dist/chunks/chunk-5VM5RSS4.js +21 -0
  13. package/dist/chunks/chunk-75Z2AOVW.js +2185 -0
  14. package/dist/chunks/chunk-DU6HZSFF.js +8729 -0
  15. package/dist/chunks/chunk-F27PBJKO.js +95 -0
  16. package/dist/chunks/chunk-FOHPRMQF.js +27162 -0
  17. package/dist/chunks/chunk-GMAD6QVW.js +2369 -0
  18. package/dist/chunks/chunk-GVQU2GXP.js +58 -0
  19. package/dist/chunks/chunk-IMKFNOWR.js +2593 -0
  20. package/dist/chunks/chunk-JWPE2WC7.js +12 -0
  21. package/dist/chunks/chunk-L3NEJ4N5.js +420 -0
  22. package/dist/chunks/chunk-OSK3NFVY.js +1029 -0
  23. package/dist/chunks/chunk-P2QGCYS3.js +95 -0
  24. package/dist/chunks/chunk-POPQ4Y6H.js +33 -0
  25. package/dist/chunks/chunk-PWAF6VOD.js +467 -0
  26. package/dist/chunks/chunk-SHT3W25Y.js +4813 -0
  27. package/dist/chunks/chunk-SVP7TREG.js +686 -0
  28. package/dist/chunks/chunk-TICWLB2K.js +3800 -0
  29. package/dist/chunks/chunk-XXDRQBXY.js +12 -0
  30. package/dist/chunks/chunk-Y2CYZVJY.js +15 -0
  31. package/dist/chunks/classDiagram-ZZMXUADV.js +33 -0
  32. package/dist/chunks/classDiagram-v2-VYDZK3BY.js +33 -0
  33. package/dist/chunks/cose-bilkent-JH36ORCC.js +4268 -0
  34. package/dist/chunks/cynefin-OW5HDTMX.js +4 -0
  35. package/dist/chunks/cynefinDiagram-5FMLGOSQ.js +482 -0
  36. package/dist/chunks/cytoscape.esm.js +28282 -0
  37. package/dist/chunks/dagre-GXQ25YYZ.js +583 -0
  38. package/dist/chunks/dagre.js +4235 -0
  39. package/dist/chunks/defaultLocale.js +246 -0
  40. package/dist/chunks/diagram-S7CK7UJ4.js +402 -0
  41. package/dist/chunks/diagram-UQ7AKVKN.js +291 -0
  42. package/dist/chunks/diagram-VSXAHHWV.js +553 -0
  43. package/dist/chunks/diagram-VX7I27RA.js +798 -0
  44. package/dist/chunks/diagram-Z3DM3KII.js +186 -0
  45. package/dist/chunks/dist.js +92 -0
  46. package/dist/chunks/docs.js +987 -91
  47. package/dist/chunks/ebnfDiagram-PWID7BFC.js +123 -0
  48. package/dist/chunks/erDiagram-RLTQ6QDP.js +2295 -0
  49. package/dist/chunks/eventmodeling-NTZA5JFV.js +4 -0
  50. package/dist/chunks/flowDiagram-HODETNUW.js +17 -0
  51. package/dist/chunks/ganttDiagram-EL5Y4UJY.js +3928 -0
  52. package/dist/chunks/gitGraph-4MIJSDKK.js +4 -0
  53. package/dist/chunks/gitGraphDiagram-WWUBYQGX.js +1153 -0
  54. package/dist/chunks/graphlib.js +4194 -0
  55. package/dist/chunks/info-A6RAGUB7.js +4 -0
  56. package/dist/chunks/infoDiagram-27XIBGKW.js +25 -0
  57. package/dist/chunks/init.js +14 -0
  58. package/dist/chunks/ishikawaDiagram-5VMMS53U.js +971 -0
  59. package/dist/chunks/journeyDiagram-3NMN7TZE.js +1226 -0
  60. package/dist/chunks/kanban-definition-UXKFOSKX.js +1241 -0
  61. package/dist/chunks/katex.js +26463 -0
  62. package/dist/chunks/line.js +48 -0
  63. package/dist/chunks/linear.js +391 -0
  64. package/dist/chunks/mermaid-parser.core.js +754 -0
  65. package/dist/chunks/mermaid.core.js +4898 -0
  66. package/dist/chunks/mindmap-definition-YA3MSWOX.js +1309 -0
  67. package/dist/chunks/ordinal.js +84 -0
  68. package/dist/chunks/packet-AYTQ26CC.js +4 -0
  69. package/dist/chunks/path.js +106 -0
  70. package/dist/chunks/pegDiagram-XKGWAZYB.js +115 -0
  71. package/dist/chunks/pie-WAS4IAKB.js +4 -0
  72. package/dist/chunks/pieDiagram-E7YTZNPT.js +297 -0
  73. package/dist/chunks/quadrantDiagram-AXDQQJYC.js +2234 -0
  74. package/dist/chunks/radar-RG4KPBEZ.js +4 -0
  75. package/dist/chunks/railroad-74A4TZTK.js +4 -0
  76. package/dist/chunks/railroad-abnf-HS5TGJTU.js +4 -0
  77. package/dist/chunks/railroad-ebnf-LZEXJU2U.js +4 -0
  78. package/dist/chunks/railroad-peg-WCYAUIDC.js +4 -0
  79. package/dist/chunks/railroadDiagram-O6MQD6OU.js +89 -0
  80. package/dist/chunks/requirementDiagram-BXWQKSXE.js +2464 -0
  81. package/dist/chunks/rough.esm.js +1396 -0
  82. package/dist/chunks/sankeyDiagram-P5KCCOFB.js +1308 -0
  83. package/dist/chunks/sequenceDiagram-WJ2MYXX4.js +5445 -0
  84. package/dist/chunks/sizeCapture-INFHLROL.js +56 -0
  85. package/dist/chunks/src.js +2653 -0
  86. package/dist/chunks/stateDiagram-D77RDMKH.js +368 -0
  87. package/dist/chunks/stateDiagram-v2-MP3YSRHH.js +33 -0
  88. package/dist/chunks/swimlanes-42K2YHIH.js +6925 -0
  89. package/dist/chunks/swimlanesDiagram-VR7AAH4N.js +32 -0
  90. package/dist/chunks/timeline-definition-24CTP7MA.js +1507 -0
  91. package/dist/chunks/treeView-Q6P3EWNA.js +4 -0
  92. package/dist/chunks/treemap-WGGIJYW6.js +4 -0
  93. package/dist/chunks/vennDiagram-4TSXK5OY.js +2803 -0
  94. package/dist/chunks/wardley-WFR3VGLG.js +4 -0
  95. package/dist/chunks/wardleyDiagram-VM6X3IG4.js +877 -0
  96. package/dist/chunks/xychartDiagram-S5SC5T6Z.js +2698 -0
  97. package/dist/components.js +2 -2
  98. package/dist/entry-client.js +1 -1
  99. package/dist/entry-server.js +1 -1
  100. package/docs.schema.json +1 -1
  101. package/package.json +2 -1
  102. package/scripts/expand-navigation-globs.mjs +77 -8
  103. package/src/components/CodeBlock.tsx +36 -0
  104. package/src/components/Docs.tsx +44 -21
  105. package/src/components/OpenApiOperation.tsx +28 -20
  106. package/src/components/SideNav.tsx +8 -3
  107. package/src/components/docs/Changelog.tsx +163 -0
  108. package/src/components/docs/Mermaid.tsx +164 -0
  109. package/src/components/docs/Panel.tsx +23 -0
  110. package/src/components/docs/ParamField.tsx +17 -5
  111. package/src/components/docs/PropertiesTable.tsx +2 -2
  112. package/src/components/docs/ResponseField.tsx +17 -5
  113. package/src/components/docs/Tiles.tsx +59 -0
  114. package/src/components/docs/Tree.tsx +359 -0
  115. package/src/components/docs/Update.tsx +72 -0
  116. package/src/components/docs/index.ts +7 -0
  117. package/src/components/docs/panel-context.tsx +25 -0
  118. package/src/components/docs/styles.ts +49 -0
  119. package/src/components/icons/index.ts +4 -0
  120. package/src/lib/rehype-shiki.ts +18 -1
  121. package/types/components.d.ts +79 -0
@@ -0,0 +1,3654 @@
1
+ import { n as __name } from "./chunk-Y2CYZVJY.js";
2
+ import { m as log, p as select_default } from "./src.js";
3
+ import { H as setAccDescription, U as setAccTitle, c as configureSvgSize, r as assignWithDepth_default, s as common_default, v as getAccDescription, x as getConfig2, y as getAccTitle, z as sanitizeText } from "./chunk-DU6HZSFF.js";
4
+ import { _ as wrapLabel, n as calculateTextHeight, r as calculateTextWidth } from "./chunk-75Z2AOVW.js";
5
+ import "./chunk-PWAF6VOD.js";
6
+ import "./chunk-GMAD6QVW.js";
7
+ import "./chunk-P2QGCYS3.js";
8
+ import { o as shapes } from "./chunk-4HAMMTFA.js";
9
+ import { a as drawRect } from "./chunk-F27PBJKO.js";
10
+
11
+ //#region ../../node_modules/.pnpm/mermaid@11.17.2/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-7LVT6UL2.mjs
12
+ var parser = (function() {
13
+ var o = /* @__PURE__ */ __name(function(k, v, o2, l) {
14
+ for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v);
15
+ return o2;
16
+ }, "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 = [
17
+ 14,
18
+ 34,
19
+ 36,
20
+ 37,
21
+ 38,
22
+ 39,
23
+ 40,
24
+ 41,
25
+ 42,
26
+ 44,
27
+ 45,
28
+ 46,
29
+ 47,
30
+ 48,
31
+ 49,
32
+ 50,
33
+ 51,
34
+ 52,
35
+ 53,
36
+ 54,
37
+ 55,
38
+ 56,
39
+ 57,
40
+ 58,
41
+ 59,
42
+ 60,
43
+ 61,
44
+ 62,
45
+ 63,
46
+ 64,
47
+ 65,
48
+ 66,
49
+ 67,
50
+ 68,
51
+ 69,
52
+ 70,
53
+ 71,
54
+ 72,
55
+ 73,
56
+ 74
57
+ ], $VJ = [
58
+ 12,
59
+ 14,
60
+ 34,
61
+ 36,
62
+ 37,
63
+ 38,
64
+ 39,
65
+ 40,
66
+ 41,
67
+ 42,
68
+ 44,
69
+ 45,
70
+ 46,
71
+ 47,
72
+ 48,
73
+ 49,
74
+ 50,
75
+ 51,
76
+ 52,
77
+ 53,
78
+ 54,
79
+ 55,
80
+ 56,
81
+ 57,
82
+ 58,
83
+ 59,
84
+ 60,
85
+ 61,
86
+ 62,
87
+ 63,
88
+ 64,
89
+ 65,
90
+ 66,
91
+ 67,
92
+ 68,
93
+ 69,
94
+ 70,
95
+ 71,
96
+ 72,
97
+ 73,
98
+ 74
99
+ ], $VK = [1, 82], $VL = [1, 83], $VM = [1, 84], $VN = [1, 85], $VO = [
100
+ 12,
101
+ 14,
102
+ 42
103
+ ], $VP = [
104
+ 12,
105
+ 14,
106
+ 33,
107
+ 42
108
+ ], $VQ = [
109
+ 12,
110
+ 14,
111
+ 33,
112
+ 42,
113
+ 76,
114
+ 77,
115
+ 79,
116
+ 80
117
+ ], $VR = [12, 33], $VS = [
118
+ 34,
119
+ 36,
120
+ 37,
121
+ 38,
122
+ 39,
123
+ 40,
124
+ 41,
125
+ 44,
126
+ 45,
127
+ 46,
128
+ 47,
129
+ 48,
130
+ 49,
131
+ 50,
132
+ 51,
133
+ 52,
134
+ 53,
135
+ 54,
136
+ 55,
137
+ 56,
138
+ 57,
139
+ 58,
140
+ 59,
141
+ 60,
142
+ 61,
143
+ 62,
144
+ 63,
145
+ 64,
146
+ 65,
147
+ 66,
148
+ 67,
149
+ 68,
150
+ 69,
151
+ 70,
152
+ 71,
153
+ 72,
154
+ 73,
155
+ 74
156
+ ];
157
+ var parser2 = {
158
+ trace: /* @__PURE__ */ __name(function trace() {}, "trace"),
159
+ yy: {},
160
+ symbols_: {
161
+ "error": 2,
162
+ "start": 3,
163
+ "mermaidDoc": 4,
164
+ "direction": 5,
165
+ "direction_tb": 6,
166
+ "direction_bt": 7,
167
+ "direction_rl": 8,
168
+ "direction_lr": 9,
169
+ "graphConfig": 10,
170
+ "C4_CONTEXT": 11,
171
+ "NEWLINE": 12,
172
+ "statements": 13,
173
+ "EOF": 14,
174
+ "C4_CONTAINER": 15,
175
+ "C4_COMPONENT": 16,
176
+ "C4_DYNAMIC": 17,
177
+ "C4_DEPLOYMENT": 18,
178
+ "otherStatements": 19,
179
+ "diagramStatements": 20,
180
+ "otherStatement": 21,
181
+ "title": 22,
182
+ "accDescription": 23,
183
+ "acc_title": 24,
184
+ "acc_title_value": 25,
185
+ "acc_descr": 26,
186
+ "acc_descr_value": 27,
187
+ "acc_descr_multiline_value": 28,
188
+ "boundaryStatement": 29,
189
+ "boundaryStartStatement": 30,
190
+ "boundaryStopStatement": 31,
191
+ "boundaryStart": 32,
192
+ "LBRACE": 33,
193
+ "ENTERPRISE_BOUNDARY": 34,
194
+ "attributes": 35,
195
+ "SYSTEM_BOUNDARY": 36,
196
+ "BOUNDARY": 37,
197
+ "CONTAINER_BOUNDARY": 38,
198
+ "NODE": 39,
199
+ "NODE_L": 40,
200
+ "NODE_R": 41,
201
+ "RBRACE": 42,
202
+ "diagramStatement": 43,
203
+ "PERSON": 44,
204
+ "PERSON_EXT": 45,
205
+ "SYSTEM": 46,
206
+ "SYSTEM_DB": 47,
207
+ "SYSTEM_QUEUE": 48,
208
+ "SYSTEM_EXT": 49,
209
+ "SYSTEM_EXT_DB": 50,
210
+ "SYSTEM_EXT_QUEUE": 51,
211
+ "CONTAINER": 52,
212
+ "CONTAINER_DB": 53,
213
+ "CONTAINER_QUEUE": 54,
214
+ "CONTAINER_EXT": 55,
215
+ "CONTAINER_EXT_DB": 56,
216
+ "CONTAINER_EXT_QUEUE": 57,
217
+ "COMPONENT": 58,
218
+ "COMPONENT_DB": 59,
219
+ "COMPONENT_QUEUE": 60,
220
+ "COMPONENT_EXT": 61,
221
+ "COMPONENT_EXT_DB": 62,
222
+ "COMPONENT_EXT_QUEUE": 63,
223
+ "REL": 64,
224
+ "BIREL": 65,
225
+ "REL_U": 66,
226
+ "REL_D": 67,
227
+ "REL_L": 68,
228
+ "REL_R": 69,
229
+ "REL_B": 70,
230
+ "REL_INDEX": 71,
231
+ "UPDATE_EL_STYLE": 72,
232
+ "UPDATE_REL_STYLE": 73,
233
+ "UPDATE_LAYOUT_CONFIG": 74,
234
+ "attribute": 75,
235
+ "STR": 76,
236
+ "STR_KEY": 77,
237
+ "STR_VALUE": 78,
238
+ "ATTRIBUTE": 79,
239
+ "ATTRIBUTE_EMPTY": 80,
240
+ "$accept": 0,
241
+ "$end": 1
242
+ },
243
+ terminals_: {
244
+ 2: "error",
245
+ 6: "direction_tb",
246
+ 7: "direction_bt",
247
+ 8: "direction_rl",
248
+ 9: "direction_lr",
249
+ 11: "C4_CONTEXT",
250
+ 12: "NEWLINE",
251
+ 14: "EOF",
252
+ 15: "C4_CONTAINER",
253
+ 16: "C4_COMPONENT",
254
+ 17: "C4_DYNAMIC",
255
+ 18: "C4_DEPLOYMENT",
256
+ 22: "title",
257
+ 23: "accDescription",
258
+ 24: "acc_title",
259
+ 25: "acc_title_value",
260
+ 26: "acc_descr",
261
+ 27: "acc_descr_value",
262
+ 28: "acc_descr_multiline_value",
263
+ 33: "LBRACE",
264
+ 34: "ENTERPRISE_BOUNDARY",
265
+ 36: "SYSTEM_BOUNDARY",
266
+ 37: "BOUNDARY",
267
+ 38: "CONTAINER_BOUNDARY",
268
+ 39: "NODE",
269
+ 40: "NODE_L",
270
+ 41: "NODE_R",
271
+ 42: "RBRACE",
272
+ 44: "PERSON",
273
+ 45: "PERSON_EXT",
274
+ 46: "SYSTEM",
275
+ 47: "SYSTEM_DB",
276
+ 48: "SYSTEM_QUEUE",
277
+ 49: "SYSTEM_EXT",
278
+ 50: "SYSTEM_EXT_DB",
279
+ 51: "SYSTEM_EXT_QUEUE",
280
+ 52: "CONTAINER",
281
+ 53: "CONTAINER_DB",
282
+ 54: "CONTAINER_QUEUE",
283
+ 55: "CONTAINER_EXT",
284
+ 56: "CONTAINER_EXT_DB",
285
+ 57: "CONTAINER_EXT_QUEUE",
286
+ 58: "COMPONENT",
287
+ 59: "COMPONENT_DB",
288
+ 60: "COMPONENT_QUEUE",
289
+ 61: "COMPONENT_EXT",
290
+ 62: "COMPONENT_EXT_DB",
291
+ 63: "COMPONENT_EXT_QUEUE",
292
+ 64: "REL",
293
+ 65: "BIREL",
294
+ 66: "REL_U",
295
+ 67: "REL_D",
296
+ 68: "REL_L",
297
+ 69: "REL_R",
298
+ 70: "REL_B",
299
+ 71: "REL_INDEX",
300
+ 72: "UPDATE_EL_STYLE",
301
+ 73: "UPDATE_REL_STYLE",
302
+ 74: "UPDATE_LAYOUT_CONFIG",
303
+ 76: "STR",
304
+ 77: "STR_KEY",
305
+ 78: "STR_VALUE",
306
+ 79: "ATTRIBUTE",
307
+ 80: "ATTRIBUTE_EMPTY"
308
+ },
309
+ productions_: [
310
+ 0,
311
+ [3, 1],
312
+ [3, 1],
313
+ [5, 1],
314
+ [5, 1],
315
+ [5, 1],
316
+ [5, 1],
317
+ [4, 1],
318
+ [10, 4],
319
+ [10, 4],
320
+ [10, 4],
321
+ [10, 4],
322
+ [10, 4],
323
+ [13, 1],
324
+ [13, 1],
325
+ [13, 2],
326
+ [19, 1],
327
+ [19, 2],
328
+ [19, 3],
329
+ [21, 1],
330
+ [21, 1],
331
+ [21, 2],
332
+ [21, 2],
333
+ [21, 1],
334
+ [29, 3],
335
+ [30, 3],
336
+ [30, 3],
337
+ [30, 4],
338
+ [32, 2],
339
+ [32, 2],
340
+ [32, 2],
341
+ [32, 2],
342
+ [32, 2],
343
+ [32, 2],
344
+ [32, 2],
345
+ [31, 1],
346
+ [20, 1],
347
+ [20, 2],
348
+ [20, 3],
349
+ [43, 2],
350
+ [43, 2],
351
+ [43, 2],
352
+ [43, 2],
353
+ [43, 2],
354
+ [43, 2],
355
+ [43, 2],
356
+ [43, 2],
357
+ [43, 2],
358
+ [43, 2],
359
+ [43, 2],
360
+ [43, 2],
361
+ [43, 2],
362
+ [43, 2],
363
+ [43, 2],
364
+ [43, 2],
365
+ [43, 2],
366
+ [43, 2],
367
+ [43, 2],
368
+ [43, 2],
369
+ [43, 1],
370
+ [43, 2],
371
+ [43, 2],
372
+ [43, 2],
373
+ [43, 2],
374
+ [43, 2],
375
+ [43, 2],
376
+ [43, 2],
377
+ [43, 2],
378
+ [43, 2],
379
+ [43, 2],
380
+ [43, 2],
381
+ [35, 1],
382
+ [35, 2],
383
+ [75, 1],
384
+ [75, 2],
385
+ [75, 1],
386
+ [75, 1]
387
+ ],
388
+ performAction: /* @__PURE__ */ __name(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
389
+ var $0 = $$.length - 1;
390
+ switch (yystate) {
391
+ case 3:
392
+ yy.setDirection("TB");
393
+ break;
394
+ case 4:
395
+ yy.setDirection("BT");
396
+ break;
397
+ case 5:
398
+ yy.setDirection("RL");
399
+ break;
400
+ case 6:
401
+ yy.setDirection("LR");
402
+ break;
403
+ case 8:
404
+ case 9:
405
+ case 10:
406
+ case 11:
407
+ case 12:
408
+ yy.setC4Type($$[$0 - 3]);
409
+ break;
410
+ case 19:
411
+ yy.setTitle($$[$0].substring(6));
412
+ this.$ = $$[$0].substring(6);
413
+ break;
414
+ case 20:
415
+ yy.setAccDescription($$[$0].substring(15));
416
+ this.$ = $$[$0].substring(15);
417
+ break;
418
+ case 21:
419
+ this.$ = $$[$0].trim();
420
+ yy.setTitle(this.$);
421
+ break;
422
+ case 22:
423
+ case 23:
424
+ this.$ = $$[$0].trim();
425
+ yy.setAccDescription(this.$);
426
+ break;
427
+ case 28:
428
+ $$[$0].splice(2, 0, "ENTERPRISE");
429
+ yy.addPersonOrSystemBoundary(...$$[$0]);
430
+ this.$ = $$[$0];
431
+ break;
432
+ case 29:
433
+ $$[$0].splice(2, 0, "SYSTEM");
434
+ yy.addPersonOrSystemBoundary(...$$[$0]);
435
+ this.$ = $$[$0];
436
+ break;
437
+ case 30:
438
+ yy.addPersonOrSystemBoundary(...$$[$0]);
439
+ this.$ = $$[$0];
440
+ break;
441
+ case 31:
442
+ $$[$0].splice(2, 0, "CONTAINER");
443
+ yy.addContainerBoundary(...$$[$0]);
444
+ this.$ = $$[$0];
445
+ break;
446
+ case 32:
447
+ yy.addDeploymentNode("node", ...$$[$0]);
448
+ this.$ = $$[$0];
449
+ break;
450
+ case 33:
451
+ yy.addDeploymentNode("nodeL", ...$$[$0]);
452
+ this.$ = $$[$0];
453
+ break;
454
+ case 34:
455
+ yy.addDeploymentNode("nodeR", ...$$[$0]);
456
+ this.$ = $$[$0];
457
+ break;
458
+ case 35:
459
+ yy.popBoundaryParseStack();
460
+ break;
461
+ case 39:
462
+ yy.addPersonOrSystem("person", ...$$[$0]);
463
+ this.$ = $$[$0];
464
+ break;
465
+ case 40:
466
+ yy.addPersonOrSystem("external_person", ...$$[$0]);
467
+ this.$ = $$[$0];
468
+ break;
469
+ case 41:
470
+ yy.addPersonOrSystem("system", ...$$[$0]);
471
+ this.$ = $$[$0];
472
+ break;
473
+ case 42:
474
+ yy.addPersonOrSystem("system_db", ...$$[$0]);
475
+ this.$ = $$[$0];
476
+ break;
477
+ case 43:
478
+ yy.addPersonOrSystem("system_queue", ...$$[$0]);
479
+ this.$ = $$[$0];
480
+ break;
481
+ case 44:
482
+ yy.addPersonOrSystem("external_system", ...$$[$0]);
483
+ this.$ = $$[$0];
484
+ break;
485
+ case 45:
486
+ yy.addPersonOrSystem("external_system_db", ...$$[$0]);
487
+ this.$ = $$[$0];
488
+ break;
489
+ case 46:
490
+ yy.addPersonOrSystem("external_system_queue", ...$$[$0]);
491
+ this.$ = $$[$0];
492
+ break;
493
+ case 47:
494
+ yy.addContainer("container", ...$$[$0]);
495
+ this.$ = $$[$0];
496
+ break;
497
+ case 48:
498
+ yy.addContainer("container_db", ...$$[$0]);
499
+ this.$ = $$[$0];
500
+ break;
501
+ case 49:
502
+ yy.addContainer("container_queue", ...$$[$0]);
503
+ this.$ = $$[$0];
504
+ break;
505
+ case 50:
506
+ yy.addContainer("external_container", ...$$[$0]);
507
+ this.$ = $$[$0];
508
+ break;
509
+ case 51:
510
+ yy.addContainer("external_container_db", ...$$[$0]);
511
+ this.$ = $$[$0];
512
+ break;
513
+ case 52:
514
+ yy.addContainer("external_container_queue", ...$$[$0]);
515
+ this.$ = $$[$0];
516
+ break;
517
+ case 53:
518
+ yy.addComponent("component", ...$$[$0]);
519
+ this.$ = $$[$0];
520
+ break;
521
+ case 54:
522
+ yy.addComponent("component_db", ...$$[$0]);
523
+ this.$ = $$[$0];
524
+ break;
525
+ case 55:
526
+ yy.addComponent("component_queue", ...$$[$0]);
527
+ this.$ = $$[$0];
528
+ break;
529
+ case 56:
530
+ yy.addComponent("external_component", ...$$[$0]);
531
+ this.$ = $$[$0];
532
+ break;
533
+ case 57:
534
+ yy.addComponent("external_component_db", ...$$[$0]);
535
+ this.$ = $$[$0];
536
+ break;
537
+ case 58:
538
+ yy.addComponent("external_component_queue", ...$$[$0]);
539
+ this.$ = $$[$0];
540
+ break;
541
+ case 60:
542
+ yy.addRel("rel", ...$$[$0]);
543
+ this.$ = $$[$0];
544
+ break;
545
+ case 61:
546
+ yy.addRel("birel", ...$$[$0]);
547
+ this.$ = $$[$0];
548
+ break;
549
+ case 62:
550
+ yy.addRel("rel_u", ...$$[$0]);
551
+ this.$ = $$[$0];
552
+ break;
553
+ case 63:
554
+ yy.addRel("rel_d", ...$$[$0]);
555
+ this.$ = $$[$0];
556
+ break;
557
+ case 64:
558
+ yy.addRel("rel_l", ...$$[$0]);
559
+ this.$ = $$[$0];
560
+ break;
561
+ case 65:
562
+ yy.addRel("rel_r", ...$$[$0]);
563
+ this.$ = $$[$0];
564
+ break;
565
+ case 66:
566
+ yy.addRel("rel_b", ...$$[$0]);
567
+ this.$ = $$[$0];
568
+ break;
569
+ case 67:
570
+ $$[$0].splice(0, 1);
571
+ yy.addRel("rel", ...$$[$0]);
572
+ this.$ = $$[$0];
573
+ break;
574
+ case 68:
575
+ yy.updateElStyle("update_el_style", ...$$[$0]);
576
+ this.$ = $$[$0];
577
+ break;
578
+ case 69:
579
+ yy.updateRelStyle("update_rel_style", ...$$[$0]);
580
+ this.$ = $$[$0];
581
+ break;
582
+ case 70:
583
+ yy.updateLayoutConfig("update_layout_config", ...$$[$0]);
584
+ this.$ = $$[$0];
585
+ break;
586
+ case 71:
587
+ this.$ = [$$[$0]];
588
+ break;
589
+ case 72:
590
+ $$[$0].unshift($$[$0 - 1]);
591
+ this.$ = $$[$0];
592
+ break;
593
+ case 73:
594
+ case 75:
595
+ this.$ = $$[$0].trim();
596
+ break;
597
+ case 74:
598
+ let kv = {};
599
+ kv[$$[$0 - 1].trim()] = $$[$0].trim();
600
+ this.$ = kv;
601
+ break;
602
+ case 76: this.$ = "";
603
+ }
604
+ }, "anonymous"),
605
+ table: [
606
+ {
607
+ 3: 1,
608
+ 4: 2,
609
+ 5: 3,
610
+ 6: [1, 5],
611
+ 7: [1, 6],
612
+ 8: [1, 7],
613
+ 9: [1, 8],
614
+ 10: 4,
615
+ 11: [1, 9],
616
+ 15: [1, 10],
617
+ 16: [1, 11],
618
+ 17: [1, 12],
619
+ 18: [1, 13]
620
+ },
621
+ { 1: [3] },
622
+ { 1: [2, 1] },
623
+ { 1: [2, 2] },
624
+ { 1: [2, 7] },
625
+ { 1: [2, 3] },
626
+ { 1: [2, 4] },
627
+ { 1: [2, 5] },
628
+ { 1: [2, 6] },
629
+ { 12: [1, 14] },
630
+ { 12: [1, 15] },
631
+ { 12: [1, 16] },
632
+ { 12: [1, 17] },
633
+ { 12: [1, 18] },
634
+ {
635
+ 13: 19,
636
+ 19: 20,
637
+ 20: 21,
638
+ 21: 22,
639
+ 22: $V0,
640
+ 23: $V1,
641
+ 24: $V2,
642
+ 26: $V3,
643
+ 28: $V4,
644
+ 29: 49,
645
+ 30: 61,
646
+ 32: 62,
647
+ 34: $V5,
648
+ 36: $V6,
649
+ 37: $V7,
650
+ 38: $V8,
651
+ 39: $V9,
652
+ 40: $Va,
653
+ 41: $Vb,
654
+ 43: 23,
655
+ 44: $Vc,
656
+ 45: $Vd,
657
+ 46: $Ve,
658
+ 47: $Vf,
659
+ 48: $Vg,
660
+ 49: $Vh,
661
+ 50: $Vi,
662
+ 51: $Vj,
663
+ 52: $Vk,
664
+ 53: $Vl,
665
+ 54: $Vm,
666
+ 55: $Vn,
667
+ 56: $Vo,
668
+ 57: $Vp,
669
+ 58: $Vq,
670
+ 59: $Vr,
671
+ 60: $Vs,
672
+ 61: $Vt,
673
+ 62: $Vu,
674
+ 63: $Vv,
675
+ 64: $Vw,
676
+ 65: $Vx,
677
+ 66: $Vy,
678
+ 67: $Vz,
679
+ 68: $VA,
680
+ 69: $VB,
681
+ 70: $VC,
682
+ 71: $VD,
683
+ 72: $VE,
684
+ 73: $VF,
685
+ 74: $VG
686
+ },
687
+ {
688
+ 13: 70,
689
+ 19: 20,
690
+ 20: 21,
691
+ 21: 22,
692
+ 22: $V0,
693
+ 23: $V1,
694
+ 24: $V2,
695
+ 26: $V3,
696
+ 28: $V4,
697
+ 29: 49,
698
+ 30: 61,
699
+ 32: 62,
700
+ 34: $V5,
701
+ 36: $V6,
702
+ 37: $V7,
703
+ 38: $V8,
704
+ 39: $V9,
705
+ 40: $Va,
706
+ 41: $Vb,
707
+ 43: 23,
708
+ 44: $Vc,
709
+ 45: $Vd,
710
+ 46: $Ve,
711
+ 47: $Vf,
712
+ 48: $Vg,
713
+ 49: $Vh,
714
+ 50: $Vi,
715
+ 51: $Vj,
716
+ 52: $Vk,
717
+ 53: $Vl,
718
+ 54: $Vm,
719
+ 55: $Vn,
720
+ 56: $Vo,
721
+ 57: $Vp,
722
+ 58: $Vq,
723
+ 59: $Vr,
724
+ 60: $Vs,
725
+ 61: $Vt,
726
+ 62: $Vu,
727
+ 63: $Vv,
728
+ 64: $Vw,
729
+ 65: $Vx,
730
+ 66: $Vy,
731
+ 67: $Vz,
732
+ 68: $VA,
733
+ 69: $VB,
734
+ 70: $VC,
735
+ 71: $VD,
736
+ 72: $VE,
737
+ 73: $VF,
738
+ 74: $VG
739
+ },
740
+ {
741
+ 13: 71,
742
+ 19: 20,
743
+ 20: 21,
744
+ 21: 22,
745
+ 22: $V0,
746
+ 23: $V1,
747
+ 24: $V2,
748
+ 26: $V3,
749
+ 28: $V4,
750
+ 29: 49,
751
+ 30: 61,
752
+ 32: 62,
753
+ 34: $V5,
754
+ 36: $V6,
755
+ 37: $V7,
756
+ 38: $V8,
757
+ 39: $V9,
758
+ 40: $Va,
759
+ 41: $Vb,
760
+ 43: 23,
761
+ 44: $Vc,
762
+ 45: $Vd,
763
+ 46: $Ve,
764
+ 47: $Vf,
765
+ 48: $Vg,
766
+ 49: $Vh,
767
+ 50: $Vi,
768
+ 51: $Vj,
769
+ 52: $Vk,
770
+ 53: $Vl,
771
+ 54: $Vm,
772
+ 55: $Vn,
773
+ 56: $Vo,
774
+ 57: $Vp,
775
+ 58: $Vq,
776
+ 59: $Vr,
777
+ 60: $Vs,
778
+ 61: $Vt,
779
+ 62: $Vu,
780
+ 63: $Vv,
781
+ 64: $Vw,
782
+ 65: $Vx,
783
+ 66: $Vy,
784
+ 67: $Vz,
785
+ 68: $VA,
786
+ 69: $VB,
787
+ 70: $VC,
788
+ 71: $VD,
789
+ 72: $VE,
790
+ 73: $VF,
791
+ 74: $VG
792
+ },
793
+ {
794
+ 13: 72,
795
+ 19: 20,
796
+ 20: 21,
797
+ 21: 22,
798
+ 22: $V0,
799
+ 23: $V1,
800
+ 24: $V2,
801
+ 26: $V3,
802
+ 28: $V4,
803
+ 29: 49,
804
+ 30: 61,
805
+ 32: 62,
806
+ 34: $V5,
807
+ 36: $V6,
808
+ 37: $V7,
809
+ 38: $V8,
810
+ 39: $V9,
811
+ 40: $Va,
812
+ 41: $Vb,
813
+ 43: 23,
814
+ 44: $Vc,
815
+ 45: $Vd,
816
+ 46: $Ve,
817
+ 47: $Vf,
818
+ 48: $Vg,
819
+ 49: $Vh,
820
+ 50: $Vi,
821
+ 51: $Vj,
822
+ 52: $Vk,
823
+ 53: $Vl,
824
+ 54: $Vm,
825
+ 55: $Vn,
826
+ 56: $Vo,
827
+ 57: $Vp,
828
+ 58: $Vq,
829
+ 59: $Vr,
830
+ 60: $Vs,
831
+ 61: $Vt,
832
+ 62: $Vu,
833
+ 63: $Vv,
834
+ 64: $Vw,
835
+ 65: $Vx,
836
+ 66: $Vy,
837
+ 67: $Vz,
838
+ 68: $VA,
839
+ 69: $VB,
840
+ 70: $VC,
841
+ 71: $VD,
842
+ 72: $VE,
843
+ 73: $VF,
844
+ 74: $VG
845
+ },
846
+ {
847
+ 13: 73,
848
+ 19: 20,
849
+ 20: 21,
850
+ 21: 22,
851
+ 22: $V0,
852
+ 23: $V1,
853
+ 24: $V2,
854
+ 26: $V3,
855
+ 28: $V4,
856
+ 29: 49,
857
+ 30: 61,
858
+ 32: 62,
859
+ 34: $V5,
860
+ 36: $V6,
861
+ 37: $V7,
862
+ 38: $V8,
863
+ 39: $V9,
864
+ 40: $Va,
865
+ 41: $Vb,
866
+ 43: 23,
867
+ 44: $Vc,
868
+ 45: $Vd,
869
+ 46: $Ve,
870
+ 47: $Vf,
871
+ 48: $Vg,
872
+ 49: $Vh,
873
+ 50: $Vi,
874
+ 51: $Vj,
875
+ 52: $Vk,
876
+ 53: $Vl,
877
+ 54: $Vm,
878
+ 55: $Vn,
879
+ 56: $Vo,
880
+ 57: $Vp,
881
+ 58: $Vq,
882
+ 59: $Vr,
883
+ 60: $Vs,
884
+ 61: $Vt,
885
+ 62: $Vu,
886
+ 63: $Vv,
887
+ 64: $Vw,
888
+ 65: $Vx,
889
+ 66: $Vy,
890
+ 67: $Vz,
891
+ 68: $VA,
892
+ 69: $VB,
893
+ 70: $VC,
894
+ 71: $VD,
895
+ 72: $VE,
896
+ 73: $VF,
897
+ 74: $VG
898
+ },
899
+ { 14: [1, 74] },
900
+ o($VH, [2, 13], {
901
+ 43: 23,
902
+ 29: 49,
903
+ 30: 61,
904
+ 32: 62,
905
+ 20: 75,
906
+ 34: $V5,
907
+ 36: $V6,
908
+ 37: $V7,
909
+ 38: $V8,
910
+ 39: $V9,
911
+ 40: $Va,
912
+ 41: $Vb,
913
+ 44: $Vc,
914
+ 45: $Vd,
915
+ 46: $Ve,
916
+ 47: $Vf,
917
+ 48: $Vg,
918
+ 49: $Vh,
919
+ 50: $Vi,
920
+ 51: $Vj,
921
+ 52: $Vk,
922
+ 53: $Vl,
923
+ 54: $Vm,
924
+ 55: $Vn,
925
+ 56: $Vo,
926
+ 57: $Vp,
927
+ 58: $Vq,
928
+ 59: $Vr,
929
+ 60: $Vs,
930
+ 61: $Vt,
931
+ 62: $Vu,
932
+ 63: $Vv,
933
+ 64: $Vw,
934
+ 65: $Vx,
935
+ 66: $Vy,
936
+ 67: $Vz,
937
+ 68: $VA,
938
+ 69: $VB,
939
+ 70: $VC,
940
+ 71: $VD,
941
+ 72: $VE,
942
+ 73: $VF,
943
+ 74: $VG
944
+ }),
945
+ o($VH, [2, 14]),
946
+ o($VI, [2, 16], { 12: [1, 76] }),
947
+ o($VH, [2, 36], { 12: [1, 77] }),
948
+ o($VJ, [2, 19]),
949
+ o($VJ, [2, 20]),
950
+ { 25: [1, 78] },
951
+ { 27: [1, 79] },
952
+ o($VJ, [2, 23]),
953
+ {
954
+ 35: 80,
955
+ 75: 81,
956
+ 76: $VK,
957
+ 77: $VL,
958
+ 79: $VM,
959
+ 80: $VN
960
+ },
961
+ {
962
+ 35: 86,
963
+ 75: 81,
964
+ 76: $VK,
965
+ 77: $VL,
966
+ 79: $VM,
967
+ 80: $VN
968
+ },
969
+ {
970
+ 35: 87,
971
+ 75: 81,
972
+ 76: $VK,
973
+ 77: $VL,
974
+ 79: $VM,
975
+ 80: $VN
976
+ },
977
+ {
978
+ 35: 88,
979
+ 75: 81,
980
+ 76: $VK,
981
+ 77: $VL,
982
+ 79: $VM,
983
+ 80: $VN
984
+ },
985
+ {
986
+ 35: 89,
987
+ 75: 81,
988
+ 76: $VK,
989
+ 77: $VL,
990
+ 79: $VM,
991
+ 80: $VN
992
+ },
993
+ {
994
+ 35: 90,
995
+ 75: 81,
996
+ 76: $VK,
997
+ 77: $VL,
998
+ 79: $VM,
999
+ 80: $VN
1000
+ },
1001
+ {
1002
+ 35: 91,
1003
+ 75: 81,
1004
+ 76: $VK,
1005
+ 77: $VL,
1006
+ 79: $VM,
1007
+ 80: $VN
1008
+ },
1009
+ {
1010
+ 35: 92,
1011
+ 75: 81,
1012
+ 76: $VK,
1013
+ 77: $VL,
1014
+ 79: $VM,
1015
+ 80: $VN
1016
+ },
1017
+ {
1018
+ 35: 93,
1019
+ 75: 81,
1020
+ 76: $VK,
1021
+ 77: $VL,
1022
+ 79: $VM,
1023
+ 80: $VN
1024
+ },
1025
+ {
1026
+ 35: 94,
1027
+ 75: 81,
1028
+ 76: $VK,
1029
+ 77: $VL,
1030
+ 79: $VM,
1031
+ 80: $VN
1032
+ },
1033
+ {
1034
+ 35: 95,
1035
+ 75: 81,
1036
+ 76: $VK,
1037
+ 77: $VL,
1038
+ 79: $VM,
1039
+ 80: $VN
1040
+ },
1041
+ {
1042
+ 35: 96,
1043
+ 75: 81,
1044
+ 76: $VK,
1045
+ 77: $VL,
1046
+ 79: $VM,
1047
+ 80: $VN
1048
+ },
1049
+ {
1050
+ 35: 97,
1051
+ 75: 81,
1052
+ 76: $VK,
1053
+ 77: $VL,
1054
+ 79: $VM,
1055
+ 80: $VN
1056
+ },
1057
+ {
1058
+ 35: 98,
1059
+ 75: 81,
1060
+ 76: $VK,
1061
+ 77: $VL,
1062
+ 79: $VM,
1063
+ 80: $VN
1064
+ },
1065
+ {
1066
+ 35: 99,
1067
+ 75: 81,
1068
+ 76: $VK,
1069
+ 77: $VL,
1070
+ 79: $VM,
1071
+ 80: $VN
1072
+ },
1073
+ {
1074
+ 35: 100,
1075
+ 75: 81,
1076
+ 76: $VK,
1077
+ 77: $VL,
1078
+ 79: $VM,
1079
+ 80: $VN
1080
+ },
1081
+ {
1082
+ 35: 101,
1083
+ 75: 81,
1084
+ 76: $VK,
1085
+ 77: $VL,
1086
+ 79: $VM,
1087
+ 80: $VN
1088
+ },
1089
+ {
1090
+ 35: 102,
1091
+ 75: 81,
1092
+ 76: $VK,
1093
+ 77: $VL,
1094
+ 79: $VM,
1095
+ 80: $VN
1096
+ },
1097
+ {
1098
+ 35: 103,
1099
+ 75: 81,
1100
+ 76: $VK,
1101
+ 77: $VL,
1102
+ 79: $VM,
1103
+ 80: $VN
1104
+ },
1105
+ {
1106
+ 35: 104,
1107
+ 75: 81,
1108
+ 76: $VK,
1109
+ 77: $VL,
1110
+ 79: $VM,
1111
+ 80: $VN
1112
+ },
1113
+ o($VO, [2, 59]),
1114
+ {
1115
+ 35: 105,
1116
+ 75: 81,
1117
+ 76: $VK,
1118
+ 77: $VL,
1119
+ 79: $VM,
1120
+ 80: $VN
1121
+ },
1122
+ {
1123
+ 35: 106,
1124
+ 75: 81,
1125
+ 76: $VK,
1126
+ 77: $VL,
1127
+ 79: $VM,
1128
+ 80: $VN
1129
+ },
1130
+ {
1131
+ 35: 107,
1132
+ 75: 81,
1133
+ 76: $VK,
1134
+ 77: $VL,
1135
+ 79: $VM,
1136
+ 80: $VN
1137
+ },
1138
+ {
1139
+ 35: 108,
1140
+ 75: 81,
1141
+ 76: $VK,
1142
+ 77: $VL,
1143
+ 79: $VM,
1144
+ 80: $VN
1145
+ },
1146
+ {
1147
+ 35: 109,
1148
+ 75: 81,
1149
+ 76: $VK,
1150
+ 77: $VL,
1151
+ 79: $VM,
1152
+ 80: $VN
1153
+ },
1154
+ {
1155
+ 35: 110,
1156
+ 75: 81,
1157
+ 76: $VK,
1158
+ 77: $VL,
1159
+ 79: $VM,
1160
+ 80: $VN
1161
+ },
1162
+ {
1163
+ 35: 111,
1164
+ 75: 81,
1165
+ 76: $VK,
1166
+ 77: $VL,
1167
+ 79: $VM,
1168
+ 80: $VN
1169
+ },
1170
+ {
1171
+ 35: 112,
1172
+ 75: 81,
1173
+ 76: $VK,
1174
+ 77: $VL,
1175
+ 79: $VM,
1176
+ 80: $VN
1177
+ },
1178
+ {
1179
+ 35: 113,
1180
+ 75: 81,
1181
+ 76: $VK,
1182
+ 77: $VL,
1183
+ 79: $VM,
1184
+ 80: $VN
1185
+ },
1186
+ {
1187
+ 35: 114,
1188
+ 75: 81,
1189
+ 76: $VK,
1190
+ 77: $VL,
1191
+ 79: $VM,
1192
+ 80: $VN
1193
+ },
1194
+ {
1195
+ 35: 115,
1196
+ 75: 81,
1197
+ 76: $VK,
1198
+ 77: $VL,
1199
+ 79: $VM,
1200
+ 80: $VN
1201
+ },
1202
+ {
1203
+ 20: 116,
1204
+ 29: 49,
1205
+ 30: 61,
1206
+ 32: 62,
1207
+ 34: $V5,
1208
+ 36: $V6,
1209
+ 37: $V7,
1210
+ 38: $V8,
1211
+ 39: $V9,
1212
+ 40: $Va,
1213
+ 41: $Vb,
1214
+ 43: 23,
1215
+ 44: $Vc,
1216
+ 45: $Vd,
1217
+ 46: $Ve,
1218
+ 47: $Vf,
1219
+ 48: $Vg,
1220
+ 49: $Vh,
1221
+ 50: $Vi,
1222
+ 51: $Vj,
1223
+ 52: $Vk,
1224
+ 53: $Vl,
1225
+ 54: $Vm,
1226
+ 55: $Vn,
1227
+ 56: $Vo,
1228
+ 57: $Vp,
1229
+ 58: $Vq,
1230
+ 59: $Vr,
1231
+ 60: $Vs,
1232
+ 61: $Vt,
1233
+ 62: $Vu,
1234
+ 63: $Vv,
1235
+ 64: $Vw,
1236
+ 65: $Vx,
1237
+ 66: $Vy,
1238
+ 67: $Vz,
1239
+ 68: $VA,
1240
+ 69: $VB,
1241
+ 70: $VC,
1242
+ 71: $VD,
1243
+ 72: $VE,
1244
+ 73: $VF,
1245
+ 74: $VG
1246
+ },
1247
+ {
1248
+ 12: [1, 118],
1249
+ 33: [1, 117]
1250
+ },
1251
+ {
1252
+ 35: 119,
1253
+ 75: 81,
1254
+ 76: $VK,
1255
+ 77: $VL,
1256
+ 79: $VM,
1257
+ 80: $VN
1258
+ },
1259
+ {
1260
+ 35: 120,
1261
+ 75: 81,
1262
+ 76: $VK,
1263
+ 77: $VL,
1264
+ 79: $VM,
1265
+ 80: $VN
1266
+ },
1267
+ {
1268
+ 35: 121,
1269
+ 75: 81,
1270
+ 76: $VK,
1271
+ 77: $VL,
1272
+ 79: $VM,
1273
+ 80: $VN
1274
+ },
1275
+ {
1276
+ 35: 122,
1277
+ 75: 81,
1278
+ 76: $VK,
1279
+ 77: $VL,
1280
+ 79: $VM,
1281
+ 80: $VN
1282
+ },
1283
+ {
1284
+ 35: 123,
1285
+ 75: 81,
1286
+ 76: $VK,
1287
+ 77: $VL,
1288
+ 79: $VM,
1289
+ 80: $VN
1290
+ },
1291
+ {
1292
+ 35: 124,
1293
+ 75: 81,
1294
+ 76: $VK,
1295
+ 77: $VL,
1296
+ 79: $VM,
1297
+ 80: $VN
1298
+ },
1299
+ {
1300
+ 35: 125,
1301
+ 75: 81,
1302
+ 76: $VK,
1303
+ 77: $VL,
1304
+ 79: $VM,
1305
+ 80: $VN
1306
+ },
1307
+ { 14: [1, 126] },
1308
+ { 14: [1, 127] },
1309
+ { 14: [1, 128] },
1310
+ { 14: [1, 129] },
1311
+ { 1: [2, 8] },
1312
+ o($VH, [2, 15]),
1313
+ o($VI, [2, 17], {
1314
+ 21: 22,
1315
+ 19: 130,
1316
+ 22: $V0,
1317
+ 23: $V1,
1318
+ 24: $V2,
1319
+ 26: $V3,
1320
+ 28: $V4
1321
+ }),
1322
+ o($VH, [2, 37], {
1323
+ 19: 20,
1324
+ 20: 21,
1325
+ 21: 22,
1326
+ 43: 23,
1327
+ 29: 49,
1328
+ 30: 61,
1329
+ 32: 62,
1330
+ 13: 131,
1331
+ 22: $V0,
1332
+ 23: $V1,
1333
+ 24: $V2,
1334
+ 26: $V3,
1335
+ 28: $V4,
1336
+ 34: $V5,
1337
+ 36: $V6,
1338
+ 37: $V7,
1339
+ 38: $V8,
1340
+ 39: $V9,
1341
+ 40: $Va,
1342
+ 41: $Vb,
1343
+ 44: $Vc,
1344
+ 45: $Vd,
1345
+ 46: $Ve,
1346
+ 47: $Vf,
1347
+ 48: $Vg,
1348
+ 49: $Vh,
1349
+ 50: $Vi,
1350
+ 51: $Vj,
1351
+ 52: $Vk,
1352
+ 53: $Vl,
1353
+ 54: $Vm,
1354
+ 55: $Vn,
1355
+ 56: $Vo,
1356
+ 57: $Vp,
1357
+ 58: $Vq,
1358
+ 59: $Vr,
1359
+ 60: $Vs,
1360
+ 61: $Vt,
1361
+ 62: $Vu,
1362
+ 63: $Vv,
1363
+ 64: $Vw,
1364
+ 65: $Vx,
1365
+ 66: $Vy,
1366
+ 67: $Vz,
1367
+ 68: $VA,
1368
+ 69: $VB,
1369
+ 70: $VC,
1370
+ 71: $VD,
1371
+ 72: $VE,
1372
+ 73: $VF,
1373
+ 74: $VG
1374
+ }),
1375
+ o($VJ, [2, 21]),
1376
+ o($VJ, [2, 22]),
1377
+ o($VO, [2, 39]),
1378
+ o($VP, [2, 71], {
1379
+ 75: 81,
1380
+ 35: 132,
1381
+ 76: $VK,
1382
+ 77: $VL,
1383
+ 79: $VM,
1384
+ 80: $VN
1385
+ }),
1386
+ o($VQ, [2, 73]),
1387
+ { 78: [1, 133] },
1388
+ o($VQ, [2, 75]),
1389
+ o($VQ, [2, 76]),
1390
+ o($VO, [2, 40]),
1391
+ o($VO, [2, 41]),
1392
+ o($VO, [2, 42]),
1393
+ o($VO, [2, 43]),
1394
+ o($VO, [2, 44]),
1395
+ o($VO, [2, 45]),
1396
+ o($VO, [2, 46]),
1397
+ o($VO, [2, 47]),
1398
+ o($VO, [2, 48]),
1399
+ o($VO, [2, 49]),
1400
+ o($VO, [2, 50]),
1401
+ o($VO, [2, 51]),
1402
+ o($VO, [2, 52]),
1403
+ o($VO, [2, 53]),
1404
+ o($VO, [2, 54]),
1405
+ o($VO, [2, 55]),
1406
+ o($VO, [2, 56]),
1407
+ o($VO, [2, 57]),
1408
+ o($VO, [2, 58]),
1409
+ o($VO, [2, 60]),
1410
+ o($VO, [2, 61]),
1411
+ o($VO, [2, 62]),
1412
+ o($VO, [2, 63]),
1413
+ o($VO, [2, 64]),
1414
+ o($VO, [2, 65]),
1415
+ o($VO, [2, 66]),
1416
+ o($VO, [2, 67]),
1417
+ o($VO, [2, 68]),
1418
+ o($VO, [2, 69]),
1419
+ o($VO, [2, 70]),
1420
+ {
1421
+ 31: 134,
1422
+ 42: [1, 135]
1423
+ },
1424
+ { 12: [1, 136] },
1425
+ { 33: [1, 137] },
1426
+ o($VR, [2, 28]),
1427
+ o($VR, [2, 29]),
1428
+ o($VR, [2, 30]),
1429
+ o($VR, [2, 31]),
1430
+ o($VR, [2, 32]),
1431
+ o($VR, [2, 33]),
1432
+ o($VR, [2, 34]),
1433
+ { 1: [2, 9] },
1434
+ { 1: [2, 10] },
1435
+ { 1: [2, 11] },
1436
+ { 1: [2, 12] },
1437
+ o($VI, [2, 18]),
1438
+ o($VH, [2, 38]),
1439
+ o($VP, [2, 72]),
1440
+ o($VQ, [2, 74]),
1441
+ o($VO, [2, 24]),
1442
+ o($VO, [2, 35]),
1443
+ o($VS, [2, 25]),
1444
+ o($VS, [2, 26], { 12: [1, 138] }),
1445
+ o($VS, [2, 27])
1446
+ ],
1447
+ defaultActions: {
1448
+ 2: [2, 1],
1449
+ 3: [2, 2],
1450
+ 4: [2, 7],
1451
+ 5: [2, 3],
1452
+ 6: [2, 4],
1453
+ 7: [2, 5],
1454
+ 8: [2, 6],
1455
+ 74: [2, 8],
1456
+ 126: [2, 9],
1457
+ 127: [2, 10],
1458
+ 128: [2, 11],
1459
+ 129: [2, 12]
1460
+ },
1461
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
1462
+ if (hash.recoverable) this.trace(str);
1463
+ else {
1464
+ var error = new Error(str);
1465
+ error.hash = hash;
1466
+ throw error;
1467
+ }
1468
+ }, "parseError"),
1469
+ parse: /* @__PURE__ */ __name(function parse(input) {
1470
+ var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
1471
+ var args = lstack.slice.call(arguments, 1);
1472
+ var lexer2 = Object.create(this.lexer);
1473
+ var sharedState = { yy: {} };
1474
+ for (var k in this.yy) if (Object.prototype.hasOwnProperty.call(this.yy, k)) sharedState.yy[k] = this.yy[k];
1475
+ lexer2.setInput(input, sharedState.yy);
1476
+ sharedState.yy.lexer = lexer2;
1477
+ sharedState.yy.parser = this;
1478
+ if (typeof lexer2.yylloc == "undefined") lexer2.yylloc = {};
1479
+ var yyloc = lexer2.yylloc;
1480
+ lstack.push(yyloc);
1481
+ var ranges = lexer2.options && lexer2.options.ranges;
1482
+ if (typeof sharedState.yy.parseError === "function") this.parseError = sharedState.yy.parseError;
1483
+ else this.parseError = Object.getPrototypeOf(this).parseError;
1484
+ function popStack(n) {
1485
+ stack.length = stack.length - 2 * n;
1486
+ vstack.length = vstack.length - n;
1487
+ lstack.length = lstack.length - n;
1488
+ }
1489
+ __name(popStack, "popStack");
1490
+ function lex() {
1491
+ var token = tstack.pop() || lexer2.lex() || EOF;
1492
+ if (typeof token !== "number") {
1493
+ if (token instanceof Array) {
1494
+ tstack = token;
1495
+ token = tstack.pop();
1496
+ }
1497
+ token = self.symbols_[token] || token;
1498
+ }
1499
+ return token;
1500
+ }
1501
+ __name(lex, "lex");
1502
+ var symbol, preErrorSymbol, state, action, r, yyval = {}, p, len, newState, expected;
1503
+ while (true) {
1504
+ state = stack[stack.length - 1];
1505
+ if (this.defaultActions[state]) action = this.defaultActions[state];
1506
+ else {
1507
+ if (symbol === null || typeof symbol == "undefined") symbol = lex();
1508
+ action = table[state] && table[state][symbol];
1509
+ }
1510
+ if (typeof action === "undefined" || !action.length || !action[0]) {
1511
+ var errStr = "";
1512
+ expected = [];
1513
+ for (p in table[state]) if (this.terminals_[p] && p > TERROR) expected.push("'" + this.terminals_[p] + "'");
1514
+ if (lexer2.showPosition) errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
1515
+ else errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
1516
+ this.parseError(errStr, {
1517
+ text: lexer2.match,
1518
+ token: this.terminals_[symbol] || symbol,
1519
+ line: lexer2.yylineno,
1520
+ loc: yyloc,
1521
+ expected
1522
+ });
1523
+ }
1524
+ if (action[0] instanceof Array && action.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
1525
+ switch (action[0]) {
1526
+ case 1:
1527
+ stack.push(symbol);
1528
+ vstack.push(lexer2.yytext);
1529
+ lstack.push(lexer2.yylloc);
1530
+ stack.push(action[1]);
1531
+ symbol = null;
1532
+ if (!preErrorSymbol) {
1533
+ yyleng = lexer2.yyleng;
1534
+ yytext = lexer2.yytext;
1535
+ yylineno = lexer2.yylineno;
1536
+ yyloc = lexer2.yylloc;
1537
+ if (recovering > 0) recovering--;
1538
+ } else {
1539
+ symbol = preErrorSymbol;
1540
+ preErrorSymbol = null;
1541
+ }
1542
+ break;
1543
+ case 2:
1544
+ len = this.productions_[action[1]][1];
1545
+ yyval.$ = vstack[vstack.length - len];
1546
+ yyval._$ = {
1547
+ first_line: lstack[lstack.length - (len || 1)].first_line,
1548
+ last_line: lstack[lstack.length - 1].last_line,
1549
+ first_column: lstack[lstack.length - (len || 1)].first_column,
1550
+ last_column: lstack[lstack.length - 1].last_column
1551
+ };
1552
+ if (ranges) yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
1553
+ r = this.performAction.apply(yyval, [
1554
+ yytext,
1555
+ yyleng,
1556
+ yylineno,
1557
+ sharedState.yy,
1558
+ action[1],
1559
+ vstack,
1560
+ lstack
1561
+ ].concat(args));
1562
+ if (typeof r !== "undefined") return r;
1563
+ if (len) {
1564
+ stack = stack.slice(0, -1 * len * 2);
1565
+ vstack = vstack.slice(0, -1 * len);
1566
+ lstack = lstack.slice(0, -1 * len);
1567
+ }
1568
+ stack.push(this.productions_[action[1]][0]);
1569
+ vstack.push(yyval.$);
1570
+ lstack.push(yyval._$);
1571
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
1572
+ stack.push(newState);
1573
+ break;
1574
+ case 3: return true;
1575
+ }
1576
+ }
1577
+ return true;
1578
+ }, "parse")
1579
+ };
1580
+ parser2.lexer = /* @__PURE__ */ (function() {
1581
+ return {
1582
+ EOF: 1,
1583
+ parseError: /* @__PURE__ */ __name(function parseError(str, hash) {
1584
+ if (this.yy.parser) this.yy.parser.parseError(str, hash);
1585
+ else throw new Error(str);
1586
+ }, "parseError"),
1587
+ setInput: /* @__PURE__ */ __name(function(input, yy) {
1588
+ this.yy = yy || this.yy || {};
1589
+ this._input = input;
1590
+ this._more = this._backtrack = this.done = false;
1591
+ this.yylineno = this.yyleng = 0;
1592
+ this.yytext = this.matched = this.match = "";
1593
+ this.conditionStack = ["INITIAL"];
1594
+ this.yylloc = {
1595
+ first_line: 1,
1596
+ first_column: 0,
1597
+ last_line: 1,
1598
+ last_column: 0
1599
+ };
1600
+ if (this.options.ranges) this.yylloc.range = [0, 0];
1601
+ this.offset = 0;
1602
+ return this;
1603
+ }, "setInput"),
1604
+ input: /* @__PURE__ */ __name(function() {
1605
+ var ch = this._input[0];
1606
+ this.yytext += ch;
1607
+ this.yyleng++;
1608
+ this.offset++;
1609
+ this.match += ch;
1610
+ this.matched += ch;
1611
+ if (ch.match(/(?:\r\n?|\n).*/g)) {
1612
+ this.yylineno++;
1613
+ this.yylloc.last_line++;
1614
+ } else this.yylloc.last_column++;
1615
+ if (this.options.ranges) this.yylloc.range[1]++;
1616
+ this._input = this._input.slice(1);
1617
+ return ch;
1618
+ }, "input"),
1619
+ unput: /* @__PURE__ */ __name(function(ch) {
1620
+ var len = ch.length;
1621
+ var lines = ch.split(/(?:\r\n?|\n)/g);
1622
+ this._input = ch + this._input;
1623
+ this.yytext = this.yytext.substr(0, this.yytext.length - len);
1624
+ this.offset -= len;
1625
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
1626
+ this.match = this.match.substr(0, this.match.length - 1);
1627
+ this.matched = this.matched.substr(0, this.matched.length - 1);
1628
+ if (lines.length - 1) this.yylineno -= lines.length - 1;
1629
+ var r = this.yylloc.range;
1630
+ this.yylloc = {
1631
+ first_line: this.yylloc.first_line,
1632
+ last_line: this.yylineno + 1,
1633
+ first_column: this.yylloc.first_column,
1634
+ 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
1635
+ };
1636
+ if (this.options.ranges) this.yylloc.range = [r[0], r[0] + this.yyleng - len];
1637
+ this.yyleng = this.yytext.length;
1638
+ return this;
1639
+ }, "unput"),
1640
+ more: /* @__PURE__ */ __name(function() {
1641
+ this._more = true;
1642
+ return this;
1643
+ }, "more"),
1644
+ reject: /* @__PURE__ */ __name(function() {
1645
+ if (this.options.backtrack_lexer) this._backtrack = true;
1646
+ else 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(), {
1647
+ text: "",
1648
+ token: null,
1649
+ line: this.yylineno
1650
+ });
1651
+ return this;
1652
+ }, "reject"),
1653
+ less: /* @__PURE__ */ __name(function(n) {
1654
+ this.unput(this.match.slice(n));
1655
+ }, "less"),
1656
+ pastInput: /* @__PURE__ */ __name(function() {
1657
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
1658
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
1659
+ }, "pastInput"),
1660
+ upcomingInput: /* @__PURE__ */ __name(function() {
1661
+ var next = this.match;
1662
+ if (next.length < 20) next += this._input.substr(0, 20 - next.length);
1663
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
1664
+ }, "upcomingInput"),
1665
+ showPosition: /* @__PURE__ */ __name(function() {
1666
+ var pre = this.pastInput();
1667
+ var c2 = new Array(pre.length + 1).join("-");
1668
+ return pre + this.upcomingInput() + "\n" + c2 + "^";
1669
+ }, "showPosition"),
1670
+ test_match: /* @__PURE__ */ __name(function(match, indexed_rule) {
1671
+ var token, lines, backup;
1672
+ if (this.options.backtrack_lexer) {
1673
+ backup = {
1674
+ yylineno: this.yylineno,
1675
+ yylloc: {
1676
+ first_line: this.yylloc.first_line,
1677
+ last_line: this.last_line,
1678
+ first_column: this.yylloc.first_column,
1679
+ last_column: this.yylloc.last_column
1680
+ },
1681
+ yytext: this.yytext,
1682
+ match: this.match,
1683
+ matches: this.matches,
1684
+ matched: this.matched,
1685
+ yyleng: this.yyleng,
1686
+ offset: this.offset,
1687
+ _more: this._more,
1688
+ _input: this._input,
1689
+ yy: this.yy,
1690
+ conditionStack: this.conditionStack.slice(0),
1691
+ done: this.done
1692
+ };
1693
+ if (this.options.ranges) backup.yylloc.range = this.yylloc.range.slice(0);
1694
+ }
1695
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
1696
+ if (lines) this.yylineno += lines.length;
1697
+ this.yylloc = {
1698
+ first_line: this.yylloc.last_line,
1699
+ last_line: this.yylineno + 1,
1700
+ first_column: this.yylloc.last_column,
1701
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
1702
+ };
1703
+ this.yytext += match[0];
1704
+ this.match += match[0];
1705
+ this.matches = match;
1706
+ this.yyleng = this.yytext.length;
1707
+ if (this.options.ranges) this.yylloc.range = [this.offset, this.offset += this.yyleng];
1708
+ this._more = false;
1709
+ this._backtrack = false;
1710
+ this._input = this._input.slice(match[0].length);
1711
+ this.matched += match[0];
1712
+ token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
1713
+ if (this.done && this._input) this.done = false;
1714
+ if (token) return token;
1715
+ else if (this._backtrack) {
1716
+ for (var k in backup) this[k] = backup[k];
1717
+ return false;
1718
+ }
1719
+ return false;
1720
+ }, "test_match"),
1721
+ next: /* @__PURE__ */ __name(function() {
1722
+ if (this.done) return this.EOF;
1723
+ if (!this._input) this.done = true;
1724
+ var token, match, tempMatch, index;
1725
+ if (!this._more) {
1726
+ this.yytext = "";
1727
+ this.match = "";
1728
+ }
1729
+ var rules = this._currentRules();
1730
+ for (var i = 0; i < rules.length; i++) {
1731
+ tempMatch = this._input.match(this.rules[rules[i]]);
1732
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
1733
+ match = tempMatch;
1734
+ index = i;
1735
+ if (this.options.backtrack_lexer) {
1736
+ token = this.test_match(tempMatch, rules[i]);
1737
+ if (token !== false) return token;
1738
+ else if (this._backtrack) {
1739
+ match = false;
1740
+ continue;
1741
+ } else return false;
1742
+ } else if (!this.options.flex) break;
1743
+ }
1744
+ }
1745
+ if (match) {
1746
+ token = this.test_match(match, rules[index]);
1747
+ if (token !== false) return token;
1748
+ return false;
1749
+ }
1750
+ if (this._input === "") return this.EOF;
1751
+ else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
1752
+ text: "",
1753
+ token: null,
1754
+ line: this.yylineno
1755
+ });
1756
+ }, "next"),
1757
+ lex: /* @__PURE__ */ __name(function lex() {
1758
+ var r = this.next();
1759
+ if (r) return r;
1760
+ else return this.lex();
1761
+ }, "lex"),
1762
+ begin: /* @__PURE__ */ __name(function begin(condition) {
1763
+ this.conditionStack.push(condition);
1764
+ }, "begin"),
1765
+ popState: /* @__PURE__ */ __name(function popState() {
1766
+ if (this.conditionStack.length - 1 > 0) return this.conditionStack.pop();
1767
+ else return this.conditionStack[0];
1768
+ }, "popState"),
1769
+ _currentRules: /* @__PURE__ */ __name(function _currentRules() {
1770
+ if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
1771
+ else return this.conditions["INITIAL"].rules;
1772
+ }, "_currentRules"),
1773
+ topState: /* @__PURE__ */ __name(function topState(n) {
1774
+ n = this.conditionStack.length - 1 - Math.abs(n || 0);
1775
+ if (n >= 0) return this.conditionStack[n];
1776
+ else return "INITIAL";
1777
+ }, "topState"),
1778
+ pushState: /* @__PURE__ */ __name(function pushState(condition) {
1779
+ this.begin(condition);
1780
+ }, "pushState"),
1781
+ stateStackSize: /* @__PURE__ */ __name(function stateStackSize() {
1782
+ return this.conditionStack.length;
1783
+ }, "stateStackSize"),
1784
+ options: {},
1785
+ performAction: /* @__PURE__ */ __name(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
1786
+ switch ($avoiding_name_collisions) {
1787
+ case 0: return 6;
1788
+ case 1: return 7;
1789
+ case 2: return 8;
1790
+ case 3: return 9;
1791
+ case 4: return 22;
1792
+ case 5: return 23;
1793
+ case 6:
1794
+ this.begin("acc_title");
1795
+ return 24;
1796
+ case 7:
1797
+ this.popState();
1798
+ return "acc_title_value";
1799
+ case 8:
1800
+ this.begin("acc_descr");
1801
+ return 26;
1802
+ case 9:
1803
+ this.popState();
1804
+ return "acc_descr_value";
1805
+ case 10:
1806
+ this.begin("acc_descr_multiline");
1807
+ break;
1808
+ case 11:
1809
+ this.popState();
1810
+ break;
1811
+ case 12: return "acc_descr_multiline_value";
1812
+ case 13: break;
1813
+ case 14:
1814
+ c;
1815
+ break;
1816
+ case 15: return 12;
1817
+ case 16: break;
1818
+ case 17: return 11;
1819
+ case 18: return 15;
1820
+ case 19: return 16;
1821
+ case 20: return 17;
1822
+ case 21: return 18;
1823
+ case 22:
1824
+ this.begin("person_ext");
1825
+ return 45;
1826
+ case 23:
1827
+ this.begin("person");
1828
+ return 44;
1829
+ case 24:
1830
+ this.begin("system_ext_queue");
1831
+ return 51;
1832
+ case 25:
1833
+ this.begin("system_ext_db");
1834
+ return 50;
1835
+ case 26:
1836
+ this.begin("system_ext");
1837
+ return 49;
1838
+ case 27:
1839
+ this.begin("system_queue");
1840
+ return 48;
1841
+ case 28:
1842
+ this.begin("system_db");
1843
+ return 47;
1844
+ case 29:
1845
+ this.begin("system");
1846
+ return 46;
1847
+ case 30:
1848
+ this.begin("boundary");
1849
+ return 37;
1850
+ case 31:
1851
+ this.begin("enterprise_boundary");
1852
+ return 34;
1853
+ case 32:
1854
+ this.begin("system_boundary");
1855
+ return 36;
1856
+ case 33:
1857
+ this.begin("container_ext_queue");
1858
+ return 57;
1859
+ case 34:
1860
+ this.begin("container_ext_db");
1861
+ return 56;
1862
+ case 35:
1863
+ this.begin("container_ext");
1864
+ return 55;
1865
+ case 36:
1866
+ this.begin("container_queue");
1867
+ return 54;
1868
+ case 37:
1869
+ this.begin("container_db");
1870
+ return 53;
1871
+ case 38:
1872
+ this.begin("container");
1873
+ return 52;
1874
+ case 39:
1875
+ this.begin("container_boundary");
1876
+ return 38;
1877
+ case 40:
1878
+ this.begin("component_ext_queue");
1879
+ return 63;
1880
+ case 41:
1881
+ this.begin("component_ext_db");
1882
+ return 62;
1883
+ case 42:
1884
+ this.begin("component_ext");
1885
+ return 61;
1886
+ case 43:
1887
+ this.begin("component_queue");
1888
+ return 60;
1889
+ case 44:
1890
+ this.begin("component_db");
1891
+ return 59;
1892
+ case 45:
1893
+ this.begin("component");
1894
+ return 58;
1895
+ case 46:
1896
+ this.begin("node");
1897
+ return 39;
1898
+ case 47:
1899
+ this.begin("node");
1900
+ return 39;
1901
+ case 48:
1902
+ this.begin("node_l");
1903
+ return 40;
1904
+ case 49:
1905
+ this.begin("node_r");
1906
+ return 41;
1907
+ case 50:
1908
+ this.begin("rel");
1909
+ return 64;
1910
+ case 51:
1911
+ this.begin("birel");
1912
+ return 65;
1913
+ case 52:
1914
+ this.begin("rel_u");
1915
+ return 66;
1916
+ case 53:
1917
+ this.begin("rel_u");
1918
+ return 66;
1919
+ case 54:
1920
+ this.begin("rel_d");
1921
+ return 67;
1922
+ case 55:
1923
+ this.begin("rel_d");
1924
+ return 67;
1925
+ case 56:
1926
+ this.begin("rel_l");
1927
+ return 68;
1928
+ case 57:
1929
+ this.begin("rel_l");
1930
+ return 68;
1931
+ case 58:
1932
+ this.begin("rel_r");
1933
+ return 69;
1934
+ case 59:
1935
+ this.begin("rel_r");
1936
+ return 69;
1937
+ case 60:
1938
+ this.begin("rel_b");
1939
+ return 70;
1940
+ case 61:
1941
+ this.begin("rel_index");
1942
+ return 71;
1943
+ case 62:
1944
+ this.begin("update_el_style");
1945
+ return 72;
1946
+ case 63:
1947
+ this.begin("update_rel_style");
1948
+ return 73;
1949
+ case 64:
1950
+ this.begin("update_layout_config");
1951
+ return 74;
1952
+ case 65: return "EOF_IN_STRUCT";
1953
+ case 66:
1954
+ this.begin("attribute");
1955
+ return "ATTRIBUTE_EMPTY";
1956
+ case 67:
1957
+ this.begin("attribute");
1958
+ break;
1959
+ case 68:
1960
+ this.popState();
1961
+ this.popState();
1962
+ break;
1963
+ case 69: return 80;
1964
+ case 70: break;
1965
+ case 71: return 80;
1966
+ case 72:
1967
+ this.begin("string");
1968
+ break;
1969
+ case 73:
1970
+ this.popState();
1971
+ break;
1972
+ case 74: return "STR";
1973
+ case 75:
1974
+ this.begin("string_kv");
1975
+ break;
1976
+ case 76:
1977
+ this.begin("string_kv_key");
1978
+ return "STR_KEY";
1979
+ case 77:
1980
+ this.popState();
1981
+ this.begin("string_kv_value");
1982
+ break;
1983
+ case 78: return "STR_VALUE";
1984
+ case 79:
1985
+ this.popState();
1986
+ this.popState();
1987
+ break;
1988
+ case 80: return "STR";
1989
+ case 81: return "LBRACE";
1990
+ case 82: return "RBRACE";
1991
+ case 83: return "SPACE";
1992
+ case 84: return "EOL";
1993
+ case 85: return 14;
1994
+ }
1995
+ }, "anonymous"),
1996
+ rules: [
1997
+ /^(?:.*direction\s+TB[^\n]*)/,
1998
+ /^(?:.*direction\s+BT[^\n]*)/,
1999
+ /^(?:.*direction\s+RL[^\n]*)/,
2000
+ /^(?:.*direction\s+LR[^\n]*)/,
2001
+ /^(?:title\s[^#\n;]+)/,
2002
+ /^(?:accDescription\s[^#\n;]+)/,
2003
+ /^(?:accTitle\s*:\s*)/,
2004
+ /^(?:(?!\n||)*[^\n]*)/,
2005
+ /^(?:accDescr\s*:\s*)/,
2006
+ /^(?:(?!\n||)*[^\n]*)/,
2007
+ /^(?:accDescr\s*\{\s*)/,
2008
+ /^(?:[\}])/,
2009
+ /^(?:[^\}]*)/,
2010
+ /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,
2011
+ /^(?:%%[^\n]*(\r?\n)*)/,
2012
+ /^(?:\s*(\r?\n)+)/,
2013
+ /^(?:\s+)/,
2014
+ /^(?:C4Context\b)/,
2015
+ /^(?:C4Container\b)/,
2016
+ /^(?:C4Component\b)/,
2017
+ /^(?:C4Dynamic\b)/,
2018
+ /^(?:C4Deployment\b)/,
2019
+ /^(?:Person_Ext\b)/,
2020
+ /^(?:Person\b)/,
2021
+ /^(?:SystemQueue_Ext\b)/,
2022
+ /^(?:SystemDb_Ext\b)/,
2023
+ /^(?:System_Ext\b)/,
2024
+ /^(?:SystemQueue\b)/,
2025
+ /^(?:SystemDb\b)/,
2026
+ /^(?:System\b)/,
2027
+ /^(?:Boundary\b)/,
2028
+ /^(?:Enterprise_Boundary\b)/,
2029
+ /^(?:System_Boundary\b)/,
2030
+ /^(?:ContainerQueue_Ext\b)/,
2031
+ /^(?:ContainerDb_Ext\b)/,
2032
+ /^(?:Container_Ext\b)/,
2033
+ /^(?:ContainerQueue\b)/,
2034
+ /^(?:ContainerDb\b)/,
2035
+ /^(?:Container\b)/,
2036
+ /^(?:Container_Boundary\b)/,
2037
+ /^(?:ComponentQueue_Ext\b)/,
2038
+ /^(?:ComponentDb_Ext\b)/,
2039
+ /^(?:Component_Ext\b)/,
2040
+ /^(?:ComponentQueue\b)/,
2041
+ /^(?:ComponentDb\b)/,
2042
+ /^(?:Component\b)/,
2043
+ /^(?:Deployment_Node\b)/,
2044
+ /^(?:Node\b)/,
2045
+ /^(?:Node_L\b)/,
2046
+ /^(?:Node_R\b)/,
2047
+ /^(?:Rel\b)/,
2048
+ /^(?:BiRel\b)/,
2049
+ /^(?:Rel_Up\b)/,
2050
+ /^(?:Rel_U\b)/,
2051
+ /^(?:Rel_Down\b)/,
2052
+ /^(?:Rel_D\b)/,
2053
+ /^(?:Rel_Left\b)/,
2054
+ /^(?:Rel_L\b)/,
2055
+ /^(?:Rel_Right\b)/,
2056
+ /^(?:Rel_R\b)/,
2057
+ /^(?:Rel_Back\b)/,
2058
+ /^(?:RelIndex\b)/,
2059
+ /^(?:UpdateElementStyle\b)/,
2060
+ /^(?:UpdateRelStyle\b)/,
2061
+ /^(?:UpdateLayoutConfig\b)/,
2062
+ /^(?:$)/,
2063
+ /^(?:[(][ ]*[,])/,
2064
+ /^(?:[(])/,
2065
+ /^(?:[)])/,
2066
+ /^(?:,,)/,
2067
+ /^(?:,)/,
2068
+ /^(?:[ ]*["]["])/,
2069
+ /^(?:[ ]*["])/,
2070
+ /^(?:["])/,
2071
+ /^(?:[^"]*)/,
2072
+ /^(?:[ ]*[\$])/,
2073
+ /^(?:[^=]*)/,
2074
+ /^(?:[=][ ]*["])/,
2075
+ /^(?:[^"]+)/,
2076
+ /^(?:["])/,
2077
+ /^(?:[^,]+)/,
2078
+ /^(?:\{)/,
2079
+ /^(?:\})/,
2080
+ /^(?:[\s]+)/,
2081
+ /^(?:[\n\r]+)/,
2082
+ /^(?:$)/
2083
+ ],
2084
+ conditions: {
2085
+ "acc_descr_multiline": {
2086
+ "rules": [11, 12],
2087
+ "inclusive": false
2088
+ },
2089
+ "acc_descr": {
2090
+ "rules": [9],
2091
+ "inclusive": false
2092
+ },
2093
+ "acc_title": {
2094
+ "rules": [7],
2095
+ "inclusive": false
2096
+ },
2097
+ "string_kv_value": {
2098
+ "rules": [78, 79],
2099
+ "inclusive": false
2100
+ },
2101
+ "string_kv_key": {
2102
+ "rules": [77],
2103
+ "inclusive": false
2104
+ },
2105
+ "string_kv": {
2106
+ "rules": [76],
2107
+ "inclusive": false
2108
+ },
2109
+ "string": {
2110
+ "rules": [73, 74],
2111
+ "inclusive": false
2112
+ },
2113
+ "attribute": {
2114
+ "rules": [
2115
+ 68,
2116
+ 69,
2117
+ 70,
2118
+ 71,
2119
+ 72,
2120
+ 75,
2121
+ 80
2122
+ ],
2123
+ "inclusive": false
2124
+ },
2125
+ "update_layout_config": {
2126
+ "rules": [
2127
+ 65,
2128
+ 66,
2129
+ 67,
2130
+ 68
2131
+ ],
2132
+ "inclusive": false
2133
+ },
2134
+ "update_rel_style": {
2135
+ "rules": [
2136
+ 65,
2137
+ 66,
2138
+ 67,
2139
+ 68
2140
+ ],
2141
+ "inclusive": false
2142
+ },
2143
+ "update_el_style": {
2144
+ "rules": [
2145
+ 65,
2146
+ 66,
2147
+ 67,
2148
+ 68
2149
+ ],
2150
+ "inclusive": false
2151
+ },
2152
+ "rel_b": {
2153
+ "rules": [
2154
+ 65,
2155
+ 66,
2156
+ 67,
2157
+ 68
2158
+ ],
2159
+ "inclusive": false
2160
+ },
2161
+ "rel_r": {
2162
+ "rules": [
2163
+ 65,
2164
+ 66,
2165
+ 67,
2166
+ 68
2167
+ ],
2168
+ "inclusive": false
2169
+ },
2170
+ "rel_l": {
2171
+ "rules": [
2172
+ 65,
2173
+ 66,
2174
+ 67,
2175
+ 68
2176
+ ],
2177
+ "inclusive": false
2178
+ },
2179
+ "rel_d": {
2180
+ "rules": [
2181
+ 65,
2182
+ 66,
2183
+ 67,
2184
+ 68
2185
+ ],
2186
+ "inclusive": false
2187
+ },
2188
+ "rel_u": {
2189
+ "rules": [
2190
+ 65,
2191
+ 66,
2192
+ 67,
2193
+ 68
2194
+ ],
2195
+ "inclusive": false
2196
+ },
2197
+ "rel_bi": {
2198
+ "rules": [],
2199
+ "inclusive": false
2200
+ },
2201
+ "rel": {
2202
+ "rules": [
2203
+ 65,
2204
+ 66,
2205
+ 67,
2206
+ 68
2207
+ ],
2208
+ "inclusive": false
2209
+ },
2210
+ "node_r": {
2211
+ "rules": [
2212
+ 65,
2213
+ 66,
2214
+ 67,
2215
+ 68
2216
+ ],
2217
+ "inclusive": false
2218
+ },
2219
+ "node_l": {
2220
+ "rules": [
2221
+ 65,
2222
+ 66,
2223
+ 67,
2224
+ 68
2225
+ ],
2226
+ "inclusive": false
2227
+ },
2228
+ "node": {
2229
+ "rules": [
2230
+ 65,
2231
+ 66,
2232
+ 67,
2233
+ 68
2234
+ ],
2235
+ "inclusive": false
2236
+ },
2237
+ "index": {
2238
+ "rules": [],
2239
+ "inclusive": false
2240
+ },
2241
+ "rel_index": {
2242
+ "rules": [
2243
+ 65,
2244
+ 66,
2245
+ 67,
2246
+ 68
2247
+ ],
2248
+ "inclusive": false
2249
+ },
2250
+ "component_ext_queue": {
2251
+ "rules": [
2252
+ 65,
2253
+ 66,
2254
+ 67,
2255
+ 68
2256
+ ],
2257
+ "inclusive": false
2258
+ },
2259
+ "component_ext_db": {
2260
+ "rules": [
2261
+ 65,
2262
+ 66,
2263
+ 67,
2264
+ 68
2265
+ ],
2266
+ "inclusive": false
2267
+ },
2268
+ "component_ext": {
2269
+ "rules": [
2270
+ 65,
2271
+ 66,
2272
+ 67,
2273
+ 68
2274
+ ],
2275
+ "inclusive": false
2276
+ },
2277
+ "component_queue": {
2278
+ "rules": [
2279
+ 65,
2280
+ 66,
2281
+ 67,
2282
+ 68
2283
+ ],
2284
+ "inclusive": false
2285
+ },
2286
+ "component_db": {
2287
+ "rules": [
2288
+ 65,
2289
+ 66,
2290
+ 67,
2291
+ 68
2292
+ ],
2293
+ "inclusive": false
2294
+ },
2295
+ "component": {
2296
+ "rules": [
2297
+ 65,
2298
+ 66,
2299
+ 67,
2300
+ 68
2301
+ ],
2302
+ "inclusive": false
2303
+ },
2304
+ "container_boundary": {
2305
+ "rules": [
2306
+ 65,
2307
+ 66,
2308
+ 67,
2309
+ 68
2310
+ ],
2311
+ "inclusive": false
2312
+ },
2313
+ "container_ext_queue": {
2314
+ "rules": [
2315
+ 65,
2316
+ 66,
2317
+ 67,
2318
+ 68
2319
+ ],
2320
+ "inclusive": false
2321
+ },
2322
+ "container_ext_db": {
2323
+ "rules": [
2324
+ 65,
2325
+ 66,
2326
+ 67,
2327
+ 68
2328
+ ],
2329
+ "inclusive": false
2330
+ },
2331
+ "container_ext": {
2332
+ "rules": [
2333
+ 65,
2334
+ 66,
2335
+ 67,
2336
+ 68
2337
+ ],
2338
+ "inclusive": false
2339
+ },
2340
+ "container_queue": {
2341
+ "rules": [
2342
+ 65,
2343
+ 66,
2344
+ 67,
2345
+ 68
2346
+ ],
2347
+ "inclusive": false
2348
+ },
2349
+ "container_db": {
2350
+ "rules": [
2351
+ 65,
2352
+ 66,
2353
+ 67,
2354
+ 68
2355
+ ],
2356
+ "inclusive": false
2357
+ },
2358
+ "container": {
2359
+ "rules": [
2360
+ 65,
2361
+ 66,
2362
+ 67,
2363
+ 68
2364
+ ],
2365
+ "inclusive": false
2366
+ },
2367
+ "birel": {
2368
+ "rules": [
2369
+ 65,
2370
+ 66,
2371
+ 67,
2372
+ 68
2373
+ ],
2374
+ "inclusive": false
2375
+ },
2376
+ "system_boundary": {
2377
+ "rules": [
2378
+ 65,
2379
+ 66,
2380
+ 67,
2381
+ 68
2382
+ ],
2383
+ "inclusive": false
2384
+ },
2385
+ "enterprise_boundary": {
2386
+ "rules": [
2387
+ 65,
2388
+ 66,
2389
+ 67,
2390
+ 68
2391
+ ],
2392
+ "inclusive": false
2393
+ },
2394
+ "boundary": {
2395
+ "rules": [
2396
+ 65,
2397
+ 66,
2398
+ 67,
2399
+ 68
2400
+ ],
2401
+ "inclusive": false
2402
+ },
2403
+ "system_ext_queue": {
2404
+ "rules": [
2405
+ 65,
2406
+ 66,
2407
+ 67,
2408
+ 68
2409
+ ],
2410
+ "inclusive": false
2411
+ },
2412
+ "system_ext_db": {
2413
+ "rules": [
2414
+ 65,
2415
+ 66,
2416
+ 67,
2417
+ 68
2418
+ ],
2419
+ "inclusive": false
2420
+ },
2421
+ "system_ext": {
2422
+ "rules": [
2423
+ 65,
2424
+ 66,
2425
+ 67,
2426
+ 68
2427
+ ],
2428
+ "inclusive": false
2429
+ },
2430
+ "system_queue": {
2431
+ "rules": [
2432
+ 65,
2433
+ 66,
2434
+ 67,
2435
+ 68
2436
+ ],
2437
+ "inclusive": false
2438
+ },
2439
+ "system_db": {
2440
+ "rules": [
2441
+ 65,
2442
+ 66,
2443
+ 67,
2444
+ 68
2445
+ ],
2446
+ "inclusive": false
2447
+ },
2448
+ "system": {
2449
+ "rules": [
2450
+ 65,
2451
+ 66,
2452
+ 67,
2453
+ 68
2454
+ ],
2455
+ "inclusive": false
2456
+ },
2457
+ "person_ext": {
2458
+ "rules": [
2459
+ 65,
2460
+ 66,
2461
+ 67,
2462
+ 68
2463
+ ],
2464
+ "inclusive": false
2465
+ },
2466
+ "person": {
2467
+ "rules": [
2468
+ 65,
2469
+ 66,
2470
+ 67,
2471
+ 68
2472
+ ],
2473
+ "inclusive": false
2474
+ },
2475
+ "INITIAL": {
2476
+ "rules": [
2477
+ 0,
2478
+ 1,
2479
+ 2,
2480
+ 3,
2481
+ 4,
2482
+ 5,
2483
+ 6,
2484
+ 8,
2485
+ 10,
2486
+ 13,
2487
+ 14,
2488
+ 15,
2489
+ 16,
2490
+ 17,
2491
+ 18,
2492
+ 19,
2493
+ 20,
2494
+ 21,
2495
+ 22,
2496
+ 23,
2497
+ 24,
2498
+ 25,
2499
+ 26,
2500
+ 27,
2501
+ 28,
2502
+ 29,
2503
+ 30,
2504
+ 31,
2505
+ 32,
2506
+ 33,
2507
+ 34,
2508
+ 35,
2509
+ 36,
2510
+ 37,
2511
+ 38,
2512
+ 39,
2513
+ 40,
2514
+ 41,
2515
+ 42,
2516
+ 43,
2517
+ 44,
2518
+ 45,
2519
+ 46,
2520
+ 47,
2521
+ 48,
2522
+ 49,
2523
+ 50,
2524
+ 51,
2525
+ 52,
2526
+ 53,
2527
+ 54,
2528
+ 55,
2529
+ 56,
2530
+ 57,
2531
+ 58,
2532
+ 59,
2533
+ 60,
2534
+ 61,
2535
+ 62,
2536
+ 63,
2537
+ 64,
2538
+ 81,
2539
+ 82,
2540
+ 83,
2541
+ 84,
2542
+ 85
2543
+ ],
2544
+ "inclusive": true
2545
+ }
2546
+ }
2547
+ };
2548
+ })();
2549
+ function Parser() {
2550
+ this.yy = {};
2551
+ }
2552
+ __name(Parser, "Parser");
2553
+ Parser.prototype = parser2;
2554
+ parser2.Parser = Parser;
2555
+ return new Parser();
2556
+ })();
2557
+ parser.parser = parser;
2558
+ var c4Diagram_default = parser;
2559
+ var getRequiredConfig = /* @__PURE__ */ __name((section) => getConfig2()[section], "getRequiredConfig");
2560
+ var assignAttributes = /* @__PURE__ */ __name((bag, attrs) => {
2561
+ for (const [field, value] of Object.entries(attrs)) {
2562
+ if (value === void 0) continue;
2563
+ if (typeof value === "object") {
2564
+ const [key, val] = Object.entries(value)[0];
2565
+ bag[key] = val;
2566
+ } else bag[field] = value;
2567
+ }
2568
+ }, "assignAttributes");
2569
+ var createGlobalBoundary = /* @__PURE__ */ __name(() => ({
2570
+ alias: "global",
2571
+ label: { text: "global" },
2572
+ type: { text: "global" },
2573
+ tags: null,
2574
+ link: null,
2575
+ parentBoundary: ""
2576
+ }), "createGlobalBoundary");
2577
+ var c4ShapeArray = [];
2578
+ var boundaryParseStack = [""];
2579
+ var currentBoundaryParse = "global";
2580
+ var parentBoundaryParse = "";
2581
+ var boundaries = [createGlobalBoundary()];
2582
+ var rels = [];
2583
+ var title = "";
2584
+ var wrapEnabled = false;
2585
+ var c4ShapeInRow = 4;
2586
+ var c4BoundaryInRow = 2;
2587
+ var c4Type;
2588
+ var getC4Type = /* @__PURE__ */ __name(function() {
2589
+ return c4Type;
2590
+ }, "getC4Type");
2591
+ var setC4Type = /* @__PURE__ */ __name(function(c4TypeParam) {
2592
+ c4Type = sanitizeText(c4TypeParam, getConfig2());
2593
+ }, "setC4Type");
2594
+ var addRel = /* @__PURE__ */ __name(function(type, from, to, label, techn, descr, sprite, tags, link) {
2595
+ if (type === void 0 || type === null || from === void 0 || from === null || to === void 0 || to === null || label === void 0 || label === null) return;
2596
+ let rel = {};
2597
+ const old = rels.find((rel2) => rel2.from === from && rel2.to === to);
2598
+ if (old) rel = old;
2599
+ else rels.push(rel);
2600
+ rel.type = type;
2601
+ rel.from = from;
2602
+ rel.to = to;
2603
+ rel.label = { text: label };
2604
+ if (techn === void 0 || techn === null) rel.techn = { text: "" };
2605
+ else if (typeof techn === "object") {
2606
+ const [key, value] = Object.entries(techn)[0];
2607
+ rel[key] = { text: value };
2608
+ } else rel.techn = { text: techn };
2609
+ if (descr === void 0 || descr === null) rel.descr = { text: "" };
2610
+ else if (typeof descr === "object") {
2611
+ const [key, value] = Object.entries(descr)[0];
2612
+ rel[key] = { text: value };
2613
+ } else rel.descr = { text: descr };
2614
+ assignAttributes(rel, {
2615
+ sprite,
2616
+ tags,
2617
+ link
2618
+ });
2619
+ rel.wrap = autoWrap();
2620
+ }, "addRel");
2621
+ var addPersonOrSystem = /* @__PURE__ */ __name(function(typeC4Shape, alias, label, descr, sprite, tags, link) {
2622
+ if (alias === null || label === null) return;
2623
+ let personOrSystem = {};
2624
+ const old = c4ShapeArray.find((personOrSystem2) => personOrSystem2.alias === alias);
2625
+ if (old && alias === old.alias) personOrSystem = old;
2626
+ else {
2627
+ personOrSystem.alias = alias;
2628
+ c4ShapeArray.push(personOrSystem);
2629
+ }
2630
+ if (label === void 0 || label === null) personOrSystem.label = { text: "" };
2631
+ else personOrSystem.label = { text: label };
2632
+ if (descr === void 0 || descr === null) personOrSystem.descr = { text: "" };
2633
+ else if (typeof descr === "object") {
2634
+ const [key, value] = Object.entries(descr)[0];
2635
+ personOrSystem[key] = { text: value };
2636
+ } else personOrSystem.descr = { text: descr };
2637
+ assignAttributes(personOrSystem, {
2638
+ sprite,
2639
+ tags,
2640
+ link
2641
+ });
2642
+ personOrSystem.typeC4Shape = { text: typeC4Shape };
2643
+ personOrSystem.parentBoundary = currentBoundaryParse;
2644
+ personOrSystem.wrap = autoWrap();
2645
+ }, "addPersonOrSystem");
2646
+ var addContainer = /* @__PURE__ */ __name(function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
2647
+ if (alias === null || label === null) return;
2648
+ let container = {};
2649
+ const old = c4ShapeArray.find((container2) => container2.alias === alias);
2650
+ if (old && alias === old.alias) container = old;
2651
+ else {
2652
+ container.alias = alias;
2653
+ c4ShapeArray.push(container);
2654
+ }
2655
+ if (label === void 0 || label === null) container.label = { text: "" };
2656
+ else container.label = { text: label };
2657
+ if (techn === void 0 || techn === null) container.techn = { text: "" };
2658
+ else if (typeof techn === "object") {
2659
+ const [key, value] = Object.entries(techn)[0];
2660
+ container[key] = { text: value };
2661
+ } else container.techn = { text: techn };
2662
+ if (descr === void 0 || descr === null) container.descr = { text: "" };
2663
+ else if (typeof descr === "object") {
2664
+ const [key, value] = Object.entries(descr)[0];
2665
+ container[key] = { text: value };
2666
+ } else container.descr = { text: descr };
2667
+ assignAttributes(container, {
2668
+ sprite,
2669
+ tags,
2670
+ link
2671
+ });
2672
+ container.wrap = autoWrap();
2673
+ container.typeC4Shape = { text: typeC4Shape };
2674
+ container.parentBoundary = currentBoundaryParse;
2675
+ }, "addContainer");
2676
+ var addComponent = /* @__PURE__ */ __name(function(typeC4Shape, alias, label, techn, descr, sprite, tags, link) {
2677
+ if (alias === null || label === null) return;
2678
+ let component = {};
2679
+ const old = c4ShapeArray.find((component2) => component2.alias === alias);
2680
+ if (old && alias === old.alias) component = old;
2681
+ else {
2682
+ component.alias = alias;
2683
+ c4ShapeArray.push(component);
2684
+ }
2685
+ if (label === void 0 || label === null) component.label = { text: "" };
2686
+ else component.label = { text: label };
2687
+ if (techn === void 0 || techn === null) component.techn = { text: "" };
2688
+ else if (typeof techn === "object") {
2689
+ const [key, value] = Object.entries(techn)[0];
2690
+ component[key] = { text: value };
2691
+ } else component.techn = { text: techn };
2692
+ if (descr === void 0 || descr === null) component.descr = { text: "" };
2693
+ else if (typeof descr === "object") {
2694
+ const [key, value] = Object.entries(descr)[0];
2695
+ component[key] = { text: value };
2696
+ } else component.descr = { text: descr };
2697
+ assignAttributes(component, {
2698
+ sprite,
2699
+ tags,
2700
+ link
2701
+ });
2702
+ component.wrap = autoWrap();
2703
+ component.typeC4Shape = { text: typeC4Shape };
2704
+ component.parentBoundary = currentBoundaryParse;
2705
+ }, "addComponent");
2706
+ var addPersonOrSystemBoundary = /* @__PURE__ */ __name(function(alias, label, type, tags, link) {
2707
+ if (alias === null || label === null) return;
2708
+ let boundary = {};
2709
+ const old = boundaries.find((boundary2) => boundary2.alias === alias);
2710
+ if (old && alias === old.alias) boundary = old;
2711
+ else {
2712
+ boundary.alias = alias;
2713
+ boundaries.push(boundary);
2714
+ }
2715
+ if (label === void 0 || label === null) boundary.label = { text: "" };
2716
+ else boundary.label = { text: label };
2717
+ if (type === void 0 || type === null) boundary.type = { text: "system" };
2718
+ else if (typeof type === "object") {
2719
+ const [key, value] = Object.entries(type)[0];
2720
+ boundary[key] = { text: value };
2721
+ } else boundary.type = { text: type };
2722
+ assignAttributes(boundary, {
2723
+ tags,
2724
+ link
2725
+ });
2726
+ boundary.parentBoundary = currentBoundaryParse;
2727
+ boundary.wrap = autoWrap();
2728
+ parentBoundaryParse = currentBoundaryParse;
2729
+ currentBoundaryParse = alias;
2730
+ boundaryParseStack.push(parentBoundaryParse);
2731
+ }, "addPersonOrSystemBoundary");
2732
+ var addContainerBoundary = /* @__PURE__ */ __name(function(alias, label, type, tags, link) {
2733
+ if (alias === null || label === null) return;
2734
+ let boundary = {};
2735
+ const old = boundaries.find((boundary2) => boundary2.alias === alias);
2736
+ if (old && alias === old.alias) boundary = old;
2737
+ else {
2738
+ boundary.alias = alias;
2739
+ boundaries.push(boundary);
2740
+ }
2741
+ if (label === void 0 || label === null) boundary.label = { text: "" };
2742
+ else boundary.label = { text: label };
2743
+ if (type === void 0 || type === null) boundary.type = { text: "container" };
2744
+ else if (typeof type === "object") {
2745
+ const [key, value] = Object.entries(type)[0];
2746
+ boundary[key] = { text: value };
2747
+ } else boundary.type = { text: type };
2748
+ assignAttributes(boundary, {
2749
+ tags,
2750
+ link
2751
+ });
2752
+ boundary.parentBoundary = currentBoundaryParse;
2753
+ boundary.wrap = autoWrap();
2754
+ parentBoundaryParse = currentBoundaryParse;
2755
+ currentBoundaryParse = alias;
2756
+ boundaryParseStack.push(parentBoundaryParse);
2757
+ }, "addContainerBoundary");
2758
+ var addDeploymentNode = /* @__PURE__ */ __name(function(nodeType, alias, label, type, descr, sprite, tags, link) {
2759
+ if (alias === null || label === null) return;
2760
+ let boundary = {};
2761
+ const old = boundaries.find((boundary2) => boundary2.alias === alias);
2762
+ if (old && alias === old.alias) boundary = old;
2763
+ else {
2764
+ boundary.alias = alias;
2765
+ boundaries.push(boundary);
2766
+ }
2767
+ if (label === void 0 || label === null) boundary.label = { text: "" };
2768
+ else boundary.label = { text: label };
2769
+ if (type === void 0 || type === null) boundary.type = { text: "node" };
2770
+ else if (typeof type === "object") {
2771
+ const [key, value] = Object.entries(type)[0];
2772
+ boundary[key] = { text: value };
2773
+ } else boundary.type = { text: type };
2774
+ if (descr === void 0 || descr === null) boundary.descr = { text: "" };
2775
+ else if (typeof descr === "object") {
2776
+ const [key, value] = Object.entries(descr)[0];
2777
+ boundary[key] = { text: value };
2778
+ } else boundary.descr = { text: descr };
2779
+ assignAttributes(boundary, {
2780
+ tags,
2781
+ link
2782
+ });
2783
+ boundary.nodeType = nodeType;
2784
+ boundary.parentBoundary = currentBoundaryParse;
2785
+ boundary.wrap = autoWrap();
2786
+ parentBoundaryParse = currentBoundaryParse;
2787
+ currentBoundaryParse = alias;
2788
+ boundaryParseStack.push(parentBoundaryParse);
2789
+ }, "addDeploymentNode");
2790
+ var popBoundaryParseStack = /* @__PURE__ */ __name(function() {
2791
+ currentBoundaryParse = parentBoundaryParse;
2792
+ boundaryParseStack.pop();
2793
+ parentBoundaryParse = boundaryParseStack.pop();
2794
+ boundaryParseStack.push(parentBoundaryParse);
2795
+ }, "popBoundaryParseStack");
2796
+ var updateElStyle = /* @__PURE__ */ __name(function(typeC4Shape, elementName, bgColor, fontColor, borderColor, shadowing, shape, sprite, techn, legendText, legendSprite) {
2797
+ let old = c4ShapeArray.find((element) => element.alias === elementName);
2798
+ if (old === void 0) {
2799
+ old = boundaries.find((element) => element.alias === elementName);
2800
+ if (old === void 0) return;
2801
+ }
2802
+ if (bgColor !== void 0 && bgColor !== null) if (typeof bgColor === "object") {
2803
+ const [key, value] = Object.entries(bgColor)[0];
2804
+ old[key] = value;
2805
+ } else old.bgColor = bgColor;
2806
+ if (fontColor !== void 0 && fontColor !== null) if (typeof fontColor === "object") {
2807
+ const [key, value] = Object.entries(fontColor)[0];
2808
+ old[key] = value;
2809
+ } else old.fontColor = fontColor;
2810
+ if (borderColor !== void 0 && borderColor !== null) if (typeof borderColor === "object") {
2811
+ const [key, value] = Object.entries(borderColor)[0];
2812
+ old[key] = value;
2813
+ } else old.borderColor = borderColor;
2814
+ if (shadowing !== void 0 && shadowing !== null) if (typeof shadowing === "object") {
2815
+ const [key, value] = Object.entries(shadowing)[0];
2816
+ old[key] = value;
2817
+ } else old.shadowing = shadowing;
2818
+ if (shape !== void 0 && shape !== null) if (typeof shape === "object") {
2819
+ const [key, value] = Object.entries(shape)[0];
2820
+ old[key] = value;
2821
+ } else old.shape = shape;
2822
+ if (sprite !== void 0 && sprite !== null) if (typeof sprite === "object") {
2823
+ const [key, value] = Object.entries(sprite)[0];
2824
+ old[key] = value;
2825
+ } else old.sprite = sprite;
2826
+ if (techn !== void 0 && techn !== null) if (typeof techn === "object") {
2827
+ const [key, value] = Object.entries(techn)[0];
2828
+ old[key] = value;
2829
+ } else old.techn = techn;
2830
+ if (legendText !== void 0 && legendText !== null) if (typeof legendText === "object") {
2831
+ const [key, value] = Object.entries(legendText)[0];
2832
+ old[key] = value;
2833
+ } else old.legendText = legendText;
2834
+ if (legendSprite !== void 0 && legendSprite !== null) if (typeof legendSprite === "object") {
2835
+ const [key, value] = Object.entries(legendSprite)[0];
2836
+ old[key] = value;
2837
+ } else old.legendSprite = legendSprite;
2838
+ }, "updateElStyle");
2839
+ var updateRelStyle = /* @__PURE__ */ __name(function(typeC4Shape, from, to, textColor, lineColor, offsetX, offsetY) {
2840
+ const old = rels.find((rel) => rel.from === from && rel.to === to);
2841
+ if (old === void 0) return;
2842
+ if (textColor !== void 0 && textColor !== null) if (typeof textColor === "object") {
2843
+ const [key, value] = Object.entries(textColor)[0];
2844
+ old[key] = value;
2845
+ } else old.textColor = textColor;
2846
+ if (lineColor !== void 0 && lineColor !== null) if (typeof lineColor === "object") {
2847
+ const [key, value] = Object.entries(lineColor)[0];
2848
+ old[key] = value;
2849
+ } else old.lineColor = lineColor;
2850
+ if (offsetX !== void 0 && offsetX !== null) if (typeof offsetX === "object") {
2851
+ const [key, value] = Object.entries(offsetX)[0];
2852
+ old[key] = parseInt(value);
2853
+ } else old.offsetX = parseInt(offsetX);
2854
+ if (offsetY !== void 0 && offsetY !== null) if (typeof offsetY === "object") {
2855
+ const [key, value] = Object.entries(offsetY)[0];
2856
+ old[key] = parseInt(value);
2857
+ } else old.offsetY = parseInt(offsetY);
2858
+ }, "updateRelStyle");
2859
+ var updateLayoutConfig = /* @__PURE__ */ __name(function(typeC4Shape, c4ShapeInRowParam, c4BoundaryInRowParam) {
2860
+ let c4ShapeInRowValue = c4ShapeInRow;
2861
+ let c4BoundaryInRowValue = c4BoundaryInRow;
2862
+ if (typeof c4ShapeInRowParam === "object") {
2863
+ const value = Object.values(c4ShapeInRowParam)[0];
2864
+ c4ShapeInRowValue = parseInt(value);
2865
+ } else c4ShapeInRowValue = parseInt(c4ShapeInRowParam);
2866
+ if (typeof c4BoundaryInRowParam === "object") {
2867
+ const value = Object.values(c4BoundaryInRowParam)[0];
2868
+ c4BoundaryInRowValue = parseInt(value);
2869
+ } else c4BoundaryInRowValue = parseInt(c4BoundaryInRowParam);
2870
+ if (c4ShapeInRowValue >= 1) c4ShapeInRow = c4ShapeInRowValue;
2871
+ if (c4BoundaryInRowValue >= 1) c4BoundaryInRow = c4BoundaryInRowValue;
2872
+ }, "updateLayoutConfig");
2873
+ var getC4ShapeInRow = /* @__PURE__ */ __name(function() {
2874
+ return c4ShapeInRow;
2875
+ }, "getC4ShapeInRow");
2876
+ var getC4BoundaryInRow = /* @__PURE__ */ __name(function() {
2877
+ return c4BoundaryInRow;
2878
+ }, "getC4BoundaryInRow");
2879
+ var getCurrentBoundaryParse = /* @__PURE__ */ __name(function() {
2880
+ return currentBoundaryParse;
2881
+ }, "getCurrentBoundaryParse");
2882
+ var getParentBoundaryParse = /* @__PURE__ */ __name(function() {
2883
+ return parentBoundaryParse;
2884
+ }, "getParentBoundaryParse");
2885
+ var getC4ShapeArray = /* @__PURE__ */ __name(function(parentBoundary) {
2886
+ if (parentBoundary === void 0 || parentBoundary === null) return c4ShapeArray;
2887
+ else return c4ShapeArray.filter((personOrSystem) => {
2888
+ return personOrSystem.parentBoundary === parentBoundary;
2889
+ });
2890
+ }, "getC4ShapeArray");
2891
+ var getC4Shape = /* @__PURE__ */ __name(function(alias) {
2892
+ return c4ShapeArray.find((personOrSystem) => personOrSystem.alias === alias);
2893
+ }, "getC4Shape");
2894
+ var getC4ShapeKeys = /* @__PURE__ */ __name(function(parentBoundary) {
2895
+ return Object.keys(getC4ShapeArray(parentBoundary));
2896
+ }, "getC4ShapeKeys");
2897
+ var getBoundaries = /* @__PURE__ */ __name(function(parentBoundary) {
2898
+ if (parentBoundary === void 0 || parentBoundary === null) return boundaries;
2899
+ else return boundaries.filter((boundary) => boundary.parentBoundary === parentBoundary);
2900
+ }, "getBoundaries");
2901
+ var getBoundarys = getBoundaries;
2902
+ var getRels = /* @__PURE__ */ __name(function() {
2903
+ return rels;
2904
+ }, "getRels");
2905
+ var getTitle = /* @__PURE__ */ __name(function() {
2906
+ return title;
2907
+ }, "getTitle");
2908
+ var setWrap = /* @__PURE__ */ __name(function(wrapSetting) {
2909
+ wrapEnabled = wrapSetting;
2910
+ }, "setWrap");
2911
+ var autoWrap = /* @__PURE__ */ __name(function() {
2912
+ return wrapEnabled;
2913
+ }, "autoWrap");
2914
+ var c4Db_default = {
2915
+ addPersonOrSystem,
2916
+ addPersonOrSystemBoundary,
2917
+ addContainer,
2918
+ addContainerBoundary,
2919
+ addComponent,
2920
+ addDeploymentNode,
2921
+ popBoundaryParseStack,
2922
+ addRel,
2923
+ updateElStyle,
2924
+ updateRelStyle,
2925
+ updateLayoutConfig,
2926
+ autoWrap,
2927
+ setWrap,
2928
+ getC4ShapeArray,
2929
+ getC4Shape,
2930
+ getC4ShapeKeys,
2931
+ getBoundaries,
2932
+ getBoundarys,
2933
+ getCurrentBoundaryParse,
2934
+ getParentBoundaryParse,
2935
+ getRels,
2936
+ getTitle,
2937
+ getC4Type,
2938
+ getC4ShapeInRow,
2939
+ getC4BoundaryInRow,
2940
+ setAccTitle,
2941
+ getAccTitle,
2942
+ getAccDescription,
2943
+ setAccDescription,
2944
+ getConfig: /* @__PURE__ */ __name(() => getRequiredConfig("c4"), "getConfig"),
2945
+ clear: /* @__PURE__ */ __name(function() {
2946
+ c4ShapeArray = [];
2947
+ boundaries = [createGlobalBoundary()];
2948
+ parentBoundaryParse = "";
2949
+ currentBoundaryParse = "global";
2950
+ boundaryParseStack = [""];
2951
+ rels = [];
2952
+ boundaryParseStack = [""];
2953
+ title = "";
2954
+ wrapEnabled = false;
2955
+ c4ShapeInRow = 4;
2956
+ c4BoundaryInRow = 2;
2957
+ }, "clear"),
2958
+ LINETYPE: {
2959
+ SOLID: 0,
2960
+ DOTTED: 1,
2961
+ NOTE: 2,
2962
+ SOLID_CROSS: 3,
2963
+ DOTTED_CROSS: 4,
2964
+ SOLID_OPEN: 5,
2965
+ DOTTED_OPEN: 6,
2966
+ LOOP_START: 10,
2967
+ LOOP_END: 11,
2968
+ ALT_START: 12,
2969
+ ALT_ELSE: 13,
2970
+ ALT_END: 14,
2971
+ OPT_START: 15,
2972
+ OPT_END: 16,
2973
+ ACTIVE_START: 17,
2974
+ ACTIVE_END: 18,
2975
+ PAR_START: 19,
2976
+ PAR_AND: 20,
2977
+ PAR_END: 21,
2978
+ RECT_START: 22,
2979
+ RECT_END: 23,
2980
+ SOLID_POINT: 24,
2981
+ DOTTED_POINT: 25
2982
+ },
2983
+ ARROWTYPE: {
2984
+ FILLED: 0,
2985
+ OPEN: 1
2986
+ },
2987
+ PLACEMENT: {
2988
+ LEFTOF: 0,
2989
+ RIGHTOF: 1,
2990
+ OVER: 2
2991
+ },
2992
+ setTitle: /* @__PURE__ */ __name(function(txt) {
2993
+ title = sanitizeText(txt, getConfig2());
2994
+ }, "setTitle"),
2995
+ setC4Type
2996
+ };
2997
+ var drawRect2 = /* @__PURE__ */ __name(function(elem, rectData) {
2998
+ return drawRect(elem, rectData);
2999
+ }, "drawRect");
3000
+ var drawRels = /* @__PURE__ */ __name((elem, rels2, conf2, diagramId) => {
3001
+ const relsElem = elem.append("g");
3002
+ let i = 0;
3003
+ for (const rel of rels2) {
3004
+ const textColor = rel.textColor ? rel.textColor : "#444444";
3005
+ const strokeColor = rel.lineColor ? rel.lineColor : "#444444";
3006
+ const offsetX = rel.offsetX ? parseInt(String(rel.offsetX)) : 0;
3007
+ const offsetY = rel.offsetY ? parseInt(String(rel.offsetY)) : 0;
3008
+ if (i === 0) {
3009
+ const line = relsElem.append("line");
3010
+ line.attr("x1", rel.startPoint.x);
3011
+ line.attr("y1", rel.startPoint.y);
3012
+ line.attr("x2", rel.endPoint.x);
3013
+ line.attr("y2", rel.endPoint.y);
3014
+ line.attr("stroke-width", "1");
3015
+ line.attr("stroke", strokeColor);
3016
+ line.style("fill", "none");
3017
+ if (rel.type !== "rel_b") line.attr("marker-end", "url(#" + diagramId + "-arrowhead)");
3018
+ if (rel.type === "birel" || rel.type === "rel_b") line.attr("marker-start", "url(#" + diagramId + "-arrowend)");
3019
+ i = -1;
3020
+ } else {
3021
+ const line = relsElem.append("path");
3022
+ line.attr("fill", "none").attr("stroke-width", "1").attr("stroke", strokeColor).attr("d", "Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", rel.startPoint.x).replaceAll("starty", rel.startPoint.y).replaceAll("controlx", rel.startPoint.x + (rel.endPoint.x - rel.startPoint.x) / 2 - (rel.endPoint.x - rel.startPoint.x) / 4).replaceAll("controly", rel.startPoint.y + (rel.endPoint.y - rel.startPoint.y) / 2).replaceAll("stopx", rel.endPoint.x).replaceAll("stopy", rel.endPoint.y));
3023
+ if (rel.type !== "rel_b") line.attr("marker-end", "url(#" + diagramId + "-arrowhead)");
3024
+ if (rel.type === "birel" || rel.type === "rel_b") line.attr("marker-start", "url(#" + diagramId + "-arrowend)");
3025
+ }
3026
+ const labelWidth = rel.label.width;
3027
+ let messageConf = conf2.messageFont();
3028
+ _drawTextCandidateFunc(conf2)(rel.label.text, relsElem, Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX, Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + offsetY, labelWidth, rel.label.height, { fill: textColor }, messageConf);
3029
+ if (rel.techn && rel.techn.text !== "") {
3030
+ messageConf = conf2.messageFont();
3031
+ _drawTextCandidateFunc(conf2)("[" + rel.techn.text + "]", relsElem, Math.min(rel.startPoint.x, rel.endPoint.x) + Math.abs(rel.endPoint.x - rel.startPoint.x) / 2 + offsetX, Math.min(rel.startPoint.y, rel.endPoint.y) + Math.abs(rel.endPoint.y - rel.startPoint.y) / 2 + conf2.messageFontSize + 5 + offsetY, Math.max(labelWidth, rel.techn.width), rel.techn.height, {
3032
+ fill: textColor,
3033
+ "font-style": "italic"
3034
+ }, messageConf);
3035
+ }
3036
+ }
3037
+ }, "drawRels");
3038
+ var drawBoundary = /* @__PURE__ */ __name(function(elem, boundary, conf2) {
3039
+ const boundaryElem = elem.append("g");
3040
+ const fillColor = boundary.bgColor ? boundary.bgColor : "none";
3041
+ const strokeColor = boundary.borderColor ? boundary.borderColor : "#444444";
3042
+ const fontColor = boundary.fontColor ? boundary.fontColor : "black";
3043
+ let attrsValue = {
3044
+ "stroke-width": 1,
3045
+ "stroke-dasharray": "7.0,7.0"
3046
+ };
3047
+ if (boundary.nodeType) attrsValue = { "stroke-width": 1 };
3048
+ drawRect2(boundaryElem, {
3049
+ x: boundary.x,
3050
+ y: boundary.y,
3051
+ fill: fillColor,
3052
+ stroke: strokeColor,
3053
+ width: boundary.width,
3054
+ height: boundary.height,
3055
+ rx: 2.5,
3056
+ ry: 2.5,
3057
+ attrs: attrsValue
3058
+ });
3059
+ let boundaryConf = conf2.boundaryFont();
3060
+ boundaryConf.fontWeight = "bold";
3061
+ boundaryConf.fontSize = boundaryConf.fontSize + 2;
3062
+ boundaryConf.fontColor = fontColor;
3063
+ _drawTextCandidateFunc(conf2)(boundary.label.text, boundaryElem, boundary.x, boundary.y + boundary.label.Y, boundary.width, boundary.height, { fill: "#444444" }, boundaryConf);
3064
+ if (boundary.type && boundary.type.text !== "") {
3065
+ boundaryConf = conf2.boundaryFont();
3066
+ boundaryConf.fontColor = fontColor;
3067
+ _drawTextCandidateFunc(conf2)(boundary.type.text, boundaryElem, boundary.x, boundary.y + boundary.type.Y, boundary.width, boundary.height, { fill: "#444444" }, boundaryConf);
3068
+ }
3069
+ if (boundary.descr && boundary.descr.text !== "") {
3070
+ boundaryConf = conf2.boundaryFont();
3071
+ boundaryConf.fontSize = boundaryConf.fontSize - 2;
3072
+ boundaryConf.fontColor = fontColor;
3073
+ _drawTextCandidateFunc(conf2)(boundary.descr.text, boundaryElem, boundary.x, boundary.y + boundary.descr.Y, boundary.width, boundary.height, { fill: "#444444" }, boundaryConf);
3074
+ }
3075
+ }, "drawBoundary");
3076
+ var insertDatabaseIcon = /* @__PURE__ */ __name(function(elem, id) {
3077
+ elem.append("defs").append("symbol").attr("id", id + "-database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr("d", "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");
3078
+ }, "insertDatabaseIcon");
3079
+ var insertComputerIcon = /* @__PURE__ */ __name(function(elem, id) {
3080
+ elem.append("defs").append("symbol").attr("id", id + "-computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr("d", "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");
3081
+ }, "insertComputerIcon");
3082
+ var insertClockIcon = /* @__PURE__ */ __name(function(elem, id) {
3083
+ elem.append("defs").append("symbol").attr("id", id + "-clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr("d", "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");
3084
+ }, "insertClockIcon");
3085
+ var insertArrowHead = /* @__PURE__ */ __name(function(elem, id) {
3086
+ elem.append("defs").append("marker").attr("id", 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");
3087
+ }, "insertArrowHead");
3088
+ var insertArrowEnd = /* @__PURE__ */ __name(function(elem, id) {
3089
+ elem.append("defs").append("marker").attr("id", 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");
3090
+ }, "insertArrowEnd");
3091
+ var insertArrowFilledHead = /* @__PURE__ */ __name(function(elem, id) {
3092
+ elem.append("defs").append("marker").attr("id", 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");
3093
+ }, "insertArrowFilledHead");
3094
+ var insertArrowCrossHead = /* @__PURE__ */ __name(function(elem, id) {
3095
+ const marker = elem.append("defs").append("marker").attr("id", id + "-crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
3096
+ 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");
3097
+ 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");
3098
+ }, "insertArrowCrossHead");
3099
+ var _drawTextCandidateFunc = /* @__PURE__ */ (function() {
3100
+ function byText(content, g, x, y, width, height, textAttrs) {
3101
+ _setTextAttrs(g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("text-anchor", "middle").text(content), textAttrs);
3102
+ }
3103
+ __name(byText, "byText");
3104
+ function byTspan(content, g, x, y, width, height, textAttrs, conf2) {
3105
+ const { fontSize, fontFamily, fontWeight } = conf2;
3106
+ const lines = content.split(common_default.lineBreakRegex);
3107
+ for (let i = 0; i < lines.length; i++) {
3108
+ const dy = i * fontSize - fontSize * (lines.length - 1) / 2;
3109
+ 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);
3110
+ text.append("tspan").attr("dy", dy).text(lines[i]).attr("alignment-baseline", "mathematical");
3111
+ _setTextAttrs(text, textAttrs);
3112
+ }
3113
+ }
3114
+ __name(byTspan, "byTspan");
3115
+ function byFo(content, g, x, y, width, height, textAttrs, conf2) {
3116
+ const s = g.append("switch");
3117
+ const text = s.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
3118
+ text.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
3119
+ byTspan(content, s, x, y, width, height, textAttrs, conf2);
3120
+ _setTextAttrs(text, textAttrs);
3121
+ }
3122
+ __name(byFo, "byFo");
3123
+ function _setTextAttrs(toText, fromTextAttrsDict) {
3124
+ for (const key in fromTextAttrsDict) if (fromTextAttrsDict.hasOwnProperty(key)) toText.attr(key, fromTextAttrsDict[key]);
3125
+ }
3126
+ __name(_setTextAttrs, "_setTextAttrs");
3127
+ return function(conf2) {
3128
+ return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
3129
+ };
3130
+ })();
3131
+ var svgDraw_default = {
3132
+ drawRect: drawRect2,
3133
+ drawBoundary,
3134
+ drawRels,
3135
+ insertArrowHead,
3136
+ insertArrowEnd,
3137
+ insertArrowFilledHead,
3138
+ insertArrowCrossHead,
3139
+ insertDatabaseIcon,
3140
+ insertComputerIcon,
3141
+ insertClockIcon
3142
+ };
3143
+ var getDiagramRoot = /* @__PURE__ */ __name((id, securityLevel) => {
3144
+ if (securityLevel === "sandbox") {
3145
+ const doc = select_default("#i" + id).node()?.contentDocument;
3146
+ if (!doc) throw new Error(`Sandbox iframe #i${id} is missing its content document`);
3147
+ return {
3148
+ root: select_default(doc.body),
3149
+ doc
3150
+ };
3151
+ }
3152
+ return {
3153
+ root: select_default("body"),
3154
+ doc: document
3155
+ };
3156
+ }, "getDiagramRoot");
3157
+ var QUEUE_SHAPES = /* @__PURE__ */ new Set([
3158
+ "system_queue",
3159
+ "external_system_queue",
3160
+ "container_queue",
3161
+ "external_container_queue",
3162
+ "component_queue",
3163
+ "external_component_queue"
3164
+ ]);
3165
+ var DB_SHAPES = /* @__PURE__ */ new Set([
3166
+ "system_db",
3167
+ "external_system_db",
3168
+ "container_db",
3169
+ "external_container_db",
3170
+ "component_db",
3171
+ "external_component_db"
3172
+ ]);
3173
+ var SHAPE_KEYWORDS = {
3174
+ person: "person",
3175
+ box: "rounded",
3176
+ rounded: "rounded",
3177
+ cylinder: "cylinder",
3178
+ database: "cylinder",
3179
+ db: "cylinder",
3180
+ queue: "h-cyl",
3181
+ pipe: "h-cyl",
3182
+ component: "fr-rect"
3183
+ };
3184
+ var keywordShape = /* @__PURE__ */ __name((value) => value ? SHAPE_KEYWORDS[value.toLowerCase()] : void 0, "keywordShape");
3185
+ var resolveNodeShape = /* @__PURE__ */ __name((shape) => {
3186
+ const explicit = keywordShape(shape.shape) ?? keywordShape(shape.sprite);
3187
+ if (explicit) return explicit;
3188
+ if (shape.tags) for (const tag of shape.tags.split(",")) {
3189
+ const tagged = keywordShape(tag.trim());
3190
+ if (tagged) return tagged;
3191
+ }
3192
+ const typeC4Shape = shape.typeC4Shape.text;
3193
+ if (typeC4Shape === "person" || typeC4Shape === "external_person") return "person";
3194
+ if (DB_SHAPES.has(typeC4Shape)) return "cylinder";
3195
+ if (QUEUE_SHAPES.has(typeC4Shape)) return "h-cyl";
3196
+ return "rounded";
3197
+ }, "resolveNodeShape");
3198
+ var STEREOTYPE_NAMES = {
3199
+ person: "Person",
3200
+ system: "Software System",
3201
+ container: "Container",
3202
+ component: "Component"
3203
+ };
3204
+ var stereotypeLabel = /* @__PURE__ */ __name((typeC4Shape) => {
3205
+ const base = typeC4Shape.replace(/^external_/, "").replace(/_(db|queue)$/, "");
3206
+ return STEREOTYPE_NAMES[base] ?? base.replace(/_/g, " ");
3207
+ }, "stereotypeLabel");
3208
+ var isExternal = /* @__PURE__ */ __name((typeC4Shape) => typeC4Shape.startsWith("external_"), "isExternal");
3209
+ var stereotypeText = /* @__PURE__ */ __name((shape) => {
3210
+ const stereotype = stereotypeLabel(shape.typeC4Shape.text);
3211
+ return shape.techn?.text ? `[${stereotype}: ${shape.techn.text}]` : `[${stereotype}]`;
3212
+ }, "stereotypeText");
3213
+ var C4_ELEMENT_TYPES = [
3214
+ "person",
3215
+ "system",
3216
+ "system_db",
3217
+ "system_queue",
3218
+ "container",
3219
+ "container_db",
3220
+ "container_queue",
3221
+ "component",
3222
+ "component_db",
3223
+ "component_queue"
3224
+ ].flatMap((type) => [type, `external_${type}`]);
3225
+ var C4_ELEMENT_TYPE_SET = new Set(C4_ELEMENT_TYPES);
3226
+ var isC4ElementType = /* @__PURE__ */ __name((value) => C4_ELEMENT_TYPE_SET.has(value), "isC4ElementType");
3227
+ var elementCssStyles = /* @__PURE__ */ __name((shape, config) => {
3228
+ const elementType = shape.typeC4Shape.text;
3229
+ const fill = shape.bgColor ?? (isC4ElementType(elementType) && config[`${elementType}_bg_color`]);
3230
+ const stroke = shape.borderColor ?? (isC4ElementType(elementType) && config[`${elementType}_border_color`]);
3231
+ const styles = [];
3232
+ if (fill) styles.push(`fill:${fill}`);
3233
+ if (stroke) styles.push(`stroke:${stroke}`);
3234
+ styles.push(`color:${shape.fontColor ?? "#FFFFFF"}`);
3235
+ return styles;
3236
+ }, "elementCssStyles");
3237
+ var buildC4Node = /* @__PURE__ */ __name((shape, config, padding, look, elementWidth) => {
3238
+ const typeC4Shape = shape.typeC4Shape.text;
3239
+ const cssClasses = ["c4-shape", `c4-${typeC4Shape}`];
3240
+ if (isExternal(typeC4Shape)) cssClasses.push("c4-external");
3241
+ const nodeShape = resolveNodeShape(shape);
3242
+ const cssStyles = elementCssStyles(shape, config);
3243
+ if (nodeShape === "rounded" || nodeShape === "fr-rect") cssStyles.push("rx:12px", "ry:12px");
3244
+ return {
3245
+ id: shape.alias,
3246
+ label: shape.label.text,
3247
+ stereotype: stereotypeText(shape),
3248
+ description: shape.descr?.text ? [shape.descr.text] : void 0,
3249
+ labelType: "string",
3250
+ isGroup: false,
3251
+ shape: nodeShape,
3252
+ cssClasses: cssClasses.join(" "),
3253
+ cssStyles,
3254
+ padding,
3255
+ look,
3256
+ useHtmlLabels: false,
3257
+ width: elementWidth
3258
+ };
3259
+ }, "buildC4Node");
3260
+ var globalBoundaryMaxX = 0;
3261
+ var globalBoundaryMaxY = 0;
3262
+ var c4ShapeInRow2 = 4;
3263
+ var c4BoundaryInRow2 = 2;
3264
+ parser.yy = c4Db_default;
3265
+ var conf = {};
3266
+ var Bounds = class {
3267
+ static {
3268
+ __name(this, "Bounds");
3269
+ }
3270
+ constructor(diagObj) {
3271
+ this.name = "";
3272
+ this.data = {};
3273
+ this.data.startx = void 0;
3274
+ this.data.stopx = void 0;
3275
+ this.data.starty = void 0;
3276
+ this.data.stopy = void 0;
3277
+ this.data.widthLimit = void 0;
3278
+ this.nextData = {};
3279
+ this.nextData.startx = void 0;
3280
+ this.nextData.stopx = void 0;
3281
+ this.nextData.starty = void 0;
3282
+ this.nextData.stopy = void 0;
3283
+ this.nextData.cnt = 0;
3284
+ setConf(diagObj.db.getConfig());
3285
+ }
3286
+ setData(startx, stopx, starty, stopy) {
3287
+ this.nextData.startx = this.data.startx = startx;
3288
+ this.nextData.stopx = this.data.stopx = stopx;
3289
+ this.nextData.starty = this.data.starty = starty;
3290
+ this.nextData.stopy = this.data.stopy = stopy;
3291
+ }
3292
+ updateVal(obj, key, val, fun) {
3293
+ if (obj[key] === void 0) obj[key] = val;
3294
+ else obj[key] = fun(val, obj[key]);
3295
+ }
3296
+ insert(c4Shape) {
3297
+ this.nextData.cnt = this.nextData.cnt + 1;
3298
+ const nextStopx = this.nextData.stopx;
3299
+ const widthLimit = this.data.widthLimit;
3300
+ let _startx = this.nextData.startx === this.nextData.stopx ? nextStopx + c4Shape.margin : nextStopx + c4Shape.margin * 2;
3301
+ let _stopx = _startx + c4Shape.width;
3302
+ let _starty = this.nextData.starty + c4Shape.margin * 2;
3303
+ let _stopy = _starty + c4Shape.height;
3304
+ if (_startx >= widthLimit || _stopx >= widthLimit || this.nextData.cnt > c4ShapeInRow2) {
3305
+ _startx = this.nextData.startx + c4Shape.margin + conf.nextLinePaddingX;
3306
+ _starty = this.nextData.stopy + c4Shape.margin * 2;
3307
+ this.nextData.stopx = _stopx = _startx + c4Shape.width;
3308
+ this.nextData.starty = this.nextData.stopy;
3309
+ this.nextData.stopy = _stopy = _starty + c4Shape.height;
3310
+ this.nextData.cnt = 1;
3311
+ }
3312
+ c4Shape.x = _startx;
3313
+ c4Shape.y = _starty;
3314
+ this.updateVal(this.data, "startx", _startx, Math.min);
3315
+ this.updateVal(this.data, "starty", _starty, Math.min);
3316
+ this.updateVal(this.data, "stopx", _stopx, Math.max);
3317
+ this.updateVal(this.data, "stopy", _stopy, Math.max);
3318
+ this.updateVal(this.nextData, "startx", _startx, Math.min);
3319
+ this.updateVal(this.nextData, "starty", _starty, Math.min);
3320
+ this.updateVal(this.nextData, "stopx", _stopx, Math.max);
3321
+ this.updateVal(this.nextData, "stopy", _stopy, Math.max);
3322
+ }
3323
+ init(diagObj) {
3324
+ this.name = "";
3325
+ this.data = {
3326
+ startx: void 0,
3327
+ stopx: void 0,
3328
+ starty: void 0,
3329
+ stopy: void 0,
3330
+ widthLimit: void 0
3331
+ };
3332
+ this.nextData = {
3333
+ startx: void 0,
3334
+ stopx: void 0,
3335
+ starty: void 0,
3336
+ stopy: void 0,
3337
+ cnt: 0
3338
+ };
3339
+ setConf(diagObj.db.getConfig());
3340
+ }
3341
+ bumpLastMargin(margin) {
3342
+ this.data.stopx += margin;
3343
+ this.data.stopy += margin;
3344
+ }
3345
+ };
3346
+ var setConf = /* @__PURE__ */ __name(function(cnf) {
3347
+ assignWithDepth_default(conf, cnf);
3348
+ if (cnf?.fontFamily) conf.personFontFamily = conf.systemFontFamily = conf.messageFontFamily = cnf.fontFamily;
3349
+ if (cnf?.fontSize) conf.personFontSize = conf.systemFontSize = conf.messageFontSize = cnf.fontSize;
3350
+ if (cnf?.fontWeight) conf.personFontWeight = conf.systemFontWeight = conf.messageFontWeight = cnf.fontWeight;
3351
+ }, "setConf");
3352
+ var boundaryFont = /* @__PURE__ */ __name((cnf) => {
3353
+ return {
3354
+ fontFamily: cnf.boundaryFontFamily,
3355
+ fontSize: cnf.boundaryFontSize,
3356
+ fontWeight: cnf.boundaryFontWeight
3357
+ };
3358
+ }, "boundaryFont");
3359
+ var messageFont = /* @__PURE__ */ __name((cnf) => {
3360
+ return {
3361
+ fontFamily: cnf.messageFontFamily,
3362
+ fontSize: cnf.messageFontSize,
3363
+ fontWeight: cnf.messageFontWeight
3364
+ };
3365
+ }, "messageFont");
3366
+ function calcC4ShapeTextWH(textType, c4Shape, c4ShapeTextWrap, textConf, textLimitWidth) {
3367
+ const textElement = c4Shape[textType];
3368
+ if (!textElement.width) if (c4ShapeTextWrap) {
3369
+ textElement.text = wrapLabel(textElement.text, textLimitWidth, textConf);
3370
+ textElement.textLines = textElement.text.split(common_default.lineBreakRegex).length;
3371
+ textElement.width = textLimitWidth;
3372
+ textElement.height = calculateTextHeight(textElement.text, textConf);
3373
+ } else {
3374
+ const lines = textElement.text.split(common_default.lineBreakRegex);
3375
+ textElement.textLines = lines.length;
3376
+ let lineHeight = 0;
3377
+ textElement.height = 0;
3378
+ textElement.width = 0;
3379
+ for (const line of lines) {
3380
+ textElement.width = Math.max(calculateTextWidth(line, textConf), textElement.width);
3381
+ lineHeight = calculateTextHeight(line, textConf);
3382
+ textElement.height = textElement.height + lineHeight;
3383
+ }
3384
+ }
3385
+ return textElement;
3386
+ }
3387
+ __name(calcC4ShapeTextWH, "calcC4ShapeTextWH");
3388
+ var drawBoundary2 = /* @__PURE__ */ __name(function(diagram2, boundary, bounds) {
3389
+ const startx = bounds.data.startx;
3390
+ const starty = bounds.data.starty;
3391
+ boundary.x = startx;
3392
+ boundary.y = starty;
3393
+ boundary.width = bounds.data.stopx - startx;
3394
+ boundary.height = bounds.data.stopy - starty;
3395
+ boundary.label.y = conf.c4ShapeMargin - 35;
3396
+ const boundaryTextWrap = boundary.wrap && conf.wrap;
3397
+ const boundaryLabelConf = boundaryFont(conf);
3398
+ boundaryLabelConf.fontSize = boundaryLabelConf.fontSize + 2;
3399
+ boundaryLabelConf.fontWeight = "bold";
3400
+ calcC4ShapeTextWH("label", boundary, boundaryTextWrap, boundaryLabelConf, calculateTextWidth(boundary.label.text, boundaryLabelConf));
3401
+ svgDraw_default.drawBoundary(diagram2, boundary, conf);
3402
+ }, "drawBoundary");
3403
+ var drawC4ShapeArray = /* @__PURE__ */ __name(async function(currentBounds, diagram2, c4ShapeArray2, c4ShapeKeys) {
3404
+ const mermaidConfig = getConfig2();
3405
+ const look = mermaidConfig.look ?? "classic";
3406
+ const renderOptions = { config: mermaidConfig };
3407
+ const diagramId = diagram2.attr("id") ?? "";
3408
+ const c4Shapes = c4ShapeKeys.map((key) => c4ShapeArray2[Number(key)]);
3409
+ const shapeHandlerFor = /* @__PURE__ */ __name((node) => {
3410
+ const handler = node.shape ? shapes[node.shape] : void 0;
3411
+ if (!handler) throw new Error(`C4: no shape handler for "${node.shape}"`);
3412
+ return handler;
3413
+ }, "shapeHandlerFor");
3414
+ await Promise.all(c4Shapes.map(async (c4Shape) => {
3415
+ const node = buildC4Node(c4Shape, conf, conf.c4ShapePadding, look, conf.width);
3416
+ node.domId = `${diagramId}-${node.id}`;
3417
+ const measured = await shapeHandlerFor(node)(diagram2, node, renderOptions);
3418
+ c4Shape.width = node.width ?? conf.width;
3419
+ c4Shape.height = node.height ?? conf.height;
3420
+ c4Shape.margin = conf.c4ShapeMargin;
3421
+ measured.remove();
3422
+ }));
3423
+ for (const c4Shape of c4Shapes) currentBounds.insert(c4Shape);
3424
+ await Promise.all(c4Shapes.map(async (c4Shape) => {
3425
+ const node = buildC4Node(c4Shape, conf, conf.c4ShapePadding, look, conf.width);
3426
+ node.domId = `${diagramId}-${node.id}`;
3427
+ node.x = c4Shape.x + c4Shape.width / 2;
3428
+ node.y = c4Shape.y + c4Shape.height / 2;
3429
+ const positioned = diagram2.append("g").attr("transform", `translate(${c4Shape.x + c4Shape.width / 2}, ${c4Shape.y + c4Shape.height / 2})`);
3430
+ await shapeHandlerFor(node)(positioned, node, renderOptions);
3431
+ c4Shape.intersect = node.intersect;
3432
+ }));
3433
+ currentBounds.bumpLastMargin(conf.c4ShapeMargin);
3434
+ }, "drawC4ShapeArray");
3435
+ var Point = class {
3436
+ static {
3437
+ __name(this, "Point");
3438
+ }
3439
+ constructor(x, y) {
3440
+ this.x = x;
3441
+ this.y = y;
3442
+ }
3443
+ };
3444
+ var getIntersectPoint = /* @__PURE__ */ __name(function(fromNode, endPoint) {
3445
+ if (!fromNode.intersect) throw new Error(`C4 shape "${fromNode.alias}" has no intersect function. Please report this to https://github.com/mermaid-js/mermaid/issues`);
3446
+ const { x, y } = fromNode.intersect(endPoint);
3447
+ return new Point(x, y);
3448
+ }, "getIntersectPoint");
3449
+ var getIntersectPoints = /* @__PURE__ */ __name(function(fromNode, endNode) {
3450
+ const endIntersectPoint = {
3451
+ x: 0,
3452
+ y: 0
3453
+ };
3454
+ endIntersectPoint.x = endNode.x + endNode.width / 2;
3455
+ endIntersectPoint.y = endNode.y + endNode.height / 2;
3456
+ const startPoint = getIntersectPoint(fromNode, endIntersectPoint);
3457
+ endIntersectPoint.x = fromNode.x + fromNode.width / 2;
3458
+ endIntersectPoint.y = fromNode.y + fromNode.height / 2;
3459
+ return {
3460
+ startPoint,
3461
+ endPoint: getIntersectPoint(endNode, endIntersectPoint)
3462
+ };
3463
+ }, "getIntersectPoints");
3464
+ var drawRels2 = /* @__PURE__ */ __name(function(diagram2, rels2, getC4ShapeObj, diagObj, diagramId) {
3465
+ const diagramType = diagObj.db.getC4Type();
3466
+ let i = 0;
3467
+ for (const rel of rels2) {
3468
+ i = i + 1;
3469
+ const relTextWrap = rel.wrap && conf.wrap;
3470
+ const relConf = messageFont(conf);
3471
+ if (diagramType === "C4Dynamic") rel.label.text = i + ": " + rel.label.text;
3472
+ let textLimitWidth = calculateTextWidth(rel.label.text, relConf);
3473
+ calcC4ShapeTextWH("label", rel, relTextWrap, relConf, textLimitWidth);
3474
+ if (rel.techn && rel.techn.text !== "") {
3475
+ textLimitWidth = calculateTextWidth(rel.techn.text, relConf);
3476
+ calcC4ShapeTextWH("techn", rel, relTextWrap, relConf, textLimitWidth);
3477
+ }
3478
+ if (rel.descr && rel.descr.text !== "") {
3479
+ textLimitWidth = calculateTextWidth(rel.descr.text, relConf);
3480
+ calcC4ShapeTextWH("descr", rel, relTextWrap, relConf, textLimitWidth);
3481
+ }
3482
+ const fromNode = getC4ShapeObj(rel.from);
3483
+ const endNode = getC4ShapeObj(rel.to);
3484
+ if (!fromNode || !endNode) throw new Error(`C4 rel "${rel.from}" -> "${rel.to}" references an unknown shape`);
3485
+ const points = getIntersectPoints(fromNode, endNode);
3486
+ if (!points.startPoint || !points.endPoint) throw new Error(`Could not calculate intersection points for rel "${rel.from}" -> "${rel.to}"`);
3487
+ rel.startPoint = points.startPoint;
3488
+ rel.endPoint = points.endPoint;
3489
+ }
3490
+ svgDraw_default.drawRels(diagram2, rels2, conf, diagramId);
3491
+ }, "drawRels");
3492
+ async function drawInsideBoundary(diagram2, parentBoundaryAlias, parentBounds, currentBoundaries, diagObj) {
3493
+ const db = diagObj.db;
3494
+ const currentBounds = new Bounds(diagObj);
3495
+ currentBounds.data.widthLimit = parentBounds.data.widthLimit / Math.min(c4BoundaryInRow2, currentBoundaries.length);
3496
+ for (const [i, currentBoundary] of currentBoundaries.entries()) {
3497
+ let Y = 0;
3498
+ currentBoundary.image = {
3499
+ width: 0,
3500
+ height: 0,
3501
+ Y: 0
3502
+ };
3503
+ if (currentBoundary.sprite) {
3504
+ currentBoundary.image.width = 48;
3505
+ currentBoundary.image.height = 48;
3506
+ currentBoundary.image.Y = Y;
3507
+ Y = currentBoundary.image.Y + currentBoundary.image.height;
3508
+ }
3509
+ const currentBoundaryTextWrap = currentBoundary.wrap && conf.wrap;
3510
+ const currentBoundaryLabelConf = boundaryFont(conf);
3511
+ currentBoundaryLabelConf.fontSize = currentBoundaryLabelConf.fontSize + 2;
3512
+ currentBoundaryLabelConf.fontWeight = "bold";
3513
+ const label = calcC4ShapeTextWH("label", currentBoundary, currentBoundaryTextWrap, currentBoundaryLabelConf, currentBounds.data.widthLimit);
3514
+ label.Y = Y + 8;
3515
+ Y = label.Y + label.height;
3516
+ if (currentBoundary.type && currentBoundary.type.text !== "") {
3517
+ currentBoundary.type.text = "[" + currentBoundary.type.text + "]";
3518
+ const type = calcC4ShapeTextWH("type", currentBoundary, currentBoundaryTextWrap, boundaryFont(conf), currentBounds.data.widthLimit);
3519
+ type.Y = Y + 5;
3520
+ Y = type.Y + type.height;
3521
+ }
3522
+ if (currentBoundary.descr && currentBoundary.descr.text !== "") {
3523
+ const currentBoundaryDescrConf = boundaryFont(conf);
3524
+ currentBoundaryDescrConf.fontSize = currentBoundaryDescrConf.fontSize - 2;
3525
+ const descr = calcC4ShapeTextWH("descr", currentBoundary, currentBoundaryTextWrap, currentBoundaryDescrConf, currentBounds.data.widthLimit);
3526
+ descr.Y = Y + 20;
3527
+ Y = descr.Y + descr.height;
3528
+ }
3529
+ if (i == 0 || i % c4BoundaryInRow2 === 0) {
3530
+ const _x = parentBounds.data.startx + conf.diagramMarginX;
3531
+ const _y = parentBounds.data.stopy + conf.diagramMarginY + Y;
3532
+ currentBounds.setData(_x, _x, _y, _y);
3533
+ } else {
3534
+ const _x = currentBounds.data.stopx !== currentBounds.data.startx ? currentBounds.data.stopx + conf.diagramMarginX : currentBounds.data.startx;
3535
+ const _y = currentBounds.data.starty;
3536
+ currentBounds.setData(_x, _x, _y, _y);
3537
+ }
3538
+ currentBounds.name = currentBoundary.alias;
3539
+ const currentPersonOrSystemArray = db.getC4ShapeArray(currentBoundary.alias);
3540
+ const currentPersonOrSystemKeys = db.getC4ShapeKeys(currentBoundary.alias);
3541
+ if (currentPersonOrSystemKeys.length > 0) await drawC4ShapeArray(currentBounds, diagram2, currentPersonOrSystemArray, currentPersonOrSystemKeys);
3542
+ parentBoundaryAlias = currentBoundary.alias;
3543
+ const nextCurrentBoundaries = db.getBoundaries(parentBoundaryAlias);
3544
+ if (nextCurrentBoundaries.length > 0) await drawInsideBoundary(diagram2, parentBoundaryAlias, currentBounds, nextCurrentBoundaries, diagObj);
3545
+ if (currentBoundary.alias !== "global") drawBoundary2(diagram2, currentBoundary, currentBounds);
3546
+ parentBounds.data.stopy = Math.max(currentBounds.data.stopy + conf.c4ShapeMargin, parentBounds.data.stopy);
3547
+ parentBounds.data.stopx = Math.max(currentBounds.data.stopx + conf.c4ShapeMargin, parentBounds.data.stopx);
3548
+ globalBoundaryMaxX = Math.max(globalBoundaryMaxX, parentBounds.data.stopx);
3549
+ globalBoundaryMaxY = Math.max(globalBoundaryMaxY, parentBounds.data.stopy);
3550
+ }
3551
+ }
3552
+ __name(drawInsideBoundary, "drawInsideBoundary");
3553
+ var c4Renderer_default = {
3554
+ drawPersonOrSystemArray: drawC4ShapeArray,
3555
+ drawBoundary: drawBoundary2,
3556
+ setConf,
3557
+ draw: /* @__PURE__ */ __name(async function(_text, id, _version, diagObj) {
3558
+ conf = getRequiredConfig("c4");
3559
+ const securityLevel = getConfig2().securityLevel;
3560
+ const { root } = getDiagramRoot(id, securityLevel);
3561
+ const db = diagObj.db;
3562
+ db.setWrap(conf.wrap);
3563
+ c4ShapeInRow2 = db.getC4ShapeInRow();
3564
+ c4BoundaryInRow2 = db.getC4BoundaryInRow();
3565
+ log.debug(`C:${JSON.stringify(conf, null, 2)}`);
3566
+ const diagram2 = root.select(`[id="${id}"]`);
3567
+ svgDraw_default.insertComputerIcon(diagram2, id);
3568
+ svgDraw_default.insertDatabaseIcon(diagram2, id);
3569
+ svgDraw_default.insertClockIcon(diagram2, id);
3570
+ const screenBounds = new Bounds(diagObj);
3571
+ screenBounds.setData(conf.diagramMarginX, conf.diagramMarginX, conf.diagramMarginY, conf.diagramMarginY);
3572
+ screenBounds.data.widthLimit = screen.availWidth;
3573
+ globalBoundaryMaxX = conf.diagramMarginX;
3574
+ globalBoundaryMaxY = conf.diagramMarginY;
3575
+ const title2 = db.getTitle();
3576
+ await drawInsideBoundary(diagram2, "", screenBounds, db.getBoundaries(""), diagObj);
3577
+ svgDraw_default.insertArrowHead(diagram2, id);
3578
+ svgDraw_default.insertArrowEnd(diagram2, id);
3579
+ svgDraw_default.insertArrowCrossHead(diagram2, id);
3580
+ svgDraw_default.insertArrowFilledHead(diagram2, id);
3581
+ drawRels2(diagram2, db.getRels(), db.getC4Shape, diagObj, id);
3582
+ screenBounds.data.stopx = globalBoundaryMaxX;
3583
+ screenBounds.data.stopy = globalBoundaryMaxY;
3584
+ const box = screenBounds.data;
3585
+ const boxStartx = box.startx;
3586
+ const boxStarty = box.starty;
3587
+ const height = globalBoundaryMaxY - boxStarty + 2 * conf.diagramMarginY;
3588
+ const boxWidth = globalBoundaryMaxX - boxStartx;
3589
+ const width = boxWidth + 2 * conf.diagramMarginX;
3590
+ if (title2) diagram2.append("text").text(title2).attr("x", boxWidth / 2 - 4 * conf.diagramMarginX).attr("y", boxStarty + conf.diagramMarginY);
3591
+ configureSvgSize(diagram2, height, width, conf.useMaxWidth);
3592
+ const extraVertForTitle = title2 ? 60 : 0;
3593
+ diagram2.attr("viewBox", boxStartx - conf.diagramMarginX + " -" + (conf.diagramMarginY + extraVertForTitle) + " " + width + " " + (height + extraVertForTitle));
3594
+ log.debug(`models:`, box);
3595
+ }, "draw")
3596
+ };
3597
+ var elementFontStyles = /* @__PURE__ */ __name(() => {
3598
+ const c4 = getConfig2().c4 ?? {};
3599
+ const sheet = new CSSStyleSheet();
3600
+ for (const type of C4_ELEMENT_TYPES) {
3601
+ const rule = sheet.cssRules[sheet.insertRule(`.c4-shape.c4-${type} .label {}`, sheet.cssRules.length)];
3602
+ const fontFamily = c4[`${type}FontFamily`];
3603
+ const fontSize = c4[`${type}FontSize`];
3604
+ const fontWeight = c4[`${type}FontWeight`];
3605
+ if (fontFamily) rule.style.setProperty("font-family", fontFamily);
3606
+ if (fontSize) rule.style.setProperty("font-size", typeof fontSize === "number" ? `${fontSize}px` : fontSize);
3607
+ if (fontWeight) rule.style.setProperty("font-weight", String(fontWeight));
3608
+ }
3609
+ return [...sheet.cssRules].filter((rule) => rule.style.length > 0).map((rule) => ` ${rule.cssText}`).join("\n");
3610
+ }, "elementFontStyles");
3611
+ var diagram = {
3612
+ parser: c4Diagram_default,
3613
+ db: c4Db_default,
3614
+ renderer: c4Renderer_default,
3615
+ styles: /* @__PURE__ */ __name((options) => `.person {
3616
+ stroke: ${options.personBorder};
3617
+ fill: ${options.personBkg};
3618
+ }
3619
+ ${elementFontStyles()}
3620
+
3621
+ /* The element font colour is set inline per element (default white); the
3622
+ label text takes it via currentColor. */
3623
+ .c4-shape .label,
3624
+ .c4-shape .label text {
3625
+ color: inherit;
3626
+ fill: currentColor;
3627
+ }
3628
+ /* Structurizr typography: bold name, smaller stereotype/type and description lines. */
3629
+ .c4-shape .label .c4-name {
3630
+ font-weight: bold;
3631
+ }
3632
+ .c4-shape .label .c4-type {
3633
+ font-size: 0.75em;
3634
+ }
3635
+ .c4-shape .label .c4-descr {
3636
+ font-size: 0.82em;
3637
+ }
3638
+ .c4-shape .basic,
3639
+ .c4-shape rect,
3640
+ .c4-shape path,
3641
+ .c4-shape circle,
3642
+ .c4-shape ellipse,
3643
+ .c4-shape line {
3644
+ stroke-width: 2px;
3645
+ }
3646
+ `, "getStyles"),
3647
+ init: /* @__PURE__ */ __name(({ c4, wrap }) => {
3648
+ c4Renderer_default.setConf(c4);
3649
+ c4Db_default.setWrap(wrap);
3650
+ }, "init")
3651
+ };
3652
+
3653
+ //#endregion
3654
+ export { diagram };