pmx-canvas 0.11.0 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/.github/extensions/pmx-canvas/extension.mjs +4 -1
  2. package/.github/extensions/pmx-canvas/runtime.json +1 -1
  3. package/.github/extensions/pmx-canvas/tools.json +440 -18
  4. package/CHANGELOG.md +51 -0
  5. package/dist/amp-plugin/pmx-canvas/LICENSE +21 -0
  6. package/dist/amp-plugin/pmx-canvas/THIRD_PARTY_LICENSES.txt +331 -0
  7. package/dist/amp-plugin/pmx-canvas/index.js +5445 -0
  8. package/dist/amp-plugin/pmx-canvas/runtime.json +3 -0
  9. package/dist/amp-plugin/pmx-canvas/shared-runtime.mjs +194 -0
  10. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/SKILL.md +267 -0
  11. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/evals.json +1168 -0
  12. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/jwt.ts +17 -0
  13. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/login.ts +12 -0
  14. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/auth/middleware.ts +13 -0
  15. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/code-exploration/src/routes/auth.ts +13 -0
  16. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/evals/fixtures/investigation-board/src/handlers/users.ts +27 -0
  17. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/mcp.json +36 -0
  18. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/ax-html-control-surface.md +101 -0
  19. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/codex-app-adapter.md +151 -0
  20. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/excalidraw-diagram-authoring.md +150 -0
  21. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/full-reference.md +1839 -0
  22. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/github-copilot-app-adapter.md +223 -0
  23. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/html-primitives.md +139 -0
  24. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/importing-context.md +132 -0
  25. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/installing-pmx-canvas.md +301 -0
  26. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/tours-and-recording.md +117 -0
  27. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas/references/workbench-workflows.md +908 -0
  28. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas-orchestration/SKILL.md +141 -0
  29. package/dist/amp-plugin/pmx-canvas/skills/pmx-canvas-testing/SKILL.md +266 -0
  30. package/dist/amp-plugin/pmx-canvas/start-mcp.mjs +14857 -0
  31. package/dist/amp-plugin/pmx-canvas/tools.json +10963 -0
  32. package/dist/canvas/chunks/{abnfDiagram-N423BO3Z-p8dtp6va.js → abnfDiagram-N423BO3Z-cwtsds5d.js} +1 -1
  33. package/dist/canvas/chunks/architecture-TIHT7OUA-x63cwejs.js +1 -0
  34. package/dist/canvas/chunks/{architectureDiagram-T3A2C74G-5jhmxrzf.js → architectureDiagram-T3A2C74G-b4xc9tpz.js} +3 -3
  35. package/dist/canvas/chunks/{blockDiagram-VBNYF7ZC-pw1fa9yb.js → blockDiagram-VBNYF7ZC-ahp3yxxs.js} +7 -7
  36. package/dist/canvas/chunks/{c4Diagram-5PPSVZJV-x07nq0tt.js → c4Diagram-5PPSVZJV-nappnay7.js} +4 -4
  37. package/dist/canvas/chunks/classDiagram-JCYQIIEL-k1j2xc1t.js +1 -0
  38. package/dist/canvas/chunks/classDiagram-v2-OCEON4UE-33x08xf2.js +1 -0
  39. package/dist/canvas/chunks/{cose-bilkent-JH36ORCC-nm39npq0.js → cose-bilkent-JH36ORCC-a428syda.js} +1 -1
  40. package/dist/canvas/chunks/cynefin-VYW2F7L2-8v6jxfz8.js +1 -0
  41. package/dist/canvas/chunks/{cynefinDiagram-MW4NZA55-vdxrwahz.js → cynefinDiagram-MW4NZA55-nspsqebj.js} +1 -1
  42. package/dist/canvas/chunks/{dagre-VZM6K2ZE-bqdm7wpd.js → dagre-VZM6K2ZE-8y6177fh.js} +2 -2
  43. package/dist/canvas/chunks/{diagram-7IWD3JNH-gs5gpr93.js → diagram-7IWD3JNH-vym028wn.js} +4 -4
  44. package/dist/canvas/chunks/{diagram-B4RE2ZJO-cgwjg47s.js → diagram-B4RE2ZJO-jddqb8sy.js} +1 -1
  45. package/dist/canvas/chunks/{diagram-LBJQPF4R-w3vahpav.js → diagram-LBJQPF4R-bjwbpkrn.js} +1 -1
  46. package/dist/canvas/chunks/{diagram-Q27KOJAE-42837z6h.js → diagram-Q27KOJAE-j6ph6hcx.js} +2 -2
  47. package/dist/canvas/chunks/{diagram-UB23O5K3-4fz83q59.js → diagram-UB23O5K3-p09w8jej.js} +1 -1
  48. package/dist/canvas/chunks/{ebnfDiagram-BXEA7PRR-zphtgegj.js → ebnfDiagram-BXEA7PRR-j975ycq5.js} +1 -1
  49. package/dist/canvas/chunks/{erDiagram-JOGREHBK-zvbbdxp4.js → erDiagram-JOGREHBK-sxp6hjn8.js} +5 -5
  50. package/dist/canvas/chunks/eventmodeling-45OFAUF4-xzfgn6xg.js +1 -0
  51. package/dist/canvas/chunks/flowDiagram-UKHOOZJN-2nsmkskb.js +1 -0
  52. package/dist/canvas/chunks/{ganttDiagram-PKOTCBZU-282jzycm.js → ganttDiagram-PKOTCBZU-4tv230y2.js} +2 -2
  53. package/dist/canvas/chunks/gitGraph-TEB2WS4Q-macbhand.js +1 -0
  54. package/dist/canvas/chunks/{gitGraphDiagram-DS77QQ5N-vqqy6p1b.js → gitGraphDiagram-DS77QQ5N-mqgmnw9g.js} +1 -1
  55. package/dist/canvas/chunks/{index-wgv7en21.js → index-037z5dz2.js} +2 -2
  56. package/dist/canvas/chunks/{index-w2mra17t.js → index-081n3har.js} +1 -1
  57. package/dist/canvas/chunks/{index-353m7b0p.js → index-5n03dmb9.js} +1 -1
  58. package/dist/canvas/chunks/{index-yw8h9vha.js → index-60pgzdqe.js} +1 -1
  59. package/dist/canvas/chunks/index-8g1vb57n.js +2 -0
  60. package/dist/canvas/chunks/{index-vv56h019.js → index-8rjes9r6.js} +1 -1
  61. package/dist/canvas/chunks/{index-nprm96xp.js → index-9022d1n9.js} +1 -1
  62. package/dist/canvas/chunks/{index-194m3hc3.js → index-9b02042t.js} +1 -1
  63. package/dist/canvas/chunks/{index-0rk4gp1g.js → index-ap4q4vez.js} +1 -1
  64. package/dist/canvas/chunks/{index-rh7nv68n.js → index-dyp2nhd3.js} +1 -1
  65. package/dist/canvas/chunks/index-frvta4tm.js +2 -0
  66. package/dist/canvas/chunks/{index-s4j678gj.js → index-h9ycj8n2.js} +1 -1
  67. package/dist/canvas/chunks/{index-fjtdggjn.js → index-mergmj97.js} +2 -2
  68. package/dist/canvas/chunks/index-nwsya6dj.js +301 -0
  69. package/dist/canvas/chunks/{index-3cy1bzwh.js → index-nz8qbd1p.js} +1 -1
  70. package/dist/canvas/chunks/{index-d3b3gqe9.js → index-qhfrazv3.js} +1 -1
  71. package/dist/canvas/chunks/{index-6qmsnxwy.js → index-v119nznk.js} +4 -4
  72. package/dist/canvas/chunks/{index-r2fyc9w1.js → index-vpt37m3d.js} +6 -6
  73. package/dist/canvas/chunks/{index-qj8fxwsf.js → index-y9ma6azy.js} +1 -1
  74. package/dist/canvas/chunks/{index-tb1wf525.js → index-zx0j3a2z.js} +26 -26
  75. package/dist/canvas/chunks/info-DKCQHKI2-a0ykzs9z.js +1 -0
  76. package/dist/canvas/chunks/{infoDiagram-6WML65LV-v1yvggqj.js → infoDiagram-6WML65LV-qv97qq6a.js} +2 -2
  77. package/dist/canvas/chunks/ishikawaDiagram-WSZJBQD7-p9306gh0.js +70 -0
  78. package/dist/canvas/chunks/{journeyDiagram-NVQOT4AX-zjcffveh.js → journeyDiagram-NVQOT4AX-sv67zats.js} +5 -5
  79. package/dist/canvas/chunks/{kanban-definition-27J2QSJJ-dakqtfp1.js → kanban-definition-27J2QSJJ-k2pfam6p.js} +1 -1
  80. package/dist/canvas/chunks/{mermaid.core-j2geswrd.js → mermaid.core-83r0fdce.js} +4 -4
  81. package/dist/canvas/chunks/{mindmap-definition-FAOFIHXS-142xhr3k.js → mindmap-definition-FAOFIHXS-vg2newm1.js} +1 -1
  82. package/dist/canvas/chunks/packet-7NZHBO7P-tqnabcdv.js +1 -0
  83. package/dist/canvas/chunks/{pegDiagram-VL7TDLO6-5wvk7vsd.js → pegDiagram-VL7TDLO6-k2h7zc5n.js} +1 -1
  84. package/dist/canvas/chunks/pie-RZYD4A2V-wke6gyhe.js +1 -0
  85. package/dist/canvas/chunks/{pieDiagram-7S7Q4E2Y-ztdhwycc.js → pieDiagram-7S7Q4E2Y-hg169p1v.js} +2 -2
  86. package/dist/canvas/chunks/{quadrantDiagram-CIZ2JOQS-c5p9gmg6.js → quadrantDiagram-CIZ2JOQS-bxtvsq0b.js} +5 -5
  87. package/dist/canvas/chunks/radar-I7S5WNFK-w7ka0drw.js +1 -0
  88. package/dist/canvas/chunks/railroad-3IZDKUUU-y3vg318x.js +1 -0
  89. package/dist/canvas/chunks/railroad-abnf-AHOZXSZD-6hqvcz3c.js +1 -0
  90. package/dist/canvas/chunks/railroad-ebnf-EBAXGLYW-vcae260m.js +1 -0
  91. package/dist/canvas/chunks/railroad-peg-LSFZ7HO6-0dbyme23.js +1 -0
  92. package/dist/canvas/chunks/{railroadDiagram-AXF67PYL-xkmqkjwf.js → railroadDiagram-AXF67PYL-njyhcp4p.js} +1 -1
  93. package/dist/canvas/chunks/{requirementDiagram-LRYGKXZP-9wm2dyaw.js → requirementDiagram-LRYGKXZP-2z6v09gm.js} +4 -4
  94. package/dist/canvas/chunks/{sankeyDiagram-W5VNT64P-2w19etgb.js → sankeyDiagram-W5VNT64P-15mzam0e.js} +1 -1
  95. package/dist/canvas/chunks/{sequenceDiagram-SI44F4Z6-0jn0vwmz.js → sequenceDiagram-SI44F4Z6-rbshyd2c.js} +12 -12
  96. package/dist/canvas/chunks/{sizeCapture-X5ZJPWSS-x75epwdq.js → sizeCapture-X5ZJPWSS-sg26xwts.js} +1 -1
  97. package/dist/canvas/chunks/{stateDiagram-OKZ733FA-schjpy6d.js → stateDiagram-OKZ733FA-6eahp98e.js} +1 -1
  98. package/dist/canvas/chunks/stateDiagram-v2-UEYNNEHI-tty0ggn5.js +1 -0
  99. package/dist/canvas/chunks/{swimlanes-SLNWSIFB-gkw4xce3.js → swimlanes-SLNWSIFB-ze5db10t.js} +1 -1
  100. package/dist/canvas/chunks/swimlanesDiagram-ULZ7WXOC-thze75gq.js +8 -0
  101. package/dist/canvas/chunks/{timeline-definition-Z64GVDOM-x7nkcy01.js → timeline-definition-Z64GVDOM-vnp7jyy8.js} +3 -3
  102. package/dist/canvas/chunks/treeView-QDETBFTQ-6ysffnm6.js +1 -0
  103. package/dist/canvas/chunks/treemap-6X3UGDF4-m3h9p066.js +1 -0
  104. package/dist/canvas/chunks/vennDiagram-T6HMQDX7-0qrnb7mj.js +34 -0
  105. package/dist/canvas/chunks/wardley-OPB4EBWU-dp37drwx.js +1 -0
  106. package/dist/canvas/chunks/{wardleyDiagram-T6FBY63Y-t1j52t9r.js → wardleyDiagram-T6FBY63Y-8nxg8wqt.js} +4 -4
  107. package/dist/canvas/chunks/{xychartDiagram-ELKLHX3M-38t16pme.js → xychartDiagram-ELKLHX3M-nj921e7s.js} +5 -5
  108. package/dist/canvas/global.css +94 -1
  109. package/dist/canvas/index.js +154 -145
  110. package/dist/canvas/mcp-app.html +600 -498
  111. package/dist/json-render/index.css +1 -1
  112. package/dist/types/client/canvas/BoardMoveDialog.d.ts +2 -0
  113. package/dist/types/client/canvas/EdgeEditor.d.ts +19 -0
  114. package/dist/types/client/canvas/GroupNavigation.d.ts +2 -0
  115. package/dist/types/client/canvas/TextPrompt.d.ts +4 -0
  116. package/dist/types/client/nodes/PromptNode.d.ts +1 -0
  117. package/dist/types/client/nodes/ViewerFrame.d.ts +1 -1
  118. package/dist/types/client/nodes/WorkCard.d.ts +7 -0
  119. package/dist/types/client/nodes/use-ax-surface-bridge.d.ts +1 -0
  120. package/dist/types/client/state/canvas-store.d.ts +15 -0
  121. package/dist/types/client/state/human-store.d.ts +2 -0
  122. package/dist/types/client/state/intent-bridge.d.ts +4 -2
  123. package/dist/types/client/state/relation-store.d.ts +11 -0
  124. package/dist/types/client/types.d.ts +1 -1
  125. package/dist/types/json-render/catalog.d.ts +2 -2
  126. package/dist/types/server/agent-presence.d.ts +1 -0
  127. package/dist/types/server/ax-interaction.d.ts +1 -0
  128. package/dist/types/server/ax-state-manager.d.ts +10 -2
  129. package/dist/types/server/board-local.d.ts +4 -0
  130. package/dist/types/server/board-move.d.ts +38 -0
  131. package/dist/types/server/canvas-db.d.ts +12 -2
  132. package/dist/types/server/canvas-operations.d.ts +5 -6
  133. package/dist/types/server/canvas-provenance.d.ts +1 -1
  134. package/dist/types/server/canvas-serialization.d.ts +1 -0
  135. package/dist/types/server/canvas-state.d.ts +84 -20
  136. package/dist/types/server/card-relocation.d.ts +6 -0
  137. package/dist/types/server/context-reads.d.ts +3 -1
  138. package/dist/types/server/human-presence.d.ts +1 -1
  139. package/dist/types/server/index.d.ts +16 -5
  140. package/dist/types/server/intent-registry.d.ts +8 -4
  141. package/dist/types/server/knowledge-lifecycle.d.ts +4 -2
  142. package/dist/types/server/mutation-history.d.ts +7 -5
  143. package/dist/types/server/operations/registry.d.ts +2 -0
  144. package/dist/types/server/trace-manager.d.ts +1 -0
  145. package/dist/types/shared/ax-kinds.d.ts +6 -0
  146. package/dist/types/shared/ax-surface-protocol.d.ts +8 -0
  147. package/dist/types/shared/human-presence.d.ts +1 -0
  148. package/dist/types/shared/lifecycle-status.d.ts +2 -0
  149. package/docs/RELEASE.md +21 -14
  150. package/docs/agent-plugin.md +22 -2
  151. package/docs/amp-plugin.md +270 -0
  152. package/docs/cli.md +42 -3
  153. package/docs/design/GuestName.dc.html +50 -0
  154. package/docs/design/PluginLogo.svg +7 -0
  155. package/docs/design/WorkCards.dc.html +39 -0
  156. package/docs/design/canvas.json +16 -0
  157. package/docs/design/plugin-logo.png +0 -0
  158. package/docs/design.md +111 -8
  159. package/docs/evals/agents-md-sections.md +38 -0
  160. package/docs/http-api.md +128 -10
  161. package/docs/mcp.md +61 -9
  162. package/docs/node-types.md +71 -1
  163. package/docs/plans/plan-009-tech-debt-backlog.md +1 -1
  164. package/docs/plans/plan-019-post-0.9-roadmap.md +44 -20
  165. package/docs/plans/plan-020-wave-5-work-planning.md +553 -0
  166. package/docs/product-vision-2026-09.md +33 -17
  167. package/docs/sdk.md +18 -0
  168. package/package.json +6 -3
  169. package/plugins/pmx-canvas/assets/preview.png +0 -0
  170. package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/extension.mjs +4 -1
  171. package/plugins/pmx-canvas/com.github.copilot/extensions/pmx-canvas/runtime.json +1 -1
  172. package/plugins/pmx-canvas/plugin.json +2 -2
  173. package/plugins/pmx-canvas/runtime.json +1 -1
  174. package/plugins/pmx-canvas/tools.json +440 -18
  175. package/skills/data-analysis/SKILL.md +13 -26
  176. package/skills/frontend-design/LICENSE.txt +177 -0
  177. package/skills/frontend-design/SKILL.md +3 -0
  178. package/skills/pmx-canvas/SKILL.md +248 -842
  179. package/skills/pmx-canvas/evals/evals.json +110 -5
  180. package/skills/pmx-canvas/references/full-reference.md +142 -28
  181. package/skills/pmx-canvas/references/html-primitives.md +7 -0
  182. package/skills/pmx-canvas/references/installing-pmx-canvas.md +61 -11
  183. package/skills/pmx-canvas/references/tours-and-recording.md +39 -6
  184. package/skills/pmx-canvas/references/workbench-workflows.md +908 -0
  185. package/skills/pmx-canvas-testing/SKILL.md +7 -5
  186. package/skills/published-consumer-e2e/SKILL.md +25 -8
  187. package/skills/published-consumer-e2e/scripts/run-published-consumer-e2e.sh +51 -75
  188. package/skills/web-artifacts-builder/LICENSE.txt +202 -0
  189. package/skills/web-artifacts-builder/SKILL.md +6 -0
  190. package/skills/web-artifacts-builder/scripts/bundle-artifact.sh +2 -2
  191. package/skills/web-artifacts-builder/scripts/init-artifact.sh +8 -8
  192. package/src/cli/commands/apps.ts +1 -0
  193. package/src/cli/commands/boards.ts +30 -0
  194. package/src/client/App.tsx +20 -4
  195. package/src/client/canvas/AttentionHistory.tsx +10 -2
  196. package/src/client/canvas/BoardMoveDialog.tsx +225 -0
  197. package/src/client/canvas/CanvasNode.tsx +45 -2
  198. package/src/client/canvas/CanvasViewport.tsx +38 -9
  199. package/src/client/canvas/ContextMenu.tsx +34 -12
  200. package/src/client/canvas/EdgeEditor.tsx +149 -0
  201. package/src/client/canvas/EdgeLayer.tsx +87 -16
  202. package/src/client/canvas/ExpandedNodeOverlay.tsx +4 -0
  203. package/src/client/canvas/GroupNavigation.tsx +85 -0
  204. package/src/client/canvas/RelationsPanel.tsx +9 -0
  205. package/src/client/canvas/SelectionBar.tsx +21 -0
  206. package/src/client/canvas/SessionPanel.tsx +35 -1
  207. package/src/client/canvas/TextPrompt.tsx +18 -1
  208. package/src/client/canvas/TopBar.tsx +30 -0
  209. package/src/client/canvas/canvas-area.ts +1 -1
  210. package/src/client/nodes/ExtAppFrame.tsx +26 -10
  211. package/src/client/nodes/MarkdownNode.tsx +6 -7
  212. package/src/client/nodes/PromptNode.tsx +32 -3
  213. package/src/client/nodes/StatusNode.tsx +12 -0
  214. package/src/client/nodes/StatusSummary.tsx +11 -0
  215. package/src/client/nodes/ViewerFrame.tsx +21 -10
  216. package/src/client/nodes/WorkCard.tsx +175 -0
  217. package/src/client/nodes/use-ax-surface-bridge.ts +18 -14
  218. package/src/client/state/attention-bridge.ts +5 -0
  219. package/src/client/state/attention-store.ts +1 -0
  220. package/src/client/state/canvas-store.ts +185 -15
  221. package/src/client/state/human-store.ts +22 -2
  222. package/src/client/state/intent-bridge.ts +19 -5
  223. package/src/client/state/relation-store.ts +127 -1
  224. package/src/client/theme/global.css +94 -1
  225. package/src/client/types.ts +1 -0
  226. package/src/mcp/server.ts +13 -3
  227. package/src/server/agent-presence.ts +43 -23
  228. package/src/server/ax-flow-loop.ts +6 -0
  229. package/src/server/ax-gate-ttl.ts +8 -1
  230. package/src/server/ax-interaction.ts +16 -10
  231. package/src/server/ax-state-manager.ts +17 -4
  232. package/src/server/ax-wait.ts +20 -6
  233. package/src/server/board-export.ts +19 -6
  234. package/src/server/board-local.ts +20 -0
  235. package/src/server/board-move.ts +297 -0
  236. package/src/server/canvas-db.ts +262 -160
  237. package/src/server/canvas-operations.ts +139 -109
  238. package/src/server/canvas-schema.ts +21 -0
  239. package/src/server/canvas-serialization.ts +2 -0
  240. package/src/server/canvas-state.ts +792 -159
  241. package/src/server/card-relocation.ts +53 -0
  242. package/src/server/code-graph.ts +4 -3
  243. package/src/server/context-reads.ts +83 -55
  244. package/src/server/demo-state.json +35 -15
  245. package/src/server/file-watcher.ts +30 -10
  246. package/src/server/human-presence.ts +18 -5
  247. package/src/server/index.ts +35 -15
  248. package/src/server/intent-registry.ts +43 -5
  249. package/src/server/knowledge-lifecycle.ts +32 -9
  250. package/src/server/lifecycle-status.ts +29 -1
  251. package/src/server/mcp-app-runtime.ts +26 -7
  252. package/src/server/mutation-history.ts +37 -8
  253. package/src/server/operations/composites.ts +6 -3
  254. package/src/server/operations/mcp-contracts.ts +15 -0
  255. package/src/server/operations/mcp.ts +36 -9
  256. package/src/server/operations/ops/annotation.ts +22 -1
  257. package/src/server/operations/ops/ax-await.ts +1 -0
  258. package/src/server/operations/ops/ax-timeline.ts +28 -2
  259. package/src/server/operations/ops/batch.ts +25 -11
  260. package/src/server/operations/ops/boards.ts +44 -3
  261. package/src/server/operations/ops/nodes.ts +70 -0
  262. package/src/server/operations/ops/query.ts +32 -3
  263. package/src/server/operations/ops/snapshots.ts +1 -0
  264. package/src/server/operations/registry.ts +49 -4
  265. package/src/server/server.ts +62 -16
  266. package/src/server/tour-control.ts +37 -12
  267. package/src/server/trace-manager.ts +4 -0
  268. package/src/server/web-artifacts/scripts/bundle-artifact.sh +2 -2
  269. package/src/server/web-artifacts/scripts/init-artifact.sh +8 -8
  270. package/src/shared/agent-context.ts +7 -1
  271. package/src/shared/auto-arrange.ts +5 -4
  272. package/src/shared/ax-kinds.ts +13 -0
  273. package/src/shared/ax-surface-protocol.ts +22 -0
  274. package/src/shared/human-presence.ts +1 -0
  275. package/src/shared/lifecycle-status.ts +2 -0
  276. package/dist/canvas/chunks/architecture-TIHT7OUA-9tffvpsv.js +0 -1
  277. package/dist/canvas/chunks/classDiagram-JCYQIIEL-nc6g5x1r.js +0 -1
  278. package/dist/canvas/chunks/classDiagram-v2-OCEON4UE-0qnbpwvh.js +0 -1
  279. package/dist/canvas/chunks/cynefin-VYW2F7L2-ys8p46ts.js +0 -1
  280. package/dist/canvas/chunks/eventmodeling-45OFAUF4-v9q6dn4c.js +0 -1
  281. package/dist/canvas/chunks/flowDiagram-UKHOOZJN-yrr5z8tc.js +0 -1
  282. package/dist/canvas/chunks/gitGraph-TEB2WS4Q-kdwb8m0a.js +0 -1
  283. package/dist/canvas/chunks/index-1r72hdzb.js +0 -301
  284. package/dist/canvas/chunks/index-g3pwnqeb.js +0 -2
  285. package/dist/canvas/chunks/index-rft2hcz5.js +0 -2
  286. package/dist/canvas/chunks/info-DKCQHKI2-wpzs6sz3.js +0 -1
  287. package/dist/canvas/chunks/ishikawaDiagram-WSZJBQD7-5hnq1a9p.js +0 -70
  288. package/dist/canvas/chunks/packet-7NZHBO7P-xn439f0s.js +0 -1
  289. package/dist/canvas/chunks/pie-RZYD4A2V-0kf16rwh.js +0 -1
  290. package/dist/canvas/chunks/radar-I7S5WNFK-0g2pz36t.js +0 -1
  291. package/dist/canvas/chunks/railroad-3IZDKUUU-fcaran6j.js +0 -1
  292. package/dist/canvas/chunks/railroad-abnf-AHOZXSZD-wgdya41q.js +0 -1
  293. package/dist/canvas/chunks/railroad-ebnf-EBAXGLYW-gy07a4ka.js +0 -1
  294. package/dist/canvas/chunks/railroad-peg-LSFZ7HO6-ewk6wtkh.js +0 -1
  295. package/dist/canvas/chunks/stateDiagram-v2-UEYNNEHI-k8sfp2e7.js +0 -1
  296. package/dist/canvas/chunks/swimlanesDiagram-ULZ7WXOC-nqysw67j.js +0 -8
  297. package/dist/canvas/chunks/treeView-QDETBFTQ-cesw6gp0.js +0 -1
  298. package/dist/canvas/chunks/treemap-6X3UGDF4-zdv4knp9.js +0 -1
  299. package/dist/canvas/chunks/vennDiagram-T6HMQDX7-x8dqn9yf.js +0 -34
  300. package/dist/canvas/chunks/wardley-OPB4EBWU-44pdddez.js +0 -1
