@kabmo-labs/kabmo 0.46.1 → 0.47.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/dist/client/index.html +1 -1
- package/dist/client/index.js +439 -435
- package/dist/client/static/js/{CsvGrid-qdkmv8bj.js → CsvGrid-vfgttmym.js} +2 -2
- package/dist/client/static/js/{DocxView-k84ns803.js → DocxView-dc41t6rp.js} +2 -2
- package/dist/client/static/js/{DrawioView-r1n717f7.js → DrawioView-wpwr38d9.js} +2 -2
- package/dist/client/static/js/HtmlPreview-23n7t5cs.js +1 -0
- package/dist/client/static/js/ImageView-mvjb3qh1.js +1 -0
- package/dist/client/static/js/LayoutWrapper-eenx0hp2.js +2 -0
- package/dist/client/static/js/{Modal-xe6h99jn.js → Modal-dsqhas10.js} +13 -13
- package/dist/client/static/js/{PdfView-ffg4mccg.js → PdfView-cpvsbfk0.js} +1 -1
- package/dist/client/static/js/{SessionsView-cdcbsee9.js → SessionsView-s0crtcm8.js} +1 -1
- package/dist/client/static/js/{SheetView-89sscpz6.js → SheetView-n6mst0hq.js} +13 -13
- package/dist/client/static/js/{SvgPreview-68c0ccbv.js → SvgPreview-g2aqq812.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-h3a5s259.js → abnfDiagram-O67JEVCF-3vac8sq4.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-b5w9mnn5.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-983p0jgn.js → architectureDiagram-NJMV4G6O-1nh4htz2.js} +3 -3
- package/dist/client/static/js/{astro-hyj5wege.js → astro-63zcysj7.js} +1 -1
- package/dist/client/static/js/bash-hv3167gh.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-16pse5mh.js → blockDiagram-BEXU5L5S-62z6kaar.js} +2 -2
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-mvnb00zt.js → c4Diagram-YGBWAQC7-rts5zgx4.js} +3 -3
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-kmpd91xb.js → classDiagram-v2-NBCMYWYE-tnpww186.js} +1 -1
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-3ek5r5se.js → cose-bilkent-JH36ORCC-8vsjbzwa.js} +1 -1
- package/dist/client/static/js/cpp-v2mqp8j7.js +1 -0
- package/dist/client/static/js/css-x7gyc3ta.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-kdj8rjc1.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-jkbh84zn.js → cynefinDiagram-VND7K2PF-005gc8km.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-4fdc0sgn.js → dagre-6A5THRUB-41zsteyd.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-hbk61nq9.js → diagram-22UHCM2B-prsm18a1.js} +3 -3
- package/dist/client/static/js/{diagram-3UASUU5V-hfpbr9qh.js → diagram-3UASUU5V-5nx9wf04.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-fn0nt71a.js → diagram-ATOU4E4O-k3d4z3aq.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-ssswxjeb.js → diagram-CDSNMT55-x2c5x5j2.js} +2 -2
- package/dist/client/static/js/{diagram-MLGK6HIB-whnzxv6f.js → diagram-MLGK6HIB-nvr76jqh.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-hk1chzxk.js → diagram-MPIPVDR6-v1jpzp9p.js} +1 -1
- package/dist/client/static/js/{dockerfile-zmsj8r4g.js → dockerfile-vz6va73h.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-q1vkg5mr.js → ebnfDiagram-ZINNZB2B-0v4tqr9v.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-kt98vg8j.js → elk-276RUBZZ-qfn4r7xj.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-ey3avsn9.js → erDiagram-OPXOYQCR-cd667n9f.js} +4 -4
- package/dist/client/static/js/{erlang-814e8qy5.js → erlang-vk66vt7q.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-m57b7ytw.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-fasj2gxy.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-a9k1at43.js → ganttDiagram-FUAMR5RP-ps0h3drm.js} +1 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-wvzsc4ph.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-gnekjfym.js → gitGraphDiagram-X574FWY7-fts23jer.js} +2 -2
- package/dist/client/static/js/graphql-a4gbqpj9.js +1 -0
- package/dist/client/static/js/{index-xq5f3nxa.js → index-0dkc6z8e.js} +2 -2
- package/dist/client/static/js/{index-m4k054wz.js → index-1d8bxjsz.js} +3 -3
- package/dist/client/static/js/{index-kty4ncsr.js → index-1whzs9kb.js} +2 -2
- package/dist/client/static/js/{index-qfxn7yh5.js → index-396r53n0.js} +2 -2
- package/dist/client/static/js/{index-kbhrvep8.js → index-39d8zbkx.js} +3 -3
- package/dist/client/static/js/{index-dn7hg4em.js → index-3nsrnyqr.js} +2 -2
- package/dist/client/static/js/{index-1ax52p0q.js → index-4jzsr1ky.js} +2 -2
- package/dist/client/static/js/{index-2a6qp9y6.js → index-4wnzs76g.js} +1 -1
- package/dist/client/static/js/{index-hgzntg2j.js → index-4x9p7hf9.js} +2 -2
- package/dist/client/static/js/{index-fzngzhww.js → index-52nd4hgm.js} +1 -1
- package/dist/client/static/js/{index-pavvxrsz.js → index-54mkp2r2.js} +1 -1
- package/dist/client/static/js/{index-abs635a1.js → index-56rtb871.js} +25 -25
- package/dist/client/static/js/{index-dxvtjn6a.js → index-5f4b44ay.js} +2 -2
- package/dist/client/static/js/{index-q9ytjey8.js → index-6009v8jf.js} +1 -1
- package/dist/client/static/js/{index-e9cxje00.js → index-62jgcgfd.js} +5 -5
- package/dist/client/static/js/{index-nw5mvcaj.js → index-64p1dncg.js} +2 -2
- package/dist/client/static/js/{index-fj5rsp5v.js → index-6d6hxwb5.js} +2 -2
- package/dist/client/static/js/{index-19x11s5w.js → index-70g527sb.js} +2 -2
- package/dist/client/static/js/{index-ykm7a3cp.js → index-7zeah164.js} +2 -2
- package/dist/client/static/js/{index-z25ss7xj.js → index-7zedprz3.js} +1 -1
- package/dist/client/static/js/{index-g7s0wsag.js → index-9ab6xaxd.js} +2 -2
- package/dist/client/static/js/index-9vqkyj58.js +3 -0
- package/dist/client/static/js/{index-60v30k5h.js → index-9xsf8162.js} +35 -35
- package/dist/client/static/js/{index-3x7h2eqj.js → index-a4h5np9r.js} +2 -2
- package/dist/client/static/js/{index-9vv7wr1n.js → index-an2wv33f.js} +2 -2
- package/dist/client/static/js/{index-64sqfr4a.js → index-c5hjht5e.js} +2 -2
- package/dist/client/static/js/{index-84fyq5a6.js → index-c63qyysm.js} +1 -1
- package/dist/client/static/js/{index-atq9q1s7.js → index-ccgzzydx.js} +1 -1
- package/dist/client/static/js/{index-b5dfvget.js → index-cra9mgkq.js} +4 -4
- package/dist/client/static/js/index-cvyqp8nz.css +1 -0
- package/dist/client/static/js/index-d2xtbabt.js +2 -0
- package/dist/client/static/js/{index-wrcdc9vz.js → index-dxkefysk.js} +1 -1
- package/dist/client/static/js/index-dxp2yvy7.js +2 -0
- package/dist/client/static/js/{index-vjmg7kn5.js → index-dyc886cc.js} +1 -1
- package/dist/client/static/js/{index-5wz0y88c.js → index-dzeyd153.js} +2 -2
- package/dist/client/static/js/{index-qf3y3ahx.js → index-e5j5gc4h.js} +2 -2
- package/dist/client/static/js/{index-2ks0m8ss.js → index-evmcc5qh.js} +2 -2
- package/dist/client/static/js/{index-b2e5pwx7.js → index-f2ahkev0.js} +5 -5
- package/dist/client/static/js/{index-65afr75v.js → index-fjex1y0t.js} +2 -2
- package/dist/client/static/js/{index-kb14dhrx.js → index-fxd8dfj4.js} +2 -2
- package/dist/client/static/js/{index-trvqvb1v.js → index-g4kkapka.js} +2 -2
- package/dist/client/static/js/{index-561gkvve.js → index-gzkzwgzv.js} +2 -2
- package/dist/client/static/js/{index-yf93db65.js → index-n1yr4khe.js} +1 -1
- package/dist/client/static/js/{index-d23eacf2.js → index-nkahe229.js} +2 -2
- package/dist/client/static/js/{index-dt6q3rws.js → index-p6s3fz6b.js} +11 -11
- package/dist/client/static/js/{index-hnb66d3s.js → index-q4ke39rh.js} +2 -2
- package/dist/client/static/js/index-qtd0e38d.js +1 -0
- package/dist/client/static/js/{index-x9r7zfp4.js → index-tqgj7rd9.js} +2 -2
- package/dist/client/static/js/{index-wbws16ag.js → index-x0xspam4.js} +2 -2
- package/dist/client/static/js/{index-4cag7w6k.js → index-x2v1zmth.js} +185 -185
- package/dist/client/static/js/{index-amsa0tfs.js → index-x9hfvbz6.js} +1 -1
- package/dist/client/static/js/{index-8g7q8mz4.js → index-xk1cqjkn.js} +3 -3
- package/dist/client/static/js/{index-c9e417cs.js → index-y6ke70e6.js} +2 -2
- package/dist/client/static/js/{index-bsr7wmj2.js → index-zhjjpvcc.js} +1 -1
- package/dist/client/static/js/info-A6RAGUB7-ym2xevn8.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-r1p25738.js → infoDiagram-VRGFBTTK-88qbtpq5.js} +1 -1
- package/dist/client/static/js/ini-80p6sp79.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-afgrqdrt.js → ishikawaDiagram-OU5B5YK6-s8bagk00.js} +1 -1
- package/dist/client/static/js/java-mm2b3s9b.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-hepa4wk7.js → journeyDiagram-ZHPQQLJL-hz8z0b9x.js} +2 -2
- package/dist/client/static/js/json-fzy76fkw.js +1 -0
- package/dist/client/static/js/jsx-c7v2f8s7.js +1 -0
- package/dist/client/static/js/{julia-yv2j8qd0.js → julia-dm0j9apa.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-jysft8ya.js → kanban-definition-PNTS6WVX-sjjnjb51.js} +1 -1
- package/dist/client/static/js/lua-ppfdxrmv.js +1 -0
- package/dist/client/static/js/markdown-xed7y3ds.js +1 -0
- package/dist/client/static/js/{mermaid.core-0m90b0s8.js → mermaid.core-zvwygxbh.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-x2rrzpvr.js → mindmap-definition-NLK3R4M7-kgj8enan.js} +2 -2
- package/dist/client/static/js/one-dark-pro-mq6sn6a2.js +1 -0
- package/dist/client/static/js/one-light-pt6t6vax.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-01vcsy6x.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-z7vb7f1z.js → pegDiagram-GJSIUBJH-gxzw1qwa.js} +1 -1
- package/dist/client/static/js/{perl-917pjq5a.js → perl-4jcm2jxv.js} +1 -1
- package/dist/client/static/js/{php-hwz75qzt.js → php-q32mec74.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-053gzkmh.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-jqv6v4e6.js → pieDiagram-5QR66LMP-pdqwyqcm.js} +1 -1
- package/dist/client/static/js/properties-8ysbq2n2.js +1 -0
- package/dist/client/static/js/python-4ysexc8s.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-w2h8yxrv.js → quadrantDiagram-O4NWA36T-yx2t364p.js} +1 -1
- package/dist/client/static/js/r-hrsw5arc.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-bkpby8am.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-67bxrjgw.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-xj9ymacg.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-2xxpbnf6.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-78w88znz.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-nd09yac3.js → railroadDiagram-XR7U4H2S-800fdzkr.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-t61zxh5v.js → requirementDiagram-PLB6GJNP-vc5rpgtm.js} +1 -1
- package/dist/client/static/js/{ruby-er7ayhte.js → ruby-npmpb290.js} +1 -1
- package/dist/client/static/js/{rust-avnkhh0p.js → rust-waks43wh.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-2f7h2cmw.js → sankeyDiagram-IPEJSGJF-ccjk8zgn.js} +2 -2
- package/dist/client/static/js/{sass-n47tt136.js → sass-502a4r7y.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-kfb5d7zd.js → sequenceDiagram-PO4LG4MO-c0tk7gfn.js} +6 -6
- package/dist/client/static/js/{sizeCapture-INFHLROL-amfg19se.js → sizeCapture-INFHLROL-fma9p1vy.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-k5hx7btx.js → stateDiagram-v2-GCMORJYK-d8f24b7j.js} +2 -2
- package/dist/client/static/js/{svelte-2pmz35vx.js → svelte-c15d0421.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-wv3rp8kk.js → swimlanes-2SLR337P-sdt7qy36.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-rz309qrx.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-0re95wtn.js → timeline-definition-EJHVYXUP-rv8qyr8b.js} +2 -2
- package/dist/client/static/js/treeView-Q6P3EWNA-g2bkjr4z.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-pj7yw9rw.js +1 -0
- package/dist/client/static/js/tsx-xjp2ds8g.js +1 -0
- package/dist/client/static/js/typescript-yg97da8h.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-yrje14qp.js → usecaseDiagram-POWQR4AR-w6ew1red.js} +2 -2
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-jxkmrfy5.js → vennDiagram-UO4OBE2U-p9axw7ch.js} +1 -1
- package/dist/client/static/js/{vue-d5gpjfgn.js → vue-xpemy62d.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-c7ekf8r2.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-d3v2m9b1.js → wardleyDiagram-VNRHLVJA-5ewc8s4p.js} +1 -1
- package/dist/client/static/js/xml-nrb23phz.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-9a1s1rjt.js → xychartDiagram-PMCCYNJV-7n4gn7k6.js} +2 -2
- package/dist/client/static/js/yaml-sqs6pjpx.js +1 -0
- package/marketplace/marketplace.json +34 -7
- package/marketplace/plugins/kanban/README.md +143 -0
- package/marketplace/plugins/kanban/icon.svg +5 -0
- package/marketplace/plugins/kanban/package.json +30 -0
- package/marketplace/plugins/kanban/src/app.tsx +34 -0
- package/marketplace/plugins/kanban/src/mcp-tools.ts +296 -0
- package/marketplace/plugins/kanban/src/mcp.test.ts +199 -0
- package/marketplace/plugins/kanban/src/mcp.ts +148 -0
- package/marketplace/plugins/kanban/src/panel/CardSheet.tsx +319 -0
- package/marketplace/plugins/kanban/src/panel/CardTile.tsx +97 -0
- package/marketplace/plugins/kanban/src/panel/StageColumn.tsx +116 -0
- package/marketplace/plugins/kanban/src/panel/StageSheet.tsx +249 -0
- package/marketplace/plugins/kanban/src/panel/catalogs.ts +114 -0
- package/marketplace/plugins/kanban/src/panel/index.tsx +327 -0
- package/marketplace/plugins/kanban/src/panel/panel.test.ts +219 -0
- package/marketplace/plugins/kanban/src/panel/start-work.ts +132 -0
- package/marketplace/plugins/kanban/src/panel/use-board.ts +148 -0
- package/marketplace/plugins/kanban/src/panel/use-card-detail.ts +70 -0
- package/marketplace/plugins/kanban/src/panel/use-writes.ts +123 -0
- package/marketplace/plugins/kanban/src/protocol.ts +180 -0
- package/marketplace/plugins/kanban/src/server.test.ts +113 -0
- package/marketplace/plugins/kanban/src/server.ts +227 -0
- package/marketplace/plugins/kanban/src/store/board.test.ts +311 -0
- package/marketplace/plugins/kanban/src/store/board.ts +147 -0
- package/marketplace/plugins/kanban/src/store/cards.ts +228 -0
- package/marketplace/plugins/kanban/src/store/fs.ts +159 -0
- package/marketplace/plugins/kanban/src/store/ops.ts +245 -0
- package/marketplace/plugins/kanban/src/store/resolve.test.ts +82 -0
- package/marketplace/plugins/kanban/src/store/resolve.ts +135 -0
- package/marketplace/plugins/kanban/tsconfig.json +26 -0
- package/package.json +2 -2
- package/src/client/components/common/file-icon/index.tsx +1 -1
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +12 -3
- package/src/client/components/layout/desktop-layout/WorkspacePanels.tsx +34 -7
- package/src/client/components/layout/desktop-layout/index.tsx +17 -22
- package/src/client/components/mobile/mobile-right-sidebar/EditorSurface.tsx +2 -0
- package/src/client/components/mobile/mobile-right-sidebar/FullEditor.tsx +11 -3
- package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.test.tsx +21 -0
- package/src/client/components/settings/categories/appearance-settings/EditorThemeSection.tsx +8 -4
- package/src/client/components/settings/categories/appearance-settings/ThemeCard.tsx +8 -2
- package/src/client/components/settings/categories/appearance-settings/ThemeGrid.tsx +15 -4
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +21 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +7 -1
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Read.tsx +1 -1
- package/src/client/components/workspace/editor/FilePane.tsx +4 -2
- package/src/client/components/workspace/editor/Tabs.tsx +7 -1
- package/src/client/components/workspace/editor/Toolbar.tsx +7 -1
- package/src/client/components/workspace/editor/chrome-rows.test.tsx +126 -0
- package/src/client/components/workspace/editor/viewers/HtmlPreview.test.tsx +94 -0
- package/src/client/components/workspace/editor/viewers/HtmlPreview.tsx +71 -0
- package/src/client/components/workspace/editor/viewers/bytes.ts +1 -1
- package/src/client/components/workspace/editor/viewers/dispatch.tsx +18 -2
- package/src/client/components/workspace/editor/viewers/viewers.test.ts +14 -1
- package/src/client/components/workspace/panel-header/index.test.tsx +2 -1
- package/src/client/components/workspace/panel-header/index.tsx +6 -4
- package/src/client/hooks/editor/resolve-viewer.ts +1 -1
- package/src/client/hooks/editor/use-editor-drop.ts +14 -0
- package/src/client/hooks/editor/use-editor-tab-state.ts +5 -4
- package/src/client/hooks/ui/media-query.ts +27 -0
- package/src/client/hooks/workspace/file-tabs.ts +10 -0
- package/src/client/hooks/workspace/right-panel-presence.test.ts +152 -0
- package/src/client/hooks/workspace/right-panel-presence.ts +119 -0
- package/src/client/lib/router/search-params.test.ts +83 -0
- package/src/client/lib/router/search-params.ts +14 -3
- package/src/server/lib/mcp/session-mcp.test.ts +64 -1
- package/src/server/lib/mcp/session-overlay.server.ts +7 -4
- package/src/server/lib/omp/rpc/constants.test.ts +31 -0
- package/src/server/lib/omp/rpc/constants.ts +19 -0
- package/src/server/lib/omp/rpc/session-new.ts +78 -0
- package/src/server/lib/omp/rpc/session-registry.ts +22 -49
- package/src/server/lib/omp/rpc/spawn-mcp.ts +8 -1
- package/src/server/lib/omp/session/blobs.server.ts +2 -1
- package/src/server/lib/plugins/e2e.test.ts +71 -2
- package/src/server/lib/plugins/loader.server.ts +20 -1
- package/src/server/lib/plugins/module-import.server.ts +45 -0
- package/src/server/routes/agent/new-prompt.test.ts +81 -0
- package/src/server/routes/agent/new.ts +78 -4
- package/src/server/routes/fs/raw.test.ts +12 -0
- package/src/server/routes/fs/raw.ts +2 -6
- package/src/server/routes/wiki/asset.ts +1 -1
- package/src/shared/lib/fs/document-kind.test.ts +39 -2
- package/src/shared/lib/fs/document-kind.ts +49 -1
- package/src/shared/lib/fs/file-kind.test.ts +30 -3
- package/src/shared/lib/fs/file-kind.ts +7 -104
- package/src/shared/lib/fs/mime.ts +159 -0
- package/src/shared/lib/workspace/sidebar-width.test.ts +34 -0
- package/src/shared/lib/workspace/sidebar-width.ts +33 -0
- package/src/shared/lib/workspace/workspace-panel-widths.test.ts +124 -0
- package/src/shared/lib/workspace/workspace-panel-widths.ts +115 -18
- package/dist/client/static/js/ImageView-jkrdrq8v.js +0 -1
- package/dist/client/static/js/LayoutWrapper-sh634350.js +0 -2
- package/dist/client/static/js/architecture-7GRP2DOG-pvb4d65d.js +0 -1
- package/dist/client/static/js/bash-8d8z8zrg.js +0 -1
- package/dist/client/static/js/cpp-620mvjkk.js +0 -1
- package/dist/client/static/js/css-bt76kxbq.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-gmx4vean.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-vrnheyh7.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-7gvtpn3d.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-n6wnc8st.js +0 -1
- package/dist/client/static/js/graphql-j1a6zp7m.js +0 -1
- package/dist/client/static/js/index-5ka2tyf9.js +0 -3
- package/dist/client/static/js/index-83rkg916.js +0 -2
- package/dist/client/static/js/index-dpy3ewrn.css +0 -1
- package/dist/client/static/js/index-vkqb4dnt.js +0 -1
- package/dist/client/static/js/index-xwjbq003.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-1xtdxjz2.js +0 -1
- package/dist/client/static/js/ini-5f4zqtqr.js +0 -1
- package/dist/client/static/js/java-jj41mty3.js +0 -1
- package/dist/client/static/js/json-rnh2h17x.js +0 -1
- package/dist/client/static/js/jsx-4gecrt29.js +0 -1
- package/dist/client/static/js/lua-zszaw2f7.js +0 -1
- package/dist/client/static/js/markdown-nm6gw4v4.js +0 -1
- package/dist/client/static/js/one-dark-pro-09d8p5vy.js +0 -1
- package/dist/client/static/js/one-light-g3ednt6p.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-zm1r82x5.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-sqa7321j.js +0 -1
- package/dist/client/static/js/properties-rkptax7r.js +0 -1
- package/dist/client/static/js/python-qf1se1mj.js +0 -1
- package/dist/client/static/js/r-ms0cygq2.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-z3z82syp.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-z6swcqq2.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-33km6py4.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-1zbf1xmq.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-wte1xzzy.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-6y8zdbm4.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-pvgx6n22.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-3n9zm628.js +0 -1
- package/dist/client/static/js/tsx-gx7td06z.js +0 -1
- package/dist/client/static/js/typescript-1a808spn.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-7m07ewc4.js +0 -1
- package/dist/client/static/js/xml-3117mxd9.js +0 -1
- package/dist/client/static/js/yaml-dmvh8vyt.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d,n,o,K,i,u,a,tn,e,Ee,qi,f,Ki,Vi,Yi,U,Zi,b,S,gr,Ar,bt,Wa,ue,di,rl,ct,ut,yt,rd,mc}from"./index-4cag7w6k.js";import{kr}from"./index-c9e417cs.js";var me=2000,W=new Map;function ge(s){if(s.length===0)return"";let r="";for(let t of s)r+=`${t.start}-${t.end},`;return r}function ee(s,r,t){let c=di(r),p=`${r}\x00${ge(t)}\x00${s}`;if(c){let v=W.get(p);if(v!==void 0)return W.delete(p),W.set(p,v),v}let l=rl(s,r,{marks:t});if(!c)return l;if(W.set(p,l),W.size>me){let v=W.keys().next();if(!v.done)W.delete(v.value)}return l}function te(s,r,t){let c=[],p=0;for(let l of r){if(l.start<p||l.end<=l.start||l.end>s.length)continue;if(l.start>p)c.push({text:s.slice(p,l.start),kind:"plain"});if(c.push({text:s.slice(l.start,l.end),kind:"removed"}),t)c.push({text:t,kind:"inserted"});p=l.end}if(p<s.length)c.push({text:s.slice(p),kind:"plain"});return c}function xe({file:s,result:r,replacement:t,showReplacePreview:c,onOpen:p}){let l=r.ranges??[],v=c&&t.length>0;return e("button",{type:"button",onClick:()=>p(r),className:"flex w-full items-start gap-2 rounded px-1 py-0.5 text-left hover:bg-ink/5 cursor-pointer",title:`Open ${s}:${r.line}`,children:[e("span",{className:"w-6 flex-shrink-0 text-right font-mono text-ink/40",children:r.line}),v?e("span",{className:"min-w-0 truncate font-mono text-ink",children:te(r.content,l,t).map((R,g)=>R.kind==="plain"?e("span",{children:R.text},g):R.kind==="removed"?e("del",{className:"search-replace-old",children:R.text},g):e("ins",{className:"search-replace-new",children:R.text},g))}):e("span",{className:"min-w-0 truncate font-mono text-ink",dangerouslySetInnerHTML:{__html:ee(r.content,yt(s),l)}})]})}var re=tn(xe);var Z={header:4,hit:4,group:16},ne={headerBox:16,hitBox:20},se=5000;function oe(s){let r=[],t=null;for(let c of s){if(!t||t.file!==c.file)t={file:c.file,results:[]},r.push(t);t.results.push(c)}return r}function ie(s){let r=[];for(let t of s){r.push({kind:"group",file:t.file,count:t.results.length});for(let c=0;c<t.results.length;c++)r.push({kind:"hit",file:t.file,result:t.results[c],last:c===t.results.length-1})}return r}function be(s,r){if(s.kind==="group")return r.headerBox+Z.header;return r.hitBox+(s.last?Z.group:Z.hit)}function ae(s,r){let t=Array(s.length),c=Array(s.length),p=0;for(let l=0;l<s.length;l++){let v=be(s[l],r);t[l]=p,c[l]=v,p+=v}return{offsets:t,heights:c,total:p}}function le(s,r,t,c,p=240){if(s.length===0)return{start:0,end:0};let l=Math.max(0,t),v=l-p,R=l+c+p,g=0,x=s.length-1;while(g<x){let m=g+x>>1;if(s[m]+r[m]>v)x=m;else g=m+1}let M=g;g=M,x=s.length;while(g<x){let m=g+x>>1;if(s[m]>=R)x=m;else g=m+1}return{start:M,end:g}}var Se=8,ve=8;function ce({groups:s,replacement:r,showReplacePreview:t,onOpen:c,onReplaceFile:p,replaceBusy:l}){let v=i(null),R=i(null),g=u(()=>ie(s),[s]),[x,M]=n(ne),m=u(()=>ae(g,x),[g,x]),[O,w]=n(()=>({start:0,end:Math.min(g.length,60)})),F=a((h)=>{v.current=h},[]),k=a(()=>{let h=v.current;if(!h)return;let N=le(m.offsets,m.heights,h.scrollTop,h.clientHeight);w((I)=>I.start===N.start&&I.end===N.end?I:N)},[m]),y=a(()=>{k()},[k]);K(()=>{let h=R.current;if(!h)return;let N=h.querySelector("[data-search-header] > div")?.offsetHeight??0,I=h.querySelector("[data-search-hit] > button")?.offsetHeight??0;if(N>0&&N!==x.headerBox)M((C)=>({...C,headerBox:N}));if(I>0&&I!==x.hitBox)M((C)=>({...C,hitBox:I}))},[O,x,g]),K(()=>{k()},[k]),K(()=>{let h=v.current;if(!h||typeof ResizeObserver>"u")return;let N=new ResizeObserver(()=>k());return N.observe(h),()=>N.disconnect()},[k]);let H=g.length===0?0:Math.min(O.start,g.length-1),A=Math.min(O.end,g.length),L=g.slice(H,A),_=A<g.length?m.total-m.offsets[A]:0;return e("div",{ref:F,onScroll:y,className:"flex-1 scrollbar-overlay-container px-3 text-xs",style:{overflowAnchor:"none"},children:[e("div",{style:{height:Se+(m.offsets[H]??0)},"aria-hidden":"true"}),e("div",{ref:R,children:L.map((h,N)=>{let I=H+N,C=m.heights[I];if(h.kind==="group")return e("div",{"data-search-header":"",style:{height:C},children:e("div",{className:"font-semibold text-ink/80 flex items-center justify-between group",children:[e("div",{className:"flex items-center min-w-0",children:[e(ct,{name:h.file,size:12,className:"mr-1.5 flex-shrink-0"}),e("span",{className:"truncate",children:h.file}),e("span",{className:"ml-2 bg-ink/10 text-[10px] px-1.5 py-0.5 rounded-full flex-shrink-0",children:h.count})]}),e("button",{onClick:()=>p(h.file),disabled:l,className:"touch-visible opacity-0 group-hover:opacity-100 p-1 text-ink/40 hover:text-ink rounded hover:bg-ink/5 disabled:opacity-50 flex-shrink-0",title:"Replace in this file",children:e(Yi,{size:12})})]})},`group:${h.file}`);return e("div",{"data-search-hit":"",style:{height:C},children:e(re,{file:h.file,result:h.result,replacement:r,showReplacePreview:t,onOpen:c})},`hit:${h.file}:${h.result.line}:${I}`)})}),e("div",{style:{height:ve+_},"aria-hidden":"true"})]})}function he({className:s,query:r,setQuery:t,replaceQuery:c,setReplaceQuery:p,matchCase:l,setMatchCase:v,wholeWord:R,setWholeWord:g,useRegex:x,setUseRegex:M,includeFiles:m,setIncludeFiles:O,showIncludeField:w,setShowIncludeField:F,showMenu:k,setShowMenu:y,menuRef:H,rootPath:A,activeRepo:L,setActiveRepo:_,repos:h,reposScanning:N,rescanRepos:I,results:C,isSearching:G,truncated:q,error:T,onOpenFile:z,handleReplace:D,replaceBusy:J,tabsMode:Y=!1}){let Q=u(()=>oe(C),[C]),P=i(null),X=i(null),B=a(()=>{t(""),P.current?.focus()},[t]),j=a(()=>{p(""),X.current?.focus()},[p]),V=u(()=>({matchCase:l,wholeWord:R,isRegex:x,inSelection:!1}),[l,R,x]),pe=a((E)=>{rd({path:E.file,line:Number(E.line),query:r,options:V}),z?.({path:E.file,name:E.file.split("/").pop()||E.file,root:A,repo:L})},[r,V,A,L,z]),fe=a((E)=>D(E),[D]);return e("div",{className:`flex flex-col h-full bg-paper ${s}`,children:[e(bt,{left:e(d,{children:[e(Wa,{id:"search",tabsMode:Y,children:e("h2",{className:"text-xs font-semibold text-ink uppercase tracking-wider",children:"Search"})}),e(kr,{rootPath:A,activeRepo:L,onSelectRepo:_,repos:h,scanning:N,onRefreshRepos:I})]}),right:e("div",{className:"relative",ref:H,children:[e("button",{onClick:()=>y(!k),className:`p-1 rounded hover:bg-ink/5 transition-colors ${k||w?"text-ink":"text-ink/40"}`,title:"Search Options",children:e(Ee,{size:14})}),k&&e("div",{className:"glass-popover absolute right-0 top-full mt-1 w-48 bg-paper border border-ink/10 rounded shadow-lg z-10 py-1",children:e("button",{onClick:()=>{if(F(!w),w)O("");y(!1)},className:"w-full px-3 py-1.5 text-left text-xs text-ink hover:bg-ink/5 flex items-center justify-between",children:[e("span",{children:"Files to include"}),w&&e(f,{size:12,className:"text-ink/60"})]})})]})}),e("div",{className:"p-3 flex flex-col gap-2.5 border-b border-ink/10",children:[e("div",{className:"relative",children:e("div",{className:"flex items-center border border-ink/20 rounded bg-paper focus-within:border-ink/40 focus-within:ring-1 focus-within:ring-ink/10 transition-all",children:[e(U,{size:14,className:"ml-2 text-ink/40 flex-shrink-0"}),e("input",{ref:P,type:"text",placeholder:"Search",value:r,onChange:(E)=>t(E.currentTarget.value),className:"w-full bg-transparent border-none text-xs px-2 py-1.5 focus:outline-none text-ink placeholder-ink/35 min-w-0"}),r&&e("button",{type:"button",onClick:B,title:"Clear search","aria-label":"Clear search",className:"p-1 mr-0.5 rounded text-ink/40 hover:text-ink hover:bg-ink/5 flex-shrink-0",children:e(b,{size:12})}),e("div",{className:"flex items-center space-x-0.5 pr-1 text-ink/40 flex-shrink-0",children:[e("button",{onClick:()=>v(!l),className:`p-1 rounded hover:text-ink ${l?"bg-ink/10 text-ink":"hover:bg-ink/5"}`,title:"Match Case",children:e(qi,{size:14})}),e("button",{onClick:()=>g(!R),className:`p-1 rounded hover:text-ink ${R?"bg-ink/10 text-ink":"hover:bg-ink/5"}`,title:"Match Whole Word",children:e(Zi,{size:14})}),e("button",{onClick:()=>M(!x),className:`p-1 rounded hover:text-ink ${x?"bg-ink/10 text-ink":"hover:bg-ink/5"}`,title:"Use Regular Expression",children:e(Ki,{size:14})})]})]})}),e("div",{className:"relative flex items-center space-x-1",children:[e("div",{className:"flex flex-1 min-w-0 items-center border border-ink/20 rounded bg-paper focus-within:border-ink/40 focus-within:ring-1 focus-within:ring-ink/10 transition-all",children:[e("input",{ref:X,type:"text",placeholder:"Replace",value:c,onChange:(E)=>p(E.currentTarget.value),className:"flex-1 min-w-0 bg-transparent border-none text-xs px-2 py-1.5 focus:outline-none text-ink placeholder-ink/35"}),c&&e("button",{type:"button",onClick:j,title:"Clear replace","aria-label":"Clear replace",className:"p-1 mr-0.5 rounded text-ink/40 hover:text-ink hover:bg-ink/5 flex-shrink-0",children:e(b,{size:12})})]}),e("button",{onClick:()=>D(),disabled:C.length===0||J,className:"p-1.5 rounded border border-ink/20 text-ink/60 hover:text-ink hover:bg-ink/5 disabled:opacity-50 disabled:cursor-not-allowed bg-paper",title:"Replace All",children:e(Vi,{size:14})})]}),w&&e("div",{className:"relative",children:e("input",{type:"text",value:m,onChange:(E)=>O(E.currentTarget.value),placeholder:"Files to include (e.g. *.js, src/*)",className:"w-full bg-paper border border-ink/20 rounded text-xs px-2 py-1.5 focus:outline-none focus:border-ink/40 focus:ring-1 focus:ring-ink/10 transition-all text-ink placeholder-ink/40"})})]}),T&&C.length===0?e("div",{className:"flex-1 px-3 py-3",role:"alert",children:e("div",{className:"rounded border border-error/30 bg-error/5 px-2.5 py-2",children:[e("div",{className:"text-[11px] font-semibold text-error",children:"Search failed"}),e("div",{className:"mt-1 whitespace-pre-wrap break-words font-mono text-[10.5px] text-ink/70",children:T}),x&&e("div",{className:"mt-1 text-[10.5px] text-ink/50",children:["Regex is on — escape metacharacters such as ",e("code",{className:"font-mono",children:"( ) [ ] * ? +"})," or turn it off to search literally."]})]})}):G&&C.length===0?e("div",{className:"flex-1 text-ink/40 italic text-center py-4",children:"Searching..."}):r.trim().length<=2?e("div",{className:"flex-1 text-ink/40 italic text-center py-4",children:"Type at least 3 characters to search."}):C.length===0?e("div",{className:"flex-1 text-ink/40 italic text-center py-4",children:"No results found."}):e(d,{children:[T&&e("div",{className:"px-3 pt-2 text-[10.5px] text-error",role:"alert",children:["Search failed: ",e("span",{className:"font-mono",children:T})]}),G&&e("div",{className:"px-3 pt-2 text-ink/40 italic",children:"Searching…"}),q&&e("div",{className:"px-3 pt-2 text-ink/50 italic",children:["Showing the first ",se," matches — refine the query to see the rest."]}),e(ce,{groups:Q,replacement:c,showReplacePreview:c.length>0,onOpen:pe,onReplaceFile:fe,replaceBusy:J})]})]})}function de(s){let[r,t]=n({scope:s,results:[],truncated:!1,error:null}),[c,p]=n(!1),l=i(null),v=i(!0),R=i(s);R.current=s,o(()=>(v.current=!0,()=>{v.current=!1,l.current?.abort(),l.current=null}),[]);let g=a(async(x)=>{l.current?.abort();let M=new AbortController;l.current=M;let m=R.current;t({scope:m,results:[],truncated:!1,error:null}),p(!0);try{let O=await fetch("/api/fs/search",{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(x),signal:M.signal});await mc(O,(w,F)=>{if(R.current!==m)return;if(w==="done"){let k=!1;try{k=JSON.parse(F)?.truncated===!0}catch{}t((y)=>y.scope===m?{...y,truncated:k}:y);return}if(w==="error"){let k="Search failed";try{k=JSON.parse(F)?.error||k}catch{}t((y)=>y.scope===m?{...y,error:k}:y);return}if(w!=="matches")return;try{let k=JSON.parse(F);if(Array.isArray(k))t((y)=>y.scope===m?{...y,results:[...y.results,...k]}:y)}catch{}},M.signal)}catch{}finally{if(v.current&&l.current===M)l.current=null,p(!1)}},[]);return{results:r.scope===s?r.results:[],isSearching:c&&r.scope===s,truncated:r.scope===s&&r.truncated,error:r.scope===s?r.error:null,start:g}}function it({className:s="",enabled:r=!0,rootPath:t,onOpenFile:c,tabsMode:p=!1}){let[l,v]=S("search.query",""),[R,g]=S("search.replaceQuery",""),[x,M]=S("search.matchCase",!1),[m,O]=S("search.wholeWord",!1),[w,F]=S("search.useRegex",!1),[k,y]=S("search.includeFiles",""),[H,A]=n(!1),[L,_]=S("search.showIncludeField",!1),{activeRepo:h,setActiveRepo:N}=gr(t),{repos:I,scanning:C,rescan:G}=Ar(t,r),q=i(null),T=ut(),{results:z,isSearching:D,truncated:J,error:Y,start:Q}=de(`${t??""}\x00${h}`);ue(q,()=>A(!1));let P=a(()=>{if(!r)return;if(l.trim().length>2)return Q({q:l,matchCase:String(x),wholeWord:String(m),useRegex:String(w),includeFiles:L?k:"",...t?{root:t}:{},...h!=="."?{repo:h}:{}})},[r,l,x,m,w,L,k,t,h,Q]);o(()=>{let B=setTimeout(()=>{P()},300);return()=>clearTimeout(B)},[P]);let X=a((B)=>{if(!l)return;let j=B?[B]:Array.from(new Set(z.map((V)=>V.file)));if(j.length===0)return;T.submit({q:l,replaceWith:R,matchCase:String(x),wholeWord:String(m),useRegex:String(w),files:JSON.stringify(j),...t?{root:t}:{},...h!=="."?{repo:h}:{}},{method:"POST",action:"/api/fs/replace"})},[l,R,x,m,w,z,t,h,T]);if(o(()=>{if(T.state==="idle"&&T.data?.success)P()},[T.state,T.data,P]),!r)return e("div",{className:`flex flex-col h-full bg-paper items-center justify-center text-ink/40 ${s}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});return e(he,{className:s,tabsMode:p,query:l,setQuery:v,replaceQuery:R,setReplaceQuery:g,matchCase:x,setMatchCase:M,wholeWord:m,setWholeWord:O,useRegex:w,setUseRegex:F,includeFiles:k,setIncludeFiles:y,showIncludeField:L,setShowIncludeField:_,showMenu:H,setShowMenu:A,menuRef:q,rootPath:t,activeRepo:h,setActiveRepo:N,repos:I,reposScanning:C,rescanRepos:G,results:z,isSearching:D,truncated:J,error:Y,onOpenFile:c,handleReplace:X,replaceBusy:T.state!=="idle"})}export{it as SearchPanel};
|
|
1
|
+
import{d,n,o,K,i,u,a,tn,e,Ee,Wi,f,Yi,Ji,Zi,U,es,b,S,gr,Ar,bt,Wa,ue,di,il,ct,ut,yt,id,fc}from"./index-x2v1zmth.js";import{kr}from"./index-y6ke70e6.js";var me=2000,W=new Map;function ge(s){if(s.length===0)return"";let r="";for(let t of s)r+=`${t.start}-${t.end},`;return r}function ee(s,r,t){let c=di(r),p=`${r}\x00${ge(t)}\x00${s}`;if(c){let v=W.get(p);if(v!==void 0)return W.delete(p),W.set(p,v),v}let l=il(s,r,{marks:t});if(!c)return l;if(W.set(p,l),W.size>me){let v=W.keys().next();if(!v.done)W.delete(v.value)}return l}function te(s,r,t){let c=[],p=0;for(let l of r){if(l.start<p||l.end<=l.start||l.end>s.length)continue;if(l.start>p)c.push({text:s.slice(p,l.start),kind:"plain"});if(c.push({text:s.slice(l.start,l.end),kind:"removed"}),t)c.push({text:t,kind:"inserted"});p=l.end}if(p<s.length)c.push({text:s.slice(p),kind:"plain"});return c}function xe({file:s,result:r,replacement:t,showReplacePreview:c,onOpen:p}){let l=r.ranges??[],v=c&&t.length>0;return e("button",{type:"button",onClick:()=>p(r),className:"flex w-full items-start gap-2 rounded px-1 py-0.5 text-left hover:bg-ink/5 cursor-pointer",title:`Open ${s}:${r.line}`,children:[e("span",{className:"w-6 flex-shrink-0 text-right font-mono text-ink/40",children:r.line}),v?e("span",{className:"min-w-0 truncate font-mono text-ink",children:te(r.content,l,t).map((R,g)=>R.kind==="plain"?e("span",{children:R.text},g):R.kind==="removed"?e("del",{className:"search-replace-old",children:R.text},g):e("ins",{className:"search-replace-new",children:R.text},g))}):e("span",{className:"min-w-0 truncate font-mono text-ink",dangerouslySetInnerHTML:{__html:ee(r.content,yt(s),l)}})]})}var re=tn(xe);var Z={header:4,hit:4,group:16},ne={headerBox:16,hitBox:20},se=5000;function oe(s){let r=[],t=null;for(let c of s){if(!t||t.file!==c.file)t={file:c.file,results:[]},r.push(t);t.results.push(c)}return r}function ie(s){let r=[];for(let t of s){r.push({kind:"group",file:t.file,count:t.results.length});for(let c=0;c<t.results.length;c++)r.push({kind:"hit",file:t.file,result:t.results[c],last:c===t.results.length-1})}return r}function be(s,r){if(s.kind==="group")return r.headerBox+Z.header;return r.hitBox+(s.last?Z.group:Z.hit)}function ae(s,r){let t=Array(s.length),c=Array(s.length),p=0;for(let l=0;l<s.length;l++){let v=be(s[l],r);t[l]=p,c[l]=v,p+=v}return{offsets:t,heights:c,total:p}}function le(s,r,t,c,p=240){if(s.length===0)return{start:0,end:0};let l=Math.max(0,t),v=l-p,R=l+c+p,g=0,x=s.length-1;while(g<x){let m=g+x>>1;if(s[m]+r[m]>v)x=m;else g=m+1}let M=g;g=M,x=s.length;while(g<x){let m=g+x>>1;if(s[m]>=R)x=m;else g=m+1}return{start:M,end:g}}var Se=8,ve=8;function ce({groups:s,replacement:r,showReplacePreview:t,onOpen:c,onReplaceFile:p,replaceBusy:l}){let v=i(null),R=i(null),g=u(()=>ie(s),[s]),[x,M]=n(ne),m=u(()=>ae(g,x),[g,x]),[O,w]=n(()=>({start:0,end:Math.min(g.length,60)})),F=a((h)=>{v.current=h},[]),k=a(()=>{let h=v.current;if(!h)return;let N=le(m.offsets,m.heights,h.scrollTop,h.clientHeight);w((I)=>I.start===N.start&&I.end===N.end?I:N)},[m]),y=a(()=>{k()},[k]);K(()=>{let h=R.current;if(!h)return;let N=h.querySelector("[data-search-header] > div")?.offsetHeight??0,I=h.querySelector("[data-search-hit] > button")?.offsetHeight??0;if(N>0&&N!==x.headerBox)M((C)=>({...C,headerBox:N}));if(I>0&&I!==x.hitBox)M((C)=>({...C,hitBox:I}))},[O,x,g]),K(()=>{k()},[k]),K(()=>{let h=v.current;if(!h||typeof ResizeObserver>"u")return;let N=new ResizeObserver(()=>k());return N.observe(h),()=>N.disconnect()},[k]);let H=g.length===0?0:Math.min(O.start,g.length-1),A=Math.min(O.end,g.length),L=g.slice(H,A),_=A<g.length?m.total-m.offsets[A]:0;return e("div",{ref:F,onScroll:y,className:"flex-1 scrollbar-overlay-container px-3 text-xs",style:{overflowAnchor:"none"},children:[e("div",{style:{height:Se+(m.offsets[H]??0)},"aria-hidden":"true"}),e("div",{ref:R,children:L.map((h,N)=>{let I=H+N,C=m.heights[I];if(h.kind==="group")return e("div",{"data-search-header":"",style:{height:C},children:e("div",{className:"font-semibold text-ink/80 flex items-center justify-between group",children:[e("div",{className:"flex items-center min-w-0",children:[e(ct,{name:h.file,size:12,className:"mr-1.5 flex-shrink-0"}),e("span",{className:"truncate",children:h.file}),e("span",{className:"ml-2 bg-ink/10 text-[10px] px-1.5 py-0.5 rounded-full flex-shrink-0",children:h.count})]}),e("button",{onClick:()=>p(h.file),disabled:l,className:"touch-visible opacity-0 group-hover:opacity-100 p-1 text-ink/40 hover:text-ink rounded hover:bg-ink/5 disabled:opacity-50 flex-shrink-0",title:"Replace in this file",children:e(Zi,{size:12})})]})},`group:${h.file}`);return e("div",{"data-search-hit":"",style:{height:C},children:e(re,{file:h.file,result:h.result,replacement:r,showReplacePreview:t,onOpen:c})},`hit:${h.file}:${h.result.line}:${I}`)})}),e("div",{style:{height:ve+_},"aria-hidden":"true"})]})}function he({className:s,query:r,setQuery:t,replaceQuery:c,setReplaceQuery:p,matchCase:l,setMatchCase:v,wholeWord:R,setWholeWord:g,useRegex:x,setUseRegex:M,includeFiles:m,setIncludeFiles:O,showIncludeField:w,setShowIncludeField:F,showMenu:k,setShowMenu:y,menuRef:H,rootPath:A,activeRepo:L,setActiveRepo:_,repos:h,reposScanning:N,rescanRepos:I,results:C,isSearching:G,truncated:q,error:T,onOpenFile:z,handleReplace:D,replaceBusy:J,tabsMode:Y=!1}){let Q=u(()=>oe(C),[C]),P=i(null),X=i(null),B=a(()=>{t(""),P.current?.focus()},[t]),j=a(()=>{p(""),X.current?.focus()},[p]),V=u(()=>({matchCase:l,wholeWord:R,isRegex:x,inSelection:!1}),[l,R,x]),pe=a((E)=>{id({path:E.file,line:Number(E.line),query:r,options:V}),z?.({path:E.file,name:E.file.split("/").pop()||E.file,root:A,repo:L})},[r,V,A,L,z]),fe=a((E)=>D(E),[D]);return e("div",{className:`flex flex-col h-full bg-paper ${s}`,children:[e(bt,{left:e(d,{children:[e(Wa,{id:"search",tabsMode:Y,children:e("h2",{className:"text-xs font-semibold text-ink uppercase tracking-wider",children:"Search"})}),e(kr,{rootPath:A,activeRepo:L,onSelectRepo:_,repos:h,scanning:N,onRefreshRepos:I})]}),right:e("div",{className:"relative",ref:H,children:[e("button",{onClick:()=>y(!k),className:`p-1 rounded hover:bg-ink/5 transition-colors ${k||w?"text-ink":"text-ink/40"}`,title:"Search Options",children:e(Ee,{size:14})}),k&&e("div",{className:"glass-popover absolute right-0 top-full mt-1 w-48 bg-paper border border-ink/10 rounded shadow-lg z-10 py-1",children:e("button",{onClick:()=>{if(F(!w),w)O("");y(!1)},className:"w-full px-3 py-1.5 text-left text-xs text-ink hover:bg-ink/5 flex items-center justify-between",children:[e("span",{children:"Files to include"}),w&&e(f,{size:12,className:"text-ink/60"})]})})]})}),e("div",{className:"p-3 flex flex-col gap-2.5 border-b border-ink/10",children:[e("div",{className:"relative",children:e("div",{className:"flex items-center border border-ink/20 rounded bg-paper focus-within:border-ink/40 focus-within:ring-1 focus-within:ring-ink/10 transition-all",children:[e(U,{size:14,className:"ml-2 text-ink/40 flex-shrink-0"}),e("input",{ref:P,type:"text",placeholder:"Search",value:r,onChange:(E)=>t(E.currentTarget.value),className:"w-full bg-transparent border-none text-xs px-2 py-1.5 focus:outline-none text-ink placeholder-ink/35 min-w-0"}),r&&e("button",{type:"button",onClick:B,title:"Clear search","aria-label":"Clear search",className:"p-1 mr-0.5 rounded text-ink/40 hover:text-ink hover:bg-ink/5 flex-shrink-0",children:e(b,{size:12})}),e("div",{className:"flex items-center space-x-0.5 pr-1 text-ink/40 flex-shrink-0",children:[e("button",{onClick:()=>v(!l),className:`p-1 rounded hover:text-ink ${l?"bg-ink/10 text-ink":"hover:bg-ink/5"}`,title:"Match Case",children:e(Wi,{size:14})}),e("button",{onClick:()=>g(!R),className:`p-1 rounded hover:text-ink ${R?"bg-ink/10 text-ink":"hover:bg-ink/5"}`,title:"Match Whole Word",children:e(es,{size:14})}),e("button",{onClick:()=>M(!x),className:`p-1 rounded hover:text-ink ${x?"bg-ink/10 text-ink":"hover:bg-ink/5"}`,title:"Use Regular Expression",children:e(Yi,{size:14})})]})]})}),e("div",{className:"relative flex items-center space-x-1",children:[e("div",{className:"flex flex-1 min-w-0 items-center border border-ink/20 rounded bg-paper focus-within:border-ink/40 focus-within:ring-1 focus-within:ring-ink/10 transition-all",children:[e("input",{ref:X,type:"text",placeholder:"Replace",value:c,onChange:(E)=>p(E.currentTarget.value),className:"flex-1 min-w-0 bg-transparent border-none text-xs px-2 py-1.5 focus:outline-none text-ink placeholder-ink/35"}),c&&e("button",{type:"button",onClick:j,title:"Clear replace","aria-label":"Clear replace",className:"p-1 mr-0.5 rounded text-ink/40 hover:text-ink hover:bg-ink/5 flex-shrink-0",children:e(b,{size:12})})]}),e("button",{onClick:()=>D(),disabled:C.length===0||J,className:"p-1.5 rounded border border-ink/20 text-ink/60 hover:text-ink hover:bg-ink/5 disabled:opacity-50 disabled:cursor-not-allowed bg-paper",title:"Replace All",children:e(Ji,{size:14})})]}),w&&e("div",{className:"relative",children:e("input",{type:"text",value:m,onChange:(E)=>O(E.currentTarget.value),placeholder:"Files to include (e.g. *.js, src/*)",className:"w-full bg-paper border border-ink/20 rounded text-xs px-2 py-1.5 focus:outline-none focus:border-ink/40 focus:ring-1 focus:ring-ink/10 transition-all text-ink placeholder-ink/40"})})]}),T&&C.length===0?e("div",{className:"flex-1 px-3 py-3",role:"alert",children:e("div",{className:"rounded border border-error/30 bg-error/5 px-2.5 py-2",children:[e("div",{className:"text-[11px] font-semibold text-error",children:"Search failed"}),e("div",{className:"mt-1 whitespace-pre-wrap break-words font-mono text-[10.5px] text-ink/70",children:T}),x&&e("div",{className:"mt-1 text-[10.5px] text-ink/50",children:["Regex is on — escape metacharacters such as ",e("code",{className:"font-mono",children:"( ) [ ] * ? +"})," or turn it off to search literally."]})]})}):G&&C.length===0?e("div",{className:"flex-1 text-ink/40 italic text-center py-4",children:"Searching..."}):r.trim().length<=2?e("div",{className:"flex-1 text-ink/40 italic text-center py-4",children:"Type at least 3 characters to search."}):C.length===0?e("div",{className:"flex-1 text-ink/40 italic text-center py-4",children:"No results found."}):e(d,{children:[T&&e("div",{className:"px-3 pt-2 text-[10.5px] text-error",role:"alert",children:["Search failed: ",e("span",{className:"font-mono",children:T})]}),G&&e("div",{className:"px-3 pt-2 text-ink/40 italic",children:"Searching…"}),q&&e("div",{className:"px-3 pt-2 text-ink/50 italic",children:["Showing the first ",se," matches — refine the query to see the rest."]}),e(ce,{groups:Q,replacement:c,showReplacePreview:c.length>0,onOpen:pe,onReplaceFile:fe,replaceBusy:J})]})]})}function de(s){let[r,t]=n({scope:s,results:[],truncated:!1,error:null}),[c,p]=n(!1),l=i(null),v=i(!0),R=i(s);R.current=s,o(()=>(v.current=!0,()=>{v.current=!1,l.current?.abort(),l.current=null}),[]);let g=a(async(x)=>{l.current?.abort();let M=new AbortController;l.current=M;let m=R.current;t({scope:m,results:[],truncated:!1,error:null}),p(!0);try{let O=await fetch("/api/fs/search",{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:new URLSearchParams(x),signal:M.signal});await fc(O,(w,F)=>{if(R.current!==m)return;if(w==="done"){let k=!1;try{k=JSON.parse(F)?.truncated===!0}catch{}t((y)=>y.scope===m?{...y,truncated:k}:y);return}if(w==="error"){let k="Search failed";try{k=JSON.parse(F)?.error||k}catch{}t((y)=>y.scope===m?{...y,error:k}:y);return}if(w!=="matches")return;try{let k=JSON.parse(F);if(Array.isArray(k))t((y)=>y.scope===m?{...y,results:[...y.results,...k]}:y)}catch{}},M.signal)}catch{}finally{if(v.current&&l.current===M)l.current=null,p(!1)}},[]);return{results:r.scope===s?r.results:[],isSearching:c&&r.scope===s,truncated:r.scope===s&&r.truncated,error:r.scope===s?r.error:null,start:g}}function it({className:s="",enabled:r=!0,rootPath:t,onOpenFile:c,tabsMode:p=!1}){let[l,v]=S("search.query",""),[R,g]=S("search.replaceQuery",""),[x,M]=S("search.matchCase",!1),[m,O]=S("search.wholeWord",!1),[w,F]=S("search.useRegex",!1),[k,y]=S("search.includeFiles",""),[H,A]=n(!1),[L,_]=S("search.showIncludeField",!1),{activeRepo:h,setActiveRepo:N}=gr(t),{repos:I,scanning:C,rescan:G}=Ar(t,r),q=i(null),T=ut(),{results:z,isSearching:D,truncated:J,error:Y,start:Q}=de(`${t??""}\x00${h}`);ue(q,()=>A(!1));let P=a(()=>{if(!r)return;if(l.trim().length>2)return Q({q:l,matchCase:String(x),wholeWord:String(m),useRegex:String(w),includeFiles:L?k:"",...t?{root:t}:{},...h!=="."?{repo:h}:{}})},[r,l,x,m,w,L,k,t,h,Q]);o(()=>{let B=setTimeout(()=>{P()},300);return()=>clearTimeout(B)},[P]);let X=a((B)=>{if(!l)return;let j=B?[B]:Array.from(new Set(z.map((V)=>V.file)));if(j.length===0)return;T.submit({q:l,replaceWith:R,matchCase:String(x),wholeWord:String(m),useRegex:String(w),files:JSON.stringify(j),...t?{root:t}:{},...h!=="."?{repo:h}:{}},{method:"POST",action:"/api/fs/replace"})},[l,R,x,m,w,z,t,h,T]);if(o(()=>{if(T.state==="idle"&&T.data?.success)P()},[T.state,T.data,P]),!r)return e("div",{className:`flex flex-col h-full bg-paper items-center justify-center text-ink/40 ${s}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});return e(he,{className:s,tabsMode:p,query:l,setQuery:v,replaceQuery:R,setReplaceQuery:g,matchCase:x,setMatchCase:M,wholeWord:m,setWholeWord:O,useRegex:w,setUseRegex:F,includeFiles:k,setIncludeFiles:y,showIncludeField:L,setShowIncludeField:_,showMenu:H,setShowMenu:A,menuRef:q,rootPath:t,activeRepo:h,setActiveRepo:N,repos:I,reposScanning:C,rescanRepos:G,results:z,isSearching:D,truncated:J,error:Y,onOpenFile:c,handleReplace:X,replaceBusy:T.state!=="idle"})}export{it as SearchPanel};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{t,l,ft,da,w,F,M,G,z,j,H,q,p,pa,
|
|
1
|
+
import{t,l,ft,da,w,F,M,G,z,j,H,q,p,pa,Oi,h,cr,ur,V,Sn,gt,nt,rt,Yn,cc,Lt,Mt,Fn,Pt,At}from"./index-9xsf8162.js";import{zt}from"./index-x2v1zmth.js";import{Oa}from"./index-a4h5np9r.js";var h1="flowchart-",d1=class{constructor(){this.vertexCounter=0,this.config=p(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=M,this.setAccDescription=z,this.setDiagramTitle=H,this.getAccTitle=G,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.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{t(this,"FlowDB")}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,a,n,o,k,c={},A){if(!e||e.trim().length===0)return;let f;if(A!==void 0){let T;if(!A.includes(`
|
|
2
2
|
`))T=`{
|
|
3
3
|
`+A+`
|
|
4
4
|
}`;else T=A+`
|
|
5
|
-
`;f=ur(T,{schema:cr})}let N=this.subGraphLookup.get(e);if(N&&f){N.metadata={...N.metadata,...f};return}let _=this.edges.find((T)=>T.id===e);if(_){let T=f;if(T?.animate!==void 0)_.animate=T.animate;if(T?.animation!==void 0)_.animation=T.animation;if(T?.curve!==void 0)_.interpolate=T.curve;return}let L,D=this.vertices.get(e);if(D===void 0){if(r===void 0&&a===void 0&&n!==void 0&&n!==null)l.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`);D={id:e,labelType:"text",domId:h1+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,D)}if(this.vertexCounter++,r!==void 0){if(this.config=p(),L=this.sanitizeText(r.text.trim()),D.labelType=r.type,L.startsWith('"')&&L.endsWith('"'))L=L.substring(1,L.length-1);D.text=L}else if(D.text===void 0)D.text=e;if(a!==void 0)D.type=a;if(n!==void 0&&n!==null)n.forEach((T)=>{D.styles.push(T)});if(o!==void 0&&o!==null)o.forEach((T)=>{D.classes.push(T)});if(k!==void 0)D.dir=k;if(D.props===void 0)D.props=c;else if(c!==void 0)Object.assign(D.props,c);if(f!==void 0){if(f.shape){if(f.shape!==f.shape.toLowerCase()||f.shape.includes("_"))throw Error(`No such shape: ${f.shape}. Shape names should be lowercase.`);else if(!
|
|
5
|
+
`;f=ur(T,{schema:cr})}let N=this.subGraphLookup.get(e);if(N&&f){N.metadata={...N.metadata,...f};return}let _=this.edges.find((T)=>T.id===e);if(_){let T=f;if(T?.animate!==void 0)_.animate=T.animate;if(T?.animation!==void 0)_.animation=T.animation;if(T?.curve!==void 0)_.interpolate=T.curve;return}let L,D=this.vertices.get(e);if(D===void 0){if(r===void 0&&a===void 0&&n!==void 0&&n!==null)l.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`);D={id:e,labelType:"text",domId:h1+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,D)}if(this.vertexCounter++,r!==void 0){if(this.config=p(),L=this.sanitizeText(r.text.trim()),D.labelType=r.type,L.startsWith('"')&&L.endsWith('"'))L=L.substring(1,L.length-1);D.text=L}else if(D.text===void 0)D.text=e;if(a!==void 0)D.type=a;if(n!==void 0&&n!==null)n.forEach((T)=>{D.styles.push(T)});if(o!==void 0&&o!==null)o.forEach((T)=>{D.classes.push(T)});if(k!==void 0)D.dir=k;if(D.props===void 0)D.props=c;else if(c!==void 0)Object.assign(D.props,c);if(f!==void 0){if(f.shape){if(f.shape!==f.shape.toLowerCase()||f.shape.includes("_"))throw Error(`No such shape: ${f.shape}. Shape names should be lowercase.`);else if(!cc(f.shape))throw Error(`No such shape: ${f.shape}.`);D.type=f?.shape}if(f?.label)D.text=f?.label,D.labelType=this.sanitizeNodeLabelType(f?.labelType);if(f?.icon){if(D.icon=f?.icon,!f.label?.trim()&&D.text===e)D.text=""}if(f?.form)D.form=f?.form;if(f?.pos)D.pos=f?.pos;if(f?.img){if(D.img=f?.img,!f.label?.trim()&&D.text===e)D.text=""}if(f?.constraint)D.constraint=f.constraint;if(f.w)D.assetWidth=Number(f.w);if(f.h)D.assetHeight=Number(f.h)}}addSingleLink(e,r,a,n){let c={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};l.info("abc78 Got edge...",c);let A=a.text;if(A!==void 0){if(c.text=this.sanitizeText(A.text.trim()),c.text.startsWith('"')&&c.text.endsWith('"'))c.text=c.text.substring(1,c.text.length-1);c.labelType=this.sanitizeNodeLabelType(A.type)}if(a!==void 0)c.type=a.type,c.stroke=a.stroke,c.length=a.length>10?10:a.length;if(n&&!this.edges.some((f)=>f.id===n))c.id=n,c.isUserDefinedId=!0;else{let f=this.edges.filter((N)=>N.start===c.start&&N.end===c.end);if(f.length===0)c.id=Sn(c.start,c.end,{counter:0,prefix:"L"});else c.id=Sn(c.start,c.end,{counter:f.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))l.info("Pushing edge..."),this.edges.push(c);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
|
|
6
6
|
|
|
7
7
|
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
|
8
8
|
You cannot set this config via configuration inside the diagram as it is a secure config.
|
|
9
|
-
You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e==="object"&&"id"in e&&typeof e.id==="string"}addLink(e,r,a){let n=this.isLinkData(a)?a.id.replace("@",""):void 0;l.info("addLink",e,r,n);for(let o of e)for(let k of r){let c=o===e[e.length-1],A=k===r[0];if(c&&A)this.addSingleLink(o,k,a,n);else this.addSingleLink(o,k,a,void 0)}}updateLinkInterpolate(e,r){e.forEach((a)=>{if(a==="default")this.edges.defaultInterpolate=r;else this.edges[a].interpolate=r})}updateLink(e,r){e.forEach((a)=>{if(typeof a==="number"&&a>=this.edges.length)throw Error(`The index ${a} 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(a==="default")this.edges.defaultStyle=r;else if(this.edges[a].style=r,(this.edges[a]?.style?.length??0)>0&&!this.edges[a]?.style?.some((n)=>n?.startsWith("fill")))this.edges[a]?.style?.push("fill:none")})}addClass(e,r){let a=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach((n)=>{let o=this.classes.get(n);if(o===void 0)o={id:n,styles:[],textStyles:[]},this.classes.set(n,o);if(a!==void 0&&a!==null)a.forEach((k)=>{if(/color/.exec(k)){let c=k.replace("fill","bgFill");o.textStyles.push(c)}o.styles.push(k)})})}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 a of e.split(",")){let n=this.vertices.get(a);if(n)n.classes.push(r);let o=this.edges.find((c)=>c.id===a);if(o)o.classes.push(r);let k=this.subGraphLookup.get(a);if(k)k.classes.push(r)}}setTooltip(e,r){if(r===void 0)return;r=this.sanitizeText(r);for(let a of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(a):a,r)}setClickFun(e,r,a){if(p().securityLevel!=="loose")return;if(r===void 0)return;let n=[];if(typeof a==="string"){n=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k<n.length;k++){let c=n[k].trim();if(c.startsWith('"')&&c.endsWith('"'))c=c.substr(1,c.length-2);n[k]=c}}if(n.length===0)n.push(e);let o=this.vertices.get(e);if(o)o.haveCallback=!0,this.funs.push(()=>{let k=this.lookUpDomId(e),c=document.querySelector(`[id="${k}"]`);if(c!==null)c.addEventListener("click",()=>{V.runFunc(r,...n)},!1)})}setLink(e,r,a){e.split(",").forEach((n)=>{let o=this.vertices.get(n);if(o!==void 0)o.link=V.formatUrl(r,this.config),o.linkTarget=a}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,a){e.split(",").forEach((n)=>{this.setClickFun(n,r,a)}),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}getClasses(){return this.classes}setupToolTips(e){let r=Oa();h(e).select("svg").selectAll("g.node").on("mouseover",(o)=>{let k=h(o.currentTarget),c=k.attr("title");if(c===null)return;let A=o.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(k.attr("title")).style("left",window.scrollX+A.left+(A.right-A.left)/2+"px").style("top",window.scrollY+A.bottom+"px"),r.html(zt.sanitize(c)),k.classed("hover",!0)}).on("mouseout",(o)=>{r.transition().duration(500).style("opacity",0),h(o.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.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=p(),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,a){let n=e.text.trim(),o=a.text;if(e===a&&/\s/.exec(a.text))n=void 0;let c=t((L)=>{let D={boolean:{},number:{},string:{}},T=[],B;return{nodeList:L.filter(function(ie){let d=typeof ie;if(ie.stmt&&ie.stmt==="dir")return B=ie.value,!1;if(ie.trim()==="")return!1;if(d in D)return D[d].hasOwnProperty(ie)?!1:D[d][ie]=!0;else return T.includes(ie)?!1:T.push(ie)}),dir:B}},"uniq")(r.flat()),{nodeList:A,dir:f}=c,N=p().flowchart??{};if(f=f??(N.inheritDir?this.getDirection()??p().direction??void 0:void 0),this.version==="gen-1")for(let L=0;L<A.length;L++)A[L]=this.lookUpDomId(A[L]);n=n??"subGraph"+this.subCount,o=o||"",o=this.sanitizeText(o),this.subCount=this.subCount+1;let _={id:n,nodes:A,title:o.trim(),classes:[],dir:f,labelType:this.sanitizeNodeLabelType(a?.type)};return l.info("Adding",_.id,_.nodes,_.dir),_.nodes=this.makeUniq(_,this.subGraphs).nodes,this.subGraphs.push(_),this.subGraphLookup.set(n,_),n}getPosForId(e){for(let[r,a]of this.subGraphs.entries())if(a.id===e)return r;return-1}indexNodes2(e,r){let a=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 n=0,o=1;while(n<a.length){let k=this.getPosForId(a[n]);if(k>=0){let c=this.indexNodes2(e,k);if(c.result)return{result:!0,count:o+c.count};else o=o+c.count}n=n+1}return{result:!1,count:o}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}destructStartLink(e){let r=e.trim(),a="arrow_open";switch(r[0]){case"<":a="arrow_point",r=r.slice(1);break;case"x":a="arrow_cross",r=r.slice(1);break;case"o":a="arrow_circle",r=r.slice(1);break}let n="normal";if(r.includes("="))n="thick";if(r.includes("."))n="dotted";return{type:a,stroke:n}}countChar(e,r){let a=r.length,n=0;for(let o=0;o<a;++o)if(r[o]===e)++n;return n}destructEndLink(e){let r=e.trim(),a=r.slice(0,-1),n="arrow_open";switch(r.slice(-1)){case"x":if(n="arrow_cross",r.startsWith("x"))n="double_"+n,a=a.slice(1);break;case">":if(n="arrow_point",r.startsWith("<"))n="double_"+n,a=a.slice(1);break;case"o":if(n="arrow_circle",r.startsWith("o"))n="double_"+n,a=a.slice(1);break}let o="normal",k=a.length-1;if(a.startsWith("="))o="thick";if(a.startsWith("~"))o="invisible";let c=this.countChar(".",a);if(c)o="dotted",k=c;return{type:n,stroke:o,length:k}}destructLink(e,r){let a=this.destructEndLink(e),n;if(r){if(n=this.destructStartLink(r),n.stroke!==a.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=a.type;else{if(n.type!==a.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}if(n.type==="double_arrow")n.type="double_arrow_point";return n.length=a.length,n}return a}exists(e,r){for(let a of e)if(a.nodes.includes(r))return!0;return!1}makeUniq(e,r){let a=[];return e.nodes.forEach((n,o)=>{if(!this.exists(r,n))a.push(e.nodes[o])}),{nodes:a}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon){if(e.form==="circle")return"iconCircle";if(e.form==="square")return"iconSquare";if(e.form==="rounded")return"iconRounded";return"icon"}switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,r){return e.find((a)=>a.id===r)}destructEdgeType(e){let r="none",a="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":a=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),a=r;break}return{arrowTypeStart:r,arrowTypeEnd:a}}addNodeFromVertex(e,r,a,n,o,k){let c=a.get(e.id),A=n.get(e.id)??!1,f=this.findNode(r,e.id);if(f)f.cssStyles=e.styles,f.cssCompiledStyles=this.getCompiledStyles(e.classes),f.cssClasses=e.classes.join(" ");else{let N={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:c,padding:o.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:k,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};if(A)r.push({...N,isGroup:!0,shape:"rect"});else r.push({...N,isGroup:!1,shape:this.getTypeFromVertex(e),minWidth:o.flowchart?.minNodeWidth})}}getCompiledStyles(e){let r=[];for(let a of e){let n=this.classes.get(a);if(n?.styles)r=[...r,...n.styles??[]].map((o)=>o.trim());if(n?.textStyles)r=[...r,...n.textStyles??[]].map((o)=>o.trim())}return r}getData(){let e=p(),r=[],a=[],n=this.getSubGraphs(),o=new Map,k=new Map,c=new Map;for(let d of n)for(let m of d.nodes)if(this.subGraphLookup.has(m))c.set(m,d.id);let A=new Map,f=new Map;for(let d of n){let m=c.get(d.id);if(m!==void 0)f.set(m,[...f.get(m)??[],d.id])}let N=0,_=t((d)=>{A.set(d,N++);for(let m of f.get(d)??[])_(m)},"walk");for(let d of n)if(!c.has(d.id))_(d.id);let L=t((d)=>this.subGraphLookup.get(d)?.metadata?.view==="collapsed","isCollapsed"),D=t((d)=>{let m,ue=new Set,le=d;while(le!==void 0&&!ue.has(le)){if(ue.add(le),L(le))m=le;le=c.get(le)}return m},"outermostCollapsed"),T=new Set,B=new Map;for(let d of n){let m=D(d.id);if(m===void 0)continue;if(d.id!==m)T.add(d.id),B.set(d.id,m);for(let ue of d.nodes){if(ue===m)continue;T.add(ue),B.set(ue,m)}}for(let d=n.length-1;d>=0;d--){let m=n[d];if(T.has(m.id))continue;if(m.nodes.length>0)k.set(m.id,!0);for(let ue of m.nodes)o.set(ue,m.id)}for(let d=n.length-1;d>=0;d--){let m=n[d];if(T.has(m.id))continue;if(m.metadata?.view==="collapsed")r.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:o.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssClasses:m.classes.join(" "),shape:"collapsedGroup",dir:m.dir,isGroup:!1,look:e.look,colorIndex:A.get(m.id)});else r.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:o.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssClasses:m.classes.join(" "),shape:"rect",dir:m.dir,isGroup:!0,look:e.look,colorIndex:A.get(m.id),metadata:m.metadata})}this.getVertices().forEach((d)=>{if(T.has(d.id))return;this.addNodeFromVertex(d,r,o,k,e,e.look||"classic")});let ie=this.getEdges();return ie.forEach((d,m)=>{let{arrowTypeStart:ue,arrowTypeEnd:le}=this.destructEdgeType(d.type),O=[...ie.defaultStyle??[]],U=B.get(d.start)??d.start,W=B.get(d.end)??d.end;if(U===W&&(B.has(d.start)||B.has(d.end)))return;if(d.style)O.push(...d.style);let Y={id:Sn(U,W,{counter:m,prefix:"L"},d.id),isUserDefinedId:d.isUserDefinedId,start:U,end:W,type:d.type??"normal",label:d.text,labelType:d.labelType,labelpos:"c",thickness:d.stroke,minlen:d.length,classes:d?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":ue,arrowTypeEnd:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":le,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(d.classes),labelStyle:O,style:O,pattern:d.stroke,look:e.look,animate:d.animate,animation:d.animation,curve:d.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};a.push(Y)}),{nodes:r,edges:a,other:{},config:e}}defaultConfig(){return Mi.flowchart}},p1=t(function(e,r){return r.db.getClasses()},"getClasses"),f1=t(async function(e,r,a,n){l.info("REF0:"),l.info("Drawing state diagram (v2)",r);let{securityLevel:o,flowchart:k,layout:c}=p();n.db.setDiagramId(r),l.debug("Before getData: ");let A=n.db.getData();l.debug("Data: ",A);let f=Pt(r,o),N=n.db.getDirection();A.type=n.type,A.layoutAlgorithm=Mt(c),A.direction=N,A.nodeSpacing=k?.nodeSpacing||50,A.rankSpacing=k?.rankSpacing||50,A.markers=["point","circle","cross"],A.diagramId=r,l.debug("REF1:",A),await Lt(A,f);let _=A.config.flowchart?.diagramPadding??8;V.insertTitle(f,"flowchartTitleText",k?.titleTopMargin||0,n.db.getDiagramTitle()),At(f,_,"flowchart",k?.useMaxWidth||!1)},"draw"),b1={getClasses:p1,draw:f1},kt=function(){var e=t(function(Be,b,g,C){for(g=g||{},C=Be.length;C--;g[Be[C]]=b);return g},"o"),r=[1,4],a=[1,3],n=[1,5],o=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],k=[2,2],c=[1,13],A=[1,14],f=[1,15],N=[1,16],_=[1,23],L=[1,25],D=[1,26],T=[1,27],B=[1,50],K=[1,49],ie=[1,29],d=[1,30],m=[1,31],ue=[1,32],le=[1,33],O=[1,45],U=[1,47],W=[1,43],Y=[1,48],Q=[1,44],J=[1,51],Z=[1,46],ee=[1,52],te=[1,53],Qe=[1,34],Je=[1,35],Ze=[1,36],$e=[1,37],et=[1,38],Fe=[1,58],v=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],be=[1,62],ke=[1,61],ge=[1,63],Ie=[8,9,11,75,77,78],mt=[1,79],Re=[1,92],Ne=[1,97],Ge=[1,96],Pe=[1,93],Oe=[1,89],Me=[1,95],Ue=[1,91],We=[1,98],ze=[1,94],je=[1,99],Ke=[1,90],ve=[8,9,10,11,40,75,77,78],re=[8,9,10,11,40,46,75,77,78],ce=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],Ct=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Ye=[44,60,89,102,105,106,109,111,114,115,116],Dt=[1,122],Tt=[1,123],tt=[1,125],st=[1,124],Et=[44,60,62,74,89,102,105,106,109,111,114,115,116],St=[1,134],yt=[1,148],xt=[1,149],Ft=[1,150],_t=[1,151],Bt=[1,136],vt=[1,138],Vt=[1,142],wt=[1,143],It=[1,144],Rt=[1,145],Nt=[1,146],Gt=[1,147],Ot=[1,152],Ut=[1,153],Wt=[1,132],jt=[1,133],Kt=[1,140],Yt=[1,135],Ht=[1,139],qt=[1,137],ot=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Xt=[1,155],Qt=[1,157],P=[8,9,11],he=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],E=[1,177],ae=[1,173],ne=[1,174],S=[1,178],y=[1,175],x=[1,176],He=[77,116,119],I=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Jt=[10,106],_e=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Ae=[1,248],me=[1,246],Ce=[1,250],De=[1,244],Te=[1,245],Ee=[1,247],Se=[1,249],ye=[1,251],qe=[1,269],Zt=[8,9,11,106],fe=[8,9,10,11,60,84,105,106,109,110,111,112],lt={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:t(function(b,g,C,u,R,s,Le){var i=s.length-1;switch(R){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 183:this.$=s[i];break;case 11:u.setDirection("TB"),this.$="TB";break;case 12:u.setDirection(s[i-1]),this.$=s[i-1];break;case 27:this.$=s[i-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=u.addSubGraph(s[i-6],s[i-1],s[i-4]);break;case 34:this.$=u.addSubGraph(s[i-3],s[i-1],s[i-3]);break;case 35:this.$=u.addSubGraph(void 0,s[i-1],void 0);break;case 37:this.$=s[i].trim(),u.setAccTitle(this.$);break;case 38:case 39:this.$=s[i].trim(),u.setAccDescription(this.$);break;case 43:this.$=s[i-1]+s[i];break;case 44:this.$=s[i];break;case 45:u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i]),u.addLink(s[i-3].stmt,s[i-1],s[i-2]),this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 46:u.addLink(s[i-2].stmt,s[i],s[i-1]),this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 47:u.addLink(s[i-3].stmt,s[i-1],s[i-2]),this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 48:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 49:u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i]),this.$={stmt:s[i-1],nodes:s[i-1],shapeData:s[i]};break;case 50:this.$={stmt:s[i],nodes:s[i]};break;case 51:this.$=[s[i]];break;case 52: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]),this.$=s[i-5].concat(s[i]);break;case 53:this.$=s[i-4].concat(s[i]);break;case 54:this.$=s[i];break;case 55:this.$=s[i-2],u.setClass(s[i-2],s[i]);break;case 56:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"square");break;case 57:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"doublecircle");break;case 58:this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"circle");break;case 59:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"ellipse");break;case 60:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"stadium");break;case 61:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"subroutine");break;case 62: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]]]));break;case 63:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"cylinder");break;case 64:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"round");break;case 65:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"diamond");break;case 66:this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"hexagon");break;case 67:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"odd");break;case 68:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"trapezoid");break;case 69:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"inv_trapezoid");break;case 70:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_right");break;case 71:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_left");break;case 72:this.$=s[i],u.addVertex(s[i]);break;case 73:s[i-1].text=s[i],this.$=s[i-1];break;case 74:case 75:s[i-2].text=s[i-1],this.$=s[i-2];break;case 76:this.$=s[i];break;case 77:var X=u.destructLink(s[i],s[i-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:s[i-1]};break;case 78:var X=u.destructLink(s[i],s[i-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:s[i-1],id:s[i-3]};break;case 79:this.$={text:s[i],type:"text"};break;case 80:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 81:this.$={text:s[i],type:"string"};break;case 82:this.$={text:s[i],type:"markdown"};break;case 83:var X=u.destructLink(s[i]);this.$={type:X.type,stroke:X.stroke,length:X.length};break;case 84:var X=u.destructLink(s[i]);this.$={type:X.type,stroke:X.stroke,length:X.length,id:s[i-1]};break;case 85:this.$=s[i-1];break;case 86:this.$={text:s[i],type:"text"};break;case 87:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 88:this.$={text:s[i],type:"string"};break;case 89:case 104:this.$={text:s[i],type:"markdown"};break;case 101:this.$={text:s[i],type:"text"};break;case 102:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 103:this.$={text:s[i],type:"text"};break;case 105:this.$=s[i-4],u.addClass(s[i-2],s[i]);break;case 106:this.$=s[i-4],u.setClass(s[i-2],s[i]);break;case 107:case 115:this.$=s[i-1],u.setClickEvent(s[i-1],s[i]);break;case 108:case 116:this.$=s[i-3],u.setClickEvent(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 109:this.$=s[i-2],u.setClickEvent(s[i-2],s[i-1],s[i]);break;case 110:this.$=s[i-4],u.setClickEvent(s[i-4],s[i-3],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 111:this.$=s[i-2],u.setLink(s[i-2],s[i]);break;case 112:this.$=s[i-4],u.setLink(s[i-4],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 113:this.$=s[i-4],u.setLink(s[i-4],s[i-2],s[i]);break;case 114:this.$=s[i-6],u.setLink(s[i-6],s[i-4],s[i]),u.setTooltip(s[i-6],s[i-2]);break;case 117:this.$=s[i-1],u.setLink(s[i-1],s[i]);break;case 118:this.$=s[i-3],u.setLink(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 119:this.$=s[i-3],u.setLink(s[i-3],s[i-2],s[i]);break;case 120:this.$=s[i-5],u.setLink(s[i-5],s[i-4],s[i]),u.setTooltip(s[i-5],s[i-2]);break;case 121:this.$=s[i-4],u.addVertex(s[i-2],void 0,void 0,s[i]);break;case 122:this.$=s[i-4],u.updateLink([s[i-2]],s[i]);break;case 123:this.$=s[i-4],u.updateLink(s[i-2],s[i]);break;case 124:this.$=s[i-8],u.updateLinkInterpolate([s[i-6]],s[i-2]),u.updateLink([s[i-6]],s[i]);break;case 125:this.$=s[i-8],u.updateLinkInterpolate(s[i-6],s[i-2]),u.updateLink(s[i-6],s[i]);break;case 126:this.$=s[i-6],u.updateLinkInterpolate([s[i-4]],s[i]);break;case 127:this.$=s[i-6],u.updateLinkInterpolate(s[i-4],s[i]);break;case 128:case 130:this.$=[s[i]];break;case 129:case 131:s[i-2].push(s[i]),this.$=s[i-2];break;case 133:this.$=s[i-1]+s[i];break;case 181:this.$=s[i];break;case 182:this.$=s[i-1]+""+s[i];break;case 184:this.$=s[i-1]+""+s[i];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:r,10:a,12:n},{1:[3]},e(o,k,{5:6}),{4:7,9:r,10:a,12:n},{4:8,9:r,10:a,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:c,9:A,10:f,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:_,33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:K,84:ie,85:d,86:m,87:ue,88:le,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Qe,122:Je,123:Ze,124:$e,125:et},e(o,[2,9]),e(o,[2,10]),e(o,[2,11]),{8:[1,55],9:[1,56],10:Fe,15:54,18:57},e(v,[2,3]),e(v,[2,4]),e(v,[2,5]),e(v,[2,6]),e(v,[2,7]),e(v,[2,8]),{8:be,9:ke,11:ge,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:be,9:ke,11:ge,21:68},{8:be,9:ke,11:ge,21:69},{8:be,9:ke,11:ge,21:70},{8:be,9:ke,11:ge,21:71},{8:be,9:ke,11:ge,21:72},{8:be,9:ke,10:[1,73],11:ge,21:74},e(v,[2,36]),{35:[1,75]},{37:[1,76]},e(v,[2,39]),e(Ie,[2,50],{18:77,39:78,10:Fe,40:mt}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:Re,44:Ne,60:Ge,80:[1,87],89:Pe,95:[1,84],97:[1,85],101:86,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},e(v,[2,185]),e(v,[2,186]),e(v,[2,187]),e(v,[2,188]),e(v,[2,189]),e(ve,[2,51]),e(ve,[2,54],{46:[1,100]}),e(re,[2,72],{113:113,29:[1,101],44:B,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:K,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:O,102:U,105:W,106:Y,109:Q,111:J,114:Z,115:ee,116:te}),e(ce,[2,181]),e(ce,[2,142]),e(ce,[2,143]),e(ce,[2,144]),e(ce,[2,145]),e(ce,[2,146]),e(ce,[2,147]),e(ce,[2,148]),e(ce,[2,149]),e(ce,[2,150]),e(ce,[2,151]),e(ce,[2,152]),e(o,[2,12]),e(o,[2,18]),e(o,[2,19]),{9:[1,114]},e(Ct,[2,26],{18:115,10:Fe}),e(v,[2,27]),{42:116,43:39,44:B,45:40,47:41,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(v,[2,40]),e(v,[2,41]),e(v,[2,42]),e(Ye,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Dt,81:Tt,116:tt,119:st},{75:[1,126],77:[1,127]},e(Et,[2,83]),e(v,[2,28]),e(v,[2,29]),e(v,[2,30]),e(v,[2,31]),e(v,[2,32]),{10:St,12:yt,14:xt,27:Ft,28:128,32:_t,44:Bt,60:vt,75:Vt,80:[1,130],81:[1,131],83:141,84:wt,85:It,86:Rt,87:Nt,88:Gt,89:Ot,90:Ut,91:129,105:Wt,109:jt,111:Kt,114:Yt,115:Ht,116:qt},e(ot,k,{5:154}),e(v,[2,37]),e(v,[2,38]),e(Ie,[2,48],{44:Xt}),e(Ie,[2,49],{18:156,10:Fe,40:Qt}),e(ve,[2,44]),{44:B,47:158,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},{102:[1,159],103:160,105:[1,161]},{44:B,47:162,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},{44:B,47:163,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(P,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(P,[2,115],{120:168,10:[1,167],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(P,[2,117],{10:[1,169]}),e(he,[2,183]),e(he,[2,170]),e(he,[2,171]),e(he,[2,172]),e(he,[2,173]),e(he,[2,174]),e(he,[2,175]),e(he,[2,176]),e(he,[2,177]),e(he,[2,178]),e(he,[2,179]),e(he,[2,180]),{44:B,47:170,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},{30:171,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:179,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:181,50:[1,180],67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:182,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:183,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:184,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{109:[1,185]},{30:186,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:187,65:[1,188],67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:189,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:190,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:191,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},e(ce,[2,182]),e(o,[2,20]),e(Ct,[2,25]),e(Ie,[2,46],{39:192,18:193,10:Fe,40:mt}),e(Ye,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{77:[1,197],79:198,116:tt,119:st},e(He,[2,79]),e(He,[2,81]),e(He,[2,82]),e(He,[2,168]),e(He,[2,169]),{76:199,79:121,80:Dt,81:Tt,116:tt,119:st},e(Et,[2,84]),{8:be,9:ke,10:St,11:ge,12:yt,14:xt,21:201,27:Ft,29:[1,200],32:_t,44:Bt,60:vt,75:Vt,83:141,84:wt,85:It,86:Rt,87:Nt,88:Gt,89:Ot,90:Ut,91:202,105:Wt,109:jt,111:Kt,114:Yt,115:Ht,116:qt},e(I,[2,101]),e(I,[2,103]),e(I,[2,104]),e(I,[2,157]),e(I,[2,158]),e(I,[2,159]),e(I,[2,160]),e(I,[2,161]),e(I,[2,162]),e(I,[2,163]),e(I,[2,164]),e(I,[2,165]),e(I,[2,166]),e(I,[2,167]),e(I,[2,90]),e(I,[2,91]),e(I,[2,92]),e(I,[2,93]),e(I,[2,94]),e(I,[2,95]),e(I,[2,96]),e(I,[2,97]),e(I,[2,98]),e(I,[2,99]),e(I,[2,100]),{6:11,7:12,8:c,9:A,10:f,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,203],33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:K,84:ie,85:d,86:m,87:ue,88:le,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Qe,122:Je,123:Ze,124:$e,125:et},{10:Fe,18:204},{44:[1,205]},e(ve,[2,43]),{10:[1,206],44:B,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:113,114:Z,115:ee,116:te},{10:[1,207]},{10:[1,208],106:[1,209]},e(Jt,[2,128]),{10:[1,210],44:B,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:113,114:Z,115:ee,116:te},{10:[1,211],44:B,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:113,114:Z,115:ee,116:te},{80:[1,212]},e(P,[2,109],{10:[1,213]}),e(P,[2,111],{10:[1,214]}),{80:[1,215]},e(he,[2,184]),{80:[1,216],98:[1,217]},e(ve,[2,55],{113:113,44:B,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,114:Z,115:ee,116:te}),{31:[1,218],67:E,82:219,116:S,117:y,118:x},e(_e,[2,86]),e(_e,[2,88]),e(_e,[2,89]),e(_e,[2,153]),e(_e,[2,154]),e(_e,[2,155]),e(_e,[2,156]),{49:[1,220],67:E,82:219,116:S,117:y,118:x},{30:221,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{51:[1,222],67:E,82:219,116:S,117:y,118:x},{53:[1,223],67:E,82:219,116:S,117:y,118:x},{55:[1,224],67:E,82:219,116:S,117:y,118:x},{57:[1,225],67:E,82:219,116:S,117:y,118:x},{60:[1,226]},{64:[1,227],67:E,82:219,116:S,117:y,118:x},{66:[1,228],67:E,82:219,116:S,117:y,118:x},{30:229,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{31:[1,230],67:E,82:219,116:S,117:y,118:x},{67:E,69:[1,231],71:[1,232],82:219,116:S,117:y,118:x},{67:E,69:[1,234],71:[1,233],82:219,116:S,117:y,118:x},e(Ie,[2,45],{18:156,10:Fe,40:Qt}),e(Ie,[2,47],{44:Xt}),e(Ye,[2,75]),e(Ye,[2,74]),{62:[1,235],67:E,82:219,116:S,117:y,118:x},e(Ye,[2,77]),e(He,[2,80]),{77:[1,236],79:198,116:tt,119:st},{30:237,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},e(ot,k,{5:238}),e(I,[2,102]),e(v,[2,35]),{43:239,44:B,45:40,47:41,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},{10:Fe,18:240},{10:Ae,60:me,84:Ce,92:241,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:252,104:[1,253],105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:254,104:[1,255],105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{105:[1,256]},{10:Ae,60:me,84:Ce,92:257,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{44:B,47:258,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(P,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(P,[2,116]),e(P,[2,118],{10:[1,262]}),e(P,[2,119]),e(re,[2,56]),e(_e,[2,87]),e(re,[2,57]),{51:[1,263],67:E,82:219,116:S,117:y,118:x},e(re,[2,64]),e(re,[2,59]),e(re,[2,60]),e(re,[2,61]),{109:[1,264]},e(re,[2,63]),e(re,[2,65]),{66:[1,265],67:E,82:219,116:S,117:y,118:x},e(re,[2,67]),e(re,[2,68]),e(re,[2,70]),e(re,[2,69]),e(re,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(Ye,[2,78]),{31:[1,266],67:E,82:219,116:S,117:y,118:x},{6:11,7:12,8:c,9:A,10:f,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,267],33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:K,84:ie,85:d,86:m,87:ue,88:le,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Qe,122:Je,123:Ze,124:$e,125:et},e(ve,[2,53]),{43:268,44:B,45:40,47:41,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(P,[2,121],{106:qe}),e(Zt,[2,130],{108:270,10:Ae,60:me,84:Ce,105:De,109:Te,110:Ee,111:Se,112:ye}),e(fe,[2,132]),e(fe,[2,134]),e(fe,[2,135]),e(fe,[2,136]),e(fe,[2,137]),e(fe,[2,138]),e(fe,[2,139]),e(fe,[2,140]),e(fe,[2,141]),e(P,[2,122],{106:qe}),{10:[1,271]},e(P,[2,123],{106:qe}),{10:[1,272]},e(Jt,[2,129]),e(P,[2,105],{106:qe}),e(P,[2,106],{113:113,44:B,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,114:Z,115:ee,116:te}),e(P,[2,110]),e(P,[2,112],{10:[1,273]}),e(P,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:be,9:ke,11:ge,21:278},e(v,[2,34]),e(ve,[2,52]),{10:Ae,60:me,84:Ce,105:De,107:279,108:243,109:Te,110:Ee,111:Se,112:ye},e(fe,[2,133]),{14:Re,44:Ne,60:Ge,89:Pe,101:280,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},{14:Re,44:Ne,60:Ge,89:Pe,101:281,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},{98:[1,282]},e(P,[2,120]),e(re,[2,58]),{30:283,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},e(re,[2,66]),e(ot,k,{5:284}),e(Zt,[2,131],{108:270,10:Ae,60:me,84:Ce,105:De,109:Te,110:Ee,111:Se,112:ye}),e(P,[2,126],{120:168,10:[1,285],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(P,[2,127],{120:168,10:[1,286],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(P,[2,114]),{31:[1,287],67:E,82:219,116:S,117:y,118:x},{6:11,7:12,8:c,9:A,10:f,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,288],33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:K,84:ie,85:d,86:m,87:ue,88:le,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Qe,122:Je,123:Ze,124:$e,125:et},{10:Ae,60:me,84:Ce,92:289,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:290,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},e(re,[2,62]),e(v,[2,33]),e(P,[2,124],{106:qe}),e(P,[2,125],{106:qe})],defaultActions:{},parseError:t(function(b,g){if(g.recoverable)this.trace(b);else{var C=Error(b);throw C.hash=g,C}},"parseError"),parse:t(function(b){var g=this,C=[0],u=[],R=[null],s=[],Le=this.table,i="",X=0,$t=0,e1=0,u1=2,t1=1,o1=s.slice.call(arguments,1),se=Object.create(this.lexer),Ve={yy:{}};for(var ct in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,ct))Ve.yy[ct]=this.yy[ct];if(se.setInput(b,Ve.yy),Ve.yy.lexer=se,Ve.yy.parser=this,typeof se.yylloc>"u")se.yylloc={};var ht=se.yylloc;s.push(ht);var l1=se.options&&se.options.ranges;if(typeof Ve.yy.parseError==="function")this.parseError=Ve.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function c1(pe){C.length=C.length-2*pe,R.length=R.length-pe,s.length=s.length-pe}t(c1,"popStack");function s1(){var pe=u.pop()||se.lex()||t1;if(typeof pe!=="number"){if(pe instanceof Array)u=pe,pe=u.pop();pe=g.symbols_[pe]||pe}return pe}t(s1,"lex");var oe,dt,we,de,C1,pt,Xe={},at,xe,i1,ut;while(!0){if(we=C[C.length-1],this.defaultActions[we])de=this.defaultActions[we];else{if(oe===null||typeof oe>"u")oe=s1();de=Le[we]&&Le[we][oe]}if(typeof de>"u"||!de.length||!de[0]){var bt="";ut=[];for(at in Le[we])if(this.terminals_[at]&&at>u1)ut.push("'"+this.terminals_[at]+"'");if(se.showPosition)bt="Parse error on line "+(X+1)+`:
|
|
9
|
+
You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e==="object"&&"id"in e&&typeof e.id==="string"}addLink(e,r,a){let n=this.isLinkData(a)?a.id.replace("@",""):void 0;l.info("addLink",e,r,n);for(let o of e)for(let k of r){let c=o===e[e.length-1],A=k===r[0];if(c&&A)this.addSingleLink(o,k,a,n);else this.addSingleLink(o,k,a,void 0)}}updateLinkInterpolate(e,r){e.forEach((a)=>{if(a==="default")this.edges.defaultInterpolate=r;else this.edges[a].interpolate=r})}updateLink(e,r){e.forEach((a)=>{if(typeof a==="number"&&a>=this.edges.length)throw Error(`The index ${a} 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(a==="default")this.edges.defaultStyle=r;else if(this.edges[a].style=r,(this.edges[a]?.style?.length??0)>0&&!this.edges[a]?.style?.some((n)=>n?.startsWith("fill")))this.edges[a]?.style?.push("fill:none")})}addClass(e,r){let a=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach((n)=>{let o=this.classes.get(n);if(o===void 0)o={id:n,styles:[],textStyles:[]},this.classes.set(n,o);if(a!==void 0&&a!==null)a.forEach((k)=>{if(/color/.exec(k)){let c=k.replace("fill","bgFill");o.textStyles.push(c)}o.styles.push(k)})})}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 a of e.split(",")){let n=this.vertices.get(a);if(n)n.classes.push(r);let o=this.edges.find((c)=>c.id===a);if(o)o.classes.push(r);let k=this.subGraphLookup.get(a);if(k)k.classes.push(r)}}setTooltip(e,r){if(r===void 0)return;r=this.sanitizeText(r);for(let a of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(a):a,r)}setClickFun(e,r,a){if(p().securityLevel!=="loose")return;if(r===void 0)return;let n=[];if(typeof a==="string"){n=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k<n.length;k++){let c=n[k].trim();if(c.startsWith('"')&&c.endsWith('"'))c=c.substr(1,c.length-2);n[k]=c}}if(n.length===0)n.push(e);let o=this.vertices.get(e);if(o)o.haveCallback=!0,this.funs.push(()=>{let k=this.lookUpDomId(e),c=document.querySelector(`[id="${k}"]`);if(c!==null)c.addEventListener("click",()=>{V.runFunc(r,...n)},!1)})}setLink(e,r,a){e.split(",").forEach((n)=>{let o=this.vertices.get(n);if(o!==void 0)o.link=V.formatUrl(r,this.config),o.linkTarget=a}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,a){e.split(",").forEach((n)=>{this.setClickFun(n,r,a)}),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}getClasses(){return this.classes}setupToolTips(e){let r=Oa();h(e).select("svg").selectAll("g.node").on("mouseover",(o)=>{let k=h(o.currentTarget),c=k.attr("title");if(c===null)return;let A=o.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(k.attr("title")).style("left",window.scrollX+A.left+(A.right-A.left)/2+"px").style("top",window.scrollY+A.bottom+"px"),r.html(zt.sanitize(c)),k.classed("hover",!0)}).on("mouseout",(o)=>{r.transition().duration(500).style("opacity",0),h(o.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.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=p(),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,a){let n=e.text.trim(),o=a.text;if(e===a&&/\s/.exec(a.text))n=void 0;let c=t((L)=>{let D={boolean:{},number:{},string:{}},T=[],B;return{nodeList:L.filter(function(ie){let d=typeof ie;if(ie.stmt&&ie.stmt==="dir")return B=ie.value,!1;if(ie.trim()==="")return!1;if(d in D)return D[d].hasOwnProperty(ie)?!1:D[d][ie]=!0;else return T.includes(ie)?!1:T.push(ie)}),dir:B}},"uniq")(r.flat()),{nodeList:A,dir:f}=c,N=p().flowchart??{};if(f=f??(N.inheritDir?this.getDirection()??p().direction??void 0:void 0),this.version==="gen-1")for(let L=0;L<A.length;L++)A[L]=this.lookUpDomId(A[L]);n=n??"subGraph"+this.subCount,o=o||"",o=this.sanitizeText(o),this.subCount=this.subCount+1;let _={id:n,nodes:A,title:o.trim(),classes:[],dir:f,labelType:this.sanitizeNodeLabelType(a?.type)};return l.info("Adding",_.id,_.nodes,_.dir),_.nodes=this.makeUniq(_,this.subGraphs).nodes,this.subGraphs.push(_),this.subGraphLookup.set(n,_),n}getPosForId(e){for(let[r,a]of this.subGraphs.entries())if(a.id===e)return r;return-1}indexNodes2(e,r){let a=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 n=0,o=1;while(n<a.length){let k=this.getPosForId(a[n]);if(k>=0){let c=this.indexNodes2(e,k);if(c.result)return{result:!0,count:o+c.count};else o=o+c.count}n=n+1}return{result:!1,count:o}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}destructStartLink(e){let r=e.trim(),a="arrow_open";switch(r[0]){case"<":a="arrow_point",r=r.slice(1);break;case"x":a="arrow_cross",r=r.slice(1);break;case"o":a="arrow_circle",r=r.slice(1);break}let n="normal";if(r.includes("="))n="thick";if(r.includes("."))n="dotted";return{type:a,stroke:n}}countChar(e,r){let a=r.length,n=0;for(let o=0;o<a;++o)if(r[o]===e)++n;return n}destructEndLink(e){let r=e.trim(),a=r.slice(0,-1),n="arrow_open";switch(r.slice(-1)){case"x":if(n="arrow_cross",r.startsWith("x"))n="double_"+n,a=a.slice(1);break;case">":if(n="arrow_point",r.startsWith("<"))n="double_"+n,a=a.slice(1);break;case"o":if(n="arrow_circle",r.startsWith("o"))n="double_"+n,a=a.slice(1);break}let o="normal",k=a.length-1;if(a.startsWith("="))o="thick";if(a.startsWith("~"))o="invisible";let c=this.countChar(".",a);if(c)o="dotted",k=c;return{type:n,stroke:o,length:k}}destructLink(e,r){let a=this.destructEndLink(e),n;if(r){if(n=this.destructStartLink(r),n.stroke!==a.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=a.type;else{if(n.type!==a.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}if(n.type==="double_arrow")n.type="double_arrow_point";return n.length=a.length,n}return a}exists(e,r){for(let a of e)if(a.nodes.includes(r))return!0;return!1}makeUniq(e,r){let a=[];return e.nodes.forEach((n,o)=>{if(!this.exists(r,n))a.push(e.nodes[o])}),{nodes:a}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon){if(e.form==="circle")return"iconCircle";if(e.form==="square")return"iconSquare";if(e.form==="rounded")return"iconRounded";return"icon"}switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,r){return e.find((a)=>a.id===r)}destructEdgeType(e){let r="none",a="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":a=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),a=r;break}return{arrowTypeStart:r,arrowTypeEnd:a}}addNodeFromVertex(e,r,a,n,o,k){let c=a.get(e.id),A=n.get(e.id)??!1,f=this.findNode(r,e.id);if(f)f.cssStyles=e.styles,f.cssCompiledStyles=this.getCompiledStyles(e.classes),f.cssClasses=e.classes.join(" ");else{let N={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:c,padding:o.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:k,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};if(A)r.push({...N,isGroup:!0,shape:"rect"});else r.push({...N,isGroup:!1,shape:this.getTypeFromVertex(e),minWidth:o.flowchart?.minNodeWidth})}}getCompiledStyles(e){let r=[];for(let a of e){let n=this.classes.get(a);if(n?.styles)r=[...r,...n.styles??[]].map((o)=>o.trim());if(n?.textStyles)r=[...r,...n.textStyles??[]].map((o)=>o.trim())}return r}getData(){let e=p(),r=[],a=[],n=this.getSubGraphs(),o=new Map,k=new Map,c=new Map;for(let d of n)for(let m of d.nodes)if(this.subGraphLookup.has(m))c.set(m,d.id);let A=new Map,f=new Map;for(let d of n){let m=c.get(d.id);if(m!==void 0)f.set(m,[...f.get(m)??[],d.id])}let N=0,_=t((d)=>{A.set(d,N++);for(let m of f.get(d)??[])_(m)},"walk");for(let d of n)if(!c.has(d.id))_(d.id);let L=t((d)=>this.subGraphLookup.get(d)?.metadata?.view==="collapsed","isCollapsed"),D=t((d)=>{let m,ue=new Set,le=d;while(le!==void 0&&!ue.has(le)){if(ue.add(le),L(le))m=le;le=c.get(le)}return m},"outermostCollapsed"),T=new Set,B=new Map;for(let d of n){let m=D(d.id);if(m===void 0)continue;if(d.id!==m)T.add(d.id),B.set(d.id,m);for(let ue of d.nodes){if(ue===m)continue;T.add(ue),B.set(ue,m)}}for(let d=n.length-1;d>=0;d--){let m=n[d];if(T.has(m.id))continue;if(m.nodes.length>0)k.set(m.id,!0);for(let ue of m.nodes)o.set(ue,m.id)}for(let d=n.length-1;d>=0;d--){let m=n[d];if(T.has(m.id))continue;if(m.metadata?.view==="collapsed")r.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:o.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssClasses:m.classes.join(" "),shape:"collapsedGroup",dir:m.dir,isGroup:!1,look:e.look,colorIndex:A.get(m.id)});else r.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:o.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssClasses:m.classes.join(" "),shape:"rect",dir:m.dir,isGroup:!0,look:e.look,colorIndex:A.get(m.id),metadata:m.metadata})}this.getVertices().forEach((d)=>{if(T.has(d.id))return;this.addNodeFromVertex(d,r,o,k,e,e.look||"classic")});let ie=this.getEdges();return ie.forEach((d,m)=>{let{arrowTypeStart:ue,arrowTypeEnd:le}=this.destructEdgeType(d.type),O=[...ie.defaultStyle??[]],U=B.get(d.start)??d.start,W=B.get(d.end)??d.end;if(U===W&&(B.has(d.start)||B.has(d.end)))return;if(d.style)O.push(...d.style);let Y={id:Sn(U,W,{counter:m,prefix:"L"},d.id),isUserDefinedId:d.isUserDefinedId,start:U,end:W,type:d.type??"normal",label:d.text,labelType:d.labelType,labelpos:"c",thickness:d.stroke,minlen:d.length,classes:d?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":ue,arrowTypeEnd:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":le,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(d.classes),labelStyle:O,style:O,pattern:d.stroke,look:e.look,animate:d.animate,animation:d.animation,curve:d.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};a.push(Y)}),{nodes:r,edges:a,other:{},config:e}}defaultConfig(){return Oi.flowchart}},p1=t(function(e,r){return r.db.getClasses()},"getClasses"),f1=t(async function(e,r,a,n){l.info("REF0:"),l.info("Drawing state diagram (v2)",r);let{securityLevel:o,flowchart:k,layout:c}=p();n.db.setDiagramId(r),l.debug("Before getData: ");let A=n.db.getData();l.debug("Data: ",A);let f=Pt(r,o),N=n.db.getDirection();A.type=n.type,A.layoutAlgorithm=Mt(c),A.direction=N,A.nodeSpacing=k?.nodeSpacing||50,A.rankSpacing=k?.rankSpacing||50,A.markers=["point","circle","cross"],A.diagramId=r,l.debug("REF1:",A),await Lt(A,f);let _=A.config.flowchart?.diagramPadding??8;V.insertTitle(f,"flowchartTitleText",k?.titleTopMargin||0,n.db.getDiagramTitle()),At(f,_,"flowchart",k?.useMaxWidth||!1)},"draw"),b1={getClasses:p1,draw:f1},kt=function(){var e=t(function(Be,b,g,C){for(g=g||{},C=Be.length;C--;g[Be[C]]=b);return g},"o"),r=[1,4],a=[1,3],n=[1,5],o=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],k=[2,2],c=[1,13],A=[1,14],f=[1,15],N=[1,16],_=[1,23],L=[1,25],D=[1,26],T=[1,27],B=[1,50],K=[1,49],ie=[1,29],d=[1,30],m=[1,31],ue=[1,32],le=[1,33],O=[1,45],U=[1,47],W=[1,43],Y=[1,48],Q=[1,44],J=[1,51],Z=[1,46],ee=[1,52],te=[1,53],Qe=[1,34],Je=[1,35],Ze=[1,36],$e=[1,37],et=[1,38],Fe=[1,58],v=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],be=[1,62],ke=[1,61],ge=[1,63],Ie=[8,9,11,75,77,78],mt=[1,79],Re=[1,92],Ne=[1,97],Ge=[1,96],Pe=[1,93],Oe=[1,89],Me=[1,95],Ue=[1,91],We=[1,98],ze=[1,94],je=[1,99],Ke=[1,90],ve=[8,9,10,11,40,75,77,78],re=[8,9,10,11,40,46,75,77,78],ce=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],Ct=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Ye=[44,60,89,102,105,106,109,111,114,115,116],Dt=[1,122],Tt=[1,123],tt=[1,125],st=[1,124],Et=[44,60,62,74,89,102,105,106,109,111,114,115,116],St=[1,134],yt=[1,148],xt=[1,149],Ft=[1,150],_t=[1,151],Bt=[1,136],vt=[1,138],Vt=[1,142],wt=[1,143],It=[1,144],Rt=[1,145],Nt=[1,146],Gt=[1,147],Ot=[1,152],Ut=[1,153],Wt=[1,132],jt=[1,133],Kt=[1,140],Yt=[1,135],Ht=[1,139],qt=[1,137],ot=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Xt=[1,155],Qt=[1,157],P=[8,9,11],he=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],E=[1,177],ae=[1,173],ne=[1,174],S=[1,178],y=[1,175],x=[1,176],He=[77,116,119],I=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Jt=[10,106],_e=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Ae=[1,248],me=[1,246],Ce=[1,250],De=[1,244],Te=[1,245],Ee=[1,247],Se=[1,249],ye=[1,251],qe=[1,269],Zt=[8,9,11,106],fe=[8,9,10,11,60,84,105,106,109,110,111,112],lt={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:t(function(b,g,C,u,R,s,Le){var i=s.length-1;switch(R){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 183:this.$=s[i];break;case 11:u.setDirection("TB"),this.$="TB";break;case 12:u.setDirection(s[i-1]),this.$=s[i-1];break;case 27:this.$=s[i-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=u.addSubGraph(s[i-6],s[i-1],s[i-4]);break;case 34:this.$=u.addSubGraph(s[i-3],s[i-1],s[i-3]);break;case 35:this.$=u.addSubGraph(void 0,s[i-1],void 0);break;case 37:this.$=s[i].trim(),u.setAccTitle(this.$);break;case 38:case 39:this.$=s[i].trim(),u.setAccDescription(this.$);break;case 43:this.$=s[i-1]+s[i];break;case 44:this.$=s[i];break;case 45:u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i]),u.addLink(s[i-3].stmt,s[i-1],s[i-2]),this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 46:u.addLink(s[i-2].stmt,s[i],s[i-1]),this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 47:u.addLink(s[i-3].stmt,s[i-1],s[i-2]),this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 48:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 49:u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i]),this.$={stmt:s[i-1],nodes:s[i-1],shapeData:s[i]};break;case 50:this.$={stmt:s[i],nodes:s[i]};break;case 51:this.$=[s[i]];break;case 52: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]),this.$=s[i-5].concat(s[i]);break;case 53:this.$=s[i-4].concat(s[i]);break;case 54:this.$=s[i];break;case 55:this.$=s[i-2],u.setClass(s[i-2],s[i]);break;case 56:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"square");break;case 57:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"doublecircle");break;case 58:this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"circle");break;case 59:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"ellipse");break;case 60:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"stadium");break;case 61:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"subroutine");break;case 62: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]]]));break;case 63:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"cylinder");break;case 64:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"round");break;case 65:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"diamond");break;case 66:this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"hexagon");break;case 67:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"odd");break;case 68:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"trapezoid");break;case 69:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"inv_trapezoid");break;case 70:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_right");break;case 71:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_left");break;case 72:this.$=s[i],u.addVertex(s[i]);break;case 73:s[i-1].text=s[i],this.$=s[i-1];break;case 74:case 75:s[i-2].text=s[i-1],this.$=s[i-2];break;case 76:this.$=s[i];break;case 77:var X=u.destructLink(s[i],s[i-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:s[i-1]};break;case 78:var X=u.destructLink(s[i],s[i-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:s[i-1],id:s[i-3]};break;case 79:this.$={text:s[i],type:"text"};break;case 80:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 81:this.$={text:s[i],type:"string"};break;case 82:this.$={text:s[i],type:"markdown"};break;case 83:var X=u.destructLink(s[i]);this.$={type:X.type,stroke:X.stroke,length:X.length};break;case 84:var X=u.destructLink(s[i]);this.$={type:X.type,stroke:X.stroke,length:X.length,id:s[i-1]};break;case 85:this.$=s[i-1];break;case 86:this.$={text:s[i],type:"text"};break;case 87:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 88:this.$={text:s[i],type:"string"};break;case 89:case 104:this.$={text:s[i],type:"markdown"};break;case 101:this.$={text:s[i],type:"text"};break;case 102:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 103:this.$={text:s[i],type:"text"};break;case 105:this.$=s[i-4],u.addClass(s[i-2],s[i]);break;case 106:this.$=s[i-4],u.setClass(s[i-2],s[i]);break;case 107:case 115:this.$=s[i-1],u.setClickEvent(s[i-1],s[i]);break;case 108:case 116:this.$=s[i-3],u.setClickEvent(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 109:this.$=s[i-2],u.setClickEvent(s[i-2],s[i-1],s[i]);break;case 110:this.$=s[i-4],u.setClickEvent(s[i-4],s[i-3],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 111:this.$=s[i-2],u.setLink(s[i-2],s[i]);break;case 112:this.$=s[i-4],u.setLink(s[i-4],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 113:this.$=s[i-4],u.setLink(s[i-4],s[i-2],s[i]);break;case 114:this.$=s[i-6],u.setLink(s[i-6],s[i-4],s[i]),u.setTooltip(s[i-6],s[i-2]);break;case 117:this.$=s[i-1],u.setLink(s[i-1],s[i]);break;case 118:this.$=s[i-3],u.setLink(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 119:this.$=s[i-3],u.setLink(s[i-3],s[i-2],s[i]);break;case 120:this.$=s[i-5],u.setLink(s[i-5],s[i-4],s[i]),u.setTooltip(s[i-5],s[i-2]);break;case 121:this.$=s[i-4],u.addVertex(s[i-2],void 0,void 0,s[i]);break;case 122:this.$=s[i-4],u.updateLink([s[i-2]],s[i]);break;case 123:this.$=s[i-4],u.updateLink(s[i-2],s[i]);break;case 124:this.$=s[i-8],u.updateLinkInterpolate([s[i-6]],s[i-2]),u.updateLink([s[i-6]],s[i]);break;case 125:this.$=s[i-8],u.updateLinkInterpolate(s[i-6],s[i-2]),u.updateLink(s[i-6],s[i]);break;case 126:this.$=s[i-6],u.updateLinkInterpolate([s[i-4]],s[i]);break;case 127:this.$=s[i-6],u.updateLinkInterpolate(s[i-4],s[i]);break;case 128:case 130:this.$=[s[i]];break;case 129:case 131:s[i-2].push(s[i]),this.$=s[i-2];break;case 133:this.$=s[i-1]+s[i];break;case 181:this.$=s[i];break;case 182:this.$=s[i-1]+""+s[i];break;case 184:this.$=s[i-1]+""+s[i];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:r,10:a,12:n},{1:[3]},e(o,k,{5:6}),{4:7,9:r,10:a,12:n},{4:8,9:r,10:a,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:c,9:A,10:f,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:_,33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:K,84:ie,85:d,86:m,87:ue,88:le,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Qe,122:Je,123:Ze,124:$e,125:et},e(o,[2,9]),e(o,[2,10]),e(o,[2,11]),{8:[1,55],9:[1,56],10:Fe,15:54,18:57},e(v,[2,3]),e(v,[2,4]),e(v,[2,5]),e(v,[2,6]),e(v,[2,7]),e(v,[2,8]),{8:be,9:ke,11:ge,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:be,9:ke,11:ge,21:68},{8:be,9:ke,11:ge,21:69},{8:be,9:ke,11:ge,21:70},{8:be,9:ke,11:ge,21:71},{8:be,9:ke,11:ge,21:72},{8:be,9:ke,10:[1,73],11:ge,21:74},e(v,[2,36]),{35:[1,75]},{37:[1,76]},e(v,[2,39]),e(Ie,[2,50],{18:77,39:78,10:Fe,40:mt}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:Re,44:Ne,60:Ge,80:[1,87],89:Pe,95:[1,84],97:[1,85],101:86,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},e(v,[2,185]),e(v,[2,186]),e(v,[2,187]),e(v,[2,188]),e(v,[2,189]),e(ve,[2,51]),e(ve,[2,54],{46:[1,100]}),e(re,[2,72],{113:113,29:[1,101],44:B,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:K,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:O,102:U,105:W,106:Y,109:Q,111:J,114:Z,115:ee,116:te}),e(ce,[2,181]),e(ce,[2,142]),e(ce,[2,143]),e(ce,[2,144]),e(ce,[2,145]),e(ce,[2,146]),e(ce,[2,147]),e(ce,[2,148]),e(ce,[2,149]),e(ce,[2,150]),e(ce,[2,151]),e(ce,[2,152]),e(o,[2,12]),e(o,[2,18]),e(o,[2,19]),{9:[1,114]},e(Ct,[2,26],{18:115,10:Fe}),e(v,[2,27]),{42:116,43:39,44:B,45:40,47:41,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(v,[2,40]),e(v,[2,41]),e(v,[2,42]),e(Ye,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Dt,81:Tt,116:tt,119:st},{75:[1,126],77:[1,127]},e(Et,[2,83]),e(v,[2,28]),e(v,[2,29]),e(v,[2,30]),e(v,[2,31]),e(v,[2,32]),{10:St,12:yt,14:xt,27:Ft,28:128,32:_t,44:Bt,60:vt,75:Vt,80:[1,130],81:[1,131],83:141,84:wt,85:It,86:Rt,87:Nt,88:Gt,89:Ot,90:Ut,91:129,105:Wt,109:jt,111:Kt,114:Yt,115:Ht,116:qt},e(ot,k,{5:154}),e(v,[2,37]),e(v,[2,38]),e(Ie,[2,48],{44:Xt}),e(Ie,[2,49],{18:156,10:Fe,40:Qt}),e(ve,[2,44]),{44:B,47:158,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},{102:[1,159],103:160,105:[1,161]},{44:B,47:162,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},{44:B,47:163,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(P,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(P,[2,115],{120:168,10:[1,167],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(P,[2,117],{10:[1,169]}),e(he,[2,183]),e(he,[2,170]),e(he,[2,171]),e(he,[2,172]),e(he,[2,173]),e(he,[2,174]),e(he,[2,175]),e(he,[2,176]),e(he,[2,177]),e(he,[2,178]),e(he,[2,179]),e(he,[2,180]),{44:B,47:170,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},{30:171,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:179,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:181,50:[1,180],67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:182,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:183,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:184,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{109:[1,185]},{30:186,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:187,65:[1,188],67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:189,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:190,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{30:191,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},e(ce,[2,182]),e(o,[2,20]),e(Ct,[2,25]),e(Ie,[2,46],{39:192,18:193,10:Fe,40:mt}),e(Ye,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{77:[1,197],79:198,116:tt,119:st},e(He,[2,79]),e(He,[2,81]),e(He,[2,82]),e(He,[2,168]),e(He,[2,169]),{76:199,79:121,80:Dt,81:Tt,116:tt,119:st},e(Et,[2,84]),{8:be,9:ke,10:St,11:ge,12:yt,14:xt,21:201,27:Ft,29:[1,200],32:_t,44:Bt,60:vt,75:Vt,83:141,84:wt,85:It,86:Rt,87:Nt,88:Gt,89:Ot,90:Ut,91:202,105:Wt,109:jt,111:Kt,114:Yt,115:Ht,116:qt},e(I,[2,101]),e(I,[2,103]),e(I,[2,104]),e(I,[2,157]),e(I,[2,158]),e(I,[2,159]),e(I,[2,160]),e(I,[2,161]),e(I,[2,162]),e(I,[2,163]),e(I,[2,164]),e(I,[2,165]),e(I,[2,166]),e(I,[2,167]),e(I,[2,90]),e(I,[2,91]),e(I,[2,92]),e(I,[2,93]),e(I,[2,94]),e(I,[2,95]),e(I,[2,96]),e(I,[2,97]),e(I,[2,98]),e(I,[2,99]),e(I,[2,100]),{6:11,7:12,8:c,9:A,10:f,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,203],33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:K,84:ie,85:d,86:m,87:ue,88:le,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Qe,122:Je,123:Ze,124:$e,125:et},{10:Fe,18:204},{44:[1,205]},e(ve,[2,43]),{10:[1,206],44:B,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:113,114:Z,115:ee,116:te},{10:[1,207]},{10:[1,208],106:[1,209]},e(Jt,[2,128]),{10:[1,210],44:B,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:113,114:Z,115:ee,116:te},{10:[1,211],44:B,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:113,114:Z,115:ee,116:te},{80:[1,212]},e(P,[2,109],{10:[1,213]}),e(P,[2,111],{10:[1,214]}),{80:[1,215]},e(he,[2,184]),{80:[1,216],98:[1,217]},e(ve,[2,55],{113:113,44:B,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,114:Z,115:ee,116:te}),{31:[1,218],67:E,82:219,116:S,117:y,118:x},e(_e,[2,86]),e(_e,[2,88]),e(_e,[2,89]),e(_e,[2,153]),e(_e,[2,154]),e(_e,[2,155]),e(_e,[2,156]),{49:[1,220],67:E,82:219,116:S,117:y,118:x},{30:221,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{51:[1,222],67:E,82:219,116:S,117:y,118:x},{53:[1,223],67:E,82:219,116:S,117:y,118:x},{55:[1,224],67:E,82:219,116:S,117:y,118:x},{57:[1,225],67:E,82:219,116:S,117:y,118:x},{60:[1,226]},{64:[1,227],67:E,82:219,116:S,117:y,118:x},{66:[1,228],67:E,82:219,116:S,117:y,118:x},{30:229,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},{31:[1,230],67:E,82:219,116:S,117:y,118:x},{67:E,69:[1,231],71:[1,232],82:219,116:S,117:y,118:x},{67:E,69:[1,234],71:[1,233],82:219,116:S,117:y,118:x},e(Ie,[2,45],{18:156,10:Fe,40:Qt}),e(Ie,[2,47],{44:Xt}),e(Ye,[2,75]),e(Ye,[2,74]),{62:[1,235],67:E,82:219,116:S,117:y,118:x},e(Ye,[2,77]),e(He,[2,80]),{77:[1,236],79:198,116:tt,119:st},{30:237,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},e(ot,k,{5:238}),e(I,[2,102]),e(v,[2,35]),{43:239,44:B,45:40,47:41,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},{10:Fe,18:240},{10:Ae,60:me,84:Ce,92:241,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:252,104:[1,253],105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:254,104:[1,255],105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{105:[1,256]},{10:Ae,60:me,84:Ce,92:257,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{44:B,47:258,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(P,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(P,[2,116]),e(P,[2,118],{10:[1,262]}),e(P,[2,119]),e(re,[2,56]),e(_e,[2,87]),e(re,[2,57]),{51:[1,263],67:E,82:219,116:S,117:y,118:x},e(re,[2,64]),e(re,[2,59]),e(re,[2,60]),e(re,[2,61]),{109:[1,264]},e(re,[2,63]),e(re,[2,65]),{66:[1,265],67:E,82:219,116:S,117:y,118:x},e(re,[2,67]),e(re,[2,68]),e(re,[2,70]),e(re,[2,69]),e(re,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(Ye,[2,78]),{31:[1,266],67:E,82:219,116:S,117:y,118:x},{6:11,7:12,8:c,9:A,10:f,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,267],33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:K,84:ie,85:d,86:m,87:ue,88:le,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Qe,122:Je,123:Ze,124:$e,125:et},e(ve,[2,53]),{43:268,44:B,45:40,47:41,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(P,[2,121],{106:qe}),e(Zt,[2,130],{108:270,10:Ae,60:me,84:Ce,105:De,109:Te,110:Ee,111:Se,112:ye}),e(fe,[2,132]),e(fe,[2,134]),e(fe,[2,135]),e(fe,[2,136]),e(fe,[2,137]),e(fe,[2,138]),e(fe,[2,139]),e(fe,[2,140]),e(fe,[2,141]),e(P,[2,122],{106:qe}),{10:[1,271]},e(P,[2,123],{106:qe}),{10:[1,272]},e(Jt,[2,129]),e(P,[2,105],{106:qe}),e(P,[2,106],{113:113,44:B,60:K,89:O,102:U,105:W,106:Y,109:Q,111:J,114:Z,115:ee,116:te}),e(P,[2,110]),e(P,[2,112],{10:[1,273]}),e(P,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:be,9:ke,11:ge,21:278},e(v,[2,34]),e(ve,[2,52]),{10:Ae,60:me,84:Ce,105:De,107:279,108:243,109:Te,110:Ee,111:Se,112:ye},e(fe,[2,133]),{14:Re,44:Ne,60:Ge,89:Pe,101:280,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},{14:Re,44:Ne,60:Ge,89:Pe,101:281,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},{98:[1,282]},e(P,[2,120]),e(re,[2,58]),{30:283,67:E,80:ae,81:ne,82:172,116:S,117:y,118:x},e(re,[2,66]),e(ot,k,{5:284}),e(Zt,[2,131],{108:270,10:Ae,60:me,84:Ce,105:De,109:Te,110:Ee,111:Se,112:ye}),e(P,[2,126],{120:168,10:[1,285],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(P,[2,127],{120:168,10:[1,286],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(P,[2,114]),{31:[1,287],67:E,82:219,116:S,117:y,118:x},{6:11,7:12,8:c,9:A,10:f,11:N,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,288],33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:K,84:ie,85:d,86:m,87:ue,88:le,89:O,102:U,105:W,106:Y,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Qe,122:Je,123:Ze,124:$e,125:et},{10:Ae,60:me,84:Ce,92:289,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:290,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},e(re,[2,62]),e(v,[2,33]),e(P,[2,124],{106:qe}),e(P,[2,125],{106:qe})],defaultActions:{},parseError:t(function(b,g){if(g.recoverable)this.trace(b);else{var C=Error(b);throw C.hash=g,C}},"parseError"),parse:t(function(b){var g=this,C=[0],u=[],R=[null],s=[],Le=this.table,i="",X=0,$t=0,e1=0,u1=2,t1=1,o1=s.slice.call(arguments,1),se=Object.create(this.lexer),Ve={yy:{}};for(var ct in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,ct))Ve.yy[ct]=this.yy[ct];if(se.setInput(b,Ve.yy),Ve.yy.lexer=se,Ve.yy.parser=this,typeof se.yylloc>"u")se.yylloc={};var ht=se.yylloc;s.push(ht);var l1=se.options&&se.options.ranges;if(typeof Ve.yy.parseError==="function")this.parseError=Ve.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function c1(pe){C.length=C.length-2*pe,R.length=R.length-pe,s.length=s.length-pe}t(c1,"popStack");function s1(){var pe=u.pop()||se.lex()||t1;if(typeof pe!=="number"){if(pe instanceof Array)u=pe,pe=u.pop();pe=g.symbols_[pe]||pe}return pe}t(s1,"lex");var oe,dt,we,de,C1,pt,Xe={},at,xe,i1,ut;while(!0){if(we=C[C.length-1],this.defaultActions[we])de=this.defaultActions[we];else{if(oe===null||typeof oe>"u")oe=s1();de=Le[we]&&Le[we][oe]}if(typeof de>"u"||!de.length||!de[0]){var bt="";ut=[];for(at in Le[we])if(this.terminals_[at]&&at>u1)ut.push("'"+this.terminals_[at]+"'");if(se.showPosition)bt="Parse error on line "+(X+1)+`:
|
|
10
10
|
`+se.showPosition()+`
|
|
11
11
|
Expecting `+ut.join(", ")+", got '"+(this.terminals_[oe]||oe)+"'";else bt="Parse error on line "+(X+1)+": Unexpected "+(oe==t1?"end of input":"'"+(this.terminals_[oe]||oe)+"'");this.parseError(bt,{text:se.match,token:this.terminals_[oe]||oe,line:se.yylineno,loc:ht,expected:ut})}if(de[0]instanceof Array&&de.length>1)throw Error("Parse Error: multiple actions possible at state: "+we+", token: "+oe);switch(de[0]){case 1:if(C.push(oe),R.push(se.yytext),s.push(se.yylloc),C.push(de[1]),oe=null,!dt){if($t=se.yyleng,i=se.yytext,X=se.yylineno,ht=se.yylloc,e1>0)e1--}else oe=dt,dt=null;break;case 2:if(xe=this.productions_[de[1]][1],Xe.$=R[R.length-xe],Xe._$={first_line:s[s.length-(xe||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(xe||1)].first_column,last_column:s[s.length-1].last_column},l1)Xe._$.range=[s[s.length-(xe||1)].range[0],s[s.length-1].range[1]];if(pt=this.performAction.apply(Xe,[i,$t,X,Ve.yy,de[1],R,s].concat(o1)),typeof pt<"u")return pt;if(xe)C=C.slice(0,-1*xe*2),R=R.slice(0,-1*xe),s=s.slice(0,-1*xe);C.push(this.productions_[de[1]][0]),R.push(Xe.$),s.push(Xe._$),i1=Le[C[C.length-2]][C[C.length-1]],C.push(i1);break;case 3:return!0}}return!0},"parse")},n1=function(){var Be={EOF:1,parseError:t(function(g,C){if(this.yy.parser)this.yy.parser.parseError(g,C);else throw Error(g)},"parseError"),setInput:t(function(b,g){if(this.yy=g||this.yy||{},this._input=b,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 b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var g=b.match(/(?:\r\n?|\n).*/g);if(g)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),b},"input"),unput:t(function(b){var g=b.length,C=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;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),C.length-1)this.yylineno-=C.length-1;var R=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:C?(C.length===u.length?this.yylloc.first_column:0)+u[u.length-C.length].length-C[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[R[0],R[0]+this.yyleng-g];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).
|
|
12
12
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(b){this.unput(this.match.slice(b))},"less"),pastInput:t(function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var b=this.match;if(b.length<20)b+=this._input.substr(0,20-b.length);return(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var b=this.pastInput(),g=Array(b.length+1).join("-");return b+this.upcomingInput()+`
|
|
@@ -210,5 +210,5 @@ ${k?`
|
|
|
210
210
|
text-align: center;
|
|
211
211
|
}
|
|
212
212
|
${Fn()}
|
|
213
|
-
`,"getStyles"),
|
|
214
|
-
export{
|
|
213
|
+
`,"getStyles"),Yf=m1,Jf=t(({styles:e=Yf}={})=>({parser:k1,get db(){return new d1},renderer:b1,styles:e,init:t((r)=>{if(!r.flowchart)r.flowchart={};r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,pa({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),i0=Jf();
|
|
214
|
+
export{Yf,Jf,i0};
|