@pb33f/cowboy-components 0.7.17 → 0.8.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 (540) hide show
  1. package/dist/_basePickBy-DtTwxTrV.js +151 -0
  2. package/dist/_baseUniq-C5Y4WFmx.js +614 -0
  3. package/dist/arc-a-7w7y90.js +83 -0
  4. package/dist/architecture-U656AL7Q-c_zxypEp.js +5 -0
  5. package/dist/architectureDiagram-VXUJARFQ-CIhQJ6xS.js +4661 -0
  6. package/dist/assets/elk-layout.worker-B71_NI2D.js +1 -0
  7. package/dist/assets/equalizer.worker-A8HFNy4g.js +1 -0
  8. package/dist/assets/graph-dependent.worker-BgWuMZsb.js +1 -0
  9. package/dist/assets/rule-documentation.worker-BCKuwSgZ.js +1 -0
  10. package/dist/assets/search-graph.worker-Cwqb-ecv.js +1 -0
  11. package/dist/assets/search-problems.worker-60kZqr0h.js +1 -0
  12. package/dist/blockDiagram-VD42YOAC-BLl5ID-l.js +2261 -0
  13. package/dist/c4Diagram-YG6GDRKO-BOGfb13x.js +1580 -0
  14. package/dist/channel-DYeI56io.js +5 -0
  15. package/dist/chunk-4BX2VUAB-BeHGB7ON.js +8 -0
  16. package/dist/chunk-55IACEB6-DgHUzWsw.js +8 -0
  17. package/dist/chunk-B4BG7PRW-Vs7GiQMf.js +1375 -0
  18. package/dist/chunk-DI55MBZ5-CHjdGXx0.js +1370 -0
  19. package/dist/chunk-FMBD7UC4-D-H9-bHN.js +19 -0
  20. package/dist/chunk-QN33PNHL-D7uE2r1Y.js +19 -0
  21. package/dist/chunk-QZHKN3VN-Cp3sUp7e.js +15 -0
  22. package/dist/chunk-TZMSLE5B-BmXGcXo9.js +64 -0
  23. package/dist/classDiagram-2ON5EDUG-9ilqiDEi.js +16 -0
  24. package/dist/classDiagram-v2-WZHVMYZB-9ilqiDEi.js +16 -0
  25. package/dist/clone-CybyMoa0.js +8 -0
  26. package/dist/components/attention-box/attention-box.css.js +8 -0
  27. package/dist/components/auth/login-button.js +1 -1
  28. package/dist/components/auth/login-panel.d.ts +4 -0
  29. package/dist/components/auth/login-panel.js +12 -4
  30. package/dist/components/auth/oauth-login.css.js +4 -0
  31. package/dist/components/auth/oauth-login.d.ts +2 -0
  32. package/dist/components/auth/oauth-login.js +12 -3
  33. package/dist/components/brokerable.d.ts +21 -0
  34. package/dist/components/brokerable.js +39 -0
  35. package/dist/components/bundle-toolbar/bundle-toolbar.css.js +110 -0
  36. package/dist/components/bundle-toolbar/bundle-toolbar.d.ts +21 -0
  37. package/dist/components/bundle-toolbar/bundle-toolbar.js +93 -0
  38. package/dist/components/changelog/changelog.css.js +2 -0
  39. package/dist/components/changelog/changelog.d.ts +2 -0
  40. package/dist/components/changelog/changelog.js +10 -1
  41. package/dist/components/changelog/release.css.js +5 -1
  42. package/dist/components/charts/beefy-chart.js +0 -2
  43. package/dist/components/charts/doughnut-chart.d.ts +5 -1
  44. package/dist/components/charts/doughnut-chart.js +20 -1
  45. package/dist/components/credit-ticker/credit-ticker.d.ts +3 -0
  46. package/dist/components/credit-ticker/credit-ticker.js +20 -4
  47. package/dist/components/details-drawer/details-drawer.css.d.ts +2 -0
  48. package/dist/components/{problem-list → details-drawer}/details-drawer.css.js +18 -3
  49. package/dist/components/details-drawer/generic-details-drawer.css.d.ts +1 -0
  50. package/dist/components/details-drawer/generic-details-drawer.css.js +219 -0
  51. package/dist/components/details-drawer/generic-details-drawer.d.ts +38 -0
  52. package/dist/components/details-drawer/generic-details-drawer.js +245 -0
  53. package/dist/components/details-drawer/handlers/diagram-handler.d.ts +35 -0
  54. package/dist/components/details-drawer/handlers/diagram-handler.js +248 -0
  55. package/dist/components/details-drawer/handlers/documentation-handler.d.ts +11 -0
  56. package/dist/components/details-drawer/handlers/documentation-handler.js +46 -0
  57. package/dist/components/details-drawer/handlers/example-handler.d.ts +18 -0
  58. package/dist/components/details-drawer/handlers/example-handler.js +146 -0
  59. package/dist/components/details-drawer/handlers/howto-handler.d.ts +11 -0
  60. package/dist/components/details-drawer/handlers/howto-handler.js +36 -0
  61. package/dist/components/details-drawer/handlers/markdown-handler.d.ts +12 -0
  62. package/dist/components/details-drawer/handlers/markdown-handler.js +54 -0
  63. package/dist/components/editor/editor-breadcrumb.css.js +1 -1
  64. package/dist/components/editor/editor.css.js +42 -0
  65. package/dist/components/editor/editor.d.ts +29 -3
  66. package/dist/components/editor/editor.js +495 -73
  67. package/dist/components/github/github-workspace-view.css.d.ts +2 -0
  68. package/dist/components/github/github-workspace-view.css.js +165 -0
  69. package/dist/components/github/github-workspace-view.d.ts +59 -0
  70. package/dist/components/github/github-workspace-view.js +525 -0
  71. package/dist/components/global-task/global-task-view.css.d.ts +2 -0
  72. package/dist/components/global-task/global-task-view.css.js +392 -0
  73. package/dist/components/global-task/global-task-view.d.ts +48 -0
  74. package/dist/components/global-task/global-task-view.js +359 -0
  75. package/dist/components/header/header.css.js +9 -1
  76. package/dist/components/http-method/http-method.css.js +5 -1
  77. package/dist/components/indeterminate-loader/indeterminate-loader.css.d.ts +2 -0
  78. package/dist/components/indeterminate-loader/indeterminate-loader.css.js +135 -0
  79. package/dist/components/indeterminate-loader/indeterminate-loader.d.ts +35 -0
  80. package/dist/components/indeterminate-loader/indeterminate-loader.js +201 -0
  81. package/dist/components/kv-view/kv-view.css.js +2 -0
  82. package/dist/components/kv-view/kv-view.js +0 -1
  83. package/dist/components/logo-wall/logo-wall.css.js +9 -0
  84. package/dist/components/manage-ruleset/manage-ruleset.css.js +14 -1
  85. package/dist/components/manage-ruleset/manage-ruleset.d.ts +1 -0
  86. package/dist/components/manage-ruleset/manage-ruleset.js +54 -22
  87. package/dist/components/manage-ruleset/rule-action.css.js +2 -0
  88. package/dist/components/manage-ruleset/rule-action.d.ts +10 -3
  89. package/dist/components/manage-ruleset/rule-action.js +118 -129
  90. package/dist/components/manage-ruleset/rule-input.d.ts +3 -1
  91. package/dist/components/manage-ruleset/rule-input.js +38 -34
  92. package/dist/components/manage-ruleset/rule.css.js +15 -1
  93. package/dist/components/manage-ruleset/rule.d.ts +4 -1
  94. package/dist/components/manage-ruleset/rule.js +44 -17
  95. package/dist/components/mermaid/mermaid-renderer.css.d.ts +1 -0
  96. package/dist/components/mermaid/mermaid-renderer.css.js +121 -0
  97. package/dist/components/mermaid/mermaid-renderer.d.ts +75 -0
  98. package/dist/components/mermaid/mermaid-renderer.js +485 -0
  99. package/dist/components/model-icon/doctor-icon.d.ts +9 -0
  100. package/dist/components/model-icon/doctor-icon.js +60 -0
  101. package/dist/components/model-icon/model-icon.d.ts +2 -1
  102. package/dist/components/model-icon/model-icon.js +13 -1
  103. package/dist/components/model-renderer/change.css.js +22 -8
  104. package/dist/components/model-renderer/changes.d.ts +1 -0
  105. package/dist/components/model-renderer/changes.js +47 -32
  106. package/dist/components/model-renderer/clickable-ref.d.ts +9 -3
  107. package/dist/components/model-renderer/clickable-ref.js +49 -10
  108. package/dist/components/model-renderer/components.d.ts +2 -0
  109. package/dist/components/model-renderer/components.js +196 -116
  110. package/dist/components/model-renderer/contact.js +2 -2
  111. package/dist/components/model-renderer/description.css.js +2 -0
  112. package/dist/components/model-renderer/document.d.ts +1 -0
  113. package/dist/components/model-renderer/document.js +14 -9
  114. package/dist/components/model-renderer/encoding.d.ts +2 -0
  115. package/dist/components/model-renderer/encoding.js +16 -7
  116. package/dist/components/model-renderer/example.css.js +5 -1
  117. package/dist/components/model-renderer/example.d.ts +4 -1
  118. package/dist/components/model-renderer/example.js +72 -118
  119. package/dist/components/model-renderer/extensions.d.ts +2 -0
  120. package/dist/components/model-renderer/extensions.js +11 -2
  121. package/dist/components/model-renderer/external-docs.d.ts +2 -0
  122. package/dist/components/model-renderer/external-docs.js +13 -4
  123. package/dist/components/model-renderer/has-changes.js +3 -3
  124. package/dist/components/model-renderer/header.d.ts +2 -0
  125. package/dist/components/model-renderer/header.js +27 -14
  126. package/dist/components/model-renderer/info.d.ts +2 -0
  127. package/dist/components/model-renderer/info.js +20 -7
  128. package/dist/components/model-renderer/link.d.ts +2 -0
  129. package/dist/components/model-renderer/link.js +27 -10
  130. package/dist/components/model-renderer/media-type.js +2 -2
  131. package/dist/components/model-renderer/model-badge.d.ts +11 -0
  132. package/dist/components/model-renderer/model-badge.js +59 -0
  133. package/dist/components/model-renderer/model-shared.css.js +14 -2
  134. package/dist/components/model-renderer/oauth-flows.js +4 -4
  135. package/dist/components/model-renderer/operation.d.ts +2 -1
  136. package/dist/components/model-renderer/operation.js +37 -16
  137. package/dist/components/model-renderer/param-location.js +3 -3
  138. package/dist/components/model-renderer/parameter.d.ts +2 -0
  139. package/dist/components/model-renderer/parameter.js +28 -15
  140. package/dist/components/model-renderer/path-item.d.ts +3 -0
  141. package/dist/components/model-renderer/path-item.js +52 -80
  142. package/dist/components/model-renderer/paths.d.ts +2 -0
  143. package/dist/components/model-renderer/paths.js +10 -3
  144. package/dist/components/model-renderer/problem-node.js +10 -10
  145. package/dist/components/model-renderer/rendered-node.css.js +35 -6
  146. package/dist/components/model-renderer/rendered-node.d.ts +14 -4
  147. package/dist/components/model-renderer/rendered-node.js +121 -58
  148. package/dist/components/model-renderer/rendered-property.js +4 -4
  149. package/dist/components/model-renderer/request-body.d.ts +2 -0
  150. package/dist/components/model-renderer/request-body.js +16 -9
  151. package/dist/components/model-renderer/response.d.ts +2 -0
  152. package/dist/components/model-renderer/response.js +35 -17
  153. package/dist/components/model-renderer/schema.css.js +10 -1
  154. package/dist/components/model-renderer/schema.d.ts +3 -2
  155. package/dist/components/model-renderer/schema.js +127 -129
  156. package/dist/components/model-renderer/security-scheme.js +3 -3
  157. package/dist/components/model-renderer/server.js +18 -8
  158. package/dist/components/model-renderer/tag.js +1 -1
  159. package/dist/components/model-tree/tree.css.js +21 -10
  160. package/dist/components/model-tree/tree.d.ts +39 -22
  161. package/dist/components/model-tree/tree.js +230 -167
  162. package/dist/components/paginator/paginator-navigator.css.js +9 -5
  163. package/dist/components/paginator/paginator-navigator.js +6 -6
  164. package/dist/components/paginator/paginator.css.js +2 -0
  165. package/dist/components/paginator/paginator.js +5 -8
  166. package/dist/components/percent-bar/percent-bar.css.js +133 -13
  167. package/dist/components/percent-bar/percent-bar.d.ts +2 -0
  168. package/dist/components/percent-bar/percent-bar.js +28 -24
  169. package/dist/components/premium-gate/premium-gate.css.d.ts +1 -0
  170. package/dist/components/premium-gate/premium-gate.css.js +117 -0
  171. package/dist/components/premium-gate/premium-gate.d.ts +49 -0
  172. package/dist/components/premium-gate/premium-gate.js +336 -0
  173. package/dist/components/problem-list/problem-list.css.js +72 -1
  174. package/dist/components/problem-list/problem-list.d.ts +17 -9
  175. package/dist/components/problem-list/problem-list.js +222 -226
  176. package/dist/components/problem-list/problem-mainview.css.js +12 -2
  177. package/dist/components/problem-list/problem-mainview.d.ts +3 -0
  178. package/dist/components/problem-list/problem-mainview.js +37 -17
  179. package/dist/components/problem-list/problem-toolbar.css.js +10 -7
  180. package/dist/components/problems-overview/diagnostic-evaluation.css.js +11 -1
  181. package/dist/components/problems-overview/diagnostic-evaluation.js +6 -7
  182. package/dist/components/problems-overview/document-statistic.css.js +6 -0
  183. package/dist/components/problems-overview/document-statistic.js +1 -1
  184. package/dist/components/problems-overview/problem-overview-group.js +5 -5
  185. package/dist/components/problems-overview/problem-statistic.css.js +24 -5
  186. package/dist/components/problems-overview/problem-statistic.js +15 -6
  187. package/dist/components/problems-overview/problem-statistics.css.js +4 -4
  188. package/dist/components/problems-overview/problem-statistics.js +29 -25
  189. package/dist/components/problems-overview/problems-overview.css.js +2 -2
  190. package/dist/components/property-view/property-view.css.js +2 -0
  191. package/dist/components/render-json-path/render-json-path.css.js +11 -3
  192. package/dist/components/render-json-path/render-json-path.js +3 -0
  193. package/dist/components/render-operation-path/render-operation-path.css.js +9 -0
  194. package/dist/components/render-operation-path/render-operation-path.js +7 -22
  195. package/dist/components/rodeo/rodeo.d.ts +1 -0
  196. package/dist/components/rodeo/rodeo.js +5 -0
  197. package/dist/components/rodeo/roundup.js +2 -2
  198. package/dist/components/rodeo/statistic.css.js +25 -2
  199. package/dist/components/rodeo/statistic.js +0 -4
  200. package/dist/components/shader-canvas/shader-canvas.css.d.ts +2 -0
  201. package/dist/components/shader-canvas/shader-canvas.css.js +66 -0
  202. package/dist/components/shader-canvas/shader-canvas.d.ts +36 -0
  203. package/dist/components/shader-canvas/shader-canvas.js +363 -0
  204. package/dist/components/shaders/flowing-waves-shader.d.ts +2 -0
  205. package/dist/components/shaders/flowing-waves-shader.js +70 -0
  206. package/dist/components/shaders/neon-canyon-shader.d.ts +2 -0
  207. package/dist/components/shaders/neon-canyon-shader.js +265 -0
  208. package/dist/components/shaders/neon-lines-shader.d.ts +2 -0
  209. package/dist/components/shaders/neon-lines-shader.js +181 -0
  210. package/dist/components/shaders/neon-squircles-shader.d.ts +2 -0
  211. package/dist/components/shaders/neon-squircles-shader.js +56 -0
  212. package/dist/components/shaders/retro-grid-shader.d.ts +2 -0
  213. package/dist/components/shaders/retro-grid-shader.js +53 -0
  214. package/dist/components/shaders/shader-base.d.ts +9 -0
  215. package/dist/components/shaders/shader-base.js +11 -0
  216. package/dist/components/terminal/terminal-example.css.js +4 -0
  217. package/dist/components/terminal/terminal-example.js +2 -3
  218. package/dist/components/terminal-emulator/terminal-emulator.css.js +12 -2
  219. package/dist/components/terminal-emulator/terminal-emulator.d.ts +7 -1
  220. package/dist/components/terminal-emulator/terminal-emulator.js +10 -5
  221. package/dist/components/the-doctor/doctor-controls-panel.css.d.ts +2 -0
  222. package/dist/components/the-doctor/doctor-controls-panel.css.js +53 -0
  223. package/dist/components/the-doctor/doctor-controls-panel.d.ts +20 -0
  224. package/dist/components/the-doctor/doctor-controls-panel.js +78 -0
  225. package/dist/components/the-doctor/doctor-editor-panel.css.d.ts +2 -0
  226. package/dist/components/the-doctor/doctor-editor-panel.css.js +209 -0
  227. package/dist/components/the-doctor/doctor-editor-panel.d.ts +41 -0
  228. package/dist/components/the-doctor/doctor-editor-panel.js +188 -0
  229. package/dist/components/the-doctor/doctor-navigator-panel.css.d.ts +2 -0
  230. package/dist/components/the-doctor/doctor-navigator-panel.css.js +134 -0
  231. package/dist/components/the-doctor/doctor-navigator-panel.d.ts +35 -0
  232. package/dist/components/the-doctor/doctor-navigator-panel.js +117 -0
  233. package/dist/components/the-doctor/doctor-sidebar-panel.css.d.ts +2 -0
  234. package/dist/components/the-doctor/doctor-sidebar-panel.css.js +143 -0
  235. package/dist/components/the-doctor/doctor-sidebar-panel.d.ts +31 -0
  236. package/dist/components/the-doctor/doctor-sidebar-panel.js +131 -0
  237. package/dist/components/the-doctor/doctor-url-overlay.css.d.ts +2 -0
  238. package/dist/components/the-doctor/doctor-url-overlay.css.js +59 -0
  239. package/dist/components/the-doctor/doctor-url-overlay.d.ts +23 -0
  240. package/dist/components/the-doctor/doctor-url-overlay.js +82 -0
  241. package/dist/components/the-doctor/nuke-workspace.js +4 -3
  242. package/dist/components/the-doctor/settings.css.js +2 -0
  243. package/dist/components/the-doctor/settings.js +5 -8
  244. package/dist/components/the-doctor/status-bar.d.ts +2 -2
  245. package/dist/components/the-doctor/status-bar.js +32 -31
  246. package/dist/components/the-doctor/the-doctor.css.js +47 -238
  247. package/dist/components/the-doctor/the-doctor.d.ts +149 -37
  248. package/dist/components/the-doctor/the-doctor.js +958 -528
  249. package/dist/components/the-doctor/upload-archive.css.js +8 -2
  250. package/dist/components/the-doctor/upload-archive.js +2 -2
  251. package/dist/components/theme-switcher/theme-switcher.js +5 -1
  252. package/dist/components/time-vortex/change-list-item.css.js +18 -4
  253. package/dist/components/time-vortex/change-list-item.d.ts +1 -0
  254. package/dist/components/time-vortex/change-list-item.js +4 -3
  255. package/dist/components/time-vortex/history-picker.css.js +60 -1
  256. package/dist/components/time-vortex/history-picker.d.ts +7 -1
  257. package/dist/components/time-vortex/history-picker.js +109 -5
  258. package/dist/components/time-vortex/tardis-control.css.js +339 -14
  259. package/dist/components/time-vortex/tardis-control.d.ts +31 -3
  260. package/dist/components/time-vortex/tardis-control.js +296 -58
  261. package/dist/components/time-vortex/time-vortex.d.ts +8 -2
  262. package/dist/components/time-vortex/time-vortex.js +54 -13
  263. package/dist/components/toast/toast-component.css.js +1 -0
  264. package/dist/components/toast/toast-component.d.ts +1 -0
  265. package/dist/components/toast/toast-component.js +23 -8
  266. package/dist/components/toast/toast-manager.d.ts +5 -0
  267. package/dist/components/toast/toast-manager.js +29 -7
  268. package/dist/components/visualizer/edge.d.ts +11 -1
  269. package/dist/components/visualizer/edge.js +27 -22
  270. package/dist/components/visualizer/equalizer.css.js +118 -76
  271. package/dist/components/visualizer/equalizer.d.ts +24 -45
  272. package/dist/components/visualizer/equalizer.js +262 -363
  273. package/dist/components/visualizer/explorer.d.ts +94 -14
  274. package/dist/components/visualizer/explorer.js +580 -393
  275. package/dist/components/visualizer/foreign-object.d.ts +12 -2
  276. package/dist/components/visualizer/foreign-object.js +21 -10
  277. package/dist/components/visualizer/key.js +12 -1
  278. package/dist/components/visualizer/nodes/callback.d.ts +2 -1
  279. package/dist/components/visualizer/nodes/callback.js +2 -2
  280. package/dist/components/visualizer/nodes/components.d.ts +2 -1
  281. package/dist/components/visualizer/nodes/components.js +2 -2
  282. package/dist/components/visualizer/nodes/contact.d.ts +2 -1
  283. package/dist/components/visualizer/nodes/contact.js +2 -2
  284. package/dist/components/visualizer/nodes/document.d.ts +2 -1
  285. package/dist/components/visualizer/nodes/document.js +2 -2
  286. package/dist/components/visualizer/nodes/graph-node.d.ts +14 -3
  287. package/dist/components/visualizer/nodes/graph-node.js +94 -43
  288. package/dist/components/visualizer/nodes/header.d.ts +2 -1
  289. package/dist/components/visualizer/nodes/header.js +2 -2
  290. package/dist/components/visualizer/nodes/info.d.ts +2 -1
  291. package/dist/components/visualizer/nodes/info.js +2 -2
  292. package/dist/components/visualizer/nodes/license.d.ts +2 -1
  293. package/dist/components/visualizer/nodes/license.js +2 -2
  294. package/dist/components/visualizer/nodes/link.d.ts +2 -1
  295. package/dist/components/visualizer/nodes/link.js +2 -2
  296. package/dist/components/visualizer/nodes/media-type.d.ts +2 -1
  297. package/dist/components/visualizer/nodes/media-type.js +2 -2
  298. package/dist/components/visualizer/nodes/operation.d.ts +2 -1
  299. package/dist/components/visualizer/nodes/operation.js +3 -4
  300. package/dist/components/visualizer/nodes/parameter.d.ts +3 -1
  301. package/dist/components/visualizer/nodes/parameter.js +3 -4
  302. package/dist/components/visualizer/nodes/path-item.d.ts +2 -1
  303. package/dist/components/visualizer/nodes/path-item.js +2 -2
  304. package/dist/components/visualizer/nodes/request-body.d.ts +2 -1
  305. package/dist/components/visualizer/nodes/request-body.js +2 -2
  306. package/dist/components/visualizer/nodes/response.d.ts +2 -1
  307. package/dist/components/visualizer/nodes/response.js +2 -2
  308. package/dist/components/visualizer/nodes/schema.d.ts +2 -1
  309. package/dist/components/visualizer/nodes/schema.js +64 -9
  310. package/dist/components/visualizer/nodes/security-scheme.d.ts +2 -1
  311. package/dist/components/visualizer/nodes/security-scheme.js +2 -2
  312. package/dist/components/visualizer/nodes/server.d.ts +2 -1
  313. package/dist/components/visualizer/nodes/server.js +3 -4
  314. package/dist/components/visualizer/nodes/tag.d.ts +2 -1
  315. package/dist/components/visualizer/nodes/tag.js +4 -5
  316. package/dist/components/visualizer/nodes/xml.d.ts +2 -1
  317. package/dist/components/visualizer/nodes/xml.js +2 -2
  318. package/dist/components/visualizer/orientation-controls.d.ts +6 -1
  319. package/dist/components/visualizer/orientation-controls.js +65 -7
  320. package/dist/components/visualizer/search.d.ts +2 -1
  321. package/dist/components/visualizer/search.js +22 -29
  322. package/dist/components/visualizer/shared.css.js +55 -18
  323. package/dist/components/visualizer/templates/svg-markers.d.ts +2 -0
  324. package/dist/components/visualizer/templates/svg-markers.js +73 -0
  325. package/dist/components/waiting-line/waiting-line.css.d.ts +2 -0
  326. package/dist/components/waiting-line/waiting-line.css.js +26 -0
  327. package/dist/components/waiting-line/waiting-line.d.ts +30 -0
  328. package/dist/components/waiting-line/waiting-line.js +424 -0
  329. package/dist/components/workspaces/workspace-view.css.js +89 -8
  330. package/dist/components/workspaces/workspace-view.d.ts +8 -1
  331. package/dist/components/workspaces/workspace-view.js +77 -25
  332. package/dist/controllers/auth-controller.d.ts +9 -0
  333. package/dist/controllers/auth-controller.js +12 -5
  334. package/dist/controllers/broker-controller.d.ts +30 -4
  335. package/dist/controllers/broker-controller.js +148 -25
  336. package/dist/controllers/bundle-controller.d.ts +21 -0
  337. package/dist/controllers/bundle-controller.js +122 -0
  338. package/dist/controllers/countdown-controller.d.ts +17 -0
  339. package/dist/controllers/countdown-controller.js +59 -0
  340. package/dist/controllers/diagnostic-controller.d.ts +18 -5
  341. package/dist/controllers/diagnostic-controller.js +206 -218
  342. package/dist/controllers/diagramatron-controller.d.ts +33 -0
  343. package/dist/controllers/diagramatron-controller.js +128 -0
  344. package/dist/controllers/docs-controller.d.ts +11 -5
  345. package/dist/controllers/docs-controller.js +97 -97
  346. package/dist/controllers/github-controller.d.ts +47 -0
  347. package/dist/controllers/github-controller.js +494 -0
  348. package/dist/controllers/global-task-controller.d.ts +46 -0
  349. package/dist/controllers/global-task-controller.js +352 -0
  350. package/dist/controllers/model-controller.d.ts +26 -4
  351. package/dist/controllers/model-controller.js +98 -62
  352. package/dist/controllers/node-clicker-controller.d.ts +121 -4
  353. package/dist/controllers/node-clicker-controller.js +526 -253
  354. package/dist/controllers/problem-controller.d.ts +11 -4
  355. package/dist/controllers/problem-controller.js +98 -39
  356. package/dist/controllers/rolodex-controller.d.ts +8 -3
  357. package/dist/controllers/rolodex-controller.js +117 -83
  358. package/dist/controllers/rule-controller.d.ts +12 -5
  359. package/dist/controllers/rule-controller.js +154 -161
  360. package/dist/controllers/spec-controller.d.ts +16 -4
  361. package/dist/controllers/spec-controller.js +91 -62
  362. package/dist/controllers/state-controller.d.ts +4 -3
  363. package/dist/controllers/state-controller.js +201 -154
  364. package/dist/controllers/tab-cache-controller.d.ts +29 -0
  365. package/dist/controllers/tab-cache-controller.js +68 -0
  366. package/dist/controllers/timeline-controller.d.ts +18 -0
  367. package/dist/controllers/timeline-controller.js +129 -0
  368. package/dist/controllers/wallet-controller.d.ts +3 -3
  369. package/dist/controllers/wallet-controller.js +22 -41
  370. package/dist/controllers/workspace-controller.d.ts +10 -4
  371. package/dist/controllers/workspace-controller.js +67 -22
  372. package/dist/cose-bilkent-S5V4N54A-2TG-C-n3.js +2608 -0
  373. package/dist/cowboy-components-BcyXo9oX.js +68425 -0
  374. package/dist/cowboy-components.css +1 -0
  375. package/dist/cowboy-components.umd.cjs +14050 -6577
  376. package/dist/css/alerts.css.js +2 -0
  377. package/dist/css/badges.css.js +2 -0
  378. package/dist/css/button.css.js +34 -1
  379. package/dist/css/cowboy-components.css +34 -0
  380. package/dist/css/dialog.css.js +11 -2
  381. package/dist/css/filter.css.js +17 -5
  382. package/dist/css/forms.css.js +14 -0
  383. package/dist/css/pb33f-theme.css +87 -16
  384. package/dist/css/syntax.css.js +5 -0
  385. package/dist/css/tabs.css.js +19 -2
  386. package/dist/css/tooltip.css.js +4 -0
  387. package/dist/cytoscape.esm-DfdJODL8.js +18735 -0
  388. package/dist/dagre-6UL2VRFP-BIlmTbhO.js +444 -0
  389. package/dist/defaultLocale-D7EN2tov.js +171 -0
  390. package/dist/diagram-PSM6KHXK-CeWby24E.js +531 -0
  391. package/dist/diagram-QEK2KX5R-DGonyVCK.js +217 -0
  392. package/dist/diagram-S2PKOQOG-mGn-y1uX.js +142 -0
  393. package/dist/erDiagram-Q2GNP2WA-BlBBw4Mz.js +841 -0
  394. package/dist/events/doctor.d.ts +63 -9
  395. package/dist/events/doctor.js +29 -1
  396. package/dist/events/drawer-events.d.ts +7 -0
  397. package/dist/events/drawer-events.js +3 -0
  398. package/dist/events/theme.d.ts +4 -0
  399. package/dist/events/theme.js +1 -0
  400. package/dist/factories/explorer-component-factory.d.ts +49 -0
  401. package/dist/factories/explorer-component-factory.js +205 -0
  402. package/dist/factories/state-controller-deps.factory.d.ts +88 -0
  403. package/dist/factories/state-controller-deps.factory.js +116 -0
  404. package/dist/flowDiagram-NV44I4VS-BlLzzy1C.js +1620 -0
  405. package/dist/ganttDiagram-LVOFAZNH-BoQtPC8k.js +2505 -0
  406. package/dist/gitGraph-F6HP7TQM-CShNSlrW.js +5 -0
  407. package/dist/gitGraphDiagram-NY62KEGX-BdpWBgHy.js +699 -0
  408. package/dist/graph-D9HS4Ahd.js +247 -0
  409. package/dist/helpers/event-wiring.d.ts +72 -0
  410. package/dist/helpers/event-wiring.js +58 -0
  411. package/dist/helpers/file-size-formatter.d.ts +3 -0
  412. package/dist/helpers/file-size-formatter.js +15 -0
  413. package/dist/helpers/filename-colorizer.d.ts +5 -0
  414. package/dist/helpers/filename-colorizer.js +30 -0
  415. package/dist/helpers/navigation-helper.d.ts +54 -0
  416. package/dist/helpers/navigation-helper.js +159 -0
  417. package/dist/helpers/typed-events.d.ts +1 -0
  418. package/dist/helpers/typed-events.js +3 -0
  419. package/dist/info-NVLQJR56-Bpi6I8up.js +5 -0
  420. package/dist/infoDiagram-F6ZHWCRC-DmhhbuMJ.js +24 -0
  421. package/dist/init-DjUOC4st.js +16 -0
  422. package/dist/interfaces/bundle-interfaces.d.ts +7 -0
  423. package/dist/interfaces/bundle-interfaces.js +1 -0
  424. package/dist/interfaces/doctor-interfaces.d.ts +506 -0
  425. package/dist/interfaces/doctor-interfaces.js +1 -0
  426. package/dist/journeyDiagram-XKPGCS4Q-CpkhK8vl.js +834 -0
  427. package/dist/kanban-definition-3W4ZIXB7-BFbucfYE.js +719 -0
  428. package/dist/katex-SsTUIUTC.js +11688 -0
  429. package/dist/layout-B8H1_UrM.js +1324 -0
  430. package/dist/linear-Bo0rJUSQ.js +259 -0
  431. package/dist/managers/drag-handler.d.ts +28 -0
  432. package/dist/managers/drag-handler.js +64 -0
  433. package/dist/managers/event-registration-manager.d.ts +17 -0
  434. package/dist/managers/event-registration-manager.js +34 -0
  435. package/dist/managers/expansion-manager.d.ts +58 -0
  436. package/dist/managers/expansion-manager.js +189 -0
  437. package/dist/managers/layout-filter-manager.d.ts +31 -0
  438. package/dist/managers/layout-filter-manager.js +109 -0
  439. package/dist/managers/panel-divider-manager.d.ts +33 -0
  440. package/dist/managers/panel-divider-manager.js +71 -0
  441. package/dist/managers/view-state-manager.d.ts +48 -0
  442. package/dist/managers/view-state-manager.js +101 -0
  443. package/dist/managers/viewport-manager.d.ts +53 -0
  444. package/dist/managers/viewport-manager.js +198 -0
  445. package/dist/mermaid-parser.core-BPror82d.js +12966 -0
  446. package/dist/mindmap-definition-VGOIOE7T-VAn-EShH.js +784 -0
  447. package/dist/mocks/task-mock-generator.d.ts +13 -0
  448. package/dist/mocks/task-mock-generator.js +200 -0
  449. package/dist/model/api-response.d.ts +2 -7
  450. package/dist/model/api-response.js +0 -2
  451. package/dist/model/bundle.d.ts +35 -0
  452. package/dist/model/bundle.js +1 -0
  453. package/dist/model/channels.d.ts +8 -1
  454. package/dist/model/channels.js +7 -0
  455. package/dist/model/drawer-content.d.ts +80 -0
  456. package/dist/model/drawer-content.js +14 -0
  457. package/dist/model/formable.js +22 -11
  458. package/dist/model/github.d.ts +125 -0
  459. package/dist/model/github.js +1 -0
  460. package/dist/model/graph.d.ts +15 -15
  461. package/dist/model/graph.js +24 -4
  462. package/dist/model/media-type.js +2 -2
  463. package/dist/model/node_type.d.ts +4 -0
  464. package/dist/model/node_type.js +4 -0
  465. package/dist/model/panel-state.d.ts +1 -0
  466. package/dist/model/rolodex.d.ts +3 -0
  467. package/dist/model/task.d.ts +50 -0
  468. package/dist/model/task.js +22 -0
  469. package/dist/model/timeline.d.ts +107 -1
  470. package/dist/model/tree-icon-config.d.ts +11 -0
  471. package/dist/model/tree-icon-config.js +46 -0
  472. package/dist/model/workspace.d.ts +2 -0
  473. package/dist/monacoeditorwork/css.worker.bundle.js +9 -7
  474. package/dist/monacoeditorwork/editor.worker.bundle.js +2 -0
  475. package/dist/monacoeditorwork/html.worker.bundle.js +9 -7
  476. package/dist/monacoeditorwork/json.worker.bundle.js +9 -7
  477. package/dist/monacoeditorwork/yaml.worker..bundle.js +72 -48
  478. package/dist/ordinal-DfAQgscy.js +61 -0
  479. package/dist/packet-BFZMPI3H-CXPCK9Q2.js +5 -0
  480. package/dist/pie-7BOR55EZ-CMcuUZ_S.js +5 -0
  481. package/dist/pieDiagram-ADFJNKIX-C0kdlQqn.js +161 -0
  482. package/dist/quadrantDiagram-AYHSOK5B-CRVq6wY3.js +1022 -0
  483. package/dist/radar-NHE76QYJ-CX_Gyp4h.js +5 -0
  484. package/dist/requirementDiagram-UZGBJVZJ-B8ZGgMKn.js +850 -0
  485. package/dist/sankeyDiagram-TZEHDZUN-CWAUJJue.js +810 -0
  486. package/dist/sequenceDiagram-WL72ISMW-nz81a4Cq.js +2511 -0
  487. package/dist/services/diagramatron-service.d.ts +20 -0
  488. package/dist/services/diagramatron-service.js +48 -0
  489. package/dist/services/doctor-events.d.ts +58 -0
  490. package/dist/services/doctor-events.js +33 -0
  491. package/dist/services/drawer-content-registry.d.ts +9 -0
  492. package/dist/services/drawer-content-registry.js +37 -0
  493. package/dist/services/github-service.d.ts +9 -0
  494. package/dist/services/github-service.js +166 -0
  495. package/dist/services/global-task-service.d.ts +6 -0
  496. package/dist/services/global-task-service.js +27 -0
  497. package/dist/services/header-service.d.ts +5 -3
  498. package/dist/services/header-service.js +13 -0
  499. package/dist/services/linting-service.d.ts +2 -0
  500. package/dist/services/linting-service.js +19 -2
  501. package/dist/services/mermaid-config-service.d.ts +53 -0
  502. package/dist/services/mermaid-config-service.js +519 -0
  503. package/dist/services/model-service.d.ts +12 -7
  504. package/dist/services/model-service.js +64 -11
  505. package/dist/services/rodeo-service.js +12 -12
  506. package/dist/services/timeline-service.d.ts +12 -2
  507. package/dist/services/timeline-service.js +329 -0
  508. package/dist/services/wallet-service.d.ts +1 -1
  509. package/dist/services/wallet-service.js +4 -1
  510. package/dist/services/workspace-service.js +16 -2
  511. package/dist/stateDiagram-FKZM4ZOC-3PFzJlcG.js +263 -0
  512. package/dist/stateDiagram-v2-4FDKWEC3-Bp46vM6_.js +16 -0
  513. package/dist/timeline-definition-IT6M3QCI-utm7jTLb.js +795 -0
  514. package/dist/treemap-KMMF4GRG-BvEKHn43.js +5 -0
  515. package/dist/utils/language-utils.d.ts +1 -0
  516. package/dist/utils/language-utils.js +23 -0
  517. package/dist/utils/lru-cache.d.ts +11 -0
  518. package/dist/utils/lru-cache.js +38 -0
  519. package/dist/utils/node-helpers.d.ts +6 -0
  520. package/dist/utils/node-helpers.js +62 -0
  521. package/dist/utils/path-utils.d.ts +5 -0
  522. package/dist/utils/path-utils.js +22 -0
  523. package/dist/workers/elk-layout.worker.d.ts +2 -0
  524. package/dist/workers/elk-layout.worker.js +31 -0
  525. package/dist/workers/equalizer.worker.d.ts +6 -1
  526. package/dist/workers/equalizer.worker.js +144 -195
  527. package/dist/workers/graph-dependent.worker.js +6 -6
  528. package/dist/workers/rule-documentation.worker.js +12 -48
  529. package/dist/workers/search-graph.worker.js +8 -23
  530. package/dist/xychartDiagram-PRI3JC2R-twqDKWMX.js +1340 -0
  531. package/package.json +17 -10
  532. package/dist/assets/equalizer.worker-DyLD5JTU.js +0 -1
  533. package/dist/assets/graph-dependent.worker-CpVhp0-T.js +0 -1
  534. package/dist/assets/rule-documentation.worker-B7xOWY5M.js +0 -1
  535. package/dist/assets/search-graph.worker-B9zqINrO.js +0 -1
  536. package/dist/assets/search-problems.worker-BAF8L2rX.js +0 -1
  537. package/dist/components/problem-list/details-drawer.d.ts +0 -34
  538. package/dist/components/problem-list/details-drawer.js +0 -200
  539. package/dist/style.css +0 -1
  540. /package/dist/components/{problem-list/details-drawer.css.d.ts → bundle-toolbar/bundle-toolbar.css.d.ts} +0 -0
