@kabmo-labs/kabmo 0.61.0 → 0.62.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.
- package/README.md +53 -49
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +1157 -825
- package/dist/client/static/js/{Body-ab8wswhm.js → Body-z6kstvk6.js} +3 -3
- package/dist/client/static/js/{CsvGrid-czssywvz.js → CsvGrid-f73c0s4e.js} +2 -2
- package/dist/client/static/js/{DocxView-ke0dwdmt.js → DocxView-a1pb7nsb.js} +3 -3
- package/dist/client/static/js/{DrawioView-a1whhy84.js → DrawioView-r61gcg24.js} +2 -2
- package/dist/client/static/js/{HtmlPreview-dr32dwjy.js → HtmlPreview-vt7j0b05.js} +1 -1
- package/dist/client/static/js/ImageView-4nhr5dtm.js +1 -0
- package/dist/client/static/js/LayoutWrapper-vwhy0vhj.js +2 -0
- package/dist/client/static/js/MergeDiffView-f4h9ss71.js +1 -0
- package/dist/client/static/js/Modal-cadmjkak.js +60 -0
- package/dist/client/static/js/{PdfView-2kdn91f9.js → PdfView-mppt2gkd.js} +1 -1
- package/dist/client/static/js/SessionsView-vvsaw9f0.js +1 -0
- package/dist/client/static/js/{SheetView-ettr9pdw.js → SheetView-5s9zfx9g.js} +9 -9
- package/dist/client/static/js/{SvgPreview-hzcejjry.js → SvgPreview-ff78xn3e.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-kdmv4y72.js → abnfDiagram-O67JEVCF-p29sh3w2.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-83w3kytq.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-qyrwaq0x.js → architectureDiagram-NJMV4G6O-nbpdyea3.js} +3 -3
- package/dist/client/static/js/{astro-yphdvdty.js → astro-qtfmc8x7.js} +1 -1
- package/dist/client/static/js/bash-wcy12qjx.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-tszxy2g7.js → blockDiagram-BEXU5L5S-t8xbexa6.js} +6 -6
- package/dist/client/static/js/c-vvantfth.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-0ye36hhv.js → c4Diagram-YGBWAQC7-9fwf2zxk.js} +3 -3
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-szgk1shv.js → classDiagram-v2-NBCMYWYE-nbapgqbs.js} +4 -4
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-0s9s4mmv.js → cose-bilkent-JH36ORCC-k54mmydp.js} +1 -1
- package/dist/client/static/js/cpp-5x63r6g0.js +1 -0
- package/dist/client/static/js/css-j2j6f03w.js +1 -0
- package/dist/client/static/js/css-qk59j6rj.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-80z02zrj.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-664g28ze.js → cynefinDiagram-VND7K2PF-qdg32wah.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-ga4rp1jx.js → dagre-6A5THRUB-qzshg1vs.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-aagj46ty.js → diagram-22UHCM2B-197hemfa.js} +11 -11
- package/dist/client/static/js/{diagram-3UASUU5V-20qk6whk.js → diagram-3UASUU5V-236gnjr6.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-1vg1tfca.js → diagram-ATOU4E4O-vjgpyaaq.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-90d6jrqs.js → diagram-CDSNMT55-ywvzcx7z.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-8je4z8m1.js → diagram-MLGK6HIB-9ey7ev7j.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-0kzpexsj.js → diagram-MPIPVDR6-vrqbb6r7.js} +2 -2
- package/dist/client/static/js/{dockerfile-5nrbr0ef.js → dockerfile-4nked309.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-47yg36zx.js → ebnfDiagram-ZINNZB2B-hvnkevqy.js} +1 -1
- package/dist/client/static/js/{elixir-3nwnd9yw.js → elixir-3jvh6v4k.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-5hqp6r2d.js → elk-276RUBZZ-nej6yy1c.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-bt9te7r0.js → erDiagram-OPXOYQCR-ww453xcy.js} +5 -5
- package/dist/client/static/js/{erlang-p5c4n3t0.js → erlang-4fz73a1q.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-y9pq2709.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-e6v7513q.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-kzc13swm.js → ganttDiagram-FUAMR5RP-abc5wy70.js} +3 -3
- package/dist/client/static/js/gitGraph-4MIJSDKK-fzaf9azs.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-bjf8aa3j.js → gitGraphDiagram-X574FWY7-4acqzj2h.js} +7 -7
- package/dist/client/static/js/graphql-hpkvdvk7.js +1 -0
- package/dist/client/static/js/html-x12gb1wk.js +1 -0
- package/dist/client/static/js/{index-v88m5sva.js → index-0g82ph6h.js} +2 -2
- package/dist/client/static/js/{index-1fmjhm2d.js → index-0w1jzang.js} +5 -5
- package/dist/client/static/js/{index-kj70d2q9.js → index-1svt0cdw.js} +2 -2
- package/dist/client/static/js/{index-m24sebb0.js → index-1tb4py5v.js} +2 -2
- package/dist/client/static/js/index-2gt9krtj.js +4 -0
- package/dist/client/static/js/index-2x9m7s1a.js +1 -0
- package/dist/client/static/js/index-3fvqmz3m.js +4 -0
- package/dist/client/static/js/{index-k9yf2txw.js → index-42wvbkm5.js} +2 -2
- package/dist/client/static/js/index-477vtt51.js +2 -0
- package/dist/client/static/js/{index-ca6tmamh.js → index-4px56qaz.js} +2 -2
- package/dist/client/static/js/{index-excgtjhx.js → index-5anvw7xg.js} +36 -36
- package/dist/client/static/js/index-5nb9k2ph.js +1 -0
- package/dist/client/static/js/{index-97sw4d9n.js → index-615je3km.js} +2 -2
- package/dist/client/static/js/{index-jz4012t5.js → index-66qxrh5n.js} +1 -1
- package/dist/client/static/js/{index-a145x0w2.js → index-7kct1sz1.js} +2 -2
- package/dist/client/static/js/{index-hwv7bfxc.js → index-8e0d8y30.js} +2 -2
- package/dist/client/static/js/{index-s4j2ghmx.js → index-90bq56xw.js} +2 -2
- package/dist/client/static/js/{index-wsy6y5em.js → index-b1gzh60t.js} +11 -11
- package/dist/client/static/js/{index-10vzyga1.js → index-bypkmjrz.js} +2 -2
- package/dist/client/static/js/{index-n8r7r86r.js → index-c1vd63yd.js} +2 -2
- package/dist/client/static/js/index-c9f0hejv.js +3 -0
- package/dist/client/static/js/{index-2dmew334.js → index-cgqj15g0.js} +2 -2
- package/dist/client/static/js/{index-mtav0rpf.js → index-cts5re1t.js} +2 -2
- package/dist/client/static/js/index-dxc14kmm.js +1 -0
- package/dist/client/static/js/{index-krdz5vby.js → index-dxyjxhm1.js} +2 -2
- package/dist/client/static/js/{index-zr3965k9.js → index-edpyqz9f.js} +1 -1
- package/dist/client/static/js/{index-h7agc069.js → index-eesepb70.js} +2 -2
- package/dist/client/static/js/{index-r38e0rya.js → index-evh437bz.js} +2 -2
- package/dist/client/static/js/index-ey6v4t5b.js +1 -0
- package/dist/client/static/js/{index-025s3fp8.js → index-fsd7n336.js} +2 -2
- package/dist/client/static/js/{index-yfcy4cf6.js → index-h7a7fqag.js} +2 -2
- package/dist/client/static/js/{index-11qn05g9.js → index-hffgwnvz.js} +2 -2
- package/dist/client/static/js/index-j734ev6q.js +482 -0
- package/dist/client/static/js/{index-9g2nzgpx.js → index-jcbp1d9d.js} +6 -6
- package/dist/client/static/js/index-jg5h18sm.js +2 -0
- package/dist/client/static/js/{index-bq9f0mxp.js → index-jtdve6xw.js} +7 -7
- package/dist/client/static/js/{index-kyr612aa.js → index-k0bqrb1y.js} +1 -1
- package/dist/client/static/js/{index-bdtftrym.js → index-kegevd10.js} +2 -2
- package/dist/client/static/js/{index-fr6wsqk8.js → index-kqcfxkch.js} +2 -2
- package/dist/client/static/js/{index-sr14vwn5.js → index-kv1xnem9.js} +2 -2
- package/dist/client/static/js/{index-xy0m8te9.js → index-m54ctmxr.js} +1 -1
- package/dist/client/static/js/index-mgzbypt5.js +314 -0
- package/dist/client/static/js/{index-85jfn1fz.js → index-mh52531j.js} +2 -2
- package/dist/client/static/js/{index-776n5n29.js → index-mhz5ywa4.js} +5 -5
- package/dist/client/static/js/{index-3j2he86h.js → index-nnwdbg3t.js} +2 -2
- package/dist/client/static/js/{index-3x7cbxwq.js → index-nxd6z7f9.js} +2 -2
- package/dist/client/static/js/{index-dabnbvbc.js → index-pjrbt77c.js} +2 -2
- package/dist/client/static/js/index-r7h4pm42.js +2 -0
- package/dist/client/static/js/index-ratrdgc9.js +2 -0
- package/dist/client/static/js/{index-475dc6h9.js → index-rhmvh9w5.js} +2 -2
- package/dist/client/static/js/{index-twwsn91p.js → index-sqzjwy9h.js} +2 -2
- package/dist/client/static/js/{index-z5s9tmj8.js → index-tckzkw0f.js} +2 -2
- package/dist/client/static/js/index-tza9h3q6.css +1 -0
- package/dist/client/static/js/{index-qccydkze.js → index-vhjfr093.js} +2 -2
- package/dist/client/static/js/{index-653x8zdq.js → index-w0j96eyy.js} +8 -8
- package/dist/client/static/js/{index-24a40rw8.js → index-ws04kxy9.js} +1 -1
- package/dist/client/static/js/{index-a3bpmw2r.js → index-x1yqmzpr.js} +2 -2
- package/dist/client/static/js/{index-fb2fjndj.js → index-x2f7wykb.js} +6 -6
- package/dist/client/static/js/index-y8405hdg.js +10 -0
- package/dist/client/static/js/{index-sx83ans2.js → index-yxk7dgnb.js} +2 -2
- package/dist/client/static/js/{index-bkn6jtn1.js → index-zavecxak.js} +2 -2
- package/dist/client/static/js/{index-vn59zz0k.js → index-zg7q3kcb.js} +2 -2
- package/dist/client/static/js/{index-enm77k5z.js → index-zhn9vv3z.js} +2 -2
- package/dist/client/static/js/{index-vgcw01yk.js → index-zy963qbh.js} +1 -1
- package/dist/client/static/js/info-A6RAGUB7-t7pbg7rt.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-jy5zvvj8.js → infoDiagram-VRGFBTTK-9pe7w3r5.js} +2 -2
- package/dist/client/static/js/ini-522adp5a.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-pfky1nnf.js → ishikawaDiagram-OU5B5YK6-38arfrx5.js} +2 -2
- package/dist/client/static/js/java-z0rgs7v6.js +1 -0
- package/dist/client/static/js/javascript-fv87f565.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-mvaf7rfh.js → journeyDiagram-ZHPQQLJL-kcwzjgtz.js} +4 -4
- package/dist/client/static/js/json-1czq1ped.js +1 -0
- package/dist/client/static/js/jsx-1fch2jyr.js +1 -0
- package/dist/client/static/js/{julia-rpd1y9vh.js → julia-pzzxbptm.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-hw2xwe6e.js → kanban-definition-PNTS6WVX-nmegwy9w.js} +15 -15
- package/dist/client/static/js/lua-nn8bpjev.js +1 -0
- package/dist/client/static/js/markdown-38tqrgkn.js +1 -0
- package/dist/client/static/js/{mermaid.core-hsw87hmq.js → mermaid.core-3aae27b9.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-wfe4d846.js → mindmap-definition-NLK3R4M7-zsaq4e65.js} +12 -12
- package/dist/client/static/js/one-dark-pro-trnff03z.js +1 -0
- package/dist/client/static/js/one-light-ck31ptqs.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-rwac7scq.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-cvnmxgst.js → pegDiagram-GJSIUBJH-2b6whj1p.js} +1 -1
- package/dist/client/static/js/{perl-kmtz9dnv.js → perl-zdkbbjd2.js} +1 -1
- package/dist/client/static/js/{php-bttrsbxy.js → php-ktaxff6g.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-gjz20apz.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-0n3gz7sv.js → pieDiagram-5QR66LMP-y09ar7vz.js} +3 -3
- package/dist/client/static/js/properties-kncqeqhn.js +1 -0
- package/dist/client/static/js/python-gx8ggmyh.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-9qqh6xvv.js → quadrantDiagram-O4NWA36T-mapfzs06.js} +3 -3
- package/dist/client/static/js/r-x8rftkm3.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-akwdknab.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-m5v4rfhx.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-k2gmqcjb.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-1zdsfjf4.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-e98evqb6.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-5f3x3762.js → railroadDiagram-XR7U4H2S-70qy7qdh.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-a68bv6kh.js → requirementDiagram-PLB6GJNP-2vb2gp3e.js} +3 -3
- package/dist/client/static/js/{ruby-dve3y59w.js → ruby-ytqv3pqz.js} +1 -1
- package/dist/client/static/js/{rust-qjhdt4b0.js → rust-6sddyxnt.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-ry7xcphh.js → sankeyDiagram-IPEJSGJF-9jd8ebrn.js} +3 -3
- package/dist/client/static/js/{sass-emxqt5p2.js → sass-dvbra5b6.js} +1 -1
- package/dist/client/static/js/{scss-4j4t3r6y.js → scss-sy7w8916.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-mekzzhet.js → sequenceDiagram-PO4LG4MO-w7z84f80.js} +7 -7
- package/dist/client/static/js/{sizeCapture-INFHLROL-pvc16ame.js → sizeCapture-INFHLROL-q8w7ehgx.js} +1 -1
- package/dist/client/static/js/sql-99y0qnag.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-3ytxby83.js → stateDiagram-v2-GCMORJYK-4978hapr.js} +3 -3
- package/dist/client/static/js/{svelte-dbsx1ehx.js → svelte-xvs3fkza.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-c2zfp416.js → swimlanes-2SLR337P-eshg5fjy.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-914e28hd.js +8 -0
- package/dist/client/static/js/timeline-definition-EJHVYXUP-5h5q357k.js +120 -0
- package/dist/client/static/js/treeView-Q6P3EWNA-fkm3a7gx.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-hm4ktxjf.js +1 -0
- package/dist/client/static/js/tsx-phngprp0.js +1 -0
- package/dist/client/static/js/typescript-m62a7zr2.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-sz6b7bnv.js → usecaseDiagram-POWQR4AR-4j69y3zx.js} +20 -20
- package/dist/client/static/js/vennDiagram-UO4OBE2U-pa9p5jpw.js +34 -0
- package/dist/client/static/js/{vue-hyr58df9.js → vue-p4g4avm3.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-3y2rvdmy.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-xvtyvde9.js → wardleyDiagram-VNRHLVJA-hjddd656.js} +3 -3
- package/dist/client/static/js/xml-59n0cjn6.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-jcs20s84.js → xychartDiagram-PMCCYNJV-8ng5m849.js} +4 -4
- package/dist/client/static/js/yaml-9fw908s4.js +1 -0
- package/dist/client/tailwindcss-oxide.linux-x64-gnu-c0fa36dv.node +0 -0
- package/dist/client/tailwindcss-oxide.linux-x64-musl-kr04sh0e.node +0 -0
- package/marketplace/plugins/command-runner/package.json +2 -2
- package/marketplace/plugins/command-runner/src/app.tsx +2 -5
- package/marketplace/plugins/command-runner/src/panel/CustomForm.tsx +35 -52
- package/marketplace/plugins/command-runner/src/panel/Groups.tsx +6 -5
- package/marketplace/plugins/command-runner/src/panel/Header.tsx +18 -54
- package/marketplace/plugins/command-runner/src/panel/Output.tsx +3 -7
- package/marketplace/plugins/command-runner/src/panel/Row.tsx +19 -38
- package/marketplace/plugins/command-runner/src/panel/index.tsx +1 -4
- package/marketplace/plugins/git-forge/package.json +2 -2
- package/marketplace/plugins/git-forge/src/app.tsx +2 -0
- package/marketplace/plugins/git-forge/src/panel/Credential.tsx +8 -15
- package/marketplace/plugins/git-forge/src/panel/Header.tsx +35 -66
- package/marketplace/plugins/git-forge/src/panel/ItemView.tsx +7 -13
- package/marketplace/plugins/git-forge/src/panel/List.tsx +28 -56
- package/marketplace/plugins/git-forge/src/panel/Row.tsx +7 -9
- package/marketplace/plugins/git-forge/src/panel/Sidebar.tsx +21 -31
- package/marketplace/plugins/git-forge/src/panel/Write.tsx +26 -40
- package/marketplace/plugins/git-forge/src/panel/index.tsx +0 -1
- package/marketplace/plugins/github-actions/package.json +2 -2
- package/marketplace/plugins/github-actions/src/app.tsx +2 -0
- package/marketplace/plugins/github-actions/src/panel/Actions.tsx +9 -17
- package/marketplace/plugins/github-actions/src/panel/LogView.tsx +4 -13
- package/marketplace/plugins/github-actions/src/panel/Row.tsx +4 -5
- package/marketplace/plugins/github-actions/src/panel/RunView.tsx +8 -15
- package/marketplace/plugins/github-actions/src/panel/index.test.tsx +3 -2
- package/marketplace/plugins/github-actions/src/panel/index.tsx +31 -37
- package/marketplace/plugins/kanban/package.json +2 -2
- package/marketplace/plugins/kanban/src/app.tsx +2 -0
- package/marketplace/plugins/kanban/src/panel/CardSheet.tsx +88 -98
- package/marketplace/plugins/kanban/src/panel/CardTile.tsx +6 -10
- package/marketplace/plugins/kanban/src/panel/StageColumn.tsx +22 -18
- package/marketplace/plugins/kanban/src/panel/StageSheet.tsx +59 -70
- package/marketplace/plugins/kanban/src/panel/index.tsx +37 -52
- package/marketplace/plugins/kanban/src/panel/use-board.ts +2 -0
- package/marketplace/plugins/session-info/package.json +2 -2
- package/marketplace/plugins/session-info/src/app.tsx +6 -3
- package/marketplace/plugins/stats/package.json +2 -2
- package/marketplace/plugins/stats/src/KillConfirm.test.tsx +6 -4
- package/marketplace/plugins/stats/src/KillConfirm.tsx +26 -76
- package/marketplace/plugins/stats/src/ProcessTable.tsx +8 -6
- package/marketplace/plugins/stats/src/RefreshButton.tsx +7 -5
- package/marketplace/plugins/stats/src/app.tsx +11 -9
- package/package.json +10 -10
- package/src/cli/lib/commands/plugin.js +8 -5
- package/src/client/bootstrap.d.ts +5 -0
- package/src/client/chat-title-overlay.test.ts +53 -0
- package/src/client/components/auth/login-screen/index.tsx +31 -3
- package/src/client/components/common/SignOutButton.tsx +4 -5
- package/src/client/components/common/account-badge/index.tsx +31 -0
- package/src/client/components/common/footer-version/index.tsx +40 -0
- package/src/client/components/common/fullscreen-viewer/fullscreen-viewer.test.tsx +24 -0
- package/src/client/components/common/fullscreen-viewer/index.tsx +22 -31
- package/src/client/components/common/header-controls/MoreMenu.tsx +5 -56
- package/src/client/components/common/header-controls/index.test.tsx +2 -6
- package/src/client/components/common/header-controls/index.tsx +9 -25
- package/src/client/components/common/header-controls/phone-row.test.tsx +3 -16
- package/src/client/components/common/shell-update-button/index.tsx +2 -2
- package/src/client/components/common/zoom-pan-stage/index.tsx +54 -50
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +4 -5
- package/src/client/components/layout/desktop-layout/index.tsx +2 -4
- package/src/client/components/layout/left-bar/index.tsx +25 -3
- package/src/client/components/layout/rail-toggle.test.tsx +112 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.accent.test.tsx +81 -0
- package/src/client/components/layout/session-sidebar/CategoryHeader.tsx +11 -3
- package/src/client/components/layout/session-sidebar/Footer.test.tsx +36 -0
- package/src/client/components/layout/session-sidebar/Footer.tsx +42 -61
- package/src/client/components/layout/session-sidebar/FooterHost.tsx +5 -1
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +30 -10
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +4 -0
- package/src/client/components/layout/session-sidebar/modern/index.tsx +8 -1
- package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +25 -4
- package/src/client/components/layout/session-title-bar/index.tsx +13 -5
- package/src/client/components/layout/top-bars.test.tsx +4 -2
- package/src/client/components/mobile/LayoutWrapper.tsx +3 -1
- package/src/client/components/mobile/RightSidebar.tsx +12 -3
- package/src/client/components/mobile/SessionSidebar.tsx +6 -2
- package/src/client/components/mobile/drawer-layout.test.tsx +7 -3
- package/src/client/components/mobile/drawer-strip.tsx +9 -2
- package/src/client/components/mobile/mobile-main-view/Header.test.tsx +29 -9
- package/src/client/components/mobile/mobile-main-view/Header.tsx +43 -12
- package/src/client/components/mobile/mobile-right-sidebar/Chrome.tsx +12 -1
- package/src/client/components/mobile/mobile-right-sidebar/FullDiff.tsx +9 -2
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +1 -0
- package/src/client/components/mobile/mobile-right-sidebar/Header.tsx +9 -1
- package/src/client/components/mobile/mobile-right-sidebar/StatusBar.tsx +4 -2
- package/src/client/components/mobile/mobile-session-sidebar/Body.tsx +1 -1
- package/src/client/components/mobile/mobile-session-sidebar/Footer.tsx +48 -46
- package/src/client/components/mobile/mobile-session-sidebar/Header.tsx +18 -1
- package/src/client/components/mobile/mobile-session-sidebar/Item.test.tsx +4 -0
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +4 -6
- package/src/client/components/mobile/right-drawer-nav.test.tsx +53 -1
- package/src/client/components/settings/Band.tsx +5 -2
- package/src/client/components/settings/Modal.tsx +8 -5
- package/src/client/components/settings/Sidebar.tsx +5 -3
- package/src/client/components/settings/apply-side-effects.ts +5 -0
- package/src/client/components/settings/categories/AccountSettings.tsx +266 -0
- package/src/client/components/settings/categories/ProjectSettings.tsx +2 -0
- package/src/client/components/settings/categories/account-settings/Dialogs.tsx +223 -0
- package/src/client/components/settings/categories/appearance-settings/BorderStyleSection.test.tsx +3 -4
- package/src/client/components/settings/categories/appearance-settings/ChromeStyleSection.tsx +66 -39
- package/src/client/components/settings/categories/connect-settings/DeviceTable.tsx +7 -4
- package/src/client/components/settings/categories/project-settings/DetailsForm.tsx +14 -1
- package/src/client/components/settings/categories/project-settings/ProjectSharing.tsx +130 -0
- package/src/client/components/settings/categories/project-settings/SidebarList.tsx +5 -0
- package/src/client/components/settings/category-content.tsx +3 -0
- package/src/client/components/workspace/chat-timeline/AiMessageFooterSheet.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/ComposerDockFrame.tsx +2 -1
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/SessionSkeleton.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/TimelineBody.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +9 -2
- package/src/client/components/workspace/chat-timeline/chat-input/expansion.test.ts +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/expansion.ts +2 -1
- package/src/client/components/workspace/chat-timeline/chat-input/narrow.test.tsx +34 -0
- package/src/client/components/workspace/chat-timeline/composer-dock-frame.test.tsx +9 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/styles.test.tsx +4 -1
- package/src/client/components/workspace/editor/Tab.tsx +19 -26
- package/src/client/components/workspace/editor/Tabs.test.ts +13 -7
- package/src/client/components/workspace/git-panel/commit-modal/Header.tsx +1 -0
- package/src/client/components/workspace/git-panel/commit-modal/floating.test.ts +46 -0
- package/src/client/components/workspace/git-panel/commit-modal/index.tsx +2 -0
- package/src/client/components/workspace/model-dropdown/Fullscreen.tsx +4 -5
- package/src/client/components/workspace/panel-tabs/TabChip.tsx +40 -39
- package/src/client/components/workspace/panel-tabs/TabStrip.connected.test.tsx +76 -58
- package/src/client/components/workspace/panel-tabs/TabStrip.test.tsx +9 -9
- package/src/client/components/workspace/panel-tabs/TabStrip.tsx +14 -1
- package/src/client/components/workspace/panel-tabs/index.tsx +1 -1
- package/src/client/components/workspace/plugin-panel/catalog.tsx +22 -5
- package/src/client/components/workspace/plugin-panel/chrome.test.tsx +89 -0
- package/src/client/components/workspace/plugin-panel/chrome.tsx +62 -0
- package/src/client/data/settings/omp-schema.json +40 -4
- package/src/client/floating-phone.test.ts +189 -0
- package/src/client/floating.css +205 -2
- package/src/client/floating.test.ts +43 -0
- package/src/client/glass.css +47 -0
- package/src/client/hooks/chat/omp/index.ts +6 -5
- package/src/client/hooks/chat/omp/prompt-send.test.ts +18 -0
- package/src/client/hooks/chat/omp/prompt-send.ts +26 -8
- package/src/client/hooks/chat/omp/session-list.tsx +20 -8
- package/src/client/hooks/chat/timeline/deferred-model.ts +13 -5
- package/src/client/hooks/chat/timeline/index.ts +2 -0
- package/src/client/hooks/chat/timeline/send-props.ts +14 -0
- package/src/client/hooks/chat/timeline/send-steer.test.ts +11 -2
- package/src/client/hooks/chat/timeline/send-switch.test.ts +92 -0
- package/src/client/hooks/chat/timeline/send.test-util.ts +37 -7
- package/src/client/hooks/chat/timeline/send.test.ts +11 -2
- package/src/client/hooks/chat/timeline/send.ts +62 -42
- package/src/client/hooks/editor/image-generation.ts +24 -0
- package/src/client/hooks/editor/resolve-viewer.test.ts +26 -20
- package/src/client/hooks/editor/resolve-viewer.ts +14 -5
- package/src/client/hooks/editor/use-file-editor.test.ts +34 -0
- package/src/client/hooks/editor/use-file-editor.ts +6 -2
- package/src/client/hooks/settings/accounts.ts +162 -0
- package/src/client/hooks/ui/auth.ts +58 -3
- package/src/client/hooks/ui/border-style.test.ts +5 -4
- package/src/client/hooks/ui/border-style.ts +3 -2
- package/src/client/hooks/ui/mobile-chrome-style.ts +68 -0
- package/src/client/hooks/ui/navbar-controls.test.ts +1 -2
- package/src/client/hooks/ui/navbar-controls.ts +0 -3
- package/src/client/hooks/ui/zoom-gesture.ts +104 -0
- package/src/client/lib/desktop/titlebar.test.ts +21 -0
- package/src/client/lib/desktop/titlebar.ts +34 -0
- package/src/client/lib/plugins/bootstrap.test.ts +20 -0
- package/src/client/lib/plugins/bootstrap.tsx +10 -15
- package/src/client/lib/plugins/kit-components.test.tsx +119 -0
- package/src/client/lib/plugins/kit-components.tsx +79 -0
- package/src/client/lib/plugins/kit.ts +8 -0
- package/src/client/lib/plugins/slots.test.ts +34 -0
- package/src/client/lib/plugins/slots.ts +31 -4
- package/src/client/lib/plugins/stylesheets.ts +10 -11
- package/src/client/lib/ui/pinch.test.ts +74 -0
- package/src/client/lib/ui/pinch.ts +104 -0
- package/src/client/lib/ui/safe-area.test.ts +25 -0
- package/src/client/lib/ui/safe-area.ts +23 -0
- package/src/client/main.tsx +8 -1
- package/src/client/tailwind.css +54 -1
- package/src/server/index.ts +2 -0
- package/src/server/lib/assets/shell-attributes.server.ts +12 -4
- package/src/server/lib/assets/shell-attributes.test.ts +19 -18
- package/src/server/lib/auth/client-address.test.ts +2 -2
- package/src/server/lib/auth/guard.test.ts +2 -2
- package/src/server/lib/auth/guard.ts +81 -97
- package/src/server/lib/auth/handover-guard.test.ts +1 -1
- package/src/server/lib/auth/rate-limit.test.ts +2 -2
- package/src/server/lib/auth/token.test.ts +1 -1
- package/src/server/lib/auth/workspace-gate.server.ts +34 -0
- package/src/server/lib/bundler/css.test.ts +16 -0
- package/src/server/lib/connect/devices.server.test.ts +12 -0
- package/src/server/lib/connect/devices.server.ts +63 -19
- package/src/server/lib/connect/pairing.server.ts +5 -3
- package/src/server/lib/connect/status.server.ts +2 -2
- package/src/server/lib/db/schema.test.ts +3 -3
- package/src/server/lib/db/schema.ts +6 -0
- package/src/server/lib/harness/update-spawn.server.test.ts +97 -0
- package/src/server/lib/harness/update-spawn.server.ts +10 -0
- package/src/server/lib/models/provider-icon-override.server.test.ts +140 -0
- package/src/server/lib/models/provider-icon-override.server.ts +197 -0
- package/src/server/lib/models/provider-icon-store.server.ts +8 -0
- package/src/server/lib/models/provider-icon.server.ts +31 -6
- package/src/server/lib/omp/session/artifacts.server.test.ts +11 -7
- package/src/server/lib/omp/session/artifacts.server.ts +21 -17
- package/src/server/lib/panels/build.server.ts +19 -2
- package/src/server/lib/panels/css.server.test.ts +141 -0
- package/src/server/lib/panels/css.server.ts +255 -0
- package/src/server/lib/panels/plugin-ui-contract.test.ts +64 -0
- package/src/server/lib/panels/registry-stylesheet.server.test.ts +69 -0
- package/src/server/lib/panels/scan.server.ts +13 -7
- package/src/server/lib/panels/source-warnings.server.test.ts +65 -0
- package/src/server/lib/panels/source-warnings.server.ts +71 -0
- package/src/server/lib/realtime/topics/catalog.server.ts +3 -0
- package/src/server/lib/realtime/topics.server.ts +14 -0
- package/src/server/lib/sessions/last-opened-client.server.ts +1 -1
- package/src/server/lib/workspace/access.server.ts +108 -0
- package/src/server/lib/workspace/project-patch.server.ts +4 -2
- package/src/server/lib/workspace/register-folder.server.ts +19 -5
- package/src/server/lib/workspace/session-access.server.ts +55 -0
- package/src/server/lib/workspace/tenancy-schema.server.ts +40 -0
- package/src/server/plugins/ssr.ts +19 -3
- package/src/server/routes/accounts/index.ts +8 -0
- package/src/server/routes/accounts/management.test.ts +174 -0
- package/src/server/routes/accounts/management.ts +166 -0
- package/src/server/routes/auth/login.ts +22 -8
- package/src/server/routes/auth/logout.ts +1 -1
- package/src/server/routes/auth/password.ts +40 -33
- package/src/server/routes/auth/revoke.test.ts +1 -1
- package/src/server/routes/auth/revoke.ts +26 -8
- package/src/server/routes/auth/routes.test.ts +3 -3
- package/src/server/routes/auth/state.ts +14 -7
- package/src/server/routes/connect/devices.ts +7 -4
- package/src/server/routes/connect/pair.ts +4 -3
- package/src/server/routes/connect/status.ts +4 -2
- package/src/server/routes/connect/tunnels.ts +2 -1
- package/src/server/routes/folders/batch-delete.ts +12 -0
- package/src/server/routes/folders/clone.ts +7 -2
- package/src/server/routes/folders/create.ts +3 -1
- package/src/server/routes/folders/folder.ts +44 -4
- package/src/server/routes/folders/index.ts +3 -0
- package/src/server/routes/folders/shares.ts +62 -0
- package/src/server/routes/index.ts +2 -0
- package/src/server/routes/panels/build.ts +1 -1
- package/src/server/routes/panels/css.test.ts +22 -0
- package/src/server/routes/panels/css.ts +5 -7
- package/src/server/routes/realtime/ws.ts +16 -1
- package/src/server/routes/sessions/list.ts +3 -2
- package/src/server/routes/settings/projects.ts +46 -7
- package/src/server/routes/settings/provider-icon.ts +18 -0
- package/src/shared/lib/chat/timeline/tool-render-mode.test.ts +2 -2
- package/src/shared/lib/chat/timeline/tool-render-mode.ts +6 -3
- package/src/shared/lib/icons/tint-hues.generated.ts +38 -37
- package/src/shared/lib/omp/config/schema-releases-19-4.test.ts +27 -1
- package/src/shared/lib/omp/session/prewarm-misc.test.ts +1 -1
- package/src/shared/lib/realtime/protocol.ts +16 -0
- package/src/shared/lib/settings/defaults.ts +2 -1
- package/src/shared/lib/settings/sections.ts +1 -1
- package/src/shared/lib/theme/border-style.test.ts +11 -9
- package/src/shared/lib/theme/border-style.ts +7 -7
- package/src/shared/lib/theme/chrome-style.test.ts +15 -0
- package/src/shared/lib/theme/chrome-style.ts +16 -1
- package/src/shared/types/index.ts +1 -0
- package/src/shared/types/settings/state.ts +6 -5
- package/src/test-support/file-editor.test-util.ts +25 -6
- package/tsconfig.json +21 -0
- package/dist/client/static/js/ImageView-zf4kh5wp.js +0 -1
- package/dist/client/static/js/LayoutWrapper-dncbzcea.js +0 -2
- package/dist/client/static/js/MergeDiffView-btdx9yb9.js +0 -1
- package/dist/client/static/js/Modal-5cxfw2rv.js +0 -60
- package/dist/client/static/js/SessionsView-vbn0nvx4.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-sxrkxwbq.js +0 -1
- package/dist/client/static/js/bash-bcbct9gc.js +0 -1
- package/dist/client/static/js/c-fn9jz26e.js +0 -1
- package/dist/client/static/js/cpp-a1q64mke.js +0 -1
- package/dist/client/static/js/css-b92azee8.js +0 -1
- package/dist/client/static/js/css-sn00sq6v.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-g1xwa8b9.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-05p61bka.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-500fcx2a.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-z1yehwys.js +0 -1
- package/dist/client/static/js/graphql-8d8bn59j.js +0 -1
- package/dist/client/static/js/html-6hdrwtz2.js +0 -1
- package/dist/client/static/js/index-0kcnghxn.js +0 -4
- package/dist/client/static/js/index-2zhmmtye.js +0 -2
- package/dist/client/static/js/index-4vtc4xct.js +0 -481
- package/dist/client/static/js/index-5srvxsht.js +0 -2
- package/dist/client/static/js/index-6c1s0v4b.js +0 -1
- package/dist/client/static/js/index-cvm2ha01.js +0 -1
- package/dist/client/static/js/index-d11mbz2q.js +0 -4
- package/dist/client/static/js/index-fen0x3qh.js +0 -1
- package/dist/client/static/js/index-gwgh27h3.js +0 -314
- package/dist/client/static/js/index-hxy1sadd.js +0 -2
- package/dist/client/static/js/index-pg87cgpy.js +0 -2
- package/dist/client/static/js/index-q1a40v20.js +0 -3
- package/dist/client/static/js/index-qmvstmvh.js +0 -1
- package/dist/client/static/js/index-t6nqy2n5.css +0 -1
- package/dist/client/static/js/index-wf5j0009.js +0 -10
- package/dist/client/static/js/index-y6zbkh4p.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-dqyaxjc1.js +0 -1
- package/dist/client/static/js/ini-g6a5xsaw.js +0 -1
- package/dist/client/static/js/java-n596am4c.js +0 -1
- package/dist/client/static/js/javascript-zc1qnyyp.js +0 -1
- package/dist/client/static/js/json-7k70qbkj.js +0 -1
- package/dist/client/static/js/jsx-sndenqrc.js +0 -1
- package/dist/client/static/js/lua-djd3g9q5.js +0 -1
- package/dist/client/static/js/markdown-r2tpvxpn.js +0 -1
- package/dist/client/static/js/one-dark-pro-ckq5capv.js +0 -1
- package/dist/client/static/js/one-light-a908z398.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-7jxzax4z.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-wc9wxr7f.js +0 -1
- package/dist/client/static/js/properties-brn72zdk.js +0 -1
- package/dist/client/static/js/python-g9mghwgm.js +0 -1
- package/dist/client/static/js/r-e247x4mw.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-kwj5padj.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-h8sdx3w5.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-2wmwx246.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-h4cdgw3y.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-q7m0tfd0.js +0 -1
- package/dist/client/static/js/sql-0kar81jy.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-9gm67sq4.js +0 -8
- package/dist/client/static/js/timeline-definition-EJHVYXUP-xtvv4za2.js +0 -120
- package/dist/client/static/js/treeView-Q6P3EWNA-yv9640h3.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-7kpzjg21.js +0 -1
- package/dist/client/static/js/tsx-gjxfjnbk.js +0 -1
- package/dist/client/static/js/typescript-bm89v3gk.js +0 -1
- package/dist/client/static/js/vennDiagram-UO4OBE2U-56q0qs51.js +0 -34
- package/dist/client/static/js/wardley-WFR3VGLG-mggay64p.js +0 -1
- package/dist/client/static/js/xml-b7824nx0.js +0 -1
- package/dist/client/static/js/yaml-kqqktdv1.js +0 -1
- package/src/server/lib/auth/client-address.ts +0 -89
- package/src/server/lib/auth/config.ts +0 -133
- package/src/server/lib/auth/rate-limit.ts +0 -146
- package/src/server/lib/auth/token.ts +0 -220
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{t,l,
|
|
1
|
+
import{t,l,wt,Sa,w,F,z,H,U,j,W,q,m,Ta,ds,b,yr,vr,V,Fn,Ct,ft,gt,ir,Pc,Ut,Gt,jn,Ht,Et}from"./index-mgzbypt5.js";import{Vt}from"./index-j734ev6q.js";import{so}from"./index-1svt0cdw.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 Qt=new Map([["tool",0],["task",1],["decision",2],["input",3],["refdoc",4],["connector",5],["action",6]]),C1=Qt.size,S1=t((e)=>`af-kind-${e}`,"kindClass"),O1=[...Qt.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&&Qt.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 Xt(e){if(Array.isArray(e))return e.map((n)=>Xt(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]=Xt(e[n])}return r}t(Xt,"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
|
-
`)}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=z,this.setAccDescription=U,this.setDiagramTitle=W,this.getAccTitle=
|
|
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=z,this.setAccDescription=U,this.setDiagramTitle=W,this.getAccTitle=H,this.getAccDescription=j,this.getDiagramTitle=q,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=
|
|
8
|
-
`)?_1(h):h;if(f!==h)try{g=
|
|
9
|
-
`,{schema:
|
|
7
|
+
`;try{g=vr(E,{schema:yr})??{}}catch(p){let f=h.includes(`
|
|
8
|
+
`)?_1(h):h;if(f!==h)try{g=vr(f+`
|
|
9
|
+
`,{schema:yr})??{}}catch{this.rethrowMetadataYamlError(p,h,k)}else this.rethrowMetadataYamlError(p,h,k)}g=Xt(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 O,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(),O=this.sanitizeText(r.text.trim()),v.labelType=r.type,O.startsWith('"')&&O.endsWith('"'))O=O.substring(1,O.length-1);v.text=O}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(!Pc(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+`
|
|
@@ -19,13 +19,13 @@ ${v.join(`
|
|
|
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=ro();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(Kt.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 O={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 O)return O[_].hasOwnProperty(f)?!1:O[_][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 O of C.nodes)if(!D.nodes.includes(O))D.nodes.push(O);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 O=0,v=t((p)=>{if(B.has(p))return;B.set(p,O++);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 rs.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=Gt(r,c),g=a.db.getDirection();if(h.type=a.type,h.layoutAlgorithm=Ut(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 zt(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],O=[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],pt=[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],jt=[1,148],Wt=[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],P=[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],Jt={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,G,s,L){var i=s.length-1;switch(G){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:O,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:pt},{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:jt,119:Wt},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:jt,119:Wt},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:pt},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:pt},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:jt,119:Wt},e(P,[2,116]),e(P,[2,118]),e(P,[2,119]),e(P,[2,172]),e(P,[2,173]),e(P,[2,174]),e(P,[2,175]),e(P,[2,176]),e(P,[2,177]),e(P,[2,178]),e(P,[2,179]),e(P,[2,180]),e(P,[2,181]),e(P,[2,182]),e(P,[2,103]),e(P,[2,104]),e(P,[2,105]),e(P,[2,106]),e(P,[2,107]),e(P,[2,108]),e(P,[2,109]),e(P,[2,110]),e(P,[2,111]),e(P,[2,112]),e(P,[2,113]),e(P,[2,114]),e(P,[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:O,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:O,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:jt,119:Wt},{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:pt},{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(P,[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:O,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:O,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:O,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:O,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=[],G=[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 Zt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Zt))je.yy[Zt]=this.yy[Zt];if(ae.setInput(S,je.yy),je.yy.lexer=ae,je.yy.parser=this,typeof ae.yylloc>"u")ae.yylloc={};var $t=ae.yylloc;s.push($t);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,G.length=G.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={},Yt,Be,m1,qt;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="";qt=[];for(Yt in L[ze])if(this.terminals_[Yt]&&Yt>I1)qt.push("'"+this.terminals_[Yt]+"'");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=so();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(Vt.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 O={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 O)return O[_].hasOwnProperty(f)?!1:O[_][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 O of C.nodes)if(!D.nodes.includes(O))D.nodes.push(O);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 O=0,v=t((p)=>{if(B.has(p))return;B.set(p,O++);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 ds.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=Ht(r,c),g=a.db.getDirection();if(h.type=a.type,h.layoutAlgorithm=Gt(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 Ut(h,k);let A=d?.diagramPadding??8;V.insertTitle(k,"agentflowTitleText",d?.titleTopMargin??0,a.db.getDiagramTitle()),Et(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],O=[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],pt=[1,133],u1=[47,63,65,77,92,105,108,109,112,114,117,118,119],bt=[1,143],kt=[1,157],mt=[1,158],At=[1,159],St=[1,162],xt=[1,161],Tt=[1,160],Dt=[1,145],_t=[1,147],vt=[1,151],l1=[1,139],c1=[1,140],Ft=[1,152],It=[1,153],Lt=[1,154],Bt=[1,155],Mt=[1,156],yt=[1,163],Nt=[1,164],Rt=[1,141],Ot=[1,142],Pt=[1,149],jt=[1,144],zt=[1,148],Wt=[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],P=[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],Jt={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,G,s,L){var i=s.length-1;switch(G){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:O,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:pt},{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:bt,13:kt,15:mt,28:At,29:137,33:St,35:xt,36:Tt,47:Dt,63:_t,78:vt,83:l1,84:c1,86:150,87:Ft,88:It,89:Lt,90:Bt,91:Mt,92:yt,93:Nt,94:138,108:Rt,112:Ot,114:Pt,117:jt,118:zt,119:Wt},e(rt,o,{5:165}),e(rt,o,{5:166}),{11:bt,13:kt,15:mt,28:At,29:167,33:St,35:xt,36:Tt,47:Dt,63:_t,78:vt,83:l1,84:c1,86:150,87:Ft,88:It,89:Lt,90:Bt,91:Mt,92:yt,93:Nt,94:138,108:Rt,112:Ot,114:Pt,117:jt,118:zt,119:Wt},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:pt},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:pt},e(u1,[2,97]),{8:ce,9:de,10:he,11:bt,12:pe,13:kt,15:mt,22:214,28:At,30:[1,213],33:St,34:215,35:xt,36:Tt,43:Ke,47:Dt,63:_t,78:vt,86:150,87:Ft,88:It,89:Lt,90:Bt,91:Mt,92:yt,93:Nt,94:216,108:Rt,112:Ot,114:Pt,117:jt,118:zt,119:Wt},e(P,[2,116]),e(P,[2,118]),e(P,[2,119]),e(P,[2,172]),e(P,[2,173]),e(P,[2,174]),e(P,[2,175]),e(P,[2,176]),e(P,[2,177]),e(P,[2,178]),e(P,[2,179]),e(P,[2,180]),e(P,[2,181]),e(P,[2,182]),e(P,[2,103]),e(P,[2,104]),e(P,[2,105]),e(P,[2,106]),e(P,[2,107]),e(P,[2,108]),e(P,[2,109]),e(P,[2,110]),e(P,[2,111]),e(P,[2,112]),e(P,[2,113]),e(P,[2,114]),e(P,[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:O,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:O,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:bt,12:pe,13:kt,15:mt,22:220,28:At,30:[1,219],33:St,34:221,35:xt,36:Tt,43:Ke,47:Dt,63:_t,78:vt,86:150,87:Ft,88:It,89:Lt,90:Bt,91:Mt,92:yt,93:Nt,94:216,108:Rt,112:Ot,114:Pt,117:jt,118:zt,119:Wt},{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:pt},{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(P,[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:O,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:O,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:O,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:O,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=[],G=[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 Zt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Zt))je.yy[Zt]=this.yy[Zt];if(ae.setInput(S,je.yy),je.yy.lexer=ae,je.yy.parser=this,typeof ae.yylloc>"u")ae.yylloc={};var $t=ae.yylloc;s.push($t);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,G.length=G.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={},Yt,Be,m1,qt;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="";qt=[];for(Yt in L[ze])if(this.terminals_[Yt]&&Yt>I1)qt.push("'"+this.terminals_[Yt]+"'");if(ae.showPosition)s1="Parse error on line "+(K+1)+`:
|
|
23
23
|
`+ae.showPosition()+`
|
|
24
24
|
Expecting `+qt.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:$t,expected:qt})}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),G.push(ae.yytext),s.push(ae.yylloc),T.push(me[1]),ge=null,!e1){if(f1=ae.yyleng,i=ae.yytext,K=ae.yylineno,$t=ae.yylloc,g1>0)g1--}else ge=e1,e1=null;break;case 2:if(Be=this.productions_[me[1]][1],ut.$=G[G.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],G,s].concat(L1)),typeof t1<"u")return t1;if(Be)T=T.slice(0,-1*Be*2),G=G.slice(0,-1*Be),s=s.slice(0,-1*Be);T.push(this.productions_[me[1]][0]),G.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 G=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=[G[0],G[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,G;if(this.options.backtrack_lexer){if(G={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)G.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 G)this[s]=G[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 G=this._currentRules();for(var s=0;s<G.length;s++)if(T=this._input.match(this.rules[G[s]]),T&&(!x||T[0].length>x[0].length)){if(x=T,u=s,this.options.backtrack_lexer)if(S=this.test_match(T,G[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,G[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,G){var s=G;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}();Jt.lexer=V1;function Ht(){this.yy={}}return t(Ht,"Parser"),Ht.prototype=Jt,Jt.Parser=Ht,new Ht}();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(!
|
|
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,G){var s=G;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}();Jt.lexer=V1;function Kt(){this.yy={}}return t(Kt,"Parser"),Kt.prototype=Jt,Jt.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(!ft(r,a))return"";let c=gt(e.look),d=Ct(n),o=ir(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=Qt.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 `+qt.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=
|
|
43
|
+
`}return g},"genColor"),Y1=t((e,r)=>{let n=Sa,a=n(e,"r"),c=n(e,"g"),d=n(e,"b");return wt(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 `+qt.join(", ")+", got '"+(this.terminals_[ge]||ge)+"'";else s1="Parse
|
|
|
196
196
|
}
|
|
197
197
|
text-align: center;
|
|
198
198
|
}
|
|
199
|
-
${
|
|
200
|
-
`,"getStyles"),X1=q1,Cs={parser:K1,get db(){return new U1},renderer:W1,styles:X1,init:t((e)=>{if(e.agentflow??={},e.layout)
|
|
199
|
+
${jn()}
|
|
200
|
+
`,"getStyles"),X1=q1,Cs={parser:K1,get db(){return new U1},renderer:W1,styles:X1,init:t((e)=>{if(e.agentflow??={},e.layout)Ta({layout:e.layout});e.flowchart??={},e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,Ta({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")};export{Cs as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{xe}from"./index-5srvxsht.js";import{t,l,en,Y,C,ne,F,z,j,U,H,W,q,b,rr,Ae,wd,M,ue,Ct}from"./index-gwgh27h3.js";import{Bo}from"./index-475dc6h9.js";import{je}from"./index-excgtjhx.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 G(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,L=0,i=f.length,T,v,w=r.value,m,S,B,V,X,te,E;while(h<i){T=s-n,v=p-o;do m=f[L++].value;while(!m&&L<i);S=B=m,te=Math.max(v/T,T/v)/(w*e),E=m*m*te,X=Math.max(B/E,E/S);for(;L<i;++L){if(m+=d=f[L].value,d<S)S=d;if(d>B)B=d;if(E=m*m*te,V=Math.max(B/E,E/S),V>X){m-=d;break}X=V}if(u.push(x={value:m,dice:T<v,children:f.slice(h,L)}),x.dice)Fe(x,n,o,s,w?o+=v*m/w:p);else Ne(x,n,o,w?n+=T*m/w:s,p);w-=m,h=L}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(L),s=[0],r)i.eachBefore($e);return i}function L(i){var T=s[i.depth],v=i.x0+T,w=i.y0+T,m=i.x1-T,S=i.y1-T;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(T=s[i.depth+1]=p(i)/2,v+=d(i)-T,w+=u(i)-T,m-=f(i)-T,S-=x(i)-T,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:G(+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:G(+i),h):u},h.paddingRight=function(i){return arguments.length?(f=typeof i==="function"?i:G(+i),h):f},h.paddingBottom=function(i){return arguments.length?(x=typeof i==="function"?i:G(+i),h):x},h.paddingLeft=function(i){return arguments.length?(d=typeof i==="function"?i:G(+i),h):d},h}var Pe=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=z,this.getAccTitle=j,this.setDiagramTitle=W,this.getDiagramTitle=q,this.getAccDescription=H,this.setAccDescription=U}static{t(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let e=Y,r=C();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,L={level:f,name:x,type:u.$type,value:u.value,classSelector:u.classSelector,cssCompiledStyles:h};n.push(L)}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}=C();if(!x)return;let h=f?30:0,L=Ae(r),i=p.nodeWidth?p.nodeWidth*ee:960,T=p.nodeHeight?p.nodeHeight*ee:500,v=i,w=T+h;L.attr("viewBox",`0 0 ${v} ${w}`),ne(L,w,v,p.useMaxWidth);let m;try{let a=p.valueFormat||",";if(a==="$0,0")m=t((c)=>"$"+Bo(",")(c),"valueFormat");else if(a.startsWith("$")&&a.includes(",")){let c=/\.\d+/.exec(a),g=c?c[0]:"";m=t((A)=>"$"+Bo(","+g)(A),"valueFormat")}else if(a.startsWith("$")){let c=a.substring(1);m=t((g)=>"$"+Bo(c||"")(g),"valueFormat")}else m=Bo(a)}catch(a){l.error("Error creating format function:",a),m=Bo(",")}let S=rr().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]),B=rr().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]),V=rr().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)L.append("text").attr("x",v/2).attr("y",h/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(f);let X=L.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,T]).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=X.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)=>B(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:"+V(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 A=a.x1-a.x0,k=6,N;if(p.showValues!==!1&&a.value){let D=A-10,O=30,Ie=10;N=D-30-10-k}else N=A-k-6;let y=Math.max(15,N),I=c.node();if(I.getComputedTextLength()>y){let O=g;while(O.length>0){if(O=g.substring(0,O.length-1),O.length===0){if(c.text("..."),I.getComputedTextLength()>y)c.text("");break}if(c.text(O+"..."),I.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:"+V(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(),P=Me.length>20,We=P?16:38,oe=P?14:28,Z=P?4:8,J=P?4:6,ce=P?2:4,_e=P?8:10,pe=P?1:2,se=X.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:`+V(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,A=a.y1-a.y0,k=c.node(),N=g-2*ce,R=A-2*ce;if(N<_e||R<_e){c.style("display","none");return}let y=parseInt(c.style("font-size"),10),I=0.6;while(k.getComputedTextLength()>N&&y>Z)y--,c.style("font-size",`${y}px`);let _=Math.max(J,Math.min(oe,Math.round(y*I))),D=y+pe+_;while(D>R&&y>Z){if(y--,_=Math.max(J,Math.min(oe,Math.round(y*I))),_<J&&y===Z)break;if(c.style("font-size",`${y}px`),D=y+pe+_,_<=J&&D>R);}if(c.style("font-size",`${y}px`),P){if(y<Z||R<Z)c.style("display","none")}else if(k.getComputedTextLength()>N||y<Z||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:`+V(c.data.name)+";",A=M({cssCompiledStyles:c.data.cssCompiledStyles});return g+A.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),A=this.parentNode;if(!A){g.style("display","none");return}let k=b(A).select(".treemapLabel");if(k.empty()||k.style("display")==="none"){g.style("display","none");return}let N=parseFloat(k.style("font-size")),y=Math.max(J,Math.min(oe,Math.round(N*0.6)));g.style("font-size",`${y}px`);let _=(c.y1-c.y0)/2+N/2+pe;g.attr("y",_);let D=c.x1-c.x0,ze=c.y1-c.y0-4,Oe=D-2*ce;if(g.node().getComputedTextLength()>Oe||_+y>ze||y<J)g.style("display","none");else g.style("display",null)});let He=p.diagramPadding??8;Ct(L,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=en(),n=C(),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{ke}from"./index-r7h4pm42.js";import{t,l,tn,Y,C,ae,F,z,H,U,j,W,q,b,ar,he,Nd,M,ue,Et}from"./index-mgzbypt5.js";import{_o}from"./index-rhmvh9w5.js";import{He}from"./index-5anvw7xg.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 me(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 ge(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 ye(e,r){let n=-1;for(let o of this)if(e.call(r,o,++n,this))return o}function xe(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:ge,eachBefore:me,find:ye,sum:xe,sort:Se,path:ve,ancestors:be,descendants:we,leaves:Ce,links:Te,copy:Ye,[Symbol.iterator]:Le};function De(e){if(typeof e!=="function")throw Error();return e}function Q(){return 0}function G(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 Ae(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 Fe(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,L=0,i=f.length,T,v,w=r.value,m,S,B,V,X,te,E;while(h<i){T=s-n,v=p-o;do m=f[L++].value;while(!m&&L<i);S=B=m,te=Math.max(v/T,T/v)/(w*e),E=m*m*te,X=Math.max(B/E,E/S);for(;L<i;++L){if(m+=d=f[L].value,d<S)S=d;if(d>B)B=d;if(E=m*m*te,V=Math.max(B/E,E/S),V>X){m-=d;break}X=V}if(u.push(x={value:m,dice:T<v,children:f.slice(h,L)}),x.dice)Ae(x,n,o,s,w?o+=v*m/w:p);else Fe(x,n,o,w?n+=T*m/w:s,p);w-=m,h=L}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(L),s=[0],r)i.eachBefore($e);return i}function L(i){var T=s[i.depth],v=i.x0+T,w=i.y0+T,m=i.x1-T,S=i.y1-T;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(T=s[i.depth+1]=p(i)/2,v+=d(i)-T,w+=u(i)-T,m-=f(i)-T,S-=x(i)-T,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:G(+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:G(+i),h):u},h.paddingRight=function(i){return arguments.length?(f=typeof i==="function"?i:G(+i),h):f},h.paddingBottom=function(i){return arguments.length?(x=typeof i==="function"?i:G(+i),h):x},h.paddingLeft=function(i){return arguments.length?(d=typeof i==="function"?i:G(+i),h):d},h}var Pe=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=z,this.getAccTitle=H,this.setDiagramTitle=W,this.getDiagramTitle=q,this.getAccDescription=j,this.setAccDescription=U}static{t(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let e=Y,r=C();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(Nd(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)=>{ke(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,L={level:f,name:x,type:u.$type,value:u.value,classSelector:u.classSelector,cssCompiledStyles:h};n.push(L)}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 He("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}=C();if(!x)return;let h=f?30:0,L=he(r),i=p.nodeWidth?p.nodeWidth*ee:960,T=p.nodeHeight?p.nodeHeight*ee:500,v=i,w=T+h;L.attr("viewBox",`0 0 ${v} ${w}`),ae(L,w,v,p.useMaxWidth);let m;try{let a=p.valueFormat||",";if(a==="$0,0")m=t((c)=>"$"+_o(",")(c),"valueFormat");else if(a.startsWith("$")&&a.includes(",")){let c=/\.\d+/.exec(a),g=c?c[0]:"";m=t((A)=>"$"+_o(","+g)(A),"valueFormat")}else if(a.startsWith("$")){let c=a.substring(1);m=t((g)=>"$"+_o(c||"")(g),"valueFormat")}else m=_o(a)}catch(a){l.error("Error creating format function:",a),m=_o(",")}let S=ar().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]),B=ar().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]),V=ar().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)L.append("text").attr("x",v/2).attr("y",h/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(f);let X=L.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)),Ne=ie().size([i,T]).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=Ne.descendants().filter((a)=>a.children&&a.children.length>0),re=X.selectAll(".treemapSection").data(Re).enter().append("g").attr("class","treemapSection").attr("transform",(a)=>`translate(${a.x0},${a.y0})`);if(re.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""}),re.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),re.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)=>B(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(";")}),re.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:"+V(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 A=a.x1-a.x0,k=6,N;if(p.showValues!==!1&&a.value){let D=A-10,O=30,Oe=10;N=D-30-10-k}else N=A-k-6;let y=Math.max(15,N),I=c.node();if(I.getComputedTextLength()>y){let O=g;while(O.length>0){if(O=g.substring(0,O.length-1),O.length===0){if(c.text("..."),I.getComputedTextLength()>y)c.text("");break}if(c.text(O+"..."),I.getComputedTextLength()<=y)break}}}),p.showValues!==!1)re.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:"+V(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=Ne.leaves(),P=Me.length>20,We=P?16:38,oe=P?14:28,Z=P?4:8,J=P?4:6,ce=P?2:4,_e=P?8:10,pe=P?1:2,se=X.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:`+V(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,A=a.y1-a.y0,k=c.node(),N=g-2*ce,R=A-2*ce;if(N<_e||R<_e){c.style("display","none");return}let y=parseInt(c.style("font-size"),10),I=0.6;while(k.getComputedTextLength()>N&&y>Z)y--,c.style("font-size",`${y}px`);let _=Math.max(J,Math.min(oe,Math.round(y*I))),D=y+pe+_;while(D>R&&y>Z){if(y--,_=Math.max(J,Math.min(oe,Math.round(y*I))),_<J&&y===Z)break;if(c.style("font-size",`${y}px`),D=y+pe+_,_<=J&&D>R);}if(c.style("font-size",`${y}px`),P){if(y<Z||R<Z)c.style("display","none")}else if(k.getComputedTextLength()>N||y<Z||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:`+V(c.data.name)+";",A=M({cssCompiledStyles:c.data.cssCompiledStyles});return g+A.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),A=this.parentNode;if(!A){g.style("display","none");return}let k=b(A).select(".treemapLabel");if(k.empty()||k.style("display")==="none"){g.style("display","none");return}let N=parseFloat(k.style("font-size")),y=Math.max(J,Math.min(oe,Math.round(N*0.6)));g.style("font-size",`${y}px`);let _=(c.y1-c.y0)/2+N/2+pe;g.attr("y",_);let D=c.x1-c.x0,ze=c.y1-c.y0-4,qe=D-2*ce;if(g.node().getComputedTextLength()>qe||_+y>ze||y<J)g.style("display","none");else g.style("display",null)});let Ie=p.diagramPadding??8;Et(L,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=tn(),n=C(),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};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)+2),o=o.substring(0,o.lastIndexOf("}")-1),o=te(o,r),o=
|
|
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(
|
|
1
|
+
import{ke}from"./index-r7h4pm42.js";import{t,l,Y,C,te,F,z,H,U,j,W,q,m,_c,b,As,Ld,ue}from"./index-mgzbypt5.js";import{wd,He}from"./index-5anvw7xg.js";var T="position frame",D="frame positioned",S="position relation",N="relation positioned",ge=t(function(e){l.debug("options str",e)},"setOptions"),he=t(function(){return{}},"getOptions"),pe=t(function(){O(),F()},"clear");function O(){B={}}t(O,"reset");var be=Y.eventmodeling,ve=t(()=>ue({...be,...C().eventmodeling}),"getConfig"),B={};function I(){let e=we,{ast:i}=B,n=E();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:T,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:A(e.swimlanes)},e}t(I,"getState");function _(e){B.ast=e}t(_,"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 E(){return s}t(E,"getDiagramProps");var we={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function G(e){let i=e.split(".");if(i.length===2)return i[0];return}t(G,"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=G(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}=C();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=C(),a=te(L(e.entityIdentifier)??"",r),o,d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"},u=`<b>${As(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=As(o,n.textMaxWidth,d),o=o.replaceAll(" "," ");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=As(o,n.textMaxWidth,d),o=o.replaceAll(" "," "),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=Ld(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:D,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 A(e){return Object.values(e).sort((i,n)=>i.index-n.index)}t(A,"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=A(p.swimlanes);if(h.length>0)h[0].y=0;for(let v=1;v<h.length;v++){let P=h[v],R=h[v-1];P.y=R.y+R.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(wd(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:N,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 ye={[T]:Q,[S]:oe},Pe={[D]:ne,[N]:se};function de(e,i){let n=ye[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=Pe[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:ve,setOptions:ge,getOptions:he,clear:pe,setAccTitle:z,getAccTitle:H,getAccDescription:j,setAccDescription:U,setDiagramTitle:W,getDiagramTitle:q,setAst:_,getDiagramProps:E,getState:I},Se={parse:t(async(e)=>{let i=await He("eventmodeling",e);l.debug(i),k.setAst(i),ke(i,k)},"parse")},Me=m(),Fe=Me?.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 xe(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(xe,"renderD3Relation");function fe(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(fe,"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(fe(c,x.maxR,u,o)),x.boxes.forEach(ce(c,u)),x.relations.forEach(xe(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),_c(void 0,c,d?.padding??30,d?.useMaxWidth)},"draw"),Ee={draw:Be},Ae=t((e)=>"","getStyles"),Re=Ae,Ue={parser:Se,db:k,renderer:Ee,styles:Re};export{Ue as diagram};
|