@kabmo-labs/kabmo 0.58.0 → 0.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (431) hide show
  1. package/dist/client/index.html +1 -1
  2. package/dist/client/index.js +520 -489
  3. package/dist/client/static/js/{Body-karkrzkc.js → Body-jqq4654r.js} +3 -3
  4. package/dist/client/static/js/{CsvGrid-j03knmbe.js → CsvGrid-avw0taqb.js} +2 -2
  5. package/dist/client/static/js/{DocxView-e8408vzs.js → DocxView-d221vr6g.js} +3 -3
  6. package/dist/client/static/js/{DrawioView-fj4mfzch.js → DrawioView-gjsy7p01.js} +2 -2
  7. package/dist/client/static/js/{HtmlPreview-9g8xwzgw.js → HtmlPreview-949393v1.js} +1 -1
  8. package/dist/client/static/js/ImageView-pan9pqtm.js +1 -0
  9. package/dist/client/static/js/LayoutWrapper-p0qmghgt.js +2 -0
  10. package/dist/client/static/js/MergeDiffView-swt467g7.js +1 -0
  11. package/dist/client/static/js/Modal-4spmcn44.js +60 -0
  12. package/dist/client/static/js/{PdfView-8jtdx5hd.js → PdfView-dzj2s6rj.js} +1 -1
  13. package/dist/client/static/js/SessionsView-b6szjdg5.js +1 -0
  14. package/dist/client/static/js/{SheetView-hwx8s864.js → SheetView-jpc178g5.js} +11 -11
  15. package/dist/client/static/js/{SvgPreview-ete36nzv.js → SvgPreview-94fap32p.js} +1 -1
  16. package/dist/client/static/js/{abnfDiagram-O67JEVCF-7nsqzz6z.js → abnfDiagram-O67JEVCF-a6eyfzrj.js} +1 -1
  17. package/dist/client/static/js/architecture-7GRP2DOG-bwn1drdz.js +1 -0
  18. package/dist/client/static/js/{architectureDiagram-NJMV4G6O-xvpkfq2f.js → architectureDiagram-NJMV4G6O-pgmyfncy.js} +3 -3
  19. package/dist/client/static/js/{astro-rsrqgjjx.js → astro-ryr2ajmg.js} +1 -1
  20. package/dist/client/static/js/bash-zknkkwkw.js +1 -0
  21. package/dist/client/static/js/{blockDiagram-BEXU5L5S-0saahcs6.js → blockDiagram-BEXU5L5S-rf51jyb2.js} +6 -6
  22. package/dist/client/static/js/c-0w02jkxb.js +1 -0
  23. package/dist/client/static/js/{c4Diagram-YGBWAQC7-ktpqnb4a.js → c4Diagram-YGBWAQC7-0faj48jp.js} +2 -2
  24. package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-x67cz3ms.js → classDiagram-v2-NBCMYWYE-bvzsws8x.js} +6 -6
  25. package/dist/client/static/js/{cose-bilkent-JH36ORCC-9wzmhkz8.js → cose-bilkent-JH36ORCC-j1amnd3m.js} +1 -1
  26. package/dist/client/static/js/cpp-p5b4vean.js +1 -0
  27. package/dist/client/static/js/css-9jzbvdyz.js +1 -0
  28. package/dist/client/static/js/css-sn00sq6v.js +1 -0
  29. package/dist/client/static/js/cynefin-OW5HDTMX-jbc50ks8.js +1 -0
  30. package/dist/client/static/js/{cynefinDiagram-VND7K2PF-dmmgmv99.js → cynefinDiagram-VND7K2PF-f73w6zzz.js} +2 -2
  31. package/dist/client/static/js/{dagre-6A5THRUB-ygkkms1t.js → dagre-6A5THRUB-a5vgvjsg.js} +2 -2
  32. package/dist/client/static/js/{diagram-22UHCM2B-qxj0pqb4.js → diagram-22UHCM2B-6y9efamp.js} +12 -12
  33. package/dist/client/static/js/{diagram-3UASUU5V-77k8w5dt.js → diagram-3UASUU5V-2mycy7xm.js} +2 -2
  34. package/dist/client/static/js/{diagram-ATOU4E4O-m0h86vf4.js → diagram-ATOU4E4O-10zgjb66.js} +3 -3
  35. package/dist/client/static/js/{diagram-CDSNMT55-5v28kaeg.js → diagram-CDSNMT55-bewa52yf.js} +4 -4
  36. package/dist/client/static/js/{diagram-MLGK6HIB-zgcg9gaz.js → diagram-MLGK6HIB-mh3b7gd3.js} +1 -1
  37. package/dist/client/static/js/{diagram-MPIPVDR6-10c9s6e6.js → diagram-MPIPVDR6-gvdrbdm5.js} +2 -2
  38. package/dist/client/static/js/{dockerfile-dr9sdsqp.js → dockerfile-6bn19kg0.js} +1 -1
  39. package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-mz4022dz.js → ebnfDiagram-ZINNZB2B-2prre93c.js} +1 -1
  40. package/dist/client/static/js/{elixir-3dy25ex8.js → elixir-fyxw6d70.js} +1 -1
  41. package/dist/client/static/js/{elk-276RUBZZ-ccerbsag.js → elk-276RUBZZ-9t6t9kc6.js} +2 -2
  42. package/dist/client/static/js/{erDiagram-OPXOYQCR-a8vjyrrw.js → erDiagram-OPXOYQCR-etcggr5n.js} +6 -6
  43. package/dist/client/static/js/{erlang-v7344938.js → erlang-97ayje6m.js} +1 -1
  44. package/dist/client/static/js/eventmodeling-NTZA5JFV-b37ey01t.js +1 -0
  45. package/dist/client/static/js/flowDiagram-KWPJA3E3-7c2ncsw7.js +1 -0
  46. package/dist/client/static/js/{ganttDiagram-FUAMR5RP-sz1g29fp.js → ganttDiagram-FUAMR5RP-cdc4mwhs.js} +3 -3
  47. package/dist/client/static/js/gitGraph-4MIJSDKK-mvqq7tcs.js +1 -0
  48. package/dist/client/static/js/{gitGraphDiagram-X574FWY7-efqk42q0.js → gitGraphDiagram-X574FWY7-55d0fa7x.js} +8 -8
  49. package/dist/client/static/js/graphql-xzykn0ba.js +1 -0
  50. package/dist/client/static/js/html-2zc3shky.js +1 -0
  51. package/dist/client/static/js/{index-mpyd7qxj.js → index-10vzyga1.js} +2 -2
  52. package/dist/client/static/js/{index-2f6psebk.js → index-27gwghmp.js} +2 -2
  53. package/dist/client/static/js/{index-t71k3b28.js → index-2f6afhze.js} +2 -2
  54. package/dist/client/static/js/{index-tnxp90ac.js → index-3akjcs82.js} +1 -1
  55. package/dist/client/static/js/{index-fhtnvqgf.js → index-3j2he86h.js} +2 -2
  56. package/dist/client/static/js/index-461ga40v.js +2 -0
  57. package/dist/client/static/js/{index-9qf2h9jb.js → index-51rbgeh9.js} +12 -12
  58. package/dist/client/static/js/{index-zh550byg.js → index-537m8a3x.js} +2 -2
  59. package/dist/client/static/js/{index-tdg7hz80.js → index-58z2hatp.js} +2 -2
  60. package/dist/client/static/js/{index-4tbdws4r.js → index-5e4e18tg.js} +2 -2
  61. package/dist/client/static/js/{index-xfyxmaj1.js → index-60cxxnpk.js} +62 -62
  62. package/dist/client/static/js/{index-th61y26d.js → index-69mnn71v.js} +2 -2
  63. package/dist/client/static/js/{index-8aqjj2x2.js → index-6bsez5n6.js} +1 -1
  64. package/dist/client/static/js/{index-gaa39w5q.js → index-8tzt0dek.js} +2 -2
  65. package/dist/client/static/js/{index-vb5a3g01.js → index-8z9aqgf3.js} +4 -4
  66. package/dist/client/static/js/{index-ewryzs4g.js → index-92h38pwg.js} +2 -2
  67. package/dist/client/static/js/{index-7ma44af3.js → index-9rvjegmy.js} +3 -3
  68. package/dist/client/static/js/{index-q0k1am0g.js → index-a3bpmw2r.js} +2 -2
  69. package/dist/client/static/js/{index-j863hg0d.js → index-a5ecn5yx.js} +6 -6
  70. package/dist/client/static/js/{index-6ey6y9em.js → index-ax8gaayq.js} +2 -2
  71. package/dist/client/static/js/{index-e42ys2q3.js → index-c253x7vt.js} +7 -7
  72. package/dist/client/static/js/{index-y0f3wbc3.js → index-d9sfavx1.js} +2 -2
  73. package/dist/client/static/js/{index-5tp3emtg.js → index-db6s66jr.js} +2 -2
  74. package/dist/client/static/js/index-eggbcdwx.js +481 -0
  75. package/dist/client/static/js/{index-ts8rhd06.js → index-f13ern5e.js} +1 -1
  76. package/dist/client/static/js/{index-ver116ed.js → index-f6t91mpp.js} +1 -1
  77. package/dist/client/static/js/{index-tc07gd33.js → index-fr91ghwb.js} +2 -2
  78. package/dist/client/static/js/{index-tq3t3qm4.js → index-fsa18ns9.js} +2 -2
  79. package/dist/client/static/js/{index-k56patms.js → index-fyt8m8ah.js} +2 -2
  80. package/dist/client/static/js/{index-gw4c5n3a.js → index-gcad7b6g.js} +2 -2
  81. package/dist/client/static/js/{index-rxt8sf9a.js → index-h1xbx74w.js} +2 -2
  82. package/dist/client/static/js/{index-q5q8a3qn.js → index-j1ksa4x2.js} +2 -2
  83. package/dist/client/static/js/{index-sxag9ptg.js → index-jct0jryd.js} +2 -2
  84. package/dist/client/static/js/{index-r1wrke3j.js → index-jpvng27a.js} +1 -1
  85. package/dist/client/static/js/{index-w5j1wgcz.js → index-me0b6wkw.js} +1 -1
  86. package/dist/client/static/js/{index-6x0kn8pb.js → index-mhrkjbjq.js} +2 -2
  87. package/dist/client/static/js/{index-nzq51nbb.js → index-mngpcca7.js} +5 -5
  88. package/dist/client/static/js/index-mttx9327.css +1 -0
  89. package/dist/client/static/js/{index-ssepzdaz.js → index-mx5y9vt9.js} +7 -7
  90. package/dist/client/static/js/{index-3ymw778n.js → index-ndqtff48.js} +2 -2
  91. package/dist/client/static/js/{index-wnk9k57k.js → index-nf4hq5tg.js} +55 -55
  92. package/dist/client/static/js/{index-f31c6jg8.js → index-njhrm5qa.js} +10 -10
  93. package/dist/client/static/js/index-nnwcbp2d.js +2 -0
  94. package/dist/client/static/js/{index-3p732mvs.js → index-np2rfq06.js} +2 -2
  95. package/dist/client/static/js/{index-kc5yt2cd.js → index-nwbr15b3.js} +2 -2
  96. package/dist/client/static/js/{index-2a0b9ya2.js → index-pa70qj4p.js} +1 -1
  97. package/dist/client/static/js/index-pe5f2gmn.js +1 -0
  98. package/dist/client/static/js/{index-qbqm3c91.js → index-pgy7ree5.js} +5 -5
  99. package/dist/client/static/js/index-pzwf6hwe.js +4 -0
  100. package/dist/client/static/js/{index-jnxmvxb8.js → index-q3k8r0ms.js} +11 -11
  101. package/dist/client/static/js/{index-qkcmspxq.js → index-rw84kefb.js} +2 -2
  102. package/dist/client/static/js/{index-gqsnyh8k.js → index-s9ts6qbj.js} +2 -2
  103. package/dist/client/static/js/{index-dqf0srrp.js → index-sg65xdey.js} +2 -2
  104. package/dist/client/static/js/{index-mkp3gwag.js → index-skvfxcd8.js} +1 -1
  105. package/dist/client/static/js/{index-6qqsy78z.js → index-sx2yz2wx.js} +1 -1
  106. package/dist/client/static/js/{index-6ac860yz.js → index-trq7bdvk.js} +2 -2
  107. package/dist/client/static/js/{index-v8xhgfeq.js → index-vs2y8gxr.js} +2 -2
  108. package/dist/client/static/js/index-wwyjzhgs.js +2 -0
  109. package/dist/client/static/js/{index-7s4dge1z.js → index-xe447cw3.js} +1 -1
  110. package/dist/client/static/js/index-y09de44h.js +2 -0
  111. package/dist/client/static/js/{index-jxsha63v.js → index-y4cx8cqf.js} +2 -2
  112. package/dist/client/static/js/{index-bkwax812.js → index-yg38s8t3.js} +1 -1
  113. package/dist/client/static/js/{index-dz18nn65.js → index-yh7gngsh.js} +2 -2
  114. package/dist/client/static/js/{index-3m1dksmy.js → index-yrwm437g.js} +2 -2
  115. package/dist/client/static/js/{index-7ynf3s2w.js → index-z82nd2bd.js} +2 -2
  116. package/dist/client/static/js/info-A6RAGUB7-zkv4crz7.js +1 -0
  117. package/dist/client/static/js/{infoDiagram-VRGFBTTK-rykcacj5.js → infoDiagram-VRGFBTTK-9xph6cr5.js} +2 -2
  118. package/dist/client/static/js/ini-62r3vxaf.js +1 -0
  119. package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-rj752kd8.js → ishikawaDiagram-OU5B5YK6-3gshs3v8.js} +2 -2
  120. package/dist/client/static/js/java-kacycary.js +1 -0
  121. package/dist/client/static/js/javascript-zc1qnyyp.js +1 -0
  122. package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-mtetwn6f.js → journeyDiagram-ZHPQQLJL-fa8x56mf.js} +3 -3
  123. package/dist/client/static/js/json-yrwpn6bd.js +1 -0
  124. package/dist/client/static/js/jsx-b40ag8q1.js +1 -0
  125. package/dist/client/static/js/{julia-mxe3pnz3.js → julia-agc5kfvg.js} +1 -1
  126. package/dist/client/static/js/{kanban-definition-PNTS6WVX-4h5pw5mm.js → kanban-definition-PNTS6WVX-fybp2hh4.js} +5 -5
  127. package/dist/client/static/js/lua-bk961f37.js +1 -0
  128. package/dist/client/static/js/markdown-b7rgzgd6.js +1 -0
  129. package/dist/client/static/js/mermaid.core-jjh5ggp0.js +12 -0
  130. package/dist/client/static/js/{mindmap-definition-NLK3R4M7-67s4xy7h.js → mindmap-definition-NLK3R4M7-gtfbg619.js} +5 -5
  131. package/dist/client/static/js/one-dark-pro-vht9rv39.js +1 -0
  132. package/dist/client/static/js/one-light-arxc5whh.js +1 -0
  133. package/dist/client/static/js/packet-AYTQ26CC-dgpge627.js +1 -0
  134. package/dist/client/static/js/{pegDiagram-GJSIUBJH-qykb6ssk.js → pegDiagram-GJSIUBJH-1a51sbqv.js} +1 -1
  135. package/dist/client/static/js/{perl-a8eeaqkn.js → perl-v5vbtzgf.js} +1 -1
  136. package/dist/client/static/js/{php-6gq92zt8.js → php-83qwy98t.js} +1 -1
  137. package/dist/client/static/js/pie-WAS4IAKB-b8pgsqrd.js +1 -0
  138. package/dist/client/static/js/{pieDiagram-5QR66LMP-mymrrvck.js → pieDiagram-5QR66LMP-zd9svyyn.js} +3 -3
  139. package/dist/client/static/js/properties-k8gbzggp.js +1 -0
  140. package/dist/client/static/js/python-343tspad.js +1 -0
  141. package/dist/client/static/js/{quadrantDiagram-O4NWA36T-6f8ahd40.js → quadrantDiagram-O4NWA36T-5gtw2m6s.js} +3 -3
  142. package/dist/client/static/js/r-ycdwmv8g.js +1 -0
  143. package/dist/client/static/js/radar-RG4KPBEZ-fmfe5y27.js +1 -0
  144. package/dist/client/static/js/railroad-74A4TZTK-b5tks4ce.js +1 -0
  145. package/dist/client/static/js/railroad-abnf-HS5TGJTU-0sf4m0ze.js +1 -0
  146. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pjfy3pt7.js +1 -0
  147. package/dist/client/static/js/railroad-peg-WCYAUIDC-nr8ngt42.js +1 -0
  148. package/dist/client/static/js/{railroadDiagram-XR7U4H2S-c3habpvw.js → railroadDiagram-XR7U4H2S-3ccwpfzz.js} +1 -1
  149. package/dist/client/static/js/{requirementDiagram-PLB6GJNP-nysqy6te.js → requirementDiagram-PLB6GJNP-sasndrrp.js} +4 -4
  150. package/dist/client/static/js/{ruby-mc826p2e.js → ruby-994n5j6e.js} +1 -1
  151. package/dist/client/static/js/{rust-m4f4vpvn.js → rust-n9z2c9m3.js} +1 -1
  152. package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-s5dtfp3z.js → sankeyDiagram-IPEJSGJF-2ahb4sda.js} +3 -3
  153. package/dist/client/static/js/{sass-8bq5r2tz.js → sass-p6g7qdv2.js} +1 -1
  154. package/dist/client/static/js/{scss-9wz47c6t.js → scss-4j4t3r6y.js} +1 -1
  155. package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-bb3yp049.js → sequenceDiagram-PO4LG4MO-bfj90kz1.js} +7 -7
  156. package/dist/client/static/js/{sizeCapture-INFHLROL-0m2msee7.js → sizeCapture-INFHLROL-5tygxmtc.js} +1 -1
  157. package/dist/client/static/js/sql-kwpd5w07.js +1 -0
  158. package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-cd0qgj6t.js → stateDiagram-v2-GCMORJYK-533xw76e.js} +3 -3
  159. package/dist/client/static/js/{svelte-5vrwkc13.js → svelte-bek3h1sz.js} +1 -1
  160. package/dist/client/static/js/{swimlanes-2SLR337P-rpb01f7p.js → swimlanes-2SLR337P-gd3d04pk.js} +1 -1
  161. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-xxmvdyg4.js +8 -0
  162. package/dist/client/static/js/{timeline-definition-EJHVYXUP-tqw2e6y1.js → timeline-definition-EJHVYXUP-fvqvgqvg.js} +3 -3
  163. package/dist/client/static/js/treeView-Q6P3EWNA-23r9fa68.js +1 -0
  164. package/dist/client/static/js/treemap-WGGIJYW6-mxxzdrj6.js +1 -0
  165. package/dist/client/static/js/tsx-gjxfjnbk.js +1 -0
  166. package/dist/client/static/js/typescript-4dchbnya.js +1 -0
  167. package/dist/client/static/js/{usecaseDiagram-POWQR4AR-dhf4d5xg.js → usecaseDiagram-POWQR4AR-tm1f0m4x.js} +25 -25
  168. package/dist/client/static/js/{vennDiagram-UO4OBE2U-ztkk79dv.js → vennDiagram-UO4OBE2U-2vdvv1hd.js} +4 -4
  169. package/dist/client/static/js/{vue-gmjnxjm3.js → vue-y44m889c.js} +1 -1
  170. package/dist/client/static/js/wardley-WFR3VGLG-cbqtax1x.js +1 -0
  171. package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-ahre5tmv.js → wardleyDiagram-VNRHLVJA-7avcjznx.js} +4 -4
  172. package/dist/client/static/js/xml-xs6qz3ya.js +1 -0
  173. package/dist/client/static/js/{xychartDiagram-PMCCYNJV-vak2c50n.js → xychartDiagram-PMCCYNJV-g39y526n.js} +4 -4
  174. package/dist/client/static/js/yaml-174nk5bn.js +1 -0
  175. package/package.json +7 -7
  176. package/src/client/borders.css +15 -3
  177. package/src/client/components/common/ComposerTextarea.test.tsx +13 -1
  178. package/src/client/components/common/ComposerTextarea.tsx +8 -2
  179. package/src/client/components/common/MarkdownRenderer.tsx +11 -2
  180. package/src/client/components/common/anchored-menu/index.tsx +11 -4
  181. package/src/client/components/common/harness-glyph/harness-glyph.test.ts +0 -4
  182. package/src/client/components/common/harness-glyph/index.tsx +4 -5
  183. package/src/client/components/common/markdown-inline-file.test.tsx +90 -15
  184. package/src/client/components/common/session-actions-menu/index.test.tsx +45 -0
  185. package/src/client/components/common/session-actions-menu/index.tsx +6 -1
  186. package/src/client/components/common/session-row/TrailingSlot.tsx +6 -2
  187. package/src/client/components/common/session-row/index.tsx +32 -16
  188. package/src/client/components/common/session-row/session-row.test.tsx +56 -18
  189. package/src/client/components/layout/desktop-layout/RightColumn.tsx +4 -1
  190. package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +28 -35
  191. package/src/client/components/layout/desktop-layout/index.tsx +5 -3
  192. package/src/client/components/layout/desktop-layout/resizer/index.tsx +13 -3
  193. package/src/client/components/layout/desktop-layout/resizer/panel.test.ts +41 -0
  194. package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +21 -1
  195. package/src/client/components/layout/session-sidebar/CategoryHeader.worktree.test.tsx +1 -0
  196. package/src/client/components/layout/session-sidebar/CategoryItem.tsx +8 -2
  197. package/src/client/components/layout/session-sidebar/ClassicView.tsx +2 -0
  198. package/src/client/components/layout/session-sidebar/SessionList.tsx +4 -0
  199. package/src/client/components/layout/session-sidebar/SessionsView.tsx +22 -1
  200. package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +46 -8
  201. package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +9 -3
  202. package/src/client/components/layout/session-sidebar/modern/index.tsx +2 -0
  203. package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +36 -0
  204. package/src/client/components/layout/session-sidebar/search-results.test.tsx +29 -16
  205. package/src/client/components/layout/session-sidebar/session-list-states.test.tsx +1 -0
  206. package/src/client/components/layout/session-sidebar/variant-props.ts +2 -0
  207. package/src/client/components/mobile/LayoutWrapper.tsx +9 -0
  208. package/src/client/components/mobile/SessionSidebar.tsx +4 -0
  209. package/src/client/components/mobile/left-drawer-nav.test.tsx +1 -1
  210. package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +4 -0
  211. package/src/client/components/mobile/mobile-session-sidebar/ClassicDrawer.tsx +3 -0
  212. package/src/client/components/mobile/mobile-session-sidebar/Item.test.tsx +85 -0
  213. package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +30 -14
  214. package/src/client/components/mobile/mobile-session-sidebar/List.tsx +4 -0
  215. package/src/client/components/settings/apply-side-effects.test.ts +31 -0
  216. package/src/client/components/settings/apply-side-effects.ts +7 -0
  217. package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.tsx +3 -2
  218. package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.test.tsx +95 -0
  219. package/src/client/components/settings/categories/appearance-settings/SidebarStyleSection.tsx +35 -0
  220. package/src/client/components/workspace/chat-timeline/ChatOverlays.tsx +1 -0
  221. package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +1 -0
  222. package/src/client/components/workspace/chat-timeline/MessageItem.gutter.test.ts +26 -0
  223. package/src/client/components/workspace/chat-timeline/MessageItem.tsx +6 -3
  224. package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +5 -0
  225. package/src/client/components/workspace/chat-timeline/OrchestrationNotice.tsx +81 -162
  226. package/src/client/components/workspace/chat-timeline/SystemNotice.tsx +7 -3
  227. package/src/client/components/workspace/chat-timeline/ThinkingSection.test.tsx +17 -0
  228. package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +21 -7
  229. package/src/client/components/workspace/chat-timeline/ToolCallingSection.tsx +1 -0
  230. package/src/client/components/workspace/chat-timeline/UserTurn.test.tsx +24 -6
  231. package/src/client/components/workspace/chat-timeline/UserTurn.tsx +17 -4
  232. package/src/client/components/workspace/chat-timeline/block-chrome.test.tsx +16 -0
  233. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +104 -11
  234. package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +120 -43
  235. package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +28 -21
  236. package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.wait.test.tsx +48 -0
  237. package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +47 -22
  238. package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.test.ts +24 -0
  239. package/src/client/components/workspace/chat-timeline/chat-input/GoalBanner.tsx +44 -18
  240. package/src/client/components/workspace/chat-timeline/chat-input/GoalSurfaces.tsx +2 -1
  241. package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.test.ts +35 -0
  242. package/src/client/components/workspace/chat-timeline/chat-input/ModeToggles.tsx +33 -12
  243. package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +26 -2
  244. package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +67 -37
  245. package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +86 -1
  246. package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +90 -135
  247. package/src/client/components/workspace/chat-timeline/chat-input/VoiceButton.tsx +58 -0
  248. package/src/client/components/workspace/chat-timeline/chat-input/access-capability.test.tsx +151 -0
  249. package/src/client/components/workspace/chat-timeline/chat-input/action-base.ts +42 -0
  250. package/src/client/components/workspace/chat-timeline/chat-input/index.tsx +1 -0
  251. package/src/client/components/workspace/chat-timeline/chat-input/mode-icons.test.ts +108 -0
  252. package/src/client/components/workspace/chat-timeline/chat-input/mode-icons.tsx +122 -0
  253. package/src/client/components/workspace/chat-timeline/chat-input/modes-props.ts +5 -0
  254. package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +78 -20
  255. package/src/client/components/workspace/chat-timeline/chat-input/styles/index.tsx +11 -5
  256. package/src/client/components/workspace/chat-timeline/chat-input/styles.test.tsx +19 -0
  257. package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +9 -0
  258. package/src/client/components/workspace/chat-timeline/fork-preview.test.tsx +1 -1
  259. package/src/client/components/workspace/chat-timeline/index.tsx +1 -1
  260. package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.test.tsx +21 -5
  261. package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.tsx +100 -71
  262. package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +9 -9
  263. package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +83 -66
  264. package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.test.tsx +3 -3
  265. package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +36 -15
  266. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.test.tsx +125 -0
  267. package/src/client/components/workspace/chat-timeline/tool-renderers/ask-panel/OptionRow.tsx +84 -27
  268. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.test.tsx +18 -0
  269. package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Mcp.tsx +14 -5
  270. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ArtifactChip.tsx +7 -3
  271. package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolRowActions.tsx +10 -2
  272. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.tsx +2 -2
  273. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Compact.tsx +11 -6
  274. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Minimal.tsx +2 -2
  275. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Trace.tsx +2 -2
  276. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.test.tsx +5 -3
  277. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +19 -12
  278. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/parity.test.tsx +50 -2
  279. package/src/client/components/workspace/chat-timeline/tool-renderers/styles/props.ts +2 -0
  280. package/src/client/components/workspace/model-dropdown/HarnessTabs.tsx +31 -10
  281. package/src/client/components/workspace/model-dropdown/Header.tsx +13 -5
  282. package/src/client/components/workspace/model-dropdown/Panel.tsx +18 -0
  283. package/src/client/components/workspace/model-dropdown/ThinkingLevels.tsx +51 -0
  284. package/src/client/components/workspace/model-dropdown/Trigger.tsx +99 -0
  285. package/src/client/components/workspace/model-dropdown/bands.ts +51 -0
  286. package/src/client/components/workspace/model-dropdown/harness-tabs.test.tsx +21 -5
  287. package/src/client/components/workspace/model-dropdown/index.tsx +20 -47
  288. package/src/client/components/workspace/model-dropdown/thinking-levels.test.tsx +108 -0
  289. package/src/client/components/workspace/model-dropdown/trigger.test.ts +54 -8
  290. package/src/client/hooks/chat/composer/attachments.test.ts +12 -0
  291. package/src/client/hooks/chat/composer/attachments.ts +16 -4
  292. package/src/client/hooks/chat/composer/pipeline.test.ts +14 -0
  293. package/src/client/hooks/chat/composer/pipeline.ts +15 -6
  294. package/src/client/hooks/chat/omp/session-list.activity.test.ts +20 -0
  295. package/src/client/hooks/chat/omp/session-merges.ts +18 -6
  296. package/src/client/hooks/chat/omp/session-sidebar-controller.ts +4 -0
  297. package/src/client/hooks/chat/timeline/access-ladder-wiring.test.ts +111 -0
  298. package/src/client/hooks/chat/timeline/access-ladder.test.ts +66 -0
  299. package/src/client/hooks/chat/timeline/access-ladder.ts +72 -0
  300. package/src/client/hooks/chat/timeline/access-mode.ts +11 -1
  301. package/src/client/hooks/chat/timeline/index.ts +4 -5
  302. package/src/client/hooks/chat/timeline/modes-contract.ts +10 -1
  303. package/src/client/hooks/chat/timeline/modes.ts +10 -2
  304. package/src/client/hooks/chat/timeline/scope.test.ts +17 -0
  305. package/src/client/hooks/chat/timeline/scope.ts +6 -1
  306. package/src/client/hooks/chat/timeline/send-refusal.test.ts +19 -0
  307. package/src/client/hooks/chat/timeline/send-steer.test.ts +17 -0
  308. package/src/client/hooks/chat/timeline/send.ts +17 -0
  309. package/src/client/hooks/editor/quick-open.ts +41 -0
  310. package/src/client/hooks/ui/border-style.test.ts +13 -0
  311. package/src/client/hooks/ui/markdown-render.ts +11 -6
  312. package/src/client/hooks/ui/open-inline-file.test.ts +16 -0
  313. package/src/client/hooks/ui/open-inline-file.ts +4 -2
  314. package/src/client/hooks/ui/show-more.ts +11 -1
  315. package/src/client/hooks/ui/ui-feedback.test.ts +11 -0
  316. package/src/client/hooks/ui/verified-inline-files.test.tsx +143 -0
  317. package/src/client/hooks/ui/verified-inline-files.ts +165 -0
  318. package/src/client/hooks/workspace/mobile-workspace-panels.test.tsx +116 -0
  319. package/src/client/hooks/workspace/mobile-workspace-panels.ts +73 -0
  320. package/src/client/hooks/workspace/panel-resize.test.ts +127 -0
  321. package/src/client/hooks/workspace/panel-resize.ts +81 -0
  322. package/src/client/hooks/workspace/session-list-limit.test.ts +80 -0
  323. package/src/client/hooks/workspace/session-list-limit.ts +69 -0
  324. package/src/client/hooks/workspace/session-pin.ts +58 -0
  325. package/src/client/hooks/workspace/workspace-panels-mode.test.tsx +87 -0
  326. package/src/client/hooks/workspace/workspace-panels-mode.ts +76 -0
  327. package/src/client/lib/router/branch-params.test.ts +17 -1
  328. package/src/client/lib/router/branch-params.ts +18 -0
  329. package/src/client/lib/ui/pressed.ts +15 -0
  330. package/src/client/tailwind.css +30 -10
  331. package/src/server/lib/connect/cloudflared.lifecycle.test.ts +25 -9
  332. package/src/server/lib/db/schema.test.ts +1 -1
  333. package/src/server/lib/db/schema.ts +17 -0
  334. package/src/server/lib/harness/activity.server.test.ts +81 -0
  335. package/src/server/lib/harness/activity.server.ts +55 -0
  336. package/src/server/lib/harness/spawn.server.ts +9 -0
  337. package/src/server/lib/omp/session/delete.server.ts +4 -2
  338. package/src/server/lib/omp/session/sidebar-activity.server.test.ts +24 -2
  339. package/src/server/lib/omp/session/sidebar-data.canonical.test.ts +14 -0
  340. package/src/server/lib/realtime/topics/session-data.server.ts +6 -5
  341. package/src/server/lib/realtime/topics/session-data.test.ts +35 -0
  342. package/src/server/lib/sessions/last-opened.server.test.ts +17 -0
  343. package/src/server/lib/sessions/last-opened.server.ts +18 -1
  344. package/src/server/routes/sessions/index.ts +3 -2
  345. package/src/server/routes/sessions/routes.test.ts +29 -46
  346. package/src/server/routes/sessions/session.ts +40 -62
  347. package/src/server/routes/sessions/state.test.ts +89 -0
  348. package/src/server/routes/sessions/state.ts +86 -0
  349. package/src/shared/lib/chat/attachment-budget.test.ts +74 -0
  350. package/src/shared/lib/chat/attachment-budget.ts +111 -0
  351. package/src/shared/lib/chat/attachments.test.ts +0 -17
  352. package/src/shared/lib/chat/attachments.ts +0 -53
  353. package/src/shared/lib/chat/orchestration/outcome-markdown.test.ts +57 -0
  354. package/src/shared/lib/chat/orchestration/outcome-markdown.ts +74 -0
  355. package/src/shared/lib/chat/timeline/block-chrome.test.ts +35 -0
  356. package/src/shared/lib/chat/timeline/block-chrome.ts +21 -0
  357. package/src/shared/lib/markdown/degenerate-emphasis.test.ts +64 -0
  358. package/src/shared/lib/markdown/degenerate-emphasis.ts +90 -0
  359. package/src/shared/lib/markdown/inline-file.test.ts +79 -22
  360. package/src/shared/lib/markdown/inline-file.ts +57 -25
  361. package/src/shared/lib/markdown/marked.ts +5 -1
  362. package/src/shared/lib/settings/defaults.ts +2 -0
  363. package/src/shared/lib/theme/border-style.ts +1 -1
  364. package/src/shared/lib/workspace/active-project.test.ts +17 -1
  365. package/src/shared/lib/workspace/active-project.ts +9 -0
  366. package/src/shared/lib/workspace/project-settings-delete.test.ts +97 -0
  367. package/src/shared/lib/workspace/project-settings.test.ts +2 -34
  368. package/src/shared/lib/workspace/project-settings.ts +6 -0
  369. package/src/shared/lib/workspace/session-list-limit.test.ts +31 -0
  370. package/src/shared/lib/workspace/session-list-limit.ts +32 -0
  371. package/src/shared/lib/workspace/sidebar-sort.test.ts +21 -0
  372. package/src/shared/lib/workspace/workspace-panel-widths.ts +1 -1
  373. package/src/shared/lib/workspace/workspace-session.test.ts +34 -0
  374. package/src/shared/lib/workspace/workspace-session.ts +40 -0
  375. package/src/shared/types/settings/state.ts +10 -0
  376. package/dist/client/static/js/ImageView-sz4fzz9k.js +0 -1
  377. package/dist/client/static/js/LayoutWrapper-q6q4h04a.js +0 -2
  378. package/dist/client/static/js/MergeDiffView-b8f013ws.js +0 -1
  379. package/dist/client/static/js/Modal-ahecatp5.js +0 -60
  380. package/dist/client/static/js/SessionsView-jwp8xvw5.js +0 -1
  381. package/dist/client/static/js/architecture-7GRP2DOG-dc7zys46.js +0 -1
  382. package/dist/client/static/js/bash-n5d0esqg.js +0 -1
  383. package/dist/client/static/js/c-pk766wx0.js +0 -1
  384. package/dist/client/static/js/cpp-3pt91jvm.js +0 -1
  385. package/dist/client/static/js/css-9gak6bze.js +0 -1
  386. package/dist/client/static/js/css-sp1cgdbr.js +0 -1
  387. package/dist/client/static/js/cynefin-OW5HDTMX-9fx59e89.js +0 -1
  388. package/dist/client/static/js/eventmodeling-NTZA5JFV-61d2ee91.js +0 -1
  389. package/dist/client/static/js/flowDiagram-KWPJA3E3-104ywb7w.js +0 -1
  390. package/dist/client/static/js/gitGraph-4MIJSDKK-zkb30q0t.js +0 -1
  391. package/dist/client/static/js/graphql-2ntm7jyh.js +0 -1
  392. package/dist/client/static/js/html-mt2yb43b.js +0 -1
  393. package/dist/client/static/js/index-6h46r2de.js +0 -1
  394. package/dist/client/static/js/index-f44k9k8d.css +0 -1
  395. package/dist/client/static/js/index-k1576e2m.js +0 -2
  396. package/dist/client/static/js/index-k4qshngy.js +0 -4
  397. package/dist/client/static/js/index-rr79n77k.js +0 -470
  398. package/dist/client/static/js/index-vf01q99d.js +0 -2
  399. package/dist/client/static/js/index-x7h04xzf.js +0 -2
  400. package/dist/client/static/js/index-xygk0v3e.js +0 -2
  401. package/dist/client/static/js/info-A6RAGUB7-xxvyt8p8.js +0 -1
  402. package/dist/client/static/js/ini-bdk46a3d.js +0 -1
  403. package/dist/client/static/js/java-3g3925cf.js +0 -1
  404. package/dist/client/static/js/javascript-0mqgcvps.js +0 -1
  405. package/dist/client/static/js/json-hdyzmffz.js +0 -1
  406. package/dist/client/static/js/jsx-y8r9mrdq.js +0 -1
  407. package/dist/client/static/js/lua-wf5k6p3r.js +0 -1
  408. package/dist/client/static/js/markdown-9bf16dx7.js +0 -1
  409. package/dist/client/static/js/mermaid.core-bs542jma.js +0 -12
  410. package/dist/client/static/js/one-dark-pro-541ed4b7.js +0 -1
  411. package/dist/client/static/js/one-light-nr79mykt.js +0 -1
  412. package/dist/client/static/js/packet-AYTQ26CC-cm8jeesg.js +0 -1
  413. package/dist/client/static/js/pie-WAS4IAKB-8b9xgcxv.js +0 -1
  414. package/dist/client/static/js/properties-xk4dn00p.js +0 -1
  415. package/dist/client/static/js/python-7sgz05n4.js +0 -1
  416. package/dist/client/static/js/r-w4qxm0pv.js +0 -1
  417. package/dist/client/static/js/radar-RG4KPBEZ-fxr2x2mf.js +0 -1
  418. package/dist/client/static/js/railroad-74A4TZTK-5qd45xk1.js +0 -1
  419. package/dist/client/static/js/railroad-abnf-HS5TGJTU-6fa00vpk.js +0 -1
  420. package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pcbtg7tj.js +0 -1
  421. package/dist/client/static/js/railroad-peg-WCYAUIDC-r0fdhdtp.js +0 -1
  422. package/dist/client/static/js/sql-sd00wgem.js +0 -1
  423. package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-zx36y2c8.js +0 -8
  424. package/dist/client/static/js/treeView-Q6P3EWNA-9sn2h4ea.js +0 -1
  425. package/dist/client/static/js/treemap-WGGIJYW6-9fzms0pq.js +0 -1
  426. package/dist/client/static/js/tsx-h5yzg80q.js +0 -1
  427. package/dist/client/static/js/typescript-qy1sbhea.js +0 -1
  428. package/dist/client/static/js/wardley-WFR3VGLG-vy6rp5gp.js +0 -1
  429. package/dist/client/static/js/xml-mrk4xakv.js +0 -1
  430. package/dist/client/static/js/yaml-xaza6dra.js +0 -1
  431. package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +0 -67
