pi-app 0.7.2 → 0.7.3

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 (278) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +3 -3
  3. package/.next/build-manifest.json +4 -4
  4. package/.next/next-server.js.nft.json +1 -1
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/react-loadable-manifest.json +17 -17
  7. package/.next/required-server-files.js +6 -6
  8. package/.next/required-server-files.json +6 -6
  9. package/.next/server/app/_global-error/page.js +3 -3
  10. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  11. package/.next/server/app/_global-error.html +1 -1
  12. package/.next/server/app/_global-error.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  15. package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  16. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  17. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  18. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  19. package/.next/server/app/_not-found/page.js +2 -2
  20. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  21. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  22. package/.next/server/app/_not-found.html +1 -1
  23. package/.next/server/app/_not-found.rsc +2 -2
  24. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  25. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  26. package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  27. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  28. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  29. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  30. package/.next/server/app/api/agent/[id]/events/route.js +2 -2
  31. package/.next/server/app/api/agent/[id]/events/route.js.nft.json +1 -1
  32. package/.next/server/app/api/agent/[id]/events/route_client-reference-manifest.js +1 -1
  33. package/.next/server/app/api/agent/[id]/export.html/route.js +1 -1
  34. package/.next/server/app/api/agent/[id]/export.html/route.js.nft.json +1 -1
  35. package/.next/server/app/api/agent/[id]/export.html/route_client-reference-manifest.js +1 -1
  36. package/.next/server/app/api/agent/[id]/route.js +1 -1
  37. package/.next/server/app/api/agent/[id]/route.js.nft.json +1 -1
  38. package/.next/server/app/api/agent/[id]/route_client-reference-manifest.js +1 -1
  39. package/.next/server/app/api/agent/new/route.js +1 -1
  40. package/.next/server/app/api/agent/new/route.js.nft.json +1 -1
  41. package/.next/server/app/api/agent/new/route_client-reference-manifest.js +1 -1
  42. package/.next/server/app/api/auth/all-providers/route.js +1 -1
  43. package/.next/server/app/api/auth/all-providers/route.js.nft.json +1 -1
  44. package/.next/server/app/api/auth/all-providers/route_client-reference-manifest.js +1 -1
  45. package/.next/server/app/api/auth/api-key/[provider]/route.js +1 -1
  46. package/.next/server/app/api/auth/api-key/[provider]/route.js.nft.json +1 -1
  47. package/.next/server/app/api/auth/api-key/[provider]/route_client-reference-manifest.js +1 -1
  48. package/.next/server/app/api/auth/login/[provider]/route.js +2 -2
  49. package/.next/server/app/api/auth/login/[provider]/route.js.nft.json +1 -1
  50. package/.next/server/app/api/auth/login/[provider]/route_client-reference-manifest.js +1 -1
  51. package/.next/server/app/api/auth/logout/[provider]/route.js +1 -1
  52. package/.next/server/app/api/auth/logout/[provider]/route.js.nft.json +1 -1
  53. package/.next/server/app/api/auth/logout/[provider]/route_client-reference-manifest.js +1 -1
  54. package/.next/server/app/api/auth/providers/route.js +1 -1
  55. package/.next/server/app/api/auth/providers/route.js.nft.json +1 -1
  56. package/.next/server/app/api/auth/providers/route_client-reference-manifest.js +1 -1
  57. package/.next/server/app/api/cwd/validate/route.js +1 -1
  58. package/.next/server/app/api/cwd/validate/route_client-reference-manifest.js +1 -1
  59. package/.next/server/app/api/default-cwd/route.js +1 -1
  60. package/.next/server/app/api/default-cwd/route_client-reference-manifest.js +1 -1
  61. package/.next/server/app/api/extensions/route.js +1 -1
  62. package/.next/server/app/api/extensions/route.js.nft.json +1 -1
  63. package/.next/server/app/api/extensions/route_client-reference-manifest.js +1 -1
  64. package/.next/server/app/api/files/[...path]/route.js +1 -1
  65. package/.next/server/app/api/files/[...path]/route.js.nft.json +1 -1
  66. package/.next/server/app/api/files/[...path]/route_client-reference-manifest.js +1 -1
  67. package/.next/server/app/api/files/stage/route.js +1 -1
  68. package/.next/server/app/api/files/stage/route_client-reference-manifest.js +1 -1
  69. package/.next/server/app/api/git-branch/route.js +1 -1
  70. package/.next/server/app/api/git-branch/route_client-reference-manifest.js +1 -1
  71. package/.next/server/app/api/health/route.js +1 -1
  72. package/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
  73. package/.next/server/app/api/history/[id]/route.js +2 -2
  74. package/.next/server/app/api/history/[id]/route.js.nft.json +1 -1
  75. package/.next/server/app/api/history/[id]/route_client-reference-manifest.js +1 -1
  76. package/.next/server/app/api/history/route.js +2 -2
  77. package/.next/server/app/api/history/route.js.nft.json +1 -1
  78. package/.next/server/app/api/history/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/home/route.js +1 -1
  80. package/.next/server/app/api/home/route_client-reference-manifest.js +1 -1
  81. package/.next/server/app/api/models/route.js +1 -1
  82. package/.next/server/app/api/models/route.js.nft.json +1 -1
  83. package/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
  84. package/.next/server/app/api/models-config/route.js +1 -1
  85. package/.next/server/app/api/models-config/route.js.nft.json +1 -1
  86. package/.next/server/app/api/models-config/route_client-reference-manifest.js +1 -1
  87. package/.next/server/app/api/models-config/test/route.js +1 -1
  88. package/.next/server/app/api/models-config/test/route.js.nft.json +1 -1
  89. package/.next/server/app/api/models-config/test/route_client-reference-manifest.js +1 -1
  90. package/.next/server/app/api/notifications/agent-end/route.js +3 -3
  91. package/.next/server/app/api/notifications/agent-end/route_client-reference-manifest.js +1 -1
  92. package/.next/server/app/api/preferences/route.js +1 -1
  93. package/.next/server/app/api/preferences/route_client-reference-manifest.js +1 -1
  94. package/.next/server/app/api/product-sessions/[id]/route.js +1 -1
  95. package/.next/server/app/api/product-sessions/[id]/route.js.nft.json +1 -1
  96. package/.next/server/app/api/product-sessions/[id]/route_client-reference-manifest.js +1 -1
  97. package/.next/server/app/api/push/route.js +2 -2
  98. package/.next/server/app/api/push/route_client-reference-manifest.js +1 -1
  99. package/.next/server/app/api/remote/audit/route.js +1 -1
  100. package/.next/server/app/api/remote/audit/route_client-reference-manifest.js +1 -1
  101. package/.next/server/app/api/remote/client/route.js +1 -1
  102. package/.next/server/app/api/remote/client/route_client-reference-manifest.js +1 -1
  103. package/.next/server/app/api/remote/pair/route.js +1 -1
  104. package/.next/server/app/api/remote/pair/route_client-reference-manifest.js +1 -1
  105. package/.next/server/app/api/remote/route.js +1 -1
  106. package/.next/server/app/api/remote/route_client-reference-manifest.js +1 -1
  107. package/.next/server/app/api/scene-overrides/[sceneId]/route.js +2 -2
  108. package/.next/server/app/api/scene-overrides/[sceneId]/route_client-reference-manifest.js +1 -1
  109. package/.next/server/app/api/scene-overrides/export/route.js +4 -4
  110. package/.next/server/app/api/scene-overrides/export/route_client-reference-manifest.js +1 -1
  111. package/.next/server/app/api/scene-overrides/import/route.js +2 -2
  112. package/.next/server/app/api/scene-overrides/import/route_client-reference-manifest.js +1 -1
  113. package/.next/server/app/api/scene-overrides/route.js +1 -1
  114. package/.next/server/app/api/scene-overrides/route_client-reference-manifest.js +1 -1
  115. package/.next/server/app/api/sessions/[id]/context/route.js +2 -2
  116. package/.next/server/app/api/sessions/[id]/context/route.js.nft.json +1 -1
  117. package/.next/server/app/api/sessions/[id]/context/route_client-reference-manifest.js +1 -1
  118. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  119. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
  120. package/.next/server/app/api/sessions/[id]/route_client-reference-manifest.js +1 -1
  121. package/.next/server/app/api/sessions/[id]/share/route.js +1 -1
  122. package/.next/server/app/api/sessions/[id]/share/route_client-reference-manifest.js +1 -1
  123. package/.next/server/app/api/sessions/new/route.js +1 -1
  124. package/.next/server/app/api/sessions/new/route_client-reference-manifest.js +1 -1
  125. package/.next/server/app/api/sessions/route.js +2 -2
  126. package/.next/server/app/api/sessions/route.js.nft.json +1 -1
  127. package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
  128. package/.next/server/app/api/settings/default-model/route.js +1 -1
  129. package/.next/server/app/api/settings/default-model/route.js.nft.json +1 -1
  130. package/.next/server/app/api/settings/default-model/route_client-reference-manifest.js +1 -1
  131. package/.next/server/app/api/share/[token]/route.js +1 -1
  132. package/.next/server/app/api/share/[token]/route.js.nft.json +1 -1
  133. package/.next/server/app/api/share/[token]/route_client-reference-manifest.js +1 -1
  134. package/.next/server/app/api/skills/install/route.js +1 -1
  135. package/.next/server/app/api/skills/install/route_client-reference-manifest.js +1 -1
  136. package/.next/server/app/api/skills/route.js +2 -2
  137. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  138. package/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  139. package/.next/server/app/api/skills/search/route.js +1 -1
  140. package/.next/server/app/api/skills/search/route_client-reference-manifest.js +1 -1
  141. package/.next/server/app/api/usage/route.js +2 -2
  142. package/.next/server/app/api/usage/route.js.nft.json +1 -1
  143. package/.next/server/app/api/usage/route_client-reference-manifest.js +1 -1
  144. package/.next/server/app/api/web-fetch/install-agent-browser/route.js +2 -2
  145. package/.next/server/app/api/web-fetch/install-agent-browser/route_client-reference-manifest.js +1 -1
  146. package/.next/server/app/api/web-fetch/preferences/route.js +1 -1
  147. package/.next/server/app/api/web-fetch/preferences/route_client-reference-manifest.js +1 -1
  148. package/.next/server/app/api/web-fetch/status/route.js +1 -1
  149. package/.next/server/app/api/web-fetch/status/route_client-reference-manifest.js +1 -1
  150. package/.next/server/app/favicon.ico/route.js +1 -1
  151. package/.next/server/app/index.html +1 -1
  152. package/.next/server/app/index.rsc +3 -3
  153. package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  154. package/.next/server/app/index.segments/_full.segment.rsc +3 -3
  155. package/.next/server/app/index.segments/_head.segment.rsc +1 -1
  156. package/.next/server/app/index.segments/_index.segment.rsc +2 -2
  157. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  158. package/.next/server/app/page.js +5 -5
  159. package/.next/server/app/page.js.nft.json +1 -1
  160. package/.next/server/app/page_client-reference-manifest.js +1 -1
  161. package/.next/server/app/share/[token]/page.js +2 -2
  162. package/.next/server/app/share/[token]/page.js.nft.json +1 -1
  163. package/.next/server/app/share/[token]/page_client-reference-manifest.js +1 -1
  164. package/.next/server/app-paths-manifest.json +3 -3
  165. package/.next/server/chunks/1381.js +1 -1
  166. package/.next/server/chunks/1703.js +1 -1
  167. package/.next/server/chunks/319.js +3 -3
  168. package/.next/server/chunks/3284.js +1 -0
  169. package/.next/server/chunks/3379.js +1 -1
  170. package/.next/server/chunks/3493.js +1 -1
  171. package/.next/server/chunks/4035.js +1 -1
  172. package/.next/server/chunks/4367.js +1 -1
  173. package/.next/server/chunks/4406.js +1 -1
  174. package/.next/server/chunks/4980.js +1 -1
  175. package/.next/server/chunks/5293.js +1 -1
  176. package/.next/server/chunks/5797.js +1 -1
  177. package/.next/server/chunks/5851.js +1 -1
  178. package/.next/server/chunks/6206.js +1 -1
  179. package/.next/server/chunks/7270.js +1 -1
  180. package/.next/server/chunks/8916.js +1 -1
  181. package/.next/server/chunks/9280.js +62 -62
  182. package/.next/server/chunks/9315.js +1 -1
  183. package/.next/server/chunks/9537.js +90 -0
  184. package/.next/server/chunks/966.js +1 -1
  185. package/.next/server/middleware-build-manifest.js +1 -1
  186. package/.next/server/middleware-manifest.json +5 -5
  187. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  188. package/.next/server/middleware.js +2 -2
  189. package/.next/server/next-font-manifest.js +1 -1
  190. package/.next/server/next-font-manifest.json +1 -1
  191. package/.next/server/pages/404.html +1 -1
  192. package/.next/server/pages/500.html +1 -1
  193. package/.next/server/server-reference-manifest.json +1 -1
  194. package/.next/static/chunks/{0b9a0da7.915b07ceecd18755.js → 0b9a0da7.9075af772487e743.js} +2 -2
  195. package/.next/static/chunks/{1852.4afb7f7ef17737c1.js → 1852.5543122f11aa7fed.js} +1 -1
  196. package/.next/static/chunks/{2419.fb50b8bb1874d556.js → 2419.347fdfe3c170854d.js} +1 -1
  197. package/.next/static/chunks/{3079.90c6008a4bba4ee1.js → 3079.4c511fa1144e3adf.js} +1 -1
  198. package/.next/static/chunks/{3308.115707ee3fd446be.js → 3308.1964a3fa76cba02f.js} +16 -16
  199. package/.next/static/chunks/{3325.01cdecedf0fb6d62.js → 3325.e4bfe1ca657f3b5b.js} +1 -1
  200. package/.next/static/chunks/3506.2a7eaa08b9f55337.js +90 -0
  201. package/.next/static/chunks/{394.2860c5a408dc8801.js → 394.91597771688df6d0.js} +1 -1
  202. package/.next/static/chunks/{3997.42e942ad02cc6f4b.js → 3997.1009c06025691712.js} +1 -1
  203. package/.next/static/chunks/{5034.cbaaf32db6d2086d.js → 5034.8f16c3fa3ce75411.js} +1 -1
  204. package/.next/static/chunks/{5074.fc63ed48a3b1a61f.js → 5074.d16651da01ec4e02.js} +1 -1
  205. package/.next/static/chunks/{6696.c05e02f280b8186b.js → 6696.a41aec266e657d54.js} +2 -2
  206. package/.next/static/chunks/{7343.9574ac32b87d5050.js → 7343.9fbb58204d8ac681.js} +1 -1
  207. package/.next/static/chunks/{7547.8caf31f3b18ded65.js → 7547.58bda8a2aabba0d4.js} +1 -1
  208. package/.next/static/chunks/{8489.fd81b5e4de9f8431.js → 8489.45f22859734f514f.js} +1 -1
  209. package/.next/static/chunks/9b0008ae.46f64400562a173e.js +2 -0
  210. package/.next/static/chunks/app/_not-found/page-433674846cbe1a12.js +1 -0
  211. package/.next/static/chunks/app/{layout-e74bc51db18cfddb.js → layout-dee60f48aba33b70.js} +1 -1
  212. package/.next/static/chunks/app/{page-16d9d8fcb33b2a19.js → page-9ea7c5df0546e3fb.js} +2 -2
  213. package/.next/static/chunks/app/share/[token]/{page-801df8f03e50e9cc.js → page-d022d0fda2951611.js} +1 -1
  214. package/.next/static/chunks/{main-app-4543b2d36de0bf44.js → main-app-a8eaf0472b160e89.js} +1 -1
  215. package/.next/static/chunks/next/dist/client/components/builtin/global-error-e9772fcbe090eed4.js +1 -0
  216. package/.next/static/chunks/webpack-3c29a7a6de61bd6b.js +1 -0
  217. package/.next/trace +82 -6
  218. package/.next/trace-build +1 -1
  219. package/.next/types/app/api/agent/[id]/events/route.ts +1 -1
  220. package/.next/types/app/api/agent/[id]/export.html/route.ts +1 -1
  221. package/.next/types/app/api/agent/[id]/route.ts +1 -1
  222. package/.next/types/app/api/agent/new/route.ts +1 -1
  223. package/.next/types/app/api/auth/all-providers/route.ts +1 -1
  224. package/.next/types/app/api/auth/api-key/[provider]/route.ts +1 -1
  225. package/.next/types/app/api/auth/login/[provider]/route.ts +1 -1
  226. package/.next/types/app/api/auth/logout/[provider]/route.ts +1 -1
  227. package/.next/types/app/api/auth/providers/route.ts +1 -1
  228. package/.next/types/app/api/cwd/validate/route.ts +1 -1
  229. package/.next/types/app/api/default-cwd/route.ts +1 -1
  230. package/.next/types/app/api/extensions/route.ts +1 -1
  231. package/.next/types/app/api/files/[...path]/route.ts +1 -1
  232. package/.next/types/app/api/files/stage/route.ts +1 -1
  233. package/.next/types/app/api/git-branch/route.ts +1 -1
  234. package/.next/types/app/api/health/route.ts +1 -1
  235. package/.next/types/app/api/history/[id]/route.ts +1 -1
  236. package/.next/types/app/api/history/route.ts +1 -1
  237. package/.next/types/app/api/home/route.ts +1 -1
  238. package/.next/types/app/api/models/route.ts +1 -1
  239. package/.next/types/app/api/models-config/route.ts +1 -1
  240. package/.next/types/app/api/models-config/test/route.ts +1 -1
  241. package/.next/types/app/api/notifications/agent-end/route.ts +1 -1
  242. package/.next/types/app/api/preferences/route.ts +1 -1
  243. package/.next/types/app/api/product-sessions/[id]/route.ts +1 -1
  244. package/.next/types/app/api/push/route.ts +1 -1
  245. package/.next/types/app/api/remote/audit/route.ts +1 -1
  246. package/.next/types/app/api/remote/client/route.ts +1 -1
  247. package/.next/types/app/api/remote/pair/route.ts +1 -1
  248. package/.next/types/app/api/remote/route.ts +1 -1
  249. package/.next/types/app/api/scene-overrides/[sceneId]/route.ts +1 -1
  250. package/.next/types/app/api/scene-overrides/export/route.ts +1 -1
  251. package/.next/types/app/api/scene-overrides/import/route.ts +1 -1
  252. package/.next/types/app/api/scene-overrides/route.ts +1 -1
  253. package/.next/types/app/api/sessions/[id]/context/route.ts +1 -1
  254. package/.next/types/app/api/sessions/[id]/route.ts +1 -1
  255. package/.next/types/app/api/sessions/[id]/share/route.ts +1 -1
  256. package/.next/types/app/api/sessions/new/route.ts +1 -1
  257. package/.next/types/app/api/sessions/route.ts +1 -1
  258. package/.next/types/app/api/settings/default-model/route.ts +1 -1
  259. package/.next/types/app/api/share/[token]/route.ts +1 -1
  260. package/.next/types/app/api/skills/install/route.ts +1 -1
  261. package/.next/types/app/api/skills/route.ts +1 -1
  262. package/.next/types/app/api/skills/search/route.ts +1 -1
  263. package/.next/types/app/api/usage/route.ts +1 -1
  264. package/.next/types/app/api/web-fetch/install-agent-browser/route.ts +1 -1
  265. package/.next/types/app/api/web-fetch/preferences/route.ts +1 -1
  266. package/.next/types/app/api/web-fetch/status/route.ts +1 -1
  267. package/.next/types/app/page.ts +1 -1
  268. package/.next/types/app/share/[token]/page.ts +1 -1
  269. package/package.json +1 -1
  270. package/.next/server/chunks/4325.js +0 -90
  271. package/.next/server/chunks/4880.js +0 -1
  272. package/.next/static/chunks/5035.3755dbc45ec0eb8d.js +0 -90
  273. package/.next/static/chunks/9b0008ae.3afefd8b13735168.js +0 -2
  274. package/.next/static/chunks/app/_not-found/page-647d65d4d44f4663.js +0 -1
  275. package/.next/static/chunks/next/dist/client/components/builtin/global-error-7fe17cf3265b4136.js +0 -1
  276. package/.next/static/chunks/webpack-bef1f311e5b374f6.js +0 -1
  277. /package/.next/static/{g5lgqsoouzYM8ahLSJb8- → qDeNXpEzVER9ldna4emiI}/_buildManifest.js +0 -0
  278. /package/.next/static/{g5lgqsoouzYM8ahLSJb8- → qDeNXpEzVER9ldna4emiI}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6696],{26696:(t,e,r)=>{r.d(e,{diagram:()=>eb});var a=r(60633),i=r(85774),s=r(38033),n=r(27655),l=r(32563),o=r(97096),c=r(32165),d=r(83438),h=r(78437),g=r(24662),u=r(95683);function y(t,e){for(let r in e)Object.hasOwn(e,r)&&(t[r]=e[r])}var p=r(72555),x=r(13222),b=r(33948),f=r(92821),m=function(){var t=(0,c.K2)(function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r},"o"),e=[1,15],r=[1,7],a=[1,13],i=[1,14],s=[1,19],n=[1,16],l=[1,17],o=[1,18],d=[8,30],h=[8,10,21,28,29,30,31,39,43,46],g=[1,23],u=[1,24],y=[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],x=[1,49],b={trace:(0,c.K2)(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,c.K2)(function(t,e,r,a,i,s,n){var l=s.length-1;switch(i){case 4:a.getLogger().debug("Rule: separator (NL) ");break;case 5:a.getLogger().debug("Rule: separator (Space) ");break;case 6:a.getLogger().debug("Rule: separator (EOF) ");break;case 7:a.getLogger().debug("Rule: hierarchy: ",s[l-1]),a.setHierarchy(s[l-1]);break;case 8:a.getLogger().debug("Stop NL ");break;case 9:a.getLogger().debug("Stop EOF ");break;case 10:a.getLogger().debug("Stop NL2 ");break;case 11:a.getLogger().debug("Stop EOF2 ");break;case 12:a.getLogger().debug("Rule: statement: ",s[l]),"number"==typeof s[l].length?this.$=s[l]:this.$=[s[l]];break;case 13:a.getLogger().debug("Rule: statement #2: ",s[l-1]),this.$=[s[l-1]].concat(s[l]);break;case 14:a.getLogger().debug("Rule: link: ",s[l],t),this.$={edgeTypeStr:s[l],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",s[l-3],s[l-1],s[l]),this.$={edgeTypeStr:s[l],label:s[l-1]};break;case 18:let o=parseInt(s[l]),c=a.generateId();this.$={id:c,type:"space",label:"",width:o,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",s[l-2],s[l-1],s[l]," typestr: ",s[l-1].edgeTypeStr);let d=a.edgeStrToEdgeData(s[l-1].edgeTypeStr),h=a.edgeStrToEdgeStartData(s[l-1].edgeTypeStr),g=a.edgeStrToThickness(s[l-1].edgeTypeStr),u=a.edgeStrToPattern(s[l-1].edgeTypeStr);this.$=[{id:s[l-2].id,label:s[l-2].label,type:s[l-2].type,directions:s[l-2].directions},{id:s[l-2].id+"-"+s[l].id,start:s[l-2].id,end:s[l].id,label:s[l-1].label,type:"edge",thickness:g,pattern:u,directions:s[l].directions,arrowTypeEnd:d,arrowTypeStart:h},{id:s[l].id,label:s[l].label,type:a.typeStr2Type(s[l].typeStr),directions:s[l].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[l-1],s[l]),this.$={id:s[l-1].id,label:s[l-1].label,type:a.typeStr2Type(s[l-1].typeStr),directions:s[l-1].directions,widthInColumns:parseInt(s[l],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",s[l]),this.$={id:s[l].id,label:s[l].label,type:a.typeStr2Type(s[l].typeStr),directions:s[l].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this?this:"na"),a.getLogger().debug("COLUMNS: ",s[l]),this.$={type:"column-setting",columns:"auto"===s[l]?-1:parseInt(s[l])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",s[l-2],s[l-1]),a.generateId(),this.$={...s[l-2],type:"composite",children:s[l-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",s[l-2],s[l-1],s[l]);let y=a.generateId();this.$={id:y,type:"composite",label:"",children:s[l-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",s[l]),this.$={id:s[l]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[l-1],s[l]),this.$={id:s[l-1],label:s[l].label,typeStr:s[l].typeStr,directions:s[l].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",s[l]),this.$=[s[l]];break;case 32:a.getLogger().debug("Rule: dirList: ",s[l-1],s[l]),this.$=[s[l-1]].concat(s[l]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",s[l-2],s[l-1],s[l]),this.$={typeStr:s[l-2]+s[l],label:s[l-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[l-3],s[l-2]," #3:",s[l-1],s[l]),this.$={typeStr:s[l-3]+s[l],label:s[l-2],directions:s[l-1]};break;case 35:case 36:this.$={type:"classDef",id:s[l-1].trim(),css:s[l].trim()};break;case 37:this.$={type:"applyClass",id:s[l-1].trim(),styleClass:s[l].trim()};break;case 38:this.$={type:"applyStyles",id:s[l-1].trim(),stylesStr:s[l].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:l,46:o},{8:[1,20]},t(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:a,29:i,31:s,39:n,43:l,46:o}),t(h,[2,16],{14:22,15:g,16:u}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(y,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:s},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:l,46:o},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(d,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},t(y,[2,24]),{10:e,11:37,13:4,14:22,15:g,16:u,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:l,46:o},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(p,[2,30]),{18:[1,43]},{18:[1,44]},t(y,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{36:[1,47]},{33:48,34:x},{15:[1,50]},t(h,[2,27]),t(p,[2,33]),{38:[1,51]},{33:52,34:x,38:[2,31]},{31:[2,15]},t(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,c.K2)(function(t,e){if(e.recoverable)this.trace(t);else{var r=Error(t);throw r.hash=e,r}},"parseError"),parse:(0,c.K2)(function(t){var e=this,r=[0],a=[],i=[null],s=[],n=this.table,l="",o=0,d=0,h=0,g=s.slice.call(arguments,1),u=Object.create(this.lexer),y={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y[p]=this.yy[p]);u.setInput(t,y),y.lexer=u,y.parser=this,void 0===u.yylloc&&(u.yylloc={});var x=u.yylloc;s.push(x);var b=u.options&&u.options.ranges;function f(){var t;return"number"!=typeof(t=a.pop()||u.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.parseError?this.parseError=y.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),(0,c.K2)(f,"lex");for(var m,w,k,L,S,_,E,D,R,K={};;){if(k=r[r.length-1],this.defaultActions[k]?L=this.defaultActions[k]:(null==m&&(m=f()),L=n[k]&&n[k][m]),void 0===L||!L.length||!L[0]){var $="";for(_ in R=[],n[k])this.terminals_[_]&&_>2&&R.push("'"+this.terminals_[_]+"'");$=u.showPosition?"Parse error on line "+(o+1)+":\n"+u.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError($,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:x,expected:R})}if(L[0]instanceof Array&&L.length>1)throw Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(L[0]){case 1:r.push(m),i.push(u.yytext),s.push(u.yylloc),r.push(L[1]),m=null,w?(m=w,w=null):(d=u.yyleng,l=u.yytext,o=u.yylineno,x=u.yylloc,h>0&&h--);break;case 2:if(E=this.productions_[L[1]][1],K.$=i[i.length-E],K._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},b&&(K._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),void 0!==(S=this.performAction.apply(K,[l,d,o,y,L[1],i,s].concat(g))))return S;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),s=s.slice(0,-1*E)),r.push(this.productions_[L[1]][0]),i.push(K.$),s.push(K._$),D=n[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0},"parse")};function f(){this.yy={}}return b.lexer={EOF:1,parseError:(0,c.K2)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=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),r.length-1&&(this.yylineno-=r.length-1);var i=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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(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,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var r,a,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var s in i)this[s]=i[s];return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,r,a,i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===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,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(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,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,c.K2)(function(t,e,r,a){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.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:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.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(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.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 t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.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,c.K2)(f,"Parser"),f.prototype=b,b.Parser=f,new f}();m.parser=m;var w=new Map,k=[],L=new Map,S="color",_="fill",E=(0,o.D7)(),D=new Map,R="",K=(0,c.K2)(t=>o.Y2.sanitizeText(t,E),"sanitizeText"),$=(0,c.K2)(function(t,e=""){let r=D.get(t);r||(r={id:t,styles:[],textStyles:[]},D.set(t,r)),null!=e&&e.split(",").forEach(t=>{let e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(S).exec(t)){let t=e.replace(_,"bgFill").replace(S,_);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),v=(0,c.K2)(function(t,e=""){let r=w.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),T=(0,c.K2)(function(t,e){t.split(",").forEach(function(t){let r=w.get(t);if(void 0===r){let e=t.trim();r={id:e,type:"na",children:[]},w.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),I=(0,c.K2)((t,e)=>{let r=t.flat(),a=[],i=r.find(t=>t?.type==="column-setting"),s=i?.columns??-1;for(let t of r){if("number"==typeof s&&s>0&&"column-setting"!==t.type&&"number"==typeof t.widthInColumns&&t.widthInColumns>s&&c.Rm.warn(`Block ${t.id} width ${t.widthInColumns} exceeds configured column width ${s}`),t.label&&(t.label=K(t.label)),"classDef"===t.type){$(t.id,t.css);continue}if("applyClass"===t.type){T(t.id,t?.styleClass??"");continue}if("applyStyles"===t.type){t?.stylesStr&&v(t.id,t?.stylesStr);continue}if("column-setting"===t.type)e.columns=t.columns??-1;else if("edge"===t.type){let e=(L.get(t.id)??0)+1;L.set(t.id,e),t.id=e+"-"+t.id,k.push(t)}else{t.label||("composite"===t.type?t.label="":t.label=t.id);let e=w.get(t.id);if(void 0===e?w.set(t.id,t):("na"!==t.type&&(e.type=t.type),t.label!==t.id&&(e.label=t.label)),t.children&&I(t.children,t),"space"===t.type){let e=t.width??1;for(let r=0;r<e;r++){let e=function(t){if((0,d.s)(t))return t;let e=(0,h.b)(t);if(!function(t){switch((0,h.b)(t)){case g.R_:case g.Uw:case g.cT:case g.iq:case g.$V:case g.vC:case g.ri:case g.ML:case g.XZ:case g.i1:case g._u:case g.pj:case g.kj:case g.GX:case g.Av:case g.NA:case g.OG:case g.VP:case g.Qb:case g.q:case g.x6:case g.ZR:return!0;default:return!1}}(t))return{};if(Array.isArray(t)){let e=Array.from(t);return t.length>0&&"string"==typeof t[0]&&Object.hasOwn(t,"index")&&(e.index=t.index,e.input=t.input),e}if((0,u.i)(t))return new t.constructor(t.buffer,t.byteOffset,t.length);if("[object ArrayBuffer]"===e)return new ArrayBuffer(t.byteLength);if("[object DataView]"===e){let e=t.buffer,r=t.byteOffset,a=t.byteLength,i=new ArrayBuffer(a),s=new Uint8Array(e,r,a);return new Uint8Array(i).set(s),new DataView(i)}if("[object Boolean]"===e||"[object Number]"===e||"[object String]"===e){let r=new t.constructor(t.valueOf());return"[object String]"===e?function(t,e){let r=e.valueOf().length;for(let a in e)Object.hasOwn(e,a)&&(Number.isNaN(Number(a))||Number(a)>=r)&&(t[a]=e[a])}(r,t):y(r,t),r}if("[object Date]"===e)return new Date(Number(t));if("[object RegExp]"===e){let e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if("[object Symbol]"===e)return Object(Symbol.prototype.valueOf.call(t));if("[object Map]"===e){let e=new Map;return t.forEach((t,r)=>{e.set(r,t)}),e}if("[object Set]"===e){let e=new Set;return t.forEach(t=>{e.add(t)}),e}if("[object Arguments]"===e){let e={};return y(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}let r={};return function(t,e){let r=Object.getPrototypeOf(e);null!==r&&"function"==typeof e.constructor&&Object.setPrototypeOf(t,r)}(r,t),y(r,t),function(t,e){let r=Object.getOwnPropertySymbols(e);for(let a=0;a<r.length;a++){let i=r[a];Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}}(r,t),r}(t);e.id=e.id+"-"+r,w.set(e.id,e),a.push(e)}}else void 0===e&&a.push(t)}}e.children=a},"populateBlockDatabase"),N=[],C={id:"root",type:"composite",children:[],columns:-1},B=(0,c.K2)(()=>{c.Rm.debug("Clear called"),(0,o.IU)(),w=new Map([["root",C={id:"root",type:"composite",children:[],columns:-1}]]),N=[],D=new Map,k=[],L=new Map,R=""},"clear");function O(t){switch(c.Rm.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return c.Rm.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 z(t){return(c.Rm.debug("typeStr2Type",t),"=="===t)?"thick":"normal"}function A(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function M(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function P(t){return t.includes("==")?"thick":"normal"}function j(t){return t.includes(".-")?"dotted":"solid"}(0,c.K2)(O,"typeStr2Type"),(0,c.K2)(z,"edgeTypeStr2Type"),(0,c.K2)(A,"edgeStrToEdgeData"),(0,c.K2)(M,"edgeStrToEdgeStartData"),(0,c.K2)(P,"edgeStrToThickness"),(0,c.K2)(j,"edgeStrToPattern");var W=0,Y=(0,c.K2)(()=>(W++,"id-"+Math.random().toString(36).substr(2,12)+"-"+W),"generateId"),F=(0,c.K2)(t=>{C.children=t,I(t,C),N=C.children},"setHierarchy"),X=(0,c.K2)(t=>{let e=w.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),U=(0,c.K2)(()=>[...w.values()],"getBlocksFlat"),H=(0,c.K2)(()=>N||[],"getBlocks"),Z=(0,c.K2)(()=>k,"getEdges"),q=(0,c.K2)(t=>w.get(t),"getBlock"),G=(0,c.K2)(t=>{w.set(t.id,t)},"setBlock"),V=(0,c.K2)(t=>{R=t},"setDiagramId"),J=(0,c.K2)(()=>R,"getDiagramId"),Q=(0,c.K2)(()=>c.Rm,"getLogger"),tt=(0,c.K2)(function(){return D},"getClasses"),te={getConfig:(0,c.K2)(()=>(0,o.zj)().block,"getConfig"),typeStr2Type:O,edgeTypeStr2Type:z,edgeStrToEdgeData:A,edgeStrToEdgeStartData:M,edgeStrToThickness:P,edgeStrToPattern:j,getLogger:Q,getBlocksFlat:U,getBlocks:H,getEdges:Z,setHierarchy:F,getBlock:q,setBlock:G,getColumns:X,getClasses:tt,clear:B,generateId:Y,setDiagramId:V,getDiagramId:J},tr=(0,c.K2)((t,e)=>{let r=p.A,a=r(t,"r"),i=r(t,"g"),s=r(t,"b");return x.A(a,i,s,e)},"fade"),ta=(0,c.K2)(t=>`.label {
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6696],{26696:(t,e,r)=>{r.d(e,{diagram:()=>eb});var a=r(60633),i=r(85774),s=r(38033),n=r(88774),l=r(32563),o=r(97096),c=r(32165),d=r(83438),h=r(78437),g=r(24662),u=r(95683);function y(t,e){for(let r in e)Object.hasOwn(e,r)&&(t[r]=e[r])}var p=r(72555),x=r(13222),b=r(33948),f=r(92821),m=function(){var t=(0,c.K2)(function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r},"o"),e=[1,15],r=[1,7],a=[1,13],i=[1,14],s=[1,19],n=[1,16],l=[1,17],o=[1,18],d=[8,30],h=[8,10,21,28,29,30,31,39,43,46],g=[1,23],u=[1,24],y=[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],x=[1,49],b={trace:(0,c.K2)(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,c.K2)(function(t,e,r,a,i,s,n){var l=s.length-1;switch(i){case 4:a.getLogger().debug("Rule: separator (NL) ");break;case 5:a.getLogger().debug("Rule: separator (Space) ");break;case 6:a.getLogger().debug("Rule: separator (EOF) ");break;case 7:a.getLogger().debug("Rule: hierarchy: ",s[l-1]),a.setHierarchy(s[l-1]);break;case 8:a.getLogger().debug("Stop NL ");break;case 9:a.getLogger().debug("Stop EOF ");break;case 10:a.getLogger().debug("Stop NL2 ");break;case 11:a.getLogger().debug("Stop EOF2 ");break;case 12:a.getLogger().debug("Rule: statement: ",s[l]),"number"==typeof s[l].length?this.$=s[l]:this.$=[s[l]];break;case 13:a.getLogger().debug("Rule: statement #2: ",s[l-1]),this.$=[s[l-1]].concat(s[l]);break;case 14:a.getLogger().debug("Rule: link: ",s[l],t),this.$={edgeTypeStr:s[l],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",s[l-3],s[l-1],s[l]),this.$={edgeTypeStr:s[l],label:s[l-1]};break;case 18:let o=parseInt(s[l]),c=a.generateId();this.$={id:c,type:"space",label:"",width:o,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",s[l-2],s[l-1],s[l]," typestr: ",s[l-1].edgeTypeStr);let d=a.edgeStrToEdgeData(s[l-1].edgeTypeStr),h=a.edgeStrToEdgeStartData(s[l-1].edgeTypeStr),g=a.edgeStrToThickness(s[l-1].edgeTypeStr),u=a.edgeStrToPattern(s[l-1].edgeTypeStr);this.$=[{id:s[l-2].id,label:s[l-2].label,type:s[l-2].type,directions:s[l-2].directions},{id:s[l-2].id+"-"+s[l].id,start:s[l-2].id,end:s[l].id,label:s[l-1].label,type:"edge",thickness:g,pattern:u,directions:s[l].directions,arrowTypeEnd:d,arrowTypeStart:h},{id:s[l].id,label:s[l].label,type:a.typeStr2Type(s[l].typeStr),directions:s[l].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[l-1],s[l]),this.$={id:s[l-1].id,label:s[l-1].label,type:a.typeStr2Type(s[l-1].typeStr),directions:s[l-1].directions,widthInColumns:parseInt(s[l],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",s[l]),this.$={id:s[l].id,label:s[l].label,type:a.typeStr2Type(s[l].typeStr),directions:s[l].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this?this:"na"),a.getLogger().debug("COLUMNS: ",s[l]),this.$={type:"column-setting",columns:"auto"===s[l]?-1:parseInt(s[l])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",s[l-2],s[l-1]),a.generateId(),this.$={...s[l-2],type:"composite",children:s[l-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",s[l-2],s[l-1],s[l]);let y=a.generateId();this.$={id:y,type:"composite",label:"",children:s[l-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",s[l]),this.$={id:s[l]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[l-1],s[l]),this.$={id:s[l-1],label:s[l].label,typeStr:s[l].typeStr,directions:s[l].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",s[l]),this.$=[s[l]];break;case 32:a.getLogger().debug("Rule: dirList: ",s[l-1],s[l]),this.$=[s[l-1]].concat(s[l]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",s[l-2],s[l-1],s[l]),this.$={typeStr:s[l-2]+s[l],label:s[l-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[l-3],s[l-2]," #3:",s[l-1],s[l]),this.$={typeStr:s[l-3]+s[l],label:s[l-2],directions:s[l-1]};break;case 35:case 36:this.$={type:"classDef",id:s[l-1].trim(),css:s[l].trim()};break;case 37:this.$={type:"applyClass",id:s[l-1].trim(),styleClass:s[l].trim()};break;case 38:this.$={type:"applyStyles",id:s[l-1].trim(),stylesStr:s[l].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:l,46:o},{8:[1,20]},t(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:a,29:i,31:s,39:n,43:l,46:o}),t(h,[2,16],{14:22,15:g,16:u}),t(h,[2,17]),t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),t(h,[2,21]),t(h,[2,22]),t(y,[2,25],{27:[1,25]}),t(h,[2,26]),{19:26,26:12,31:s},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:l,46:o},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(p,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(d,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},t(y,[2,24]),{10:e,11:37,13:4,14:22,15:g,16:u,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:l,46:o},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(p,[2,30]),{18:[1,43]},{18:[1,44]},t(y,[2,23]),{18:[1,45]},{30:[1,46]},t(h,[2,28]),t(h,[2,35]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),{36:[1,47]},{33:48,34:x},{15:[1,50]},t(h,[2,27]),t(p,[2,33]),{38:[1,51]},{33:52,34:x,38:[2,31]},{31:[2,15]},t(p,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:(0,c.K2)(function(t,e){if(e.recoverable)this.trace(t);else{var r=Error(t);throw r.hash=e,r}},"parseError"),parse:(0,c.K2)(function(t){var e=this,r=[0],a=[],i=[null],s=[],n=this.table,l="",o=0,d=0,h=0,g=s.slice.call(arguments,1),u=Object.create(this.lexer),y={};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y[p]=this.yy[p]);u.setInput(t,y),y.lexer=u,y.parser=this,void 0===u.yylloc&&(u.yylloc={});var x=u.yylloc;s.push(x);var b=u.options&&u.options.ranges;function f(){var t;return"number"!=typeof(t=a.pop()||u.lex()||1)&&(t instanceof Array&&(t=(a=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.parseError?this.parseError=y.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K2)(function(t){r.length=r.length-2*t,i.length=i.length-t,s.length=s.length-t},"popStack"),(0,c.K2)(f,"lex");for(var m,w,k,L,S,_,E,D,R,K={};;){if(k=r[r.length-1],this.defaultActions[k]?L=this.defaultActions[k]:(null==m&&(m=f()),L=n[k]&&n[k][m]),void 0===L||!L.length||!L[0]){var $="";for(_ in R=[],n[k])this.terminals_[_]&&_>2&&R.push("'"+this.terminals_[_]+"'");$=u.showPosition?"Parse error on line "+(o+1)+":\n"+u.showPosition()+"\nExpecting "+R.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError($,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:x,expected:R})}if(L[0]instanceof Array&&L.length>1)throw Error("Parse Error: multiple actions possible at state: "+k+", token: "+m);switch(L[0]){case 1:r.push(m),i.push(u.yytext),s.push(u.yylloc),r.push(L[1]),m=null,w?(m=w,w=null):(d=u.yyleng,l=u.yytext,o=u.yylineno,x=u.yylloc,h>0&&h--);break;case 2:if(E=this.productions_[L[1]][1],K.$=i[i.length-E],K._$={first_line:s[s.length-(E||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(E||1)].first_column,last_column:s[s.length-1].last_column},b&&(K._$.range=[s[s.length-(E||1)].range[0],s[s.length-1].range[1]]),void 0!==(S=this.performAction.apply(K,[l,d,o,y,L[1],i,s].concat(g))))return S;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),s=s.slice(0,-1*E)),r.push(this.productions_[L[1]][0]),i.push(K.$),s.push(K._$),D=n[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0},"parse")};function f(){this.yy={}}return b.lexer={EOF:1,parseError:(0,c.K2)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,c.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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,c.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},"input"),unput:(0,c.K2)(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=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),r.length-1&&(this.yylineno-=r.length-1);var i=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:r?(r.length===a.length?this.yylloc.first_column:0)+a[a.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K2)(function(){return this._more=!0,this},"more"),reject:(0,c.K2)(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,c.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,c.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K2)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,c.K2)(function(t,e){var r,a,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var s in i)this[s]=i[s];return!1},"test_match"),next:(0,c.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,r,a,i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length)){if(e=r,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[a]))&&t:""===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,c.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,c.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,c.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K2)(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,c.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,c.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,c.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,c.K2)(function(t,e,r,a){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.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:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.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(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.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 t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.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,c.K2)(f,"Parser"),f.prototype=b,b.Parser=f,new f}();m.parser=m;var w=new Map,k=[],L=new Map,S="color",_="fill",E=(0,o.D7)(),D=new Map,R="",K=(0,c.K2)(t=>o.Y2.sanitizeText(t,E),"sanitizeText"),$=(0,c.K2)(function(t,e=""){let r=D.get(t);r||(r={id:t,styles:[],textStyles:[]},D.set(t,r)),null!=e&&e.split(",").forEach(t=>{let e=t.replace(/([^;]*);/,"$1").trim();if(RegExp(S).exec(t)){let t=e.replace(_,"bgFill").replace(S,_);r.textStyles.push(t)}r.styles.push(e)})},"addStyleClass"),v=(0,c.K2)(function(t,e=""){let r=w.get(t);null!=e&&(r.styles=e.split(","))},"addStyle2Node"),T=(0,c.K2)(function(t,e){t.split(",").forEach(function(t){let r=w.get(t);if(void 0===r){let e=t.trim();r={id:e,type:"na",children:[]},w.set(e,r)}r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),I=(0,c.K2)((t,e)=>{let r=t.flat(),a=[],i=r.find(t=>t?.type==="column-setting"),s=i?.columns??-1;for(let t of r){if("number"==typeof s&&s>0&&"column-setting"!==t.type&&"number"==typeof t.widthInColumns&&t.widthInColumns>s&&c.Rm.warn(`Block ${t.id} width ${t.widthInColumns} exceeds configured column width ${s}`),t.label&&(t.label=K(t.label)),"classDef"===t.type){$(t.id,t.css);continue}if("applyClass"===t.type){T(t.id,t?.styleClass??"");continue}if("applyStyles"===t.type){t?.stylesStr&&v(t.id,t?.stylesStr);continue}if("column-setting"===t.type)e.columns=t.columns??-1;else if("edge"===t.type){let e=(L.get(t.id)??0)+1;L.set(t.id,e),t.id=e+"-"+t.id,k.push(t)}else{t.label||("composite"===t.type?t.label="":t.label=t.id);let e=w.get(t.id);if(void 0===e?w.set(t.id,t):("na"!==t.type&&(e.type=t.type),t.label!==t.id&&(e.label=t.label)),t.children&&I(t.children,t),"space"===t.type){let e=t.width??1;for(let r=0;r<e;r++){let e=function(t){if((0,d.s)(t))return t;let e=(0,h.b)(t);if(!function(t){switch((0,h.b)(t)){case g.R_:case g.Uw:case g.cT:case g.iq:case g.$V:case g.vC:case g.ri:case g.ML:case g.XZ:case g.i1:case g._u:case g.pj:case g.kj:case g.GX:case g.Av:case g.NA:case g.OG:case g.VP:case g.Qb:case g.q:case g.x6:case g.ZR:return!0;default:return!1}}(t))return{};if(Array.isArray(t)){let e=Array.from(t);return t.length>0&&"string"==typeof t[0]&&Object.hasOwn(t,"index")&&(e.index=t.index,e.input=t.input),e}if((0,u.i)(t))return new t.constructor(t.buffer,t.byteOffset,t.length);if("[object ArrayBuffer]"===e)return new ArrayBuffer(t.byteLength);if("[object DataView]"===e){let e=t.buffer,r=t.byteOffset,a=t.byteLength,i=new ArrayBuffer(a),s=new Uint8Array(e,r,a);return new Uint8Array(i).set(s),new DataView(i)}if("[object Boolean]"===e||"[object Number]"===e||"[object String]"===e){let r=new t.constructor(t.valueOf());return"[object String]"===e?function(t,e){let r=e.valueOf().length;for(let a in e)Object.hasOwn(e,a)&&(Number.isNaN(Number(a))||Number(a)>=r)&&(t[a]=e[a])}(r,t):y(r,t),r}if("[object Date]"===e)return new Date(Number(t));if("[object RegExp]"===e){let e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if("[object Symbol]"===e)return Object(Symbol.prototype.valueOf.call(t));if("[object Map]"===e){let e=new Map;return t.forEach((t,r)=>{e.set(r,t)}),e}if("[object Set]"===e){let e=new Set;return t.forEach(t=>{e.add(t)}),e}if("[object Arguments]"===e){let e={};return y(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}let r={};return function(t,e){let r=Object.getPrototypeOf(e);null!==r&&"function"==typeof e.constructor&&Object.setPrototypeOf(t,r)}(r,t),y(r,t),function(t,e){let r=Object.getOwnPropertySymbols(e);for(let a=0;a<r.length;a++){let i=r[a];Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}}(r,t),r}(t);e.id=e.id+"-"+r,w.set(e.id,e),a.push(e)}}else void 0===e&&a.push(t)}}e.children=a},"populateBlockDatabase"),N=[],C={id:"root",type:"composite",children:[],columns:-1},B=(0,c.K2)(()=>{c.Rm.debug("Clear called"),(0,o.IU)(),w=new Map([["root",C={id:"root",type:"composite",children:[],columns:-1}]]),N=[],D=new Map,k=[],L=new Map,R=""},"clear");function O(t){switch(c.Rm.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return c.Rm.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 z(t){return(c.Rm.debug("typeStr2Type",t),"=="===t)?"thick":"normal"}function A(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function M(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function P(t){return t.includes("==")?"thick":"normal"}function j(t){return t.includes(".-")?"dotted":"solid"}(0,c.K2)(O,"typeStr2Type"),(0,c.K2)(z,"edgeTypeStr2Type"),(0,c.K2)(A,"edgeStrToEdgeData"),(0,c.K2)(M,"edgeStrToEdgeStartData"),(0,c.K2)(P,"edgeStrToThickness"),(0,c.K2)(j,"edgeStrToPattern");var W=0,Y=(0,c.K2)(()=>(W++,"id-"+Math.random().toString(36).substr(2,12)+"-"+W),"generateId"),F=(0,c.K2)(t=>{C.children=t,I(t,C),N=C.children},"setHierarchy"),X=(0,c.K2)(t=>{let e=w.get(t);return e?e.columns?e.columns:e.children?e.children.length:-1:-1},"getColumns"),U=(0,c.K2)(()=>[...w.values()],"getBlocksFlat"),H=(0,c.K2)(()=>N||[],"getBlocks"),Z=(0,c.K2)(()=>k,"getEdges"),q=(0,c.K2)(t=>w.get(t),"getBlock"),G=(0,c.K2)(t=>{w.set(t.id,t)},"setBlock"),V=(0,c.K2)(t=>{R=t},"setDiagramId"),J=(0,c.K2)(()=>R,"getDiagramId"),Q=(0,c.K2)(()=>c.Rm,"getLogger"),tt=(0,c.K2)(function(){return D},"getClasses"),te={getConfig:(0,c.K2)(()=>(0,o.zj)().block,"getConfig"),typeStr2Type:O,edgeTypeStr2Type:z,edgeStrToEdgeData:A,edgeStrToEdgeStartData:M,edgeStrToThickness:P,edgeStrToPattern:j,getLogger:Q,getBlocksFlat:U,getBlocks:H,getEdges:Z,setHierarchy:F,getBlock:q,setBlock:G,getColumns:X,getClasses:tt,clear:B,generateId:Y,setDiagramId:V,getDiagramId:J},tr=(0,c.K2)((t,e)=>{let r=p.A,a=r(t,"r"),i=r(t,"g"),s=r(t,"b");return x.A(a,i,s,e)},"fade"),ta=(0,c.K2)(t=>`.label {
2
2
  font-family: ${t.fontFamily};
3
3
  color: ${t.nodeTextColor||t.textColor};
4
4
  }
@@ -124,7 +124,7 @@
124
124
  `,"getStyles"),ti=(0,c.K2)((t,e,r,a)=>{e.forEach(e=>{tg[e](t,r,a)})},"insertMarkers"),ts=(0,c.K2)((t,e,r)=>{c.Rm.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),tn=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),tl=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),to=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),tc=(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),td=(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),th=(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),tg={extension:ts,composition:tn,aggregation:tl,dependency:to,lollipop:tc,point:td,circle:th,cross:(0,c.K2)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),barb:(0,c.K2)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb")},tu=(0,o.D7)()?.block?.padding??8;function ty(t,e){if(0===t||!Number.isInteger(t))throw Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}(0,c.K2)(ty,"calculateBlockPosition");var tp=(0,c.K2)(t=>{let e=0,r=0;for(let a of t.children){let{width:t,height:i,x:s,y:n}=a.size??{width:0,height:0,x:0,y:0};if(c.Rm.debug("getMaxChildSize abc95 child:",a.id,"width:",t,"height:",i,"x:",s,"y:",n,a.type),"space"===a.type)continue;let l=t/(a.widthInColumns??1);l>e&&(e=l),i>r&&(r=i)}return{width:e,height:r}},"getMaxChildSize");function tx(t,e,r=0,a=0){c.Rm.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:a,x:0,y:0});let i=0,s=0;if(t.children?.length>0){for(let r of t.children)tx(r,e);let n=tp(t);for(let e of(i=n.width,s=n.height,c.Rm.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",i,s),t.children))e.size&&(c.Rm.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${i} ${s} ${JSON.stringify(e.size)}`),e.size.width=i*(e.widthInColumns??1)+tu*((e.widthInColumns??1)-1),e.size.height=s,e.size.x=0,e.size.y=0,c.Rm.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${i} maxHeight:${s}`));for(let r of t.children)tx(r,e,i,s);let l=t.columns??-1,o=0;for(let e of t.children)o+=e.widthInColumns??1;let d=t.children.length;l>0&&l<o&&(d=l);let h=Math.ceil(o/d),g=d*(i+tu)+tu,u=h*(s+tu)+tu;if(g<r){c.Rm.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${a} width ${g}`),g=r,u=a;let e=(r-d*tu-tu)/d,n=(a-h*tu-tu)/h;for(let r of(c.Rm.debug("Size indata abc88",t.id,"childWidth",e,"maxWidth",i),c.Rm.debug("Size indata abc88",t.id,"childHeight",n,"maxHeight",s),c.Rm.debug("Size indata abc88 xSize",d,"padding",tu),t.children))r.size&&(r.size.width=e,r.size.height=n,r.size.x=0,r.size.y=0)}if(c.Rm.debug(`abc95 (finale calc) ${t.id} xSize ${d} ySize ${h} columns ${l}${t.children.length} width=${Math.max(g,t.size?.width||0)}`),g<(t?.size?.width||0)){g=t?.size?.width||0;let e=l>0?Math.min(t.children.length,l):t.children.length;if(e>0){let r=(g-e*tu-tu)/e;for(let e of(c.Rm.debug("abc95 (growing to fit) width",t.id,g,t.size?.width,r),t.children))e.size&&(e.size.width=r)}}t.size={width:g,height:u,x:0,y:0}}c.Rm.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function tb(t,e){c.Rm.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`);let r=t.columns??-1;if(c.Rm.debug("layoutBlocks columns abc95",t.id,"=>",r,t),t.children&&t.children.length>0){let a=t?.children[0]?.size?.width??0,i=t.children.length*a+(t.children.length-1)*tu;c.Rm.debug("widthOfChildren 88",i,"posX");let s=new Map;{let e=0;for(let a of t.children){if(!a.size)continue;let{py:t}=ty(r,e),i=s.get(t)??0;a.size.height>i&&s.set(t,a.size.height);let n=a?.widthInColumns??1;r>0&&(n=Math.min(n,r-e%r)),e+=n}}let n=new Map;{let t=0;for(let e of[...s.keys()].sort((t,e)=>t-e))n.set(e,t),t+=(s.get(e)??0)+tu}let l=0;c.Rm.debug("abc91 block?.size?.x",t.id,t?.size?.x);let o=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-tu,d=0;for(let a of t.children){if(!a.size)continue;let{width:i,height:h}=a.size,{px:g,py:u}=ty(r,l);if(u!=d&&(d=u,o=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-tu,c.Rm.debug("New row in layout for block",t.id," and child ",a.id,d)),c.Rm.debug(`abc89 layout blocks (child) id: ${a.id} Pos: ${l} (px, py) ${g},${u} (${t?.size?.x},${t?.size?.y}) parent: ${t.id} width: ${i}${tu}`),t.size){let e=i/2;a.size.x=o+tu+e,c.Rm.debug(`abc91 layout blocks (calc) px, pyid:${a.id} startingPos=X${o} new startingPosX${a.size.x} ${e} padding=${tu} width=${i} halfWidth=${e} => x:${a.size.x} y:${a.size.y} ${a.widthInColumns} (width * (child?.w || 1)) / 2 ${i*(a?.widthInColumns??1)/2}`),o=a.size.x+e;let r=n.get(u)??0,l=s.get(u)??h;a.size.y=t.size.y-t.size.height/2+r+l/2+tu,c.Rm.debug(`abc88 layout blocks (calc) px, pyid:${a.id}startingPosX${o}${tu}${e}=>x:${a.size.x}y:${a.size.y}${a.widthInColumns}(width * (child?.w || 1)) / 2${i*(a?.widthInColumns??1)/2}`)}a.children&&tb(a,e);let y=a?.widthInColumns??1;r>0&&(y=Math.min(y,r-l%r)),l+=y,c.Rm.debug("abc88 columnsPos",a,l)}}c.Rm.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: ${t?.size?.width}`)}function tf(t,{minX:e,minY:r,maxX:a,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(t.size&&"root"!==t.id){let{x:s,y:n,width:l,height:o}=t.size;s-l/2<e&&(e=s-l/2),n-o/2<r&&(r=n-o/2),s+l/2>a&&(a=s+l/2),n+o/2>i&&(i=n+o/2)}if(t.children)for(let s of t.children)({minX:e,minY:r,maxX:a,maxY:i}=tf(s,{minX:e,minY:r,maxX:a,maxY:i}));return{minX:e,minY:r,maxX:a,maxY:i}}function tm(t){let e=t.getBlock("root");if(!e)return;tx(e,t,0,0),tb(e,t),c.Rm.debug("getBlocks",JSON.stringify(e,null,2));let{minX:r,minY:a,maxX:i,maxY:s}=tf(e);return{x:r,y:a,width:i-r,height:s-a}}(0,c.K2)(tx,"setBlockSizes"),(0,c.K2)(tb,"layoutBlocks"),(0,c.K2)(tf,"findBounds"),(0,c.K2)(tm,"layout");var tw=(0,c.K2)(async(t,e,r,a=!1,i=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);let l=(0,o.D7)(),c=(0,o.E)(l);return await (0,n.GZ)(t,s,{style:r,isTitle:a,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},l)},"createLabel"),tk=(0,c.K2)((t,e,r,a,i)=>{e.arrowTypeStart&&tS(t,"start",e.arrowTypeStart,r,a,i),e.arrowTypeEnd&&tS(t,"end",e.arrowTypeEnd,r,a,i)},"addEdgeMarkers"),tL={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},tS=(0,c.K2)((t,e,r,a,i,s)=>{let n=tL[r];n?t.attr(`marker-${e}`,`url(${a}#${i}_${s}-${n}${"start"===e?"Start":"End"})`):c.Rm.warn(`Unknown arrow type: ${r}`)},"addEdgeMarker"),t_={},tE={},tD=(0,c.K2)(async(t,e)=>{let r,a=(0,o.D7)(),s=(0,o.E)(a),l=t.insert("g").attr("class","edgeLabel"),c=l.insert("g").attr("class","label"),d="markdown"===e.labelType,h=await (0,n.GZ)(t,e.label,{style:e.labelStyle,useHtmlLabels:s,addSvgBackground:d,isNode:!1,markdown:d,width:d?void 0:1/0},a);c.node().appendChild(h);let g=h.getBBox(),u=g;if(s){let t=h.children[0],e=(0,b.Ltv)(h);u=g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}else{let t=(0,b.Ltv)(h).select("text").node();t&&"function"==typeof t.getBBox&&(u=t.getBBox())}if(c.attr("transform",(0,i.Wg)(u,s)),t_[e.id]=l,e.width=g.width,e.height=g.height,e.startLabelLeft){let a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner"),l=await tw(n,e.startLabelLeft,e.labelStyle);r=l;let o=l.getBBox();if(s){let t=l.children[0],e=(0,b.Ltv)(l);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}n.attr("transform",(0,i.Wg)(o,s)),tE[e.id]||(tE[e.id]={}),tE[e.id].startLeft=a,tR(r,e.startLabelLeft)}if(e.startLabelRight){let a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner"),l=await tw(n,e.startLabelRight,e.labelStyle);r=l;let o=l.getBBox();if(s){let t=l.children[0],e=(0,b.Ltv)(l);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}n.attr("transform",(0,i.Wg)(o,s)),tE[e.id]||(tE[e.id]={}),tE[e.id].startRight=a,tR(r,e.startLabelRight)}if(e.endLabelLeft){let a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner"),l=await tw(a,e.endLabelLeft,e.labelStyle);r=l;let o=l.getBBox();if(s){let t=l.children[0],e=(0,b.Ltv)(l);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}n.attr("transform",(0,i.Wg)(o,s)),tE[e.id]||(tE[e.id]={}),tE[e.id].endLeft=a,tR(r,e.endLabelLeft)}if(e.endLabelRight){let a=t.insert("g").attr("class","edgeTerminals"),n=a.insert("g").attr("class","inner"),l=await tw(a,e.endLabelRight,e.labelStyle);r=l;let o=l.getBBox();if(s){let t=l.children[0],e=(0,b.Ltv)(l);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}n.attr("transform",(0,i.Wg)(o,s)),tE[e.id]||(tE[e.id]={}),tE[e.id].endRight=a,tR(r,e.endLabelRight)}return h},"insertEdgeLabel");function tR(t,e){(0,o.E)((0,o.D7)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.K2)(tR,"setTerminalWidth");var tK=(0,c.K2)((t,e)=>{c.Rm.debug("Moving label abc88 ",t.id,t.label,t_[t.id],e);let r=e.updatedPath?e.updatedPath:e.originalPath,a=(0,o.D7)(),{subGraphTitleTotalMargin:i}=(0,s.O)(a);if(t.label){let a=t_[t.id],s=t.x,n=t.y;if(r){let a=l._K.calcLabelPosition(r);c.Rm.debug("Moving label "+t.label+" from (",s,",",n,") to (",a.x,",",a.y,") abc88"),e.updatedPath&&(s=a.x,n=a.y)}a.attr("transform",`translate(${s}, ${n+i/2})`)}if(t.startLabelLeft){let e=tE[t.id].startLeft,a=t.x,i=t.y;if(r){let e=l._K.calcTerminalLabelPosition(10*!!t.arrowTypeStart,"start_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.startLabelRight){let e=tE[t.id].startRight,a=t.x,i=t.y;if(r){let e=l._K.calcTerminalLabelPosition(10*!!t.arrowTypeStart,"start_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelLeft){let e=tE[t.id].endLeft,a=t.x,i=t.y;if(r){let e=l._K.calcTerminalLabelPosition(10*!!t.arrowTypeEnd,"end_left",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelRight){let e=tE[t.id].endRight,a=t.x,i=t.y;if(r){let e=l._K.calcTerminalLabelPosition(10*!!t.arrowTypeEnd,"end_right",r);a=e.x,i=e.y}e.attr("transform",`translate(${a}, ${i})`)}},"positionEdgeLabel"),t$=(0,c.K2)((t,e)=>{let r=t.x,a=t.y,i=Math.abs(e.x-r),s=Math.abs(e.y-a),n=t.width/2,l=t.height/2;return!!(i>=n)||!!(s>=l)},"outsideNode"),tv=(0,c.K2)((t,e,r)=>{c.Rm.debug(`intersection calc abc89:
125
125
  outsidePoint: ${JSON.stringify(e)}
126
126
  insidePoint : ${JSON.stringify(r)}
127
- node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let a=t.x,i=t.y,s=Math.abs(a-r.x),n=t.width/2,l=r.x<e.x?n-s:n+s,o=t.height/2,d=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*n>Math.abs(a-e.x)*o){let t=r.y<e.y?e.y-o-i:i-o-e.y;l=h*t/d;let a={x:r.x<e.x?r.x+l:r.x-h+l,y:r.y<e.y?r.y+d-t:r.y-d+t};return 0===l&&(a.x=e.x,a.y=e.y),0===h&&(a.x=e.x),0===d&&(a.y=e.y),c.Rm.debug(`abc89 topp/bott calc, Q ${d}, q ${t}, R ${h}, r ${l}`,a),a}{let t=d*(l=r.x<e.x?e.x-n-a:a-n-e.x)/h,i=r.x<e.x?r.x+h-l:r.x-h+l,s=r.y<e.y?r.y+t:r.y-t;return c.Rm.debug(`sides calc abc89, Q ${d}, q ${t}, R ${h}, r ${l}`,{_x:i,_y:s}),0===l&&(i=e.x,s=e.y),0===h&&(i=e.x),0===d&&(s=e.y),{x:i,y:s}}},"intersection"),tT=(0,c.K2)((t,e)=>{c.Rm.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],i=!1;return t.forEach(t=>{if(t$(e,t)||i)a=t,i||r.push(t);else{let s=tv(e,a,t),n=!1;r.forEach(t=>{n=n||t.x===s.x&&t.y===s.y}),r.some(t=>t.x===s.x&&t.y===s.y)||r.push(s),i=!0}}),r},"cutPathAtIntersect"),tI=(0,c.K2)(function(t,e,r,a,s,n,l){let d,h=r.points;c.Rm.debug("abc88 InsertEdge: edge=",r,"e=",e);let g=!1,u=n.node(e.v);var y=n.node(e.w);y?.intersect&&u?.intersect&&((h=h.slice(1,r.points.length-1)).unshift(u.intersect(h[0])),h.push(y.intersect(h[h.length-1]))),r.toCluster&&(c.Rm.debug("to cluster abc88",a[r.toCluster]),h=tT(r.points,a[r.toCluster].node),g=!0),r.fromCluster&&(c.Rm.debug("from cluster abc88",a[r.fromCluster]),h=tT(h.reverse(),a[r.fromCluster].node).reverse(),g=!0);let p=h.filter(t=>!Number.isNaN(t.y)),x=b.qrM;r.curve&&("graph"===s||"flowchart"===s)&&(x=r.curve);let{x:f,y:m}=(0,i.RI)(r),w=(0,b.n8j)().x(f).y(m).curve(x);switch(r.thickness){case"normal":d="edge-thickness-normal";break;case"thick":case"invisible":d="edge-thickness-thick";break;default:d=""}switch(r.pattern){case"solid":d+=" edge-pattern-solid";break;case"dotted":d+=" edge-pattern-dotted";break;case"dashed":d+=" edge-pattern-dashed"}let k=t.append("path").attr("d",w(p)).attr("id",r.id).attr("class"," "+d+(r.classes?" "+r.classes:"")).attr("style",r.style),L="";((0,o.D7)().flowchart.arrowMarkerAbsolute||(0,o.D7)().state.arrowMarkerAbsolute)&&(L=(0,o.ID)(!0)),tk(k,r,L,l,s);let S={};return g&&(S.updatedPath=h),S.originalPath=r.points,S},"insertEdge"),tN=(0,c.K2)(t=>{let e=new Set;for(let r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),tC=(0,c.K2)((t,e,r,a)=>{let i=tN(t),s=e.height+2*r.padding,n=s/2,l=a??e.width+2*n+r.padding,o=r.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:l/2,y:2*o},{x:l-n,y:0},{x:l,y:0},{x:l,y:-s/3},{x:l+2*o,y:-s/2},{x:l,y:-2*s/3},{x:l,y:-s},{x:l-n,y:-s},{x:l/2,y:-s-2*o},{x:n,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*o,y:-s/2},{x:0,y:-s/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:n,y:0},{x:l-n,y:0},{x:l,y:-s/2},{x:l-n,y:-s},{x:n,y:-s},{x:0,y:-s/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:n,y:-s},{x:l-n,y:-s},{x:l,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:l,y:-n},{x:l,y:-s+n},{x:0,y:-s}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:l,y:0},{x:0,y:-n},{x:0,y:-s+n},{x:l,y:-s}]:i.has("right")&&i.has("left")?[{x:n,y:0},{x:n,y:-o},{x:l-n,y:-o},{x:l-n,y:0},{x:l,y:-s/2},{x:l-n,y:-s},{x:l-n,y:-s+o},{x:n,y:-s+o},{x:n,y:-s},{x:0,y:-s/2}]:i.has("up")&&i.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:n,y:-o},{x:n,y:-s+o},{x:0,y:-s+o},{x:l/2,y:-s},{x:l,y:-s+o},{x:l-n,y:-s+o},{x:l-n,y:-o},{x:l,y:-o}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:l,y:-n},{x:0,y:-s}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-s}]:i.has("left")&&i.has("up")?[{x:l,y:0},{x:0,y:-n},{x:l,y:-s}]:i.has("left")&&i.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-s}]:i.has("right")?[{x:n,y:-o},{x:n,y:-o},{x:l-n,y:-o},{x:l-n,y:0},{x:l,y:-s/2},{x:l-n,y:-s},{x:l-n,y:-s+o},{x:n,y:-s+o},{x:n,y:-s+o}]:i.has("left")?[{x:n,y:0},{x:n,y:-o},{x:l-n,y:-o},{x:l-n,y:-s+o},{x:n,y:-s+o},{x:n,y:-s},{x:0,y:-s/2}]:i.has("up")?[{x:n,y:-o},{x:n,y:-s+o},{x:0,y:-s+o},{x:l/2,y:-s},{x:l,y:-s+o},{x:l-n,y:-s+o},{x:l-n,y:-o}]:i.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:n,y:-o},{x:n,y:-s+o},{x:l-n,y:-s+o},{x:l-n,y:-o},{x:l,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function tB(t,e,r,a){var i=t.x,s=t.y,n=i-a.x,l=s-a.y,o=Math.sqrt(e*e*l*l+r*r*n*n),c=Math.abs(e*r*n/o);a.x<i&&(c=-c);var d=Math.abs(e*r*l/o);return a.y<s&&(d=-d),{x:i+c,y:s+d}}function tO(t,e,r){return tB(t,e,e,r)}function tz(t,e,r,a){var i,s,n,l,o,c,d,h,g,u,y,p,x;if(i=e.y-t.y,n=t.x-e.x,o=e.x*t.y-t.x*e.y,g=i*r.x+n*r.y+o,u=i*a.x+n*a.y+o,!(0!==g&&0!==u&&tA(g,u))){if((s=a.y-r.y,l=r.x-a.x,c=a.x*r.y-r.x*a.y,d=s*t.x+l*t.y+c,h=s*e.x+l*e.y+c,!(0!==d&&0!==h&&tA(d,h)))&&0!=(y=i*l-s*n))return p=Math.abs(y/2),{x:(x=n*c-l*o)<0?(x-p)/y:(x+p)/y,y:(x=s*o-i*c)<0?(x-p)/y:(x+p)/y}}}function tA(t,e){return t*e>0}function tM(t,e,r){var a=t.x,i=t.y,s=[],n=1/0,l=1/0;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),l=Math.min(l,t.y)}):(n=Math.min(n,e.x),l=Math.min(l,e.y));for(var o=a-t.width/2-n,c=i-t.height/2-l,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0],u=tz(t,r,{x:o+h.x,y:c+h.y},{x:o+g.x,y:c+g.y});u&&s.push(u)}return s.length?(s.length>1&&s.sort(function(t,e){var a=t.x-r.x,i=t.y-r.y,s=Math.sqrt(a*a+i*i),n=e.x-r.x,l=e.y-r.y,o=Math.sqrt(n*n+l*l);return s<o?-1:+(s!==o)}),s[0]):t}(0,c.K2)(function(t,e){return t.intersect(e)},"intersectNode"),(0,c.K2)(tB,"intersectEllipse"),(0,c.K2)(tO,"intersectCircle"),(0,c.K2)(tz,"intersectLine"),(0,c.K2)(tA,"sameSign"),(0,c.K2)(tM,"intersectPolygon");var tP=(0,c.K2)((t,e)=>{var r,a,i=t.x,s=t.y,n=e.x-i,l=e.y-s,o=t.width/2,c=t.height/2;return Math.abs(l)*o>Math.abs(n)*c?(l<0&&(c=-c),r=0===l?0:c*n/l,a=c):(n<0&&(o=-o),r=o,a=0===n?0:o*l/n),{x:i+r,y:s+a}},"intersectRect"),tj=(0,c.K2)(async(t,e,r,a)=>{let i,c,d=(0,o.D7)(),h=e.useHtmlLabels||(0,o.E)(d),g=t.insert("g").attr("class",r||"node default").attr("id",e.domId||e.id),u=g.insert("g").attr("class","label").attr("style",e.labelStyle);i=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];let y=(c="markdown"===e.labelType?(0,n.GZ)(u,(0,o.jZ)((0,l.Sm)(i),d),{useHtmlLabels:h,width:e.width||d.flowchart.wrappingWidth,classes:"markdown-node-label"},d):await tw(u,(0,o.jZ)((0,l.Sm)(i),d),e.labelStyle,!1,a)).getBBox(),p=e.padding/2;if((0,o.E)(d)){let t=c.children[0],e=(0,b.Ltv)(c);await (0,s.X)(t,i),y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return h?u.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):u.attr("transform","translate(0, "+-y.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:g,bbox:y,halfPadding:p,label:u}},"labelHelper"),tW=(0,c.K2)((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function tY(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,c.K2)(tY,"insertPolygonShape");var tF=(0,c.K2)(async(t,e)=>{e.useHtmlLabels||(0,o.E)((0,o.D7)())||(e.centerLabel=!0);let{shapeSvg:r,bbox:a,halfPadding:i}=await tj(t,e,"node "+e.classes,!0);c.Rm.info("Classes = ",e.classes);let s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-a.width/2-i).attr("y",-a.height/2-i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),tW(e,s),e.intersect=function(t){return tP(e,t)},r},"note"),tX=(0,c.K2)(t=>t?" "+t:"","formatClass"),tU=(0,c.K2)((t,e)=>`${e||"node default"}${tX(t.classes)} ${tX(t.class)}`,"getClassesFromNode"),tH=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding+(a.height+e.padding),s=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];c.Rm.info("Question main (Circle)");let n=tY(r,i,i,s);return n.attr("style",e.style),tW(e,n),e.intersect=function(t){return c.Rm.warn("Intersect called"),tM(e,s,t)},r},"question"),tZ=(0,c.K2)((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);return r.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return tO(e,14,t)},r},"choice"),tq=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=e.positioned?e.height:a.height+e.padding,s=i/4,n=e.positioned?e.width:a.width+2*s+e.padding,l=[{x:s,y:0},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}],o=tY(r,n,i,l);return o.attr("style",e.style),tW(e,o),e.intersect=function(t){return tM(e,l,t)},r},"hexagon"),tG=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,void 0,!0),i=a.height+2*e.padding,s=i/2,n=a.width+2*s+e.padding,l=e.positioned&&(e.widthInColumns??1)>1&&e.width>n?e.width:n,o=tC(e.directions,a,e,l),c=tY(r,l,i,o);return c.attr("style",e.style),tW(e,c),e.intersect=function(t){return tM(e,o,t)},r},"block_arrow"),tV=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-s/2,y:0},{x:i,y:0},{x:i,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return tY(r,i,s,n).attr("style",e.style),e.width=i+s,e.height=s,e.intersect=function(t){return tM(e,n,t)},r},"rect_left_inv_arrow"),tJ=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-2*s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:s/6,y:-s}],l=tY(r,i,s,n);return l.attr("style",e.style),tW(e,l),e.intersect=function(t){return tM(e,n,t)},r},"lean_right"),tQ=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:2*s/6,y:0},{x:i+s/6,y:0},{x:i-2*s/6,y:-s},{x:-s/6,y:-s}],l=tY(r,i,s,n);return l.attr("style",e.style),tW(e,l),e.intersect=function(t){return tM(e,n,t)},r},"lean_left"),t0=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-2*s/6,y:0},{x:i+2*s/6,y:0},{x:i-s/6,y:-s},{x:s/6,y:-s}],l=tY(r,i,s,n);return l.attr("style",e.style),tW(e,l),e.intersect=function(t){return tM(e,n,t)},r},"trapezoid"),t2=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:-2*s/6,y:-s}],l=tY(r,i,s,n);return l.attr("style",e.style),tW(e,l),e.intersect=function(t){return tM(e,n,t)},r},"inv_trapezoid"),t1=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:0,y:0},{x:i+s/2,y:0},{x:i,y:-s/2},{x:i+s/2,y:-s},{x:0,y:-s}],l=tY(r,i,s,n);return l.attr("style",e.style),tW(e,l),e.intersect=function(t){return tM(e,n,t)},r},"rect_right_inv_arrow"),t3=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding,s=i/2,n=s/(2.5+i/50),l=a.height+n+e.padding,o="M 0,"+n+" a "+s+","+n+" 0,0,0 "+i+" 0 a "+s+","+n+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+s+","+n+" 0,0,0 "+i+" 0 l 0,"+-l,c=r.attr("label-offset-y",n).insert("path",":first-child").attr("style",e.style).attr("d",o).attr("transform","translate("+-i/2+","+-(l/2+n)+")");return tW(e,c),e.intersect=function(t){let r=tP(e,t),a=r.x-e.x;if(0!=s&&(Math.abs(a)<e.width/2||Math.abs(a)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-n)){let i=n*n*(1-a*a/(s*s));0!=i&&(i=Math.sqrt(i)),i=n-i,t.y-e.y>0&&(i=-i),r.y+=i}return r},r},"cylinder"),t4=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a,halfPadding:i}=await tj(t,e,"node "+e.classes+" "+e.class,!0),s=r.insert("rect",":first-child"),n=e.positioned?e.width:a.width+e.padding,l=e.positioned?e.height:a.height+e.padding,o=e.positioned?-n/2:-a.width/2-i,d=e.positioned?-l/2:-a.height/2-i;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",d).attr("width",n).attr("height",l),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(t9(s,e.props.borders,n,l),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return tW(e,s),e.intersect=function(t){return tP(e,t)},r},"rect"),t8=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a,halfPadding:i}=await tj(t,e,"node "+e.classes,!0),s=r.insert("rect",":first-child"),n=e.positioned?e.width:a.width+e.padding,l=e.positioned?e.height:a.height+e.padding,o=e.positioned?-n/2:-a.width/2-i,d=e.positioned?-l/2:-a.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",d).attr("width",n).attr("height",l),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(t9(s,e.props.borders,n,l),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return tW(e,s),e.intersect=function(t){return tP(e,t)},r},"composite"),t5=(0,c.K2)(async(t,e)=>{let{shapeSvg:r}=await tj(t,e,"label",!0);c.Rm.trace("Classes = ",e.class);let a=r.insert("rect",":first-child");if(a.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(t9(a,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return tW(e,a),e.intersect=function(t){return tP(e,t)},r},"labelRect");function t9(t,e,r,a){let i=[],s=(0,c.K2)(t=>{i.push(t,0)},"addBorder"),n=(0,c.K2)(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(c.Rm.debug("add top border"),s(r)):n(r),e.includes("r")?(c.Rm.debug("add right border"),s(a)):n(a),e.includes("b")?(c.Rm.debug("add bottom border"),s(r)):n(r),e.includes("l")?(c.Rm.debug("add left border"),s(a)):n(a),t.attr("stroke-dasharray",i.join(" "))}(0,c.K2)(t9,"applyNodePropertyBorders");var t7=(0,c.K2)(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";let a=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=a.insert("rect",":first-child"),s=a.insert("line"),n=a.insert("g").attr("class","label"),l=e.labelText.flat?e.labelText.flat():e.labelText,d="";d="object"==typeof l?l[0]:l,c.Rm.info("Label text abc79",d,l,"object"==typeof l);let h=await tw(n,d,e.labelStyle,!0,!0),g={width:0,height:0};if((0,o.E)((0,o.D7)())){let t=h.children[0],e=(0,b.Ltv)(h);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}c.Rm.info("Text 2",l);let u=l.slice(1,l.length),y=h.getBBox(),p=await tw(n,u.join?u.join("<br/>"):u,e.labelStyle,!0,!0);if((0,o.E)((0,o.D7)())){let t=p.children[0],e=(0,b.Ltv)(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}let x=e.padding/2;return(0,b.Ltv)(p).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+x+5)+")"),(0,b.Ltv)(h).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=n.node().getBBox(),n.attr("transform","translate("+-g.width/2+", "+(-g.height/2-x+3)+")"),i.attr("class","outer title-state").attr("x",-g.width/2-x).attr("y",-g.height/2-x).attr("width",g.width+e.padding).attr("height",g.height+e.padding),s.attr("class","divider").attr("x1",-g.width/2-x).attr("x2",g.width/2+x).attr("y1",-g.height/2-x+y.height+x).attr("y2",-g.height/2-x+y.height+x),tW(e,i),e.intersect=function(t){return tP(e,t)},a},"rectWithTitle"),t6=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.height+e.padding,s=a.width+i/4+e.padding,n=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-s/2).attr("y",-i/2).attr("width",s).attr("height",i);return tW(e,n),e.intersect=function(t){return tP(e,t)},r},"stadium"),et=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a,halfPadding:i}=await tj(t,e,tU(e,void 0),!0),s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),c.Rm.info("Circle main"),tW(e,s),e.intersect=function(t){return c.Rm.info("Circle intersect",e,a.width/2+i,t),tO(e,a.width/2+i,t)},r},"circle"),ee=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a,halfPadding:i}=await tj(t,e,tU(e,void 0),!0),s=r.insert("g",":first-child"),n=s.insert("circle"),l=s.insert("circle");return s.attr("class",e.class),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i+5).attr("width",a.width+e.padding+10).attr("height",a.height+e.padding+10),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),c.Rm.info("DoubleCircle main"),tW(e,n),e.intersect=function(t){return c.Rm.info("DoubleCircle intersect",e,a.width/2+i+5,t),tO(e,a.width/2+i+5,t)},r},"doublecircle"),er=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:0,y:0},{x:i,y:0},{x:i,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],l=tY(r,i,s,n);return l.attr("style",e.style),tW(e,l),e.intersect=function(t){return tM(e,n,t)},r},"subroutine"),ea=(0,c.K2)((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),tW(e,a),e.intersect=function(t){return tO(e,7,t)},r},"start"),ei=(0,c.K2)((t,e,r)=>{let a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,s=10;return"LR"===r&&(i=10,s=70),tW(e,a.append("rect").attr("x",-1*i/2).attr("y",-1*s/2).attr("width",i).attr("height",s).attr("class","fork-join")),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return tP(e,t)},a},"forkJoin"),es={rhombus:tH,composite:t8,question:tH,rect:t4,labelRect:t5,rectWithTitle:t7,choice:tZ,circle:et,doublecircle:ee,stadium:t6,hexagon:tq,block_arrow:tG,rect_left_inv_arrow:tV,lean_right:tJ,lean_left:tQ,trapezoid:t0,inv_trapezoid:t2,rect_right_inv_arrow:t1,cylinder:t3,start:ea,end:(0,c.K2)((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),a.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),tW(e,i),e.intersect=function(t){return tO(e,7,t)},r},"end"),note:tF,subroutine:er,fork:ei,join:ei,class_box:(0,c.K2)(async(t,e)=>{let r,a=e.padding/2;r=e.classes?"node "+e.classes:"node default";let i=t.insert("g").attr("class",r).attr("id",e.domId||e.id),s=i.insert("rect",":first-child"),n=i.insert("line"),l=i.insert("line"),c=0,d=4,h=i.insert("g").attr("class","label"),g=0,u=e.classData.annotations?.[0],y=e.classData.annotations[0]?"\xab"+e.classData.annotations[0]+"\xbb":"",p=await tw(h,y,e.labelStyle,!0,!0),x=p.getBBox();if((0,o.E)((0,o.D7)())){let t=p.children[0],e=(0,b.Ltv)(p);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}e.classData.annotations[0]&&(d+=x.height+4,c+=x.width);let f=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,o.E)((0,o.D7)())?f+="&lt;"+e.classData.type+"&gt;":f+="<"+e.classData.type+">");let m=await tw(h,f,e.labelStyle,!0,!0);(0,b.Ltv)(m).attr("class","classTitle");let w=m.getBBox();if((0,o.E)((0,o.D7)())){let t=m.children[0],e=(0,b.Ltv)(m);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}d+=w.height+4,w.width>c&&(c=w.width);let k=[];e.classData.members.forEach(async t=>{let r=t.getDisplayDetails(),a=r.displayText;(0,o.E)((0,o.D7)())&&(a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let i=await tw(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0),s=i.getBBox();if((0,o.E)((0,o.D7)())){let t=i.children[0],e=(0,b.Ltv)(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>c&&(c=s.width),d+=s.height+4,k.push(i)}),d+=8;let L=[];if(e.classData.methods.forEach(async t=>{let r=t.getDisplayDetails(),a=r.displayText;(0,o.E)((0,o.D7)())&&(a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let i=await tw(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0),s=i.getBBox();if((0,o.E)((0,o.D7)())){let t=i.children[0],e=(0,b.Ltv)(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>c&&(c=s.width),d+=s.height+4,L.push(i)}),d+=8,u){let t=(c-x.width)/2;(0,b.Ltv)(p).attr("transform","translate( "+(-1*c/2+t)+", "+-1*d/2+")"),g=x.height+4}let S=(c-w.width)/2;return(0,b.Ltv)(m).attr("transform","translate( "+(-1*c/2+S)+", "+(-1*d/2+g)+")"),g+=w.height+4,n.attr("class","divider").attr("x1",-c/2-a).attr("x2",c/2+a).attr("y1",-d/2-a+8+g).attr("y2",-d/2-a+8+g),g+=8,k.forEach(t=>{(0,b.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g+4)+")");let e=t?.getBBox();g+=(e?.height??0)+4}),g+=8,l.attr("class","divider").attr("x1",-c/2-a).attr("x2",c/2+a).attr("y1",-d/2-a+8+g).attr("y2",-d/2-a+8+g),g+=8,L.forEach(t=>{(0,b.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g)+")");let e=t?.getBBox();g+=(e?.height??0)+4}),s.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-a).attr("y",-(d/2)-a).attr("width",c+e.padding).attr("height",d+e.padding),tW(e,s),e.intersect=function(t){return tP(e,t)},i},"class_box")},en={},el=(0,c.K2)(async(t,e,r)=>{let a,i;if(e.link){let s;"sandbox"===(0,o.D7)().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await es[e.shape](a,e,r)}else a=i=await es[e.shape](t,e,r);return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),en[e.id]=a,e.haveCallback&&en[e.id].attr("class",en[e.id].attr("class")+" clickable"),a},"insertNode"),eo=(0,c.K2)(t=>{let e=en[t.id];c.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode");function ec(t,e,r=!1){let a,i="default";(t?.classes?.length||0)>0&&(i=(t?.classes??[]).join(" ")),i+=" flowchart-label";let s=0,n="";switch(t.type){case"round":s=5,n="rect";break;case"composite":s=0,n="composite",a=0;break;case"square":case"group":default:n="rect";break;case"diamond":n="question";break;case"hexagon":n="hexagon";break;case"block_arrow":n="block_arrow";break;case"odd":case"rect_left_inv_arrow":n="rect_left_inv_arrow";break;case"lean_right":n="lean_right";break;case"lean_left":n="lean_left";break;case"trapezoid":n="trapezoid";break;case"inv_trapezoid":n="inv_trapezoid";break;case"circle":n="circle";break;case"ellipse":n="ellipse";break;case"stadium":n="stadium";break;case"subroutine":n="subroutine";break;case"cylinder":n="cylinder";break;case"doublecircle":n="doublecircle"}let c=(0,l.sM)(t?.styles??[]),d=t.label,h=t.size??{width:0,height:0,x:0,y:0},g=e.getDiagramId();return{labelStyle:c.labelStyle,shape:n,labelText:d,rx:s,ry:s,class:i,style:c.style,id:t.id,domId:g?`${g}-${t.id}`:t.id,directions:t.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:t.type,padding:a??(0,o.zj)()?.block?.padding??0,widthInColumns:t.widthInColumns??1}}async function ed(t,e,r){let a=ec(e,r,!1);if("group"===a.type)return;let i=(0,o.zj)(),s=await el(t,a,{config:i}),n=s.node().getBBox(),l=r.getBlock(a.id);l.size={width:n.width,height:n.height,x:0,y:0,node:s},r.setBlock(l),s.remove()}async function eh(t,e,r){let a=ec(e,r,!0);if("space"!==r.getBlock(a.id).type){let r=(0,o.zj)();await el(t,a,{config:r}),e.intersect=a?.intersect,eo(a)}}async function eg(t,e,r,a){for(let i of e)await a(t,i,r),i.children&&await eg(t,i.children,r,a)}async function eu(t,e,r){await eg(t,e,r,ed)}async function ey(t,e,r){await eg(t,e,r,eh)}async function ep(t,e,r,a,i){let s=new f.T({multigraph:!0,compound:!0});for(let t of(s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8}),r))t.size&&s.setNode(t.id,{width:t.size.width,height:t.size.height,intersect:t.intersect});for(let r of e)if(r.start&&r.end){let e=a.getBlock(r.start),n=a.getBlock(r.end);if(e?.size&&n?.size){let a=e.size,l=n.size,o=[{x:a.x,y:a.y},{x:a.x+(l.x-a.x)/2,y:a.y+(l.y-a.y)/2},{x:l.x,y:l.y}],c=i?`${i}-${r.id}`:r.id,d="thick"===r.thickness?"edge-thickness-thick":"edge-thickness-normal",h="dotted"===r.pattern?"edge-pattern-dotted":"edge-pattern-solid",g=`${d} ${h} flowchart-link LS-a1 LE-b1`;tI(t,{v:r.start,w:r.end,name:c},{...r,id:c,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:o,classes:g},void 0,"block",s,i),r.label&&(await tD(t,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:o,classes:g}),tK({...r,x:o[1].x,y:o[1].y},{originalPath:o}))}}}(0,c.K2)(ec,"getNodeFromBlock"),(0,c.K2)(ed,"calculateBlockSize"),(0,c.K2)(eh,"insertBlockPositioned"),(0,c.K2)(eg,"performOperations"),(0,c.K2)(eu,"calculateBlockSizes"),(0,c.K2)(ey,"insertBlocks"),(0,c.K2)(ep,"insertEdges");var ex=(0,c.K2)(function(t,e){return e.db.getClasses()},"getClasses"),eb={parser:m,db:te,renderer:{draw:(0,c.K2)(async function(t,e,r,a){let i,{securityLevel:s,block:n}=(0,o.zj)(),l=a.db;l.setDiagramId(e),"sandbox"===s&&(i=(0,b.Ltv)("#i"+e));let d="sandbox"===s?(0,b.Ltv)(i.nodes()[0].contentDocument.body):(0,b.Ltv)("body"),h="sandbox"===s?d.select(`[id="${e}"]`):(0,b.Ltv)(`[id="${e}"]`);ti(h,["point","circle","cross"],a.type,e);let g=l.getBlocks(),u=l.getBlocksFlat(),y=l.getEdges(),p=h.insert("g").attr("class","block");await eu(p,g,l);let x=tm(l);if(await ey(p,g,l),await ep(p,y,u,l,e),x){let t=Math.max(1,Math.round(.125*(x.width/x.height))),e=x.height+t+10,r=x.width+10,{useMaxWidth:a}=n;(0,o.a$)(h,e,r,!!a),c.Rm.debug("Here Bounds",x,x),h.attr("viewBox",`${x.x-5} ${x.y-5} ${x.width+10} ${x.height+10}`)}},"draw"),getClasses:ex},styles:ta}},60633:(t,e,r)=>{r.d(e,{o:()=>a});var a=(0,r(32165).K2)(()=>`
127
+ node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let a=t.x,i=t.y,s=Math.abs(a-r.x),n=t.width/2,l=r.x<e.x?n-s:n+s,o=t.height/2,d=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*n>Math.abs(a-e.x)*o){let t=r.y<e.y?e.y-o-i:i-o-e.y;l=h*t/d;let a={x:r.x<e.x?r.x+l:r.x-h+l,y:r.y<e.y?r.y+d-t:r.y-d+t};return 0===l&&(a.x=e.x,a.y=e.y),0===h&&(a.x=e.x),0===d&&(a.y=e.y),c.Rm.debug(`abc89 topp/bott calc, Q ${d}, q ${t}, R ${h}, r ${l}`,a),a}{let t=d*(l=r.x<e.x?e.x-n-a:a-n-e.x)/h,i=r.x<e.x?r.x+h-l:r.x-h+l,s=r.y<e.y?r.y+t:r.y-t;return c.Rm.debug(`sides calc abc89, Q ${d}, q ${t}, R ${h}, r ${l}`,{_x:i,_y:s}),0===l&&(i=e.x,s=e.y),0===h&&(i=e.x),0===d&&(s=e.y),{x:i,y:s}}},"intersection"),tT=(0,c.K2)((t,e)=>{c.Rm.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],i=!1;return t.forEach(t=>{if(t$(e,t)||i)a=t,i||r.push(t);else{let s=tv(e,a,t),n=!1;r.forEach(t=>{n=n||t.x===s.x&&t.y===s.y}),r.some(t=>t.x===s.x&&t.y===s.y)||r.push(s),i=!0}}),r},"cutPathAtIntersect"),tI=(0,c.K2)(function(t,e,r,a,s,n,l){let d,h=r.points;c.Rm.debug("abc88 InsertEdge: edge=",r,"e=",e);let g=!1,u=n.node(e.v);var y=n.node(e.w);y?.intersect&&u?.intersect&&((h=h.slice(1,r.points.length-1)).unshift(u.intersect(h[0])),h.push(y.intersect(h[h.length-1]))),r.toCluster&&(c.Rm.debug("to cluster abc88",a[r.toCluster]),h=tT(r.points,a[r.toCluster].node),g=!0),r.fromCluster&&(c.Rm.debug("from cluster abc88",a[r.fromCluster]),h=tT(h.reverse(),a[r.fromCluster].node).reverse(),g=!0);let p=h.filter(t=>!Number.isNaN(t.y)),x=b.qrM;r.curve&&("graph"===s||"flowchart"===s)&&(x=r.curve);let{x:f,y:m}=(0,i.RI)(r),w=(0,b.n8j)().x(f).y(m).curve(x);switch(r.thickness){case"normal":d="edge-thickness-normal";break;case"thick":case"invisible":d="edge-thickness-thick";break;default:d=""}switch(r.pattern){case"solid":d+=" edge-pattern-solid";break;case"dotted":d+=" edge-pattern-dotted";break;case"dashed":d+=" edge-pattern-dashed"}let k=t.append("path").attr("d",w(p)).attr("id",r.id).attr("class"," "+d+(r.classes?" "+r.classes:"")).attr("style",r.style),L="";((0,o.D7)().flowchart.arrowMarkerAbsolute||(0,o.D7)().state.arrowMarkerAbsolute)&&(L=(0,o.ID)(!0)),tk(k,r,L,l,s);let S={};return g&&(S.updatedPath=h),S.originalPath=r.points,S},"insertEdge"),tN=(0,c.K2)(t=>{let e=new Set;for(let r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),tC=(0,c.K2)((t,e,r,a)=>{let i=tN(t),s=e.height+2*r.padding,n=s/2,l=a??e.width+2*n+r.padding,o=r.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:l/2,y:2*o},{x:l-n,y:0},{x:l,y:0},{x:l,y:-s/3},{x:l+2*o,y:-s/2},{x:l,y:-2*s/3},{x:l,y:-s},{x:l-n,y:-s},{x:l/2,y:-s-2*o},{x:n,y:-s},{x:0,y:-s},{x:0,y:-2*s/3},{x:-2*o,y:-s/2},{x:0,y:-s/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:n,y:0},{x:l-n,y:0},{x:l,y:-s/2},{x:l-n,y:-s},{x:n,y:-s},{x:0,y:-s/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:n,y:-s},{x:l-n,y:-s},{x:l,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:l,y:-n},{x:l,y:-s+n},{x:0,y:-s}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:l,y:0},{x:0,y:-n},{x:0,y:-s+n},{x:l,y:-s}]:i.has("right")&&i.has("left")?[{x:n,y:0},{x:n,y:-o},{x:l-n,y:-o},{x:l-n,y:0},{x:l,y:-s/2},{x:l-n,y:-s},{x:l-n,y:-s+o},{x:n,y:-s+o},{x:n,y:-s},{x:0,y:-s/2}]:i.has("up")&&i.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:n,y:-o},{x:n,y:-s+o},{x:0,y:-s+o},{x:l/2,y:-s},{x:l,y:-s+o},{x:l-n,y:-s+o},{x:l-n,y:-o},{x:l,y:-o}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:l,y:-n},{x:0,y:-s}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-s}]:i.has("left")&&i.has("up")?[{x:l,y:0},{x:0,y:-n},{x:l,y:-s}]:i.has("left")&&i.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-s}]:i.has("right")?[{x:n,y:-o},{x:n,y:-o},{x:l-n,y:-o},{x:l-n,y:0},{x:l,y:-s/2},{x:l-n,y:-s},{x:l-n,y:-s+o},{x:n,y:-s+o},{x:n,y:-s+o}]:i.has("left")?[{x:n,y:0},{x:n,y:-o},{x:l-n,y:-o},{x:l-n,y:-s+o},{x:n,y:-s+o},{x:n,y:-s},{x:0,y:-s/2}]:i.has("up")?[{x:n,y:-o},{x:n,y:-s+o},{x:0,y:-s+o},{x:l/2,y:-s},{x:l,y:-s+o},{x:l-n,y:-s+o},{x:l-n,y:-o}]:i.has("down")?[{x:l/2,y:0},{x:0,y:-o},{x:n,y:-o},{x:n,y:-s+o},{x:l-n,y:-s+o},{x:l-n,y:-o},{x:l,y:-o}]:[{x:0,y:0}]},"getArrowPoints");function tB(t,e,r,a){var i=t.x,s=t.y,n=i-a.x,l=s-a.y,o=Math.sqrt(e*e*l*l+r*r*n*n),c=Math.abs(e*r*n/o);a.x<i&&(c=-c);var d=Math.abs(e*r*l/o);return a.y<s&&(d=-d),{x:i+c,y:s+d}}function tO(t,e,r){return tB(t,e,e,r)}function tz(t,e,r,a){var i,s,n,l,o,c,d,h,g,u,y,p,x;if(i=e.y-t.y,n=t.x-e.x,o=e.x*t.y-t.x*e.y,g=i*r.x+n*r.y+o,u=i*a.x+n*a.y+o,!(0!==g&&0!==u&&tA(g,u))){if((s=a.y-r.y,l=r.x-a.x,c=a.x*r.y-r.x*a.y,d=s*t.x+l*t.y+c,h=s*e.x+l*e.y+c,!(0!==d&&0!==h&&tA(d,h)))&&0!=(y=i*l-s*n))return p=Math.abs(y/2),{x:(x=n*c-l*o)<0?(x-p)/y:(x+p)/y,y:(x=s*o-i*c)<0?(x-p)/y:(x+p)/y}}}function tA(t,e){return t*e>0}function tM(t,e,r){var a=t.x,i=t.y,s=[],n=1/0,l=1/0;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),l=Math.min(l,t.y)}):(n=Math.min(n,e.x),l=Math.min(l,e.y));for(var o=a-t.width/2-n,c=i-t.height/2-l,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0],u=tz(t,r,{x:o+h.x,y:c+h.y},{x:o+g.x,y:c+g.y});u&&s.push(u)}return s.length?(s.length>1&&s.sort(function(t,e){var a=t.x-r.x,i=t.y-r.y,s=Math.sqrt(a*a+i*i),n=e.x-r.x,l=e.y-r.y,o=Math.sqrt(n*n+l*l);return s<o?-1:+(s!==o)}),s[0]):t}(0,c.K2)(function(t,e){return t.intersect(e)},"intersectNode"),(0,c.K2)(tB,"intersectEllipse"),(0,c.K2)(tO,"intersectCircle"),(0,c.K2)(tz,"intersectLine"),(0,c.K2)(tA,"sameSign"),(0,c.K2)(tM,"intersectPolygon");var tP=(0,c.K2)((t,e)=>{var r,a,i=t.x,s=t.y,n=e.x-i,l=e.y-s,o=t.width/2,c=t.height/2;return Math.abs(l)*o>Math.abs(n)*c?(l<0&&(c=-c),r=0===l?0:c*n/l,a=c):(n<0&&(o=-o),r=o,a=0===n?0:o*l/n),{x:i+r,y:s+a}},"intersectRect"),tj=(0,c.K2)(async(t,e,r,a)=>{let i,c,d=(0,o.D7)(),h=e.useHtmlLabels||(0,o.E)(d),g=t.insert("g").attr("class",r||"node default").attr("id",e.domId||e.id),u=g.insert("g").attr("class","label").attr("style",e.labelStyle);i=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];let y=(c="markdown"===e.labelType?(0,n.GZ)(u,(0,o.jZ)((0,l.Sm)(i),d),{useHtmlLabels:h,width:e.width||d.flowchart.wrappingWidth,classes:"markdown-node-label"},d):await tw(u,(0,o.jZ)((0,l.Sm)(i),d),e.labelStyle,!1,a)).getBBox(),p=e.padding/2;if((0,o.E)(d)){let t=c.children[0],e=(0,b.Ltv)(c);await (0,s.X)(t,i),y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return h?u.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"):u.attr("transform","translate(0, "+-y.height/2+")"),e.centerLabel&&u.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),u.insert("rect",":first-child"),{shapeSvg:g,bbox:y,halfPadding:p,label:u}},"labelHelper"),tW=(0,c.K2)((t,e)=>{let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds");function tY(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,c.K2)(tY,"insertPolygonShape");var tF=(0,c.K2)(async(t,e)=>{e.useHtmlLabels||(0,o.E)((0,o.D7)())||(e.centerLabel=!0);let{shapeSvg:r,bbox:a,halfPadding:i}=await tj(t,e,"node "+e.classes,!0);c.Rm.info("Classes = ",e.classes);let s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-a.width/2-i).attr("y",-a.height/2-i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),tW(e,s),e.intersect=function(t){return tP(e,t)},r},"note"),tX=(0,c.K2)(t=>t?" "+t:"","formatClass"),tU=(0,c.K2)((t,e)=>`${e||"node default"}${tX(t.classes)} ${tX(t.class)}`,"getClassesFromNode"),tH=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding+(a.height+e.padding),s=[{x:i/2,y:0},{x:i,y:-i/2},{x:i/2,y:-i},{x:0,y:-i/2}];c.Rm.info("Question main (Circle)");let n=tY(r,i,i,s);return n.attr("style",e.style),tW(e,n),e.intersect=function(t){return c.Rm.warn("Intersect called"),tM(e,s,t)},r},"question"),tZ=(0,c.K2)((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);return r.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return tO(e,14,t)},r},"choice"),tq=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=e.positioned?e.height:a.height+e.padding,s=i/4,n=e.positioned?e.width:a.width+2*s+e.padding,l=[{x:s,y:0},{x:n-s,y:0},{x:n,y:-i/2},{x:n-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}],o=tY(r,n,i,l);return o.attr("style",e.style),tW(e,o),e.intersect=function(t){return tM(e,l,t)},r},"hexagon"),tG=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,void 0,!0),i=a.height+2*e.padding,s=i/2,n=a.width+2*s+e.padding,l=e.positioned&&(e.widthInColumns??1)>1&&e.width>n?e.width:n,o=tC(e.directions,a,e,l),c=tY(r,l,i,o);return c.attr("style",e.style),tW(e,c),e.intersect=function(t){return tM(e,o,t)},r},"block_arrow"),tV=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-s/2,y:0},{x:i,y:0},{x:i,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return tY(r,i,s,n).attr("style",e.style),e.width=i+s,e.height=s,e.intersect=function(t){return tM(e,n,t)},r},"rect_left_inv_arrow"),tJ=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-2*s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:s/6,y:-s}],l=tY(r,i,s,n);return l.attr("style",e.style),tW(e,l),e.intersect=function(t){return tM(e,n,t)},r},"lean_right"),tQ=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:2*s/6,y:0},{x:i+s/6,y:0},{x:i-2*s/6,y:-s},{x:-s/6,y:-s}],l=tY(r,i,s,n);return l.attr("style",e.style),tW(e,l),e.intersect=function(t){return tM(e,n,t)},r},"lean_left"),t0=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:-2*s/6,y:0},{x:i+2*s/6,y:0},{x:i-s/6,y:-s},{x:s/6,y:-s}],l=tY(r,i,s,n);return l.attr("style",e.style),tW(e,l),e.intersect=function(t){return tM(e,n,t)},r},"trapezoid"),t2=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:s/6,y:0},{x:i-s/6,y:0},{x:i+2*s/6,y:-s},{x:-2*s/6,y:-s}],l=tY(r,i,s,n);return l.attr("style",e.style),tW(e,l),e.intersect=function(t){return tM(e,n,t)},r},"inv_trapezoid"),t1=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:0,y:0},{x:i+s/2,y:0},{x:i,y:-s/2},{x:i+s/2,y:-s},{x:0,y:-s}],l=tY(r,i,s,n);return l.attr("style",e.style),tW(e,l),e.intersect=function(t){return tM(e,n,t)},r},"rect_right_inv_arrow"),t3=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding,s=i/2,n=s/(2.5+i/50),l=a.height+n+e.padding,o="M 0,"+n+" a "+s+","+n+" 0,0,0 "+i+" 0 a "+s+","+n+" 0,0,0 "+-i+" 0 l 0,"+l+" a "+s+","+n+" 0,0,0 "+i+" 0 l 0,"+-l,c=r.attr("label-offset-y",n).insert("path",":first-child").attr("style",e.style).attr("d",o).attr("transform","translate("+-i/2+","+-(l/2+n)+")");return tW(e,c),e.intersect=function(t){let r=tP(e,t),a=r.x-e.x;if(0!=s&&(Math.abs(a)<e.width/2||Math.abs(a)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-n)){let i=n*n*(1-a*a/(s*s));0!=i&&(i=Math.sqrt(i)),i=n-i,t.y-e.y>0&&(i=-i),r.y+=i}return r},r},"cylinder"),t4=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a,halfPadding:i}=await tj(t,e,"node "+e.classes+" "+e.class,!0),s=r.insert("rect",":first-child"),n=e.positioned?e.width:a.width+e.padding,l=e.positioned?e.height:a.height+e.padding,o=e.positioned?-n/2:-a.width/2-i,d=e.positioned?-l/2:-a.height/2-i;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",d).attr("width",n).attr("height",l),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(t7(s,e.props.borders,n,l),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return tW(e,s),e.intersect=function(t){return tP(e,t)},r},"rect"),t8=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a,halfPadding:i}=await tj(t,e,"node "+e.classes,!0),s=r.insert("rect",":first-child"),n=e.positioned?e.width:a.width+e.padding,l=e.positioned?e.height:a.height+e.padding,o=e.positioned?-n/2:-a.width/2-i,d=e.positioned?-l/2:-a.height/2-i;if(s.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",d).attr("width",n).attr("height",l),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(t7(s,e.props.borders,n,l),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return tW(e,s),e.intersect=function(t){return tP(e,t)},r},"composite"),t5=(0,c.K2)(async(t,e)=>{let{shapeSvg:r}=await tj(t,e,"label",!0);c.Rm.trace("Classes = ",e.class);let a=r.insert("rect",":first-child");if(a.attr("width",0).attr("height",0),r.attr("class","label edgeLabel"),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(t7(a,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{c.Rm.warn(`Unknown node property ${t}`)})}return tW(e,a),e.intersect=function(t){return tP(e,t)},r},"labelRect");function t7(t,e,r,a){let i=[],s=(0,c.K2)(t=>{i.push(t,0)},"addBorder"),n=(0,c.K2)(t=>{i.push(0,t)},"skipBorder");e.includes("t")?(c.Rm.debug("add top border"),s(r)):n(r),e.includes("r")?(c.Rm.debug("add right border"),s(a)):n(a),e.includes("b")?(c.Rm.debug("add bottom border"),s(r)):n(r),e.includes("l")?(c.Rm.debug("add left border"),s(a)):n(a),t.attr("stroke-dasharray",i.join(" "))}(0,c.K2)(t7,"applyNodePropertyBorders");var t9=(0,c.K2)(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";let a=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=a.insert("rect",":first-child"),s=a.insert("line"),n=a.insert("g").attr("class","label"),l=e.labelText.flat?e.labelText.flat():e.labelText,d="";d="object"==typeof l?l[0]:l,c.Rm.info("Label text abc79",d,l,"object"==typeof l);let h=await tw(n,d,e.labelStyle,!0,!0),g={width:0,height:0};if((0,o.E)((0,o.D7)())){let t=h.children[0],e=(0,b.Ltv)(h);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}c.Rm.info("Text 2",l);let u=l.slice(1,l.length),y=h.getBBox(),p=await tw(n,u.join?u.join("<br/>"):u,e.labelStyle,!0,!0);if((0,o.E)((0,o.D7)())){let t=p.children[0],e=(0,b.Ltv)(p);g=t.getBoundingClientRect(),e.attr("width",g.width),e.attr("height",g.height)}let x=e.padding/2;return(0,b.Ltv)(p).attr("transform","translate( "+(g.width>y.width?0:(y.width-g.width)/2)+", "+(y.height+x+5)+")"),(0,b.Ltv)(h).attr("transform","translate( "+(g.width<y.width?0:-(y.width-g.width)/2)+", 0)"),g=n.node().getBBox(),n.attr("transform","translate("+-g.width/2+", "+(-g.height/2-x+3)+")"),i.attr("class","outer title-state").attr("x",-g.width/2-x).attr("y",-g.height/2-x).attr("width",g.width+e.padding).attr("height",g.height+e.padding),s.attr("class","divider").attr("x1",-g.width/2-x).attr("x2",g.width/2+x).attr("y1",-g.height/2-x+y.height+x).attr("y2",-g.height/2-x+y.height+x),tW(e,i),e.intersect=function(t){return tP(e,t)},a},"rectWithTitle"),t6=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.height+e.padding,s=a.width+i/4+e.padding,n=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-s/2).attr("y",-i/2).attr("width",s).attr("height",i);return tW(e,n),e.intersect=function(t){return tP(e,t)},r},"stadium"),et=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a,halfPadding:i}=await tj(t,e,tU(e,void 0),!0),s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),c.Rm.info("Circle main"),tW(e,s),e.intersect=function(t){return c.Rm.info("Circle intersect",e,a.width/2+i,t),tO(e,a.width/2+i,t)},r},"circle"),ee=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a,halfPadding:i}=await tj(t,e,tU(e,void 0),!0),s=r.insert("g",":first-child"),n=s.insert("circle"),l=s.insert("circle");return s.attr("class",e.class),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i+5).attr("width",a.width+e.padding+10).attr("height",a.height+e.padding+10),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),c.Rm.info("DoubleCircle main"),tW(e,n),e.intersect=function(t){return c.Rm.info("DoubleCircle intersect",e,a.width/2+i+5,t),tO(e,a.width/2+i+5,t)},r},"doublecircle"),er=(0,c.K2)(async(t,e)=>{let{shapeSvg:r,bbox:a}=await tj(t,e,tU(e,void 0),!0),i=a.width+e.padding,s=a.height+e.padding,n=[{x:0,y:0},{x:i,y:0},{x:i,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],l=tY(r,i,s,n);return l.attr("style",e.style),tW(e,l),e.intersect=function(t){return tM(e,n,t)},r},"subroutine"),ea=(0,c.K2)((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),tW(e,a),e.intersect=function(t){return tO(e,7,t)},r},"start"),ei=(0,c.K2)((t,e,r)=>{let a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,s=10;return"LR"===r&&(i=10,s=70),tW(e,a.append("rect").attr("x",-1*i/2).attr("y",-1*s/2).attr("width",i).attr("height",s).attr("class","fork-join")),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return tP(e,t)},a},"forkJoin"),es={rhombus:tH,composite:t8,question:tH,rect:t4,labelRect:t5,rectWithTitle:t9,choice:tZ,circle:et,doublecircle:ee,stadium:t6,hexagon:tq,block_arrow:tG,rect_left_inv_arrow:tV,lean_right:tJ,lean_left:tQ,trapezoid:t0,inv_trapezoid:t2,rect_right_inv_arrow:t1,cylinder:t3,start:ea,end:(0,c.K2)((t,e)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),a.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),tW(e,i),e.intersect=function(t){return tO(e,7,t)},r},"end"),note:tF,subroutine:er,fork:ei,join:ei,class_box:(0,c.K2)(async(t,e)=>{let r,a=e.padding/2;r=e.classes?"node "+e.classes:"node default";let i=t.insert("g").attr("class",r).attr("id",e.domId||e.id),s=i.insert("rect",":first-child"),n=i.insert("line"),l=i.insert("line"),c=0,d=4,h=i.insert("g").attr("class","label"),g=0,u=e.classData.annotations?.[0],y=e.classData.annotations[0]?"\xab"+e.classData.annotations[0]+"\xbb":"",p=await tw(h,y,e.labelStyle,!0,!0),x=p.getBBox();if((0,o.E)((0,o.D7)())){let t=p.children[0],e=(0,b.Ltv)(p);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}e.classData.annotations[0]&&(d+=x.height+4,c+=x.width);let f=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,o.E)((0,o.D7)())?f+="&lt;"+e.classData.type+"&gt;":f+="<"+e.classData.type+">");let m=await tw(h,f,e.labelStyle,!0,!0);(0,b.Ltv)(m).attr("class","classTitle");let w=m.getBBox();if((0,o.E)((0,o.D7)())){let t=m.children[0],e=(0,b.Ltv)(m);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}d+=w.height+4,w.width>c&&(c=w.width);let k=[];e.classData.members.forEach(async t=>{let r=t.getDisplayDetails(),a=r.displayText;(0,o.E)((0,o.D7)())&&(a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let i=await tw(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0),s=i.getBBox();if((0,o.E)((0,o.D7)())){let t=i.children[0],e=(0,b.Ltv)(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>c&&(c=s.width),d+=s.height+4,k.push(i)}),d+=8;let L=[];if(e.classData.methods.forEach(async t=>{let r=t.getDisplayDetails(),a=r.displayText;(0,o.E)((0,o.D7)())&&(a=a.replace(/</g,"&lt;").replace(/>/g,"&gt;"));let i=await tw(h,a,r.cssStyle?r.cssStyle:e.labelStyle,!0,!0),s=i.getBBox();if((0,o.E)((0,o.D7)())){let t=i.children[0],e=(0,b.Ltv)(i);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}s.width>c&&(c=s.width),d+=s.height+4,L.push(i)}),d+=8,u){let t=(c-x.width)/2;(0,b.Ltv)(p).attr("transform","translate( "+(-1*c/2+t)+", "+-1*d/2+")"),g=x.height+4}let S=(c-w.width)/2;return(0,b.Ltv)(m).attr("transform","translate( "+(-1*c/2+S)+", "+(-1*d/2+g)+")"),g+=w.height+4,n.attr("class","divider").attr("x1",-c/2-a).attr("x2",c/2+a).attr("y1",-d/2-a+8+g).attr("y2",-d/2-a+8+g),g+=8,k.forEach(t=>{(0,b.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g+4)+")");let e=t?.getBBox();g+=(e?.height??0)+4}),g+=8,l.attr("class","divider").attr("x1",-c/2-a).attr("x2",c/2+a).attr("y1",-d/2-a+8+g).attr("y2",-d/2-a+8+g),g+=8,L.forEach(t=>{(0,b.Ltv)(t).attr("transform","translate( "+-c/2+", "+(-1*d/2+g)+")");let e=t?.getBBox();g+=(e?.height??0)+4}),s.attr("style",e.style).attr("class","outer title-state").attr("x",-c/2-a).attr("y",-(d/2)-a).attr("width",c+e.padding).attr("height",d+e.padding),tW(e,s),e.intersect=function(t){return tP(e,t)},i},"class_box")},en={},el=(0,c.K2)(async(t,e,r)=>{let a,i;if(e.link){let s;"sandbox"===(0,o.D7)().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await es[e.shape](a,e,r)}else a=i=await es[e.shape](t,e,r);return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),en[e.id]=a,e.haveCallback&&en[e.id].attr("class",en[e.id].attr("class")+" clickable"),a},"insertNode"),eo=(0,c.K2)(t=>{let e=en[t.id];c.Rm.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode");function ec(t,e,r=!1){let a,i="default";(t?.classes?.length||0)>0&&(i=(t?.classes??[]).join(" ")),i+=" flowchart-label";let s=0,n="";switch(t.type){case"round":s=5,n="rect";break;case"composite":s=0,n="composite",a=0;break;case"square":case"group":default:n="rect";break;case"diamond":n="question";break;case"hexagon":n="hexagon";break;case"block_arrow":n="block_arrow";break;case"odd":case"rect_left_inv_arrow":n="rect_left_inv_arrow";break;case"lean_right":n="lean_right";break;case"lean_left":n="lean_left";break;case"trapezoid":n="trapezoid";break;case"inv_trapezoid":n="inv_trapezoid";break;case"circle":n="circle";break;case"ellipse":n="ellipse";break;case"stadium":n="stadium";break;case"subroutine":n="subroutine";break;case"cylinder":n="cylinder";break;case"doublecircle":n="doublecircle"}let c=(0,l.sM)(t?.styles??[]),d=t.label,h=t.size??{width:0,height:0,x:0,y:0},g=e.getDiagramId();return{labelStyle:c.labelStyle,shape:n,labelText:d,rx:s,ry:s,class:i,style:c.style,id:t.id,domId:g?`${g}-${t.id}`:t.id,directions:t.directions,width:h.width,height:h.height,x:h.x,y:h.y,positioned:r,intersect:void 0,type:t.type,padding:a??(0,o.zj)()?.block?.padding??0,widthInColumns:t.widthInColumns??1}}async function ed(t,e,r){let a=ec(e,r,!1);if("group"===a.type)return;let i=(0,o.zj)(),s=await el(t,a,{config:i}),n=s.node().getBBox(),l=r.getBlock(a.id);l.size={width:n.width,height:n.height,x:0,y:0,node:s},r.setBlock(l),s.remove()}async function eh(t,e,r){let a=ec(e,r,!0);if("space"!==r.getBlock(a.id).type){let r=(0,o.zj)();await el(t,a,{config:r}),e.intersect=a?.intersect,eo(a)}}async function eg(t,e,r,a){for(let i of e)await a(t,i,r),i.children&&await eg(t,i.children,r,a)}async function eu(t,e,r){await eg(t,e,r,ed)}async function ey(t,e,r){await eg(t,e,r,eh)}async function ep(t,e,r,a,i){let s=new f.T({multigraph:!0,compound:!0});for(let t of(s.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8}),r))t.size&&s.setNode(t.id,{width:t.size.width,height:t.size.height,intersect:t.intersect});for(let r of e)if(r.start&&r.end){let e=a.getBlock(r.start),n=a.getBlock(r.end);if(e?.size&&n?.size){let a=e.size,l=n.size,o=[{x:a.x,y:a.y},{x:a.x+(l.x-a.x)/2,y:a.y+(l.y-a.y)/2},{x:l.x,y:l.y}],c=i?`${i}-${r.id}`:r.id,d="thick"===r.thickness?"edge-thickness-thick":"edge-thickness-normal",h="dotted"===r.pattern?"edge-pattern-dotted":"edge-pattern-solid",g=`${d} ${h} flowchart-link LS-a1 LE-b1`;tI(t,{v:r.start,w:r.end,name:c},{...r,id:c,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:o,classes:g},void 0,"block",s,i),r.label&&(await tD(t,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:o,classes:g}),tK({...r,x:o[1].x,y:o[1].y},{originalPath:o}))}}}(0,c.K2)(ec,"getNodeFromBlock"),(0,c.K2)(ed,"calculateBlockSize"),(0,c.K2)(eh,"insertBlockPositioned"),(0,c.K2)(eg,"performOperations"),(0,c.K2)(eu,"calculateBlockSizes"),(0,c.K2)(ey,"insertBlocks"),(0,c.K2)(ep,"insertEdges");var ex=(0,c.K2)(function(t,e){return e.db.getClasses()},"getClasses"),eb={parser:m,db:te,renderer:{draw:(0,c.K2)(async function(t,e,r,a){let i,{securityLevel:s,block:n}=(0,o.zj)(),l=a.db;l.setDiagramId(e),"sandbox"===s&&(i=(0,b.Ltv)("#i"+e));let d="sandbox"===s?(0,b.Ltv)(i.nodes()[0].contentDocument.body):(0,b.Ltv)("body"),h="sandbox"===s?d.select(`[id="${e}"]`):(0,b.Ltv)(`[id="${e}"]`);ti(h,["point","circle","cross"],a.type,e);let g=l.getBlocks(),u=l.getBlocksFlat(),y=l.getEdges(),p=h.insert("g").attr("class","block");await eu(p,g,l);let x=tm(l);if(await ey(p,g,l),await ep(p,y,u,l,e),x){let t=Math.max(1,Math.round(.125*(x.width/x.height))),e=x.height+t+10,r=x.width+10,{useMaxWidth:a}=n;(0,o.a$)(h,e,r,!!a),c.Rm.debug("Here Bounds",x,x),h.attr("viewBox",`${x.x-5} ${x.y-5} ${x.width+10} ${x.height+10}`)}},"draw"),getClasses:ex},styles:ta}},60633:(t,e,r)=>{r.d(e,{o:()=>a});var a=(0,r(32165).K2)(()=>`
128
128
  /* Font Awesome icon styling - consolidated */
129
129
  .label-icon {
130
130
  display: inline-block;
@@ -1 +1 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7343],{27343:(e,r,t)=>{t.d(r,{diagram:()=>u});var a=t(85749);t(66777),t(93789),t(3628),t(72475),t(85774),t(63886),t(38033),t(17541),t(27655),t(32563),t(97096);var s=t(32165),u={parser:a.Zk,get db(){return new a.u4(2)},renderer:a.q7,styles:a.tM,init:(0,s.K2)(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]);
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7343],{27343:(e,r,t)=>{t.d(r,{diagram:()=>u});var a=t(85749);t(66777),t(93789),t(3628),t(72475),t(85774),t(63886),t(38033),t(17541),t(88774),t(32563),t(97096);var s=t(32165),u={parser:a.Zk,get db(){return new a.u4(2)},renderer:a.q7,styles:a.tM,init:(0,s.K2)(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}}]);
@@ -12,7 +12,7 @@
12
12
  stroke: revert;
13
13
  stroke-width: revert;
14
14
  }
15
- `,"getIconStyles")},67547:(t,e,i)=>{i.d(e,{diagram:()=>A});var n=i(21354),s=i(60633),r=i(14759),o=i(63886);i(38033),i(17541),i(27655),i(32563);var a=i(97096),l=i(32165),c=i(6424),h=i(99507),u=i(68195),g=function(){var t=(0,l.K2)(function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},"o"),e=[1,4],i=[1,13],n=[1,12],s=[1,15],r=[1,16],o=[1,20],a=[1,19],c=[6,7,8],h=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,l.K2)(function(t,e,i,n,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",r[a-1].id),n.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:n.getLogger().info("Node: ",r[a].id),n.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:n.getLogger().trace("Icon: ",r[a]),n.decorateNode({icon:r[a]});break;case 18:case 23:n.decorateNode({class:r[a]});break;case 19:n.getLogger().trace("SPACELIST");break;case 20:n.getLogger().trace("Node: ",r[a-1].id),n.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:n.getLogger().trace("Node: ",r[a].id),n.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:n.decorateNode({icon:r[a]});break;case 27:n.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:n.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:n.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:n.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:i,7:[1,10],9:9,12:11,13:n,14:14,16:s,17:r,18:17,19:18,20:o,23:a},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:i,9:22,12:11,13:n,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:h,7:u,10:23,11:g},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:a}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(y,[2,25]),t(y,[2,26]),t(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:g},{1:[2,7],6:i,12:21,13:n,14:14,16:s,17:r,18:17,19:18,20:o,23:a},t(f,[2,14],{7:m,11:b}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:k}),t(y,[2,31]),{21:[1,39]},{22:[1,40]},t(f,[2,13],{7:m,11:b}),t(_,[2,11]),t(_,[2,12]),t(d,[2,15],{24:k}),t(y,[2,30]),{22:[1,41]},t(y,[2,27]),t(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,l.K2)(function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},"parseError"),parse:(0,l.K2)(function(t){var e=this,i=[0],n=[],s=[null],r=[],o=this.table,a="",c=0,h=0,u=0,g=r.slice.call(arguments,1),d=Object.create(this.lexer),p={};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p[y]=this.yy[y]);d.setInput(t,p),p.lexer=d,p.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;r.push(f);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.parseError?this.parseError=p.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){i.length=i.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),(0,l.K2)(b,"lex");for(var _,k,E,S,N,x,D,L,I,v={};;){if(E=i[i.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=b()),S=o[E]&&o[E][_]),void 0===S||!S.length||!S[0]){var C="";for(x in I=[],o[E])this.terminals_[x]&&x>2&&I.push("'"+this.terminals_[x]+"'");C=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:f,expected:I})}if(S[0]instanceof Array&&S.length>1)throw Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:i.push(_),s.push(d.yytext),r.push(d.yylloc),i.push(S[1]),_=null,k?(_=k,k=null):(h=d.yyleng,a=d.yytext,c=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[S[1]][1],v.$=s[s.length-D],v._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(v._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(N=this.performAction.apply(v,[a,h,c,p,S[1],s,r].concat(g))))return N;D&&(i=i.slice(0,-1*D*2),s=s.slice(0,-1*D),r=r.slice(0,-1*D)),i.push(this.productions_[S[1]][0]),s.push(v.$),r.push(v._$),L=o[i[i.length-2]][i[i.length-1]],i.push(L);break;case 3:return!0}}return!0},"parse")};function S(){this.yy={}}return E.lexer={EOF:1,parseError:(0,l.K2)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),i.length-1&&(this.yylineno-=i.length-1);var s=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:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(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,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var i,n,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var r in s)this[r]=s[r];return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,i,n,s=this._currentRules(),r=0;r<s.length;r++)if((i=this._input.match(this.rules[s[r]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&t:""===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,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(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,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,i,n){switch(i){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return e.yytext=e.yytext.replace(/\n\s*/g,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}},(0,l.K2)(S,"Parser"),S.prototype=E,E.Parser=S,new S}();g.parser=g;var d=[],p=[],y=0,f={},m=(0,l.K2)(()=>{d=[],p=[],y=0,f={}},"clear"),b=(0,l.K2)(t=>{if(0===d.length)return null;let e=d[0].level,i=null;for(let t=d.length-1;t>=0;t--)if(d[t].level!==e||i||(i=d[t]),d[t].level<e)throw Error('Items without section detected, found section ("'+d[t].label+'")');return t===i?.level?null:i},"getSection"),_=(0,l.K2)(function(){return p},"getSections"),k=(0,l.K2)(function(){let t=[],e=_(),i=(0,a.D7)();for(let n of e){let e={id:n.id,label:(0,a.jZ)(n.label??"",i),labelType:"markdown",isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};for(let s of(t.push(e),d.filter(t=>t.parentId===n.id))){let e={id:s.id,parentId:n.id,label:(0,a.jZ)(s.label??"",i),labelType:"markdown",isGroup:!1,ticket:s?.ticket,priority:s?.priority,assigned:s?.assigned,icon:s?.icon,shape:"kanbanItem",level:s.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:(0,a.D7)()}},"getData"),E=(0,l.K2)((t,e,i,n,s)=>{let o=(0,a.D7)(),l=o.mindmap?.padding??a.UI.mindmap.padding;switch(n){case S.ROUNDED_RECT:case S.RECT:case S.HEXAGON:l*=2}let c={id:(0,a.jZ)(e,o)||"kbn"+y++,level:t,label:(0,a.jZ)(i,o),width:o.mindmap?.maxNodeWidth??a.UI.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(void 0!==s){let t;t=s.includes("\n")?s+"\n":"{\n"+s+"\n}";let e=(0,r.H)(t,{schema:r.r});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(c.shape=e?.shape),e?.label&&(c.label=e?.label),e?.icon&&(c.icon=e?.icon.toString()),e?.assigned&&(c.assigned=e?.assigned.toString()),e?.ticket&&(c.ticket=e?.ticket.toString()),e?.priority&&(c.priority=e?.priority)}let h=b(t);h?c.parentId=h.id||"kbn"+y++:p.push(c),d.push(c)},"addNode"),S={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},N=(0,l.K2)((t,e)=>{switch(l.Rm.debug("In get type",t,e),t){case"[":return S.RECT;case"(":return")"===e?S.ROUNDED_RECT:S.CLOUD;case"((":return S.CIRCLE;case")":return S.CLOUD;case"))":return S.BANG;case"{{":return S.HEXAGON;default:return S.DEFAULT}},"getType"),x=(0,l.K2)((t,e)=>{f[t]=e},"setElementForId"),D=(0,l.K2)(t=>{if(!t)return;let e=(0,a.D7)(),i=d[d.length-1];t.icon&&(i.icon=(0,a.jZ)(t.icon,e)),t.class&&(i.cssClasses=(0,a.jZ)(t.class,e))},"decorateNode"),L=(0,l.K2)(t=>{switch(t){case S.DEFAULT:return"no-border";case S.RECT:return"rect";case S.ROUNDED_RECT:return"rounded-rect";case S.CIRCLE:return"circle";case S.CLOUD:return"cloud";case S.BANG:return"bang";case S.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),I=(0,l.K2)(()=>l.Rm,"getLogger"),v=(0,l.K2)(t=>f[t],"getElementById"),C=(0,l.K2)(async(t,e,i,s)=>{l.Rm.debug("Rendering kanban diagram\n"+t);let r=s.db.getData(),c=(0,a.D7)();c.htmlLabels=!1;let h=(0,n.D)(e);for(let t of r.nodes)t.domId=`${e}-${t.id}`;let u=h.append("g");u.attr("class","sections");let g=h.append("g");g.attr("class","items");let d=r.nodes.filter(t=>t.isGroup),p=0,y=[],f=25;for(let t of d){let e=c?.kanban?.sectionWidth||200;t.x=e*(p+=1)+(p-1)*10/2,t.width=e,t.y=0,t.height=3*e,t.rx=5,t.ry=5,t.cssClasses=t.cssClasses+" section-"+p;let i=await (0,o.U)(u,t);f=Math.max(f,i?.labelBBox?.height),y.push(i)}let m=0;for(let t of d){let e=y[m];m+=1;let i=c?.kanban?.sectionWidth||200,n=-(3*i)/2+f,s=n;for(let e of r.nodes.filter(e=>e.parentId===t.id)){if(e.isGroup)throw Error("Groups within groups are not allowed in Kanban diagrams");e.x=t.x,e.width=i-15;let n=(await (0,o.on)(g,e,{config:c})).node().getBBox();e.y=s+n.height/2,await (0,o.U_)(e),s=e.y+n.height/2+5}let a=e.cluster.select("rect"),l=Math.max(s-n+30,50)+(f-25);a.attr("height",l)}(0,a.ot)(void 0,h,c.mindmap?.padding??a.UI.kanban.padding,c.mindmap?.useMaxWidth??a.UI.kanban.useMaxWidth)},"draw"),O=(0,l.K2)(t=>{let e="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],(0,c.A)(t["lineColor"+e])?t["lineColor"+e]=(0,h.A)(t["lineColor"+e],20):t["lineColor"+e]=(0,u.A)(t["lineColor"+e],20);let i=(0,l.K2)((e,i)=>t.darkMode?(0,u.A)(e,i):(0,h.A)(e,i),"adjuster");for(let n=0;n<t.THEME_COLOR_LIMIT;n++){let s=""+(17-3*n);e+=`
15
+ `,"getIconStyles")},67547:(t,e,i)=>{i.d(e,{diagram:()=>A});var n=i(21354),s=i(60633),r=i(14759),o=i(63886);i(38033),i(17541),i(88774),i(32563);var a=i(97096),l=i(32165),c=i(6424),h=i(99507),u=i(68195),g=function(){var t=(0,l.K2)(function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},"o"),e=[1,4],i=[1,13],n=[1,12],s=[1,15],r=[1,16],o=[1,20],a=[1,19],c=[6,7,8],h=[1,26],u=[1,24],g=[1,25],d=[6,7,11],p=[1,31],y=[6,7,11,24],f=[1,6,13,16,17,20,23],m=[1,35],b=[1,36],_=[1,6,7,11,13,16,17,20,23],k=[1,38],E={trace:(0,l.K2)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"KANBAN",11:"EOF",13:"SPACELIST",16:"ICON",17:"CLASS",20:"NODE_DSTART",21:"NODE_DESCR",22:"NODE_DEND",23:"NODE_ID",24:"SHAPE_DATA"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:(0,l.K2)(function(t,e,i,n,s,r,o){var a=r.length-1;switch(s){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",r[a-1].id),n.addNode(r[a-2].length,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 16:n.getLogger().info("Node: ",r[a].id),n.addNode(r[a-1].length,r[a].id,r[a].descr,r[a].type);break;case 17:n.getLogger().trace("Icon: ",r[a]),n.decorateNode({icon:r[a]});break;case 18:case 23:n.decorateNode({class:r[a]});break;case 19:n.getLogger().trace("SPACELIST");break;case 20:n.getLogger().trace("Node: ",r[a-1].id),n.addNode(0,r[a-1].id,r[a-1].descr,r[a-1].type,r[a]);break;case 21:n.getLogger().trace("Node: ",r[a].id),n.addNode(0,r[a].id,r[a].descr,r[a].type);break;case 22:n.decorateNode({icon:r[a]});break;case 27:n.getLogger().trace("node found ..",r[a-2]),this.$={id:r[a-1],descr:r[a-1],type:n.getType(r[a-2],r[a])};break;case 28:this.$={id:r[a],descr:r[a],type:0};break;case 29:n.getLogger().trace("node found ..",r[a-3]),this.$={id:r[a-3],descr:r[a-1],type:n.getType(r[a-2],r[a])};break;case 30:this.$=r[a-1]+r[a];break;case 31:this.$=r[a]}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:i,7:[1,10],9:9,12:11,13:n,14:14,16:s,17:r,18:17,19:18,20:o,23:a},t(c,[2,3]),{1:[2,2]},t(c,[2,4]),t(c,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:i,9:22,12:11,13:n,14:14,16:s,17:r,18:17,19:18,20:o,23:a},{6:h,7:u,10:23,11:g},t(d,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:a}),t(d,[2,19]),t(d,[2,21],{15:30,24:p}),t(d,[2,22]),t(d,[2,23]),t(y,[2,25]),t(y,[2,26]),t(y,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:g},{1:[2,7],6:i,12:21,13:n,14:14,16:s,17:r,18:17,19:18,20:o,23:a},t(f,[2,14],{7:m,11:b}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(d,[2,16],{15:37,24:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,20],{24:k}),t(y,[2,31]),{21:[1,39]},{22:[1,40]},t(f,[2,13],{7:m,11:b}),t(_,[2,11]),t(_,[2,12]),t(d,[2,15],{24:k}),t(y,[2,30]),{22:[1,41]},t(y,[2,27]),t(y,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,l.K2)(function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},"parseError"),parse:(0,l.K2)(function(t){var e=this,i=[0],n=[],s=[null],r=[],o=this.table,a="",c=0,h=0,u=0,g=r.slice.call(arguments,1),d=Object.create(this.lexer),p={};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(p[y]=this.yy[y]);d.setInput(t,p),p.lexer=d,p.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;r.push(f);var m=d.options&&d.options.ranges;function b(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.parseError?this.parseError=p.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,l.K2)(function(t){i.length=i.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),(0,l.K2)(b,"lex");for(var _,k,E,S,N,x,D,L,I,v={};;){if(E=i[i.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(null==_&&(_=b()),S=o[E]&&o[E][_]),void 0===S||!S.length||!S[0]){var C="";for(x in I=[],o[E])this.terminals_[x]&&x>2&&I.push("'"+this.terminals_[x]+"'");C=d.showPosition?"Parse error on line "+(c+1)+":\n"+d.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==_?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[_]||_,line:d.yylineno,loc:f,expected:I})}if(S[0]instanceof Array&&S.length>1)throw Error("Parse Error: multiple actions possible at state: "+E+", token: "+_);switch(S[0]){case 1:i.push(_),s.push(d.yytext),r.push(d.yylloc),i.push(S[1]),_=null,k?(_=k,k=null):(h=d.yyleng,a=d.yytext,c=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(D=this.productions_[S[1]][1],v.$=s[s.length-D],v._$={first_line:r[r.length-(D||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(D||1)].first_column,last_column:r[r.length-1].last_column},m&&(v._$.range=[r[r.length-(D||1)].range[0],r[r.length-1].range[1]]),void 0!==(N=this.performAction.apply(v,[a,h,c,p,S[1],s,r].concat(g))))return N;D&&(i=i.slice(0,-1*D*2),s=s.slice(0,-1*D),r=r.slice(0,-1*D)),i.push(this.productions_[S[1]][0]),s.push(v.$),r.push(v._$),L=o[i[i.length-2]][i[i.length-1]],i.push(L);break;case 3:return!0}}return!0},"parse")};function S(){this.yy={}}return E.lexer={EOF:1,parseError:(0,l.K2)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,l.K2)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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,l.K2)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t},"input"),unput:(0,l.K2)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=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),i.length-1&&(this.yylineno-=i.length-1);var s=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:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,l.K2)(function(){return this._more=!0,this},"more"),reject:(0,l.K2)(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,l.K2)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,l.K2)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,l.K2)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,l.K2)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,l.K2)(function(t,e){var i,n,s;if(this.options.backtrack_lexer&&(s={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&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var r in s)this[r]=s[r];return!1},"test_match"),next:(0,l.K2)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,i,n,s=this._currentRules(),r=0;r<s.length;r++)if((i=this._input.match(this.rules[s[r]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&t:""===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,l.K2)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,l.K2)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,l.K2)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,l.K2)(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,l.K2)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,l.K2)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,l.K2)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,l.K2)(function(t,e,i,n){switch(i){case 0:return this.pushState("shapeData"),e.yytext="",24;case 1:return this.pushState("shapeDataStr"),24;case 2:return this.popState(),24;case 3:return e.yytext=e.yytext.replace(/\n\s*/g,"<br/>"),24;case 4:return 24;case 5:case 10:case 29:case 32:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.yytext),6;case 7:return 8;case 8:this.begin("CLASS");break;case 9:return this.popState(),17;case 11:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),20;case 20:case 21:case 22:case 23:return this.begin("NODE"),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin("NSTR2");break;case 28:return"NODE_DESCR";case 30:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.yytext),21}},"anonymous"),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}},(0,l.K2)(S,"Parser"),S.prototype=E,E.Parser=S,new S}();g.parser=g;var d=[],p=[],y=0,f={},m=(0,l.K2)(()=>{d=[],p=[],y=0,f={}},"clear"),b=(0,l.K2)(t=>{if(0===d.length)return null;let e=d[0].level,i=null;for(let t=d.length-1;t>=0;t--)if(d[t].level!==e||i||(i=d[t]),d[t].level<e)throw Error('Items without section detected, found section ("'+d[t].label+'")');return t===i?.level?null:i},"getSection"),_=(0,l.K2)(function(){return p},"getSections"),k=(0,l.K2)(function(){let t=[],e=_(),i=(0,a.D7)();for(let n of e){let e={id:n.id,label:(0,a.jZ)(n.label??"",i),labelType:"markdown",isGroup:!0,ticket:n.ticket,shape:"kanbanSection",level:n.level,look:i.look};for(let s of(t.push(e),d.filter(t=>t.parentId===n.id))){let e={id:s.id,parentId:n.id,label:(0,a.jZ)(s.label??"",i),labelType:"markdown",isGroup:!1,ticket:s?.ticket,priority:s?.priority,assigned:s?.assigned,icon:s?.icon,shape:"kanbanItem",level:s.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(e)}}return{nodes:t,edges:[],other:{},config:(0,a.D7)()}},"getData"),E=(0,l.K2)((t,e,i,n,s)=>{let o=(0,a.D7)(),l=o.mindmap?.padding??a.UI.mindmap.padding;switch(n){case S.ROUNDED_RECT:case S.RECT:case S.HEXAGON:l*=2}let c={id:(0,a.jZ)(e,o)||"kbn"+y++,level:t,label:(0,a.jZ)(i,o),width:o.mindmap?.maxNodeWidth??a.UI.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(void 0!==s){let t;t=s.includes("\n")?s+"\n":"{\n"+s+"\n}";let e=(0,r.H)(t,{schema:r.r});if(e.shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(c.shape=e?.shape),e?.label&&(c.label=e?.label),e?.icon&&(c.icon=e?.icon.toString()),e?.assigned&&(c.assigned=e?.assigned.toString()),e?.ticket&&(c.ticket=e?.ticket.toString()),e?.priority&&(c.priority=e?.priority)}let h=b(t);h?c.parentId=h.id||"kbn"+y++:p.push(c),d.push(c)},"addNode"),S={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},N=(0,l.K2)((t,e)=>{switch(l.Rm.debug("In get type",t,e),t){case"[":return S.RECT;case"(":return")"===e?S.ROUNDED_RECT:S.CLOUD;case"((":return S.CIRCLE;case")":return S.CLOUD;case"))":return S.BANG;case"{{":return S.HEXAGON;default:return S.DEFAULT}},"getType"),x=(0,l.K2)((t,e)=>{f[t]=e},"setElementForId"),D=(0,l.K2)(t=>{if(!t)return;let e=(0,a.D7)(),i=d[d.length-1];t.icon&&(i.icon=(0,a.jZ)(t.icon,e)),t.class&&(i.cssClasses=(0,a.jZ)(t.class,e))},"decorateNode"),L=(0,l.K2)(t=>{switch(t){case S.DEFAULT:return"no-border";case S.RECT:return"rect";case S.ROUNDED_RECT:return"rounded-rect";case S.CIRCLE:return"circle";case S.CLOUD:return"cloud";case S.BANG:return"bang";case S.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),I=(0,l.K2)(()=>l.Rm,"getLogger"),v=(0,l.K2)(t=>f[t],"getElementById"),C=(0,l.K2)(async(t,e,i,s)=>{l.Rm.debug("Rendering kanban diagram\n"+t);let r=s.db.getData(),c=(0,a.D7)();c.htmlLabels=!1;let h=(0,n.D)(e);for(let t of r.nodes)t.domId=`${e}-${t.id}`;let u=h.append("g");u.attr("class","sections");let g=h.append("g");g.attr("class","items");let d=r.nodes.filter(t=>t.isGroup),p=0,y=[],f=25;for(let t of d){let e=c?.kanban?.sectionWidth||200;t.x=e*(p+=1)+(p-1)*10/2,t.width=e,t.y=0,t.height=3*e,t.rx=5,t.ry=5,t.cssClasses=t.cssClasses+" section-"+p;let i=await (0,o.U)(u,t);f=Math.max(f,i?.labelBBox?.height),y.push(i)}let m=0;for(let t of d){let e=y[m];m+=1;let i=c?.kanban?.sectionWidth||200,n=-(3*i)/2+f,s=n;for(let e of r.nodes.filter(e=>e.parentId===t.id)){if(e.isGroup)throw Error("Groups within groups are not allowed in Kanban diagrams");e.x=t.x,e.width=i-15;let n=(await (0,o.on)(g,e,{config:c})).node().getBBox();e.y=s+n.height/2,await (0,o.U_)(e),s=e.y+n.height/2+5}let a=e.cluster.select("rect"),l=Math.max(s-n+30,50)+(f-25);a.attr("height",l)}(0,a.ot)(void 0,h,c.mindmap?.padding??a.UI.kanban.padding,c.mindmap?.useMaxWidth??a.UI.kanban.useMaxWidth)},"draw"),O=(0,l.K2)(t=>{let e="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],(0,c.A)(t["lineColor"+e])?t["lineColor"+e]=(0,h.A)(t["lineColor"+e],20):t["lineColor"+e]=(0,u.A)(t["lineColor"+e],20);let i=(0,l.K2)((e,i)=>t.darkMode?(0,u.A)(e,i):(0,h.A)(e,i),"adjuster");for(let n=0;n<t.THEME_COLOR_LIMIT;n++){let s=""+(17-3*n);e+=`
16
16
  .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {
17
17
  fill: ${i(t["cScale"+n],10)};
18
18
  stroke: ${i(t["cScale"+n],10)};
@@ -1,4 +1,4 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8489],{18489:(t,e,i)=>{"use strict";i.d(e,{diagram:()=>K});var r=i(21354),n=i(27655),o=i(36211),a=i(32563),s=i(97096),h=i(32165),l=i(88863),d=i(87),g=i(28904),c=i(33948),u={L:"left",R:"right",T:"top",B:"bottom"},f={L:(0,h.K2)(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:(0,h.K2)(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:(0,h.K2)(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:(0,h.K2)(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},p={L:(0,h.K2)((t,e)=>t-e+2,"L"),R:(0,h.K2)((t,e)=>t-2,"R"),T:(0,h.K2)((t,e)=>t-e+2,"T"),B:(0,h.K2)((t,e)=>t-2,"B")},v=(0,h.K2)(function(t){return m(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),y=(0,h.K2)(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),m=(0,h.K2)(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),E=(0,h.K2)(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),T=(0,h.K2)(function(t,e){let i=m(t)&&E(e),r=E(t)&&m(e);return i||r},"isArchitectureDirectionXY"),N=(0,h.K2)(function(t){let e=t[0],i=t[1],r=m(e)&&E(i),n=E(e)&&m(i);return r||n},"isArchitecturePairXY"),A=(0,h.K2)(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),C=(0,h.K2)(function(t,e){let i=`${t}${e}`;return A(i)?i:void 0},"getArchitectureDirectionPair"),L=(0,h.K2)(function([t,e],i){let r=i[0],n=i[1];if(m(r))if(E(n))return[t+("L"===r?-1:1),e+("T"===n?1:-1)];else return[t+("L"===r?-1:1),e];return m(n)?[t+("L"===n?1:-1),e+("T"===r?1:-1)]:[t,e+("T"===r?1:-1)]},"shiftPositionByArchitectureDirectionPair"),w=(0,h.K2)(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),_=(0,h.K2)(function(t,e){return T(t,e)?"bend":m(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),M=(0,h.K2)(function(t){return"service"===t.type},"isArchitectureService"),I=(0,h.K2)(function(t){return"junction"===t.type},"isArchitectureJunction"),x=(0,h.K2)(t=>t.data(),"edgeData"),O=(0,h.K2)(t=>t.data(),"nodeData"),D=s.UI.architecture,R=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=s.SV,this.getAccTitle=s.iN,this.setDiagramTitle=s.ke,this.getDiagramTitle=s.ab,this.getAccDescription=s.m7,this.setAccDescription=s.EI,this.clear()}static{(0,h.K2)(this,"ArchitectureDB")}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",(0,s.IU)()}addService({id:t,icon:e,in:i,title:r,iconText:n}){if(void 0!==this.registeredIds[t])throw Error(`The service id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==i){if(t===i)throw Error(`The service [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[i])throw Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[i])throw Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:e,iconText:n,title:r,edges:[],in:i}}getServices(){return Object.values(this.nodes).filter(M)}addJunction({id:t,in:e}){if(void 0!==this.registeredIds[t])throw Error(`The junction id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==e){if(t===e)throw Error(`The junction [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[e])throw Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[e])throw Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:e}}getJunctions(){return Object.values(this.nodes).filter(I)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:e,in:i,title:r}){if(this.registeredIds?.[t]!==void 0)throw Error(`The group id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==i){if(t===i)throw Error(`The group [${t}] cannot be placed within itself`);if(this.registeredIds?.[i]===void 0)throw Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[i]==="node")throw Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:e,title:r,in:i}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:e,lhsDir:i,rhsDir:r,lhsInto:n,rhsInto:o,lhsGroup:a,rhsGroup:s,title:h}){if(!y(i))throw Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(i)}`);if(!y(r))throw Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(r)}`);if(void 0===this.nodes[t]&&void 0===this.groups[t])throw Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[e]&&void 0===this.groups[e])throw Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes[t].in,d=this.nodes[e].in;if(a&&l&&d&&l==d)throw Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&d&&l==d)throw Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:t,lhsDir:i,lhsInto:n,lhsGroup:a,rhsId:e,rhsDir:r,rhsInto:o,rhsGroup:s,title:h}),this.nodes[t]&&this.nodes[e]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[e].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){let t={},e=Object.entries(this.nodes).reduce((e,[i,r])=>(e[i]=r.edges.reduce((e,r)=>{let n=this.getNode(r.lhsId)?.in,o=this.getNode(r.rhsId)?.in;if(n&&o&&n!==o){let e=_(r.lhsDir,r.rhsDir);"bend"!==e&&(t[n]??={},t[n][o]=e,t[o]??={},t[o][n]=e)}if(r.lhsId===i){let t=C(r.lhsDir,r.rhsDir);t&&(e[t]=r.rhsId)}else{let t=C(r.rhsDir,r.lhsDir);t&&(e[t]=r.lhsId)}return e},{}),e),{}),i=Object.keys(e)[0],r={[i]:1},n=Object.keys(e).reduce((t,e)=>e===i?t:{...t,[e]:1},{}),o=(0,h.K2)(t=>{let i={[t]:[0,0]},o=[t];for(;o.length>0;){let t=o.shift();if(t){r[t]=1,delete n[t];let a=e[t],[s,h]=i[t];Object.entries(a).forEach(([t,e])=>{r[e]||(i[e]=L([s,h],t),o.push(e))})}}return i},"BFS"),a=[o(i)];for(;Object.keys(n).length>0;)a.push(o(Object.keys(n)[0]));this.dataStructures={adjList:e,spatialMaps:a,groupAlignments:t}}return this.dataStructures}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}getConfig(){return(0,a.$t)({...D,...(0,s.zj)().architecture})}getConfigField(t){return this.getConfig()[t]}},b=(0,h.K2)((t,e)=>{(0,o.S)(t,e),t.groups.map(t=>e.addGroup(t)),t.services.map(t=>e.addService({...t,type:"service"})),t.junctions.map(t=>e.addJunction({...t,type:"junction"})),t.edges.map(t=>e.addEdge(t))},"populateDb"),F={parser:{yy:void 0},parse:(0,h.K2)(async t=>{let e=await (0,l.qg)("architecture",t);h.Rm.debug(e);let i=F.parser?.yy;if(!(i instanceof R))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");b(e,i)},"parse")},G=(0,h.K2)(t=>`
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8489],{18489:(t,e,i)=>{"use strict";i.d(e,{diagram:()=>K});var r=i(21354),n=i(88774),o=i(36211),a=i(32563),s=i(97096),h=i(32165),l=i(88863),d=i(87),g=i(28904),c=i(33948),u={L:"left",R:"right",T:"top",B:"bottom"},f={L:(0,h.K2)(t=>`${t},${t/2} 0,${t} 0,0`,"L"),R:(0,h.K2)(t=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:(0,h.K2)(t=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:(0,h.K2)(t=>`${t/2},0 ${t},${t} 0,${t}`,"B")},p={L:(0,h.K2)((t,e)=>t-e+2,"L"),R:(0,h.K2)((t,e)=>t-2,"R"),T:(0,h.K2)((t,e)=>t-e+2,"T"),B:(0,h.K2)((t,e)=>t-2,"B")},v=(0,h.K2)(function(t){return m(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),y=(0,h.K2)(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),m=(0,h.K2)(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),E=(0,h.K2)(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),T=(0,h.K2)(function(t,e){let i=m(t)&&E(e),r=E(t)&&m(e);return i||r},"isArchitectureDirectionXY"),N=(0,h.K2)(function(t){let e=t[0],i=t[1],r=m(e)&&E(i),n=E(e)&&m(i);return r||n},"isArchitecturePairXY"),A=(0,h.K2)(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),C=(0,h.K2)(function(t,e){let i=`${t}${e}`;return A(i)?i:void 0},"getArchitectureDirectionPair"),L=(0,h.K2)(function([t,e],i){let r=i[0],n=i[1];if(m(r))if(E(n))return[t+("L"===r?-1:1),e+("T"===n?1:-1)];else return[t+("L"===r?-1:1),e];return m(n)?[t+("L"===n?1:-1),e+("T"===r?1:-1)]:[t,e+("T"===r?1:-1)]},"shiftPositionByArchitectureDirectionPair"),w=(0,h.K2)(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),_=(0,h.K2)(function(t,e){return T(t,e)?"bend":m(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),M=(0,h.K2)(function(t){return"service"===t.type},"isArchitectureService"),I=(0,h.K2)(function(t){return"junction"===t.type},"isArchitectureJunction"),x=(0,h.K2)(t=>t.data(),"edgeData"),O=(0,h.K2)(t=>t.data(),"nodeData"),D=s.UI.architecture,R=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=s.SV,this.getAccTitle=s.iN,this.setDiagramTitle=s.ke,this.getDiagramTitle=s.ab,this.getAccDescription=s.m7,this.setAccDescription=s.EI,this.clear()}static{(0,h.K2)(this,"ArchitectureDB")}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",(0,s.IU)()}addService({id:t,icon:e,in:i,title:r,iconText:n}){if(void 0!==this.registeredIds[t])throw Error(`The service id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==i){if(t===i)throw Error(`The service [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[i])throw Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===this.registeredIds[i])throw Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:e,iconText:n,title:r,edges:[],in:i}}getServices(){return Object.values(this.nodes).filter(M)}addJunction({id:t,in:e}){if(void 0!==this.registeredIds[t])throw Error(`The junction id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==e){if(t===e)throw Error(`The junction [${t}] cannot be placed within itself`);if(void 0===this.registeredIds[e])throw Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if("node"===this.registeredIds[e])throw Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:e}}getJunctions(){return Object.values(this.nodes).filter(I)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:e,in:i,title:r}){if(this.registeredIds?.[t]!==void 0)throw Error(`The group id [${t}] is already in use by another ${this.registeredIds[t]}`);if(void 0!==i){if(t===i)throw Error(`The group [${t}] cannot be placed within itself`);if(this.registeredIds?.[i]===void 0)throw Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[i]==="node")throw Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:e,title:r,in:i}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:e,lhsDir:i,rhsDir:r,lhsInto:n,rhsInto:o,lhsGroup:a,rhsGroup:s,title:h}){if(!y(i))throw Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(i)}`);if(!y(r))throw Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got ${String(r)}`);if(void 0===this.nodes[t]&&void 0===this.groups[t])throw Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===this.nodes[e]&&void 0===this.groups[e])throw Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes[t].in,d=this.nodes[e].in;if(a&&l&&d&&l==d)throw Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&d&&l==d)throw Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:t,lhsDir:i,lhsInto:n,lhsGroup:a,rhsId:e,rhsDir:r,rhsInto:o,rhsGroup:s,title:h}),this.nodes[t]&&this.nodes[e]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[e].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(void 0===this.dataStructures){let t={},e=Object.entries(this.nodes).reduce((e,[i,r])=>(e[i]=r.edges.reduce((e,r)=>{let n=this.getNode(r.lhsId)?.in,o=this.getNode(r.rhsId)?.in;if(n&&o&&n!==o){let e=_(r.lhsDir,r.rhsDir);"bend"!==e&&(t[n]??={},t[n][o]=e,t[o]??={},t[o][n]=e)}if(r.lhsId===i){let t=C(r.lhsDir,r.rhsDir);t&&(e[t]=r.rhsId)}else{let t=C(r.rhsDir,r.lhsDir);t&&(e[t]=r.lhsId)}return e},{}),e),{}),i=Object.keys(e)[0],r={[i]:1},n=Object.keys(e).reduce((t,e)=>e===i?t:{...t,[e]:1},{}),o=(0,h.K2)(t=>{let i={[t]:[0,0]},o=[t];for(;o.length>0;){let t=o.shift();if(t){r[t]=1,delete n[t];let a=e[t],[s,h]=i[t];Object.entries(a).forEach(([t,e])=>{r[e]||(i[e]=L([s,h],t),o.push(e))})}}return i},"BFS"),a=[o(i)];for(;Object.keys(n).length>0;)a.push(o(Object.keys(n)[0]));this.dataStructures={adjList:e,spatialMaps:a,groupAlignments:t}}return this.dataStructures}setElementForId(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}getConfig(){return(0,a.$t)({...D,...(0,s.zj)().architecture})}getConfigField(t){return this.getConfig()[t]}},b=(0,h.K2)((t,e)=>{(0,o.S)(t,e),t.groups.map(t=>e.addGroup(t)),t.services.map(t=>e.addService({...t,type:"service"})),t.junctions.map(t=>e.addJunction({...t,type:"junction"})),t.edges.map(t=>e.addEdge(t))},"populateDb"),F={parser:{yy:void 0},parse:(0,h.K2)(async t=>{let e=await (0,l.qg)("architecture",t);h.Rm.debug(e);let i=F.parser?.yy;if(!(i instanceof R))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");b(e,i)},"parse")},G=(0,h.K2)(t=>`
2
2
  .edge {
3
3
  stroke-width: ${t.archEdgeWidth};
4
4
  stroke: ${t.archEdgeColor};