@@ -0,0 +1,1370 @@
1
+ import { g as te } from "./chunk-55IACEB6-DgHUzWsw.js";
2
+ import { s as ee } from "./chunk-QN33PNHL-D7uE2r1Y.js";
3
+ import { _ as u, l as b, c as w, r as se, u as ie, a as re, b as ae, g as ne, s as oe, p as le, q as ce, T as he, k as U, y as ue } from "./cowboy-components-BcyXo9oX.js";
4
+ var vt = (function() {
5
+ var t = /* @__PURE__ */ u(function(Y, o, c, n) {
6
+ for (c = c || {}, n = Y.length; n--; c[Y[n]] = o) ;
7
+ return c;
8
+ }, "o"), e = [1, 2], s = [1, 3], a = [1, 4], r = [2, 4], h = [1, 9], d = [1, 11], S = [1, 16], f = [1, 17], T = [1, 18], _ = [1, 19], m = [1, 33], A = [1, 20], v = [1, 21], p = [1, 22], k = [1, 23], R = [1, 24], L = [1, 26], $ = [1, 27], I = [1, 28], P = [1, 29], st = [1, 30], it = [1, 31], rt = [1, 32], at = [1, 35], nt = [1, 36], ot = [1, 37], lt = [1, 38], H = [1, 34], y = [1, 4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], ct = [1, 4, 5, 14, 15, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 39, 40, 41, 45, 48, 51, 52, 53, 54, 57], xt = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], gt = {
9
+ trace: /* @__PURE__ */ u(function() {
10
+ }, "trace"),
11
+ yy: {},
12
+ symbols_: { error: 2, start: 3, SPACE: 4, NL: 5, SD: 6, document: 7, line: 8, statement: 9, classDefStatement: 10, styleStatement: 11, cssClassStatement: 12, idStatement: 13, DESCR: 14, "-->": 15, HIDE_EMPTY: 16, scale: 17, WIDTH: 18, COMPOSIT_STATE: 19, STRUCT_START: 20, STRUCT_STOP: 21, STATE_DESCR: 22, AS: 23, ID: 24, FORK: 25, JOIN: 26, CHOICE: 27, CONCURRENT: 28, note: 29, notePosition: 30, NOTE_TEXT: 31, direction: 32, acc_title: 33, acc_title_value: 34, acc_descr: 35, acc_descr_value: 36, acc_descr_multiline_value: 37, CLICK: 38, STRING: 39, HREF: 40, classDef: 41, CLASSDEF_ID: 42, CLASSDEF_STYLEOPTS: 43, DEFAULT: 44, style: 45, STYLE_IDS: 46, STYLEDEF_STYLEOPTS: 47, class: 48, CLASSENTITY_IDS: 49, STYLECLASS: 50, direction_tb: 51, direction_bt: 52, direction_rl: 53, direction_lr: 54, eol: 55, ";": 56, EDGE_STATE: 57, STYLE_SEPARATOR: 58, left_of: 59, right_of: 60, $accept: 0, $end: 1 },
13
+ terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 14: "DESCR", 15: "-->", 16: "HIDE_EMPTY", 17: "scale", 18: "WIDTH", 19: "COMPOSIT_STATE", 20: "STRUCT_START", 21: "STRUCT_STOP", 22: "STATE_DESCR", 23: "AS", 24: "ID", 25: "FORK", 26: "JOIN", 27: "CHOICE", 28: "CONCURRENT", 29: "note", 31: "NOTE_TEXT", 33: "acc_title", 34: "acc_title_value", 35: "acc_descr", 36: "acc_descr_value", 37: "acc_descr_multiline_value", 38: "CLICK", 39: "STRING", 40: "HREF", 41: "classDef", 42: "CLASSDEF_ID", 43: "CLASSDEF_STYLEOPTS", 44: "DEFAULT", 45: "style", 46: "STYLE_IDS", 47: "STYLEDEF_STYLEOPTS", 48: "class", 49: "CLASSENTITY_IDS", 50: "STYLECLASS", 51: "direction_tb", 52: "direction_bt", 53: "direction_rl", 54: "direction_lr", 56: ";", 57: "EDGE_STATE", 58: "STYLE_SEPARATOR", 59: "left_of", 60: "right_of" },
14
+ productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [9, 5], [9, 5], [10, 3], [10, 3], [11, 3], [12, 3], [32, 1], [32, 1], [32, 1], [32, 1], [55, 1], [55, 1], [13, 1], [13, 1], [13, 3], [13, 3], [30, 1], [30, 1]],
15
+ performAction: /* @__PURE__ */ u(function(o, c, n, g, E, i, J) {
16
+ var l = i.length - 1;
17
+ switch (E) {
18
+ case 3:
19
+ return g.setRootDoc(i[l]), i[l];
20
+ case 4:
21
+ this.$ = [];
22
+ break;
23
+ case 5:
24
+ i[l] != "nl" && (i[l - 1].push(i[l]), this.$ = i[l - 1]);
25
+ break;
26
+ case 6:
27
+ case 7:
28
+ this.$ = i[l];
29
+ break;
30
+ case 8:
31
+ this.$ = "nl";
32
+ break;
33
+ case 12:
34
+ this.$ = i[l];
35
+ break;
36
+ case 13:
37
+ const q = i[l - 1];
38
+ q.description = g.trimColon(i[l]), this.$ = q;
39
+ break;
40
+ case 14:
41
+ this.$ = { stmt: "relation", state1: i[l - 2], state2: i[l] };
42
+ break;
43
+ case 15:
44
+ const Tt = g.trimColon(i[l]);
45
+ this.$ = { stmt: "relation", state1: i[l - 3], state2: i[l - 1], description: Tt };
46
+ break;
47
+ case 19:
48
+ this.$ = { stmt: "state", id: i[l - 3], type: "default", description: "", doc: i[l - 1] };
49
+ break;
50
+ case 20:
51
+ var B = i[l], W = i[l - 2].trim();
52
+ if (i[l].match(":")) {
53
+ var ut = i[l].split(":");
54
+ B = ut[0], W = [W, ut[1]];
55
+ }
56
+ this.$ = { stmt: "state", id: B, type: "default", description: W };
57
+ break;
58
+ case 21:
59
+ this.$ = { stmt: "state", id: i[l - 3], type: "default", description: i[l - 5], doc: i[l - 1] };
60
+ break;
61
+ case 22:
62
+ this.$ = { stmt: "state", id: i[l], type: "fork" };
63
+ break;
64
+ case 23:
65
+ this.$ = { stmt: "state", id: i[l], type: "join" };
66
+ break;
67
+ case 24:
68
+ this.$ = { stmt: "state", id: i[l], type: "choice" };
69
+ break;
70
+ case 25:
71
+ this.$ = { stmt: "state", id: g.getDividerId(), type: "divider" };
72
+ break;
73
+ case 26:
74
+ this.$ = { stmt: "state", id: i[l - 1].trim(), note: { position: i[l - 2].trim(), text: i[l].trim() } };
75
+ break;
76
+ case 29:
77
+ this.$ = i[l].trim(), g.setAccTitle(this.$);
78
+ break;
79
+ case 30:
80
+ case 31:
81
+ this.$ = i[l].trim(), g.setAccDescription(this.$);
82
+ break;
83
+ case 32:
84
+ this.$ = {
85
+ stmt: "click",
86
+ id: i[l - 3],
87
+ url: i[l - 2],
88
+ tooltip: i[l - 1]
89
+ };
90
+ break;
91
+ case 33:
92
+ this.$ = {
93
+ stmt: "click",
94
+ id: i[l - 3],
95
+ url: i[l - 1],
96
+ tooltip: ""
97
+ };
98
+ break;
99
+ case 34:
100
+ case 35:
101
+ this.$ = { stmt: "classDef", id: i[l - 1].trim(), classes: i[l].trim() };
102
+ break;
103
+ case 36:
104
+ this.$ = { stmt: "style", id: i[l - 1].trim(), styleClass: i[l].trim() };
105
+ break;
106
+ case 37:
107
+ this.$ = { stmt: "applyClass", id: i[l - 1].trim(), styleClass: i[l].trim() };
108
+ break;
109
+ case 38:
110
+ g.setDirection("TB"), this.$ = { stmt: "dir", value: "TB" };
111
+ break;
112
+ case 39:
113
+ g.setDirection("BT"), this.$ = { stmt: "dir", value: "BT" };
114
+ break;
115
+ case 40:
116
+ g.setDirection("RL"), this.$ = { stmt: "dir", value: "RL" };
117
+ break;
118
+ case 41:
119
+ g.setDirection("LR"), this.$ = { stmt: "dir", value: "LR" };
120
+ break;
121
+ case 44:
122
+ case 45:
123
+ this.$ = { stmt: "state", id: i[l].trim(), type: "default", description: "" };
124
+ break;
125
+ case 46:
126
+ this.$ = { stmt: "state", id: i[l - 2].trim(), classes: [i[l].trim()], type: "default", description: "" };
127
+ break;
128
+ case 47:
129
+ this.$ = { stmt: "state", id: i[l - 2].trim(), classes: [i[l].trim()], type: "default", description: "" };
130
+ break;
131
+ }
132
+ }, "anonymous"),
133
+ table: [{ 3: 1, 4: e, 5: s, 6: a }, { 1: [3] }, { 3: 5, 4: e, 5: s, 6: a }, { 3: 6, 4: e, 5: s, 6: a }, t([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], r, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: h, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: f, 19: T, 22: _, 24: m, 25: A, 26: v, 27: p, 28: k, 29: R, 32: 25, 33: L, 35: $, 37: I, 38: P, 41: st, 45: it, 48: rt, 51: at, 52: nt, 53: ot, 54: lt, 57: H }, t(y, [2, 5]), { 9: 39, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: f, 19: T, 22: _, 24: m, 25: A, 26: v, 27: p, 28: k, 29: R, 32: 25, 33: L, 35: $, 37: I, 38: P, 41: st, 45: it, 48: rt, 51: at, 52: nt, 53: ot, 54: lt, 57: H }, t(y, [2, 7]), t(y, [2, 8]), t(y, [2, 9]), t(y, [2, 10]), t(y, [2, 11]), t(y, [2, 12], { 14: [1, 40], 15: [1, 41] }), t(y, [2, 16]), { 18: [1, 42] }, t(y, [2, 18], { 20: [1, 43] }), { 23: [1, 44] }, t(y, [2, 22]), t(y, [2, 23]), t(y, [2, 24]), t(y, [2, 25]), { 30: 45, 31: [1, 46], 59: [1, 47], 60: [1, 48] }, t(y, [2, 28]), { 34: [1, 49] }, { 36: [1, 50] }, t(y, [2, 31]), { 13: 51, 24: m, 57: H }, { 42: [1, 52], 44: [1, 53] }, { 46: [1, 54] }, { 49: [1, 55] }, t(ct, [2, 44], { 58: [1, 56] }), t(ct, [2, 45], { 58: [1, 57] }), t(y, [2, 38]), t(y, [2, 39]), t(y, [2, 40]), t(y, [2, 41]), t(y, [2, 6]), t(y, [2, 13]), { 13: 58, 24: m, 57: H }, t(y, [2, 17]), t(xt, r, { 7: 59 }), { 24: [1, 60] }, { 24: [1, 61] }, { 23: [1, 62] }, { 24: [2, 48] }, { 24: [2, 49] }, t(y, [2, 29]), t(y, [2, 30]), { 39: [1, 63], 40: [1, 64] }, { 43: [1, 65] }, { 43: [1, 66] }, { 47: [1, 67] }, { 50: [1, 68] }, { 24: [1, 69] }, { 24: [1, 70] }, t(y, [2, 14], { 14: [1, 71] }), { 4: h, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: f, 19: T, 21: [1, 72], 22: _, 24: m, 25: A, 26: v, 27: p, 28: k, 29: R, 32: 25, 33: L, 35: $, 37: I, 38: P, 41: st, 45: it, 48: rt, 51: at, 52: nt, 53: ot, 54: lt, 57: H }, t(y, [2, 20], { 20: [1, 73] }), { 31: [1, 74] }, { 24: [1, 75] }, { 39: [1, 76] }, { 39: [1, 77] }, t(y, [2, 34]), t(y, [2, 35]), t(y, [2, 36]), t(y, [2, 37]), t(ct, [2, 46]), t(ct, [2, 47]), t(y, [2, 15]), t(y, [2, 19]), t(xt, r, { 7: 78 }), t(y, [2, 26]), t(y, [2, 27]), { 5: [1, 79] }, { 5: [1, 80] }, { 4: h, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: f, 19: T, 21: [1, 81], 22: _, 24: m, 25: A, 26: v, 27: p, 28: k, 29: R, 32: 25, 33: L, 35: $, 37: I, 38: P, 41: st, 45: it, 48: rt, 51: at, 52: nt, 53: ot, 54: lt, 57: H }, t(y, [2, 32]), t(y, [2, 33]), t(y, [2, 21])],
134
+ defaultActions: { 5: [2, 1], 6: [2, 2], 47: [2, 48], 48: [2, 49] },
135
+ parseError: /* @__PURE__ */ u(function(o, c) {
136
+ if (c.recoverable)
137
+ this.trace(o);
138
+ else {
139
+ var n = new Error(o);
140
+ throw n.hash = c, n;
141
+ }
142
+ }, "parseError"),
143
+ parse: /* @__PURE__ */ u(function(o) {
144
+ var c = this, n = [0], g = [], E = [null], i = [], J = this.table, l = "", B = 0, W = 0, ut = 2, q = 1, Tt = i.slice.call(arguments, 1), D = Object.create(this.lexer), V = { yy: {} };
145
+ for (var Et in this.yy)
146
+ Object.prototype.hasOwnProperty.call(this.yy, Et) && (V.yy[Et] = this.yy[Et]);
147
+ D.setInput(o, V.yy), V.yy.lexer = D, V.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {});
148
+ var _t = D.yylloc;
149
+ i.push(_t);
150
+ var Qt = D.options && D.options.ranges;
151
+ typeof V.yy.parseError == "function" ? this.parseError = V.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
152
+ function Zt(O) {
153
+ n.length = n.length - 2 * O, E.length = E.length - O, i.length = i.length - O;
154
+ }
155
+ u(Zt, "popStack");
156
+ function Lt() {
157
+ var O;
158
+ return O = g.pop() || D.lex() || q, typeof O != "number" && (O instanceof Array && (g = O, O = g.pop()), O = c.symbols_[O] || O), O;
159
+ }
160
+ u(Lt, "lex");
161
+ for (var x, M, N, mt, z = {}, dt, F, It, ft; ; ) {
162
+ if (M = n[n.length - 1], this.defaultActions[M] ? N = this.defaultActions[M] : ((x === null || typeof x > "u") && (x = Lt()), N = J[M] && J[M][x]), typeof N > "u" || !N.length || !N[0]) {
163
+ var bt = "";
164
+ ft = [];
165
+ for (dt in J[M])
166
+ this.terminals_[dt] && dt > ut && ft.push("'" + this.terminals_[dt] + "'");
167
+ D.showPosition ? bt = "Parse error on line " + (B + 1) + `:
168
+ ` + D.showPosition() + `
169
+ Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[x] || x) + "'" : bt = "Parse error on line " + (B + 1) + ": Unexpected " + (x == q ? "end of input" : "'" + (this.terminals_[x] || x) + "'"), this.parseError(bt, {
170
+ text: D.match,
171
+ token: this.terminals_[x] || x,
172
+ line: D.yylineno,
173
+ loc: _t,
174
+ expected: ft
175
+ });
176
+ }
177
+ if (N[0] instanceof Array && N.length > 1)
178
+ throw new Error("Parse Error: multiple actions possible at state: " + M + ", token: " + x);
179
+ switch (N[0]) {
180
+ case 1:
181
+ n.push(x), E.push(D.yytext), i.push(D.yylloc), n.push(N[1]), x = null, W = D.yyleng, l = D.yytext, B = D.yylineno, _t = D.yylloc;
182
+ break;
183
+ case 2:
184
+ if (F = this.productions_[N[1]][1], z.$ = E[E.length - F], z._$ = {
185
+ first_line: i[i.length - (F || 1)].first_line,
186
+ last_line: i[i.length - 1].last_line,
187
+ first_column: i[i.length - (F || 1)].first_column,
188
+ last_column: i[i.length - 1].last_column
189
+ }, Qt && (z._$.range = [
190
+ i[i.length - (F || 1)].range[0],
191
+ i[i.length - 1].range[1]
192
+ ]), mt = this.performAction.apply(z, [
193
+ l,
194
+ W,
195
+ B,
196
+ V.yy,
197
+ N[1],
198
+ E,
199
+ i
200
+ ].concat(Tt)), typeof mt < "u")
201
+ return mt;
202
+ F && (n = n.slice(0, -1 * F * 2), E = E.slice(0, -1 * F), i = i.slice(0, -1 * F)), n.push(this.productions_[N[1]][0]), E.push(z.$), i.push(z._$), It = J[n[n.length - 2]][n[n.length - 1]], n.push(It);
203
+ break;
204
+ case 3:
205
+ return !0;
206
+ }
207
+ }
208
+ return !0;
209
+ }, "parse")
210
+ }, qt = /* @__PURE__ */ (function() {
211
+ var Y = {
212
+ EOF: 1,
213
+ parseError: /* @__PURE__ */ u(function(c, n) {
214
+ if (this.yy.parser)
215
+ this.yy.parser.parseError(c, n);
216
+ else
217
+ throw new Error(c);
218
+ }, "parseError"),
219
+ // resets the lexer, sets new input
220
+ setInput: /* @__PURE__ */ u(function(o, c) {
221
+ return this.yy = c || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
222
+ first_line: 1,
223
+ first_column: 0,
224
+ last_line: 1,
225
+ last_column: 0
226
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
227
+ }, "setInput"),
228
+ // consumes and returns one char from the input
229
+ input: /* @__PURE__ */ u(function() {
230
+ var o = this._input[0];
231
+ this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
232
+ var c = o.match(/(?:\r\n?|\n).*/g);
233
+ return c ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
234
+ }, "input"),
235
+ // unshifts one char (or a string) into the input
236
+ unput: /* @__PURE__ */ u(function(o) {
237
+ var c = o.length, n = o.split(/(?:\r\n?|\n)/g);
238
+ this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - c), this.offset -= c;
239
+ var g = this.match.split(/(?:\r\n?|\n)/g);
240
+ 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);
241
+ var E = this.yylloc.range;
242
+ return this.yylloc = {
243
+ first_line: this.yylloc.first_line,
244
+ last_line: this.yylineno + 1,
245
+ first_column: this.yylloc.first_column,
246
+ last_column: n ? (n.length === g.length ? this.yylloc.first_column : 0) + g[g.length - n.length].length - n[0].length : this.yylloc.first_column - c
247
+ }, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - c]), this.yyleng = this.yytext.length, this;
248
+ }, "unput"),
249
+ // When called from action, caches matched text and appends it on next action
250
+ more: /* @__PURE__ */ u(function() {
251
+ return this._more = !0, this;
252
+ }, "more"),
253
+ // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
254
+ reject: /* @__PURE__ */ u(function() {
255
+ if (this.options.backtrack_lexer)
256
+ this._backtrack = !0;
257
+ else
258
+ 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).
259
+ ` + this.showPosition(), {
260
+ text: "",
261
+ token: null,
262
+ line: this.yylineno
263
+ });
264
+ return this;
265
+ }, "reject"),
266
+ // retain first n characters of the match
267
+ less: /* @__PURE__ */ u(function(o) {
268
+ this.unput(this.match.slice(o));
269
+ }, "less"),
270
+ // displays already matched input, i.e. for error messages
271
+ pastInput: /* @__PURE__ */ u(function() {
272
+ var o = this.matched.substr(0, this.matched.length - this.match.length);
273
+ return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
274
+ }, "pastInput"),
275
+ // displays upcoming input, i.e. for error messages
276
+ upcomingInput: /* @__PURE__ */ u(function() {
277
+ var o = this.match;
278
+ return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
279
+ }, "upcomingInput"),
280
+ // displays the character position where the lexing error occurred, i.e. for error messages
281
+ showPosition: /* @__PURE__ */ u(function() {
282
+ var o = this.pastInput(), c = new Array(o.length + 1).join("-");
283
+ return o + this.upcomingInput() + `
284
+ ` + c + "^";
285
+ }, "showPosition"),
286
+ // test the lexed token: return FALSE when not a match, otherwise return token
287
+ test_match: /* @__PURE__ */ u(function(o, c) {
288
+ var n, g, E;
289
+ if (this.options.backtrack_lexer && (E = {
290
+ yylineno: this.yylineno,
291
+ yylloc: {
292
+ first_line: this.yylloc.first_line,
293
+ last_line: this.last_line,
294
+ first_column: this.yylloc.first_column,
295
+ last_column: this.yylloc.last_column
296
+ },
297
+ yytext: this.yytext,
298
+ match: this.match,
299
+ matches: this.matches,
300
+ matched: this.matched,
301
+ yyleng: this.yyleng,
302
+ offset: this.offset,
303
+ _more: this._more,
304
+ _input: this._input,
305
+ yy: this.yy,
306
+ conditionStack: this.conditionStack.slice(0),
307
+ done: this.done
308
+ }, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), g = o[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
309
+ first_line: this.yylloc.last_line,
310
+ last_line: this.yylineno + 1,
311
+ first_column: this.yylloc.last_column,
312
+ last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
313
+ }, this.yytext += o[0], this.match += o[0], this.matches = o, 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(o[0].length), this.matched += o[0], n = this.performAction.call(this, this.yy, this, c, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
314
+ return n;
315
+ if (this._backtrack) {
316
+ for (var i in E)
317
+ this[i] = E[i];
318
+ return !1;
319
+ }
320
+ return !1;
321
+ }, "test_match"),
322
+ // return next match in input
323
+ next: /* @__PURE__ */ u(function() {
324
+ if (this.done)
325
+ return this.EOF;
326
+ this._input || (this.done = !0);
327
+ var o, c, n, g;
328
+ this._more || (this.yytext = "", this.match = "");
329
+ for (var E = this._currentRules(), i = 0; i < E.length; i++)
330
+ if (n = this._input.match(this.rules[E[i]]), n && (!c || n[0].length > c[0].length)) {
331
+ if (c = n, g = i, this.options.backtrack_lexer) {
332
+ if (o = this.test_match(n, E[i]), o !== !1)
333
+ return o;
334
+ if (this._backtrack) {
335
+ c = !1;
336
+ continue;
337
+ } else
338
+ return !1;
339
+ } else if (!this.options.flex)
340
+ break;
341
+ }
342
+ return c ? (o = this.test_match(c, E[g]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
343
+ ` + this.showPosition(), {
344
+ text: "",
345
+ token: null,
346
+ line: this.yylineno
347
+ });
348
+ }, "next"),
349
+ // return next match that has a token
350
+ lex: /* @__PURE__ */ u(function() {
351
+ var c = this.next();
352
+ return c || this.lex();
353
+ }, "lex"),
354
+ // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
355
+ begin: /* @__PURE__ */ u(function(c) {
356
+ this.conditionStack.push(c);
357
+ }, "begin"),
358
+ // pop the previously active lexer condition state off the condition stack
359
+ popState: /* @__PURE__ */ u(function() {
360
+ var c = this.conditionStack.length - 1;
361
+ return c > 0 ? this.conditionStack.pop() : this.conditionStack[0];
362
+ }, "popState"),
363
+ // produce the lexer rule set which is active for the currently active lexer condition state
364
+ _currentRules: /* @__PURE__ */ u(function() {
365
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
366
+ }, "_currentRules"),
367
+ // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
368
+ topState: /* @__PURE__ */ u(function(c) {
369
+ return c = this.conditionStack.length - 1 - Math.abs(c || 0), c >= 0 ? this.conditionStack[c] : "INITIAL";
370
+ }, "topState"),
371
+ // alias for begin(condition)
372
+ pushState: /* @__PURE__ */ u(function(c) {
373
+ this.begin(c);
374
+ }, "pushState"),
375
+ // return the number of states currently on the stack
376
+ stateStackSize: /* @__PURE__ */ u(function() {
377
+ return this.conditionStack.length;
378
+ }, "stateStackSize"),
379
+ options: { "case-insensitive": !0 },
380
+ performAction: /* @__PURE__ */ u(function(c, n, g, E) {
381
+ switch (g) {
382
+ case 0:
383
+ return 38;
384
+ case 1:
385
+ return 40;
386
+ case 2:
387
+ return 39;
388
+ case 3:
389
+ return 44;
390
+ case 4:
391
+ return 51;
392
+ case 5:
393
+ return 52;
394
+ case 6:
395
+ return 53;
396
+ case 7:
397
+ return 54;
398
+ case 8:
399
+ break;
400
+ case 9:
401
+ break;
402
+ case 10:
403
+ return 5;
404
+ case 11:
405
+ break;
406
+ case 12:
407
+ break;
408
+ case 13:
409
+ break;
410
+ case 14:
411
+ break;
412
+ case 15:
413
+ return this.pushState("SCALE"), 17;
414
+ case 16:
415
+ return 18;
416
+ case 17:
417
+ this.popState();
418
+ break;
419
+ case 18:
420
+ return this.begin("acc_title"), 33;
421
+ case 19:
422
+ return this.popState(), "acc_title_value";
423
+ case 20:
424
+ return this.begin("acc_descr"), 35;
425
+ case 21:
426
+ return this.popState(), "acc_descr_value";
427
+ case 22:
428
+ this.begin("acc_descr_multiline");
429
+ break;
430
+ case 23:
431
+ this.popState();
432
+ break;
433
+ case 24:
434
+ return "acc_descr_multiline_value";
435
+ case 25:
436
+ return this.pushState("CLASSDEF"), 41;
437
+ case 26:
438
+ return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
439
+ case 27:
440
+ return this.popState(), this.pushState("CLASSDEFID"), 42;
441
+ case 28:
442
+ return this.popState(), 43;
443
+ case 29:
444
+ return this.pushState("CLASS"), 48;
445
+ case 30:
446
+ return this.popState(), this.pushState("CLASS_STYLE"), 49;
447
+ case 31:
448
+ return this.popState(), 50;
449
+ case 32:
450
+ return this.pushState("STYLE"), 45;
451
+ case 33:
452
+ return this.popState(), this.pushState("STYLEDEF_STYLES"), 46;
453
+ case 34:
454
+ return this.popState(), 47;
455
+ case 35:
456
+ return this.pushState("SCALE"), 17;
457
+ case 36:
458
+ return 18;
459
+ case 37:
460
+ this.popState();
461
+ break;
462
+ case 38:
463
+ this.pushState("STATE");
464
+ break;
465
+ case 39:
466
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 25;
467
+ case 40:
468
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 26;
469
+ case 41:
470
+ return this.popState(), n.yytext = n.yytext.slice(0, -10).trim(), 27;
471
+ case 42:
472
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 25;
473
+ case 43:
474
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 26;
475
+ case 44:
476
+ return this.popState(), n.yytext = n.yytext.slice(0, -10).trim(), 27;
477
+ case 45:
478
+ return 51;
479
+ case 46:
480
+ return 52;
481
+ case 47:
482
+ return 53;
483
+ case 48:
484
+ return 54;
485
+ case 49:
486
+ this.pushState("STATE_STRING");
487
+ break;
488
+ case 50:
489
+ return this.pushState("STATE_ID"), "AS";
490
+ case 51:
491
+ return this.popState(), "ID";
492
+ case 52:
493
+ this.popState();
494
+ break;
495
+ case 53:
496
+ return "STATE_DESCR";
497
+ case 54:
498
+ return 19;
499
+ case 55:
500
+ this.popState();
501
+ break;
502
+ case 56:
503
+ return this.popState(), this.pushState("struct"), 20;
504
+ case 57:
505
+ break;
506
+ case 58:
507
+ return this.popState(), 21;
508
+ case 59:
509
+ break;
510
+ case 60:
511
+ return this.begin("NOTE"), 29;
512
+ case 61:
513
+ return this.popState(), this.pushState("NOTE_ID"), 59;
514
+ case 62:
515
+ return this.popState(), this.pushState("NOTE_ID"), 60;
516
+ case 63:
517
+ this.popState(), this.pushState("FLOATING_NOTE");
518
+ break;
519
+ case 64:
520
+ return this.popState(), this.pushState("FLOATING_NOTE_ID"), "AS";
521
+ case 65:
522
+ break;
523
+ case 66:
524
+ return "NOTE_TEXT";
525
+ case 67:
526
+ return this.popState(), "ID";
527
+ case 68:
528
+ return this.popState(), this.pushState("NOTE_TEXT"), 24;
529
+ case 69:
530
+ return this.popState(), n.yytext = n.yytext.substr(2).trim(), 31;
531
+ case 70:
532
+ return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 31;
533
+ case 71:
534
+ return 6;
535
+ case 72:
536
+ return 6;
537
+ case 73:
538
+ return 16;
539
+ case 74:
540
+ return 57;
541
+ case 75:
542
+ return 24;
543
+ case 76:
544
+ return n.yytext = n.yytext.trim(), 14;
545
+ case 77:
546
+ return 15;
547
+ case 78:
548
+ return 28;
549
+ case 79:
550
+ return 58;
551
+ case 80:
552
+ return 5;
553
+ case 81:
554
+ return "INVALID";
555
+ }
556
+ }, "anonymous"),
557
+ rules: [/^(?:click\b)/i, /^(?:href\b)/i, /^(?:"[^"]*")/i, /^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:style\s+)/i, /^(?:[\w,]+\s+)/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<<fork>>)/i, /^(?:.*<<join>>)/i, /^(?:.*<<choice>>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i],
558
+ conditions: { LINE: { rules: [12, 13], inclusive: !1 }, struct: { rules: [12, 13, 25, 29, 32, 38, 45, 46, 47, 48, 57, 58, 59, 60, 74, 75, 76, 77, 78], inclusive: !1 }, FLOATING_NOTE_ID: { rules: [67], inclusive: !1 }, FLOATING_NOTE: { rules: [64, 65, 66], inclusive: !1 }, NOTE_TEXT: { rules: [69, 70], inclusive: !1 }, NOTE_ID: { rules: [68], inclusive: !1 }, NOTE: { rules: [61, 62, 63], inclusive: !1 }, STYLEDEF_STYLEOPTS: { rules: [], inclusive: !1 }, STYLEDEF_STYLES: { rules: [34], inclusive: !1 }, STYLE_IDS: { rules: [], inclusive: !1 }, STYLE: { rules: [33], inclusive: !1 }, CLASS_STYLE: { rules: [31], inclusive: !1 }, CLASS: { rules: [30], inclusive: !1 }, CLASSDEFID: { rules: [28], inclusive: !1 }, CLASSDEF: { rules: [26, 27], inclusive: !1 }, acc_descr_multiline: { rules: [23, 24], inclusive: !1 }, acc_descr: { rules: [21], inclusive: !1 }, acc_title: { rules: [19], inclusive: !1 }, SCALE: { rules: [16, 17, 36, 37], inclusive: !1 }, ALIAS: { rules: [], inclusive: !1 }, STATE_ID: { rules: [51], inclusive: !1 }, STATE_STRING: { rules: [52, 53], inclusive: !1 }, FORK_STATE: { rules: [], inclusive: !1 }, STATE: { rules: [12, 13, 39, 40, 41, 42, 43, 44, 49, 50, 54, 55, 56], inclusive: !1 }, ID: { rules: [12, 13], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 18, 20, 22, 25, 29, 32, 35, 38, 56, 60, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81], inclusive: !0 } }
559
+ };
560
+ return Y;
561
+ })();
562
+ gt.lexer = qt;
563
+ function ht() {
564
+ this.yy = {};
565
+ }
566
+ return u(ht, "Parser"), ht.prototype = gt, gt.Parser = ht, new ht();
567
+ })();
568
+ vt.parser = vt;
569
+ var Be = vt, de = "TB", Yt = "TB", Ot = "dir", X = "state", K = "root", Ct = "relation", fe = "classDef", pe = "style", Se = "applyClass", tt = "default", Gt = "divider", Bt = "fill:none", Vt = "fill: #333", Mt = "c", Ut = "text", jt = "normal", Dt = "rect", kt = "rectWithTitle", ye = "stateStart", ge = "stateEnd", Rt = "divider", Nt = "roundedWithTitle", Te = "note", Ee = "noteGroup", et = "statediagram", _e = "state", me = `${et}-${_e}`, Ht = "transition", be = "note", De = "note-edge", ke = `${Ht} ${De}`, ve = `${et}-${be}`, Ce = "cluster", Ae = `${et}-${Ce}`, xe = "cluster-alt", Le = `${et}-${xe}`, Wt = "parent", zt = "note", Ie = "state", At = "----", Oe = `${At}${zt}`, wt = `${At}${Wt}`, Kt = /* @__PURE__ */ u((t, e = Yt) => {
570
+ if (!t.doc)
571
+ return e;
572
+ let s = e;
573
+ for (const a of t.doc)
574
+ a.stmt === "dir" && (s = a.value);
575
+ return s;
576
+ }, "getDir"), Re = /* @__PURE__ */ u(function(t, e) {
577
+ return e.db.getClasses();
578
+ }, "getClasses"), Ne = /* @__PURE__ */ u(async function(t, e, s, a) {
579
+ b.info("REF0:"), b.info("Drawing state diagram (v2)", e);
580
+ const { securityLevel: r, state: h, layout: d } = w();
581
+ a.db.extract(a.db.getRootDocV2());
582
+ const S = a.db.getData(), f = te(e, r);
583
+ S.type = a.type, S.layoutAlgorithm = d, S.nodeSpacing = h?.nodeSpacing || 50, S.rankSpacing = h?.rankSpacing || 50, S.markers = ["barb"], S.diagramId = e, await se(S, f);
584
+ const T = 8;
585
+ try {
586
+ (typeof a.db.getLinks == "function" ? a.db.getLinks() : /* @__PURE__ */ new Map()).forEach((m, A) => {
587
+ const v = typeof A == "string" ? A : typeof A?.id == "string" ? A.id : "";
588
+ if (!v) {
589
+ b.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(A));
590
+ return;
591
+ }
592
+ const p = f.node()?.querySelectorAll("g");
593
+ let k;
594
+ if (p?.forEach((I) => {
595
+ I.textContent?.trim() === v && (k = I);
596
+ }), !k) {
597
+ b.warn("⚠️ Could not find node matching text:", v);
598
+ return;
599
+ }
600
+ const R = k.parentNode;
601
+ if (!R) {
602
+ b.warn("⚠️ Node has no parent, cannot wrap:", v);
603
+ return;
604
+ }
605
+ const L = document.createElementNS("http://www.w3.org/2000/svg", "a"), $ = m.url.replace(/^"+|"+$/g, "");
606
+ if (L.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", $), L.setAttribute("target", "_blank"), m.tooltip) {
607
+ const I = m.tooltip.replace(/^"+|"+$/g, "");
608
+ L.setAttribute("title", I);
609
+ }
610
+ R.replaceChild(L, k), L.appendChild(k), b.info("🔗 Wrapped node in <a> tag for:", v, m.url);
611
+ });
612
+ } catch (_) {
613
+ b.error("❌ Error injecting clickable links:", _);
614
+ }
615
+ ie.insertTitle(
616
+ f,
617
+ "statediagramTitleText",
618
+ h?.titleTopMargin ?? 25,
619
+ a.db.getDiagramTitle()
620
+ ), ee(f, T, et, h?.useMaxWidth ?? !0);
621
+ }, "draw"), Ve = {
622
+ getClasses: Re,
623
+ draw: Ne,
624
+ getDir: Kt
625
+ }, St = /* @__PURE__ */ new Map(), G = 0;
626
+ function yt(t = "", e = 0, s = "", a = At) {
627
+ const r = s !== null && s.length > 0 ? `${a}${s}` : "";
628
+ return `${Ie}-${t}${r}-${e}`;
629
+ }
630
+ u(yt, "stateDomId");
631
+ var we = /* @__PURE__ */ u((t, e, s, a, r, h, d, S) => {
632
+ b.trace("items", e), e.forEach((f) => {
633
+ switch (f.stmt) {
634
+ case X:
635
+ Z(t, f, s, a, r, h, d, S);
636
+ break;
637
+ case tt:
638
+ Z(t, f, s, a, r, h, d, S);
639
+ break;
640
+ case Ct:
641
+ {
642
+ Z(
643
+ t,
644
+ f.state1,
645
+ s,
646
+ a,
647
+ r,
648
+ h,
649
+ d,
650
+ S
651
+ ), Z(
652
+ t,
653
+ f.state2,
654
+ s,
655
+ a,
656
+ r,
657
+ h,
658
+ d,
659
+ S
660
+ );
661
+ const T = {
662
+ id: "edge" + G,
663
+ start: f.state1.id,
664
+ end: f.state2.id,
665
+ arrowhead: "normal",
666
+ arrowTypeEnd: "arrow_barb",
667
+ style: Bt,
668
+ labelStyle: "",
669
+ label: U.sanitizeText(f.description ?? "", w()),
670
+ arrowheadStyle: Vt,
671
+ labelpos: Mt,
672
+ labelType: Ut,
673
+ thickness: jt,
674
+ classes: Ht,
675
+ look: d
676
+ };
677
+ r.push(T), G++;
678
+ }
679
+ break;
680
+ }
681
+ });
682
+ }, "setupDoc"), $t = /* @__PURE__ */ u((t, e = Yt) => {
683
+ let s = e;
684
+ if (t.doc)
685
+ for (const a of t.doc)
686
+ a.stmt === "dir" && (s = a.value);
687
+ return s;
688
+ }, "getDir");
689
+ function Q(t, e, s) {
690
+ if (!e.id || e.id === "</join></fork>" || e.id === "</choice>")
691
+ return;
692
+ e.cssClasses && (Array.isArray(e.cssCompiledStyles) || (e.cssCompiledStyles = []), e.cssClasses.split(" ").forEach((r) => {
693
+ const h = s.get(r);
694
+ h && (e.cssCompiledStyles = [...e.cssCompiledStyles ?? [], ...h.styles]);
695
+ }));
696
+ const a = t.find((r) => r.id === e.id);
697
+ a ? Object.assign(a, e) : t.push(e);
698
+ }
699
+ u(Q, "insertOrUpdateNode");
700
+ function Xt(t) {
701
+ return t?.classes?.join(" ") ?? "";
702
+ }
703
+ u(Xt, "getClassesFromDbInfo");
704
+ function Jt(t) {
705
+ return t?.styles ?? [];
706
+ }
707
+ u(Jt, "getStylesFromDbInfo");
708
+ var Z = /* @__PURE__ */ u((t, e, s, a, r, h, d, S) => {
709
+ const f = e.id, T = s.get(f), _ = Xt(T), m = Jt(T), A = w();
710
+ if (b.info("dataFetcher parsedItem", e, T, m), f !== "root") {
711
+ let v = Dt;
712
+ e.start === !0 ? v = ye : e.start === !1 && (v = ge), e.type !== tt && (v = e.type), St.get(f) || St.set(f, {
713
+ id: f,
714
+ shape: v,
715
+ description: U.sanitizeText(f, A),
716
+ cssClasses: `${_} ${me}`,
717
+ cssStyles: m
718
+ });
719
+ const p = St.get(f);
720
+ e.description && (Array.isArray(p.description) ? (p.shape = kt, p.description.push(e.description)) : p.description?.length && p.description.length > 0 ? (p.shape = kt, p.description === f ? p.description = [e.description] : p.description = [p.description, e.description]) : (p.shape = Dt, p.description = e.description), p.description = U.sanitizeTextOrArray(p.description, A)), p.description?.length === 1 && p.shape === kt && (p.type === "group" ? p.shape = Nt : p.shape = Dt), !p.type && e.doc && (b.info("Setting cluster for XCX", f, $t(e)), p.type = "group", p.isGroup = !0, p.dir = $t(e), p.shape = e.type === Gt ? Rt : Nt, p.cssClasses = `${p.cssClasses} ${Ae} ${h ? Le : ""}`);
721
+ const k = {
722
+ labelStyle: "",
723
+ shape: p.shape,
724
+ label: p.description,
725
+ cssClasses: p.cssClasses,
726
+ cssCompiledStyles: [],
727
+ cssStyles: p.cssStyles,
728
+ id: f,
729
+ dir: p.dir,
730
+ domId: yt(f, G),
731
+ type: p.type,
732
+ isGroup: p.type === "group",
733
+ padding: 8,
734
+ rx: 10,
735
+ ry: 10,
736
+ look: d
737
+ };
738
+ if (k.shape === Rt && (k.label = ""), t && t.id !== "root" && (b.trace("Setting node ", f, " to be child of its parent ", t.id), k.parentId = t.id), k.centerLabel = !0, e.note) {
739
+ const R = {
740
+ labelStyle: "",
741
+ shape: Te,
742
+ label: e.note.text,
743
+ cssClasses: ve,
744
+ // useHtmlLabels: false,
745
+ cssStyles: [],
746
+ cssCompiledStyles: [],
747
+ id: f + Oe + "-" + G,
748
+ domId: yt(f, G, zt),
749
+ type: p.type,
750
+ isGroup: p.type === "group",
751
+ padding: A.flowchart?.padding,
752
+ look: d,
753
+ position: e.note.position
754
+ }, L = f + wt, $ = {
755
+ labelStyle: "",
756
+ shape: Ee,
757
+ label: e.note.text,
758
+ cssClasses: p.cssClasses,
759
+ cssStyles: [],
760
+ id: f + wt,
761
+ domId: yt(f, G, Wt),
762
+ type: "group",
763
+ isGroup: !0,
764
+ padding: 16,
765
+ //getConfig().flowchart.padding
766
+ look: d,
767
+ position: e.note.position
768
+ };
769
+ G++, $.id = L, R.parentId = L, Q(a, $, S), Q(a, R, S), Q(a, k, S);
770
+ let I = f, P = R.id;
771
+ e.note.position === "left of" && (I = R.id, P = f), r.push({
772
+ id: I + "-" + P,
773
+ start: I,
774
+ end: P,
775
+ arrowhead: "none",
776
+ arrowTypeEnd: "",
777
+ style: Bt,
778
+ labelStyle: "",
779
+ classes: ke,
780
+ arrowheadStyle: Vt,
781
+ labelpos: Mt,
782
+ labelType: Ut,
783
+ thickness: jt,
784
+ look: d
785
+ });
786
+ } else
787
+ Q(a, k, S);
788
+ }
789
+ e.doc && (b.trace("Adding nodes children "), we(e, e.doc, s, a, r, !h, d, S));
790
+ }, "dataFetcher"), $e = /* @__PURE__ */ u(() => {
791
+ St.clear(), G = 0;
792
+ }, "reset"), C = {
793
+ START_NODE: "[*]",
794
+ START_TYPE: "start",
795
+ END_NODE: "[*]",
796
+ END_TYPE: "end",
797
+ COLOR_KEYWORD: "color",
798
+ FILL_KEYWORD: "fill",
799
+ BG_FILL: "bgFill",
800
+ STYLECLASS_SEP: ","
801
+ }, Pt = /* @__PURE__ */ u(() => /* @__PURE__ */ new Map(), "newClassesList"), Ft = /* @__PURE__ */ u(() => ({
802
+ relations: [],
803
+ states: /* @__PURE__ */ new Map(),
804
+ documents: {}
805
+ }), "newDoc"), pt = /* @__PURE__ */ u((t) => JSON.parse(JSON.stringify(t)), "clone"), j, Me = (j = class {
806
+ constructor(e) {
807
+ this.version = e, this.nodes = [], this.edges = [], this.rootDoc = [], this.classes = Pt(), this.documents = { root: Ft() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.dividerCnt = 0, this.links = /* @__PURE__ */ new Map(), this.getAccTitle = re, this.setAccTitle = ae, this.getAccDescription = ne, this.setAccDescription = oe, this.setDiagramTitle = le, this.getDiagramTitle = ce, 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);
808
+ }
809
+ /**
810
+ * Convert all of the statements (stmts) that were parsed into states and relationships.
811
+ * This is done because a state diagram may have nested sections,
812
+ * where each section is a 'document' and has its own set of statements.
813
+ * Ex: the section within a fork has its own statements, and incoming and outgoing statements
814
+ * refer to the fork as a whole (document).
815
+ * See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement.
816
+ * This will push the statement into the list of statements for the current document.
817
+ */
818
+ extract(e) {
819
+ this.clear(!0);
820
+ for (const r of Array.isArray(e) ? e : e.doc)
821
+ switch (r.stmt) {
822
+ case X:
823
+ this.addState(r.id.trim(), r.type, r.doc, r.description, r.note);
824
+ break;
825
+ case Ct:
826
+ this.addRelation(r.state1, r.state2, r.description);
827
+ break;
828
+ case fe:
829
+ this.addStyleClass(r.id.trim(), r.classes);
830
+ break;
831
+ case pe:
832
+ this.handleStyleDef(r);
833
+ break;
834
+ case Se:
835
+ this.setCssClass(r.id.trim(), r.styleClass);
836
+ break;
837
+ case "click":
838
+ this.addLink(r.id, r.url, r.tooltip);
839
+ break;
840
+ }
841
+ const s = this.getStates(), a = w();
842
+ $e(), Z(
843
+ void 0,
844
+ this.getRootDocV2(),
845
+ s,
846
+ this.nodes,
847
+ this.edges,
848
+ !0,
849
+ a.look,
850
+ this.classes
851
+ );
852
+ for (const r of this.nodes)
853
+ if (Array.isArray(r.label)) {
854
+ if (r.description = r.label.slice(1), r.isGroup && r.description.length > 0)
855
+ throw new Error(
856
+ `Group nodes can only have label. Remove the additional description for node [${r.id}]`
857
+ );
858
+ r.label = r.label[0];
859
+ }
860
+ }
861
+ handleStyleDef(e) {
862
+ const s = e.id.trim().split(","), a = e.styleClass.split(",");
863
+ for (const r of s) {
864
+ let h = this.getState(r);
865
+ if (!h) {
866
+ const d = r.trim();
867
+ this.addState(d), h = this.getState(d);
868
+ }
869
+ h && (h.styles = a.map((d) => d.replace(/;/g, "")?.trim()));
870
+ }
871
+ }
872
+ setRootDoc(e) {
873
+ b.info("Setting root doc", e), this.rootDoc = e, this.version === 1 ? this.extract(e) : this.extract(this.getRootDocV2());
874
+ }
875
+ docTranslator(e, s, a) {
876
+ if (s.stmt === Ct) {
877
+ this.docTranslator(e, s.state1, !0), this.docTranslator(e, s.state2, !1);
878
+ return;
879
+ }
880
+ if (s.stmt === X && (s.id === C.START_NODE ? (s.id = e.id + (a ? "_start" : "_end"), s.start = a) : s.id = s.id.trim()), s.stmt !== K && s.stmt !== X || !s.doc)
881
+ return;
882
+ const r = [];
883
+ let h = [];
884
+ for (const d of s.doc)
885
+ if (d.type === Gt) {
886
+ const S = pt(d);
887
+ S.doc = pt(h), r.push(S), h = [];
888
+ } else
889
+ h.push(d);
890
+ if (r.length > 0 && h.length > 0) {
891
+ const d = {
892
+ stmt: X,
893
+ id: he(),
894
+ type: "divider",
895
+ doc: pt(h)
896
+ };
897
+ r.push(pt(d)), s.doc = r;
898
+ }
899
+ s.doc.forEach((d) => this.docTranslator(s, d, !0));
900
+ }
901
+ getRootDocV2() {
902
+ return this.docTranslator(
903
+ { id: K, stmt: K },
904
+ { id: K, stmt: K, doc: this.rootDoc },
905
+ !0
906
+ ), { id: K, doc: this.rootDoc };
907
+ }
908
+ /**
909
+ * Function called by parser when a node definition has been found.
910
+ *
911
+ * @param descr - description for the state. Can be a string or a list or strings
912
+ * @param classes - class styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 class, convert it to an array of that 1 class.
913
+ * @param styles - styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 style, convert it to an array of that 1 style.
914
+ * @param textStyles - text styles to apply to this state. Can be a string (1 text test) or an array of text styles. If it's just 1 text style, convert it to an array of that 1 text style.
915
+ */
916
+ addState(e, s = tt, a = void 0, r = void 0, h = void 0, d = void 0, S = void 0, f = void 0) {
917
+ const T = e?.trim();
918
+ if (!this.currentDocument.states.has(T))
919
+ b.info("Adding state ", T, r), this.currentDocument.states.set(T, {
920
+ stmt: X,
921
+ id: T,
922
+ descriptions: [],
923
+ type: s,
924
+ doc: a,
925
+ note: h,
926
+ classes: [],
927
+ styles: [],
928
+ textStyles: []
929
+ });
930
+ else {
931
+ const _ = this.currentDocument.states.get(T);
932
+ if (!_)
933
+ throw new Error(`State not found: ${T}`);
934
+ _.doc || (_.doc = a), _.type || (_.type = s);
935
+ }
936
+ if (r && (b.info("Setting state description", T, r), (Array.isArray(r) ? r : [r]).forEach((m) => this.addDescription(T, m.trim()))), h) {
937
+ const _ = this.currentDocument.states.get(T);
938
+ if (!_)
939
+ throw new Error(`State not found: ${T}`);
940
+ _.note = h, _.note.text = U.sanitizeText(_.note.text, w());
941
+ }
942
+ d && (b.info("Setting state classes", T, d), (Array.isArray(d) ? d : [d]).forEach((m) => this.setCssClass(T, m.trim()))), S && (b.info("Setting state styles", T, S), (Array.isArray(S) ? S : [S]).forEach((m) => this.setStyle(T, m.trim()))), f && (b.info("Setting state styles", T, S), (Array.isArray(f) ? f : [f]).forEach((m) => this.setTextStyle(T, m.trim())));
943
+ }
944
+ clear(e) {
945
+ this.nodes = [], this.edges = [], this.documents = { root: Ft() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes = Pt(), e || (this.links = /* @__PURE__ */ new Map(), ue());
946
+ }
947
+ getState(e) {
948
+ return this.currentDocument.states.get(e);
949
+ }
950
+ getStates() {
951
+ return this.currentDocument.states;
952
+ }
953
+ logDocuments() {
954
+ b.info("Documents = ", this.documents);
955
+ }
956
+ getRelations() {
957
+ return this.currentDocument.relations;
958
+ }
959
+ /**
960
+ * Adds a clickable link to a state.
961
+ */
962
+ addLink(e, s, a) {
963
+ this.links.set(e, { url: s, tooltip: a }), b.warn("Adding link", e, s, a);
964
+ }
965
+ /**
966
+ * Get all registered links.
967
+ */
968
+ getLinks() {
969
+ return this.links;
970
+ }
971
+ /**
972
+ * If the id is a start node ( [*] ), then return a new id constructed from
973
+ * the start node name and the current start node count.
974
+ * else return the given id
975
+ */
976
+ startIdIfNeeded(e = "") {
977
+ return e === C.START_NODE ? (this.startEndCount++, `${C.START_TYPE}${this.startEndCount}`) : e;
978
+ }
979
+ /**
980
+ * If the id is a start node ( [*] ), then return the start type ('start')
981
+ * else return the given type
982
+ */
983
+ startTypeIfNeeded(e = "", s = tt) {
984
+ return e === C.START_NODE ? C.START_TYPE : s;
985
+ }
986
+ /**
987
+ * If the id is an end node ( [*] ), then return a new id constructed from
988
+ * the end node name and the current start_end node count.
989
+ * else return the given id
990
+ */
991
+ endIdIfNeeded(e = "") {
992
+ return e === C.END_NODE ? (this.startEndCount++, `${C.END_TYPE}${this.startEndCount}`) : e;
993
+ }
994
+ /**
995
+ * If the id is an end node ( [*] ), then return the end type
996
+ * else return the given type
997
+ *
998
+ */
999
+ endTypeIfNeeded(e = "", s = tt) {
1000
+ return e === C.END_NODE ? C.END_TYPE : s;
1001
+ }
1002
+ addRelationObjs(e, s, a = "") {
1003
+ const r = this.startIdIfNeeded(e.id.trim()), h = this.startTypeIfNeeded(e.id.trim(), e.type), d = this.startIdIfNeeded(s.id.trim()), S = this.startTypeIfNeeded(s.id.trim(), s.type);
1004
+ this.addState(
1005
+ r,
1006
+ h,
1007
+ e.doc,
1008
+ e.description,
1009
+ e.note,
1010
+ e.classes,
1011
+ e.styles,
1012
+ e.textStyles
1013
+ ), this.addState(
1014
+ d,
1015
+ S,
1016
+ s.doc,
1017
+ s.description,
1018
+ s.note,
1019
+ s.classes,
1020
+ s.styles,
1021
+ s.textStyles
1022
+ ), this.currentDocument.relations.push({
1023
+ id1: r,
1024
+ id2: d,
1025
+ relationTitle: U.sanitizeText(a, w())
1026
+ });
1027
+ }
1028
+ /**
1029
+ * Add a relation between two items. The items may be full objects or just the string id of a state.
1030
+ */
1031
+ addRelation(e, s, a) {
1032
+ if (typeof e == "object" && typeof s == "object")
1033
+ this.addRelationObjs(e, s, a);
1034
+ else if (typeof e == "string" && typeof s == "string") {
1035
+ const r = this.startIdIfNeeded(e.trim()), h = this.startTypeIfNeeded(e), d = this.endIdIfNeeded(s.trim()), S = this.endTypeIfNeeded(s);
1036
+ this.addState(r, h), this.addState(d, S), this.currentDocument.relations.push({
1037
+ id1: r,
1038
+ id2: d,
1039
+ relationTitle: a ? U.sanitizeText(a, w()) : void 0
1040
+ });
1041
+ }
1042
+ }
1043
+ addDescription(e, s) {
1044
+ const a = this.currentDocument.states.get(e), r = s.startsWith(":") ? s.replace(":", "").trim() : s;
1045
+ a?.descriptions?.push(U.sanitizeText(r, w()));
1046
+ }
1047
+ cleanupLabel(e) {
1048
+ return e.startsWith(":") ? e.slice(2).trim() : e.trim();
1049
+ }
1050
+ getDividerId() {
1051
+ return this.dividerCnt++, `divider-id-${this.dividerCnt}`;
1052
+ }
1053
+ /**
1054
+ * Called when the parser comes across a (style) class definition
1055
+ * @example classDef my-style fill:#f96;
1056
+ *
1057
+ * @param id - the id of this (style) class
1058
+ * @param styleAttributes - the string with 1 or more style attributes (each separated by a comma)
1059
+ */
1060
+ addStyleClass(e, s = "") {
1061
+ this.classes.has(e) || this.classes.set(e, { id: e, styles: [], textStyles: [] });
1062
+ const a = this.classes.get(e);
1063
+ s && a && s.split(C.STYLECLASS_SEP).forEach((r) => {
1064
+ const h = r.replace(/([^;]*);/, "$1").trim();
1065
+ if (RegExp(C.COLOR_KEYWORD).exec(r)) {
1066
+ const S = h.replace(C.FILL_KEYWORD, C.BG_FILL).replace(C.COLOR_KEYWORD, C.FILL_KEYWORD);
1067
+ a.textStyles.push(S);
1068
+ }
1069
+ a.styles.push(h);
1070
+ });
1071
+ }
1072
+ getClasses() {
1073
+ return this.classes;
1074
+ }
1075
+ /**
1076
+ * Add a (style) class or css class to a state with the given id.
1077
+ * If the state isn't already in the list of known states, add it.
1078
+ * Might be called by parser when a style class or CSS class should be applied to a state
1079
+ *
1080
+ * @param itemIds - The id or a list of ids of the item(s) to apply the css class to
1081
+ * @param cssClassName - CSS class name
1082
+ */
1083
+ setCssClass(e, s) {
1084
+ e.split(",").forEach((a) => {
1085
+ let r = this.getState(a);
1086
+ if (!r) {
1087
+ const h = a.trim();
1088
+ this.addState(h), r = this.getState(h);
1089
+ }
1090
+ r?.classes?.push(s);
1091
+ });
1092
+ }
1093
+ /**
1094
+ * Add a style to a state with the given id.
1095
+ * @example style stateId fill:#f9f,stroke:#333,stroke-width:4px
1096
+ * where 'style' is the keyword
1097
+ * stateId is the id of a state
1098
+ * the rest of the string is the styleText (all of the attributes to be applied to the state)
1099
+ *
1100
+ * @param itemId - The id of item to apply the style to
1101
+ * @param styleText - the text of the attributes for the style
1102
+ */
1103
+ setStyle(e, s) {
1104
+ this.getState(e)?.styles?.push(s);
1105
+ }
1106
+ /**
1107
+ * Add a text style to a state with the given id
1108
+ *
1109
+ * @param itemId - The id of item to apply the css class to
1110
+ * @param cssClassName - CSS class name
1111
+ */
1112
+ setTextStyle(e, s) {
1113
+ this.getState(e)?.textStyles?.push(s);
1114
+ }
1115
+ /**
1116
+ * Finds the direction statement in the root document.
1117
+ * @returns the direction statement if present
1118
+ */
1119
+ getDirectionStatement() {
1120
+ return this.rootDoc.find((e) => e.stmt === Ot);
1121
+ }
1122
+ getDirection() {
1123
+ return this.getDirectionStatement()?.value ?? de;
1124
+ }
1125
+ setDirection(e) {
1126
+ const s = this.getDirectionStatement();
1127
+ s ? s.value = e : this.rootDoc.unshift({ stmt: Ot, value: e });
1128
+ }
1129
+ trimColon(e) {
1130
+ return e.startsWith(":") ? e.slice(1).trim() : e.trim();
1131
+ }
1132
+ getData() {
1133
+ const e = w();
1134
+ return {
1135
+ nodes: this.nodes,
1136
+ edges: this.edges,
1137
+ other: {},
1138
+ config: e,
1139
+ direction: Kt(this.getRootDocV2())
1140
+ };
1141
+ }
1142
+ getConfig() {
1143
+ return w().state;
1144
+ }
1145
+ }, u(j, "StateDB"), j.relationType = {
1146
+ AGGREGATION: 0,
1147
+ EXTENSION: 1,
1148
+ COMPOSITION: 2,
1149
+ DEPENDENCY: 3
1150
+ }, j), Pe = /* @__PURE__ */ u((t) => `
1151
+ defs #statediagram-barbEnd {
1152
+ fill: ${t.transitionColor};
1153
+ stroke: ${t.transitionColor};
1154
+ }
1155
+ g.stateGroup text {
1156
+ fill: ${t.nodeBorder};
1157
+ stroke: none;
1158
+ font-size: 10px;
1159
+ }
1160
+ g.stateGroup text {
1161
+ fill: ${t.textColor};
1162
+ stroke: none;
1163
+ font-size: 10px;
1164
+
1165
+ }
1166
+ g.stateGroup .state-title {
1167
+ font-weight: bolder;
1168
+ fill: ${t.stateLabelColor};
1169
+ }
1170
+
1171
+ g.stateGroup rect {
1172
+ fill: ${t.mainBkg};
1173
+ stroke: ${t.nodeBorder};
1174
+ }
1175
+
1176
+ g.stateGroup line {
1177
+ stroke: ${t.lineColor};
1178
+ stroke-width: 1;
1179
+ }
1180
+
1181
+ .transition {
1182
+ stroke: ${t.transitionColor};
1183
+ stroke-width: 1;
1184
+ fill: none;
1185
+ }
1186
+
1187
+ .stateGroup .composit {
1188
+ fill: ${t.background};
1189
+ border-bottom: 1px
1190
+ }
1191
+
1192
+ .stateGroup .alt-composit {
1193
+ fill: #e0e0e0;
1194
+ border-bottom: 1px
1195
+ }
1196
+
1197
+ .state-note {
1198
+ stroke: ${t.noteBorderColor};
1199
+ fill: ${t.noteBkgColor};
1200
+
1201
+ text {
1202
+ fill: ${t.noteTextColor};
1203
+ stroke: none;
1204
+ font-size: 10px;
1205
+ }
1206
+ }
1207
+
1208
+ .stateLabel .box {
1209
+ stroke: none;
1210
+ stroke-width: 0;
1211
+ fill: ${t.mainBkg};
1212
+ opacity: 0.5;
1213
+ }
1214
+
1215
+ .edgeLabel .label rect {
1216
+ fill: ${t.labelBackgroundColor};
1217
+ opacity: 0.5;
1218
+ }
1219
+ .edgeLabel {
1220
+ background-color: ${t.edgeLabelBackground};
1221
+ p {
1222
+ background-color: ${t.edgeLabelBackground};
1223
+ }
1224
+ rect {
1225
+ opacity: 0.5;
1226
+ background-color: ${t.edgeLabelBackground};
1227
+ fill: ${t.edgeLabelBackground};
1228
+ }
1229
+ text-align: center;
1230
+ }
1231
+ .edgeLabel .label text {
1232
+ fill: ${t.transitionLabelColor || t.tertiaryTextColor};
1233
+ }
1234
+ .label div .edgeLabel {
1235
+ color: ${t.transitionLabelColor || t.tertiaryTextColor};
1236
+ }
1237
+
1238
+ .stateLabel text {
1239
+ fill: ${t.stateLabelColor};
1240
+ font-size: 10px;
1241
+ font-weight: bold;
1242
+ }
1243
+
1244
+ .node circle.state-start {
1245
+ fill: ${t.specialStateColor};
1246
+ stroke: ${t.specialStateColor};
1247
+ }
1248
+
1249
+ .node .fork-join {
1250
+ fill: ${t.specialStateColor};
1251
+ stroke: ${t.specialStateColor};
1252
+ }
1253
+
1254
+ .node circle.state-end {
1255
+ fill: ${t.innerEndBackground};
1256
+ stroke: ${t.background};
1257
+ stroke-width: 1.5
1258
+ }
1259
+ .end-state-inner {
1260
+ fill: ${t.compositeBackground || t.background};
1261
+ // stroke: ${t.background};
1262
+ stroke-width: 1.5
1263
+ }
1264
+
1265
+ .node rect {
1266
+ fill: ${t.stateBkg || t.mainBkg};
1267
+ stroke: ${t.stateBorder || t.nodeBorder};
1268
+ stroke-width: 1px;
1269
+ }
1270
+ .node polygon {
1271
+ fill: ${t.mainBkg};
1272
+ stroke: ${t.stateBorder || t.nodeBorder};;
1273
+ stroke-width: 1px;
1274
+ }
1275
+ #statediagram-barbEnd {
1276
+ fill: ${t.lineColor};
1277
+ }
1278
+
1279
+ .statediagram-cluster rect {
1280
+ fill: ${t.compositeTitleBackground};
1281
+ stroke: ${t.stateBorder || t.nodeBorder};
1282
+ stroke-width: 1px;
1283
+ }
1284
+
1285
+ .cluster-label, .nodeLabel {
1286
+ color: ${t.stateLabelColor};
1287
+ // line-height: 1;
1288
+ }
1289
+
1290
+ .statediagram-cluster rect.outer {
1291
+ rx: 5px;
1292
+ ry: 5px;
1293
+ }
1294
+ .statediagram-state .divider {
1295
+ stroke: ${t.stateBorder || t.nodeBorder};
1296
+ }
1297
+
1298
+ .statediagram-state .title-state {
1299
+ rx: 5px;
1300
+ ry: 5px;
1301
+ }
1302
+ .statediagram-cluster.statediagram-cluster .inner {
1303
+ fill: ${t.compositeBackground || t.background};
1304
+ }
1305
+ .statediagram-cluster.statediagram-cluster-alt .inner {
1306
+ fill: ${t.altBackground ? t.altBackground : "#efefef"};
1307
+ }
1308
+
1309
+ .statediagram-cluster .inner {
1310
+ rx:0;
1311
+ ry:0;
1312
+ }
1313
+
1314
+ .statediagram-state rect.basic {
1315
+ rx: 5px;
1316
+ ry: 5px;
1317
+ }
1318
+ .statediagram-state rect.divider {
1319
+ stroke-dasharray: 10,10;
1320
+ fill: ${t.altBackground ? t.altBackground : "#efefef"};
1321
+ }
1322
+
1323
+ .note-edge {
1324
+ stroke-dasharray: 5;
1325
+ }
1326
+
1327
+ .statediagram-note rect {
1328
+ fill: ${t.noteBkgColor};
1329
+ stroke: ${t.noteBorderColor};
1330
+ stroke-width: 1px;
1331
+ rx: 0;
1332
+ ry: 0;
1333
+ }
1334
+ .statediagram-note rect {
1335
+ fill: ${t.noteBkgColor};
1336
+ stroke: ${t.noteBorderColor};
1337
+ stroke-width: 1px;
1338
+ rx: 0;
1339
+ ry: 0;
1340
+ }
1341
+
1342
+ .statediagram-note text {
1343
+ fill: ${t.noteTextColor};
1344
+ }
1345
+
1346
+ .statediagram-note .nodeLabel {
1347
+ color: ${t.noteTextColor};
1348
+ }
1349
+ .statediagram .edgeLabel {
1350
+ color: red; // ${t.noteTextColor};
1351
+ }
1352
+
1353
+ #dependencyStart, #dependencyEnd {
1354
+ fill: ${t.lineColor};
1355
+ stroke: ${t.lineColor};
1356
+ stroke-width: 1;
1357
+ }
1358
+
1359
+ .statediagramTitleText {
1360
+ text-anchor: middle;
1361
+ font-size: 18px;
1362
+ fill: ${t.textColor};
1363
+ }
1364
+ `, "getStyles"), Ue = Pe;
1365
+ export {
1366
+ Me as S,
1367
+ Be as a,
1368
+ Ve as b,
1369
+ Ue as s
1370
+ };