@@ -1,12 +1,12 @@
1
- import{t,l,bt,ya,w,F,O,G,z,j,q,H,m,va,Zi,b,Ar,hr,V,Pn,yt,ct,ut,ar,wc,Pt,Ot,qn,$t,vt}from"./index-xfyxmaj1.js";import{Ht}from"./index-rr79n77k.js";import{Za}from"./index-qkcmspxq.js";var pt={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},y1=new Set([pt.SHAPE_UNSUPPORTED,pt.SHAPE_REMOVED,pt.CONTAINMENT_VIOLATION]),ms=new Set(Object.values(pt).filter((e)=>!y1.has(e))),w1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),N1=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),R1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),dt="roundedRect";function ht(e){if(!e)return e;return w1.get(e)??e}t(ht,"resolveShapeAlias");function E1(e,r){for(let n of e){if(n.isGroup)continue;if(!n.shape||n.shape==="squareRect"||n.shape==="rect")n.shape=dt;if(N1.has(n.shape)){let a=`shape "${n.shape}" was removed in v0.8.1, using "${dt}"`;if(r?.emitError)r.emitError("SHAPE_REMOVED",a,{nodeId:n.id});else l.warn(`agentflow: ${a}`);n.shape=dt;continue}if(!R1.has(n.shape)){let a=`shape "${n.shape}" is not supported, using "${dt}"`;if(r?.emitWarning)r.emitWarning("SHAPE_UNSUPPORTED",a,{nodeId:n.id});else l.warn(`agentflow: ${a}`);n.shape=dt}}}t(E1,"normaliseNodeShapes");var Xt=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),C1=Xt.size,S1=t((e)=>`af-kind-${e}`,"kindClass"),O1=[...Xt.keys()],x1=t((e)=>Math.max(1,e-C1),"containerSlotCount"),T1=t((e,r)=>{let n=C1+e%x1(r);return r>0?n%r:n},"containerSlot");function D1(e,r,n){let a=m().themeVariables?.borderColorArray,c=Array.isArray(a)?a.length:0,d=n.size;for(let o of e??[]){if(o.isGroup||o.shape==="collapsedGroup"){let k=n.get(String(o.id))??d++;o.colorIndex=T1(k,c);continue}let h=r(String(o.id));if(h&&Xt.has(h))o.cssClasses=`${o.cssClasses??""} ${S1(h)}`.replace(/\s+/g," ").trim()}}t(D1,"assignColorSlots");var A1="agentflow-",i1=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),P1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),G1={flow:"flowGroup"};function qt(e){if(Array.isArray(e))return e.map((n)=>qt(n));if(e===null||typeof e!=="object")return e;let r={};for(let n of Object.keys(e)){if(n==="__proto__"||n==="constructor"||n==="prototype")continue;r[n]=qt(e[n])}return r}t(qt,"stripPrototypeKeys");function _1(e){let r=!1,n=!1,a=0,c,d=[];for(let o of e.split(`
1
+ import{t,l,xt,xa,w,F,O,G,z,j,q,H,m,wa,ns,b,hr,br,V,Fn,wt,pt,mt,ar,Dc,$t,zt,Hn,Ut,Ct}from"./index-60cxxnpk.js";import{Wt}from"./index-eggbcdwx.js";import{to}from"./index-rw84kefb.js";var dt={SHAPE_UNSUPPORTED:"SHAPE_UNSUPPORTED",SHAPE_REMOVED:"SHAPE_REMOVED",EDGE_OPERATOR_UNSUPPORTED:"EDGE_OPERATOR_UNSUPPORTED",REFERENCE_EDGE_LABEL_REJECTED:"REFERENCE_EDGE_LABEL_REJECTED",CONNECTOR_REF_UNRESOLVED:"CONNECTOR_REF_UNRESOLVED",CONNECTOR_REF_NOT_A_CONNECTOR:"CONNECTOR_REF_NOT_A_CONNECTOR",METADATA_KEY_MISAPPLIED:"METADATA_KEY_MISAPPLIED",DUPLICATE_ID_NODE:"DUPLICATE_ID_NODE",RESERVED_SYNTHETIC_ID:"RESERVED_SYNTHETIC_ID",CONTAINMENT_VIOLATION:"CONTAINMENT_VIOLATION",EDGE_SEMANTIC_CONTRADICTION:"EDGE_SEMANTIC_CONTRADICTION",FLOW_NO_INPUT:"FLOW_NO_INPUT"},y1=new Set([dt.SHAPE_UNSUPPORTED,dt.SHAPE_REMOVED,dt.CONTAINMENT_VIOLATION]),As=new Set(Object.values(dt).filter((e)=>!y1.has(e))),w1=new Map([["task","roundedRect"],["tool","subroutine"],["input","lean-right"],["decision","diamond"],["refdoc","lin-doc"],["action","hexagon"],["round","rect"]]),N1=new Set(["doc","stadium","terminal","circle","trapezoid","inv_trapezoid","inv-trapezoid","doublecircle","double-circle","typeDeclaration","procs","lean_left","lean-left","in-out","cylinder","ellipse","odd","tag-rect","tagged-rectangle","delay","half-rounded-rectangle","lin-rect","lined-rectangle","win-pane","window-pane","curv-trap","curved-trapezoid"]),R1=new Set(["roundedRect","subroutine","subprocess","subproc","framed-rectangle","lean-right","diamond","lin-doc","lined-document","hexagon","hex","connector","collapsedGroup"]),lt="roundedRect";function ct(e){if(!e)return e;return w1.get(e)??e}t(ct,"resolveShapeAlias");function E1(e,r){for(let n of e){if(n.isGroup)continue;if(!n.shape||n.shape==="squareRect"||n.shape==="rect")n.shape=lt;if(N1.has(n.shape)){let a=`shape "${n.shape}" was removed in v0.8.1, using "${lt}"`;if(r?.emitError)r.emitError("SHAPE_REMOVED",a,{nodeId:n.id});else l.warn(`agentflow: ${a}`);n.shape=lt;continue}if(!R1.has(n.shape)){let a=`shape "${n.shape}" is not supported, using "${lt}"`;if(r?.emitWarning)r.emitWarning("SHAPE_UNSUPPORTED",a,{nodeId:n.id});else l.warn(`agentflow: ${a}`);n.shape=lt}}}t(E1,"normaliseNodeShapes");var Xt=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),C1=Xt.size,S1=t((e)=>`af-kind-${e}`,"kindClass"),O1=[...Xt.keys()],x1=t((e)=>Math.max(1,e-C1),"containerSlotCount"),T1=t((e,r)=>{let n=C1+e%x1(r);return r>0?n%r:n},"containerSlot");function D1(e,r,n){let a=m().themeVariables?.borderColorArray,c=Array.isArray(a)?a.length:0,d=n.size;for(let o of e??[]){if(o.isGroup||o.shape==="collapsedGroup"){let k=n.get(String(o.id))??d++;o.colorIndex=T1(k,c);continue}let h=r(String(o.id));if(h&&Xt.has(h))o.cssClasses=`${o.cssClasses??""} ${S1(h)}`.replace(/\s+/g," ").trim()}}t(D1,"assignColorSlots");var A1="agentflow-",i1=new Set(["shape","view","icon","img","form","pos","w","h","class","style","labelType"]),P1=new Set(["subroutine","subprocess","subproc","framed-rectangle","tool"]),G1={flow:"flowGroup"};function qt(e){if(Array.isArray(e))return e.map((n)=>qt(n));if(e===null||typeof e!=="object")return e;let r={};for(let n of Object.keys(e)){if(n==="__proto__"||n==="constructor"||n==="prototype")continue;r[n]=qt(e[n])}return r}t(qt,"stripPrototypeKeys");function _1(e){let r=!1,n=!1,a=0,c,d=[];for(let o of e.split(`
2
2
  `)){if(c!==void 0){let A=o.length-o.trimStart().length;if(o.trim()===""||A>c){d.push(o);continue}c=void 0}let h=-1;for(let A=0;A<o.length;A++){let C=o[A];if(n){if(C==="\\")A++;else if(C==='"')n=!1}else if(r){if(C==="'")r=!1}else if(C==='"')n=!0;else if(C==="'")r=!0;else if(C==="#"&&(A===0||o[A-1]===" "||o[A-1]==="\t")){h=A;break}else if(C==="["||C==="{")a++;else if(C==="]"||C==="}")a=Math.max(0,a-1)}if(r||n||a>0){d.push(o);continue}let k=h>=0?o.slice(0,h):o,g=h>=0?o.slice(h):"";if(/:\s*[>|][\d+-]*\s*$/.test(k)){c=o.length-o.trimStart().length,d.push(o);continue}d.push(k.replace(/,([\t ]*)$/,"$1")+g)}return d.join(`
3
3
  `)}t(_1,"stripLineTrailingCommas");var U1=class{constructor(){this.vertexCounter=0,this.config=m(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.diagramId="",this.preserveCommentsWhenParsing=!0,this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,this.funs=[],this.setAccTitle=O,this.setAccDescription=z,this.setDiagramTitle=q,this.getAccTitle=G,this.getAccDescription=j,this.getDiagramTitle=H,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.addGlobal=this.addGlobal.bind(this),this.addConnector=this.addConnector.bind(this),this.addConnectorMapping=this.addConnectorMapping.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.setFrontmatterLineOffset=this.setFrontmatterLineOffset.bind(this),this.addVertexMapping=this.addVertexMapping.bind(this),this.extendVertexMapping=this.extendVertexMapping.bind(this),this.addEdgeMapping=this.addEdgeMapping.bind(this),this.addSubgraphMapping=this.addSubgraphMapping.bind(this),this.emitWarning=this.emitWarning.bind(this),this.emitError=this.emitError.bind(this),this.getDiagnostics=this.getDiagnostics.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{t(this,"AgentFlowDB")}sanitizeText(e){return w.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let r of this.vertices.values())if(r.id===e)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,r,n,a,c,d,o={},h,k){if(!e||e.trim().length===0)return;let g;if(h!==void 0){let E;if(!h.includes(`
4
4
  `))E=`{
5
5
  `+h+`
6
6
  }`;else E=h+`
7
- `;try{g=hr(E,{schema:Ar})??{}}catch(p){let f=h.includes(`
8
- `)?_1(h):h;if(f!==h)try{g=hr(f+`
9
- `,{schema:Ar})??{}}catch{this.rethrowMetadataYamlError(p,h,k)}else this.rethrowMetadataYamlError(p,h,k)}g=qt(g)}let A;if(g&&typeof g.shape==="string"){let E=g;A=E.shape;let p=ht(A);if(p&&p!==A)E.shape=p}let C=this.subGraphLookup.get(e);if(C&&g){C.metadata={...C.metadata,...g};return}let B=this.connectors.get(e);if(B&&g){B.metadata={...B.metadata,...g};return}if(e==="connectors")return;let D=this.edges.find((E)=>E.id===e);if(D){let E=g;if(E?.animate!==void 0)D.animate=E.animate;if(E?.animation!==void 0)D.animation=E.animation;if(E?.curve!==void 0)D.interpolate=E.curve;if(g)D.metadata={...D.metadata,...g};return}let P,v=this.vertices.get(e);if(v===void 0)v={id:e,labelType:"text",domId:A1+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,v);if(this.vertexCounter++,r!==void 0){if(this.config=m(),P=this.sanitizeText(r.text.trim()),v.labelType=r.type,P.startsWith('"')&&P.endsWith('"'))P=P.substring(1,P.length-1);v.text=P}else if(v.text===void 0)v.text=e;if(n!==void 0)v.type=n;if(a!==void 0&&a!==null)a.forEach((E)=>{v.styles.push(E)});if(c!==void 0&&c!==null)c.forEach((E)=>{v.classes.push(E)});if(d!==void 0)v.dir=d;if(v.props===void 0)v.props=o;else if(o!==void 0)Object.assign(v.props,o);if(g){if(v.metadata={...v.metadata,...g},g.shape){let E=A??g.shape;if(typeof E!=="string")throw this.positionedShapeError(`No such shape: ${JSON.stringify(E)}.`,k);if(E!==E.toLowerCase()||E.includes("_"))throw this.positionedShapeError(`No such shape: ${E}. Shape names should be lowercase.`,k);else if(!wc(g.shape))throw this.positionedShapeError(`No such shape: ${g.shape}.`,k);v.type=g?.shape}if(g?.label)v.text=this.sanitizeText(g.label),v.labelType=this.sanitizeNodeLabelType(g?.labelType)}}positionedShapeError(e,r){let n=Error(e);if(!r)return n;let a=r.first_line+this.frontmatterLineOffset;return Object.assign(n,{hash:{text:"",token:null,line:a-1,loc:{first_line:a,last_line:r.last_line+this.frontmatterLineOffset,first_column:r.first_column,last_column:r.last_column},expected:[]}}),n}rethrowMetadataYamlError(e,r,n){let a=e;if(!a||a.name!=="YAMLException"||!a.mark||!n)throw e;let c;try{let d=!r.includes(`
7
+ `;try{g=br(E,{schema:hr})??{}}catch(p){let f=h.includes(`
8
+ `)?_1(h):h;if(f!==h)try{g=br(f+`
9
+ `,{schema:hr})??{}}catch{this.rethrowMetadataYamlError(p,h,k)}else this.rethrowMetadataYamlError(p,h,k)}g=qt(g)}let A;if(g&&typeof g.shape==="string"){let E=g;A=E.shape;let p=ct(A);if(p&&p!==A)E.shape=p}let C=this.subGraphLookup.get(e);if(C&&g){C.metadata={...C.metadata,...g};return}let B=this.connectors.get(e);if(B&&g){B.metadata={...B.metadata,...g};return}if(e==="connectors")return;let D=this.edges.find((E)=>E.id===e);if(D){let E=g;if(E?.animate!==void 0)D.animate=E.animate;if(E?.animation!==void 0)D.animation=E.animation;if(E?.curve!==void 0)D.interpolate=E.curve;if(g)D.metadata={...D.metadata,...g};return}let P,v=this.vertices.get(e);if(v===void 0)v={id:e,labelType:"text",domId:A1+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,v);if(this.vertexCounter++,r!==void 0){if(this.config=m(),P=this.sanitizeText(r.text.trim()),v.labelType=r.type,P.startsWith('"')&&P.endsWith('"'))P=P.substring(1,P.length-1);v.text=P}else if(v.text===void 0)v.text=e;if(n!==void 0)v.type=n;if(a!==void 0&&a!==null)a.forEach((E)=>{v.styles.push(E)});if(c!==void 0&&c!==null)c.forEach((E)=>{v.classes.push(E)});if(d!==void 0)v.dir=d;if(v.props===void 0)v.props=o;else if(o!==void 0)Object.assign(v.props,o);if(g){if(v.metadata={...v.metadata,...g},g.shape){let E=A??g.shape;if(typeof E!=="string")throw this.positionedShapeError(`No such shape: ${JSON.stringify(E)}.`,k);if(E!==E.toLowerCase()||E.includes("_"))throw this.positionedShapeError(`No such shape: ${E}. Shape names should be lowercase.`,k);else if(!Dc(g.shape))throw this.positionedShapeError(`No such shape: ${g.shape}.`,k);v.type=g?.shape}if(g?.label)v.text=this.sanitizeText(g.label),v.labelType=this.sanitizeNodeLabelType(g?.labelType)}}positionedShapeError(e,r){let n=Error(e);if(!r)return n;let a=r.first_line+this.frontmatterLineOffset;return Object.assign(n,{hash:{text:"",token:null,line:a-1,loc:{first_line:a,last_line:r.last_line+this.frontmatterLineOffset,first_column:r.first_column,last_column:r.last_column},expected:[]}}),n}rethrowMetadataYamlError(e,r,n){let a=e;if(!a||a.name!=="YAMLException"||!a.mark||!n)throw e;let c;try{let d=!r.includes(`
10
10
  `),o=d?`{
11
11
  `+r+`
12
12
  }`:r+`
@@ -15,17 +15,17 @@ import{t,l,bt,ya,w,F,O,G,z,j,q,H,m,va,Zi,b,Ar,hr,V,Pn,yt,ct,ut,ar,wc,Pt,Ot,qn,$t
15
15
  `),D=[];if(d)D.push(1);else for(let E=a.mark.line-1;E<=a.mark.line+1;E++){if(E<0||E>=B.length)continue;if(E===B.length-1&&B[E]===""&&E!==a.mark.line)continue;D.push(E)}let P=Math.max(...D.map((E)=>String(g(E,0).line).length)),v=[];for(let E of D){let p=g(E,0).line,f=` ${String(p).padStart(P)} | `;if(v.push(f+B[E].replace(/\t/g,"→")),E===a.mark.line)v.push("-".repeat(f.length+a.mark.column)+"^")}c={message:`${C} (${A.line}:${A.column+1})
16
16
 
17
17
  ${v.join(`
18
- `)}`,markLine:A.line-1,markColumn:A.column,hash:{text:"",token:null,line:A.line-1,loc:{first_line:A.line,last_line:A.line,first_column:A.column,last_column:A.column+1},expected:[]}}}catch{}if(c)a.message=c.message,a.mark.line=c.markLine,a.mark.column=c.markColumn,a.hash=c.hash;throw a}addSingleLink(e,r,n,a){let o={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};l.info("abc78 Got edge...",o);let h=n.text;if(h!==void 0){if(o.text=this.sanitizeText(h.text.trim()),o.text.startsWith('"')&&o.text.endsWith('"'))o.text=o.text.substring(1,o.text.length-1);o.labelType=this.sanitizeNodeLabelType(h.type)}if(n!==void 0){if(o.type=n.type,o.stroke=n.stroke,o.length=n.length>10?10:n.length,n.edgeSemantic)o.edgeSemantic=n.edgeSemantic}if(a&&!this.edges.some((k)=>k.id===a))o.id=a,o.isUserDefinedId=!0;else{let k=this.edges.filter((g)=>g.start===o.start&&g.end===o.end);if(k.length===0)o.id=Pn(o.start,o.end,{counter:0,prefix:"L"});else o.id=Pn(o.start,o.end,{counter:k.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))l.info("Pushing edge..."),this.edges.push(o);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
18
+ `)}`,markLine:A.line-1,markColumn:A.column,hash:{text:"",token:null,line:A.line-1,loc:{first_line:A.line,last_line:A.line,first_column:A.column,last_column:A.column+1},expected:[]}}}catch{}if(c)a.message=c.message,a.mark.line=c.markLine,a.mark.column=c.markColumn,a.hash=c.hash;throw a}addSingleLink(e,r,n,a){let o={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};l.info("abc78 Got edge...",o);let h=n.text;if(h!==void 0){if(o.text=this.sanitizeText(h.text.trim()),o.text.startsWith('"')&&o.text.endsWith('"'))o.text=o.text.substring(1,o.text.length-1);o.labelType=this.sanitizeNodeLabelType(h.type)}if(n!==void 0){if(o.type=n.type,o.stroke=n.stroke,o.length=n.length>10?10:n.length,n.edgeSemantic)o.edgeSemantic=n.edgeSemantic}if(a&&!this.edges.some((k)=>k.id===a))o.id=a,o.isUserDefinedId=!0;else{let k=this.edges.filter((g)=>g.start===o.start&&g.end===o.end);if(k.length===0)o.id=Fn(o.start,o.end,{counter:0,prefix:"L"});else o.id=Fn(o.start,o.end,{counter:k.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))l.info("Pushing edge..."),this.edges.push(o);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
19
19
 
20
20
  Initialize mermaid with maxEdges set to a higher number to allow more edges.
21
21
  You cannot set this config via configuration inside the diagram as it is a secure config.
22
- You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e==="object"&&"id"in e&&typeof e.id==="string"}addLink(e,r,n){let a=this.isLinkData(n)?n.id.replace("@",""):void 0;l.info("addLink",e,r,a);for(let c of e)for(let d of r){let o=c===e[e.length-1],h=d===r[0];if(o&&h)this.addSingleLink(c,d,n,a);else this.addSingleLink(c,d,n,void 0)}}updateLinkInterpolate(e,r){e.forEach((n)=>{if(n==="default"){this.edges.defaultInterpolate=r;return}if(typeof n==="number"&&n>=this.edges.length)throw Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);this.edges[n].interpolate=r})}updateLink(e,r){e.forEach((n)=>{if(typeof n==="number"&&n>=this.edges.length)throw Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(n==="default")this.edges.defaultStyle=r;else if(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some((a)=>a?.startsWith("fill")))this.edges[n]?.style?.push("fill:none")})}addClass(e,r){let n=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach((a)=>{let c=this.classes.get(a);if(c===void 0)c={id:a,styles:[],textStyles:[]},this.classes.set(a,c);if(n!==void 0&&n!==null)n.forEach((d)=>{if(/color/.exec(d)){let o=d.replace("fill","bgFill");c.textStyles.push(o)}c.styles.push(d)})})}setDirection(e){if(this.direction=e.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(e,r){for(let n of e.split(",")){let a=this.vertices.get(n);if(a)a.classes.push(r);let c=this.edges.find((o)=>o.id===n);if(c)c.classes.push(r);let d=this.subGraphLookup.get(n);if(d)d.classes.push(r)}}setTooltip(e,r){if(r===void 0)return;r=this.sanitizeText(r);for(let n of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}setClickFun(e,r,n){if(m().securityLevel!=="loose")return;if(r===void 0)return;let a=[];if(typeof n==="string"){a=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let d=0;d<a.length;d++){let o=a[d].trim();if(o.startsWith('"')&&o.endsWith('"'))o=o.substr(1,o.length-2);a[d]=o}}if(a.length===0)a.push(e);let c=this.vertices.get(e);if(c)c.haveCallback=!0,this.funs.push(()=>{let d=this.lookUpDomId(e),o=document.querySelector(`[id="${d}"]`);if(o!==null)o.addEventListener("click",()=>{V.runFunc(r,...a)},!1)})}setLink(e,r,n){e.split(",").forEach((a)=>{let c=this.vertices.get(a);if(c!==void 0)c.link=V.formatUrl(r,this.config),c.linkTarget=n}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,n){e.split(",").forEach((a)=>{this.setClickFun(a,r,n)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach((r)=>{r(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}isToolDefinition(e){return P1.has(e.type)}getTools(){let e=[];for(let r of this.vertices.values())if(this.isToolDefinition(r))e.push(r);return e}getClasses(){return this.classes}setupToolTips(e){let r=Za();b(e).select("svg").selectAll("g.node").on("mouseover",(c)=>{let d=b(c.currentTarget),o=d.attr("title");if(o===null)return;let h=c.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(d.attr("title")).style("left",window.scrollX+h.left+(h.right-h.left)/2+"px").style("top",window.scrollY+h.bottom+"px"),r.html(Ht.sanitize(o)),d.classed("hover",!0)}).on("mouseout",(c)=>{r.transition().duration(500).style("opacity",0),b(c.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=m(),this.diagramId="",this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,F()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,n,a){let c=e?.text?.trim(),d=n?.text;if(e===n&&n?.text&&/\s/.exec(n.text))c=void 0;let h=t((D)=>{let P={boolean:{},number:{},string:{}},v=[],E;return{nodeList:D.filter(function(f){let _=typeof f;if(f.stmt&&f.stmt==="dir")return E=f.value,!1;if(f.trim()==="")return!1;if(_ in P)return P[_].hasOwnProperty(f)?!1:P[_][f]=!0;else return v.includes(f)?!1:v.push(f)}),dir:E}},"uniq")(r.flat()),{nodeList:k,dir:g}=h,A=m().flowchart??{};if(g=g??(A.inheritDir?this.getDirection()??m().direction??void 0:void 0),this.version==="gen-1")for(let D=0;D<k.length;D++)k[D]=this.lookUpDomId(k[D]);c=c??"subGraph"+this.subCount,d=d||"",d=this.sanitizeText(d),this.subCount=this.subCount+1;let C={id:c,nodes:k.filter((D)=>D!==c&&!this.globalNodes.has(D)),title:d.trim(),classes:[],dir:g,labelType:this.sanitizeNodeLabelType(n?.type),type:a??"flow"};l.info("Adding",C.id,C.nodes,C.dir),C.nodes=this.makeUniq(C,this.subGraphs).nodes;let B=this.getPosForId(c);if(B!==-1){let D=this.subGraphs[B];for(let P of C.nodes)if(!D.nodes.includes(P))D.nodes.push(P);if(C.title)D.title=C.title;if(C.dir)D.dir=C.dir;if(C.type)D.type=C.type;this.subGraphLookup.set(c,D)}else this.subGraphs.push(C),this.subGraphLookup.set(c,C);return c}addGlobal(e){for(let r of e.flat()){if(typeof r!=="string")continue;let n=r.trim();if(n!=="")this.globalNodes.add(n)}for(let r of this.subGraphs)r.nodes=r.nodes.filter((n)=>!this.globalNodes.has(n))}getPosForId(e){for(let[r,n]of this.subGraphs.entries())if(n.id===e)return r;return-1}indexNodes2(e,r){let n=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let a=0,c=1;while(a<n.length){let d=this.getPosForId(n[a]);if(d>=0){let o=this.indexNodes2(e,d);if(o.result)return{result:!0,count:c+o.count};else c=c+o.count}a=a+1}return{result:!1,count:c}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}addConnector(e,r){let n=e?.text?.trim();if(!n)return"";let a=r?.text?.trim()??"",c=a.length>0?this.sanitizeText(a):n,d=this.connectors.get(n);if(!d)d={id:n,labelType:"text",domId:A1+n+"-"+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:c},this.connectors.set(n,d),this.vertices.set(n,d),this.vertexCounter++;else if(a.length>0)d.text=c;return n}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}computeEdgeSemantic(e,r){if(e==="arrow_point"&&r==="normal")return"sequence";if(e==="arrow_cross"&&r==="normal")return"failure";if(e==="arrow_open"&&r==="dotted")return"reference";return}destructStartLink(e){let r=e.trim(),n="arrow_open",a="normal";if(r.includes("."))a="dotted";return{type:"arrow_open",stroke:a}}countChar(e,r){let n=r.length,a=0;for(let c=0;c<n;++c)if(r[c]===e)++a;return a}destructEndLink(e){let r=e.trim(),n=r.slice(0,-1),a="arrow_open";switch(r.slice(-1)){case"x":a="arrow_cross";break;case">":a="arrow_point";break;case"-":case".":a="arrow_open",n=r;break}let c="normal",d=n.length-1,o=this.countChar(".",n);if(o>0)c="dotted",d=o;return{type:a,stroke:c,length:d}}destructLink(e,r){let n=this.destructEndLink(e),a;if(r){if(a=this.destructStartLink(r),a.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};return a.type=n.type,a.length=n.length,{...a,edgeSemantic:this.computeEdgeSemantic(a.type,a.stroke)}}return{...n,edgeSemantic:this.computeEdgeSemantic(n.type,n.stroke)}}exists(e,r){for(let n of e)if(n.nodes.includes(r))return!0;return!1}makeUniq(e,r){let n=[];return e.nodes.forEach((a,c)=>{if(!this.exists(r,a))n.push(e.nodes[c])}),{nodes:n}}getTypeFromVertex(e){let r=typeof e.type==="string"?ht(e.type):e.type;switch(r){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return r}}findNode(e,r){return e.find((n)=>n.id===r)}destructEdgeType(e){let r="none",n="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":case"arrow_hierarchy":n=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(e,r,n,a,c,d){let o=n.get(e.id),h=a.get(e.id)??!1,k=this.findNode(r,e.id);if(k)k.cssStyles=e.styles,k.cssCompiledStyles=this.getCompiledStyles(e.classes),k.cssClasses=e.classes.join(" ");else{let g={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:o,padding:c.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:d,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),metadata:e.metadata};if(h)r.push({...g,isGroup:!0,shape:"rect"});else r.push({...g,isGroup:!1,shape:this.getTypeFromVertex(e),wrappingWidth:c.agentflow?.wrappingWidth,minWidth:c.agentflow?.minNodeWidth})}}getCompiledStyles(e){let r=[];for(let n of e){let a=this.classes.get(n);if(a?.styles)r=[...r,...a.styles??[]].map((c)=>c.trim());if(a?.textStyles)r=[...r,...a.textStyles??[]].map((c)=>c.trim())}return r}runPostParseValidators(){if(this.postParseValidationRun)return;this.postParseValidationRun=!0}getData(){this.runPostParseValidators();let e=m(),r=[],n=[],a=this.getSubGraphs(),c=new Map,d=new Map,o=new Set,h=new Map,k=t((p,f,_=new Set)=>{if(_.has(p))return;_.add(p);let Y=this.subGraphLookup.get(p);if(!Y)return;for(let fe of Y.nodes){if(fe===f||_.has(fe))continue;o.add(fe),h.set(fe,f),k(fe,f,_)}},"collectDescendants");for(let p of a)if(p.metadata?.view==="collapsed"&&!o.has(p.id))k(p.id,p.id);let g=t((p,f)=>{let _=new Set,Y=f;while(Y!==void 0&&!_.has(Y)){if(Y===p)return!0;_.add(Y),Y=c.get(Y)}return!1},"wouldCloseContainmentCycle");for(let p=a.length-1;p>=0;p--){let f=a[p];if(o.has(f.id))continue;if(f.nodes.length>0)d.set(f.id,!0);for(let _ of f.nodes){if(g(_,f.id)){this.emitWarning(pt.CONTAINMENT_VIOLATION,`Container "${f.id}" cannot contain "${_}" because "${_}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:_});continue}c.set(_,f.id)}}for(let p=a.length-1;p>=0;p--){let f=a[p];if(o.has(f.id))continue;if(f.metadata?.view==="collapsed"){let Y={...f.metadata,containerType:f.type};r.push({id:f.id,label:f.title,labelStyle:"",labelType:f.labelType,parentId:c.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssClasses:f.classes.join(" "),shape:"collapsedGroup",dir:f.dir,isGroup:!1,look:e.look,metadata:Y})}else r.push({id:f.id,label:f.title,labelStyle:"",labelType:f.labelType,parentId:c.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssClasses:f.classes.join(" "),shape:G1[f.type??"flow"],dir:f.dir,isGroup:!0,look:e.look,metadata:f.metadata})}this.getVertices().forEach((p)=>{if(o.has(p.id))return;this.addNodeFromVertex(p,r,c,d,e,e.look||"classic")});let C=this.getEdges();C.forEach((p,f)=>{let _=h.get(p.start)??p.start,Y=h.get(p.end)??p.end;if(_===Y&&p.start!==p.end)return;let{arrowTypeStart:fe,arrowTypeEnd:Se}=this.destructEdgeType(p.type),Ee=[...C.defaultStyle??[]];if(p.style)Ee.push(...p.style);let xe={id:Pn(_,Y,{counter:f,prefix:"L"},p.id),isUserDefinedId:p.isUserDefinedId,start:_,end:Y,type:p.type??"normal",label:p.text,labelType:p.labelType,labelpos:"c",thickness:p.stroke,minlen:p.length,classes:p?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:p?.stroke==="invisible"||p?.type==="arrow_open"?"none":fe,arrowTypeEnd:p?.stroke==="invisible"||p?.type==="arrow_open"?"none":Se,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(p.classes),labelStyle:Ee,style:Ee,pattern:p.stroke,look:e.look,animate:p.animate,animation:p.animation,curve:p.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve,metadata:p.metadata};n.push(xe)}),E1(r,this);let B=new Map,D=new Map;for(let p of a){let f=c.get(p.id);if(f!==void 0)D.set(f,[...D.get(f)??[],p.id])}let P=0,v=t((p)=>{if(B.has(p))return;B.set(p,P++);for(let f of D.get(p)??[])v(f)},"walkContainers");for(let p of a)if(c.get(p.id)===void 0)v(p.id);let E=new Set(this.getConnectors().map((p)=>p.id));return D1(r,(p)=>{if(E.has(p))return"connector";let f=this.vertices.get(p);return f?this.deriveVertexKind(f,ht(f.type)):void 0},B),{nodes:r,edges:n,other:{},config:e,connectors:this.getConnectors()}}defaultConfig(){return Zi.flowchart}deriveVertexKind(e,r){if(this.isToolDefinition(e))return"tool";if(r==="hexagon"||r==="hex")return"action";if(r==="lean-right"||r==="lean_right")return"input";if(r==="lin-doc"||r==="lined-document")return"refdoc";if(r==="diamond")return"decision";return"task"}getSemanticModel(){this.runPostParseValidators();let e=new Set(this.subGraphs.map((o)=>o.id)),r=[],n=[];for(let[o,h]of this.vertices){if(e.has(o))continue;if(h.isConnector){let A={id:o};if(h.text!==void 0&&h.text!==o)A.title=h.text;if(h.metadata&&Object.keys(h.metadata).length>0){let C={};for(let[B,D]of Object.entries(h.metadata)){if(i1.has(B))continue;C[B]=D}if(Object.keys(C).length>0)A.metadata=C}n.push(A);continue}let k={id:o};if(h.text!==void 0)k.label=h.text;let g=typeof h.type==="string"?ht(h.type):h.type;if(g!==void 0)k.shape=g;if(k.vertexKind=this.deriveVertexKind(h,g),h.metadata&&Object.keys(h.metadata).length>0){let A={};for(let[C,B]of Object.entries(h.metadata)){if(i1.has(C))continue;A[C]=B}if(Object.keys(A).length>0)k.metadata=A}r.push(k)}let a=this.edges.map((o)=>{let h={start:o.start,end:o.end};if(o.id!==void 0)h.id=o.id;if(typeof o.text==="string"&&o.text.length>0)h.label=o.text;if(o.type!==void 0)h.type=o.type;if(o.stroke!==void 0)h.stroke=o.stroke;if(o.edgeSemantic!==void 0)h.edgeSemantic=o.edgeSemantic;if(o.length!==void 0)h.length=o.length;if(o.metadata&&Object.keys(o.metadata).length>0)h.metadata={...o.metadata};return h}),c=this.subGraphs.map((o)=>{let h={id:o.id,nodes:[...o.nodes]};if(o.type!==void 0)h.type=o.type;if(o.title!==void 0)h.title=o.title;if(o.dir!==void 0)h.direction=o.dir;if(o.metadata&&Object.keys(o.metadata).length>0){let k={};for(let[g,A]of Object.entries(o.metadata)){if(i1.has(g))continue;k[g]=A}if(Object.keys(k).length>0)h.metadata=k}return h}),d={vertices:r,edges:a,subGraphs:c,connectors:n,diagnostics:this.diagnostics};if(this.direction!==void 0)d.direction=this.direction;return d}setFrontmatterLineOffset(e){this.frontmatterLineOffset=e??0}toElementPosition(e){let r=e?.first_line??0,n=e?.first_column??0,a=e?.last_line??r,c=e?.last_column??n,[d,o]=e?.range??[0,0];return{startLine:r+this.frontmatterLineOffset,startColumn:n,endLine:a+this.frontmatterLineOffset,endColumn:c,startIndex:d,endIndex:o}}pushMapping(e,r,n){if(!e)return;let a={id:e,type:r,position:this.toElementPosition(n)};return this.elementMappings.push(a),a}addVertexMapping(e,r,n,a){let c=this.pushMapping(e,"vertex",a);if(c&&n==null)this.bareVertexMappings.add(c)}extendVertexMapping(e,r){if(!e||!r)return;let n=this.toElementPosition(r);for(let a=this.elementMappings.length-1;a>=0;a--){let c=this.elementMappings[a];if(c.type==="vertex"&&c.id===e){if(this.bareVertexMappings.has(c))c.type="attachment",this.bareVertexMappings.delete(c);if(n.endLine>c.position.endLine||n.endLine===c.position.endLine&&n.endColumn>c.position.endColumn)c.position.endLine=n.endLine,c.position.endColumn=n.endColumn,c.position.endIndex=n.endIndex;return}}this.pushMapping(e,"attachment",r)}addEdgeMapping(e,r,n,a){let c=Array.isArray(r)?r.map((o)=>typeof o==="string"?o:o?.id??"").filter(Boolean):[],d=c.length>0?c.join(">"):"edge";this.pushMapping(d,"edge",a)}addSubgraphMapping(e,r,n,a){let c=(typeof e==="string"?e:e?.text)??"",d=this.toElementPosition(n),o=a?this.toElementPosition(a):d;if(!c)return;this.elementMappings.push({id:c,type:"subgraph",position:{startLine:d.startLine,startColumn:d.startColumn,endLine:o.endLine,endColumn:o.endColumn,startIndex:d.startIndex,endIndex:o.endIndex}})}addConnectorMapping(e,r,n,a){let c=e?.text?.trim()??"";if(!c)return;let d=this.toElementPosition(n),o=a?this.toElementPosition(a):d;this.elementMappings.push({id:c,type:"connector",position:{startLine:d.startLine,startColumn:d.startColumn,endLine:o.endLine,endColumn:o.endColumn,startIndex:d.startIndex,endIndex:o.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(e){return this.elementMappings.find((r)=>r.id===e)}getElementsOnLine(e){return this.elementMappings.filter((r)=>e>=r.position.startLine&&e<=r.position.endLine)}getElementAtPosition(e,r){let n=this.elementMappings.filter((c)=>{let{startLine:d,startColumn:o,endLine:h,endColumn:k}=c.position;if(e<d||e>h)return!1;if(e===d&&r<o)return!1;if(e===h&&r>k)return!1;return!0});if(n.length===0)return;let a=t(({position:c})=>[c.endLine-c.startLine,c.endColumn-c.startColumn],"span");return n.reduce((c,d)=>{let[o,h]=a(c),[k,g]=a(d);if(k!==o)return k<o?d:c;return g<h?d:c})}getMappingStats(){let e=0,r=0,n=0,a=0,c=0;for(let d of this.elementMappings)if(d.type==="vertex")e++;else if(d.type==="edge")r++;else if(d.type==="subgraph")n++;else if(d.type==="connector")a++;else if(d.type==="attachment")c++;return{vertices:e,edges:r,subgraphs:n,connectors:a,attachments:c,totalElements:this.elementMappings.length}}emitDiagnostic(e,r,n,a){let c=a?.nodeId??a?.edgeId,d=c?this.getElementById(c):void 0,o={id:e,severity:r,message:n,...a?.nodeId?{nodeId:a.nodeId}:{},...a?.edgeId&&!a?.nodeId?{edgeId:a.edgeId}:{},...d?{position:d.position}:{}};if(this.diagnostics.some((g)=>g.id===o.id&&g.severity===o.severity&&g.message===o.message&&g.nodeId===o.nodeId&&g.edgeId===o.edgeId))return;this.diagnostics.push(o);let k=`agentflow[${e}]: ${n}`;if(r==="error")l.error(k);else l.warn(k)}emitWarning(e,r,n){this.emitDiagnostic(e,"warning",r,n)}emitError(e,r,n){this.emitDiagnostic(e,"error",r,n)}getDiagnostics(){return[...this.diagnostics]}},j1=t(function(e,r){return r.db.getClasses()},"getClasses"),z1=t(async function(e,r,n,a){l.debug("Drawing agentflow diagram",r);let{securityLevel:c,agentflow:d,layout:o}=m();a.db.setDiagramId(r),l.debug("Before getData: ");let h=a.db.getData();l.debug("Data: ",h);let k=$t(r,c),g=a.db.getDirection();if(h.type=a.type,h.layoutAlgorithm=Ot(o),h.layoutAlgorithm==="dagre"&&o==="elk")l.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback.");h.direction=g,h.nodeSpacing=d?.nodeSpacing||50,h.rankSpacing=d?.rankSpacing||50,h.markers=["point","circle","cross","hierarchy"],h.diagramId=r,l.debug("REF1:",h),await Pt(h,k);let A=d?.diagramPadding??8;V.insertTitle(k,"agentflowTitleText",d?.titleTopMargin??0,a.db.getDiagramTitle()),vt(k,A,"agentflow",d?.useMaxWidth??!0)},"draw"),W1={getClasses:j1,draw:z1},r1=function(){var e=t(function(we,S,x,T){for(x=x||{},T=we.length;T--;x[we[T]]=S);return x},"o"),r=[1,5],n=[1,4],a=[1,3],c=[1,6],d=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],o=[2,2],h=[1,15],k=[1,16],g=[1,17],A=[1,18],C=[1,19],B=[1,26],D=[1,27],P=[1,28],v=[1,30],E=[1,31],p=[1,32],f=[1,55],_=[1,54],Y=[1,34],fe=[1,35],Se=[1,36],Ee=[1,37],xe=[1,38],Q=[1,50],J=[1,52],Z=[1,48],ee=[1,53],te=[1,49],se=[1,56],ie=[1,51],re=[1,57],ne=[1,58],Ne=[1,39],Re=[1,40],Oe=[1,41],Pe=[1,42],Ge=[1,43],Me=[1,64],I=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],ce=[1,70],de=[1,68],he=[1,67],pe=[1,69],We=[8,9,10,12,78,80,81],Ke=[1,88],He=[1,101],Ye=[1,106],qe=[1,105],Xe=[1,102],Qe=[1,98],Je=[1,104],Ze=[1,100],$e=[1,107],et=[1,103],tt=[1,108],st=[1,99],Ue=[8,9,10,11,12,43,78,80,81],oe=[8,9,10,11,12,43,49,78,80,81],be=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],n1=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],it=[47,63,92,105,108,109,112,114,117,118,119],a1=[1,131],o1=[1,132],ft=[1,134],gt=[1,133],u1=[47,63,65,77,92,105,108,109,112,114,117,118,119],kt=[1,143],mt=[1,157],At=[1,158],Et=[1,159],Ct=[1,162],St=[1,161],xt=[1,160],Tt=[1,145],Dt=[1,147],_t=[1,151],l1=[1,139],c1=[1,140],Ft=[1,152],Vt=[1,153],It=[1,154],Lt=[1,155],Bt=[1,156],Mt=[1,163],wt=[1,164],Nt=[1,141],Rt=[1,142],Gt=[1,149],Ut=[1,144],jt=[1,148],zt=[1,146],rt=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],d1=[1,168],nt=[1,170],X=[8,9,10,12],ke=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],M=[1,190],ue=[1,186],le=[1,187],y=[1,191],N=[1,188],R=[1,189],at=[80,119,122],U=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],h1=[11,109],ye=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],Te=[1,269],De=[1,267],_e=[1,271],ve=[1,265],Fe=[1,266],Ve=[1,268],Ie=[1,270],Le=[1,272],ot=[1,292],p1=[8,9,10,12,109],Ce=[8,9,10,11,12,63,87,108,109,112,113,114,115],Qt={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:"error",8:"COMMENT",9:"SEMI",10:"NEWLINE",11:"SPACE",12:"EOF",13:"GRAPH",14:"NODIR",15:"DIR",28:"flow",30:"SQS",32:"SQE",33:"end",35:"global",36:"connector",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"SHAPE_DATA",47:"AMP",49:"STYLE_SEPARATOR",51:"DOUBLECIRCLESTART",52:"DOUBLECIRCLEEND",53:"PS",54:"PE",55:"(-",56:"-)",57:"STADIUMSTART",58:"STADIUMEND",59:"SUBROUTINESTART",60:"SUBROUTINEEND",61:"VERTEX_WITH_PROPS_START",62:"NODE_STRING[field]",63:"COLON",64:"NODE_STRING[value]",65:"PIPE",66:"CYLINDERSTART",67:"CYLINDEREND",68:"DIAMOND_START",69:"DIAMOND_STOP",70:"TAGEND",71:"TRAPSTART",72:"TRAPEND",73:"INVTRAPSTART",74:"INVTRAPEND",77:"TESTSTR",78:"START_LINK",80:"LINK",81:"LINK_ID",83:"STR",84:"MD_STR",87:"STYLE",88:"LINKSTYLE",89:"CLASSDEF",90:"CLASS",91:"CLICK",92:"DOWN",93:"UP",96:"idString[vertex]",97:"idString[class]",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"STR[link]",103:"STR[tooltip]",105:"DEFAULT",107:"INTERPOLATE",108:"NUM",109:"COMMA",112:"NODE_STRING",113:"UNIT",114:"BRKT",115:"PCT",117:"MINUS",118:"MULT",119:"UNICODE_TEXT",120:"TEXT",121:"TAGSTART",122:"EDGE_TEXT",124:"direction_tb",125:"direction_bt",126:"direction_rl",127:"direction_lr",128:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:t(function(S,x,T,u,W,s,L){var i=s.length-1;switch(W){case 2:this.$=[];break;case 3:if(!Array.isArray(s[i])||s[i].length>0)s[i-1].push(s[i]);this.$=s[i-1];break;case 4:case 198:this.$=s[i];break;case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 13:u.setDirection("TB"),this.$="TB";break;case 14:u.setDirection(s[i-1]),this.$=s[i-1];break;case 32:this.$=s[i-1].nodes;break;case 38:if(this.$=u.addSubGraph(s[i-6],s[i-1],s[i-4],"flow"),u.addSubgraphMapping)u.addSubgraphMapping(s[i-6],s[i-4],L[i-8],L[i]);break;case 39:if(this.$=u.addSubGraph(s[i-7],s[i-1],s[i-5],"flow"),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],L[i-3]),u.addSubgraphMapping)u.addSubgraphMapping(s[i-7],s[i-5],L[i-9],L[i]);break;case 40:if(this.$=u.addSubGraph(s[i-3],s[i-1],{text:"",type:"text"},"flow"),u.addSubgraphMapping)u.addSubgraphMapping(s[i-3],{text:"",type:"text"},L[i-5],L[i]);break;case 41:if(this.$=u.addSubGraph(s[i-4],s[i-1],{text:"",type:"text"},"flow"),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],L[i-3]),u.addSubgraphMapping)u.addSubgraphMapping(s[i-4],{text:"",type:"text"},L[i-6],L[i]);break;case 42:if(this.$=u.addSubGraph(void 0,s[i-1],void 0,"flow"),u.addSubgraphMapping)u.addSubgraphMapping(void 0,void 0,L[i-3],L[i]);break;case 43:u.addGlobal(s[i-1]),this.$=[];break;case 44:if(this.$=u.addConnector(s[i-4],s[i-2]),u.addConnectorMapping)u.addConnectorMapping(s[i-4],s[i-2],L[i-6],L[i]);break;case 45:if(this.$=u.addConnector(s[i-5],s[i-3]),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],L[i-1]),u.addConnectorMapping)u.addConnectorMapping(s[i-5],s[i-3],L[i-7],L[i]);break;case 46:if(this.$=u.addConnector(s[i-1],{text:"",type:"text"}),u.addConnectorMapping)u.addConnectorMapping(s[i-1],{text:"",type:"text"},L[i-3],L[i]);break;case 47:if(this.$=u.addConnector(s[i-2],{text:"",type:"text"}),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],L[i-1]),u.addConnectorMapping)u.addConnectorMapping(s[i-2],{text:"",type:"text"},L[i-4],L[i]);break;case 49:this.$=s[i].trim(),u.setAccTitle(this.$);break;case 50:case 51:this.$=s[i].trim(),u.setAccDescription(this.$);break;case 56:this.$=s[i-1]+s[i];break;case 57:this.$=s[i];break;case 58:if(u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],L[i]),u.extendVertexMapping)u.extendVertexMapping(s[i-1][s[i-1].length-1],L[i]);if(u.addLink(s[i-3].stmt,s[i-1],s[i-2]),u.addEdgeMapping)u.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 59:if(u.addLink(s[i-2].stmt,s[i],s[i-1]),u.addEdgeMapping)u.addEdgeMapping(s[i-2].stmt,s[i],s[i-1],this._$);this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 60:if(u.addLink(s[i-3].stmt,s[i-1],s[i-2]),u.addEdgeMapping)u.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 61:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 62:if(u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],L[i]),u.extendVertexMapping)u.extendVertexMapping(s[i-1][s[i-1].length-1],L[i]);this.$={stmt:s[i-1],nodes:s[i-1],shapeData:s[i]};break;case 63:this.$={stmt:s[i],nodes:s[i]};break;case 64:this.$=[s[i]];break;case 65:if(u.addVertex(s[i-5][s[i-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-4],L[i-4]),u.extendVertexMapping)u.extendVertexMapping(s[i-5][s[i-5].length-1],L[i-4]);this.$=s[i-5].concat(s[i]);break;case 66:this.$=s[i-4].concat(s[i]);break;case 67:this.$=s[i];break;case 68:this.$=s[i-2],u.setClass(s[i-2],s[i]);break;case 69:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"square"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"square",this._$);break;case 70:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"doublecircle"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"doublecircle",this._$);break;case 71:if(this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"circle"),u.addVertexMapping)u.addVertexMapping(s[i-5],s[i-2],"circle",this._$);break;case 72:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"ellipse"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"ellipse",this._$);break;case 73:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"stadium"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"stadium",this._$);break;case 74:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"subroutine"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"subroutine",this._$);break;case 75:if(this.$=s[i-7],u.addVertex(s[i-7],s[i-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[i-5],s[i-3]]])),u.addVertexMapping)u.addVertexMapping(s[i-7],s[i-1],"rect",this._$);break;case 76:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"cylinder"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"cylinder",this._$);break;case 77:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"round"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"round",this._$);break;case 78:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"diamond"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"diamond",this._$);break;case 79:if(this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"hexagon"),u.addVertexMapping)u.addVertexMapping(s[i-5],s[i-2],"hexagon",this._$);break;case 80:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"odd"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"odd",this._$);break;case 81:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"trapezoid"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"trapezoid",this._$);break;case 82:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"inv_trapezoid"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"inv_trapezoid",this._$);break;case 83:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_right"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"lean_right",this._$);break;case 84:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_left"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"lean_left",this._$);break;case 85:if(this.$=s[i],u.addVertex(s[i]),u.addVertexMapping)u.addVertexMapping(s[i],void 0,void 0,this._$);break;case 86:s[i-1].text=s[i],this.$=s[i-1];break;case 87:case 88:s[i-2].text=s[i-1],this.$=s[i-2];break;case 89:this.$=s[i];break;case 90:var K=u.destructLink(s[i],s[i-2]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic,text:s[i-1]};break;case 91:var K=u.destructLink(s[i],s[i-2]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic,text:s[i-1],id:s[i-3]};break;case 92:this.$={text:s[i],type:"text"};break;case 93:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 94:this.$={text:s[i],type:"string"};break;case 95:this.$={text:s[i],type:"markdown"};break;case 96:var K=u.destructLink(s[i]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic};break;case 97:var K=u.destructLink(s[i]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic,id:s[i-1]};break;case 98:this.$=s[i-1];break;case 99:this.$={text:s[i],type:"text"};break;case 100:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 101:this.$={text:s[i],type:"string"};break;case 102:case 119:this.$={text:s[i],type:"markdown"};break;case 116:this.$={text:s[i],type:"text"};break;case 117:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 118:this.$={text:s[i],type:"text"};break;case 120:this.$=s[i-4],u.addClass(s[i-2],s[i]);break;case 121:this.$=s[i-4],u.setClass(s[i-2],s[i]);break;case 122:case 130:this.$=s[i-1],u.setClickEvent(s[i-1],s[i]);break;case 123:case 131:this.$=s[i-3],u.setClickEvent(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 124:this.$=s[i-2],u.setClickEvent(s[i-2],s[i-1],s[i]);break;case 125:this.$=s[i-4],u.setClickEvent(s[i-4],s[i-3],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 126:this.$=s[i-2],u.setLink(s[i-2],s[i]);break;case 127:this.$=s[i-4],u.setLink(s[i-4],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 128:this.$=s[i-4],u.setLink(s[i-4],s[i-2],s[i]);break;case 129:this.$=s[i-6],u.setLink(s[i-6],s[i-4],s[i]),u.setTooltip(s[i-6],s[i-2]);break;case 132:this.$=s[i-1],u.setLink(s[i-1],s[i]);break;case 133:this.$=s[i-3],u.setLink(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 134:this.$=s[i-3],u.setLink(s[i-3],s[i-2],s[i]);break;case 135:this.$=s[i-5],u.setLink(s[i-5],s[i-4],s[i]),u.setTooltip(s[i-5],s[i-2]);break;case 136:this.$=s[i-4],u.addVertex(s[i-2],void 0,void 0,s[i]);break;case 137:this.$=s[i-4],u.updateLink([s[i-2]],s[i]);break;case 138:this.$=s[i-4],u.updateLink(s[i-2],s[i]);break;case 139:this.$=s[i-8],u.updateLinkInterpolate([s[i-6]],s[i-2]),u.updateLink([s[i-6]],s[i]);break;case 140:this.$=s[i-8],u.updateLinkInterpolate(s[i-6],s[i-2]),u.updateLink(s[i-6],s[i]);break;case 141:this.$=s[i-6],u.updateLinkInterpolate([s[i-4]],s[i]);break;case 142:this.$=s[i-6],u.updateLinkInterpolate(s[i-4],s[i]);break;case 143:case 145:this.$=[s[i]];break;case 144:case 146:s[i-2].push(s[i]),this.$=s[i-2];break;case 148:this.$=s[i-1]+s[i];break;case 196:this.$=s[i];break;case 197:this.$=s[i-1]+""+s[i];break;case 199:this.$=s[i-1]+""+s[i];break;case 200:this.$={stmt:"dir",value:"TB"};break;case 201:this.$={stmt:"dir",value:"BT"};break;case 202:this.$={stmt:"dir",value:"RL"};break;case 203:this.$={stmt:"dir",value:"LR"};break;case 204:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,8:r,10:n,11:a,13:c},{1:[3]},e(d,o,{5:7}),{4:8,8:r,10:n,11:a,13:c},{4:9,8:r,10:n,11:a,13:c},{4:10,8:r,10:n,11:a,13:c},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:B,35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(d,[2,10]),e(d,[2,11]),e(d,[2,12]),e(d,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:Me,16:59,19:62},e(I,[2,3]),e(I,[2,4]),e(I,[2,5]),e(I,[2,6]),e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),{8:ce,9:de,10:he,12:pe,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:ce,9:de,10:he,12:pe,22:75},{8:ce,9:de,10:he,12:pe,22:76},{8:ce,9:de,10:he,12:pe,22:77},{8:ce,9:de,10:he,12:pe,22:78},{8:ce,9:de,10:he,12:pe,22:79},{8:ce,9:de,10:he,11:[1,80],12:pe,22:81},{8:ce,9:de,10:he,12:pe,22:82},{11:[1,83]},e(I,[2,48]),{39:[1,84]},{41:[1,85]},e(I,[2,51]),e(We,[2,63],{19:86,34:87,11:Me,43:Ke}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:He,47:Ye,63:qe,83:[1,96],92:Xe,98:[1,93],100:[1,94],104:95,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st,123:97},e(I,[2,200]),e(I,[2,201]),e(I,[2,202]),e(I,[2,203]),e(I,[2,204]),e(Ue,[2,64]),e(Ue,[2,67],{49:[1,109]}),e(oe,[2,85],{116:122,30:[1,110],47:f,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:_,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),e(be,[2,196]),e(be,[2,157]),e(be,[2,158]),e(be,[2,159]),e(be,[2,160]),e(be,[2,161]),e(be,[2,162]),e(be,[2,163]),e(be,[2,164]),e(be,[2,165]),e(be,[2,166]),e(be,[2,167]),e(d,[2,14]),e(d,[2,20]),e(d,[2,21]),{10:[1,123]},e(d,[2,23]),e(n1,[2,31],{19:124,11:Me}),e(I,[2,32]),{45:125,46:44,47:f,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(I,[2,52]),e(I,[2,53]),e(I,[2,54]),e(I,[2,55]),e(it,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:a1,84:o1,119:ft,122:gt},{78:[1,135],80:[1,136]},e(u1,[2,96]),e(I,[2,33]),e(I,[2,34]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),{11:kt,13:mt,15:At,28:Et,29:137,33:Ct,35:St,36:xt,47:Tt,63:Dt,78:_t,83:l1,84:c1,86:150,87:Ft,88:Vt,89:It,90:Lt,91:Bt,92:Mt,93:wt,94:138,108:Nt,112:Rt,114:Gt,117:Ut,118:jt,119:zt},e(rt,o,{5:165}),e(rt,o,{5:166}),{11:kt,13:mt,15:At,28:Et,29:167,33:Ct,35:St,36:xt,47:Tt,63:Dt,78:_t,83:l1,84:c1,86:150,87:Ft,88:Vt,89:It,90:Lt,91:Bt,92:Mt,93:wt,94:138,108:Nt,112:Rt,114:Gt,117:Ut,118:jt,119:zt},e(I,[2,49]),e(I,[2,50]),e(We,[2,61],{47:d1}),e(We,[2,62],{19:169,11:Me,43:nt}),e(Ue,[2,57]),{47:f,50:171,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{105:[1,172],106:173,108:[1,174]},{47:f,50:175,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{47:f,50:176,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},e(X,[2,130],{123:181,11:[1,180],15:He,47:Ye,63:qe,92:Xe,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st}),e(X,[2,132],{11:[1,182]}),e(ke,[2,198]),e(ke,[2,185]),e(ke,[2,186]),e(ke,[2,187]),e(ke,[2,188]),e(ke,[2,189]),e(ke,[2,190]),e(ke,[2,191]),e(ke,[2,192]),e(ke,[2,193]),e(ke,[2,194]),e(ke,[2,195]),{47:f,50:183,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{31:184,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:192,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:194,53:[1,193],70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:195,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:196,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:197,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{112:[1,198]},{31:199,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:200,68:[1,201],70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:202,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:203,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:204,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},e(be,[2,197]),e(d,[2,22]),e(n1,[2,30]),e(We,[2,59],{34:205,19:206,11:Me,43:Ke}),e(it,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{80:[1,210],82:211,119:ft,122:gt},e(at,[2,92]),e(at,[2,94]),e(at,[2,95]),e(at,[2,183]),e(at,[2,184]),{79:212,82:130,83:a1,84:o1,119:ft,122:gt},e(u1,[2,97]),{8:ce,9:de,10:he,11:kt,12:pe,13:mt,15:At,22:214,28:Et,30:[1,213],33:Ct,34:215,35:St,36:xt,43:Ke,47:Tt,63:Dt,78:_t,86:150,87:Ft,88:Vt,89:It,90:Lt,91:Bt,92:Mt,93:wt,94:216,108:Nt,112:Rt,114:Gt,117:Ut,118:jt,119:zt},e(U,[2,116]),e(U,[2,118]),e(U,[2,119]),e(U,[2,172]),e(U,[2,173]),e(U,[2,174]),e(U,[2,175]),e(U,[2,176]),e(U,[2,177]),e(U,[2,178]),e(U,[2,179]),e(U,[2,180]),e(U,[2,181]),e(U,[2,182]),e(U,[2,103]),e(U,[2,104]),e(U,[2,105]),e(U,[2,106]),e(U,[2,107]),e(U,[2,108]),e(U,[2,109]),e(U,[2,110]),e(U,[2,111]),e(U,[2,112]),e(U,[2,113]),e(U,[2,114]),e(U,[2,115]),{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:B,33:[1,217],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:B,33:[1,218],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},{8:ce,9:de,10:he,11:kt,12:pe,13:mt,15:At,22:220,28:Et,30:[1,219],33:Ct,34:221,35:St,36:xt,43:Ke,47:Tt,63:Dt,78:_t,86:150,87:Ft,88:Vt,89:It,90:Lt,91:Bt,92:Mt,93:wt,94:216,108:Nt,112:Rt,114:Gt,117:Ut,118:jt,119:zt},{11:Me,19:222},{47:[1,223]},e(Ue,[2,56]),{11:[1,224],47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,225]},{11:[1,226],109:[1,227]},e(h1,[2,143]),{11:[1,228],47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,229],47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{83:[1,230]},e(X,[2,124],{11:[1,231]}),e(X,[2,126],{11:[1,232]}),{83:[1,233]},e(ke,[2,199]),{83:[1,234],101:[1,235]},e(Ue,[2,68],{116:122,47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),{32:[1,236],70:M,85:237,119:y,120:N,121:R},e(ye,[2,99]),e(ye,[2,101]),e(ye,[2,102]),e(ye,[2,168]),e(ye,[2,169]),e(ye,[2,170]),e(ye,[2,171]),{52:[1,238],70:M,85:237,119:y,120:N,121:R},{31:239,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{54:[1,240],70:M,85:237,119:y,120:N,121:R},{56:[1,241],70:M,85:237,119:y,120:N,121:R},{58:[1,242],70:M,85:237,119:y,120:N,121:R},{60:[1,243],70:M,85:237,119:y,120:N,121:R},{63:[1,244]},{67:[1,245],70:M,85:237,119:y,120:N,121:R},{69:[1,246],70:M,85:237,119:y,120:N,121:R},{31:247,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{32:[1,248],70:M,85:237,119:y,120:N,121:R},{70:M,72:[1,249],74:[1,250],85:237,119:y,120:N,121:R},{70:M,72:[1,252],74:[1,251],85:237,119:y,120:N,121:R},e(We,[2,58],{19:169,11:Me,43:nt}),e(We,[2,60],{47:d1}),e(it,[2,88]),e(it,[2,87]),{65:[1,253],70:M,85:237,119:y,120:N,121:R},e(it,[2,90]),e(at,[2,93]),{80:[1,254],82:211,119:ft,122:gt},{31:255,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},e(rt,o,{5:256}),{8:ce,9:de,10:he,12:pe,22:257,43:nt},e(U,[2,117]),e(I,[2,42]),e(I,[2,43]),{31:258,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},e(I,[2,46]),{8:ce,9:de,10:he,12:pe,22:259,43:nt},{46:260,47:f,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{11:Me,19:261},{11:Te,63:De,87:_e,95:262,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{11:Te,63:De,87:_e,95:273,107:[1,274],108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{11:Te,63:De,87:_e,95:275,107:[1,276],108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{108:[1,277]},{11:Te,63:De,87:_e,95:278,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{47:f,50:279,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},e(X,[2,131]),e(X,[2,133],{11:[1,283]}),e(X,[2,134]),e(oe,[2,69]),e(ye,[2,100]),e(oe,[2,70]),{54:[1,284],70:M,85:237,119:y,120:N,121:R},e(oe,[2,77]),e(oe,[2,72]),e(oe,[2,73]),e(oe,[2,74]),{112:[1,285]},e(oe,[2,76]),e(oe,[2,78]),{69:[1,286],70:M,85:237,119:y,120:N,121:R},e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,83]),e(oe,[2,82]),e(oe,[2,84]),e([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),e(it,[2,91]),{32:[1,287],70:M,85:237,119:y,120:N,121:R},{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:B,33:[1,288],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(rt,o,{5:289}),{32:[1,290],70:M,85:237,119:y,120:N,121:R},e(I,[2,47]),e(Ue,[2,66]),{46:291,47:f,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,136],{109:ot}),e(p1,[2,145],{111:293,11:Te,63:De,87:_e,108:ve,112:Fe,113:Ve,114:Ie,115:Le}),e(Ce,[2,147]),e(Ce,[2,149]),e(Ce,[2,150]),e(Ce,[2,151]),e(Ce,[2,152]),e(Ce,[2,153]),e(Ce,[2,154]),e(Ce,[2,155]),e(Ce,[2,156]),e(X,[2,137],{109:ot}),{11:[1,294]},e(X,[2,138],{109:ot}),{11:[1,295]},e(h1,[2,144]),e(X,[2,120],{109:ot}),e(X,[2,121],{116:122,47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),e(X,[2,125]),e(X,[2,127],{11:[1,296]}),e(X,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:ce,9:de,10:he,12:pe,22:301,34:302,43:Ke},e(I,[2,40]),{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:B,33:[1,303],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},{8:ce,9:de,10:he,12:pe,22:304,34:305,43:Ke},e(Ue,[2,65]),{11:Te,63:De,87:_e,108:ve,110:306,111:264,112:Fe,113:Ve,114:Ie,115:Le},e(Ce,[2,148]),{15:He,47:Ye,63:qe,92:Xe,104:307,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st,123:97},{15:He,47:Ye,63:qe,92:Xe,104:308,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st,123:97},{101:[1,309]},e(X,[2,135]),e(oe,[2,71]),{31:310,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},e(oe,[2,79]),e(rt,o,{5:311}),{8:ce,9:de,10:he,12:pe,22:312,43:nt},e(I,[2,41]),e(I,[2,44]),{8:ce,9:de,10:he,12:pe,22:313,43:nt},e(p1,[2,146],{111:293,11:Te,63:De,87:_e,108:ve,112:Fe,113:Ve,114:Ie,115:Le}),e(X,[2,141],{123:181,11:[1,314],15:He,47:Ye,63:qe,92:Xe,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st}),e(X,[2,142],{123:181,11:[1,315],15:He,47:Ye,63:qe,92:Xe,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st}),e(X,[2,129]),{32:[1,316],70:M,85:237,119:y,120:N,121:R},{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:B,33:[1,317],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(rt,o,{5:318}),e(I,[2,45]),{11:Te,63:De,87:_e,95:319,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{11:Te,63:De,87:_e,95:320,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},e(oe,[2,75]),e(I,[2,38]),{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:B,33:[1,321],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(X,[2,139],{109:ot}),e(X,[2,140],{109:ot}),e(I,[2,39])],defaultActions:{},parseError:t(function(S,x){if(x.recoverable)this.trace(S);else{var T=Error(S);throw T.hash=x,T}},"parseError"),parse:t(function(S){var x=this,T=[0],u=[],W=[null],s=[],L=this.table,i="",K=0,f1=0,g1=0,I1=2,b1=1,L1=s.slice.call(arguments,1),ae=Object.create(this.lexer),je={yy:{}};for(var Jt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Jt))je.yy[Jt]=this.yy[Jt];if(ae.setInput(S,je.yy),je.yy.lexer=ae,je.yy.parser=this,typeof ae.yylloc>"u")ae.yylloc={};var Zt=ae.yylloc;s.push(Zt);var B1=ae.options&&ae.options.ranges;if(typeof je.yy.parseError==="function")this.parseError=je.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function M1(Ae){T.length=T.length-2*Ae,W.length=W.length-Ae,s.length=s.length-Ae}t(M1,"popStack");function k1(){var Ae=u.pop()||ae.lex()||b1;if(typeof Ae!=="number"){if(Ae instanceof Array)u=Ae,Ae=u.pop();Ae=x.symbols_[Ae]||Ae}return Ae}t(k1,"lex");var ge,e1,ze,me,Q1,t1,lt={},Kt,Be,m1,Yt;while(!0){if(ze=T[T.length-1],this.defaultActions[ze])me=this.defaultActions[ze];else{if(ge===null||typeof ge>"u")ge=k1();me=L[ze]&&L[ze][ge]}if(typeof me>"u"||!me.length||!me[0]){var s1="";Yt=[];for(Kt in L[ze])if(this.terminals_[Kt]&&Kt>I1)Yt.push("'"+this.terminals_[Kt]+"'");if(ae.showPosition)s1="Parse error on line "+(K+1)+`:
22
+ You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e==="object"&&"id"in e&&typeof e.id==="string"}addLink(e,r,n){let a=this.isLinkData(n)?n.id.replace("@",""):void 0;l.info("addLink",e,r,a);for(let c of e)for(let d of r){let o=c===e[e.length-1],h=d===r[0];if(o&&h)this.addSingleLink(c,d,n,a);else this.addSingleLink(c,d,n,void 0)}}updateLinkInterpolate(e,r){e.forEach((n)=>{if(n==="default"){this.edges.defaultInterpolate=r;return}if(typeof n==="number"&&n>=this.edges.length)throw Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);this.edges[n].interpolate=r})}updateLink(e,r){e.forEach((n)=>{if(typeof n==="number"&&n>=this.edges.length)throw Error(`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(n==="default")this.edges.defaultStyle=r;else if(this.edges[n].style=r,(this.edges[n]?.style?.length??0)>0&&!this.edges[n]?.style?.some((a)=>a?.startsWith("fill")))this.edges[n]?.style?.push("fill:none")})}addClass(e,r){let n=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach((a)=>{let c=this.classes.get(a);if(c===void 0)c={id:a,styles:[],textStyles:[]},this.classes.set(a,c);if(n!==void 0&&n!==null)n.forEach((d)=>{if(/color/.exec(d)){let o=d.replace("fill","bgFill");c.textStyles.push(o)}c.styles.push(d)})})}setDirection(e){if(this.direction=e.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(e,r){for(let n of e.split(",")){let a=this.vertices.get(n);if(a)a.classes.push(r);let c=this.edges.find((o)=>o.id===n);if(c)c.classes.push(r);let d=this.subGraphLookup.get(n);if(d)d.classes.push(r)}}setTooltip(e,r){if(r===void 0)return;r=this.sanitizeText(r);for(let n of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(n):n,r)}setClickFun(e,r,n){if(m().securityLevel!=="loose")return;if(r===void 0)return;let a=[];if(typeof n==="string"){a=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let d=0;d<a.length;d++){let o=a[d].trim();if(o.startsWith('"')&&o.endsWith('"'))o=o.substr(1,o.length-2);a[d]=o}}if(a.length===0)a.push(e);let c=this.vertices.get(e);if(c)c.haveCallback=!0,this.funs.push(()=>{let d=this.lookUpDomId(e),o=document.querySelector(`[id="${d}"]`);if(o!==null)o.addEventListener("click",()=>{V.runFunc(r,...a)},!1)})}setLink(e,r,n){e.split(",").forEach((a)=>{let c=this.vertices.get(a);if(c!==void 0)c.link=V.formatUrl(r,this.config),c.linkTarget=n}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,n){e.split(",").forEach((a)=>{this.setClickFun(a,r,n)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach((r)=>{r(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}isToolDefinition(e){return P1.has(e.type)}getTools(){let e=[];for(let r of this.vertices.values())if(this.isToolDefinition(r))e.push(r);return e}getClasses(){return this.classes}setupToolTips(e){let r=to();b(e).select("svg").selectAll("g.node").on("mouseover",(c)=>{let d=b(c.currentTarget),o=d.attr("title");if(o===null)return;let h=c.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(d.attr("title")).style("left",window.scrollX+h.left+(h.right-h.left)/2+"px").style("top",window.scrollY+h.bottom+"px"),r.html(Wt.sanitize(o)),d.classed("hover",!0)}).on("mouseout",(c)=>{r.transition().duration(500).style("opacity",0),b(c.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.globalNodes=new Set,this.connectors=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=m(),this.diagramId="",this.vertexCounter=0,this.direction=void 0,this.secCount=-1,this.posCrossRef=[],this.frontmatterLineOffset=0,this.elementMappings=[],this.bareVertexMappings=new WeakSet,this.diagnostics=[],this.postParseValidationRun=!1,F()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,n,a){let c=e?.text?.trim(),d=n?.text;if(e===n&&n?.text&&/\s/.exec(n.text))c=void 0;let h=t((D)=>{let P={boolean:{},number:{},string:{}},v=[],E;return{nodeList:D.filter(function(f){let _=typeof f;if(f.stmt&&f.stmt==="dir")return E=f.value,!1;if(f.trim()==="")return!1;if(_ in P)return P[_].hasOwnProperty(f)?!1:P[_][f]=!0;else return v.includes(f)?!1:v.push(f)}),dir:E}},"uniq")(r.flat()),{nodeList:k,dir:g}=h,A=m().flowchart??{};if(g=g??(A.inheritDir?this.getDirection()??m().direction??void 0:void 0),this.version==="gen-1")for(let D=0;D<k.length;D++)k[D]=this.lookUpDomId(k[D]);c=c??"subGraph"+this.subCount,d=d||"",d=this.sanitizeText(d),this.subCount=this.subCount+1;let C={id:c,nodes:k.filter((D)=>D!==c&&!this.globalNodes.has(D)),title:d.trim(),classes:[],dir:g,labelType:this.sanitizeNodeLabelType(n?.type),type:a??"flow"};l.info("Adding",C.id,C.nodes,C.dir),C.nodes=this.makeUniq(C,this.subGraphs).nodes;let B=this.getPosForId(c);if(B!==-1){let D=this.subGraphs[B];for(let P of C.nodes)if(!D.nodes.includes(P))D.nodes.push(P);if(C.title)D.title=C.title;if(C.dir)D.dir=C.dir;if(C.type)D.type=C.type;this.subGraphLookup.set(c,D)}else this.subGraphs.push(C),this.subGraphLookup.set(c,C);return c}addGlobal(e){for(let r of e.flat()){if(typeof r!=="string")continue;let n=r.trim();if(n!=="")this.globalNodes.add(n)}for(let r of this.subGraphs)r.nodes=r.nodes.filter((n)=>!this.globalNodes.has(n))}getPosForId(e){for(let[r,n]of this.subGraphs.entries())if(n.id===e)return r;return-1}indexNodes2(e,r){let n=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let a=0,c=1;while(a<n.length){let d=this.getPosForId(n[a]);if(d>=0){let o=this.indexNodes2(e,d);if(o.result)return{result:!0,count:c+o.count};else c=c+o.count}a=a+1}return{result:!1,count:c}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}addConnector(e,r){let n=e?.text?.trim();if(!n)return"";let a=r?.text?.trim()??"",c=a.length>0?this.sanitizeText(a):n,d=this.connectors.get(n);if(!d)d={id:n,labelType:"text",domId:A1+n+"-"+this.vertexCounter,styles:[],classes:[],isConnector:!0,text:c},this.connectors.set(n,d),this.vertices.set(n,d),this.vertexCounter++;else if(a.length>0)d.text=c;return n}getSubGraphs(){return this.subGraphs}getConnectors(){return[...this.connectors.values()]}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}computeEdgeSemantic(e,r){if(e==="arrow_point"&&r==="normal")return"sequence";if(e==="arrow_cross"&&r==="normal")return"failure";if(e==="arrow_open"&&r==="dotted")return"reference";return}destructStartLink(e){let r=e.trim(),n="arrow_open",a="normal";if(r.includes("."))a="dotted";return{type:"arrow_open",stroke:a}}countChar(e,r){let n=r.length,a=0;for(let c=0;c<n;++c)if(r[c]===e)++a;return a}destructEndLink(e){let r=e.trim(),n=r.slice(0,-1),a="arrow_open";switch(r.slice(-1)){case"x":a="arrow_cross";break;case">":a="arrow_point";break;case"-":case".":a="arrow_open",n=r;break}let c="normal",d=n.length-1,o=this.countChar(".",n);if(o>0)c="dotted",d=o;return{type:a,stroke:c,length:d}}destructLink(e,r){let n=this.destructEndLink(e),a;if(r){if(a=this.destructStartLink(r),a.stroke!==n.stroke)return{type:"INVALID",stroke:"INVALID"};return a.type=n.type,a.length=n.length,{...a,edgeSemantic:this.computeEdgeSemantic(a.type,a.stroke)}}return{...n,edgeSemantic:this.computeEdgeSemantic(n.type,n.stroke)}}exists(e,r){for(let n of e)if(n.nodes.includes(r))return!0;return!1}makeUniq(e,r){let n=[];return e.nodes.forEach((a,c)=>{if(!this.exists(r,a))n.push(e.nodes[c])}),{nodes:n}}getTypeFromVertex(e){let r=typeof e.type==="string"?ct(e.type):e.type;switch(r){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return r}}findNode(e,r){return e.find((n)=>n.id===r)}destructEdgeType(e){let r="none",n="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":case"arrow_hierarchy":n=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),n=r;break}return{arrowTypeStart:r,arrowTypeEnd:n}}addNodeFromVertex(e,r,n,a,c,d){let o=n.get(e.id),h=a.get(e.id)??!1,k=this.findNode(r,e.id);if(k)k.cssStyles=e.styles,k.cssCompiledStyles=this.getCompiledStyles(e.classes),k.cssClasses=e.classes.join(" ");else{let g={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:o,padding:c.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:d,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),metadata:e.metadata};if(h)r.push({...g,isGroup:!0,shape:"rect"});else r.push({...g,isGroup:!1,shape:this.getTypeFromVertex(e),wrappingWidth:c.agentflow?.wrappingWidth,minWidth:c.agentflow?.minNodeWidth})}}getCompiledStyles(e){let r=[];for(let n of e){let a=this.classes.get(n);if(a?.styles)r=[...r,...a.styles??[]].map((c)=>c.trim());if(a?.textStyles)r=[...r,...a.textStyles??[]].map((c)=>c.trim())}return r}runPostParseValidators(){if(this.postParseValidationRun)return;this.postParseValidationRun=!0}getData(){this.runPostParseValidators();let e=m(),r=[],n=[],a=this.getSubGraphs(),c=new Map,d=new Map,o=new Set,h=new Map,k=t((p,f,_=new Set)=>{if(_.has(p))return;_.add(p);let Y=this.subGraphLookup.get(p);if(!Y)return;for(let fe of Y.nodes){if(fe===f||_.has(fe))continue;o.add(fe),h.set(fe,f),k(fe,f,_)}},"collectDescendants");for(let p of a)if(p.metadata?.view==="collapsed"&&!o.has(p.id))k(p.id,p.id);let g=t((p,f)=>{let _=new Set,Y=f;while(Y!==void 0&&!_.has(Y)){if(Y===p)return!0;_.add(Y),Y=c.get(Y)}return!1},"wouldCloseContainmentCycle");for(let p=a.length-1;p>=0;p--){let f=a[p];if(o.has(f.id))continue;if(f.nodes.length>0)d.set(f.id,!0);for(let _ of f.nodes){if(g(_,f.id)){this.emitWarning(dt.CONTAINMENT_VIOLATION,`Container "${f.id}" cannot contain "${_}" because "${_}" already contains it. The nesting that would close the loop is dropped.`,{nodeId:_});continue}c.set(_,f.id)}}for(let p=a.length-1;p>=0;p--){let f=a[p];if(o.has(f.id))continue;if(f.metadata?.view==="collapsed"){let Y={...f.metadata,containerType:f.type};r.push({id:f.id,label:f.title,labelStyle:"",labelType:f.labelType,parentId:c.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssClasses:f.classes.join(" "),shape:"collapsedGroup",dir:f.dir,isGroup:!1,look:e.look,metadata:Y})}else r.push({id:f.id,label:f.title,labelStyle:"",labelType:f.labelType,parentId:c.get(f.id),padding:8,cssCompiledStyles:this.getCompiledStyles(f.classes),cssClasses:f.classes.join(" "),shape:G1[f.type??"flow"],dir:f.dir,isGroup:!0,look:e.look,metadata:f.metadata})}this.getVertices().forEach((p)=>{if(o.has(p.id))return;this.addNodeFromVertex(p,r,c,d,e,e.look||"classic")});let C=this.getEdges();C.forEach((p,f)=>{let _=h.get(p.start)??p.start,Y=h.get(p.end)??p.end;if(_===Y&&p.start!==p.end)return;let{arrowTypeStart:fe,arrowTypeEnd:Se}=this.destructEdgeType(p.type),Ee=[...C.defaultStyle??[]];if(p.style)Ee.push(...p.style);let xe={id:Fn(_,Y,{counter:f,prefix:"L"},p.id),isUserDefinedId:p.isUserDefinedId,start:_,end:Y,type:p.type??"normal",label:p.text,labelType:p.labelType,labelpos:"c",thickness:p.stroke,minlen:p.length,classes:p?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:p?.stroke==="invisible"||p?.type==="arrow_open"?"none":fe,arrowTypeEnd:p?.stroke==="invisible"||p?.type==="arrow_open"?"none":Se,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(p.classes),labelStyle:Ee,style:Ee,pattern:p.stroke,look:e.look,animate:p.animate,animation:p.animation,curve:p.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve,metadata:p.metadata};n.push(xe)}),E1(r,this);let B=new Map,D=new Map;for(let p of a){let f=c.get(p.id);if(f!==void 0)D.set(f,[...D.get(f)??[],p.id])}let P=0,v=t((p)=>{if(B.has(p))return;B.set(p,P++);for(let f of D.get(p)??[])v(f)},"walkContainers");for(let p of a)if(c.get(p.id)===void 0)v(p.id);let E=new Set(this.getConnectors().map((p)=>p.id));return D1(r,(p)=>{if(E.has(p))return"connector";let f=this.vertices.get(p);return f?this.deriveVertexKind(f,ct(f.type)):void 0},B),{nodes:r,edges:n,other:{},config:e,connectors:this.getConnectors()}}defaultConfig(){return ns.flowchart}deriveVertexKind(e,r){if(this.isToolDefinition(e))return"tool";if(r==="hexagon"||r==="hex")return"action";if(r==="lean-right"||r==="lean_right")return"input";if(r==="lin-doc"||r==="lined-document")return"refdoc";if(r==="diamond")return"decision";return"task"}getSemanticModel(){this.runPostParseValidators();let e=new Set(this.subGraphs.map((o)=>o.id)),r=[],n=[];for(let[o,h]of this.vertices){if(e.has(o))continue;if(h.isConnector){let A={id:o};if(h.text!==void 0&&h.text!==o)A.title=h.text;if(h.metadata&&Object.keys(h.metadata).length>0){let C={};for(let[B,D]of Object.entries(h.metadata)){if(i1.has(B))continue;C[B]=D}if(Object.keys(C).length>0)A.metadata=C}n.push(A);continue}let k={id:o};if(h.text!==void 0)k.label=h.text;let g=typeof h.type==="string"?ct(h.type):h.type;if(g!==void 0)k.shape=g;if(k.vertexKind=this.deriveVertexKind(h,g),h.metadata&&Object.keys(h.metadata).length>0){let A={};for(let[C,B]of Object.entries(h.metadata)){if(i1.has(C))continue;A[C]=B}if(Object.keys(A).length>0)k.metadata=A}r.push(k)}let a=this.edges.map((o)=>{let h={start:o.start,end:o.end};if(o.id!==void 0)h.id=o.id;if(typeof o.text==="string"&&o.text.length>0)h.label=o.text;if(o.type!==void 0)h.type=o.type;if(o.stroke!==void 0)h.stroke=o.stroke;if(o.edgeSemantic!==void 0)h.edgeSemantic=o.edgeSemantic;if(o.length!==void 0)h.length=o.length;if(o.metadata&&Object.keys(o.metadata).length>0)h.metadata={...o.metadata};return h}),c=this.subGraphs.map((o)=>{let h={id:o.id,nodes:[...o.nodes]};if(o.type!==void 0)h.type=o.type;if(o.title!==void 0)h.title=o.title;if(o.dir!==void 0)h.direction=o.dir;if(o.metadata&&Object.keys(o.metadata).length>0){let k={};for(let[g,A]of Object.entries(o.metadata)){if(i1.has(g))continue;k[g]=A}if(Object.keys(k).length>0)h.metadata=k}return h}),d={vertices:r,edges:a,subGraphs:c,connectors:n,diagnostics:this.diagnostics};if(this.direction!==void 0)d.direction=this.direction;return d}setFrontmatterLineOffset(e){this.frontmatterLineOffset=e??0}toElementPosition(e){let r=e?.first_line??0,n=e?.first_column??0,a=e?.last_line??r,c=e?.last_column??n,[d,o]=e?.range??[0,0];return{startLine:r+this.frontmatterLineOffset,startColumn:n,endLine:a+this.frontmatterLineOffset,endColumn:c,startIndex:d,endIndex:o}}pushMapping(e,r,n){if(!e)return;let a={id:e,type:r,position:this.toElementPosition(n)};return this.elementMappings.push(a),a}addVertexMapping(e,r,n,a){let c=this.pushMapping(e,"vertex",a);if(c&&n==null)this.bareVertexMappings.add(c)}extendVertexMapping(e,r){if(!e||!r)return;let n=this.toElementPosition(r);for(let a=this.elementMappings.length-1;a>=0;a--){let c=this.elementMappings[a];if(c.type==="vertex"&&c.id===e){if(this.bareVertexMappings.has(c))c.type="attachment",this.bareVertexMappings.delete(c);if(n.endLine>c.position.endLine||n.endLine===c.position.endLine&&n.endColumn>c.position.endColumn)c.position.endLine=n.endLine,c.position.endColumn=n.endColumn,c.position.endIndex=n.endIndex;return}}this.pushMapping(e,"attachment",r)}addEdgeMapping(e,r,n,a){let c=Array.isArray(r)?r.map((o)=>typeof o==="string"?o:o?.id??"").filter(Boolean):[],d=c.length>0?c.join(">"):"edge";this.pushMapping(d,"edge",a)}addSubgraphMapping(e,r,n,a){let c=(typeof e==="string"?e:e?.text)??"",d=this.toElementPosition(n),o=a?this.toElementPosition(a):d;if(!c)return;this.elementMappings.push({id:c,type:"subgraph",position:{startLine:d.startLine,startColumn:d.startColumn,endLine:o.endLine,endColumn:o.endColumn,startIndex:d.startIndex,endIndex:o.endIndex}})}addConnectorMapping(e,r,n,a){let c=e?.text?.trim()??"";if(!c)return;let d=this.toElementPosition(n),o=a?this.toElementPosition(a):d;this.elementMappings.push({id:c,type:"connector",position:{startLine:d.startLine,startColumn:d.startColumn,endLine:o.endLine,endColumn:o.endColumn,startIndex:d.startIndex,endIndex:o.endIndex}})}getElementMappings(){return[...this.elementMappings]}getElementById(e){return this.elementMappings.find((r)=>r.id===e)}getElementsOnLine(e){return this.elementMappings.filter((r)=>e>=r.position.startLine&&e<=r.position.endLine)}getElementAtPosition(e,r){let n=this.elementMappings.filter((c)=>{let{startLine:d,startColumn:o,endLine:h,endColumn:k}=c.position;if(e<d||e>h)return!1;if(e===d&&r<o)return!1;if(e===h&&r>k)return!1;return!0});if(n.length===0)return;let a=t(({position:c})=>[c.endLine-c.startLine,c.endColumn-c.startColumn],"span");return n.reduce((c,d)=>{let[o,h]=a(c),[k,g]=a(d);if(k!==o)return k<o?d:c;return g<h?d:c})}getMappingStats(){let e=0,r=0,n=0,a=0,c=0;for(let d of this.elementMappings)if(d.type==="vertex")e++;else if(d.type==="edge")r++;else if(d.type==="subgraph")n++;else if(d.type==="connector")a++;else if(d.type==="attachment")c++;return{vertices:e,edges:r,subgraphs:n,connectors:a,attachments:c,totalElements:this.elementMappings.length}}emitDiagnostic(e,r,n,a){let c=a?.nodeId??a?.edgeId,d=c?this.getElementById(c):void 0,o={id:e,severity:r,message:n,...a?.nodeId?{nodeId:a.nodeId}:{},...a?.edgeId&&!a?.nodeId?{edgeId:a.edgeId}:{},...d?{position:d.position}:{}};if(this.diagnostics.some((g)=>g.id===o.id&&g.severity===o.severity&&g.message===o.message&&g.nodeId===o.nodeId&&g.edgeId===o.edgeId))return;this.diagnostics.push(o);let k=`agentflow[${e}]: ${n}`;if(r==="error")l.error(k);else l.warn(k)}emitWarning(e,r,n){this.emitDiagnostic(e,"warning",r,n)}emitError(e,r,n){this.emitDiagnostic(e,"error",r,n)}getDiagnostics(){return[...this.diagnostics]}},j1=t(function(e,r){return r.db.getClasses()},"getClasses"),z1=t(async function(e,r,n,a){l.debug("Drawing agentflow diagram",r);let{securityLevel:c,agentflow:d,layout:o}=m();a.db.setDiagramId(r),l.debug("Before getData: ");let h=a.db.getData();l.debug("Data: ",h);let k=Ut(r,c),g=a.db.getDirection();if(h.type=a.type,h.layoutAlgorithm=zt(o),h.layoutAlgorithm==="dagre"&&o==="elk")l.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback.");h.direction=g,h.nodeSpacing=d?.nodeSpacing||50,h.rankSpacing=d?.rankSpacing||50,h.markers=["point","circle","cross","hierarchy"],h.diagramId=r,l.debug("REF1:",h),await $t(h,k);let A=d?.diagramPadding??8;V.insertTitle(k,"agentflowTitleText",d?.titleTopMargin??0,a.db.getDiagramTitle()),Ct(k,A,"agentflow",d?.useMaxWidth??!0)},"draw"),W1={getClasses:j1,draw:z1},r1=function(){var e=t(function(we,S,x,T){for(x=x||{},T=we.length;T--;x[we[T]]=S);return x},"o"),r=[1,5],n=[1,4],a=[1,3],c=[1,6],d=[1,8,9,10,11,12,28,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],o=[2,2],h=[1,15],k=[1,16],g=[1,17],A=[1,18],C=[1,19],B=[1,26],D=[1,27],P=[1,28],v=[1,30],E=[1,31],p=[1,32],f=[1,55],_=[1,54],Y=[1,34],fe=[1,35],Se=[1,36],Ee=[1,37],xe=[1,38],Q=[1,50],J=[1,52],Z=[1,48],ee=[1,53],te=[1,49],se=[1,56],ie=[1,51],re=[1,57],ne=[1,58],Ne=[1,39],Re=[1,40],Oe=[1,41],Pe=[1,42],Ge=[1,43],Me=[1,64],I=[1,8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],ce=[1,70],de=[1,68],he=[1,67],pe=[1,69],We=[8,9,10,12,78,80,81],Ke=[1,88],He=[1,101],Ye=[1,106],qe=[1,105],Xe=[1,102],Qe=[1,98],Je=[1,104],Ze=[1,100],$e=[1,107],et=[1,103],tt=[1,108],st=[1,99],Ue=[8,9,10,11,12,43,78,80,81],oe=[8,9,10,11,12,43,49,78,80,81],be=[8,9,10,11,12,30,43,47,49,51,53,55,57,59,61,63,66,68,70,71,73,78,80,81,92,105,108,109,112,114,117,118,119],n1=[8,9,10,12,47,63,78,80,81,92,105,108,109,112,114,117,118,119],it=[47,63,92,105,108,109,112,114,117,118,119],a1=[1,131],o1=[1,132],ht=[1,134],ft=[1,133],u1=[47,63,65,77,92,105,108,109,112,114,117,118,119],gt=[1,143],bt=[1,157],kt=[1,158],At=[1,159],Et=[1,162],St=[1,161],Tt=[1,160],Dt=[1,145],_t=[1,147],vt=[1,151],l1=[1,139],c1=[1,140],Ft=[1,152],Vt=[1,153],It=[1,154],Lt=[1,155],Bt=[1,156],Mt=[1,163],yt=[1,164],Nt=[1,141],Rt=[1,142],Ot=[1,149],Pt=[1,144],Gt=[1,148],jt=[1,146],rt=[8,9,10,11,12,28,33,35,36,38,40,42,47,63,87,88,89,90,91,92,105,108,109,112,114,117,118,119,124,125,126,127,128],d1=[1,168],nt=[1,170],X=[8,9,10,12],ke=[8,9,10,11,12,15,47,63,92,108,109,112,114,117,118,119],M=[1,190],ue=[1,186],le=[1,187],y=[1,191],N=[1,188],R=[1,189],at=[80,119,122],U=[8,9,10,11,12,13,15,28,30,33,35,36,43,47,63,78,87,88,89,90,91,92,93,108,112,114,117,118,119],h1=[11,109],ye=[32,52,54,56,58,60,65,67,69,70,72,74,119,120,121],Te=[1,269],De=[1,267],_e=[1,271],ve=[1,265],Fe=[1,266],Ve=[1,268],Ie=[1,270],Le=[1,272],ot=[1,292],p1=[8,9,10,12,109],Ce=[8,9,10,11,12,63,87,108,109,112,113,114,115],Qt={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,COMMENT:8,SEMI:9,NEWLINE:10,SPACE:11,EOF:12,GRAPH:13,NODIR:14,DIR:15,FirstStmtSeparator:16,ending:17,endToken:18,spaceList:19,spaceListNewline:20,vertexStatement:21,separator:22,styleStatement:23,linkStyleStatement:24,classDefStatement:25,classStatement:26,clickStatement:27,flow:28,textNoTags:29,SQS:30,text:31,SQE:32,end:33,shapeData:34,global:35,connector:36,direction:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,SHAPE_DATA:43,link:44,node:45,styledVertex:46,AMP:47,vertex:48,STYLE_SEPARATOR:49,idString:50,DOUBLECIRCLESTART:51,DOUBLECIRCLEEND:52,PS:53,PE:54,"(-":55,"-)":56,STADIUMSTART:57,STADIUMEND:58,SUBROUTINESTART:59,SUBROUTINEEND:60,VERTEX_WITH_PROPS_START:61,"NODE_STRING[field]":62,COLON:63,"NODE_STRING[value]":64,PIPE:65,CYLINDERSTART:66,CYLINDEREND:67,DIAMOND_START:68,DIAMOND_STOP:69,TAGEND:70,TRAPSTART:71,TRAPEND:72,INVTRAPSTART:73,INVTRAPEND:74,linkStatement:75,arrowText:76,TESTSTR:77,START_LINK:78,edgeText:79,LINK:80,LINK_ID:81,edgeTextToken:82,STR:83,MD_STR:84,textToken:85,keywords:86,STYLE:87,LINKSTYLE:88,CLASSDEF:89,CLASS:90,CLICK:91,DOWN:92,UP:93,textNoTagsToken:94,stylesOpt:95,"idString[vertex]":96,"idString[class]":97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,"STR[link]":102,"STR[tooltip]":103,alphaNum:104,DEFAULT:105,numList:106,INTERPOLATE:107,NUM:108,COMMA:109,style:110,styleComponent:111,NODE_STRING:112,UNIT:113,BRKT:114,PCT:115,idStringToken:116,MINUS:117,MULT:118,UNICODE_TEXT:119,TEXT:120,TAGSTART:121,EDGE_TEXT:122,alphaNumToken:123,direction_tb:124,direction_bt:125,direction_rl:126,direction_lr:127,direction_td:128,$accept:0,$end:1},terminals_:{2:"error",8:"COMMENT",9:"SEMI",10:"NEWLINE",11:"SPACE",12:"EOF",13:"GRAPH",14:"NODIR",15:"DIR",28:"flow",30:"SQS",32:"SQE",33:"end",35:"global",36:"connector",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"SHAPE_DATA",47:"AMP",49:"STYLE_SEPARATOR",51:"DOUBLECIRCLESTART",52:"DOUBLECIRCLEEND",53:"PS",54:"PE",55:"(-",56:"-)",57:"STADIUMSTART",58:"STADIUMEND",59:"SUBROUTINESTART",60:"SUBROUTINEEND",61:"VERTEX_WITH_PROPS_START",62:"NODE_STRING[field]",63:"COLON",64:"NODE_STRING[value]",65:"PIPE",66:"CYLINDERSTART",67:"CYLINDEREND",68:"DIAMOND_START",69:"DIAMOND_STOP",70:"TAGEND",71:"TRAPSTART",72:"TRAPEND",73:"INVTRAPSTART",74:"INVTRAPEND",77:"TESTSTR",78:"START_LINK",80:"LINK",81:"LINK_ID",83:"STR",84:"MD_STR",87:"STYLE",88:"LINKSTYLE",89:"CLASSDEF",90:"CLASS",91:"CLICK",92:"DOWN",93:"UP",96:"idString[vertex]",97:"idString[class]",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"STR[link]",103:"STR[tooltip]",105:"DEFAULT",107:"INTERPOLATE",108:"NUM",109:"COMMA",112:"NODE_STRING",113:"UNIT",114:"BRKT",115:"PCT",117:"MINUS",118:"MULT",119:"UNICODE_TEXT",120:"TEXT",121:"TAGSTART",122:"EDGE_TEXT",124:"direction_tb",125:"direction_bt",126:"direction_rl",127:"direction_lr",128:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,2],[4,3],[17,2],[17,1],[18,1],[18,1],[18,1],[16,1],[16,1],[16,2],[16,1],[20,2],[20,2],[20,2],[20,1],[20,1],[20,1],[19,2],[19,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,10],[7,6],[7,7],[7,4],[7,4],[7,7],[7,8],[7,4],[7,5],[7,1],[7,2],[7,2],[7,1],[22,1],[22,1],[22,1],[22,1],[34,2],[34,1],[21,4],[21,3],[21,4],[21,2],[21,2],[21,1],[45,1],[45,6],[45,5],[46,1],[46,3],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,8],[48,4],[48,4],[48,4],[48,6],[48,4],[48,4],[48,4],[48,4],[48,4],[48,1],[44,2],[44,3],[44,3],[44,1],[44,3],[44,4],[79,1],[79,2],[79,1],[79,1],[75,1],[75,2],[76,3],[31,1],[31,2],[31,1],[31,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[86,1],[29,1],[29,2],[29,1],[29,1],[25,5],[26,5],[27,2],[27,4],[27,3],[27,5],[27,3],[27,5],[27,5],[27,7],[27,2],[27,4],[27,2],[27,4],[27,4],[27,6],[23,5],[24,5],[24,5],[24,9],[24,9],[24,7],[24,7],[106,1],[106,3],[95,1],[95,3],[110,1],[110,2],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[111,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[85,1],[85,1],[85,1],[85,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[82,1],[82,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[123,1],[50,1],[50,2],[104,1],[104,2],[37,1],[37,1],[37,1],[37,1],[37,1]],performAction:t(function(S,x,T,u,W,s,L){var i=s.length-1;switch(W){case 2:this.$=[];break;case 3:if(!Array.isArray(s[i])||s[i].length>0)s[i-1].push(s[i]);this.$=s[i-1];break;case 4:case 198:this.$=s[i];break;case 5:case 33:case 34:case 35:case 36:case 37:this.$=[];break;case 13:u.setDirection("TB"),this.$="TB";break;case 14:u.setDirection(s[i-1]),this.$=s[i-1];break;case 32:this.$=s[i-1].nodes;break;case 38:if(this.$=u.addSubGraph(s[i-6],s[i-1],s[i-4],"flow"),u.addSubgraphMapping)u.addSubgraphMapping(s[i-6],s[i-4],L[i-8],L[i]);break;case 39:if(this.$=u.addSubGraph(s[i-7],s[i-1],s[i-5],"flow"),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],L[i-3]),u.addSubgraphMapping)u.addSubgraphMapping(s[i-7],s[i-5],L[i-9],L[i]);break;case 40:if(this.$=u.addSubGraph(s[i-3],s[i-1],{text:"",type:"text"},"flow"),u.addSubgraphMapping)u.addSubgraphMapping(s[i-3],{text:"",type:"text"},L[i-5],L[i]);break;case 41:if(this.$=u.addSubGraph(s[i-4],s[i-1],{text:"",type:"text"},"flow"),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-3],L[i-3]),u.addSubgraphMapping)u.addSubgraphMapping(s[i-4],{text:"",type:"text"},L[i-6],L[i]);break;case 42:if(this.$=u.addSubGraph(void 0,s[i-1],void 0,"flow"),u.addSubgraphMapping)u.addSubgraphMapping(void 0,void 0,L[i-3],L[i]);break;case 43:u.addGlobal(s[i-1]),this.$=[];break;case 44:if(this.$=u.addConnector(s[i-4],s[i-2]),u.addConnectorMapping)u.addConnectorMapping(s[i-4],s[i-2],L[i-6],L[i]);break;case 45:if(this.$=u.addConnector(s[i-5],s[i-3]),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],L[i-1]),u.addConnectorMapping)u.addConnectorMapping(s[i-5],s[i-3],L[i-7],L[i]);break;case 46:if(this.$=u.addConnector(s[i-1],{text:"",type:"text"}),u.addConnectorMapping)u.addConnectorMapping(s[i-1],{text:"",type:"text"},L[i-3],L[i]);break;case 47:if(this.$=u.addConnector(s[i-2],{text:"",type:"text"}),u.addVertex(this.$,void 0,void 0,void 0,void 0,void 0,void 0,s[i-1],L[i-1]),u.addConnectorMapping)u.addConnectorMapping(s[i-2],{text:"",type:"text"},L[i-4],L[i]);break;case 49:this.$=s[i].trim(),u.setAccTitle(this.$);break;case 50:case 51:this.$=s[i].trim(),u.setAccDescription(this.$);break;case 56:this.$=s[i-1]+s[i];break;case 57:this.$=s[i];break;case 58:if(u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],L[i]),u.extendVertexMapping)u.extendVertexMapping(s[i-1][s[i-1].length-1],L[i]);if(u.addLink(s[i-3].stmt,s[i-1],s[i-2]),u.addEdgeMapping)u.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 59:if(u.addLink(s[i-2].stmt,s[i],s[i-1]),u.addEdgeMapping)u.addEdgeMapping(s[i-2].stmt,s[i],s[i-1],this._$);this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 60:if(u.addLink(s[i-3].stmt,s[i-1],s[i-2]),u.addEdgeMapping)u.addEdgeMapping(s[i-3].stmt,s[i-1],s[i-2],this._$);this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 61:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 62:if(u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i],L[i]),u.extendVertexMapping)u.extendVertexMapping(s[i-1][s[i-1].length-1],L[i]);this.$={stmt:s[i-1],nodes:s[i-1],shapeData:s[i]};break;case 63:this.$={stmt:s[i],nodes:s[i]};break;case 64:this.$=[s[i]];break;case 65:if(u.addVertex(s[i-5][s[i-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-4],L[i-4]),u.extendVertexMapping)u.extendVertexMapping(s[i-5][s[i-5].length-1],L[i-4]);this.$=s[i-5].concat(s[i]);break;case 66:this.$=s[i-4].concat(s[i]);break;case 67:this.$=s[i];break;case 68:this.$=s[i-2],u.setClass(s[i-2],s[i]);break;case 69:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"square"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"square",this._$);break;case 70:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"doublecircle"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"doublecircle",this._$);break;case 71:if(this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"circle"),u.addVertexMapping)u.addVertexMapping(s[i-5],s[i-2],"circle",this._$);break;case 72:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"ellipse"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"ellipse",this._$);break;case 73:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"stadium"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"stadium",this._$);break;case 74:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"subroutine"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"subroutine",this._$);break;case 75:if(this.$=s[i-7],u.addVertex(s[i-7],s[i-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[i-5],s[i-3]]])),u.addVertexMapping)u.addVertexMapping(s[i-7],s[i-1],"rect",this._$);break;case 76:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"cylinder"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"cylinder",this._$);break;case 77:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"round"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"round",this._$);break;case 78:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"diamond"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"diamond",this._$);break;case 79:if(this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"hexagon"),u.addVertexMapping)u.addVertexMapping(s[i-5],s[i-2],"hexagon",this._$);break;case 80:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"odd"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"odd",this._$);break;case 81:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"trapezoid"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"trapezoid",this._$);break;case 82:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"inv_trapezoid"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"inv_trapezoid",this._$);break;case 83:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_right"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"lean_right",this._$);break;case 84:if(this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_left"),u.addVertexMapping)u.addVertexMapping(s[i-3],s[i-1],"lean_left",this._$);break;case 85:if(this.$=s[i],u.addVertex(s[i]),u.addVertexMapping)u.addVertexMapping(s[i],void 0,void 0,this._$);break;case 86:s[i-1].text=s[i],this.$=s[i-1];break;case 87:case 88:s[i-2].text=s[i-1],this.$=s[i-2];break;case 89:this.$=s[i];break;case 90:var K=u.destructLink(s[i],s[i-2]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic,text:s[i-1]};break;case 91:var K=u.destructLink(s[i],s[i-2]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic,text:s[i-1],id:s[i-3]};break;case 92:this.$={text:s[i],type:"text"};break;case 93:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 94:this.$={text:s[i],type:"string"};break;case 95:this.$={text:s[i],type:"markdown"};break;case 96:var K=u.destructLink(s[i]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic};break;case 97:var K=u.destructLink(s[i]);this.$={type:K.type,stroke:K.stroke,length:K.length,edgeSemantic:K.edgeSemantic,id:s[i-1]};break;case 98:this.$=s[i-1];break;case 99:this.$={text:s[i],type:"text"};break;case 100:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 101:this.$={text:s[i],type:"string"};break;case 102:case 119:this.$={text:s[i],type:"markdown"};break;case 116:this.$={text:s[i],type:"text"};break;case 117:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 118:this.$={text:s[i],type:"text"};break;case 120:this.$=s[i-4],u.addClass(s[i-2],s[i]);break;case 121:this.$=s[i-4],u.setClass(s[i-2],s[i]);break;case 122:case 130:this.$=s[i-1],u.setClickEvent(s[i-1],s[i]);break;case 123:case 131:this.$=s[i-3],u.setClickEvent(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 124:this.$=s[i-2],u.setClickEvent(s[i-2],s[i-1],s[i]);break;case 125:this.$=s[i-4],u.setClickEvent(s[i-4],s[i-3],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 126:this.$=s[i-2],u.setLink(s[i-2],s[i]);break;case 127:this.$=s[i-4],u.setLink(s[i-4],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 128:this.$=s[i-4],u.setLink(s[i-4],s[i-2],s[i]);break;case 129:this.$=s[i-6],u.setLink(s[i-6],s[i-4],s[i]),u.setTooltip(s[i-6],s[i-2]);break;case 132:this.$=s[i-1],u.setLink(s[i-1],s[i]);break;case 133:this.$=s[i-3],u.setLink(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 134:this.$=s[i-3],u.setLink(s[i-3],s[i-2],s[i]);break;case 135:this.$=s[i-5],u.setLink(s[i-5],s[i-4],s[i]),u.setTooltip(s[i-5],s[i-2]);break;case 136:this.$=s[i-4],u.addVertex(s[i-2],void 0,void 0,s[i]);break;case 137:this.$=s[i-4],u.updateLink([s[i-2]],s[i]);break;case 138:this.$=s[i-4],u.updateLink(s[i-2],s[i]);break;case 139:this.$=s[i-8],u.updateLinkInterpolate([s[i-6]],s[i-2]),u.updateLink([s[i-6]],s[i]);break;case 140:this.$=s[i-8],u.updateLinkInterpolate(s[i-6],s[i-2]),u.updateLink(s[i-6],s[i]);break;case 141:this.$=s[i-6],u.updateLinkInterpolate([s[i-4]],s[i]);break;case 142:this.$=s[i-6],u.updateLinkInterpolate(s[i-4],s[i]);break;case 143:case 145:this.$=[s[i]];break;case 144:case 146:s[i-2].push(s[i]),this.$=s[i-2];break;case 148:this.$=s[i-1]+s[i];break;case 196:this.$=s[i];break;case 197:this.$=s[i-1]+""+s[i];break;case 199:this.$=s[i-1]+""+s[i];break;case 200:this.$={stmt:"dir",value:"TB"};break;case 201:this.$={stmt:"dir",value:"BT"};break;case 202:this.$={stmt:"dir",value:"RL"};break;case 203:this.$={stmt:"dir",value:"LR"};break;case 204:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,8:r,10:n,11:a,13:c},{1:[3]},e(d,o,{5:7}),{4:8,8:r,10:n,11:a,13:c},{4:9,8:r,10:n,11:a,13:c},{4:10,8:r,10:n,11:a,13:c},{14:[1,11],15:[1,12]},{1:[2,1],6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:B,35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(d,[2,10]),e(d,[2,11]),e(d,[2,12]),e(d,[2,13]),{8:[1,63],9:[1,60],10:[1,61],11:Me,16:59,19:62},e(I,[2,3]),e(I,[2,4]),e(I,[2,5]),e(I,[2,6]),e(I,[2,7]),e(I,[2,8]),e(I,[2,9]),{8:ce,9:de,10:he,12:pe,22:65,44:66,75:71,78:[1,72],80:[1,74],81:[1,73]},{8:ce,9:de,10:he,12:pe,22:75},{8:ce,9:de,10:he,12:pe,22:76},{8:ce,9:de,10:he,12:pe,22:77},{8:ce,9:de,10:he,12:pe,22:78},{8:ce,9:de,10:he,12:pe,22:79},{8:ce,9:de,10:he,11:[1,80],12:pe,22:81},{8:ce,9:de,10:he,12:pe,22:82},{11:[1,83]},e(I,[2,48]),{39:[1,84]},{41:[1,85]},e(I,[2,51]),e(We,[2,63],{19:86,34:87,11:Me,43:Ke}),{11:[1,89]},{11:[1,90]},{11:[1,91]},{11:[1,92]},{15:He,47:Ye,63:qe,83:[1,96],92:Xe,98:[1,93],100:[1,94],104:95,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st,123:97},e(I,[2,200]),e(I,[2,201]),e(I,[2,202]),e(I,[2,203]),e(I,[2,204]),e(Ue,[2,64]),e(Ue,[2,67],{49:[1,109]}),e(oe,[2,85],{116:122,30:[1,110],47:f,51:[1,111],53:[1,112],55:[1,113],57:[1,114],59:[1,115],61:[1,116],63:_,66:[1,117],68:[1,118],70:[1,119],71:[1,120],73:[1,121],92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),e(be,[2,196]),e(be,[2,157]),e(be,[2,158]),e(be,[2,159]),e(be,[2,160]),e(be,[2,161]),e(be,[2,162]),e(be,[2,163]),e(be,[2,164]),e(be,[2,165]),e(be,[2,166]),e(be,[2,167]),e(d,[2,14]),e(d,[2,20]),e(d,[2,21]),{10:[1,123]},e(d,[2,23]),e(n1,[2,31],{19:124,11:Me}),e(I,[2,32]),{45:125,46:44,47:f,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(I,[2,52]),e(I,[2,53]),e(I,[2,54]),e(I,[2,55]),e(it,[2,89],{76:126,65:[1,128],77:[1,127]}),{79:129,82:130,83:a1,84:o1,119:ht,122:ft},{78:[1,135],80:[1,136]},e(u1,[2,96]),e(I,[2,33]),e(I,[2,34]),e(I,[2,35]),e(I,[2,36]),e(I,[2,37]),{11:gt,13:bt,15:kt,28:At,29:137,33:Et,35:St,36:Tt,47:Dt,63:_t,78:vt,83:l1,84:c1,86:150,87:Ft,88:Vt,89:It,90:Lt,91:Bt,92:Mt,93:yt,94:138,108:Nt,112:Rt,114:Ot,117:Pt,118:Gt,119:jt},e(rt,o,{5:165}),e(rt,o,{5:166}),{11:gt,13:bt,15:kt,28:At,29:167,33:Et,35:St,36:Tt,47:Dt,63:_t,78:vt,83:l1,84:c1,86:150,87:Ft,88:Vt,89:It,90:Lt,91:Bt,92:Mt,93:yt,94:138,108:Nt,112:Rt,114:Ot,117:Pt,118:Gt,119:jt},e(I,[2,49]),e(I,[2,50]),e(We,[2,61],{47:d1}),e(We,[2,62],{19:169,11:Me,43:nt}),e(Ue,[2,57]),{47:f,50:171,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{105:[1,172],106:173,108:[1,174]},{47:f,50:175,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{47:f,50:176,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,122],{11:[1,177],99:[1,178]}),{83:[1,179]},e(X,[2,130],{123:181,11:[1,180],15:He,47:Ye,63:qe,92:Xe,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st}),e(X,[2,132],{11:[1,182]}),e(ke,[2,198]),e(ke,[2,185]),e(ke,[2,186]),e(ke,[2,187]),e(ke,[2,188]),e(ke,[2,189]),e(ke,[2,190]),e(ke,[2,191]),e(ke,[2,192]),e(ke,[2,193]),e(ke,[2,194]),e(ke,[2,195]),{47:f,50:183,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{31:184,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:192,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:194,53:[1,193],70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:195,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:196,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:197,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{112:[1,198]},{31:199,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:200,68:[1,201],70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:202,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:203,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{31:204,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},e(be,[2,197]),e(d,[2,22]),e(n1,[2,30]),e(We,[2,59],{34:205,19:206,11:Me,43:Ke}),e(it,[2,86],{11:[1,207]}),{11:[1,208]},{31:209,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{80:[1,210],82:211,119:ht,122:ft},e(at,[2,92]),e(at,[2,94]),e(at,[2,95]),e(at,[2,183]),e(at,[2,184]),{79:212,82:130,83:a1,84:o1,119:ht,122:ft},e(u1,[2,97]),{8:ce,9:de,10:he,11:gt,12:pe,13:bt,15:kt,22:214,28:At,30:[1,213],33:Et,34:215,35:St,36:Tt,43:Ke,47:Dt,63:_t,78:vt,86:150,87:Ft,88:Vt,89:It,90:Lt,91:Bt,92:Mt,93:yt,94:216,108:Nt,112:Rt,114:Ot,117:Pt,118:Gt,119:jt},e(U,[2,116]),e(U,[2,118]),e(U,[2,119]),e(U,[2,172]),e(U,[2,173]),e(U,[2,174]),e(U,[2,175]),e(U,[2,176]),e(U,[2,177]),e(U,[2,178]),e(U,[2,179]),e(U,[2,180]),e(U,[2,181]),e(U,[2,182]),e(U,[2,103]),e(U,[2,104]),e(U,[2,105]),e(U,[2,106]),e(U,[2,107]),e(U,[2,108]),e(U,[2,109]),e(U,[2,110]),e(U,[2,111]),e(U,[2,112]),e(U,[2,113]),e(U,[2,114]),e(U,[2,115]),{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:B,33:[1,217],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:B,33:[1,218],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},{8:ce,9:de,10:he,11:gt,12:pe,13:bt,15:kt,22:220,28:At,30:[1,219],33:Et,34:221,35:St,36:Tt,43:Ke,47:Dt,63:_t,78:vt,86:150,87:Ft,88:Vt,89:It,90:Lt,91:Bt,92:Mt,93:yt,94:216,108:Nt,112:Rt,114:Ot,117:Pt,118:Gt,119:jt},{11:Me,19:222},{47:[1,223]},e(Ue,[2,56]),{11:[1,224],47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,225]},{11:[1,226],109:[1,227]},e(h1,[2,143]),{11:[1,228],47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{11:[1,229],47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:122,117:ie,118:re,119:ne},{83:[1,230]},e(X,[2,124],{11:[1,231]}),e(X,[2,126],{11:[1,232]}),{83:[1,233]},e(ke,[2,199]),{83:[1,234],101:[1,235]},e(Ue,[2,68],{116:122,47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),{32:[1,236],70:M,85:237,119:y,120:N,121:R},e(ye,[2,99]),e(ye,[2,101]),e(ye,[2,102]),e(ye,[2,168]),e(ye,[2,169]),e(ye,[2,170]),e(ye,[2,171]),{52:[1,238],70:M,85:237,119:y,120:N,121:R},{31:239,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{54:[1,240],70:M,85:237,119:y,120:N,121:R},{56:[1,241],70:M,85:237,119:y,120:N,121:R},{58:[1,242],70:M,85:237,119:y,120:N,121:R},{60:[1,243],70:M,85:237,119:y,120:N,121:R},{63:[1,244]},{67:[1,245],70:M,85:237,119:y,120:N,121:R},{69:[1,246],70:M,85:237,119:y,120:N,121:R},{31:247,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},{32:[1,248],70:M,85:237,119:y,120:N,121:R},{70:M,72:[1,249],74:[1,250],85:237,119:y,120:N,121:R},{70:M,72:[1,252],74:[1,251],85:237,119:y,120:N,121:R},e(We,[2,58],{19:169,11:Me,43:nt}),e(We,[2,60],{47:d1}),e(it,[2,88]),e(it,[2,87]),{65:[1,253],70:M,85:237,119:y,120:N,121:R},e(it,[2,90]),e(at,[2,93]),{80:[1,254],82:211,119:ht,122:ft},{31:255,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},e(rt,o,{5:256}),{8:ce,9:de,10:he,12:pe,22:257,43:nt},e(U,[2,117]),e(I,[2,42]),e(I,[2,43]),{31:258,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},e(I,[2,46]),{8:ce,9:de,10:he,12:pe,22:259,43:nt},{46:260,47:f,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},{11:Me,19:261},{11:Te,63:De,87:_e,95:262,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{11:Te,63:De,87:_e,95:273,107:[1,274],108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{11:Te,63:De,87:_e,95:275,107:[1,276],108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{108:[1,277]},{11:Te,63:De,87:_e,95:278,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{47:f,50:279,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,123]),{83:[1,280]},{83:[1,281],101:[1,282]},e(X,[2,131]),e(X,[2,133],{11:[1,283]}),e(X,[2,134]),e(oe,[2,69]),e(ye,[2,100]),e(oe,[2,70]),{54:[1,284],70:M,85:237,119:y,120:N,121:R},e(oe,[2,77]),e(oe,[2,72]),e(oe,[2,73]),e(oe,[2,74]),{112:[1,285]},e(oe,[2,76]),e(oe,[2,78]),{69:[1,286],70:M,85:237,119:y,120:N,121:R},e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,83]),e(oe,[2,82]),e(oe,[2,84]),e([11,47,63,92,105,108,109,112,114,117,118,119],[2,98]),e(it,[2,91]),{32:[1,287],70:M,85:237,119:y,120:N,121:R},{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:B,33:[1,288],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(rt,o,{5:289}),{32:[1,290],70:M,85:237,119:y,120:N,121:R},e(I,[2,47]),e(Ue,[2,66]),{46:291,47:f,48:45,50:46,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne},e(X,[2,136],{109:ot}),e(p1,[2,145],{111:293,11:Te,63:De,87:_e,108:ve,112:Fe,113:Ve,114:Ie,115:Le}),e(Ce,[2,147]),e(Ce,[2,149]),e(Ce,[2,150]),e(Ce,[2,151]),e(Ce,[2,152]),e(Ce,[2,153]),e(Ce,[2,154]),e(Ce,[2,155]),e(Ce,[2,156]),e(X,[2,137],{109:ot}),{11:[1,294]},e(X,[2,138],{109:ot}),{11:[1,295]},e(h1,[2,144]),e(X,[2,120],{109:ot}),e(X,[2,121],{116:122,47:f,63:_,92:Q,105:J,108:Z,109:ee,112:te,114:se,117:ie,118:re,119:ne}),e(X,[2,125]),e(X,[2,127],{11:[1,296]}),e(X,[2,128]),{101:[1,297]},{54:[1,298]},{65:[1,299]},{69:[1,300]},{8:ce,9:de,10:he,12:pe,22:301,34:302,43:Ke},e(I,[2,40]),{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:B,33:[1,303],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},{8:ce,9:de,10:he,12:pe,22:304,34:305,43:Ke},e(Ue,[2,65]),{11:Te,63:De,87:_e,108:ve,110:306,111:264,112:Fe,113:Ve,114:Ie,115:Le},e(Ce,[2,148]),{15:He,47:Ye,63:qe,92:Xe,104:307,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st,123:97},{15:He,47:Ye,63:qe,92:Xe,104:308,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st,123:97},{101:[1,309]},e(X,[2,135]),e(oe,[2,71]),{31:310,70:M,83:ue,84:le,85:185,119:y,120:N,121:R},e(oe,[2,79]),e(rt,o,{5:311}),{8:ce,9:de,10:he,12:pe,22:312,43:nt},e(I,[2,41]),e(I,[2,44]),{8:ce,9:de,10:he,12:pe,22:313,43:nt},e(p1,[2,146],{111:293,11:Te,63:De,87:_e,108:ve,112:Fe,113:Ve,114:Ie,115:Le}),e(X,[2,141],{123:181,11:[1,314],15:He,47:Ye,63:qe,92:Xe,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st}),e(X,[2,142],{123:181,11:[1,315],15:He,47:Ye,63:qe,92:Xe,108:Qe,109:Je,112:Ze,114:$e,117:et,118:tt,119:st}),e(X,[2,129]),{32:[1,316],70:M,85:237,119:y,120:N,121:R},{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:B,33:[1,317],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(rt,o,{5:318}),e(I,[2,45]),{11:Te,63:De,87:_e,95:319,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},{11:Te,63:De,87:_e,95:320,108:ve,110:263,111:264,112:Fe,113:Ve,114:Ie,115:Le},e(oe,[2,75]),e(I,[2,38]),{6:13,7:14,8:h,9:k,10:g,11:A,12:C,21:20,23:21,24:22,25:23,26:24,27:25,28:B,33:[1,321],35:D,36:P,37:29,38:v,40:E,42:p,45:33,46:44,47:f,48:45,50:46,63:_,87:Y,88:fe,89:Se,90:Ee,91:xe,92:Q,105:J,108:Z,109:ee,112:te,114:se,116:47,117:ie,118:re,119:ne,124:Ne,125:Re,126:Oe,127:Pe,128:Ge},e(X,[2,139],{109:ot}),e(X,[2,140],{109:ot}),e(I,[2,39])],defaultActions:{},parseError:t(function(S,x){if(x.recoverable)this.trace(S);else{var T=Error(S);throw T.hash=x,T}},"parseError"),parse:t(function(S){var x=this,T=[0],u=[],W=[null],s=[],L=this.table,i="",K=0,f1=0,g1=0,I1=2,b1=1,L1=s.slice.call(arguments,1),ae=Object.create(this.lexer),je={yy:{}};for(var Jt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Jt))je.yy[Jt]=this.yy[Jt];if(ae.setInput(S,je.yy),je.yy.lexer=ae,je.yy.parser=this,typeof ae.yylloc>"u")ae.yylloc={};var Zt=ae.yylloc;s.push(Zt);var B1=ae.options&&ae.options.ranges;if(typeof je.yy.parseError==="function")this.parseError=je.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function M1(Ae){T.length=T.length-2*Ae,W.length=W.length-Ae,s.length=s.length-Ae}t(M1,"popStack");function k1(){var Ae=u.pop()||ae.lex()||b1;if(typeof Ae!=="number"){if(Ae instanceof Array)u=Ae,Ae=u.pop();Ae=x.symbols_[Ae]||Ae}return Ae}t(k1,"lex");var ge,e1,ze,me,Q1,t1,ut={},Ht,Be,m1,Yt;while(!0){if(ze=T[T.length-1],this.defaultActions[ze])me=this.defaultActions[ze];else{if(ge===null||typeof ge>"u")ge=k1();me=L[ze]&&L[ze][ge]}if(typeof me>"u"||!me.length||!me[0]){var s1="";Yt=[];for(Ht in L[ze])if(this.terminals_[Ht]&&Ht>I1)Yt.push("'"+this.terminals_[Ht]+"'");if(ae.showPosition)s1="Parse error on line "+(K+1)+`:
23
23
  `+ae.showPosition()+`
24
- Expecting `+Yt.join(", ")+", got '"+(this.terminals_[ge]||ge)+"'";else s1="Parse error on line "+(K+1)+": Unexpected "+(ge==b1?"end of input":"'"+(this.terminals_[ge]||ge)+"'");this.parseError(s1,{text:ae.match,token:this.terminals_[ge]||ge,line:ae.yylineno,loc:Zt,expected:Yt})}if(me[0]instanceof Array&&me.length>1)throw Error("Parse Error: multiple actions possible at state: "+ze+", token: "+ge);switch(me[0]){case 1:if(T.push(ge),W.push(ae.yytext),s.push(ae.yylloc),T.push(me[1]),ge=null,!e1){if(f1=ae.yyleng,i=ae.yytext,K=ae.yylineno,Zt=ae.yylloc,g1>0)g1--}else ge=e1,e1=null;break;case 2:if(Be=this.productions_[me[1]][1],lt.$=W[W.length-Be],lt._$={first_line:s[s.length-(Be||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(Be||1)].first_column,last_column:s[s.length-1].last_column},B1)lt._$.range=[s[s.length-(Be||1)].range[0],s[s.length-1].range[1]];if(t1=this.performAction.apply(lt,[i,f1,K,je.yy,me[1],W,s].concat(L1)),typeof t1<"u")return t1;if(Be)T=T.slice(0,-1*Be*2),W=W.slice(0,-1*Be),s=s.slice(0,-1*Be);T.push(this.productions_[me[1]][0]),W.push(lt.$),s.push(lt._$),m1=L[T[T.length-2]][T[T.length-1]],T.push(m1);break;case 3:return!0}}return!0},"parse")},V1=function(){var we={EOF:1,parseError:t(function(x,T){if(this.yy.parser)this.yy.parser.parseError(x,T);else throw Error(x)},"parseError"),setInput:t(function(S,x){if(this.yy=x||this.yy||{},this._input=S,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:t(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var x=S.match(/(?:\r\n?|\n).*/g);if(x)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),S},"input"),unput:t(function(S){var x=S.length,T=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var u=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),T.length-1)this.yylineno-=T.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:T?(T.length===u.length?this.yylloc.first_column:0)+u[u.length-T.length].length-T[0].length:this.yylloc.first_column-x},this.options.ranges)this.yylloc.range=[W[0],W[0]+this.yyleng-x];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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).
24
+ Expecting `+Yt.join(", ")+", got '"+(this.terminals_[ge]||ge)+"'";else s1="Parse error on line "+(K+1)+": Unexpected "+(ge==b1?"end of input":"'"+(this.terminals_[ge]||ge)+"'");this.parseError(s1,{text:ae.match,token:this.terminals_[ge]||ge,line:ae.yylineno,loc:Zt,expected:Yt})}if(me[0]instanceof Array&&me.length>1)throw Error("Parse Error: multiple actions possible at state: "+ze+", token: "+ge);switch(me[0]){case 1:if(T.push(ge),W.push(ae.yytext),s.push(ae.yylloc),T.push(me[1]),ge=null,!e1){if(f1=ae.yyleng,i=ae.yytext,K=ae.yylineno,Zt=ae.yylloc,g1>0)g1--}else ge=e1,e1=null;break;case 2:if(Be=this.productions_[me[1]][1],ut.$=W[W.length-Be],ut._$={first_line:s[s.length-(Be||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(Be||1)].first_column,last_column:s[s.length-1].last_column},B1)ut._$.range=[s[s.length-(Be||1)].range[0],s[s.length-1].range[1]];if(t1=this.performAction.apply(ut,[i,f1,K,je.yy,me[1],W,s].concat(L1)),typeof t1<"u")return t1;if(Be)T=T.slice(0,-1*Be*2),W=W.slice(0,-1*Be),s=s.slice(0,-1*Be);T.push(this.productions_[me[1]][0]),W.push(ut.$),s.push(ut._$),m1=L[T[T.length-2]][T[T.length-1]],T.push(m1);break;case 3:return!0}}return!0},"parse")},V1=function(){var we={EOF:1,parseError:t(function(x,T){if(this.yy.parser)this.yy.parser.parseError(x,T);else throw Error(x)},"parseError"),setInput:t(function(S,x){if(this.yy=x||this.yy||{},this._input=S,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:t(function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var x=S.match(/(?:\r\n?|\n).*/g);if(x)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),S},"input"),unput:t(function(S){var x=S.length,T=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-x),this.offset-=x;var u=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),T.length-1)this.yylineno-=T.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:T?(T.length===u.length?this.yylloc.first_column:0)+u[u.length-T.length].length-T[0].length:this.yylloc.first_column-x},this.options.ranges)this.yylloc.range=[W[0],W[0]+this.yyleng-x];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(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).
25
25
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(S){this.unput(this.match.slice(S))},"less"),pastInput:t(function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var S=this.match;if(S.length<20)S+=this._input.substr(0,20-S.length);return(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var S=this.pastInput(),x=Array(S.length+1).join("-");return S+this.upcomingInput()+`
26
26
  `+x+"^"},"showPosition"),test_match:t(function(S,x){var T,u,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(u=S[0].match(/(?:\r\n?|\n).*/g),u)this.yylineno+=u.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,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(S[0].length),this.matched+=S[0],T=this.performAction.call(this,this.yy,this,x,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(T)return T;else if(this._backtrack){for(var s in W)this[s]=W[s];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var S,x,T,u;if(!this._more)this.yytext="",this.match="";var W=this._currentRules();for(var s=0;s<W.length;s++)if(T=this._input.match(this.rules[W[s]]),T&&(!x||T[0].length>x[0].length)){if(x=T,u=s,this.options.backtrack_lexer)if(S=this.test_match(T,W[s]),S!==!1)return S;else if(this._backtrack){x=!1;continue}else return!1;else if(!this.options.flex)break}if(x){if(S=this.test_match(x,W[u]),S!==!1)return S;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
27
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var x=this.next();if(x)return x;else return this.lex()},"lex"),begin:t(function(x){this.conditionStack.push(x)},"begin"),popState:t(function(){var x=this.conditionStack.length-1;if(x>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(x){if(x=this.conditionStack.length-1-Math.abs(x||0),x>=0)return this.conditionStack[x];else return"INITIAL"},"topState"),pushState:t(function(x){this.begin(x)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:t(function(x,T,u,W){var s=W;switch(u){case 0:return this.begin("acc_title"),38;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),40;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),T.yytext="",43;break;case 8:return this.pushState("shapeDataStr"),43;break;case 9:return this.popState(),43;break;case 10:let L=/\n\s*/g;return T.yytext=T.yytext.replace(L,"<br/>"),43;break;case 11:return 43;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 98;case 17:this.popState();break;case 18:return 99;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 87;case 26:return 105;case 27:return 88;case 28:return 107;case 29:return 89;case 30:return 90;case 31:return 100;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 91;case 35:if(x.lex.firstGraph())this.begin("dir");return 13;case 36:return 28;case 37:return 36;case 38:return 35;case 39:return 33;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return this.popState(),14;break;case 45:return this.popState(),15;break;case 46:return this.popState(),15;break;case 47:return this.popState(),15;break;case 48:return this.popState(),15;break;case 49:return this.popState(),15;break;case 50:return this.popState(),15;break;case 51:return this.popState(),15;break;case 52:return this.popState(),15;break;case 53:return this.popState(),15;break;case 54:return this.popState(),15;break;case 55:return 124;case 56:return 125;case 57:return 126;case 58:return 127;case 59:return 128;case 60:return 81;case 61:return 108;case 62:return 114;case 63:return 49;case 64:return 63;case 65:return 47;case 66:return 9;case 67:return 109;case 68:return 118;case 69:return this.popState(),80;break;case 70:return this.pushState("edgeText"),78;break;case 71:return 122;case 72:return 80;case 73:break;case 74:return this.popState(),56;break;case 75:return"TEXT";case 76:return this.pushState("ellipseText"),55;break;case 77:return this.popState(),58;break;case 78:return this.pushState("text"),57;break;case 79:return this.popState(),60;break;case 80:return this.pushState("text"),59;break;case 81:return 61;case 82:return this.pushState("text"),70;break;case 83:return this.popState(),67;break;case 84:return this.pushState("text"),66;break;case 85:return this.popState(),52;break;case 86:return this.pushState("text"),51;break;case 87:break;case 88:return this.popState(),72;break;case 89:return this.popState(),74;break;case 90:return 120;case 91:return this.pushState("trapText"),71;break;case 92:return this.pushState("trapText"),73;break;case 93:return 121;case 94:return 70;case 95:return 93;case 96:return"SEP";case 97:return 92;case 98:return 118;case 99:return 114;case 100:return 47;case 101:return 8;case 102:return 112;case 103:return 117;case 104:return 119;case 105:return this.popState(),65;break;case 106:return this.pushState("text"),65;break;case 107:return this.popState(),54;break;case 108:return this.pushState("text"),53;break;case 109:return this.popState(),32;break;case 110:return this.pushState("text"),30;break;case 111:return this.popState(),69;break;case 112:return this.pushState("text"),68;break;case 113:break;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 10;case 117:return 11;case 118:return 12}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:agentflow-beta\b)/,/^(?:flow\b)/,/^(?:connector\b)/,/^(?:global\b[ \t]*)/,/^(?:end\b[ \t]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*--+[x>]\s*)/,/^(?:\s*--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*-\.+-\s*)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|(?:[^\\\[\]\(\)\{\}\/%]+|(?!))+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:[ \t]*%%(?!\{)[^\n]*)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:(?:[^\[\]\(\)\{\}\|\"%]+|(?!))+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},href:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},click:{rules:[21,24,33,34,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},edgeText:{rules:[21,24,69,71,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},trapText:{rules:[21,24,76,78,80,84,86,87,88,89,90,91,92,106,108,110,112],inclusive:!1},ellipseText:{rules:[21,24,73,74,75,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},text:{rules:[21,24,76,77,78,79,80,83,84,85,86,91,92,105,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr:{rules:[3,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_title:{rules:[1,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},md_string:{rules:[19,20,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},string:{rules:[21,22,23,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,76,78,80,81,82,84,86,91,92,93,94,95,96,97,98,99,100,101,102,103,104,106,108,110,112,115,116,117,118],inclusive:!0}}};return we}();Qt.lexer=V1;function Wt(){this.yy={}}return t(Wt,"Parser"),Wt.prototype=Qt,Qt.Parser=Wt,new Wt}();r1.parser=r1;var v1=r1,F1=Object.assign({},v1);F1.parse=(e)=>{let r=e.replace(/}[^\S\n]*\n/g,`}
28
- `);return v1.parse(r)};var K1=F1,H1=t((e)=>{let{theme:r,bkgColorArray:n,borderColorArray:a}=e;if(!ct(r,a))return"";let c=ut(e.look),d=yt(n),o=ar(e.THEME_COLOR_LIMIT,a),h=t((A)=>a[A%a.length],"border"),k=t((A)=>d?`fill: ${n[A%n.length]};`:"","fill"),g="";for(let A of O1){let C=Xt.get(A),B=`[data-look="${c}"].node.${S1(A)}`;g+=`
27
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var x=this.next();if(x)return x;else return this.lex()},"lex"),begin:t(function(x){this.conditionStack.push(x)},"begin"),popState:t(function(){var x=this.conditionStack.length-1;if(x>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(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:t(function(x){if(x=this.conditionStack.length-1-Math.abs(x||0),x>=0)return this.conditionStack[x];else return"INITIAL"},"topState"),pushState:t(function(x){this.begin(x)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:t(function(x,T,u,W){var s=W;switch(u){case 0:return this.begin("acc_title"),38;break;case 1:return this.popState(),"acc_title_value";break;case 2:return this.begin("acc_descr"),40;break;case 3:return this.popState(),"acc_descr_value";break;case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),T.yytext="",43;break;case 8:return this.pushState("shapeDataStr"),43;break;case 9:return this.popState(),43;break;case 10:let L=/\n\s*/g;return T.yytext=T.yytext.replace(L,"<br/>"),43;break;case 11:return 43;case 12:this.popState();break;case 13:this.begin("callbackname");break;case 14:this.popState();break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 98;case 17:this.popState();break;case 18:return 99;case 19:return"MD_STR";case 20:this.popState();break;case 21:this.begin("md_string");break;case 22:return"STR";case 23:this.popState();break;case 24:this.pushState("string");break;case 25:return 87;case 26:return 105;case 27:return 88;case 28:return 107;case 29:return 89;case 30:return 90;case 31:return 100;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 91;case 35:if(x.lex.firstGraph())this.begin("dir");return 13;case 36:return 28;case 37:return 36;case 38:return 35;case 39:return 33;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return 101;case 44:return this.popState(),14;break;case 45:return this.popState(),15;break;case 46:return this.popState(),15;break;case 47:return this.popState(),15;break;case 48:return this.popState(),15;break;case 49:return this.popState(),15;break;case 50:return this.popState(),15;break;case 51:return this.popState(),15;break;case 52:return this.popState(),15;break;case 53:return this.popState(),15;break;case 54:return this.popState(),15;break;case 55:return 124;case 56:return 125;case 57:return 126;case 58:return 127;case 59:return 128;case 60:return 81;case 61:return 108;case 62:return 114;case 63:return 49;case 64:return 63;case 65:return 47;case 66:return 9;case 67:return 109;case 68:return 118;case 69:return this.popState(),80;break;case 70:return this.pushState("edgeText"),78;break;case 71:return 122;case 72:return 80;case 73:break;case 74:return this.popState(),56;break;case 75:return"TEXT";case 76:return this.pushState("ellipseText"),55;break;case 77:return this.popState(),58;break;case 78:return this.pushState("text"),57;break;case 79:return this.popState(),60;break;case 80:return this.pushState("text"),59;break;case 81:return 61;case 82:return this.pushState("text"),70;break;case 83:return this.popState(),67;break;case 84:return this.pushState("text"),66;break;case 85:return this.popState(),52;break;case 86:return this.pushState("text"),51;break;case 87:break;case 88:return this.popState(),72;break;case 89:return this.popState(),74;break;case 90:return 120;case 91:return this.pushState("trapText"),71;break;case 92:return this.pushState("trapText"),73;break;case 93:return 121;case 94:return 70;case 95:return 93;case 96:return"SEP";case 97:return 92;case 98:return 118;case 99:return 114;case 100:return 47;case 101:return 8;case 102:return 112;case 103:return 117;case 104:return 119;case 105:return this.popState(),65;break;case 106:return this.pushState("text"),65;break;case 107:return this.popState(),54;break;case 108:return this.pushState("text"),53;break;case 109:return this.popState(),32;break;case 110:return this.pushState("text"),30;break;case 111:return this.popState(),69;break;case 112:return this.pushState("text"),68;break;case 113:break;case 114:return"TEXT";case 115:return"QUOTE";case 116:return 10;case 117:return 11;case 118:return 12}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:agentflow-beta\b)/,/^(?:flow\b)/,/^(?:connector\b)/,/^(?:global\b[ \t]*)/,/^(?:end\b[ \t]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*--+[x>]\s*)/,/^(?:\s*--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*-\.+-\s*)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|(?:[^\\\[\]\(\)\{\}\/%]+|(?!))+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:[ \t]*%%(?!\{)[^\n]*)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:%%(?!\{)[^\n]*)/,/^(?:(?:[^\[\]\(\)\{\}\|\"%]+|(?!))+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},shapeData:{rules:[8,11,12,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackargs:{rules:[17,18,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},callbackname:{rules:[14,15,16,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},href:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},click:{rules:[21,24,33,34,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},edgeText:{rules:[21,24,69,71,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},trapText:{rules:[21,24,76,78,80,84,86,87,88,89,90,91,92,106,108,110,112],inclusive:!1},ellipseText:{rules:[21,24,73,74,75,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},text:{rules:[21,24,76,77,78,79,80,83,84,85,86,91,92,105,106,107,108,109,110,111,112,113,114],inclusive:!1},vertex:{rules:[21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_descr:{rules:[3,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},acc_title:{rules:[1,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},md_string:{rules:[19,20,21,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},string:{rules:[21,22,23,24,76,78,80,84,86,91,92,106,108,110,112],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,72,76,78,80,81,82,84,86,91,92,93,94,95,96,97,98,99,100,101,102,103,104,106,108,110,112,115,116,117,118],inclusive:!0}}};return we}();Qt.lexer=V1;function Kt(){this.yy={}}return t(Kt,"Parser"),Kt.prototype=Qt,Qt.Parser=Kt,new Kt}();r1.parser=r1;var v1=r1,F1=Object.assign({},v1);F1.parse=(e)=>{let r=e.replace(/}[^\S\n]*\n/g,`}
28
+ `);return v1.parse(r)};var K1=F1,H1=t((e)=>{let{theme:r,bkgColorArray:n,borderColorArray:a}=e;if(!pt(r,a))return"";let c=mt(e.look),d=wt(n),o=ar(e.THEME_COLOR_LIMIT,a),h=t((A)=>a[A%a.length],"border"),k=t((A)=>d?`fill: ${n[A%n.length]};`:"","fill"),g="";for(let A of O1){let C=Xt.get(A),B=`[data-look="${c}"].node.${S1(A)}`;g+=`
29
29
 
30
30
  ${B} rect,
31
31
  ${B} path,
@@ -40,7 +40,7 @@ Expecting `+Yt.join(", ")+", got '"+(this.terminals_[ge]||ge)+"'";else s1="Parse
40
40
  stroke: ${h(C)};
41
41
  ${k(C)}
42
42
  }
43
- `}return g},"genColor"),Y1=t((e,r)=>{let n=ya,a=n(e,"r"),c=n(e,"g"),d=n(e,"b");return bt(a,c,d,r)},"fade"),q1=t((e)=>`${H1(e)}
43
+ `}return g},"genColor"),Y1=t((e,r)=>{let n=xa,a=n(e,"r"),c=n(e,"g"),d=n(e,"b");return xt(a,c,d,r)},"fade"),q1=t((e)=>`${H1(e)}
44
44
  .label {
45
45
  font-family: ${e.fontFamily};
46
46
  color: ${e.nodeTextColor||e.textColor};
@@ -196,5 +196,5 @@ Expecting `+Yt.join(", ")+", got '"+(this.terminals_[ge]||ge)+"'";else s1="Parse
196
196
  }
197
197
  text-align: center;
198
198
  }
199
- ${qn()}
200
- `,"getStyles"),X1=q1,Es={parser:K1,get db(){return new U1},renderer:W1,styles:X1,init:t((e)=>{if(e.agentflow??={},e.layout)va({layout:e.layout});e.flowchart??={},e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,va({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")};export{Es as diagram};
199
+ ${Hn()}
200
+ `,"getStyles"),X1=q1,Cs={parser:K1,get db(){return new U1},renderer:W1,styles:X1,init:t((e)=>{if(e.agentflow??={},e.layout)wa({layout:e.layout});e.flowchart??={},e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,wa({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")};export{Cs as diagram};
@@ -1,4 +1,4 @@
1
- import{xe}from"./index-ver116ed.js";import{t,l,Jt,Y,E,re,F,O,G,z,j,q,H,b,nr,Ae,hd,M,ue,vt}from"./index-xfyxmaj1.js";import{vo}from"./index-dz18nn65.js";import{$e}from"./index-wnk9k57k.js";function Ge(e){var r=0,n=e.children,o=n&&n.length;if(!o)r=1;else while(--o>=0)r+=n[o].value;e.value=r}function de(){return this.eachAfter(Ge)}function fe(e,r){let n=-1;for(let o of this)e.call(r,o,++n,this);return this}function he(e,r){var n=this,o=[n],s,p,u=-1;while(n=o.pop())if(e.call(r,n,++u,this),s=n.children)for(p=s.length-1;p>=0;--p)o.push(s[p]);return this}function me(e,r){var n=this,o=[n],s=[],p,u,f,x=-1;while(n=o.pop())if(s.push(n),p=n.children)for(u=0,f=p.length;u<f;++u)o.push(p[u]);while(n=s.pop())e.call(r,n,++x,this);return this}function ge(e,r){let n=-1;for(let o of this)if(e.call(r,o,++n,this))return o}function ye(e){return this.eachAfter(function(r){var n=+e(r.data)||0,o=r.children,s=o&&o.length;while(--s>=0)n+=o[s].value;r.value=n})}function Se(e){return this.eachBefore(function(r){if(r.children)r.children.sort(e)})}function ve(e){var r=this,n=Xe(r,e),o=[r];while(r!==n)r=r.parent,o.push(r);var s=o.length;while(e!==n)o.splice(s,0,e),e=e.parent;return o}function Xe(e,r){if(e===r)return e;var n=e.ancestors(),o=r.ancestors(),s=null;e=n.pop(),r=o.pop();while(e===r)s=e,e=n.pop(),r=o.pop();return s}function be(){var e=this,r=[e];while(e=e.parent)r.push(e);return r}function we(){return Array.from(this)}function Ce(){var e=[];return this.eachBefore(function(r){if(!r.children)e.push(r)}),e}function Te(){var e=this,r=[];return e.each(function(n){if(n!==e)r.push({source:n.parent,target:n})}),r}function*Le(){var e=this,r,n=[e],o,s,p;do{r=n.reverse(),n=[];while(e=r.pop())if(yield e,o=e.children)for(s=0,p=o.length;s<p;++s)n.push(o[s])}while(n.length)}function K(e,r){if(e instanceof Map){if(e=[void 0,e],r===void 0)r=Ze}else if(r===void 0)r=je;var n=new ne(e),o,s=[n],p,u,f,x;while(o=s.pop())if((u=r(o.data))&&(x=(u=Array.from(u)).length)){o.children=u;for(f=x-1;f>=0;--f)s.push(p=u[f]=new ne(u[f])),p.parent=o,p.depth=o.depth+1}return n.eachBefore(Je)}function Ye(){return K(this).eachBefore(Ue)}function je(e){return e.children}function Ze(e){return Array.isArray(e)?e[1]:null}function Ue(e){if(e.data.value!==void 0)e.value=e.data.value;e.data=e.data.data}function Je(e){var r=0;do e.height=r;while((e=e.parent)&&e.height<++r)}function ne(e){this.data=e,this.depth=this.height=0,this.parent=null}ne.prototype=K.prototype={constructor:ne,count:de,each:fe,eachAfter:me,eachBefore:he,find:ge,sum:ye,sort:Se,path:ve,ancestors:be,descendants:we,leaves:Ce,links:Te,copy:Ye,[Symbol.iterator]:Le};function Ve(e){if(typeof e!=="function")throw Error();return e}function Q(){return 0}function X(e){return function(){return e}}function Fe(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Ne(e,r,n,o,s){var p=e.children,u,f=-1,x=p.length,d=e.value&&(o-r)/e.value;while(++f<x)u=p[f],u.y0=n,u.y1=s,u.x0=r,u.x1=r+=u.value*d}function ke(e,r,n,o,s){var p=e.children,u,f=-1,x=p.length,d=e.value&&(s-n)/e.value;while(++f<x)u=p[f],u.x0=r,u.x1=o,u.y0=n,u.y1=n+=u.value*d}var Ke=(1+Math.sqrt(5))/2;function Qe(e,r,n,o,s,p){var u=[],f=r.children,x,d,h=0,T=0,i=f.length,C,v,w=r.value,m,S,P,D,Z,te,B;while(h<i){C=s-n,v=p-o;do m=f[T++].value;while(!m&&T<i);S=P=m,te=Math.max(v/C,C/v)/(w*e),B=m*m*te,Z=Math.max(P/B,B/S);for(;T<i;++T){if(m+=d=f[T].value,d<S)S=d;if(d>P)P=d;if(B=m*m*te,D=Math.max(P/B,B/S),D>Z){m-=d;break}Z=D}if(u.push(x={value:m,dice:C<v,children:f.slice(h,T)}),x.dice)Ne(x,n,o,s,w?o+=v*m/w:p);else ke(x,n,o,w?n+=C*m/w:s,p);w-=m,h=T}return u}var Pe=function e(r){function n(o,s,p,u,f){Qe(r,o,s,p,u,f)}return n.ratio=function(o){return e((o=+o)>1?o:1)},n}(Ke);function ie(){var e=Pe,r=!1,n=1,o=1,s=[0],p=Q,u=Q,f=Q,x=Q,d=Q;function h(i){if(i.x0=i.y0=0,i.x1=n,i.y1=o,i.eachBefore(T),s=[0],r)i.eachBefore(Fe);return i}function T(i){var C=s[i.depth],v=i.x0+C,w=i.y0+C,m=i.x1-C,S=i.y1-C;if(m<v)v=m=(v+m)/2;if(S<w)w=S=(w+S)/2;if(i.x0=v,i.y0=w,i.x1=m,i.y1=S,i.children){if(C=s[i.depth+1]=p(i)/2,v+=d(i)-C,w+=u(i)-C,m-=f(i)-C,S-=x(i)-C,m<v)v=m=(v+m)/2;if(S<w)w=S=(w+S)/2;e(i,v,w,m,S)}}return h.round=function(i){return arguments.length?(r=!!i,h):r},h.size=function(i){return arguments.length?(n=+i[0],o=+i[1],h):[n,o]},h.tile=function(i){return arguments.length?(e=Ve(i),h):e},h.padding=function(i){return arguments.length?h.paddingInner(i).paddingOuter(i):h.paddingInner()},h.paddingInner=function(i){return arguments.length?(p=typeof i==="function"?i:X(+i),h):p},h.paddingOuter=function(i){return arguments.length?h.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):h.paddingTop()},h.paddingTop=function(i){return arguments.length?(u=typeof i==="function"?i:X(+i),h):u},h.paddingRight=function(i){return arguments.length?(f=typeof i==="function"?i:X(+i),h):f},h.paddingBottom=function(i){return arguments.length?(x=typeof i==="function"?i:X(+i),h):x},h.paddingLeft=function(i){return arguments.length?(d=typeof i==="function"?i:X(+i),h):d},h}var Be=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=O,this.getAccTitle=G,this.setDiagramTitle=q,this.getDiagramTitle=H,this.getAccDescription=j,this.setAccDescription=z}static{t(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let e=Y,r=E();return ue({...e.treemap,...r.treemap??{}})}addNode(e,r){if(this.nodes.push(e),this.levels.set(e,r),r===0)this.outerNodes.push(e),this.root??=e}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,r){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},o=r.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");if(o)o.forEach((s)=>{if(hd(s))if(n?.textStyles)n.textStyles.push(s);else n.textStyles=[s];if(n?.styles)n.styles.push(s);else n.styles=[s]});this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){F(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function Ee(e){if(!e.length)return[];let r=[],n=[];return e.forEach((o)=>{let s={name:o.name,children:o.type==="Leaf"?void 0:[]};if(s.classSelector=o?.classSelector,o?.cssCompiledStyles)s.cssCompiledStyles=o.cssCompiledStyles;if(o.type==="Leaf"&&o.value!==void 0)s.value=o.value;while(n.length>0&&n[n.length-1].level>=o.level)n.pop();if(n.length===0)r.push(s);else{let p=n[n.length-1].node;if(p.children)p.children.push(s);else p.children=[s]}if(o.type!=="Leaf")n.push({node:s,level:o.level})}),r}t(Ee,"buildHierarchy");var et=t((e,r)=>{xe(e,r);let n=[];for(let p of e.TreemapRows??[])if(p.$type==="ClassDefStatement")r.addClass(p.className??"",p.styleText??"");for(let p of e.TreemapRows??[]){let u=p.item;if(!u)continue;let f=p.indent?parseInt(p.indent):0,x=tt(u),d=u.classSelector?r.getStylesForClass(u.classSelector):[],h=d.length>0?d:void 0,T={level:f,name:x,type:u.$type,value:u.value,classSelector:u.classSelector,cssCompiledStyles:h};n.push(T)}let o=Ee(n),s=t((p,u)=>{for(let f of p)if(r.addNode(f,u),f.children&&f.children.length>0)s(f.children,u+1)},"addNodesRecursively");s(o,0)},"populate"),tt=t((e)=>e.name?String(e.name):"","getItemName"),Re={parser:{yy:void 0},parse:t(async(e)=>{try{let n=await $e("treemap",e);l.debug("Treemap AST:",n);let o=Re.parser?.yy;if(!(o instanceof Be))throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");et(n,o)}catch(r){throw l.error("Error parsing treemap:",r),r}},"parse")},at=10,ee=10,le=25,rt=t((e,r,n,o)=>{let s=o.db,p=s.getConfig(),u=p.padding??at,f=s.getDiagramTitle(),x=s.getRoot(),{themeVariables:d}=E();if(!x)return;let h=f?30:0,T=Ae(r),i=p.nodeWidth?p.nodeWidth*ee:960,C=p.nodeHeight?p.nodeHeight*ee:500,v=i,w=C+h;T.attr("viewBox",`0 0 ${v} ${w}`),re(T,w,v,p.useMaxWidth);let m;try{let a=p.valueFormat||",";if(a==="$0,0")m=t((c)=>"$"+vo(",")(c),"valueFormat");else if(a.startsWith("$")&&a.includes(",")){let c=/\.\d+/.exec(a),g=c?c[0]:"";m=t((L)=>"$"+vo(","+g)(L),"valueFormat")}else if(a.startsWith("$")){let c=a.substring(1);m=t((g)=>"$"+vo(c||"")(g),"valueFormat")}else m=vo(a)}catch(a){l.error("Error creating format function:",a),m=vo(",")}let S=nr().range(["transparent",d.cScale0,d.cScale1,d.cScale2,d.cScale3,d.cScale4,d.cScale5,d.cScale6,d.cScale7,d.cScale8,d.cScale9,d.cScale10,d.cScale11]),P=nr().range(["transparent",d.cScalePeer0,d.cScalePeer1,d.cScalePeer2,d.cScalePeer3,d.cScalePeer4,d.cScalePeer5,d.cScalePeer6,d.cScalePeer7,d.cScalePeer8,d.cScalePeer9,d.cScalePeer10,d.cScalePeer11]),D=nr().range([d.cScaleLabel0,d.cScaleLabel1,d.cScaleLabel2,d.cScaleLabel3,d.cScaleLabel4,d.cScaleLabel5,d.cScaleLabel6,d.cScaleLabel7,d.cScaleLabel8,d.cScaleLabel9,d.cScaleLabel10,d.cScaleLabel11]);if(f)T.append("text").attr("x",v/2).attr("y",h/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(f);let Z=T.append("g").attr("transform",`translate(0, ${h})`).attr("class","treemapContainer"),te=K(x).sum((a)=>a.value??0).sort((a,c)=>(c.value??0)-(a.value??0)),Me=ie().size([i,C]).paddingTop((a)=>a.children&&a.children.length>0?le+ee:0).paddingInner(u).paddingLeft((a)=>a.children&&a.children.length>0?ee:0).paddingRight((a)=>a.children&&a.children.length>0?ee:0).paddingBottom((a)=>a.children&&a.children.length>0?ee:0).round(!0)(te),We=Me.descendants().filter((a)=>a.children&&a.children.length>0),ae=Z.selectAll(".treemapSection").data(We).enter().append("g").attr("class","treemapSection").attr("transform",(a)=>`translate(${a.x0},${a.y0})`);if(ae.append("rect").attr("width",(a)=>a.x1-a.x0).attr("height",le).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",0.6).attr("stroke-width",0.6).attr("style",(a)=>{if(a.depth===0)return"display: none;";return""}),ae.append("clipPath").attr("id",(a,c)=>`clip-section-${r}-${c}`).append("rect").attr("width",(a)=>Math.max(0,a.x1-a.x0-12)).attr("height",le),ae.append("rect").attr("width",(a)=>a.x1-a.x0).attr("height",(a)=>a.y1-a.y0).attr("class",(a,c)=>`treemapSection section${c}`).attr("fill",(a)=>S(a.data.name)).attr("fill-opacity",0.6).attr("stroke",(a)=>P(a.data.name)).attr("stroke-width",2).attr("stroke-opacity",0.4).attr("style",(a)=>{if(a.depth===0)return"display: none;";let c=M({cssCompiledStyles:a.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),ae.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",le/2).attr("dominant-baseline","middle").text((a)=>a.depth===0?"":a.data.name).attr("font-weight","bold").attr("clip-path",(a,c)=>`url(#clip-section-${r}-${c})`).attr("style",(a)=>{if(a.depth===0)return"display: none;";let c="dominant-baseline: middle; font-size: 12px; fill:"+D(a.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=M({cssCompiledStyles:a.data.cssCompiledStyles});return c+g.labelStyles.replace("color:","fill:")}).each(function(a){if(a.depth===0)return;let c=b(this),g=a.data.name;c.text(g);let L=a.x1-a.x0,N=6,A;if(p.showValues!==!1&&a.value){let _=L-10,I=30,Oe=10;A=_-30-10-N}else A=L-N-6;let y=Math.max(15,A),W=c.node();if(W.getComputedTextLength()>y){let I=g;while(I.length>0){if(I=g.substring(0,I.length-1),I.length===0){if(c.text("..."),W.getComputedTextLength()>y)c.text("");break}if(c.text(I+"..."),W.getComputedTextLength()<=y)break}}}),p.showValues!==!1)ae.append("text").attr("class","treemapSectionValue").attr("x",(a)=>a.x1-a.x0-10).attr("y",le/2).attr("text-anchor","end").attr("dominant-baseline","middle").text((a)=>a.value?m(a.value):"").attr("font-style","italic").attr("style",(a)=>{if(a.depth===0)return"display: none;";let c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+D(a.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=M({cssCompiledStyles:a.data.cssCompiledStyles});return c+g.labelStyles.replace("color:","fill:")});let _e=Me.leaves(),V=_e.length>20,He=V?16:38,oe=V?14:28,U=V?4:8,J=V?4:6,ce=V?2:4,ze=V?8:10,pe=V?1:2,se=Z.selectAll(".treemapLeafGroup").data(_e).enter().append("g").attr("class",(a,c)=>`treemapNode treemapLeafGroup leaf${c}${a.data.classSelector?` ${a.data.classSelector}`:""}x`).attr("transform",(a)=>`translate(${a.x0},${a.y0})`);if(se.append("rect").attr("width",(a)=>a.x1-a.x0).attr("height",(a)=>a.y1-a.y0).attr("class","treemapLeaf").attr("fill",(a)=>a.parent?S(a.parent.data.name):S(a.data.name)).attr("style",(a)=>M({cssCompiledStyles:a.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",0.3).attr("stroke",(a)=>a.parent?S(a.parent.data.name):S(a.data.name)).attr("stroke-width",3),se.append("clipPath").attr("id",(a,c)=>`clip-${r}-${c}`).append("rect").attr("width",(a)=>Math.max(0,a.x1-a.x0-4)).attr("height",(a)=>Math.max(0,a.y1-a.y0-4)),se.append("text").attr("class","treemapLabel").attr("x",(a)=>(a.x1-a.x0)/2).attr("y",(a)=>(a.y1-a.y0)/2).attr("style",(a)=>{let c=`text-anchor: middle; dominant-baseline: middle; font-size: ${He}px;fill:`+D(a.data.name)+";",g=M({cssCompiledStyles:a.data.cssCompiledStyles});return c+g.labelStyles.replace("color:","fill:")}).attr("clip-path",(a,c)=>`url(#clip-${r}-${c})`).text((a)=>a.data.name).each(function(a){let c=b(this),g=a.x1-a.x0,L=a.y1-a.y0,N=c.node(),A=g-2*ce,R=L-2*ce;if(A<ze||R<ze){c.style("display","none");return}let y=parseInt(c.style("font-size"),10),W=0.6;while(N.getComputedTextLength()>A&&y>U)y--,c.style("font-size",`${y}px`);let k=Math.max(J,Math.min(oe,Math.round(y*W))),_=y+pe+k;while(_>R&&y>U){if(y--,k=Math.max(J,Math.min(oe,Math.round(y*W))),k<J&&y===U)break;if(c.style("font-size",`${y}px`),_=y+pe+k,k<=J&&_>R);}if(c.style("font-size",`${y}px`),V){if(y<U||R<U)c.style("display","none")}else if(N.getComputedTextLength()>A||y<U||R<y)c.style("display","none")}),p.showValues!==!1)se.append("text").attr("class","treemapValue").attr("x",(c)=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",(c)=>{let g=`text-anchor: middle; dominant-baseline: hanging; font-size: ${oe}px;fill:`+D(c.data.name)+";",L=M({cssCompiledStyles:c.data.cssCompiledStyles});return g+L.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,g)=>`url(#clip-${r}-${g})`).text((c)=>c.value?m(c.value):"").each(function(c){let g=b(this),L=this.parentNode;if(!L){g.style("display","none");return}let N=b(L).select(".treemapLabel");if(N.empty()||N.style("display")==="none"){g.style("display","none");return}let A=parseFloat(N.style("font-size")),y=Math.max(J,Math.min(oe,Math.round(A*0.6)));g.style("font-size",`${y}px`);let k=(c.y1-c.y0)/2+A/2+pe;g.attr("y",k);let _=c.x1-c.x0,De=c.y1-c.y0-4,qe=_-2*ce;if(g.node().getComputedTextLength()>qe||k+y>De||y<J)g.style("display","none");else g.style("display",null)});let Ie=p.diagramPadding??8;vt(T,Ie,"flowchart",p?.useMaxWidth||!1)},"draw"),nt=t(function(e,r){return r.db.getClasses()},"getClasses"),lt={draw:rt,getClasses:nt},ot={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},st=t(({treemap:e}={})=>{let r=Jt(),n=E(),o=ue(r,n.themeVariables),s=ue(ot,e),p=s.titleColor??o.titleColor,u=s.labelColor??o.textColor,f=s.valueColor??o.textColor;return`
1
+ import{xe}from"./index-f6t91mpp.js";import{t,l,Xt,Y,E,ne,F,O,G,z,j,q,H,b,nr,Ae,wd,M,ue,Ct}from"./index-60cxxnpk.js";import{wo}from"./index-yh7gngsh.js";import{je}from"./index-nf4hq5tg.js";function qe(e){var r=0,n=e.children,o=n&&n.length;if(!o)r=1;else while(--o>=0)r+=n[o].value;e.value=r}function de(){return this.eachAfter(qe)}function fe(e,r){let n=-1;for(let o of this)e.call(r,o,++n,this);return this}function he(e,r){var n=this,o=[n],s,p,u=-1;while(n=o.pop())if(e.call(r,n,++u,this),s=n.children)for(p=s.length-1;p>=0;--p)o.push(s[p]);return this}function me(e,r){var n=this,o=[n],s=[],p,u,f,x=-1;while(n=o.pop())if(s.push(n),p=n.children)for(u=0,f=p.length;u<f;++u)o.push(p[u]);while(n=s.pop())e.call(r,n,++x,this);return this}function ge(e,r){let n=-1;for(let o of this)if(e.call(r,o,++n,this))return o}function ye(e){return this.eachAfter(function(r){var n=+e(r.data)||0,o=r.children,s=o&&o.length;while(--s>=0)n+=o[s].value;r.value=n})}function Se(e){return this.eachBefore(function(r){if(r.children)r.children.sort(e)})}function ve(e){var r=this,n=Ge(r,e),o=[r];while(r!==n)r=r.parent,o.push(r);var s=o.length;while(e!==n)o.splice(s,0,e),e=e.parent;return o}function Ge(e,r){if(e===r)return e;var n=e.ancestors(),o=r.ancestors(),s=null;e=n.pop(),r=o.pop();while(e===r)s=e,e=n.pop(),r=o.pop();return s}function be(){var e=this,r=[e];while(e=e.parent)r.push(e);return r}function we(){return Array.from(this)}function Ce(){var e=[];return this.eachBefore(function(r){if(!r.children)e.push(r)}),e}function Te(){var e=this,r=[];return e.each(function(n){if(n!==e)r.push({source:n.parent,target:n})}),r}function*Le(){var e=this,r,n=[e],o,s,p;do{r=n.reverse(),n=[];while(e=r.pop())if(yield e,o=e.children)for(s=0,p=o.length;s<p;++s)n.push(o[s])}while(n.length)}function K(e,r){if(e instanceof Map){if(e=[void 0,e],r===void 0)r=Ze}else if(r===void 0)r=Ye;var n=new re(e),o,s=[n],p,u,f,x;while(o=s.pop())if((u=r(o.data))&&(x=(u=Array.from(u)).length)){o.children=u;for(f=x-1;f>=0;--f)s.push(p=u[f]=new re(u[f])),p.parent=o,p.depth=o.depth+1}return n.eachBefore(Je)}function Xe(){return K(this).eachBefore(Ue)}function Ye(e){return e.children}function Ze(e){return Array.isArray(e)?e[1]:null}function Ue(e){if(e.data.value!==void 0)e.value=e.data.value;e.data=e.data.data}function Je(e){var r=0;do e.height=r;while((e=e.parent)&&e.height<++r)}function re(e){this.data=e,this.depth=this.height=0,this.parent=null}re.prototype=K.prototype={constructor:re,count:de,each:fe,eachAfter:me,eachBefore:he,find:ge,sum:ye,sort:Se,path:ve,ancestors:be,descendants:we,leaves:Ce,links:Te,copy:Xe,[Symbol.iterator]:Le};function De(e){if(typeof e!=="function")throw Error();return e}function Q(){return 0}function X(e){return function(){return e}}function $e(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Fe(e,r,n,o,s){var p=e.children,u,f=-1,x=p.length,d=e.value&&(o-r)/e.value;while(++f<x)u=p[f],u.y0=n,u.y1=s,u.x0=r,u.x1=r+=u.value*d}function Ne(e,r,n,o,s){var p=e.children,u,f=-1,x=p.length,d=e.value&&(s-n)/e.value;while(++f<x)u=p[f],u.x0=r,u.x1=o,u.y0=n,u.y1=n+=u.value*d}var Ke=(1+Math.sqrt(5))/2;function Qe(e,r,n,o,s,p){var u=[],f=r.children,x,d,h=0,T=0,i=f.length,C,v,w=r.value,m,S,P,D,Z,te,B;while(h<i){C=s-n,v=p-o;do m=f[T++].value;while(!m&&T<i);S=P=m,te=Math.max(v/C,C/v)/(w*e),B=m*m*te,Z=Math.max(P/B,B/S);for(;T<i;++T){if(m+=d=f[T].value,d<S)S=d;if(d>P)P=d;if(B=m*m*te,D=Math.max(P/B,B/S),D>Z){m-=d;break}Z=D}if(u.push(x={value:m,dice:C<v,children:f.slice(h,T)}),x.dice)Fe(x,n,o,s,w?o+=v*m/w:p);else Ne(x,n,o,w?n+=C*m/w:s,p);w-=m,h=T}return u}var Ve=function e(r){function n(o,s,p,u,f){Qe(r,o,s,p,u,f)}return n.ratio=function(o){return e((o=+o)>1?o:1)},n}(Ke);function ie(){var e=Ve,r=!1,n=1,o=1,s=[0],p=Q,u=Q,f=Q,x=Q,d=Q;function h(i){if(i.x0=i.y0=0,i.x1=n,i.y1=o,i.eachBefore(T),s=[0],r)i.eachBefore($e);return i}function T(i){var C=s[i.depth],v=i.x0+C,w=i.y0+C,m=i.x1-C,S=i.y1-C;if(m<v)v=m=(v+m)/2;if(S<w)w=S=(w+S)/2;if(i.x0=v,i.y0=w,i.x1=m,i.y1=S,i.children){if(C=s[i.depth+1]=p(i)/2,v+=d(i)-C,w+=u(i)-C,m-=f(i)-C,S-=x(i)-C,m<v)v=m=(v+m)/2;if(S<w)w=S=(w+S)/2;e(i,v,w,m,S)}}return h.round=function(i){return arguments.length?(r=!!i,h):r},h.size=function(i){return arguments.length?(n=+i[0],o=+i[1],h):[n,o]},h.tile=function(i){return arguments.length?(e=De(i),h):e},h.padding=function(i){return arguments.length?h.paddingInner(i).paddingOuter(i):h.paddingInner()},h.paddingInner=function(i){return arguments.length?(p=typeof i==="function"?i:X(+i),h):p},h.paddingOuter=function(i){return arguments.length?h.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):h.paddingTop()},h.paddingTop=function(i){return arguments.length?(u=typeof i==="function"?i:X(+i),h):u},h.paddingRight=function(i){return arguments.length?(f=typeof i==="function"?i:X(+i),h):f},h.paddingBottom=function(i){return arguments.length?(x=typeof i==="function"?i:X(+i),h):x},h.paddingLeft=function(i){return arguments.length?(d=typeof i==="function"?i:X(+i),h):d},h}var Pe=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=O,this.getAccTitle=G,this.setDiagramTitle=q,this.getDiagramTitle=H,this.getAccDescription=j,this.setAccDescription=z}static{t(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let e=Y,r=E();return ue({...e.treemap,...r.treemap??{}})}addNode(e,r){if(this.nodes.push(e),this.levels.set(e,r),r===0)this.outerNodes.push(e),this.root??=e}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,r){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},o=r.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");if(o)o.forEach((s)=>{if(wd(s))if(n?.textStyles)n.textStyles.push(s);else n.textStyles=[s];if(n?.styles)n.styles.push(s);else n.styles=[s]});this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){F(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function Be(e){if(!e.length)return[];let r=[],n=[];return e.forEach((o)=>{let s={name:o.name,children:o.type==="Leaf"?void 0:[]};if(s.classSelector=o?.classSelector,o?.cssCompiledStyles)s.cssCompiledStyles=o.cssCompiledStyles;if(o.type==="Leaf"&&o.value!==void 0)s.value=o.value;while(n.length>0&&n[n.length-1].level>=o.level)n.pop();if(n.length===0)r.push(s);else{let p=n[n.length-1].node;if(p.children)p.children.push(s);else p.children=[s]}if(o.type!=="Leaf")n.push({node:s,level:o.level})}),r}t(Be,"buildHierarchy");var et=t((e,r)=>{xe(e,r);let n=[];for(let p of e.TreemapRows??[])if(p.$type==="ClassDefStatement")r.addClass(p.className??"",p.styleText??"");for(let p of e.TreemapRows??[]){let u=p.item;if(!u)continue;let f=p.indent?parseInt(p.indent):0,x=tt(u),d=u.classSelector?r.getStylesForClass(u.classSelector):[],h=d.length>0?d:void 0,T={level:f,name:x,type:u.$type,value:u.value,classSelector:u.classSelector,cssCompiledStyles:h};n.push(T)}let o=Be(n),s=t((p,u)=>{for(let f of p)if(r.addNode(f,u),f.children&&f.children.length>0)s(f.children,u+1)},"addNodesRecursively");s(o,0)},"populate"),tt=t((e)=>e.name?String(e.name):"","getItemName"),Ee={parser:{yy:void 0},parse:t(async(e)=>{try{let n=await je("treemap",e);l.debug("Treemap AST:",n);let o=Ee.parser?.yy;if(!(o instanceof Pe))throw Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");et(n,o)}catch(r){throw l.error("Error parsing treemap:",r),r}},"parse")},at=10,ee=10,le=25,rt=t((e,r,n,o)=>{let s=o.db,p=s.getConfig(),u=p.padding??at,f=s.getDiagramTitle(),x=s.getRoot(),{themeVariables:d}=E();if(!x)return;let h=f?30:0,T=Ae(r),i=p.nodeWidth?p.nodeWidth*ee:960,C=p.nodeHeight?p.nodeHeight*ee:500,v=i,w=C+h;T.attr("viewBox",`0 0 ${v} ${w}`),ne(T,w,v,p.useMaxWidth);let m;try{let a=p.valueFormat||",";if(a==="$0,0")m=t((c)=>"$"+wo(",")(c),"valueFormat");else if(a.startsWith("$")&&a.includes(",")){let c=/\.\d+/.exec(a),g=c?c[0]:"";m=t((L)=>"$"+wo(","+g)(L),"valueFormat")}else if(a.startsWith("$")){let c=a.substring(1);m=t((g)=>"$"+wo(c||"")(g),"valueFormat")}else m=wo(a)}catch(a){l.error("Error creating format function:",a),m=wo(",")}let S=nr().range(["transparent",d.cScale0,d.cScale1,d.cScale2,d.cScale3,d.cScale4,d.cScale5,d.cScale6,d.cScale7,d.cScale8,d.cScale9,d.cScale10,d.cScale11]),P=nr().range(["transparent",d.cScalePeer0,d.cScalePeer1,d.cScalePeer2,d.cScalePeer3,d.cScalePeer4,d.cScalePeer5,d.cScalePeer6,d.cScalePeer7,d.cScalePeer8,d.cScalePeer9,d.cScalePeer10,d.cScalePeer11]),D=nr().range([d.cScaleLabel0,d.cScaleLabel1,d.cScaleLabel2,d.cScaleLabel3,d.cScaleLabel4,d.cScaleLabel5,d.cScaleLabel6,d.cScaleLabel7,d.cScaleLabel8,d.cScaleLabel9,d.cScaleLabel10,d.cScaleLabel11]);if(f)T.append("text").attr("x",v/2).attr("y",h/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(f);let Z=T.append("g").attr("transform",`translate(0, ${h})`).attr("class","treemapContainer"),te=K(x).sum((a)=>a.value??0).sort((a,c)=>(c.value??0)-(a.value??0)),ke=ie().size([i,C]).paddingTop((a)=>a.children&&a.children.length>0?le+ee:0).paddingInner(u).paddingLeft((a)=>a.children&&a.children.length>0?ee:0).paddingRight((a)=>a.children&&a.children.length>0?ee:0).paddingBottom((a)=>a.children&&a.children.length>0?ee:0).round(!0)(te),Re=ke.descendants().filter((a)=>a.children&&a.children.length>0),ae=Z.selectAll(".treemapSection").data(Re).enter().append("g").attr("class","treemapSection").attr("transform",(a)=>`translate(${a.x0},${a.y0})`);if(ae.append("rect").attr("width",(a)=>a.x1-a.x0).attr("height",le).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",0.6).attr("stroke-width",0.6).attr("style",(a)=>{if(a.depth===0)return"display: none;";return""}),ae.append("clipPath").attr("id",(a,c)=>`clip-section-${r}-${c}`).append("rect").attr("width",(a)=>Math.max(0,a.x1-a.x0-12)).attr("height",le),ae.append("rect").attr("width",(a)=>a.x1-a.x0).attr("height",(a)=>a.y1-a.y0).attr("class",(a,c)=>`treemapSection section${c}`).attr("fill",(a)=>S(a.data.name)).attr("fill-opacity",0.6).attr("stroke",(a)=>P(a.data.name)).attr("stroke-width",2).attr("stroke-opacity",0.4).attr("style",(a)=>{if(a.depth===0)return"display: none;";let c=M({cssCompiledStyles:a.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),ae.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",le/2).attr("dominant-baseline","middle").text((a)=>a.depth===0?"":a.data.name).attr("font-weight","bold").attr("clip-path",(a,c)=>`url(#clip-section-${r}-${c})`).attr("style",(a)=>{if(a.depth===0)return"display: none;";let c="dominant-baseline: middle; font-size: 12px; fill:"+D(a.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=M({cssCompiledStyles:a.data.cssCompiledStyles});return c+g.labelStyles.replace("color:","fill:")}).each(function(a){if(a.depth===0)return;let c=b(this),g=a.data.name;c.text(g);let L=a.x1-a.x0,N=6,A;if(p.showValues!==!1&&a.value){let _=L-10,I=30,Ie=10;A=_-30-10-N}else A=L-N-6;let y=Math.max(15,A),W=c.node();if(W.getComputedTextLength()>y){let I=g;while(I.length>0){if(I=g.substring(0,I.length-1),I.length===0){if(c.text("..."),W.getComputedTextLength()>y)c.text("");break}if(c.text(I+"..."),W.getComputedTextLength()<=y)break}}}),p.showValues!==!1)ae.append("text").attr("class","treemapSectionValue").attr("x",(a)=>a.x1-a.x0-10).attr("y",le/2).attr("text-anchor","end").attr("dominant-baseline","middle").text((a)=>a.value?m(a.value):"").attr("font-style","italic").attr("style",(a)=>{if(a.depth===0)return"display: none;";let c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+D(a.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=M({cssCompiledStyles:a.data.cssCompiledStyles});return c+g.labelStyles.replace("color:","fill:")});let Me=ke.leaves(),V=Me.length>20,We=V?16:38,oe=V?14:28,U=V?4:8,J=V?4:6,ce=V?2:4,_e=V?8:10,pe=V?1:2,se=Z.selectAll(".treemapLeafGroup").data(Me).enter().append("g").attr("class",(a,c)=>`treemapNode treemapLeafGroup leaf${c}${a.data.classSelector?` ${a.data.classSelector}`:""}x`).attr("transform",(a)=>`translate(${a.x0},${a.y0})`);if(se.append("rect").attr("width",(a)=>a.x1-a.x0).attr("height",(a)=>a.y1-a.y0).attr("class","treemapLeaf").attr("fill",(a)=>a.parent?S(a.parent.data.name):S(a.data.name)).attr("style",(a)=>M({cssCompiledStyles:a.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",0.3).attr("stroke",(a)=>a.parent?S(a.parent.data.name):S(a.data.name)).attr("stroke-width",3),se.append("clipPath").attr("id",(a,c)=>`clip-${r}-${c}`).append("rect").attr("width",(a)=>Math.max(0,a.x1-a.x0-4)).attr("height",(a)=>Math.max(0,a.y1-a.y0-4)),se.append("text").attr("class","treemapLabel").attr("x",(a)=>(a.x1-a.x0)/2).attr("y",(a)=>(a.y1-a.y0)/2).attr("style",(a)=>{let c=`text-anchor: middle; dominant-baseline: middle; font-size: ${We}px;fill:`+D(a.data.name)+";",g=M({cssCompiledStyles:a.data.cssCompiledStyles});return c+g.labelStyles.replace("color:","fill:")}).attr("clip-path",(a,c)=>`url(#clip-${r}-${c})`).text((a)=>a.data.name).each(function(a){let c=b(this),g=a.x1-a.x0,L=a.y1-a.y0,N=c.node(),A=g-2*ce,R=L-2*ce;if(A<_e||R<_e){c.style("display","none");return}let y=parseInt(c.style("font-size"),10),W=0.6;while(N.getComputedTextLength()>A&&y>U)y--,c.style("font-size",`${y}px`);let k=Math.max(J,Math.min(oe,Math.round(y*W))),_=y+pe+k;while(_>R&&y>U){if(y--,k=Math.max(J,Math.min(oe,Math.round(y*W))),k<J&&y===U)break;if(c.style("font-size",`${y}px`),_=y+pe+k,k<=J&&_>R);}if(c.style("font-size",`${y}px`),V){if(y<U||R<U)c.style("display","none")}else if(N.getComputedTextLength()>A||y<U||R<y)c.style("display","none")}),p.showValues!==!1)se.append("text").attr("class","treemapValue").attr("x",(c)=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",(c)=>{let g=`text-anchor: middle; dominant-baseline: hanging; font-size: ${oe}px;fill:`+D(c.data.name)+";",L=M({cssCompiledStyles:c.data.cssCompiledStyles});return g+L.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,g)=>`url(#clip-${r}-${g})`).text((c)=>c.value?m(c.value):"").each(function(c){let g=b(this),L=this.parentNode;if(!L){g.style("display","none");return}let N=b(L).select(".treemapLabel");if(N.empty()||N.style("display")==="none"){g.style("display","none");return}let A=parseFloat(N.style("font-size")),y=Math.max(J,Math.min(oe,Math.round(A*0.6)));g.style("font-size",`${y}px`);let k=(c.y1-c.y0)/2+A/2+pe;g.attr("y",k);let _=c.x1-c.x0,ze=c.y1-c.y0-4,Oe=_-2*ce;if(g.node().getComputedTextLength()>Oe||k+y>ze||y<J)g.style("display","none");else g.style("display",null)});let He=p.diagramPadding??8;Ct(T,He,"flowchart",p?.useMaxWidth||!1)},"draw"),nt=t(function(e,r){return r.db.getClasses()},"getClasses"),lt={draw:rt,getClasses:nt},ot={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},st=t(({treemap:e}={})=>{let r=Xt(),n=E(),o=ue(r,n.themeVariables),s=ue(ot,e),p=s.titleColor??o.titleColor,u=s.labelColor??o.textColor,f=s.valueColor??o.textColor;return`
2
2
  .treemapNode.section {
3
3
  stroke: ${s.sectionStrokeColor};
4
4
  stroke-width: ${s.sectionStrokeWidth};
@@ -21,4 +21,4 @@ import{xe}from"./index-ver116ed.js";import{t,l,Jt,Y,E,re,F,O,G,z,j,q,H,b,nr,Ae,h
21
21
  fill: ${p};
22
22
  font-size: ${s.titleFontSize};
23
23
  }
24
- `},"getStyles"),it=st,da={parser:Re,get db(){return new Be},renderer:lt,styles:it};export{da as diagram};
24
+ `},"getStyles"),it=st,da={parser:Ee,get db(){return new Pe},renderer:lt,styles:it};export{da as diagram};
@@ -1,3 +1,3 @@
1
- import{xe}from"./index-ver116ed.js";import{t,l,Y,E,te,F,O,G,z,j,q,H,m,mc,b,rs,vd,ue}from"./index-xfyxmaj1.js";import{ld,$e}from"./index-wnk9k57k.js";var D="position frame",N="frame positioned",S="position relation",C="relation positioned",he=t(function(e){l.debug("options str",e)},"setOptions"),pe=t(function(){return{}},"getOptions"),be=t(function(){I(),F()},"clear");function I(){B={}}t(I,"reset");var ve=Y.eventmodeling,we=t(()=>ue({...ve,...E().eventmodeling}),"getConfig"),B={};function W(){let e=ye,{ast:i}=B,n=A();if(!i)throw Error("No data for EventModel");return i.frames.forEach((r,a)=>{let o=J(r,i.dataEntities,n);e=y(e,{$kind:D,index:a,frame:r,textProps:o});let d=void 0;if(re(r))l.debug("source frame",r.sourceFrames),d=i.frames.filter((c)=>r.sourceFrames.some((u)=>u.$refText===c.name)),d.forEach((c)=>{e=y(e,{$kind:S,index:a,frame:r,sourceFrame:c})});else e=y(e,{$kind:S,index:a,frame:r})}),e={...e,sortedSwimlanesArray:R(e.swimlanes)},e}t(W,"getState");function U(e){B.ast=e}t(U,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function A(){return s}t(A,"getDiagramProps");var ye={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function _(e){let i=e.split(".");if(i.length===2)return i[0];return}t(_,"extractNamespace");function L(e){let i=e.split(".");if(i.length===2)return i[1];return e}t(L,"extractName");function V(e,i){if(!i||i.length===0)return;return Object.values(e).find((n)=>n.namespace===i)}t(V,"findSwimlaneByNamespace");function w(e,i,n){return Math.max(i,...Object.keys(e).filter((r)=>{let a=Number.parseInt(r);return a>i&&a<n}).map((r)=>Number.parseInt(r)))+1}t(w,"findNextAvailableIndex");function X(e,i){let n=_(e.entityIdentifier),r=V(i,n);switch(e.modelEntityType){case"ui":case"pcr":case"processor":if(r)return{index:r.index,label:r.namespace||s.labelUiAutomation};else if(n)return{index:w(i,0,100),label:s.labelUiAutomationPrefix+n};return{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":if(r)return{index:r.index,label:r.namespace||s.labelCommandReadModel};else if(n)return{index:w(i,100,200),label:s.labelCommandReadModelPrefix+n};return{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:if(r)return{index:r.index,label:r.namespace||s.labelEvents};else if(n)return{index:w(i,200,300),label:s.labelEventsPrefix+n};return{index:200,label:s.labelEvents}}}t(X,"calculateSwimlaneProps");function K(e){let{themeVariables:i}=E();switch(e.modelEntityType){case"ui":return{fill:i.emUiFill??"white",stroke:i.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:i.emProcessorFill??"#edb3f6",stroke:i.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:i.emReadModelFill??"#d3f1a2",stroke:i.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:i.emCommandFill??"#bcd6fe",stroke:i.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:i.emEventFill??"#ffb778",stroke:i.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}t(K,"calculateEntityVisualProps");function J(e,i,n){let r=E(),a=te(L(e.entityIdentifier)??"",r),o,d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"},u=`<b>${rs(a,n.textMaxWidth,d)}</b>`;if(e.dataInlineValue)o=e.dataInlineValue,o=o.substring(o.indexOf("{")+1),o=o.substring(0,o.lastIndexOf("}")-1),o=te(o,r),o=rs(o,n.textMaxWidth,d),o=o.replaceAll(" ","&nbsp;");if(e.dataReference){let v=i.find((P)=>P.name===e.dataReference?.$refText);if(v)o=v.dataBlockValue,o=o.substring(o.indexOf(`{
2
- `)+2),o=o.substring(0,o.lastIndexOf("}")-1),o=te(o,r),o=rs(o,n.textMaxWidth,d),o=o.replaceAll(" ","&nbsp;"),o+="<br/>"}let x=o!==void 0;if(x)u+=`<br/><br/><code style="text-align: left; display: block;max-width:${n.textMaxWidth}px">${o}</code>`;let g={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},f=vd(u,g),p=x?f.width/3:f.width,h={content:u,width:p,height:f.height};return l.debug(`[${e.name}] ${e.entityIdentifier} text`,h),h}t(J,"calculateTextProps");function Q(e,i){let n=i,r=K(n.frame),a={width:n.textProps.width+2*s.boxTextPadding,height:n.textProps.height+2*s.boxTextPadding};return[{$kind:N,frame:n.frame,index:n.index,visual:r,dimension:a,textProps:n.textProps}]}t(Q,"decidePositionFrame");function Z(e,i,n){if(i===void 0)return s.contentStartX;if(i.index===e.index&&e.r)return e.r+s.boxPadding;if(n===void 0)return s.contentStartX;return n.r-s.boxOverlap+s.boxPadding}t(Z,"calculateX");function ee(e,i){let n=[...e.map((r)=>r.r),i];return Math.max(...n)}t(ee,"calculateMaxRight");function R(e){return Object.values(e).sort((i,n)=>i.index-n.index)}t(R,"sortedSwimlanesArray");function ne(e,i){let n=i,r=X(n.frame,e.swimlanes),a;if(r.index in e.swimlanes)a=e.swimlanes[r.index];else a={index:r.index,label:r.label,r:0,y:r.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};let o=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,c={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,n.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,n.dimension.height))+2*s.boxPadding},u=Z(a,d,o),x=u+c.width+s.boxPadding,g=ee(Object.values(e.swimlanes),x);a.r=u+c.width,a.maxHeight=Math.max(a.maxHeight,c.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;let f={x:u,y:s.swimlanePadding+a.y,r:x,dimension:c,leftSibling:!1,swimlane:a,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},p={...e,boxes:[...e.boxes,f],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:g},h=R(p.swimlanes);if(h.length>0)h[0].y=0;for(let v=1;v<h.length;v++){let P=h[v],T=h[v-1];P.y=T.y+T.height+s.swimlaneGap}return p}t(ne,"evolveFramePositioned");function ie(e,i){if(e===0&&i.sourceFrames.length===0)return!0;return!1}t(ie,"isFirstFrame");function re(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}t(re,"hasSourceFrame");function M(e,i){if(i===void 0||i===null)return;return e.find((n)=>n.frame.name===i.name)}t(M,"findBoxByFrame");function ae(e,i,n){if(n<0)return;for(let r=n;r>=0;r--){let a=e[r];if(a.swimlane.index!==i)return a}return}t(ae,"findBoxByLineIndex");function oe(e,i){let n=i;if(ld(n.frame)||ie(n.index,n.frame))return[];let r=M(e.boxes,n.frame);if(r===void 0)throw Error(`Target box not found for frame ${n.frame.name}`);let a;if(n.sourceFrame)a=M(e.boxes,n.sourceFrame);else a=ae(e.boxes,r.swimlane.index,n.index-1);if(a===void 0)return[];return[{$kind:C,frame:n.frame,index:n.index,sourceBox:a,targetBox:r}]}t(oe,"decidePositionRelation");function se(e,i){let n=i,r={visual:{fill:"none",stroke:"#000"},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}t(se,"evolveRelationPositioned");var Pe={[D]:Q,[S]:oe},Se={[N]:ne,[C]:se};function de(e,i){let n=Pe[i.$kind];if(n===void 0||n===null)return[];let r=n(e,i);return l.debug("decided events",r),r}t(de,"decide");function le(e,i){let n=i.reduce((r,a)=>{let o=Se[a.$kind];if(o===void 0||o===null)return r;return o(r,a)},e);return l.debug("evolve events",{state:e,newState:n,events:i}),n}t(le,"evolve");function y(e,i){let n=de(e,i);return le(e,n)}t(y,"dispatch");var k={getConfig:we,setOptions:he,getOptions:pe,clear:be,setAccTitle:O,getAccTitle:G,getAccDescription:j,setAccDescription:z,setDiagramTitle:q,getDiagramTitle:H,setAst:U,getDiagramProps:A,getState:W},Me={parse:t(async(e)=>{let i=await $e("eventmodeling",e);l.debug(i),k.setAst(i),xe(i,k)},"parse")},ke=m(),Fe=ke?.eventmodeling;function ce(e,i){return(n)=>{let r=n.swimlane.y+i.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",n.x).attr("y",r).attr("rx","3").attr("width",n.dimension.width).attr("height",n.dimension.height).attr("stroke",n.visual.stroke).attr("fill",n.visual.fill),a.append("foreignObject").attr("x",n.x+i.boxPadding).attr("y",r+10).attr("width",n.dimension.width-2*i.boxPadding).attr("height",n.dimension.height-2*i.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(n.text)}}t(ce,"renderD3Box");function me(e,i){return e>i}t(me,"dirUpwards");function fe(e,i,n,r){return(a)=>{let o=a.sourceBox.swimlane.y+i.swimlanePadding,d=a.targetBox.swimlane.y+i.swimlanePadding,c=me(o,d),u=a.sourceBox.x+a.sourceBox.dimension.width*2/3,x=a.targetBox.x+a.targetBox.dimension.width/3,g,f;if(l.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c)g=o,f=d+a.targetBox.dimension.height;else g=o+a.sourceBox.dimension.height,f=d;let p=r.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",p).attr("stroke-width","1").attr("marker-end",`url(#${n})`).attr("d",`M${u} ${g} L${x} ${f}`)}}t(fe,"renderD3Relation");function ge(e,i,n,r){return(a)=>{let o=e.append("g").attr("class","em-swimlane"),d=r.emSwimlaneBackgroundOdd??"rgb(250,250,250)",c=r.emSwimlaneBackgroundStroke??"rgb(240,240,240)";o.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",i+n.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",c),o.append("text").attr("font-weight",n.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}t(ge,"renderD3Swimlane");var Be=t(function(e,i,n,r){if(l.debug("in eventmodeling renderer",e+`
3
- `,"id:",i,n),!Fe)throw Error("EventModeling config not found");let a=r.db,{themeVariables:o,eventmodeling:d}=m(),c=b(`[id="${i}"]`),u=a.getDiagramProps(),x=a.getState(),g=`em-arrowhead-${i}`,f=o.emArrowhead??"#000000";x.sortedSwimlanesArray.forEach(ge(c,x.maxR,u,o)),x.boxes.forEach(ce(c,u)),x.relations.forEach(fe(c,u,g,o)),c.append("defs").append("marker").attr("id",g).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),mc(void 0,c,d?.padding??30,d?.useMaxWidth)},"draw"),Ee={draw:Be},Ae=t((e)=>"","getStyles"),Re=Ae,Ue={parser:Me,db:k,renderer:Ee,styles:Re};export{Ue as diagram};
1
+ import{xe}from"./index-f6t91mpp.js";import{t,l,Y,E,te,F,O,G,z,j,q,H,m,kc,b,ss,Bd,ue}from"./index-60cxxnpk.js";import{fd,je}from"./index-nf4hq5tg.js";var D="position frame",N="frame positioned",S="position relation",C="relation positioned",he=t(function(e){l.debug("options str",e)},"setOptions"),pe=t(function(){return{}},"getOptions"),be=t(function(){I(),F()},"clear");function I(){B={}}t(I,"reset");var ve=Y.eventmodeling,we=t(()=>ue({...ve,...E().eventmodeling}),"getConfig"),B={};function W(){let e=ye,{ast:i}=B,n=A();if(!i)throw Error("No data for EventModel");return i.frames.forEach((r,a)=>{let o=J(r,i.dataEntities,n);e=y(e,{$kind:D,index:a,frame:r,textProps:o});let d=void 0;if(re(r))l.debug("source frame",r.sourceFrames),d=i.frames.filter((c)=>r.sourceFrames.some((u)=>u.$refText===c.name)),d.forEach((c)=>{e=y(e,{$kind:S,index:a,frame:r,sourceFrame:c})});else e=y(e,{$kind:S,index:a,frame:r})}),e={...e,sortedSwimlanesArray:R(e.swimlanes)},e}t(W,"getState");function U(e){B.ast=e}t(U,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function A(){return s}t(A,"getDiagramProps");var ye={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function _(e){let i=e.split(".");if(i.length===2)return i[0];return}t(_,"extractNamespace");function L(e){let i=e.split(".");if(i.length===2)return i[1];return e}t(L,"extractName");function V(e,i){if(!i||i.length===0)return;return Object.values(e).find((n)=>n.namespace===i)}t(V,"findSwimlaneByNamespace");function w(e,i,n){return Math.max(i,...Object.keys(e).filter((r)=>{let a=Number.parseInt(r);return a>i&&a<n}).map((r)=>Number.parseInt(r)))+1}t(w,"findNextAvailableIndex");function X(e,i){let n=_(e.entityIdentifier),r=V(i,n);switch(e.modelEntityType){case"ui":case"pcr":case"processor":if(r)return{index:r.index,label:r.namespace||s.labelUiAutomation};else if(n)return{index:w(i,0,100),label:s.labelUiAutomationPrefix+n};return{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":if(r)return{index:r.index,label:r.namespace||s.labelCommandReadModel};else if(n)return{index:w(i,100,200),label:s.labelCommandReadModelPrefix+n};return{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:if(r)return{index:r.index,label:r.namespace||s.labelEvents};else if(n)return{index:w(i,200,300),label:s.labelEventsPrefix+n};return{index:200,label:s.labelEvents}}}t(X,"calculateSwimlaneProps");function K(e){let{themeVariables:i}=E();switch(e.modelEntityType){case"ui":return{fill:i.emUiFill??"white",stroke:i.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:i.emProcessorFill??"#edb3f6",stroke:i.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:i.emReadModelFill??"#d3f1a2",stroke:i.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:i.emCommandFill??"#bcd6fe",stroke:i.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:i.emEventFill??"#ffb778",stroke:i.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}t(K,"calculateEntityVisualProps");function J(e,i,n){let r=E(),a=te(L(e.entityIdentifier)??"",r),o,d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"},u=`<b>${ss(a,n.textMaxWidth,d)}</b>`;if(e.dataInlineValue)o=e.dataInlineValue,o=o.substring(o.indexOf("{")+1),o=o.substring(0,o.lastIndexOf("}")-1),o=te(o,r),o=ss(o,n.textMaxWidth,d),o=o.replaceAll(" ","&nbsp;");if(e.dataReference){let v=i.find((P)=>P.name===e.dataReference?.$refText);if(v)o=v.dataBlockValue,o=o.substring(o.indexOf(`{
2
+ `)+2),o=o.substring(0,o.lastIndexOf("}")-1),o=te(o,r),o=ss(o,n.textMaxWidth,d),o=o.replaceAll(" ","&nbsp;"),o+="<br/>"}let x=o!==void 0;if(x)u+=`<br/><br/><code style="text-align: left; display: block;max-width:${n.textMaxWidth}px">${o}</code>`;let g={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},f=Bd(u,g),p=x?f.width/3:f.width,h={content:u,width:p,height:f.height};return l.debug(`[${e.name}] ${e.entityIdentifier} text`,h),h}t(J,"calculateTextProps");function Q(e,i){let n=i,r=K(n.frame),a={width:n.textProps.width+2*s.boxTextPadding,height:n.textProps.height+2*s.boxTextPadding};return[{$kind:N,frame:n.frame,index:n.index,visual:r,dimension:a,textProps:n.textProps}]}t(Q,"decidePositionFrame");function Z(e,i,n){if(i===void 0)return s.contentStartX;if(i.index===e.index&&e.r)return e.r+s.boxPadding;if(n===void 0)return s.contentStartX;return n.r-s.boxOverlap+s.boxPadding}t(Z,"calculateX");function ee(e,i){let n=[...e.map((r)=>r.r),i];return Math.max(...n)}t(ee,"calculateMaxRight");function R(e){return Object.values(e).sort((i,n)=>i.index-n.index)}t(R,"sortedSwimlanesArray");function ne(e,i){let n=i,r=X(n.frame,e.swimlanes),a;if(r.index in e.swimlanes)a=e.swimlanes[r.index];else a={index:r.index,label:r.label,r:0,y:r.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};let o=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,c={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,n.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,n.dimension.height))+2*s.boxPadding},u=Z(a,d,o),x=u+c.width+s.boxPadding,g=ee(Object.values(e.swimlanes),x);a.r=u+c.width,a.maxHeight=Math.max(a.maxHeight,c.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;let f={x:u,y:s.swimlanePadding+a.y,r:x,dimension:c,leftSibling:!1,swimlane:a,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},p={...e,boxes:[...e.boxes,f],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:g},h=R(p.swimlanes);if(h.length>0)h[0].y=0;for(let v=1;v<h.length;v++){let P=h[v],T=h[v-1];P.y=T.y+T.height+s.swimlaneGap}return p}t(ne,"evolveFramePositioned");function ie(e,i){if(e===0&&i.sourceFrames.length===0)return!0;return!1}t(ie,"isFirstFrame");function re(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}t(re,"hasSourceFrame");function M(e,i){if(i===void 0||i===null)return;return e.find((n)=>n.frame.name===i.name)}t(M,"findBoxByFrame");function ae(e,i,n){if(n<0)return;for(let r=n;r>=0;r--){let a=e[r];if(a.swimlane.index!==i)return a}return}t(ae,"findBoxByLineIndex");function oe(e,i){let n=i;if(fd(n.frame)||ie(n.index,n.frame))return[];let r=M(e.boxes,n.frame);if(r===void 0)throw Error(`Target box not found for frame ${n.frame.name}`);let a;if(n.sourceFrame)a=M(e.boxes,n.sourceFrame);else a=ae(e.boxes,r.swimlane.index,n.index-1);if(a===void 0)return[];return[{$kind:C,frame:n.frame,index:n.index,sourceBox:a,targetBox:r}]}t(oe,"decidePositionRelation");function se(e,i){let n=i,r={visual:{fill:"none",stroke:"#000"},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}t(se,"evolveRelationPositioned");var Pe={[D]:Q,[S]:oe},Se={[N]:ne,[C]:se};function de(e,i){let n=Pe[i.$kind];if(n===void 0||n===null)return[];let r=n(e,i);return l.debug("decided events",r),r}t(de,"decide");function le(e,i){let n=i.reduce((r,a)=>{let o=Se[a.$kind];if(o===void 0||o===null)return r;return o(r,a)},e);return l.debug("evolve events",{state:e,newState:n,events:i}),n}t(le,"evolve");function y(e,i){let n=de(e,i);return le(e,n)}t(y,"dispatch");var k={getConfig:we,setOptions:he,getOptions:pe,clear:be,setAccTitle:O,getAccTitle:G,getAccDescription:j,setAccDescription:z,setDiagramTitle:q,getDiagramTitle:H,setAst:U,getDiagramProps:A,getState:W},Me={parse:t(async(e)=>{let i=await je("eventmodeling",e);l.debug(i),k.setAst(i),xe(i,k)},"parse")},ke=m(),Fe=ke?.eventmodeling;function ce(e,i){return(n)=>{let r=n.swimlane.y+i.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",n.x).attr("y",r).attr("rx","3").attr("width",n.dimension.width).attr("height",n.dimension.height).attr("stroke",n.visual.stroke).attr("fill",n.visual.fill),a.append("foreignObject").attr("x",n.x+i.boxPadding).attr("y",r+10).attr("width",n.dimension.width-2*i.boxPadding).attr("height",n.dimension.height-2*i.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(n.text)}}t(ce,"renderD3Box");function me(e,i){return e>i}t(me,"dirUpwards");function fe(e,i,n,r){return(a)=>{let o=a.sourceBox.swimlane.y+i.swimlanePadding,d=a.targetBox.swimlane.y+i.swimlanePadding,c=me(o,d),u=a.sourceBox.x+a.sourceBox.dimension.width*2/3,x=a.targetBox.x+a.targetBox.dimension.width/3,g,f;if(l.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c)g=o,f=d+a.targetBox.dimension.height;else g=o+a.sourceBox.dimension.height,f=d;let p=r.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",p).attr("stroke-width","1").attr("marker-end",`url(#${n})`).attr("d",`M${u} ${g} L${x} ${f}`)}}t(fe,"renderD3Relation");function ge(e,i,n,r){return(a)=>{let o=e.append("g").attr("class","em-swimlane"),d=r.emSwimlaneBackgroundOdd??"rgb(250,250,250)",c=r.emSwimlaneBackgroundStroke??"rgb(240,240,240)";o.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",i+n.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",c),o.append("text").attr("font-weight",n.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}t(ge,"renderD3Swimlane");var Be=t(function(e,i,n,r){if(l.debug("in eventmodeling renderer",e+`
3
+ `,"id:",i,n),!Fe)throw Error("EventModeling config not found");let a=r.db,{themeVariables:o,eventmodeling:d}=m(),c=b(`[id="${i}"]`),u=a.getDiagramProps(),x=a.getState(),g=`em-arrowhead-${i}`,f=o.emArrowhead??"#000000";x.sortedSwimlanesArray.forEach(ge(c,x.maxR,u,o)),x.boxes.forEach(ce(c,u)),x.relations.forEach(fe(c,u,g,o)),c.append("defs").append("marker").attr("id",g).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",f),kc(void 0,c,d?.padding??30,d?.useMaxWidth)},"draw"),Ee={draw:Be},Ae=t((e)=>"","getStyles"),Re=Ae,He={parser:Me,db:k,renderer:Ee,styles:Re};export{He as diagram};