@@ -1,9 +1,9 @@
1
- import{e,t,l,d,f,p,m,g,b,v,r,n,ki,h,fe}from"./index-1r72hdzb.js";import{V}from"./index-6qmsnxwy.js";import{It}from"./index-qj8fxwsf.js";import{le}from"./index-s4j678gj.js";import{J}from"./index-3cy1bzwh.js";var Yt=function(){var s=e(function(tt,u,D,c){for(D=D||{},c=tt.length;c--;D[tt[c]]=u);return D},"o"),i=[1,2],T=[1,3],a=[1,4],E=[2,4],k=[1,9],C=[1,11],x=[1,16],y=[1,17],I=[1,18],O=[1,19],j=[1,33],G=[1,20],R=[1,21],_=[1,22],M=[1,23],U=[1,24],B=[1,26],K=[1,27],Y=[1,28],X=[1,29],W=[1,30],at=[1,31],yt=[1,32],gt=[1,35],Tt=[1,36],bt=[1,37],Et=[1,38],nt=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Mt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],wt={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(u,D,c,L,w,o,ot){var S=o.length-1;switch(w){case 3:return L.setRootDoc(o[S]),o[S];break;case 4:this.$=[];break;case 5:if(o[S]!="nl")o[S-1].push(o[S]),this.$=o[S-1];break;case 6:case 7:this.$=o[S];break;case 8:this.$="nl";break;case 12:this.$=o[S];break;case 13:let _t=o[S-1];_t.description=L.trimColon(o[S]),this.$=_t;break;case 14:this.$={stmt:"relation",state1:o[S-2],state2:o[S]};break;case 15:let Dt=L.trimColon(o[S]);this.$={stmt:"relation",state1:o[S-3],state2:o[S-1],description:Dt};break;case 19:this.$={stmt:"state",id:o[S-3],type:"default",description:"",doc:o[S-1]};break;case 20:var q=o[S],Q=o[S-2].trim();if(o[S].match(":")){var ut=o[S].split(":");q=ut[0],Q=[Q,ut[1]]}this.$={stmt:"state",id:q,type:"default",description:Q};break;case 21:this.$={stmt:"state",id:o[S-3],type:"default",description:o[S-5],doc:o[S-1]};break;case 22:this.$={stmt:"state",id:o[S],type:"fork"};break;case 23:this.$={stmt:"state",id:o[S],type:"join"};break;case 24:this.$={stmt:"state",id:o[S],type:"choice"};break;case 25:this.$={stmt:"state",id:L.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:o[S-1].trim(),note:{position:o[S-2].trim(),text:o[S].trim()}};break;case 29:this.$=o[S].trim(),L.setAccTitle(this.$);break;case 30:case 31:this.$=o[S].trim(),L.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:o[S-3],url:o[S-2],tooltip:o[S-1]};break;case 33:this.$={stmt:"click",id:o[S-3],url:o[S-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:o[S-1].trim(),classes:o[S].trim()};break;case 36:this.$={stmt:"style",id:o[S-1].trim(),styleClass:o[S].trim()};break;case 37:this.$={stmt:"applyClass",id:o[S-1].trim(),styleClass:o[S].trim()};break;case 38:L.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:L.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:L.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:L.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:o[S].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:o[S-2].trim(),classes:[o[S].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:o[S-2].trim(),classes:[o[S].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:i,5:T,6:a},{1:[3]},{3:5,4:i,5:T,6:a},{3:6,4:i,5:T,6:a},s([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],E,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:k,5:C,8:8,9:10,10:12,11:13,12:14,13:15,16:x,17:y,19:I,22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:x,17:y,19:I,22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,7]),s(A,[2,8]),s(A,[2,9]),s(A,[2,10]),s(A,[2,11]),s(A,[2,12],{14:[1,40],15:[1,41]}),s(A,[2,16]),{18:[1,42]},s(A,[2,18],{20:[1,43]}),{23:[1,44]},s(A,[2,22]),s(A,[2,23]),s(A,[2,24]),s(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},s(A,[2,28]),{34:[1,49]},{36:[1,50]},s(A,[2,31]),{13:51,24:j,57:nt},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},s(mt,[2,44],{58:[1,56]}),s(mt,[2,45],{58:[1,57]}),s(A,[2,38]),s(A,[2,39]),s(A,[2,40]),s(A,[2,41]),s(A,[2,6]),s(A,[2,13]),{13:58,24:j,57:nt},s(A,[2,17]),s(Mt,E,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},s(A,[2,29]),s(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},s(A,[2,14],{14:[1,71]}),{4:k,5:C,8:8,9:10,10:12,11:13,12:14,13:15,16:x,17:y,19:I,21:[1,72],22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},s(A,[2,34]),s(A,[2,35]),s(A,[2,36]),s(A,[2,37]),s(mt,[2,46]),s(mt,[2,47]),s(A,[2,15]),s(A,[2,19]),s(Mt,E,{7:78}),s(A,[2,26]),s(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:k,5:C,8:8,9:10,10:12,11:13,12:14,13:15,16:x,17:y,19:I,21:[1,81],22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,32]),s(A,[2,33]),s(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(u,D){if(D.recoverable)this.trace(u);else{var c=Error(u);throw c.hash=D,c}},"parseError"),parse:e(function(u){var D=this,c=[0],L=[],w=[null],o=[],ot=this.table,S="",q=0,Q=0,ut=0,_t=2,Dt=1,pe=o.slice.call(arguments,1),N=Object.create(this.lexer),it={yy:{}};for(var Ot in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Ot))it.yy[Ot]=this.yy[Ot];if(N.setInput(u,it.yy),it.yy.lexer=N,it.yy.parser=this,typeof N.yylloc>"u")N.yylloc={};var Nt=N.yylloc;o.push(Nt);var Se=N.options&&N.options.ranges;if(typeof it.yy.parseError==="function")this.parseError=it.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ye(z){c.length=c.length-2*z,w.length=w.length-z,o.length=o.length-z}e(ye,"popStack");function Ut(){var z=L.pop()||N.lex()||Dt;if(typeof z!=="number"){if(z instanceof Array)L=z,z=L.pop();z=D.symbols_[z]||z}return z}e(Ut,"lex");var F,Rt,rt,H,Me,$t,lt={},vt,Z,Wt,Ct;while(!0){if(rt=c[c.length-1],this.defaultActions[rt])H=this.defaultActions[rt];else{if(F===null||typeof F>"u")F=Ut();H=ot[rt]&&ot[rt][F]}if(typeof H>"u"||!H.length||!H[0]){var Ft="";Ct=[];for(vt in ot[rt])if(this.terminals_[vt]&&vt>_t)Ct.push("'"+this.terminals_[vt]+"'");if(N.showPosition)Ft="Parse error on line "+(q+1)+`:
1
+ import{e,t,l,d,f,p,m,g,b,v,r,n,Ti,h,fe}from"./index-nwsya6dj.js";import{V}from"./index-v119nznk.js";import{It}from"./index-y9ma6azy.js";import{le}from"./index-h9ycj8n2.js";import{J}from"./index-nz8qbd1p.js";var Yt=function(){var s=e(function(tt,u,D,c){for(D=D||{},c=tt.length;c--;D[tt[c]]=u);return D},"o"),i=[1,2],T=[1,3],a=[1,4],E=[2,4],k=[1,9],C=[1,11],x=[1,16],y=[1,17],I=[1,18],O=[1,19],j=[1,33],G=[1,20],R=[1,21],_=[1,22],M=[1,23],U=[1,24],B=[1,26],K=[1,27],Y=[1,28],X=[1,29],W=[1,30],at=[1,31],yt=[1,32],gt=[1,35],Tt=[1,36],bt=[1,37],Et=[1,38],nt=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],mt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Mt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],wt={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(u,D,c,L,w,o,ot){var S=o.length-1;switch(w){case 3:return L.setRootDoc(o[S]),o[S];break;case 4:this.$=[];break;case 5:if(o[S]!="nl")o[S-1].push(o[S]),this.$=o[S-1];break;case 6:case 7:this.$=o[S];break;case 8:this.$="nl";break;case 12:this.$=o[S];break;case 13:let _t=o[S-1];_t.description=L.trimColon(o[S]),this.$=_t;break;case 14:this.$={stmt:"relation",state1:o[S-2],state2:o[S]};break;case 15:let Dt=L.trimColon(o[S]);this.$={stmt:"relation",state1:o[S-3],state2:o[S-1],description:Dt};break;case 19:this.$={stmt:"state",id:o[S-3],type:"default",description:"",doc:o[S-1]};break;case 20:var q=o[S],Q=o[S-2].trim();if(o[S].match(":")){var ut=o[S].split(":");q=ut[0],Q=[Q,ut[1]]}this.$={stmt:"state",id:q,type:"default",description:Q};break;case 21:this.$={stmt:"state",id:o[S-3],type:"default",description:o[S-5],doc:o[S-1]};break;case 22:this.$={stmt:"state",id:o[S],type:"fork"};break;case 23:this.$={stmt:"state",id:o[S],type:"join"};break;case 24:this.$={stmt:"state",id:o[S],type:"choice"};break;case 25:this.$={stmt:"state",id:L.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:o[S-1].trim(),note:{position:o[S-2].trim(),text:o[S].trim()}};break;case 29:this.$=o[S].trim(),L.setAccTitle(this.$);break;case 30:case 31:this.$=o[S].trim(),L.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:o[S-3],url:o[S-2],tooltip:o[S-1]};break;case 33:this.$={stmt:"click",id:o[S-3],url:o[S-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:o[S-1].trim(),classes:o[S].trim()};break;case 36:this.$={stmt:"style",id:o[S-1].trim(),styleClass:o[S].trim()};break;case 37:this.$={stmt:"applyClass",id:o[S-1].trim(),styleClass:o[S].trim()};break;case 38:L.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:L.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:L.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:L.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:o[S].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:o[S-2].trim(),classes:[o[S].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:o[S-2].trim(),classes:[o[S].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:i,5:T,6:a},{1:[3]},{3:5,4:i,5:T,6:a},{3:6,4:i,5:T,6:a},s([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],E,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:k,5:C,8:8,9:10,10:12,11:13,12:14,13:15,16:x,17:y,19:I,22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:x,17:y,19:I,22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,7]),s(A,[2,8]),s(A,[2,9]),s(A,[2,10]),s(A,[2,11]),s(A,[2,12],{14:[1,40],15:[1,41]}),s(A,[2,16]),{18:[1,42]},s(A,[2,18],{20:[1,43]}),{23:[1,44]},s(A,[2,22]),s(A,[2,23]),s(A,[2,24]),s(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},s(A,[2,28]),{34:[1,49]},{36:[1,50]},s(A,[2,31]),{13:51,24:j,57:nt},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},s(mt,[2,44],{58:[1,56]}),s(mt,[2,45],{58:[1,57]}),s(A,[2,38]),s(A,[2,39]),s(A,[2,40]),s(A,[2,41]),s(A,[2,6]),s(A,[2,13]),{13:58,24:j,57:nt},s(A,[2,17]),s(Mt,E,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},s(A,[2,29]),s(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},s(A,[2,14],{14:[1,71]}),{4:k,5:C,8:8,9:10,10:12,11:13,12:14,13:15,16:x,17:y,19:I,21:[1,72],22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},s(A,[2,34]),s(A,[2,35]),s(A,[2,36]),s(A,[2,37]),s(mt,[2,46]),s(mt,[2,47]),s(A,[2,15]),s(A,[2,19]),s(Mt,E,{7:78}),s(A,[2,26]),s(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:k,5:C,8:8,9:10,10:12,11:13,12:14,13:15,16:x,17:y,19:I,21:[1,81],22:O,24:j,25:G,26:R,27:_,28:M,29:U,32:25,33:B,35:K,37:Y,38:X,41:W,45:at,48:yt,51:gt,52:Tt,53:bt,54:Et,57:nt},s(A,[2,32]),s(A,[2,33]),s(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(u,D){if(D.recoverable)this.trace(u);else{var c=Error(u);throw c.hash=D,c}},"parseError"),parse:e(function(u){var D=this,c=[0],L=[],w=[null],o=[],ot=this.table,S="",q=0,Q=0,ut=0,_t=2,Dt=1,pe=o.slice.call(arguments,1),N=Object.create(this.lexer),it={yy:{}};for(var Ot in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Ot))it.yy[Ot]=this.yy[Ot];if(N.setInput(u,it.yy),it.yy.lexer=N,it.yy.parser=this,typeof N.yylloc>"u")N.yylloc={};var Nt=N.yylloc;o.push(Nt);var Se=N.options&&N.options.ranges;if(typeof it.yy.parseError==="function")this.parseError=it.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function ye(z){c.length=c.length-2*z,w.length=w.length-z,o.length=o.length-z}e(ye,"popStack");function Ut(){var z=L.pop()||N.lex()||Dt;if(typeof z!=="number"){if(z instanceof Array)L=z,z=L.pop();z=D.symbols_[z]||z}return z}e(Ut,"lex");var F,Rt,rt,H,Me,$t,lt={},vt,Z,Wt,Ct;while(!0){if(rt=c[c.length-1],this.defaultActions[rt])H=this.defaultActions[rt];else{if(F===null||typeof F>"u")F=Ut();H=ot[rt]&&ot[rt][F]}if(typeof H>"u"||!H.length||!H[0]){var Ft="";Ct=[];for(vt in ot[rt])if(this.terminals_[vt]&&vt>_t)Ct.push("'"+this.terminals_[vt]+"'");if(N.showPosition)Ft="Parse error on line "+(q+1)+`:
2
2
  `+N.showPosition()+`
3
3
  Expecting `+Ct.join(", ")+", got '"+(this.terminals_[F]||F)+"'";else Ft="Parse error on line "+(q+1)+": Unexpected "+(F==Dt?"end of input":"'"+(this.terminals_[F]||F)+"'");this.parseError(Ft,{text:N.match,token:this.terminals_[F]||F,line:N.yylineno,loc:Nt,expected:Ct})}if(H[0]instanceof Array&&H.length>1)throw Error("Parse Error: multiple actions possible at state: "+rt+", token: "+F);switch(H[0]){case 1:if(c.push(F),w.push(N.yytext),o.push(N.yylloc),c.push(H[1]),F=null,!Rt){if(Q=N.yyleng,S=N.yytext,q=N.yylineno,Nt=N.yylloc,ut>0)ut--}else F=Rt,Rt=null;break;case 2:if(Z=this.productions_[H[1]][1],lt.$=w[w.length-Z],lt._$={first_line:o[o.length-(Z||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Z||1)].first_column,last_column:o[o.length-1].last_column},Se)lt._$.range=[o[o.length-(Z||1)].range[0],o[o.length-1].range[1]];if($t=this.performAction.apply(lt,[S,Q,q,it.yy,H[1],w,o].concat(pe)),typeof $t<"u")return $t;if(Z)c=c.slice(0,-1*Z*2),w=w.slice(0,-1*Z),o=o.slice(0,-1*Z);c.push(this.productions_[H[1]][0]),w.push(lt.$),o.push(lt._$),Wt=ot[c[c.length-2]][c[c.length-1]],c.push(Wt);break;case 3:return!0}}return!0},"parse")},de=function(){var tt={EOF:1,parseError:e(function(D,c){if(this.yy.parser)this.yy.parser.parseError(D,c);else throw Error(D)},"parseError"),setInput:e(function(u,D){if(this.yy=D||this.yy||{},this._input=u,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];return this.offset=0,this},"setInput"),input:e(function(){var u=this._input[0];this.yytext+=u,this.yyleng++,this.offset++,this.match+=u,this.matched+=u;var D=u.match(/(?:\r\n?|\n).*/g);if(D)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),u},"input"),unput:e(function(u){var D=u.length,c=u.split(/(?:\r\n?|\n)/g);this._input=u+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-D),this.offset-=D;var L=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1)this.yylineno-=c.length-1;var w=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===L.length?this.yylloc.first_column:0)+L[L.length-c.length].length-c[0].length:this.yylloc.first_column-D},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-D];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(u){this.unput(this.match.slice(u))},"less"),pastInput:e(function(){var u=this.matched.substr(0,this.matched.length-this.match.length);return(u.length>20?"...":"")+u.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var u=this.match;if(u.length<20)u+=this._input.substr(0,20-u.length);return(u.substr(0,20)+(u.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var u=this.pastInput(),D=Array(u.length+1).join("-");return u+this.upcomingInput()+`
5
5
  `+D+"^"},"showPosition"),test_match:e(function(u,D){var c,L,w;if(this.options.backtrack_lexer){if(w={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)w.yylloc.range=this.yylloc.range.slice(0)}if(L=u[0].match(/(?:\r\n?|\n).*/g),L)this.yylineno+=L.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+u[0].length},this.yytext+=u[0],this.match+=u[0],this.matches=u,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(u[0].length),this.matched+=u[0],c=this.performAction.call(this,this.yy,this,D,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(c)return c;else if(this._backtrack){for(var o in w)this[o]=w[o];return!1}return!1},"test_match"),next:e(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var u,D,c,L;if(!this._more)this.yytext="",this.match="";var w=this._currentRules();for(var o=0;o<w.length;o++)if(c=this._input.match(this.rules[w[o]]),c&&(!D||c[0].length>D[0].length)){if(D=c,L=o,this.options.backtrack_lexer)if(u=this.test_match(c,w[o]),u!==!1)return u;else if(this._backtrack){D=!1;continue}else return!1;else if(!this.options.flex)break}if(D){if(u=this.test_match(D,w[L]),u!==!1)return u;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var D=this.next();if(D)return D;else return this.lex()},"lex"),begin:e(function(D){this.conditionStack.push(D)},"begin"),popState:e(function(){var D=this.conditionStack.length-1;if(D>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(D){if(D=this.conditionStack.length-1-Math.abs(D||0),D>=0)return this.conditionStack[D];else return"INITIAL"},"topState"),pushState:e(function(D){this.begin(D)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(D,c,L,w){function o(){let S=c.yytext.indexOf("%%");if(S===0)return!1;if(S>0){let q=c.yytext.slice(0,S),Q=c.yytext.slice(S);if(Q)D.lexer.unput(Q);c.yytext=q}return!0}e(o,"processId");var ot=w;switch(L){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),c.yytext=c.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),c.yytext=c.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!o())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+c.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!o())return;return this.popState(),"ID";break;case 66:if(!o())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),c.yytext=c.yytext.substr(2).trim(),31;break;case 68:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!o())return;return 24;case 74:return c.yytext=c.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return tt}();wt.lexer=de;function kt(){this.yy={}}return e(kt,"Parser"),kt.prototype=wt,wt.Parser=kt,new kt}();Yt.parser=Yt;var Rr=Yt,ge="TB",Qt="TB",jt="dir",ht="state",ct="root",Gt="relation",Te="classDef",be="style",Ee="applyClass",pt="default",Zt="divider",te="fill:none",ee="fill: #333",se="c",ie="markdown",re="normal",Pt="rect",Bt="rectWithTitle",me="stateStart",ke="stateEnd",Ht="divider",zt="roundedWithTitle",_e="note",De="noteGroup",St="statediagram",ve="state",Ce=`${St}-${ve}`,ae="transition",Ae="note",xe="note-edge",Le=`${ae} ${xe}`,Ie=`${St}-${Ae}`,we="cluster",Oe=`${St}-${we}`,Ne="cluster-alt",Re=`${St}-${Ne}`,ne="parent",oe="note",$e="state",Vt="----",Fe=`${Vt}${oe}`,Kt=`${Vt}${ne}`,ce=e((s,i=Qt)=>{if(!s.doc)return i;let T=i;for(let a of s.doc)if(a.stmt==="dir")T=a.value;return T},"getDir"),Pe=e(function(s,i){return i.db.getClasses()},"getClasses"),Be=e(async function(s,i,T,a){t.info("REF0:"),t.info("Drawing state diagram (v2)",i);let{securityLevel:E,state:k,layout:C}=r();a.db.extract(a.db.getRootDocV2());let x=a.db.getData(),y=le(i,E);if(x.type=a.type,x.layoutAlgorithm=C,x.nodeSpacing=k?.nodeSpacing||50,x.rankSpacing=k?.rankSpacing||50,r().look==="neo")x.markers=["barbNeo"];else x.markers=["barb"];x.diagramId=i,await fe(x,y);let O=8;try{(typeof a.db.getLinks==="function"?a.db.getLinks():new Map).forEach((G,R)=>{let _=typeof R==="string"?R:typeof R?.id==="string"?R.id:"",M=x.nodes.find((W)=>W.id===_);if(!_){t.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(R));return}let U=y.node()?.querySelectorAll("g.node, g.rough-node"),B;if(U?.forEach((W)=>{let at=W.textContent?.trim();if(W.id===M?.domId||at===_)B=W}),!B){t.warn("⚠️ Could not find node matching text:",_);return}let K=B.parentNode;if(!K){t.warn("⚠️ Node has no parent, cannot wrap:",_);return}let Y=document.createElementNS("http://www.w3.org/2000/svg","a"),X=G.url.replace(/^"+|"+$/g,"");if(Y.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",X),Y.setAttribute("target","_blank"),G.tooltip){let W=G.tooltip.replace(/^"+|"+$/g,"");Y.setAttribute("title",W),B.setAttribute("title",W)}K.replaceChild(Y,B),Y.appendChild(B),t.info("\uD83D\uDD17 Wrapped node in <a> tag for:",_,G.url)})}catch(j){t.error("❌ Error injecting clickable links:",j)}h.insertTitle(y,"statediagramTitleText",k?.titleTopMargin??25,a.db.getDiagramTitle()),J(y,O,St,k?.useMaxWidth??!0)},"draw"),Ri={getClasses:Pe,draw:Be,getDir:ce},xt=new Map,st=0;function Lt(s="",i=0,T="",a=Vt){let E=T!==null&&T.length>0?`${a}${T}`:"";return`${$e}-${s}${E}-${i}`}e(Lt,"stateDomId");var Ye=e((s,i,T,a,E,k,C,x)=>{t.trace("items",i),i.forEach((y)=>{switch(y.stmt){case ht:ft(s,y,T,a,E,k,C,x);break;case pt:ft(s,y,T,a,E,k,C,x);break;case Gt:{ft(s,y.state1,T,a,E,k,C,x),ft(s,y.state2,T,a,E,k,C,x);let I=C==="neo",O={id:"edge"+st,start:y.state1.id,end:y.state2.id,arrowhead:"normal",arrowTypeEnd:I?"arrow_barb_neo":"arrow_barb",style:te,labelStyle:"",label:l.sanitizeText(y.description??"",r()),arrowheadStyle:ee,labelpos:se,labelType:ie,thickness:re,classes:ae,look:C};E.push(O),st++}break}})},"setupDoc"),Xt=e((s,i=Qt)=>{let T=i;if(s.doc){for(let a of s.doc)if(a.stmt==="dir")T=a.value}return T},"getDir");function dt(s,i,T){if(!i.id||i.id==="</join></fork>"||i.id==="</choice>")return;if(i.cssClasses){if(!Array.isArray(i.cssCompiledStyles))i.cssCompiledStyles=[];i.cssClasses.split(" ").forEach((E)=>{let k=T.get(E);if(k)i.cssCompiledStyles=[...i.cssCompiledStyles??[],...k.styles]})}let a=s.find((E)=>E.id===i.id);if(a)Object.assign(a,i);else s.push(i)}e(dt,"insertOrUpdateNode");function he(s){return s?.classes?.join(" ")??""}e(he,"getClassesFromDbInfo");function ue(s){return s?.styles??[]}e(ue,"getStylesFromDbInfo");var ft=e((s,i,T,a,E,k,C,x)=>{let y=i.id,I=T.get(y),O=he(I),j=ue(I),G=r();if(t.info("dataFetcher parsedItem",i,I,j),y!=="root"){let R=Pt;if(i.start===!0)R=me;else if(i.start===!1)R=ke;if(i.type!==pt)R=i.type;if(!xt.get(y))xt.set(y,{id:y,shape:R,description:l.sanitizeText(y,G),cssClasses:`${O} ${Ce}`,cssStyles:j});let _=xt.get(y);if(i.description){if(Array.isArray(_.description))_.shape=Bt,_.description.push(i.description);else if(_.description?.length&&_.description.length>0)if(_.shape=Bt,_.description===y)_.description=[i.description];else _.description=[_.description,i.description];else _.shape=Pt,_.description=i.description;_.description=l.sanitizeTextOrArray(_.description,G)}if(_.description?.length===1&&_.shape===Bt)if(_.type==="group")_.shape=zt;else _.shape=Pt;if(!_.type&&i.doc)t.info("Setting cluster for XCX",y,Xt(i)),_.type="group",_.isGroup=!0,_.dir=Xt(i),_.explicitDir=i.doc.some((U)=>U.stmt==="dir"),_.shape=i.type===Zt?Ht:zt,_.cssClasses=`${_.cssClasses} ${Oe} ${k?Re:""}`;let M={labelStyle:"",shape:_.shape,label:_.description,cssClasses:_.cssClasses,cssCompiledStyles:[],cssStyles:_.cssStyles,id:y,dir:_.dir,domId:Lt(y,st),type:_.type,isGroup:_.type==="group",padding:8,rx:10,ry:10,look:C,labelType:"markdown"};if(M.shape===Ht)M.label="";if(s&&s.id!=="root")t.trace("Setting node ",y," to be child of its parent ",s.id),M.parentId=s.id;if(M.centerLabel=!0,i.note){let U={labelStyle:"",shape:_e,label:i.note.text,labelType:"markdown",cssClasses:Ie,cssStyles:[],cssCompiledStyles:[],id:y+Fe+"-"+st,domId:Lt(y,st,oe),type:_.type,isGroup:_.type==="group",padding:G.flowchart?.padding,look:C,position:i.note.position},B=y+Kt,K={labelStyle:"",shape:De,label:i.note.text,cssClasses:_.cssClasses,cssStyles:[],id:y+Kt,domId:Lt(y,st,ne),type:"group",isGroup:!0,padding:16,look:C,position:i.note.position};st++,K.id=B,U.parentId=B,dt(a,K,x),dt(a,U,x),dt(a,M,x);let Y=y,X=U.id;if(i.note.position==="left of")Y=U.id,X=y;E.push({id:Y+"-"+X,start:Y,end:X,arrowhead:"none",arrowTypeEnd:"",style:te,labelStyle:"",classes:Le,arrowheadStyle:ee,labelpos:se,labelType:ie,thickness:re,look:C})}else dt(a,M,x)}if(i.doc)t.trace("Adding nodes children "),Ye(i,i.doc,T,a,E,!k,C,x)},"dataFetcher"),Ge=e(()=>{xt.clear(),st=0},"reset"),P={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Jt=e(()=>new Map,"newClassesList"),qt=e(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),At=e((s)=>JSON.parse(JSON.stringify(s)),"clone"),et=class{constructor(s){this.version=s,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Jt(),this.documents={root:qt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=p,this.setAccTitle=f,this.getAccDescription=g,this.setAccDescription=m,this.setDiagramTitle=b,this.getDiagramTitle=v,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{e(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(s){this.clear(!0);for(let a of Array.isArray(s)?s:s.doc)switch(a.stmt){case ht:this.addState(a.id.trim(),a.type,a.doc,a.description,a.note);break;case Gt:this.addRelation(a.state1,a.state2,a.description);break;case Te:this.addStyleClass(a.id.trim(),a.classes);break;case be:this.handleStyleDef(a);break;case Ee:this.setCssClass(a.id.trim(),a.styleClass);break;case"click":this.addLink(a.id,a.url,a.tooltip);break}let i=this.getStates(),T=r();Ge(),ft(void 0,this.getRootDocV2(),i,this.nodes,this.edges,!0,T.look,this.classes);for(let a of this.nodes){if(!Array.isArray(a.label))continue;if(a.description=a.label.slice(1),a.isGroup&&a.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${a.id}]`);a.label=a.label[0]}}handleStyleDef(s){let i=s.id.trim().split(","),T=s.styleClass.split(",");for(let a of i){let E=this.getState(a);if(!E){let k=a.trim();this.addState(k),E=this.getState(k)}if(E)E.styles=T.map((k)=>k.replace(/;/g,"")?.trim())}}setRootDoc(s){if(t.info("Setting root doc",s),this.rootDoc=s,this.version===1)this.extract(s);else this.extract(this.getRootDocV2())}docTranslator(s,i,T){if(i.stmt===Gt){this.docTranslator(s,i.state1,!0),this.docTranslator(s,i.state2,!1);return}if(i.stmt===ht)if(i.id===P.START_NODE)i.id=s.id+(T?"_start":"_end"),i.start=T;else i.id=i.id.trim();if(i.stmt!==ct&&i.stmt!==ht||!i.doc)return;let a=[],E=[];for(let k of i.doc)if(k.type===Zt){let C=At(k);C.doc=At(E),a.push(C),E=[]}else E.push(k);if(a.length>0&&E.length>0){let k={stmt:ht,id:ki(),type:"divider",doc:At(E)};a.push(At(k)),i.doc=a}i.doc.forEach((k)=>this.docTranslator(i,k,!0))}getRootDocV2(){return this.docTranslator({id:ct,stmt:ct},{id:ct,stmt:ct,doc:this.rootDoc},!0),{id:ct,doc:this.rootDoc}}addState(s,i=pt,T=void 0,a=void 0,E=void 0,k=void 0,C=void 0,x=void 0){let y=s?.trim();if(!this.currentDocument.states.has(y))t.info("Adding state ",y,a),this.currentDocument.states.set(y,{stmt:ht,id:y,descriptions:[],type:i,doc:T,note:E,classes:[],styles:[],textStyles:[]});else{let I=this.currentDocument.states.get(y);if(!I)throw Error(`State not found: ${y}`);if(!I.doc)I.doc=T;if(!I.type)I.type=i}if(a)t.info("Setting state description",y,a),(Array.isArray(a)?a:[a]).forEach((O)=>this.addDescription(y,O.trim()));if(E){let I=this.currentDocument.states.get(y);if(!I)throw Error(`State not found: ${y}`);I.note=E,I.note.text=l.sanitizeText(I.note.text,r())}if(k)t.info("Setting state classes",y,k),(Array.isArray(k)?k:[k]).forEach((O)=>this.setCssClass(y,O.trim()));if(C)t.info("Setting state styles",y,C),(Array.isArray(C)?C:[C]).forEach((O)=>this.setStyle(y,O.trim()));if(x)t.info("Setting state styles",y,C),(Array.isArray(x)?x:[x]).forEach((O)=>this.setTextStyle(y,O.trim()))}clear(s){if(this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:qt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Jt(),!s)this.links=new Map,d()}getState(s){return this.currentDocument.states.get(s)}getStates(){return this.currentDocument.states}logDocuments(){t.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(s,i,T){this.links.set(s,{url:i,tooltip:T}),t.warn("Adding link",s,i,T)}getLinks(){return this.links}startIdIfNeeded(s=""){if(s===P.START_NODE)return this.startEndCount++,`${P.START_TYPE}${this.startEndCount}`;return s}startTypeIfNeeded(s="",i=pt){return s===P.START_NODE?P.START_TYPE:i}endIdIfNeeded(s=""){if(s===P.END_NODE)return this.startEndCount++,`${P.END_TYPE}${this.startEndCount}`;return s}endTypeIfNeeded(s="",i=pt){return s===P.END_NODE?P.END_TYPE:i}addRelationObjs(s,i,T=""){let a=this.startIdIfNeeded(s.id.trim()),E=this.startTypeIfNeeded(s.id.trim(),s.type),k=this.startIdIfNeeded(i.id.trim()),C=this.startTypeIfNeeded(i.id.trim(),i.type);this.addState(a,E,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.addState(k,C,i.doc,i.description,i.note,i.classes,i.styles,i.textStyles),this.currentDocument.relations.push({id1:a,id2:k,relationTitle:l.sanitizeText(T,r())})}addRelation(s,i,T){if(typeof s==="object"&&typeof i==="object")this.addRelationObjs(s,i,T);else if(typeof s==="string"&&typeof i==="string"){let a=this.startIdIfNeeded(s.trim()),E=this.startTypeIfNeeded(s),k=this.endIdIfNeeded(i.trim()),C=this.endTypeIfNeeded(i);this.addState(a,E),this.addState(k,C),this.currentDocument.relations.push({id1:a,id2:k,relationTitle:T?l.sanitizeText(T,r()):void 0})}}addDescription(s,i){let T=this.currentDocument.states.get(s),a=i.startsWith(":")?i.replace(":","").trim():i;T?.descriptions?.push(l.sanitizeText(a,r()))}cleanupLabel(s){return s.startsWith(":")?s.slice(2).trim():s.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(s,i=""){if(!this.classes.has(s))this.classes.set(s,{id:s,styles:[],textStyles:[]});let T=this.classes.get(s);if(i&&T)i.split(P.STYLECLASS_SEP).forEach((a)=>{let E=a.replace(/([^;]*);/,"$1").trim();if(RegExp(P.COLOR_KEYWORD).exec(a)){let C=E.replace(P.FILL_KEYWORD,P.BG_FILL).replace(P.COLOR_KEYWORD,P.FILL_KEYWORD);T.textStyles.push(C)}T.styles.push(E)})}getClasses(){return this.classes}setupToolTips(s){let i=It();n(s).select("svg").selectAll("g.node, g.rough-node").on("mouseover",(E)=>{let k=n(E.currentTarget),C=k.attr("title");if(C===null)return;let x=E.currentTarget?.getBoundingClientRect();i.transition().duration(200).style("opacity",".9"),i.style("left",window.scrollX+x.left+(x.right-x.left)/2+"px").style("top",window.scrollY+x.bottom+"px"),i.html(V.sanitize(C)),k.classed("hover",!0)}).on("mouseout",(E)=>{i.transition().duration(500).style("opacity",0),n(E.currentTarget).classed("hover",!1)})}setCssClass(s,i){s.split(",").forEach((T)=>{let a=this.getState(T);if(!a){let E=T.trim();this.addState(E),a=this.getState(E)}a?.classes?.push(i)})}setStyle(s,i){this.getState(s)?.styles?.push(i)}setTextStyle(s,i){this.getState(s)?.textStyles?.push(i)}bindFunctions(s){this.funs.forEach((i)=>{i(s)})}getDirectionStatement(){return this.rootDoc.find((s)=>s.stmt===jt)}getDirection(){return this.getDirectionStatement()?.value??ge}setDirection(s){let i=this.getDirectionStatement();if(i)i.value=s;else this.rootDoc.unshift({stmt:jt,value:s})}trimColon(s){return s.startsWith(":")?s.slice(1).trim():s.trim()}getData(){let s=r();return{nodes:this.nodes,edges:this.edges,other:{},config:s,direction:ce(this.getRootDocV2())}}getConfig(){return r().state}},Ve=e((s)=>`
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:e(function(){var D=this.next();if(D)return D;else return this.lex()},"lex"),begin:e(function(D){this.conditionStack.push(D)},"begin"),popState:e(function(){var D=this.conditionStack.length-1;if(D>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:e(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:e(function(D){if(D=this.conditionStack.length-1-Math.abs(D||0),D>=0)return this.conditionStack[D];else return"INITIAL"},"topState"),pushState:e(function(D){this.begin(D)},"pushState"),stateStackSize:e(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:e(function(D,c,L,w){function o(){let S=c.yytext.indexOf("%%");if(S===0)return!1;if(S>0){let q=c.yytext.slice(0,S),Q=c.yytext.slice(S);if(Q)D.lexer.unput(Q);c.yytext=q}return!0}e(o,"processId");var ot=w;switch(L){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),c.yytext=c.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),c.yytext=c.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!o())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+c.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!o())return;return this.popState(),"ID";break;case 66:if(!o())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),c.yytext=c.yytext.substr(2).trim(),31;break;case 68:return this.popState(),c.yytext=c.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!o())return;return 24;case 74:return c.yytext=c.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return tt}();wt.lexer=de;function kt(){this.yy={}}return e(kt,"Parser"),kt.prototype=wt,wt.Parser=kt,new kt}();Yt.parser=Yt;var Rr=Yt,ge="TB",Qt="TB",jt="dir",ht="state",ct="root",Gt="relation",Te="classDef",be="style",Ee="applyClass",pt="default",Zt="divider",te="fill:none",ee="fill: #333",se="c",ie="markdown",re="normal",Pt="rect",Bt="rectWithTitle",me="stateStart",ke="stateEnd",Ht="divider",zt="roundedWithTitle",_e="note",De="noteGroup",St="statediagram",ve="state",Ce=`${St}-${ve}`,ae="transition",Ae="note",xe="note-edge",Le=`${ae} ${xe}`,Ie=`${St}-${Ae}`,we="cluster",Oe=`${St}-${we}`,Ne="cluster-alt",Re=`${St}-${Ne}`,ne="parent",oe="note",$e="state",Vt="----",Fe=`${Vt}${oe}`,Kt=`${Vt}${ne}`,ce=e((s,i=Qt)=>{if(!s.doc)return i;let T=i;for(let a of s.doc)if(a.stmt==="dir")T=a.value;return T},"getDir"),Pe=e(function(s,i){return i.db.getClasses()},"getClasses"),Be=e(async function(s,i,T,a){t.info("REF0:"),t.info("Drawing state diagram (v2)",i);let{securityLevel:E,state:k,layout:C}=r();a.db.extract(a.db.getRootDocV2());let x=a.db.getData(),y=le(i,E);if(x.type=a.type,x.layoutAlgorithm=C,x.nodeSpacing=k?.nodeSpacing||50,x.rankSpacing=k?.rankSpacing||50,r().look==="neo")x.markers=["barbNeo"];else x.markers=["barb"];x.diagramId=i,await fe(x,y);let O=8;try{(typeof a.db.getLinks==="function"?a.db.getLinks():new Map).forEach((G,R)=>{let _=typeof R==="string"?R:typeof R?.id==="string"?R.id:"",M=x.nodes.find((W)=>W.id===_);if(!_){t.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(R));return}let U=y.node()?.querySelectorAll("g.node, g.rough-node"),B;if(U?.forEach((W)=>{let at=W.textContent?.trim();if(W.id===M?.domId||at===_)B=W}),!B){t.warn("⚠️ Could not find node matching text:",_);return}let K=B.parentNode;if(!K){t.warn("⚠️ Node has no parent, cannot wrap:",_);return}let Y=document.createElementNS("http://www.w3.org/2000/svg","a"),X=G.url.replace(/^"+|"+$/g,"");if(Y.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",X),Y.setAttribute("target","_blank"),G.tooltip){let W=G.tooltip.replace(/^"+|"+$/g,"");Y.setAttribute("title",W),B.setAttribute("title",W)}K.replaceChild(Y,B),Y.appendChild(B),t.info("\uD83D\uDD17 Wrapped node in <a> tag for:",_,G.url)})}catch(j){t.error("❌ Error injecting clickable links:",j)}h.insertTitle(y,"statediagramTitleText",k?.titleTopMargin??25,a.db.getDiagramTitle()),J(y,O,St,k?.useMaxWidth??!0)},"draw"),Ri={getClasses:Pe,draw:Be,getDir:ce},xt=new Map,st=0;function Lt(s="",i=0,T="",a=Vt){let E=T!==null&&T.length>0?`${a}${T}`:"";return`${$e}-${s}${E}-${i}`}e(Lt,"stateDomId");var Ye=e((s,i,T,a,E,k,C,x)=>{t.trace("items",i),i.forEach((y)=>{switch(y.stmt){case ht:ft(s,y,T,a,E,k,C,x);break;case pt:ft(s,y,T,a,E,k,C,x);break;case Gt:{ft(s,y.state1,T,a,E,k,C,x),ft(s,y.state2,T,a,E,k,C,x);let I=C==="neo",O={id:"edge"+st,start:y.state1.id,end:y.state2.id,arrowhead:"normal",arrowTypeEnd:I?"arrow_barb_neo":"arrow_barb",style:te,labelStyle:"",label:l.sanitizeText(y.description??"",r()),arrowheadStyle:ee,labelpos:se,labelType:ie,thickness:re,classes:ae,look:C};E.push(O),st++}break}})},"setupDoc"),Xt=e((s,i=Qt)=>{let T=i;if(s.doc){for(let a of s.doc)if(a.stmt==="dir")T=a.value}return T},"getDir");function dt(s,i,T){if(!i.id||i.id==="</join></fork>"||i.id==="</choice>")return;if(i.cssClasses){if(!Array.isArray(i.cssCompiledStyles))i.cssCompiledStyles=[];i.cssClasses.split(" ").forEach((E)=>{let k=T.get(E);if(k)i.cssCompiledStyles=[...i.cssCompiledStyles??[],...k.styles]})}let a=s.find((E)=>E.id===i.id);if(a)Object.assign(a,i);else s.push(i)}e(dt,"insertOrUpdateNode");function he(s){return s?.classes?.join(" ")??""}e(he,"getClassesFromDbInfo");function ue(s){return s?.styles??[]}e(ue,"getStylesFromDbInfo");var ft=e((s,i,T,a,E,k,C,x)=>{let y=i.id,I=T.get(y),O=he(I),j=ue(I),G=r();if(t.info("dataFetcher parsedItem",i,I,j),y!=="root"){let R=Pt;if(i.start===!0)R=me;else if(i.start===!1)R=ke;if(i.type!==pt)R=i.type;if(!xt.get(y))xt.set(y,{id:y,shape:R,description:l.sanitizeText(y,G),cssClasses:`${O} ${Ce}`,cssStyles:j});let _=xt.get(y);if(i.description){if(Array.isArray(_.description))_.shape=Bt,_.description.push(i.description);else if(_.description?.length&&_.description.length>0)if(_.shape=Bt,_.description===y)_.description=[i.description];else _.description=[_.description,i.description];else _.shape=Pt,_.description=i.description;_.description=l.sanitizeTextOrArray(_.description,G)}if(_.description?.length===1&&_.shape===Bt)if(_.type==="group")_.shape=zt;else _.shape=Pt;if(!_.type&&i.doc)t.info("Setting cluster for XCX",y,Xt(i)),_.type="group",_.isGroup=!0,_.dir=Xt(i),_.explicitDir=i.doc.some((U)=>U.stmt==="dir"),_.shape=i.type===Zt?Ht:zt,_.cssClasses=`${_.cssClasses} ${Oe} ${k?Re:""}`;let M={labelStyle:"",shape:_.shape,label:_.description,cssClasses:_.cssClasses,cssCompiledStyles:[],cssStyles:_.cssStyles,id:y,dir:_.dir,domId:Lt(y,st),type:_.type,isGroup:_.type==="group",padding:8,rx:10,ry:10,look:C,labelType:"markdown"};if(M.shape===Ht)M.label="";if(s&&s.id!=="root")t.trace("Setting node ",y," to be child of its parent ",s.id),M.parentId=s.id;if(M.centerLabel=!0,i.note){let U={labelStyle:"",shape:_e,label:i.note.text,labelType:"markdown",cssClasses:Ie,cssStyles:[],cssCompiledStyles:[],id:y+Fe+"-"+st,domId:Lt(y,st,oe),type:_.type,isGroup:_.type==="group",padding:G.flowchart?.padding,look:C,position:i.note.position},B=y+Kt,K={labelStyle:"",shape:De,label:i.note.text,cssClasses:_.cssClasses,cssStyles:[],id:y+Kt,domId:Lt(y,st,ne),type:"group",isGroup:!0,padding:16,look:C,position:i.note.position};st++,K.id=B,U.parentId=B,dt(a,K,x),dt(a,U,x),dt(a,M,x);let Y=y,X=U.id;if(i.note.position==="left of")Y=U.id,X=y;E.push({id:Y+"-"+X,start:Y,end:X,arrowhead:"none",arrowTypeEnd:"",style:te,labelStyle:"",classes:Le,arrowheadStyle:ee,labelpos:se,labelType:ie,thickness:re,look:C})}else dt(a,M,x)}if(i.doc)t.trace("Adding nodes children "),Ye(i,i.doc,T,a,E,!k,C,x)},"dataFetcher"),Ge=e(()=>{xt.clear(),st=0},"reset"),P={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Jt=e(()=>new Map,"newClassesList"),qt=e(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),At=e((s)=>JSON.parse(JSON.stringify(s)),"clone"),et=class{constructor(s){this.version=s,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Jt(),this.documents={root:qt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=p,this.setAccTitle=f,this.getAccDescription=g,this.setAccDescription=m,this.setDiagramTitle=b,this.getDiagramTitle=v,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{e(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(s){this.clear(!0);for(let a of Array.isArray(s)?s:s.doc)switch(a.stmt){case ht:this.addState(a.id.trim(),a.type,a.doc,a.description,a.note);break;case Gt:this.addRelation(a.state1,a.state2,a.description);break;case Te:this.addStyleClass(a.id.trim(),a.classes);break;case be:this.handleStyleDef(a);break;case Ee:this.setCssClass(a.id.trim(),a.styleClass);break;case"click":this.addLink(a.id,a.url,a.tooltip);break}let i=this.getStates(),T=r();Ge(),ft(void 0,this.getRootDocV2(),i,this.nodes,this.edges,!0,T.look,this.classes);for(let a of this.nodes){if(!Array.isArray(a.label))continue;if(a.description=a.label.slice(1),a.isGroup&&a.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${a.id}]`);a.label=a.label[0]}}handleStyleDef(s){let i=s.id.trim().split(","),T=s.styleClass.split(",");for(let a of i){let E=this.getState(a);if(!E){let k=a.trim();this.addState(k),E=this.getState(k)}if(E)E.styles=T.map((k)=>k.replace(/;/g,"")?.trim())}}setRootDoc(s){if(t.info("Setting root doc",s),this.rootDoc=s,this.version===1)this.extract(s);else this.extract(this.getRootDocV2())}docTranslator(s,i,T){if(i.stmt===Gt){this.docTranslator(s,i.state1,!0),this.docTranslator(s,i.state2,!1);return}if(i.stmt===ht)if(i.id===P.START_NODE)i.id=s.id+(T?"_start":"_end"),i.start=T;else i.id=i.id.trim();if(i.stmt!==ct&&i.stmt!==ht||!i.doc)return;let a=[],E=[];for(let k of i.doc)if(k.type===Zt){let C=At(k);C.doc=At(E),a.push(C),E=[]}else E.push(k);if(a.length>0&&E.length>0){let k={stmt:ht,id:Ti(),type:"divider",doc:At(E)};a.push(At(k)),i.doc=a}i.doc.forEach((k)=>this.docTranslator(i,k,!0))}getRootDocV2(){return this.docTranslator({id:ct,stmt:ct},{id:ct,stmt:ct,doc:this.rootDoc},!0),{id:ct,doc:this.rootDoc}}addState(s,i=pt,T=void 0,a=void 0,E=void 0,k=void 0,C=void 0,x=void 0){let y=s?.trim();if(!this.currentDocument.states.has(y))t.info("Adding state ",y,a),this.currentDocument.states.set(y,{stmt:ht,id:y,descriptions:[],type:i,doc:T,note:E,classes:[],styles:[],textStyles:[]});else{let I=this.currentDocument.states.get(y);if(!I)throw Error(`State not found: ${y}`);if(!I.doc)I.doc=T;if(!I.type)I.type=i}if(a)t.info("Setting state description",y,a),(Array.isArray(a)?a:[a]).forEach((O)=>this.addDescription(y,O.trim()));if(E){let I=this.currentDocument.states.get(y);if(!I)throw Error(`State not found: ${y}`);I.note=E,I.note.text=l.sanitizeText(I.note.text,r())}if(k)t.info("Setting state classes",y,k),(Array.isArray(k)?k:[k]).forEach((O)=>this.setCssClass(y,O.trim()));if(C)t.info("Setting state styles",y,C),(Array.isArray(C)?C:[C]).forEach((O)=>this.setStyle(y,O.trim()));if(x)t.info("Setting state styles",y,C),(Array.isArray(x)?x:[x]).forEach((O)=>this.setTextStyle(y,O.trim()))}clear(s){if(this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:qt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Jt(),!s)this.links=new Map,d()}getState(s){return this.currentDocument.states.get(s)}getStates(){return this.currentDocument.states}logDocuments(){t.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(s,i,T){this.links.set(s,{url:i,tooltip:T}),t.warn("Adding link",s,i,T)}getLinks(){return this.links}startIdIfNeeded(s=""){if(s===P.START_NODE)return this.startEndCount++,`${P.START_TYPE}${this.startEndCount}`;return s}startTypeIfNeeded(s="",i=pt){return s===P.START_NODE?P.START_TYPE:i}endIdIfNeeded(s=""){if(s===P.END_NODE)return this.startEndCount++,`${P.END_TYPE}${this.startEndCount}`;return s}endTypeIfNeeded(s="",i=pt){return s===P.END_NODE?P.END_TYPE:i}addRelationObjs(s,i,T=""){let a=this.startIdIfNeeded(s.id.trim()),E=this.startTypeIfNeeded(s.id.trim(),s.type),k=this.startIdIfNeeded(i.id.trim()),C=this.startTypeIfNeeded(i.id.trim(),i.type);this.addState(a,E,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.addState(k,C,i.doc,i.description,i.note,i.classes,i.styles,i.textStyles),this.currentDocument.relations.push({id1:a,id2:k,relationTitle:l.sanitizeText(T,r())})}addRelation(s,i,T){if(typeof s==="object"&&typeof i==="object")this.addRelationObjs(s,i,T);else if(typeof s==="string"&&typeof i==="string"){let a=this.startIdIfNeeded(s.trim()),E=this.startTypeIfNeeded(s),k=this.endIdIfNeeded(i.trim()),C=this.endTypeIfNeeded(i);this.addState(a,E),this.addState(k,C),this.currentDocument.relations.push({id1:a,id2:k,relationTitle:T?l.sanitizeText(T,r()):void 0})}}addDescription(s,i){let T=this.currentDocument.states.get(s),a=i.startsWith(":")?i.replace(":","").trim():i;T?.descriptions?.push(l.sanitizeText(a,r()))}cleanupLabel(s){return s.startsWith(":")?s.slice(2).trim():s.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(s,i=""){if(!this.classes.has(s))this.classes.set(s,{id:s,styles:[],textStyles:[]});let T=this.classes.get(s);if(i&&T)i.split(P.STYLECLASS_SEP).forEach((a)=>{let E=a.replace(/([^;]*);/,"$1").trim();if(RegExp(P.COLOR_KEYWORD).exec(a)){let C=E.replace(P.FILL_KEYWORD,P.BG_FILL).replace(P.COLOR_KEYWORD,P.FILL_KEYWORD);T.textStyles.push(C)}T.styles.push(E)})}getClasses(){return this.classes}setupToolTips(s){let i=It();n(s).select("svg").selectAll("g.node, g.rough-node").on("mouseover",(E)=>{let k=n(E.currentTarget),C=k.attr("title");if(C===null)return;let x=E.currentTarget?.getBoundingClientRect();i.transition().duration(200).style("opacity",".9"),i.style("left",window.scrollX+x.left+(x.right-x.left)/2+"px").style("top",window.scrollY+x.bottom+"px"),i.html(V.sanitize(C)),k.classed("hover",!0)}).on("mouseout",(E)=>{i.transition().duration(500).style("opacity",0),n(E.currentTarget).classed("hover",!1)})}setCssClass(s,i){s.split(",").forEach((T)=>{let a=this.getState(T);if(!a){let E=T.trim();this.addState(E),a=this.getState(E)}a?.classes?.push(i)})}setStyle(s,i){this.getState(s)?.styles?.push(i)}setTextStyle(s,i){this.getState(s)?.textStyles?.push(i)}bindFunctions(s){this.funs.forEach((i)=>{i(s)})}getDirectionStatement(){return this.rootDoc.find((s)=>s.stmt===jt)}getDirection(){return this.getDirectionStatement()?.value??ge}setDirection(s){let i=this.getDirectionStatement();if(i)i.value=s;else this.rootDoc.unshift({stmt:jt,value:s})}trimColon(s){return s.startsWith(":")?s.slice(1).trim():s.trim()}getData(){let s=r();return{nodes:this.nodes,edges:this.edges,other:{},config:s,direction:ce(this.getRootDocV2())}}getConfig(){return r().state}},Ve=e((s)=>`
7
7
  defs [id$="-barbEnd"] {
8
8
  fill: ${s.transitionColor};
9
9
  stroke: ${s.transitionColor};
@@ -1,4 +1,4 @@
1
- import{e,t,w,lt,l,d,f,p,m,g,b,v,r,n,h,Me,fe,Ce}from"./index-1r72hdzb.js";import{V}from"./index-6qmsnxwy.js";import{It}from"./index-qj8fxwsf.js";import{we}from"./index-nprm96xp.js";import{le}from"./index-s4j678gj.js";import{J}from"./index-3cy1bzwh.js";var Je=function(){var i=e(function(Q,T,y,F){for(y=y||{},F=Q.length;F--;y[Q[F]]=T);return y},"o"),u=[1,18],c=[1,19],o=[1,20],A=[1,41],E=[1,26],k=[1,42],D=[1,24],S=[1,25],_=[1,32],U=[1,33],Ne=[1,34],L=[1,45],Le=[1,35],xe=[1,36],ve=[1,37],Ie=[1,38],Oe=[1,27],Ve=[1,28],Pe=[1,29],Re=[1,30],Ge=[1,31],x=[1,44],I=[1,46],O=[1,43],P=[1,47],Ue=[1,9],B=[1,8,9],de=[1,58],pe=[1,59],Ae=[1,60],be=[1,61],ke=[1,62],ze=[1,63],Ye=[1,64],G=[1,8,9,41],Ze=[1,77],H=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],me=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ge=[13,60,86,100,102,103],ee=[13,60,73,74,86,100,102,103],$e=[13,60,68,69,70,71,72,86,100,102,103],Ee=[1,103],te=[1,121],se=[1,117],ie=[1,113],ae=[1,119],re=[1,114],ne=[1,115],ue=[1,116],ce=[1,118],oe=[1,120],et=[22,50,60,61,82,86,87,88,89,90],tt=[1,128],Te=[12,39],Ke=[1,8,9,39,41,44,46],ye=[1,8,9,22],st=[1,153],it=[1,8,9,61],K=[1,8,9,22,50,60,61,82,86,87,88,89,90],We={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:e(function(T,y,F,C,N,s,he){var a=s.length-1;switch(N){case 8:this.$=s[a-1];break;case 9:case 10:case 13:case 15:this.$=s[a];break;case 11:case 14:this.$=s[a-2]+"."+s[a];break;case 12:case 16:this.$=s[a-1]+s[a];break;case 17:case 18:this.$=s[a-1]+"~"+s[a]+"~";break;case 19:C.addRelation(s[a]);break;case 20:s[a-1].title=C.cleanupLabel(s[a]),C.addRelation(s[a-1]);break;case 31:this.$=s[a].trim(),C.setAccTitle(this.$);break;case 32:case 33:this.$=s[a].trim(),C.setAccDescription(this.$);break;case 34:C.addClassesToNamespace(s[a-3],s[a-1][0],s[a-1][1]),C.popNamespace();break;case 35:C.addClassesToNamespace(s[a-4],s[a-1][0],s[a-1][1]),C.popNamespace();break;case 36:this.$=C.addNamespace(s[a]);break;case 37:this.$=C.addNamespace(s[a-1],s[a]);break;case 38:this.$=[[s[a]],[]];break;case 39:this.$=[[s[a-1]],[]];break;case 40:s[a][0].unshift(s[a-2]),this.$=s[a];break;case 41:this.$=[[],[s[a]]];break;case 42:this.$=[[],[s[a-1]]];break;case 43:s[a][1].unshift(s[a-2]),this.$=s[a];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=s[a];break;case 48:C.setCssClass(s[a-2],s[a]);break;case 49:C.addMembers(s[a-3],s[a-1]);break;case 51:C.setCssClass(s[a-5],s[a-3]),C.addMembers(s[a-5],s[a-1]);break;case 52:C.addAnnotation(s[a-3],s[a-1]);break;case 53:C.addAnnotation(s[a-6],s[a-4]),C.addMembers(s[a-6],s[a-1]);break;case 54:C.addAnnotation(s[a-5],s[a-3]);break;case 55:this.$=s[a],C.addClass(s[a]);break;case 56:this.$=s[a-1],C.addClass(s[a-1]),C.setClassLabel(s[a-1],s[a]);break;case 60:C.addAnnotation(s[a],s[a-2]);break;case 61:case 74:this.$=[s[a]];break;case 62:s[a].push(s[a-1]),this.$=s[a];break;case 63:break;case 64:C.addMember(s[a-1],C.cleanupLabel(s[a]));break;case 65:break;case 66:break;case 67:this.$={id1:s[a-2],id2:s[a],relation:s[a-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:s[a-3],id2:s[a],relation:s[a-1],relationTitle1:s[a-2],relationTitle2:"none"};break;case 69:this.$={id1:s[a-3],id2:s[a],relation:s[a-2],relationTitle1:"none",relationTitle2:s[a-1]};break;case 70:this.$={id1:s[a-4],id2:s[a],relation:s[a-2],relationTitle1:s[a-3],relationTitle2:s[a-1]};break;case 71:this.$=C.addNote(s[a],s[a-1]);break;case 72:this.$=C.addNote(s[a]);break;case 73:this.$=s[a-2],C.defineClass(s[a-1],s[a]);break;case 75:this.$=s[a-2].concat([s[a]]);break;case 76:C.setDirection("TB");break;case 77:C.setDirection("BT");break;case 78:C.setDirection("RL");break;case 79:C.setDirection("LR");break;case 80:this.$={type1:s[a-2],type2:s[a],lineType:s[a-1]};break;case 81:this.$={type1:"none",type2:s[a],lineType:s[a-1]};break;case 82:this.$={type1:s[a-1],type2:"none",lineType:s[a]};break;case 83:this.$={type1:"none",type2:"none",lineType:s[a]};break;case 84:this.$=C.relationType.AGGREGATION;break;case 85:this.$=C.relationType.EXTENSION;break;case 86:this.$=C.relationType.COMPOSITION;break;case 87:this.$=C.relationType.DEPENDENCY;break;case 88:this.$=C.relationType.LOLLIPOP;break;case 89:this.$=C.lineType.LINE;break;case 90:this.$=C.lineType.DOTTED_LINE;break;case 91:case 97:this.$=s[a-2],C.setClickEvent(s[a-1],s[a]);break;case 92:case 98:this.$=s[a-3],C.setClickEvent(s[a-2],s[a-1]),C.setTooltip(s[a-2],s[a]);break;case 93:this.$=s[a-2],C.setLink(s[a-1],s[a]);break;case 94:this.$=s[a-3],C.setLink(s[a-2],s[a-1],s[a]);break;case 95:this.$=s[a-3],C.setLink(s[a-2],s[a-1]),C.setTooltip(s[a-2],s[a]);break;case 96:this.$=s[a-4],C.setLink(s[a-3],s[a-2],s[a]),C.setTooltip(s[a-3],s[a-1]);break;case 99:this.$=s[a-3],C.setClickEvent(s[a-2],s[a-1],s[a]);break;case 100:this.$=s[a-4],C.setClickEvent(s[a-3],s[a-2],s[a-1]),C.setTooltip(s[a-3],s[a]);break;case 101:this.$=s[a-3],C.setLink(s[a-2],s[a]);break;case 102:this.$=s[a-4],C.setLink(s[a-3],s[a-1],s[a]);break;case 103:this.$=s[a-4],C.setLink(s[a-3],s[a-1]),C.setTooltip(s[a-3],s[a]);break;case 104:this.$=s[a-5],C.setLink(s[a-4],s[a-2],s[a]),C.setTooltip(s[a-4],s[a-1]);break;case 105:this.$=s[a-2],C.setCssStyle(s[a-1],s[a]);break;case 106:C.setCssClass(s[a-1],s[a]);break;case 107:this.$=[s[a]];break;case 108:s[a-2].push(s[a]),this.$=s[a-2];break;case 110:this.$=s[a-1]+s[a];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:u,35:c,37:o,38:22,42:A,43:23,46:E,48:k,51:D,52:S,54:_,56:U,57:Ne,60:L,62:Le,63:xe,64:ve,65:Ie,75:Oe,76:Ve,78:Pe,82:Re,83:Ge,86:x,100:I,102:O,103:P},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},i(Ue,[2,5],{8:[1,48]}),{8:[1,49]},i(B,[2,19],{22:[1,50]}),i(B,[2,21]),i(B,[2,22]),i(B,[2,23]),i(B,[2,24]),i(B,[2,25]),i(B,[2,26]),i(B,[2,27]),i(B,[2,28]),i(B,[2,29]),i(B,[2,30]),{34:[1,51]},{36:[1,52]},i(B,[2,33]),i(B,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:de,69:pe,70:Ae,71:be,72:ke,73:ze,74:Ye}),{39:[1,65]},i(G,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),i(B,[2,65]),i(B,[2,66]),{16:69,60:L,86:x,100:I,102:O},{16:39,17:40,19:70,60:L,86:x,100:I,102:O,103:P},{16:39,17:40,19:71,60:L,86:x,100:I,102:O,103:P},{16:39,17:40,19:72,60:L,86:x,100:I,102:O,103:P},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:L,86:x,100:I,102:O,103:P},{13:Ze,55:76},{58:78,60:[1,79]},i(B,[2,76]),i(B,[2,77]),i(B,[2,78]),i(B,[2,79]),i(H,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:L,86:x,100:I,102:O,103:P}),i(H,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:L,86:x,100:I,102:O,103:P},{16:39,17:40,19:87,60:L,86:x,100:I,102:O,103:P},i(me,[2,133]),i(me,[2,134]),i(me,[2,135]),i(me,[2,136]),i([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),i(Ue,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:u,35:c,37:o,42:A,46:E,48:k,51:D,52:S,54:_,56:U,57:Ne,60:L,62:Le,63:xe,64:ve,65:Ie,75:Oe,76:Ve,78:Pe,82:Re,83:Ge,86:x,100:I,102:O,103:P}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:u,35:c,37:o,38:22,42:A,43:23,46:E,48:k,51:D,52:S,54:_,56:U,57:Ne,60:L,62:Le,63:xe,64:ve,65:Ie,75:Oe,76:Ve,78:Pe,82:Re,83:Ge,86:x,100:I,102:O,103:P},i(B,[2,20]),i(B,[2,31]),i(B,[2,32]),{13:[1,91],16:39,17:40,19:90,60:L,86:x,100:I,102:O,103:P},{53:92,66:56,67:57,68:de,69:pe,70:Ae,71:be,72:ke,73:ze,74:Ye},i(B,[2,64]),{67:93,73:ze,74:Ye},i(ge,[2,83],{66:94,68:de,69:pe,70:Ae,71:be,72:ke}),i(ee,[2,84]),i(ee,[2,85]),i(ee,[2,86]),i(ee,[2,87]),i(ee,[2,88]),i($e,[2,89]),i($e,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:A,43:23,48:k,54:_,56:U},{16:100,60:L,86:x,100:I,102:O},{41:[1,102],45:101,51:Ee},{16:104,60:L,86:x,100:I,102:O},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:te,50:se,59:110,60:ie,82:ae,84:111,85:112,86:re,87:ne,88:ue,89:ce,90:oe},{60:[1,122]},{13:Ze,55:123},i(G,[2,72]),i(G,[2,138]),{22:te,50:se,59:124,60:ie,61:[1,125],82:ae,84:111,85:112,86:re,87:ne,88:ue,89:ce,90:oe},i(et,[2,74]),{16:39,17:40,19:126,60:L,86:x,100:I,102:O,103:P},i(H,[2,16]),i(H,[2,17]),i(H,[2,18]),{11:127,12:tt,39:[2,36]},i(Te,[2,9],{16:85,17:86,15:130,18:[1,129],60:L,86:x,100:I,102:O,103:P}),i(Te,[2,10]),i(Ke,[2,55],{11:131,12:tt}),i(Ue,[2,7]),{9:[1,132]},i(ye,[2,67]),{16:39,17:40,19:133,60:L,86:x,100:I,102:O,103:P},{13:[1,135],16:39,17:40,19:134,60:L,86:x,100:I,102:O,103:P},i(ge,[2,82],{66:136,68:de,69:pe,70:Ae,71:be,72:ke}),i(ge,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:A,43:23,48:k,54:_,56:U},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},i(G,[2,48],{39:[1,142]}),{41:[1,143]},i(G,[2,50]),{41:[2,61],45:144,51:Ee},{47:[1,145]},{16:39,17:40,19:146,60:L,86:x,100:I,102:O,103:P},i(B,[2,91],{13:[1,147]}),i(B,[2,93],{13:[1,149],77:[1,148]}),i(B,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},i(B,[2,105],{61:st}),i(it,[2,107],{85:154,22:te,50:se,60:ie,82:ae,86:re,87:ne,88:ue,89:ce,90:oe}),i(K,[2,109]),i(K,[2,111]),i(K,[2,112]),i(K,[2,113]),i(K,[2,114]),i(K,[2,115]),i(K,[2,116]),i(K,[2,117]),i(K,[2,118]),i(K,[2,119]),i(B,[2,106]),i(G,[2,71]),i(B,[2,73],{61:st}),{60:[1,155]},i(H,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:L,86:x,100:I,102:O,103:P},i(Te,[2,12]),i(Ke,[2,56]),{1:[2,4]},i(ye,[2,69]),i(ye,[2,68]),{16:39,17:40,19:158,60:L,86:x,100:I,102:O,103:P},i(ge,[2,80]),i(G,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:A,43:23,48:k,54:_,56:U},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:A,43:23,48:k,54:_,56:U},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:A,43:23,48:k,54:_,56:U},{45:163,51:Ee},i(G,[2,49]),{41:[2,62]},i(G,[2,52],{39:[1,164]}),i(B,[2,60]),i(B,[2,92]),i(B,[2,94]),i(B,[2,95],{77:[1,165]}),i(B,[2,98]),i(B,[2,99],{13:[1,166]}),i(B,[2,101],{13:[1,168],77:[1,167]}),{22:te,50:se,60:ie,82:ae,84:169,85:112,86:re,87:ne,88:ue,89:ce,90:oe},i(K,[2,110]),i(et,[2,75]),{14:[1,170]},i(Te,[2,11]),i(ye,[2,70]),i(G,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:Ee},i(B,[2,96]),i(B,[2,100]),i(B,[2,102]),i(B,[2,103],{77:[1,174]}),i(it,[2,108],{85:154,22:te,50:se,60:ie,82:ae,86:re,87:ne,88:ue,89:ce,90:oe}),i(Ke,[2,8]),i(G,[2,51]),{41:[1,175]},i(G,[2,54]),i(B,[2,104]),i(G,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:e(function(T,y){if(y.recoverable)this.trace(T);else{var F=Error(T);throw F.hash=y,F}},"parseError"),parse:e(function(T){var y=this,F=[0],C=[],N=[null],s=[],he=this.table,a="",Fe=0,at=0,rt=0,At=2,nt=1,bt=s.slice.call(arguments,1),M=Object.create(this.lexer),j={yy:{}};for(var Qe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Qe))j.yy[Qe]=this.yy[Qe];if(M.setInput(T,j.yy),j.yy.lexer=M,j.yy.parser=this,typeof M.yylloc>"u")M.yylloc={};var je=M.yylloc;s.push(je);var ft=M.options&&M.options.ranges;if(typeof j.yy.parseError==="function")this.parseError=j.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function kt(Y){F.length=F.length-2*Y,N.length=N.length-Y,s.length=s.length-Y}e(kt,"popStack");function ut(){var Y=C.pop()||M.lex()||nt;if(typeof Y!=="number"){if(Y instanceof Array)C=Y,Y=C.pop();Y=y.symbols_[Y]||Y}return Y}e(ut,"lex");var R,Xe,X,z,Tt,qe,Z={},Be,W,ct,_e;while(!0){if(X=F[F.length-1],this.defaultActions[X])z=this.defaultActions[X];else{if(R===null||typeof R>"u")R=ut();z=he[X]&&he[X][R]}if(typeof z>"u"||!z.length||!z[0]){var He="";_e=[];for(Be in he[X])if(this.terminals_[Be]&&Be>At)_e.push("'"+this.terminals_[Be]+"'");if(M.showPosition)He="Parse error on line "+(Fe+1)+`:
1
+ import{e,t,w,lt,l,d,f,p,m,g,b,v,r,n,h,Me,fe,Ce}from"./index-nwsya6dj.js";import{V}from"./index-v119nznk.js";import{It}from"./index-y9ma6azy.js";import{we}from"./index-9022d1n9.js";import{le}from"./index-h9ycj8n2.js";import{J}from"./index-nz8qbd1p.js";var Je=function(){var i=e(function(Q,T,y,F){for(y=y||{},F=Q.length;F--;y[Q[F]]=T);return y},"o"),u=[1,18],c=[1,19],o=[1,20],A=[1,41],E=[1,26],k=[1,42],D=[1,24],S=[1,25],_=[1,32],U=[1,33],Ne=[1,34],L=[1,45],Le=[1,35],xe=[1,36],ve=[1,37],Ie=[1,38],Oe=[1,27],Ve=[1,28],Pe=[1,29],Re=[1,30],Ge=[1,31],x=[1,44],I=[1,46],O=[1,43],P=[1,47],Ue=[1,9],B=[1,8,9],de=[1,58],pe=[1,59],Ae=[1,60],be=[1,61],ke=[1,62],ze=[1,63],Ye=[1,64],G=[1,8,9,41],Ze=[1,77],H=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],me=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],ge=[13,60,86,100,102,103],ee=[13,60,73,74,86,100,102,103],$e=[13,60,68,69,70,71,72,86,100,102,103],Ee=[1,103],te=[1,121],se=[1,117],ie=[1,113],ae=[1,119],re=[1,114],ne=[1,115],ue=[1,116],ce=[1,118],oe=[1,120],et=[22,50,60,61,82,86,87,88,89,90],tt=[1,128],Te=[12,39],Ke=[1,8,9,39,41,44,46],ye=[1,8,9,22],st=[1,153],it=[1,8,9,61],K=[1,8,9,22,50,60,61,82,86,87,88,89,90],We={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",18:"DOT",20:"GENERICTYPE",22:"LABEL",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",39:"STRUCT_START",41:"STRUCT_STOP",42:"NAMESPACE",44:"STYLE_SEPARATOR",46:"ANNOTATION_START",47:"ANNOTATION_END",48:"CLASS",50:"SPACE",51:"MEMBER",52:"SEPARATOR",54:"NOTE_FOR",56:"NOTE",57:"CLASSDEF",60:"ALPHA",61:"COMMA",62:"direction_tb",63:"direction_bt",64:"direction_rl",65:"direction_lr",68:"AGGREGATION",69:"EXTENSION",70:"COMPOSITION",71:"DEPENDENCY",72:"LOLLIPOP",73:"LINE",74:"DOTTED_LINE",75:"CALLBACK",76:"LINK",77:"LINK_TARGET",78:"CLICK",79:"CALLBACK_NAME",80:"CALLBACK_ARGS",81:"HREF",82:"STYLE",83:"CSSCLASS",86:"NUM",87:"COLON",88:"UNIT",89:"BRKT",90:"PCT",93:"graphCodeTokens",95:"TAGSTART",96:"TAGEND",97:"==",98:"--",99:"DEFAULT",100:"MINUS",101:"keywords",102:"UNICODE_TEXT",103:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:e(function(T,y,F,C,N,s,he){var a=s.length-1;switch(N){case 8:this.$=s[a-1];break;case 9:case 10:case 13:case 15:this.$=s[a];break;case 11:case 14:this.$=s[a-2]+"."+s[a];break;case 12:case 16:this.$=s[a-1]+s[a];break;case 17:case 18:this.$=s[a-1]+"~"+s[a]+"~";break;case 19:C.addRelation(s[a]);break;case 20:s[a-1].title=C.cleanupLabel(s[a]),C.addRelation(s[a-1]);break;case 31:this.$=s[a].trim(),C.setAccTitle(this.$);break;case 32:case 33:this.$=s[a].trim(),C.setAccDescription(this.$);break;case 34:C.addClassesToNamespace(s[a-3],s[a-1][0],s[a-1][1]),C.popNamespace();break;case 35:C.addClassesToNamespace(s[a-4],s[a-1][0],s[a-1][1]),C.popNamespace();break;case 36:this.$=C.addNamespace(s[a]);break;case 37:this.$=C.addNamespace(s[a-1],s[a]);break;case 38:this.$=[[s[a]],[]];break;case 39:this.$=[[s[a-1]],[]];break;case 40:s[a][0].unshift(s[a-2]),this.$=s[a];break;case 41:this.$=[[],[s[a]]];break;case 42:this.$=[[],[s[a-1]]];break;case 43:s[a][1].unshift(s[a-2]),this.$=s[a];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=s[a];break;case 48:C.setCssClass(s[a-2],s[a]);break;case 49:C.addMembers(s[a-3],s[a-1]);break;case 51:C.setCssClass(s[a-5],s[a-3]),C.addMembers(s[a-5],s[a-1]);break;case 52:C.addAnnotation(s[a-3],s[a-1]);break;case 53:C.addAnnotation(s[a-6],s[a-4]),C.addMembers(s[a-6],s[a-1]);break;case 54:C.addAnnotation(s[a-5],s[a-3]);break;case 55:this.$=s[a],C.addClass(s[a]);break;case 56:this.$=s[a-1],C.addClass(s[a-1]),C.setClassLabel(s[a-1],s[a]);break;case 60:C.addAnnotation(s[a],s[a-2]);break;case 61:case 74:this.$=[s[a]];break;case 62:s[a].push(s[a-1]),this.$=s[a];break;case 63:break;case 64:C.addMember(s[a-1],C.cleanupLabel(s[a]));break;case 65:break;case 66:break;case 67:this.$={id1:s[a-2],id2:s[a],relation:s[a-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:s[a-3],id2:s[a],relation:s[a-1],relationTitle1:s[a-2],relationTitle2:"none"};break;case 69:this.$={id1:s[a-3],id2:s[a],relation:s[a-2],relationTitle1:"none",relationTitle2:s[a-1]};break;case 70:this.$={id1:s[a-4],id2:s[a],relation:s[a-2],relationTitle1:s[a-3],relationTitle2:s[a-1]};break;case 71:this.$=C.addNote(s[a],s[a-1]);break;case 72:this.$=C.addNote(s[a]);break;case 73:this.$=s[a-2],C.defineClass(s[a-1],s[a]);break;case 75:this.$=s[a-2].concat([s[a]]);break;case 76:C.setDirection("TB");break;case 77:C.setDirection("BT");break;case 78:C.setDirection("RL");break;case 79:C.setDirection("LR");break;case 80:this.$={type1:s[a-2],type2:s[a],lineType:s[a-1]};break;case 81:this.$={type1:"none",type2:s[a],lineType:s[a-1]};break;case 82:this.$={type1:s[a-1],type2:"none",lineType:s[a]};break;case 83:this.$={type1:"none",type2:"none",lineType:s[a]};break;case 84:this.$=C.relationType.AGGREGATION;break;case 85:this.$=C.relationType.EXTENSION;break;case 86:this.$=C.relationType.COMPOSITION;break;case 87:this.$=C.relationType.DEPENDENCY;break;case 88:this.$=C.relationType.LOLLIPOP;break;case 89:this.$=C.lineType.LINE;break;case 90:this.$=C.lineType.DOTTED_LINE;break;case 91:case 97:this.$=s[a-2],C.setClickEvent(s[a-1],s[a]);break;case 92:case 98:this.$=s[a-3],C.setClickEvent(s[a-2],s[a-1]),C.setTooltip(s[a-2],s[a]);break;case 93:this.$=s[a-2],C.setLink(s[a-1],s[a]);break;case 94:this.$=s[a-3],C.setLink(s[a-2],s[a-1],s[a]);break;case 95:this.$=s[a-3],C.setLink(s[a-2],s[a-1]),C.setTooltip(s[a-2],s[a]);break;case 96:this.$=s[a-4],C.setLink(s[a-3],s[a-2],s[a]),C.setTooltip(s[a-3],s[a-1]);break;case 99:this.$=s[a-3],C.setClickEvent(s[a-2],s[a-1],s[a]);break;case 100:this.$=s[a-4],C.setClickEvent(s[a-3],s[a-2],s[a-1]),C.setTooltip(s[a-3],s[a]);break;case 101:this.$=s[a-3],C.setLink(s[a-2],s[a]);break;case 102:this.$=s[a-4],C.setLink(s[a-3],s[a-1],s[a]);break;case 103:this.$=s[a-4],C.setLink(s[a-3],s[a-1]),C.setTooltip(s[a-3],s[a]);break;case 104:this.$=s[a-5],C.setLink(s[a-4],s[a-2],s[a]),C.setTooltip(s[a-4],s[a-1]);break;case 105:this.$=s[a-2],C.setCssStyle(s[a-1],s[a]);break;case 106:C.setCssClass(s[a-1],s[a]);break;case 107:this.$=[s[a]];break;case 108:s[a-2].push(s[a]),this.$=s[a-2];break;case 110:this.$=s[a-1]+s[a];break}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:u,35:c,37:o,38:22,42:A,43:23,46:E,48:k,51:D,52:S,54:_,56:U,57:Ne,60:L,62:Le,63:xe,64:ve,65:Ie,75:Oe,76:Ve,78:Pe,82:Re,83:Ge,86:x,100:I,102:O,103:P},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},i(Ue,[2,5],{8:[1,48]}),{8:[1,49]},i(B,[2,19],{22:[1,50]}),i(B,[2,21]),i(B,[2,22]),i(B,[2,23]),i(B,[2,24]),i(B,[2,25]),i(B,[2,26]),i(B,[2,27]),i(B,[2,28]),i(B,[2,29]),i(B,[2,30]),{34:[1,51]},{36:[1,52]},i(B,[2,33]),i(B,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:de,69:pe,70:Ae,71:be,72:ke,73:ze,74:Ye}),{39:[1,65]},i(G,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),i(B,[2,65]),i(B,[2,66]),{16:69,60:L,86:x,100:I,102:O},{16:39,17:40,19:70,60:L,86:x,100:I,102:O,103:P},{16:39,17:40,19:71,60:L,86:x,100:I,102:O,103:P},{16:39,17:40,19:72,60:L,86:x,100:I,102:O,103:P},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:L,86:x,100:I,102:O,103:P},{13:Ze,55:76},{58:78,60:[1,79]},i(B,[2,76]),i(B,[2,77]),i(B,[2,78]),i(B,[2,79]),i(H,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:L,86:x,100:I,102:O,103:P}),i(H,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:L,86:x,100:I,102:O,103:P},{16:39,17:40,19:87,60:L,86:x,100:I,102:O,103:P},i(me,[2,133]),i(me,[2,134]),i(me,[2,135]),i(me,[2,136]),i([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),i(Ue,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:u,35:c,37:o,42:A,46:E,48:k,51:D,52:S,54:_,56:U,57:Ne,60:L,62:Le,63:xe,64:ve,65:Ie,75:Oe,76:Ve,78:Pe,82:Re,83:Ge,86:x,100:I,102:O,103:P}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:u,35:c,37:o,38:22,42:A,43:23,46:E,48:k,51:D,52:S,54:_,56:U,57:Ne,60:L,62:Le,63:xe,64:ve,65:Ie,75:Oe,76:Ve,78:Pe,82:Re,83:Ge,86:x,100:I,102:O,103:P},i(B,[2,20]),i(B,[2,31]),i(B,[2,32]),{13:[1,91],16:39,17:40,19:90,60:L,86:x,100:I,102:O,103:P},{53:92,66:56,67:57,68:de,69:pe,70:Ae,71:be,72:ke,73:ze,74:Ye},i(B,[2,64]),{67:93,73:ze,74:Ye},i(ge,[2,83],{66:94,68:de,69:pe,70:Ae,71:be,72:ke}),i(ee,[2,84]),i(ee,[2,85]),i(ee,[2,86]),i(ee,[2,87]),i(ee,[2,88]),i($e,[2,89]),i($e,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:A,43:23,48:k,54:_,56:U},{16:100,60:L,86:x,100:I,102:O},{41:[1,102],45:101,51:Ee},{16:104,60:L,86:x,100:I,102:O},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:te,50:se,59:110,60:ie,82:ae,84:111,85:112,86:re,87:ne,88:ue,89:ce,90:oe},{60:[1,122]},{13:Ze,55:123},i(G,[2,72]),i(G,[2,138]),{22:te,50:se,59:124,60:ie,61:[1,125],82:ae,84:111,85:112,86:re,87:ne,88:ue,89:ce,90:oe},i(et,[2,74]),{16:39,17:40,19:126,60:L,86:x,100:I,102:O,103:P},i(H,[2,16]),i(H,[2,17]),i(H,[2,18]),{11:127,12:tt,39:[2,36]},i(Te,[2,9],{16:85,17:86,15:130,18:[1,129],60:L,86:x,100:I,102:O,103:P}),i(Te,[2,10]),i(Ke,[2,55],{11:131,12:tt}),i(Ue,[2,7]),{9:[1,132]},i(ye,[2,67]),{16:39,17:40,19:133,60:L,86:x,100:I,102:O,103:P},{13:[1,135],16:39,17:40,19:134,60:L,86:x,100:I,102:O,103:P},i(ge,[2,82],{66:136,68:de,69:pe,70:Ae,71:be,72:ke}),i(ge,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:A,43:23,48:k,54:_,56:U},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},i(G,[2,48],{39:[1,142]}),{41:[1,143]},i(G,[2,50]),{41:[2,61],45:144,51:Ee},{47:[1,145]},{16:39,17:40,19:146,60:L,86:x,100:I,102:O,103:P},i(B,[2,91],{13:[1,147]}),i(B,[2,93],{13:[1,149],77:[1,148]}),i(B,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},i(B,[2,105],{61:st}),i(it,[2,107],{85:154,22:te,50:se,60:ie,82:ae,86:re,87:ne,88:ue,89:ce,90:oe}),i(K,[2,109]),i(K,[2,111]),i(K,[2,112]),i(K,[2,113]),i(K,[2,114]),i(K,[2,115]),i(K,[2,116]),i(K,[2,117]),i(K,[2,118]),i(K,[2,119]),i(B,[2,106]),i(G,[2,71]),i(B,[2,73],{61:st}),{60:[1,155]},i(H,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:L,86:x,100:I,102:O,103:P},i(Te,[2,12]),i(Ke,[2,56]),{1:[2,4]},i(ye,[2,69]),i(ye,[2,68]),{16:39,17:40,19:158,60:L,86:x,100:I,102:O,103:P},i(ge,[2,80]),i(G,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:A,43:23,48:k,54:_,56:U},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:A,43:23,48:k,54:_,56:U},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:A,43:23,48:k,54:_,56:U},{45:163,51:Ee},i(G,[2,49]),{41:[2,62]},i(G,[2,52],{39:[1,164]}),i(B,[2,60]),i(B,[2,92]),i(B,[2,94]),i(B,[2,95],{77:[1,165]}),i(B,[2,98]),i(B,[2,99],{13:[1,166]}),i(B,[2,101],{13:[1,168],77:[1,167]}),{22:te,50:se,60:ie,82:ae,84:169,85:112,86:re,87:ne,88:ue,89:ce,90:oe},i(K,[2,110]),i(et,[2,75]),{14:[1,170]},i(Te,[2,11]),i(ye,[2,70]),i(G,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:Ee},i(B,[2,96]),i(B,[2,100]),i(B,[2,102]),i(B,[2,103],{77:[1,174]}),i(it,[2,108],{85:154,22:te,50:se,60:ie,82:ae,86:re,87:ne,88:ue,89:ce,90:oe}),i(Ke,[2,8]),i(G,[2,51]),{41:[1,175]},i(G,[2,54]),i(B,[2,104]),i(G,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:e(function(T,y){if(y.recoverable)this.trace(T);else{var F=Error(T);throw F.hash=y,F}},"parseError"),parse:e(function(T){var y=this,F=[0],C=[],N=[null],s=[],he=this.table,a="",Fe=0,at=0,rt=0,At=2,nt=1,bt=s.slice.call(arguments,1),M=Object.create(this.lexer),j={yy:{}};for(var Qe in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Qe))j.yy[Qe]=this.yy[Qe];if(M.setInput(T,j.yy),j.yy.lexer=M,j.yy.parser=this,typeof M.yylloc>"u")M.yylloc={};var je=M.yylloc;s.push(je);var ft=M.options&&M.options.ranges;if(typeof j.yy.parseError==="function")this.parseError=j.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function kt(Y){F.length=F.length-2*Y,N.length=N.length-Y,s.length=s.length-Y}e(kt,"popStack");function ut(){var Y=C.pop()||M.lex()||nt;if(typeof Y!=="number"){if(Y instanceof Array)C=Y,Y=C.pop();Y=y.symbols_[Y]||Y}return Y}e(ut,"lex");var R,Xe,X,z,Tt,qe,Z={},Be,W,ct,_e;while(!0){if(X=F[F.length-1],this.defaultActions[X])z=this.defaultActions[X];else{if(R===null||typeof R>"u")R=ut();z=he[X]&&he[X][R]}if(typeof z>"u"||!z.length||!z[0]){var He="";_e=[];for(Be in he[X])if(this.terminals_[Be]&&Be>At)_e.push("'"+this.terminals_[Be]+"'");if(M.showPosition)He="Parse error on line "+(Fe+1)+`:
2
2
  `+M.showPosition()+`
3
3
  Expecting `+_e.join(", ")+", got '"+(this.terminals_[R]||R)+"'";else He="Parse error on line "+(Fe+1)+": Unexpected "+(R==nt?"end of input":"'"+(this.terminals_[R]||R)+"'");this.parseError(He,{text:M.match,token:this.terminals_[R]||R,line:M.yylineno,loc:je,expected:_e})}if(z[0]instanceof Array&&z.length>1)throw Error("Parse Error: multiple actions possible at state: "+X+", token: "+R);switch(z[0]){case 1:if(F.push(R),N.push(M.yytext),s.push(M.yylloc),F.push(z[1]),R=null,!Xe){if(at=M.yyleng,a=M.yytext,Fe=M.yylineno,je=M.yylloc,rt>0)rt--}else R=Xe,Xe=null;break;case 2:if(W=this.productions_[z[1]][1],Z.$=N[N.length-W],Z._$={first_line:s[s.length-(W||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(W||1)].first_column,last_column:s[s.length-1].last_column},ft)Z._$.range=[s[s.length-(W||1)].range[0],s[s.length-1].range[1]];if(qe=this.performAction.apply(Z,[a,at,Fe,j.yy,z[1],N,s].concat(bt)),typeof qe<"u")return qe;if(W)F=F.slice(0,-1*W*2),N=N.slice(0,-1*W),s=s.slice(0,-1*W);F.push(this.productions_[z[1]][0]),N.push(Z.$),s.push(Z._$),ct=he[F[F.length-2]][F[F.length-1]],F.push(ct);break;case 3:return!0}}return!0},"parse")},pt=function(){var Q={EOF:1,parseError:e(function(y,F){if(this.yy.parser)this.yy.parser.parseError(y,F);else throw Error(y)},"parseError"),setInput:e(function(T,y){if(this.yy=y||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];return this.offset=0,this},"setInput"),input:e(function(){var T=this._input[0];this.yytext+=T,this.yyleng++,this.offset++,this.match+=T,this.matched+=T;var y=T.match(/(?:\r\n?|\n).*/g);if(y)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),T},"input"),unput:e(function(T){var y=T.length,F=T.split(/(?:\r\n?|\n)/g);this._input=T+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-y),this.offset-=y;var C=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),F.length-1)this.yylineno-=F.length-1;var N=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:F?(F.length===C.length?this.yylloc.first_column:0)+C[C.length-F.length].length-F[0].length:this.yylloc.first_column-y},this.options.ranges)this.yylloc.range=[N[0],N[0]+this.yyleng-y];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:e(function(T){this.unput(this.match.slice(T))},"less"),pastInput:e(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:e(function(){var T=this.match;if(T.length<20)T+=this._input.substr(0,20-T.length);return(T.substr(0,20)+(T.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var T=this.pastInput(),y=Array(T.length+1).join("-");return T+this.upcomingInput()+`
@@ -1,2 +1,2 @@
1
- import{e}from"./index-1r72hdzb.js";function R(c,i){if(c.accDescr)i.setAccDescription?.(c.accDescr);if(c.accTitle)i.setAccTitle?.(c.accTitle);if(c.title)i.setDiagramTitle?.(c.title)}e(R,"populateCommonDb");
1
+ import{e}from"./index-nwsya6dj.js";function R(c,i){if(c.accDescr)i.setAccDescription?.(c.accDescr);if(c.accTitle)i.setAccTitle?.(c.accTitle);if(c.title)i.setDiagramTitle?.(c.title)}e(R,"populateCommonDb");
2
2
  export{R};
@@ -1,4 +1,4 @@
1
- import{e,t,q,Gr,l,d,f,p,m,g,b,v,r,gr,Wr,n,Ze,Je,h,Me,_i,fe,Ce}from"./index-1r72hdzb.js";import{V}from"./index-6qmsnxwy.js";import{It}from"./index-qj8fxwsf.js";import{we}from"./index-nprm96xp.js";import{Rt}from"./index-g3pwnqeb.js";import{le}from"./index-s4j678gj.js";import{J}from"./index-3cy1bzwh.js";var dt="flowchart-",pt=class{constructor(){this.vertexCounter=0,this.config=r(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=f,this.setAccDescription=m,this.setDiagramTitle=b,this.getAccTitle=p,this.getAccDescription=g,this.getDiagramTitle=v,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{e(this,"FlowDB")}sanitizeText(s){return l.sanitizeText(s,this.config)}sanitizeNodeLabelType(s){switch(s){case"markdown":case"string":case"text":return s;default:return"markdown"}}setDiagramId(s){this.diagramId=s}lookUpDomId(s){for(let u of this.vertices.values())if(u.id===s)return this.diagramId?`${this.diagramId}-${u.domId}`:u.domId;return this.diagramId?`${this.diagramId}-${s}`:s}addVertex(s,u,o,c,D,S,C={},_){if(!s||s.trim().length===0)return;let k;if(_!==void 0){let B;if(!_.includes(`
1
+ import{e,t,q,Gr,l,d,f,p,m,g,b,v,r,gr,Wr,n,Ze,Je,h,Me,_i,fe,Ce}from"./index-nwsya6dj.js";import{V}from"./index-v119nznk.js";import{It}from"./index-y9ma6azy.js";import{we}from"./index-9022d1n9.js";import{Rt}from"./index-frvta4tm.js";import{le}from"./index-h9ycj8n2.js";import{J}from"./index-nz8qbd1p.js";var dt="flowchart-",pt=class{constructor(){this.vertexCounter=0,this.config=r(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=f,this.setAccDescription=m,this.setDiagramTitle=b,this.getAccTitle=p,this.getAccDescription=g,this.getDiagramTitle=v,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{e(this,"FlowDB")}sanitizeText(s){return l.sanitizeText(s,this.config)}sanitizeNodeLabelType(s){switch(s){case"markdown":case"string":case"text":return s;default:return"markdown"}}setDiagramId(s){this.diagramId=s}lookUpDomId(s){for(let u of this.vertices.values())if(u.id===s)return this.diagramId?`${this.diagramId}-${u.domId}`:u.domId;return this.diagramId?`${this.diagramId}-${s}`:s}addVertex(s,u,o,c,D,S,C={},_){if(!s||s.trim().length===0)return;let k;if(_!==void 0){let B;if(!_.includes(`
2
2
  `))B=`{
3
3
  `+_+`
4
4
  }`;else B=_+`
@@ -0,0 +1,2 @@
1
+ import{W,me,Y,Se,Ve,I,G,ve,rt,be,mn,yn,kt,Ee,vn,Tt,ee,Ye,_e,ut,St,ar,U,wn,Et,it,_t,sr,je,xe,Cn,Sn,En,se,ur,dr,_n,hr,o,ge,Ae,B,at,L}from"./index-mergmj97.js";import{dn,xt,wt,tt,ye,nr,Pr,hn,fn,Or,pn,O}from"./index-qhfrazv3.js";var qn=/\s/;function Hn(r){var e=r.length;while(e--&&qn.test(r.charAt(e)));return e}var Mr=Hn;var Xn=/^\s+/;function Jn(r){return r?r.slice(0,Mr(r)+1).replace(Xn,""):r}var jr=Jn;var Fr=NaN,Kn=/^[-+]0x[0-9a-f]+$/i,Zn=/^0b[01]+$/i,Qn=/^0o[0-7]+$/i,$n=parseInt;function et(r){if(typeof r=="number")return r;if(Se(r))return Fr;if(G(r)){var e=typeof r.valueOf=="function"?r.valueOf():r;r=G(e)?e+"":e}if(typeof r!="string")return r===0?r:+r;r=jr(r);var n=Zn.test(r);return n||Qn.test(r)?$n(r.slice(2),n?2:8):Kn.test(r)?Fr:+r}var Ar=et;var Gr=1/0,nt=179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000;function ot(r){if(!r)return r===0?r:0;if(r=Ar(r),r===Gr||r===-Gr){var e=r<0?-1:1;return e*nt}return r===r?r:0}var T=ot;function ft(r){var e=T(r),n=e%1;return e===e?n?e-n:e:0}var Br=ft;function st(r,e,n){if(!G(n))return!1;var t=typeof e;if(t=="number"?ee(n)&&kt(e,n.length):t=="string"&&(e in n))return Ee(n[e],r);return!1}var y=st;function dt(r){return Tt(function(e,n){var t=-1,i=n.length,a=i>1?n[i-1]:void 0,f=i>2?n[2]:void 0;if(a=r.length>3&&typeof a=="function"?(i--,a):void 0,f&&y(n[0],n[1],f))a=i<3?void 0:a,i=1;e=Object(e);while(++t<i){var u=n[t];if(u)r(e,u,t,a)}return e})}var Vr=dt;function ct(r){var e=r==null?0:r.length;return e?sr(r,1):[]}var w=ct;function pt(r){return mn(vn(r,void 0,w),r+"")}var Dr=pt;var mt="[object Object]",lt=Function.prototype,ht=Object.prototype,zr=lt.toString,vt=ht.hasOwnProperty,bt=zr.call(Object);function gt(r){if(!Y(r)||me(r)!=mt)return!1;var e=nr(r);if(e===null)return!0;var n=vt.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&zr.call(n)==bt}var Yr=gt;var yt="\\ud800-\\udfff",Ot="\\u0300-\\u036f",It="\\ufe20-\\ufe2f",Nt="\\u20d0-\\u20ff",Pt=Ot+It+Nt,Ct="\\ufe0e\\ufe0f",Lt="\\u200d",Rt=RegExp("["+Lt+yt+Pt+Ct+"]");function Mt(r){return Rt.test(r)}var Ur=Mt;var jt=1,Ft=4;function At(r){return Or(r,jt|Ft)}var Wr=At;var Gt=function(){return W.Date.now()},ir=Gt;var qr=Object.prototype,Bt=qr.hasOwnProperty,Vt=Tt(function(r,e){r=Object(r);var n=-1,t=e.length,i=t>2?e[2]:void 0;if(i&&y(e[0],e[1],i))t=1;while(++n<t){var a=e[n],f=ye(a),u=-1,s=f.length;while(++u<s){var d=f[u],c=r[d];if(c===void 0||Ee(c,qr[d])&&!Bt.call(r,d))r[d]=a[d]}}return r}),Hr=Vt;function Dt(r,e,n){if(n!==void 0&&!Ee(r[e],n)||n===void 0&&!(e in r))xt(r,e,n)}var z=Dt;function zt(r,e){if(e==="constructor"&&typeof r[e]==="function")return;if(e=="__proto__")return;return r[e]}var q=zt;function Yt(r){return tt(r,ye(r))}var Xr=Yt;function Ut(r,e,n,t,i,a,f){var u=q(r,n),s=q(e,n),d=f.get(s);if(d){z(r,n,d);return}var c=a?a(u,s,n+"",r,e,f):void 0,p=c===void 0;if(p){var m=I(s),l=!m&&_e(s),h=!m&&!l&&St(s);if(c=s,m||l||h)if(I(u))c=u;else if(_n(u))c=dn(u);else if(l)p=!1,c=Pr(s,!0);else if(h)p=!1,c=hn(s,!0);else c=[];else if(Yr(s)||Ye(s)){if(c=u,Ye(u))c=Xr(u);else if(!G(u)||rt(u))c=fn(s)}else p=!1}if(p)f.set(s,c),i(c,s,t,a,f),f.delete(s);z(r,n,c)}var Jr=Ut;function Kr(r,e,n,t,i){if(r===e)return;ur(e,function(a,f){if(i||(i=new je),G(a))Jr(r,e,f,n,Kr,t,i);else{var u=t?t(q(r,f),a,f+"",r,e,i):void 0;if(u===void 0)u=a;z(r,f,u)}},ye)}var Zr=Kr;function Wt(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}var S=Wt;function qt(r){return function(e,n,t){var i=Object(e);if(!ee(e)){var a=se(n,3);e=U(e),n=function(u){return a(i[u],u,i)}}var f=r(e,n,t);return f>-1?i[a?e[f]:f]:void 0}}var Qr=qt;var Ht=Math.max;function Xt(r,e,n){var t=r==null?0:r.length;if(!t)return-1;var i=n==null?0:Br(n);if(i<0)i=Ht(t+i,0);return yn(r,se(e,3),i)}var $r=Xt;var Jt=Qr($r),H=Jt;function Kt(r,e){return r==null?r:ur(r,hr(e),ye)}var re=Kt;function Zt(r,e){return r&&dr(r,hr(e))}var ne=Zt;function Qt(r,e){return r>e}var te=Qt;var $t=Object.prototype,ro=$t.hasOwnProperty;function eo(r,e){return r!=null&&ro.call(r,e)}var oe=eo;function no(r,e){return r!=null&&Cn(r,e,oe)}var Z=no;var to="[object String]";function oo(r){return typeof r=="string"||!I(r)&&Y(r)&&me(r)==to}var ie=oo;function io(r,e){return r<e}var Q=io;function ao(r,e){var n={};return e=se(e,3),dr(r,function(t,i,a){xt(n,i,e(t,i,a))}),n}var M=ao;function fo(r,e,n){var t=-1,i=r.length;while(++t<i){var a=r[t],f=e(a);if(f!=null&&(u===void 0?f===f&&!Se(f):n(f,u)))var u=f,s=a}return s}var j=fo;function uo(r){return r&&r.length?j(r,ve,te):void 0}var b=uo;var so=Vr(function(r,e,n){Zr(r,e,n)}),X=so;function co(r){return r&&r.length?j(r,ve,Q):void 0}var k=co;function po(r,e){return r&&r.length?j(r,se(e,2),Q):void 0}var F=po;function mo(r,e,n,t){if(!G(r))return r;e=Et(e,r);var i=-1,a=e.length,f=a-1,u=r;while(u!=null&&++i<a){var s=it(e[i]),d=n;if(s==="__proto__"||s==="constructor"||s==="prototype")return r;if(i!=f){var c=u[s];if(d=t?t(c,s,u):void 0,d===void 0)d=G(c)?c:kt(e[i+1])?[]:{}}wt(u,s,d),u=u[s]}return r}var ae=mo;function lo(r,e,n){var t=-1,i=e.length,a={};while(++t<i){var f=e[t],u=_t(r,f);if(n(u,f))ae(a,Et(f,r),u)}return a}var fe=lo;function ho(r,e){var n=r.length;r.sort(e);while(n--)r[n]=r[n].value;return r}var ue=ho;function vo(r,e){if(r!==e){var n=r!==void 0,t=r===null,i=r===r,a=Se(r),f=e!==void 0,u=e===null,s=e===e,d=Se(e);if(!u&&!d&&!a&&r>e||a&&f&&s&&!u&&!d||t&&f&&s||!n&&s||!i)return 1;if(!t&&!a&&!d&&r<e||d&&n&&i&&!t&&!a||u&&n&&i||!f&&i||!s)return-1}return 0}var de=vo;function _o(r,e,n){var t=-1,i=r.criteria,a=e.criteria,f=i.length,u=n.length;while(++t<f){var s=de(i[t],a[t]);if(s){if(t>=u)return s;var d=n[t];return s*(d=="desc"?-1:1)}}return r.index-e.index}var ce=_o;function bo(r,e,n){if(e.length)e=Ve(e,function(a){if(I(a))return function(f){return _t(f,a.length===1?a[0]:a)};return a});else e=[ve];var t=-1;e=Ve(e,ut(se));var i=pn(r,function(a,f,u){var s=Ve(e,function(d){return d(a)});return{criteria:s,index:++t,value:a}});return ue(i,function(a,f){return ce(a,f,n)})}var pe=bo;var wo=En("length"),le=wo;var we="\\ud800-\\udfff",go="\\u0300-\\u036f",Eo="\\ufe20-\\ufe2f",yo="\\u20d0-\\u20ff",xo=go+Eo+yo,ko="\\ufe0e\\ufe0f",Oo="["+we+"]",fr="["+xo+"]",cr="\\ud83c[\\udffb-\\udfff]",Io="(?:"+fr+"|"+cr+")",ke="[^"+we+"]",Oe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ie="[\\ud800-\\udbff][\\udc00-\\udfff]",No="\\u200d",Ne=Io+"?",Pe="["+ko+"]?",Po="(?:"+No+"(?:"+[ke,Oe,Ie].join("|")+")"+Pe+Ne+")*",Co=Pe+Ne+Po,Lo="(?:"+[ke+fr+"?",fr,Oe,Ie,Oo].join("|")+")",he=RegExp(cr+"(?="+cr+")|"+Lo+Co,"g");function So(r){var e=he.lastIndex=0;while(he.test(r))++e;return e}var Ce=So;function Ro(r){return Ur(r)?Ce(r):le(r)}var Le=Ro;function To(r,e){return fe(r,e,function(n,t){return Sn(r,t)})}var Re=To;var Mo=Dr(function(r,e){return r==null?{}:Re(r,e)}),A=Mo;var{ceil:jo,max:Fo}=Math;function Ao(r,e,n,t){var i=-1,a=Fo(jo((e-r)/(n||1)),0),f=Array(a);while(a--)f[t?a:++i]=r,r+=n;return f}var Te=Ao;function Go(r){return function(e,n,t){if(t&&typeof t!="number"&&y(e,n,t))n=t=void 0;if(e=T(e),n===void 0)n=e,e=0;else n=T(n);return t=t===void 0?e<n?1:-1:T(t),Te(e,n,t,r)}}var Me=Go;var Bo=Me(),g=Bo;var Vo="[object Map]",Do="[object Set]";function zo(r){if(r==null)return 0;if(ee(r))return ie(r)?Le(r):r.length;var e=xe(r);if(e==Vo||e==Do)return r.size;return ar(r).length}var Fe=zo;var Yo=Tt(function(r,e){if(r==null)return[];var n=e.length;if(n>1&&y(r,e[0],e[1]))e=[];else if(n>2&&y(e[0],e[1],e[2]))e=[e[0]];return pe(r,sr(e,1),[])}),x=Yo;var Uo=0;function Wo(r){var e=++Uo;return wn(r)+e}var V=Wo;function qo(r,e,n){var t=-1,i=r.length,a=e.length,f={};while(++t<i){var u=t<a?e[t]:void 0;n(f,r[t],u)}return f}var Ge=qo;function Ho(r,e){return Ge(r||[],e||[],wt)}var pr=Ho;class mr{constructor(){var r={};r._next=r._prev=r,this._sentinel=r}dequeue(){var r=this._sentinel,e=r._prev;if(e!==r)return Be(e),e}enqueue(r){var e=this._sentinel;if(r._prev&&r._next)Be(r);r._next=e._next,e._next._prev=r,e._next=r,r._prev=e}toString(){var r=[],e=this._sentinel,n=e._prev;while(n!==e)r.push(JSON.stringify(n,Xo)),n=n._prev;return"["+r.join(", ")+"]"}}function Be(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function Xo(r,e){if(r!=="_next"&&r!=="_prev")return e}var Jo=be(1);function De(r,e){if(r.nodeCount()<=1)return[];var n=Zo(r,e||Jo),t=Ko(n.graph,n.buckets,n.zeroIdx);return w(O(t,function(i){return r.outEdges(i.v,i.w)}))}function Ko(r,e,n){var t=[],i=e[e.length-1],a=e[0],f;while(r.nodeCount()){while(f=a.dequeue())lr(r,e,n,f);while(f=i.dequeue())lr(r,e,n,f);if(r.nodeCount()){for(var u=e.length-2;u>0;--u)if(f=e[u].dequeue(),f){t=t.concat(lr(r,e,n,f,!0));break}}}return t}function lr(r,e,n,t,i){var a=i?[]:void 0;return o(r.inEdges(t.v),function(f){var u=r.edge(f),s=r.node(f.v);if(i)a.push({v:f.v,w:f.w});s.out-=u,vr(e,n,s)}),o(r.outEdges(t.v),function(f){var u=r.edge(f),s=f.w,d=r.node(s);d.in-=u,vr(e,n,d)}),r.removeNode(t.v),a}function Zo(r,e){var n=new L,t=0,i=0;o(r.nodes(),function(u){n.setNode(u,{v:u,in:0,out:0})}),o(r.edges(),function(u){var s=n.edge(u.v,u.w)||0,d=e(u),c=s+d;n.setEdge(u.v,u.w,c),i=Math.max(i,n.node(u.v).out+=d),t=Math.max(t,n.node(u.w).in+=d)});var a=g(i+t+3).map(function(){return new mr}),f=t+1;return o(n.nodes(),function(u){vr(a,f,n.node(u))}),{graph:n,buckets:a,zeroIdx:f}}function vr(r,e,n){if(!n.out)r[0].enqueue(n);else if(!n.in)r[r.length-1].enqueue(n);else r[n.out-n.in+e].enqueue(n)}function ze(r){var e=r.graph().acyclicer==="greedy"?De(r,n(r)):Qo(r);o(e,function(t){var i=r.edge(t);r.removeEdge(t),i.forwardName=t.name,i.reversed=!0,r.setEdge(t.w,t.v,i,V("rev"))});function n(t){return function(i){return t.edge(i).weight}}}function Qo(r){var e=[],n={},t={};function i(a){if(Object.prototype.hasOwnProperty.call(t,a))return;t[a]=!0,n[a]=!0,o(r.outEdges(a),function(f){if(Object.prototype.hasOwnProperty.call(n,f.w))e.push(f);else i(f.w)}),delete n[a]}return o(r.nodes(),i),e}function Ue(r){o(r.edges(),function(e){var n=r.edge(e);if(n.reversed){r.removeEdge(e);var t=n.forwardName;delete n.reversed,delete n.forwardName,r.setEdge(e.w,e.v,n,t)}})}function E(r,e,n,t){var i;do i=V(t);while(r.hasNode(i));return n.dummy=e,r.setNode(i,n),i}function qe(r){var e=new L().setGraph(r.graph());return o(r.nodes(),function(n){e.setNode(n,r.node(n))}),o(r.edges(),function(n){var t=e.edge(n.v,n.w)||{weight:0,minlen:1},i=r.edge(n);e.setEdge(n.v,n.w,{weight:t.weight+i.weight,minlen:Math.max(t.minlen,i.minlen)})}),e}function er(r){var e=new L({multigraph:r.isMultigraph()}).setGraph(r.graph());return o(r.nodes(),function(n){if(!r.children(n).length)e.setNode(n,r.node(n))}),o(r.edges(),function(n){e.setEdge(n,r.edge(n))}),e}function _r(r,e){var{x:n,y:t}=r,i=e.x-n,a=e.y-t,f=r.width/2,u=r.height/2;if(!i&&!a)throw Error("Not possible to find intersection inside of the rectangle");var s,d;if(Math.abs(a)*f>Math.abs(i)*u){if(a<0)u=-u;s=u*i/a,d=u}else{if(i<0)f=-f;s=f,d=f*a/i}return{x:n+s,y:t+d}}function N(r){var e=O(g(wr(r)+1),function(){return[]});return o(r.nodes(),function(n){var t=r.node(n),i=t.rank;if(!B(i))e[i][t.order]=n}),e}function He(r){var e=k(O(r.nodes(),function(n){return r.node(n).rank}));o(r.nodes(),function(n){var t=r.node(n);if(Z(t,"rank"))t.rank-=e})}function Xe(r){var e=k(O(r.nodes(),function(a){return r.node(a).rank})),n=[];o(r.nodes(),function(a){var f=r.node(a).rank-e;if(!n[f])n[f]=[];n[f].push(a)});var t=0,i=r.graph().nodeRankFactor;o(n,function(a,f){if(B(a)&&f%i!==0)--t;else if(t)o(a,function(u){r.node(u).rank+=t})})}function br(r,e,n,t){var i={width:0,height:0};if(arguments.length>=4)i.rank=n,i.order=t;return E(r,"border",i,e)}function wr(r){return b(O(r.nodes(),function(e){var n=r.node(e).rank;if(!B(n))return n}))}function Je(r,e){var n={lhs:[],rhs:[]};return o(r,function(t){if(e(t))n.lhs.push(t);else n.rhs.push(t)}),n}function Ke(r,e){var n=ir();try{return e()}finally{console.log(r+" time: "+(ir()-n)+"ms")}}function Ze(r,e){return e()}function $e(r){function e(n){var t=r.children(n),i=r.node(n);if(t.length)o(t,e);if(Object.prototype.hasOwnProperty.call(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,f=i.maxRank+1;a<f;++a)Qe(r,"borderLeft","_bl",n,i,a),Qe(r,"borderRight","_br",n,i,a)}}o(r.children(),e)}function Qe(r,e,n,t,i,a){var f={width:0,height:0,rank:a,borderType:e},u=i[e][a-1],s=E(r,"border",f,n);if(i[e][a]=s,r.setParent(s,t),u)r.setEdge(u,s,{weight:1})}function en(r){var e=r.graph().rankdir.toLowerCase();if(e==="lr"||e==="rl")tn(r)}function nn(r){var e=r.graph().rankdir.toLowerCase();if(e==="bt"||e==="rl")$o(r);if(e==="lr"||e==="rl")ri(r),tn(r)}function tn(r){o(r.nodes(),function(e){rn(r.node(e))}),o(r.edges(),function(e){rn(r.edge(e))})}function rn(r){var e=r.width;r.width=r.height,r.height=e}function $o(r){o(r.nodes(),function(e){gr(r.node(e))}),o(r.edges(),function(e){var n=r.edge(e);if(o(n.points,gr),Object.prototype.hasOwnProperty.call(n,"y"))gr(n)})}function gr(r){r.y=-r.y}function ri(r){o(r.nodes(),function(e){Er(r.node(e))}),o(r.edges(),function(e){var n=r.edge(e);if(o(n.points,Er),Object.prototype.hasOwnProperty.call(n,"x"))Er(n)})}function Er(r){var e=r.x;r.x=r.y,r.y=e}function on(r){r.graph().dummyChains=[],o(r.edges(),function(e){ni(r,e)})}function ni(r,e){var n=e.v,t=r.node(n).rank,i=e.w,a=r.node(i).rank,f=e.name,u=r.edge(e),s=u.labelRank;if(a===t+1)return;r.removeEdge(e);var d=void 0,c,p;for(p=0,++t;t<a;++p,++t){if(u.points=[],d={width:0,height:0,edgeLabel:u,edgeObj:e,rank:t},c=E(r,"edge",d,"_d"),t===s)d.width=u.width,d.height=u.height,d.dummy="edge-label",d.labelpos=u.labelpos;if(r.setEdge(n,c,{weight:u.weight},f),p===0)r.graph().dummyChains.push(c);n=c}r.setEdge(n,i,{weight:u.weight},f)}function an(r){o(r.graph().dummyChains,function(e){var n=r.node(e),t=n.edgeLabel,i;r.setEdge(n.edgeObj,t);while(n.dummy){if(i=r.successors(e)[0],r.removeNode(e),t.points.push({x:n.x,y:n.y}),n.dummy==="edge-label")t.x=n.x,t.y=n.y,t.width=n.width,t.height=n.height;e=i,n=r.node(e)}})}function J(r){var e={};function n(t){var i=r.node(t);if(Object.prototype.hasOwnProperty.call(e,t))return i.rank;e[t]=!0;var a=k(O(r.outEdges(t),function(f){return n(f.w)-r.edge(f).minlen}));if(a===Number.POSITIVE_INFINITY||a===void 0||a===null)a=0;return i.rank=a}o(r.sources(),n)}function R(r,e){return r.node(e.w).rank-r.node(e.v).rank-r.edge(e).minlen}function tr(r){var e=new L({directed:!1}),n=r.nodes()[0],t=r.nodeCount();e.setNode(n,{});var i,a;while(ti(e,r)<t)i=oi(e,r),a=e.hasNode(i.v)?R(r,i):-R(r,i),ii(e,r,a);return e}function ti(r,e){function n(t){o(e.nodeEdges(t),function(i){var a=i.v,f=t===a?i.w:a;if(!r.hasNode(f)&&!R(e,i))r.setNode(f,{}),r.setEdge(t,f,{}),n(f)})}return o(r.nodes(),n),r.nodeCount()}function oi(r,e){return F(e.edges(),function(n){if(r.hasNode(n.v)!==r.hasNode(n.w))return R(e,n)})}function ii(r,e,n){o(r.nodes(),function(t){e.node(t).rank+=n})}var Ws=be(1);var Qs=be(1);yr.CycleException=K;function yr(r){var e={},n={},t=[];function i(a){if(Object.prototype.hasOwnProperty.call(n,a))throw new K;if(!Object.prototype.hasOwnProperty.call(e,a))n[a]=!0,e[a]=!0,o(r.predecessors(a),i),delete n[a],t.push(a)}if(o(r.sinks(),i),Fe(e)!==r.nodeCount())throw new K;return t}function K(){}K.prototype=Error();function or(r,e,n){if(!I(e))e=[e];var t=(r.isDirected()?r.successors:r.neighbors).bind(r),i=[],a={};return o(e,function(f){if(!r.hasNode(f))throw Error("Graph does not have node: "+f);sn(r,f,n==="post",a,t,i)}),i}function sn(r,e,n,t,i,a){if(!Object.prototype.hasOwnProperty.call(t,e)){if(t[e]=!0,!n)a.push(e);if(o(i(e),function(f){sn(r,f,n,t,i,a)}),n)a.push(e)}}function xr(r,e){return or(r,e,"post")}function kr(r,e){return or(r,e,"pre")}C.initLowLimValues=Nr;C.initCutValues=Ir;C.calcCutValue=ln;C.leaveEdge=gn;C.enterEdge=xn;C.exchangeEdges=kn;function C(r){r=qe(r),J(r);var e=tr(r);Nr(e),Ir(e,r);var n,t;while(n=gn(e))t=xn(e,r,n),kn(e,r,n,t)}function Ir(r,e){var n=xr(r,r.nodes());n=n.slice(0,n.length-1),o(n,function(t){di(r,e,t)})}function di(r,e,n){var t=r.node(n),i=t.parent;r.edge(n,i).cutvalue=ln(r,e,n)}function ln(r,e,n){var t=r.node(n),i=t.parent,a=!0,f=e.edge(n,i),u=0;if(!f)a=!1,f=e.edge(i,n);return u=f.weight,o(e.nodeEdges(n),function(s){var d=s.v===n,c=d?s.w:s.v;if(c!==i){var p=d===a,m=e.edge(s).weight;if(u+=p?m:-m,pi(r,n,c)){var l=r.edge(n,c).cutvalue;u+=p?-l:l}}}),u}function Nr(r,e){if(arguments.length<2)e=r.nodes()[0];bn(r,{},1,e)}function bn(r,e,n,t,i){var a=n,f=r.node(t);if(e[t]=!0,o(r.neighbors(t),function(u){if(!Object.prototype.hasOwnProperty.call(e,u))n=bn(r,e,n,u,t)}),f.low=a,f.lim=n++,i)f.parent=i;else delete f.parent;return n}function gn(r){return H(r.edges(),function(e){return r.edge(e).cutvalue<0})}function xn(r,e,n){var{v:t,w:i}=n;if(!e.hasEdge(t,i))t=n.w,i=n.v;var a=r.node(t),f=r.node(i),u=a,s=!1;if(a.lim>f.lim)u=f,s=!0;var d=ge(e.edges(),function(c){return s===cn(r,r.node(c.v),u)&&s!==cn(r,r.node(c.w),u)});return F(d,function(c){return R(e,c)})}function kn(r,e,n,t){var{v:i,w:a}=n;r.removeEdge(i,a),r.setEdge(t.v,t.w,{}),Nr(r),Ir(r,e),ci(r,e)}function ci(r,e){var n=H(r.nodes(),function(i){return!e.node(i).parent}),t=kr(r,n);t=t.slice(1),o(t,function(i){var a=r.node(i).parent,f=e.edge(i,a),u=!1;if(!f)f=e.edge(a,i),u=!0;e.node(i).rank=e.node(a).rank+(u?f.minlen:-f.minlen)})}function pi(r,e,n){return r.hasEdge(e,n)}function cn(r,e,n){return n.low<=e.lim&&e.lim<=n.lim}function Cr(r){switch(r.graph().ranker){case"network-simplex":On(r);break;case"tight-tree":li(r);break;case"longest-path":mi(r);break;default:On(r)}}var mi=J;function li(r){J(r),tr(r)}function On(r){C(r)}function In(r){var e=E(r,"root",{},"_root"),n=hi(r),t=b(Ae(n))-1,i=2*t+1;r.graph().nestingRoot=e,o(r.edges(),function(f){r.edge(f).minlen*=i});var a=vi(r)+1;o(r.children(),function(f){Nn(r,e,i,a,t,n,f)}),r.graph().nodeRankFactor=i}function Nn(r,e,n,t,i,a,f){var u=r.children(f);if(!u.length){if(f!==e)r.setEdge(e,f,{weight:0,minlen:n});return}var s=br(r,"_bt"),d=br(r,"_bb"),c=r.node(f);if(r.setParent(s,f),c.borderTop=s,r.setParent(d,f),c.borderBottom=d,o(u,function(p){Nn(r,e,n,t,i,a,p);var m=r.node(p),l=m.borderTop?m.borderTop:p,h=m.borderBottom?m.borderBottom:p,_=m.borderTop?t:2*t,D=l!==h?1:i-a[f]+1;r.setEdge(s,l,{weight:_,minlen:D,nestingEdge:!0}),r.setEdge(h,d,{weight:_,minlen:D,nestingEdge:!0})}),!r.parent(f))r.setEdge(e,s,{weight:0,minlen:i+a[f]})}function hi(r){var e={};function n(t,i){var a=r.children(t);if(a&&a.length)o(a,function(f){n(f,i+1)});e[t]=i}return o(r.children(),function(t){n(t,1)}),e}function vi(r){return at(r.edges(),function(e,n){return e+r.edge(n).weight},0)}function Pn(r){var e=r.graph();r.removeNode(e.nestingRoot),delete e.nestingRoot,o(r.edges(),function(n){var t=r.edge(n);if(t.nestingEdge)r.removeEdge(n)})}function Ln(r,e,n){var t={},i;o(n,function(a){var f=r.parent(a),u,s;while(f){if(u=r.parent(f),u)s=t[u],t[u]=f;else s=i,i=f;if(s&&s!==f){e.setEdge(s,f);return}f=u}})}function Rn(r,e,n){var t=bi(r),i=new L({compound:!0}).setGraph({root:t}).setDefaultNodeLabel(function(a){return r.node(a)});return o(r.nodes(),function(a){var f=r.node(a),u=r.parent(a);if(f.rank===e||f.minRank<=e&&e<=f.maxRank){if(i.setNode(a),i.setParent(a,u||t),o(r[n](a),function(s){var d=s.v===a?s.w:s.v,c=i.edge(d,a),p=!B(c)?c.weight:0;i.setEdge(d,a,{weight:r.edge(s).weight+p})}),Object.prototype.hasOwnProperty.call(f,"minRank"))i.setNode(a,{borderLeft:f.borderLeft[e],borderRight:f.borderRight[e]})}}),i}function bi(r){var e;while(r.hasNode(e=V("_root")));return e}function Tn(r,e){var n=0;for(var t=1;t<e.length;++t)n+=wi(r,e[t-1],e[t]);return n}function wi(r,e,n){var t=pr(n,O(n,function(d,c){return c})),i=w(O(e,function(d){return x(O(r.outEdges(d),function(c){return{pos:t[c.w],weight:r.edge(c).weight}}),"pos")})),a=1;while(a<n.length)a<<=1;var f=2*a-1;a-=1;var u=O(Array(f),function(){return 0}),s=0;return o(i.forEach(function(d){var c=d.pos+a;u[c]+=d.weight;var p=0;while(c>0){if(c%2)p+=u[c+1];c=c-1>>1,u[c]+=d.weight}s+=d.weight*p})),s}function Mn(r){var e={},n=ge(r.nodes(),function(u){return!r.children(u).length}),t=b(O(n,function(u){return r.node(u).rank})),i=O(g(t+1),function(){return[]});function a(u){if(Z(e,u))return;e[u]=!0;var s=r.node(u);i[s.rank].push(u),o(r.successors(u),a)}var f=x(n,function(u){return r.node(u).rank});return o(f,a),i}function jn(r,e){return O(e,function(n){var t=r.inEdges(n);if(!t.length)return{v:n};else{var i=at(t,function(a,f){var u=r.edge(f),s=r.node(f.v);return{sum:a.sum+u.weight*s.order,weight:a.weight+u.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}})}function Fn(r,e){var n={};o(r,function(i,a){var f=n[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};if(!B(i.barycenter))f.barycenter=i.barycenter,f.weight=i.weight}),o(e.edges(),function(i){var a=n[i.v],f=n[i.w];if(!B(a)&&!B(f))f.indegree++,a.out.push(n[i.w])});var t=ge(n,function(i){return!i.indegree});return gi(t)}function gi(r){var e=[];function n(a){return function(f){if(f.merged)return;if(B(f.barycenter)||B(a.barycenter)||f.barycenter>=a.barycenter)Ei(a,f)}}function t(a){return function(f){if(f.in.push(a),--f.indegree===0)r.push(f)}}while(r.length){var i=r.pop();e.push(i),o(i.in.reverse(),n(i)),o(i.out,t(i))}return O(ge(e,function(a){return!a.merged}),function(a){return A(a,["vs","i","barycenter","weight"])})}function Ei(r,e){var n=0,t=0;if(r.weight)n+=r.barycenter*r.weight,t+=r.weight;if(e.weight)n+=e.barycenter*e.weight,t+=e.weight;r.vs=e.vs.concat(r.vs),r.barycenter=n/t,r.weight=t,r.i=Math.min(e.i,r.i),e.merged=!0}function Gn(r,e){var n=Je(r,function(c){return Object.prototype.hasOwnProperty.call(c,"barycenter")}),t=n.lhs,i=x(n.rhs,function(c){return-c.i}),a=[],f=0,u=0,s=0;t.sort(yi(!!e)),s=An(a,i,s),o(t,function(c){s+=c.vs.length,a.push(c.vs),f+=c.barycenter*c.weight,u+=c.weight,s=An(a,i,s)});var d={vs:w(a)};if(u)d.barycenter=f/u,d.weight=u;return d}function An(r,e,n){var t;while(e.length&&(t=S(e)).i<=n)e.pop(),r.push(t.vs),n++;return n}function yi(r){return function(e,n){if(e.barycenter<n.barycenter)return-1;else if(e.barycenter>n.barycenter)return 1;return!r?e.i-n.i:n.i-e.i}}function Lr(r,e,n,t){var i=r.children(e),a=r.node(e),f=a?a.borderLeft:void 0,u=a?a.borderRight:void 0,s={};if(f)i=ge(i,function(h){return h!==f&&h!==u});var d=jn(r,i);o(d,function(h){if(r.children(h.v).length){var _=Lr(r,h.v,n,t);if(s[h.v]=_,Object.prototype.hasOwnProperty.call(_,"barycenter"))ki(h,_)}});var c=Fn(d,n);xi(c,s);var p=Gn(c,t);if(f){if(p.vs=w([f,p.vs,u]),r.predecessors(f).length){var m=r.node(r.predecessors(f)[0]),l=r.node(r.predecessors(u)[0]);if(!Object.prototype.hasOwnProperty.call(p,"barycenter"))p.barycenter=0,p.weight=0;p.barycenter=(p.barycenter*p.weight+m.order+l.order)/(p.weight+2),p.weight+=2}}return p}function xi(r,e){o(r,function(n){n.vs=w(n.vs.map(function(t){if(e[t])return e[t].vs;return t}))})}function ki(r,e){if(!B(r.barycenter))r.barycenter=(r.barycenter*r.weight+e.barycenter*e.weight)/(r.weight+e.weight),r.weight+=e.weight;else r.barycenter=e.barycenter,r.weight=e.weight}function Dn(r){var e=wr(r),n=Bn(r,g(1,e+1),"inEdges"),t=Bn(r,g(e-1,-1,-1),"outEdges"),i=Mn(r);Vn(r,i);var a=Number.POSITIVE_INFINITY,f;for(var u=0,s=0;s<4;++u,++s){Oi(u%2?n:t,u%4>=2),i=N(r);var d=Tn(r,i);if(d<a)s=0,f=Wr(i),a=d}Vn(r,f)}function Bn(r,e,n){return O(e,function(t){return Rn(r,t,n)})}function Oi(r,e){var n=new L;o(r,function(t){var i=t.graph().root,a=Lr(t,i,n,e);o(a.vs,function(f,u){t.node(f).order=u}),Ln(t,n,a.vs)})}function Vn(r,e){o(e,function(n){o(n,function(t,i){r.node(t).order=i})})}function zn(r){var e=Ni(r);o(r.graph().dummyChains,function(n){var t=r.node(n),i=t.edgeObj,a=Ii(r,e,i.v,i.w),{path:f,lca:u}=a,s=0,d=f[s],c=!0;while(n!==i.w){if(t=r.node(n),c){while((d=f[s])!==u&&r.node(d).maxRank<t.rank)s++;if(d===u)c=!1}if(!c){while(s<f.length-1&&r.node(d=f[s+1]).minRank<=t.rank)s++;d=f[s]}r.setParent(n,d),n=r.successors(n)[0]}})}function Ii(r,e,n,t){var i=[],a=[],f=Math.min(e[n].low,e[t].low),u=Math.max(e[n].lim,e[t].lim),s,d;s=n;do s=r.parent(s),i.push(s);while(s&&(e[s].low>f||u>e[s].lim));d=s,s=t;while((s=r.parent(s))!==d)a.push(s);return{path:i.concat(a.reverse()),lca:d}}function Ni(r){var e={},n=0;function t(i){var a=n;o(r.children(i),t),e[i]={low:a,lim:n++}}return o(r.children(),t),e}function Pi(r,e){var n={};function t(i,a){var f=0,u=0,s=i.length,d=S(a);return o(a,function(c,p){var m=Li(r,c),l=m?r.node(m).order:s;if(m||c===d)o(a.slice(u,p+1),function(h){o(r.predecessors(h),function(_){var D=r.node(_),Tr=D.order;if((Tr<f||l<Tr)&&!(D.dummy&&r.node(h).dummy))Yn(n,_,h)})}),u=p+1,f=l}),a}return at(e,t),n}function Ci(r,e){var n={};function t(a,f,u,s,d){var c;o(g(f,u),function(p){if(c=a[p],r.node(c).dummy)o(r.predecessors(c),function(m){var l=r.node(m);if(l.dummy&&(l.order<s||l.order>d))Yn(n,m,c)})})}function i(a,f){var u=-1,s,d=0;return o(f,function(c,p){if(r.node(c).dummy==="border"){var m=r.predecessors(c);if(m.length)s=r.node(m[0]).order,t(f,d,p,u,s),d=p,u=s}t(f,d,f.length,s,a.length)}),f}return at(e,i),n}function Li(r,e){if(r.node(e).dummy)return H(r.predecessors(e),function(n){return r.node(n).dummy})}function Yn(r,e,n){if(e>n){var t=e;e=n,n=t}if(!Object.prototype.hasOwnProperty.call(r,e))Object.defineProperty(r,e,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=r[e];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Si(r,e,n){if(e>n){var t=e;e=n,n=t}return!!r[e]&&Object.prototype.hasOwnProperty.call(r[e],n)}function Ri(r,e,n,t){var i={},a={},f={};return o(e,function(u){o(u,function(s,d){i[s]=s,a[s]=s,f[s]=d})}),o(e,function(u){var s=-1;o(u,function(d){var c=t(d);if(c.length){c=x(c,function(_){return f[_]});var p=(c.length-1)/2;for(var m=Math.floor(p),l=Math.ceil(p);m<=l;++m){var h=c[m];if(a[d]===d&&s<f[h]&&!Si(n,d,h))a[h]=d,a[d]=i[d]=i[h],s=f[h]}}})}),{root:i,align:a}}function Ti(r,e,n,t,i){var a={},f=Mi(r,e,n,i),u=i?"borderLeft":"borderRight";function s(p,m){var l=f.nodes(),h=l.pop(),_={};while(h){if(_[h])p(h);else _[h]=!0,l.push(h),l=l.concat(m(h));h=l.pop()}}function d(p){a[p]=f.inEdges(p).reduce(function(m,l){return Math.max(m,a[l.v]+f.edge(l))},0)}function c(p){var m=f.outEdges(p).reduce(function(h,_){return Math.min(h,a[_.w]-f.edge(_))},Number.POSITIVE_INFINITY),l=r.node(p);if(m!==Number.POSITIVE_INFINITY&&l.borderType!==u)a[p]=Math.max(a[p],m)}return s(d,f.predecessors.bind(f)),s(c,f.successors.bind(f)),o(t,function(p){a[p]=a[n[p]]}),a}function Mi(r,e,n,t){var i=new L,a=r.graph(),f=Gi(a.nodesep,a.edgesep,t);return o(e,function(u){var s;o(u,function(d){var c=n[d];if(i.setNode(c),s){var p=n[s],m=i.edge(p,c);i.setEdge(p,c,Math.max(f(r,d,s),m||0))}s=d})}),i}function ji(r,e){return F(Ae(e),function(n){var{NEGATIVE_INFINITY:t,POSITIVE_INFINITY:i}=Number;return re(n,function(a,f){var u=Bi(r,f)/2;t=Math.max(a+u,t),i=Math.min(a-u,i)}),t-i})}function Fi(r,e){var n=Ae(e),t=k(n),i=b(n);o(["u","d"],function(a){o(["l","r"],function(f){var u=a+f,s=r[u],d;if(s===e)return;var c=Ae(s);if(d=f==="l"?t-k(c):i-b(c),d)r[u]=M(s,function(p){return p+d})})})}function Ai(r,e){return M(r.ul,function(n,t){if(e)return r[e.toLowerCase()][t];else{var i=x(O(r,t));return(i[1]+i[2])/2}})}function Un(r){var e=N(r),n=X(Pi(r,e),Ci(r,e)),t={},i;o(["u","d"],function(f){i=f==="u"?e:Ae(e).reverse(),o(["l","r"],function(u){if(u==="r")i=O(i,function(p){return Ae(p).reverse()});var s=(f==="u"?r.predecessors:r.successors).bind(r),d=Ri(r,i,n,s),c=Ti(r,i,d.root,d.align,u==="r");if(u==="r")c=M(c,function(p){return-p});t[f+u]=c})});var a=ji(r,t);return Fi(t,a),Ai(t,r.graph().align)}function Gi(r,e,n){return function(t,i,a){var f=t.node(i),u=t.node(a),s=0,d;if(s+=f.width/2,Object.prototype.hasOwnProperty.call(f,"labelpos"))switch(f.labelpos.toLowerCase()){case"l":d=-f.width/2;break;case"r":d=f.width/2;break}if(d)s+=n?d:-d;if(d=0,s+=(f.dummy?e:r)/2,s+=(u.dummy?e:r)/2,s+=u.width/2,Object.prototype.hasOwnProperty.call(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":d=u.width/2;break;case"r":d=-u.width/2;break}if(d)s+=n?d:-d;return d=0,s}}function Bi(r,e){return r.node(e).width}function Wn(r){r=er(r),Vi(r),ne(Un(r),function(e,n){r.node(n).x=e})}function Vi(r){var e=N(r),n=r.graph().ranksep,t=0;o(e,function(i){var a=b(O(i,function(f){return r.node(f).height}));o(i,function(f){r.node(f).y=t+a/2}),t+=a+n})}function rr(r,e){var n=e&&e.debugTiming?Ke:Ze;n("layout",()=>{var t=n(" buildLayoutGraph",()=>Zi(r));n(" runLayout",()=>Di(t,n)),n(" updateInputGraph",()=>zi(r,t))})}function Di(r,e){e(" makeSpaceForEdgeLabels",()=>Qi(r)),e(" removeSelfEdges",()=>fa(r)),e(" acyclic",()=>ze(r)),e(" nestingGraph.run",()=>In(r)),e(" rank",()=>Cr(er(r))),e(" injectEdgeLabelProxies",()=>$i(r)),e(" removeEmptyRanks",()=>Xe(r)),e(" nestingGraph.cleanup",()=>Pn(r)),e(" normalizeRanks",()=>He(r)),e(" assignRankMinMax",()=>ra(r)),e(" removeEdgeLabelProxies",()=>ea(r)),e(" normalize.run",()=>on(r)),e(" parentDummyChains",()=>zn(r)),e(" addBorderSegments",()=>$e(r)),e(" order",()=>Dn(r)),e(" insertSelfEdges",()=>ua(r)),e(" adjustCoordinateSystem",()=>en(r)),e(" position",()=>Wn(r)),e(" positionSelfEdges",()=>sa(r)),e(" removeBorderNodes",()=>aa(r)),e(" normalize.undo",()=>an(r)),e(" fixupEdgeLabelCoords",()=>oa(r)),e(" undoCoordinateSystem",()=>nn(r)),e(" translateGraph",()=>na(r)),e(" assignNodeIntersects",()=>ta(r)),e(" reversePoints",()=>ia(r)),e(" acyclic.undo",()=>Ue(r))}function zi(r,e){o(r.nodes(),function(n){var t=r.node(n),i=e.node(n);if(t){if(t.x=i.x,t.y=i.y,e.children(n).length)t.width=i.width,t.height=i.height}}),o(r.edges(),function(n){var t=r.edge(n),i=e.edge(n);if(t.points=i.points,Object.prototype.hasOwnProperty.call(i,"x"))t.x=i.x,t.y=i.y}),r.graph().width=e.graph().width,r.graph().height=e.graph().height}var Yi=["nodesep","edgesep","ranksep","marginx","marginy"],Ui={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Wi=["acyclicer","ranker","rankdir","align"],qi=["width","height"],Hi={width:0,height:0},Xi=["minlen","weight","width","height","labeloffset"],Ji={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ki=["labelpos"];function Zi(r){var e=new L({multigraph:!0,compound:!0}),n=Rr(r.graph());return e.setGraph(X({},Ui,Sr(n,Yi),A(n,Wi))),o(r.nodes(),function(t){var i=Rr(r.node(t));e.setNode(t,Hr(Sr(i,qi),Hi)),e.setParent(t,r.parent(t))}),o(r.edges(),function(t){var i=Rr(r.edge(t));e.setEdge(t,X({},Ji,Sr(i,Xi),A(i,Ki)))}),e}function Qi(r){var e=r.graph();e.ranksep/=2,o(r.edges(),function(n){var t=r.edge(n);if(t.minlen*=2,t.labelpos.toLowerCase()!=="c")if(e.rankdir==="TB"||e.rankdir==="BT")t.width+=t.labeloffset;else t.height+=t.labeloffset})}function $i(r){o(r.edges(),function(e){var n=r.edge(e);if(n.width&&n.height){var t=r.node(e.v),i=r.node(e.w),a={rank:(i.rank-t.rank)/2+t.rank,e};E(r,"edge-proxy",a,"_ep")}})}function ra(r){var e=0;o(r.nodes(),function(n){var t=r.node(n);if(t.borderTop)t.minRank=r.node(t.borderTop).rank,t.maxRank=r.node(t.borderBottom).rank,e=b(e,t.maxRank)}),r.graph().maxRank=e}function ea(r){o(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="edge-proxy")r.edge(n.e).labelRank=n.rank,r.removeNode(e)})}function na(r){var e=Number.POSITIVE_INFINITY,n=0,t=Number.POSITIVE_INFINITY,i=0,a=r.graph(),f=a.marginx||0,u=a.marginy||0;function s(d){var{x:c,y:p,width:m,height:l}=d;e=Math.min(e,c-m/2),n=Math.max(n,c+m/2),t=Math.min(t,p-l/2),i=Math.max(i,p+l/2)}o(r.nodes(),function(d){s(r.node(d))}),o(r.edges(),function(d){var c=r.edge(d);if(Object.prototype.hasOwnProperty.call(c,"x"))s(c)}),e-=f,t-=u,o(r.nodes(),function(d){var c=r.node(d);c.x-=e,c.y-=t}),o(r.edges(),function(d){var c=r.edge(d);if(o(c.points,function(p){p.x-=e,p.y-=t}),Object.prototype.hasOwnProperty.call(c,"x"))c.x-=e;if(Object.prototype.hasOwnProperty.call(c,"y"))c.y-=t}),a.width=n-e+f,a.height=i-t+u}function ta(r){o(r.edges(),function(e){var n=r.edge(e),t=r.node(e.v),i=r.node(e.w),a,f;if(!n.points)n.points=[],a=i,f=t;else a=n.points[0],f=n.points[n.points.length-1];n.points.unshift(_r(t,a)),n.points.push(_r(i,f))})}function oa(r){o(r.edges(),function(e){var n=r.edge(e);if(Object.prototype.hasOwnProperty.call(n,"x")){if(n.labelpos==="l"||n.labelpos==="r")n.width-=n.labeloffset;switch(n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}}})}function ia(r){o(r.edges(),function(e){var n=r.edge(e);if(n.reversed)n.points.reverse()})}function aa(r){o(r.nodes(),function(e){if(r.children(e).length){var n=r.node(e),t=r.node(n.borderTop),i=r.node(n.borderBottom),a=r.node(S(n.borderLeft)),f=r.node(S(n.borderRight));n.width=Math.abs(f.x-a.x),n.height=Math.abs(i.y-t.y),n.x=a.x+n.width/2,n.y=t.y+n.height/2}}),o(r.nodes(),function(e){if(r.node(e).dummy==="border")r.removeNode(e)})}function fa(r){o(r.edges(),function(e){if(e.v===e.w){var n=r.node(e.v);if(!n.selfEdges)n.selfEdges=[];n.selfEdges.push({e,label:r.edge(e)}),r.removeEdge(e)}})}function ua(r){var e=N(r);o(e,function(n){var t=0;o(n,function(i,a){var f=r.node(i);f.order=a+t,o(f.selfEdges,function(u){E(r,"selfedge",{width:u.label.width,height:u.label.height,rank:f.rank,order:a+ ++t,e:u.e,label:u.label},"_se")}),delete f.selfEdges})})}function sa(r){o(r.nodes(),function(e){var n=r.node(e);if(n.dummy==="selfedge"){var t=r.node(n.e.v),i=t.x+t.width/2,a=t.y,f=n.x-i,u=t.height/2;r.setEdge(n.e,n.label),r.removeNode(e),n.label.points=[{x:i+2*f/3,y:a-u},{x:i+5*f/6,y:a-u},{x:i+f,y:a},{x:i+5*f/6,y:a+u},{x:i+2*f/3,y:a+u}],n.label.x=n.x,n.label.y=n.y}})}function Sr(r,e){return M(A(r,e),Number)}function Rr(r){var e={};return o(r,function(n,t){e[t.toLowerCase()]=n}),e}
2
+ export{rr};
@@ -1,2 +1,2 @@
1
- import{e}from"./index-1r72hdzb.js";var vt=class{constructor(t){this.init=t,this.records=this.init()}static{e(this,"ImperativeState")}reset(){this.records=this.init()}};
1
+ import{e}from"./index-nwsya6dj.js";var vt=class{constructor(t){this.init=t,this.records=this.init()}static{e(this,"ImperativeState")}reset(){this.records=this.init()}};
2
2
  export{vt};
@@ -1,4 +1,4 @@
1
- import{e}from"./index-1r72hdzb.js";var we=e(()=>`
1
+ import{e}from"./index-nwsya6dj.js";var we=e(()=>`
2
2
  /* Font Awesome icon styling - consolidated */
3
3
  .label-icon {
4
4
  display: inline-block;
@@ -1,2 +1,2 @@
1
- import{He,bt,We,un}from"./index-5tv8v1hk.js";import{Ue}from"./index-hj99nz1f.js";import{Xe,br,Wt,ie,xr}from"./index-1r72hdzb.js";function s(r,n){return r==null||n==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function x(r,n){return r==null||n==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function tr(r){let n,e,t;if(r.length!==2)n=s,e=(f,c)=>s(r(f),c),t=(f,c)=>r(f)-c;else n=r===s||r===x?r:O,e=r,t=r;function o(f,c,i=0,p=f.length){if(i<p){if(n(c,c)!==0)return p;do{let l=i+p>>>1;if(e(f[l],c)<0)i=l+1;else p=l}while(i<p)}return i}function a(f,c,i=0,p=f.length){if(i<p){if(n(c,c)!==0)return p;do{let l=i+p>>>1;if(e(f[l],c)<=0)i=l+1;else p=l}while(i<p)}return i}function u(f,c,i=0,p=f.length){let l=o(f,c,i,p-1);return l>i&&t(f[l-1],c)>-t(f[l],c)?l-1:l}return{left:o,center:u,right:a}}function O(){return 0}function y(r){return r===null?NaN:+r}var V=tr(s),{right:T,left:or}=V,ur=tr(y).center,z=T;var E=Math.sqrt(50),G=Math.sqrt(10),H=Math.sqrt(2);function g(r,n,e){let t=(n-r)/Math.max(0,e),o=Math.floor(Math.log10(t)),a=t/Math.pow(10,o),u=a>=E?10:a>=G?5:a>=H?2:1,f,c,i;if(o<0){if(i=Math.pow(10,-o)/u,f=Math.round(r*i),c=Math.round(n*i),f/i<r)++f;if(c/i>n)--c;i=-i}else{if(i=Math.pow(10,o)*u,f=Math.round(r/i),c=Math.round(n/i),f*i<r)++f;if(c*i>n)--c}if(c<f&&0.5<=e&&e<2)return g(r,n,e*2);return[f,c,i]}function v(r,n,e){if(n=+n,r=+r,e=+e,!(e>0))return[];if(r===n)return[r];let t=n<r,[o,a,u]=t?g(n,r,e):g(r,n,e);if(!(a>=o))return[];let f=a-o+1,c=Array(f);if(t)if(u<0)for(let i=0;i<f;++i)c[i]=(a-i)/-u;else for(let i=0;i<f;++i)c[i]=(a-i)*u;else if(u<0)for(let i=0;i<f;++i)c[i]=(o+i)/-u;else for(let i=0;i<f;++i)c[i]=(o+i)*u;return c}function M(r,n,e){return n=+n,r=+r,e=+e,g(r,n,e)[2]}function Mr(r,n,e){n=+n,r=+r,e=+e;let t=n<r,o=t?M(n,r,e):M(r,n,e);return(t?-1:1)*(o<0?1/-o:o)}function N(r,n){if(!n)n=[];var e=r?Math.min(n.length,r.length):0,t=n.slice(),o;return function(a){for(o=0;o<e;++o)t[o]=r[o]*(1-a)+n[o]*a;return t}}function B(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function P(r,n){var e=n?n.length:0,t=r?Math.min(e,r.length):0,o=Array(t),a=Array(e),u;for(u=0;u<t;++u)o[u]=h(r[u],n[u]);for(;u<e;++u)a[u]=n[u];return function(f){for(u=0;u<t;++u)a[u]=o[u](f);return a}}function w(r,n){var e=new Date;return r=+r,n=+n,function(t){return e.setTime(r*(1-t)+n*t),e}}function k(r,n){var e={},t={},o;if(r===null||typeof r!=="object")r={};if(n===null||typeof n!=="object")n={};for(o in n)if(o in r)e[o]=h(r[o],n[o]);else t[o]=n[o];return function(a){for(o in e)t[o]=e[o](a);return t}}function h(r,n){var e=typeof n,t;return n==null||e==="boolean"?br(n):(e==="number"?ie:e==="string"?(t=Xe(n))?(n=t,Wt):xr:n instanceof Xe?Wt:n instanceof Date?w:B(n)?N:Array.isArray(n)?P:typeof n.valueOf!=="function"&&typeof n.toString!=="function"||isNaN(n)?k:ie)(r,n)}function A(r,n){return r=+r,n=+n,function(e){return Math.round(r*(1-e)+n*e)}}function R(r){return Math.max(0,-He(Math.abs(r)))}function S(r,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(He(n)/3)))*3-He(Math.abs(r)))}function j(r,n){return r=Math.abs(r),n=Math.abs(n)-r,Math.max(0,He(n)-He(r))+1}function F(r){return function(){return r}}function q(r){return+r}var C=[0,1];function d(r){return r}function D(r,n){return(n-=r=+r)?function(e){return(e-r)/n}:F(isNaN(n)?NaN:0.5)}function J(r,n){var e;if(r>n)e=r,r=n,n=e;return function(t){return Math.max(r,Math.min(n,t))}}function K(r,n,e){var t=r[0],o=r[1],a=n[0],u=n[1];if(o<t)t=D(o,t),a=e(u,a);else t=D(t,o),a=e(a,u);return function(f){return a(t(f))}}function Q(r,n,e){var t=Math.min(r.length,n.length)-1,o=Array(t),a=Array(t),u=-1;if(r[t]<r[0])r=r.slice().reverse(),n=n.slice().reverse();while(++u<t)o[u]=D(r[u],r[u+1]),a[u]=e(n[u],n[u+1]);return function(f){var c=z(r,f,1,t)-1;return a[c](o[c](f))}}function cn(r,n){return n.domain(r.domain()).range(r.range()).interpolate(r.interpolate()).clamp(r.clamp()).unknown(r.unknown())}function U(){var r=C,n=C,e=h,t,o,a,u=d,f,c,i;function p(){var m=Math.min(r.length,n.length);if(u!==d)u=J(r[0],r[m-1]);return f=m>2?Q:K,c=i=null,l}function l(m){return m==null||isNaN(m=+m)?a:(c||(c=f(r.map(t),n,e)))(t(u(m)))}return l.invert=function(m){return u(o((i||(i=f(n,r.map(t),ie)))(m)))},l.domain=function(m){return arguments.length?(r=Array.from(m,q),p()):r.slice()},l.range=function(m){return arguments.length?(n=Array.from(m),p()):n.slice()},l.rangeRound=function(m){return n=Array.from(m),e=A,p()},l.clamp=function(m){return arguments.length?(u=m?!0:d,p()):u!==d},l.interpolate=function(m){return arguments.length?(e=m,p()):e},l.unknown=function(m){return arguments.length?(a=m,l):a},function(m,L){return t=m,o=L,p()}}function Nr(){return U()(d,d)}function I(r,n,e,t){var o=Mr(r,n,e),a;switch(t=bt(t==null?",f":t),t.type){case"s":{var u=Math.max(Math.abs(r),Math.abs(n));if(t.precision==null&&!isNaN(a=S(o,u)))t.precision=a;return un(t,u)}case"":case"e":case"g":case"p":case"r":{if(t.precision==null&&!isNaN(a=j(o,Math.max(Math.abs(r),Math.abs(n)))))t.precision=a-(t.type==="e");break}case"f":case"%":{if(t.precision==null&&!isNaN(a=R(o)))t.precision=a-(t.type==="%")*2;break}}return We(t)}function W(r){var n=r.domain;return r.ticks=function(e){var t=n();return v(t[0],t[t.length-1],e==null?10:e)},r.tickFormat=function(e,t){var o=n();return I(o[0],o[o.length-1],e==null?10:e,t)},r.nice=function(e){if(e==null)e=10;var t=n(),o=0,a=t.length-1,u=t[o],f=t[a],c,i,p=10;if(f<u)i=u,u=f,f=i,i=o,o=a,a=i;while(p-- >0){if(i=M(u,f,e),i===c)return t[o]=u,t[a]=f,n(t);else if(i>0)u=Math.floor(u/i)*i,f=Math.ceil(f/i)*i;else if(i<0)u=Math.ceil(u*i)/i,f=Math.floor(f*i)/i;else break;c=i}return r},r}function Oe(){var r=Nr();return r.copy=function(){return cn(r,Oe())},Ue.apply(r,arguments),W(r)}
1
+ import{He,bt,We,un}from"./index-5tv8v1hk.js";import{Ue}from"./index-hj99nz1f.js";import{Xe,br,Wt,ie,xr}from"./index-nwsya6dj.js";function s(r,n){return r==null||n==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function x(r,n){return r==null||n==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function tr(r){let n,e,t;if(r.length!==2)n=s,e=(f,c)=>s(r(f),c),t=(f,c)=>r(f)-c;else n=r===s||r===x?r:O,e=r,t=r;function o(f,c,i=0,p=f.length){if(i<p){if(n(c,c)!==0)return p;do{let l=i+p>>>1;if(e(f[l],c)<0)i=l+1;else p=l}while(i<p)}return i}function a(f,c,i=0,p=f.length){if(i<p){if(n(c,c)!==0)return p;do{let l=i+p>>>1;if(e(f[l],c)<=0)i=l+1;else p=l}while(i<p)}return i}function u(f,c,i=0,p=f.length){let l=o(f,c,i,p-1);return l>i&&t(f[l-1],c)>-t(f[l],c)?l-1:l}return{left:o,center:u,right:a}}function O(){return 0}function y(r){return r===null?NaN:+r}var V=tr(s),{right:T,left:or}=V,ur=tr(y).center,z=T;var E=Math.sqrt(50),G=Math.sqrt(10),H=Math.sqrt(2);function g(r,n,e){let t=(n-r)/Math.max(0,e),o=Math.floor(Math.log10(t)),a=t/Math.pow(10,o),u=a>=E?10:a>=G?5:a>=H?2:1,f,c,i;if(o<0){if(i=Math.pow(10,-o)/u,f=Math.round(r*i),c=Math.round(n*i),f/i<r)++f;if(c/i>n)--c;i=-i}else{if(i=Math.pow(10,o)*u,f=Math.round(r/i),c=Math.round(n/i),f*i<r)++f;if(c*i>n)--c}if(c<f&&0.5<=e&&e<2)return g(r,n,e*2);return[f,c,i]}function v(r,n,e){if(n=+n,r=+r,e=+e,!(e>0))return[];if(r===n)return[r];let t=n<r,[o,a,u]=t?g(n,r,e):g(r,n,e);if(!(a>=o))return[];let f=a-o+1,c=Array(f);if(t)if(u<0)for(let i=0;i<f;++i)c[i]=(a-i)/-u;else for(let i=0;i<f;++i)c[i]=(a-i)*u;else if(u<0)for(let i=0;i<f;++i)c[i]=(o+i)/-u;else for(let i=0;i<f;++i)c[i]=(o+i)*u;return c}function M(r,n,e){return n=+n,r=+r,e=+e,g(r,n,e)[2]}function Mr(r,n,e){n=+n,r=+r,e=+e;let t=n<r,o=t?M(n,r,e):M(r,n,e);return(t?-1:1)*(o<0?1/-o:o)}function N(r,n){if(!n)n=[];var e=r?Math.min(n.length,r.length):0,t=n.slice(),o;return function(a){for(o=0;o<e;++o)t[o]=r[o]*(1-a)+n[o]*a;return t}}function B(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function P(r,n){var e=n?n.length:0,t=r?Math.min(e,r.length):0,o=Array(t),a=Array(e),u;for(u=0;u<t;++u)o[u]=h(r[u],n[u]);for(;u<e;++u)a[u]=n[u];return function(f){for(u=0;u<t;++u)a[u]=o[u](f);return a}}function w(r,n){var e=new Date;return r=+r,n=+n,function(t){return e.setTime(r*(1-t)+n*t),e}}function k(r,n){var e={},t={},o;if(r===null||typeof r!=="object")r={};if(n===null||typeof n!=="object")n={};for(o in n)if(o in r)e[o]=h(r[o],n[o]);else t[o]=n[o];return function(a){for(o in e)t[o]=e[o](a);return t}}function h(r,n){var e=typeof n,t;return n==null||e==="boolean"?br(n):(e==="number"?ie:e==="string"?(t=Xe(n))?(n=t,Wt):xr:n instanceof Xe?Wt:n instanceof Date?w:B(n)?N:Array.isArray(n)?P:typeof n.valueOf!=="function"&&typeof n.toString!=="function"||isNaN(n)?k:ie)(r,n)}function A(r,n){return r=+r,n=+n,function(e){return Math.round(r*(1-e)+n*e)}}function R(r){return Math.max(0,-He(Math.abs(r)))}function S(r,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(He(n)/3)))*3-He(Math.abs(r)))}function j(r,n){return r=Math.abs(r),n=Math.abs(n)-r,Math.max(0,He(n)-He(r))+1}function F(r){return function(){return r}}function q(r){return+r}var C=[0,1];function d(r){return r}function D(r,n){return(n-=r=+r)?function(e){return(e-r)/n}:F(isNaN(n)?NaN:0.5)}function J(r,n){var e;if(r>n)e=r,r=n,n=e;return function(t){return Math.max(r,Math.min(n,t))}}function K(r,n,e){var t=r[0],o=r[1],a=n[0],u=n[1];if(o<t)t=D(o,t),a=e(u,a);else t=D(t,o),a=e(a,u);return function(f){return a(t(f))}}function Q(r,n,e){var t=Math.min(r.length,n.length)-1,o=Array(t),a=Array(t),u=-1;if(r[t]<r[0])r=r.slice().reverse(),n=n.slice().reverse();while(++u<t)o[u]=D(r[u],r[u+1]),a[u]=e(n[u],n[u+1]);return function(f){var c=z(r,f,1,t)-1;return a[c](o[c](f))}}function cn(r,n){return n.domain(r.domain()).range(r.range()).interpolate(r.interpolate()).clamp(r.clamp()).unknown(r.unknown())}function U(){var r=C,n=C,e=h,t,o,a,u=d,f,c,i;function p(){var m=Math.min(r.length,n.length);if(u!==d)u=J(r[0],r[m-1]);return f=m>2?Q:K,c=i=null,l}function l(m){return m==null||isNaN(m=+m)?a:(c||(c=f(r.map(t),n,e)))(t(u(m)))}return l.invert=function(m){return u(o((i||(i=f(n,r.map(t),ie)))(m)))},l.domain=function(m){return arguments.length?(r=Array.from(m,q),p()):r.slice()},l.range=function(m){return arguments.length?(n=Array.from(m),p()):n.slice()},l.rangeRound=function(m){return n=Array.from(m),e=A,p()},l.clamp=function(m){return arguments.length?(u=m?!0:d,p()):u!==d},l.interpolate=function(m){return arguments.length?(e=m,p()):e},l.unknown=function(m){return arguments.length?(a=m,l):a},function(m,L){return t=m,o=L,p()}}function Nr(){return U()(d,d)}function I(r,n,e,t){var o=Mr(r,n,e),a;switch(t=bt(t==null?",f":t),t.type){case"s":{var u=Math.max(Math.abs(r),Math.abs(n));if(t.precision==null&&!isNaN(a=S(o,u)))t.precision=a;return un(t,u)}case"":case"e":case"g":case"p":case"r":{if(t.precision==null&&!isNaN(a=j(o,Math.max(Math.abs(r),Math.abs(n)))))t.precision=a-(t.type==="e");break}case"f":case"%":{if(t.precision==null&&!isNaN(a=R(o)))t.precision=a-(t.type==="%")*2;break}}return We(t)}function W(r){var n=r.domain;return r.ticks=function(e){var t=n();return v(t[0],t[t.length-1],e==null?10:e)},r.tickFormat=function(e,t){var o=n();return I(o[0],o[o.length-1],e==null?10:e,t)},r.nice=function(e){if(e==null)e=10;var t=n(),o=0,a=t.length-1,u=t[o],f=t[a],c,i,p=10;if(f<u)i=u,u=f,f=i,i=o,o=a,a=i;while(p-- >0){if(i=M(u,f,e),i===c)return t[o]=u,t[a]=f,n(t);else if(i>0)u=Math.floor(u/i)*i,f=Math.ceil(f/i)*i;else if(i<0)u=Math.ceil(u*i)/i,f=Math.floor(f*i)/i;else break;c=i}return r},r}function Oe(){var r=Nr();return r.copy=function(){return cn(r,Oe())},Ue.apply(r,arguments),W(r)}
2
2
  export{tr,Mr,cn,Nr,Oe};
@@ -1,2 +1,2 @@
1
- import{e,t}from"./index-1r72hdzb.js";import{B,L}from"./index-fjtdggjn.js";import{Or,O}from"./index-d3b3gqe9.js";var X=4;function A(n){return Or(n,X)}var D=A;function qe(n){var i={options:{directed:n.isDirected(),multigraph:n.isMultigraph(),compound:n.isCompound()},nodes:k(n),edges:J(n)};if(!B(n.graph()))i.value=D(n.graph());return i}function k(n){return O(n.nodes(),function(i){var r=n.node(i),o=n.parent(i),s={v:i};if(!B(r))s.value=r;if(!B(o))s.parent=o;return s})}function J(n){return O(n.edges(),function(i){var r=n.edge(i),o={v:i.v,w:i.w};if(!B(i.name))o.name=i.name;if(!B(r))o.value=r;return o})}var _=new Map,d=new Map,E=new Map,Dr=e(()=>{d.clear(),E.clear(),_.clear()},"clear"),v=e((n,i)=>{let r=d.get(i)||[];return t.trace("In isDescendant",i," ",n," = ",r.includes(n)),r.includes(n)},"isDescendant"),M=e((n,i)=>{let r=d.get(i)||[];if(t.info("Descendants of ",i," is ",r),t.info("Edge is ",n),n.v===i||n.w===i)return!1;if(!r)return t.debug("Tilt, ",i,",not in descendants"),!1;return r.includes(n.v)||v(n.v,i)||v(n.w,i)||r.includes(n.w)},"edgeInCluster"),m=e((n,i,r,o)=>{t.warn("Copying children of ",n,"root",o,"data",i.node(n),o);let s=i.children(n)||[];if(n!==o)s.push(n);t.warn("Copying (nodes) clusterId",n,"nodes",s),s.forEach((a)=>{if(i.children(a).length>0)m(a,i,r,o);else{let l=i.node(a);if(t.info("cp ",a," to ",o," with parent ",n),r.setNode(a,l),o!==i.parent(a))t.warn("Setting parent",a,i.parent(a)),r.setParent(a,i.parent(a));if(n!==o&&a!==n)t.debug("Setting parent",a,n),r.setParent(a,n);else t.info("In copy ",n,"root",o,"data",i.node(n),o),t.debug("Not Setting parent for node=",a,"cluster!==rootId",n!==o,"node!==clusterId",a!==n);let u=i.edges(a);t.debug("Copying Edges",u),u.forEach((c)=>{t.info("Edge",c);let f=i.edge(c.v,c.w,c.name);t.info("Edge data",f,o);try{if(M(c,o)){let w=d.get(o)||[],g=w.includes(c.v)||v(c.v,o)||c.v===o,C=w.includes(c.w)||v(c.w,o)||c.w===o;if(g&&C)t.info("Copying as ",c.v,c.w,f,c.name),r.setEdge(c.v,c.w,f,c.name),t.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]));else{let b=g?o:c.v,h=C?o:c.w;t.info("Rebinding cross-boundary edge as ",b,h,f,c.name),i.setEdge(b,h,f,c.name)}}else t.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",o," clusterId:",n)}catch(w){t.error(w)}})}t.debug("Removing node",a),i.removeNode(a)})},"copy"),N=e((n,i)=>{let r=i.children(n),o=[...r];for(let s of r)E.set(s,n),o=[...o,...N(s,i)];return o},"extractDescendants"),P=e((n,i,r)=>{let o=n.edges().filter((c)=>c.v===i||c.w===i),s=n.edges().filter((c)=>c.v===r||c.w===r),a=o.map((c)=>({v:c.v===i?r:c.v,w:c.w===i?i:c.w})),l=s.map((c)=>({v:c.v,w:c.w}));return a.filter((c)=>l.some((f)=>c.v===f.v&&c.w===f.w))},"findCommonEdges"),zt=e((n,i,r)=>{let o=i.children(n);if(t.trace("Searching children of id ",n,o),o.length<1)return n;let s;for(let a of o){let l=zt(a,i,r),u=P(i,r,l);if(l)if(u.length>0)s=l;else return l}return s},"findNonClusterChild"),x=e((n)=>{if(!_.has(n))return n;if(!_.get(n).externalConnections)return n;if(_.has(n))return _.get(n).id;return n},"getAnchorId"),Ii=e((n,i)=>{if(!n||i>10){t.debug("Opting out, no graph ");return}else t.debug("Opting in, graph ");n.nodes().forEach(function(r){if(n.children(r).length>0)t.warn("Cluster identified",r," Replacement id in edges: ",zt(r,n,r)),d.set(r,N(r,n)),_.set(r,{id:zt(r,n,r),clusterData:n.node(r)})}),n.nodes().forEach(function(r){let o=n.children(r),s=n.edges();if(o.length>0)t.debug("Cluster identified",r,d),s.forEach((a)=>{let l=v(a.v,r),u=v(a.w,r);if(l^u)t.warn("Edge: ",a," leaves cluster ",r),t.warn("Descendants of XXX ",r,": ",d.get(r)),_.get(r).externalConnections=!0});else t.debug("Not a cluster ",r,d)});for(let r of _.keys()){let o=_.get(r).id,s=n.parent(o);if(s!==r&&_.has(s)&&!_.get(s).externalConnections)_.get(r).id=s;let a=n.edges().some((l)=>l.v===r);if(o&&_.get(r)?.externalConnections&&a&&S(n,o,r)){let l=R(n,r,n.parent(o));if(l)_.get(r).id=l}}n.edges().forEach(function(r){let o=n.edge(r);t.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),t.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(n.edge(r)));let{v:s,w:a}=r;if(t.warn("Fix XXX",_,"ids:",r.v,r.w,"Translating: ",_.get(r.v)," --- ",_.get(r.w)),_.get(r.v)||_.get(r.w)){if(t.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),s=x(r.v),a=x(r.w),n.removeEdge(r.v,r.w,r.name),s!==r.v){let l=n.parent(s);_.get(l).externalConnections=!0,o.fromCluster=r.v}if(a!==r.w){let l=n.parent(a);_.get(l).externalConnections=!0,o.toCluster=r.w}t.warn("Fix Replacing with XXX",s,a,r.name),n.setEdge(s,a,o,r.name)}}),t.warn("Adjusted Graph",qe(n)),p(n,0),t.trace(_)},"adjustClustersAndEdges"),p=e((n,i)=>{if(t.warn("extractor - ",i,qe(n),n.children("D")),i>10){t.error("Bailing out");return}let r=n.nodes(),o=!1;for(let s of r){let a=n.children(s);o=o||a.length>0}if(!o){t.debug("Done, no node has children",n.nodes());return}t.debug("Nodes = ",r,i);for(let s of r)if(t.debug("Extracting node",s,_,_.has(s)&&!_.get(s).externalConnections,!n.parent(s),n.node(s),n.children("D")," Depth ",i),!_.has(s))t.debug("Not a cluster",s,i);else if(_.get(s)?.clusterData?.explicitDir&&n.children(s)&&n.children(s).length>0){t.warn("Cluster with explicit dir, creating subgraph for children",s,i);let a=_.get(s).clusterData.dir,l=new L({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});m(s,n,l,s);let u=n.node(s)||{};n.setNode(s,{...u,clusterNode:!0,id:s,clusterData:_.get(s).clusterData,label:_.get(s).label,graph:l}),t.warn("Subgraph for cluster with explicit dir created:",s,qe(l))}else if(!_.get(s).externalConnections&&n.children(s)&&n.children(s).length>0){t.warn("Cluster without external connections, without a parent and with children",s,i);let l=n.graph().rankdir==="TB"?"LR":"TB";if(_.get(s)?.clusterData?.dir)l=_.get(s).clusterData.dir,t.warn("Fixing dir",_.get(s).clusterData.dir,l);let u=new L({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});m(s,n,u,s);let c=n.node(s)||{};n.setNode(s,{...c,clusterNode:!0,id:s,clusterData:_.get(s).clusterData,label:_.get(s).label,graph:u}),t.debug("Old graph after copy",qe(n))}else t.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!_.get(s).externalConnections," no parent: ",!n.parent(s)," children ",n.children(s)&&n.children(s).length>0,n.children("D"),i),t.debug(_);r=n.nodes(),t.warn("New list of nodes",r);for(let s of r){let a=n.node(s);if(t.warn(" Now next level",s,a),a?.clusterNode)p(a.graph,i+1)}},"extractor"),y=e((n,i)=>{if(i.length===0)return[];let r=Object.assign([],i);return i.forEach((o)=>{let s=n.children(o),a=y(n,s);r=[...r,...a]}),r},"sorter"),Li=e((n)=>y(n,n.children()),"sortNodesByHierarchy"),S=e((n,i,r)=>{let o=n.parent(i);while(o&&o!==r){let s=_.get(o);if(s&&!s.externalConnections)return!0;o=n.parent(o)}return!1},"isNodeInExtractableCluster"),R=e((n,i,r)=>{let o=n.children(i)??[];for(let s of o){if(s===r||v(s,r))continue;let a=zt(s,n,i);if(!a)continue;if(!S(n,a,i))return a}return null},"findSafeAnchorNode");
1
+ import{e,t}from"./index-nwsya6dj.js";import{B,L}from"./index-mergmj97.js";import{Or,O}from"./index-qhfrazv3.js";var X=4;function A(n){return Or(n,X)}var D=A;function qe(n){var i={options:{directed:n.isDirected(),multigraph:n.isMultigraph(),compound:n.isCompound()},nodes:k(n),edges:J(n)};if(!B(n.graph()))i.value=D(n.graph());return i}function k(n){return O(n.nodes(),function(i){var r=n.node(i),o=n.parent(i),s={v:i};if(!B(r))s.value=r;if(!B(o))s.parent=o;return s})}function J(n){return O(n.edges(),function(i){var r=n.edge(i),o={v:i.v,w:i.w};if(!B(i.name))o.name=i.name;if(!B(r))o.value=r;return o})}var _=new Map,d=new Map,E=new Map,Dr=e(()=>{d.clear(),E.clear(),_.clear()},"clear"),v=e((n,i)=>{let r=d.get(i)||[];return t.trace("In isDescendant",i," ",n," = ",r.includes(n)),r.includes(n)},"isDescendant"),M=e((n,i)=>{let r=d.get(i)||[];if(t.info("Descendants of ",i," is ",r),t.info("Edge is ",n),n.v===i||n.w===i)return!1;if(!r)return t.debug("Tilt, ",i,",not in descendants"),!1;return r.includes(n.v)||v(n.v,i)||v(n.w,i)||r.includes(n.w)},"edgeInCluster"),m=e((n,i,r,o)=>{t.warn("Copying children of ",n,"root",o,"data",i.node(n),o);let s=i.children(n)||[];if(n!==o)s.push(n);t.warn("Copying (nodes) clusterId",n,"nodes",s),s.forEach((a)=>{if(i.children(a).length>0)m(a,i,r,o);else{let l=i.node(a);if(t.info("cp ",a," to ",o," with parent ",n),r.setNode(a,l),o!==i.parent(a))t.warn("Setting parent",a,i.parent(a)),r.setParent(a,i.parent(a));if(n!==o&&a!==n)t.debug("Setting parent",a,n),r.setParent(a,n);else t.info("In copy ",n,"root",o,"data",i.node(n),o),t.debug("Not Setting parent for node=",a,"cluster!==rootId",n!==o,"node!==clusterId",a!==n);let u=i.edges(a);t.debug("Copying Edges",u),u.forEach((c)=>{t.info("Edge",c);let f=i.edge(c.v,c.w,c.name);t.info("Edge data",f,o);try{if(M(c,o)){let w=d.get(o)||[],g=w.includes(c.v)||v(c.v,o)||c.v===o,C=w.includes(c.w)||v(c.w,o)||c.w===o;if(g&&C)t.info("Copying as ",c.v,c.w,f,c.name),r.setEdge(c.v,c.w,f,c.name),t.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]));else{let b=g?o:c.v,h=C?o:c.w;t.info("Rebinding cross-boundary edge as ",b,h,f,c.name),i.setEdge(b,h,f,c.name)}}else t.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",o," clusterId:",n)}catch(w){t.error(w)}})}t.debug("Removing node",a),i.removeNode(a)})},"copy"),N=e((n,i)=>{let r=i.children(n),o=[...r];for(let s of r)E.set(s,n),o=[...o,...N(s,i)];return o},"extractDescendants"),P=e((n,i,r)=>{let o=n.edges().filter((c)=>c.v===i||c.w===i),s=n.edges().filter((c)=>c.v===r||c.w===r),a=o.map((c)=>({v:c.v===i?r:c.v,w:c.w===i?i:c.w})),l=s.map((c)=>({v:c.v,w:c.w}));return a.filter((c)=>l.some((f)=>c.v===f.v&&c.w===f.w))},"findCommonEdges"),zt=e((n,i,r)=>{let o=i.children(n);if(t.trace("Searching children of id ",n,o),o.length<1)return n;let s;for(let a of o){let l=zt(a,i,r),u=P(i,r,l);if(l)if(u.length>0)s=l;else return l}return s},"findNonClusterChild"),x=e((n)=>{if(!_.has(n))return n;if(!_.get(n).externalConnections)return n;if(_.has(n))return _.get(n).id;return n},"getAnchorId"),Ii=e((n,i)=>{if(!n||i>10){t.debug("Opting out, no graph ");return}else t.debug("Opting in, graph ");n.nodes().forEach(function(r){if(n.children(r).length>0)t.warn("Cluster identified",r," Replacement id in edges: ",zt(r,n,r)),d.set(r,N(r,n)),_.set(r,{id:zt(r,n,r),clusterData:n.node(r)})}),n.nodes().forEach(function(r){let o=n.children(r),s=n.edges();if(o.length>0)t.debug("Cluster identified",r,d),s.forEach((a)=>{let l=v(a.v,r),u=v(a.w,r);if(l^u)t.warn("Edge: ",a," leaves cluster ",r),t.warn("Descendants of XXX ",r,": ",d.get(r)),_.get(r).externalConnections=!0});else t.debug("Not a cluster ",r,d)});for(let r of _.keys()){let o=_.get(r).id,s=n.parent(o);if(s!==r&&_.has(s)&&!_.get(s).externalConnections)_.get(r).id=s;let a=n.edges().some((l)=>l.v===r);if(o&&_.get(r)?.externalConnections&&a&&S(n,o,r)){let l=R(n,r,n.parent(o));if(l)_.get(r).id=l}}n.edges().forEach(function(r){let o=n.edge(r);t.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),t.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(n.edge(r)));let{v:s,w:a}=r;if(t.warn("Fix XXX",_,"ids:",r.v,r.w,"Translating: ",_.get(r.v)," --- ",_.get(r.w)),_.get(r.v)||_.get(r.w)){if(t.warn("Fixing and trying - removing XXX",r.v,r.w,r.name),s=x(r.v),a=x(r.w),n.removeEdge(r.v,r.w,r.name),s!==r.v){let l=n.parent(s);_.get(l).externalConnections=!0,o.fromCluster=r.v}if(a!==r.w){let l=n.parent(a);_.get(l).externalConnections=!0,o.toCluster=r.w}t.warn("Fix Replacing with XXX",s,a,r.name),n.setEdge(s,a,o,r.name)}}),t.warn("Adjusted Graph",qe(n)),p(n,0),t.trace(_)},"adjustClustersAndEdges"),p=e((n,i)=>{if(t.warn("extractor - ",i,qe(n),n.children("D")),i>10){t.error("Bailing out");return}let r=n.nodes(),o=!1;for(let s of r){let a=n.children(s);o=o||a.length>0}if(!o){t.debug("Done, no node has children",n.nodes());return}t.debug("Nodes = ",r,i);for(let s of r)if(t.debug("Extracting node",s,_,_.has(s)&&!_.get(s).externalConnections,!n.parent(s),n.node(s),n.children("D")," Depth ",i),!_.has(s))t.debug("Not a cluster",s,i);else if(_.get(s)?.clusterData?.explicitDir&&n.children(s)&&n.children(s).length>0){t.warn("Cluster with explicit dir, creating subgraph for children",s,i);let a=_.get(s).clusterData.dir,l=new L({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});m(s,n,l,s);let u=n.node(s)||{};n.setNode(s,{...u,clusterNode:!0,id:s,clusterData:_.get(s).clusterData,label:_.get(s).label,graph:l}),t.warn("Subgraph for cluster with explicit dir created:",s,qe(l))}else if(!_.get(s).externalConnections&&n.children(s)&&n.children(s).length>0){t.warn("Cluster without external connections, without a parent and with children",s,i);let l=n.graph().rankdir==="TB"?"LR":"TB";if(_.get(s)?.clusterData?.dir)l=_.get(s).clusterData.dir,t.warn("Fixing dir",_.get(s).clusterData.dir,l);let u=new L({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});m(s,n,u,s);let c=n.node(s)||{};n.setNode(s,{...c,clusterNode:!0,id:s,clusterData:_.get(s).clusterData,label:_.get(s).label,graph:u}),t.debug("Old graph after copy",qe(n))}else t.warn("Cluster ** ",s," **not meeting the criteria !externalConnections:",!_.get(s).externalConnections," no parent: ",!n.parent(s)," children ",n.children(s)&&n.children(s).length>0,n.children("D"),i),t.debug(_);r=n.nodes(),t.warn("New list of nodes",r);for(let s of r){let a=n.node(s);if(t.warn(" Now next level",s,a),a?.clusterNode)p(a.graph,i+1)}},"extractor"),y=e((n,i)=>{if(i.length===0)return[];let r=Object.assign([],i);return i.forEach((o)=>{let s=n.children(o),a=y(n,s);r=[...r,...a]}),r},"sorter"),Li=e((n)=>y(n,n.children()),"sortNodesByHierarchy"),S=e((n,i,r)=>{let o=n.parent(i);while(o&&o!==r){let s=_.get(o);if(s&&!s.externalConnections)return!0;o=n.parent(o)}return!1},"isNodeInExtractableCluster"),R=e((n,i,r)=>{let o=n.children(i)??[];for(let s of o){if(s===r||v(s,r))continue;let a=zt(s,n,i);if(!a)continue;if(!S(n,a,i))return a}return null},"findSafeAnchorNode");
2
2
  export{qe,_,Dr,zt,Ii,Li};
@@ -1,2 +1,2 @@
1
- import{z,xi,ue,Dt,zi,On,Ke,Ut,ae,wr,qr,qt,Gi,wi,$n}from"./index-1r72hdzb.js";function k(l){return l.innerRadius}function b(l){return l.outerRadius}function _(l){return l.startAngle}function nn(l){return l.endAngle}function en(l){return l&&l.padAngle}function rn(l,d,q,P,x,h,S,r){var D=q-l,a=P-d,n=S-x,y=r-h,u=y*D-n*a;if(u*u<ae)return;return u=(n*(d-h)-y*(l-x))/u,[l+u*D,d+u*a]}function M(l,d,q,P,x,h,S){var r=l-q,D=d-P,a=(S?h:-h)/Ut(r*r+D*D),n=a*D,y=-a*r,u=l+n,s=d+y,t=q+n,f=P+y,j=(u+t)/2,o=(s+f)/2,g=t-u,c=f-s,v=g*g+c*c,A=x-h,R=u*f-t*s,E=(c<0?-1:1)*Ut(zi(0,A*A*v-R*R)),I=(R*c-g*E)/v,O=(-R*g-c*E)/v,T=(R*c+g*E)/v,m=(-R*g+c*E)/v,p=I-j,e=O-o,i=T-j,B=m-o;if(p*p+e*e>i*i+B*B)I=T,O=m;return{cx:I,cy:O,x01:-n,y01:-y,x11:I*(x/A-1),y11:O*(x/A-1)}}function De(){var l=k,d=b,q=z(0),P=null,x=_,h=nn,S=en,r=null,D=$n(a);function a(){var n,y,u=+l.apply(this,arguments),s=+d.apply(this,arguments),t=x.apply(this,arguments)-qr,f=h.apply(this,arguments)-qr,j=xi(f-t),o=f>t;if(!r)r=n=D();if(s<u)y=s,s=u,u=y;if(!(s>ae))r.moveTo(0,0);else if(j>qt-ae){if(r.moveTo(s*Dt(t),s*Ke(t)),r.arc(0,0,s,t,f,!o),u>ae)r.moveTo(u*Dt(f),u*Ke(f)),r.arc(0,0,u,f,t,o)}else{var g=t,c=f,v=t,A=f,R=j,E=j,I=S.apply(this,arguments)/2,O=I>ae&&(P?+P.apply(this,arguments):Ut(u*u+s*s)),T=On(xi(s-u)/2,+q.apply(this,arguments)),m=T,p=T,e,i;if(O>ae){var B=wi(O/u*Ke(I)),G=wi(O/s*Ke(I));if((R-=B*2)>ae)B*=o?1:-1,v+=B,A-=B;else R=0,v=A=(t+f)/2;if((E-=G*2)>ae)G*=o?1:-1,g+=G,c-=G;else E=0,g=c=(t+f)/2}var C=s*Dt(g),F=s*Ke(g),H=u*Dt(A),J=u*Ke(A);if(T>ae){var K=s*Dt(c),L=s*Ke(c),N=u*Dt(v),Q=u*Ke(v),w;if(j<wr)if(w=rn(C,F,N,Q,K,L,H,J)){var U=C-w[0],V=F-w[1],W=K-w[0],X=L-w[1],Y=1/Ke(Gi((U*W+V*X)/(Ut(U*U+V*V)*Ut(W*W+X*X)))/2),Z=Ut(w[0]*w[0]+w[1]*w[1]);m=On(T,(u-Z)/(Y-1)),p=On(T,(s-Z)/(Y+1))}else m=p=0}if(!(E>ae))r.moveTo(C,F);else if(p>ae)if(e=M(N,Q,C,F,s,p,o),i=M(K,L,H,J,s,p,o),r.moveTo(e.cx+e.x01,e.cy+e.y01),p<T)r.arc(e.cx,e.cy,p,ue(e.y01,e.x01),ue(i.y01,i.x01),!o);else r.arc(e.cx,e.cy,p,ue(e.y01,e.x01),ue(e.y11,e.x11),!o),r.arc(0,0,s,ue(e.cy+e.y11,e.cx+e.x11),ue(i.cy+i.y11,i.cx+i.x11),!o),r.arc(i.cx,i.cy,p,ue(i.y11,i.x11),ue(i.y01,i.x01),!o);else r.moveTo(C,F),r.arc(0,0,s,g,c,!o);if(!(u>ae)||!(R>ae))r.lineTo(H,J);else if(m>ae)if(e=M(H,J,K,L,u,-m,o),i=M(C,F,N,Q,u,-m,o),r.lineTo(e.cx+e.x01,e.cy+e.y01),m<T)r.arc(e.cx,e.cy,m,ue(e.y01,e.x01),ue(i.y01,i.x01),!o);else r.arc(e.cx,e.cy,m,ue(e.y01,e.x01),ue(e.y11,e.x11),!o),r.arc(0,0,u,ue(e.cy+e.y11,e.cx+e.x11),ue(i.cy+i.y11,i.cx+i.x11),o),r.arc(i.cx,i.cy,m,ue(i.y11,i.x11),ue(i.y01,i.x01),!o);else r.arc(0,0,u,A,v,o)}if(r.closePath(),n)return r=null,n+""||null}return a.centroid=function(){var n=(+l.apply(this,arguments)+ +d.apply(this,arguments))/2,y=(+x.apply(this,arguments)+ +h.apply(this,arguments))/2-wr/2;return[Dt(y)*n,Ke(y)*n]},a.innerRadius=function(n){return arguments.length?(l=typeof n==="function"?n:z(+n),a):l},a.outerRadius=function(n){return arguments.length?(d=typeof n==="function"?n:z(+n),a):d},a.cornerRadius=function(n){return arguments.length?(q=typeof n==="function"?n:z(+n),a):q},a.padRadius=function(n){return arguments.length?(P=n==null?null:typeof n==="function"?n:z(+n),a):P},a.startAngle=function(n){return arguments.length?(x=typeof n==="function"?n:z(+n),a):x},a.endAngle=function(n){return arguments.length?(h=typeof n==="function"?n:z(+n),a):h},a.padAngle=function(n){return arguments.length?(S=typeof n==="function"?n:z(+n),a):S},a.context=function(n){return arguments.length?(r=n==null?null:n,a):r},a}
1
+ import{z,xi,ue,Dt,zi,On,Ke,Ut,ae,wr,qr,qt,Gi,wi,$n}from"./index-nwsya6dj.js";function k(l){return l.innerRadius}function b(l){return l.outerRadius}function _(l){return l.startAngle}function nn(l){return l.endAngle}function en(l){return l&&l.padAngle}function rn(l,d,q,P,x,h,S,r){var D=q-l,a=P-d,n=S-x,y=r-h,u=y*D-n*a;if(u*u<ae)return;return u=(n*(d-h)-y*(l-x))/u,[l+u*D,d+u*a]}function M(l,d,q,P,x,h,S){var r=l-q,D=d-P,a=(S?h:-h)/Ut(r*r+D*D),n=a*D,y=-a*r,u=l+n,s=d+y,t=q+n,f=P+y,j=(u+t)/2,o=(s+f)/2,g=t-u,c=f-s,v=g*g+c*c,A=x-h,R=u*f-t*s,E=(c<0?-1:1)*Ut(zi(0,A*A*v-R*R)),I=(R*c-g*E)/v,O=(-R*g-c*E)/v,T=(R*c+g*E)/v,m=(-R*g+c*E)/v,p=I-j,e=O-o,i=T-j,B=m-o;if(p*p+e*e>i*i+B*B)I=T,O=m;return{cx:I,cy:O,x01:-n,y01:-y,x11:I*(x/A-1),y11:O*(x/A-1)}}function De(){var l=k,d=b,q=z(0),P=null,x=_,h=nn,S=en,r=null,D=$n(a);function a(){var n,y,u=+l.apply(this,arguments),s=+d.apply(this,arguments),t=x.apply(this,arguments)-qr,f=h.apply(this,arguments)-qr,j=xi(f-t),o=f>t;if(!r)r=n=D();if(s<u)y=s,s=u,u=y;if(!(s>ae))r.moveTo(0,0);else if(j>qt-ae){if(r.moveTo(s*Dt(t),s*Ke(t)),r.arc(0,0,s,t,f,!o),u>ae)r.moveTo(u*Dt(f),u*Ke(f)),r.arc(0,0,u,f,t,o)}else{var g=t,c=f,v=t,A=f,R=j,E=j,I=S.apply(this,arguments)/2,O=I>ae&&(P?+P.apply(this,arguments):Ut(u*u+s*s)),T=On(xi(s-u)/2,+q.apply(this,arguments)),m=T,p=T,e,i;if(O>ae){var B=wi(O/u*Ke(I)),G=wi(O/s*Ke(I));if((R-=B*2)>ae)B*=o?1:-1,v+=B,A-=B;else R=0,v=A=(t+f)/2;if((E-=G*2)>ae)G*=o?1:-1,g+=G,c-=G;else E=0,g=c=(t+f)/2}var C=s*Dt(g),F=s*Ke(g),H=u*Dt(A),J=u*Ke(A);if(T>ae){var K=s*Dt(c),L=s*Ke(c),N=u*Dt(v),Q=u*Ke(v),w;if(j<wr)if(w=rn(C,F,N,Q,K,L,H,J)){var U=C-w[0],V=F-w[1],W=K-w[0],X=L-w[1],Y=1/Ke(Gi((U*W+V*X)/(Ut(U*U+V*V)*Ut(W*W+X*X)))/2),Z=Ut(w[0]*w[0]+w[1]*w[1]);m=On(T,(u-Z)/(Y-1)),p=On(T,(s-Z)/(Y+1))}else m=p=0}if(!(E>ae))r.moveTo(C,F);else if(p>ae)if(e=M(N,Q,C,F,s,p,o),i=M(K,L,H,J,s,p,o),r.moveTo(e.cx+e.x01,e.cy+e.y01),p<T)r.arc(e.cx,e.cy,p,ue(e.y01,e.x01),ue(i.y01,i.x01),!o);else r.arc(e.cx,e.cy,p,ue(e.y01,e.x01),ue(e.y11,e.x11),!o),r.arc(0,0,s,ue(e.cy+e.y11,e.cx+e.x11),ue(i.cy+i.y11,i.cx+i.x11),!o),r.arc(i.cx,i.cy,p,ue(i.y11,i.x11),ue(i.y01,i.x01),!o);else r.moveTo(C,F),r.arc(0,0,s,g,c,!o);if(!(u>ae)||!(R>ae))r.lineTo(H,J);else if(m>ae)if(e=M(H,J,K,L,u,-m,o),i=M(C,F,N,Q,u,-m,o),r.lineTo(e.cx+e.x01,e.cy+e.y01),m<T)r.arc(e.cx,e.cy,m,ue(e.y01,e.x01),ue(i.y01,i.x01),!o);else r.arc(e.cx,e.cy,m,ue(e.y01,e.x01),ue(e.y11,e.x11),!o),r.arc(0,0,u,ue(e.cy+e.y11,e.cx+e.x11),ue(i.cy+i.y11,i.cx+i.x11),o),r.arc(i.cx,i.cy,m,ue(i.y11,i.x11),ue(i.y01,i.x01),!o);else r.arc(0,0,u,A,v,o)}if(r.closePath(),n)return r=null,n+""||null}return a.centroid=function(){var n=(+l.apply(this,arguments)+ +d.apply(this,arguments))/2,y=(+x.apply(this,arguments)+ +h.apply(this,arguments))/2-wr/2;return[Dt(y)*n,Ke(y)*n]},a.innerRadius=function(n){return arguments.length?(l=typeof n==="function"?n:z(+n),a):l},a.outerRadius=function(n){return arguments.length?(d=typeof n==="function"?n:z(+n),a):d},a.cornerRadius=function(n){return arguments.length?(q=typeof n==="function"?n:z(+n),a):q},a.padRadius=function(n){return arguments.length?(P=n==null?null:typeof n==="function"?n:z(+n),a):P},a.startAngle=function(n){return arguments.length?(x=typeof n==="function"?n:z(+n),a):x},a.endAngle=function(n){return arguments.length?(h=typeof n==="function"?n:z(+n),a):h},a.padAngle=function(n){return arguments.length?(S=typeof n==="function"?n:z(+n),a):S},a.context=function(n){return arguments.length?(r=n==null?null:n,a):r},a}
2
2
  export{De};
@@ -0,0 +1,2 @@
1
+ import{S,te}from"./index-nwsya6dj.js";var n=(r,o)=>S.lang.round(te.parse(r)[o]),Rt=n;
2
+ export{Rt};
@@ -1,2 +1,2 @@
1
- import{e,n}from"./index-1r72hdzb.js";var le=e((o,t)=>{let m;if(t==="sandbox")m=n("#i"+o);return(t==="sandbox"?n(m.nodes()[0].contentDocument.body):n("body")).select(`[id="${o}"]`)},"getDiagramElement");
1
+ import{e,n}from"./index-nwsya6dj.js";var le=e((o,t)=>{let m;if(t==="sandbox")m=n("#i"+o);return(t==="sandbox"?n(m.nodes()[0].contentDocument.body):n("body")).select(`[id="${o}"]`)},"getDiagramElement");
2
2
  export{le};