for-humanity 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/README.md +16 -9
  3. package/dist/browser.js +16 -16
  4. package/dist/cli.css +2 -968
  5. package/dist/cli.js +92 -2318
  6. package/dist/config.js +1 -0
  7. package/dist/constant/copy.d.ts +100 -0
  8. package/dist/constant/site.d.ts +20 -0
  9. package/dist/constant/status.d.ts +19 -0
  10. package/dist/copy-C1uzvEnr.js +103 -0
  11. package/dist/group-path-XAThmzvC.js +10 -0
  12. package/dist/load-site-CbpLEhwu.js +2379 -0
  13. package/dist/logger-Dv1i9xSV.js +9 -0
  14. package/dist/mermaid/THIRD-PARTY-NOTICES.txt +3134 -0
  15. package/dist/mermaid/chunk--TN-qHgG.js +2 -0
  16. package/dist/mermaid/chunk-0kM1Lv4D.js +2 -0
  17. package/dist/mermaid/chunk-3FHei3pH.js +2001 -0
  18. package/dist/mermaid/chunk-3_2p2GqN.js +2 -0
  19. package/dist/mermaid/chunk-6HLei9i0.js +84 -0
  20. package/dist/mermaid/chunk-7Sz3kAwl.js +2214 -0
  21. package/dist/mermaid/chunk-7Tarqbpa.js +18047 -0
  22. package/dist/mermaid/chunk-9kkt8lzL.js +10 -0
  23. package/dist/mermaid/chunk-B--pNBQF.js +884 -0
  24. package/dist/mermaid/chunk-B4F-pysn.js +4241 -0
  25. package/dist/mermaid/chunk-B58sEIY_.js +14 -0
  26. package/dist/mermaid/chunk-B9_UWzSH.js +1517 -0
  27. package/dist/mermaid/chunk-BB8uZHwY.js +75 -0
  28. package/dist/mermaid/chunk-BFfk0LEc.js +717 -0
  29. package/dist/mermaid/chunk-BKri0qr7.js +89 -0
  30. package/dist/mermaid/chunk-BL404pH5.js +26 -0
  31. package/dist/mermaid/chunk-BLeiQSWo.js +354 -0
  32. package/dist/mermaid/chunk-BOmH_UFd.js +2 -0
  33. package/dist/mermaid/chunk-BSej9Nhy.js +1361 -0
  34. package/dist/mermaid/chunk-BYzrzvCI.js +12 -0
  35. package/dist/mermaid/chunk-BariMtWr.js +3020 -0
  36. package/dist/mermaid/chunk-BcrBoMwH.js +2352 -0
  37. package/dist/mermaid/chunk-Bok8z-Yo.js +67 -0
  38. package/dist/mermaid/chunk-BpTHLKQM.js +1970 -0
  39. package/dist/mermaid/chunk-BqjuxRsC.js +733 -0
  40. package/dist/mermaid/chunk-BuvPd-s5.js +1073 -0
  41. package/dist/mermaid/chunk-BvVehae3.js +5069 -0
  42. package/dist/mermaid/chunk-C-JABYpd.js +3075 -0
  43. package/dist/mermaid/chunk-C9XlTm4w.js +2 -0
  44. package/dist/mermaid/chunk-CApNbSU9.js +6 -0
  45. package/dist/mermaid/chunk-CCM2AH-C.js +9 -0
  46. package/dist/mermaid/chunk-CD1E0F_N.js +2 -0
  47. package/dist/mermaid/chunk-CDWvKG7D.js +2 -0
  48. package/dist/mermaid/chunk-CEVPpC1F.js +34 -0
  49. package/dist/mermaid/chunk-CLDr12lf.js +47504 -0
  50. package/dist/mermaid/chunk-CLVYqOBI.js +61 -0
  51. package/dist/mermaid/chunk-CLeOkFb5.js +15 -0
  52. package/dist/mermaid/chunk-CLgRAtOz.js +37 -0
  53. package/dist/mermaid/chunk-CMqFNUBl.js +134 -0
  54. package/dist/mermaid/chunk-CTPaBJXB.js +2 -0
  55. package/dist/mermaid/chunk-CVi6IGBL.js +2 -0
  56. package/dist/mermaid/chunk-CWV_EN-4.js +4745 -0
  57. package/dist/mermaid/chunk-CZ0dAs3g.js +2 -0
  58. package/dist/mermaid/chunk-C_YGy4Fn.js +236 -0
  59. package/dist/mermaid/chunk-CcVH22Yt.js +100 -0
  60. package/dist/mermaid/chunk-CgG6CD9_.js +7175 -0
  61. package/dist/mermaid/chunk-CgOP6IDB.js +3397 -0
  62. package/dist/mermaid/chunk-Cgg2UTSf.js +13 -0
  63. package/dist/mermaid/chunk-ChJfJJ1A.js +214 -0
  64. package/dist/mermaid/chunk-Ck5XRA46.js +447 -0
  65. package/dist/mermaid/chunk-Ckuw16cl.js +203 -0
  66. package/dist/mermaid/chunk-CpAbRCbF.js +1880 -0
  67. package/dist/mermaid/chunk-CuYekbSv.js +2 -0
  68. package/dist/mermaid/chunk-CwS4wZ5a.js +2 -0
  69. package/dist/mermaid/chunk-D-bcrBO3.js +82 -0
  70. package/dist/mermaid/chunk-D3IEAkCW.js +76 -0
  71. package/dist/mermaid/chunk-D8XfBJ_K.js +645 -0
  72. package/dist/mermaid/chunk-D9Ddd9y4.js +2228 -0
  73. package/dist/mermaid/chunk-DBh1mIbK.js +12 -0
  74. package/dist/mermaid/chunk-DD6Df6Ic.js +5 -0
  75. package/dist/mermaid/chunk-DGVDaXjx.js +8 -0
  76. package/dist/mermaid/chunk-DK9KqIXj.js +632 -0
  77. package/dist/mermaid/chunk-DORnIAsy.js +4487 -0
  78. package/dist/mermaid/chunk-DU69_VcF.js +363 -0
  79. package/dist/mermaid/chunk-DVNvSFoz.js +2144 -0
  80. package/dist/mermaid/chunk-DZe-4kde.js +20 -0
  81. package/dist/mermaid/chunk-D_a06Rz4.js +287 -0
  82. package/dist/mermaid/chunk-DfyFJJi2.js +972 -0
  83. package/dist/mermaid/chunk-DhKYPp1Z.js +2 -0
  84. package/dist/mermaid/chunk-DjFqgNTG.js +94 -0
  85. package/dist/mermaid/chunk-DmbDDrr-.js +65 -0
  86. package/dist/mermaid/chunk-DpuxlyL_.js +696 -0
  87. package/dist/mermaid/chunk-DqGhppWe.js +2 -0
  88. package/dist/mermaid/chunk-DqPZxHXa.js +5 -0
  89. package/dist/mermaid/chunk-Dt_1Jyif.js +293 -0
  90. package/dist/mermaid/chunk-DyQBE_NW.js +1935 -0
  91. package/dist/mermaid/chunk-JckyC4mW.js +1009 -0
  92. package/dist/mermaid/chunk-K7Myuj2-.js +1334 -0
  93. package/dist/mermaid/chunk-KuPYb48V.js +275 -0
  94. package/dist/mermaid/chunk-MFVRUoO0.js +4020 -0
  95. package/dist/mermaid/chunk-MbInCS_6.js +28 -0
  96. package/dist/mermaid/chunk-MexOLyKV.js +355 -0
  97. package/dist/mermaid/chunk-NnbDtJzg.js +21856 -0
  98. package/dist/mermaid/chunk-SGpOYZbI.js +2139 -0
  99. package/dist/mermaid/chunk-TbxLDlcU.js +198 -0
  100. package/dist/mermaid/chunk-TftHqGLg.js +490 -0
  101. package/dist/mermaid/chunk-UjQ8vA_Z.js +4138 -0
  102. package/dist/mermaid/chunk-YgmVTKqc.js +16 -0
  103. package/dist/mermaid/chunk-_a9EZE1v.js +1798 -0
  104. package/dist/mermaid/chunk-dTb8jqeP.js +2 -0
  105. package/dist/mermaid/chunk-fFdMfF8S.js +2240 -0
  106. package/dist/mermaid/chunk-feYbMzBj.js +1267 -0
  107. package/dist/mermaid/chunk-g3Pn8DkW.js +46 -0
  108. package/dist/mermaid/chunk-hM77LvCb.js +19832 -0
  109. package/dist/mermaid/chunk-hUDb-eAW.js +527 -0
  110. package/dist/mermaid/chunk-tpABtZ-3.js +4252 -0
  111. package/dist/mermaid/chunk-xIbz3oFK.js +59 -0
  112. package/dist/mermaid/chunk-yBz-vst0.js +976 -0
  113. package/dist/mermaid/mermaid-BhtR3wyB.js +1145 -0
  114. package/dist/run-site-command-C80YoNOe.js +129 -0
  115. package/dist/site-config-bllORGpm.js +90 -0
  116. package/dist/site.js +1 -0
  117. package/dist/start-dev-server-C4_Lu1nZ.js +176 -0
  118. package/dist/to-change-queue-DbEnZGNK.js +34 -0
  119. package/dist/to-error-message-pF6_7wGK.js +16 -0
  120. package/dist/type/group-path.d.ts +7 -0
  121. package/dist/type/site-config.d.ts +57 -0
  122. package/package.json +34 -17
  123. package/src/component/widget/cursor-face/_constant/cursor-face.ts +0 -14
  124. package/src/component/widget/cursor-face/wg-cursor-face.css +0 -15
  125. package/src/component/widget/cursor-face/wg-cursor-face.tsx +0 -153
  126. package/src/component/widget/navigation/_constant/locale.ts +0 -9
  127. package/src/component/widget/navigation/_constant/navigation-data-schema.ts +0 -33
  128. package/src/component/widget/navigation/_constant/navigation.ts +0 -9
  129. package/src/component/widget/navigation/_constant/reading-line.ts +0 -4
  130. package/src/component/widget/navigation/_function/restore-navigation-scroll.ts +0 -59
  131. package/src/component/widget/navigation/_function/to-doc-groups/_to-doc-branches.ts +0 -15
  132. package/src/component/widget/navigation/_function/to-doc-groups/_to-doc-group-branches.ts +0 -70
  133. package/src/component/widget/navigation/_function/to-doc-groups/to-doc-groups.ts +0 -15
  134. package/src/component/widget/navigation/_function/to-navigation-data/_to-navigation-document.ts +0 -13
  135. package/src/component/widget/navigation/_function/to-navigation-data/_to-navigation-group.ts +0 -13
  136. package/src/component/widget/navigation/_function/to-navigation-data/to-navigation-data.ts +0 -18
  137. package/src/component/widget/navigation/_function/to-navigation-json.ts +0 -8
  138. package/src/component/widget/navigation/_function/to-toc-groups.ts +0 -38
  139. package/src/component/widget/navigation/_type/doc-branch.ts +0 -11
  140. package/src/component/widget/navigation/_type/doc-group.ts +0 -24
  141. package/src/component/widget/navigation/_type/navigation-data.ts +0 -75
  142. package/src/component/widget/navigation/_type/navigation-focus-snapshot.ts +0 -17
  143. package/src/component/widget/navigation/_type/toc-group.ts +0 -39
  144. package/src/component/widget/navigation/_wg-navigation-nav-list.css +0 -48
  145. package/src/component/widget/navigation/_wg-navigation-nav-list.tsx +0 -61
  146. package/src/component/widget/navigation/_wg-navigation-nav.css +0 -21
  147. package/src/component/widget/navigation/_wg-navigation-nav.tsx +0 -33
  148. package/src/component/widget/navigation/_wg-navigation-scroll.tsx +0 -117
  149. package/src/component/widget/navigation/_wg-navigation-toc.css +0 -91
  150. package/src/component/widget/navigation/_wg-navigation-toc.tsx +0 -114
  151. package/src/component/widget/navigation/wg-navigation.css +0 -282
  152. package/src/component/widget/navigation/wg-navigation.tsx +0 -420
  153. package/src/component/widget/prose/_constant/heading-highlight.ts +0 -4
  154. package/src/component/widget/prose/_constant/section.ts +0 -7
  155. package/src/component/widget/prose/_constant/status.ts +0 -9
  156. package/src/component/widget/prose/_function/has-block-content.ts +0 -30
  157. package/src/component/widget/prose/_function/rehype-head.ts +0 -31
  158. package/src/component/widget/prose/_function/rehype-sections/_to-section-headings.ts +0 -20
  159. package/src/component/widget/prose/_function/rehype-sections/rehype-sections.ts +0 -21
  160. package/src/component/widget/prose/_function/rehype-tables.ts +0 -22
  161. package/src/component/widget/prose/_function/remark-blocks.ts +0 -112
  162. package/src/component/widget/prose/_function/remark-flow.ts +0 -26
  163. package/src/component/widget/prose/_function/remark-links.ts +0 -33
  164. package/src/component/widget/prose/_function/remark-parts.ts +0 -26
  165. package/src/component/widget/prose/_function/remark-status.ts +0 -59
  166. package/src/component/widget/prose/_function/remark-swatch.ts +0 -16
  167. package/src/component/widget/prose/_function/remark-unknown-directives.ts +0 -25
  168. package/src/component/widget/prose/wg-prose.css +0 -484
  169. package/src/component/widget/prose/wg-prose.tsx +0 -43
  170. package/src/component/widget/shell/wg-shell.css +0 -63
  171. package/src/component/widget/shell/wg-shell.tsx +0 -88
  172. package/src/component/widget/shell-controls/wg-shell-controls.css +0 -4
  173. package/src/component/widget/shell-controls/wg-shell-controls.tsx +0 -170
  174. package/src/constant/asset.ts +0 -63
  175. package/src/constant/copy.ts +0 -133
  176. package/src/constant/doc.ts +0 -13
  177. package/src/constant/font.ts +0 -34
  178. package/src/constant/site.ts +0 -24
  179. package/src/constant/status.ts +0 -15
  180. package/src/entry/browser/browser.tsx +0 -22
  181. package/src/entry/cli/_constant/cli.ts +0 -19
  182. package/src/entry/cli/_constant/crawling.ts +0 -14
  183. package/src/entry/cli/_constant/snippet.ts +0 -21
  184. package/src/entry/cli/_function/create-app.tsx +0 -57
  185. package/src/entry/cli/_function/create-dev-app.ts +0 -87
  186. package/src/entry/cli/_function/create-processor/_rehype-assets.ts +0 -70
  187. package/src/entry/cli/_function/create-processor/_rehype-heading-ids.ts +0 -34
  188. package/src/entry/cli/_function/create-processor/_remark-report.ts +0 -15
  189. package/src/entry/cli/_function/create-processor/_remark-snippets.ts +0 -117
  190. package/src/entry/cli/_function/create-processor/_shiki-transformers.ts +0 -91
  191. package/src/entry/cli/_function/create-processor/create-processor.ts +0 -64
  192. package/src/entry/cli/_function/read-docs.ts +0 -128
  193. package/src/entry/cli/_function/read-home.ts +0 -32
  194. package/src/entry/cli/_function/to-crawling-app.ts +0 -42
  195. package/src/entry/cli/cli.test.ts +0 -804
  196. package/src/entry/cli/cli.ts +0 -206
  197. package/src/env.d.ts +0 -6
  198. package/src/page/doc/pg-doc.tsx +0 -35
  199. package/src/page/home/pg-home.tsx +0 -40
  200. package/src/store/navigation/create-navigation-stores.test.ts +0 -74
  201. package/src/store/navigation/create-navigation-stores.ts +0 -59
  202. package/src/store/navigation/navigation-state.ts +0 -36
  203. package/src/store/navigation/navigation-storage.ts +0 -9
  204. package/src/store/navigation/to-navigation-scroll-state.ts +0 -42
  205. package/src/style/base.css +0 -28
  206. package/src/style/token.css +0 -188
  207. package/src/type/doc-content.ts +0 -15
  208. package/src/type/doc-data.ts +0 -38
  209. package/src/type/doc-file-data.ts +0 -21
  210. package/src/type/doc-heading.ts +0 -17
  211. package/src/type/doc-outline.ts +0 -16
  212. package/src/type/doc-section.ts +0 -9
  213. package/src/type/doc.ts +0 -20
  214. package/src/type/group-path.ts +0 -7
  215. package/src/type/site-assets.ts +0 -25
  216. package/src/type/site-config.ts +0 -73
  217. package/src/type/vfile-data.d.ts +0 -10
  218. package/src/util/async/to-change-queue.test.ts +0 -58
  219. package/src/util/async/to-change-queue.ts +0 -43
  220. package/src/util/dom/find-hash-target.ts +0 -18
  221. package/src/util/dom/reveal-hash-target.ts +0 -15
  222. package/src/util/error/to-error-message.ts +0 -10
  223. package/src/util/file/to-asset-path.ts +0 -26
  224. package/src/util/font/to-font-css.test.ts +0 -41
  225. package/src/util/font/to-font-css.ts +0 -28
  226. package/src/util/mermaid/render-flow.js +0 -321
