@taskmark/ui 0.2.6 → 0.3.1

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 (320) hide show
  1. package/README.md +16 -1
  2. package/app/board/page.tsx +3 -272
  3. package/app/globals.css +25 -0
  4. package/app/layout.tsx +15 -5
  5. package/app/page.tsx +14 -14
  6. package/app/setup/actions.ts +4 -4
  7. package/app/setup/page.tsx +9 -4
  8. package/bin/lib/resolve-board.mjs +1 -4
  9. package/bin/taskmark.js +15 -2
  10. package/components/board/app-bar.tsx +3 -0
  11. package/components/board/board-screen.tsx +229 -0
  12. package/components/board/changelog-panel.tsx +26 -0
  13. package/components/board/epic-list.tsx +4 -2
  14. package/components/board/list-view-switcher.tsx +7 -3
  15. package/components/board/markdown-content.tsx +21 -1
  16. package/components/board/mermaid-diagram.tsx +88 -0
  17. package/components/board/metric-stat-card.tsx +4 -4
  18. package/components/board/overall-tree-list.tsx +467 -0
  19. package/components/board/overall-work-items-list.tsx +6 -2
  20. package/components/board/points-heatmap.tsx +183 -0
  21. package/components/board/project-status-metrics-strip.tsx +5 -22
  22. package/components/board/static-board-app.tsx +29 -94
  23. package/components/board/status-badge.tsx +8 -0
  24. package/components/board/story-list.tsx +3 -1
  25. package/components/board/task-list.tsx +5 -1
  26. package/components/board/work-item-detail-body.tsx +123 -8
  27. package/components/board/work-items-list.tsx +2 -0
  28. package/components/theme-provider.tsx +39 -0
  29. package/components/theme-toggle.tsx +27 -0
  30. package/components/ui/sonner.tsx +2 -2
  31. package/dist/prod-next/BUILD_ID +1 -1
  32. package/dist/prod-next/app-path-routes-manifest.json +2 -2
  33. package/dist/prod-next/build-manifest.json +6 -6
  34. package/dist/prod-next/prerender-manifest.json +3 -27
  35. package/dist/prod-next/react-loadable-manifest.json +392 -2
  36. package/dist/prod-next/server/app/_global-error/page.js +2 -2
  37. package/dist/prod-next/server/app/_global-error/page.js.nft.json +1 -1
  38. package/dist/prod-next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  39. package/dist/prod-next/server/app/_global-error.html +1 -1
  40. package/dist/prod-next/server/app/_global-error.rsc +1 -1
  41. package/dist/prod-next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  42. package/dist/prod-next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  43. package/dist/prod-next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  44. package/dist/prod-next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  45. package/dist/prod-next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  46. package/dist/prod-next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  47. package/dist/prod-next/server/app/_not-found/page.js +2 -2
  48. package/dist/prod-next/server/app/_not-found/page.js.nft.json +1 -1
  49. package/dist/prod-next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  50. package/dist/prod-next/server/app/_not-found.html +1 -1
  51. package/dist/prod-next/server/app/_not-found.rsc +19 -17
  52. package/dist/prod-next/server/app/_not-found.segments/_full.segment.rsc +19 -17
  53. package/dist/prod-next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  54. package/dist/prod-next/server/app/_not-found.segments/_index.segment.rsc +8 -6
  55. package/dist/prod-next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  56. package/dist/prod-next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  57. package/dist/prod-next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  58. package/dist/prod-next/server/app/api/taskmark-reload/route.js +1 -1
  59. package/dist/prod-next/server/app/api/taskmark-reload/route.js.nft.json +1 -1
  60. package/dist/prod-next/server/app/board/page.js +2 -50
  61. package/dist/prod-next/server/app/board/page.js.nft.json +1 -1
  62. package/dist/prod-next/server/app/board/page_client-reference-manifest.js +1 -1
  63. package/dist/prod-next/server/app/favicon.ico/route.js +1 -1
  64. package/dist/prod-next/server/app/favicon.ico/route.js.nft.json +1 -1
  65. package/dist/prod-next/server/app/page.js +2 -2
  66. package/dist/prod-next/server/app/page.js.nft.json +1 -1
  67. package/dist/prod-next/server/app/page_client-reference-manifest.js +1 -1
  68. package/dist/prod-next/server/app/setup/page.js +2 -2
  69. package/dist/prod-next/server/app/setup/page.js.nft.json +1 -1
  70. package/dist/prod-next/server/app/setup/page_client-reference-manifest.js +1 -1
  71. package/dist/prod-next/server/app-paths-manifest.json +2 -2
  72. package/dist/prod-next/server/chunks/102.js +90 -0
  73. package/dist/prod-next/server/chunks/11.js +1 -0
  74. package/dist/prod-next/server/chunks/1286.js +1 -0
  75. package/dist/prod-next/server/chunks/1412.js +38 -0
  76. package/dist/prod-next/server/chunks/1605.js +1 -0
  77. package/dist/prod-next/server/chunks/169.js +1 -0
  78. package/dist/prod-next/server/chunks/18.js +86 -0
  79. package/dist/prod-next/server/chunks/2.js +1 -0
  80. package/dist/prod-next/server/chunks/2022.js +1 -0
  81. package/dist/prod-next/server/chunks/2156.js +1 -0
  82. package/dist/prod-next/server/chunks/2157.js +1 -0
  83. package/dist/prod-next/server/chunks/2325.js +82 -0
  84. package/dist/prod-next/server/chunks/2838.js +1 -0
  85. package/dist/prod-next/server/chunks/2897.js +79 -0
  86. package/dist/prod-next/server/chunks/3227.js +1 -0
  87. package/dist/prod-next/server/chunks/3266.js +1 -0
  88. package/dist/prod-next/server/chunks/3307.js +49 -0
  89. package/dist/prod-next/server/chunks/3387.js +19 -0
  90. package/dist/prod-next/server/chunks/3428.js +32 -0
  91. package/dist/prod-next/server/chunks/3479.js +1 -0
  92. package/dist/prod-next/server/chunks/367.js +115 -0
  93. package/dist/prod-next/server/chunks/3698.js +93 -0
  94. package/dist/prod-next/server/chunks/3709.js +148 -0
  95. package/dist/prod-next/server/chunks/41.js +1 -0
  96. package/dist/prod-next/server/chunks/4107.js +62 -0
  97. package/dist/prod-next/server/chunks/4569.js +34 -0
  98. package/dist/prod-next/server/chunks/{741.js → 4741.js} +1 -1
  99. package/dist/prod-next/server/chunks/4755.js +153 -0
  100. package/dist/prod-next/server/chunks/487.js +1 -0
  101. package/dist/prod-next/server/chunks/5002.js +1 -0
  102. package/dist/prod-next/server/chunks/5112.js +1 -0
  103. package/dist/prod-next/server/chunks/5289.js +8 -0
  104. package/dist/prod-next/server/chunks/5318.js +1 -0
  105. package/dist/prod-next/server/chunks/5452.js +23 -0
  106. package/dist/prod-next/server/chunks/5453.js +1 -0
  107. package/dist/prod-next/server/chunks/5749.js +27 -0
  108. package/dist/prod-next/server/chunks/5782.js +36 -0
  109. package/dist/prod-next/server/chunks/6163.js +104 -0
  110. package/dist/prod-next/server/chunks/6169.js +64 -0
  111. package/dist/prod-next/server/chunks/6208.js +172 -0
  112. package/dist/prod-next/server/chunks/6399.js +24 -0
  113. package/dist/prod-next/server/chunks/6496.js +1 -0
  114. package/dist/prod-next/server/chunks/6823.js +215 -0
  115. package/dist/prod-next/server/chunks/6888.js +1 -0
  116. package/dist/prod-next/server/chunks/6980.js +1 -0
  117. package/dist/prod-next/server/chunks/7245.js +77 -0
  118. package/dist/prod-next/server/chunks/7307.js +1 -0
  119. package/dist/prod-next/server/chunks/7372.js +287 -0
  120. package/dist/prod-next/server/chunks/7384.js +226 -0
  121. package/dist/prod-next/server/chunks/7516.js +1 -0
  122. package/dist/prod-next/server/chunks/7531.js +24 -0
  123. package/dist/prod-next/server/chunks/7591.js +1 -0
  124. package/dist/prod-next/server/chunks/7755.js +138 -0
  125. package/dist/prod-next/server/chunks/7916.js +1 -0
  126. package/dist/prod-next/server/chunks/8078.js +94 -0
  127. package/dist/prod-next/server/chunks/8253.js +41 -0
  128. package/dist/prod-next/server/chunks/8635.js +1 -0
  129. package/dist/prod-next/server/chunks/8688.js +1 -0
  130. package/dist/prod-next/server/chunks/8872.js +1 -0
  131. package/dist/prod-next/server/chunks/9006.js +1 -0
  132. package/dist/prod-next/server/chunks/9018.js +1 -0
  133. package/dist/prod-next/server/chunks/9047.js +1 -0
  134. package/dist/prod-next/server/chunks/9108.js +1 -0
  135. package/dist/prod-next/server/chunks/9280.js +256 -0
  136. package/dist/prod-next/server/chunks/9419.js +1 -0
  137. package/dist/prod-next/server/chunks/9430.js +1 -0
  138. package/dist/prod-next/server/chunks/9586.js +1 -0
  139. package/dist/prod-next/server/chunks/9775.js +1 -0
  140. package/dist/prod-next/server/chunks/992.js +1 -0
  141. package/dist/prod-next/server/chunks/9926.js +1 -0
  142. package/dist/prod-next/server/chunks/9984.js +8 -0
  143. package/dist/prod-next/server/middleware-build-manifest.js +1 -1
  144. package/dist/prod-next/server/middleware-react-loadable-manifest.js +1 -1
  145. package/dist/prod-next/server/pages/404.html +1 -1
  146. package/dist/prod-next/server/pages/500.html +1 -1
  147. package/dist/prod-next/server/server-reference-manifest.js +1 -1
  148. package/dist/prod-next/server/server-reference-manifest.json +1 -1
  149. package/dist/prod-next/server/webpack-runtime.js +1 -1
  150. package/dist/prod-next/static/chunks/1213.e5c6e70a79b5f7e6.js +24 -0
  151. package/dist/prod-next/static/chunks/1519.2f596e5f5af9ef57.js +62 -0
  152. package/dist/prod-next/static/chunks/1759-f5b8fb456f8fb420.js +1 -0
  153. package/dist/prod-next/static/chunks/1974.885c9a133b86d8a4.js +32 -0
  154. package/dist/prod-next/static/chunks/2280.6a7f540787704698.js +1 -0
  155. package/dist/prod-next/static/chunks/2521.7f745f50d30076e7.js +77 -0
  156. package/dist/prod-next/static/chunks/2585.4d6aa847c780c666.js +1 -0
  157. package/dist/prod-next/static/chunks/2589.1aad68c09021b1ac.js +1 -0
  158. package/dist/prod-next/static/chunks/2600.45ba17a0f756fc31.js +1 -0
  159. package/dist/prod-next/static/chunks/2619.9aac8983f30c7c8a.js +1 -0
  160. package/dist/prod-next/static/chunks/26d302b2.9f6383e42abdfe16.js +122 -0
  161. package/dist/prod-next/static/chunks/2768.305914f7900745b6.js +1 -0
  162. package/dist/prod-next/static/chunks/2931.c2acdbf72808b646.js +41 -0
  163. package/dist/prod-next/static/chunks/3012-838f69b72a0dc1b3.js +1 -0
  164. package/dist/prod-next/static/chunks/3016.406e568aa95ff867.js +1 -0
  165. package/dist/prod-next/static/chunks/3022.972047558a20553a.js +172 -0
  166. package/dist/prod-next/static/chunks/3064.3a2a1e7cd4fdca5f.js +1 -0
  167. package/dist/prod-next/static/chunks/3174.03fbed7b7d7a8256.js +1 -0
  168. package/dist/prod-next/static/chunks/3189.b048866768087750.js +1 -0
  169. package/dist/prod-next/static/chunks/3217.1a053843c58b70b5.js +24 -0
  170. package/dist/prod-next/static/chunks/3308.30b95d524f9c1daf.js +74 -0
  171. package/dist/prod-next/static/chunks/331.fc5d78e1e91daf43.js +1 -0
  172. package/dist/prod-next/static/chunks/3510.5d4d1c79533e080c.js +1 -0
  173. package/dist/prod-next/static/chunks/364.ce5400a9dd70b9dc.js +1 -0
  174. package/dist/prod-next/static/chunks/3661-1f08d73aaffb011d.js +1 -0
  175. package/dist/prod-next/static/chunks/370.57cfa27da8567918.js +1 -0
  176. package/dist/prod-next/static/chunks/3789.c418b69121761983.js +1 -0
  177. package/dist/prod-next/static/chunks/3794-c66b3d8325973459.js +32 -0
  178. package/dist/prod-next/static/chunks/3831.25ae62d10dccc27a.js +1 -0
  179. package/dist/prod-next/static/chunks/395.b41e9d76613d37b5.js +90 -0
  180. package/dist/prod-next/static/chunks/3a7aa434.93dbd20997cfd24f.js +82 -0
  181. package/dist/prod-next/static/chunks/4020.3cc19c463c49f969.js +23 -0
  182. package/dist/prod-next/static/chunks/4035.0acc428926d5c8dd.js +1 -0
  183. package/dist/prod-next/static/chunks/405.0902e4f6eb7bd9a2.js +215 -0
  184. package/dist/prod-next/static/chunks/4159.49ae537ff687bdc6.js +138 -0
  185. package/dist/prod-next/static/chunks/4208.384b381ca2757643.js +287 -0
  186. package/dist/prod-next/static/chunks/4263.ffa8d9bd8a0faaae.js +1 -0
  187. package/dist/prod-next/static/chunks/4561.d1a3aaca8bae3224.js +34 -0
  188. package/dist/prod-next/static/chunks/4592.d0f37bc216b9d988.js +93 -0
  189. package/dist/prod-next/static/chunks/4799.0dc7aa21bff2fd2a.js +1 -0
  190. package/dist/prod-next/static/chunks/4bd1b696-e356ca5ba0218e27.js +1 -0
  191. package/dist/prod-next/static/chunks/514.b804c51b26f5e126.js +1 -0
  192. package/dist/prod-next/static/chunks/5270.28592864d38e881c.js +1 -0
  193. package/dist/prod-next/static/chunks/52733464.3870f99cc446f9ff.js +1 -0
  194. package/dist/prod-next/static/chunks/5354.b559c717a607dc5c.js +1 -0
  195. package/dist/prod-next/static/chunks/5448.d3972d9fb464b54f.js +38 -0
  196. package/dist/prod-next/static/chunks/587.d52737d7288c11b4.js +1 -0
  197. package/dist/prod-next/static/chunks/5909.9e37f7b495b11995.js +115 -0
  198. package/dist/prod-next/static/chunks/5949.5504b3545fcc3d34.js +104 -0
  199. package/dist/prod-next/static/chunks/6322-4e97920c006f7933.js +1 -0
  200. package/dist/prod-next/static/chunks/6361.893d04ac34fa1b49.js +148 -0
  201. package/dist/prod-next/static/chunks/6774.8cd53427dbf32cac.js +86 -0
  202. package/dist/prod-next/static/chunks/6968.b80277c724dbc96e.js +1 -0
  203. package/dist/prod-next/static/chunks/7113.4b9e7ea870aa300a.js +8 -0
  204. package/dist/prod-next/static/chunks/7236.55a9728d35f5b8a6.js +1 -0
  205. package/dist/prod-next/static/chunks/7390.dde9b5bc2f6e24b8.js +1 -0
  206. package/dist/prod-next/static/chunks/7806.a903780fcfa3a30e.js +1 -0
  207. package/dist/prod-next/static/chunks/7997.be57e92e583fe635.js +1 -0
  208. package/dist/prod-next/static/chunks/8216.64a72d4d35ea7be0.js +1 -0
  209. package/dist/prod-next/static/chunks/830.5d5274d7ad1cb58e.js +1 -0
  210. package/dist/prod-next/static/chunks/8378.fa91de3406f554c9.js +226 -0
  211. package/dist/prod-next/static/chunks/8501.cd06aa1b0c7e1c6a.js +79 -0
  212. package/dist/prod-next/static/chunks/8663.6ec5792fb4952e45.js +27 -0
  213. package/dist/prod-next/static/chunks/872.96937e758ddce860.js +1 -0
  214. package/dist/prod-next/static/chunks/8803.75bde095fe3613f5.js +1 -0
  215. package/dist/prod-next/static/chunks/8863.72f5dbb820a0e4c3.js +1 -0
  216. package/dist/prod-next/static/chunks/90542734.f7a7b2972ef5a749.js +1 -0
  217. package/dist/prod-next/static/chunks/9379.5bc9c9343ec5a16c.js +64 -0
  218. package/dist/prod-next/static/chunks/9389.906fe7aa9cd6a170.js +1 -0
  219. package/dist/prod-next/static/chunks/9472.8818ee52cfa931a4.js +94 -0
  220. package/dist/prod-next/static/chunks/966.d6babbf8119162cc.js +1 -0
  221. package/dist/prod-next/static/chunks/9884.d4ac1a961b3366f1.js +36 -0
  222. package/dist/prod-next/static/chunks/9909.67cf9940b125243b.js +1 -0
  223. package/dist/prod-next/static/chunks/app/_global-error/page-8be5492b3b872a4c.js +1 -0
  224. package/dist/prod-next/static/chunks/app/_not-found/page-799e445a538b0024.js +1 -0
  225. package/dist/prod-next/static/chunks/app/api/taskmark-reload/route-8be5492b3b872a4c.js +1 -0
  226. package/dist/prod-next/static/chunks/app/board/page-5c181f45738daf1c.js +1 -0
  227. package/dist/prod-next/static/chunks/app/layout-21782e6d13a6f275.js +1 -0
  228. package/dist/prod-next/static/chunks/app/page-51bfe4356fe233e3.js +1 -0
  229. package/dist/prod-next/static/chunks/app/setup/page-3ccfba00c10f9b17.js +1 -0
  230. package/dist/prod-next/static/chunks/d3ac728e.7964f816a1ca64e5.js +1 -0
  231. package/dist/prod-next/static/chunks/e413bedd.3a12a8cb02e28fdf.js +153 -0
  232. package/dist/prod-next/static/chunks/ea233666.f00b64a7d99b4950.js +62 -0
  233. package/dist/prod-next/static/chunks/framework-711ef29bc66f648c.js +1 -0
  234. package/dist/prod-next/static/chunks/main-app-dd26d4f9d120646e.js +1 -0
  235. package/dist/prod-next/static/chunks/{main-bb33c46a9c25dee8.js → main-df4bcaed74f274eb.js} +2 -2
  236. package/dist/prod-next/static/chunks/next/dist/client/components/builtin/app-error-8be5492b3b872a4c.js +1 -0
  237. package/dist/prod-next/static/chunks/next/dist/client/components/builtin/forbidden-8be5492b3b872a4c.js +1 -0
  238. package/dist/prod-next/static/chunks/next/dist/client/components/builtin/global-error-45a0cf77e03361ed.js +1 -0
  239. package/dist/prod-next/static/chunks/next/dist/client/components/builtin/not-found-8be5492b3b872a4c.js +1 -0
  240. package/dist/prod-next/static/chunks/next/dist/client/components/builtin/unauthorized-8be5492b3b872a4c.js +1 -0
  241. package/dist/prod-next/static/chunks/webpack-713747aaa9716c4c.js +1 -0
  242. package/dist/prod-next/static/css/cb78d4b0062d9a3f.css +1 -0
  243. package/dist/public/taskmark-snapshot.json +1 -1
  244. package/lib/taskmark/board-index.ts +101 -0
  245. package/lib/taskmark/build-snapshot.ts +28 -7
  246. package/lib/taskmark/derive-parents.test.ts +23 -0
  247. package/lib/taskmark/derive-parents.ts +323 -0
  248. package/lib/taskmark/detail-load.ts +55 -7
  249. package/lib/taskmark/detail-types.ts +10 -2
  250. package/lib/taskmark/dev-reload-token.ts +1 -1
  251. package/lib/taskmark/discover.ts +4 -7
  252. package/lib/taskmark/epic-types.ts +2 -1
  253. package/lib/taskmark/flat-work-item-types.ts +1 -4
  254. package/lib/taskmark/identity.ts +3 -3
  255. package/lib/taskmark/item-types.ts +2 -1
  256. package/lib/taskmark/list-filters.test.ts +23 -0
  257. package/lib/taskmark/list-filters.ts +7 -2
  258. package/lib/taskmark/list-view-mode.test.ts +45 -0
  259. package/lib/taskmark/list-view-mode.ts +20 -9
  260. package/lib/taskmark/load-changelog.test.ts +32 -0
  261. package/lib/taskmark/load-changelog.ts +18 -0
  262. package/lib/taskmark/overall-tree.test.ts +196 -0
  263. package/lib/taskmark/overall-tree.ts +194 -0
  264. package/lib/taskmark/parse-detail.ts +5 -5
  265. package/lib/taskmark/parse-epics.ts +19 -16
  266. package/lib/taskmark/parse-flat-lists.ts +32 -28
  267. package/lib/taskmark/parse-items.ts +47 -9
  268. package/lib/taskmark/parse-stories.ts +18 -15
  269. package/lib/taskmark/points-calendar.test.ts +72 -0
  270. package/lib/taskmark/points-calendar.ts +86 -0
  271. package/lib/taskmark/project-metrics.ts +11 -7
  272. package/lib/taskmark/snapshot-types.ts +2 -0
  273. package/lib/taskmark/story-types.ts +2 -1
  274. package/lib/taskmark/table-sort.ts +4 -3
  275. package/lib/taskmark/timing.ts +29 -18
  276. package/lib/taskmark/validate.ts +1 -1
  277. package/lib/theme-cookie.test.ts +27 -0
  278. package/lib/theme-cookie.ts +43 -0
  279. package/package.json +3 -1
  280. package/public/taskmark-snapshot.json +1 -1
  281. package/scripts/build-static.mjs +61 -3
  282. package/dist/prod-next/server/app/setup.html +0 -1
  283. package/dist/prod-next/server/app/setup.meta +0 -17
  284. package/dist/prod-next/server/app/setup.rsc +0 -22
  285. package/dist/prod-next/server/app/setup.segments/_full.segment.rsc +0 -22
  286. package/dist/prod-next/server/app/setup.segments/_head.segment.rsc +0 -6
  287. package/dist/prod-next/server/app/setup.segments/_index.segment.rsc +0 -8
  288. package/dist/prod-next/server/app/setup.segments/_tree.segment.rsc +0 -5
  289. package/dist/prod-next/server/app/setup.segments/setup/__PAGE__.segment.rsc +0 -6
  290. package/dist/prod-next/server/app/setup.segments/setup.segment.rsc +0 -5
  291. package/dist/prod-next/server/chunks/318.js +0 -1
  292. package/dist/prod-next/server/chunks/490.js +0 -8
  293. package/dist/prod-next/server/chunks/57.js +0 -19
  294. package/dist/prod-next/server/chunks/616.js +0 -1
  295. package/dist/prod-next/server/chunks/708.js +0 -1
  296. package/dist/prod-next/server/chunks/724.js +0 -1
  297. package/dist/prod-next/static/chunks/4bd1b696-deb4a0a1da1923b0.js +0 -1
  298. package/dist/prod-next/static/chunks/51.e9139a9ea6eb36b9.js +0 -1
  299. package/dist/prod-next/static/chunks/613-6f794154d28bb75a.js +0 -1
  300. package/dist/prod-next/static/chunks/669-8103441c67b185da.js +0 -1
  301. package/dist/prod-next/static/chunks/701-df3ee5f1cf837b1a.js +0 -1
  302. package/dist/prod-next/static/chunks/794-25668765560cb197.js +0 -32
  303. package/dist/prod-next/static/chunks/app/_global-error/page-d34451c04262dd7d.js +0 -1
  304. package/dist/prod-next/static/chunks/app/_not-found/page-0b3785af737e7968.js +0 -1
  305. package/dist/prod-next/static/chunks/app/api/taskmark-reload/route-d34451c04262dd7d.js +0 -1
  306. package/dist/prod-next/static/chunks/app/board/page-cd1d9be0c0127225.js +0 -1
  307. package/dist/prod-next/static/chunks/app/layout-856e8a282e69e7d0.js +0 -1
  308. package/dist/prod-next/static/chunks/app/page-d34451c04262dd7d.js +0 -1
  309. package/dist/prod-next/static/chunks/app/setup/page-c3003359e8becc84.js +0 -1
  310. package/dist/prod-next/static/chunks/framework-b29f9083d3cda3b2.js +0 -1
  311. package/dist/prod-next/static/chunks/main-app-bfb36455d24b3e5a.js +0 -1
  312. package/dist/prod-next/static/chunks/next/dist/client/components/builtin/app-error-d34451c04262dd7d.js +0 -1
  313. package/dist/prod-next/static/chunks/next/dist/client/components/builtin/forbidden-d34451c04262dd7d.js +0 -1
  314. package/dist/prod-next/static/chunks/next/dist/client/components/builtin/global-error-dc53ab29e0491fe4.js +0 -1
  315. package/dist/prod-next/static/chunks/next/dist/client/components/builtin/not-found-d34451c04262dd7d.js +0 -1
  316. package/dist/prod-next/static/chunks/next/dist/client/components/builtin/unauthorized-d34451c04262dd7d.js +0 -1
  317. package/dist/prod-next/static/chunks/webpack-bfe8992962004e2b.js +0 -1
  318. package/dist/prod-next/static/css/2e6ec4c80894e3c0.css +0 -1
  319. /package/dist/prod-next/static/{sAWr5ATVuqk6Wqs18kAWs → EI1zQaa_kQ7DqUSE4o3Qo}/_buildManifest.js +0 -0
  320. /package/dist/prod-next/static/{sAWr5ATVuqk6Wqs18kAWs → EI1zQaa_kQ7DqUSE4o3Qo}/_ssgManifest.js +0 -0
