@peasant-labs/fairtrade 0.0.48 → 0.0.50

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 (123) hide show
  1. package/dist/lib/abnfDiagram-WEYOIA3C-D4LMNFIJ.js +89 -0
  2. package/dist/lib/{adapter-DnCl_ddK.js → adapter-CVKibszh.js} +136 -126
  3. package/dist/lib/arc-1xTxsoRi.js +80 -0
  4. package/dist/lib/architecture-WOLXFQ4H-c6RsZuzu.js +3 -0
  5. package/dist/lib/architectureDiagram-ZHVYKT53-DTINqD5R.js +4145 -0
  6. package/dist/lib/array-CApNbSU9.js +6 -0
  7. package/dist/lib/blockDiagram-RJAE7QA3-CUYHoR3g.js +1946 -0
  8. package/dist/lib/c4Diagram-XDPPPE54-Cdx6_DsI.js +2990 -0
  9. package/dist/lib/channel-DagAO2vE.js +5 -0
  10. package/dist/lib/chunk-2E7WHVMD-BzhgXW3b.js +490 -0
  11. package/dist/lib/chunk-2Q5K7J3B-DWNwIK5Y.js +15 -0
  12. package/dist/lib/chunk-4EMNKR2T-DhFrQz9k.js +236 -0
  13. package/dist/lib/chunk-55XCU76K-CI0GXDkJ.js +61 -0
  14. package/dist/lib/chunk-5VM5RSS4-BAQ-46g4.js +5 -0
  15. package/dist/lib/chunk-7S6XSTFO-CMt_p-O6.js +1373 -0
  16. package/dist/lib/chunk-AQDTSKZB-DrZccIQa.js +1847 -0
  17. package/dist/lib/chunk-DSNLSHJZ-CpA9d2CJ.js +4044 -0
  18. package/dist/lib/chunk-DUW6YSOI-C-tN4Kiv.js +10 -0
  19. package/dist/lib/chunk-EJLWFMJV-B30MNYvY.js +75 -0
  20. package/dist/lib/chunk-HAGFOTED-DMU2JNZM.js +4487 -0
  21. package/dist/lib/chunk-HNE4Q36P-BIA0n2gA.js +363 -0
  22. package/dist/lib/chunk-J5ZVWO5B-CA_-jk8G.js +12 -0
  23. package/dist/lib/chunk-JWPE2WC7-KRpHbrIX.js +8 -0
  24. package/dist/lib/chunk-LNGE3PJU-CMGaAEAh.js +1513 -0
  25. package/dist/lib/chunk-NGNAAXSQ-D7Dvct7J.js +19774 -0
  26. package/dist/lib/chunk-NQOKRVIF-MK9F46y3.js +4258 -0
  27. package/dist/lib/chunk-OYAV6JZA-B1yICcbU.js +10 -0
  28. package/dist/lib/chunk-UHW7PFBP-CLrOaA0y.js +67 -0
  29. package/dist/lib/chunk-VQ5W62QI-_ZR3gKe4.js +26 -0
  30. package/dist/lib/chunk-WQQL4CDK-DFtyhYZq.js +693 -0
  31. package/dist/lib/chunk-XXDRQBXY-uzyNBbgx.js +9 -0
  32. package/dist/lib/chunk-Y2CYZVJY-BYzrzvCI.js +12 -0
  33. package/dist/lib/chunk-YZO67HFG-D1jKt78p.js +275 -0
  34. package/dist/lib/chunk-ZAUX2LTX-7XO0Yj1z.js +37 -0
  35. package/dist/lib/chunk-ZCHMQSOR-CxoKltfF.js +349 -0
  36. package/dist/lib/classDiagram-v2-4MYWR3UA-BPvwhZqw.js +3397 -0
  37. package/dist/lib/commons.js +729 -729
  38. package/dist/lib/components.css +1 -1
  39. package/dist/lib/cose-bilkent-JH36ORCC-Oj79uOIQ.js +2250 -0
  40. package/dist/lib/cynefin-EF2NZ3EQ-COX3NRum.js +3 -0
  41. package/dist/lib/cynefinDiagram-WF24UDRP-UzTptNAX.js +349 -0
  42. package/dist/lib/cytoscape.esm-0ojxgO9x.js +18161 -0
  43. package/dist/lib/dagre-NK4GIZVX-DWZr-NGm.js +2356 -0
  44. package/dist/lib/defaultLocale-BbgDuMnp.js +201 -0
  45. package/dist/lib/diagram-CBK3MWTC-CsyKuv-w.js +525 -0
  46. package/dist/lib/diagram-I5XIIV2D-DWY2JSPC.js +134 -0
  47. package/dist/lib/diagram-ODIL2UCW-DUptj0JZ.js +301 -0
  48. package/dist/lib/diagram-PFBEJUXE-N5XnIBqM.js +447 -0
  49. package/dist/lib/diagram-RJA3I4VV-B9XgohYo.js +214 -0
  50. package/dist/lib/diagram-TYUNFSNR-XnsJIeAd.js +5084 -0
  51. package/dist/lib/dist-AMlsjiDX.js +59 -0
  52. package/dist/lib/ebnfDiagram-V4P3TTPT-BssHqFox.js +100 -0
  53. package/dist/lib/elk-QONTBCTQ-DwmwqYgP.js +47944 -0
  54. package/dist/lib/erDiagram-KYQIGQAA-BQiXw1Tw.js +1970 -0
  55. package/dist/lib/eventmodeling-K75KTNOO-DDb--yMc.js +3 -0
  56. package/dist/lib/flowDiagram-IUGLLWBU-BEqqF1y2.js +17 -0
  57. package/dist/lib/ganttDiagram-R7GPNTJY-BWtGXxEF.js +3094 -0
  58. package/dist/lib/gitGraph-VSP46ZUC-BSwOaak_.js +3 -0
  59. package/dist/lib/gitGraphDiagram-PDYL7XHY-CHGNuGbk.js +729 -0
  60. package/dist/lib/graphlib-Dndp26xU.js +1267 -0
  61. package/dist/lib/info-OHQRW6UA-Dk06sZRe.js +3 -0
  62. package/dist/lib/infoDiagram-MVDRKAX5-Cdhxnjmi.js +20 -0
  63. package/dist/lib/init-Bwwdo3M6.js +15 -0
  64. package/dist/lib/ishikawaDiagram-HPEHV2GE-Dzhti-GJ.js +719 -0
  65. package/dist/lib/journeyDiagram-BOSHW7O7-C3_vsSjw.js +884 -0
  66. package/dist/lib/kanban-definition-FNSA4HC5-XsfCEsjn.js +976 -0
  67. package/dist/lib/katex-Dw0PnoPU.js +21850 -0
  68. package/dist/lib/line-C9krU3Sv.js +34 -0
  69. package/dist/lib/linear-Cvilv3OA.js +289 -0
  70. package/dist/lib/mermaid-parser.core-I7qQ_fxz.js +638 -0
  71. package/dist/lib/mermaid.core-UNHMAbBP.js +1126 -0
  72. package/dist/lib/mindmap-definition-6OY57UG3-CAua-JvB.js +1011 -0
  73. package/dist/lib/ordinal-C55HfHHp.js +65 -0
  74. package/dist/lib/packet-JDAUHWVQ-DZ-MKx4I.js +3 -0
  75. package/dist/lib/path-DNvJyUE8.js +85 -0
  76. package/dist/lib/pegDiagram-ECIUJNBX-BCxa_IO0.js +94 -0
  77. package/dist/lib/pie-XZMESJXO-DpCa-Nnq.js +3 -0
  78. package/dist/lib/pieDiagram-GNMPY74T-CE_C3dCB.js +205 -0
  79. package/dist/lib/quadrantDiagram-D57K4MC3-CDgzdMoL.js +2001 -0
  80. package/dist/lib/radar-ABXABTNO-BOVK7L9p.js +3 -0
  81. package/dist/lib/railroad-I3PHUGI6-B6spKM0Z.js +3 -0
  82. package/dist/lib/railroad-abnf-LNEFI6M7-DEWqfByZ.js +3 -0
  83. package/dist/lib/railroad-ebnf-DWYD2UWJ-CWRLtxHB.js +3 -0
  84. package/dist/lib/railroad-peg-JR7BVNR7-C-3NHSsk.js +3 -0
  85. package/dist/lib/railroadDiagram-Y72NRBL7-a8YVk8LT.js +76 -0
  86. package/dist/lib/requirementDiagram-EQYSW5RA-B9HolqxU.js +2228 -0
  87. package/dist/lib/rough.esm-a8mysczE.js +1352 -0
  88. package/dist/lib/sankeyDiagram-SY24JHO5-CLFMtMJG.js +970 -0
  89. package/dist/lib/sequenceDiagram-BLEHNHQU-B5wfSV85.js +4253 -0
  90. package/dist/lib/share.js +1 -1
  91. package/dist/lib/sizeCapture-INFHLROL-BWGCc9aa.js +46 -0
  92. package/dist/lib/src-Dcy0zUZH.js +2153 -0
  93. package/dist/lib/stateDiagram-v2-A6IESKWZ-C92vye4N.js +2143 -0
  94. package/dist/lib/swimlanes-B3ENRKFQ-B6-i-tPc.js +4764 -0
  95. package/dist/lib/swimlanesDiagram-AYQRV4AK-CbkBeql-.js +28 -0
  96. package/dist/lib/timeline-definition-JXYKGLGB-D2Ip4r72.js +1073 -0
  97. package/dist/lib/treeView-D4JQ5SDB-CFaKQ_2T.js +3 -0
  98. package/dist/lib/treemap-SAJKECNS-BQ6z7Z3g.js +3 -0
  99. package/dist/lib/types/AppSidebar.d.ts +14 -1
  100. package/dist/lib/types/transcript/Collapsible.d.ts +2 -1
  101. package/dist/lib/types/transcript/Markdown.d.ts +1 -0
  102. package/dist/lib/types/transcript/MermaidBlock.d.ts +3 -0
  103. package/dist/lib/types/transcript/SearchHighlights.d.ts +7 -0
  104. package/dist/lib/types/transcript/ToolBody.d.ts +1 -0
  105. package/dist/lib/types/transcript/TranscriptViewer.d.ts +1 -1
  106. package/dist/lib/types/transcript/UnverifiedPullRequests.d.ts +12 -0
  107. package/dist/lib/types/transcript/index.d.ts +1 -0
  108. package/dist/lib/types/transcript/mermaidSource.d.ts +2 -0
  109. package/dist/lib/types/transcript/mermaidSvg.d.ts +1 -0
  110. package/dist/lib/types/transcript/search-highlights.d.ts +2 -0
  111. package/dist/lib/types/transcript/state-capabilities.d.ts +28 -8
  112. package/dist/lib/types/transcript/tool-state-key.d.ts +2 -0
  113. package/dist/lib/types/transcript/useReaderWidthAnchor.d.ts +20 -0
  114. package/dist/lib/types/transcript/view-model.d.ts +14 -0
  115. package/dist/lib/types/ui/transcript/view-model.d.ts +14 -0
  116. package/dist/lib/{ui-BLiaBlAK.js → ui-BOGaFxV-.js} +5212 -4194
  117. package/dist/lib/ui.js +6 -6
  118. package/dist/lib/usecaseDiagram-WPOLBNNX-BK1Anch1.js +7190 -0
  119. package/dist/lib/vennDiagram-Q3Y3IDCW-B6YTBqTS.js +1880 -0
  120. package/dist/lib/wardley-7MLQ67FV-DChYwu4i.js +3 -0
  121. package/dist/lib/wardleyDiagram-IVAIDKWA-D5I1qLUK.js +645 -0
  122. package/dist/lib/xychartDiagram-4URNHDU4-B6RXyhTO.js +2218 -0
  123. package/package.json +4 -3
