for-humanity 0.11.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 +33 -0
  2. package/README.md +16 -9
  3. package/dist/browser.js +16 -16
  4. package/dist/cli.css +2 -941
  5. package/dist/cli.js +92 -2290
  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 -454
  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 -55
  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 -782
  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 -186
  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,2139 @@
1
+ import { m as e, p as t } from "./chunk-DVNvSFoz.js";
2
+ import { n } from "./chunk-BYzrzvCI.js";
3
+ import { C as r, H as i, U as a, _ as o, a as s, b as c, et as l, q as u, s as d, v as f } from "./chunk-MFVRUoO0.js";
4
+ import { _ as p, s as m } from "./chunk-K7Myuj2-.js";
5
+ import "./chunk-Bok8z-Yo.js";
6
+ import "./chunk-KuPYb48V.js";
7
+ import "./chunk-_a9EZE1v.js";
8
+ import { a as h, i as g, o as _, r as v } from "./chunk-DBh1mIbK.js";
9
+ import "./chunk-DORnIAsy.js";
10
+ import "./chunk-CLgRAtOz.js";
11
+ import "./chunk-DU69_VcF.js";
12
+ import "./chunk-DpuxlyL_.js";
13
+ import { r as y, t as b } from "./chunk-BB8uZHwY.js";
14
+ import { t as x } from "./chunk-CLVYqOBI.js";
15
+ import { t as S } from "./chunk-CCM2AH-C.js";
16
+ import { t as C } from "./chunk-BL404pH5.js";
17
+ //#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-A6IESKWZ.mjs
18
+ var w = (function() {
19
+ var e = /* @__PURE__ */ n(function(e, t, n, r) {
20
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
21
+ return n;
22
+ }, "o"), t = [1, 2], r = [1, 3], i = [1, 4], a = [2, 4], o = [1, 9], s = [1, 11], c = [1, 16], l = [1, 17], u = [1, 18], d = [1, 19], f = [1, 33], p = [1, 20], m = [1, 21], h = [1, 22], g = [1, 23], _ = [1, 24], v = [1, 26], y = [1, 27], b = [1, 28], x = [1, 29], S = [1, 30], C = [1, 31], w = [1, 32], T = [1, 35], E = [1, 36], D = [1, 37], O = [1, 38], k = [1, 34], A = [
23
+ 1,
24
+ 4,
25
+ 5,
26
+ 16,
27
+ 17,
28
+ 19,
29
+ 21,
30
+ 22,
31
+ 24,
32
+ 25,
33
+ 26,
34
+ 27,
35
+ 28,
36
+ 29,
37
+ 33,
38
+ 35,
39
+ 37,
40
+ 38,
41
+ 41,
42
+ 45,
43
+ 48,
44
+ 51,
45
+ 52,
46
+ 53,
47
+ 54,
48
+ 57
49
+ ], j = [
50
+ 1,
51
+ 4,
52
+ 5,
53
+ 14,
54
+ 15,
55
+ 16,
56
+ 17,
57
+ 19,
58
+ 21,
59
+ 22,
60
+ 24,
61
+ 25,
62
+ 26,
63
+ 27,
64
+ 28,
65
+ 29,
66
+ 33,
67
+ 35,
68
+ 37,
69
+ 38,
70
+ 39,
71
+ 40,
72
+ 41,
73
+ 45,
74
+ 48,
75
+ 51,
76
+ 52,
77
+ 53,
78
+ 54,
79
+ 57
80
+ ], M = [
81
+ 4,
82
+ 5,
83
+ 16,
84
+ 17,
85
+ 19,
86
+ 21,
87
+ 22,
88
+ 24,
89
+ 25,
90
+ 26,
91
+ 27,
92
+ 28,
93
+ 29,
94
+ 33,
95
+ 35,
96
+ 37,
97
+ 38,
98
+ 41,
99
+ 45,
100
+ 48,
101
+ 51,
102
+ 52,
103
+ 53,
104
+ 54,
105
+ 57
106
+ ], N = {
107
+ trace: /* @__PURE__ */ n(function() {}, "trace"),
108
+ yy: {},
109
+ symbols_: {
110
+ error: 2,
111
+ start: 3,
112
+ SPACE: 4,
113
+ NL: 5,
114
+ SD: 6,
115
+ document: 7,
116
+ line: 8,
117
+ statement: 9,
118
+ classDefStatement: 10,
119
+ styleStatement: 11,
120
+ cssClassStatement: 12,
121
+ idStatement: 13,
122
+ DESCR: 14,
123
+ "-->": 15,
124
+ HIDE_EMPTY: 16,
125
+ scale: 17,
126
+ WIDTH: 18,
127
+ COMPOSIT_STATE: 19,
128
+ STRUCT_START: 20,
129
+ STRUCT_STOP: 21,
130
+ STATE_DESCR: 22,
131
+ AS: 23,
132
+ ID: 24,
133
+ FORK: 25,
134
+ JOIN: 26,
135
+ CHOICE: 27,
136
+ CONCURRENT: 28,
137
+ note: 29,
138
+ notePosition: 30,
139
+ NOTE_TEXT: 31,
140
+ direction: 32,
141
+ acc_title: 33,
142
+ acc_title_value: 34,
143
+ acc_descr: 35,
144
+ acc_descr_value: 36,
145
+ acc_descr_multiline_value: 37,
146
+ CLICK: 38,
147
+ STRING: 39,
148
+ HREF: 40,
149
+ classDef: 41,
150
+ CLASSDEF_ID: 42,
151
+ CLASSDEF_STYLEOPTS: 43,
152
+ DEFAULT: 44,
153
+ style: 45,
154
+ STYLE_IDS: 46,
155
+ STYLEDEF_STYLEOPTS: 47,
156
+ class: 48,
157
+ CLASSENTITY_IDS: 49,
158
+ STYLECLASS: 50,
159
+ direction_tb: 51,
160
+ direction_bt: 52,
161
+ direction_rl: 53,
162
+ direction_lr: 54,
163
+ eol: 55,
164
+ ";": 56,
165
+ EDGE_STATE: 57,
166
+ STYLE_SEPARATOR: 58,
167
+ left_of: 59,
168
+ right_of: 60,
169
+ $accept: 0,
170
+ $end: 1
171
+ },
172
+ terminals_: {
173
+ 2: "error",
174
+ 4: "SPACE",
175
+ 5: "NL",
176
+ 6: "SD",
177
+ 14: "DESCR",
178
+ 15: "-->",
179
+ 16: "HIDE_EMPTY",
180
+ 17: "scale",
181
+ 18: "WIDTH",
182
+ 19: "COMPOSIT_STATE",
183
+ 20: "STRUCT_START",
184
+ 21: "STRUCT_STOP",
185
+ 22: "STATE_DESCR",
186
+ 23: "AS",
187
+ 24: "ID",
188
+ 25: "FORK",
189
+ 26: "JOIN",
190
+ 27: "CHOICE",
191
+ 28: "CONCURRENT",
192
+ 29: "note",
193
+ 31: "NOTE_TEXT",
194
+ 33: "acc_title",
195
+ 34: "acc_title_value",
196
+ 35: "acc_descr",
197
+ 36: "acc_descr_value",
198
+ 37: "acc_descr_multiline_value",
199
+ 38: "CLICK",
200
+ 39: "STRING",
201
+ 40: "HREF",
202
+ 41: "classDef",
203
+ 42: "CLASSDEF_ID",
204
+ 43: "CLASSDEF_STYLEOPTS",
205
+ 44: "DEFAULT",
206
+ 45: "style",
207
+ 46: "STYLE_IDS",
208
+ 47: "STYLEDEF_STYLEOPTS",
209
+ 48: "class",
210
+ 49: "CLASSENTITY_IDS",
211
+ 50: "STYLECLASS",
212
+ 51: "direction_tb",
213
+ 52: "direction_bt",
214
+ 53: "direction_rl",
215
+ 54: "direction_lr",
216
+ 56: ";",
217
+ 57: "EDGE_STATE",
218
+ 58: "STYLE_SEPARATOR",
219
+ 59: "left_of",
220
+ 60: "right_of"
221
+ },
222
+ productions_: [
223
+ 0,
224
+ [3, 2],
225
+ [3, 2],
226
+ [3, 2],
227
+ [7, 0],
228
+ [7, 2],
229
+ [8, 2],
230
+ [8, 1],
231
+ [8, 1],
232
+ [9, 1],
233
+ [9, 1],
234
+ [9, 1],
235
+ [9, 1],
236
+ [9, 2],
237
+ [9, 3],
238
+ [9, 4],
239
+ [9, 1],
240
+ [9, 2],
241
+ [9, 1],
242
+ [9, 4],
243
+ [9, 3],
244
+ [9, 6],
245
+ [9, 1],
246
+ [9, 1],
247
+ [9, 1],
248
+ [9, 1],
249
+ [9, 4],
250
+ [9, 4],
251
+ [9, 1],
252
+ [9, 2],
253
+ [9, 2],
254
+ [9, 1],
255
+ [9, 5],
256
+ [9, 5],
257
+ [10, 3],
258
+ [10, 3],
259
+ [11, 3],
260
+ [12, 3],
261
+ [32, 1],
262
+ [32, 1],
263
+ [32, 1],
264
+ [32, 1],
265
+ [55, 1],
266
+ [55, 1],
267
+ [13, 1],
268
+ [13, 1],
269
+ [13, 3],
270
+ [13, 3],
271
+ [30, 1],
272
+ [30, 1]
273
+ ],
274
+ performAction: /* @__PURE__ */ n(function(e, t, n, r, i, a, o) {
275
+ var s = a.length - 1;
276
+ switch (i) {
277
+ case 3: return r.setRootDoc(a[s]), a[s];
278
+ case 4:
279
+ this.$ = [];
280
+ break;
281
+ case 5:
282
+ a[s] != "nl" && (a[s - 1].push(a[s]), this.$ = a[s - 1]);
283
+ break;
284
+ case 6:
285
+ case 7:
286
+ this.$ = a[s];
287
+ break;
288
+ case 8:
289
+ this.$ = "nl";
290
+ break;
291
+ case 12:
292
+ this.$ = a[s];
293
+ break;
294
+ case 13:
295
+ let e = a[s - 1];
296
+ e.description = r.trimColon(a[s]), this.$ = e;
297
+ break;
298
+ case 14:
299
+ this.$ = {
300
+ stmt: "relation",
301
+ state1: a[s - 2],
302
+ state2: a[s]
303
+ };
304
+ break;
305
+ case 15:
306
+ let t = r.trimColon(a[s]);
307
+ this.$ = {
308
+ stmt: "relation",
309
+ state1: a[s - 3],
310
+ state2: a[s - 1],
311
+ description: t
312
+ };
313
+ break;
314
+ case 19:
315
+ this.$ = {
316
+ stmt: "state",
317
+ id: a[s - 3],
318
+ type: "default",
319
+ description: "",
320
+ doc: a[s - 1]
321
+ };
322
+ break;
323
+ case 20:
324
+ var c = a[s], l = a[s - 2].trim();
325
+ if (a[s].match(":")) {
326
+ var u = a[s].split(":");
327
+ c = u[0], l = [l, u[1]];
328
+ }
329
+ this.$ = {
330
+ stmt: "state",
331
+ id: c,
332
+ type: "default",
333
+ description: l
334
+ };
335
+ break;
336
+ case 21:
337
+ this.$ = {
338
+ stmt: "state",
339
+ id: a[s - 3],
340
+ type: "default",
341
+ description: a[s - 5],
342
+ doc: a[s - 1]
343
+ };
344
+ break;
345
+ case 22:
346
+ this.$ = {
347
+ stmt: "state",
348
+ id: a[s],
349
+ type: "fork"
350
+ };
351
+ break;
352
+ case 23:
353
+ this.$ = {
354
+ stmt: "state",
355
+ id: a[s],
356
+ type: "join"
357
+ };
358
+ break;
359
+ case 24:
360
+ this.$ = {
361
+ stmt: "state",
362
+ id: a[s],
363
+ type: "choice"
364
+ };
365
+ break;
366
+ case 25:
367
+ this.$ = {
368
+ stmt: "state",
369
+ id: r.getDividerId(),
370
+ type: "divider"
371
+ };
372
+ break;
373
+ case 26:
374
+ this.$ = {
375
+ stmt: "state",
376
+ id: a[s - 1].trim(),
377
+ note: {
378
+ position: a[s - 2].trim(),
379
+ text: a[s].trim()
380
+ }
381
+ };
382
+ break;
383
+ case 29:
384
+ this.$ = a[s].trim(), r.setAccTitle(this.$);
385
+ break;
386
+ case 30:
387
+ case 31:
388
+ this.$ = a[s].trim(), r.setAccDescription(this.$);
389
+ break;
390
+ case 32:
391
+ this.$ = {
392
+ stmt: "click",
393
+ id: a[s - 3],
394
+ url: a[s - 2],
395
+ tooltip: a[s - 1]
396
+ };
397
+ break;
398
+ case 33:
399
+ this.$ = {
400
+ stmt: "click",
401
+ id: a[s - 3],
402
+ url: a[s - 1],
403
+ tooltip: ""
404
+ };
405
+ break;
406
+ case 34:
407
+ case 35:
408
+ this.$ = {
409
+ stmt: "classDef",
410
+ id: a[s - 1].trim(),
411
+ classes: a[s].trim()
412
+ };
413
+ break;
414
+ case 36:
415
+ this.$ = {
416
+ stmt: "style",
417
+ id: a[s - 1].trim(),
418
+ styleClass: a[s].trim()
419
+ };
420
+ break;
421
+ case 37:
422
+ this.$ = {
423
+ stmt: "applyClass",
424
+ id: a[s - 1].trim(),
425
+ styleClass: a[s].trim()
426
+ };
427
+ break;
428
+ case 38:
429
+ r.setDirection("TB"), this.$ = {
430
+ stmt: "dir",
431
+ value: "TB"
432
+ };
433
+ break;
434
+ case 39:
435
+ r.setDirection("BT"), this.$ = {
436
+ stmt: "dir",
437
+ value: "BT"
438
+ };
439
+ break;
440
+ case 40:
441
+ r.setDirection("RL"), this.$ = {
442
+ stmt: "dir",
443
+ value: "RL"
444
+ };
445
+ break;
446
+ case 41:
447
+ r.setDirection("LR"), this.$ = {
448
+ stmt: "dir",
449
+ value: "LR"
450
+ };
451
+ break;
452
+ case 44:
453
+ case 45:
454
+ this.$ = {
455
+ stmt: "state",
456
+ id: a[s].trim(),
457
+ type: "default",
458
+ description: ""
459
+ };
460
+ break;
461
+ case 46:
462
+ this.$ = {
463
+ stmt: "state",
464
+ id: a[s - 2].trim(),
465
+ classes: [a[s].trim()],
466
+ type: "default",
467
+ description: ""
468
+ };
469
+ break;
470
+ case 47: this.$ = {
471
+ stmt: "state",
472
+ id: a[s - 2].trim(),
473
+ classes: [a[s].trim()],
474
+ type: "default",
475
+ description: ""
476
+ };
477
+ }
478
+ }, "anonymous"),
479
+ table: [
480
+ {
481
+ 3: 1,
482
+ 4: t,
483
+ 5: r,
484
+ 6: i
485
+ },
486
+ { 1: [3] },
487
+ {
488
+ 3: 5,
489
+ 4: t,
490
+ 5: r,
491
+ 6: i
492
+ },
493
+ {
494
+ 3: 6,
495
+ 4: t,
496
+ 5: r,
497
+ 6: i
498
+ },
499
+ e([
500
+ 1,
501
+ 4,
502
+ 5,
503
+ 16,
504
+ 17,
505
+ 19,
506
+ 22,
507
+ 24,
508
+ 25,
509
+ 26,
510
+ 27,
511
+ 28,
512
+ 29,
513
+ 33,
514
+ 35,
515
+ 37,
516
+ 38,
517
+ 41,
518
+ 45,
519
+ 48,
520
+ 51,
521
+ 52,
522
+ 53,
523
+ 54,
524
+ 57
525
+ ], a, { 7: 7 }),
526
+ { 1: [2, 1] },
527
+ { 1: [2, 2] },
528
+ {
529
+ 1: [2, 3],
530
+ 4: o,
531
+ 5: s,
532
+ 8: 8,
533
+ 9: 10,
534
+ 10: 12,
535
+ 11: 13,
536
+ 12: 14,
537
+ 13: 15,
538
+ 16: c,
539
+ 17: l,
540
+ 19: u,
541
+ 22: d,
542
+ 24: f,
543
+ 25: p,
544
+ 26: m,
545
+ 27: h,
546
+ 28: g,
547
+ 29: _,
548
+ 32: 25,
549
+ 33: v,
550
+ 35: y,
551
+ 37: b,
552
+ 38: x,
553
+ 41: S,
554
+ 45: C,
555
+ 48: w,
556
+ 51: T,
557
+ 52: E,
558
+ 53: D,
559
+ 54: O,
560
+ 57: k
561
+ },
562
+ e(A, [2, 5]),
563
+ {
564
+ 9: 39,
565
+ 10: 12,
566
+ 11: 13,
567
+ 12: 14,
568
+ 13: 15,
569
+ 16: c,
570
+ 17: l,
571
+ 19: u,
572
+ 22: d,
573
+ 24: f,
574
+ 25: p,
575
+ 26: m,
576
+ 27: h,
577
+ 28: g,
578
+ 29: _,
579
+ 32: 25,
580
+ 33: v,
581
+ 35: y,
582
+ 37: b,
583
+ 38: x,
584
+ 41: S,
585
+ 45: C,
586
+ 48: w,
587
+ 51: T,
588
+ 52: E,
589
+ 53: D,
590
+ 54: O,
591
+ 57: k
592
+ },
593
+ e(A, [2, 7]),
594
+ e(A, [2, 8]),
595
+ e(A, [2, 9]),
596
+ e(A, [2, 10]),
597
+ e(A, [2, 11]),
598
+ e(A, [2, 12], {
599
+ 14: [1, 40],
600
+ 15: [1, 41]
601
+ }),
602
+ e(A, [2, 16]),
603
+ { 18: [1, 42] },
604
+ e(A, [2, 18], { 20: [1, 43] }),
605
+ { 23: [1, 44] },
606
+ e(A, [2, 22]),
607
+ e(A, [2, 23]),
608
+ e(A, [2, 24]),
609
+ e(A, [2, 25]),
610
+ {
611
+ 30: 45,
612
+ 31: [1, 46],
613
+ 59: [1, 47],
614
+ 60: [1, 48]
615
+ },
616
+ e(A, [2, 28]),
617
+ { 34: [1, 49] },
618
+ { 36: [1, 50] },
619
+ e(A, [2, 31]),
620
+ {
621
+ 13: 51,
622
+ 24: f,
623
+ 57: k
624
+ },
625
+ {
626
+ 42: [1, 52],
627
+ 44: [1, 53]
628
+ },
629
+ { 46: [1, 54] },
630
+ { 49: [1, 55] },
631
+ e(j, [2, 44], { 58: [1, 56] }),
632
+ e(j, [2, 45], { 58: [1, 57] }),
633
+ e(A, [2, 38]),
634
+ e(A, [2, 39]),
635
+ e(A, [2, 40]),
636
+ e(A, [2, 41]),
637
+ e(A, [2, 6]),
638
+ e(A, [2, 13]),
639
+ {
640
+ 13: 58,
641
+ 24: f,
642
+ 57: k
643
+ },
644
+ e(A, [2, 17]),
645
+ e(M, a, { 7: 59 }),
646
+ { 24: [1, 60] },
647
+ { 24: [1, 61] },
648
+ { 23: [1, 62] },
649
+ { 24: [2, 48] },
650
+ { 24: [2, 49] },
651
+ e(A, [2, 29]),
652
+ e(A, [2, 30]),
653
+ {
654
+ 39: [1, 63],
655
+ 40: [1, 64]
656
+ },
657
+ { 43: [1, 65] },
658
+ { 43: [1, 66] },
659
+ { 47: [1, 67] },
660
+ { 50: [1, 68] },
661
+ { 24: [1, 69] },
662
+ { 24: [1, 70] },
663
+ e(A, [2, 14], { 14: [1, 71] }),
664
+ {
665
+ 4: o,
666
+ 5: s,
667
+ 8: 8,
668
+ 9: 10,
669
+ 10: 12,
670
+ 11: 13,
671
+ 12: 14,
672
+ 13: 15,
673
+ 16: c,
674
+ 17: l,
675
+ 19: u,
676
+ 21: [1, 72],
677
+ 22: d,
678
+ 24: f,
679
+ 25: p,
680
+ 26: m,
681
+ 27: h,
682
+ 28: g,
683
+ 29: _,
684
+ 32: 25,
685
+ 33: v,
686
+ 35: y,
687
+ 37: b,
688
+ 38: x,
689
+ 41: S,
690
+ 45: C,
691
+ 48: w,
692
+ 51: T,
693
+ 52: E,
694
+ 53: D,
695
+ 54: O,
696
+ 57: k
697
+ },
698
+ e(A, [2, 20], { 20: [1, 73] }),
699
+ { 31: [1, 74] },
700
+ { 24: [1, 75] },
701
+ { 39: [1, 76] },
702
+ { 39: [1, 77] },
703
+ e(A, [2, 34]),
704
+ e(A, [2, 35]),
705
+ e(A, [2, 36]),
706
+ e(A, [2, 37]),
707
+ e(j, [2, 46]),
708
+ e(j, [2, 47]),
709
+ e(A, [2, 15]),
710
+ e(A, [2, 19]),
711
+ e(M, a, { 7: 78 }),
712
+ e(A, [2, 26]),
713
+ e(A, [2, 27]),
714
+ { 5: [1, 79] },
715
+ { 5: [1, 80] },
716
+ {
717
+ 4: o,
718
+ 5: s,
719
+ 8: 8,
720
+ 9: 10,
721
+ 10: 12,
722
+ 11: 13,
723
+ 12: 14,
724
+ 13: 15,
725
+ 16: c,
726
+ 17: l,
727
+ 19: u,
728
+ 21: [1, 81],
729
+ 22: d,
730
+ 24: f,
731
+ 25: p,
732
+ 26: m,
733
+ 27: h,
734
+ 28: g,
735
+ 29: _,
736
+ 32: 25,
737
+ 33: v,
738
+ 35: y,
739
+ 37: b,
740
+ 38: x,
741
+ 41: S,
742
+ 45: C,
743
+ 48: w,
744
+ 51: T,
745
+ 52: E,
746
+ 53: D,
747
+ 54: O,
748
+ 57: k
749
+ },
750
+ e(A, [2, 32]),
751
+ e(A, [2, 33]),
752
+ e(A, [2, 21])
753
+ ],
754
+ defaultActions: {
755
+ 5: [2, 1],
756
+ 6: [2, 2],
757
+ 47: [2, 48],
758
+ 48: [2, 49]
759
+ },
760
+ parseError: /* @__PURE__ */ n(function(e, t) {
761
+ if (t.recoverable) this.trace(e);
762
+ else {
763
+ var n = Error(e);
764
+ throw n.hash = t, n;
765
+ }
766
+ }, "parseError"),
767
+ parse: /* @__PURE__ */ n(function(e) {
768
+ 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: {} };
769
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
770
+ h.setInput(e, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
771
+ var v = h.yylloc;
772
+ o.push(v);
773
+ var y = h.options && h.options.ranges;
774
+ this.parseError = typeof g.yy.parseError == "function" ? g.yy.parseError : Object.getPrototypeOf(this).parseError;
775
+ function b(e) {
776
+ r.length -= 2 * e, a.length -= e, o.length -= e;
777
+ }
778
+ n(b, "popStack");
779
+ function x() {
780
+ var e = i.pop() || h.lex() || p;
781
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = t.symbols_[e] || e), e;
782
+ }
783
+ n(x, "lex");
784
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
785
+ 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]) {
786
+ var M = "";
787
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
788
+ 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, {
789
+ text: h.match,
790
+ token: this.terminals_[S] || S,
791
+ line: h.yylineno,
792
+ loc: v,
793
+ expected: j
794
+ });
795
+ }
796
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
797
+ switch (T[0]) {
798
+ case 1:
799
+ 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--);
800
+ break;
801
+ case 2:
802
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
803
+ first_line: o[o.length - (k || 1)].first_line,
804
+ last_line: o[o.length - 1].last_line,
805
+ first_column: o[o.length - (k || 1)].first_column,
806
+ last_column: o[o.length - 1].last_column
807
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
808
+ c,
809
+ u,
810
+ l,
811
+ g.yy,
812
+ T[1],
813
+ a,
814
+ o
815
+ ].concat(m)), E !== void 0) return E;
816
+ 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);
817
+ break;
818
+ case 3: return !0;
819
+ }
820
+ }
821
+ return !0;
822
+ }, "parse")
823
+ };
824
+ N.lexer = /* @__PURE__ */ (function() {
825
+ return {
826
+ EOF: 1,
827
+ parseError: /* @__PURE__ */ n(function(e, t) {
828
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
829
+ else throw Error(e);
830
+ }, "parseError"),
831
+ setInput: /* @__PURE__ */ n(function(e, t) {
832
+ 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 = {
833
+ first_line: 1,
834
+ first_column: 0,
835
+ last_line: 1,
836
+ last_column: 0
837
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
838
+ }, "setInput"),
839
+ input: /* @__PURE__ */ n(function() {
840
+ var e = this._input[0];
841
+ 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;
842
+ }, "input"),
843
+ unput: /* @__PURE__ */ n(function(e) {
844
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
845
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
846
+ var r = this.match.split(/(?:\r\n?|\n)/g);
847
+ 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);
848
+ var i = this.yylloc.range;
849
+ return this.yylloc = {
850
+ first_line: this.yylloc.first_line,
851
+ last_line: this.yylineno + 1,
852
+ first_column: this.yylloc.first_column,
853
+ 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
854
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
855
+ }, "unput"),
856
+ more: /* @__PURE__ */ n(function() {
857
+ return this._more = !0, this;
858
+ }, "more"),
859
+ reject: /* @__PURE__ */ n(function() {
860
+ if (this.options.backtrack_lexer) this._backtrack = !0;
861
+ 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(), {
862
+ text: "",
863
+ token: null,
864
+ line: this.yylineno
865
+ });
866
+ return this;
867
+ }, "reject"),
868
+ less: /* @__PURE__ */ n(function(e) {
869
+ this.unput(this.match.slice(e));
870
+ }, "less"),
871
+ pastInput: /* @__PURE__ */ n(function() {
872
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
873
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
874
+ }, "pastInput"),
875
+ upcomingInput: /* @__PURE__ */ n(function() {
876
+ var e = this.match;
877
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
878
+ }, "upcomingInput"),
879
+ showPosition: /* @__PURE__ */ n(function() {
880
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
881
+ return e + this.upcomingInput() + "\n" + t + "^";
882
+ }, "showPosition"),
883
+ test_match: /* @__PURE__ */ n(function(e, t) {
884
+ var n, r, i;
885
+ if (this.options.backtrack_lexer && (i = {
886
+ yylineno: this.yylineno,
887
+ yylloc: {
888
+ first_line: this.yylloc.first_line,
889
+ last_line: this.last_line,
890
+ first_column: this.yylloc.first_column,
891
+ last_column: this.yylloc.last_column
892
+ },
893
+ yytext: this.yytext,
894
+ match: this.match,
895
+ matches: this.matches,
896
+ matched: this.matched,
897
+ yyleng: this.yyleng,
898
+ offset: this.offset,
899
+ _more: this._more,
900
+ _input: this._input,
901
+ yy: this.yy,
902
+ conditionStack: this.conditionStack.slice(0),
903
+ done: this.done
904
+ }, 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 = {
905
+ first_line: this.yylloc.last_line,
906
+ last_line: this.yylineno + 1,
907
+ first_column: this.yylloc.last_column,
908
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
909
+ }, 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;
910
+ if (this._backtrack) {
911
+ for (var a in i) this[a] = i[a];
912
+ return !1;
913
+ }
914
+ return !1;
915
+ }, "test_match"),
916
+ next: /* @__PURE__ */ n(function() {
917
+ if (this.done) return this.EOF;
918
+ this._input || (this.done = !0);
919
+ var e, t, n, r;
920
+ this._more || (this.yytext = "", this.match = "");
921
+ 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)) {
922
+ if (t = n, r = a, this.options.backtrack_lexer) {
923
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
924
+ if (this._backtrack) {
925
+ t = !1;
926
+ continue;
927
+ }
928
+ return !1;
929
+ }
930
+ if (!this.options.flex) break;
931
+ }
932
+ 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(), {
933
+ text: "",
934
+ token: null,
935
+ line: this.yylineno
936
+ });
937
+ }, "next"),
938
+ lex: /* @__PURE__ */ n(function() {
939
+ return this.next() || this.lex();
940
+ }, "lex"),
941
+ begin: /* @__PURE__ */ n(function(e) {
942
+ this.conditionStack.push(e);
943
+ }, "begin"),
944
+ popState: /* @__PURE__ */ n(function() {
945
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
946
+ }, "popState"),
947
+ _currentRules: /* @__PURE__ */ n(function() {
948
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
949
+ }, "_currentRules"),
950
+ topState: /* @__PURE__ */ n(function(e) {
951
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
952
+ }, "topState"),
953
+ pushState: /* @__PURE__ */ n(function(e) {
954
+ this.begin(e);
955
+ }, "pushState"),
956
+ stateStackSize: /* @__PURE__ */ n(function() {
957
+ return this.conditionStack.length;
958
+ }, "stateStackSize"),
959
+ options: { "case-insensitive": !0 },
960
+ performAction: /* @__PURE__ */ n(function(e, t, r, i) {
961
+ function a() {
962
+ let n = t.yytext.indexOf("%%");
963
+ if (n === 0) return !1;
964
+ if (n > 0) {
965
+ let r = t.yytext.slice(0, n), i = t.yytext.slice(n);
966
+ i && e.lexer.unput(i), t.yytext = r;
967
+ }
968
+ return !0;
969
+ }
970
+ switch (n(a, "processId"), r) {
971
+ case 0: return 38;
972
+ case 1: return 40;
973
+ case 2: return 39;
974
+ case 3: return 44;
975
+ case 4: return 51;
976
+ case 5: return 52;
977
+ case 6: return 53;
978
+ case 7: return 54;
979
+ case 8: return 5;
980
+ case 9: break;
981
+ case 10: break;
982
+ case 11: break;
983
+ case 12: break;
984
+ case 13: return this.pushState("SCALE"), 17;
985
+ case 14: return 18;
986
+ case 15:
987
+ this.popState();
988
+ break;
989
+ case 16: return this.begin("acc_title"), 33;
990
+ case 17: return this.popState(), "acc_title_value";
991
+ case 18: return this.begin("acc_descr"), 35;
992
+ case 19: return this.popState(), "acc_descr_value";
993
+ case 20:
994
+ this.begin("acc_descr_multiline");
995
+ break;
996
+ case 21:
997
+ this.popState();
998
+ break;
999
+ case 22: return "acc_descr_multiline_value";
1000
+ case 23: return this.pushState("CLASSDEF"), 41;
1001
+ case 24: return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
1002
+ case 25: return this.popState(), this.pushState("CLASSDEFID"), 42;
1003
+ case 26: return this.popState(), 43;
1004
+ case 27: return this.pushState("CLASS"), 48;
1005
+ case 28: return this.popState(), this.pushState("CLASS_STYLE"), 49;
1006
+ case 29: return this.popState(), 50;
1007
+ case 30: return this.pushState("STYLE"), 45;
1008
+ case 31: return this.popState(), this.pushState("STYLEDEF_STYLES"), 46;
1009
+ case 32: return this.popState(), 47;
1010
+ case 33: return this.pushState("SCALE"), 17;
1011
+ case 34: return 18;
1012
+ case 35:
1013
+ this.popState();
1014
+ break;
1015
+ case 36:
1016
+ this.pushState("STATE");
1017
+ break;
1018
+ case 37: return this.popState(), t.yytext = t.yytext.slice(0, -8).trim(), 25;
1019
+ case 38: return this.popState(), t.yytext = t.yytext.slice(0, -8).trim(), 26;
1020
+ case 39: return this.popState(), t.yytext = t.yytext.slice(0, -10).trim(), 27;
1021
+ case 40: return this.popState(), t.yytext = t.yytext.slice(0, -8).trim(), 25;
1022
+ case 41: return this.popState(), t.yytext = t.yytext.slice(0, -8).trim(), 26;
1023
+ case 42: return this.popState(), t.yytext = t.yytext.slice(0, -10).trim(), 27;
1024
+ case 43: return 51;
1025
+ case 44: return 52;
1026
+ case 45: return 53;
1027
+ case 46: return 54;
1028
+ case 47:
1029
+ this.pushState("STATE_STRING");
1030
+ break;
1031
+ case 48: return this.pushState("STATE_ID"), "AS";
1032
+ case 49: return a() ? (this.popState(), "ID") : void 0;
1033
+ case 50:
1034
+ this.popState();
1035
+ break;
1036
+ case 51: return "STATE_DESCR";
1037
+ case 52: throw Error("Error: State name must be a single word. Found: \"" + t.yytext.trim() + "\"");
1038
+ case 53: return 19;
1039
+ case 54:
1040
+ this.popState();
1041
+ break;
1042
+ case 55: return this.popState(), this.pushState("struct"), 20;
1043
+ case 56: return this.popState(), 21;
1044
+ case 57: break;
1045
+ case 58: return this.begin("NOTE"), 29;
1046
+ case 59: return this.popState(), this.pushState("NOTE_ID"), 59;
1047
+ case 60: return this.popState(), this.pushState("NOTE_ID"), 60;
1048
+ case 61:
1049
+ this.popState(), this.pushState("FLOATING_NOTE");
1050
+ break;
1051
+ case 62: return this.popState(), this.pushState("FLOATING_NOTE_ID"), "AS";
1052
+ case 63: break;
1053
+ case 64: return "NOTE_TEXT";
1054
+ case 65: return a() ? (this.popState(), "ID") : void 0;
1055
+ case 66: return a() ? (this.popState(), this.pushState("NOTE_TEXT"), 24) : void 0;
1056
+ case 67: return this.popState(), t.yytext = t.yytext.substr(2).trim(), 31;
1057
+ case 68: return this.popState(), t.yytext = t.yytext.slice(0, -8).trim(), 31;
1058
+ case 69: return 6;
1059
+ case 70: return 6;
1060
+ case 71: return 16;
1061
+ case 72: return 57;
1062
+ case 73: return a() ? 24 : void 0;
1063
+ case 74: return t.yytext = t.yytext.trim(), 14;
1064
+ case 75: return 15;
1065
+ case 76: return 28;
1066
+ case 77: return 58;
1067
+ case 78: return 5;
1068
+ case 79: return "INVALID";
1069
+ }
1070
+ }, "anonymous"),
1071
+ rules: [
1072
+ /^(?:click\b)/i,
1073
+ /^(?:href\b)/i,
1074
+ /^(?:"[^"]*")/i,
1075
+ /^(?:default\b)/i,
1076
+ /^(?:.*direction\s+TB[^\n]*)/i,
1077
+ /^(?:.*direction\s+BT[^\n]*)/i,
1078
+ /^(?:.*direction\s+RL[^\n]*)/i,
1079
+ /^(?:.*direction\s+LR[^\n]*)/i,
1080
+ /^(?:[\n]+)/i,
1081
+ /^(?:[\s]+)/i,
1082
+ /^(?:((?!\n)\s)+)/i,
1083
+ /^(?:#[^\n]*)/i,
1084
+ /^(?:%%(?!\{)[^\n]*)/i,
1085
+ /^(?:scale\s+)/i,
1086
+ /^(?:\d+)/i,
1087
+ /^(?:\s+width\b)/i,
1088
+ /^(?:accTitle\s*:\s*)/i,
1089
+ /^(?:(?!\n||)*[^\n]*)/i,
1090
+ /^(?:accDescr\s*:\s*)/i,
1091
+ /^(?:(?!\n||)*[^\n]*)/i,
1092
+ /^(?:accDescr\s*\{\s*)/i,
1093
+ /^(?:[\}])/i,
1094
+ /^(?:[^\}]*)/i,
1095
+ /^(?:classDef\s+)/i,
1096
+ /^(?:DEFAULT\s+)/i,
1097
+ /^(?:\w+\s+)/i,
1098
+ /^(?:[^\n]*)/i,
1099
+ /^(?:class\s+)/i,
1100
+ /^(?:(\w+)+((,\s*\w+)*))/i,
1101
+ /^(?:[^\n]*)/i,
1102
+ /^(?:style\s+)/i,
1103
+ /^(?:[\w,]+\s+)/i,
1104
+ /^(?:[^\n]*)/i,
1105
+ /^(?:scale\s+)/i,
1106
+ /^(?:\d+)/i,
1107
+ /^(?:\s+width\b)/i,
1108
+ /^(?:state\s+)/i,
1109
+ /^(?:.*<<fork>>)/i,
1110
+ /^(?:.*<<join>>)/i,
1111
+ /^(?:.*<<choice>>)/i,
1112
+ /^(?:.*\[\[fork\]\])/i,
1113
+ /^(?:.*\[\[join\]\])/i,
1114
+ /^(?:.*\[\[choice\]\])/i,
1115
+ /^(?:.*direction\s+TB[^\n]*)/i,
1116
+ /^(?:.*direction\s+BT[^\n]*)/i,
1117
+ /^(?:.*direction\s+RL[^\n]*)/i,
1118
+ /^(?:.*direction\s+LR[^\n]*)/i,
1119
+ /^(?:["])/i,
1120
+ /^(?:\s*as\s+)/i,
1121
+ /^(?:[^\n\{]*)/i,
1122
+ /^(?:["])/i,
1123
+ /^(?:[^"]*)/i,
1124
+ /^(?:\w+\s+\w+.*?\{)/i,
1125
+ /^(?:[^\n\s\{]+)/i,
1126
+ /^(?:\n)/i,
1127
+ /^(?:\{)/i,
1128
+ /^(?:\})/i,
1129
+ /^(?:[\n])/i,
1130
+ /^(?:note\s+)/i,
1131
+ /^(?:left of\b)/i,
1132
+ /^(?:right of\b)/i,
1133
+ /^(?:")/i,
1134
+ /^(?:\s*as\s*)/i,
1135
+ /^(?:["])/i,
1136
+ /^(?:[^"]*)/i,
1137
+ /^(?:[^\n]*)/i,
1138
+ /^(?:\s*[^:\n\s\-]+)/i,
1139
+ /^(?:\s*:[^:\n;]+)/i,
1140
+ /^(?:[\s\S]*?\n\s*end note\b)/i,
1141
+ /^(?:stateDiagram\s+)/i,
1142
+ /^(?:stateDiagram-v2\s+)/i,
1143
+ /^(?:hide empty description\b)/i,
1144
+ /^(?:\[\*\])/i,
1145
+ /^(?:[^:\n\s\-\{]+)/i,
1146
+ /^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,
1147
+ /^(?:-->)/i,
1148
+ /^(?:--)/i,
1149
+ /^(?::::)/i,
1150
+ /^(?:$)/i,
1151
+ /^(?:.)/i
1152
+ ],
1153
+ conditions: {
1154
+ LINE: {
1155
+ rules: [
1156
+ 10,
1157
+ 11,
1158
+ 12
1159
+ ],
1160
+ inclusive: !1
1161
+ },
1162
+ struct: {
1163
+ rules: [
1164
+ 10,
1165
+ 11,
1166
+ 12,
1167
+ 23,
1168
+ 27,
1169
+ 30,
1170
+ 36,
1171
+ 43,
1172
+ 44,
1173
+ 45,
1174
+ 46,
1175
+ 56,
1176
+ 57,
1177
+ 58,
1178
+ 72,
1179
+ 73,
1180
+ 74,
1181
+ 75,
1182
+ 76,
1183
+ 77
1184
+ ],
1185
+ inclusive: !1
1186
+ },
1187
+ FLOATING_NOTE_ID: {
1188
+ rules: [65],
1189
+ inclusive: !1
1190
+ },
1191
+ FLOATING_NOTE: {
1192
+ rules: [
1193
+ 62,
1194
+ 63,
1195
+ 64
1196
+ ],
1197
+ inclusive: !1
1198
+ },
1199
+ NOTE_TEXT: {
1200
+ rules: [67, 68],
1201
+ inclusive: !1
1202
+ },
1203
+ NOTE_ID: {
1204
+ rules: [66],
1205
+ inclusive: !1
1206
+ },
1207
+ NOTE: {
1208
+ rules: [
1209
+ 59,
1210
+ 60,
1211
+ 61
1212
+ ],
1213
+ inclusive: !1
1214
+ },
1215
+ STYLEDEF_STYLEOPTS: {
1216
+ rules: [],
1217
+ inclusive: !1
1218
+ },
1219
+ STYLEDEF_STYLES: {
1220
+ rules: [32],
1221
+ inclusive: !1
1222
+ },
1223
+ STYLE_IDS: {
1224
+ rules: [],
1225
+ inclusive: !1
1226
+ },
1227
+ STYLE: {
1228
+ rules: [31],
1229
+ inclusive: !1
1230
+ },
1231
+ CLASS_STYLE: {
1232
+ rules: [29],
1233
+ inclusive: !1
1234
+ },
1235
+ CLASS: {
1236
+ rules: [28],
1237
+ inclusive: !1
1238
+ },
1239
+ CLASSDEFID: {
1240
+ rules: [26],
1241
+ inclusive: !1
1242
+ },
1243
+ CLASSDEF: {
1244
+ rules: [24, 25],
1245
+ inclusive: !1
1246
+ },
1247
+ acc_descr_multiline: {
1248
+ rules: [21, 22],
1249
+ inclusive: !1
1250
+ },
1251
+ acc_descr: {
1252
+ rules: [19],
1253
+ inclusive: !1
1254
+ },
1255
+ acc_title: {
1256
+ rules: [17],
1257
+ inclusive: !1
1258
+ },
1259
+ SCALE: {
1260
+ rules: [
1261
+ 14,
1262
+ 15,
1263
+ 34,
1264
+ 35
1265
+ ],
1266
+ inclusive: !1
1267
+ },
1268
+ ALIAS: {
1269
+ rules: [],
1270
+ inclusive: !1
1271
+ },
1272
+ STATE_ID: {
1273
+ rules: [49],
1274
+ inclusive: !1
1275
+ },
1276
+ STATE_STRING: {
1277
+ rules: [50, 51],
1278
+ inclusive: !1
1279
+ },
1280
+ FORK_STATE: {
1281
+ rules: [],
1282
+ inclusive: !1
1283
+ },
1284
+ STATE: {
1285
+ rules: [
1286
+ 10,
1287
+ 11,
1288
+ 12,
1289
+ 37,
1290
+ 38,
1291
+ 39,
1292
+ 40,
1293
+ 41,
1294
+ 42,
1295
+ 47,
1296
+ 48,
1297
+ 52,
1298
+ 53,
1299
+ 54,
1300
+ 55
1301
+ ],
1302
+ inclusive: !1
1303
+ },
1304
+ ID: {
1305
+ rules: [
1306
+ 10,
1307
+ 11,
1308
+ 12
1309
+ ],
1310
+ inclusive: !1
1311
+ },
1312
+ INITIAL: {
1313
+ rules: [
1314
+ 0,
1315
+ 1,
1316
+ 2,
1317
+ 3,
1318
+ 4,
1319
+ 5,
1320
+ 6,
1321
+ 7,
1322
+ 8,
1323
+ 9,
1324
+ 11,
1325
+ 12,
1326
+ 13,
1327
+ 16,
1328
+ 18,
1329
+ 20,
1330
+ 23,
1331
+ 27,
1332
+ 30,
1333
+ 33,
1334
+ 36,
1335
+ 55,
1336
+ 58,
1337
+ 69,
1338
+ 70,
1339
+ 71,
1340
+ 72,
1341
+ 73,
1342
+ 74,
1343
+ 75,
1344
+ 77,
1345
+ 78,
1346
+ 79
1347
+ ],
1348
+ inclusive: !0
1349
+ }
1350
+ }
1351
+ };
1352
+ })();
1353
+ function P() {
1354
+ this.yy = {};
1355
+ }
1356
+ return n(P, "Parser"), P.prototype = N, N.Parser = P, new P();
1357
+ })();
1358
+ w.parser = w;
1359
+ var T = w, E = "TB", D = "TB", O = "dir", k = "state", A = "root", j = "relation", M = "classDef", N = "style", P = "applyClass", F = "default", ee = "divider", te = "fill:none", ne = "fill: #333", re = "c", ie = "markdown", ae = "normal", I = "rect", L = "rectWithTitle", oe = "stateStart", se = "stateEnd", R = "divider", ce = "roundedWithTitle", le = "note", ue = "noteGroup", z = "statediagram", de = `${z}-state`, B = "transition", fe = "note", pe = `${B} note-edge`, me = `${z}-${fe}`, he = `${z}-cluster`, ge = `${z}-cluster-alt`, V = "parent", H = "note", _e = "state", U = "----", ve = `${U}${H}`, ye = `${U}${V}`, W = /* @__PURE__ */ new Map(), G = 0, be = 0, K = /* @__PURE__ */ new Map(), xe = /* @__PURE__ */ n((e, t, n, r) => {
1360
+ if (e === R && n?.id !== void 0 && K.has(n.id)) {
1361
+ let e = K.get(n.id);
1362
+ return K.set(t, e), e;
1363
+ }
1364
+ let i = be++, a = r ? void 0 : i;
1365
+ return K.set(t, a), a;
1366
+ }, "colorSlotFor");
1367
+ function q(e = "", t = 0, n = "", r = U) {
1368
+ return `${_e}-${e}${n !== null && n.length > 0 ? `${r}${n}` : ""}-${t}`;
1369
+ }
1370
+ n(q, "stateDomId");
1371
+ var Se = /* @__PURE__ */ n((t, n, r, i, a, o, s, l) => {
1372
+ e.trace("items", n), n.forEach((e) => {
1373
+ switch (e.stmt) {
1374
+ case k:
1375
+ X(t, e, r, i, a, o, s, l);
1376
+ break;
1377
+ case F:
1378
+ X(t, e, r, i, a, o, s, l);
1379
+ break;
1380
+ case j: {
1381
+ X(t, e.state1, r, i, a, o, s, l), X(t, e.state2, r, i, a, o, s, l);
1382
+ let n = s === "neo", u = {
1383
+ id: "edge" + G,
1384
+ start: e.state1.id,
1385
+ end: e.state2.id,
1386
+ arrowhead: "normal",
1387
+ arrowTypeEnd: n ? "arrow_barb_neo" : "arrow_barb",
1388
+ style: te,
1389
+ labelStyle: "",
1390
+ label: d.sanitizeText(e.description ?? "", c()),
1391
+ arrowheadStyle: ne,
1392
+ labelpos: re,
1393
+ labelType: ie,
1394
+ thickness: ae,
1395
+ classes: B,
1396
+ look: s
1397
+ };
1398
+ a.push(u), G++;
1399
+ }
1400
+ }
1401
+ });
1402
+ }, "setupDoc"), Ce = /* @__PURE__ */ n((e, t = D) => {
1403
+ let n = t;
1404
+ if (e.doc) for (let t of e.doc) t.stmt === "dir" && (n = t.value);
1405
+ return n;
1406
+ }, "getDir");
1407
+ function J(e, t, n) {
1408
+ if (!t.id || t.id === "</join></fork>" || t.id === "</choice>") return;
1409
+ t.cssClasses && (Array.isArray(t.cssCompiledStyles) || (t.cssCompiledStyles = []), t.cssClasses.split(" ").forEach((e) => {
1410
+ let r = n.get(e);
1411
+ r && (t.cssCompiledStyles = [...t.cssCompiledStyles ?? [], ...r.styles]);
1412
+ }));
1413
+ let r = e.find((e) => e.id === t.id);
1414
+ r ? Object.assign(r, t) : e.push(t);
1415
+ }
1416
+ n(J, "insertOrUpdateNode");
1417
+ function we(e) {
1418
+ return e?.classes?.join(" ") ?? "";
1419
+ }
1420
+ n(we, "getClassesFromDbInfo");
1421
+ function Y(e) {
1422
+ return e?.styles ?? [];
1423
+ }
1424
+ n(Y, "getStylesFromDbInfo");
1425
+ var X = /* @__PURE__ */ n((t, n, r, i, a, o, s, l) => {
1426
+ let u = n.id, f = r.get(u), p = we(f), m = Y(f), h = c(), g = p.trim() !== "" || m.length > 0;
1427
+ if (e.info("dataFetcher parsedItem", n, f, m), u !== "root") {
1428
+ let r = I;
1429
+ n.start === !0 ? r = oe : n.start === !1 && (r = se), n.type !== F && (r = n.type), W.get(u) || W.set(u, {
1430
+ id: u,
1431
+ shape: r,
1432
+ description: d.sanitizeText(u, h),
1433
+ cssClasses: `${p} ${de}`,
1434
+ cssStyles: m
1435
+ });
1436
+ let c = W.get(u);
1437
+ n.description && (Array.isArray(c.description) ? (c.shape = L, c.description.push(n.description)) : c.description?.length && c.description.length > 0 ? (c.shape = L, c.description = c.description === u ? [n.description] : [c.description, n.description]) : (c.shape = I, c.description = n.description), c.description = d.sanitizeTextOrArray(c.description, h)), c.description?.length === 1 && c.shape === L && (c.shape = c.type === "group" ? ce : I), !c.type && n.doc && (e.info("Setting cluster for XCX", u, Ce(n)), c.type = "group", c.isGroup = !0, c.dir = Ce(n), c.shape = n.type === ee ? R : ce, c.colorIndex = xe(c.shape, u, t, g), c.cssClasses = `${c.cssClasses} ${he} ${o ? ge : ""}`);
1438
+ let f = {
1439
+ labelStyle: "",
1440
+ shape: c.shape,
1441
+ label: c.description,
1442
+ cssClasses: c.cssClasses,
1443
+ cssCompiledStyles: [],
1444
+ cssStyles: c.cssStyles,
1445
+ id: u,
1446
+ dir: c.dir,
1447
+ domId: q(u, G),
1448
+ type: c.type,
1449
+ isGroup: c.type === "group",
1450
+ colorIndex: c.colorIndex,
1451
+ padding: 8,
1452
+ rx: 10,
1453
+ ry: 10,
1454
+ look: s,
1455
+ labelType: "markdown"
1456
+ };
1457
+ if (f.shape === R && (f.label = ""), t && t.id !== "root" && (e.trace("Setting node ", u, " to be child of its parent ", t.id), f.parentId = t.id), f.centerLabel = !0, n.note) {
1458
+ let e = {
1459
+ labelStyle: "",
1460
+ shape: le,
1461
+ label: n.note.text,
1462
+ labelType: "markdown",
1463
+ cssClasses: me,
1464
+ cssStyles: [],
1465
+ cssCompiledStyles: [],
1466
+ id: u + ve + "-" + G,
1467
+ domId: q(u, G, H),
1468
+ type: "node",
1469
+ isGroup: !1,
1470
+ padding: h.flowchart?.padding,
1471
+ look: s,
1472
+ position: n.note.position
1473
+ }, t = u + ye, r = {
1474
+ labelStyle: "",
1475
+ shape: ue,
1476
+ label: n.note.text,
1477
+ cssClasses: c.cssClasses,
1478
+ cssStyles: [],
1479
+ id: u + ye,
1480
+ domId: q(u, G, V),
1481
+ type: "group",
1482
+ isGroup: !0,
1483
+ padding: 16,
1484
+ look: s,
1485
+ position: n.note.position
1486
+ };
1487
+ G++, r.id = t, e.parentId = t, J(i, r, l), J(i, e, l), J(i, f, l);
1488
+ let o = u, d = e.id;
1489
+ n.note.position === "left of" && (o = e.id, d = u), a.push({
1490
+ id: o + "-" + d,
1491
+ start: o,
1492
+ end: d,
1493
+ arrowhead: "none",
1494
+ arrowTypeEnd: "",
1495
+ style: te,
1496
+ labelStyle: "",
1497
+ classes: pe,
1498
+ pattern: "dashed",
1499
+ arrowheadStyle: ne,
1500
+ labelpos: re,
1501
+ labelType: ie,
1502
+ thickness: ae,
1503
+ look: s
1504
+ });
1505
+ } else J(i, f, l);
1506
+ }
1507
+ n.doc && (e.trace("Adding nodes children "), Se(n, n.doc, r, i, a, !o, s, l));
1508
+ }, "dataFetcher"), Te = /* @__PURE__ */ n(() => {
1509
+ W.clear(), G = 0, be = 0, K.clear();
1510
+ }, "reset"), Ee = /* @__PURE__ */ n((e, t = D) => {
1511
+ if (!e.doc) return t;
1512
+ let n = t;
1513
+ for (let t of e.doc) t.stmt === "dir" && (n = t.value);
1514
+ return n;
1515
+ }, "getDir"), De = {
1516
+ getClasses: /* @__PURE__ */ n(function(e, t) {
1517
+ return t.db.getClasses();
1518
+ }, "getClasses"),
1519
+ draw: /* @__PURE__ */ n(async function(t, n, r, i) {
1520
+ e.info("REF0:"), e.info("Drawing state diagram (v2)", n);
1521
+ let { securityLevel: a, state: o, layout: s } = c();
1522
+ i.db.extract(i.db.getRootDocV2());
1523
+ let l = i.db.getData(), u = S(n, a);
1524
+ l.type = i.type, l.layoutAlgorithm = b(s), l.nodeSpacing = o?.nodeSpacing || 50, l.rankSpacing = o?.rankSpacing || 50, l.markers = c().look === "neo" ? ["barbNeo"] : ["barb"], l.diagramId = n, await y(l, u);
1525
+ try {
1526
+ (typeof i.db.getLinks == "function" ? i.db.getLinks() : /* @__PURE__ */ new Map()).forEach((t, n) => {
1527
+ let r = typeof n == "string" ? n : typeof n?.id == "string" ? n.id : "", i = l.nodes.find((e) => e.id === r);
1528
+ if (!r) {
1529
+ e.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(n));
1530
+ return;
1531
+ }
1532
+ let a = u.node()?.querySelectorAll("g.node, g.rough-node"), o;
1533
+ if (a?.forEach((e) => {
1534
+ let t = e.textContent?.trim();
1535
+ (e.id === i?.domId || t === r) && (o = e);
1536
+ }), !o) {
1537
+ e.warn("⚠️ Could not find node matching text:", r);
1538
+ return;
1539
+ }
1540
+ let s = o.parentNode;
1541
+ if (!s) {
1542
+ e.warn("⚠️ Node has no parent, cannot wrap:", r);
1543
+ return;
1544
+ }
1545
+ let c = document.createElementNS("http://www.w3.org/2000/svg", "a"), d = t.url.replace(/^"+|"+$/g, "");
1546
+ if (c.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", d), c.setAttribute("target", "_blank"), t.tooltip) {
1547
+ let e = t.tooltip.replace(/^"+|"+$/g, "");
1548
+ c.setAttribute("title", e), o.setAttribute("title", e);
1549
+ }
1550
+ s.replaceChild(c, o), c.appendChild(o), e.info("🔗 Wrapped node in <a> tag for:", r, t.url);
1551
+ });
1552
+ } catch (t) {
1553
+ e.error("❌ Error injecting clickable links:", t);
1554
+ }
1555
+ p.insertTitle(u, "statediagramTitleText", o?.titleTopMargin ?? 25, i.db.getDiagramTitle()), C(u, 8, z, o?.useMaxWidth ?? !0);
1556
+ }, "draw"),
1557
+ getDir: Ee
1558
+ }, Z = {
1559
+ START_NODE: "[*]",
1560
+ START_TYPE: "start",
1561
+ END_NODE: "[*]",
1562
+ END_TYPE: "end",
1563
+ COLOR_KEYWORD: "color",
1564
+ FILL_KEYWORD: "fill",
1565
+ BG_FILL: "bgFill",
1566
+ STYLECLASS_SEP: ","
1567
+ }, Oe = /* @__PURE__ */ n(() => /* @__PURE__ */ new Map(), "newClassesList"), Q = /* @__PURE__ */ n(() => ({
1568
+ relations: [],
1569
+ states: /* @__PURE__ */ new Map(),
1570
+ documents: {}
1571
+ }), "newDoc"), $ = /* @__PURE__ */ n((e) => JSON.parse(JSON.stringify(e)), "clone"), ke = class {
1572
+ constructor(e) {
1573
+ this.version = e, this.nodes = [], this.edges = [], this.rootDoc = [], this.classes = Oe(), this.documents = { root: Q() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.dividerCnt = 0, this.links = /* @__PURE__ */ new Map(), this.funs = [], this.getAccTitle = f, this.setAccTitle = a, this.getAccDescription = o, this.setAccDescription = i, this.setDiagramTitle = u, this.getDiagramTitle = r, this.clear(), this.setRootDoc = this.setRootDoc.bind(this), this.getDividerId = this.getDividerId.bind(this), this.setDirection = this.setDirection.bind(this), this.trimColon = this.trimColon.bind(this), this.bindFunctions = this.bindFunctions.bind(this);
1574
+ }
1575
+ static {
1576
+ n(this, "StateDB");
1577
+ }
1578
+ static {
1579
+ this.relationType = {
1580
+ AGGREGATION: 0,
1581
+ EXTENSION: 1,
1582
+ COMPOSITION: 2,
1583
+ DEPENDENCY: 3
1584
+ };
1585
+ }
1586
+ extract(e) {
1587
+ this.clear(!0);
1588
+ for (let t of Array.isArray(e) ? e : e.doc) switch (t.stmt) {
1589
+ case k:
1590
+ this.addState(t.id.trim(), t.type, t.doc, t.description, t.note);
1591
+ break;
1592
+ case j:
1593
+ this.addRelation(t.state1, t.state2, t.description);
1594
+ break;
1595
+ case M:
1596
+ this.addStyleClass(t.id.trim(), t.classes);
1597
+ break;
1598
+ case N:
1599
+ this.handleStyleDef(t);
1600
+ break;
1601
+ case P:
1602
+ this.setCssClass(t.id.trim(), t.styleClass);
1603
+ break;
1604
+ case "click": this.addLink(t.id, t.url, t.tooltip);
1605
+ }
1606
+ let t = this.getStates(), n = c();
1607
+ Te(), X(void 0, this.getRootDocV2(), t, this.nodes, this.edges, !0, n.look, this.classes);
1608
+ for (let e of this.nodes) if (Array.isArray(e.label)) {
1609
+ if (e.description = e.label.slice(1), e.isGroup && e.description.length > 0) throw Error(`Group nodes can only have label. Remove the additional description for node [${e.id}]`);
1610
+ e.label = e.label[0];
1611
+ }
1612
+ }
1613
+ handleStyleDef(e) {
1614
+ let t = e.id.trim().split(","), n = e.styleClass.split(",");
1615
+ for (let e of t) {
1616
+ let t = this.getState(e);
1617
+ if (!t) {
1618
+ let n = e.trim();
1619
+ this.addState(n), t = this.getState(n);
1620
+ }
1621
+ t && (t.styles = n.map((e) => e.replace(/;/g, "")?.trim()));
1622
+ }
1623
+ }
1624
+ setRootDoc(t) {
1625
+ e.info("Setting root doc", t), this.rootDoc = t, this.version === 1 ? this.extract(t) : this.extract(this.getRootDocV2());
1626
+ }
1627
+ docTranslator(e, t, n) {
1628
+ if (t.stmt === j) {
1629
+ this.docTranslator(e, t.state1, !0), this.docTranslator(e, t.state2, !1);
1630
+ return;
1631
+ }
1632
+ if (t.stmt === k && (t.id === Z.START_NODE ? (t.id = e.id + (n ? "_start" : "_end"), t.start = n) : t.id = t.id.trim()), t.stmt !== A && t.stmt !== k || !t.doc) return;
1633
+ let r = [], i = [];
1634
+ for (let e of t.doc) if (e.type === ee) {
1635
+ let t = $(e);
1636
+ t.doc = $(i), r.push(t), i = [];
1637
+ } else i.push(e);
1638
+ if (r.length > 0 && i.length > 0) {
1639
+ let e = {
1640
+ stmt: k,
1641
+ id: m(),
1642
+ type: "divider",
1643
+ doc: $(i)
1644
+ };
1645
+ r.push($(e)), t.doc = r;
1646
+ }
1647
+ t.doc.forEach((e) => this.docTranslator(t, e, !0));
1648
+ }
1649
+ getRootDocV2() {
1650
+ return this.docTranslator({
1651
+ id: A,
1652
+ stmt: A
1653
+ }, {
1654
+ id: A,
1655
+ stmt: A,
1656
+ doc: this.rootDoc
1657
+ }, !0), {
1658
+ id: A,
1659
+ doc: this.rootDoc
1660
+ };
1661
+ }
1662
+ addState(t, n = F, r = void 0, i = void 0, a = void 0, o = void 0, s = void 0, l = void 0) {
1663
+ let u = t?.trim();
1664
+ if (!this.currentDocument.states.has(u)) e.info("Adding state ", u, i), this.currentDocument.states.set(u, {
1665
+ stmt: k,
1666
+ id: u,
1667
+ descriptions: [],
1668
+ type: n,
1669
+ doc: r,
1670
+ note: a,
1671
+ classes: [],
1672
+ styles: [],
1673
+ textStyles: []
1674
+ });
1675
+ else {
1676
+ let e = this.currentDocument.states.get(u);
1677
+ if (!e) throw Error(`State not found: ${u}`);
1678
+ e.doc ||= r, e.type ||= n;
1679
+ }
1680
+ if (i && (e.info("Setting state description", u, i), (Array.isArray(i) ? i : [i]).forEach((e) => this.addDescription(u, e.trim()))), a) {
1681
+ let e = this.currentDocument.states.get(u);
1682
+ if (!e) throw Error(`State not found: ${u}`);
1683
+ e.note = a, e.note.text = d.sanitizeText(e.note.text, c());
1684
+ }
1685
+ o && (e.info("Setting state classes", u, o), (Array.isArray(o) ? o : [o]).forEach((e) => this.setCssClass(u, e.trim()))), s && (e.info("Setting state styles", u, s), (Array.isArray(s) ? s : [s]).forEach((e) => this.setStyle(u, e.trim()))), l && (e.info("Setting state styles", u, s), (Array.isArray(l) ? l : [l]).forEach((e) => this.setTextStyle(u, e.trim())));
1686
+ }
1687
+ clear(e) {
1688
+ this.nodes = [], this.edges = [], this.funs = [this.setupToolTips.bind(this)], this.documents = { root: Q() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes = Oe(), e || (this.links = /* @__PURE__ */ new Map(), s());
1689
+ }
1690
+ getState(e) {
1691
+ return this.currentDocument.states.get(e);
1692
+ }
1693
+ getStates() {
1694
+ return this.currentDocument.states;
1695
+ }
1696
+ logDocuments() {
1697
+ e.info("Documents = ", this.documents);
1698
+ }
1699
+ getRelations() {
1700
+ return this.currentDocument.relations;
1701
+ }
1702
+ addLink(t, n, r) {
1703
+ this.links.set(t, {
1704
+ url: n,
1705
+ tooltip: r
1706
+ }), e.warn("Adding link", t, n, r);
1707
+ }
1708
+ getLinks() {
1709
+ return this.links;
1710
+ }
1711
+ startIdIfNeeded(e = "") {
1712
+ return e === Z.START_NODE ? (this.startEndCount++, `${Z.START_TYPE}${this.startEndCount}`) : e;
1713
+ }
1714
+ startTypeIfNeeded(e = "", t = F) {
1715
+ return e === Z.START_NODE ? Z.START_TYPE : t;
1716
+ }
1717
+ endIdIfNeeded(e = "") {
1718
+ return e === Z.END_NODE ? (this.startEndCount++, `${Z.END_TYPE}${this.startEndCount}`) : e;
1719
+ }
1720
+ endTypeIfNeeded(e = "", t = F) {
1721
+ return e === Z.END_NODE ? Z.END_TYPE : t;
1722
+ }
1723
+ addRelationObjs(e, t, n = "") {
1724
+ let r = this.startIdIfNeeded(e.id.trim()), i = this.startTypeIfNeeded(e.id.trim(), e.type), a = this.startIdIfNeeded(t.id.trim()), o = this.startTypeIfNeeded(t.id.trim(), t.type);
1725
+ this.addState(r, i, e.doc, e.description, e.note, e.classes, e.styles, e.textStyles), this.addState(a, o, t.doc, t.description, t.note, t.classes, t.styles, t.textStyles), this.currentDocument.relations.push({
1726
+ id1: r,
1727
+ id2: a,
1728
+ relationTitle: d.sanitizeText(n, c())
1729
+ });
1730
+ }
1731
+ addRelation(e, t, n) {
1732
+ if (typeof e == "object" && typeof t == "object") this.addRelationObjs(e, t, n);
1733
+ else if (typeof e == "string" && typeof t == "string") {
1734
+ let r = this.startIdIfNeeded(e.trim()), i = this.startTypeIfNeeded(e), a = this.endIdIfNeeded(t.trim()), o = this.endTypeIfNeeded(t);
1735
+ this.addState(r, i), this.addState(a, o), this.currentDocument.relations.push({
1736
+ id1: r,
1737
+ id2: a,
1738
+ relationTitle: n ? d.sanitizeText(n, c()) : void 0
1739
+ });
1740
+ }
1741
+ }
1742
+ addDescription(e, t) {
1743
+ let n = this.currentDocument.states.get(e), r = t.startsWith(":") ? t.replace(":", "").trim() : t;
1744
+ n?.descriptions?.push(d.sanitizeText(r, c()));
1745
+ }
1746
+ cleanupLabel(e) {
1747
+ return e.startsWith(":") ? e.slice(2).trim() : e.trim();
1748
+ }
1749
+ getDividerId() {
1750
+ return this.dividerCnt++, `divider-id-${this.dividerCnt}`;
1751
+ }
1752
+ addStyleClass(e, t = "") {
1753
+ this.classes.has(e) || this.classes.set(e, {
1754
+ id: e,
1755
+ styles: [],
1756
+ textStyles: []
1757
+ });
1758
+ let n = this.classes.get(e);
1759
+ t && n && t.split(Z.STYLECLASS_SEP).forEach((e) => {
1760
+ let t = e.replace(/([^;]*);/, "$1").trim();
1761
+ if (RegExp(Z.COLOR_KEYWORD).exec(e)) {
1762
+ let e = t.replace(Z.FILL_KEYWORD, Z.BG_FILL).replace(Z.COLOR_KEYWORD, Z.FILL_KEYWORD);
1763
+ n.textStyles.push(e);
1764
+ }
1765
+ n.styles.push(t);
1766
+ });
1767
+ }
1768
+ getClasses() {
1769
+ return this.classes;
1770
+ }
1771
+ setupToolTips(e) {
1772
+ let n = x();
1773
+ t(e).select("svg").selectAll("g.node, g.rough-node").on("mouseover", (e) => {
1774
+ let r = t(e.currentTarget), i = r.attr("title");
1775
+ if (i === null) return;
1776
+ let a = e.currentTarget?.getBoundingClientRect();
1777
+ n.transition().duration(200).style("opacity", ".9"), n.style("left", window.scrollX + a.left + (a.right - a.left) / 2 + "px").style("top", window.scrollY + a.bottom + "px"), n.html(l.sanitize(i)), r.classed("hover", !0);
1778
+ }).on("mouseout", (e) => {
1779
+ n.transition().duration(500).style("opacity", 0), t(e.currentTarget).classed("hover", !1);
1780
+ });
1781
+ }
1782
+ setCssClass(e, t) {
1783
+ e.split(",").forEach((e) => {
1784
+ let n = this.getState(e);
1785
+ if (!n) {
1786
+ let t = e.trim();
1787
+ this.addState(t), n = this.getState(t);
1788
+ }
1789
+ n?.classes?.push(t);
1790
+ });
1791
+ }
1792
+ setStyle(e, t) {
1793
+ this.getState(e)?.styles?.push(t);
1794
+ }
1795
+ setTextStyle(e, t) {
1796
+ this.getState(e)?.textStyles?.push(t);
1797
+ }
1798
+ bindFunctions(e) {
1799
+ this.funs.forEach((t) => {
1800
+ t(e);
1801
+ });
1802
+ }
1803
+ getDirectionStatement() {
1804
+ return this.rootDoc.find((e) => e.stmt === O);
1805
+ }
1806
+ getDirection() {
1807
+ return this.getDirectionStatement()?.value ?? E;
1808
+ }
1809
+ setDirection(e) {
1810
+ let t = this.getDirectionStatement();
1811
+ t ? t.value = e : this.rootDoc.unshift({
1812
+ stmt: O,
1813
+ value: e
1814
+ });
1815
+ }
1816
+ trimColon(e) {
1817
+ return e.startsWith(":") ? e.slice(1).trim() : e.trim();
1818
+ }
1819
+ getData() {
1820
+ let e = c();
1821
+ for (let t of this.nodes) t.wrappingWidth ??= e.state?.wrappingWidth, t.isGroup || (t.minWidth ??= e.state?.minNodeWidth);
1822
+ return {
1823
+ nodes: this.nodes,
1824
+ edges: this.edges,
1825
+ other: {},
1826
+ config: e,
1827
+ direction: Ee(this.getRootDocV2())
1828
+ };
1829
+ }
1830
+ getConfig() {
1831
+ return c().state;
1832
+ }
1833
+ }, Ae = /* @__PURE__ */ n((e) => {
1834
+ let { theme: t, bkgColorArray: n, borderColorArray: r } = e;
1835
+ if (!g(t, r)) return "";
1836
+ let i = _(e.look), a = v(n), o = "";
1837
+ for (let e = 0; e < h(r); e++) {
1838
+ let t = r[e], s = a ? `fill: ${n[e % n.length]};` : "", c = `[data-look="${i}"][data-color-id="color-${e}"]`;
1839
+ o += `
1840
+
1841
+ /* The title strip: \`rect.outer\` spans the whole composite and \`rect.inner\` covers
1842
+ the body, so what stays visible of \`outer\` is the band behind the label. */
1843
+ ${c}.statediagram-cluster rect.outer {
1844
+ stroke: ${t};
1845
+ ${s}
1846
+ }
1847
+
1848
+ ${c}.statediagram-cluster rect.inner {
1849
+ stroke: ${t};
1850
+ }
1851
+
1852
+ /* Concurrency regions. Siblings of one composite share a slot, so a divided composite
1853
+ reads as one thing split into parts rather than as several composites. */
1854
+ ${c}.statediagram-cluster rect.divider {
1855
+ stroke: ${t};
1856
+ ${s}
1857
+ }
1858
+
1859
+ /* handDrawn draws the same container as roughjs shapes rather than plain rects, so it
1860
+ needs its own rules. \`roundedWithTitle\` and \`divider\` name those groups \`outer\`,
1861
+ \`inner\` and \`divider\` to match the classic branch, which is what lets these
1862
+ discriminate -- a bare \`.statediagram-cluster path\` rule reached the body as well and
1863
+ tinted the whole composite, losing \`compositeBackground\` and diverging from what
1864
+ classic and neo do.
1865
+
1866
+ roughjs emits two paths per shape and marks them: the filled shape carries
1867
+ \`stroke="none"\` and the sketched outline carries \`fill="none"\`. Splitting on that is
1868
+ what keeps \`fill\` off the outline -- a rough outline is open squiggles, not a closed
1869
+ region, so filling it produces smears -- and keeps \`stroke\` off the fill shape, which
1870
+ would otherwise gain an edge it was drawn without. */
1871
+ ${c}.statediagram-cluster .outer path[stroke='none'] {
1872
+ ${s}
1873
+ }
1874
+
1875
+ ${c}.statediagram-cluster .outer path[fill='none'] {
1876
+ stroke: ${t};
1877
+ }
1878
+
1879
+ /* No \`.inner\` rule on purpose. The body shape is left entirely alone under handDrawn,
1880
+ where a rect's \`inner\` counterpart cannot be recoloured safely: roughjs draws a
1881
+ hachure fill as *stroked* lines, so its fill paths carry \`fill="none"\` exactly like
1882
+ the outline and no selector separates them. An \`.inner\` stroke rule therefore
1883
+ repainted the hatching of every alt composite in the palette colour instead of
1884
+ leaving it on \`altBackground\`. The container still reads as palette-coloured: the
1885
+ \`outer\` shape spans the whole composite, so its outline already frames the body. */
1886
+
1887
+ /* Regions split the same way, which is why \`divider\` fills solid rather than taking
1888
+ roughjs's default hachure -- see the note on that call. Hatched, both of its paths
1889
+ carried \`fill="none"\` and these two rules degenerated: the tint matched nothing and
1890
+ the border rule repainted the hatching. */
1891
+ ${c}.statediagram-cluster .divider path[stroke='none'] {
1892
+ ${s}
1893
+ }
1894
+
1895
+ ${c}.statediagram-cluster .divider path[fill='none'] {
1896
+ stroke: ${t};
1897
+ }
1898
+ `;
1899
+ }
1900
+ return o;
1901
+ }, "genColor"), je = {
1902
+ parser: T,
1903
+ get db() {
1904
+ return new ke(2);
1905
+ },
1906
+ renderer: De,
1907
+ styles: /* @__PURE__ */ n((e) => `
1908
+ ${Ae(e)}
1909
+ defs [id$="-barbEnd"] {
1910
+ fill: ${e.transitionColor};
1911
+ stroke: ${e.transitionColor};
1912
+ }
1913
+ g.stateGroup text {
1914
+ fill: ${e.nodeBorder};
1915
+ stroke: none;
1916
+ font-size: 10px;
1917
+ }
1918
+ g.stateGroup text {
1919
+ fill: ${e.textColor};
1920
+ stroke: none;
1921
+ font-size: 10px;
1922
+
1923
+ }
1924
+ g.stateGroup .state-title {
1925
+ font-weight: bolder;
1926
+ fill: ${e.stateLabelColor};
1927
+ }
1928
+
1929
+ g.stateGroup rect {
1930
+ fill: ${e.mainBkg};
1931
+ stroke: ${e.nodeBorder};
1932
+ }
1933
+
1934
+ g.stateGroup line {
1935
+ stroke: ${e.lineColor};
1936
+ stroke-width: ${e.strokeWidth || 1};
1937
+ }
1938
+
1939
+ .transition {
1940
+ stroke: ${e.transitionColor};
1941
+ stroke-width: ${e.strokeWidth || 1};
1942
+ fill: none;
1943
+ }
1944
+
1945
+ .stateGroup .composit {
1946
+ fill: ${e.background};
1947
+ border-bottom: 1px
1948
+ }
1949
+
1950
+ .stateGroup .alt-composit {
1951
+ fill: #e0e0e0;
1952
+ border-bottom: 1px
1953
+ }
1954
+
1955
+ .state-note {
1956
+ stroke: ${e.noteBorderColor};
1957
+ fill: ${e.noteBkgColor};
1958
+
1959
+ text {
1960
+ fill: ${e.noteTextColor};
1961
+ stroke: none;
1962
+ font-size: 10px;
1963
+ }
1964
+ }
1965
+
1966
+ .stateLabel .box {
1967
+ stroke: none;
1968
+ stroke-width: 0;
1969
+ fill: ${e.mainBkg};
1970
+ opacity: 0.5;
1971
+ }
1972
+
1973
+ .edgeLabel .label rect {
1974
+ fill: ${e.labelBackgroundColor};
1975
+ opacity: 0.5;
1976
+ }
1977
+ .edgeLabel {
1978
+ background-color: ${e.edgeLabelBackground};
1979
+ p {
1980
+ background-color: ${e.edgeLabelBackground};
1981
+ }
1982
+ rect {
1983
+ opacity: 0.5;
1984
+ background-color: ${e.edgeLabelBackground};
1985
+ fill: ${e.edgeLabelBackground};
1986
+ }
1987
+ text-align: center;
1988
+ }
1989
+ .edgeLabel .label text {
1990
+ fill: ${e.transitionLabelColor || e.tertiaryTextColor};
1991
+ }
1992
+ .label div .edgeLabel {
1993
+ color: ${e.transitionLabelColor || e.tertiaryTextColor};
1994
+ }
1995
+
1996
+ .stateLabel text {
1997
+ fill: ${e.stateLabelColor};
1998
+ font-size: 10px;
1999
+ font-weight: bold;
2000
+ }
2001
+
2002
+ .node circle.state-start {
2003
+ fill: ${e.specialStateColor};
2004
+ stroke: ${e.specialStateColor};
2005
+ }
2006
+
2007
+ .node .fork-join {
2008
+ fill: ${e.specialStateColor};
2009
+ stroke: ${e.specialStateColor};
2010
+ }
2011
+
2012
+ .node circle.state-end {
2013
+ fill: ${e.innerEndBackground};
2014
+ stroke: ${e.background};
2015
+ stroke-width: 1.5
2016
+ }
2017
+ .end-state-inner {
2018
+ fill: ${e.compositeBackground || e.background};
2019
+ // stroke: ${e.background};
2020
+ stroke-width: 1.5
2021
+ }
2022
+
2023
+ .node rect {
2024
+ fill: ${e.stateBkg || e.mainBkg};
2025
+ stroke: ${e.stateBorder || e.nodeBorder};
2026
+ stroke-width: ${e.strokeWidth || 1}px;
2027
+ }
2028
+ .node polygon {
2029
+ fill: ${e.mainBkg};
2030
+ stroke: ${e.stateBorder || e.nodeBorder};;
2031
+ stroke-width: ${e.strokeWidth || 1}px;
2032
+ }
2033
+ [id$="-barbEnd"] {
2034
+ fill: ${e.lineColor};
2035
+ }
2036
+
2037
+ .statediagram-cluster rect {
2038
+ fill: ${e.compositeTitleBackground};
2039
+ stroke: ${e.stateBorder || e.nodeBorder};
2040
+ stroke-width: ${e.strokeWidth || 1}px;
2041
+ }
2042
+
2043
+ .cluster-label, .nodeLabel {
2044
+ color: ${e.stateLabelColor};
2045
+ // line-height: 1;
2046
+ }
2047
+
2048
+ .statediagram-cluster rect.outer {
2049
+ rx: 5px;
2050
+ ry: 5px;
2051
+ }
2052
+ .statediagram-state .divider {
2053
+ stroke: ${e.stateBorder || e.nodeBorder};
2054
+ }
2055
+
2056
+ .statediagram-state .title-state {
2057
+ rx: 5px;
2058
+ ry: 5px;
2059
+ }
2060
+ .statediagram-cluster.statediagram-cluster .inner {
2061
+ fill: ${e.compositeBackground || e.background};
2062
+ }
2063
+ .statediagram-cluster.statediagram-cluster-alt .inner {
2064
+ fill: ${e.altBackground ? e.altBackground : "#efefef"};
2065
+ }
2066
+
2067
+ .statediagram-cluster .inner {
2068
+ rx:0;
2069
+ ry:0;
2070
+ }
2071
+
2072
+ .statediagram-state rect.basic {
2073
+ rx: 5px;
2074
+ ry: 5px;
2075
+ }
2076
+ .statediagram-state rect.divider {
2077
+ stroke-dasharray: 10,10;
2078
+ fill: ${e.altBackground ? e.altBackground : "#efefef"};
2079
+ }
2080
+
2081
+ .note-edge {
2082
+ stroke-dasharray: 5;
2083
+ }
2084
+
2085
+ .statediagram-note rect {
2086
+ fill: ${e.noteBkgColor};
2087
+ stroke: ${e.noteBorderColor};
2088
+ stroke-width: 1px;
2089
+ rx: 0;
2090
+ ry: 0;
2091
+ }
2092
+ .statediagram-note rect {
2093
+ fill: ${e.noteBkgColor};
2094
+ stroke: ${e.noteBorderColor};
2095
+ stroke-width: 1px;
2096
+ rx: 0;
2097
+ ry: 0;
2098
+ }
2099
+
2100
+ .statediagram-note text {
2101
+ fill: ${e.noteTextColor};
2102
+ }
2103
+
2104
+ .statediagram-note .nodeLabel {
2105
+ color: ${e.noteTextColor};
2106
+ }
2107
+ .statediagram .edgeLabel {
2108
+ color: red; // ${e.noteTextColor};
2109
+ }
2110
+
2111
+ [id$="-dependencyStart"], [id$="-dependencyEnd"] {
2112
+ fill: ${e.lineColor};
2113
+ stroke: ${e.lineColor};
2114
+ stroke-width: ${e.strokeWidth || 1};
2115
+ }
2116
+
2117
+ .statediagramTitleText {
2118
+ text-anchor: middle;
2119
+ font-size: 18px;
2120
+ fill: ${e.textColor};
2121
+ }
2122
+
2123
+ [data-look="neo"].statediagram-cluster rect {
2124
+ fill: ${e.mainBkg};
2125
+ stroke: ${e.useGradient ? "url(" + e.svgId + "-gradient)" : e.stateBorder || e.nodeBorder};
2126
+ stroke-width: ${e.strokeWidth ?? 1};
2127
+ }
2128
+ [data-look="neo"].statediagram-cluster rect.outer {
2129
+ rx: ${e.radius}px;
2130
+ ry: ${e.radius}px;
2131
+ filter: ${e.dropShadow ? e.dropShadow.replace("url(#drop-shadow)", `url(${e.svgId}-drop-shadow)`) : "none"}
2132
+ }
2133
+ `, "getStyles"),
2134
+ init: /* @__PURE__ */ n((e) => {
2135
+ e.state ||= {}, e.state.arrowMarkerAbsolute = e.arrowMarkerAbsolute;
2136
+ }, "init")
2137
+ };
2138
+ //#endregion
2139
+ export { je as diagram };