@@ -0,0 +1,138 @@
1
+ "use strict";exports.id=7755,exports.ids=[7755],exports.modules={23464:(a,b,c)=>{c.d(b,{o:()=>d});var d=(0,c(95097).K)(()=>`
2
+ /* Font Awesome icon styling - consolidated */
3
+ .label-icon {
4
+ display: inline-block;
5
+ height: 1em;
6
+ overflow: visible;
7
+ vertical-align: -0.125em;
8
+ }
9
+
10
+ .node .label-icon path {
11
+ fill: currentColor;
12
+ stroke: revert;
13
+ stroke-width: revert;
14
+ }
15
+ `,"getIconStyles")},75899:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(73946),e=c(363);let f=(a,b)=>d.A.lang.round(e.A.parse(a)[b])},87755:(a,b,c)=>{c.d(b,{diagram:()=>ar});var d=c(23464),e=c(50396),f=c(38847);c(45037),c(69579),c(30492),c(29179);var g=c(34950),h=c(12644),i=c(58715),j=c(95097),k=c(11732),l=c(18847),m=c(32112),n=c(22729);function o(a,b){for(let c in b)Object.hasOwn(b,c)&&(a[c]=b[c])}var p=c(75899),q=c(14120),r=c(69085),s=c(74367),t=function(){var a=(0,j.K)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,15],c=[1,7],d=[1,13],e=[1,14],f=[1,19],g=[1,16],h=[1,17],i=[1,18],k=[8,30],l=[8,10,21,28,29,30,31,39,43,46],m=[1,23],n=[1,24],o=[8,10,15,16,21,28,29,30,31,39,43,46],p=[8,10,15,16,21,27,28,29,30,31,39,43,46],q=[1,49],r={trace:(0,j.K)(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:(0,j.K)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 4:d.getLogger().debug("Rule: separator (NL) ");break;case 5:d.getLogger().debug("Rule: separator (Space) ");break;case 6:d.getLogger().debug("Rule: separator (EOF) ");break;case 7:d.getLogger().debug("Rule: hierarchy: ",f[h-1]),d.setHierarchy(f[h-1]);break;case 8:d.getLogger().debug("Stop NL ");break;case 9:d.getLogger().debug("Stop EOF ");break;case 10:d.getLogger().debug("Stop NL2 ");break;case 11:d.getLogger().debug("Stop EOF2 ");break;case 12:d.getLogger().debug("Rule: statement: ",f[h]),"number"==typeof f[h].length?this.$=f[h]:this.$=[f[h]];break;case 13:d.getLogger().debug("Rule: statement #2: ",f[h-1]),this.$=[f[h-1]].concat(f[h]);break;case 14:d.getLogger().debug("Rule: link: ",f[h],a),this.$={edgeTypeStr:f[h],label:""};break;case 15:d.getLogger().debug("Rule: LABEL link: ",f[h-3],f[h-1],f[h]),this.$={edgeTypeStr:f[h],label:f[h-1]};break;case 18:let i=parseInt(f[h]),j=d.generateId();this.$={id:j,type:"space",label:"",width:i,children:[]};break;case 23:d.getLogger().debug("Rule: (nodeStatement link node) ",f[h-2],f[h-1],f[h]," typestr: ",f[h-1].edgeTypeStr);let k=d.edgeStrToEdgeData(f[h-1].edgeTypeStr),l=d.edgeStrToEdgeStartData(f[h-1].edgeTypeStr),m=d.edgeStrToThickness(f[h-1].edgeTypeStr),n=d.edgeStrToPattern(f[h-1].edgeTypeStr);this.$=[{id:f[h-2].id,label:f[h-2].label,type:f[h-2].type,directions:f[h-2].directions},{id:f[h-2].id+"-"+f[h].id,start:f[h-2].id,end:f[h].id,label:f[h-1].label,type:"edge",thickness:m,pattern:n,directions:f[h].directions,arrowTypeEnd:k,arrowTypeStart:l},{id:f[h].id,label:f[h].label,type:d.typeStr2Type(f[h].typeStr),directions:f[h].directions}];break;case 24:d.getLogger().debug("Rule: nodeStatement (abc88 node size) ",f[h-1],f[h]),this.$={id:f[h-1].id,label:f[h-1].label,type:d.typeStr2Type(f[h-1].typeStr),directions:f[h-1].directions,widthInColumns:parseInt(f[h],10)};break;case 25:d.getLogger().debug("Rule: nodeStatement (node) ",f[h]),this.$={id:f[h].id,label:f[h].label,type:d.typeStr2Type(f[h].typeStr),directions:f[h].directions,widthInColumns:1};break;case 26:d.getLogger().debug("APA123",this?this:"na"),d.getLogger().debug("COLUMNS: ",f[h]),this.$={type:"column-setting",columns:"auto"===f[h]?-1:parseInt(f[h])};break;case 27:d.getLogger().debug("Rule: id-block statement : ",f[h-2],f[h-1]),d.generateId(),this.$={...f[h-2],type:"composite",children:f[h-1]};break;case 28:d.getLogger().debug("Rule: blockStatement : ",f[h-2],f[h-1],f[h]);let o=d.generateId();this.$={id:o,type:"composite",label:"",children:f[h-1]};break;case 29:d.getLogger().debug("Rule: node (NODE_ID separator): ",f[h]),this.$={id:f[h]};break;case 30:d.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",f[h-1],f[h]),this.$={id:f[h-1],label:f[h].label,typeStr:f[h].typeStr,directions:f[h].directions};break;case 31:d.getLogger().debug("Rule: dirList: ",f[h]),this.$=[f[h]];break;case 32:d.getLogger().debug("Rule: dirList: ",f[h-1],f[h]),this.$=[f[h-1]].concat(f[h]);break;case 33:d.getLogger().debug("Rule: nodeShapeNLabel: ",f[h-2],f[h-1],f[h]),this.$={typeStr:f[h-2]+f[h],label:f[h-1]};break;case 34:d.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",f[h-3],f[h-2]," #3:",f[h-1],f[h]),this.$={typeStr:f[h-3]+f[h],label:f[h-2],directions:f[h-1]};break;case 35:case 36:this.$={type:"classDef",id:f[h-1].trim(),css:f[h].trim()};break;case 37:this.$={type:"applyClass",id:f[h-1].trim(),styleClass:f[h].trim()};break;case 38:this.$={type:"applyStyles",id:f[h-1].trim(),stylesStr:f[h].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:b,11:3,13:4,19:5,20:6,21:c,22:8,23:9,24:10,25:11,26:12,28:d,29:e,31:f,39:g,43:h,46:i},{8:[1,20]},a(k,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:b,21:c,28:d,29:e,31:f,39:g,43:h,46:i}),a(l,[2,16],{14:22,15:m,16:n}),a(l,[2,17]),a(l,[2,18]),a(l,[2,19]),a(l,[2,20]),a(l,[2,21]),a(l,[2,22]),a(o,[2,25],{27:[1,25]}),a(l,[2,26]),{19:26,26:12,31:f},{10:b,11:27,13:4,19:5,20:6,21:c,22:8,23:9,24:10,25:11,26:12,28:d,29:e,31:f,39:g,43:h,46:i},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},a(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},a(k,[2,13]),{26:35,31:f},{31:[2,14]},{17:[1,36]},a(o,[2,24]),{10:b,11:37,13:4,14:22,15:m,16:n,19:5,20:6,21:c,22:8,23:9,24:10,25:11,26:12,28:d,29:e,31:f,39:g,43:h,46:i},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},a(p,[2,30]),{18:[1,43]},{18:[1,44]},a(o,[2,23]),{18:[1,45]},{30:[1,46]},a(l,[2,28]),a(l,[2,35]),a(l,[2,36]),a(l,[2,37]),a(l,[2,38]),{36:[1,47]},{33:48,34:q},{15:[1,50]},a(l,[2,27]),a(p,[2,33]),{38:[1,51]},{33:52,34:q,38:[2,31]},{31:[2,15]},a(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,j.K)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,j.K)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",i=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,j.K)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,j.K)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(i+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,i=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,i,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function s(){this.yy={}}return r.lexer={EOF:1,parseError:(0,j.K)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,j.K)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,j.K)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.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),a},"input"),unput:(0,j.K)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,j.K)(function(){return this._more=!0,this},"more"),reject:(0,j.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,j.K)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,j.K)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,j.K)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,j.K)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,j.K)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,j.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,j.K)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,j.K)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,j.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,j.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,j.K)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,j.K)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,j.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,j.K)(function(a,b,c,d){switch(c){case 0:return a.getLogger().debug("Found block-beta"),10;case 1:return a.getLogger().debug("Found id-block"),29;case 2:return a.getLogger().debug("Found block"),10;case 3:a.getLogger().debug(".",b.yytext);break;case 4:a.getLogger().debug("_",b.yytext);break;case 5:return 5;case 6:return b.yytext=-1,28;case 7:return b.yytext=b.yytext.replace(/columns\s+/,""),a.getLogger().debug("COLUMNS (LEX)",b.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:a.getLogger().debug("LEX: POPPING STR:",b.yytext),this.popState();break;case 13:return a.getLogger().debug("LEX: STR end:",b.yytext),"STR";case 14:return b.yytext=b.yytext.replace(/space\:/,""),a.getLogger().debug("SPACE NUM (LEX)",b.yytext),21;case 15:return b.yytext="1",a.getLogger().debug("COLUMNS (LEX)",b.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),a.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),a.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),a.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),a.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),a.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),a.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),a.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),a.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),a.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),a.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),a.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),a.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return a.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return a.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return a.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return a.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return a.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return a.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return a.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return a.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),a.getLogger().debug("LEX ARR START"),37;case 74:return a.getLogger().debug("Lex: NODE_ID",b.yytext),31;case 75:return a.getLogger().debug("Lex: EOF",b.yytext),8;case 78:return"NODE_DESCR";case 80:a.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:a.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return a.getLogger().debug("LEX: NODE_DESCR:",b.yytext),"NODE_DESCR";case 83:a.getLogger().debug("LEX POPPING"),this.popState();break;case 84:a.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (right): dir:",b.yytext),"DIR";case 86:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (left):",b.yytext),"DIR";case 87:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (x):",b.yytext),"DIR";case 88:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (y):",b.yytext),"DIR";case 89:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (up):",b.yytext),"DIR";case 90:return b.yytext=b.yytext.replace(/^,\s*/,""),a.getLogger().debug("Lex (down):",b.yytext),"DIR";case 91:return b.yytext="]>",a.getLogger().debug("Lex (ARROW_DIR end):",b.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return a.getLogger().debug("Lex: LINK","#"+b.yytext+"#"),15;case 93:case 94:case 95:return a.getLogger().debug("Lex: LINK",b.yytext),15;case 96:case 97:case 98:return a.getLogger().debug("Lex: START_LINK",b.yytext),this.pushState("LLABEL"),16;case 100:return a.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),a.getLogger().debug("Lex: LINK","#"+b.yytext+"#"),15;case 102:case 103:return this.popState(),a.getLogger().debug("Lex: LINK",b.yytext),15;case 104:return a.getLogger().debug("Lex: COLON",b.yytext),b.yytext=b.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}},(0,j.K)(s,"Parser"),s.prototype=r,r.Parser=s,new s}();t.parser=t;var u=new Map,v=[],w=new Map,x="color",y="fill",z=new Map,A="",B=(0,j.K)(a=>h.Y2.sanitizeText(a,(0,h.D7)()),"sanitizeText"),C=(0,j.K)(function(a,b=""){let c=z.get(a);c||(c={id:a,styles:[],textStyles:[]},z.set(a,c)),null!=b&&b.split(",").forEach(a=>{let b=a.replace(/([^;]*);/,"$1").trim();if(RegExp(x).exec(a)){let a=b.replace(y,"bgFill").replace(x,y);c.textStyles.push(a)}c.styles.push(b)})},"addStyleClass"),D=(0,j.K)(function(a,b=""){let c=u.get(a);null!=b&&(c.styles=b.split(","))},"addStyle2Node"),E=(0,j.K)(function(a,b){a.split(",").forEach(function(a){let c=u.get(a);if(void 0===c){let b=a.trim();c={id:b,type:"na",children:[]},u.set(b,c)}c.classes||(c.classes=[]),c.classes.push(b)})},"setCssClass"),F=(0,j.K)((a,b)=>{let c=a.flat(),d=[],e=c.find(a=>a?.type==="column-setting"),f=e?.columns??-1;for(let a of c){if("number"==typeof f&&f>0&&"column-setting"!==a.type&&"number"==typeof a.widthInColumns&&a.widthInColumns>f&&i.R.warn(`Block ${a.id} width ${a.widthInColumns} exceeds configured column width ${f}`),a.label&&(a.label=B(a.label)),"classDef"===a.type){C(a.id,a.css);continue}if("applyClass"===a.type){E(a.id,a?.styleClass??"");continue}if("applyStyles"===a.type){a?.stylesStr&&D(a.id,a?.stylesStr);continue}if("column-setting"===a.type)b.columns=a.columns??-1;else if("edge"===a.type){let b=(w.get(a.id)??0)+1;w.set(a.id,b),a.id=b+"-"+a.id,v.push(a)}else{a.label||("composite"===a.type?a.label="":a.label=a.id);let b=u.get(a.id);if(void 0===b?u.set(a.id,a):("na"!==a.type&&(b.type=a.type),a.label!==a.id&&(b.label=a.label)),a.children&&F(a.children,a),"space"===a.type){let b=a.width??1;for(let c=0;c<b;c++){let b=function(a){if((0,k.s)(a))return a;let b=(0,l.b)(a);if(!function(a){switch((0,l.b)(a)){case m.R_:case m.Uw:case m.cT:case m.iq:case m.$V:case m.vC:case m.ri:case m.ML:case m.XZ:case m.i1:case m._u:case m.pj:case m.kj:case m.GX:case m.Av:case m.NA:case m.OG:case m.VP:case m.Qb:case m.q:case m.x6:case m.ZR:return!0;default:return!1}}(a))return{};if(Array.isArray(a)){let b=Array.from(a);return a.length>0&&"string"==typeof a[0]&&Object.hasOwn(a,"index")&&(b.index=a.index,b.input=a.input),b}if((0,n.i)(a))return new a.constructor(a.buffer,a.byteOffset,a.length);if("[object ArrayBuffer]"===b)return new ArrayBuffer(a.byteLength);if("[object DataView]"===b){let b=a.buffer,c=a.byteOffset,d=a.byteLength,e=new ArrayBuffer(d),f=new Uint8Array(b,c,d);return new Uint8Array(e).set(f),new DataView(e)}if("[object Boolean]"===b||"[object Number]"===b||"[object String]"===b){let c=new a.constructor(a.valueOf());return"[object String]"===b?function(a,b){let c=b.valueOf().length;for(let d in b)Object.hasOwn(b,d)&&(Number.isNaN(Number(d))||Number(d)>=c)&&(a[d]=b[d])}(c,a):o(c,a),c}if("[object Date]"===b)return new Date(Number(a));if("[object RegExp]"===b){let b=new RegExp(a.source,a.flags);return b.lastIndex=a.lastIndex,b}if("[object Symbol]"===b)return Object(Symbol.prototype.valueOf.call(a));if("[object Map]"===b){let b=new Map;return a.forEach((a,c)=>{b.set(c,a)}),b}if("[object Set]"===b){let b=new Set;return a.forEach(a=>{b.add(a)}),b}if("[object Arguments]"===b){let b={};return o(b,a),b.length=a.length,b[Symbol.iterator]=a[Symbol.iterator],b}let c={};return function(a,b){let c=Object.getPrototypeOf(b);null!==c&&"function"==typeof b.constructor&&Object.setPrototypeOf(a,c)}(c,a),o(c,a),function(a,b){let c=Object.getOwnPropertySymbols(b);for(let d=0;d<c.length;d++){let e=c[d];Object.prototype.propertyIsEnumerable.call(b,e)&&(a[e]=b[e])}}(c,a),c}(a);b.id=b.id+"-"+c,u.set(b.id,b),d.push(b)}}else void 0===b&&d.push(a)}}b.children=d},"populateBlockDatabase"),G=[],H={id:"root",type:"composite",children:[],columns:-1},I=(0,j.K)(()=>{i.R.debug("Clear called"),(0,h.IU)(),u=new Map([["root",H={id:"root",type:"composite",children:[],columns:-1}]]),G=[],z=new Map,v=[],w=new Map,A=""},"clear");function J(a){switch(i.R.debug("typeStr2Type",a),a){case"[]":return"square";case"()":return i.R.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function K(a){return(i.R.debug("typeStr2Type",a),"=="===a)?"thick":"normal"}function L(a){switch(a.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function M(a){switch(a.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function N(a){return a.includes("==")?"thick":"normal"}function O(a){return a.includes(".-")?"dotted":"solid"}(0,j.K)(J,"typeStr2Type"),(0,j.K)(K,"edgeTypeStr2Type"),(0,j.K)(L,"edgeStrToEdgeData"),(0,j.K)(M,"edgeStrToEdgeStartData"),(0,j.K)(N,"edgeStrToThickness"),(0,j.K)(O,"edgeStrToPattern");var P=0,Q=(0,j.K)(()=>(P++,"id-"+Math.random().toString(36).substr(2,12)+"-"+P),"generateId"),R=(0,j.K)(a=>{H.children=a,F(a,H),G=H.children},"setHierarchy"),S=(0,j.K)(a=>{let b=u.get(a);return b?b.columns?b.columns:b.children?b.children.length:-1:-1},"getColumns"),T=(0,j.K)(()=>[...u.values()],"getBlocksFlat"),U=(0,j.K)(()=>G||[],"getBlocks"),V=(0,j.K)(()=>v,"getEdges"),W=(0,j.K)(a=>u.get(a),"getBlock"),X=(0,j.K)(a=>{u.set(a.id,a)},"setBlock"),Y=(0,j.K)(a=>{A=a},"setDiagramId"),Z=(0,j.K)(()=>A,"getDiagramId"),$=(0,j.K)(()=>i.R,"getLogger"),_=(0,j.K)(function(){return z},"getClasses"),aa={getConfig:(0,j.K)(()=>(0,h.zj)().block,"getConfig"),typeStr2Type:J,edgeTypeStr2Type:K,edgeStrToEdgeData:L,edgeStrToEdgeStartData:M,edgeStrToThickness:N,edgeStrToPattern:O,getLogger:$,getBlocksFlat:T,getBlocks:U,getEdges:V,setHierarchy:R,getBlock:W,setBlock:X,getColumns:S,getClasses:_,clear:I,generateId:Q,setDiagramId:Y,getDiagramId:Z},ab=(0,j.K)((a,b)=>{let c=p.A,d=c(a,"r"),e=c(a,"g"),f=c(a,"b");return q.A(d,e,f,b)},"fade"),ac=(0,j.K)(a=>`.label {
16
+ font-family: ${a.fontFamily};
17
+ color: ${a.nodeTextColor||a.textColor};
18
+ }
19
+ .cluster-label text {
20
+ fill: ${a.titleColor};
21
+ }
22
+ .cluster-label span {
23
+ color: ${a.titleColor};
24
+ }
25
+
26
+
27
+
28
+ .label text,span {
29
+ fill: ${a.nodeTextColor||a.textColor};
30
+ color: ${a.nodeTextColor||a.textColor};
31
+ }
32
+
33
+ .node rect,
34
+ .node circle,
35
+ .node ellipse,
36
+ .node polygon,
37
+ .node path {
38
+ fill: ${a.mainBkg};
39
+ stroke: ${a.nodeBorder};
40
+ stroke-width: 1px;
41
+ }
42
+ .flowchart-label text {
43
+ text-anchor: middle;
44
+ }
45
+ // .flowchart-label .text-outer-tspan {
46
+ // text-anchor: middle;
47
+ // }
48
+ // .flowchart-label .text-inner-tspan {
49
+ // text-anchor: start;
50
+ // }
51
+
52
+ .node .label {
53
+ text-align: center;
54
+ }
55
+ .node.clickable {
56
+ cursor: pointer;
57
+ }
58
+
59
+ .arrowheadPath {
60
+ fill: ${a.arrowheadColor};
61
+ }
62
+
63
+ .edgePaths .path {
64
+ stroke: ${a.lineColor};
65
+ stroke-width: 2.0px;
66
+ }
67
+
68
+ .flowchart-link {
69
+ stroke: ${a.lineColor};
70
+ fill: none;
71
+ }
72
+
73
+ .edgeLabel {
74
+ background-color: ${a.edgeLabelBackground};
75
+ /*
76
+ * This is for backward compatibility with existing code that didn't
77
+ * add a \`<p>\` around edge labels.
78
+ *
79
+ * TODO: We should probably remove this in a future release.
80
+ */
81
+ p {
82
+ margin: 0;
83
+ padding: 0;
84
+ display: inline;
85
+ }
86
+ rect {
87
+ opacity: 0.5;
88
+ background-color: ${a.edgeLabelBackground};
89
+ fill: ${a.edgeLabelBackground};
90
+ }
91
+ text-align: center;
92
+ }
93
+
94
+ /* For html labels only */
95
+ .labelBkg {
96
+ background-color: ${a.edgeLabelBackground};
97
+ }
98
+
99
+ .node .cluster {
100
+ // fill: ${ab(a.mainBkg,.5)};
101
+ fill: ${ab(a.clusterBkg,.5)};
102
+ stroke: ${ab(a.clusterBorder,.2)};
103
+ box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
104
+ stroke-width: 1px;
105
+ }
106
+
107
+ .cluster text {
108
+ fill: ${a.titleColor};
109
+ }
110
+
111
+ .cluster span {
112
+ color: ${a.titleColor};
113
+ }
114
+ /* .cluster div {
115
+ color: ${a.titleColor};
116
+ } */
117
+
118
+ div.mermaidTooltip {
119
+ position: absolute;
120
+ text-align: center;
121
+ max-width: 200px;
122
+ padding: 2px;
123
+ font-family: ${a.fontFamily};
124
+ font-size: 12px;
125
+ background: ${a.tertiaryColor};
126
+ border: 1px solid ${a.border2};
127
+ border-radius: 2px;
128
+ pointer-events: none;
129
+ z-index: 100;
130
+ }
131
+
132
+ .flowchartTitleText {
133
+ text-anchor: middle;
134
+ font-size: 18px;
135
+ fill: ${a.textColor};
136
+ }
137
+ ${(0,d.o)()}
138
+ `,"getStyles");function ad(a,b){if(0===a||!Number.isInteger(a))throw Error("Columns must be an integer !== 0.");if(b<0||!Number.isInteger(b))throw Error("Position must be a non-negative integer."+b);return a<0?{px:b,py:0}:1===a?{px:0,py:b}:{px:b%a,py:Math.floor(b/a)}}(0,j.K)(ad,"calculateBlockPosition");var ae=(0,j.K)(a=>{let b=0,c=0;for(let d of a.children){let{width:a,height:e,x:f,y:g}=d.size??{width:0,height:0,x:0,y:0};if(i.R.debug("getMaxChildSize abc95 child:",d.id,"width:",a,"height:",e,"x:",f,"y:",g,d.type),"space"===d.type)continue;let h=a/(d.widthInColumns??1);h>b&&(b=h),e>c&&(c=e)}return{width:b,height:c}},"getMaxChildSize");function af(a,b,c=0,d=0,e=8){i.R.debug("setBlockSizes abc95 (start)",a.id,a?.size?.x,"block width =",a?.size,"siblingWidth",c),a?.size?.width||(a.size={width:c,height:d,x:0,y:0});let f=0,g=0;if(a.children?.length>0){for(let c of a.children)af(c,b,0,0,e);let h=ae(a);for(let b of(f=h.width,g=h.height,i.R.debug("setBlockSizes abc95 maxWidth of",a.id,":s children is ",f,g),a.children))b.size&&(i.R.debug(`abc95 Setting size of children of ${a.id} id=${b.id} ${f} ${g} ${JSON.stringify(b.size)}`),b.size.width=f*(b.widthInColumns??1)+e*((b.widthInColumns??1)-1),b.size.height=g,b.size.x=0,b.size.y=0,i.R.debug(`abc95 updating size of ${a.id} children child:${b.id} maxWidth:${f} maxHeight:${g}`));for(let c of a.children)af(c,b,f,g,e);let j=a.columns??-1,k=0;for(let b of a.children)k+=b.widthInColumns??1;let l=a.children.length;j>0&&j<k&&(l=j);let m=Math.ceil(k/l),n=l*(f+e)+e,o=m*(g+e)+e;if(n<c){i.R.debug(`Detected to small sibling: abc95 ${a.id} siblingWidth ${c} siblingHeight ${d} width ${n}`),n=c,o=d;let b=(c-l*e-e)/l,h=(d-m*e-e)/m;for(let c of(i.R.debug("Size indata abc88",a.id,"childWidth",b,"maxWidth",f),i.R.debug("Size indata abc88",a.id,"childHeight",h,"maxHeight",g),i.R.debug("Size indata abc88 xSize",l,"padding",e),a.children))c.size&&(c.size.width=b,c.size.height=h,c.size.x=0,c.size.y=0)}if(i.R.debug(`abc95 (finale calc) ${a.id} xSize ${l} ySize ${m} columns ${j}${a.children.length} width=${Math.max(n,a.size?.width||0)}`),n<(a?.size?.width||0)){n=a?.size?.width||0;let b=j>0?Math.min(a.children.length,j):a.children.length;if(b>0){let c=(n-b*e-e)/b;for(let b of(i.R.debug("abc95 (growing to fit) width",a.id,n,a.size?.width,c),a.children))b.size&&(b.size.width=c)}}a.size={width:n,height:o,x:0,y:0}}i.R.debug("setBlockSizes abc94 (done)",a.id,a?.size?.x,a?.size?.width,a?.size?.y,a?.size?.height)}function ag(a,b,c=8){i.R.debug(`abc85 layout blocks (=>layoutBlocks) ${a.id} x: ${a?.size?.x} y: ${a?.size?.y} width: ${a?.size?.width}`);let d=a.columns??-1;if(i.R.debug("layoutBlocks columns abc95",a.id,"=>",d,a),a.children&&a.children.length>0){let e=a?.children[0]?.size?.width??0,f=a.children.length*e+(a.children.length-1)*c;i.R.debug("widthOfChildren 88",f,"posX");let g=new Map;{let b=0;for(let c of a.children){if(!c.size)continue;let{py:a}=ad(d,b),e=g.get(a)??0;c.size.height>e&&g.set(a,c.size.height);let f=c?.widthInColumns??1;d>0&&(f=Math.min(f,d-b%d)),b+=f}}let h=new Map;{let a=0;for(let b of[...g.keys()].sort((a,b)=>a-b))h.set(b,a),a+=(g.get(b)??0)+c}let j=0;i.R.debug("abc91 block?.size?.x",a.id,a?.size?.x);let k=a?.size?.x?a?.size?.x+(-a?.size?.width/2||0):-c,l=0;for(let e of a.children){if(!e.size)continue;let{width:f,height:m}=e.size,{px:n,py:o}=ad(d,j);if(o!=l&&(l=o,k=a?.size?.x?a?.size?.x+(-a?.size?.width/2||0):-c,i.R.debug("New row in layout for block",a.id," and child ",e.id,l)),i.R.debug(`abc89 layout blocks (child) id: ${e.id} Pos: ${j} (px, py) ${n},${o} (${a?.size?.x},${a?.size?.y}) parent: ${a.id} width: ${f}${c}`),a.size){let b=f/2;e.size.x=k+c+b,i.R.debug(`abc91 layout blocks (calc) px, pyid:${e.id} startingPos=X${k} new startingPosX${e.size.x} ${b} padding=${c} width=${f} halfWidth=${b} => x:${e.size.x} y:${e.size.y} ${e.widthInColumns} (width * (child?.w || 1)) / 2 ${f*(e?.widthInColumns??1)/2}`),k=e.size.x+b;let d=h.get(o)??0,j=g.get(o)??m;e.size.y=a.size.y-a.size.height/2+d+j/2+c,i.R.debug(`abc88 layout blocks (calc) px, pyid:${e.id}startingPosX${k}${c}${b}=>x:${e.size.x}y:${e.size.y}${e.widthInColumns}(width * (child?.w || 1)) / 2${f*(e?.widthInColumns??1)/2}`)}e.children&&ag(e,b,c);let p=e?.widthInColumns??1;d>0&&(p=Math.min(p,d-j%d)),j+=p,i.R.debug("abc88 columnsPos",e,j)}}i.R.debug(`layout blocks (<==layoutBlocks) ${a.id} x: ${a?.size?.x} y: ${a?.size?.y} width: ${a?.size?.width}`)}function ah(a,{minX:b,minY:c,maxX:d,maxY:e}={minX:0,minY:0,maxX:0,maxY:0}){if(a.size&&"root"!==a.id){let{x:f,y:g,width:h,height:i}=a.size;f-h/2<b&&(b=f-h/2),g-i/2<c&&(c=g-i/2),f+h/2>d&&(d=f+h/2),g+i/2>e&&(e=g+i/2)}if(a.children)for(let f of a.children)({minX:b,minY:c,maxX:d,maxY:e}=ah(f,{minX:b,minY:c,maxX:d,maxY:e}));return{minX:b,minY:c,maxX:d,maxY:e}}function ai(a){let b=a.getBlock("root");if(!b)return;let c=(0,h.D7)()?.block?.padding??8;af(b,a,0,0,c),ag(b,a,c),i.R.debug("getBlocks",JSON.stringify(b,null,2));let{minX:d,minY:e,maxX:f,maxY:g}=ah(b);return{x:d,y:e,width:f-d,height:g-e}}function aj(a,b,c=!1){let d,e="default";(a?.classes?.length||0)>0&&(e=(a?.classes??[]).join(" ")),e+=" flowchart-label";let f=(a?.classes??[]).flatMap(a=>b.getClasses().get(a)?.styles??[]),i=0,j="rect";switch(a.type){case"round":i=5,j="rect";break;case"composite":i=0,j="composite",d=0;break;case"square":case"group":default:j="rect";break;case"diamond":j="question";break;case"hexagon":j="hexagon";break;case"block_arrow":j="block_arrow";break;case"odd":case"rect_left_inv_arrow":j="rect_left_inv_arrow";break;case"lean_right":j="lean_right";break;case"lean_left":j="lean_left";break;case"trapezoid":j="trapezoid";break;case"inv_trapezoid":j="inv_trapezoid";break;case"circle":j="circle";break;case"ellipse":j="ellipse";break;case"stadium":j="stadium";break;case"subroutine":j="subroutine";break;case"cylinder":j="cylinder";break;case"doublecircle":j="doublecircle"}let k=(0,g.sM)(a?.styles??[]),l=a.label,m=a.size??{width:0,height:0,x:0,y:0},n=b.getDiagramId();return{labelStyle:k.labelStyle,shape:j,label:l,labelText:l,rx:i,ry:i,class:e,cssClasses:e,cssStyles:a?.styles??[],cssCompiledStyles:f,style:k.style,id:a.id,domId:n?`${n}-${a.id}`:a.id,isGroup:!1,directions:a.directions,width:m.width||void 0,height:m.height||void 0,wrappingWidth:m.width||1/0,x:m.x,y:m.y,positioned:c,intersect:void 0,padding:d??(0,h.zj)()?.block?.padding??0,widthInColumns:a.widthInColumns??1}}async function ak(a,b,c){let d=aj(b,c,!1);if("group"===b.type)return;let e=(0,h.zj)(),g=await (0,f.on)(a,d,{config:e}),i=g.node()?.getBBox()??{width:0,height:0},j=c.getBlock(d.id);j.size={width:i.width,height:i.height,x:0,y:0,node:g},c.setBlock(j),g.remove()}async function al(a,b,c){let d=aj(b,c,!0);if("space"!==c.getBlock(d.id).type){let c=(0,h.zj)();await (0,f.on)(a,d,{config:c}),b.intersect=d?.intersect,(0,f.U_)(d)}}async function am(a,b,c,d){for(let e of b)await d(a,e,c),e.children&&await am(a,e.children,c,d)}async function an(a,b,c){await am(a,b,c,ak)}async function ao(a,b,c){await am(a,b,c,al)}async function ap(a,b,c,d,f){let g=new s.T({multigraph:!0,compound:!0});for(let a of(g.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8}),c))a.size&&g.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(let c of b)if(c.start&&c.end){let b=d.getBlock(c.start),h=d.getBlock(c.end);if(b?.size&&h?.size){let d=b.size,i=h.size,j=[{x:d.x,y:d.y},{x:d.x+(i.x-d.x)/2,y:d.y+(i.y-d.y)/2},{x:i.x,y:i.y}],k=f?`${f}-${c.id}`:c.id,l="thick"===c.thickness?"edge-thickness-thick":"edge-thickness-normal",m="dotted"===c.pattern?"edge-pattern-dotted":"edge-pattern-solid",n=`${l} ${m} flowchart-link LS-a1 LE-b1`;(0,e.Jo)(a,{...c,id:k,arrowTypeEnd:c.arrowTypeEnd,arrowTypeStart:c.arrowTypeStart,points:j,classes:n},{},"block",g.node(c.start),g.node(c.end),f),c.label&&(await (0,e.jP)(a,{...c,label:c.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:c.arrowTypeEnd,arrowTypeStart:c.arrowTypeStart,points:j,classes:n}),(0,e.T_)({...c,x:j[1].x,y:j[1].y},{originalPath:j}))}}}(0,j.K)(af,"setBlockSizes"),(0,j.K)(ag,"layoutBlocks"),(0,j.K)(ah,"findBounds"),(0,j.K)(ai,"layout"),(0,j.K)(aj,"getNodeFromBlock"),(0,j.K)(ak,"calculateBlockSize"),(0,j.K)(al,"insertBlockPositioned"),(0,j.K)(am,"performOperations"),(0,j.K)(an,"calculateBlockSizes"),(0,j.K)(ao,"insertBlocks"),(0,j.K)(ap,"insertEdges");var aq=(0,j.K)(function(a,b){return b.db.getClasses()},"getClasses"),ar={parser:t,db:aa,renderer:{draw:(0,j.K)(async function(a,b,c,d){let f,{securityLevel:g,block:j}=(0,h.zj)(),k=d.db;k.setDiagramId(b),"sandbox"===g&&(f=(0,r.Ltv)("#i"+b));let l="sandbox"===g?(0,r.Ltv)(f.nodes()[0].contentDocument.body):(0,r.Ltv)("body"),m="sandbox"===g?l.select(`[id="${b}"]`):(0,r.Ltv)(`[id="${b}"]`);(0,e.g0)(m,["point","circle","cross"],d.type,b);let n=k.getBlocks(),o=k.getBlocksFlat(),p=k.getEdges(),q=m.insert("g").attr("class","block");await an(q,n,k);let s=ai(k);await ao(q,n,k),await ap(q,p,o,k,b);let t=q.node()?.getBBox(),u=t&&Number.isFinite(t.width)&&Number.isFinite(t.height)?t:s;if(u){let a=Math.max(1,Math.round(.125*(u.width/u.height))),b=u.height+a+10,c=u.width+10,{useMaxWidth:d}=j;(0,h.a$)(m,b,c,!!d),i.R.debug("Here Bounds",s,u),m.attr("viewBox",`${u.x-5} ${u.y-5} ${u.width+10} ${u.height+10}`)}},"draw"),getClasses:aq},styles:ac}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=7916,exports.ids=[7916],exports.modules={67916:(a,b,c)=>{c.d(b,{diagram:()=>r});var d=c(59093),e=c(4328);c(5675),c(12644);var f=c(58715),g=c(95097),h=c(92325),i=(0,h.Pz)().RailroadPeg.parser.LangiumParser,j=(0,g.K)(a=>{let b=a.alternatives.map(k);return 1===b.length?b[0]:{type:"choice",alternatives:b}},"transformOrderedChoice"),k=(0,g.K)(a=>{let b=a.elements.map(l);return 1===b.length?b[0]:{type:"sequence",elements:b}},"transformSequence"),l=(0,g.K)(a=>{let b=n(a.suffix);return a.operator?{type:"special",text:"&"===a.operator?`&${m(b)}`:`!${m(b)}`}:b},"transformPrefix"),m=(0,g.K)(a=>{switch(a.type){case"terminal":return`"${a.value}"`;case"nonterminal":return a.name;case"special":return a.text;default:return"(...)"}},"nodeToLabel"),n=(0,g.K)(a=>{let b=o(a.primary);if(!a.operator)return b;switch(a.operator){case"?":return{type:"optional",element:b};case"*":return{type:"repetition",element:b,min:0,max:1/0};case"+":return{type:"repetition",element:b,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${a.operator}`)}},"transformSuffix"),o=(0,g.K)(a=>{switch(a.$type){case"PegLiteral":return{type:"terminal",value:a.value};case"PegIdentifier":return{type:"nonterminal",name:a.name};case"PegGroup":return j(a.element);case"PegAny":return{type:"special",text:a.dot};default:throw Error(`Unsupported PEG primary node: ${a.$type}`)}},"transformPrimary"),p=(0,g.K)(a=>({name:a.name,definition:j(a.definition)}),"transformRule"),q=(0,g.K)(a=>{(0,e.S)(a,d.db),a.title&&d.db.setTitle(a.title),a.rules.map(a=>d.db.addRule(p(a)))},"populateDb"),r={parser:{parse:(0,g.K)(a=>{d.db.clear(),f.R.debug("[PEG Parser] Starting Langium parse");let b=i.parse(a);if(b.lexerErrors.length>0||b.parserErrors.length>0)throw new h.zg(b);let c=b.value;f.R.debug("[PEG Parser] Parsed rules:",c.rules.length),q(c),f.R.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:d.db}},db:d.db,renderer:d.U,styles:d.$}}};
@@ -0,0 +1,94 @@
1
+ "use strict";exports.id=8078,exports.ids=[8078],exports.modules={17822:(a,b,c)=>{c.d(b,{P:()=>g});var d=c(12644),e=c(58715),f=c(95097),g=(0,f.K)((a,b,c,f)=>{a.attr("class",c);let{width:g,height:j,x:k,y:l}=h(a,b);(0,d.a$)(a,j,g,f);let m=i(k,l,g,j,b);a.attr("viewBox",m),e.R.debug(`viewBox configured: ${m} with padding: ${b}`)},"setupViewPortForSVG"),h=(0,f.K)((a,b)=>{let c=a.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:c.width+2*b,height:c.height+2*b,x:c.x,y:c.y}},"calculateDimensionsWithPadding"),i=(0,f.K)((a,b,c,d,e)=>`${a-e} ${b-e} ${c} ${d}`,"createViewBox")},30917:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(95097),e=c(69085),f=(0,d.K)((a,b)=>{let c;return"sandbox"===b&&(c=(0,e.Ltv)("#i"+a)),("sandbox"===b?(0,e.Ltv)(c.nodes()[0].contentDocument.body):(0,e.Ltv)("body")).select(`[id="${a}"]`)},"getDiagramElement")},75899:(a,b,c)=>{c.d(b,{A:()=>f});var d=c(73946),e=c(363);let f=(a,b)=>d.A.lang.round(e.A.parse(a)[b])},98078:(a,b,c)=>{c.d(b,{diagram:()=>u});var d=c(30917),e=c(17822),f=c(51467);c(48514),c(50396),c(38847),c(45037),c(69579),c(30492),c(29179);var g=c(34950),h=c(12644),i=c(58715),j=c(95097),k=c(69085),l=c(75899),m=c(14120),n=function(){var a=(0,j.K)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],c=[2,2],d=[1,7],e=[1,9],f=[1,10],g=[1,11],h=[1,12],i=[1,30],k=[1,23],l=[1,24],m=[1,25],n=[1,26],o=[1,27],p=[1,19],q=[1,28],r=[1,29],s=[1,20],t=[1,18],u=[1,21],v=[1,22],w=[2,6],x=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],y=[1,36],z=[1,37],A=[1,38],B=[1,39],C=[1,40],D=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],E=[1,46],F=[1,47],G=[1,57],H=[43,51,53,54,55,74,75],I=[1,70],J=[1,68],K=[1,65],L=[1,69],M=[1,71],N=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],O=[1,78],P=[1,77],Q=[1,76],R=[69,70,71,72,73],S=[1,91],T=[6,9,45,50],U=[6,9,12,44,45,50,51,52],V=[1,101],W=[1,100],X=[1,99],Y=[18,61],Z=[1,110],$=[1,109],_=[20,43,51,53,54,55],aa=[18,61,64,66],ab={trace:(0,j.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",18:"BLOCK_STOP",19:"SQS",20:"SQE",21:"title",22:"title_value",23:"acc_title",24:"acc_title_value",25:"acc_descr",26:"acc_descr_value",27:"acc_descr_multiline_value",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:(0,j.K)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:break;case 2:case 5:case 6:this.$=[];break;case 3:this.$=f[h-1].concat(f[h]);break;case 4:case 34:case 59:case 60:case 61:case 62:case 86:case 69:case 71:case 74:this.$=f[h];break;case 7:d.addEntity(f[h-4]),d.addEntity(f[h-2]),d.addRelationship(f[h-4],f[h],f[h-2],f[h-3]),this.$=[f[h-4],f[h-2]];break;case 8:d.addEntity(f[h-8]),d.addEntity(f[h-4]),d.addRelationship(f[h-8],f[h],f[h-4],f[h-5]),d.setClass([f[h-8]],f[h-6]),d.setClass([f[h-4]],f[h-2]),this.$=[f[h-8],f[h-4]];break;case 9:d.addEntity(f[h-6]),d.addEntity(f[h-2]),d.addRelationship(f[h-6],f[h],f[h-2],f[h-3]),d.setClass([f[h-6]],f[h-4]),this.$=[f[h-6],f[h-2]];break;case 10:d.addEntity(f[h-6]),d.addEntity(f[h-4]),d.addRelationship(f[h-6],f[h],f[h-4],f[h-5]),d.setClass([f[h-4]],f[h-2]),this.$=[f[h-6],f[h-4]];break;case 11:d.addEntity(f[h-3]),d.addAttributes(f[h-3],f[h-1]),this.$=[f[h-3]];break;case 12:d.addEntity(f[h-5]),d.addAttributes(f[h-5],f[h-1]),d.setClass([f[h-5]],f[h-3]),this.$=[f[h-5]];break;case 13:d.addEntity(f[h-2]),this.$=[f[h-2]];break;case 14:d.addEntity(f[h-4]),d.setClass([f[h-4]],f[h-2]),this.$=[f[h-4]];break;case 15:d.addEntity(f[h]),this.$=[f[h]];break;case 16:d.addEntity(f[h-2]),d.setClass([f[h-2]],f[h]),this.$=[f[h-2]];break;case 17:d.addEntity(f[h-6],f[h-4]),d.addAttributes(f[h-6],f[h-1]),this.$=[f[h-6]];break;case 18:d.addEntity(f[h-8],f[h-6]),d.addAttributes(f[h-8],f[h-1]),d.setClass([f[h-8]],f[h-3]),this.$=[f[h-8]];break;case 19:d.addEntity(f[h-5],f[h-3]),this.$=[f[h-5]];break;case 20:d.addEntity(f[h-7],f[h-5]),d.setClass([f[h-7]],f[h-2]),this.$=[f[h-7]];break;case 21:d.addEntity(f[h-3],f[h-1]);break;case 22:d.addEntity(f[h-5],f[h-3]),d.setClass([f[h-5]],f[h]);break;case 23:case 24:this.$=f[h].trim(),d.setAccTitle(this.$);break;case 25:case 26:this.$=f[h].trim(),d.setAccDescription(this.$);break;case 27:d.subgraphDepth?this.$=f[h]:(d.setDirection(f[h].value),this.$=[]);break;case 31:d.subgraphDepth=(d.subgraphDepth||1)-1,this.$=d.addSubGraph({text:f[h-2].id},f[h-1],{text:f[h-2].text});break;case 32:d.subgraphDepth=(d.subgraphDepth||0)+1,this.$={id:f[h-1],text:f[h-1]};break;case 33:d.subgraphDepth=(d.subgraphDepth||0)+1,this.$={id:f[h-4],text:f[h-2]};break;case 35:this.$=f[h-1]+" "+f[h];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=f[h-3],d.addClass(f[h-2],f[h-1]);break;case 41:case 42:case 63:case 72:case 47:this.$=[f[h]];break;case 43:case 44:this.$=f[h-2].concat([f[h]]);break;case 45:this.$=f[h-2],d.setClass(f[h-1],f[h]);break;case 46:this.$=f[h-3],d.addCssStyles(f[h-2],f[h-1]);break;case 48:case 73:f[h-2].push(f[h]),this.$=f[h-2];break;case 50:case 70:this.$=f[h-1]+f[h];break;case 58:case 84:case 85:case 75:this.$=f[h].replace(/"/g,"");break;case 64:f[h].push(f[h-1]),this.$=f[h];break;case 65:this.$={type:f[h-1],name:f[h]};break;case 66:this.$={type:f[h-2],name:f[h-1],keys:f[h]};break;case 67:this.$={type:f[h-2],name:f[h-1],comment:f[h]};break;case 68:this.$={type:f[h-3],name:f[h-2],keys:f[h-1],comment:f[h]};break;case 76:this.$={cardA:f[h],relType:f[h-1],cardB:f[h-2]};break;case 77:this.$=d.Cardinality.ZERO_OR_ONE;break;case 78:this.$=d.Cardinality.ZERO_OR_MORE;break;case 79:this.$=d.Cardinality.ONE_OR_MORE;break;case 80:this.$=d.Cardinality.ONLY_ONE;break;case 81:this.$=d.Cardinality.MD_PARENT;break;case 82:this.$=d.Identification.NON_IDENTIFYING;break;case 83:this.$=d.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},a(b,c,{5:3}),{6:[1,4],7:5,8:6,9:d,10:8,21:e,23:f,25:g,27:h,28:13,29:14,30:15,31:16,32:17,34:i,37:k,38:l,39:m,40:n,41:o,43:p,46:q,47:r,51:s,53:t,54:u,55:v},a(b,w,{1:[2,1]}),a(x,[2,3]),a(x,[2,4]),a(x,[2,5]),a(x,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:y,70:z,71:A,72:B,73:C}),{22:[1,41]},{24:[1,42]},{26:[1,43]},a(x,[2,26]),a(x,[2,27]),a(x,[2,28]),a(x,[2,29]),a(x,[2,30]),a(x,c,{5:44}),a(D,[2,58]),a(D,[2,59]),a(D,[2,60]),a(D,[2,61]),a(D,[2,62]),a(x,[2,36]),a(x,[2,37]),a(x,[2,38]),a(x,[2,39]),{15:45,43:E,44:F},{15:48,43:E,44:F},{15:49,43:E,44:F},{10:50,43:p,51:s,53:t,54:u,55:v},{10:51,43:p,51:s,53:t,54:u,55:v},{15:52,43:E,44:F},{17:53,18:[1,54],56:55,57:56,61:G},{10:58,43:p,51:s,53:t,54:u,55:v},{68:59,74:[1,60],75:[1,61]},a(H,[2,77]),a(H,[2,78]),a(H,[2,79]),a(H,[2,80]),a(H,[2,81]),a(x,[2,23]),a(x,[2,24]),a(x,[2,25]),{6:[1,63],7:5,8:6,9:d,10:8,21:e,23:f,25:g,27:h,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:i,37:k,38:l,39:m,40:n,41:o,43:p,46:q,47:r,51:s,53:t,54:u,55:v},{12:I,42:64,44:J,45:K,48:66,49:67,51:L,52:M},a(N,[2,41]),a(N,[2,42]),{15:72,43:E,44:F,45:K},{12:I,42:73,44:J,45:K,48:66,49:67,51:L,52:M},{6:O,9:P,19:[1,75],35:74,50:Q},{12:[1,79],14:[1,80]},a(x,[2,16],{67:35,11:81,16:[1,82],45:K,69:y,70:z,71:A,72:B,73:C}),{18:[1,83]},a(x,[2,13]),{17:84,18:[2,63],56:55,57:56,61:G},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:y,70:z,71:A,72:B,73:C},a(R,[2,82]),a(R,[2,83]),a(x,[2,31]),a(x,w),{6:O,9:P,35:90,45:S,50:Q},{43:[1,92],44:[1,93]},a(T,[2,47],{49:94,12:I,44:J,51:L,52:M}),a(U,[2,49]),a(U,[2,54]),a(U,[2,55]),a(U,[2,56]),a(U,[2,57]),a(x,[2,45],{45:K}),{6:O,9:P,35:95,45:S,50:Q},a(x,[2,32]),{10:97,36:96,43:p,51:s,53:t,54:u,55:v},a(x,[2,51]),a(x,[2,52]),a(x,[2,53]),{13:98,43:V,53:W,76:X},{15:102,43:E,44:F},{10:103,43:p,51:s,53:t,54:u,55:v},{17:104,18:[1,105],56:55,57:56,61:G},a(x,[2,11]),{18:[2,64]},a(Y,[2,65],{59:106,60:107,63:108,65:Z,66:$}),a([18,61,65,66],[2,71]),{61:[2,70]},a(x,[2,21],{14:[1,112],16:[1,111]}),a([43,51,53,54,55],[2,76]),a(x,[2,40]),{12:I,44:J,48:113,49:67,51:L,52:M},a(N,[2,43]),a(N,[2,44]),a(U,[2,50]),a(x,[2,46]),{10:115,20:[1,114],43:p,51:s,53:t,54:u,55:v},a(_,[2,34]),a(x,[2,7]),a(x,[2,84]),a(x,[2,85]),a(x,[2,86]),{12:[1,116],45:K},{12:[1,118],14:[1,117]},{18:[1,119]},a(x,[2,14]),a(Y,[2,66],{60:120,64:[1,121],66:$}),a(Y,[2,67]),a(aa,[2,72]),a(Y,[2,75]),a(aa,[2,74]),{17:122,18:[1,123],56:55,57:56,61:G},{15:124,43:E,44:F},a(T,[2,48],{49:94,12:I,44:J,51:L,52:M}),{6:O,9:P,35:125,50:Q},a(_,[2,35]),{13:126,43:V,53:W,76:X},{15:127,43:E,44:F},{13:128,43:V,53:W,76:X},a(x,[2,12]),a(Y,[2,68]),{63:129,65:Z},{18:[1,130]},a(x,[2,19]),a(x,[2,22],{16:[1,131],45:K}),a(x,[2,33]),a(x,[2,10]),{12:[1,132],45:K},a(x,[2,9]),a(aa,[2,73]),a(x,[2,17]),{17:133,18:[1,134],56:55,57:56,61:G},{13:135,43:V,53:W,76:X},{18:[1,136]},a(x,[2,20]),a(x,[2,8]),a(x,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:(0,j.K)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,j.K)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",i=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,j.K)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,j.K)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(i+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,i=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,i,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function ac(){this.yy={}}return ab.lexer={EOF:1,parseError:(0,j.K)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,j.K)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,j.K)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.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),a},"input"),unput:(0,j.K)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,j.K)(function(){return this._more=!0,this},"more"),reject:(0,j.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,j.K)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,j.K)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,j.K)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,j.K)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,j.K)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,j.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,j.K)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,j.K)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,j.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,j.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,j.K)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,j.K)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,j.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,j.K)(function(a,b,c,d){switch(c){case 0:return this.begin("acc_title"),23;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),25;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 28:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:case 22:case 30:case 37:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;case 17:case 18:case 40:return 52;case 19:case 39:return 45;case 20:return 14;case 21:case 38:return 12;case 23:return 65;case 24:case 25:case 27:return 61;case 26:this.begin("block_bq");break;case 29:return 66;case 31:return this.popState(),18;case 32:case 81:return b.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;case 36:return this.popState(),9;case 41:return this.begin("style"),41;case 42:return 46;case 43:return 34;case 44:return 33;case 45:case 49:case 50:case 68:return 69;case 46:case 47:case 48:case 56:case 58:case 70:return 71;case 51:case 52:case 53:case 54:case 55:case 57:case 69:return 70;case 59:case 60:case 62:case 63:case 64:case 67:return 72;case 61:return 54;case 65:return 55;case 66:return 51;case 71:return 73;case 72:case 75:case 76:case 77:return 74;case 73:case 74:return 75;case 78:return 44;case 79:return 50;case 80:return 43;case 82:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}},(0,j.K)(ac,"Parser"),ac.prototype=ab,ab.Parser=ac,new ac}();n.parser=n;var o=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=h.SV,this.getAccTitle=h.iN,this.setAccDescription=h.EI,this.getAccDescription=h.m7,this.setDiagramTitle=h.ke,this.getDiagramTitle=h.ab,this.getConfig=(0,j.K)(()=>(0,h.D7)().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{(0,j.K)(this,"ErDB")}addEntity(a,b=""){return this.entities.has(a)?!this.entities.get(a)?.alias&&b&&(this.entities.get(a).alias=b,i.R.info(`Add alias '${b}' to entity '${a}'`)):(this.entities.set(a,{id:`entity-${a}-${this.entities.size}`,label:a,attributes:[],alias:b,shape:"erBox",look:(0,h.D7)().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),i.R.info("Added new entity :",a)),this.entities.get(a)}getEntity(a){return this.entities.get(a)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(a,b){let c,d=this.addEntity(a);for(c=b.length-1;c>=0;c--)b[c].keys||(b[c].keys=[]),b[c].comment||(b[c].comment=""),d.attributes.push(b[c]),i.R.debug("Added attribute ",b[c].name)}addRelationship(a,b,c,d){let e,f;if(this.subGraphLookup.has(a))e=a;else{let b=this.addEntity(a);if(!b)return;e=b.id}if(this.subGraphLookup.has(c))f=c;else{let a=this.addEntity(c);if(!a)return;f=a.id}let g={entityA:e,roleA:b,entityB:f,relSpec:d};this.relationships.push(g),i.R.debug("Added new relationship :",g)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(a){this.direction=a}getCompiledStyles(a){let b=[];for(let c of a){let a=this.classes.get(c);a?.styles&&(b=[...b,...a.styles??[]].map(a=>a.trim())),a?.textStyles&&(b=[...b,...a.textStyles??[]].map(a=>a.trim()))}return b}addCssStyles(a,b){for(let c of a){let a=this.entities.get(c),d=this.subGraphLookup.get(c);if(b){if(a)for(let c of b)a.cssStyles.push(c);if(d)for(let a of(d.cssStyles||(d.cssStyles=[]),b))d.cssStyles.push(a)}}}addClass(a,b){a.forEach(a=>{let c=this.classes.get(a);void 0===c&&(c={id:a,styles:[],textStyles:[]},this.classes.set(a,c)),b&&b.forEach(function(a){if(/color/.exec(a)){let b=a.replace("fill","bgFill");c.textStyles.push(b)}c.styles.push(a)})})}addSubGraph(a,b,c){let d=a.text.trim(),e=c.text,f=(0,j.K)(a=>{let b,c=new Set;return{nodeList:a.filter(a=>{if(a?.stmt)return"dir"===a.stmt&&(b=a.value),!1;if("string"!=typeof a)return!1;let d=a.trim();return!(!d||c.has(d))&&(c.add(d),!0)}),dir:b}},"uniq")(b.flat()),g=f.nodeList,h=f.dir;d=d??"subGraph"+this.subCount,e=e||"",e=this.sanitizeText(e),this.subCount=this.subCount+1;let k={id:d,nodes:g,title:e.trim(),classes:[],cssStyles:[],dir:h,labelType:this.sanitizeNodeLabelType(c?.type)};return i.R.info("Adding",k.id,k.nodes,k.dir),k.nodes=this.makeUniq(k,this.subGraphs).nodes,this.subGraphs.push(k),this.subGraphLookup.set(d,k),d}getSubGraphs(){return this.subGraphs}setClass(a,b){for(let c of a){let a=this.entities.get(c);if(a)for(let c of b)a.cssClasses+=" "+c;let d=this.subGraphLookup.get(c);if(d)for(let a of b)d.classes.push(a)}}subgraphNodeCache(a){let b=new Set;for(let c of a)for(let a of c.nodes)b.add(a);return b}makeUniq(a,b){let c=this.subgraphNodeCache(b),d=[];return a.nodes.forEach((b,e)=>{c.has(b)?i.R.warn(`Entity '${b}' already belongs to another subgraph and will be ignored`):d.push(a.nodes[e])}),{nodes:d}}sanitizeText(a){return h.Y2.sanitizeText(a,(0,h.D7)())}sanitizeNodeLabelType(a){switch(a){case"markdown":case"string":case"text":return a;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,(0,h.IU)()}getData(){let a=[],b=[],c=(0,h.D7)(),d=this.getSubGraphs(),e=new Map,f=new Map;for(let a=d.length-1;a>=0;a--){let b=d[a];for(let a of(b.nodes.length>0&&f.set(b.id,!0),b.nodes))e.set(a,b.id)}for(let b=d.length-1;b>=0;b--){let f=d[b];a.push({id:f.id,label:f.title,labelStyle:"",labelType:f.labelType,parentId:e.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssStyles:f.cssStyles,cssClasses:f.classes.join(" "),shape:"rect",dir:f.dir,isGroup:!0,look:c.look})}let i=new Set(d.map(a=>a.id)),j=0;for(let b of this.entities.keys()){if(i.has(b))continue;let c=this.entities.get(b);c&&(c.cssCompiledStyles=this.getCompiledStyles(c.cssClasses.split(" ")),c.colorIndex=j++,a.push({...c,parentId:e.get(b),isGroup:!1}))}let k=0;for(let a of this.relationships){let d={id:(0,g.rY)(a.entityA,a.entityB,{prefix:"id",counter:k++}),type:"normal",curve:"basis",start:a.entityA,end:a.entityB,label:a.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:a.relSpec.cardB.toLowerCase(),arrowTypeEnd:a.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==a.relSpec.relType?"solid":"dashed",look:c.look,labelType:"markdown"};b.push(d)}return{nodes:a,edges:b,other:{},config:c,direction:this.direction}}},p={};(0,j.V)(p,{draw:()=>q});var q=(0,j.K)(async function(a,b,c,j){i.R.info("REF0:"),i.R.info("Drawing er diagram (unified)",b);let{securityLevel:l,er:m,layout:n}=(0,h.D7)(),o=j.db.getData(),p=(0,d.A)(b,l);o.type=j.type,o.layoutAlgorithm=(0,f.q7)(n),o.config.flowchart.nodeSpacing=m?.nodeSpacing||140,o.config.flowchart.rankSpacing=m?.rankSpacing||80,o.direction=j.db.getDirection();let{config:q}=o,{look:r}=q;"neo"===r?o.markers=["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:o.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=b,await (0,f.XX)(o,p),"elk"===o.layoutAlgorithm&&p.select(".edges").lower();let s=p.selectAll('[id*="-background"]');Array.from(s).length>0&&s.each(function(){let a=(0,k.Ltv)(this),b=a.attr("id").replace("-background",""),c=p.select(`#${CSS.escape(b)}`);if(!c.empty()){let b=c.attr("transform");a.attr("transform",b)}}),g._K.insertTitle(p,"erDiagramTitleText",m?.titleTopMargin??25,j.db.getDiagramTitle()),(0,e.P)(p,8,"erDiagram",m?.useMaxWidth??!0)},"draw"),r=(0,j.K)((a,b)=>{let c=l.A,d=c(a,"r"),e=c(a,"g"),f=c(a,"b");return m.A(d,e,f,b)},"fade"),s=new Set(["redux-color","redux-dark-color"]),t=(0,j.K)(a=>{let{theme:b,look:c,bkgColorArray:d,borderColorArray:e}=a;if(!s.has(b))return"";let f=d?.length>0,g="";for(let b=0;b<a.THEME_COLOR_LIMIT;b++)g+=`
2
+
3
+ [data-look="${c}"][data-color-id="color-${b}"].node path {
4
+ stroke: ${e[b]};
5
+ ${f?`fill: ${d[b]};`:""}
6
+ }
7
+
8
+ [data-look="${c}"][data-color-id="color-${b}"].node rect {
9
+ stroke: ${e[b]};
10
+ ${f?`fill: ${d[b]};`:""}
11
+ }
12
+ `;return g},"genColor"),u={parser:n,get db(){return new o},renderer:p,styles:(0,j.K)(a=>{let{look:b,theme:c,erEdgeLabelBackground:d,strokeWidth:e}=a;return`
13
+ ${t(a)}
14
+ .entityBox {
15
+ fill: ${a.mainBkg};
16
+ stroke: ${a.nodeBorder};
17
+ }
18
+
19
+ .relationshipLabelBox {
20
+ fill: ${a.tertiaryColor};
21
+ opacity: 0.7;
22
+ background-color: ${a.tertiaryColor};
23
+ rect {
24
+ opacity: 0.5;
25
+ }
26
+ }
27
+
28
+ .labelBkg {
29
+ background-color: ${s.has(c)&&d?d:r(a.tertiaryColor,.5)};
30
+ }
31
+
32
+ .edgeLabel {
33
+ background-color: ${s.has(c)&&d?d:a.edgeLabelBackground};
34
+ }
35
+ .edgeLabel .label rect {
36
+ fill: ${s.has(c)&&d?d:a.edgeLabelBackground};
37
+ }
38
+ .edgeLabel .label text {
39
+ fill: ${a.textColor};
40
+ }
41
+
42
+ .edgeLabel .label {
43
+ fill: ${a.nodeBorder};
44
+ font-size: 14px;
45
+ }
46
+
47
+ .label {
48
+ font-family: ${a.fontFamily};
49
+ color: ${a.nodeTextColor||a.textColor};
50
+ }
51
+
52
+ .edge-pattern-dashed {
53
+ stroke-dasharray: 8,8;
54
+ }
55
+
56
+ .node rect,
57
+ .node circle,
58
+ .node ellipse,
59
+ .node polygon
60
+ {
61
+ fill: ${a.mainBkg};
62
+ stroke: ${a.nodeBorder};
63
+ stroke-width: ${"neo"===b?e:"1px"};
64
+ }
65
+
66
+ .relationshipLine {
67
+ stroke: ${a.lineColor};
68
+ stroke-width: ${"neo"===b?e:"1px"};
69
+ fill: none;
70
+ }
71
+
72
+ .marker {
73
+ fill: none !important;
74
+ stroke: ${a.lineColor} !important;
75
+ stroke-width: 1;
76
+ }
77
+ [data-look=neo].labelBkg {
78
+ background-color: ${r(a.tertiaryColor,.5)};
79
+ }
80
+
81
+ .cluster rect {
82
+ fill: ${a.clusterBkg??a.mainBkg};
83
+ stroke: ${a.clusterBorder??a.nodeBorder};
84
+ stroke-width: 1px;
85
+ }
86
+
87
+ .cluster text {
88
+ fill: ${a.titleColor??a.textColor};
89
+ }
90
+
91
+ .cluster-label text {
92
+ fill: ${a.titleColor??a.textColor};
93
+ }
94
+ `},"getStyles")}}};
@@ -0,0 +1,41 @@
1
+ "use strict";exports.id=8253,exports.ids=[8253],exports.modules={4328:(a,b,c)=>{function d(a,b){a.accDescr&&b.setAccDescription?.(a.accDescr),a.accTitle&&b.setAccTitle?.(a.accTitle),a.title&&b.setDiagramTitle?.(a.title)}c.d(b,{S:()=>d}),(0,c(95097).K)(d,"populateCommonDb")},88253:(a,b,c)=>{c.d(b,{diagram:()=>I});var d=c(4328),e=c(5675),f=c(34950),g=c(12644),h=c(58715),i=c(95097),j=c(92325),k={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},l={axes:[],curves:[],options:k},m=structuredClone(l),n=g.UI.radar,o=(0,i.K)(()=>(0,f.$t)({...n,...(0,g.zj)().radar}),"getConfig"),p=(0,i.K)(()=>m.axes,"getAxes"),q=(0,i.K)(()=>m.curves,"getCurves"),r=(0,i.K)(()=>m.options,"getOptions"),s=(0,i.K)(a=>{m.axes=a.map(a=>({name:a.name,label:a.label??a.name}))},"setAxes"),t=(0,i.K)(a=>{m.curves=a.map(a=>({name:a.name,label:a.label??a.name,entries:u(a.entries)}))},"setCurves"),u=(0,i.K)(a=>{if(void 0==a[0].axis)return a.map(a=>a.value);let b=p();if(0===b.length)throw Error("Axes must be populated before curves for reference entries");return b.map(b=>{let c=a.find(a=>a.axis?.$refText===b.name);if(void 0===c)throw Error("Missing entry for axis "+b.label);return c.value})},"computeCurveEntries"),v={getAxes:p,getCurves:q,getOptions:r,setAxes:s,setCurves:t,setOptions:(0,i.K)(a=>{let b=a.reduce((a,b)=>(a[b.name]=b,a),{});m.options={showLegend:b.showLegend?.value??k.showLegend,ticks:b.ticks?.value??k.ticks,max:b.max?.value??k.max,min:b.min?.value??k.min,graticule:b.graticule?.value??k.graticule},m.options.ticks>32&&(h.R.warn(`Radar diagram ticks (${m.options.ticks}) exceeds maximum allowed (32). Using 32 instead.`),m.options.ticks=32)},"setOptions"),getConfig:o,clear:(0,i.K)(()=>{(0,g.IU)(),m=structuredClone(l)},"clear"),setAccTitle:g.SV,getAccTitle:g.iN,setDiagramTitle:g.ke,getDiagramTitle:g.ab,getAccDescription:g.m7,setAccDescription:g.EI},w=(0,i.K)(a=>{(0,d.S)(a,v);let{axes:b,curves:c,options:e}=a;v.setAxes(b),v.setCurves(c),v.setOptions(e)},"populate"),x={parse:(0,i.K)(async a=>{let b=await (0,j.qg)("radar",a);h.R.debug(b),w(b)},"parse")},y=(0,i.K)((a,b,c,d)=>{let f=d.db,g=f.getAxes(),h=f.getCurves(),i=f.getOptions(),j=f.getConfig(),k=f.getDiagramTitle(),l=z((0,e.D)(b),j),m=i.max??Math.max(...h.map(a=>Math.max(...a.entries))),n=i.min,o=Math.min(j.width,j.height)/2;A(l,g,o,i.ticks,i.graticule),B(l,g,o,j),C(l,g,h,n,m,i.graticule,j),F(l,h,i.showLegend,j),l.append("text").attr("class","radarTitle").text(k).attr("x",0).attr("y",-j.height/2-j.marginTop)},"draw"),z=(0,i.K)((a,b)=>{let c=b.width+b.marginLeft+b.marginRight,d=b.height+b.marginTop+b.marginBottom,e={x:b.marginLeft+b.width/2,y:b.marginTop+b.height/2};return(0,g.a$)(a,d,c,b.useMaxWidth??!0),a.attr("viewBox",`0 0 ${c} ${d}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${e.x}, ${e.y})`)},"drawFrame"),A=(0,i.K)((a,b,c,d,e)=>{if("circle"===e)for(let b=0;b<d;b++){let e=c*(b+1)/d;a.append("circle").attr("r",e).attr("class","radarGraticule")}else if("polygon"===e){let e=b.length;for(let f=0;f<d;f++){let g=c*(f+1)/d,h=b.map((a,b)=>{let c=2*b*Math.PI/e-Math.PI/2,d=g*Math.cos(c),f=g*Math.sin(c);return`${d},${f}`}).join(" ");a.append("polygon").attr("points",h).attr("class","radarGraticule")}}},"drawGraticule"),B=(0,i.K)((a,b,c,d)=>{let e=b.length;for(let f=0;f<e;f++){let g=b[f].label,h=2*f*Math.PI/e-Math.PI/2,i=Math.cos(h),j=Math.sin(h);a.append("line").attr("x1",0).attr("y1",0).attr("x2",c*d.axisScaleFactor*i).attr("y2",c*d.axisScaleFactor*j).attr("class","radarAxisLine");let k=i>.01?"start":i<-.01?"end":"middle",l=j>.01?"hanging":j<-.01?"auto":"central";a.append("text").text(g).attr("x",c*d.axisLabelFactor*i+4*i).attr("y",c*d.axisLabelFactor*j+4*j).attr("text-anchor",k).attr("dominant-baseline",l).attr("class","radarAxisLabel")}},"drawAxes");function C(a,b,c,d,e,f,g){let h=b.length,i=Math.min(g.width,g.height)/2;c.forEach((b,c)=>{if(b.entries.length!==h)return;let j=b.entries.map((a,b)=>{let c=2*Math.PI*b/h-Math.PI/2,f=D(a,d,e,i);return{x:f*Math.cos(c),y:f*Math.sin(c)}});"circle"===f?a.append("path").attr("d",E(j,g.curveTension)).attr("class",`radarCurve-${c}`):"polygon"===f&&a.append("polygon").attr("points",j.map(a=>`${a.x},${a.y}`).join(" ")).attr("class",`radarCurve-${c}`)})}function D(a,b,c,d){return d*(Math.min(Math.max(a,b),c)-b)/(c-b)}function E(a,b){let c=a.length,d=`M${a[0].x},${a[0].y}`;for(let e=0;e<c;e++){let f=a[(e-1+c)%c],g=a[e],h=a[(e+1)%c],i=a[(e+2)%c],j={x:g.x+(h.x-f.x)*b,y:g.y+(h.y-f.y)*b},k={x:h.x-(i.x-g.x)*b,y:h.y-(i.y-g.y)*b};d+=` C${j.x},${j.y} ${k.x},${k.y} ${h.x},${h.y}`}return`${d} Z`}function F(a,b,c,d){if(!c)return;let e=(d.width/2+d.marginRight)*3/4,f=-(3*(d.height/2+d.marginTop))/4;b.forEach((b,c)=>{let d=a.append("g").attr("transform",`translate(${e}, ${f+20*c})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${c}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(b.label)})}(0,i.K)(C,"drawCurves"),(0,i.K)(D,"relativeRadius"),(0,i.K)(E,"closedRoundCurve"),(0,i.K)(F,"drawLegend");var G=(0,i.K)((a,b)=>{let c="";for(let d=0;d<a.THEME_COLOR_LIMIT;d++){let e=a[`cScale${d}`];c+=`
2
+ .radarCurve-${d} {
3
+ color: ${e};
4
+ fill: ${e};
5
+ fill-opacity: ${b.curveOpacity};
6
+ stroke: ${e};
7
+ stroke-width: ${b.curveStrokeWidth};
8
+ }
9
+ .radarLegendBox-${d} {
10
+ fill: ${e};
11
+ fill-opacity: ${b.curveOpacity};
12
+ stroke: ${e};
13
+ }
14
+ `}return c},"genIndexStyles"),H=(0,i.K)(a=>{let b=(0,g.P$)(),c=(0,g.zj)(),d=(0,f.$t)(b,c.themeVariables),e=(0,f.$t)(d.radar,a);return{themeVariables:d,radarOptions:e}},"buildRadarStyleOptions"),I={parser:x,db:v,renderer:{draw:y},styles:(0,i.K)(({radar:a}={})=>{let{themeVariables:b,radarOptions:c}=H(a);return`
15
+ .radarTitle {
16
+ font-size: ${b.fontSize};
17
+ color: ${b.titleColor};
18
+ dominant-baseline: hanging;
19
+ text-anchor: middle;
20
+ }
21
+ .radarAxisLine {
22
+ stroke: ${c.axisColor};
23
+ stroke-width: ${c.axisStrokeWidth};
24
+ }
25
+ .radarAxisLabel {
26
+ font-size: ${c.axisLabelFontSize}px;
27
+ color: ${c.axisColor};
28
+ }
29
+ .radarGraticule {
30
+ fill: ${c.graticuleColor};
31
+ fill-opacity: ${c.graticuleOpacity};
32
+ stroke: ${c.graticuleColor};
33
+ stroke-width: ${c.graticuleStrokeWidth};
34
+ }
35
+ .radarLegendText {
36
+ text-anchor: start;
37
+ font-size: ${c.legendFontSize}px;
38
+ dominant-baseline: hanging;
39
+ }
40
+ ${G(b,c)}
41
+ `},"styles")}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=8635,exports.ids=[8635],exports.modules={18635:(a,b,c)=>{c.d(b,{captureNodeSizes:()=>h});var d=c(95097);function e(){if("u">typeof globalThis)return globalThis}function f(){return"u"<typeof location?"browser-dev":`${location.pathname}${location.search}`}function g(a,b){let c=e();if(!c)return;let d=b.node(),f=(d&&"ownerSVGElement"in d?d.ownerSVGElement:null)??d,g=f?.id??"(unknown)";c.mermaidCapturedSizes??=[];let h={svgId:g,sizes:a};c.mermaidCapturedSizes.push(h),c.mermaidLastCapturedSizes=h}function h(a,b){let c=[];for(let a of b.nodes)a.isGroup||c.push({id:a.id,width:a.width??0,height:a.height??0});0!==c.length&&g({metadata:{captureVersion:1,capturedAt:new Date().toISOString(),capturedFrom:f()},nodes:c},a)}(0,d.K)(e,"getCaptureGlobal"),(0,d.K)(function(){return!!e()?.mermaidCaptureSizes},"shouldCaptureSizes"),(0,d.K)(f,"capturedFromLocation"),(0,d.K)(g,"emitCapturedSizes"),(0,d.K)(h,"captureNodeSizes")}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=8688,exports.ids=[8688],exports.modules={38688:(a,b,c)=>{c.r(b),c.d(b,{applyDagreLayoutResult:()=>A,getEdgesToRender:()=>u,measureDagreLayout:()=>E,prepareLayoutForDagre:()=>D,render:()=>I,runDagreLayoutCore:()=>F});var d=c(59881),e=c(48514),f=c(50396),g=c(38847),h=c(45037);c(69579),c(30492),c(29179),c(34950);var i=c(12644),j=c(58715),k=c(95097),l=c(59108),m=c(74367),n=(0,k.K)((a,b,c)=>Math.max(b,Math.min(c,a)),"clamp"),o=(0,k.K)((a="TB")=>{switch(a){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";default:return"top"}},"getDefaultSelfLoopSide"),p=(0,k.K)(a=>"flowchart"===a||"flowchart-v2"===a||"stateDiagram"===a||"er"===a||"classDiagram"===a,"shouldMergeSelfLoopSegments"),q=["x","y","width","height","labelBBox","intersect","calcIntersect","diff","clusterNode"],r=(0,k.K)((a,b,c,d,e)=>{let f=[],g=new Set;if(c.forEach(({start:a,end:b})=>{a!==d&&g.add(a),b!==d&&g.add(b)}),g.forEach(b=>{let c=a.node(b);"number"==typeof c?.x&&"number"==typeof c?.y&&f.push(c)}),0===f.length&&c.forEach(({edge:a})=>{(a.points??[]).forEach(a=>{"number"==typeof a?.x&&"number"==typeof a?.y&&f.push(a)})}),0===f.length)return o(e);let h=f.reduce((a,b)=>({x:a.x+b.x/f.length,y:a.y+b.y/f.length}),{x:0,y:0}),i=h.x-b.x,j=h.y-b.y;return Math.abs(i)>Math.abs(j)?i>0?"right":"left":Math.abs(j)>0?j>0?"bottom":"top":o(e)},"getSelfLoopSide"),s=(0,k.K)((a,b="top",c=0,d=0)=>{let e=a.x,f=a.y-c,g=a.width/2,h=a.height/2,i=Math.max(36,Math.min(100,.8*a.width)),j=n(Math.max(d,.35*a.width),36,i),k=n(.45*Math.min(a.width,a.height),24,48);switch(b){case"bottom":{let a=f+h;return[{x:e-j/2,y:a},{x:e-j/2,y:a+k},{x:e+j/2,y:a+k},{x:e+j/2,y:a}]}case"right":{let a=e+g;return[{x:a,y:f-j/2},{x:a+k,y:f-j/2},{x:a+k,y:f+j/2},{x:a,y:f+j/2}]}case"left":{let a=e-g;return[{x:a,y:f-j/2},{x:a-k,y:f-j/2},{x:a-k,y:f+j/2},{x:a,y:f+j/2}]}default:{let a=f-h;return[{x:e-j/2,y:a},{x:e-j/2,y:a-k},{x:e+j/2,y:a-k},{x:e+j/2,y:a}]}}},"getSelfLoopPoints"),t=(0,k.K)((a,b,c="top",d=0,e={})=>{let f=a.x,g=a.y-d,h=e.width??0,i=e.height??0;switch(c){case"bottom":return{x:f,y:Math.max(...b.map(a=>a.y))+i/2+4};case"right":return{x:Math.max(...b.map(a=>a.x))+h/2+4,y:g};case"left":return{x:Math.min(...b.map(a=>a.x))-h/2-4,y:g};default:return{x:f,y:Math.min(...b.map(a=>a.y))-i/2-4}}},"getSelfLoopLabelPosition"),u=(0,k.K)((a,b=0,{mergeSelfLoops:c=!0}={})=>{let d=new Map,e=[],f=a.graph()?.rankdir;return a.edges().forEach(b=>{let f=a.edge(b);if(c&&f.selfLoop){let a=f.selfLoop.id;d.has(a)||d.set(a,[]),d.get(a).push({edge:f,start:b.v,end:b.w})}else e.push({edge:f,start:b.v,end:b.w})}),d.forEach(c=>{if(3!==c.length)return void c.forEach(a=>e.push(a));c.sort((a,b)=>a.edge.selfLoop.order-b.edge.selfLoop.order);let[d,g,h]=c,i=d.edge.originalEdge??g.edge.originalEdge??h.edge.originalEdge??g.edge,j=a.node(i.start);if(!j)return void c.forEach(a=>e.push(a));let k={width:g.edge.width,height:g.edge.height},l=r(a,j,c,i.start,f),m=s(j,l,b,k.width??0),n=t(j,m,l,b,k),o={...g.edge,...i,id:i.id,points:m,start:i.start,end:i.end,x:n.x,y:n.y,width:k.width,height:k.height,labelStyle:g.edge.labelStyle,fromCluster:d.edge.fromCluster??g.edge.fromCluster??h.edge.fromCluster,toCluster:d.edge.toCluster??g.edge.toCluster??h.edge.toCluster};delete o.selfLoop,delete o.originalEdge,e.push({edge:o,start:o.start,end:o.end})}),e},"getEdgesToRender"),v=(0,k.K)(async({element:a,graph:b,diagramType:c,id:e,parentCluster:i,siteConfig:l})=>{let m=b.graph().rankdir;j.R.trace("Dir in recursive render - dir:",m);let{clusters:n,edgePaths:o,edgeLabels:q,nodes:r,rootGroups:s}=(0,d.B)(a,{edgePathsClass:"edgePaths"});b.nodes()?j.R.info("Recursive render XXX",b.nodes()):j.R.info("No nodes found for",b),b.edges().length>0&&j.R.info("Recursive edges",b.edge(b.edges()[0]));let t=p(c);await Promise.all(b.nodes().map(async function(a){let f=b.node(a);if(void 0!==i){let c=JSON.parse(JSON.stringify(i.clusterData));j.R.trace("Setting data for parent cluster XXX\n Node.id = ",a,"\n data=",c.height,"\nParent cluster",i.height),b.setNode(i.id,c),b.parent(a)||(j.R.trace("Setting parent",a,i.id),b.setParent(a,i.id,c))}if(j.R.info("(Insert) Node XXX"+a+": "+JSON.stringify(b.node(a))),f?.clusterNode){j.R.info("Cluster identified XBX",a,f.width,b.node(a));let{ranksep:d,nodesep:i}=b.graph();f.graph.setGraph({...f.graph.graph(),ranksep:d+25,nodesep:i});let k=await C({element:r,graph:f.graph,diagramType:c,id:e,parentCluster:b.node(a),siteConfig:l}),m=k.elem;(0,h.lC)(f,m),f.diff=k.diff||0,j.R.info("New compound node after recursive render XAX",a,"width",f.width,"height",f.height),(0,g.U7)(m,f)}else b.children(a).length>0?(j.R.trace("Cluster - the non recursive path XBX",a,f.id,f,f.width,"Graph:",b),j.R.trace((0,d.dc)(f.id,b)),d.ju.set(f.id,{id:(0,d.dc)(f.id,b),node:f})):(j.R.trace("Node - the non recursive path XAX",a,r,b.node(a),m),await (0,d.sv)(r,b.node(a),{config:l,dir:m}))}));let u=(0,k.K)(async()=>{let a=b.edges().map(async function(a){let c=b.edge(a.v,a.w,a.name);if(j.R.info("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(a)),j.R.info("Edge "+a.v+" -> "+a.w+": ",a," ",JSON.stringify(b.edge(a))),j.R.info("Fix",d.ju,"ids:",a.v,a.w,"Translating: ",d.ju.get(a.v),d.ju.get(a.w)),t&&c.selfLoop){if(1!==c.selfLoop.order)return;let a={...c.originalEdge,...c,id:c.selfLoop.id,startLabelLeft:c.originalEdge?.startLabelLeft??c.startLabelLeft,startLabelRight:c.originalEdge?.startLabelRight??c.startLabelRight,endLabelLeft:c.originalEdge?.endLabelLeft??c.endLabelLeft,endLabelRight:c.originalEdge?.endLabelRight??c.endLabelRight};await (0,f.jP)(q,a),c.width=a.width,c.height=a.height,c.labelStyle=a.labelStyle;return}await (0,f.jP)(q,c)});await Promise.all(a)},"processEdges");await u();let{subGraphTitleTotalMargin:v}=(0,g.Oi)(l);return{elem:s,graph:b,groups:{clusters:n,edgePaths:o,edgeLabels:q,nodes:r,rootGroups:s},diagramType:c,id:e,mergeSelfLoops:t,subGraphTitleTotalMargin:v}},"measureDagreGraph"),w=(0,k.K)(a=>{j.R.info("############################################# XXX"),j.R.info("### Layout ### XXX"),j.R.info("############################################# XXX"),(0,l.Zp)(a)},"runDagreGraphLayout"),x=(0,k.K)((a,b,c)=>{let d=a.node(b);if(!d)return;let e={...d};return d?.clusterNode?e.y=(d.y??0)+c:a.children(b).length>0?e.height=(d.height??0)+c:e.y=(d.y??0)+c/2,e},"normalizeDagreNode"),y=(0,k.K)((a,b)=>{q.forEach(c=>{void 0!==b[c]&&(a[c]=b[c])})},"applyDagreNodeLayout"),z=(0,k.K)((a,b,c,d)=>({...a,start:a.start??b,end:a.end??c,points:(a.points??[]).map(a=>({...a,y:"number"==typeof a.y?a.y+d:a.y}))}),"normalizeDagreEdge"),A=(0,k.K)((a,b)=>{let{graph:c,mergeSelfLoops:e,subGraphTitleTotalMargin:f=0}=b,g=new Map(a.nodes.map(a=>[a.id,a]));(0,d.sc)(c).forEach(a=>{let b=x(c,a,f);if(!b)return;y(c.node(a),b);let d=g.get(a);d&&y(d,b)});let h=f/2;return a.edges=u(c,h,{mergeSelfLoops:e}).map(({edge:a,start:b,end:c})=>z(a,b,c,h)),a},"applyDagreLayoutResult"),B=(0,k.K)(async({elem:a,graph:b,groups:{clusters:c,edgePaths:h},diagramType:i,id:k,mergeSelfLoops:l,subGraphTitleTotalMargin:m})=>{let n=0;await Promise.all((0,d.sc)(b).map(async function(a){let f=b.node(a);if(j.R.info("Position XBX => "+a+": ("+f.x,","+f.y,") width: ",f.width," height: ",f.height),f?.clusterNode)f.y+=m,j.R.info("A tainted cluster node XBX1",a,f.id,f.width,f.height,f.x,f.y,b.parent(a)),d.ju.get(f.id).node=f,(0,g.U_)(f);else if(b.children(a).length>0){j.R.info("A pure cluster node XBX1",a,f.id,f.x,f.y,f.width,f.height,b.parent(a)),f.height+=m,b.node(f.parentId);let g=f?.padding/2||0,h=f?.labelBBox?.height||0;j.R.debug("OffsetY",h-g||0,"labelHeight",h,"halfPadding",g),await (0,e.U)(c,f),d.ju.get(f.id).node=f}else{let a=b.node(f.parentId);f.y+=m/2,j.R.info("A regular node XBX1 - using the padding",f.id,"parent",f.parentId,f.width,f.height,f.x,f.y,"offsetY",f.offsetY,"parent",a,a?.offsetY,f),(0,g.U_)(f)}}));let o=m/2;return u(b,o,{mergeSelfLoops:l}).forEach(function({edge:a,start:c,end:e}){j.R.info("Edge "+c+" -> "+e+": "+JSON.stringify(a),a),a.points.forEach(a=>a.y+=o);let g=b.node(c),l=b.node(e),m=(0,f.Jo)(h,a,d.ju,i,g,l,k);(0,f.T_)(a,m)}),b.nodes().forEach(function(a){let c=b.node(a);j.R.info(a,c.type,c.diff),c.isGroup&&(n=c.diff)}),j.R.warn("Returning from recursive render XAX",a,n),{elem:a,diff:n}},"paintDagreLayoutCore"),C=(0,k.K)(async a=>{let b=await v(a);return w(b.graph),await B(b)},"renderDagreSubgraph"),D=(0,k.K)(a=>{let b=new m.T({multigraph:!0,compound:!0}).setGraph({rankdir:a.direction,nodesep:a.config?.nodeSpacing||a.nodeSpacing||a.config?.flowchart?.nodeSpacing,ranksep:a.config?.rankSpacing||a.rankSpacing||a.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return a.nodes.forEach(a=>{b.setNode(a.id,{...a}),a.parentId&&b.setParent(a.id,a.parentId)}),j.R.debug("Edges:",a.edges),a.edges.forEach(a=>{if(a.start===a.end){let c=a.start,d=c+"---"+c+"---1",e=c+"---"+c+"---2",f=b.node(c);b.setNode(d,{domId:d,id:d,parentId:f.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),b.setParent(d,f.parentId),b.setNode(e,{domId:e,id:e,parentId:f.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),b.setParent(e,f.parentId);let g=structuredClone(a),h=structuredClone(a),i=structuredClone(a),j=structuredClone(a);h.originalEdge=g,h.selfLoop={id:g.id,order:0},i.originalEdge=g,i.selfLoop={id:g.id,order:1},j.originalEdge=g,j.selfLoop={id:g.id,order:2},h.label="",h.arrowTypeEnd="none",h.endLabelLeft="",h.endLabelRight="",h.startLabelLeft="",h.id=c+"-cyclic-special-1",i.startLabelRight="",i.startLabelLeft="",i.endLabelLeft="",i.endLabelRight="",i.arrowTypeStart="none",i.arrowTypeEnd="none",i.id=c+"-cyclic-special-mid",j.label="",j.startLabelRight="",j.startLabelLeft="",j.arrowTypeStart="none",f.isGroup&&(h.fromCluster=c,j.toCluster=c),j.id=c+"-cyclic-special-2",j.arrowTypeStart="none",b.setEdge(c,d,h,c+"-cyclic-special-0"),b.setEdge(d,e,i,c+"-cyclic-special-1"),b.setEdge(e,c,j,c+"-cyclic-special-2")}else b.setEdge(a.start,a.end,{...a},a.id)}),(0,d.OS)(b),{graph:b}},"prepareLayoutForDagre"),E=(0,k.K)(async(a,{element:b,preparedLayout:c})=>{let d=c??D(a),e=(0,i.D7)(),f=await v({element:b,graph:d.graph,diagramType:a.type,id:a.diagramId,parentCluster:void 0,siteConfig:e});return d.measuredLayout=f,f},"measureDagreLayout"),F=(0,k.K)((a,b)=>{let c=b.preparedLayout?.measuredLayout;if(!c)throw Error("runDagreLayoutCore requires measureDagreLayout to run first");return w(c.graph),A(a,c),c},"runDagreLayoutCore"),G=(0,k.K)((a,{measure:b})=>(0,d.sc)(b.graph).map(a=>b.graph.node(a)).filter(Boolean),"getDagrePaintNodes"),H=(0,k.K)((a,b,{measure:c})=>a?c.graph.node(a):void 0,"getDagreEdgeNode"),I=(0,d.xY)({prepareLayout:D,measureLayout:E,runLayoutCore:F,paintOptions:{clusterDb:d.ju,getNodes:G,getEdgeNode:H,skipNode:(0,k.K)((a,{measure:b})=>!b.graph.hasNode(a.id),"skipNode"),isCluster:(0,k.K)((a,{measure:b})=>b.graph.hasNode(a.id)&&(b.graph.children(a.id)??[]).length>0,"isCluster")}})}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=8872,exports.ids=[8872],exports.modules={28872:(a,b,c)=>{c.d(b,{createTreeViewServices:()=>d.I});var d=c(47707);c(9824)}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=9006,exports.ids=[9006],exports.modules={19006:(a,b,c)=>{c.d(b,{diagram:()=>q});var d=c(59093),e=c(4328);c(5675),c(12644);var f=c(58715),g=c(95097),h=c(92325),i=(0,h.sB)().RailroadAbnf.parser.LangiumParser,j=(0,g.K)(a=>{let b=a.alternatives.map(k);return 1===b.length?b[0]:{type:"choice",alternatives:b}},"transformAlternation"),k=(0,g.K)(a=>{let b=a.elements.map(m);return 1===b.length?b[0]:{type:"sequence",elements:b}},"transformConcatenation"),l=(0,g.K)(a=>{if(a.includes("*")){let[b,c]=a.split("*");return{min:b?parseInt(b,10):0,max:c?parseInt(c,10):1/0}}let b=parseInt(a,10);return{min:b,max:b}},"parseRepeat"),m=(0,g.K)(a=>{let b=n(a.primary);if(!a.repeat)return b;let{min:c,max:d}=l(a.repeat);return 0===c&&1===d?{type:"optional",element:b}:{type:"repetition",element:b,min:c,max:d}},"transformElement"),n=(0,g.K)(a=>{switch(a.$type){case"AbnfStringLiteral":case"AbnfNumVal":return{type:"terminal",value:a.value};case"AbnfRuleName":return{type:"nonterminal",name:a.name};case"AbnfGroup":return j(a.element);case"AbnfOptionalGroup":return{type:"optional",element:j(a.element)};default:throw Error(`Unsupported ABNF primary node: ${a.$type}`)}},"transformPrimary"),o=(0,g.K)(a=>({name:a.name,definition:j(a.definition)}),"transformRule"),p=(0,g.K)(a=>{(0,e.S)(a,d.db),a.title&&d.db.setTitle(a.title),a.rules.map(a=>d.db.addRule(o(a)))},"populateDb"),q={parser:{parse:(0,g.K)(a=>{d.db.clear(),f.R.debug("[ABNF Parser] Starting Langium parse");let b=i.parse(a);if(b.lexerErrors.length>0||b.parserErrors.length>0)throw new h.zg(b);let c=b.value;f.R.debug("[ABNF Parser] Parsed rules:",c.rules.length),p(c),f.R.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:d.db}},db:d.db,renderer:d.U,styles:d.$}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=9018,exports.ids=[9018],exports.modules={39018:(a,b,c)=>{c.d(b,{createRailroadAbnfServices:()=>d.s});var d=c(23966);c(9824)}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=9047,exports.ids=[9047],exports.modules={99047:(a,b,c)=>{c.d(b,{diagram:()=>af});var d,e=c(5675),f=c(30492);c(29179);var g=c(34950),h=c(12644),i=c(58715),j=c(95097),k=c(69085),l=function(){var a=(0,j.K)(function(a,b,c,d){for(c=c||{},d=a.length;d--;c[a[d]]=b);return c},"o"),b=[1,10,12,14,16,18,19,21,23],c=[2,6],d=[1,3],e=[1,5],f=[1,6],g=[1,7],h=[1,5,10,12,14,16,18,19,21,23,36,37,38],i=[1,25],k=[1,26],l=[1,28],m=[1,29],n=[1,30],o=[1,31],p=[1,32],q=[1,33],r=[1,34],s=[1,35],t=[1,36],u=[1,37],v=[1,43],w=[1,42],x=[1,47],y=[1,50],z=[1,10,12,14,16,18,19,21,23,36,37,38],A=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],B=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],C=[1,65],D=[26,28],E={trace:(0,j.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:(0,j.K)(function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 5:d.setOrientation(f[h]);break;case 9:d.setDiagramTitle(f[h].text.trim());break;case 12:d.setLineData({text:"",type:"text"},f[h]);break;case 13:d.setLineData(f[h-1],f[h]);break;case 14:d.setBarData({text:"",type:"text"},f[h]);break;case 15:d.setBarData(f[h-1],f[h]);break;case 16:this.$=f[h].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=f[h].trim(),d.setAccDescription(this.$);break;case 19:case 29:this.$=f[h-1];break;case 20:case 30:this.$=[f[h-2],...f[h]];break;case 21:case 31:this.$=[f[h]];break;case 22:this.$={value:Number(f[h-1]),label:f[h]};break;case 23:this.$={value:Number(f[h]),label:""};break;case 24:d.setXAxisTitle(f[h]);break;case 25:d.setXAxisTitle(f[h-1]);break;case 26:d.setXAxisTitle({type:"text",text:""});break;case 27:d.setXAxisBand(f[h]);break;case 28:d.setXAxisRangeData(Number(f[h-2]),Number(f[h]));break;case 32:d.setYAxisTitle(f[h]);break;case 33:d.setYAxisTitle(f[h-1]);break;case 34:d.setYAxisTitle({type:"text",text:""});break;case 35:d.setYAxisRangeData(Number(f[h-2]),Number(f[h]));break;case 39:case 40:this.$={text:f[h],type:"text"};break;case 41:this.$={text:f[h],type:"markdown"};break;case 42:this.$=f[h];break;case 43:this.$=f[h-1]+""+f[h]}},"anonymous"),table:[a(b,c,{3:1,4:2,7:4,5:d,36:e,37:f,38:g}),{1:[3]},a(b,c,{4:2,7:4,3:8,5:d,36:e,37:f,38:g}),a(b,c,{4:2,7:4,6:9,3:10,5:d,8:[1,11],36:e,37:f,38:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},a(h,[2,36]),a(h,[2,37]),a(h,[2,38]),{1:[2,1]},a(b,c,{4:2,7:4,3:21,5:d,36:e,37:f,38:g}),{1:[2,3]},a(h,[2,5]),a(b,[2,7],{4:22,36:e,37:f,38:g}),{11:23,30:i,39:24,40:k,41:27,42:l,43:m,44:n,45:o,46:p,47:q,48:r,49:s,50:t,51:u},{11:39,13:38,24:v,29:w,30:i,31:40,32:41,39:24,40:k,41:27,42:l,43:m,44:n,45:o,46:p,47:q,48:r,49:s,50:t,51:u},{11:45,15:44,29:x,30:i,35:46,39:24,40:k,41:27,42:l,43:m,44:n,45:o,46:p,47:q,48:r,49:s,50:t,51:u},{11:49,17:48,24:y,30:i,39:24,40:k,41:27,42:l,43:m,44:n,45:o,46:p,47:q,48:r,49:s,50:t,51:u},{11:52,17:51,24:y,30:i,39:24,40:k,41:27,42:l,43:m,44:n,45:o,46:p,47:q,48:r,49:s,50:t,51:u},{20:[1,53]},{22:[1,54]},a(z,[2,18]),{1:[2,2]},a(z,[2,8]),a(z,[2,9]),a(A,[2,39],{41:55,42:l,43:m,44:n,45:o,46:p,47:q,48:r,49:s,50:t,51:u}),a(A,[2,40]),a(A,[2,41]),a(B,[2,42]),a(B,[2,44]),a(B,[2,45]),a(B,[2,46]),a(B,[2,47]),a(B,[2,48]),a(B,[2,49]),a(B,[2,50]),a(B,[2,51]),a(B,[2,52]),a(B,[2,53]),a(z,[2,10]),a(z,[2,24],{32:41,31:56,24:v,29:w}),a(z,[2,26]),a(z,[2,27]),{33:[1,57]},{11:59,30:i,34:58,39:24,40:k,41:27,42:l,43:m,44:n,45:o,46:p,47:q,48:r,49:s,50:t,51:u},a(z,[2,11]),a(z,[2,32],{35:60,29:x}),a(z,[2,34]),{33:[1,61]},a(z,[2,12]),{17:62,24:y},{25:63,27:64,29:C},a(z,[2,14]),{17:66,24:y},a(z,[2,16]),a(z,[2,17]),a(B,[2,43]),a(z,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},a(z,[2,33]),{29:[1,70]},a(z,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},a(D,[2,23],{30:[1,73]}),a(z,[2,15]),a(z,[2,28]),a(z,[2,29]),{11:59,30:i,34:74,39:24,40:k,41:27,42:l,43:m,44:n,45:o,46:p,47:q,48:r,49:s,50:t,51:u},a(z,[2,35]),a(z,[2,19]),{25:75,27:64,29:C},a(D,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:(0,j.K)(function(a,b){if(b.recoverable)this.trace(a);else{var c=Error(a);throw c.hash=b,c}},"parseError"),parse:(0,j.K)(function(a){var b=this,c=[0],d=[],e=[null],f=[],g=this.table,h="",i=0,k=0,l=0,m=f.slice.call(arguments,1),n=Object.create(this.lexer),o={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(o[p]=this.yy[p]);n.setInput(a,o),o.lexer=n,o.parser=this,void 0===n.yylloc&&(n.yylloc={});var q=n.yylloc;f.push(q);var r=n.options&&n.options.ranges;function s(){var a;return"number"!=typeof(a=d.pop()||n.lex()||1)&&(a instanceof Array&&(a=(d=a).pop()),a=b.symbols_[a]||a),a}"function"==typeof o.parseError?this.parseError=o.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,j.K)(function(a){c.length=c.length-2*a,e.length=e.length-a,f.length=f.length-a},"popStack"),(0,j.K)(s,"lex");for(var t,u,v,w,x,y,z,A,B,C={};;){if(v=c[c.length-1],this.defaultActions[v]?w=this.defaultActions[v]:(null==t&&(t=s()),w=g[v]&&g[v][t]),void 0===w||!w.length||!w[0]){var D="";for(y in B=[],g[v])this.terminals_[y]&&y>2&&B.push("'"+this.terminals_[y]+"'");D=n.showPosition?"Parse error on line "+(i+1)+":\n"+n.showPosition()+"\nExpecting "+B.join(", ")+", got '"+(this.terminals_[t]||t)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==t?"end of input":"'"+(this.terminals_[t]||t)+"'"),this.parseError(D,{text:n.match,token:this.terminals_[t]||t,line:n.yylineno,loc:q,expected:B})}if(w[0]instanceof Array&&w.length>1)throw Error("Parse Error: multiple actions possible at state: "+v+", token: "+t);switch(w[0]){case 1:c.push(t),e.push(n.yytext),f.push(n.yylloc),c.push(w[1]),t=null,u?(t=u,u=null):(k=n.yyleng,h=n.yytext,i=n.yylineno,q=n.yylloc,l>0&&l--);break;case 2:if(z=this.productions_[w[1]][1],C.$=e[e.length-z],C._$={first_line:f[f.length-(z||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(z||1)].first_column,last_column:f[f.length-1].last_column},r&&(C._$.range=[f[f.length-(z||1)].range[0],f[f.length-1].range[1]]),void 0!==(x=this.performAction.apply(C,[h,k,i,o,w[1],e,f].concat(m))))return x;z&&(c=c.slice(0,-1*z*2),e=e.slice(0,-1*z),f=f.slice(0,-1*z)),c.push(this.productions_[w[1]][0]),e.push(C.$),f.push(C._$),A=g[c[c.length-2]][c[c.length-1]],c.push(A);break;case 3:return!0}}return!0},"parse")};function F(){this.yy={}}return E.lexer={EOF:1,parseError:(0,j.K)(function(a,b){if(this.yy.parser)this.yy.parser.parseError(a,b);else throw Error(a)},"parseError"),setInput:(0,j.K)(function(a,b){return this.yy=b||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,j.K)(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.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),a},"input"),unput:(0,j.K)(function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:(0,j.K)(function(){return this._more=!0,this},"more"),reject:(0,j.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,j.K)(function(a){this.unput(this.match.slice(a))},"less"),pastInput:(0,j.K)(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,j.K)(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,j.K)(function(){var a=this.pastInput(),b=Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},"showPosition"),test_match:(0,j.K)(function(a,b){var c,d,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(d=a[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],c=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack)for(var f in e)this[f]=e[f];return!1},"test_match"),next:(0,j.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a,b,c,d,e=this._currentRules(),f=0;f<e.length;f++)if((c=this._input.match(this.rules[e[f]]))&&(!b||c[0].length>b[0].length)){if(b=c,d=f,this.options.backtrack_lexer){if(!1!==(a=this.test_match(c,e[f])))return a;if(!this._backtrack)return!1;b=!1;continue}if(!this.options.flex)break}return b?!1!==(a=this.test_match(b,e[d]))&&a:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,j.K)(function(){var a=this.next();return a||this.lex()},"lex"),begin:(0,j.K)(function(a){this.conditionStack.push(a)},"begin"),popState:(0,j.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,j.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,j.K)(function(a){return(a=this.conditionStack.length-1-Math.abs(a||0))>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:(0,j.K)(function(a){this.begin(a)},"pushState"),stateStackSize:(0,j.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,j.K)(function(a,b,c,d){switch(c){case 0:case 1:case 5:case 44:break;case 2:case 3:return this.popState(),36;case 4:return 36;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:case 26:case 28:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 33;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 29;case 25:return this.popState(),26;case 27:this.pushState("string");break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 44;case 33:return"COLON";case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 45:return 37;case 46:return 38}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}},(0,j.K)(F,"Parser"),F.prototype=E,E.Parser=F,new F}();function m(a){return"bar"===a.type}function n(a){return"band"===a.type}function o(a){return"linear"===a.type}l.parser=l,(0,j.K)(m,"isBarPlot"),(0,j.K)(n,"isBandAxisData"),(0,j.K)(o,"isLinearAxisData");var p=class{constructor(a){this.parentGroup=a}static{(0,j.K)(this,"TextDimensionCalculatorWithFont")}getMaxDimension(a,b){if(!this.parentGroup)return{width:a.reduce((a,b)=>Math.max(b.length,a),0)*b,height:b};let c={width:0,height:0},d=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",b);for(let e of a){let a=(0,f.W6)(d,1,e),g=a?a.width:e.length*b,h=a?a.height:b;c.width=Math.max(c.width,g),c.height=Math.max(c.height,h)}return d.remove(),c}},q=class{constructor(a,b,c,d){this.axisConfig=a,this.title=b,this.textDimensionCalculator=c,this.axisThemeConfig=d,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{(0,j.K)(this,"BaseAxis")}setRange(a){this.range=a,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=a[1]-a[0]:this.boundingRect.width=a[1]-a[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(a){this.axisPosition=a,this.setRange(this.range)}getTickDistance(){let a=this.getRange();return Math.abs(a[0]-a[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(a=>a.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(a){let b=a.height;if(this.axisConfig.showAxisLine&&b>this.axisConfig.axisLineWidth&&(b-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let c=this.getLabelDimension(),d=.2*a.width;this.outerPadding=Math.min(c.width/2,d);let e=c.height;"bottom"===this.axisPosition&&0!==this.normalizedLabelRotationInRad&&(e=Math.max(e,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*c.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*c.height))),e+=2*this.axisConfig.labelPadding,this.labelTextHeight=c.height,e<=b&&(b-=e,this.showLabel=!0)}if(this.axisConfig.showTick&&b>=this.axisConfig.tickLength&&(this.showTick=!0,b-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),c=a.height+2*this.axisConfig.titlePadding;this.titleTextHeight=a.height,c<=b&&(b-=c,this.showTitle=!0)}this.boundingRect.width=a.width,this.boundingRect.height=a.height-b}calculateSpaceIfDrawnVertical(a){let b=a.width;if(this.axisConfig.showAxisLine&&b>this.axisConfig.axisLineWidth&&(b-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let c=this.getLabelDimension(),d=.2*a.height;this.outerPadding=Math.min(c.height/2,d);let e=c.width+2*this.axisConfig.labelPadding;e<=b&&(b-=e,this.showLabel=!0)}if(this.axisConfig.showTick&&b>=this.axisConfig.tickLength&&(this.showTick=!0,b-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let a=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),c=a.height+2*this.axisConfig.titlePadding;this.titleTextHeight=a.height,c<=b&&(b-=c,this.showTitle=!0)}this.boundingRect.width=a.width-b,this.boundingRect.height=a.height}calculateSpace(a){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(a):this.calculateSpaceIfDrawnHorizontally(a),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateOffsetByRotation(a){let b=this.normalizedLabelRotationInRad;return 0===b?0:Math.sin(b)*this.getLabelDimension()[a]/2}getDrawableElementsForLeftAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${b},${this.boundingRect.y} L ${b},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(a),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let b=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);a.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${b},${this.getScaleValue(a)} L ${b-this.axisConfig.tickLength},${this.getScaleValue(a)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),a}getDrawableElementsForBottomAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.y+this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${b} L ${this.boundingRect.x+this.boundingRect.width},${b}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.getScaleValue(a)+this.calculateOffsetByRotation("height"),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation("width")),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:180*this.normalizedLabelRotationInRad/Math.PI,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let b=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);a.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${b} L ${this.getScaleValue(a)},${b+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),a}getDrawableElementsForTopAxis(){let a=[];if(this.showAxisLine){let b=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;a.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${b} L ${this.boundingRect.x+this.boundingRect.width},${b}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&a.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(a=>({text:a.toString(),x:this.getScaleValue(a),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let b=this.boundingRect.y;a.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(a=>({path:`M ${this.getScaleValue(a)},${b+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(a)},${b+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&a.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),a}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}},r=class extends q{static{(0,j.K)(this,"BandAxis")}constructor(a,b,c,d,e){super(a,d,e,b),this.categories=c,this.scale=(0,k.WH)().domain(this.categories).range(this.getRange())}setRange(a){super.setRange(a)}recalculateScale(){this.scale=(0,k.WH)().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),i.R.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(a){return this.scale(a)??this.getRange()[0]}},s=class extends q{static{(0,j.K)(this,"LinearAxis")}constructor(a,b,c,d,e){super(a,d,e,b),this.domain=c,this.scale=(0,k.m4Y)().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let a=[...this.domain];"left"===this.axisPosition&&a.reverse(),this.scale=(0,k.m4Y)().domain(a).range(this.getRange())}getScaleValue(a){return this.scale(a)}};function t(a,b,c,d){let e=new p(d);return n(a)?new r(b,c,a.categories,a.title,e):new s(b,c,[a.min,a.max],a.title,e)}(0,j.K)(t,"getAxis");var u=class{constructor(a,b,c,d){this.textDimensionCalculator=a,this.chartConfig=b,this.chartData=c,this.chartThemeConfig=d,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{(0,j.K)(this,"ChartTitle")}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){let b=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),c=Math.max(b.width,a.width),d=b.height+2*this.chartConfig.titlePadding;return b.width<=c&&b.height<=d&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=c,this.boundingRect.height=d,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let a=[];return this.showChartTitle&&a.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),a}};function v(a,b,c,d){return new u(new p(d),a,b,c)}function w(a){return{fontSize:a,markerSize:.75*a,markerSpacing:.35*a,itemSpacing:.5*a}}(0,j.K)(v,"getChartTitleComponent"),(0,j.K)(w,"getLegendLayout");var x=class{constructor(a,b,c,d){this.textDimensionCalculator=a,this.chartConfig=b,this.chartData=c,this.chartThemeConfig=d,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{(0,j.K)(this,"ChartLegend")}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(a=>a.title):[],0===this.visiblePlots.length)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:b,markerSize:c,markerSpacing:d,itemSpacing:e}=w(this.chartConfig.legendFontSize),f=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(a=>a.title),b),g=2*this.chartConfig.legendPadding+c+d+f.width,h=2*this.chartConfig.legendPadding+this.visiblePlots.length*b+(this.visiblePlots.length-1)*e;return g<=a.width&&h<=a.height?(this.boundingRect.width=g,this.boundingRect.height=h):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(0===this.visiblePlots.length)return[];let{fontSize:a,markerSize:b,markerSpacing:c,itemSpacing:d}=w(this.chartConfig.legendFontSize),e=a+d,f=this.boundingRect.x+this.chartConfig.legendPadding,g=this.boundingRect.y+this.chartConfig.legendPadding,h=[],i=[];for(let[a,c]of this.visiblePlots.entries())if(m(c))h.push({x:f,y:g+a*e,width:b,height:b,fill:c.fill,strokeFill:c.fill,strokeWidth:0});else{let d=g+a*e+b/2;i.push({path:`M ${f},${d} L ${f+b},${d}`,strokeFill:c.strokeFill,strokeWidth:c.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:h},{groupTexts:["legend","markers"],type:"path",data:i},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((d,h)=>({text:d.title,x:f+b+c,y:g+h*e+b/2,fill:this.chartThemeConfig.legendTextColor,fontSize:a,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function y(a,b,c,d){return new x(new p(d),a,b,c)}(0,j.K)(y,"getChartLegendComponent");var z=class{constructor(a,b,c,d,e){this.plotData=a,this.xAxis=b,this.yAxis=c,this.orientation=d,this.plotIndex=e}static{(0,j.K)(this,"LinePlot")}getDrawableElement(){let a,b=this.plotData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]);if(!(a="horizontal"===this.orientation?(0,k.n8j)().y(a=>a[0]).x(a=>a[1])(b):(0,k.n8j)().x(a=>a[0]).y(a=>a[1])(b)))return[];let c=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:a,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let a=[];for(let[c,[d,e]]of b.entries()){let b=this.plotData.pointLabels[c];b&&("horizontal"===this.orientation?a.push({x:e+10,y:d,text:b,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0}):a.push({x:d,y:e-10,text:b,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0}))}a.length>0&&c.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:a})}return c}},A=class{constructor(a,b,c,d,e,f){this.barData=a,this.boundingRect=b,this.xAxis=c,this.yAxis=d,this.orientation=e,this.plotIndex=f}static{(0,j.K)(this,"BarPlot")}getDrawableElement(){let a=this.barData.data.map(a=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),b=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),c=b/2;return"horizontal"===this.orientation?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:a.map(a=>({x:this.boundingRect.x,y:a[0]-c,height:b,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:a.map(a=>({x:a[0]-c,y:a[1],width:b,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},B=class{constructor(a,b,c){this.chartConfig=a,this.chartData=b,this.chartThemeConfig=c,this.boundingRect={x:0,y:0,width:0,height:0}}static{(0,j.K)(this,"BasePlot")}setAxes(a,b){this.xAxis=a,this.yAxis=b}setBoundingBoxXY(a){this.boundingRect.x=a.x,this.boundingRect.y=a.y}calculateSpace(a){return this.boundingRect.width=a.width,this.boundingRect.height=a.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");let a=[];for(let[b,c]of this.chartData.plots.entries())switch(c.type){case"line":{let d=new z(c,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,b);a.push(...d.getDrawableElement())}break;case"bar":{let d=new A(c,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,b);a.push(...d.getDrawableElement())}}return a}};function C(a,b,c){return new B(a,b,c)}(0,j.K)(C,"getPlotComponent");var D=class{constructor(a,b,c,d){this.chartConfig=a,this.chartData=b,this.componentStore={title:v(a,b,c,d),plot:C(a,b,c),legend:y(a,b,c,d),xAxis:t(b.xAxis,a.xAxis,{titleColor:c.xAxisTitleColor,labelColor:c.xAxisLabelColor,tickColor:c.xAxisTickColor,axisLineColor:c.xAxisLineColor},d),yAxis:t(b.yAxis,a.yAxis,{titleColor:c.yAxisTitleColor,labelColor:c.yAxisLabelColor,tickColor:c.yAxisTickColor,axisLineColor:c.yAxisLineColor},d)}}static{(0,j.K)(this,"Orchestrator")}calculateVerticalSpace(){let a=this.chartConfig.width,b=this.chartConfig.height,c=0,d=0,e={width:0,height:0},f=Math.floor(a*this.chartConfig.plotReservedSpacePercent/100),g=Math.floor(b*this.chartConfig.plotReservedSpacePercent/100),h=this.componentStore.plot.calculateSpace({width:f,height:g});a-=h.width,b-=h.height,d=(h=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:b})).height,b-=h.height,this.componentStore.xAxis.setAxisPosition("bottom"),h=this.componentStore.xAxis.calculateSpace({width:a,height:b}),b-=h.height,this.componentStore.yAxis.setAxisPosition("left"),c=(h=this.componentStore.yAxis.calculateSpace({width:a,height:b})).width,a-=h.width,e=this.componentStore.legend.calculateSpace({width:a,height:g}),(a-=e.width)>0&&(f+=a,a=0),b>0&&(g+=b,b=0),this.componentStore.plot.calculateSpace({width:f,height:g}),this.componentStore.plot.setBoundingBoxXY({x:c,y:d}),this.componentStore.legend.setBoundingBoxXY({x:c+f,y:d+Math.max((g-e.height)/2,0)}),this.componentStore.xAxis.setRange([c,c+f]),this.componentStore.xAxis.setBoundingBoxXY({x:c,y:d+g}),this.componentStore.yAxis.setRange([d,d+g]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:d}),this.chartData.plots.some(a=>m(a))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let a=this.chartConfig.width,b=this.chartConfig.height,c=0,d=0,e=0,f={width:0,height:0},g=Math.floor(a*this.chartConfig.plotReservedSpacePercent/100),h=Math.floor(b*this.chartConfig.plotReservedSpacePercent/100),i=this.componentStore.plot.calculateSpace({width:g,height:h});a-=i.width,b-=i.height,c=(i=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:b})).height,b-=i.height,this.componentStore.xAxis.setAxisPosition("left"),i=this.componentStore.xAxis.calculateSpace({width:a,height:b}),a-=i.width,d=i.width,this.componentStore.yAxis.setAxisPosition("top"),i=this.componentStore.yAxis.calculateSpace({width:a,height:b}),b-=i.height,e=c+i.height,f=this.componentStore.legend.calculateSpace({width:a,height:h}),(a-=f.width)>0&&(g+=a,a=0),b>0&&(h+=b,b=0),this.componentStore.plot.calculateSpace({width:g,height:h}),this.componentStore.plot.setBoundingBoxXY({x:d,y:e}),this.componentStore.legend.setBoundingBoxXY({x:d+g,y:e+Math.max((h-f.height)/2,0)}),this.componentStore.yAxis.setRange([d,d+g]),this.componentStore.yAxis.setBoundingBoxXY({x:d,y:c}),this.componentStore.xAxis.setRange([e,e+h]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:e}),this.chartData.plots.some(a=>m(a))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let a=[];for(let b of(this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis),Object.values(this.componentStore)))a.push(...b.getDrawableElements());return a}},E=class{static{(0,j.K)(this,"XYChartBuilder")}static build(a,b,c,d){return new D(a,b,c,d).getDrawableElement()}},F=0,G=N(),H=M(),I=O(),J=H.plotColorPalette.split(",").map(a=>a.trim()),K=!1,L=!1;function M(){let a=(0,h.P$)(),b=(0,h.zj)();return(0,g.$t)(a.xyChart,b.themeVariables.xyChart)}function N(){let a=(0,h.zj)();return(0,g.$t)(h.UI.xyChart,a.xyChart)}function O(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function P(a){let b=(0,h.zj)();return(0,h.jZ)(a.trim(),b)}function Q(a){d=a}function R(a){"horizontal"===a?G.chartOrientation="horizontal":G.chartOrientation="vertical"}function S(a){I.xAxis.title=P(a.text)}function T(a,b){I.xAxis={type:"linear",title:I.xAxis.title,min:a,max:b},K=!0}function U(a){I.xAxis={type:"band",title:I.xAxis.title,categories:a.map(a=>P(a.text))},K=!0}function V(a){I.yAxis.title=P(a.text)}function W(a,b){I.yAxis={type:"linear",title:I.yAxis.title,min:a,max:b},L=!0}function X(a){let b=Math.min(...a),c=Math.max(...a),d=o(I.yAxis)?I.yAxis.min:1/0,e=o(I.yAxis)?I.yAxis.max:-1/0;I.yAxis={type:"linear",title:I.yAxis.title,min:Math.min(d,b),max:Math.max(e,c)}}function Y(a){let b=[];if(0===a.length)return b;if(K||T(Math.min(o(I.xAxis)?I.xAxis.min:1/0,1),Math.max(o(I.xAxis)?I.xAxis.max:-1/0,a.length)),n(I.xAxis)&&a.length>I.xAxis.categories.length&&(a=a.slice(0,I.xAxis.categories.length)),L||X(a),n(I.xAxis)&&(b=I.xAxis.categories.map((b,c)=>[b,a[c]])),o(I.xAxis)){let c=I.xAxis.min,d=I.xAxis.max;if(1===a.length)b=[[`${c}`,a[0]]];else{let e=(d-c)/(a.length-1);b=a.map((a,b)=>[`${c+b*e}`,a])}}return b}function Z(a){return J[0===a?0:a%J.length]}function $(a,b){let c=b.map(a=>a.value),d=b.map(a=>a.label?P(a.label):""),e=Y(c),f=d.some(a=>""!==a);I.plots.push({type:"line",title:P(a.text),strokeFill:Z(F),strokeWidth:2,data:e,...f?{pointLabels:d}:{}}),F++}function _(a,b){let c=Y(b.map(a=>a.value));I.plots.push({type:"bar",title:P(a.text),fill:Z(F),data:c}),F++}function aa(){if(0===I.plots.length)throw Error("No Plot to render, please provide a plot with some data");return I.title=(0,h.ab)(),E.build(G,I,H,d)}function ab(){return H}function ac(){return G}function ad(){return I}(0,j.K)(M,"getChartDefaultThemeConfig"),(0,j.K)(N,"getChartDefaultConfig"),(0,j.K)(O,"getChartDefaultData"),(0,j.K)(P,"textSanitizer"),(0,j.K)(Q,"setTmpSVGG"),(0,j.K)(R,"setOrientation"),(0,j.K)(S,"setXAxisTitle"),(0,j.K)(T,"setXAxisRangeData"),(0,j.K)(U,"setXAxisBand"),(0,j.K)(V,"setYAxisTitle"),(0,j.K)(W,"setYAxisRangeData"),(0,j.K)(X,"setYAxisRangeFromPlotData"),(0,j.K)(Y,"transformDataWithoutCategory"),(0,j.K)(Z,"getPlotColorFromPalette"),(0,j.K)($,"setLineData"),(0,j.K)(_,"setBarData"),(0,j.K)(aa,"getDrawableElem"),(0,j.K)(ab,"getChartThemeConfig"),(0,j.K)(ac,"getChartConfig"),(0,j.K)(ad,"getXYChartData");var ae={getDrawableElem:aa,clear:(0,j.K)(function(){(0,h.IU)(),F=0,G=N(),I=O(),J=(H=M()).plotColorPalette.split(",").map(a=>a.trim()),K=!1,L=!1},"clear"),setAccTitle:h.SV,getAccTitle:h.iN,setDiagramTitle:h.ke,getDiagramTitle:h.ab,getAccDescription:h.m7,setAccDescription:h.EI,setOrientation:R,setXAxisTitle:S,setXAxisRangeData:T,setXAxisBand:U,setYAxisTitle:V,setYAxisRangeData:W,setLineData:$,setBarData:_,setTmpSVGG:Q,getChartThemeConfig:ab,getChartConfig:ac,getXYChartData:ad},af={parser:l,db:ae,renderer:{draw:(0,j.K)((a,b,c,d)=>{let f=d.db,g=f.getChartThemeConfig(),k=f.getChartConfig(),l=f.getXYChartData().plots[0].data.map(a=>a[1]);function m(a){return"top"===a?"text-before-edge":"middle"}function n(a){return"left"===a?"start":"right"===a?"end":"middle"}function o(a){return`translate(${a.x}, ${a.y}) rotate(${a.rotation||0})`}(0,j.K)(m,"getDominantBaseLine"),(0,j.K)(n,"getTextAnchor"),(0,j.K)(o,"getTextTransformation"),i.R.debug("Rendering xychart chart\n"+a);let p=(0,e.D)(b),q=p.append("g").attr("class","main"),r=q.append("rect").attr("width",k.width).attr("height",k.height).attr("class","background");(0,h.a$)(p,k.height,k.width,!0),p.attr("viewBox",`0 0 ${k.width} ${k.height}`),r.attr("fill",g.backgroundColor),f.setTmpSVGG(p.append("g").attr("class","mermaid-tmp-group"));let s=f.getDrawableElem(),t={};function u(a){let b=q,c="";for(let[d]of a.entries()){let e=q;d>0&&t[c]&&(e=t[c]),c+=a[d],(b=t[c])||(b=t[c]=e.append("g").attr("class",a[d]))}return b}for(let a of((0,j.K)(u,"getGroup"),s)){if(0===a.data.length)continue;let b=u(a.groupTexts);switch(a.type){case"rect":if(b.selectAll("rect").data(a.data).enter().append("rect").attr("x",a=>a.x).attr("y",a=>a.y).attr("width",a=>a.width).attr("height",a=>a.height).attr("fill",a=>a.fill).attr("stroke",a=>a.strokeFill).attr("stroke-width",a=>a.strokeWidth),k.showDataLabel){let c=k.showDataLabelOutsideBar;if("horizontal"===k.chartOrientation){let d=function(a,b){let{data:c,label:d}=a;return b*d.length*e<=c.width-f};(0,j.K)(d,"fitsHorizontally");let e=.7,f=10,h=a.data.map((a,b)=>({data:a,label:l[b].toString()})).filter(a=>a.data.width>0&&a.data.height>0),i=Math.floor(Math.min(...h.map(a=>{let{data:b}=a,c=.7*b.height;for(;!d(a,c)&&c>0;)c-=1;return c}))),k=(0,j.K)(a=>c?a.data.x+a.data.width+f:a.data.x+a.data.width-f,"determineLabelXPosition");b.selectAll("text").data(h).enter().append("text").attr("x",k).attr("y",a=>a.data.y+a.data.height/2).attr("text-anchor",c?"start":"end").attr("dominant-baseline","middle").attr("fill",g.dataLabelColor).attr("font-size",`${i}px`).text(a=>a.label)}else{let d=function(a,b,c){let{data:d,label:e}=a,f=b*e.length*.7,g=d.x+d.width/2,h=g-f/2,i=g+f/2,j=h>=d.x&&i<=d.x+d.width,k=d.y+c+b<=d.y+d.height;return j&&k};(0,j.K)(d,"fitsInBar");let e=a.data.map((a,b)=>({data:a,label:l[b].toString()})).filter(a=>a.data.width>0&&a.data.height>0),f=Math.floor(Math.min(...e.map(a=>{let{data:b,label:c}=a,e=b.width/(.7*c.length);for(;!d(a,e,10)&&e>0;)e-=1;return e}))),h=(0,j.K)(a=>c?a.data.y-10:a.data.y+10,"determineLabelYPosition");b.selectAll("text").data(e).enter().append("text").attr("x",a=>a.data.x+a.data.width/2).attr("y",h).attr("text-anchor","middle").attr("dominant-baseline",c?"auto":"hanging").attr("fill",g.dataLabelColor).attr("font-size",`${f}px`).text(a=>a.label)}}break;case"text":b.selectAll("text").data(a.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",a=>a.fill).attr("font-size",a=>a.fontSize).attr("dominant-baseline",a=>m(a.verticalPos)).attr("text-anchor",a=>n(a.horizontalPos)).attr("transform",a=>o(a)).text(a=>a.text);break;case"path":b.selectAll("path").data(a.data).enter().append("path").attr("d",a=>a.path).attr("fill",a=>a.fill?a.fill:"none").attr("stroke",a=>a.strokeFill).attr("stroke-width",a=>a.strokeWidth)}}},"draw")}}}};