@@ -0,0 +1,4253 @@
1
+ import { m as e, p as t } from "./src-Dcy0zUZH.js";
2
+ import { n } from "./chunk-Y2CYZVJY-BYzrzvCI.js";
3
+ import { C as r, D as i, F as a, G as o, H as s, U as c, _ as l, a as u, b as d, c as f, i as p, k as m, q as h, r as g, s as _, v, y, z as b } from "./chunk-DSNLSHJZ-CpA9d2CJ.js";
4
+ import { t as x } from "./dist-AMlsjiDX.js";
5
+ import { _ as S, m as C } from "./chunk-7S6XSTFO-CMt_p-O6.js";
6
+ import { a as w, c as T, i as E, n as D, r as O, s as k } from "./chunk-55XCU76K-CI0GXDkJ.js";
7
+ import { t as A } from "./chunk-2Q5K7J3B-DWNwIK5Y.js";
8
+ import { n as j, t as M } from "./chunk-LNGE3PJU-CMGaAEAh.js";
9
+ //#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-BLEHNHQU.mjs
10
+ var N = x(), P = (function() {
11
+ var e = /* @__PURE__ */ n(function(e, t, n, r) {
12
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
13
+ return n;
14
+ }, "o"), t = [1, 2], r = [1, 3], i = [1, 4], a = [2, 4], o = [1, 9], s = [1, 11], c = [1, 12], l = [1, 14], u = [1, 15], d = [1, 17], f = [1, 18], p = [1, 19], m = [1, 25], h = [1, 26], g = [1, 27], _ = [1, 28], v = [1, 29], y = [1, 30], b = [1, 31], x = [1, 32], S = [1, 33], C = [1, 34], w = [1, 35], T = [1, 36], E = [1, 37], D = [1, 38], O = [1, 39], k = [1, 40], A = [1, 42], j = [1, 43], M = [1, 44], N = [1, 45], P = [1, 46], F = [1, 47], I = [
15
+ 1,
16
+ 4,
17
+ 5,
18
+ 10,
19
+ 14,
20
+ 15,
21
+ 17,
22
+ 19,
23
+ 22,
24
+ 24,
25
+ 30,
26
+ 31,
27
+ 32,
28
+ 34,
29
+ 36,
30
+ 37,
31
+ 38,
32
+ 39,
33
+ 40,
34
+ 42,
35
+ 44,
36
+ 45,
37
+ 47,
38
+ 48,
39
+ 49,
40
+ 50,
41
+ 51,
42
+ 53,
43
+ 54,
44
+ 56,
45
+ 61,
46
+ 62,
47
+ 63,
48
+ 64,
49
+ 73
50
+ ], L = [1, 56], ee = [1, 75], R = [1, 81], te = [1, 82], ne = [1, 83], re = [1, 84], ie = [1, 85], ae = [1, 86], oe = [1, 87], se = [1, 88], ce = [1, 89], le = [1, 90], z = [1, 91], ue = [1, 92], de = [1, 93], fe = [1, 94], pe = [1, 95], B = [1, 96], V = [1, 97], me = [1, 98], H = [1, 99], U = [1, 100], W = [1, 101], he = [1, 102], ge = [1, 103], _e = [1, 104], ve = [1, 105], G = [1, 106], ye = [2, 79], K = [2, 78], be = [
51
+ 4,
52
+ 5,
53
+ 17,
54
+ 51,
55
+ 53,
56
+ 54
57
+ ], xe = [
58
+ 4,
59
+ 5,
60
+ 10,
61
+ 14,
62
+ 15,
63
+ 17,
64
+ 19,
65
+ 22,
66
+ 24,
67
+ 30,
68
+ 31,
69
+ 32,
70
+ 34,
71
+ 36,
72
+ 37,
73
+ 38,
74
+ 39,
75
+ 40,
76
+ 42,
77
+ 44,
78
+ 45,
79
+ 47,
80
+ 51,
81
+ 53,
82
+ 54,
83
+ 56,
84
+ 61,
85
+ 62,
86
+ 63,
87
+ 64,
88
+ 73
89
+ ], Se = [
90
+ 4,
91
+ 5,
92
+ 10,
93
+ 14,
94
+ 15,
95
+ 17,
96
+ 19,
97
+ 22,
98
+ 24,
99
+ 30,
100
+ 31,
101
+ 32,
102
+ 34,
103
+ 36,
104
+ 37,
105
+ 38,
106
+ 39,
107
+ 40,
108
+ 42,
109
+ 44,
110
+ 45,
111
+ 47,
112
+ 50,
113
+ 51,
114
+ 53,
115
+ 54,
116
+ 56,
117
+ 61,
118
+ 62,
119
+ 63,
120
+ 64,
121
+ 73
122
+ ], Ce = [
123
+ 4,
124
+ 5,
125
+ 10,
126
+ 14,
127
+ 15,
128
+ 17,
129
+ 19,
130
+ 22,
131
+ 24,
132
+ 30,
133
+ 31,
134
+ 32,
135
+ 34,
136
+ 36,
137
+ 37,
138
+ 38,
139
+ 39,
140
+ 40,
141
+ 42,
142
+ 44,
143
+ 45,
144
+ 47,
145
+ 49,
146
+ 51,
147
+ 53,
148
+ 54,
149
+ 56,
150
+ 61,
151
+ 62,
152
+ 63,
153
+ 64,
154
+ 73
155
+ ], we = [
156
+ 4,
157
+ 5,
158
+ 10,
159
+ 14,
160
+ 15,
161
+ 17,
162
+ 19,
163
+ 22,
164
+ 24,
165
+ 30,
166
+ 31,
167
+ 32,
168
+ 34,
169
+ 36,
170
+ 37,
171
+ 38,
172
+ 39,
173
+ 40,
174
+ 42,
175
+ 44,
176
+ 45,
177
+ 47,
178
+ 48,
179
+ 51,
180
+ 53,
181
+ 54,
182
+ 56,
183
+ 61,
184
+ 62,
185
+ 63,
186
+ 64,
187
+ 73
188
+ ], Te = [5, 52], q = [
189
+ 62,
190
+ 70,
191
+ 71,
192
+ 72,
193
+ 73
194
+ ], Ee = [62, 73], J = [1, 152], De = {
195
+ trace: /* @__PURE__ */ n(function() {}, "trace"),
196
+ yy: {},
197
+ symbols_: {
198
+ error: 2,
199
+ start: 3,
200
+ SPACE: 4,
201
+ NEWLINE: 5,
202
+ SD: 6,
203
+ document: 7,
204
+ line: 8,
205
+ statement: 9,
206
+ INVALID: 10,
207
+ box_section: 11,
208
+ box_line: 12,
209
+ participant_statement: 13,
210
+ create: 14,
211
+ box: 15,
212
+ restOfLine: 16,
213
+ end: 17,
214
+ signal: 18,
215
+ autonumber: 19,
216
+ NUM: 20,
217
+ off: 21,
218
+ activate: 22,
219
+ actor: 23,
220
+ deactivate: 24,
221
+ note_statement: 25,
222
+ links_statement: 26,
223
+ link_statement: 27,
224
+ properties_statement: 28,
225
+ details_statement: 29,
226
+ title: 30,
227
+ legacy_title: 31,
228
+ acc_title: 32,
229
+ acc_title_value: 33,
230
+ acc_descr: 34,
231
+ acc_descr_value: 35,
232
+ acc_descr_multiline_value: 36,
233
+ loop: 37,
234
+ rect: 38,
235
+ opt: 39,
236
+ alt: 40,
237
+ else_sections: 41,
238
+ par: 42,
239
+ par_sections: 43,
240
+ par_over: 44,
241
+ critical: 45,
242
+ option_sections: 46,
243
+ break: 47,
244
+ option: 48,
245
+ and: 49,
246
+ else: 50,
247
+ participant: 51,
248
+ AS: 52,
249
+ participant_actor: 53,
250
+ destroy: 54,
251
+ actor_with_config: 55,
252
+ note: 56,
253
+ placement: 57,
254
+ text2: 58,
255
+ over: 59,
256
+ actor_pair: 60,
257
+ links: 61,
258
+ link: 62,
259
+ properties: 63,
260
+ details: 64,
261
+ spaceList: 65,
262
+ ",": 66,
263
+ left_of: 67,
264
+ right_of: 68,
265
+ signaltype: 69,
266
+ "+": 70,
267
+ "-": 71,
268
+ "()": 72,
269
+ ACTOR: 73,
270
+ config_object: 74,
271
+ CONFIG_START: 75,
272
+ CONFIG_CONTENT: 76,
273
+ CONFIG_END: 77,
274
+ SOLID_OPEN_ARROW: 78,
275
+ DOTTED_OPEN_ARROW: 79,
276
+ SOLID_ARROW: 80,
277
+ SOLID_ARROW_TOP: 81,
278
+ SOLID_ARROW_BOTTOM: 82,
279
+ STICK_ARROW_TOP: 83,
280
+ STICK_ARROW_BOTTOM: 84,
281
+ SOLID_ARROW_TOP_DOTTED: 85,
282
+ SOLID_ARROW_BOTTOM_DOTTED: 86,
283
+ STICK_ARROW_TOP_DOTTED: 87,
284
+ STICK_ARROW_BOTTOM_DOTTED: 88,
285
+ SOLID_ARROW_TOP_REVERSE: 89,
286
+ SOLID_ARROW_BOTTOM_REVERSE: 90,
287
+ STICK_ARROW_TOP_REVERSE: 91,
288
+ STICK_ARROW_BOTTOM_REVERSE: 92,
289
+ SOLID_ARROW_TOP_REVERSE_DOTTED: 93,
290
+ SOLID_ARROW_BOTTOM_REVERSE_DOTTED: 94,
291
+ STICK_ARROW_TOP_REVERSE_DOTTED: 95,
292
+ STICK_ARROW_BOTTOM_REVERSE_DOTTED: 96,
293
+ BIDIRECTIONAL_SOLID_ARROW: 97,
294
+ DOTTED_ARROW: 98,
295
+ BIDIRECTIONAL_DOTTED_ARROW: 99,
296
+ SOLID_CROSS: 100,
297
+ DOTTED_CROSS: 101,
298
+ SOLID_POINT: 102,
299
+ DOTTED_POINT: 103,
300
+ TXT: 104,
301
+ $accept: 0,
302
+ $end: 1
303
+ },
304
+ terminals_: {
305
+ 2: "error",
306
+ 4: "SPACE",
307
+ 5: "NEWLINE",
308
+ 6: "SD",
309
+ 10: "INVALID",
310
+ 14: "create",
311
+ 15: "box",
312
+ 16: "restOfLine",
313
+ 17: "end",
314
+ 19: "autonumber",
315
+ 20: "NUM",
316
+ 21: "off",
317
+ 22: "activate",
318
+ 24: "deactivate",
319
+ 30: "title",
320
+ 31: "legacy_title",
321
+ 32: "acc_title",
322
+ 33: "acc_title_value",
323
+ 34: "acc_descr",
324
+ 35: "acc_descr_value",
325
+ 36: "acc_descr_multiline_value",
326
+ 37: "loop",
327
+ 38: "rect",
328
+ 39: "opt",
329
+ 40: "alt",
330
+ 42: "par",
331
+ 44: "par_over",
332
+ 45: "critical",
333
+ 47: "break",
334
+ 48: "option",
335
+ 49: "and",
336
+ 50: "else",
337
+ 51: "participant",
338
+ 52: "AS",
339
+ 53: "participant_actor",
340
+ 54: "destroy",
341
+ 56: "note",
342
+ 59: "over",
343
+ 61: "links",
344
+ 62: "link",
345
+ 63: "properties",
346
+ 64: "details",
347
+ 66: ",",
348
+ 67: "left_of",
349
+ 68: "right_of",
350
+ 70: "+",
351
+ 71: "-",
352
+ 72: "()",
353
+ 73: "ACTOR",
354
+ 75: "CONFIG_START",
355
+ 76: "CONFIG_CONTENT",
356
+ 77: "CONFIG_END",
357
+ 78: "SOLID_OPEN_ARROW",
358
+ 79: "DOTTED_OPEN_ARROW",
359
+ 80: "SOLID_ARROW",
360
+ 81: "SOLID_ARROW_TOP",
361
+ 82: "SOLID_ARROW_BOTTOM",
362
+ 83: "STICK_ARROW_TOP",
363
+ 84: "STICK_ARROW_BOTTOM",
364
+ 85: "SOLID_ARROW_TOP_DOTTED",
365
+ 86: "SOLID_ARROW_BOTTOM_DOTTED",
366
+ 87: "STICK_ARROW_TOP_DOTTED",
367
+ 88: "STICK_ARROW_BOTTOM_DOTTED",
368
+ 89: "SOLID_ARROW_TOP_REVERSE",
369
+ 90: "SOLID_ARROW_BOTTOM_REVERSE",
370
+ 91: "STICK_ARROW_TOP_REVERSE",
371
+ 92: "STICK_ARROW_BOTTOM_REVERSE",
372
+ 93: "SOLID_ARROW_TOP_REVERSE_DOTTED",
373
+ 94: "SOLID_ARROW_BOTTOM_REVERSE_DOTTED",
374
+ 95: "STICK_ARROW_TOP_REVERSE_DOTTED",
375
+ 96: "STICK_ARROW_BOTTOM_REVERSE_DOTTED",
376
+ 97: "BIDIRECTIONAL_SOLID_ARROW",
377
+ 98: "DOTTED_ARROW",
378
+ 99: "BIDIRECTIONAL_DOTTED_ARROW",
379
+ 100: "SOLID_CROSS",
380
+ 101: "DOTTED_CROSS",
381
+ 102: "SOLID_POINT",
382
+ 103: "DOTTED_POINT",
383
+ 104: "TXT"
384
+ },
385
+ productions_: [
386
+ 0,
387
+ [3, 2],
388
+ [3, 2],
389
+ [3, 2],
390
+ [7, 0],
391
+ [7, 2],
392
+ [8, 2],
393
+ [8, 1],
394
+ [8, 1],
395
+ [8, 1],
396
+ [11, 0],
397
+ [11, 2],
398
+ [12, 2],
399
+ [12, 1],
400
+ [12, 1],
401
+ [9, 1],
402
+ [9, 2],
403
+ [9, 4],
404
+ [9, 2],
405
+ [9, 4],
406
+ [9, 3],
407
+ [9, 3],
408
+ [9, 2],
409
+ [9, 3],
410
+ [9, 3],
411
+ [9, 2],
412
+ [9, 2],
413
+ [9, 2],
414
+ [9, 2],
415
+ [9, 2],
416
+ [9, 1],
417
+ [9, 1],
418
+ [9, 2],
419
+ [9, 2],
420
+ [9, 1],
421
+ [9, 4],
422
+ [9, 4],
423
+ [9, 4],
424
+ [9, 4],
425
+ [9, 4],
426
+ [9, 4],
427
+ [9, 4],
428
+ [9, 4],
429
+ [46, 1],
430
+ [46, 4],
431
+ [43, 1],
432
+ [43, 4],
433
+ [41, 1],
434
+ [41, 4],
435
+ [13, 5],
436
+ [13, 3],
437
+ [13, 5],
438
+ [13, 3],
439
+ [13, 3],
440
+ [13, 5],
441
+ [13, 3],
442
+ [13, 5],
443
+ [13, 3],
444
+ [25, 4],
445
+ [25, 4],
446
+ [26, 3],
447
+ [27, 3],
448
+ [28, 3],
449
+ [29, 3],
450
+ [65, 2],
451
+ [65, 1],
452
+ [60, 3],
453
+ [60, 1],
454
+ [57, 1],
455
+ [57, 1],
456
+ [18, 5],
457
+ [18, 5],
458
+ [18, 5],
459
+ [18, 5],
460
+ [18, 6],
461
+ [18, 4],
462
+ [55, 2],
463
+ [74, 3],
464
+ [23, 1],
465
+ [23, 1],
466
+ [69, 1],
467
+ [69, 1],
468
+ [69, 1],
469
+ [69, 1],
470
+ [69, 1],
471
+ [69, 1],
472
+ [69, 1],
473
+ [69, 1],
474
+ [69, 1],
475
+ [69, 1],
476
+ [69, 1],
477
+ [69, 1],
478
+ [69, 1],
479
+ [69, 1],
480
+ [69, 1],
481
+ [69, 1],
482
+ [69, 1],
483
+ [69, 1],
484
+ [69, 1],
485
+ [69, 1],
486
+ [69, 1],
487
+ [69, 1],
488
+ [69, 1],
489
+ [69, 1],
490
+ [69, 1],
491
+ [69, 1],
492
+ [58, 1]
493
+ ],
494
+ performAction: /* @__PURE__ */ n(function(e, t, n, r, i, a, o) {
495
+ var s = a.length - 1;
496
+ switch (i) {
497
+ case 3: return r.apply(a[s]), a[s];
498
+ case 4:
499
+ case 10:
500
+ this.$ = [];
501
+ break;
502
+ case 5:
503
+ case 11:
504
+ a[s - 1].push(a[s]), this.$ = a[s - 1];
505
+ break;
506
+ case 6:
507
+ case 7:
508
+ case 12:
509
+ case 13:
510
+ this.$ = a[s];
511
+ break;
512
+ case 8:
513
+ case 9:
514
+ case 14:
515
+ this.$ = [];
516
+ break;
517
+ case 16:
518
+ a[s].type = "createParticipant", this.$ = a[s];
519
+ break;
520
+ case 17:
521
+ a[s - 1].unshift({
522
+ type: "boxStart",
523
+ boxData: r.parseBoxData(a[s - 2])
524
+ }), a[s - 1].push({
525
+ type: "boxEnd",
526
+ boxText: a[s - 2]
527
+ }), this.$ = a[s - 1];
528
+ break;
529
+ case 19:
530
+ this.$ = {
531
+ type: "sequenceIndex",
532
+ sequenceIndex: Number(a[s - 2]),
533
+ sequenceIndexStep: Number(a[s - 1]),
534
+ sequenceVisible: !0,
535
+ signalType: r.LINETYPE.AUTONUMBER
536
+ };
537
+ break;
538
+ case 20:
539
+ this.$ = {
540
+ type: "sequenceIndex",
541
+ sequenceIndex: Number(a[s - 1]),
542
+ sequenceIndexStep: 1,
543
+ sequenceVisible: !0,
544
+ signalType: r.LINETYPE.AUTONUMBER
545
+ };
546
+ break;
547
+ case 21:
548
+ this.$ = {
549
+ type: "sequenceIndex",
550
+ sequenceVisible: !1,
551
+ signalType: r.LINETYPE.AUTONUMBER
552
+ };
553
+ break;
554
+ case 22:
555
+ this.$ = {
556
+ type: "sequenceIndex",
557
+ sequenceVisible: !0,
558
+ signalType: r.LINETYPE.AUTONUMBER
559
+ };
560
+ break;
561
+ case 23:
562
+ this.$ = {
563
+ type: "activeStart",
564
+ signalType: r.LINETYPE.ACTIVE_START,
565
+ actor: a[s - 1].actor
566
+ };
567
+ break;
568
+ case 24:
569
+ this.$ = {
570
+ type: "activeEnd",
571
+ signalType: r.LINETYPE.ACTIVE_END,
572
+ actor: a[s - 1].actor
573
+ };
574
+ break;
575
+ case 30:
576
+ r.setDiagramTitle(a[s].substring(6)), this.$ = a[s].substring(6);
577
+ break;
578
+ case 31:
579
+ r.setDiagramTitle(a[s].substring(7)), this.$ = a[s].substring(7);
580
+ break;
581
+ case 32:
582
+ this.$ = a[s].trim(), r.setAccTitle(this.$);
583
+ break;
584
+ case 33:
585
+ case 34:
586
+ this.$ = a[s].trim(), r.setAccDescription(this.$);
587
+ break;
588
+ case 35:
589
+ a[s - 1].unshift({
590
+ type: "loopStart",
591
+ loopText: r.parseMessage(a[s - 2]),
592
+ signalType: r.LINETYPE.LOOP_START
593
+ }), a[s - 1].push({
594
+ type: "loopEnd",
595
+ loopText: a[s - 2],
596
+ signalType: r.LINETYPE.LOOP_END
597
+ }), this.$ = a[s - 1];
598
+ break;
599
+ case 36:
600
+ a[s - 1].unshift({
601
+ type: "rectStart",
602
+ color: r.parseMessage(a[s - 2]),
603
+ signalType: r.LINETYPE.RECT_START
604
+ }), a[s - 1].push({
605
+ type: "rectEnd",
606
+ color: r.parseMessage(a[s - 2]),
607
+ signalType: r.LINETYPE.RECT_END
608
+ }), this.$ = a[s - 1];
609
+ break;
610
+ case 37:
611
+ a[s - 1].unshift({
612
+ type: "optStart",
613
+ optText: r.parseMessage(a[s - 2]),
614
+ signalType: r.LINETYPE.OPT_START
615
+ }), a[s - 1].push({
616
+ type: "optEnd",
617
+ optText: r.parseMessage(a[s - 2]),
618
+ signalType: r.LINETYPE.OPT_END
619
+ }), this.$ = a[s - 1];
620
+ break;
621
+ case 38:
622
+ a[s - 1].unshift({
623
+ type: "altStart",
624
+ altText: r.parseMessage(a[s - 2]),
625
+ signalType: r.LINETYPE.ALT_START
626
+ }), a[s - 1].push({
627
+ type: "altEnd",
628
+ signalType: r.LINETYPE.ALT_END
629
+ }), this.$ = a[s - 1];
630
+ break;
631
+ case 39:
632
+ a[s - 1].unshift({
633
+ type: "parStart",
634
+ parText: r.parseMessage(a[s - 2]),
635
+ signalType: r.LINETYPE.PAR_START
636
+ }), a[s - 1].push({
637
+ type: "parEnd",
638
+ signalType: r.LINETYPE.PAR_END
639
+ }), this.$ = a[s - 1];
640
+ break;
641
+ case 40:
642
+ a[s - 1].unshift({
643
+ type: "parStart",
644
+ parText: r.parseMessage(a[s - 2]),
645
+ signalType: r.LINETYPE.PAR_OVER_START
646
+ }), a[s - 1].push({
647
+ type: "parEnd",
648
+ signalType: r.LINETYPE.PAR_END
649
+ }), this.$ = a[s - 1];
650
+ break;
651
+ case 41:
652
+ a[s - 1].unshift({
653
+ type: "criticalStart",
654
+ criticalText: r.parseMessage(a[s - 2]),
655
+ signalType: r.LINETYPE.CRITICAL_START
656
+ }), a[s - 1].push({
657
+ type: "criticalEnd",
658
+ signalType: r.LINETYPE.CRITICAL_END
659
+ }), this.$ = a[s - 1];
660
+ break;
661
+ case 42:
662
+ a[s - 1].unshift({
663
+ type: "breakStart",
664
+ breakText: r.parseMessage(a[s - 2]),
665
+ signalType: r.LINETYPE.BREAK_START
666
+ }), a[s - 1].push({
667
+ type: "breakEnd",
668
+ optText: r.parseMessage(a[s - 2]),
669
+ signalType: r.LINETYPE.BREAK_END
670
+ }), this.$ = a[s - 1];
671
+ break;
672
+ case 44:
673
+ this.$ = a[s - 3].concat([{
674
+ type: "option",
675
+ optionText: r.parseMessage(a[s - 1]),
676
+ signalType: r.LINETYPE.CRITICAL_OPTION
677
+ }, a[s]]);
678
+ break;
679
+ case 46:
680
+ this.$ = a[s - 3].concat([{
681
+ type: "and",
682
+ parText: r.parseMessage(a[s - 1]),
683
+ signalType: r.LINETYPE.PAR_AND
684
+ }, a[s]]);
685
+ break;
686
+ case 48:
687
+ this.$ = a[s - 3].concat([{
688
+ type: "else",
689
+ altText: r.parseMessage(a[s - 1]),
690
+ signalType: r.LINETYPE.ALT_ELSE
691
+ }, a[s]]);
692
+ break;
693
+ case 49:
694
+ a[s - 3].draw = "participant", a[s - 3].type = "addParticipant", a[s - 3].description = r.parseMessage(a[s - 1]), this.$ = a[s - 3];
695
+ break;
696
+ case 50:
697
+ a[s - 1].draw = "participant", a[s - 1].type = "addParticipant", this.$ = a[s - 1];
698
+ break;
699
+ case 51:
700
+ a[s - 3].draw = "actor", a[s - 3].type = "addParticipant", a[s - 3].description = r.parseMessage(a[s - 1]), this.$ = a[s - 3];
701
+ break;
702
+ case 52:
703
+ case 57:
704
+ a[s - 1].draw = "actor", a[s - 1].type = "addParticipant", this.$ = a[s - 1];
705
+ break;
706
+ case 53:
707
+ a[s - 1].type = "destroyParticipant", this.$ = a[s - 1];
708
+ break;
709
+ case 54:
710
+ a[s - 3].draw = "participant", a[s - 3].type = "addParticipant", a[s - 3].description = r.parseMessage(a[s - 1]), this.$ = a[s - 3];
711
+ break;
712
+ case 55:
713
+ a[s - 1].draw = "participant", a[s - 1].type = "addParticipant", this.$ = a[s - 1];
714
+ break;
715
+ case 56:
716
+ a[s - 3].draw = "actor", a[s - 3].type = "addParticipant", a[s - 3].description = r.parseMessage(a[s - 1]), this.$ = a[s - 3];
717
+ break;
718
+ case 58:
719
+ this.$ = [a[s - 1], {
720
+ type: "addNote",
721
+ placement: a[s - 2],
722
+ actor: a[s - 1].actor,
723
+ text: a[s]
724
+ }];
725
+ break;
726
+ case 59:
727
+ a[s - 2] = [].concat(a[s - 1], a[s - 1]).slice(0, 2), a[s - 2][0] = a[s - 2][0].actor, a[s - 2][1] = a[s - 2][1].actor, this.$ = [a[s - 1], {
728
+ type: "addNote",
729
+ placement: r.PLACEMENT.OVER,
730
+ actor: a[s - 2].slice(0, 2),
731
+ text: a[s]
732
+ }];
733
+ break;
734
+ case 60:
735
+ this.$ = [a[s - 1], {
736
+ type: "addLinks",
737
+ actor: a[s - 1].actor,
738
+ text: a[s]
739
+ }];
740
+ break;
741
+ case 61:
742
+ this.$ = [a[s - 1], {
743
+ type: "addALink",
744
+ actor: a[s - 1].actor,
745
+ text: a[s]
746
+ }];
747
+ break;
748
+ case 62:
749
+ this.$ = [a[s - 1], {
750
+ type: "addProperties",
751
+ actor: a[s - 1].actor,
752
+ text: a[s]
753
+ }];
754
+ break;
755
+ case 63:
756
+ this.$ = [a[s - 1], {
757
+ type: "addDetails",
758
+ actor: a[s - 1].actor,
759
+ text: a[s]
760
+ }];
761
+ break;
762
+ case 66:
763
+ this.$ = [a[s - 2], a[s]];
764
+ break;
765
+ case 67:
766
+ this.$ = a[s];
767
+ break;
768
+ case 68:
769
+ this.$ = r.PLACEMENT.LEFTOF;
770
+ break;
771
+ case 69:
772
+ this.$ = r.PLACEMENT.RIGHTOF;
773
+ break;
774
+ case 70:
775
+ this.$ = [
776
+ a[s - 4],
777
+ a[s - 1],
778
+ {
779
+ type: "addMessage",
780
+ from: a[s - 4].actor,
781
+ to: a[s - 1].actor,
782
+ signalType: a[s - 3],
783
+ msg: a[s],
784
+ activate: !0
785
+ },
786
+ {
787
+ type: "activeStart",
788
+ signalType: r.LINETYPE.ACTIVE_START,
789
+ actor: a[s - 1].actor
790
+ }
791
+ ];
792
+ break;
793
+ case 71:
794
+ this.$ = [
795
+ a[s - 4],
796
+ a[s - 1],
797
+ {
798
+ type: "addMessage",
799
+ from: a[s - 4].actor,
800
+ to: a[s - 1].actor,
801
+ signalType: a[s - 3],
802
+ msg: a[s]
803
+ },
804
+ {
805
+ type: "activeEnd",
806
+ signalType: r.LINETYPE.ACTIVE_END,
807
+ actor: a[s - 4].actor
808
+ }
809
+ ];
810
+ break;
811
+ case 72:
812
+ this.$ = [
813
+ a[s - 4],
814
+ a[s - 1],
815
+ {
816
+ type: "addMessage",
817
+ from: a[s - 4].actor,
818
+ to: a[s - 1].actor,
819
+ signalType: a[s - 3],
820
+ msg: a[s],
821
+ activate: !0,
822
+ centralConnection: r.LINETYPE.CENTRAL_CONNECTION
823
+ },
824
+ {
825
+ type: "centralConnection",
826
+ signalType: r.LINETYPE.CENTRAL_CONNECTION,
827
+ actor: a[s - 1].actor
828
+ }
829
+ ];
830
+ break;
831
+ case 73:
832
+ this.$ = [
833
+ a[s - 4],
834
+ a[s - 1],
835
+ {
836
+ type: "addMessage",
837
+ from: a[s - 4].actor,
838
+ to: a[s - 1].actor,
839
+ signalType: a[s - 2],
840
+ msg: a[s],
841
+ activate: !1,
842
+ centralConnection: r.LINETYPE.CENTRAL_CONNECTION_REVERSE
843
+ },
844
+ {
845
+ type: "centralConnectionReverse",
846
+ signalType: r.LINETYPE.CENTRAL_CONNECTION_REVERSE,
847
+ actor: a[s - 4].actor
848
+ }
849
+ ];
850
+ break;
851
+ case 74:
852
+ this.$ = [
853
+ a[s - 5],
854
+ a[s - 1],
855
+ {
856
+ type: "addMessage",
857
+ from: a[s - 5].actor,
858
+ to: a[s - 1].actor,
859
+ signalType: a[s - 3],
860
+ msg: a[s],
861
+ activate: !0,
862
+ centralConnection: r.LINETYPE.CENTRAL_CONNECTION_DUAL
863
+ },
864
+ {
865
+ type: "centralConnection",
866
+ signalType: r.LINETYPE.CENTRAL_CONNECTION,
867
+ actor: a[s - 1].actor
868
+ },
869
+ {
870
+ type: "centralConnectionReverse",
871
+ signalType: r.LINETYPE.CENTRAL_CONNECTION_REVERSE,
872
+ actor: a[s - 5].actor
873
+ }
874
+ ];
875
+ break;
876
+ case 75:
877
+ this.$ = [
878
+ a[s - 3],
879
+ a[s - 1],
880
+ {
881
+ type: "addMessage",
882
+ from: a[s - 3].actor,
883
+ to: a[s - 1].actor,
884
+ signalType: a[s - 2],
885
+ msg: a[s]
886
+ }
887
+ ];
888
+ break;
889
+ case 76:
890
+ this.$ = {
891
+ type: "addParticipant",
892
+ actor: a[s - 1],
893
+ config: a[s]
894
+ };
895
+ break;
896
+ case 77:
897
+ this.$ = a[s - 1].trim();
898
+ break;
899
+ case 78:
900
+ case 79:
901
+ this.$ = {
902
+ type: "addParticipant",
903
+ actor: a[s]
904
+ };
905
+ break;
906
+ case 80:
907
+ this.$ = r.LINETYPE.SOLID_OPEN;
908
+ break;
909
+ case 81:
910
+ this.$ = r.LINETYPE.DOTTED_OPEN;
911
+ break;
912
+ case 82:
913
+ this.$ = r.LINETYPE.SOLID;
914
+ break;
915
+ case 83:
916
+ this.$ = r.LINETYPE.SOLID_TOP;
917
+ break;
918
+ case 84:
919
+ this.$ = r.LINETYPE.SOLID_BOTTOM;
920
+ break;
921
+ case 85:
922
+ this.$ = r.LINETYPE.STICK_TOP;
923
+ break;
924
+ case 86:
925
+ this.$ = r.LINETYPE.STICK_BOTTOM;
926
+ break;
927
+ case 87:
928
+ this.$ = r.LINETYPE.SOLID_TOP_DOTTED;
929
+ break;
930
+ case 88:
931
+ this.$ = r.LINETYPE.SOLID_BOTTOM_DOTTED;
932
+ break;
933
+ case 89:
934
+ this.$ = r.LINETYPE.STICK_TOP_DOTTED;
935
+ break;
936
+ case 90:
937
+ this.$ = r.LINETYPE.STICK_BOTTOM_DOTTED;
938
+ break;
939
+ case 91:
940
+ this.$ = r.LINETYPE.SOLID_ARROW_TOP_REVERSE;
941
+ break;
942
+ case 92:
943
+ this.$ = r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;
944
+ break;
945
+ case 93:
946
+ this.$ = r.LINETYPE.STICK_ARROW_TOP_REVERSE;
947
+ break;
948
+ case 94:
949
+ this.$ = r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;
950
+ break;
951
+ case 95:
952
+ this.$ = r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;
953
+ break;
954
+ case 96:
955
+ this.$ = r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;
956
+ break;
957
+ case 97:
958
+ this.$ = r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;
959
+ break;
960
+ case 98:
961
+ this.$ = r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;
962
+ break;
963
+ case 99:
964
+ this.$ = r.LINETYPE.BIDIRECTIONAL_SOLID;
965
+ break;
966
+ case 100:
967
+ this.$ = r.LINETYPE.DOTTED;
968
+ break;
969
+ case 101:
970
+ this.$ = r.LINETYPE.BIDIRECTIONAL_DOTTED;
971
+ break;
972
+ case 102:
973
+ this.$ = r.LINETYPE.SOLID_CROSS;
974
+ break;
975
+ case 103:
976
+ this.$ = r.LINETYPE.DOTTED_CROSS;
977
+ break;
978
+ case 104:
979
+ this.$ = r.LINETYPE.SOLID_POINT;
980
+ break;
981
+ case 105:
982
+ this.$ = r.LINETYPE.DOTTED_POINT;
983
+ break;
984
+ case 106:
985
+ this.$ = r.parseMessage(a[s].trim().substring(1));
986
+ break;
987
+ }
988
+ }, "anonymous"),
989
+ table: [
990
+ {
991
+ 3: 1,
992
+ 4: t,
993
+ 5: r,
994
+ 6: i
995
+ },
996
+ { 1: [3] },
997
+ {
998
+ 3: 5,
999
+ 4: t,
1000
+ 5: r,
1001
+ 6: i
1002
+ },
1003
+ {
1004
+ 3: 6,
1005
+ 4: t,
1006
+ 5: r,
1007
+ 6: i
1008
+ },
1009
+ e([
1010
+ 1,
1011
+ 4,
1012
+ 5,
1013
+ 10,
1014
+ 14,
1015
+ 15,
1016
+ 19,
1017
+ 22,
1018
+ 24,
1019
+ 30,
1020
+ 31,
1021
+ 32,
1022
+ 34,
1023
+ 36,
1024
+ 37,
1025
+ 38,
1026
+ 39,
1027
+ 40,
1028
+ 42,
1029
+ 44,
1030
+ 45,
1031
+ 47,
1032
+ 51,
1033
+ 53,
1034
+ 54,
1035
+ 56,
1036
+ 61,
1037
+ 62,
1038
+ 63,
1039
+ 64,
1040
+ 73
1041
+ ], a, { 7: 7 }),
1042
+ { 1: [2, 1] },
1043
+ { 1: [2, 2] },
1044
+ {
1045
+ 1: [2, 3],
1046
+ 4: o,
1047
+ 5: s,
1048
+ 8: 8,
1049
+ 9: 10,
1050
+ 10: c,
1051
+ 13: 13,
1052
+ 14: l,
1053
+ 15: u,
1054
+ 18: 16,
1055
+ 19: d,
1056
+ 22: f,
1057
+ 23: 41,
1058
+ 24: p,
1059
+ 25: 20,
1060
+ 26: 21,
1061
+ 27: 22,
1062
+ 28: 23,
1063
+ 29: 24,
1064
+ 30: m,
1065
+ 31: h,
1066
+ 32: g,
1067
+ 34: _,
1068
+ 36: v,
1069
+ 37: y,
1070
+ 38: b,
1071
+ 39: x,
1072
+ 40: S,
1073
+ 42: C,
1074
+ 44: w,
1075
+ 45: T,
1076
+ 47: E,
1077
+ 51: D,
1078
+ 53: O,
1079
+ 54: k,
1080
+ 56: A,
1081
+ 61: j,
1082
+ 62: M,
1083
+ 63: N,
1084
+ 64: P,
1085
+ 73: F
1086
+ },
1087
+ e(I, [2, 5]),
1088
+ {
1089
+ 9: 48,
1090
+ 13: 13,
1091
+ 14: l,
1092
+ 15: u,
1093
+ 18: 16,
1094
+ 19: d,
1095
+ 22: f,
1096
+ 23: 41,
1097
+ 24: p,
1098
+ 25: 20,
1099
+ 26: 21,
1100
+ 27: 22,
1101
+ 28: 23,
1102
+ 29: 24,
1103
+ 30: m,
1104
+ 31: h,
1105
+ 32: g,
1106
+ 34: _,
1107
+ 36: v,
1108
+ 37: y,
1109
+ 38: b,
1110
+ 39: x,
1111
+ 40: S,
1112
+ 42: C,
1113
+ 44: w,
1114
+ 45: T,
1115
+ 47: E,
1116
+ 51: D,
1117
+ 53: O,
1118
+ 54: k,
1119
+ 56: A,
1120
+ 61: j,
1121
+ 62: M,
1122
+ 63: N,
1123
+ 64: P,
1124
+ 73: F
1125
+ },
1126
+ e(I, [2, 7]),
1127
+ e(I, [2, 8]),
1128
+ e(I, [2, 9]),
1129
+ e(I, [2, 15]),
1130
+ {
1131
+ 13: 49,
1132
+ 51: D,
1133
+ 53: O,
1134
+ 54: k
1135
+ },
1136
+ { 16: [1, 50] },
1137
+ { 5: [1, 51] },
1138
+ {
1139
+ 5: [1, 54],
1140
+ 20: [1, 52],
1141
+ 21: [1, 53]
1142
+ },
1143
+ {
1144
+ 23: 55,
1145
+ 62: L,
1146
+ 73: F
1147
+ },
1148
+ {
1149
+ 23: 57,
1150
+ 62: L,
1151
+ 73: F
1152
+ },
1153
+ { 5: [1, 58] },
1154
+ { 5: [1, 59] },
1155
+ { 5: [1, 60] },
1156
+ { 5: [1, 61] },
1157
+ { 5: [1, 62] },
1158
+ e(I, [2, 30]),
1159
+ e(I, [2, 31]),
1160
+ { 33: [1, 63] },
1161
+ { 35: [1, 64] },
1162
+ e(I, [2, 34]),
1163
+ { 16: [1, 65] },
1164
+ { 16: [1, 66] },
1165
+ { 16: [1, 67] },
1166
+ { 16: [1, 68] },
1167
+ { 16: [1, 69] },
1168
+ { 16: [1, 70] },
1169
+ { 16: [1, 71] },
1170
+ { 16: [1, 72] },
1171
+ {
1172
+ 23: 73,
1173
+ 55: 74,
1174
+ 62: L,
1175
+ 73: ee
1176
+ },
1177
+ {
1178
+ 23: 76,
1179
+ 55: 77,
1180
+ 62: L,
1181
+ 73: ee
1182
+ },
1183
+ {
1184
+ 23: 78,
1185
+ 62: L,
1186
+ 73: F
1187
+ },
1188
+ {
1189
+ 69: 79,
1190
+ 72: [1, 80],
1191
+ 78: R,
1192
+ 79: te,
1193
+ 80: ne,
1194
+ 81: re,
1195
+ 82: ie,
1196
+ 83: ae,
1197
+ 84: oe,
1198
+ 85: se,
1199
+ 86: ce,
1200
+ 87: le,
1201
+ 88: z,
1202
+ 89: ue,
1203
+ 90: de,
1204
+ 91: fe,
1205
+ 92: pe,
1206
+ 93: B,
1207
+ 94: V,
1208
+ 95: me,
1209
+ 96: H,
1210
+ 97: U,
1211
+ 98: W,
1212
+ 99: he,
1213
+ 100: ge,
1214
+ 101: _e,
1215
+ 102: ve,
1216
+ 103: G
1217
+ },
1218
+ {
1219
+ 57: 107,
1220
+ 59: [1, 108],
1221
+ 67: [1, 109],
1222
+ 68: [1, 110]
1223
+ },
1224
+ {
1225
+ 23: 111,
1226
+ 62: L,
1227
+ 73: F
1228
+ },
1229
+ e([
1230
+ 72,
1231
+ 78,
1232
+ 79,
1233
+ 80,
1234
+ 81,
1235
+ 82,
1236
+ 83,
1237
+ 84,
1238
+ 85,
1239
+ 86,
1240
+ 87,
1241
+ 88,
1242
+ 89,
1243
+ 90,
1244
+ 91,
1245
+ 92,
1246
+ 93,
1247
+ 94,
1248
+ 95,
1249
+ 96,
1250
+ 97,
1251
+ 98,
1252
+ 99,
1253
+ 100,
1254
+ 101,
1255
+ 102,
1256
+ 103
1257
+ ], ye, {
1258
+ 23: 112,
1259
+ 62: L,
1260
+ 73: F
1261
+ }),
1262
+ {
1263
+ 23: 113,
1264
+ 62: L,
1265
+ 73: F
1266
+ },
1267
+ {
1268
+ 23: 114,
1269
+ 62: L,
1270
+ 73: F
1271
+ },
1272
+ e([
1273
+ 5,
1274
+ 66,
1275
+ 72,
1276
+ 78,
1277
+ 79,
1278
+ 80,
1279
+ 81,
1280
+ 82,
1281
+ 83,
1282
+ 84,
1283
+ 85,
1284
+ 86,
1285
+ 87,
1286
+ 88,
1287
+ 89,
1288
+ 90,
1289
+ 91,
1290
+ 92,
1291
+ 93,
1292
+ 94,
1293
+ 95,
1294
+ 96,
1295
+ 97,
1296
+ 98,
1297
+ 99,
1298
+ 100,
1299
+ 101,
1300
+ 102,
1301
+ 103,
1302
+ 104
1303
+ ], K),
1304
+ e(I, [2, 6]),
1305
+ e(I, [2, 16]),
1306
+ e(be, [2, 10], { 11: 115 }),
1307
+ e(I, [2, 18]),
1308
+ {
1309
+ 5: [1, 117],
1310
+ 20: [1, 116]
1311
+ },
1312
+ { 5: [1, 118] },
1313
+ e(I, [2, 22]),
1314
+ { 5: [1, 119] },
1315
+ e([
1316
+ 5,
1317
+ 52,
1318
+ 66,
1319
+ 104
1320
+ ], ye),
1321
+ { 5: [1, 120] },
1322
+ e(I, [2, 25]),
1323
+ e(I, [2, 26]),
1324
+ e(I, [2, 27]),
1325
+ e(I, [2, 28]),
1326
+ e(I, [2, 29]),
1327
+ e(I, [2, 32]),
1328
+ e(I, [2, 33]),
1329
+ e(xe, a, { 7: 121 }),
1330
+ e(xe, a, { 7: 122 }),
1331
+ e(xe, a, { 7: 123 }),
1332
+ e(Se, a, {
1333
+ 41: 124,
1334
+ 7: 125
1335
+ }),
1336
+ e(Ce, a, {
1337
+ 43: 126,
1338
+ 7: 127
1339
+ }),
1340
+ e(Ce, a, {
1341
+ 7: 127,
1342
+ 43: 128
1343
+ }),
1344
+ e(we, a, {
1345
+ 46: 129,
1346
+ 7: 130
1347
+ }),
1348
+ e(xe, a, { 7: 131 }),
1349
+ {
1350
+ 5: [1, 133],
1351
+ 52: [1, 132]
1352
+ },
1353
+ {
1354
+ 5: [1, 135],
1355
+ 52: [1, 134]
1356
+ },
1357
+ e(Te, K, {
1358
+ 74: 136,
1359
+ 75: [1, 137]
1360
+ }),
1361
+ {
1362
+ 5: [1, 139],
1363
+ 52: [1, 138]
1364
+ },
1365
+ {
1366
+ 5: [1, 141],
1367
+ 52: [1, 140]
1368
+ },
1369
+ { 5: [1, 142] },
1370
+ {
1371
+ 23: 146,
1372
+ 62: L,
1373
+ 70: [1, 143],
1374
+ 71: [1, 144],
1375
+ 72: [1, 145],
1376
+ 73: F
1377
+ },
1378
+ {
1379
+ 69: 147,
1380
+ 78: R,
1381
+ 79: te,
1382
+ 80: ne,
1383
+ 81: re,
1384
+ 82: ie,
1385
+ 83: ae,
1386
+ 84: oe,
1387
+ 85: se,
1388
+ 86: ce,
1389
+ 87: le,
1390
+ 88: z,
1391
+ 89: ue,
1392
+ 90: de,
1393
+ 91: fe,
1394
+ 92: pe,
1395
+ 93: B,
1396
+ 94: V,
1397
+ 95: me,
1398
+ 96: H,
1399
+ 97: U,
1400
+ 98: W,
1401
+ 99: he,
1402
+ 100: ge,
1403
+ 101: _e,
1404
+ 102: ve,
1405
+ 103: G
1406
+ },
1407
+ e(q, [2, 80]),
1408
+ e(q, [2, 81]),
1409
+ e(q, [2, 82]),
1410
+ e(q, [2, 83]),
1411
+ e(q, [2, 84]),
1412
+ e(q, [2, 85]),
1413
+ e(q, [2, 86]),
1414
+ e(q, [2, 87]),
1415
+ e(q, [2, 88]),
1416
+ e(q, [2, 89]),
1417
+ e(q, [2, 90]),
1418
+ e(q, [2, 91]),
1419
+ e(q, [2, 92]),
1420
+ e(q, [2, 93]),
1421
+ e(q, [2, 94]),
1422
+ e(q, [2, 95]),
1423
+ e(q, [2, 96]),
1424
+ e(q, [2, 97]),
1425
+ e(q, [2, 98]),
1426
+ e(q, [2, 99]),
1427
+ e(q, [2, 100]),
1428
+ e(q, [2, 101]),
1429
+ e(q, [2, 102]),
1430
+ e(q, [2, 103]),
1431
+ e(q, [2, 104]),
1432
+ e(q, [2, 105]),
1433
+ {
1434
+ 23: 148,
1435
+ 62: L,
1436
+ 73: F
1437
+ },
1438
+ {
1439
+ 23: 150,
1440
+ 60: 149,
1441
+ 62: L,
1442
+ 73: F
1443
+ },
1444
+ e(Ee, [2, 68]),
1445
+ e(Ee, [2, 69]),
1446
+ {
1447
+ 58: 151,
1448
+ 104: J
1449
+ },
1450
+ {
1451
+ 58: 153,
1452
+ 104: J
1453
+ },
1454
+ {
1455
+ 58: 154,
1456
+ 104: J
1457
+ },
1458
+ {
1459
+ 58: 155,
1460
+ 104: J
1461
+ },
1462
+ {
1463
+ 4: [1, 158],
1464
+ 5: [1, 160],
1465
+ 12: 157,
1466
+ 13: 159,
1467
+ 17: [1, 156],
1468
+ 51: D,
1469
+ 53: O,
1470
+ 54: k
1471
+ },
1472
+ { 5: [1, 161] },
1473
+ e(I, [2, 20]),
1474
+ e(I, [2, 21]),
1475
+ e(I, [2, 23]),
1476
+ e(I, [2, 24]),
1477
+ {
1478
+ 4: o,
1479
+ 5: s,
1480
+ 8: 8,
1481
+ 9: 10,
1482
+ 10: c,
1483
+ 13: 13,
1484
+ 14: l,
1485
+ 15: u,
1486
+ 17: [1, 162],
1487
+ 18: 16,
1488
+ 19: d,
1489
+ 22: f,
1490
+ 23: 41,
1491
+ 24: p,
1492
+ 25: 20,
1493
+ 26: 21,
1494
+ 27: 22,
1495
+ 28: 23,
1496
+ 29: 24,
1497
+ 30: m,
1498
+ 31: h,
1499
+ 32: g,
1500
+ 34: _,
1501
+ 36: v,
1502
+ 37: y,
1503
+ 38: b,
1504
+ 39: x,
1505
+ 40: S,
1506
+ 42: C,
1507
+ 44: w,
1508
+ 45: T,
1509
+ 47: E,
1510
+ 51: D,
1511
+ 53: O,
1512
+ 54: k,
1513
+ 56: A,
1514
+ 61: j,
1515
+ 62: M,
1516
+ 63: N,
1517
+ 64: P,
1518
+ 73: F
1519
+ },
1520
+ {
1521
+ 4: o,
1522
+ 5: s,
1523
+ 8: 8,
1524
+ 9: 10,
1525
+ 10: c,
1526
+ 13: 13,
1527
+ 14: l,
1528
+ 15: u,
1529
+ 17: [1, 163],
1530
+ 18: 16,
1531
+ 19: d,
1532
+ 22: f,
1533
+ 23: 41,
1534
+ 24: p,
1535
+ 25: 20,
1536
+ 26: 21,
1537
+ 27: 22,
1538
+ 28: 23,
1539
+ 29: 24,
1540
+ 30: m,
1541
+ 31: h,
1542
+ 32: g,
1543
+ 34: _,
1544
+ 36: v,
1545
+ 37: y,
1546
+ 38: b,
1547
+ 39: x,
1548
+ 40: S,
1549
+ 42: C,
1550
+ 44: w,
1551
+ 45: T,
1552
+ 47: E,
1553
+ 51: D,
1554
+ 53: O,
1555
+ 54: k,
1556
+ 56: A,
1557
+ 61: j,
1558
+ 62: M,
1559
+ 63: N,
1560
+ 64: P,
1561
+ 73: F
1562
+ },
1563
+ {
1564
+ 4: o,
1565
+ 5: s,
1566
+ 8: 8,
1567
+ 9: 10,
1568
+ 10: c,
1569
+ 13: 13,
1570
+ 14: l,
1571
+ 15: u,
1572
+ 17: [1, 164],
1573
+ 18: 16,
1574
+ 19: d,
1575
+ 22: f,
1576
+ 23: 41,
1577
+ 24: p,
1578
+ 25: 20,
1579
+ 26: 21,
1580
+ 27: 22,
1581
+ 28: 23,
1582
+ 29: 24,
1583
+ 30: m,
1584
+ 31: h,
1585
+ 32: g,
1586
+ 34: _,
1587
+ 36: v,
1588
+ 37: y,
1589
+ 38: b,
1590
+ 39: x,
1591
+ 40: S,
1592
+ 42: C,
1593
+ 44: w,
1594
+ 45: T,
1595
+ 47: E,
1596
+ 51: D,
1597
+ 53: O,
1598
+ 54: k,
1599
+ 56: A,
1600
+ 61: j,
1601
+ 62: M,
1602
+ 63: N,
1603
+ 64: P,
1604
+ 73: F
1605
+ },
1606
+ { 17: [1, 165] },
1607
+ {
1608
+ 4: o,
1609
+ 5: s,
1610
+ 8: 8,
1611
+ 9: 10,
1612
+ 10: c,
1613
+ 13: 13,
1614
+ 14: l,
1615
+ 15: u,
1616
+ 17: [2, 47],
1617
+ 18: 16,
1618
+ 19: d,
1619
+ 22: f,
1620
+ 23: 41,
1621
+ 24: p,
1622
+ 25: 20,
1623
+ 26: 21,
1624
+ 27: 22,
1625
+ 28: 23,
1626
+ 29: 24,
1627
+ 30: m,
1628
+ 31: h,
1629
+ 32: g,
1630
+ 34: _,
1631
+ 36: v,
1632
+ 37: y,
1633
+ 38: b,
1634
+ 39: x,
1635
+ 40: S,
1636
+ 42: C,
1637
+ 44: w,
1638
+ 45: T,
1639
+ 47: E,
1640
+ 50: [1, 166],
1641
+ 51: D,
1642
+ 53: O,
1643
+ 54: k,
1644
+ 56: A,
1645
+ 61: j,
1646
+ 62: M,
1647
+ 63: N,
1648
+ 64: P,
1649
+ 73: F
1650
+ },
1651
+ { 17: [1, 167] },
1652
+ {
1653
+ 4: o,
1654
+ 5: s,
1655
+ 8: 8,
1656
+ 9: 10,
1657
+ 10: c,
1658
+ 13: 13,
1659
+ 14: l,
1660
+ 15: u,
1661
+ 17: [2, 45],
1662
+ 18: 16,
1663
+ 19: d,
1664
+ 22: f,
1665
+ 23: 41,
1666
+ 24: p,
1667
+ 25: 20,
1668
+ 26: 21,
1669
+ 27: 22,
1670
+ 28: 23,
1671
+ 29: 24,
1672
+ 30: m,
1673
+ 31: h,
1674
+ 32: g,
1675
+ 34: _,
1676
+ 36: v,
1677
+ 37: y,
1678
+ 38: b,
1679
+ 39: x,
1680
+ 40: S,
1681
+ 42: C,
1682
+ 44: w,
1683
+ 45: T,
1684
+ 47: E,
1685
+ 49: [1, 168],
1686
+ 51: D,
1687
+ 53: O,
1688
+ 54: k,
1689
+ 56: A,
1690
+ 61: j,
1691
+ 62: M,
1692
+ 63: N,
1693
+ 64: P,
1694
+ 73: F
1695
+ },
1696
+ { 17: [1, 169] },
1697
+ { 17: [1, 170] },
1698
+ {
1699
+ 4: o,
1700
+ 5: s,
1701
+ 8: 8,
1702
+ 9: 10,
1703
+ 10: c,
1704
+ 13: 13,
1705
+ 14: l,
1706
+ 15: u,
1707
+ 17: [2, 43],
1708
+ 18: 16,
1709
+ 19: d,
1710
+ 22: f,
1711
+ 23: 41,
1712
+ 24: p,
1713
+ 25: 20,
1714
+ 26: 21,
1715
+ 27: 22,
1716
+ 28: 23,
1717
+ 29: 24,
1718
+ 30: m,
1719
+ 31: h,
1720
+ 32: g,
1721
+ 34: _,
1722
+ 36: v,
1723
+ 37: y,
1724
+ 38: b,
1725
+ 39: x,
1726
+ 40: S,
1727
+ 42: C,
1728
+ 44: w,
1729
+ 45: T,
1730
+ 47: E,
1731
+ 48: [1, 171],
1732
+ 51: D,
1733
+ 53: O,
1734
+ 54: k,
1735
+ 56: A,
1736
+ 61: j,
1737
+ 62: M,
1738
+ 63: N,
1739
+ 64: P,
1740
+ 73: F
1741
+ },
1742
+ {
1743
+ 4: o,
1744
+ 5: s,
1745
+ 8: 8,
1746
+ 9: 10,
1747
+ 10: c,
1748
+ 13: 13,
1749
+ 14: l,
1750
+ 15: u,
1751
+ 17: [1, 172],
1752
+ 18: 16,
1753
+ 19: d,
1754
+ 22: f,
1755
+ 23: 41,
1756
+ 24: p,
1757
+ 25: 20,
1758
+ 26: 21,
1759
+ 27: 22,
1760
+ 28: 23,
1761
+ 29: 24,
1762
+ 30: m,
1763
+ 31: h,
1764
+ 32: g,
1765
+ 34: _,
1766
+ 36: v,
1767
+ 37: y,
1768
+ 38: b,
1769
+ 39: x,
1770
+ 40: S,
1771
+ 42: C,
1772
+ 44: w,
1773
+ 45: T,
1774
+ 47: E,
1775
+ 51: D,
1776
+ 53: O,
1777
+ 54: k,
1778
+ 56: A,
1779
+ 61: j,
1780
+ 62: M,
1781
+ 63: N,
1782
+ 64: P,
1783
+ 73: F
1784
+ },
1785
+ { 16: [1, 173] },
1786
+ e(I, [2, 50]),
1787
+ { 16: [1, 174] },
1788
+ e(I, [2, 55]),
1789
+ e(Te, [2, 76]),
1790
+ { 76: [1, 175] },
1791
+ { 16: [1, 176] },
1792
+ e(I, [2, 52]),
1793
+ { 16: [1, 177] },
1794
+ e(I, [2, 57]),
1795
+ e(I, [2, 53]),
1796
+ {
1797
+ 23: 178,
1798
+ 62: L,
1799
+ 73: F
1800
+ },
1801
+ {
1802
+ 23: 179,
1803
+ 62: L,
1804
+ 73: F
1805
+ },
1806
+ {
1807
+ 23: 180,
1808
+ 62: L,
1809
+ 73: F
1810
+ },
1811
+ {
1812
+ 58: 181,
1813
+ 104: J
1814
+ },
1815
+ {
1816
+ 23: 182,
1817
+ 62: L,
1818
+ 72: [1, 183],
1819
+ 73: F
1820
+ },
1821
+ {
1822
+ 58: 184,
1823
+ 104: J
1824
+ },
1825
+ {
1826
+ 58: 185,
1827
+ 104: J
1828
+ },
1829
+ {
1830
+ 66: [1, 186],
1831
+ 104: [2, 67]
1832
+ },
1833
+ { 5: [2, 60] },
1834
+ { 5: [2, 106] },
1835
+ { 5: [2, 61] },
1836
+ { 5: [2, 62] },
1837
+ { 5: [2, 63] },
1838
+ e(I, [2, 17]),
1839
+ e(be, [2, 11]),
1840
+ {
1841
+ 13: 187,
1842
+ 51: D,
1843
+ 53: O,
1844
+ 54: k
1845
+ },
1846
+ e(be, [2, 13]),
1847
+ e(be, [2, 14]),
1848
+ e(I, [2, 19]),
1849
+ e(I, [2, 35]),
1850
+ e(I, [2, 36]),
1851
+ e(I, [2, 37]),
1852
+ e(I, [2, 38]),
1853
+ { 16: [1, 188] },
1854
+ e(I, [2, 39]),
1855
+ { 16: [1, 189] },
1856
+ e(I, [2, 40]),
1857
+ e(I, [2, 41]),
1858
+ { 16: [1, 190] },
1859
+ e(I, [2, 42]),
1860
+ { 5: [1, 191] },
1861
+ { 5: [1, 192] },
1862
+ { 77: [1, 193] },
1863
+ { 5: [1, 194] },
1864
+ { 5: [1, 195] },
1865
+ {
1866
+ 58: 196,
1867
+ 104: J
1868
+ },
1869
+ {
1870
+ 58: 197,
1871
+ 104: J
1872
+ },
1873
+ {
1874
+ 58: 198,
1875
+ 104: J
1876
+ },
1877
+ { 5: [2, 75] },
1878
+ {
1879
+ 58: 199,
1880
+ 104: J
1881
+ },
1882
+ {
1883
+ 23: 200,
1884
+ 62: L,
1885
+ 73: F
1886
+ },
1887
+ { 5: [2, 58] },
1888
+ { 5: [2, 59] },
1889
+ {
1890
+ 23: 201,
1891
+ 62: L,
1892
+ 73: F
1893
+ },
1894
+ e(be, [2, 12]),
1895
+ e(Se, a, {
1896
+ 7: 125,
1897
+ 41: 202
1898
+ }),
1899
+ e(Ce, a, {
1900
+ 7: 127,
1901
+ 43: 203
1902
+ }),
1903
+ e(we, a, {
1904
+ 7: 130,
1905
+ 46: 204
1906
+ }),
1907
+ e(I, [2, 49]),
1908
+ e(I, [2, 54]),
1909
+ e(Te, [2, 77]),
1910
+ e(I, [2, 51]),
1911
+ e(I, [2, 56]),
1912
+ { 5: [2, 70] },
1913
+ { 5: [2, 71] },
1914
+ { 5: [2, 72] },
1915
+ { 5: [2, 73] },
1916
+ {
1917
+ 58: 205,
1918
+ 104: J
1919
+ },
1920
+ { 104: [2, 66] },
1921
+ { 17: [2, 48] },
1922
+ { 17: [2, 46] },
1923
+ { 17: [2, 44] },
1924
+ { 5: [2, 74] }
1925
+ ],
1926
+ defaultActions: {
1927
+ 5: [2, 1],
1928
+ 6: [2, 2],
1929
+ 151: [2, 60],
1930
+ 152: [2, 106],
1931
+ 153: [2, 61],
1932
+ 154: [2, 62],
1933
+ 155: [2, 63],
1934
+ 181: [2, 75],
1935
+ 184: [2, 58],
1936
+ 185: [2, 59],
1937
+ 196: [2, 70],
1938
+ 197: [2, 71],
1939
+ 198: [2, 72],
1940
+ 199: [2, 73],
1941
+ 201: [2, 66],
1942
+ 202: [2, 48],
1943
+ 203: [2, 46],
1944
+ 204: [2, 44],
1945
+ 205: [2, 74]
1946
+ },
1947
+ parseError: /* @__PURE__ */ n(function(e, t) {
1948
+ if (t.recoverable) this.trace(e);
1949
+ else {
1950
+ var n = Error(e);
1951
+ throw n.hash = t, n;
1952
+ }
1953
+ }, "parseError"),
1954
+ parse: /* @__PURE__ */ n(function(e) {
1955
+ var t = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
1956
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
1957
+ h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
1958
+ var v = h.yylloc;
1959
+ o.push(v);
1960
+ var y = h.options && h.options.ranges;
1961
+ typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
1962
+ function b(e) {
1963
+ r.length -= 2 * e, a.length -= e, o.length -= e;
1964
+ }
1965
+ n(b, "popStack");
1966
+ function x() {
1967
+ var e = i.pop() || h.lex() || p;
1968
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = t.symbols_[e] || e), e;
1969
+ }
1970
+ n(x, "lex");
1971
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
1972
+ if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
1973
+ var M = "";
1974
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
1975
+ M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
1976
+ text: h.match,
1977
+ token: this.terminals_[S] || S,
1978
+ line: h.yylineno,
1979
+ loc: v,
1980
+ expected: j
1981
+ });
1982
+ }
1983
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
1984
+ switch (T[0]) {
1985
+ case 1:
1986
+ r.push(S), a.push(h.yytext), o.push(h.yylloc), r.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
1987
+ break;
1988
+ case 2:
1989
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
1990
+ first_line: o[o.length - (k || 1)].first_line,
1991
+ last_line: o[o.length - 1].last_line,
1992
+ first_column: o[o.length - (k || 1)].first_column,
1993
+ last_column: o[o.length - 1].last_column
1994
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
1995
+ c,
1996
+ u,
1997
+ l,
1998
+ g.yy,
1999
+ T[1],
2000
+ a,
2001
+ o
2002
+ ].concat(m)), E !== void 0) return E;
2003
+ k && (r = r.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), r.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[r[r.length - 2]][r[r.length - 1]], r.push(A);
2004
+ break;
2005
+ case 3: return !0;
2006
+ }
2007
+ }
2008
+ return !0;
2009
+ }, "parse")
2010
+ };
2011
+ De.lexer = /* @__PURE__ */ (function() {
2012
+ return {
2013
+ EOF: 1,
2014
+ parseError: /* @__PURE__ */ n(function(e, t) {
2015
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
2016
+ else throw Error(e);
2017
+ }, "parseError"),
2018
+ setInput: /* @__PURE__ */ n(function(e, t) {
2019
+ return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
2020
+ first_line: 1,
2021
+ first_column: 0,
2022
+ last_line: 1,
2023
+ last_column: 0
2024
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
2025
+ }, "setInput"),
2026
+ input: /* @__PURE__ */ n(function() {
2027
+ var e = this._input[0];
2028
+ return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
2029
+ }, "input"),
2030
+ unput: /* @__PURE__ */ n(function(e) {
2031
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
2032
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
2033
+ var r = this.match.split(/(?:\r\n?|\n)/g);
2034
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
2035
+ var i = this.yylloc.range;
2036
+ return this.yylloc = {
2037
+ first_line: this.yylloc.first_line,
2038
+ last_line: this.yylineno + 1,
2039
+ first_column: this.yylloc.first_column,
2040
+ last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
2041
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
2042
+ }, "unput"),
2043
+ more: /* @__PURE__ */ n(function() {
2044
+ return this._more = !0, this;
2045
+ }, "more"),
2046
+ reject: /* @__PURE__ */ n(function() {
2047
+ if (this.options.backtrack_lexer) this._backtrack = !0;
2048
+ 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(), {
2049
+ text: "",
2050
+ token: null,
2051
+ line: this.yylineno
2052
+ });
2053
+ return this;
2054
+ }, "reject"),
2055
+ less: /* @__PURE__ */ n(function(e) {
2056
+ this.unput(this.match.slice(e));
2057
+ }, "less"),
2058
+ pastInput: /* @__PURE__ */ n(function() {
2059
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
2060
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
2061
+ }, "pastInput"),
2062
+ upcomingInput: /* @__PURE__ */ n(function() {
2063
+ var e = this.match;
2064
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
2065
+ }, "upcomingInput"),
2066
+ showPosition: /* @__PURE__ */ n(function() {
2067
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
2068
+ return e + this.upcomingInput() + "\n" + t + "^";
2069
+ }, "showPosition"),
2070
+ test_match: /* @__PURE__ */ n(function(e, t) {
2071
+ var n, r, i;
2072
+ if (this.options.backtrack_lexer && (i = {
2073
+ yylineno: this.yylineno,
2074
+ yylloc: {
2075
+ first_line: this.yylloc.first_line,
2076
+ last_line: this.last_line,
2077
+ first_column: this.yylloc.first_column,
2078
+ last_column: this.yylloc.last_column
2079
+ },
2080
+ yytext: this.yytext,
2081
+ match: this.match,
2082
+ matches: this.matches,
2083
+ matched: this.matched,
2084
+ yyleng: this.yyleng,
2085
+ offset: this.offset,
2086
+ _more: this._more,
2087
+ _input: this._input,
2088
+ yy: this.yy,
2089
+ conditionStack: this.conditionStack.slice(0),
2090
+ done: this.done
2091
+ }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
2092
+ first_line: this.yylloc.last_line,
2093
+ last_line: this.yylineno + 1,
2094
+ first_column: this.yylloc.last_column,
2095
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
2096
+ }, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
2097
+ if (this._backtrack) {
2098
+ for (var a in i) this[a] = i[a];
2099
+ return !1;
2100
+ }
2101
+ return !1;
2102
+ }, "test_match"),
2103
+ next: /* @__PURE__ */ n(function() {
2104
+ if (this.done) return this.EOF;
2105
+ this._input || (this.done = !0);
2106
+ var e, t, n, r;
2107
+ this._more || (this.yytext = "", this.match = "");
2108
+ for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
2109
+ if (t = n, r = a, this.options.backtrack_lexer) {
2110
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
2111
+ if (this._backtrack) {
2112
+ t = !1;
2113
+ continue;
2114
+ } else return !1;
2115
+ } else if (!this.options.flex) break;
2116
+ }
2117
+ return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
2118
+ text: "",
2119
+ token: null,
2120
+ line: this.yylineno
2121
+ });
2122
+ }, "next"),
2123
+ lex: /* @__PURE__ */ n(function() {
2124
+ return this.next() || this.lex();
2125
+ }, "lex"),
2126
+ begin: /* @__PURE__ */ n(function(e) {
2127
+ this.conditionStack.push(e);
2128
+ }, "begin"),
2129
+ popState: /* @__PURE__ */ n(function() {
2130
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
2131
+ }, "popState"),
2132
+ _currentRules: /* @__PURE__ */ n(function() {
2133
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
2134
+ }, "_currentRules"),
2135
+ topState: /* @__PURE__ */ n(function(e) {
2136
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
2137
+ }, "topState"),
2138
+ pushState: /* @__PURE__ */ n(function(e) {
2139
+ this.begin(e);
2140
+ }, "pushState"),
2141
+ stateStackSize: /* @__PURE__ */ n(function() {
2142
+ return this.conditionStack.length;
2143
+ }, "stateStackSize"),
2144
+ options: { "case-insensitive": !0 },
2145
+ performAction: /* @__PURE__ */ n(function(e, t, n, r) {
2146
+ switch (n) {
2147
+ case 0: return 5;
2148
+ case 1: break;
2149
+ case 2: break;
2150
+ case 3: break;
2151
+ case 4: break;
2152
+ case 5: break;
2153
+ case 6: return 20;
2154
+ case 7: return this.begin("CONFIG"), 75;
2155
+ case 8: return 76;
2156
+ case 9: return this.popState(), this.begin("ALIAS"), 77;
2157
+ case 10: return this.popState(), this.popState(), 77;
2158
+ case 11: return t.yytext = t.yytext.trim(), 73;
2159
+ case 12: return t.yytext = t.yytext.trim(), this.begin("ALIAS"), 73;
2160
+ case 13: return t.yytext = t.yytext.trim(), this.popState(), 73;
2161
+ case 14: return this.popState(), 10;
2162
+ case 15: return t.yytext = t.yytext.trim(), this.popState(), 10;
2163
+ case 16: return this.begin("LINE"), 15;
2164
+ case 17: return this.begin("ID"), 51;
2165
+ case 18: return this.begin("ID"), 53;
2166
+ case 19: return 14;
2167
+ case 20: return this.begin("ID"), 54;
2168
+ case 21: return this.popState(), this.popState(), this.begin("LINE"), 52;
2169
+ case 22: return this.popState(), this.popState(), 5;
2170
+ case 23: return this.begin("LINE"), 37;
2171
+ case 24: return this.begin("LINE"), 38;
2172
+ case 25: return this.begin("LINE"), 39;
2173
+ case 26: return this.begin("LINE"), 40;
2174
+ case 27: return this.begin("LINE"), 50;
2175
+ case 28: return this.begin("LINE"), 42;
2176
+ case 29: return this.begin("LINE"), 44;
2177
+ case 30: return this.begin("LINE"), 49;
2178
+ case 31: return this.begin("LINE"), 45;
2179
+ case 32: return this.begin("LINE"), 48;
2180
+ case 33: return this.begin("LINE"), 47;
2181
+ case 34: return this.popState(), 16;
2182
+ case 35: return 17;
2183
+ case 36: return 67;
2184
+ case 37: return 68;
2185
+ case 38: return 61;
2186
+ case 39: return 62;
2187
+ case 40: return 63;
2188
+ case 41: return 64;
2189
+ case 42: return 59;
2190
+ case 43: return 56;
2191
+ case 44: return this.begin("ID"), 22;
2192
+ case 45: return this.begin("ID"), 24;
2193
+ case 46: return 30;
2194
+ case 47: return 31;
2195
+ case 48: return this.begin("acc_title"), 32;
2196
+ case 49: return this.popState(), "acc_title_value";
2197
+ case 50: return this.begin("acc_descr"), 34;
2198
+ case 51: return this.popState(), "acc_descr_value";
2199
+ case 52:
2200
+ this.begin("acc_descr_multiline");
2201
+ break;
2202
+ case 53:
2203
+ this.popState();
2204
+ break;
2205
+ case 54: return "acc_descr_multiline_value";
2206
+ case 55: return 6;
2207
+ case 56: return 19;
2208
+ case 57: return 21;
2209
+ case 58: return 66;
2210
+ case 59: return 5;
2211
+ case 60: return t.yytext = t.yytext.trim(), 73;
2212
+ case 61: return 80;
2213
+ case 62: return 97;
2214
+ case 63: return 98;
2215
+ case 64: return 99;
2216
+ case 65: return 78;
2217
+ case 66: return 79;
2218
+ case 67: return 100;
2219
+ case 68: return 101;
2220
+ case 69: return 102;
2221
+ case 70: return 103;
2222
+ case 71: return 85;
2223
+ case 72: return 86;
2224
+ case 73: return 87;
2225
+ case 74: return 88;
2226
+ case 75: return 93;
2227
+ case 76: return 94;
2228
+ case 77: return 95;
2229
+ case 78: return 96;
2230
+ case 79: return 81;
2231
+ case 80: return 82;
2232
+ case 81: return 83;
2233
+ case 82: return 84;
2234
+ case 83: return 89;
2235
+ case 84: return 90;
2236
+ case 85: return 91;
2237
+ case 86: return 92;
2238
+ case 87: return 104;
2239
+ case 88: return 104;
2240
+ case 89: return 70;
2241
+ case 90: return 71;
2242
+ case 91: return 72;
2243
+ case 92: return 5;
2244
+ case 93: return 10;
2245
+ }
2246
+ }, "anonymous"),
2247
+ rules: [
2248
+ /^(?:[\n]+)/i,
2249
+ /^(?:\s+)/i,
2250
+ /^(?:((?!\n)\s)+)/i,
2251
+ /^(?:#[^\n]*)/i,
2252
+ /^(?:%(?!\{)[^\n]*)/i,
2253
+ /^(?:[^\}]%%[^\n]*)/i,
2254
+ /^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,
2255
+ /^(?:@\{)/i,
2256
+ /^(?:[^\}]+)/i,
2257
+ /^(?:\}(?=\s+as\s))/i,
2258
+ /^(?:\})/i,
2259
+ /^(?:[^<>:\n,;@\s]+(?=\s*@\{))/i,
2260
+ /^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,
2261
+ /^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,
2262
+ /^(?:[^<>:\n,;@]*<[^\n]*)/i,
2263
+ /^(?:[^\n]+)/i,
2264
+ /^(?:box\b)/i,
2265
+ /^(?:participant\b)/i,
2266
+ /^(?:actor\b)/i,
2267
+ /^(?:create\b)/i,
2268
+ /^(?:destroy\b)/i,
2269
+ /^(?:as\b)/i,
2270
+ /^(?:(?:))/i,
2271
+ /^(?:loop\b)/i,
2272
+ /^(?:rect\b)/i,
2273
+ /^(?:opt\b)/i,
2274
+ /^(?:alt\b)/i,
2275
+ /^(?:else\b)/i,
2276
+ /^(?:par\b)/i,
2277
+ /^(?:par_over\b)/i,
2278
+ /^(?:and\b)/i,
2279
+ /^(?:critical\b)/i,
2280
+ /^(?:option\b)/i,
2281
+ /^(?:break\b)/i,
2282
+ /^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,
2283
+ /^(?:end\b)/i,
2284
+ /^(?:left of\b)/i,
2285
+ /^(?:right of\b)/i,
2286
+ /^(?:links(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,
2287
+ /^(?:link(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,
2288
+ /^(?:properties(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,
2289
+ /^(?:details(?=[ \t]+[^\/\\\+\(\)<>:\n,;\s\-]))/i,
2290
+ /^(?:over\b)/i,
2291
+ /^(?:note\b)/i,
2292
+ /^(?:activate\b)/i,
2293
+ /^(?:deactivate\b)/i,
2294
+ /^(?:title\s[^#\n;]+)/i,
2295
+ /^(?:title:\s[^#\n;]+)/i,
2296
+ /^(?:accTitle\s*:\s*)/i,
2297
+ /^(?:(?!\n||)*[^\n]*)/i,
2298
+ /^(?:accDescr\s*:\s*)/i,
2299
+ /^(?:(?!\n||)*[^\n]*)/i,
2300
+ /^(?:accDescr\s*\{\s*)/i,
2301
+ /^(?:[\}])/i,
2302
+ /^(?:[^\}]*)/i,
2303
+ /^(?:sequenceDiagram\b)/i,
2304
+ /^(?:autonumber\b)/i,
2305
+ /^(?:off\b)/i,
2306
+ /^(?:,)/i,
2307
+ /^(?:;)/i,
2308
+ /^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,
2309
+ /^(?:->>)/i,
2310
+ /^(?:<<->>)/i,
2311
+ /^(?:-->>)/i,
2312
+ /^(?:<<-->>)/i,
2313
+ /^(?:->)/i,
2314
+ /^(?:-->)/i,
2315
+ /^(?:-[x])/i,
2316
+ /^(?:--[x])/i,
2317
+ /^(?:-[\)])/i,
2318
+ /^(?:--[\)])/i,
2319
+ /^(?:--\|\\)/i,
2320
+ /^(?:--\|\/)/i,
2321
+ /^(?:--\\\\)/i,
2322
+ /^(?:--\/\/)/i,
2323
+ /^(?:\/\|--)/i,
2324
+ /^(?:\\\|--)/i,
2325
+ /^(?:\/\/--)/i,
2326
+ /^(?:\\\\--)/i,
2327
+ /^(?:-\|\\)/i,
2328
+ /^(?:-\|\/)/i,
2329
+ /^(?:-\\\\)/i,
2330
+ /^(?:-\/\/)/i,
2331
+ /^(?:\/\|-)/i,
2332
+ /^(?:\\\|-)/i,
2333
+ /^(?:\/\/-)/i,
2334
+ /^(?:\\\\-)/i,
2335
+ /^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,
2336
+ /^(?::)/i,
2337
+ /^(?:\+)/i,
2338
+ /^(?:-)/i,
2339
+ /^(?:\(\))/i,
2340
+ /^(?:$)/i,
2341
+ /^(?:.)/i
2342
+ ],
2343
+ conditions: {
2344
+ acc_descr_multiline: {
2345
+ rules: [53, 54],
2346
+ inclusive: !1
2347
+ },
2348
+ acc_descr: {
2349
+ rules: [51],
2350
+ inclusive: !1
2351
+ },
2352
+ acc_title: {
2353
+ rules: [49],
2354
+ inclusive: !1
2355
+ },
2356
+ ID: {
2357
+ rules: [
2358
+ 2,
2359
+ 3,
2360
+ 7,
2361
+ 11,
2362
+ 12,
2363
+ 13,
2364
+ 14,
2365
+ 15
2366
+ ],
2367
+ inclusive: !1
2368
+ },
2369
+ ALIAS: {
2370
+ rules: [
2371
+ 2,
2372
+ 3,
2373
+ 21,
2374
+ 22
2375
+ ],
2376
+ inclusive: !1
2377
+ },
2378
+ LINE: {
2379
+ rules: [
2380
+ 2,
2381
+ 3,
2382
+ 34
2383
+ ],
2384
+ inclusive: !1
2385
+ },
2386
+ CONFIG: {
2387
+ rules: [
2388
+ 8,
2389
+ 9,
2390
+ 10
2391
+ ],
2392
+ inclusive: !1
2393
+ },
2394
+ CONFIG_DATA: {
2395
+ rules: [],
2396
+ inclusive: !1
2397
+ },
2398
+ INITIAL: {
2399
+ rules: [
2400
+ 0,
2401
+ 1,
2402
+ 3,
2403
+ 4,
2404
+ 5,
2405
+ 6,
2406
+ 16,
2407
+ 17,
2408
+ 18,
2409
+ 19,
2410
+ 20,
2411
+ 23,
2412
+ 24,
2413
+ 25,
2414
+ 26,
2415
+ 27,
2416
+ 28,
2417
+ 29,
2418
+ 30,
2419
+ 31,
2420
+ 32,
2421
+ 33,
2422
+ 35,
2423
+ 36,
2424
+ 37,
2425
+ 38,
2426
+ 39,
2427
+ 40,
2428
+ 41,
2429
+ 42,
2430
+ 43,
2431
+ 44,
2432
+ 45,
2433
+ 46,
2434
+ 47,
2435
+ 48,
2436
+ 50,
2437
+ 52,
2438
+ 55,
2439
+ 56,
2440
+ 57,
2441
+ 58,
2442
+ 59,
2443
+ 60,
2444
+ 61,
2445
+ 62,
2446
+ 63,
2447
+ 64,
2448
+ 65,
2449
+ 66,
2450
+ 67,
2451
+ 68,
2452
+ 69,
2453
+ 70,
2454
+ 71,
2455
+ 72,
2456
+ 73,
2457
+ 74,
2458
+ 75,
2459
+ 76,
2460
+ 77,
2461
+ 78,
2462
+ 79,
2463
+ 80,
2464
+ 81,
2465
+ 82,
2466
+ 83,
2467
+ 84,
2468
+ 85,
2469
+ 86,
2470
+ 87,
2471
+ 88,
2472
+ 89,
2473
+ 90,
2474
+ 91,
2475
+ 92,
2476
+ 93
2477
+ ],
2478
+ inclusive: !0
2479
+ }
2480
+ }
2481
+ };
2482
+ })();
2483
+ function Oe() {
2484
+ this.yy = {};
2485
+ }
2486
+ return n(Oe, "Parser"), Oe.prototype = De, De.Parser = Oe, new Oe();
2487
+ })();
2488
+ P.parser = P;
2489
+ var F = P, I = {
2490
+ SOLID: 0,
2491
+ DOTTED: 1,
2492
+ NOTE: 2,
2493
+ SOLID_CROSS: 3,
2494
+ DOTTED_CROSS: 4,
2495
+ SOLID_OPEN: 5,
2496
+ DOTTED_OPEN: 6,
2497
+ LOOP_START: 10,
2498
+ LOOP_END: 11,
2499
+ ALT_START: 12,
2500
+ ALT_ELSE: 13,
2501
+ ALT_END: 14,
2502
+ OPT_START: 15,
2503
+ OPT_END: 16,
2504
+ ACTIVE_START: 17,
2505
+ ACTIVE_END: 18,
2506
+ PAR_START: 19,
2507
+ PAR_AND: 20,
2508
+ PAR_END: 21,
2509
+ RECT_START: 22,
2510
+ RECT_END: 23,
2511
+ SOLID_POINT: 24,
2512
+ DOTTED_POINT: 25,
2513
+ AUTONUMBER: 26,
2514
+ CRITICAL_START: 27,
2515
+ CRITICAL_OPTION: 28,
2516
+ CRITICAL_END: 29,
2517
+ BREAK_START: 30,
2518
+ BREAK_END: 31,
2519
+ PAR_OVER_START: 32,
2520
+ BIDIRECTIONAL_SOLID: 33,
2521
+ BIDIRECTIONAL_DOTTED: 34,
2522
+ SOLID_TOP: 41,
2523
+ SOLID_BOTTOM: 42,
2524
+ STICK_TOP: 43,
2525
+ STICK_BOTTOM: 44,
2526
+ SOLID_ARROW_TOP_REVERSE: 45,
2527
+ SOLID_ARROW_BOTTOM_REVERSE: 46,
2528
+ STICK_ARROW_TOP_REVERSE: 47,
2529
+ STICK_ARROW_BOTTOM_REVERSE: 48,
2530
+ SOLID_TOP_DOTTED: 51,
2531
+ SOLID_BOTTOM_DOTTED: 52,
2532
+ STICK_TOP_DOTTED: 53,
2533
+ STICK_BOTTOM_DOTTED: 54,
2534
+ SOLID_ARROW_TOP_REVERSE_DOTTED: 55,
2535
+ SOLID_ARROW_BOTTOM_REVERSE_DOTTED: 56,
2536
+ STICK_ARROW_TOP_REVERSE_DOTTED: 57,
2537
+ STICK_ARROW_BOTTOM_REVERSE_DOTTED: 58,
2538
+ CENTRAL_CONNECTION: 59,
2539
+ CENTRAL_CONNECTION_REVERSE: 60,
2540
+ CENTRAL_CONNECTION_DUAL: 61
2541
+ }, L = {
2542
+ FILLED: 0,
2543
+ OPEN: 1
2544
+ }, ee = {
2545
+ LEFTOF: 0,
2546
+ RIGHTOF: 1,
2547
+ OVER: 2
2548
+ }, R = {
2549
+ ACTOR: "actor",
2550
+ BOUNDARY: "boundary",
2551
+ COLLECTIONS: "collections",
2552
+ CONTROL: "control",
2553
+ DATABASE: "database",
2554
+ ENTITY: "entity",
2555
+ PARTICIPANT: "participant",
2556
+ QUEUE: "queue"
2557
+ }, te = class {
2558
+ constructor() {
2559
+ this.state = new A(() => ({
2560
+ prevActor: void 0,
2561
+ actors: /* @__PURE__ */ new Map(),
2562
+ createdActors: /* @__PURE__ */ new Map(),
2563
+ destroyedActors: /* @__PURE__ */ new Map(),
2564
+ boxes: [],
2565
+ messages: [],
2566
+ notes: [],
2567
+ sequenceNumbersEnabled: !1,
2568
+ wrapEnabled: void 0,
2569
+ currentBox: void 0,
2570
+ lastCreated: void 0,
2571
+ lastDestroyed: void 0
2572
+ })), this.setAccTitle = c, this.setAccDescription = s, this.setDiagramTitle = h, this.getAccTitle = v, this.getAccDescription = l, this.getDiagramTitle = r, this.apply = this.apply.bind(this), this.parseBoxData = this.parseBoxData.bind(this), this.parseMessage = this.parseMessage.bind(this), this.clear(), this.setWrap(d().wrap), this.LINETYPE = I, this.ARROWTYPE = L, this.PLACEMENT = ee;
2573
+ }
2574
+ static {
2575
+ n(this, "SequenceDB");
2576
+ }
2577
+ addBox(e) {
2578
+ this.state.records.boxes.push({
2579
+ name: e.text,
2580
+ wrap: e.wrap ?? this.autoWrap(),
2581
+ fill: e.color,
2582
+ actorKeys: []
2583
+ }), this.state.records.currentBox = this.state.records.boxes.slice(-1)[0];
2584
+ }
2585
+ addActor(e, t, n, r, i) {
2586
+ let a = this.state.records.currentBox, o;
2587
+ if (i !== void 0) {
2588
+ let e;
2589
+ e = i.includes("\n") ? i + "\n" : "{\n" + i + "\n}", o = j(e, { schema: M });
2590
+ }
2591
+ r = o?.type ?? r, o?.alias && (!n || n.text === t) && (n = {
2592
+ text: o.alias,
2593
+ wrap: n?.wrap,
2594
+ type: r
2595
+ });
2596
+ let s = this.state.records.actors.get(e);
2597
+ if (s) {
2598
+ if (this.state.records.currentBox && s.box && this.state.records.currentBox !== s.box) throw Error(`A same participant should only be defined in one Box: ${s.name} can't be in '${s.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);
2599
+ if (a = s.box ? s.box : this.state.records.currentBox, s.box = a, s && t === s.name && n == null) return;
2600
+ }
2601
+ if (n?.text ?? (n = {
2602
+ text: t,
2603
+ type: r
2604
+ }), (r == null || n.text == null) && (n = {
2605
+ text: t,
2606
+ type: r
2607
+ }), this.state.records.actors.set(e, {
2608
+ box: a,
2609
+ name: t,
2610
+ description: n.text,
2611
+ wrap: n.wrap ?? this.autoWrap(),
2612
+ prevActor: this.state.records.prevActor,
2613
+ links: {},
2614
+ properties: {},
2615
+ actorCnt: null,
2616
+ rectData: null,
2617
+ type: r ?? "participant"
2618
+ }), this.state.records.prevActor) {
2619
+ let t = this.state.records.actors.get(this.state.records.prevActor);
2620
+ t && (t.nextActor = e);
2621
+ }
2622
+ this.state.records.currentBox && this.state.records.currentBox.actorKeys.push(e), this.state.records.prevActor = e;
2623
+ }
2624
+ activationCount(e) {
2625
+ let t, n = 0;
2626
+ if (!e) return 0;
2627
+ for (t = 0; t < this.state.records.messages.length; t++) this.state.records.messages[t].type === this.LINETYPE.ACTIVE_START && this.state.records.messages[t].from === e && n++, this.state.records.messages[t].type === this.LINETYPE.ACTIVE_END && this.state.records.messages[t].from === e && n--;
2628
+ return n;
2629
+ }
2630
+ addMessage(e, t, n, r) {
2631
+ this.state.records.messages.push({
2632
+ id: this.state.records.messages.length.toString(),
2633
+ from: e,
2634
+ to: t,
2635
+ message: n.text,
2636
+ wrap: n.wrap ?? this.autoWrap(),
2637
+ answer: r
2638
+ });
2639
+ }
2640
+ addSignal(e, t, n, r, i = !1, a) {
2641
+ if (r === this.LINETYPE.ACTIVE_END && this.activationCount(e ?? "") < 1) {
2642
+ let t = /* @__PURE__ */ Error("Trying to inactivate an inactive participant (" + e + ")");
2643
+ throw t.hash = {
2644
+ text: "->>-",
2645
+ token: "->>-",
2646
+ line: "1",
2647
+ loc: {
2648
+ first_line: 1,
2649
+ last_line: 1,
2650
+ first_column: 1,
2651
+ last_column: 1
2652
+ },
2653
+ expected: ["'ACTIVE_PARTICIPANT'"]
2654
+ }, t;
2655
+ }
2656
+ return this.state.records.messages.push({
2657
+ id: this.state.records.messages.length.toString(),
2658
+ from: e,
2659
+ to: t,
2660
+ message: n?.text ?? "",
2661
+ wrap: n?.wrap ?? this.autoWrap(),
2662
+ type: r,
2663
+ activate: i,
2664
+ centralConnection: a ?? 0
2665
+ }), !0;
2666
+ }
2667
+ hasAtLeastOneBox() {
2668
+ return this.state.records.boxes.length > 0;
2669
+ }
2670
+ hasAtLeastOneBoxWithTitle() {
2671
+ return this.state.records.boxes.some((e) => e.name);
2672
+ }
2673
+ getMessages() {
2674
+ return this.state.records.messages;
2675
+ }
2676
+ getBoxes() {
2677
+ return this.state.records.boxes;
2678
+ }
2679
+ getActors() {
2680
+ return this.state.records.actors;
2681
+ }
2682
+ getCreatedActors() {
2683
+ return this.state.records.createdActors;
2684
+ }
2685
+ getDestroyedActors() {
2686
+ return this.state.records.destroyedActors;
2687
+ }
2688
+ getActor(e) {
2689
+ return this.state.records.actors.get(e);
2690
+ }
2691
+ getActorKeys() {
2692
+ return [...this.state.records.actors.keys()];
2693
+ }
2694
+ enableSequenceNumbers() {
2695
+ this.state.records.sequenceNumbersEnabled = !0;
2696
+ }
2697
+ disableSequenceNumbers() {
2698
+ this.state.records.sequenceNumbersEnabled = !1;
2699
+ }
2700
+ showSequenceNumbers() {
2701
+ return this.state.records.sequenceNumbersEnabled;
2702
+ }
2703
+ setWrap(e) {
2704
+ this.state.records.wrapEnabled = e;
2705
+ }
2706
+ extractWrap(e) {
2707
+ if (e === void 0) return {};
2708
+ e = e.trim();
2709
+ let t = /^:?wrap:/.exec(e) === null ? /^:?nowrap:/.exec(e) === null ? void 0 : !1 : !0;
2710
+ return {
2711
+ cleanedText: (t === void 0 ? e : e.replace(/^:?(?:no)?wrap:/, "")).trim(),
2712
+ wrap: t
2713
+ };
2714
+ }
2715
+ autoWrap() {
2716
+ return this.state.records.wrapEnabled === void 0 ? d().sequence?.wrap ?? !1 : this.state.records.wrapEnabled;
2717
+ }
2718
+ clear() {
2719
+ this.state.reset(), u();
2720
+ }
2721
+ parseMessage(t) {
2722
+ let n = t.trim(), { wrap: r, cleanedText: i } = this.extractWrap(n), a = {
2723
+ text: i,
2724
+ wrap: r
2725
+ };
2726
+ return e.debug(`parseMessage: ${JSON.stringify(a)}`), a;
2727
+ }
2728
+ parseBoxData(e) {
2729
+ let t = /^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e), n = t?.[1] ? t[1].trim() : "transparent", r = t?.[2] ? t[2].trim() : void 0;
2730
+ if (window?.CSS) window.CSS.supports("color", n) || (n = "transparent", r = e.trim());
2731
+ else {
2732
+ let t = new Option().style;
2733
+ t.color = n, t.color !== n && (n = "transparent", r = e.trim());
2734
+ }
2735
+ let { wrap: i, cleanedText: a } = this.extractWrap(r);
2736
+ return {
2737
+ text: a ? b(a, d()) : void 0,
2738
+ color: n,
2739
+ wrap: i
2740
+ };
2741
+ }
2742
+ addNote(e, t, n) {
2743
+ let r = {
2744
+ actor: e,
2745
+ placement: t,
2746
+ message: n.text,
2747
+ wrap: n.wrap ?? this.autoWrap()
2748
+ }, i = [].concat(e, e);
2749
+ this.state.records.notes.push(r), this.state.records.messages.push({
2750
+ id: this.state.records.messages.length.toString(),
2751
+ from: i[0],
2752
+ to: i[1],
2753
+ message: n.text,
2754
+ wrap: n.wrap ?? this.autoWrap(),
2755
+ type: this.LINETYPE.NOTE,
2756
+ placement: t
2757
+ });
2758
+ }
2759
+ addLinks(t, n) {
2760
+ let r = this.getActor(t);
2761
+ try {
2762
+ let e = b(n.text, d());
2763
+ e = e.replace(/&equals;/g, "="), e = e.replace(/&amp;/g, "&");
2764
+ let t = JSON.parse(e);
2765
+ this.insertLinks(r, t);
2766
+ } catch (t) {
2767
+ e.error("error while parsing actor link text", t);
2768
+ }
2769
+ }
2770
+ addALink(t, n) {
2771
+ let r = this.getActor(t);
2772
+ try {
2773
+ let e = {}, t = b(n.text, d()), i = t.indexOf("@");
2774
+ t = t.replace(/&equals;/g, "="), t = t.replace(/&amp;/g, "&");
2775
+ let a = t.slice(0, i - 1).trim();
2776
+ e[a] = t.slice(i + 1).trim(), this.insertLinks(r, e);
2777
+ } catch (t) {
2778
+ e.error("error while parsing actor link text", t);
2779
+ }
2780
+ }
2781
+ insertLinks(e, t) {
2782
+ if (e.links == null) e.links = t;
2783
+ else for (let n in t) e.links[n] = t[n];
2784
+ }
2785
+ addProperties(t, n) {
2786
+ let r = this.getActor(t);
2787
+ try {
2788
+ let e = b(n.text, d()), t = JSON.parse(e);
2789
+ this.insertProperties(r, t);
2790
+ } catch (t) {
2791
+ e.error("error while parsing actor properties text", t);
2792
+ }
2793
+ }
2794
+ insertProperties(e, t) {
2795
+ if (e.properties == null) e.properties = t;
2796
+ else for (let n in t) e.properties[n] = t[n];
2797
+ }
2798
+ boxEnd() {
2799
+ this.state.records.currentBox = void 0;
2800
+ }
2801
+ addDetails(t, n) {
2802
+ let r = this.getActor(t), i = document.getElementById(n.text);
2803
+ try {
2804
+ let e = i.innerHTML, t = JSON.parse(e);
2805
+ t.properties && this.insertProperties(r, t.properties), t.links && this.insertLinks(r, t.links);
2806
+ } catch (t) {
2807
+ e.error("error while parsing actor details text", t);
2808
+ }
2809
+ }
2810
+ getActorProperty(e, t) {
2811
+ if (e?.properties !== void 0) return e.properties[t];
2812
+ }
2813
+ apply(e) {
2814
+ if (Array.isArray(e)) e.forEach((e) => {
2815
+ this.apply(e);
2816
+ });
2817
+ else switch (e.type) {
2818
+ case "sequenceIndex":
2819
+ this.state.records.messages.push({
2820
+ id: this.state.records.messages.length.toString(),
2821
+ from: void 0,
2822
+ to: void 0,
2823
+ message: {
2824
+ start: e.sequenceIndex,
2825
+ step: e.sequenceIndexStep,
2826
+ visible: e.sequenceVisible
2827
+ },
2828
+ wrap: !1,
2829
+ type: e.signalType
2830
+ });
2831
+ break;
2832
+ case "addParticipant":
2833
+ this.addActor(e.actor, e.actor, e.description, e.draw, e.config);
2834
+ break;
2835
+ case "createParticipant":
2836
+ if (this.state.records.actors.has(e.actor)) throw Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");
2837
+ this.state.records.lastCreated = e.actor, this.addActor(e.actor, e.actor, e.description, e.draw, e.config), this.state.records.createdActors.set(e.actor, this.state.records.messages.length);
2838
+ break;
2839
+ case "destroyParticipant":
2840
+ this.state.records.lastDestroyed = e.actor, this.state.records.destroyedActors.set(e.actor, this.state.records.messages.length);
2841
+ break;
2842
+ case "activeStart":
2843
+ this.addSignal(e.actor, void 0, void 0, e.signalType);
2844
+ break;
2845
+ case "centralConnection":
2846
+ this.addSignal(e.actor, void 0, void 0, e.signalType);
2847
+ break;
2848
+ case "centralConnectionReverse":
2849
+ this.addSignal(e.actor, void 0, void 0, e.signalType);
2850
+ break;
2851
+ case "activeEnd":
2852
+ this.addSignal(e.actor, void 0, void 0, e.signalType);
2853
+ break;
2854
+ case "addNote":
2855
+ this.addNote(e.actor, e.placement, e.text);
2856
+ break;
2857
+ case "addLinks":
2858
+ this.addLinks(e.actor, e.text);
2859
+ break;
2860
+ case "addALink":
2861
+ this.addALink(e.actor, e.text);
2862
+ break;
2863
+ case "addProperties":
2864
+ this.addProperties(e.actor, e.text);
2865
+ break;
2866
+ case "addDetails":
2867
+ this.addDetails(e.actor, e.text);
2868
+ break;
2869
+ case "addMessage":
2870
+ if (this.state.records.lastCreated) {
2871
+ if (e.to !== this.state.records.lastCreated) throw Error("The created participant " + this.state.records.lastCreated.name + " does not have an associated creating message after its declaration. Please check the sequence diagram.");
2872
+ this.state.records.lastCreated = void 0;
2873
+ } else if (this.state.records.lastDestroyed) {
2874
+ if (e.to !== this.state.records.lastDestroyed && e.from !== this.state.records.lastDestroyed) throw Error("The destroyed participant " + this.state.records.lastDestroyed.name + " does not have an associated destroying message after its declaration. Please check the sequence diagram.");
2875
+ this.state.records.lastDestroyed = void 0;
2876
+ }
2877
+ this.addSignal(e.from, e.to, e.msg, e.signalType, e.activate, e.centralConnection);
2878
+ break;
2879
+ case "boxStart":
2880
+ this.addBox(e.boxData);
2881
+ break;
2882
+ case "boxEnd":
2883
+ this.boxEnd();
2884
+ break;
2885
+ case "loopStart":
2886
+ this.addSignal(void 0, void 0, e.loopText, e.signalType);
2887
+ break;
2888
+ case "loopEnd":
2889
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2890
+ break;
2891
+ case "rectStart":
2892
+ this.addSignal(void 0, void 0, e.color, e.signalType);
2893
+ break;
2894
+ case "rectEnd":
2895
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2896
+ break;
2897
+ case "optStart":
2898
+ this.addSignal(void 0, void 0, e.optText, e.signalType);
2899
+ break;
2900
+ case "optEnd":
2901
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2902
+ break;
2903
+ case "altStart":
2904
+ this.addSignal(void 0, void 0, e.altText, e.signalType);
2905
+ break;
2906
+ case "else":
2907
+ this.addSignal(void 0, void 0, e.altText, e.signalType);
2908
+ break;
2909
+ case "altEnd":
2910
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2911
+ break;
2912
+ case "setAccTitle":
2913
+ c(e.text);
2914
+ break;
2915
+ case "parStart":
2916
+ this.addSignal(void 0, void 0, e.parText, e.signalType);
2917
+ break;
2918
+ case "and":
2919
+ this.addSignal(void 0, void 0, e.parText, e.signalType);
2920
+ break;
2921
+ case "parEnd":
2922
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2923
+ break;
2924
+ case "criticalStart":
2925
+ this.addSignal(void 0, void 0, e.criticalText, e.signalType);
2926
+ break;
2927
+ case "option":
2928
+ this.addSignal(void 0, void 0, e.optionText, e.signalType);
2929
+ break;
2930
+ case "criticalEnd":
2931
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2932
+ break;
2933
+ case "breakStart":
2934
+ this.addSignal(void 0, void 0, e.breakText, e.signalType);
2935
+ break;
2936
+ case "breakEnd":
2937
+ this.addSignal(void 0, void 0, void 0, e.signalType);
2938
+ break;
2939
+ }
2940
+ }
2941
+ getConfig() {
2942
+ return d().sequence;
2943
+ }
2944
+ }, ne = /* @__PURE__ */ n((e) => {
2945
+ let t = e.dropShadow ?? "none", { look: n } = d();
2946
+ return `.actor {
2947
+ stroke: ${e.actorBorder};
2948
+ fill: ${e.actorBkg};
2949
+ stroke-width: ${e.strokeWidth ?? 1};
2950
+ }
2951
+
2952
+ rect.actor.outer-path[data-look="neo"] {
2953
+ filter: ${t};
2954
+ }
2955
+
2956
+ rect.note[data-look="neo"] {
2957
+ stroke:${e.noteBorderColor};
2958
+ fill:${e.noteBkgColor};
2959
+ filter: ${t};
2960
+ }
2961
+
2962
+ text.actor > tspan {
2963
+ fill: ${e.actorTextColor};
2964
+ stroke: none;
2965
+ }
2966
+
2967
+ .actor-line {
2968
+ stroke: ${e.actorLineColor};
2969
+ }
2970
+
2971
+ .innerArc {
2972
+ stroke-width: 1.5;
2973
+ stroke-dasharray: none;
2974
+ }
2975
+
2976
+ .messageLine0 {
2977
+ stroke-width: 1.5;
2978
+ stroke-dasharray: none;
2979
+ stroke: ${e.signalColor};
2980
+ }
2981
+
2982
+ .messageLine1 {
2983
+ stroke-width: 1.5;
2984
+ stroke-dasharray: 2, 2;
2985
+ stroke: ${e.signalColor};
2986
+ }
2987
+
2988
+ [id$="-arrowhead"] path {
2989
+ fill: ${e.signalColor};
2990
+ stroke: ${e.signalColor};
2991
+ }
2992
+
2993
+ .sequenceNumber {
2994
+ fill: ${e.sequenceNumberColor};
2995
+ }
2996
+
2997
+ [id$="-sequencenumber"] {
2998
+ fill: ${e.signalColor};
2999
+ }
3000
+
3001
+ [id$="-crosshead"] path {
3002
+ fill: ${e.signalColor};
3003
+ stroke: ${e.signalColor};
3004
+ }
3005
+
3006
+ .messageText {
3007
+ fill: ${e.signalTextColor};
3008
+ stroke: none;
3009
+ }
3010
+
3011
+ .labelBox {
3012
+ stroke: ${e.labelBoxBorderColor};
3013
+ fill: ${e.labelBoxBkgColor};
3014
+ filter: ${n === "neo" ? t : "none"};
3015
+ }
3016
+
3017
+ .labelText, .labelText > tspan {
3018
+ fill: ${e.labelTextColor};
3019
+ stroke: none;
3020
+ }
3021
+
3022
+ .loopText, .loopText > tspan {
3023
+ fill: ${e.loopTextColor};
3024
+ stroke: none;
3025
+ }
3026
+
3027
+ .sectionTitle, .sectionTitle > tspan {
3028
+ fill: ${e.loopTextColor};
3029
+ stroke: none;
3030
+ }
3031
+
3032
+ .loopLine {
3033
+ stroke-width: 2px;
3034
+ stroke-dasharray: 2, 2;
3035
+ stroke: ${e.labelBoxBorderColor};
3036
+ fill: ${e.labelBoxBorderColor};
3037
+ }
3038
+
3039
+ .note {
3040
+ //stroke: #decc93;
3041
+ stroke: ${e.noteBorderColor};
3042
+ fill: ${e.noteBkgColor};
3043
+ }
3044
+
3045
+ /*
3046
+ * No font-weight here, deliberately. Note text renders inside tspan elements, and a weight emitted at
3047
+ * tspan level outranks the inline style drawText puts on the parent text element from the
3048
+ * sequence.noteFontWeight config key -- so that documented key would never reach the glyphs.
3049
+ * The theme variable formerly emitted here is a different value from that config key, and
3050
+ * git/styles.js reads it as its own bold-label weight under redux and neo, so it cannot be
3051
+ * lowered there either.
3052
+ */
3053
+ .noteText, .noteText > tspan {
3054
+ fill: ${e.noteTextColor};
3055
+ stroke: none;
3056
+ }
3057
+
3058
+ .activation0 {
3059
+ fill: ${e.activationBkgColor};
3060
+ stroke: ${e.activationBorderColor};
3061
+ }
3062
+
3063
+ .activation1 {
3064
+ fill: ${e.activationBkgColor};
3065
+ stroke: ${e.activationBorderColor};
3066
+ }
3067
+
3068
+ .activation2 {
3069
+ fill: ${e.activationBkgColor};
3070
+ stroke: ${e.activationBorderColor};
3071
+ }
3072
+
3073
+ .actorPopupMenu {
3074
+ position: absolute;
3075
+ }
3076
+
3077
+ .actorPopupMenuPanel {
3078
+ position: absolute;
3079
+ fill: ${e.actorBkg};
3080
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
3081
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
3082
+ }
3083
+ .actor-man circle, line {
3084
+ fill: ${e.actorBkg};
3085
+ stroke-width: 2px;
3086
+ }
3087
+
3088
+ g rect.rect {
3089
+ filter: ${t};
3090
+ stroke: ${e.nodeBorder};
3091
+ }
3092
+ `;
3093
+ }, "getStyles"), re = 44, ie = 6, ae = 6, oe = /* @__PURE__ */ n((e, t) => e.actorTextHeight ?? S.calculateTextDimensions(e.description ?? "", {
3094
+ fontFamily: t.actorFontFamily,
3095
+ fontSize: t.actorFontSize,
3096
+ fontWeight: t.actorFontWeight
3097
+ }).height, "actorLabelHeight"), se = /* @__PURE__ */ n((e) => re + ie + e + ae, "actorStackHeight"), ce = /* @__PURE__ */ n((e, t, n) => {
3098
+ let r = e + t, i = r - ae - n / 2;
3099
+ return {
3100
+ lifelineStartY: r,
3101
+ glyphBottomY: r - ae - n - ie,
3102
+ labelCenterY: i
3103
+ };
3104
+ }, "headerBands"), le = /* @__PURE__ */ n((e, t) => {
3105
+ let n = e + ae, r = n + re;
3106
+ return {
3107
+ glyphTopY: n,
3108
+ glyphBottomY: r,
3109
+ labelCenterY: r + ie + t / 2,
3110
+ stackHeight: se(t)
3111
+ };
3112
+ }, "footerBands"), z = 36, ue = -5, de = 60, fe = de - ue, pe = /* @__PURE__ */ n((e, t, n, r) => {
3113
+ if (t.look !== "neo") return null;
3114
+ let i = oe(e, t);
3115
+ return n ? le(r, i) : ce(r, e.height, i);
3116
+ }, "neoBands"), B = "actor-top", V = "actor-bottom", me = "actor-box", H = "actor-man", U = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), W = /* @__PURE__ */ n((e, t) => e?.length ? e[t % e.length] : void 0, "paletteColor"), he = /* @__PURE__ */ n(function(e, t) {
3117
+ let n = w(e, t);
3118
+ return y().look === "neo" && n.attr("data-look", "neo"), n;
3119
+ }, "drawRect"), ge = /* @__PURE__ */ n(function(e, t, n, r, i) {
3120
+ if (t.links === void 0 || t.links === null || Object.keys(t.links).length === 0) return {
3121
+ height: 0,
3122
+ width: 0
3123
+ };
3124
+ let a = t.links, o = t.actorCnt, s = t.rectData;
3125
+ var c = "none";
3126
+ i && (c = "block !important");
3127
+ let l = e.append("g");
3128
+ l.attr("id", "actor" + o + "_popup"), l.attr("class", "actorPopupMenu"), l.attr("display", c);
3129
+ var u = "";
3130
+ s.class !== void 0 && (u = " " + s.class);
3131
+ let d = s.width > n ? s.width : n, f = l.append("rect");
3132
+ if (f.attr("class", "actorPopupMenuPanel" + u), f.attr("x", s.x), f.attr("y", s.height), f.attr("fill", s.fill), f.attr("stroke", s.stroke), f.attr("width", d), f.attr("height", s.height), f.attr("rx", s.rx), f.attr("ry", s.ry), a != null) {
3133
+ var p = 20;
3134
+ for (let e in a) {
3135
+ var m = l.append("a"), h = (0, N.sanitizeUrl)(a[e]);
3136
+ m.attr("xlink:href", h), m.attr("target", "_blank"), We(r)(e, m, s.x + 10, s.height + p, d, 20, { class: "actor" }, r), p += 30;
3137
+ }
3138
+ }
3139
+ return f.attr("height", p), {
3140
+ height: s.height + p,
3141
+ width: d
3142
+ };
3143
+ }, "drawPopup"), _e = /* @__PURE__ */ n(function(e) {
3144
+ return "var pu = document.getElementById('" + e + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
3145
+ }, "popupMenuToggle"), ve = /* @__PURE__ */ n(async function(e, t, n = null) {
3146
+ let r = e.append("foreignObject"), i = await a(t.text, y()), o = r.append("xhtml:div").attr("style", "width: fit-content;").attr("xmlns", "http://www.w3.org/1999/xhtml").html(i).node().getBoundingClientRect();
3147
+ if (r.attr("height", Math.round(o.height)).attr("width", Math.round(o.width)), t.class === "noteText") {
3148
+ let n = e.node().firstChild;
3149
+ n.setAttribute("height", o.height + 2 * t.textMargin);
3150
+ let i = n.getBBox();
3151
+ r.attr("x", Math.round(i.x + i.width / 2 - o.width / 2)).attr("y", Math.round(i.y + i.height / 2 - o.height / 2));
3152
+ } else if (n) {
3153
+ let { startx: e, stopx: i, starty: a } = n;
3154
+ if (e > i) {
3155
+ let t = e;
3156
+ e = i, i = t;
3157
+ }
3158
+ r.attr("x", Math.round(e + Math.abs(e - i) / 2 - o.width / 2)), t.class === "loopText" ? r.attr("y", Math.round(a)) : r.attr("y", Math.round(a - o.height));
3159
+ }
3160
+ return [r];
3161
+ }, "drawKatex"), G = /* @__PURE__ */ n(function(e, t) {
3162
+ let r = 0, i = 0, a = t.text.split(_.lineBreakRegex), [o, s] = C(t.fontSize), c = [], l = 0, u = /* @__PURE__ */ n(() => t.y, "yfunc");
3163
+ if (t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0) switch (t.valign) {
3164
+ case "top":
3165
+ case "start":
3166
+ u = /* @__PURE__ */ n(() => Math.round(t.y + t.textMargin), "yfunc");
3167
+ break;
3168
+ case "middle":
3169
+ case "center":
3170
+ u = /* @__PURE__ */ n(() => Math.round(t.y + (r + i + t.textMargin) / 2), "yfunc");
3171
+ break;
3172
+ case "bottom":
3173
+ case "end":
3174
+ u = /* @__PURE__ */ n(() => Math.round(t.y + (r + i + 2 * t.textMargin) - t.textMargin), "yfunc");
3175
+ break;
3176
+ }
3177
+ if (t.anchor !== void 0 && t.textMargin !== void 0 && t.width !== void 0) switch (t.anchor) {
3178
+ case "left":
3179
+ case "start":
3180
+ t.x = Math.round(t.x + t.textMargin), t.anchor = "start", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3181
+ break;
3182
+ case "middle":
3183
+ case "center":
3184
+ t.x = Math.round(t.x + t.width / 2), t.anchor = "middle", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3185
+ break;
3186
+ case "right":
3187
+ case "end":
3188
+ t.x = Math.round(t.x + t.width - t.textMargin), t.anchor = "end", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3189
+ break;
3190
+ }
3191
+ for (let [n, d] of a.entries()) {
3192
+ t.textMargin !== void 0 && t.textMargin === 0 && o !== void 0 && (l = n * o);
3193
+ let a = e.append("text");
3194
+ a.attr("x", t.x), a.attr("y", u()), t.anchor !== void 0 && a.attr("text-anchor", t.anchor).attr("dominant-baseline", t.dominantBaseline).attr("alignment-baseline", t.alignmentBaseline), t.fontFamily !== void 0 && a.style("font-family", t.fontFamily), s !== void 0 && a.style("font-size", s), t.fontWeight !== void 0 && a.style("font-weight", t.fontWeight), t.fill !== void 0 && a.attr("fill", t.fill), t.class !== void 0 && a.attr("class", t.class), t.dy === void 0 ? l !== 0 && a.attr("dy", l) : a.attr("dy", t.dy);
3195
+ let f = d || "​";
3196
+ if (t.tspan) {
3197
+ let e = a.append("tspan");
3198
+ e.attr("x", t.x), t.fill !== void 0 && e.attr("fill", t.fill), e.text(f);
3199
+ } else a.text(f);
3200
+ t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0 && (i += (a._groups || a)[0][0].getBBox().height, r = i), c.push(a);
3201
+ }
3202
+ return c;
3203
+ }, "drawText"), ye = /* @__PURE__ */ n(function(e, t) {
3204
+ function r(e, t, n, r, i) {
3205
+ return e + "," + t + " " + (e + n) + "," + t + " " + (e + n) + "," + (t + r - i) + " " + (e + n - i * 1.2) + "," + (t + r) + " " + e + "," + (t + r);
3206
+ }
3207
+ n(r, "genPoints");
3208
+ let i = e.append("polygon");
3209
+ return i.attr("points", r(t.x, t.y, t.width, t.height, 7)), i.attr("class", "labelBox"), t.y += t.height / 2, G(e, t), i;
3210
+ }, "drawLabel"), K = -1, be = /* @__PURE__ */ n((e, t, n, r) => {
3211
+ e.select && n.forEach((n) => {
3212
+ let i = t.get(n), a = e.select("#actor" + i.actorCnt);
3213
+ !r.mirrorActors && i.stopy ? a.attr("y2", i.stopy + i.height / 2) : r.mirrorActors && a.attr("y2", i.stopy);
3214
+ });
3215
+ }, "fixLifeLineHeights"), xe = /* @__PURE__ */ n(function(e, t, n, r, i, a) {
3216
+ let o = r ? t.stopy : t.starty, s = t.x + t.width / 2, c = o + t.height, { look: l, theme: u, themeVariables: d } = n, { bkgColorArray: f, borderColorArray: p } = d, h = e.append("g").lower();
3217
+ var g = h;
3218
+ r || (K++, Object.keys(t.links || {}).length && !n.forceMenus && g.attr("onclick", _e(`actor${K}_popup`)).attr("cursor", "pointer"), g.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", c).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), g = h.append("g"), t.actorCnt = K, t.links != null && g.attr("id", "root-" + K), l === "neo" && g.attr("data-look", "neo"));
3219
+ let _ = k();
3220
+ var v = "actor";
3221
+ t.properties?.class ? v = t.properties.class : _.fill = "#eaeaea", r ? v += ` ${V}` : v += ` ${B}`, _.x = t.x, _.y = o, _.width = t.width, _.height = t.height, _.class = v, _.rx = 3, _.ry = 3, _.name = t.name, l === "neo" && (_.rx = 6, _.ry = 6);
3222
+ let y = he(g, _), b = a.get(t.name) ?? 0;
3223
+ if (U.has(u) && (y.style("stroke", W(p, b)), y.style("fill", W(f, b))), l === "neo" && y.attr("filter", `url(#${Be(i)})`), t.rectData = _, t.properties?.icon) {
3224
+ let e = t.properties.icon.trim();
3225
+ e.charAt(0) === "@" ? O(g, _.x + _.width - 20, _.y + 10, e.substr(1)) : E(g, _.x + _.width - 20, _.y + 10, e);
3226
+ }
3227
+ r || (g.attr("data-et", "participant"), g.attr("data-type", "participant"), g.attr("data-id", t.name)), Y(n, m(t.description))(t.description, g, _.x, _.y, _.width, _.height, { class: `actor ${me}` }, n);
3228
+ let x = t.height;
3229
+ if (y.node) {
3230
+ let e = y.node().getBBox();
3231
+ n.look !== "neo" && (t.height = e.height, x = e.height);
3232
+ }
3233
+ return x;
3234
+ }, "drawActorTypeParticipant"), Se = /* @__PURE__ */ n(function(e, t, n, r, i, a) {
3235
+ let o = r ? t.stopy : t.starty, s = t.x + t.width / 2, c = o + t.height, { look: l, theme: u, themeVariables: d } = n, { bkgColorArray: f, borderColorArray: p } = d, h = e.append("g").lower();
3236
+ var g = h;
3237
+ r || (K++, Object.keys(t.links || {}).length && !n.forceMenus && g.attr("onclick", _e(`actor${K}_popup`)).attr("cursor", "pointer"), g.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", c).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), g = h.append("g"), t.actorCnt = K, t.links != null && g.attr("id", "root-" + K), l === "neo" && g.attr("data-look", "neo"));
3238
+ let _ = k();
3239
+ var v = "actor";
3240
+ t.properties?.class ? v = t.properties.class : _.fill = "#eaeaea", r ? v += ` ${V}` : v += ` ${B}`, _.x = t.x, _.y = o, _.width = t.width, _.height = t.height, _.class = v, _.name = t.name, n.look === "neo" && (_.height = t.height - 6);
3241
+ let y = {
3242
+ ..._,
3243
+ x: _.x + -6,
3244
+ y: _.y + 6,
3245
+ class: "actor"
3246
+ }, b = he(g, _), x = he(g, y);
3247
+ t.rectData = _, l === "neo" && g.attr("filter", `url(#${Be(i)})`);
3248
+ let S = a.get(t.name) ?? 0;
3249
+ if (U.has(u) && (b.style("stroke", W(p, S)), b.style("fill", W(f, S)), x.style("stroke", W(p, S)), x.style("fill", W(f, S))), t.properties?.icon) {
3250
+ let e = t.properties.icon.trim();
3251
+ e.charAt(0) === "@" ? O(g, _.x + _.width - 20, _.y + 10, e.substr(1)) : E(g, _.x + _.width - 20, _.y + 10, e);
3252
+ }
3253
+ Y(n, m(t.description))(t.description, g, _.x - 6, _.y + 6, _.width, _.height, { class: `actor ${me}` }, n);
3254
+ let C = t.height;
3255
+ if (b.node) {
3256
+ let e = b.node().getBBox();
3257
+ n.look !== "neo" && (t.height = e.height, C = e.height);
3258
+ }
3259
+ return r || (g.attr("data-et", "participant"), g.attr("data-type", "collections"), g.attr("data-id", t.name)), C;
3260
+ }, "drawActorTypeCollections"), Ce = /* @__PURE__ */ n(function(e, t, n, r, i, a) {
3261
+ let o = r ? t.stopy : t.starty, s = t.x + t.width / 2, c = o + t.height, { look: l, theme: u, themeVariables: d } = n, { bkgColorArray: f, borderColorArray: p } = d, h = e.append("g").lower(), g = h;
3262
+ r || (K++, Object.keys(t.links || {}).length && !n.forceMenus && g.attr("onclick", _e(`actor${K}_popup`)).attr("cursor", "pointer"), g.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", c).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), g = h.append("g"), t.actorCnt = K, t.links != null && g.attr("id", "root-" + K), l === "neo" && g.attr("data-look", "neo"));
3263
+ let _ = k(), v = "actor";
3264
+ t.properties?.class ? v = t.properties.class : _.fill = "#eaeaea", r ? v += ` ${V}` : v += ` ${B}`, g.attr("class", v), _.x = t.x, _.y = o, _.width = t.width, _.height = t.height, _.name = t.name;
3265
+ let y = _.height / 2, b = y / (2.5 + _.height / 50), x = g.append("g"), S = g.append("g"), C = `M ${_.x},${_.y + y}
3266
+ a ${b},${y} 0 0 0 0,${_.height}
3267
+ h ${_.width - 2 * b}
3268
+ a ${b},${y} 0 0 0 0,-${_.height}
3269
+ Z
3270
+ `;
3271
+ x.append("path").attr("d", C), S.append("path").attr("d", `M ${_.x},${_.y + y}
3272
+ a ${b},${y} 0 0 0 0,${_.height}`), x.attr("transform", `translate(${b}, ${-(_.height / 2)})`), S.attr("transform", `translate(${_.width - b}, ${-_.height / 2})`), t.rectData = _, l === "neo" && x.attr("filter", `url(#${Be(i)})`);
3273
+ let w = a.get(t.name) ?? 0;
3274
+ if (U.has(u) && (x.style("stroke", W(p, w)), x.style("fill", W(f, w)), S.style("stroke", W(p, w)), S.style("fill", W(f, w))), t.properties?.icon) {
3275
+ let e = t.properties.icon.trim(), n = _.x + _.width - 20, r = _.y + 10;
3276
+ e.charAt(0) === "@" ? O(g, n, r, e.substr(1)) : E(g, n, r, e);
3277
+ }
3278
+ Y(n, m(t.description))(t.description, g, _.x, _.y, _.width, _.height, { class: `actor ${me}` }, n);
3279
+ let T = t.height, D = x.select("path:last-child");
3280
+ if (D.node()) {
3281
+ let e = D.node().getBBox();
3282
+ n.look !== "neo" && (t.height = e.height, T = e.height);
3283
+ }
3284
+ return r || (g.attr("data-et", "participant"), g.attr("data-type", "queue"), g.attr("data-id", t.name)), T;
3285
+ }, "drawActorTypeQueue"), we = /* @__PURE__ */ n(function(e, t, n, r, i, a) {
3286
+ let o = r ? t.stopy : t.starty, s = t.x + t.width / 2, c = pe(t, n, r, o), l = c ? c.lifelineStartY : o + 75, { look: u, theme: d, themeVariables: f } = n, { bkgColorArray: p, borderColorArray: h, actorBorder: g, actorBkg: _ } = f, v = e.append("g").lower();
3287
+ r || (K++, v.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", l).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), t.actorCnt = K);
3288
+ let y = e.append("g"), b = H;
3289
+ r ? b += ` ${V}` : b += ` ${B}`, y.attr("class", b), y.attr("name", t.name);
3290
+ let x = k();
3291
+ x.x = t.x, x.y = o, x.fill = "#eaeaea", x.width = t.width, x.height = t.height, x.class = "actor";
3292
+ let S = t.x + t.width / 2, C = c ? c.glyphBottomY - 22 : o + 32;
3293
+ y.append("defs").append("marker").attr("id", i + "-filled-head-control").attr("refX", 11).attr("refY", 5.8).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "172.5").attr("stroke-width", 1.2).append("path").attr("d", "M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z"), y.append("circle").attr("cx", S).attr("cy", C).attr("r", 22).attr("filter", `${u === "neo" ? `url(#${Be(i)})` : ""}`), y.append("line").attr("marker-end", "url(#" + i + "-filled-head-control)").attr("transform", `translate(${S}, ${C - 22})`);
3294
+ let w = a.get(t.name) ?? 0;
3295
+ return U.has(d) ? (y.style("stroke", W(h, w)), y.style("fill", W(p, w))) : (y.style("stroke", g), y.style("fill", _)), c || (t.height = y.node().getBBox().height + 2 * (n?.sequence?.labelBoxHeight ?? 0)), Y(n, m(t.description))(t.description, y, x.x, c ? c.labelCenterY - x.height / 2 : x.y + 22 + (r ? 5 : 12), x.width, x.height, { class: `actor ${H}` }, n), r || (y.attr("data-et", "participant"), y.attr("data-type", "control"), y.attr("data-id", t.name)), t.height;
3296
+ }, "drawActorTypeControl"), Te = /* @__PURE__ */ n(function(e, t, n, r, i, a) {
3297
+ let o = r ? t.stopy : t.starty, s = t.x + t.width / 2, c = pe(t, n, r, o), l = c ? c.lifelineStartY : o + 75, { look: u, theme: d, themeVariables: f } = n, { bkgColorArray: p, borderColorArray: h } = f, g = e.append("g").lower(), _ = e.append("g"), v = "actor";
3298
+ r ? v += ` ${V}` : v += ` ${B}`, _.attr("class", v), _.attr("name", t.name);
3299
+ let y = k();
3300
+ y.x = t.x, y.y = o, y.fill = "#eaeaea", y.width = t.width, y.height = t.height, y.class = "actor";
3301
+ let b = t.x + t.width / 2, x = c ? c.glyphBottomY - 22 : o + (r ? 10 : 25);
3302
+ _.append("circle").attr("cx", b).attr("cy", x).attr("r", 22).attr("width", t.width).attr("height", t.height), _.append("line").attr("x1", b - 22).attr("x2", b + 22).attr("y1", x + 22).attr("y2", x + 22).attr("stroke-width", 2), u === "neo" && _.attr("filter", `url(#${Be(i)})`);
3303
+ let S = a.get(t.name) ?? 0;
3304
+ return U.has(d) && (_.style("stroke", W(h, S)), _.style("fill", W(p, S))), c || (t.height = _.node().getBBox().height + (n?.sequence?.labelBoxHeight ?? 0)), r || (K++, g.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", l).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), t.actorCnt = K), Y(n, m(t.description))(t.description, _, y.x, c ? c.labelCenterY - y.height / 2 : y.y + (r ? 15 : 30), y.width, y.height, { class: `actor ${H}` }, n), c || _.attr("transform", `translate(0, ${r ? 22 : 22 / 2 - 5})`), r || (_.attr("data-et", "participant"), _.attr("data-type", "entity"), _.attr("data-id", t.name)), t.height;
3305
+ }, "drawActorTypeEntity"), q = /* @__PURE__ */ n(function(e, t, n, r, i, a) {
3306
+ let o = r ? t.stopy : t.starty, s = t.x + t.width / 2, c = pe(t, n, r, o), l = c ? c.lifelineStartY : o + t.height + 2 * n.boxTextMargin, { theme: u, themeVariables: d, look: f } = n, { bkgColorArray: p, borderColorArray: h, actorBorder: g } = d, _ = e.append("g").lower(), v = _;
3307
+ r || (K++, Object.keys(t.links || {}).length && !n.forceMenus && v.attr("onclick", _e(`actor${K}_popup`)).attr("cursor", "pointer"), v.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", l).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), v = _.append("g"), t.actorCnt = K, t.links != null && v.attr("id", "root-" + K), f === "neo" && v.attr("data-look", "neo"));
3308
+ let y = k(), b = "actor";
3309
+ t.properties?.class ? b = t.properties.class : y.fill = "#eaeaea", r ? b += ` ${V}` : b += ` ${B}`, y.x = t.x, y.y = o, y.width = t.width, y.height = t.height, y.class = b, y.name = t.name, y.x = t.x, y.y = o;
3310
+ let x = y.width / 3, S = x / 2, C = S / (2.5 + x / 50), w = c ? re : y.width / 3, T = c ? c.glyphBottomY - w - C : y.y, E = v.append("g");
3311
+ E.attr("class", b);
3312
+ let D = `
3313
+ M ${y.x},${T + C}
3314
+ a ${S},${C} 0 0 0 ${x},0
3315
+ a ${S},${C} 0 0 0 -${x},0
3316
+ l 0,${w - 2 * C}
3317
+ a ${S},${C} 0 0 0 ${x},0
3318
+ l 0,-${w - 2 * C}
3319
+ `;
3320
+ E.append("path").attr("d", D), f === "neo" && E.attr("filter", `url(#${Be(i)})`);
3321
+ let O = a.get(t.name) ?? 0;
3322
+ if (U.has(u) ? (E.style("stroke", W(h, O)), E.style("fill", W(p, O))) : E.style("stroke", g), E.attr("transform", `translate(${x}, ${C})`), t.rectData = y, Y(n, m(t.description))(t.description, v, y.x, c ? c.labelCenterY - y.height / 2 : y.y + 35, y.width, y.height, { class: `actor ${me}` }, n), !c) {
3323
+ let e = E.select("path:last-child");
3324
+ e.node() && (t.height = e.node().getBBox().height + (n.sequence.labelBoxHeight ?? 0));
3325
+ }
3326
+ return r || (v.attr("data-et", "participant"), v.attr("data-type", "database"), v.attr("data-id", t.name)), t.height;
3327
+ }, "drawActorTypeDatabase"), Ee = /* @__PURE__ */ n(function(e, t, n, r, i, a) {
3328
+ let o = r ? t.stopy : t.starty, s = t.x + t.width / 2, c = pe(t, n, r, o), l = c ? c.lifelineStartY : o + 80, u = c ? c.glyphBottomY - 22 : o + 12, d = e.append("g").lower(), { look: f, theme: p, themeVariables: h } = n, { bkgColorArray: g, borderColorArray: _, actorBorder: v } = h;
3329
+ r || (K++, d.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", l).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), t.actorCnt = K);
3330
+ let y = e.append("g"), b = H;
3331
+ r ? b += ` ${V}` : b += ` ${B}`, y.attr("class", b), y.attr("name", t.name);
3332
+ let x = k();
3333
+ x.x = t.x, x.y = o, x.fill = "#eaeaea", x.width = t.width, x.height = t.height, x.class = "actor", y.append("line").attr("id", "actor-man-torso" + K).attr("x1", t.x + t.width / 2 - 22 * 2.5).attr("y1", u).attr("x2", t.x + t.width / 2 - 15).attr("y2", u), y.append("line").attr("id", "actor-man-arms" + K).attr("x1", t.x + t.width / 2 - 22 * 2.5).attr("y1", u - 10).attr("x2", t.x + t.width / 2 - 22 * 2.5).attr("y2", u + 10), y.append("circle").attr("cx", t.x + t.width / 2).attr("cy", u).attr("r", 22), f === "neo" && y.attr("filter", `url(#${Be(i)})`);
3334
+ let S = a.get(t.name) ?? 0;
3335
+ return U.has(p) ? (y.style("stroke", W(_, S)), y.style("fill", W(g, S))) : y.style("stroke", v), c || (t.height = y.node().getBBox().height + (n.sequence.labelBoxHeight ?? 0)), Y(n, m(t.description))(t.description, y, x.x, c ? c.labelCenterY - x.height / 2 : x.y + 15, x.width, x.height, { class: `actor ${H}` }, n), c || y.attr("transform", "translate(0,21)"), r || (y.attr("data-et", "participant"), y.attr("data-type", "boundary"), y.attr("data-id", t.name)), t.height;
3336
+ }, "drawActorTypeBoundary"), J = /* @__PURE__ */ n(function(e, t, r, i, a) {
3337
+ let o = i ? t.stopy : t.starty, s = t.x + t.width / 2, c = pe(t, r, i, o), l = c ? c.lifelineStartY : o + 80, { theme: u, themeVariables: d } = r, { bkgColorArray: f, borderColorArray: p, actorBorder: h } = d, g = e.append("g").lower();
3338
+ i || (K++, g.append("line").attr("id", "actor" + K).attr("x1", s).attr("y1", l).attr("x2", s).attr("y2", 2e3).attr("class", "actor-line 200").attr("stroke-width", "0.5px").attr("stroke", "#999").attr("name", t.name).attr("data-et", "life-line").attr("data-id", t.name), t.actorCnt = K);
3339
+ let _ = e.append("g"), v = H;
3340
+ i ? v += ` ${V}` : v += ` ${B}`, _.attr("class", v), _.attr("name", t.name), i || _.attr("data-et", "participant").attr("data-type", "actor").attr("data-id", t.name);
3341
+ let y = c ? re / fe : 1, b = /* @__PURE__ */ n((e) => c ? c.glyphBottomY - (de - e) * y : o + e, "gy"), x = /* @__PURE__ */ n((e) => s + e * y, "gx");
3342
+ _.append("line").attr("id", "actor-man-torso" + K).attr("x1", s).attr("y1", b(25)).attr("x2", s).attr("y2", b(45)), _.append("line").attr("id", "actor-man-arms" + K).attr("x1", x(-z / 2)).attr("y1", b(33)).attr("x2", x(z / 2)).attr("y2", b(33)), _.append("line").attr("x1", x(-z / 2)).attr("y1", b(60)).attr("x2", s).attr("y2", b(45)), _.append("line").attr("x1", s).attr("y1", b(45)).attr("x2", x(z / 2 - 2)).attr("y2", b(60));
3343
+ let S = _.append("circle");
3344
+ S.attr("cx", t.x + t.width / 2), S.attr("cy", b(10)), S.attr("r", 15 * y), S.attr("width", t.width), S.attr("height", t.height), c || (t.height = fe);
3345
+ let C = k();
3346
+ C.x = t.x, C.y = o, C.fill = "#eaeaea", C.width = t.width, C.height = t.height, C.class = "actor", C.rx = 3, C.ry = 3;
3347
+ let w = a.get(t.name) ?? 0;
3348
+ return U.has(u) ? (_.style("stroke", W(p, w)), _.style("fill", W(f, w))) : _.style("stroke", h), Y(r, m(t.description))(t.description, _, C.x, c ? c.labelCenterY - C.height / 2 : o + 35, C.width, C.height, { class: `actor ${H}` }, r), t.height;
3349
+ }, "drawActorTypeActor"), De = /* @__PURE__ */ n(async function(e, t, n, r, i, a, o) {
3350
+ let s = o ?? new Map([...a.db.getActors().values()].map((e, t) => [e.name, t]));
3351
+ switch (t.type) {
3352
+ case "actor": return await J(e, t, n, r, s);
3353
+ case "participant": return await xe(e, t, n, r, i, s);
3354
+ case "boundary": return await Ee(e, t, n, r, i, s);
3355
+ case "control": return await we(e, t, n, r, i, s);
3356
+ case "entity": return await Te(e, t, n, r, i, s);
3357
+ case "database": return await q(e, t, n, r, i, s);
3358
+ case "collections": return await Se(e, t, n, r, i, s);
3359
+ case "queue": return await Ce(e, t, n, r, i, s);
3360
+ }
3361
+ }, "drawActor"), Oe = /* @__PURE__ */ n(function(e, t, n) {
3362
+ let r = e.append("g");
3363
+ Me(r, t), t.name && Y(n)(t.name, r, t.x, t.y + n.boxTextMargin + (t.textMaxHeight || 0) / 2, t.width, 0, { class: "text" }, n), r.lower();
3364
+ }, "drawBox"), ke = /* @__PURE__ */ n(function(e) {
3365
+ return e.append("g");
3366
+ }, "anchorElement"), Ae = /* @__PURE__ */ n(function(e, t, n, r, i, a, o) {
3367
+ let { theme: s, themeVariables: c } = r, { bkgColorArray: l, borderColorArray: u, mainBkg: d } = c, f = k(), p = t.anchored, m = t.actor;
3368
+ f.x = t.startx, f.y = t.starty, f.class = "activation" + i % 3, f.width = t.stopx - t.startx, f.height = n - t.starty;
3369
+ let h = he(p, f), g = (o ?? new Map([...a.db.getActors().values()].map((e, t) => [e.name, t]))).get(m) ?? 0;
3370
+ U.has(s) && (h.style("stroke", W(u, g)), h.style("fill", W(l, g) ?? d));
3371
+ }, "drawActivation"), je = /* @__PURE__ */ n(async function(e, t, r, i, a) {
3372
+ let { boxMargin: o, boxTextMargin: s, labelBoxHeight: c, labelBoxWidth: l, messageFontFamily: u, messageFontSize: d, messageFontWeight: f } = i, p = e.append("g").attr("data-et", "control-structure").attr("data-id", "i" + a.id), h = /* @__PURE__ */ n(function(e, t, n, r) {
3373
+ return p.append("line").attr("x1", e).attr("y1", t).attr("x2", n).attr("y2", r).attr("class", "loopLine");
3374
+ }, "drawLoopLine");
3375
+ h(t.startx, t.starty, t.stopx, t.starty), h(t.stopx, t.starty, t.stopx, t.stopy), h(t.startx, t.stopy, t.stopx, t.stopy), h(t.startx, t.starty, t.startx, t.stopy), t.sections !== void 0 && t.sections.forEach(function(e) {
3376
+ h(t.startx, e.y, t.stopx, e.y).style("stroke-dasharray", "3, 3");
3377
+ });
3378
+ let g = T();
3379
+ g.text = r, g.x = t.startx, g.y = t.starty, g.fontFamily = u, g.fontSize = d, g.fontWeight = f, g.anchor = "middle", g.valign = "middle", g.tspan = !1, g.width = Math.max(l ?? 0, 50), g.height = c + (i.look === "neo" ? 15 : 0) || 20, g.textMargin = s, g.class = "labelText", ye(p, g), g = He(), g.text = t.title, g.x = t.startx + l / 2 + (t.stopx - t.startx) / 2, g.y = t.starty + o + s, g.anchor = "middle", g.valign = "middle", g.textMargin = s, g.class = "loopText", g.fontFamily = u, g.fontSize = d, g.fontWeight = f, g.wrap = !0;
3380
+ let _ = m(g.text) ? await ve(p, g, t) : G(p, g);
3381
+ if (t.sectionTitles !== void 0) {
3382
+ for (let [e, n] of Object.entries(t.sectionTitles)) if (n.message) {
3383
+ g.text = n.message, g.x = t.startx + (t.stopx - t.startx) / 2, g.y = t.sections[e].y + o + s, g.class = "sectionTitle", g.anchor = "middle", g.valign = "middle", g.tspan = !1, g.fontFamily = u, g.fontSize = d, g.fontWeight = f, g.wrap = t.wrap, m(g.text) ? (t.starty = t.sections[e].y, await ve(p, g, t)) : G(p, g);
3384
+ let r = Math.round(_.map((e) => (e._groups || e)[0][0].getBBox().height).reduce((e, t) => e + t));
3385
+ t.sections[e].height += r - (o + s);
3386
+ }
3387
+ }
3388
+ return t.height = Math.round(t.stopy - t.starty), p;
3389
+ }, "drawLoop"), Me = /* @__PURE__ */ n(function(e, t) {
3390
+ D(e, t);
3391
+ }, "drawBackgroundRect"), Ne = /* @__PURE__ */ n(function(e, t) {
3392
+ e.append("defs").append("symbol").attr("id", t + "-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");
3393
+ }, "insertDatabaseIcon"), Pe = /* @__PURE__ */ n(function(e, t) {
3394
+ e.append("defs").append("symbol").attr("id", t + "-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");
3395
+ }, "insertComputerIcon"), Fe = /* @__PURE__ */ n(function(e, t) {
3396
+ e.append("defs").append("symbol").attr("id", t + "-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");
3397
+ }, "insertClockIcon"), Ie = /* @__PURE__ */ n(function(e, t) {
3398
+ e.append("defs").append("marker").attr("id", t + "-arrowhead").attr("refX", 7.9).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M -1 0 L 10 5 L 0 10 z");
3399
+ }, "insertArrowHead"), Le = /* @__PURE__ */ n(function(e, t) {
3400
+ e.append("defs").append("marker").attr("id", t + "-filled-head").attr("refX", 15.5).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");
3401
+ }, "insertArrowFilledHead"), Re = /* @__PURE__ */ n(function(e, t) {
3402
+ e.append("defs").append("marker").attr("id", t + "-sequencenumber").attr("refX", 15).attr("refY", 15).attr("markerWidth", 60).attr("markerHeight", 40).attr("orient", "auto").append("circle").attr("cx", 15).attr("cy", 15).attr("r", 6);
3403
+ }, "insertSequenceNumber"), ze = /* @__PURE__ */ n(function(e, t) {
3404
+ e.append("defs").append("marker").attr("id", t + "-crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 4).attr("refY", 4.5).append("path").attr("fill", "none").attr("stroke", "#000000").style("stroke-dasharray", "0, 0").attr("stroke-width", "1pt").attr("d", "M 1,2 L 6,7 M 6,2 L 1,7");
3405
+ }, "insertArrowCrossHead"), Be = /* @__PURE__ */ n((e) => e ? `${e}-drop-shadow` : "drop-shadow", "dropShadowId"), Ve = /* @__PURE__ */ n(function(e, t, n) {
3406
+ let { theme: r } = t;
3407
+ e.append("defs").append("filter").attr("id", Be(n)).attr("height", "130%").attr("width", "130%").append("feDropShadow").attr("dx", "4").attr("dy", "4").attr("stdDeviation", 0).attr("flood-opacity", "0.06").attr("flood-color", `${r === "redux" || r === "redux-color" ? "#000000" : "#FFFFFF"}`);
3408
+ }, "insertDropShadow"), He = /* @__PURE__ */ n(function() {
3409
+ return {
3410
+ x: 0,
3411
+ y: 0,
3412
+ fill: void 0,
3413
+ anchor: void 0,
3414
+ style: "#666",
3415
+ width: void 0,
3416
+ height: void 0,
3417
+ textMargin: 0,
3418
+ rx: 0,
3419
+ ry: 0,
3420
+ tspan: !0,
3421
+ valign: void 0
3422
+ };
3423
+ }, "getTextObj"), Ue = /* @__PURE__ */ n(function() {
3424
+ return {
3425
+ x: 0,
3426
+ y: 0,
3427
+ fill: "#EDF2AE",
3428
+ stroke: "#666",
3429
+ width: 100,
3430
+ anchor: "start",
3431
+ height: 100,
3432
+ rx: 0,
3433
+ ry: 0
3434
+ };
3435
+ }, "getNoteRect"), Y = /* @__PURE__ */ (function() {
3436
+ function e(e, t, n, r, i, a, s) {
3437
+ o(t.append("text").attr("x", n + i / 2).attr("y", r + a / 2 + 5).style("text-anchor", "middle").text(e), s);
3438
+ }
3439
+ n(e, "byText");
3440
+ function t(e, t, n, r, i, a, s, c) {
3441
+ let { actorFontSize: l, actorFontFamily: u, actorFontWeight: d } = c, [f, p] = C(l), m = e.split(_.lineBreakRegex);
3442
+ for (let e = 0; e < m.length; e++) {
3443
+ let c = e * f - f * (m.length - 1) / 2, l = t.append("text").attr("x", n + i / 2).attr("y", r).style("text-anchor", "middle").style("font-size", p).style("font-weight", d).style("font-family", u);
3444
+ l.append("tspan").attr("x", n + i / 2).attr("dy", c).text(m[e]), l.attr("y", r + a / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), o(l, s);
3445
+ }
3446
+ }
3447
+ n(t, "byTspan");
3448
+ function r(e, n, r, i, a, s, c, l) {
3449
+ let u = n.append("switch"), d = u.append("foreignObject").attr("x", r).attr("y", i).attr("width", a).attr("height", s).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
3450
+ d.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), t(e, u, r, i, a, s, c, l), o(d, c);
3451
+ }
3452
+ n(r, "byFo");
3453
+ async function i(e, n, r, i, s, c, l, u) {
3454
+ let d = await p(e, y()), f = n.append("switch"), m = f.append("foreignObject").attr("x", r + s / 2 - d.width / 2).attr("y", i + c / 2 - d.height / 2).attr("width", d.width).attr("height", d.height).append("xhtml:div").style("height", "100%").style("width", "100%");
3455
+ m.append("div").style("text-align", "center").style("vertical-align", "middle").html(await a(e, y())), t(e, f, r, i, s, c, l, u), o(m, l);
3456
+ }
3457
+ n(i, "byKatex");
3458
+ function o(e, t) {
3459
+ for (let n in t) t.hasOwnProperty(n) && e.attr(n, t[n]);
3460
+ }
3461
+ return n(o, "_setTextAttrs"), function(n, a = !1) {
3462
+ return a ? i : n.textPlacement === "fo" ? r : n.textPlacement === "old" ? e : t;
3463
+ };
3464
+ })(), We = /* @__PURE__ */ (function() {
3465
+ function e(e, t, n, r, a, o, s) {
3466
+ i(t.append("text").attr("x", n).attr("y", r).style("text-anchor", "start").text(e), s);
3467
+ }
3468
+ n(e, "byText");
3469
+ function t(e, t, n, r, a, o, s, c) {
3470
+ let { actorFontSize: l, actorFontFamily: u, actorFontWeight: d } = c, f = e.split(_.lineBreakRegex);
3471
+ for (let e = 0; e < f.length; e++) {
3472
+ let a = e * l - l * (f.length - 1) / 2, c = t.append("text").attr("x", n).attr("y", r).style("text-anchor", "start").style("font-size", l).style("font-weight", d).style("font-family", u);
3473
+ c.append("tspan").attr("x", n).attr("dy", a).text(f[e]), c.attr("y", r + o / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), i(c, s);
3474
+ }
3475
+ }
3476
+ n(t, "byTspan");
3477
+ function r(e, n, r, a, o, s, c, l) {
3478
+ let u = n.append("switch"), d = u.append("foreignObject").attr("x", r).attr("y", a).attr("width", o).attr("height", s).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
3479
+ d.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(e), t(e, u, r, a, o, s, c, l), i(d, c);
3480
+ }
3481
+ n(r, "byFo");
3482
+ function i(e, t) {
3483
+ for (let n in t) t.hasOwnProperty(n) && e.attr(n, t[n]);
3484
+ }
3485
+ return n(i, "_setTextAttrs"), function(n) {
3486
+ return n.textPlacement === "fo" ? r : n.textPlacement === "old" ? e : t;
3487
+ };
3488
+ })(), X = {
3489
+ drawRect: he,
3490
+ drawText: G,
3491
+ drawLabel: ye,
3492
+ drawActor: De,
3493
+ drawBox: Oe,
3494
+ drawPopup: ge,
3495
+ anchorElement: ke,
3496
+ drawActivation: Ae,
3497
+ drawLoop: je,
3498
+ drawBackgroundRect: Me,
3499
+ insertArrowHead: Ie,
3500
+ insertArrowFilledHead: Le,
3501
+ insertSequenceNumber: Re,
3502
+ insertArrowCrossHead: ze,
3503
+ insertDatabaseIcon: Ne,
3504
+ insertComputerIcon: Pe,
3505
+ insertClockIcon: Fe,
3506
+ getTextObj: He,
3507
+ getNoteRect: Ue,
3508
+ fixLifeLineHeights: be,
3509
+ sanitizeUrl: N.sanitizeUrl,
3510
+ insertDropShadow: Ve,
3511
+ insertSolidTopArrowHead: /* @__PURE__ */ n(function(e, t) {
3512
+ e.append("defs").append("marker").attr("id", t + "-solidTopArrowHead").attr("refX", 7.9).attr("refY", 7.25).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 10 8 L 0 8 z");
3513
+ }, "insertSolidTopArrowHead"),
3514
+ insertSolidBottomArrowHead: /* @__PURE__ */ n(function(e, t) {
3515
+ e.append("defs").append("marker").attr("id", t + "-solidBottomArrowHead").attr("refX", 7.9).attr("refY", .75).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 10 0 L 0 8 z");
3516
+ }, "insertSolidBottomArrowHead"),
3517
+ insertStickTopArrowHead: /* @__PURE__ */ n(function(e, t) {
3518
+ e.append("defs").append("marker").attr("id", t + "-stickTopArrowHead").attr("refX", 7.5).attr("refY", 7).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 7 7").attr("stroke", "black").attr("stroke-width", 1.5).attr("fill", "none");
3519
+ }, "insertStickTopArrowHead"),
3520
+ insertStickBottomArrowHead: /* @__PURE__ */ n(function(e, t) {
3521
+ e.append("defs").append("marker").attr("id", t + "-stickBottomArrowHead").attr("refX", 7.5).attr("refY", 0).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 7 L 7 0").attr("stroke", "black").attr("stroke-width", 1.5).attr("fill", "none");
3522
+ }, "insertStickBottomArrowHead")
3523
+ }, Z = {}, Q = {
3524
+ data: {
3525
+ startx: void 0,
3526
+ stopx: void 0,
3527
+ starty: void 0,
3528
+ stopy: void 0
3529
+ },
3530
+ verticalPos: 0,
3531
+ sequenceItems: [],
3532
+ activations: [],
3533
+ models: {
3534
+ getHeight: /* @__PURE__ */ n(function() {
3535
+ return Math.max.apply(null, this.actors.length === 0 ? [0] : this.actors.map((e) => e.height || 0)) + (this.loops.length === 0 ? 0 : this.loops.map((e) => e.height || 0).reduce((e, t) => e + t)) + (this.messages.length === 0 ? 0 : this.messages.map((e) => e.height || 0).reduce((e, t) => e + t)) + (this.notes.length === 0 ? 0 : this.notes.map((e) => e.height || 0).reduce((e, t) => e + t));
3536
+ }, "getHeight"),
3537
+ clear: /* @__PURE__ */ n(function() {
3538
+ this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
3539
+ }, "clear"),
3540
+ addBox: /* @__PURE__ */ n(function(e) {
3541
+ this.boxes.push(e);
3542
+ }, "addBox"),
3543
+ addActor: /* @__PURE__ */ n(function(e) {
3544
+ this.actors.push(e);
3545
+ }, "addActor"),
3546
+ addLoop: /* @__PURE__ */ n(function(e) {
3547
+ this.loops.push(e);
3548
+ }, "addLoop"),
3549
+ addMessage: /* @__PURE__ */ n(function(e) {
3550
+ this.messages.push(e);
3551
+ }, "addMessage"),
3552
+ addNote: /* @__PURE__ */ n(function(e) {
3553
+ this.notes.push(e);
3554
+ }, "addNote"),
3555
+ lastActor: /* @__PURE__ */ n(function() {
3556
+ return this.actors[this.actors.length - 1];
3557
+ }, "lastActor"),
3558
+ lastLoop: /* @__PURE__ */ n(function() {
3559
+ return this.loops[this.loops.length - 1];
3560
+ }, "lastLoop"),
3561
+ lastMessage: /* @__PURE__ */ n(function() {
3562
+ return this.messages[this.messages.length - 1];
3563
+ }, "lastMessage"),
3564
+ lastNote: /* @__PURE__ */ n(function() {
3565
+ return this.notes[this.notes.length - 1];
3566
+ }, "lastNote"),
3567
+ actors: [],
3568
+ boxes: [],
3569
+ loops: [],
3570
+ messages: [],
3571
+ notes: []
3572
+ },
3573
+ init: /* @__PURE__ */ n(function() {
3574
+ this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
3575
+ startx: void 0,
3576
+ stopx: void 0,
3577
+ starty: void 0,
3578
+ stopy: void 0
3579
+ }, this.verticalPos = 0, tt(d());
3580
+ }, "init"),
3581
+ updateVal: /* @__PURE__ */ n(function(e, t, n, r) {
3582
+ e[t] === void 0 ? e[t] = n : e[t] = r(n, e[t]);
3583
+ }, "updateVal"),
3584
+ updateBounds: /* @__PURE__ */ n(function(e, t, r, i) {
3585
+ let a = this, o = 0;
3586
+ function s(s) {
3587
+ return /* @__PURE__ */ n(function(n) {
3588
+ o++;
3589
+ let c = a.sequenceItems.length - o + 1;
3590
+ a.updateVal(n, "starty", t - c * Z.boxMargin, Math.min), a.updateVal(n, "stopy", i + c * Z.boxMargin, Math.max), a.updateVal(Q.data, "startx", e - c * Z.boxMargin, Math.min), a.updateVal(Q.data, "stopx", r + c * Z.boxMargin, Math.max), s !== "activation" && (a.updateVal(n, "startx", e - c * Z.boxMargin, Math.min), a.updateVal(n, "stopx", r + c * Z.boxMargin, Math.max), a.updateVal(Q.data, "starty", t - c * Z.boxMargin, Math.min), a.updateVal(Q.data, "stopy", i + c * Z.boxMargin, Math.max));
3591
+ }, "updateItemBounds");
3592
+ }
3593
+ n(s, "updateFn"), this.sequenceItems.forEach(s()), this.activations.forEach(s("activation"));
3594
+ }, "updateBounds"),
3595
+ insert: /* @__PURE__ */ n(function(e, t, n, r) {
3596
+ let i = _.getMin(e, n), a = _.getMax(e, n), o = _.getMin(t, r), s = _.getMax(t, r);
3597
+ this.updateVal(Q.data, "startx", i, Math.min), this.updateVal(Q.data, "starty", o, Math.min), this.updateVal(Q.data, "stopx", a, Math.max), this.updateVal(Q.data, "stopy", s, Math.max), this.updateBounds(i, o, a, s);
3598
+ }, "insert"),
3599
+ newActivation: /* @__PURE__ */ n(function(e, t, n) {
3600
+ let r = n.get(e.from), i = nt(e.from).length || 0, a = r.x + r.width / 2 + (i - 1) * Z.activationWidth / 2;
3601
+ this.activations.push({
3602
+ startx: a,
3603
+ starty: this.verticalPos + 2,
3604
+ stopx: a + Z.activationWidth,
3605
+ stopy: void 0,
3606
+ actor: e.from,
3607
+ anchored: X.anchorElement(t)
3608
+ });
3609
+ }, "newActivation"),
3610
+ endActivation: /* @__PURE__ */ n(function(e) {
3611
+ let t = this.activations.map(function(e) {
3612
+ return e.actor;
3613
+ }).lastIndexOf(e.from);
3614
+ return this.activations.splice(t, 1)[0];
3615
+ }, "endActivation"),
3616
+ createLoop: /* @__PURE__ */ n(function(e = {
3617
+ message: void 0,
3618
+ wrap: !1,
3619
+ width: void 0
3620
+ }, t) {
3621
+ return {
3622
+ startx: void 0,
3623
+ starty: this.verticalPos,
3624
+ stopx: void 0,
3625
+ stopy: void 0,
3626
+ title: e.message,
3627
+ wrap: e.wrap,
3628
+ width: e.width,
3629
+ height: 0,
3630
+ fill: t
3631
+ };
3632
+ }, "createLoop"),
3633
+ newLoop: /* @__PURE__ */ n(function(e = {
3634
+ message: void 0,
3635
+ wrap: !1,
3636
+ width: void 0
3637
+ }, t) {
3638
+ this.sequenceItems.push(this.createLoop(e, t));
3639
+ }, "newLoop"),
3640
+ endLoop: /* @__PURE__ */ n(function() {
3641
+ return this.sequenceItems.pop();
3642
+ }, "endLoop"),
3643
+ isLoopOverlap: /* @__PURE__ */ n(function() {
3644
+ return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : !1;
3645
+ }, "isLoopOverlap"),
3646
+ addSectionToLoop: /* @__PURE__ */ n(function(e) {
3647
+ let t = this.sequenceItems.pop();
3648
+ t.sections = t.sections || [], t.sectionTitles = t.sectionTitles || [], t.sections.push({
3649
+ y: Q.getVerticalPos(),
3650
+ height: 0
3651
+ }), t.sectionTitles.push(e), this.sequenceItems.push(t);
3652
+ }, "addSectionToLoop"),
3653
+ saveVerticalPos: /* @__PURE__ */ n(function() {
3654
+ this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
3655
+ }, "saveVerticalPos"),
3656
+ resetVerticalPos: /* @__PURE__ */ n(function() {
3657
+ this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
3658
+ }, "resetVerticalPos"),
3659
+ bumpVerticalPos: /* @__PURE__ */ n(function(e) {
3660
+ this.verticalPos += e, this.data.stopy = _.getMax(this.data.stopy, this.verticalPos);
3661
+ }, "bumpVerticalPos"),
3662
+ getVerticalPos: /* @__PURE__ */ n(function() {
3663
+ return this.verticalPos;
3664
+ }, "getVerticalPos"),
3665
+ getBounds: /* @__PURE__ */ n(function() {
3666
+ return {
3667
+ bounds: this.data,
3668
+ models: this.models
3669
+ };
3670
+ }, "getBounds")
3671
+ }, Ge = /* @__PURE__ */ n(async function(e, t, n) {
3672
+ Q.bumpVerticalPos(Z.boxMargin), t.height = Z.boxMargin, t.starty = Q.getVerticalPos();
3673
+ let r = k();
3674
+ r.x = t.startx, r.y = t.starty, r.width = t.width || Z.width, r.class = "note";
3675
+ let i = e.append("g");
3676
+ i.attr("data-et", "note"), i.attr("data-id", "i" + n);
3677
+ let a = X.drawRect(i, r), o = T();
3678
+ o.x = t.startx, o.y = t.starty, o.width = r.width, o.dy = "1em", o.text = t.message, o.class = "noteText", o.fontFamily = Z.noteFontFamily, o.fontSize = Z.noteFontSize, o.fontWeight = Z.noteFontWeight, o.anchor = Z.noteAlign, o.textMargin = Z.noteMargin, o.valign = "center";
3679
+ let s = m(o.text) ? await ve(i, o) : G(i, o), c = Math.round(s.map((e) => (e._groups || e)[0][0].getBBox().height).reduce((e, t) => e + t));
3680
+ a.attr("height", c + 2 * Z.noteMargin), t.height += c + 2 * Z.noteMargin, Q.bumpVerticalPos(c + 2 * Z.noteMargin), t.stopy = t.starty + c + 2 * Z.noteMargin, t.stopx = t.startx + r.width, Q.insert(t.startx, t.starty, t.stopx, t.stopy), Q.models.addNote(t);
3681
+ }, "drawNote"), Ke = /* @__PURE__ */ n(function(e, t, r, i, a, o, s) {
3682
+ let c = i.db.getActors(), l = c.get(t.from), u = c.get(t.to), d = r.sequenceVisible, f = l.x + l.width / 2, p = u.x + u.width / 2, m = f <= p, h = mt(t, i), g = e.append("g"), _ = /* @__PURE__ */ n((e, t) => {
3683
+ let n = e ? 16.5 : -16.5;
3684
+ return t ? -n : n;
3685
+ }, "getCircleOffset"), v = /* @__PURE__ */ n((e) => {
3686
+ g.append("circle").attr("cx", e).attr("cy", s).attr("r", 5).attr("width", 10).attr("height", 10);
3687
+ }, "drawCircle"), { CENTRAL_CONNECTION: y, CENTRAL_CONNECTION_REVERSE: b, CENTRAL_CONNECTION_DUAL: x } = i.db.LINETYPE;
3688
+ if (d) switch (t.centralConnection) {
3689
+ case y:
3690
+ h && (p += _(m, !0));
3691
+ break;
3692
+ case b:
3693
+ h || (f += _(m, !1));
3694
+ break;
3695
+ case x:
3696
+ h ? p += _(m, !0) : f += _(m, !1);
3697
+ break;
3698
+ }
3699
+ switch (t.centralConnection) {
3700
+ case y:
3701
+ v(p);
3702
+ break;
3703
+ case b:
3704
+ v(f);
3705
+ break;
3706
+ case x:
3707
+ v(f), v(p);
3708
+ break;
3709
+ }
3710
+ }, "drawCentralConnection"), qe = /* @__PURE__ */ n((e) => ({
3711
+ fontFamily: e.messageFontFamily,
3712
+ fontSize: e.messageFontSize,
3713
+ fontWeight: e.messageFontWeight
3714
+ }), "messageFont"), Je = /* @__PURE__ */ n((e) => ({
3715
+ fontFamily: e.noteFontFamily,
3716
+ fontSize: e.noteFontSize,
3717
+ fontWeight: e.noteFontWeight
3718
+ }), "noteFont"), Ye = /* @__PURE__ */ n((e) => ({
3719
+ fontFamily: e.actorFontFamily,
3720
+ fontSize: e.actorFontSize,
3721
+ fontWeight: e.actorFontWeight
3722
+ }), "actorFont");
3723
+ async function Xe(e, t) {
3724
+ Q.bumpVerticalPos(10);
3725
+ let { startx: n, stopx: r, message: i } = t, a = _.splitBreaks(i).length, o = m(i), s = o ? await p(i, d()) : S.calculateTextDimensions(i, qe(Z));
3726
+ if (!o) {
3727
+ let e = s.height / a;
3728
+ t.height += e, Q.bumpVerticalPos(e);
3729
+ }
3730
+ let c, l = s.height - 10, u = s.width;
3731
+ if (n === r) {
3732
+ c = Q.getVerticalPos() + l, Z.rightAngles || (l += Z.boxMargin, c = Q.getVerticalPos() + l), l += 30;
3733
+ let e = _.getMax(u / 2, Z.width / 2);
3734
+ Q.insert(n - e, Q.getVerticalPos() - 10 + l, r + e, Q.getVerticalPos() + 30 + l);
3735
+ } else l += Z.boxMargin, c = Q.getVerticalPos() + l, Q.insert(n, c - 10, r, c);
3736
+ return Q.bumpVerticalPos(l), t.height += l, t.stopy = t.starty + t.height, Q.insert(t.fromBounds, t.starty, t.toBounds, t.stopy), c;
3737
+ }
3738
+ n(Xe, "boundMessage");
3739
+ var Ze = /* @__PURE__ */ n(async function(e, t, n, r, a, o) {
3740
+ let { startx: s, stopx: c, starty: l, message: u, type: d, sequenceIndex: f, sequenceVisible: p } = t, h = S.calculateTextDimensions(u, qe(Z)), g = T();
3741
+ g.x = Math.min(s, c), g.y = l + 10, g.width = Math.abs(c - s), g.class = "messageText", g.dy = "1em", g.text = u, g.fontFamily = Z.messageFontFamily, g.fontSize = Z.messageFontSize, g.fontWeight = Z.messageFontWeight, g.anchor = Z.messageAlign, g.valign = "center", g.textMargin = Z.wrapPadding, g.tspan = !1, m(g.text) ? await ve(e, g, {
3742
+ startx: s,
3743
+ stopx: c,
3744
+ starty: n
3745
+ }) : G(e, g);
3746
+ let v = h.width, y;
3747
+ if (s === c) {
3748
+ let i = p || Z.showSequenceNumbers, o = mt(a, r), l = ht(a, r), u = s + (i && (o || l) ? 10 : 0);
3749
+ y = Z.rightAngles ? e.append("path").attr("d", `M ${u},${n} H ${s + _.getMax(Z.width / 2, v / 2)} V ${n + 25} H ${s}`) : e.append("path").attr("d", "M " + u + "," + n + " C " + (u + 60) + "," + (n - 10) + " " + (s + 60) + "," + (n + 30) + " " + s + "," + (n + 20)), ft(a, r) && Ke(e, a, t, r, s, c, n);
3750
+ } else y = e.append("line"), y.attr("x1", s), y.attr("y1", n), y.attr("x2", c), y.attr("y2", n), ft(a, r) && Ke(e, a, t, r, s, c, n);
3751
+ d === r.db.LINETYPE.DOTTED || d === r.db.LINETYPE.DOTTED_CROSS || d === r.db.LINETYPE.DOTTED_POINT || d === r.db.LINETYPE.DOTTED_OPEN || d === r.db.LINETYPE.BIDIRECTIONAL_DOTTED || d === r.db.LINETYPE.SOLID_TOP_DOTTED || d === r.db.LINETYPE.SOLID_BOTTOM_DOTTED || d === r.db.LINETYPE.STICK_TOP_DOTTED || d === r.db.LINETYPE.STICK_BOTTOM_DOTTED || d === r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED || d === r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED || d === r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED || d === r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED ? (y.style("stroke-dasharray", "3, 3"), y.attr("class", "messageLine1")) : y.attr("class", "messageLine0"), y.attr("data-et", "message"), y.attr("data-id", "i" + t.id), y.attr("data-from", t.from), y.attr("data-to", t.to);
3752
+ let b = "";
3753
+ if (Z.arrowMarkerAbsolute && (b = i(!0)), y.attr("stroke-width", 2), y.attr("stroke", "none"), y.style("fill", "none"), (d === r.db.LINETYPE.SOLID_TOP || d === r.db.LINETYPE.SOLID_TOP_DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-solidTopArrowHead)"), (d === r.db.LINETYPE.SOLID_BOTTOM || d === r.db.LINETYPE.SOLID_BOTTOM_DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-solidBottomArrowHead)"), (d === r.db.LINETYPE.STICK_TOP || d === r.db.LINETYPE.STICK_TOP_DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-stickTopArrowHead)"), (d === r.db.LINETYPE.STICK_BOTTOM || d === r.db.LINETYPE.STICK_BOTTOM_DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-stickBottomArrowHead)"), (d === r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE || d === r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED) && y.attr("marker-start", "url(" + b + "#" + o + "-solidBottomArrowHead)"), (d === r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE || d === r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED) && y.attr("marker-start", "url(" + b + "#" + o + "-solidTopArrowHead)"), (d === r.db.LINETYPE.STICK_ARROW_TOP_REVERSE || d === r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED) && y.attr("marker-start", "url(" + b + "#" + o + "-stickBottomArrowHead)"), (d === r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE || d === r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED) && y.attr("marker-start", "url(" + b + "#" + o + "-stickTopArrowHead)"), (d === r.db.LINETYPE.SOLID || d === r.db.LINETYPE.DOTTED) && y.attr("marker-end", "url(" + b + "#" + o + "-arrowhead)"), (d === r.db.LINETYPE.BIDIRECTIONAL_SOLID || d === r.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (y.attr("marker-start", "url(" + b + "#" + o + "-arrowhead)"), y.attr("marker-end", "url(" + b + "#" + o + "-arrowhead)")), (d === r.db.LINETYPE.SOLID_POINT || d === r.db.LINETYPE.DOTTED_POINT) && y.attr("marker-end", "url(" + b + "#" + o + "-filled-head)"), (d === r.db.LINETYPE.SOLID_CROSS || d === r.db.LINETYPE.DOTTED_CROSS) && y.attr("marker-end", "url(" + b + "#" + o + "-crosshead)"), p || Z.showSequenceNumbers) {
3754
+ let i = d === r.db.LINETYPE.BIDIRECTIONAL_SOLID || d === r.db.LINETYPE.BIDIRECTIONAL_DOTTED, l = d === r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE || d === r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED || d === r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE || d === r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED || d === r.db.LINETYPE.STICK_ARROW_TOP_REVERSE || d === r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED || d === r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE || d === r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED, u = ft(a, r), p = s, m = c;
3755
+ i ? (s < c ? p = s + 12 : (p = s - 6 + (u ? -5 : 0), p += a?.centralConnection === r.db.LINETYPE.CENTRAL_CONNECTION_DUAL || a?.centralConnection === r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE ? -7.5 : 0), y.attr("x1", p)) : l ? (c > s ? m = c - 12 : (m = c - 6, p += a?.centralConnection === r.db.LINETYPE.CENTRAL_CONNECTION_DUAL || a?.centralConnection === r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE ? -7.5 : 0), m += u ? 15 : 0, y.attr("x2", m), y.attr("x1", p)) : y.attr("x1", s + 6);
3756
+ let h = 0, g = s === c, _ = s <= c;
3757
+ h = g ? t.fromBounds + 1 : l ? _ ? t.toBounds - 1 : t.fromBounds + 1 : _ ? t.fromBounds + 1 : t.toBounds - 1;
3758
+ let v = "12px", x = f.toString().length;
3759
+ x > 5 ? v = "7px" : x > 3 && (v = "9px"), e.append("line").attr("x1", h).attr("y1", n).attr("x2", h).attr("y2", n).attr("stroke-width", 0).attr("marker-start", "url(" + b + "#" + o + "-sequencenumber)"), e.append("text").attr("x", h).attr("y", n + 4).attr("font-family", "sans-serif").attr("font-size", v).attr("text-anchor", "middle").attr("class", "sequenceNumber").text(f);
3760
+ }
3761
+ }, "drawMessage"), Qe = /* @__PURE__ */ n(function(e, t, n, r, i, a, o) {
3762
+ let s = 0, c = 0, l, u = 0;
3763
+ for (let e of r) {
3764
+ let r = t.get(e), a = r.box;
3765
+ l && l != a && (o || Q.models.addBox(l), c += Z.boxMargin + l.margin), a && a != l && (o || (a.x = s + c, a.y = i), c += a.margin), r.width = _.getMax(r.width || Z.width, Z.width), r.height = _.getMax(r.height || Z.height, Z.height), r.margin = r.margin || Z.actorMargin, u = _.getMax(u, r.height), n.get(r.name) && (c += r.width / 2), r.x = s + c, r.starty = Q.getVerticalPos(), Q.insert(r.x, i, r.x + r.width, r.height), s += r.width + c, r.box && (r.box.width = s + a.margin - r.box.x), c = r.margin, l = r.box, Q.models.addActor(r);
3766
+ }
3767
+ l && !o && Q.models.addBox(l), Q.bumpVerticalPos(u);
3768
+ }, "addActorRenderingData"), $e = /* @__PURE__ */ n(async function(e, t, n, r, i, a, o) {
3769
+ if (r) {
3770
+ let r = 0;
3771
+ Q.bumpVerticalPos(Z.boxMargin * 2);
3772
+ for (let s of n) {
3773
+ let n = t.get(s);
3774
+ n.stopy ||= Q.getVerticalPos();
3775
+ let c = await X.drawActor(e, n, Z, !0, i, a, o);
3776
+ r = _.getMax(r, c);
3777
+ }
3778
+ Q.bumpVerticalPos(r + Z.boxMargin);
3779
+ } else for (let r of n) {
3780
+ let n = t.get(r);
3781
+ await X.drawActor(e, n, Z, !1, i, a, o);
3782
+ }
3783
+ }, "drawActors"), et = /* @__PURE__ */ n(function(e, t, n, r) {
3784
+ let i = 0, a = 0;
3785
+ for (let o of n) {
3786
+ let n = t.get(o), s = st(n), c = X.drawPopup(e, n, s, Z, Z.forceMenus, r);
3787
+ c.height > i && (i = c.height), c.width + n.x > a && (a = c.width + n.x);
3788
+ }
3789
+ return {
3790
+ maxHeight: i,
3791
+ maxWidth: a
3792
+ };
3793
+ }, "drawActorsPopup"), tt = /* @__PURE__ */ n(function(e) {
3794
+ g(Z, e), e.fontFamily && (Z.actorFontFamily = Z.noteFontFamily = Z.messageFontFamily = e.fontFamily), e.fontSize && (Z.actorFontSize = Z.noteFontSize = Z.messageFontSize = e.fontSize), e.fontWeight && (Z.actorFontWeight = Z.noteFontWeight = Z.messageFontWeight = e.fontWeight);
3795
+ }, "setConf"), nt = /* @__PURE__ */ n(function(e) {
3796
+ return Q.activations.filter(function(t) {
3797
+ return t.actor === e;
3798
+ });
3799
+ }, "actorActivations"), rt = /* @__PURE__ */ n(function(e, t) {
3800
+ let n = t.get(e), r = nt(e);
3801
+ return [r.reduce(function(e, t) {
3802
+ return _.getMin(e, t.startx);
3803
+ }, n.x + n.width / 2 - 1), r.reduce(function(e, t) {
3804
+ return _.getMax(e, t.stopx);
3805
+ }, n.x + n.width / 2 + 1)];
3806
+ }, "activationBounds");
3807
+ function $(t, n, r, i, a) {
3808
+ Q.bumpVerticalPos(r);
3809
+ let o = i;
3810
+ if (n.id && n.message && t[n.id]) {
3811
+ let r = t[n.id].width, a = qe(Z);
3812
+ n.message = S.wrapLabel(`[${n.message}]`, r - 2 * Z.wrapPadding, a), n.width = r, n.wrap = !0;
3813
+ let s = S.calculateTextDimensions(n.message, a), c = _.getMax(s.height, Z.labelBoxHeight);
3814
+ o = i + c, e.debug(`${c} - ${n.message}`);
3815
+ }
3816
+ a(n), Q.bumpVerticalPos(o);
3817
+ }
3818
+ n($, "adjustLoopHeightForWrap");
3819
+ function it(e, t, r, i, a, o, s) {
3820
+ function c(n, r) {
3821
+ n.x < a.get(e.from).x ? (Q.insert(t.stopx - r, t.starty, t.startx, t.stopy + n.height / 2 + Z.noteMargin), t.stopx += r) : (Q.insert(t.startx, t.starty, t.stopx + r, t.stopy + n.height / 2 + Z.noteMargin), t.stopx -= r);
3822
+ }
3823
+ n(c, "receiverAdjustment");
3824
+ function l(n, r) {
3825
+ n.x < a.get(e.to).x ? (Q.insert(t.startx - r, t.starty, t.stopx, t.stopy + n.height / 2 + Z.noteMargin), t.startx += r) : (Q.insert(t.stopx, t.starty, t.startx + r, t.stopy + n.height / 2 + Z.noteMargin), t.startx -= r);
3826
+ }
3827
+ n(l, "senderAdjustment");
3828
+ let u = [
3829
+ R.ACTOR,
3830
+ R.CONTROL,
3831
+ R.ENTITY,
3832
+ R.DATABASE
3833
+ ];
3834
+ if (o.get(e.to) == i) {
3835
+ let t = a.get(e.to);
3836
+ c(t, u.includes(t.type) ? z / 2 + 3 : t.width / 2 + 3), t.starty = r - t.height / 2, Q.bumpVerticalPos(t.height / 2);
3837
+ } else if (s.get(e.from) == i) {
3838
+ let t = a.get(e.from);
3839
+ Z.mirrorActors && l(t, u.includes(t.type) ? z / 2 : t.width / 2), t.stopy = r - t.height / 2, Q.bumpVerticalPos(t.height / 2);
3840
+ } else if (s.get(e.to) == i) {
3841
+ let t = a.get(e.to);
3842
+ Z.mirrorActors && c(t, u.includes(t.type) ? z / 2 + 3 : t.width / 2 + 3), t.stopy = r - t.height / 2, Q.bumpVerticalPos(t.height / 2);
3843
+ }
3844
+ }
3845
+ n(it, "adjustCreatedDestroyedData");
3846
+ var at = /* @__PURE__ */ n(async function(r, i, a, o) {
3847
+ let { securityLevel: s, sequence: c, look: l, themeVariables: u } = d();
3848
+ Z = c;
3849
+ let p;
3850
+ s === "sandbox" && (p = t("#i" + i));
3851
+ let m = t(s === "sandbox" ? p.nodes()[0].contentDocument.body : "body"), h = s === "sandbox" ? p.nodes()[0].contentDocument : document;
3852
+ Q.init(), e.debug(o.db);
3853
+ let g = s === "sandbox" ? m.select(`[id="${i}"]`) : t(`[id="${i}"]`), _ = o.db.getActors(), v = o.db.getCreatedActors(), y = o.db.getDestroyedActors(), b = o.db.getBoxes(), x = o.db.getActorKeys(), S = o.db.getMessages(), C = o.db.getDiagramTitle(), w = o.db.hasAtLeastOneBox(), T = o.db.hasAtLeastOneBoxWithTitle(), E = await ot(_, S, o);
3854
+ if (Z.height = await ct(_, E, b), X.insertComputerIcon(g, i), X.insertDatabaseIcon(g, i), X.insertClockIcon(g, i), w && (Q.bumpVerticalPos(Z.boxMargin), T && Q.bumpVerticalPos(b[0].textMaxHeight)), Z.hideUnusedParticipants === !0) {
3855
+ let e = /* @__PURE__ */ new Set();
3856
+ S.forEach((t) => {
3857
+ e.add(t.from), e.add(t.to);
3858
+ }), x = x.filter((t) => e.has(t));
3859
+ }
3860
+ let D = new Map(x.map((e, t) => [_.get(e)?.name ?? e, t]));
3861
+ Qe(g, _, v, x, 0, S, !1);
3862
+ let O = await _t(S, _, E, o);
3863
+ X.insertArrowHead(g, i), X.insertArrowCrossHead(g, i), X.insertArrowFilledHead(g, i), X.insertSequenceNumber(g, i), X.insertSolidTopArrowHead(g, i), X.insertSolidBottomArrowHead(g, i), X.insertStickTopArrowHead(g, i), X.insertStickBottomArrowHead(g, i), l === "neo" && X.insertDropShadow(g, Z, i);
3864
+ function k(e, t) {
3865
+ let n = Q.endActivation(e);
3866
+ n.starty + 18 > t && (n.starty = t - 6, t += 12), X.drawActivation(g, n, t, Z, nt(e.from).length, o, D), Q.insert(n.startx, t - 10, n.stopx, t);
3867
+ }
3868
+ n(k, "activeEnd");
3869
+ let A = 1, j = 1, M = [], N = [], P = 0;
3870
+ for (let t of S) {
3871
+ let n, r, i;
3872
+ switch (t.type) {
3873
+ case o.db.LINETYPE.NOTE:
3874
+ Q.resetVerticalPos(), r = t.noteModel, await Ge(g, r, t.id);
3875
+ break;
3876
+ case o.db.LINETYPE.ACTIVE_START:
3877
+ Q.newActivation(t, g, _);
3878
+ break;
3879
+ case o.db.LINETYPE.CENTRAL_CONNECTION:
3880
+ Q.newActivation(t, g, _);
3881
+ break;
3882
+ case o.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:
3883
+ Q.newActivation(t, g, _);
3884
+ break;
3885
+ case o.db.LINETYPE.ACTIVE_END:
3886
+ k(t, Q.getVerticalPos());
3887
+ break;
3888
+ case o.db.LINETYPE.LOOP_START:
3889
+ $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3890
+ break;
3891
+ case o.db.LINETYPE.LOOP_END:
3892
+ n = Q.endLoop(), await X.drawLoop(g, n, "loop", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3893
+ break;
3894
+ case o.db.LINETYPE.RECT_START:
3895
+ $(O, t, Z.boxMargin, Z.boxMargin, (e) => {
3896
+ let t = e.message;
3897
+ t ||= u?.rectBkgColor || u?.actorBkg || "rgba(128, 128, 128, 0.5)", Q.newLoop(void 0, t);
3898
+ });
3899
+ break;
3900
+ case o.db.LINETYPE.RECT_END:
3901
+ n = Q.endLoop(), N.push(n), Q.models.addLoop(n), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos());
3902
+ break;
3903
+ case o.db.LINETYPE.OPT_START:
3904
+ $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3905
+ break;
3906
+ case o.db.LINETYPE.OPT_END:
3907
+ n = Q.endLoop(), await X.drawLoop(g, n, "opt", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3908
+ break;
3909
+ case o.db.LINETYPE.ALT_START:
3910
+ $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3911
+ break;
3912
+ case o.db.LINETYPE.ALT_ELSE:
3913
+ $(O, t, Z.boxMargin + Z.boxTextMargin, Z.boxMargin, (e) => Q.addSectionToLoop(e));
3914
+ break;
3915
+ case o.db.LINETYPE.ALT_END:
3916
+ n = Q.endLoop(), await X.drawLoop(g, n, "alt", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3917
+ break;
3918
+ case o.db.LINETYPE.PAR_START:
3919
+ case o.db.LINETYPE.PAR_OVER_START:
3920
+ $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e)), Q.saveVerticalPos();
3921
+ break;
3922
+ case o.db.LINETYPE.PAR_AND:
3923
+ $(O, t, Z.boxMargin + Z.boxTextMargin, Z.boxMargin, (e) => Q.addSectionToLoop(e));
3924
+ break;
3925
+ case o.db.LINETYPE.PAR_END:
3926
+ n = Q.endLoop(), await X.drawLoop(g, n, "par", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3927
+ break;
3928
+ case o.db.LINETYPE.AUTONUMBER:
3929
+ A = t.message.start || A, j = t.message.step || j, t.message.visible ? o.db.enableSequenceNumbers() : o.db.disableSequenceNumbers();
3930
+ break;
3931
+ case o.db.LINETYPE.CRITICAL_START:
3932
+ $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3933
+ break;
3934
+ case o.db.LINETYPE.CRITICAL_OPTION:
3935
+ $(O, t, Z.boxMargin + Z.boxTextMargin, Z.boxMargin, (e) => Q.addSectionToLoop(e));
3936
+ break;
3937
+ case o.db.LINETYPE.CRITICAL_END:
3938
+ n = Q.endLoop(), await X.drawLoop(g, n, "critical", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3939
+ break;
3940
+ case o.db.LINETYPE.BREAK_START:
3941
+ $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3942
+ break;
3943
+ case o.db.LINETYPE.BREAK_END:
3944
+ n = Q.endLoop(), await X.drawLoop(g, n, "break", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3945
+ break;
3946
+ default: try {
3947
+ i = t.msgModel, i.starty = Q.getVerticalPos(), i.sequenceIndex = A, i.sequenceVisible = o.db.showSequenceNumbers(), i.id = t.id, i.from = t.from, i.to = t.to;
3948
+ let e = await Xe(g, i);
3949
+ it(t, i, e, P, _, v, y), M.push({
3950
+ messageModel: i,
3951
+ lineStartY: e,
3952
+ msg: t
3953
+ }), Q.models.addMessage(i);
3954
+ } catch (t) {
3955
+ e.error("error while drawing message", t);
3956
+ }
3957
+ }
3958
+ [
3959
+ o.db.LINETYPE.SOLID_OPEN,
3960
+ o.db.LINETYPE.DOTTED_OPEN,
3961
+ o.db.LINETYPE.SOLID,
3962
+ o.db.LINETYPE.SOLID_TOP,
3963
+ o.db.LINETYPE.SOLID_BOTTOM,
3964
+ o.db.LINETYPE.STICK_TOP,
3965
+ o.db.LINETYPE.STICK_BOTTOM,
3966
+ o.db.LINETYPE.SOLID_TOP_DOTTED,
3967
+ o.db.LINETYPE.SOLID_BOTTOM_DOTTED,
3968
+ o.db.LINETYPE.STICK_TOP_DOTTED,
3969
+ o.db.LINETYPE.STICK_BOTTOM_DOTTED,
3970
+ o.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
3971
+ o.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,
3972
+ o.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
3973
+ o.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
3974
+ o.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
3975
+ o.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
3976
+ o.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
3977
+ o.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
3978
+ o.db.LINETYPE.DOTTED,
3979
+ o.db.LINETYPE.SOLID_CROSS,
3980
+ o.db.LINETYPE.DOTTED_CROSS,
3981
+ o.db.LINETYPE.SOLID_POINT,
3982
+ o.db.LINETYPE.DOTTED_POINT,
3983
+ o.db.LINETYPE.BIDIRECTIONAL_SOLID,
3984
+ o.db.LINETYPE.BIDIRECTIONAL_DOTTED
3985
+ ].includes(t.type) && (A = Math.round((A + j) * 100) / 100), P++;
3986
+ }
3987
+ e.debug("createdActors", v), e.debug("destroyedActors", y), await $e(g, _, x, !1, i, o, D);
3988
+ for (let e of M) await Ze(g, e.messageModel, e.lineStartY, o, e.msg, i);
3989
+ Z.mirrorActors && await $e(g, _, x, !0, i, o, D), N.forEach((e) => X.drawBackgroundRect(g, e)), be(g, _, x, Z);
3990
+ for (let e of Q.models.boxes) {
3991
+ e.height = Q.getVerticalPos() - e.y, Q.insert(e.x, e.y, e.x + e.width, e.height);
3992
+ let t = Z.boxMargin * 2;
3993
+ e.startx = e.x - t, e.starty = e.y - t * .25, e.stopx = e.startx + e.width + 2 * t, e.stopy = e.starty + e.height + t * .75, e.stroke = "rgb(0,0,0, 0.5)", X.drawBox(g, e, Z);
3994
+ }
3995
+ w && Q.bumpVerticalPos(Z.boxMargin);
3996
+ let F = et(g, _, x, h), { bounds: I } = Q.getBounds();
3997
+ I.startx === void 0 && (I.startx = 0), I.starty === void 0 && (I.starty = 0), I.stopx === void 0 && (I.stopx = 0), I.stopy === void 0 && (I.stopy = 0);
3998
+ let L = I.stopy - I.starty;
3999
+ L < F.maxHeight && (L = F.maxHeight);
4000
+ let ee = L + 2 * Z.diagramMarginY;
4001
+ Z.mirrorActors && (ee = ee - Z.boxMargin + Z.bottomMarginAdj);
4002
+ let R = I.stopx - I.startx;
4003
+ R < F.maxWidth && (R = F.maxWidth);
4004
+ let te = R + 2 * Z.diagramMarginX;
4005
+ C && g.append("text").text(C).attr("x", (I.stopx - I.startx) / 2 - 2 * Z.diagramMarginX).attr("y", -25), f(g, ee, te, Z.useMaxWidth);
4006
+ let ne = C ? 40 : 0, re = _.size && l === "neo" ? 30 : 0;
4007
+ g.attr("viewBox", I.startx - Z.diagramMarginX + " -" + (Z.diagramMarginY + ne) + " " + te + " " + (ee + ne + re)), e.debug("models:", Q.models);
4008
+ }, "draw");
4009
+ async function ot(t, n, r) {
4010
+ let i = {};
4011
+ for (let e of n) if (t.get(e.to) && t.get(e.from)) {
4012
+ let n = t.get(e.to);
4013
+ if (e.placement === r.db.PLACEMENT.LEFTOF && !n.prevActor || e.placement === r.db.PLACEMENT.RIGHTOF && !n.nextActor) continue;
4014
+ let a = e.placement !== void 0, o = !a, s = a ? Je(Z) : qe(Z), c = e.wrap ? S.wrapLabel(e.message, Z.width - 2 * Z.wrapPadding, s) : e.message, l = (m(c) ? await p(e.message, d()) : S.calculateTextDimensions(c, s)).width + 2 * Z.wrapPadding;
4015
+ o && e.from === n.nextActor ? i[e.to] = _.getMax(i[e.to] || 0, l) : o && e.from === n.prevActor ? i[e.from] = _.getMax(i[e.from] || 0, l) : o && e.from === e.to ? (i[e.from] = _.getMax(i[e.from] || 0, l / 2), i[e.to] = _.getMax(i[e.to] || 0, l / 2)) : e.placement === r.db.PLACEMENT.RIGHTOF ? i[e.from] = _.getMax(i[e.from] || 0, l) : e.placement === r.db.PLACEMENT.LEFTOF ? i[n.prevActor] = _.getMax(i[n.prevActor] || 0, l) : e.placement === r.db.PLACEMENT.OVER && (n.prevActor && (i[n.prevActor] = _.getMax(i[n.prevActor] || 0, l / 2)), n.nextActor && (i[e.from] = _.getMax(i[e.from] || 0, l / 2)));
4016
+ }
4017
+ return e.debug("maxMessageWidthPerActor:", i), i;
4018
+ }
4019
+ n(ot, "getMaxMessageWidthPerActor");
4020
+ var st = /* @__PURE__ */ n(function(e) {
4021
+ let t = 0, n = Ye(Z);
4022
+ for (let r in e.links) {
4023
+ let e = S.calculateTextDimensions(r, n).width + 2 * Z.wrapPadding + 2 * Z.boxMargin;
4024
+ t < e && (t = e);
4025
+ }
4026
+ return t;
4027
+ }, "getRequiredPopupWidth");
4028
+ async function ct(e, t, n) {
4029
+ let r = 0;
4030
+ for (let t of e.keys()) {
4031
+ let n = e.get(t);
4032
+ n.wrap && (n.description = S.wrapLabel(n.description, Z.width - 2 * Z.wrapPadding, Ye(Z)));
4033
+ let i = m(n.description) ? await p(n.description, d()) : S.calculateTextDimensions(n.description, Ye(Z));
4034
+ n.width = n.wrap ? Z.width : _.getMax(Z.width, i.width + 2 * Z.wrapPadding), d().look === "neo" ? (n.actorTextHeight = i.height, n.height = _.getMax(se(i.height), Z.height)) : n.height = n.wrap ? _.getMax(i.height, Z.height) : Z.height, r = _.getMax(r, n.height);
4035
+ }
4036
+ for (let n in t) {
4037
+ let r = e.get(n);
4038
+ if (!r) continue;
4039
+ let i = e.get(r.nextActor);
4040
+ if (!i) {
4041
+ let e = t[n] + Z.actorMargin - r.width / 2;
4042
+ r.margin = _.getMax(e, Z.actorMargin);
4043
+ continue;
4044
+ }
4045
+ let a = t[n] + Z.actorMargin - r.width / 2 - i.width / 2;
4046
+ r.margin = _.getMax(a, Z.actorMargin);
4047
+ }
4048
+ let i = 0;
4049
+ return n.forEach((t) => {
4050
+ let n = qe(Z), r = t.actorKeys.reduce((t, n) => t += e.get(n).width + (e.get(n).margin || 0), 0), a = Z.boxMargin * 8;
4051
+ r += a, r -= 2 * Z.boxTextMargin, t.wrap && (t.name = S.wrapLabel(t.name, r - 2 * Z.wrapPadding, n));
4052
+ let o = S.calculateTextDimensions(t.name, n);
4053
+ i = _.getMax(o.height, i);
4054
+ let s = _.getMax(r, o.width + 2 * Z.wrapPadding);
4055
+ if (t.margin = Z.boxTextMargin, r < s) {
4056
+ let e = (s - r) / 2;
4057
+ t.margin += e;
4058
+ }
4059
+ }), n.forEach((e) => e.textMaxHeight = i), _.getMax(r, Z.height);
4060
+ }
4061
+ n(ct, "calculateActorMargins");
4062
+ var lt = /* @__PURE__ */ n(async function(t, n, r) {
4063
+ let i = n.get(t.from), a = n.get(t.to), o = i.x, s = a.x, c = t.wrap && t.message, l = m(t.message) ? await p(t.message, d()) : S.calculateTextDimensions(c ? S.wrapLabel(t.message, Z.width, Je(Z)) : t.message, Je(Z)), u = {
4064
+ width: c ? Z.width : _.getMax(Z.width, l.width + 2 * Z.noteMargin),
4065
+ height: 0,
4066
+ startx: i.x,
4067
+ stopx: 0,
4068
+ starty: 0,
4069
+ stopy: 0,
4070
+ message: t.message
4071
+ };
4072
+ return t.placement === r.db.PLACEMENT.RIGHTOF ? (u.width = c ? _.getMax(Z.width, l.width) : _.getMax(i.width / 2 + a.width / 2, l.width + 2 * Z.noteMargin), u.startx = o + (i.width + Z.actorMargin) / 2) : t.placement === r.db.PLACEMENT.LEFTOF ? (u.width = c ? _.getMax(Z.width, l.width + 2 * Z.noteMargin) : _.getMax(i.width / 2 + a.width / 2, l.width + 2 * Z.noteMargin), u.startx = o - u.width + (i.width - Z.actorMargin) / 2) : t.to === t.from ? (l = S.calculateTextDimensions(c ? S.wrapLabel(t.message, _.getMax(Z.width, i.width), Je(Z)) : t.message, Je(Z)), u.width = c ? _.getMax(Z.width, i.width) : _.getMax(i.width, Z.width, l.width + 2 * Z.noteMargin), u.startx = o + (i.width - u.width) / 2) : (u.width = Math.abs(o + i.width / 2 - (s + a.width / 2)) + Z.actorMargin, u.startx = o < s ? o + i.width / 2 - Z.actorMargin / 2 : s + a.width / 2 - Z.actorMargin / 2), c && (u.message = S.wrapLabel(t.message, u.width - 2 * Z.wrapPadding, Je(Z))), e.debug(`NM:[${u.startx},${u.stopx},${u.starty},${u.stopy}:${u.width},${u.height}=${t.message}]`), u;
4073
+ }, "buildNoteModel"), ut = 4, dt = 6, ft = /* @__PURE__ */ n(function(e, t) {
4074
+ let { CENTRAL_CONNECTION: n, CENTRAL_CONNECTION_REVERSE: r, CENTRAL_CONNECTION_DUAL: i } = t.db.LINETYPE;
4075
+ return [
4076
+ n,
4077
+ r,
4078
+ i
4079
+ ].includes(e.centralConnection);
4080
+ }, "hasCentralConnection"), pt = /* @__PURE__ */ n(function(e, t, n) {
4081
+ let { CENTRAL_CONNECTION_REVERSE: r, CENTRAL_CONNECTION_DUAL: i, BIDIRECTIONAL_SOLID: a, BIDIRECTIONAL_DOTTED: o } = t.db.LINETYPE, s = 0;
4082
+ return (e.centralConnection === r || e.centralConnection === i) && (s += ut), (e.centralConnection === r || e.centralConnection === i) && (e.type === a || e.type === o) && (s += n ? 0 : -dt), s;
4083
+ }, "calculateCentralConnectionOffset"), mt = /* @__PURE__ */ n(function(e, t) {
4084
+ let { SOLID_ARROW_TOP_REVERSE: n, SOLID_ARROW_TOP_REVERSE_DOTTED: r, SOLID_ARROW_BOTTOM_REVERSE: i, SOLID_ARROW_BOTTOM_REVERSE_DOTTED: a, STICK_ARROW_TOP_REVERSE: o, STICK_ARROW_TOP_REVERSE_DOTTED: s, STICK_ARROW_BOTTOM_REVERSE: c, STICK_ARROW_BOTTOM_REVERSE_DOTTED: l } = t.db.LINETYPE;
4085
+ return [
4086
+ n,
4087
+ r,
4088
+ i,
4089
+ a,
4090
+ o,
4091
+ s,
4092
+ c,
4093
+ l
4094
+ ].includes(e.type);
4095
+ }, "isReverseArrowType"), ht = /* @__PURE__ */ n(function(e, t) {
4096
+ let { BIDIRECTIONAL_SOLID: n, BIDIRECTIONAL_DOTTED: r } = t.db.LINETYPE;
4097
+ return [n, r].includes(e.type);
4098
+ }, "isBidirectionalArrowType"), gt = /* @__PURE__ */ n(function(e, t, r) {
4099
+ let { look: i } = d();
4100
+ if (![
4101
+ r.db.LINETYPE.SOLID_OPEN,
4102
+ r.db.LINETYPE.DOTTED_OPEN,
4103
+ r.db.LINETYPE.SOLID,
4104
+ r.db.LINETYPE.SOLID_TOP,
4105
+ r.db.LINETYPE.SOLID_BOTTOM,
4106
+ r.db.LINETYPE.STICK_TOP,
4107
+ r.db.LINETYPE.STICK_BOTTOM,
4108
+ r.db.LINETYPE.SOLID_TOP_DOTTED,
4109
+ r.db.LINETYPE.SOLID_BOTTOM_DOTTED,
4110
+ r.db.LINETYPE.STICK_TOP_DOTTED,
4111
+ r.db.LINETYPE.STICK_BOTTOM_DOTTED,
4112
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4113
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,
4114
+ r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
4115
+ r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
4116
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4117
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4118
+ r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
4119
+ r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
4120
+ r.db.LINETYPE.DOTTED,
4121
+ r.db.LINETYPE.SOLID_CROSS,
4122
+ r.db.LINETYPE.DOTTED_CROSS,
4123
+ r.db.LINETYPE.SOLID_POINT,
4124
+ r.db.LINETYPE.DOTTED_POINT,
4125
+ r.db.LINETYPE.BIDIRECTIONAL_SOLID,
4126
+ r.db.LINETYPE.BIDIRECTIONAL_DOTTED
4127
+ ].includes(e.type)) return {};
4128
+ let [a, o] = rt(e.from, t), [s, c] = rt(e.to, t), l = a <= s, u = l ? o : a, f = l ? s : c;
4129
+ i === "neo" && (e.type !== r.db.LINETYPE.SOLID_OPEN && (f += l ? -3 : 3), (e.type === r.db.LINETYPE.BIDIRECTIONAL_SOLID || e.type === r.db.LINETYPE.BIDIRECTIONAL_DOTTED) && (u += l ? 3 : -3)), u += pt(e, r, l);
4130
+ let p = Math.abs(s - c) > 2, m = /* @__PURE__ */ n((e) => l ? -e : e, "adjustValue");
4131
+ e.from === e.to ? f = u : (e.activate && !p && (f += m(Z.activationWidth / 2 - 1)), [
4132
+ r.db.LINETYPE.SOLID_OPEN,
4133
+ r.db.LINETYPE.DOTTED_OPEN,
4134
+ r.db.LINETYPE.STICK_TOP,
4135
+ r.db.LINETYPE.STICK_BOTTOM,
4136
+ r.db.LINETYPE.STICK_TOP_DOTTED,
4137
+ r.db.LINETYPE.STICK_BOTTOM_DOTTED,
4138
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4139
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4140
+ r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
4141
+ r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
4142
+ r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
4143
+ r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
4144
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4145
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE
4146
+ ].includes(e.type) || (f += m(3)), [
4147
+ r.db.LINETYPE.BIDIRECTIONAL_SOLID,
4148
+ r.db.LINETYPE.BIDIRECTIONAL_DOTTED,
4149
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4150
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4151
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4152
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE
4153
+ ].includes(e.type) && (u -= m(3)));
4154
+ let h = [
4155
+ a,
4156
+ o,
4157
+ s,
4158
+ c
4159
+ ], g = Math.abs(u - f);
4160
+ e.wrap && e.message && (e.message = S.wrapLabel(e.message, _.getMax(g + 2 * Z.wrapPadding, Z.width), qe(Z)));
4161
+ let v = S.calculateTextDimensions(e.message, qe(Z));
4162
+ return {
4163
+ width: _.getMax(e.wrap ? 0 : v.width + 2 * Z.wrapPadding, g + 2 * Z.wrapPadding, Z.width),
4164
+ height: 0,
4165
+ startx: u,
4166
+ stopx: f,
4167
+ starty: 0,
4168
+ stopy: 0,
4169
+ message: e.message,
4170
+ type: e.type,
4171
+ wrap: e.wrap,
4172
+ fromBounds: Math.min.apply(null, h),
4173
+ toBounds: Math.max.apply(null, h)
4174
+ };
4175
+ }, "buildMessageModel"), _t = /* @__PURE__ */ n(async function(t, n, r, i) {
4176
+ let a = {}, o = [], s, c, l;
4177
+ for (let e of t) {
4178
+ switch (e.type) {
4179
+ case i.db.LINETYPE.LOOP_START:
4180
+ case i.db.LINETYPE.ALT_START:
4181
+ case i.db.LINETYPE.OPT_START:
4182
+ case i.db.LINETYPE.PAR_START:
4183
+ case i.db.LINETYPE.PAR_OVER_START:
4184
+ case i.db.LINETYPE.CRITICAL_START:
4185
+ case i.db.LINETYPE.BREAK_START:
4186
+ o.push({
4187
+ id: e.id,
4188
+ msg: e.message,
4189
+ from: 2 ** 53 - 1,
4190
+ to: -(2 ** 53 - 1),
4191
+ width: 0
4192
+ });
4193
+ break;
4194
+ case i.db.LINETYPE.ALT_ELSE:
4195
+ case i.db.LINETYPE.PAR_AND:
4196
+ case i.db.LINETYPE.CRITICAL_OPTION:
4197
+ e.message && (s = o.pop(), a[s.id] = s, a[e.id] = s, o.push(s));
4198
+ break;
4199
+ case i.db.LINETYPE.LOOP_END:
4200
+ case i.db.LINETYPE.ALT_END:
4201
+ case i.db.LINETYPE.OPT_END:
4202
+ case i.db.LINETYPE.PAR_END:
4203
+ case i.db.LINETYPE.CRITICAL_END:
4204
+ case i.db.LINETYPE.BREAK_END:
4205
+ s = o.pop(), a[s.id] = s;
4206
+ break;
4207
+ case i.db.LINETYPE.ACTIVE_START:
4208
+ {
4209
+ let t = n.get(e.from ? e.from : e.to.actor), r = nt(e.from ? e.from : e.to.actor).length, i = t.x + t.width / 2 + (r - 1) * Z.activationWidth / 2, a = {
4210
+ startx: i,
4211
+ stopx: i + Z.activationWidth,
4212
+ actor: e.from,
4213
+ enabled: !0
4214
+ };
4215
+ Q.activations.push(a);
4216
+ }
4217
+ break;
4218
+ case i.db.LINETYPE.ACTIVE_END:
4219
+ {
4220
+ let t = Q.activations.map((e) => e.actor).lastIndexOf(e.from);
4221
+ Q.activations.splice(t, 1).splice(0, 1);
4222
+ }
4223
+ break;
4224
+ }
4225
+ e.placement === void 0 ? (l = gt(e, n, i), e.msgModel = l, l.startx && l.stopx && o.length > 0 && o.forEach((t) => {
4226
+ if (s = t, l.startx === l.stopx) {
4227
+ let t = n.get(e.from), r = n.get(e.to);
4228
+ s.from = _.getMin(t.x - l.width / 2, t.x - t.width / 2, s.from), s.to = _.getMax(r.x + l.width / 2, r.x + t.width / 2, s.to), s.width = _.getMax(s.width, Math.abs(s.to - s.from)) - Z.labelBoxWidth;
4229
+ } else s.from = _.getMin(l.startx, s.from), s.to = _.getMax(l.stopx, s.to), s.width = _.getMax(s.width, l.width) - Z.labelBoxWidth;
4230
+ })) : (c = await lt(e, n, i), e.noteModel = c, o.forEach((e) => {
4231
+ s = e, s.from = _.getMin(s.from, c.startx), s.to = _.getMax(s.to, c.startx + c.width), s.width = _.getMax(s.width, Math.abs(s.from - s.to)) - Z.labelBoxWidth;
4232
+ }));
4233
+ }
4234
+ return Q.activations = [], e.debug("Loop type widths:", a), a;
4235
+ }, "calculateLoopBounds"), vt = {
4236
+ parser: F,
4237
+ get db() {
4238
+ return new te();
4239
+ },
4240
+ renderer: {
4241
+ bounds: Q,
4242
+ drawActors: $e,
4243
+ drawActorsPopup: et,
4244
+ setConf: tt,
4245
+ draw: at
4246
+ },
4247
+ styles: ne,
4248
+ init: /* @__PURE__ */ n((e) => {
4249
+ e.sequence ||= {}, e.wrap && (e.sequence.wrap = e.wrap, o({ sequence: { wrap: e.wrap } }));
4250
+ }, "init")
4251
+ };
4252
+ //#endregion
4253
+ export { vt as diagram };