@@ -0,0 +1,4241 @@
1
+ import { m as e, p as t } from "./chunk-DVNvSFoz.js";
2
+ import { n } from "./chunk-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-MFVRUoO0.js";
4
+ import { t as x } from "./chunk-xIbz3oFK.js";
5
+ import { _ as S, m as C } from "./chunk-K7Myuj2-.js";
6
+ import { n as w, t as T } from "./chunk-B9_UWzSH.js";
7
+ import { a as E, c as D, i as O, n as k, r as A, s as j } from "./chunk-CLVYqOBI.js";
8
+ import { t as M } from "./chunk-CLeOkFb5.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: this.$ = r.parseMessage(a[s].trim().substring(1));
985
+ }
986
+ }, "anonymous"),
987
+ table: [
988
+ {
989
+ 3: 1,
990
+ 4: t,
991
+ 5: r,
992
+ 6: i
993
+ },
994
+ { 1: [3] },
995
+ {
996
+ 3: 5,
997
+ 4: t,
998
+ 5: r,
999
+ 6: i
1000
+ },
1001
+ {
1002
+ 3: 6,
1003
+ 4: t,
1004
+ 5: r,
1005
+ 6: i
1006
+ },
1007
+ e([
1008
+ 1,
1009
+ 4,
1010
+ 5,
1011
+ 10,
1012
+ 14,
1013
+ 15,
1014
+ 19,
1015
+ 22,
1016
+ 24,
1017
+ 30,
1018
+ 31,
1019
+ 32,
1020
+ 34,
1021
+ 36,
1022
+ 37,
1023
+ 38,
1024
+ 39,
1025
+ 40,
1026
+ 42,
1027
+ 44,
1028
+ 45,
1029
+ 47,
1030
+ 51,
1031
+ 53,
1032
+ 54,
1033
+ 56,
1034
+ 61,
1035
+ 62,
1036
+ 63,
1037
+ 64,
1038
+ 73
1039
+ ], a, { 7: 7 }),
1040
+ { 1: [2, 1] },
1041
+ { 1: [2, 2] },
1042
+ {
1043
+ 1: [2, 3],
1044
+ 4: o,
1045
+ 5: s,
1046
+ 8: 8,
1047
+ 9: 10,
1048
+ 10: c,
1049
+ 13: 13,
1050
+ 14: l,
1051
+ 15: u,
1052
+ 18: 16,
1053
+ 19: d,
1054
+ 22: f,
1055
+ 23: 41,
1056
+ 24: p,
1057
+ 25: 20,
1058
+ 26: 21,
1059
+ 27: 22,
1060
+ 28: 23,
1061
+ 29: 24,
1062
+ 30: m,
1063
+ 31: h,
1064
+ 32: g,
1065
+ 34: _,
1066
+ 36: v,
1067
+ 37: y,
1068
+ 38: b,
1069
+ 39: x,
1070
+ 40: S,
1071
+ 42: C,
1072
+ 44: w,
1073
+ 45: T,
1074
+ 47: E,
1075
+ 51: D,
1076
+ 53: O,
1077
+ 54: k,
1078
+ 56: A,
1079
+ 61: j,
1080
+ 62: M,
1081
+ 63: N,
1082
+ 64: P,
1083
+ 73: F
1084
+ },
1085
+ e(I, [2, 5]),
1086
+ {
1087
+ 9: 48,
1088
+ 13: 13,
1089
+ 14: l,
1090
+ 15: u,
1091
+ 18: 16,
1092
+ 19: d,
1093
+ 22: f,
1094
+ 23: 41,
1095
+ 24: p,
1096
+ 25: 20,
1097
+ 26: 21,
1098
+ 27: 22,
1099
+ 28: 23,
1100
+ 29: 24,
1101
+ 30: m,
1102
+ 31: h,
1103
+ 32: g,
1104
+ 34: _,
1105
+ 36: v,
1106
+ 37: y,
1107
+ 38: b,
1108
+ 39: x,
1109
+ 40: S,
1110
+ 42: C,
1111
+ 44: w,
1112
+ 45: T,
1113
+ 47: E,
1114
+ 51: D,
1115
+ 53: O,
1116
+ 54: k,
1117
+ 56: A,
1118
+ 61: j,
1119
+ 62: M,
1120
+ 63: N,
1121
+ 64: P,
1122
+ 73: F
1123
+ },
1124
+ e(I, [2, 7]),
1125
+ e(I, [2, 8]),
1126
+ e(I, [2, 9]),
1127
+ e(I, [2, 15]),
1128
+ {
1129
+ 13: 49,
1130
+ 51: D,
1131
+ 53: O,
1132
+ 54: k
1133
+ },
1134
+ { 16: [1, 50] },
1135
+ { 5: [1, 51] },
1136
+ {
1137
+ 5: [1, 54],
1138
+ 20: [1, 52],
1139
+ 21: [1, 53]
1140
+ },
1141
+ {
1142
+ 23: 55,
1143
+ 62: L,
1144
+ 73: F
1145
+ },
1146
+ {
1147
+ 23: 57,
1148
+ 62: L,
1149
+ 73: F
1150
+ },
1151
+ { 5: [1, 58] },
1152
+ { 5: [1, 59] },
1153
+ { 5: [1, 60] },
1154
+ { 5: [1, 61] },
1155
+ { 5: [1, 62] },
1156
+ e(I, [2, 30]),
1157
+ e(I, [2, 31]),
1158
+ { 33: [1, 63] },
1159
+ { 35: [1, 64] },
1160
+ e(I, [2, 34]),
1161
+ { 16: [1, 65] },
1162
+ { 16: [1, 66] },
1163
+ { 16: [1, 67] },
1164
+ { 16: [1, 68] },
1165
+ { 16: [1, 69] },
1166
+ { 16: [1, 70] },
1167
+ { 16: [1, 71] },
1168
+ { 16: [1, 72] },
1169
+ {
1170
+ 23: 73,
1171
+ 55: 74,
1172
+ 62: L,
1173
+ 73: ee
1174
+ },
1175
+ {
1176
+ 23: 76,
1177
+ 55: 77,
1178
+ 62: L,
1179
+ 73: ee
1180
+ },
1181
+ {
1182
+ 23: 78,
1183
+ 62: L,
1184
+ 73: F
1185
+ },
1186
+ {
1187
+ 69: 79,
1188
+ 72: [1, 80],
1189
+ 78: R,
1190
+ 79: te,
1191
+ 80: ne,
1192
+ 81: re,
1193
+ 82: ie,
1194
+ 83: ae,
1195
+ 84: oe,
1196
+ 85: se,
1197
+ 86: ce,
1198
+ 87: le,
1199
+ 88: z,
1200
+ 89: ue,
1201
+ 90: de,
1202
+ 91: fe,
1203
+ 92: pe,
1204
+ 93: B,
1205
+ 94: V,
1206
+ 95: me,
1207
+ 96: H,
1208
+ 97: U,
1209
+ 98: W,
1210
+ 99: he,
1211
+ 100: ge,
1212
+ 101: _e,
1213
+ 102: ve,
1214
+ 103: G
1215
+ },
1216
+ {
1217
+ 57: 107,
1218
+ 59: [1, 108],
1219
+ 67: [1, 109],
1220
+ 68: [1, 110]
1221
+ },
1222
+ {
1223
+ 23: 111,
1224
+ 62: L,
1225
+ 73: F
1226
+ },
1227
+ e([
1228
+ 72,
1229
+ 78,
1230
+ 79,
1231
+ 80,
1232
+ 81,
1233
+ 82,
1234
+ 83,
1235
+ 84,
1236
+ 85,
1237
+ 86,
1238
+ 87,
1239
+ 88,
1240
+ 89,
1241
+ 90,
1242
+ 91,
1243
+ 92,
1244
+ 93,
1245
+ 94,
1246
+ 95,
1247
+ 96,
1248
+ 97,
1249
+ 98,
1250
+ 99,
1251
+ 100,
1252
+ 101,
1253
+ 102,
1254
+ 103
1255
+ ], ye, {
1256
+ 23: 112,
1257
+ 62: L,
1258
+ 73: F
1259
+ }),
1260
+ {
1261
+ 23: 113,
1262
+ 62: L,
1263
+ 73: F
1264
+ },
1265
+ {
1266
+ 23: 114,
1267
+ 62: L,
1268
+ 73: F
1269
+ },
1270
+ e([
1271
+ 5,
1272
+ 66,
1273
+ 72,
1274
+ 78,
1275
+ 79,
1276
+ 80,
1277
+ 81,
1278
+ 82,
1279
+ 83,
1280
+ 84,
1281
+ 85,
1282
+ 86,
1283
+ 87,
1284
+ 88,
1285
+ 89,
1286
+ 90,
1287
+ 91,
1288
+ 92,
1289
+ 93,
1290
+ 94,
1291
+ 95,
1292
+ 96,
1293
+ 97,
1294
+ 98,
1295
+ 99,
1296
+ 100,
1297
+ 101,
1298
+ 102,
1299
+ 103,
1300
+ 104
1301
+ ], K),
1302
+ e(I, [2, 6]),
1303
+ e(I, [2, 16]),
1304
+ e(be, [2, 10], { 11: 115 }),
1305
+ e(I, [2, 18]),
1306
+ {
1307
+ 5: [1, 117],
1308
+ 20: [1, 116]
1309
+ },
1310
+ { 5: [1, 118] },
1311
+ e(I, [2, 22]),
1312
+ { 5: [1, 119] },
1313
+ e([
1314
+ 5,
1315
+ 52,
1316
+ 66,
1317
+ 104
1318
+ ], ye),
1319
+ { 5: [1, 120] },
1320
+ e(I, [2, 25]),
1321
+ e(I, [2, 26]),
1322
+ e(I, [2, 27]),
1323
+ e(I, [2, 28]),
1324
+ e(I, [2, 29]),
1325
+ e(I, [2, 32]),
1326
+ e(I, [2, 33]),
1327
+ e(xe, a, { 7: 121 }),
1328
+ e(xe, a, { 7: 122 }),
1329
+ e(xe, a, { 7: 123 }),
1330
+ e(Se, a, {
1331
+ 41: 124,
1332
+ 7: 125
1333
+ }),
1334
+ e(Ce, a, {
1335
+ 43: 126,
1336
+ 7: 127
1337
+ }),
1338
+ e(Ce, a, {
1339
+ 7: 127,
1340
+ 43: 128
1341
+ }),
1342
+ e(we, a, {
1343
+ 46: 129,
1344
+ 7: 130
1345
+ }),
1346
+ e(xe, a, { 7: 131 }),
1347
+ {
1348
+ 5: [1, 133],
1349
+ 52: [1, 132]
1350
+ },
1351
+ {
1352
+ 5: [1, 135],
1353
+ 52: [1, 134]
1354
+ },
1355
+ e(Te, K, {
1356
+ 74: 136,
1357
+ 75: [1, 137]
1358
+ }),
1359
+ {
1360
+ 5: [1, 139],
1361
+ 52: [1, 138]
1362
+ },
1363
+ {
1364
+ 5: [1, 141],
1365
+ 52: [1, 140]
1366
+ },
1367
+ { 5: [1, 142] },
1368
+ {
1369
+ 23: 146,
1370
+ 62: L,
1371
+ 70: [1, 143],
1372
+ 71: [1, 144],
1373
+ 72: [1, 145],
1374
+ 73: F
1375
+ },
1376
+ {
1377
+ 69: 147,
1378
+ 78: R,
1379
+ 79: te,
1380
+ 80: ne,
1381
+ 81: re,
1382
+ 82: ie,
1383
+ 83: ae,
1384
+ 84: oe,
1385
+ 85: se,
1386
+ 86: ce,
1387
+ 87: le,
1388
+ 88: z,
1389
+ 89: ue,
1390
+ 90: de,
1391
+ 91: fe,
1392
+ 92: pe,
1393
+ 93: B,
1394
+ 94: V,
1395
+ 95: me,
1396
+ 96: H,
1397
+ 97: U,
1398
+ 98: W,
1399
+ 99: he,
1400
+ 100: ge,
1401
+ 101: _e,
1402
+ 102: ve,
1403
+ 103: G
1404
+ },
1405
+ e(q, [2, 80]),
1406
+ e(q, [2, 81]),
1407
+ e(q, [2, 82]),
1408
+ e(q, [2, 83]),
1409
+ e(q, [2, 84]),
1410
+ e(q, [2, 85]),
1411
+ e(q, [2, 86]),
1412
+ e(q, [2, 87]),
1413
+ e(q, [2, 88]),
1414
+ e(q, [2, 89]),
1415
+ e(q, [2, 90]),
1416
+ e(q, [2, 91]),
1417
+ e(q, [2, 92]),
1418
+ e(q, [2, 93]),
1419
+ e(q, [2, 94]),
1420
+ e(q, [2, 95]),
1421
+ e(q, [2, 96]),
1422
+ e(q, [2, 97]),
1423
+ e(q, [2, 98]),
1424
+ e(q, [2, 99]),
1425
+ e(q, [2, 100]),
1426
+ e(q, [2, 101]),
1427
+ e(q, [2, 102]),
1428
+ e(q, [2, 103]),
1429
+ e(q, [2, 104]),
1430
+ e(q, [2, 105]),
1431
+ {
1432
+ 23: 148,
1433
+ 62: L,
1434
+ 73: F
1435
+ },
1436
+ {
1437
+ 23: 150,
1438
+ 60: 149,
1439
+ 62: L,
1440
+ 73: F
1441
+ },
1442
+ e(Ee, [2, 68]),
1443
+ e(Ee, [2, 69]),
1444
+ {
1445
+ 58: 151,
1446
+ 104: J
1447
+ },
1448
+ {
1449
+ 58: 153,
1450
+ 104: J
1451
+ },
1452
+ {
1453
+ 58: 154,
1454
+ 104: J
1455
+ },
1456
+ {
1457
+ 58: 155,
1458
+ 104: J
1459
+ },
1460
+ {
1461
+ 4: [1, 158],
1462
+ 5: [1, 160],
1463
+ 12: 157,
1464
+ 13: 159,
1465
+ 17: [1, 156],
1466
+ 51: D,
1467
+ 53: O,
1468
+ 54: k
1469
+ },
1470
+ { 5: [1, 161] },
1471
+ e(I, [2, 20]),
1472
+ e(I, [2, 21]),
1473
+ e(I, [2, 23]),
1474
+ e(I, [2, 24]),
1475
+ {
1476
+ 4: o,
1477
+ 5: s,
1478
+ 8: 8,
1479
+ 9: 10,
1480
+ 10: c,
1481
+ 13: 13,
1482
+ 14: l,
1483
+ 15: u,
1484
+ 17: [1, 162],
1485
+ 18: 16,
1486
+ 19: d,
1487
+ 22: f,
1488
+ 23: 41,
1489
+ 24: p,
1490
+ 25: 20,
1491
+ 26: 21,
1492
+ 27: 22,
1493
+ 28: 23,
1494
+ 29: 24,
1495
+ 30: m,
1496
+ 31: h,
1497
+ 32: g,
1498
+ 34: _,
1499
+ 36: v,
1500
+ 37: y,
1501
+ 38: b,
1502
+ 39: x,
1503
+ 40: S,
1504
+ 42: C,
1505
+ 44: w,
1506
+ 45: T,
1507
+ 47: E,
1508
+ 51: D,
1509
+ 53: O,
1510
+ 54: k,
1511
+ 56: A,
1512
+ 61: j,
1513
+ 62: M,
1514
+ 63: N,
1515
+ 64: P,
1516
+ 73: F
1517
+ },
1518
+ {
1519
+ 4: o,
1520
+ 5: s,
1521
+ 8: 8,
1522
+ 9: 10,
1523
+ 10: c,
1524
+ 13: 13,
1525
+ 14: l,
1526
+ 15: u,
1527
+ 17: [1, 163],
1528
+ 18: 16,
1529
+ 19: d,
1530
+ 22: f,
1531
+ 23: 41,
1532
+ 24: p,
1533
+ 25: 20,
1534
+ 26: 21,
1535
+ 27: 22,
1536
+ 28: 23,
1537
+ 29: 24,
1538
+ 30: m,
1539
+ 31: h,
1540
+ 32: g,
1541
+ 34: _,
1542
+ 36: v,
1543
+ 37: y,
1544
+ 38: b,
1545
+ 39: x,
1546
+ 40: S,
1547
+ 42: C,
1548
+ 44: w,
1549
+ 45: T,
1550
+ 47: E,
1551
+ 51: D,
1552
+ 53: O,
1553
+ 54: k,
1554
+ 56: A,
1555
+ 61: j,
1556
+ 62: M,
1557
+ 63: N,
1558
+ 64: P,
1559
+ 73: F
1560
+ },
1561
+ {
1562
+ 4: o,
1563
+ 5: s,
1564
+ 8: 8,
1565
+ 9: 10,
1566
+ 10: c,
1567
+ 13: 13,
1568
+ 14: l,
1569
+ 15: u,
1570
+ 17: [1, 164],
1571
+ 18: 16,
1572
+ 19: d,
1573
+ 22: f,
1574
+ 23: 41,
1575
+ 24: p,
1576
+ 25: 20,
1577
+ 26: 21,
1578
+ 27: 22,
1579
+ 28: 23,
1580
+ 29: 24,
1581
+ 30: m,
1582
+ 31: h,
1583
+ 32: g,
1584
+ 34: _,
1585
+ 36: v,
1586
+ 37: y,
1587
+ 38: b,
1588
+ 39: x,
1589
+ 40: S,
1590
+ 42: C,
1591
+ 44: w,
1592
+ 45: T,
1593
+ 47: E,
1594
+ 51: D,
1595
+ 53: O,
1596
+ 54: k,
1597
+ 56: A,
1598
+ 61: j,
1599
+ 62: M,
1600
+ 63: N,
1601
+ 64: P,
1602
+ 73: F
1603
+ },
1604
+ { 17: [1, 165] },
1605
+ {
1606
+ 4: o,
1607
+ 5: s,
1608
+ 8: 8,
1609
+ 9: 10,
1610
+ 10: c,
1611
+ 13: 13,
1612
+ 14: l,
1613
+ 15: u,
1614
+ 17: [2, 47],
1615
+ 18: 16,
1616
+ 19: d,
1617
+ 22: f,
1618
+ 23: 41,
1619
+ 24: p,
1620
+ 25: 20,
1621
+ 26: 21,
1622
+ 27: 22,
1623
+ 28: 23,
1624
+ 29: 24,
1625
+ 30: m,
1626
+ 31: h,
1627
+ 32: g,
1628
+ 34: _,
1629
+ 36: v,
1630
+ 37: y,
1631
+ 38: b,
1632
+ 39: x,
1633
+ 40: S,
1634
+ 42: C,
1635
+ 44: w,
1636
+ 45: T,
1637
+ 47: E,
1638
+ 50: [1, 166],
1639
+ 51: D,
1640
+ 53: O,
1641
+ 54: k,
1642
+ 56: A,
1643
+ 61: j,
1644
+ 62: M,
1645
+ 63: N,
1646
+ 64: P,
1647
+ 73: F
1648
+ },
1649
+ { 17: [1, 167] },
1650
+ {
1651
+ 4: o,
1652
+ 5: s,
1653
+ 8: 8,
1654
+ 9: 10,
1655
+ 10: c,
1656
+ 13: 13,
1657
+ 14: l,
1658
+ 15: u,
1659
+ 17: [2, 45],
1660
+ 18: 16,
1661
+ 19: d,
1662
+ 22: f,
1663
+ 23: 41,
1664
+ 24: p,
1665
+ 25: 20,
1666
+ 26: 21,
1667
+ 27: 22,
1668
+ 28: 23,
1669
+ 29: 24,
1670
+ 30: m,
1671
+ 31: h,
1672
+ 32: g,
1673
+ 34: _,
1674
+ 36: v,
1675
+ 37: y,
1676
+ 38: b,
1677
+ 39: x,
1678
+ 40: S,
1679
+ 42: C,
1680
+ 44: w,
1681
+ 45: T,
1682
+ 47: E,
1683
+ 49: [1, 168],
1684
+ 51: D,
1685
+ 53: O,
1686
+ 54: k,
1687
+ 56: A,
1688
+ 61: j,
1689
+ 62: M,
1690
+ 63: N,
1691
+ 64: P,
1692
+ 73: F
1693
+ },
1694
+ { 17: [1, 169] },
1695
+ { 17: [1, 170] },
1696
+ {
1697
+ 4: o,
1698
+ 5: s,
1699
+ 8: 8,
1700
+ 9: 10,
1701
+ 10: c,
1702
+ 13: 13,
1703
+ 14: l,
1704
+ 15: u,
1705
+ 17: [2, 43],
1706
+ 18: 16,
1707
+ 19: d,
1708
+ 22: f,
1709
+ 23: 41,
1710
+ 24: p,
1711
+ 25: 20,
1712
+ 26: 21,
1713
+ 27: 22,
1714
+ 28: 23,
1715
+ 29: 24,
1716
+ 30: m,
1717
+ 31: h,
1718
+ 32: g,
1719
+ 34: _,
1720
+ 36: v,
1721
+ 37: y,
1722
+ 38: b,
1723
+ 39: x,
1724
+ 40: S,
1725
+ 42: C,
1726
+ 44: w,
1727
+ 45: T,
1728
+ 47: E,
1729
+ 48: [1, 171],
1730
+ 51: D,
1731
+ 53: O,
1732
+ 54: k,
1733
+ 56: A,
1734
+ 61: j,
1735
+ 62: M,
1736
+ 63: N,
1737
+ 64: P,
1738
+ 73: F
1739
+ },
1740
+ {
1741
+ 4: o,
1742
+ 5: s,
1743
+ 8: 8,
1744
+ 9: 10,
1745
+ 10: c,
1746
+ 13: 13,
1747
+ 14: l,
1748
+ 15: u,
1749
+ 17: [1, 172],
1750
+ 18: 16,
1751
+ 19: d,
1752
+ 22: f,
1753
+ 23: 41,
1754
+ 24: p,
1755
+ 25: 20,
1756
+ 26: 21,
1757
+ 27: 22,
1758
+ 28: 23,
1759
+ 29: 24,
1760
+ 30: m,
1761
+ 31: h,
1762
+ 32: g,
1763
+ 34: _,
1764
+ 36: v,
1765
+ 37: y,
1766
+ 38: b,
1767
+ 39: x,
1768
+ 40: S,
1769
+ 42: C,
1770
+ 44: w,
1771
+ 45: T,
1772
+ 47: E,
1773
+ 51: D,
1774
+ 53: O,
1775
+ 54: k,
1776
+ 56: A,
1777
+ 61: j,
1778
+ 62: M,
1779
+ 63: N,
1780
+ 64: P,
1781
+ 73: F
1782
+ },
1783
+ { 16: [1, 173] },
1784
+ e(I, [2, 50]),
1785
+ { 16: [1, 174] },
1786
+ e(I, [2, 55]),
1787
+ e(Te, [2, 76]),
1788
+ { 76: [1, 175] },
1789
+ { 16: [1, 176] },
1790
+ e(I, [2, 52]),
1791
+ { 16: [1, 177] },
1792
+ e(I, [2, 57]),
1793
+ e(I, [2, 53]),
1794
+ {
1795
+ 23: 178,
1796
+ 62: L,
1797
+ 73: F
1798
+ },
1799
+ {
1800
+ 23: 179,
1801
+ 62: L,
1802
+ 73: F
1803
+ },
1804
+ {
1805
+ 23: 180,
1806
+ 62: L,
1807
+ 73: F
1808
+ },
1809
+ {
1810
+ 58: 181,
1811
+ 104: J
1812
+ },
1813
+ {
1814
+ 23: 182,
1815
+ 62: L,
1816
+ 72: [1, 183],
1817
+ 73: F
1818
+ },
1819
+ {
1820
+ 58: 184,
1821
+ 104: J
1822
+ },
1823
+ {
1824
+ 58: 185,
1825
+ 104: J
1826
+ },
1827
+ {
1828
+ 66: [1, 186],
1829
+ 104: [2, 67]
1830
+ },
1831
+ { 5: [2, 60] },
1832
+ { 5: [2, 106] },
1833
+ { 5: [2, 61] },
1834
+ { 5: [2, 62] },
1835
+ { 5: [2, 63] },
1836
+ e(I, [2, 17]),
1837
+ e(be, [2, 11]),
1838
+ {
1839
+ 13: 187,
1840
+ 51: D,
1841
+ 53: O,
1842
+ 54: k
1843
+ },
1844
+ e(be, [2, 13]),
1845
+ e(be, [2, 14]),
1846
+ e(I, [2, 19]),
1847
+ e(I, [2, 35]),
1848
+ e(I, [2, 36]),
1849
+ e(I, [2, 37]),
1850
+ e(I, [2, 38]),
1851
+ { 16: [1, 188] },
1852
+ e(I, [2, 39]),
1853
+ { 16: [1, 189] },
1854
+ e(I, [2, 40]),
1855
+ e(I, [2, 41]),
1856
+ { 16: [1, 190] },
1857
+ e(I, [2, 42]),
1858
+ { 5: [1, 191] },
1859
+ { 5: [1, 192] },
1860
+ { 77: [1, 193] },
1861
+ { 5: [1, 194] },
1862
+ { 5: [1, 195] },
1863
+ {
1864
+ 58: 196,
1865
+ 104: J
1866
+ },
1867
+ {
1868
+ 58: 197,
1869
+ 104: J
1870
+ },
1871
+ {
1872
+ 58: 198,
1873
+ 104: J
1874
+ },
1875
+ { 5: [2, 75] },
1876
+ {
1877
+ 58: 199,
1878
+ 104: J
1879
+ },
1880
+ {
1881
+ 23: 200,
1882
+ 62: L,
1883
+ 73: F
1884
+ },
1885
+ { 5: [2, 58] },
1886
+ { 5: [2, 59] },
1887
+ {
1888
+ 23: 201,
1889
+ 62: L,
1890
+ 73: F
1891
+ },
1892
+ e(be, [2, 12]),
1893
+ e(Se, a, {
1894
+ 7: 125,
1895
+ 41: 202
1896
+ }),
1897
+ e(Ce, a, {
1898
+ 7: 127,
1899
+ 43: 203
1900
+ }),
1901
+ e(we, a, {
1902
+ 7: 130,
1903
+ 46: 204
1904
+ }),
1905
+ e(I, [2, 49]),
1906
+ e(I, [2, 54]),
1907
+ e(Te, [2, 77]),
1908
+ e(I, [2, 51]),
1909
+ e(I, [2, 56]),
1910
+ { 5: [2, 70] },
1911
+ { 5: [2, 71] },
1912
+ { 5: [2, 72] },
1913
+ { 5: [2, 73] },
1914
+ {
1915
+ 58: 205,
1916
+ 104: J
1917
+ },
1918
+ { 104: [2, 66] },
1919
+ { 17: [2, 48] },
1920
+ { 17: [2, 46] },
1921
+ { 17: [2, 44] },
1922
+ { 5: [2, 74] }
1923
+ ],
1924
+ defaultActions: {
1925
+ 5: [2, 1],
1926
+ 6: [2, 2],
1927
+ 151: [2, 60],
1928
+ 152: [2, 106],
1929
+ 153: [2, 61],
1930
+ 154: [2, 62],
1931
+ 155: [2, 63],
1932
+ 181: [2, 75],
1933
+ 184: [2, 58],
1934
+ 185: [2, 59],
1935
+ 196: [2, 70],
1936
+ 197: [2, 71],
1937
+ 198: [2, 72],
1938
+ 199: [2, 73],
1939
+ 201: [2, 66],
1940
+ 202: [2, 48],
1941
+ 203: [2, 46],
1942
+ 204: [2, 44],
1943
+ 205: [2, 74]
1944
+ },
1945
+ parseError: /* @__PURE__ */ n(function(e, t) {
1946
+ if (t.recoverable) this.trace(e);
1947
+ else {
1948
+ var n = Error(e);
1949
+ throw n.hash = t, n;
1950
+ }
1951
+ }, "parseError"),
1952
+ parse: /* @__PURE__ */ n(function(e) {
1953
+ 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: {} };
1954
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
1955
+ h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
1956
+ var v = h.yylloc;
1957
+ o.push(v);
1958
+ var y = h.options && h.options.ranges;
1959
+ this.parseError = typeof g.yy.parseError == "function" ? g.yy.parseError : Object.getPrototypeOf(this).parseError;
1960
+ function b(e) {
1961
+ r.length -= 2 * e, a.length -= e, o.length -= e;
1962
+ }
1963
+ n(b, "popStack");
1964
+ function x() {
1965
+ var e = i.pop() || h.lex() || p;
1966
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = t.symbols_[e] || e), e;
1967
+ }
1968
+ n(x, "lex");
1969
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
1970
+ 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]) {
1971
+ var M = "";
1972
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
1973
+ 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, {
1974
+ text: h.match,
1975
+ token: this.terminals_[S] || S,
1976
+ line: h.yylineno,
1977
+ loc: v,
1978
+ expected: j
1979
+ });
1980
+ }
1981
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
1982
+ switch (T[0]) {
1983
+ case 1:
1984
+ 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--);
1985
+ break;
1986
+ case 2:
1987
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
1988
+ first_line: o[o.length - (k || 1)].first_line,
1989
+ last_line: o[o.length - 1].last_line,
1990
+ first_column: o[o.length - (k || 1)].first_column,
1991
+ last_column: o[o.length - 1].last_column
1992
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
1993
+ c,
1994
+ u,
1995
+ l,
1996
+ g.yy,
1997
+ T[1],
1998
+ a,
1999
+ o
2000
+ ].concat(m)), E !== void 0) return E;
2001
+ 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);
2002
+ break;
2003
+ case 3: return !0;
2004
+ }
2005
+ }
2006
+ return !0;
2007
+ }, "parse")
2008
+ };
2009
+ De.lexer = /* @__PURE__ */ (function() {
2010
+ return {
2011
+ EOF: 1,
2012
+ parseError: /* @__PURE__ */ n(function(e, t) {
2013
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
2014
+ else throw Error(e);
2015
+ }, "parseError"),
2016
+ setInput: /* @__PURE__ */ n(function(e, t) {
2017
+ 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 = {
2018
+ first_line: 1,
2019
+ first_column: 0,
2020
+ last_line: 1,
2021
+ last_column: 0
2022
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
2023
+ }, "setInput"),
2024
+ input: /* @__PURE__ */ n(function() {
2025
+ var e = this._input[0];
2026
+ 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;
2027
+ }, "input"),
2028
+ unput: /* @__PURE__ */ n(function(e) {
2029
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
2030
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
2031
+ var r = this.match.split(/(?:\r\n?|\n)/g);
2032
+ 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);
2033
+ var i = this.yylloc.range;
2034
+ return this.yylloc = {
2035
+ first_line: this.yylloc.first_line,
2036
+ last_line: this.yylineno + 1,
2037
+ first_column: this.yylloc.first_column,
2038
+ 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
2039
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
2040
+ }, "unput"),
2041
+ more: /* @__PURE__ */ n(function() {
2042
+ return this._more = !0, this;
2043
+ }, "more"),
2044
+ reject: /* @__PURE__ */ n(function() {
2045
+ if (this.options.backtrack_lexer) this._backtrack = !0;
2046
+ 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(), {
2047
+ text: "",
2048
+ token: null,
2049
+ line: this.yylineno
2050
+ });
2051
+ return this;
2052
+ }, "reject"),
2053
+ less: /* @__PURE__ */ n(function(e) {
2054
+ this.unput(this.match.slice(e));
2055
+ }, "less"),
2056
+ pastInput: /* @__PURE__ */ n(function() {
2057
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
2058
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
2059
+ }, "pastInput"),
2060
+ upcomingInput: /* @__PURE__ */ n(function() {
2061
+ var e = this.match;
2062
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
2063
+ }, "upcomingInput"),
2064
+ showPosition: /* @__PURE__ */ n(function() {
2065
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
2066
+ return e + this.upcomingInput() + "\n" + t + "^";
2067
+ }, "showPosition"),
2068
+ test_match: /* @__PURE__ */ n(function(e, t) {
2069
+ var n, r, i;
2070
+ if (this.options.backtrack_lexer && (i = {
2071
+ yylineno: this.yylineno,
2072
+ yylloc: {
2073
+ first_line: this.yylloc.first_line,
2074
+ last_line: this.last_line,
2075
+ first_column: this.yylloc.first_column,
2076
+ last_column: this.yylloc.last_column
2077
+ },
2078
+ yytext: this.yytext,
2079
+ match: this.match,
2080
+ matches: this.matches,
2081
+ matched: this.matched,
2082
+ yyleng: this.yyleng,
2083
+ offset: this.offset,
2084
+ _more: this._more,
2085
+ _input: this._input,
2086
+ yy: this.yy,
2087
+ conditionStack: this.conditionStack.slice(0),
2088
+ done: this.done
2089
+ }, 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 = {
2090
+ first_line: this.yylloc.last_line,
2091
+ last_line: this.yylineno + 1,
2092
+ first_column: this.yylloc.last_column,
2093
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
2094
+ }, 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;
2095
+ if (this._backtrack) {
2096
+ for (var a in i) this[a] = i[a];
2097
+ return !1;
2098
+ }
2099
+ return !1;
2100
+ }, "test_match"),
2101
+ next: /* @__PURE__ */ n(function() {
2102
+ if (this.done) return this.EOF;
2103
+ this._input || (this.done = !0);
2104
+ var e, t, n, r;
2105
+ this._more || (this.yytext = "", this.match = "");
2106
+ 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)) {
2107
+ if (t = n, r = a, this.options.backtrack_lexer) {
2108
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
2109
+ if (this._backtrack) {
2110
+ t = !1;
2111
+ continue;
2112
+ }
2113
+ return !1;
2114
+ }
2115
+ if (!this.options.flex) break;
2116
+ }
2117
+ return t ? (e = this.test_match(t, i[r]), e !== !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 M(() => ({
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 = w(e, { schema: T });
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;
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": this.addSignal(void 0, void 0, void 0, e.signalType);
2937
+ }
2938
+ }
2939
+ getConfig() {
2940
+ return d().sequence;
2941
+ }
2942
+ }, ne = /* @__PURE__ */ n((e) => {
2943
+ let t = e.dropShadow ?? "none", { look: n } = d();
2944
+ return `.actor {
2945
+ stroke: ${e.actorBorder};
2946
+ fill: ${e.actorBkg};
2947
+ stroke-width: ${e.strokeWidth ?? 1};
2948
+ }
2949
+
2950
+ rect.actor.outer-path[data-look="neo"] {
2951
+ filter: ${t};
2952
+ }
2953
+
2954
+ rect.note[data-look="neo"] {
2955
+ stroke:${e.noteBorderColor};
2956
+ fill:${e.noteBkgColor};
2957
+ filter: ${t};
2958
+ }
2959
+
2960
+ text.actor > tspan {
2961
+ fill: ${e.actorTextColor};
2962
+ stroke: none;
2963
+ }
2964
+
2965
+ .actor-line {
2966
+ stroke: ${e.actorLineColor};
2967
+ }
2968
+
2969
+ .innerArc {
2970
+ stroke-width: 1.5;
2971
+ stroke-dasharray: none;
2972
+ }
2973
+
2974
+ .messageLine0 {
2975
+ stroke-width: 1.5;
2976
+ stroke-dasharray: none;
2977
+ stroke: ${e.signalColor};
2978
+ }
2979
+
2980
+ .messageLine1 {
2981
+ stroke-width: 1.5;
2982
+ stroke-dasharray: 2, 2;
2983
+ stroke: ${e.signalColor};
2984
+ }
2985
+
2986
+ [id$="-arrowhead"] path {
2987
+ fill: ${e.signalColor};
2988
+ stroke: ${e.signalColor};
2989
+ }
2990
+
2991
+ .sequenceNumber {
2992
+ fill: ${e.sequenceNumberColor};
2993
+ }
2994
+
2995
+ [id$="-sequencenumber"] {
2996
+ fill: ${e.signalColor};
2997
+ }
2998
+
2999
+ [id$="-crosshead"] path {
3000
+ fill: ${e.signalColor};
3001
+ stroke: ${e.signalColor};
3002
+ }
3003
+
3004
+ .messageText {
3005
+ fill: ${e.signalTextColor};
3006
+ stroke: none;
3007
+ }
3008
+
3009
+ .labelBox {
3010
+ stroke: ${e.labelBoxBorderColor};
3011
+ fill: ${e.labelBoxBkgColor};
3012
+ filter: ${n === "neo" ? t : "none"};
3013
+ }
3014
+
3015
+ .labelText, .labelText > tspan {
3016
+ fill: ${e.labelTextColor};
3017
+ stroke: none;
3018
+ }
3019
+
3020
+ .loopText, .loopText > tspan {
3021
+ fill: ${e.loopTextColor};
3022
+ stroke: none;
3023
+ }
3024
+
3025
+ .sectionTitle, .sectionTitle > tspan {
3026
+ fill: ${e.loopTextColor};
3027
+ stroke: none;
3028
+ }
3029
+
3030
+ .loopLine {
3031
+ stroke-width: 2px;
3032
+ stroke-dasharray: 2, 2;
3033
+ stroke: ${e.labelBoxBorderColor};
3034
+ fill: ${e.labelBoxBorderColor};
3035
+ }
3036
+
3037
+ .note {
3038
+ //stroke: #decc93;
3039
+ stroke: ${e.noteBorderColor};
3040
+ fill: ${e.noteBkgColor};
3041
+ }
3042
+
3043
+ /*
3044
+ * No font-weight here, deliberately. Note text renders inside tspan elements, and a weight emitted at
3045
+ * tspan level outranks the inline style drawText puts on the parent text element from the
3046
+ * sequence.noteFontWeight config key -- so that documented key would never reach the glyphs.
3047
+ * The theme variable formerly emitted here is a different value from that config key, and
3048
+ * git/styles.js reads it as its own bold-label weight under redux and neo, so it cannot be
3049
+ * lowered there either.
3050
+ */
3051
+ .noteText, .noteText > tspan {
3052
+ fill: ${e.noteTextColor};
3053
+ stroke: none;
3054
+ }
3055
+
3056
+ .activation0 {
3057
+ fill: ${e.activationBkgColor};
3058
+ stroke: ${e.activationBorderColor};
3059
+ }
3060
+
3061
+ .activation1 {
3062
+ fill: ${e.activationBkgColor};
3063
+ stroke: ${e.activationBorderColor};
3064
+ }
3065
+
3066
+ .activation2 {
3067
+ fill: ${e.activationBkgColor};
3068
+ stroke: ${e.activationBorderColor};
3069
+ }
3070
+
3071
+ .actorPopupMenu {
3072
+ position: absolute;
3073
+ }
3074
+
3075
+ .actorPopupMenuPanel {
3076
+ position: absolute;
3077
+ fill: ${e.actorBkg};
3078
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
3079
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
3080
+ }
3081
+ .actor-man circle, line {
3082
+ fill: ${e.actorBkg};
3083
+ stroke-width: 2px;
3084
+ }
3085
+
3086
+ g rect.rect {
3087
+ filter: ${t};
3088
+ stroke: ${e.nodeBorder};
3089
+ }
3090
+ `;
3091
+ }, "getStyles"), re = 44, ie = 6, ae = 6, oe = /* @__PURE__ */ n((e, t) => e.actorTextHeight ?? S.calculateTextDimensions(e.description ?? "", {
3092
+ fontFamily: t.actorFontFamily,
3093
+ fontSize: t.actorFontSize,
3094
+ fontWeight: t.actorFontWeight
3095
+ }).height, "actorLabelHeight"), se = /* @__PURE__ */ n((e) => re + ie + e + ae, "actorStackHeight"), ce = /* @__PURE__ */ n((e, t, n) => {
3096
+ let r = e + t, i = r - ae - n / 2;
3097
+ return {
3098
+ lifelineStartY: r,
3099
+ glyphBottomY: r - ae - n - ie,
3100
+ labelCenterY: i
3101
+ };
3102
+ }, "headerBands"), le = /* @__PURE__ */ n((e, t) => {
3103
+ let n = e + ae, r = n + re;
3104
+ return {
3105
+ glyphTopY: n,
3106
+ glyphBottomY: r,
3107
+ labelCenterY: r + ie + t / 2,
3108
+ stackHeight: se(t)
3109
+ };
3110
+ }, "footerBands"), z = 36, ue = -5, de = 60, fe = de - ue, pe = /* @__PURE__ */ n((e, t, n, r) => {
3111
+ if (t.look !== "neo") return null;
3112
+ let i = oe(e, t);
3113
+ return n ? le(r, i) : ce(r, e.height, i);
3114
+ }, "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) {
3115
+ let n = E(e, t);
3116
+ return y().look === "neo" && n.attr("data-look", "neo"), n;
3117
+ }, "drawRect"), ge = /* @__PURE__ */ n(function(e, t, n, r, i) {
3118
+ if (t.links === void 0 || t.links === null || Object.keys(t.links).length === 0) return {
3119
+ height: 0,
3120
+ width: 0
3121
+ };
3122
+ let a = t.links, o = t.actorCnt, s = t.rectData;
3123
+ var c = "none";
3124
+ i && (c = "block !important");
3125
+ let l = e.append("g");
3126
+ l.attr("id", "actor" + o + "_popup"), l.attr("class", "actorPopupMenu"), l.attr("display", c);
3127
+ var u = "";
3128
+ s.class !== void 0 && (u = " " + s.class);
3129
+ let d = s.width > n ? s.width : n, f = l.append("rect");
3130
+ 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) {
3131
+ var p = 20;
3132
+ for (let e in a) {
3133
+ var m = l.append("a"), h = (0, N.sanitizeUrl)(a[e]);
3134
+ 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;
3135
+ }
3136
+ }
3137
+ return f.attr("height", p), {
3138
+ height: s.height + p,
3139
+ width: d
3140
+ };
3141
+ }, "drawPopup"), _e = /* @__PURE__ */ n(function(e) {
3142
+ return "var pu = document.getElementById('" + e + "'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }";
3143
+ }, "popupMenuToggle"), ve = /* @__PURE__ */ n(async function(e, t, n = null) {
3144
+ 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();
3145
+ if (r.attr("height", Math.round(o.height)).attr("width", Math.round(o.width)), t.class === "noteText") {
3146
+ let n = e.node().firstChild;
3147
+ n.setAttribute("height", o.height + 2 * t.textMargin);
3148
+ let i = n.getBBox();
3149
+ 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));
3150
+ } else if (n) {
3151
+ let { startx: e, stopx: i, starty: a } = n;
3152
+ if (e > i) {
3153
+ let t = e;
3154
+ e = i, i = t;
3155
+ }
3156
+ 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));
3157
+ }
3158
+ return [r];
3159
+ }, "drawKatex"), G = /* @__PURE__ */ n(function(e, t) {
3160
+ let r = 0, i = 0, a = t.text.split(_.lineBreakRegex), [o, s] = C(t.fontSize), c = [], l = 0, u = /* @__PURE__ */ n(() => t.y, "yfunc");
3161
+ if (t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0) switch (t.valign) {
3162
+ case "top":
3163
+ case "start":
3164
+ u = /* @__PURE__ */ n(() => Math.round(t.y + t.textMargin), "yfunc");
3165
+ break;
3166
+ case "middle":
3167
+ case "center":
3168
+ u = /* @__PURE__ */ n(() => Math.round(t.y + (r + i + t.textMargin) / 2), "yfunc");
3169
+ break;
3170
+ case "bottom":
3171
+ case "end": u = /* @__PURE__ */ n(() => Math.round(t.y + (r + i + 2 * t.textMargin) - t.textMargin), "yfunc");
3172
+ }
3173
+ if (t.anchor !== void 0 && t.textMargin !== void 0 && t.width !== void 0) switch (t.anchor) {
3174
+ case "left":
3175
+ case "start":
3176
+ t.x = Math.round(t.x + t.textMargin), t.anchor = "start", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3177
+ break;
3178
+ case "middle":
3179
+ case "center":
3180
+ t.x = Math.round(t.x + t.width / 2), t.anchor = "middle", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3181
+ break;
3182
+ case "right":
3183
+ case "end": t.x = Math.round(t.x + t.width - t.textMargin), t.anchor = "end", t.dominantBaseline = "middle", t.alignmentBaseline = "middle";
3184
+ }
3185
+ for (let [n, d] of a.entries()) {
3186
+ t.textMargin !== void 0 && t.textMargin === 0 && o !== void 0 && (l = n * o);
3187
+ let a = e.append("text");
3188
+ 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);
3189
+ let f = d || "​";
3190
+ if (t.tspan) {
3191
+ let e = a.append("tspan");
3192
+ e.attr("x", t.x), t.fill !== void 0 && e.attr("fill", t.fill), e.text(f);
3193
+ } else a.text(f);
3194
+ t.valign !== void 0 && t.textMargin !== void 0 && t.textMargin > 0 && (i += (a._groups || a)[0][0].getBBox().height, r = i), c.push(a);
3195
+ }
3196
+ return c;
3197
+ }, "drawText"), ye = /* @__PURE__ */ n(function(e, t) {
3198
+ function r(e, t, n, r, i) {
3199
+ return e + "," + t + " " + (e + n) + "," + t + " " + (e + n) + "," + (t + r - i) + " " + (e + n - i * 1.2) + "," + (t + r) + " " + e + "," + (t + r);
3200
+ }
3201
+ n(r, "genPoints");
3202
+ let i = e.append("polygon");
3203
+ 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;
3204
+ }, "drawLabel"), K = -1, be = /* @__PURE__ */ n((e, t, n, r) => {
3205
+ e.select && n.forEach((n) => {
3206
+ let i = t.get(n), a = e.select("#actor" + i.actorCnt);
3207
+ !r.mirrorActors && i.stopy ? a.attr("y2", i.stopy + i.height / 2) : r.mirrorActors && a.attr("y2", i.stopy);
3208
+ });
3209
+ }, "fixLifeLineHeights"), xe = /* @__PURE__ */ n(function(e, t, n, r, i, a) {
3210
+ 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();
3211
+ var g = h;
3212
+ 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"));
3213
+ let _ = j();
3214
+ var v = "actor";
3215
+ t.properties?.class ? v = t.properties.class : _.fill = "#eaeaea", v += r ? ` ${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);
3216
+ let y = he(g, _), b = a.get(t.name) ?? 0;
3217
+ 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) {
3218
+ let e = t.properties.icon.trim();
3219
+ e.charAt(0) === "@" ? A(g, _.x + _.width - 20, _.y + 10, e.substr(1)) : O(g, _.x + _.width - 20, _.y + 10, e);
3220
+ }
3221
+ 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);
3222
+ let x = t.height;
3223
+ if (y.node) {
3224
+ let e = y.node().getBBox();
3225
+ n.look !== "neo" && (t.height = e.height, x = e.height);
3226
+ }
3227
+ return x;
3228
+ }, "drawActorTypeParticipant"), Se = /* @__PURE__ */ n(function(e, t, n, r, i, a) {
3229
+ 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();
3230
+ var g = h;
3231
+ 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"));
3232
+ let _ = j();
3233
+ var v = "actor";
3234
+ t.properties?.class ? v = t.properties.class : _.fill = "#eaeaea", v += r ? ` ${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);
3235
+ let y = {
3236
+ ..._,
3237
+ x: _.x + -6,
3238
+ y: _.y + 6,
3239
+ class: "actor"
3240
+ }, b = he(g, _), x = he(g, y);
3241
+ t.rectData = _, l === "neo" && g.attr("filter", `url(#${Be(i)})`);
3242
+ let S = a.get(t.name) ?? 0;
3243
+ 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) {
3244
+ let e = t.properties.icon.trim();
3245
+ e.charAt(0) === "@" ? A(g, _.x + _.width - 20, _.y + 10, e.substr(1)) : O(g, _.x + _.width - 20, _.y + 10, e);
3246
+ }
3247
+ Y(n, m(t.description))(t.description, g, _.x - 6, _.y + 6, _.width, _.height, { class: `actor ${me}` }, n);
3248
+ let C = t.height;
3249
+ if (b.node) {
3250
+ let e = b.node().getBBox();
3251
+ n.look !== "neo" && (t.height = e.height, C = e.height);
3252
+ }
3253
+ return r || (g.attr("data-et", "participant"), g.attr("data-type", "collections"), g.attr("data-id", t.name)), C;
3254
+ }, "drawActorTypeCollections"), Ce = /* @__PURE__ */ n(function(e, t, n, r, i, a) {
3255
+ 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;
3256
+ 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"));
3257
+ let _ = j(), v = "actor";
3258
+ t.properties?.class ? v = t.properties.class : _.fill = "#eaeaea", v += r ? ` ${V}` : ` ${B}`, g.attr("class", v), _.x = t.x, _.y = o, _.width = t.width, _.height = t.height, _.name = t.name;
3259
+ let y = _.height / 2, b = y / (2.5 + _.height / 50), x = g.append("g"), S = g.append("g"), C = `M ${_.x},${_.y + y}
3260
+ a ${b},${y} 0 0 0 0,${_.height}
3261
+ h ${_.width - 2 * b}
3262
+ a ${b},${y} 0 0 0 0,-${_.height}
3263
+ Z
3264
+ `;
3265
+ x.append("path").attr("d", C), S.append("path").attr("d", `M ${_.x},${_.y + y}
3266
+ 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)})`);
3267
+ let w = a.get(t.name) ?? 0;
3268
+ 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) {
3269
+ let e = t.properties.icon.trim(), n = _.x + _.width - 20, r = _.y + 10;
3270
+ e.charAt(0) === "@" ? A(g, n, r, e.substr(1)) : O(g, n, r, e);
3271
+ }
3272
+ Y(n, m(t.description))(t.description, g, _.x, _.y, _.width, _.height, { class: `actor ${me}` }, n);
3273
+ let T = t.height, E = x.select("path:last-child");
3274
+ if (E.node()) {
3275
+ let e = E.node().getBBox();
3276
+ n.look !== "neo" && (t.height = e.height, T = e.height);
3277
+ }
3278
+ return r || (g.attr("data-et", "participant"), g.attr("data-type", "queue"), g.attr("data-id", t.name)), T;
3279
+ }, "drawActorTypeQueue"), we = /* @__PURE__ */ n(function(e, t, n, r, i, a) {
3280
+ 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();
3281
+ 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);
3282
+ let y = e.append("g"), b = H;
3283
+ b += r ? ` ${V}` : ` ${B}`, y.attr("class", b), y.attr("name", t.name);
3284
+ let x = j();
3285
+ x.x = t.x, x.y = o, x.fill = "#eaeaea", x.width = t.width, x.height = t.height, x.class = "actor";
3286
+ let S = t.x + t.width / 2, C = c ? c.glyphBottomY - 22 : o + 32;
3287
+ 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})`);
3288
+ let w = a.get(t.name) ?? 0;
3289
+ 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;
3290
+ }, "drawActorTypeControl"), Te = /* @__PURE__ */ n(function(e, t, n, r, i, a) {
3291
+ 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";
3292
+ v += r ? ` ${V}` : ` ${B}`, _.attr("class", v), _.attr("name", t.name);
3293
+ let y = j();
3294
+ y.x = t.x, y.y = o, y.fill = "#eaeaea", y.width = t.width, y.height = t.height, y.class = "actor";
3295
+ let b = t.x + t.width / 2, x = c ? c.glyphBottomY - 22 : o + (r ? 10 : 25);
3296
+ _.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)})`);
3297
+ let S = a.get(t.name) ?? 0;
3298
+ 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 : 6})`), r || (_.attr("data-et", "participant"), _.attr("data-type", "entity"), _.attr("data-id", t.name)), t.height;
3299
+ }, "drawActorTypeEntity"), q = /* @__PURE__ */ n(function(e, t, n, r, i, a) {
3300
+ 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 = _;
3301
+ 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"));
3302
+ let y = j(), b = "actor";
3303
+ t.properties?.class ? b = t.properties.class : y.fill = "#eaeaea", b += r ? ` ${V}` : ` ${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;
3304
+ 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");
3305
+ E.attr("class", b);
3306
+ let D = `
3307
+ M ${y.x},${T + C}
3308
+ a ${S},${C} 0 0 0 ${x},0
3309
+ a ${S},${C} 0 0 0 -${x},0
3310
+ l 0,${w - 2 * C}
3311
+ a ${S},${C} 0 0 0 ${x},0
3312
+ l 0,-${w - 2 * C}
3313
+ `;
3314
+ E.append("path").attr("d", D), f === "neo" && E.attr("filter", `url(#${Be(i)})`);
3315
+ let O = a.get(t.name) ?? 0;
3316
+ 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) {
3317
+ let e = E.select("path:last-child");
3318
+ e.node() && (t.height = e.node().getBBox().height + (n.sequence.labelBoxHeight ?? 0));
3319
+ }
3320
+ return r || (v.attr("data-et", "participant"), v.attr("data-type", "database"), v.attr("data-id", t.name)), t.height;
3321
+ }, "drawActorTypeDatabase"), Ee = /* @__PURE__ */ n(function(e, t, n, r, i, a) {
3322
+ 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;
3323
+ 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);
3324
+ let y = e.append("g"), b = H;
3325
+ b += r ? ` ${V}` : ` ${B}`, y.attr("class", b), y.attr("name", t.name);
3326
+ let x = j();
3327
+ 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 - 55).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 - 55).attr("y1", u - 10).attr("x2", t.x + t.width / 2 - 55).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)})`);
3328
+ let S = a.get(t.name) ?? 0;
3329
+ 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;
3330
+ }, "drawActorTypeBoundary"), J = /* @__PURE__ */ n(function(e, t, r, i, a) {
3331
+ 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();
3332
+ 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);
3333
+ let _ = e.append("g"), v = H;
3334
+ v += i ? ` ${V}` : ` ${B}`, _.attr("class", v), _.attr("name", t.name), i || _.attr("data-et", "participant").attr("data-type", "actor").attr("data-id", t.name);
3335
+ 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");
3336
+ _.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));
3337
+ let S = _.append("circle");
3338
+ 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);
3339
+ let C = j();
3340
+ 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;
3341
+ let w = a.get(t.name) ?? 0;
3342
+ 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;
3343
+ }, "drawActorTypeActor"), De = /* @__PURE__ */ n(async function(e, t, n, r, i, a, o) {
3344
+ let s = o ?? new Map([...a.db.getActors().values()].map((e, t) => [e.name, t]));
3345
+ switch (t.type) {
3346
+ case "actor": return await J(e, t, n, r, s);
3347
+ case "participant": return await xe(e, t, n, r, i, s);
3348
+ case "boundary": return await Ee(e, t, n, r, i, s);
3349
+ case "control": return await we(e, t, n, r, i, s);
3350
+ case "entity": return await Te(e, t, n, r, i, s);
3351
+ case "database": return await q(e, t, n, r, i, s);
3352
+ case "collections": return await Se(e, t, n, r, i, s);
3353
+ case "queue": return await Ce(e, t, n, r, i, s);
3354
+ }
3355
+ }, "drawActor"), Oe = /* @__PURE__ */ n(function(e, t, n) {
3356
+ let r = e.append("g");
3357
+ 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();
3358
+ }, "drawBox"), ke = /* @__PURE__ */ n(function(e) {
3359
+ return e.append("g");
3360
+ }, "anchorElement"), Ae = /* @__PURE__ */ n(function(e, t, n, r, i, a, o) {
3361
+ let { theme: s, themeVariables: c } = r, { bkgColorArray: l, borderColorArray: u, mainBkg: d } = c, f = j(), p = t.anchored, m = t.actor;
3362
+ f.x = t.startx, f.y = t.starty, f.class = "activation" + i % 3, f.width = t.stopx - t.startx, f.height = n - t.starty;
3363
+ let h = he(p, f), g = (o ?? new Map([...a.db.getActors().values()].map((e, t) => [e.name, t]))).get(m) ?? 0;
3364
+ U.has(s) && (h.style("stroke", W(u, g)), h.style("fill", W(l, g) ?? d));
3365
+ }, "drawActivation"), je = /* @__PURE__ */ n(async function(e, t, r, i, a) {
3366
+ 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) {
3367
+ return p.append("line").attr("x1", e).attr("y1", t).attr("x2", n).attr("y2", r).attr("class", "loopLine");
3368
+ }, "drawLoopLine");
3369
+ 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) {
3370
+ h(t.startx, e.y, t.stopx, e.y).style("stroke-dasharray", "3, 3");
3371
+ });
3372
+ let g = D();
3373
+ 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;
3374
+ let _ = m(g.text) ? await ve(p, g, t) : G(p, g);
3375
+ if (t.sectionTitles !== void 0) {
3376
+ for (let [e, n] of Object.entries(t.sectionTitles)) if (n.message) {
3377
+ 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);
3378
+ let r = Math.round(_.map((e) => (e._groups || e)[0][0].getBBox().height).reduce((e, t) => e + t));
3379
+ t.sections[e].height += r - (o + s);
3380
+ }
3381
+ }
3382
+ return t.height = Math.round(t.stopy - t.starty), p;
3383
+ }, "drawLoop"), Me = /* @__PURE__ */ n(function(e, t) {
3384
+ k(e, t);
3385
+ }, "drawBackgroundRect"), Ne = /* @__PURE__ */ n(function(e, t) {
3386
+ 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");
3387
+ }, "insertDatabaseIcon"), Pe = /* @__PURE__ */ n(function(e, t) {
3388
+ 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");
3389
+ }, "insertComputerIcon"), Fe = /* @__PURE__ */ n(function(e, t) {
3390
+ 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");
3391
+ }, "insertClockIcon"), Ie = /* @__PURE__ */ n(function(e, t) {
3392
+ 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");
3393
+ }, "insertArrowHead"), Le = /* @__PURE__ */ n(function(e, t) {
3394
+ 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");
3395
+ }, "insertArrowFilledHead"), Re = /* @__PURE__ */ n(function(e, t) {
3396
+ 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);
3397
+ }, "insertSequenceNumber"), ze = /* @__PURE__ */ n(function(e, t) {
3398
+ 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");
3399
+ }, "insertArrowCrossHead"), Be = /* @__PURE__ */ n((e) => e ? `${e}-drop-shadow` : "drop-shadow", "dropShadowId"), Ve = /* @__PURE__ */ n(function(e, t, n) {
3400
+ let { theme: r } = t;
3401
+ 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"}`);
3402
+ }, "insertDropShadow"), He = /* @__PURE__ */ n(function() {
3403
+ return {
3404
+ x: 0,
3405
+ y: 0,
3406
+ fill: void 0,
3407
+ anchor: void 0,
3408
+ style: "#666",
3409
+ width: void 0,
3410
+ height: void 0,
3411
+ textMargin: 0,
3412
+ rx: 0,
3413
+ ry: 0,
3414
+ tspan: !0,
3415
+ valign: void 0
3416
+ };
3417
+ }, "getTextObj"), Ue = /* @__PURE__ */ n(function() {
3418
+ return {
3419
+ x: 0,
3420
+ y: 0,
3421
+ fill: "#EDF2AE",
3422
+ stroke: "#666",
3423
+ width: 100,
3424
+ anchor: "start",
3425
+ height: 100,
3426
+ rx: 0,
3427
+ ry: 0
3428
+ };
3429
+ }, "getNoteRect"), Y = /* @__PURE__ */ (function() {
3430
+ function e(e, t, n, r, i, a, s) {
3431
+ o(t.append("text").attr("x", n + i / 2).attr("y", r + a / 2 + 5).style("text-anchor", "middle").text(e), s);
3432
+ }
3433
+ n(e, "byText");
3434
+ function t(e, t, n, r, i, a, s, c) {
3435
+ let { actorFontSize: l, actorFontFamily: u, actorFontWeight: d } = c, [f, p] = C(l), m = e.split(_.lineBreakRegex);
3436
+ for (let e = 0; e < m.length; e++) {
3437
+ 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);
3438
+ 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);
3439
+ }
3440
+ }
3441
+ n(t, "byTspan");
3442
+ function r(e, n, r, i, a, s, c, l) {
3443
+ 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%");
3444
+ 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);
3445
+ }
3446
+ n(r, "byFo");
3447
+ async function i(e, n, r, i, s, c, l, u) {
3448
+ 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%");
3449
+ 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);
3450
+ }
3451
+ n(i, "byKatex");
3452
+ function o(e, t) {
3453
+ for (let n in t) t.hasOwnProperty(n) && e.attr(n, t[n]);
3454
+ }
3455
+ return n(o, "_setTextAttrs"), function(n, a = !1) {
3456
+ return a ? i : n.textPlacement === "fo" ? r : n.textPlacement === "old" ? e : t;
3457
+ };
3458
+ })(), We = /* @__PURE__ */ (function() {
3459
+ function e(e, t, n, r, a, o, s) {
3460
+ i(t.append("text").attr("x", n).attr("y", r).style("text-anchor", "start").text(e), s);
3461
+ }
3462
+ n(e, "byText");
3463
+ function t(e, t, n, r, a, o, s, c) {
3464
+ let { actorFontSize: l, actorFontFamily: u, actorFontWeight: d } = c, f = e.split(_.lineBreakRegex);
3465
+ for (let e = 0; e < f.length; e++) {
3466
+ 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);
3467
+ 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);
3468
+ }
3469
+ }
3470
+ n(t, "byTspan");
3471
+ function r(e, n, r, a, o, s, c, l) {
3472
+ 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%");
3473
+ 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);
3474
+ }
3475
+ n(r, "byFo");
3476
+ function i(e, t) {
3477
+ for (let n in t) t.hasOwnProperty(n) && e.attr(n, t[n]);
3478
+ }
3479
+ return n(i, "_setTextAttrs"), function(n) {
3480
+ return n.textPlacement === "fo" ? r : n.textPlacement === "old" ? e : t;
3481
+ };
3482
+ })(), X = {
3483
+ drawRect: he,
3484
+ drawText: G,
3485
+ drawLabel: ye,
3486
+ drawActor: De,
3487
+ drawBox: Oe,
3488
+ drawPopup: ge,
3489
+ anchorElement: ke,
3490
+ drawActivation: Ae,
3491
+ drawLoop: je,
3492
+ drawBackgroundRect: Me,
3493
+ insertArrowHead: Ie,
3494
+ insertArrowFilledHead: Le,
3495
+ insertSequenceNumber: Re,
3496
+ insertArrowCrossHead: ze,
3497
+ insertDatabaseIcon: Ne,
3498
+ insertComputerIcon: Pe,
3499
+ insertClockIcon: Fe,
3500
+ getTextObj: He,
3501
+ getNoteRect: Ue,
3502
+ fixLifeLineHeights: be,
3503
+ sanitizeUrl: N.sanitizeUrl,
3504
+ insertDropShadow: Ve,
3505
+ insertSolidTopArrowHead: /* @__PURE__ */ n(function(e, t) {
3506
+ 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");
3507
+ }, "insertSolidTopArrowHead"),
3508
+ insertSolidBottomArrowHead: /* @__PURE__ */ n(function(e, t) {
3509
+ 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");
3510
+ }, "insertSolidBottomArrowHead"),
3511
+ insertStickTopArrowHead: /* @__PURE__ */ n(function(e, t) {
3512
+ 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");
3513
+ }, "insertStickTopArrowHead"),
3514
+ insertStickBottomArrowHead: /* @__PURE__ */ n(function(e, t) {
3515
+ 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");
3516
+ }, "insertStickBottomArrowHead")
3517
+ }, Z = {}, Q = {
3518
+ data: {
3519
+ startx: void 0,
3520
+ stopx: void 0,
3521
+ starty: void 0,
3522
+ stopy: void 0
3523
+ },
3524
+ verticalPos: 0,
3525
+ sequenceItems: [],
3526
+ activations: [],
3527
+ models: {
3528
+ getHeight: /* @__PURE__ */ n(function() {
3529
+ 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));
3530
+ }, "getHeight"),
3531
+ clear: /* @__PURE__ */ n(function() {
3532
+ this.actors = [], this.boxes = [], this.loops = [], this.messages = [], this.notes = [];
3533
+ }, "clear"),
3534
+ addBox: /* @__PURE__ */ n(function(e) {
3535
+ this.boxes.push(e);
3536
+ }, "addBox"),
3537
+ addActor: /* @__PURE__ */ n(function(e) {
3538
+ this.actors.push(e);
3539
+ }, "addActor"),
3540
+ addLoop: /* @__PURE__ */ n(function(e) {
3541
+ this.loops.push(e);
3542
+ }, "addLoop"),
3543
+ addMessage: /* @__PURE__ */ n(function(e) {
3544
+ this.messages.push(e);
3545
+ }, "addMessage"),
3546
+ addNote: /* @__PURE__ */ n(function(e) {
3547
+ this.notes.push(e);
3548
+ }, "addNote"),
3549
+ lastActor: /* @__PURE__ */ n(function() {
3550
+ return this.actors[this.actors.length - 1];
3551
+ }, "lastActor"),
3552
+ lastLoop: /* @__PURE__ */ n(function() {
3553
+ return this.loops[this.loops.length - 1];
3554
+ }, "lastLoop"),
3555
+ lastMessage: /* @__PURE__ */ n(function() {
3556
+ return this.messages[this.messages.length - 1];
3557
+ }, "lastMessage"),
3558
+ lastNote: /* @__PURE__ */ n(function() {
3559
+ return this.notes[this.notes.length - 1];
3560
+ }, "lastNote"),
3561
+ actors: [],
3562
+ boxes: [],
3563
+ loops: [],
3564
+ messages: [],
3565
+ notes: []
3566
+ },
3567
+ init: /* @__PURE__ */ n(function() {
3568
+ this.sequenceItems = [], this.activations = [], this.models.clear(), this.data = {
3569
+ startx: void 0,
3570
+ stopx: void 0,
3571
+ starty: void 0,
3572
+ stopy: void 0
3573
+ }, this.verticalPos = 0, tt(d());
3574
+ }, "init"),
3575
+ updateVal: /* @__PURE__ */ n(function(e, t, n, r) {
3576
+ e[t] = e[t] === void 0 ? n : r(n, e[t]);
3577
+ }, "updateVal"),
3578
+ updateBounds: /* @__PURE__ */ n(function(e, t, r, i) {
3579
+ let a = this, o = 0;
3580
+ function s(s) {
3581
+ return /* @__PURE__ */ n(function(n) {
3582
+ o++;
3583
+ let c = a.sequenceItems.length - o + 1;
3584
+ 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));
3585
+ }, "updateItemBounds");
3586
+ }
3587
+ n(s, "updateFn"), this.sequenceItems.forEach(s()), this.activations.forEach(s("activation"));
3588
+ }, "updateBounds"),
3589
+ insert: /* @__PURE__ */ n(function(e, t, n, r) {
3590
+ let i = _.getMin(e, n), a = _.getMax(e, n), o = _.getMin(t, r), s = _.getMax(t, r);
3591
+ 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);
3592
+ }, "insert"),
3593
+ newActivation: /* @__PURE__ */ n(function(e, t, n) {
3594
+ let r = n.get(e.from), i = nt(e.from).length || 0, a = r.x + r.width / 2 + (i - 1) * Z.activationWidth / 2;
3595
+ this.activations.push({
3596
+ startx: a,
3597
+ starty: this.verticalPos + 2,
3598
+ stopx: a + Z.activationWidth,
3599
+ stopy: void 0,
3600
+ actor: e.from,
3601
+ anchored: X.anchorElement(t)
3602
+ });
3603
+ }, "newActivation"),
3604
+ endActivation: /* @__PURE__ */ n(function(e) {
3605
+ let t = this.activations.map(function(e) {
3606
+ return e.actor;
3607
+ }).lastIndexOf(e.from);
3608
+ return this.activations.splice(t, 1)[0];
3609
+ }, "endActivation"),
3610
+ createLoop: /* @__PURE__ */ n(function(e = {
3611
+ message: void 0,
3612
+ wrap: !1,
3613
+ width: void 0
3614
+ }, t) {
3615
+ return {
3616
+ startx: void 0,
3617
+ starty: this.verticalPos,
3618
+ stopx: void 0,
3619
+ stopy: void 0,
3620
+ title: e.message,
3621
+ wrap: e.wrap,
3622
+ width: e.width,
3623
+ height: 0,
3624
+ fill: t
3625
+ };
3626
+ }, "createLoop"),
3627
+ newLoop: /* @__PURE__ */ n(function(e = {
3628
+ message: void 0,
3629
+ wrap: !1,
3630
+ width: void 0
3631
+ }, t) {
3632
+ this.sequenceItems.push(this.createLoop(e, t));
3633
+ }, "newLoop"),
3634
+ endLoop: /* @__PURE__ */ n(function() {
3635
+ return this.sequenceItems.pop();
3636
+ }, "endLoop"),
3637
+ isLoopOverlap: /* @__PURE__ */ n(function() {
3638
+ return this.sequenceItems.length ? this.sequenceItems[this.sequenceItems.length - 1].overlap : !1;
3639
+ }, "isLoopOverlap"),
3640
+ addSectionToLoop: /* @__PURE__ */ n(function(e) {
3641
+ let t = this.sequenceItems.pop();
3642
+ t.sections = t.sections || [], t.sectionTitles = t.sectionTitles || [], t.sections.push({
3643
+ y: Q.getVerticalPos(),
3644
+ height: 0
3645
+ }), t.sectionTitles.push(e), this.sequenceItems.push(t);
3646
+ }, "addSectionToLoop"),
3647
+ saveVerticalPos: /* @__PURE__ */ n(function() {
3648
+ this.isLoopOverlap() && (this.savedVerticalPos = this.verticalPos);
3649
+ }, "saveVerticalPos"),
3650
+ resetVerticalPos: /* @__PURE__ */ n(function() {
3651
+ this.isLoopOverlap() && (this.verticalPos = this.savedVerticalPos);
3652
+ }, "resetVerticalPos"),
3653
+ bumpVerticalPos: /* @__PURE__ */ n(function(e) {
3654
+ this.verticalPos += e, this.data.stopy = _.getMax(this.data.stopy, this.verticalPos);
3655
+ }, "bumpVerticalPos"),
3656
+ getVerticalPos: /* @__PURE__ */ n(function() {
3657
+ return this.verticalPos;
3658
+ }, "getVerticalPos"),
3659
+ getBounds: /* @__PURE__ */ n(function() {
3660
+ return {
3661
+ bounds: this.data,
3662
+ models: this.models
3663
+ };
3664
+ }, "getBounds")
3665
+ }, Ge = /* @__PURE__ */ n(async function(e, t, n) {
3666
+ Q.bumpVerticalPos(Z.boxMargin), t.height = Z.boxMargin, t.starty = Q.getVerticalPos();
3667
+ let r = j();
3668
+ r.x = t.startx, r.y = t.starty, r.width = t.width || Z.width, r.class = "note";
3669
+ let i = e.append("g");
3670
+ i.attr("data-et", "note"), i.attr("data-id", "i" + n);
3671
+ let a = X.drawRect(i, r), o = D();
3672
+ 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";
3673
+ 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));
3674
+ 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);
3675
+ }, "drawNote"), Ke = /* @__PURE__ */ n(function(e, t, r, i, a, o, s) {
3676
+ 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) => {
3677
+ let n = e ? 16.5 : -16.5;
3678
+ return t ? -n : n;
3679
+ }, "getCircleOffset"), v = /* @__PURE__ */ n((e) => {
3680
+ g.append("circle").attr("cx", e).attr("cy", s).attr("r", 5).attr("width", 10).attr("height", 10);
3681
+ }, "drawCircle"), { CENTRAL_CONNECTION: y, CENTRAL_CONNECTION_REVERSE: b, CENTRAL_CONNECTION_DUAL: x } = i.db.LINETYPE;
3682
+ if (d) switch (t.centralConnection) {
3683
+ case y:
3684
+ h && (p += _(m, !0));
3685
+ break;
3686
+ case b:
3687
+ h || (f += _(m, !1));
3688
+ break;
3689
+ case x: h ? p += _(m, !0) : f += _(m, !1);
3690
+ }
3691
+ switch (t.centralConnection) {
3692
+ case y:
3693
+ v(p);
3694
+ break;
3695
+ case b:
3696
+ v(f);
3697
+ break;
3698
+ case x: v(f), v(p);
3699
+ }
3700
+ }, "drawCentralConnection"), qe = /* @__PURE__ */ n((e) => ({
3701
+ fontFamily: e.messageFontFamily,
3702
+ fontSize: e.messageFontSize,
3703
+ fontWeight: e.messageFontWeight
3704
+ }), "messageFont"), Je = /* @__PURE__ */ n((e) => ({
3705
+ fontFamily: e.noteFontFamily,
3706
+ fontSize: e.noteFontSize,
3707
+ fontWeight: e.noteFontWeight
3708
+ }), "noteFont"), Ye = /* @__PURE__ */ n((e) => ({
3709
+ fontFamily: e.actorFontFamily,
3710
+ fontSize: e.actorFontSize,
3711
+ fontWeight: e.actorFontWeight
3712
+ }), "actorFont");
3713
+ async function Xe(e, t) {
3714
+ Q.bumpVerticalPos(10);
3715
+ 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));
3716
+ if (!o) {
3717
+ let e = s.height / a;
3718
+ t.height += e, Q.bumpVerticalPos(e);
3719
+ }
3720
+ let c, l = s.height - 10, u = s.width;
3721
+ if (n === r) {
3722
+ c = Q.getVerticalPos() + l, Z.rightAngles || (l += Z.boxMargin, c = Q.getVerticalPos() + l), l += 30;
3723
+ let e = _.getMax(u / 2, Z.width / 2);
3724
+ Q.insert(n - e, Q.getVerticalPos() - 10 + l, r + e, Q.getVerticalPos() + 30 + l);
3725
+ } else l += Z.boxMargin, c = Q.getVerticalPos() + l, Q.insert(n, c - 10, r, c);
3726
+ return Q.bumpVerticalPos(l), t.height += l, t.stopy = t.starty + t.height, Q.insert(t.fromBounds, t.starty, t.toBounds, t.stopy), c;
3727
+ }
3728
+ n(Xe, "boundMessage");
3729
+ var Ze = /* @__PURE__ */ n(async function(e, t, n, r, a, o) {
3730
+ let { startx: s, stopx: c, starty: l, message: u, type: d, sequenceIndex: f, sequenceVisible: p } = t, h = S.calculateTextDimensions(u, qe(Z)), g = D();
3731
+ 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, {
3732
+ startx: s,
3733
+ stopx: c,
3734
+ starty: n
3735
+ }) : G(e, g);
3736
+ let v = h.width, y;
3737
+ if (s === c) {
3738
+ let i = p || Z.showSequenceNumbers, o = mt(a, r), l = ht(a, r), u = s + (i && (o || l) ? 10 : 0);
3739
+ 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);
3740
+ } 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);
3741
+ 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);
3742
+ let b = "";
3743
+ 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) {
3744
+ 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;
3745
+ 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);
3746
+ let h = 0, g = s === c, _ = s <= c;
3747
+ h = g ? t.fromBounds + 1 : l ? _ ? t.toBounds - 1 : t.fromBounds + 1 : _ ? t.fromBounds + 1 : t.toBounds - 1;
3748
+ let v = "12px", x = f.toString().length;
3749
+ 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);
3750
+ }
3751
+ }, "drawMessage"), Qe = /* @__PURE__ */ n(function(e, t, n, r, i, a, o) {
3752
+ let s = 0, c = 0, l, u = 0;
3753
+ for (let e of r) {
3754
+ let r = t.get(e), a = r.box;
3755
+ 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);
3756
+ }
3757
+ l && !o && Q.models.addBox(l), Q.bumpVerticalPos(u);
3758
+ }, "addActorRenderingData"), $e = /* @__PURE__ */ n(async function(e, t, n, r, i, a, o) {
3759
+ if (r) {
3760
+ let r = 0;
3761
+ Q.bumpVerticalPos(Z.boxMargin * 2);
3762
+ for (let s of n) {
3763
+ let n = t.get(s);
3764
+ n.stopy ||= Q.getVerticalPos();
3765
+ let c = await X.drawActor(e, n, Z, !0, i, a, o);
3766
+ r = _.getMax(r, c);
3767
+ }
3768
+ Q.bumpVerticalPos(r + Z.boxMargin);
3769
+ } else for (let r of n) {
3770
+ let n = t.get(r);
3771
+ await X.drawActor(e, n, Z, !1, i, a, o);
3772
+ }
3773
+ }, "drawActors"), et = /* @__PURE__ */ n(function(e, t, n, r) {
3774
+ let i = 0, a = 0;
3775
+ for (let o of n) {
3776
+ let n = t.get(o), s = st(n), c = X.drawPopup(e, n, s, Z, Z.forceMenus, r);
3777
+ c.height > i && (i = c.height), c.width + n.x > a && (a = c.width + n.x);
3778
+ }
3779
+ return {
3780
+ maxHeight: i,
3781
+ maxWidth: a
3782
+ };
3783
+ }, "drawActorsPopup"), tt = /* @__PURE__ */ n(function(e) {
3784
+ 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);
3785
+ }, "setConf"), nt = /* @__PURE__ */ n(function(e) {
3786
+ return Q.activations.filter(function(t) {
3787
+ return t.actor === e;
3788
+ });
3789
+ }, "actorActivations"), rt = /* @__PURE__ */ n(function(e, t) {
3790
+ let n = t.get(e), r = nt(e);
3791
+ return [r.reduce(function(e, t) {
3792
+ return _.getMin(e, t.startx);
3793
+ }, n.x + n.width / 2 - 1), r.reduce(function(e, t) {
3794
+ return _.getMax(e, t.stopx);
3795
+ }, n.x + n.width / 2 + 1)];
3796
+ }, "activationBounds");
3797
+ function $(t, n, r, i, a) {
3798
+ Q.bumpVerticalPos(r);
3799
+ let o = i;
3800
+ if (n.id && n.message && t[n.id]) {
3801
+ let r = t[n.id].width, a = qe(Z);
3802
+ n.message = S.wrapLabel(`[${n.message}]`, r - 2 * Z.wrapPadding, a), n.width = r, n.wrap = !0;
3803
+ let s = S.calculateTextDimensions(n.message, a), c = _.getMax(s.height, Z.labelBoxHeight);
3804
+ o = i + c, e.debug(`${c} - ${n.message}`);
3805
+ }
3806
+ a(n), Q.bumpVerticalPos(o);
3807
+ }
3808
+ n($, "adjustLoopHeightForWrap");
3809
+ function it(e, t, r, i, a, o, s) {
3810
+ function c(n, r) {
3811
+ 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);
3812
+ }
3813
+ n(c, "receiverAdjustment");
3814
+ function l(n, r) {
3815
+ 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);
3816
+ }
3817
+ n(l, "senderAdjustment");
3818
+ let u = [
3819
+ R.ACTOR,
3820
+ R.CONTROL,
3821
+ R.ENTITY,
3822
+ R.DATABASE
3823
+ ];
3824
+ if (o.get(e.to) == i) {
3825
+ let t = a.get(e.to);
3826
+ c(t, u.includes(t.type) ? z / 2 + 3 : t.width / 2 + 3), t.starty = r - t.height / 2, Q.bumpVerticalPos(t.height / 2);
3827
+ } else if (s.get(e.from) == i) {
3828
+ let t = a.get(e.from);
3829
+ Z.mirrorActors && l(t, u.includes(t.type) ? z / 2 : t.width / 2), t.stopy = r - t.height / 2, Q.bumpVerticalPos(t.height / 2);
3830
+ } else if (s.get(e.to) == i) {
3831
+ let t = a.get(e.to);
3832
+ 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);
3833
+ }
3834
+ }
3835
+ n(it, "adjustCreatedDestroyedData");
3836
+ var at = /* @__PURE__ */ n(async function(r, i, a, o) {
3837
+ let { securityLevel: s, sequence: c, look: l, themeVariables: u } = d();
3838
+ Z = c;
3839
+ let p;
3840
+ s === "sandbox" && (p = t("#i" + i));
3841
+ let m = t(s === "sandbox" ? p.nodes()[0].contentDocument.body : "body"), h = s === "sandbox" ? p.nodes()[0].contentDocument : document;
3842
+ Q.init(), e.debug(o.db);
3843
+ 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);
3844
+ 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) {
3845
+ let e = /* @__PURE__ */ new Set();
3846
+ S.forEach((t) => {
3847
+ e.add(t.from), e.add(t.to);
3848
+ }), x = x.filter((t) => e.has(t));
3849
+ }
3850
+ let D = new Map(x.map((e, t) => [_.get(e)?.name ?? e, t]));
3851
+ Qe(g, _, v, x, 0, S, !1);
3852
+ let O = await _t(S, _, E, o);
3853
+ 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);
3854
+ function k(e, t) {
3855
+ let n = Q.endActivation(e);
3856
+ 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);
3857
+ }
3858
+ n(k, "activeEnd");
3859
+ let A = 1, j = 1, M = [], N = [], P = 0;
3860
+ for (let t of S) {
3861
+ let n, r, i;
3862
+ switch (t.type) {
3863
+ case o.db.LINETYPE.NOTE:
3864
+ Q.resetVerticalPos(), r = t.noteModel, await Ge(g, r, t.id);
3865
+ break;
3866
+ case o.db.LINETYPE.ACTIVE_START:
3867
+ Q.newActivation(t, g, _);
3868
+ break;
3869
+ case o.db.LINETYPE.CENTRAL_CONNECTION:
3870
+ Q.newActivation(t, g, _);
3871
+ break;
3872
+ case o.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:
3873
+ Q.newActivation(t, g, _);
3874
+ break;
3875
+ case o.db.LINETYPE.ACTIVE_END:
3876
+ k(t, Q.getVerticalPos());
3877
+ break;
3878
+ case o.db.LINETYPE.LOOP_START:
3879
+ $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3880
+ break;
3881
+ case o.db.LINETYPE.LOOP_END:
3882
+ n = Q.endLoop(), await X.drawLoop(g, n, "loop", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3883
+ break;
3884
+ case o.db.LINETYPE.RECT_START:
3885
+ $(O, t, Z.boxMargin, Z.boxMargin, (e) => {
3886
+ let t = e.message;
3887
+ t ||= u?.rectBkgColor || u?.actorBkg || "rgba(128, 128, 128, 0.5)", Q.newLoop(void 0, t);
3888
+ });
3889
+ break;
3890
+ case o.db.LINETYPE.RECT_END:
3891
+ n = Q.endLoop(), N.push(n), Q.models.addLoop(n), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos());
3892
+ break;
3893
+ case o.db.LINETYPE.OPT_START:
3894
+ $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3895
+ break;
3896
+ case o.db.LINETYPE.OPT_END:
3897
+ n = Q.endLoop(), await X.drawLoop(g, n, "opt", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3898
+ break;
3899
+ case o.db.LINETYPE.ALT_START:
3900
+ $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3901
+ break;
3902
+ case o.db.LINETYPE.ALT_ELSE:
3903
+ $(O, t, Z.boxMargin + Z.boxTextMargin, Z.boxMargin, (e) => Q.addSectionToLoop(e));
3904
+ break;
3905
+ case o.db.LINETYPE.ALT_END:
3906
+ n = Q.endLoop(), await X.drawLoop(g, n, "alt", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3907
+ break;
3908
+ case o.db.LINETYPE.PAR_START:
3909
+ case o.db.LINETYPE.PAR_OVER_START:
3910
+ $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e)), Q.saveVerticalPos();
3911
+ break;
3912
+ case o.db.LINETYPE.PAR_AND:
3913
+ $(O, t, Z.boxMargin + Z.boxTextMargin, Z.boxMargin, (e) => Q.addSectionToLoop(e));
3914
+ break;
3915
+ case o.db.LINETYPE.PAR_END:
3916
+ n = Q.endLoop(), await X.drawLoop(g, n, "par", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3917
+ break;
3918
+ case o.db.LINETYPE.AUTONUMBER:
3919
+ A = t.message.start || A, j = t.message.step || j, t.message.visible ? o.db.enableSequenceNumbers() : o.db.disableSequenceNumbers();
3920
+ break;
3921
+ case o.db.LINETYPE.CRITICAL_START:
3922
+ $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3923
+ break;
3924
+ case o.db.LINETYPE.CRITICAL_OPTION:
3925
+ $(O, t, Z.boxMargin + Z.boxTextMargin, Z.boxMargin, (e) => Q.addSectionToLoop(e));
3926
+ break;
3927
+ case o.db.LINETYPE.CRITICAL_END:
3928
+ n = Q.endLoop(), await X.drawLoop(g, n, "critical", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3929
+ break;
3930
+ case o.db.LINETYPE.BREAK_START:
3931
+ $(O, t, Z.boxMargin, Z.boxMargin + Z.boxTextMargin, (e) => Q.newLoop(e));
3932
+ break;
3933
+ case o.db.LINETYPE.BREAK_END:
3934
+ n = Q.endLoop(), await X.drawLoop(g, n, "break", Z, t), Q.bumpVerticalPos(n.stopy - Q.getVerticalPos()), Q.models.addLoop(n);
3935
+ break;
3936
+ default: try {
3937
+ 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;
3938
+ let e = await Xe(g, i);
3939
+ it(t, i, e, P, _, v, y), M.push({
3940
+ messageModel: i,
3941
+ lineStartY: e,
3942
+ msg: t
3943
+ }), Q.models.addMessage(i);
3944
+ } catch (t) {
3945
+ e.error("error while drawing message", t);
3946
+ }
3947
+ }
3948
+ [
3949
+ o.db.LINETYPE.SOLID_OPEN,
3950
+ o.db.LINETYPE.DOTTED_OPEN,
3951
+ o.db.LINETYPE.SOLID,
3952
+ o.db.LINETYPE.SOLID_TOP,
3953
+ o.db.LINETYPE.SOLID_BOTTOM,
3954
+ o.db.LINETYPE.STICK_TOP,
3955
+ o.db.LINETYPE.STICK_BOTTOM,
3956
+ o.db.LINETYPE.SOLID_TOP_DOTTED,
3957
+ o.db.LINETYPE.SOLID_BOTTOM_DOTTED,
3958
+ o.db.LINETYPE.STICK_TOP_DOTTED,
3959
+ o.db.LINETYPE.STICK_BOTTOM_DOTTED,
3960
+ o.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
3961
+ o.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,
3962
+ o.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
3963
+ o.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
3964
+ o.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
3965
+ o.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
3966
+ o.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
3967
+ o.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
3968
+ o.db.LINETYPE.DOTTED,
3969
+ o.db.LINETYPE.SOLID_CROSS,
3970
+ o.db.LINETYPE.DOTTED_CROSS,
3971
+ o.db.LINETYPE.SOLID_POINT,
3972
+ o.db.LINETYPE.DOTTED_POINT,
3973
+ o.db.LINETYPE.BIDIRECTIONAL_SOLID,
3974
+ o.db.LINETYPE.BIDIRECTIONAL_DOTTED
3975
+ ].includes(t.type) && (A = Math.round((A + j) * 100) / 100), P++;
3976
+ }
3977
+ e.debug("createdActors", v), e.debug("destroyedActors", y), await $e(g, _, x, !1, i, o, D);
3978
+ for (let e of M) await Ze(g, e.messageModel, e.lineStartY, o, e.msg, i);
3979
+ Z.mirrorActors && await $e(g, _, x, !0, i, o, D), N.forEach((e) => X.drawBackgroundRect(g, e)), be(g, _, x, Z);
3980
+ for (let e of Q.models.boxes) {
3981
+ e.height = Q.getVerticalPos() - e.y, Q.insert(e.x, e.y, e.x + e.width, e.height);
3982
+ let t = Z.boxMargin * 2;
3983
+ 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);
3984
+ }
3985
+ w && Q.bumpVerticalPos(Z.boxMargin);
3986
+ let F = et(g, _, x, h), { bounds: I } = Q.getBounds();
3987
+ 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);
3988
+ let L = I.stopy - I.starty;
3989
+ L < F.maxHeight && (L = F.maxHeight);
3990
+ let ee = L + 2 * Z.diagramMarginY;
3991
+ Z.mirrorActors && (ee = ee - Z.boxMargin + Z.bottomMarginAdj);
3992
+ let R = I.stopx - I.startx;
3993
+ R < F.maxWidth && (R = F.maxWidth);
3994
+ let te = R + 2 * Z.diagramMarginX;
3995
+ 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);
3996
+ let ne = C ? 40 : 0, re = _.size && l === "neo" ? 30 : 0;
3997
+ g.attr("viewBox", I.startx - Z.diagramMarginX + " -" + (Z.diagramMarginY + ne) + " " + te + " " + (ee + ne + re)), e.debug("models:", Q.models);
3998
+ }, "draw");
3999
+ async function ot(t, n, r) {
4000
+ let i = {};
4001
+ for (let e of n) if (t.get(e.to) && t.get(e.from)) {
4002
+ let n = t.get(e.to);
4003
+ if (e.placement === r.db.PLACEMENT.LEFTOF && !n.prevActor || e.placement === r.db.PLACEMENT.RIGHTOF && !n.nextActor) continue;
4004
+ 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;
4005
+ 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)));
4006
+ }
4007
+ return e.debug("maxMessageWidthPerActor:", i), i;
4008
+ }
4009
+ n(ot, "getMaxMessageWidthPerActor");
4010
+ var st = /* @__PURE__ */ n(function(e) {
4011
+ let t = 0, n = Ye(Z);
4012
+ for (let r in e.links) {
4013
+ let e = S.calculateTextDimensions(r, n).width + 2 * Z.wrapPadding + 2 * Z.boxMargin;
4014
+ t < e && (t = e);
4015
+ }
4016
+ return t;
4017
+ }, "getRequiredPopupWidth");
4018
+ async function ct(e, t, n) {
4019
+ let r = 0;
4020
+ for (let t of e.keys()) {
4021
+ let n = e.get(t);
4022
+ n.wrap && (n.description = S.wrapLabel(n.description, Z.width - 2 * Z.wrapPadding, Ye(Z)));
4023
+ let i = m(n.description) ? await p(n.description, d()) : S.calculateTextDimensions(n.description, Ye(Z));
4024
+ 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);
4025
+ }
4026
+ for (let n in t) {
4027
+ let r = e.get(n);
4028
+ if (!r) continue;
4029
+ let i = e.get(r.nextActor);
4030
+ if (!i) {
4031
+ let e = t[n] + Z.actorMargin - r.width / 2;
4032
+ r.margin = _.getMax(e, Z.actorMargin);
4033
+ continue;
4034
+ }
4035
+ let a = t[n] + Z.actorMargin - r.width / 2 - i.width / 2;
4036
+ r.margin = _.getMax(a, Z.actorMargin);
4037
+ }
4038
+ let i = 0;
4039
+ return n.forEach((t) => {
4040
+ 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;
4041
+ r += a, r -= 2 * Z.boxTextMargin, t.wrap && (t.name = S.wrapLabel(t.name, r - 2 * Z.wrapPadding, n));
4042
+ let o = S.calculateTextDimensions(t.name, n);
4043
+ i = _.getMax(o.height, i);
4044
+ let s = _.getMax(r, o.width + 2 * Z.wrapPadding);
4045
+ if (t.margin = Z.boxTextMargin, r < s) {
4046
+ let e = (s - r) / 2;
4047
+ t.margin += e;
4048
+ }
4049
+ }), n.forEach((e) => e.textMaxHeight = i), _.getMax(r, Z.height);
4050
+ }
4051
+ n(ct, "calculateActorMargins");
4052
+ var lt = /* @__PURE__ */ n(async function(t, n, r) {
4053
+ 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 = {
4054
+ width: c ? Z.width : _.getMax(Z.width, l.width + 2 * Z.noteMargin),
4055
+ height: 0,
4056
+ startx: i.x,
4057
+ stopx: 0,
4058
+ starty: 0,
4059
+ stopy: 0,
4060
+ message: t.message
4061
+ };
4062
+ 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;
4063
+ }, "buildNoteModel"), ut = 4, dt = 6, ft = /* @__PURE__ */ n(function(e, t) {
4064
+ let { CENTRAL_CONNECTION: n, CENTRAL_CONNECTION_REVERSE: r, CENTRAL_CONNECTION_DUAL: i } = t.db.LINETYPE;
4065
+ return [
4066
+ n,
4067
+ r,
4068
+ i
4069
+ ].includes(e.centralConnection);
4070
+ }, "hasCentralConnection"), pt = /* @__PURE__ */ n(function(e, t, n) {
4071
+ let { CENTRAL_CONNECTION_REVERSE: r, CENTRAL_CONNECTION_DUAL: i, BIDIRECTIONAL_SOLID: a, BIDIRECTIONAL_DOTTED: o } = t.db.LINETYPE, s = 0;
4072
+ 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;
4073
+ }, "calculateCentralConnectionOffset"), mt = /* @__PURE__ */ n(function(e, t) {
4074
+ 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;
4075
+ return [
4076
+ n,
4077
+ r,
4078
+ i,
4079
+ a,
4080
+ o,
4081
+ s,
4082
+ c,
4083
+ l
4084
+ ].includes(e.type);
4085
+ }, "isReverseArrowType"), ht = /* @__PURE__ */ n(function(e, t) {
4086
+ let { BIDIRECTIONAL_SOLID: n, BIDIRECTIONAL_DOTTED: r } = t.db.LINETYPE;
4087
+ return [n, r].includes(e.type);
4088
+ }, "isBidirectionalArrowType"), gt = /* @__PURE__ */ n(function(e, t, r) {
4089
+ let { look: i } = d();
4090
+ if (![
4091
+ r.db.LINETYPE.SOLID_OPEN,
4092
+ r.db.LINETYPE.DOTTED_OPEN,
4093
+ r.db.LINETYPE.SOLID,
4094
+ r.db.LINETYPE.SOLID_TOP,
4095
+ r.db.LINETYPE.SOLID_BOTTOM,
4096
+ r.db.LINETYPE.STICK_TOP,
4097
+ r.db.LINETYPE.STICK_BOTTOM,
4098
+ r.db.LINETYPE.SOLID_TOP_DOTTED,
4099
+ r.db.LINETYPE.SOLID_BOTTOM_DOTTED,
4100
+ r.db.LINETYPE.STICK_TOP_DOTTED,
4101
+ r.db.LINETYPE.STICK_BOTTOM_DOTTED,
4102
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4103
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,
4104
+ r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
4105
+ r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
4106
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4107
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4108
+ r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
4109
+ r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
4110
+ r.db.LINETYPE.DOTTED,
4111
+ r.db.LINETYPE.SOLID_CROSS,
4112
+ r.db.LINETYPE.DOTTED_CROSS,
4113
+ r.db.LINETYPE.SOLID_POINT,
4114
+ r.db.LINETYPE.DOTTED_POINT,
4115
+ r.db.LINETYPE.BIDIRECTIONAL_SOLID,
4116
+ r.db.LINETYPE.BIDIRECTIONAL_DOTTED
4117
+ ].includes(e.type)) return {};
4118
+ let [a, o] = rt(e.from, t), [s, c] = rt(e.to, t), l = a <= s, u = l ? o : a, f = l ? s : c;
4119
+ 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);
4120
+ let p = Math.abs(s - c) > 2, m = /* @__PURE__ */ n((e) => l ? -e : e, "adjustValue");
4121
+ e.from === e.to ? f = u : (e.activate && !p && (f += m(Z.activationWidth / 2 - 1)), [
4122
+ r.db.LINETYPE.SOLID_OPEN,
4123
+ r.db.LINETYPE.DOTTED_OPEN,
4124
+ r.db.LINETYPE.STICK_TOP,
4125
+ r.db.LINETYPE.STICK_BOTTOM,
4126
+ r.db.LINETYPE.STICK_TOP_DOTTED,
4127
+ r.db.LINETYPE.STICK_BOTTOM_DOTTED,
4128
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4129
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4130
+ r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,
4131
+ r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,
4132
+ r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,
4133
+ r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,
4134
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4135
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE
4136
+ ].includes(e.type) || (f += m(3)), [
4137
+ r.db.LINETYPE.BIDIRECTIONAL_SOLID,
4138
+ r.db.LINETYPE.BIDIRECTIONAL_DOTTED,
4139
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,
4140
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,
4141
+ r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,
4142
+ r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE
4143
+ ].includes(e.type) && (u -= m(3)));
4144
+ let h = [
4145
+ a,
4146
+ o,
4147
+ s,
4148
+ c
4149
+ ], g = Math.abs(u - f);
4150
+ e.wrap && e.message && (e.message = S.wrapLabel(e.message, _.getMax(g + 2 * Z.wrapPadding, Z.width), qe(Z)));
4151
+ let v = S.calculateTextDimensions(e.message, qe(Z));
4152
+ return {
4153
+ width: _.getMax(e.wrap ? 0 : v.width + 2 * Z.wrapPadding, g + 2 * Z.wrapPadding, Z.width),
4154
+ height: 0,
4155
+ startx: u,
4156
+ stopx: f,
4157
+ starty: 0,
4158
+ stopy: 0,
4159
+ message: e.message,
4160
+ type: e.type,
4161
+ wrap: e.wrap,
4162
+ fromBounds: Math.min.apply(null, h),
4163
+ toBounds: Math.max.apply(null, h)
4164
+ };
4165
+ }, "buildMessageModel"), _t = /* @__PURE__ */ n(async function(t, n, r, i) {
4166
+ let a = {}, o = [], s, c, l;
4167
+ for (let e of t) {
4168
+ switch (e.type) {
4169
+ case i.db.LINETYPE.LOOP_START:
4170
+ case i.db.LINETYPE.ALT_START:
4171
+ case i.db.LINETYPE.OPT_START:
4172
+ case i.db.LINETYPE.PAR_START:
4173
+ case i.db.LINETYPE.PAR_OVER_START:
4174
+ case i.db.LINETYPE.CRITICAL_START:
4175
+ case i.db.LINETYPE.BREAK_START:
4176
+ o.push({
4177
+ id: e.id,
4178
+ msg: e.message,
4179
+ from: 2 ** 53 - 1,
4180
+ to: -(2 ** 53 - 1),
4181
+ width: 0
4182
+ });
4183
+ break;
4184
+ case i.db.LINETYPE.ALT_ELSE:
4185
+ case i.db.LINETYPE.PAR_AND:
4186
+ case i.db.LINETYPE.CRITICAL_OPTION:
4187
+ e.message && (s = o.pop(), a[s.id] = s, a[e.id] = s, o.push(s));
4188
+ break;
4189
+ case i.db.LINETYPE.LOOP_END:
4190
+ case i.db.LINETYPE.ALT_END:
4191
+ case i.db.LINETYPE.OPT_END:
4192
+ case i.db.LINETYPE.PAR_END:
4193
+ case i.db.LINETYPE.CRITICAL_END:
4194
+ case i.db.LINETYPE.BREAK_END:
4195
+ s = o.pop(), a[s.id] = s;
4196
+ break;
4197
+ case i.db.LINETYPE.ACTIVE_START:
4198
+ {
4199
+ 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 = {
4200
+ startx: i,
4201
+ stopx: i + Z.activationWidth,
4202
+ actor: e.from,
4203
+ enabled: !0
4204
+ };
4205
+ Q.activations.push(a);
4206
+ }
4207
+ break;
4208
+ case i.db.LINETYPE.ACTIVE_END: {
4209
+ let t = Q.activations.map((e) => e.actor).lastIndexOf(e.from);
4210
+ Q.activations.splice(t, 1).splice(0, 1);
4211
+ }
4212
+ }
4213
+ e.placement === void 0 ? (l = gt(e, n, i), e.msgModel = l, l.startx && l.stopx && o.length > 0 && o.forEach((t) => {
4214
+ if (s = t, l.startx === l.stopx) {
4215
+ let t = n.get(e.from), r = n.get(e.to);
4216
+ 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;
4217
+ } else s.from = _.getMin(l.startx, s.from), s.to = _.getMax(l.stopx, s.to), s.width = _.getMax(s.width, l.width) - Z.labelBoxWidth;
4218
+ })) : (c = await lt(e, n, i), e.noteModel = c, o.forEach((e) => {
4219
+ 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;
4220
+ }));
4221
+ }
4222
+ return Q.activations = [], e.debug("Loop type widths:", a), a;
4223
+ }, "calculateLoopBounds"), vt = {
4224
+ parser: F,
4225
+ get db() {
4226
+ return new te();
4227
+ },
4228
+ renderer: {
4229
+ bounds: Q,
4230
+ drawActors: $e,
4231
+ drawActorsPopup: et,
4232
+ setConf: tt,
4233
+ draw: at
4234
+ },
4235
+ styles: ne,
4236
+ init: /* @__PURE__ */ n((e) => {
4237
+ e.sequence ||= {}, e.wrap && (e.sequence.wrap = e.wrap, o({ sequence: { wrap: e.wrap } }));
4238
+ }, "init")
4239
+ };
4240
+ //#endregion
4241
+ export { vt as diagram };