@kabmo-labs/kabmo 0.31.0 → 0.32.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 +464 -445
- package/dist/client/static/js/CsvGrid-amafmq3z.js +2 -0
- package/dist/client/static/js/DocxView-851ps9t0.js +58 -0
- package/dist/client/static/js/DrawioView-kw1vy3r2.js +5 -0
- package/dist/client/static/js/ImageView-ksx9bbct.js +1 -0
- package/dist/client/static/js/LayoutWrapper-9ftz050x.js +2 -0
- package/dist/client/static/js/Modal-f8x3j3be.js +38 -0
- package/dist/client/static/js/PdfView-f5jkm0rs.js +1 -0
- package/dist/client/static/js/SessionsView-wzdf1cp6.js +1 -0
- package/dist/client/static/js/SheetView-23zxy30b.js +140 -0
- package/dist/client/static/js/SvgPreview-c341y50e.js +1 -0
- package/dist/client/static/js/__vite-browser-external-2447137e-mq6vaetg.js +0 -0
- package/dist/client/static/js/abnfDiagram-O67JEVCF-2dc3mpk6.js +1 -0
- package/dist/client/static/js/andromeeda-17pn42cc.js +1 -0
- package/dist/client/static/js/architecture-7GRP2DOG-4wsd6vk0.js +1 -0
- package/dist/client/static/js/architectureDiagram-NJMV4G6O-7jmrr5ja.js +36 -0
- package/dist/client/static/js/astro-sjtf954j.js +1 -0
- package/dist/client/static/js/aurora-x-hxy97145.js +1 -0
- package/dist/client/static/js/ayu-dark-x0jd4baz.js +1 -0
- package/dist/client/static/js/ayu-light-12fg03q0.js +1 -0
- package/dist/client/static/js/ayu-mirage-52h7xjbv.js +1 -0
- package/dist/client/static/js/bash-h6pkqvth.js +1 -0
- package/dist/client/static/js/blockDiagram-BEXU5L5S-jrk2m0ea.js +140 -0
- package/dist/client/static/js/c-thbdzmwv.js +1 -0
- package/dist/client/static/js/c4Diagram-YGBWAQC7-48cyncjd.js +38 -0
- package/dist/client/static/js/catppuccin-frappe-fqgpn512.js +1 -0
- package/dist/client/static/js/catppuccin-latte-tr2x6gmz.js +1 -0
- package/dist/client/static/js/catppuccin-macchiato-rm7kh084.js +1 -0
- package/dist/client/static/js/catppuccin-mocha-hw0dzp99.js +1 -0
- package/dist/client/static/js/classDiagram-v2-NBCMYWYE-gm7jt1cd.js +217 -0
- package/dist/client/static/js/clike-h8p24dc6.js +1 -0
- package/dist/client/static/js/clojure-tf457n84.js +1 -0
- package/dist/client/static/js/clojure-w19rx1x5.js +1 -0
- package/dist/client/static/js/cmake-qpejsvqg.js +1 -0
- package/dist/client/static/js/cose-bilkent-JH36ORCC-g0g3z0xp.js +1 -0
- package/dist/client/static/js/cpp-r1za1kke.js +1 -0
- package/dist/client/static/js/csharp-dap1ppts.js +1 -0
- package/dist/client/static/js/css-qsv4vvke.js +1 -0
- package/dist/client/static/js/css-tf1s0nb7.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-eycwde8c.js +1 -0
- package/dist/client/static/js/cynefinDiagram-VND7K2PF-6vjde6am.js +62 -0
- package/dist/client/static/js/dagre-6A5THRUB-q6k8bx1j.js +4 -0
- package/dist/client/static/js/dark-plus-weqfnwnf.js +1 -0
- package/dist/client/static/js/dart-dxn88tw0.js +1 -0
- package/dist/client/static/js/diagram-22UHCM2B-87cmze2n.js +200 -0
- package/dist/client/static/js/diagram-3UASUU5V-1ejbr2p4.js +24 -0
- package/dist/client/static/js/diagram-ATOU4E4O-vaw1r6k2.js +3 -0
- package/dist/client/static/js/diagram-CDSNMT55-gxm9zv7d.js +30 -0
- package/dist/client/static/js/diagram-MLGK6HIB-x010xswm.js +24 -0
- package/dist/client/static/js/diagram-MPIPVDR6-qtcq7e6c.js +41 -0
- package/dist/client/static/js/diff-r1sqd2db.js +1 -0
- package/dist/client/static/js/dockerfile-d43jt8fq.js +1 -0
- package/dist/client/static/js/dockerfile-k5xbramm.js +1 -0
- package/dist/client/static/js/dracula-k5pe1hsy.js +1 -0
- package/dist/client/static/js/dracula-soft-xqzm7g02.js +1 -0
- package/dist/client/static/js/ebnfDiagram-ZINNZB2B-nwwbasfh.js +1 -0
- package/dist/client/static/js/elixir-rpa1g4gy.js +1 -0
- package/dist/client/static/js/elk-276RUBZZ-xcp7thax.js +2 -0
- package/dist/client/static/js/erDiagram-OPXOYQCR-xj1tp716.js +99 -0
- package/dist/client/static/js/erlang-1ch2hjv9.js +1 -0
- package/dist/client/static/js/erlang-rz1g9mxy.js +1 -0
- package/dist/client/static/js/eventmodeling-NTZA5JFV-srqbnmey.js +1 -0
- package/dist/client/static/js/everforest-dark-v44f35e9.js +1 -0
- package/dist/client/static/js/everforest-light-c7m7g4z4.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-yj98317w.js +1 -0
- package/dist/client/static/js/ganttDiagram-FUAMR5RP-f7q96bea.js +292 -0
- package/dist/client/static/js/ghostty-web-2gt2tp72.js +13 -0
- package/dist/client/static/js/gitGraph-4MIJSDKK-5jcrvn94.js +1 -0
- package/dist/client/static/js/gitGraphDiagram-X574FWY7-1rydkyq9.js +106 -0
- package/dist/client/static/js/github-dark-default-1000qs8y.js +1 -0
- package/dist/client/static/js/github-dark-dimmed-vfghfgh1.js +1 -0
- package/dist/client/static/js/github-dark-fvd3e45k.js +1 -0
- package/dist/client/static/js/github-dark-high-contrast-2j07czxg.js +1 -0
- package/dist/client/static/js/github-light-9r4ahj0m.js +1 -0
- package/dist/client/static/js/github-light-default-6d4nszch.js +1 -0
- package/dist/client/static/js/github-light-high-contrast-qwzscwzg.js +1 -0
- package/dist/client/static/js/go-nfrqbjpq.js +1 -0
- package/dist/client/static/js/go-rtqh5zp3.js +1 -0
- package/dist/client/static/js/graphql-275pg7ya.js +1 -0
- package/dist/client/static/js/groovy-63s5pygd.js +1 -0
- package/dist/client/static/js/groovy-s992001c.js +1 -0
- package/dist/client/static/js/gruvbox-dark-hard-ctttkbm1.js +1 -0
- package/dist/client/static/js/gruvbox-dark-medium-vh8mkpgj.js +1 -0
- package/dist/client/static/js/gruvbox-dark-soft-9f1ph8sj.js +1 -0
- package/dist/client/static/js/gruvbox-light-hard-n3ma2f5b.js +1 -0
- package/dist/client/static/js/gruvbox-light-medium-hkamn7bg.js +1 -0
- package/dist/client/static/js/gruvbox-light-soft-r39t4g97.js +1 -0
- package/dist/client/static/js/haskell-ev7ynt8z.js +1 -0
- package/dist/client/static/js/haskell-phxh4hcg.js +1 -0
- package/dist/client/static/js/hcl-wndsmevr.js +1 -0
- package/dist/client/static/js/horizon-bright-wz5mjtp4.js +1 -0
- package/dist/client/static/js/horizon-pr13gmaz.js +1 -0
- package/dist/client/static/js/houston-mrdq0gj4.js +1 -0
- package/dist/client/static/js/html-pv88ny12.js +1 -0
- package/dist/client/static/js/index-0a1ekhqf.js +2 -0
- package/dist/client/static/js/index-0g25yrc0.js +1 -0
- package/dist/client/static/js/index-0j518hqm.js +2 -0
- package/dist/client/static/js/index-0n9c85ke.js +2 -0
- package/dist/client/static/js/index-123e8tqq.js +2 -0
- package/dist/client/static/js/index-14wppnkx.js +2 -0
- package/dist/client/static/js/index-22jaxtz1.js +2 -0
- package/dist/client/static/js/index-2n5wy1sh.js +1 -0
- package/dist/client/static/js/index-2t2tnc3x.js +1 -0
- package/dist/client/static/js/index-31jrebvn.js +214 -0
- package/dist/client/static/js/index-3anc30zh.js +2 -0
- package/dist/client/static/js/index-52bgxh6f.js +1 -0
- package/dist/client/static/js/index-5zd1jx9r.js +2 -0
- package/dist/client/static/js/index-6sdctwv2.js +2 -0
- package/dist/client/static/js/index-73xfkyea.js +2 -0
- package/dist/client/static/js/index-8a3tmm1h.js +332 -0
- package/dist/client/static/js/index-8m3q2zpb.js +1 -0
- package/dist/client/static/js/index-9nbxb421.js +2 -0
- package/dist/client/static/js/index-a293pdg7.js +2 -0
- package/dist/client/static/js/index-b08zd4eq.js +1 -0
- package/dist/client/static/js/index-c20a46ww.js +2 -0
- package/dist/client/static/js/index-c8jzx6b0.js +2 -0
- package/dist/client/static/js/index-cwaz6geq.js +2 -0
- package/dist/client/static/js/index-deex10rz.js +9 -0
- package/dist/client/static/js/index-e26rd868.js +2 -0
- package/dist/client/static/js/index-e6rar25v.js +2 -0
- package/dist/client/static/js/index-e7a3fkvv.js +1 -0
- package/dist/client/static/js/index-e94a1en0.css +1 -0
- package/dist/client/static/js/index-f519m6s3.js +1 -0
- package/dist/client/static/js/index-f63y3mjj.js +7 -0
- package/dist/client/static/js/index-fc2j6bq2.js +2 -0
- package/dist/client/static/js/index-fmxn1rzs.js +3 -0
- package/dist/client/static/js/index-g0pkzanm.js +2 -0
- package/dist/client/static/js/index-ga2xdef3.js +2 -0
- package/dist/client/static/js/index-ggaqh9rt.js +2 -0
- package/dist/client/static/js/index-gvwqjpcr.js +2 -0
- package/dist/client/static/js/index-h6jxmkxk.js +129 -0
- package/dist/client/static/js/index-hhm62nfj.js +2 -0
- package/dist/client/static/js/index-hkq0y3pn.js +2 -0
- package/dist/client/static/js/index-hyry1n8x.js +2 -0
- package/dist/client/static/js/index-m6wwc5h6.js +2 -0
- package/dist/client/static/js/index-nsrnyqcm.js +2 -0
- package/dist/client/static/js/index-pe9j88d4.js +2 -0
- package/dist/client/static/js/index-pkyrkkbt.js +2 -0
- package/dist/client/static/js/index-qmh0h87h.js +314 -0
- package/dist/client/static/js/index-r416e9dt.js +12 -0
- package/dist/client/static/js/index-s9vp6p70.js +2 -0
- package/dist/client/static/js/index-tr8754r0.js +179 -0
- package/dist/client/static/js/index-vmvcse63.js +1 -0
- package/dist/client/static/js/index-vnvrzwht.js +240 -0
- package/dist/client/static/js/index-vrbcj11n.js +2 -0
- package/dist/client/static/js/index-w4re5r8w.js +2 -0
- package/dist/client/static/js/index-w5131mtt.js +2 -0
- package/dist/client/static/js/index-w7xbfv44.js +2 -0
- package/dist/client/static/js/index-x64kqgen.js +2 -0
- package/dist/client/static/js/index-xa7nrnda.js +2 -0
- package/dist/client/static/js/index-xpf2ra60.js +1 -0
- package/dist/client/static/js/index-xzfsaqyz.js +4 -0
- package/dist/client/static/js/index-y139vc12.js +474 -0
- package/dist/client/static/js/index-ynqnbvn2.js +3 -0
- package/dist/client/static/js/index-yvcpdk5f.js +89 -0
- package/dist/client/static/js/index-zca66d5d.js +3 -0
- package/dist/client/static/js/info-A6RAGUB7-mbt0ryx5.js +1 -0
- package/dist/client/static/js/infoDiagram-VRGFBTTK-ptg07tp2.js +2 -0
- package/dist/client/static/js/ini-jqdrx98c.js +1 -0
- package/dist/client/static/js/ishikawaDiagram-OU5B5YK6-bdk2dkf5.js +70 -0
- package/dist/client/static/js/java-70zqqrkr.js +1 -0
- package/dist/client/static/js/javascript-18thb3jp.js +1 -0
- package/dist/client/static/js/javascript-4kw2j9t3.js +1 -0
- package/dist/client/static/js/journeyDiagram-ZHPQQLJL-kez0ha4c.js +139 -0
- package/dist/client/static/js/json-kxk8gfet.js +1 -0
- package/dist/client/static/js/json5-hmb38a78.js +1 -0
- package/dist/client/static/js/jsx-h1035eqk.js +1 -0
- package/dist/client/static/js/julia-ft9kd90a.js +1 -0
- package/dist/client/static/js/julia-nmr85k8z.js +1 -0
- package/dist/client/static/js/kanagawa-dragon-nya1w1ke.js +1 -0
- package/dist/client/static/js/kanagawa-lotus-hwn4nbn5.js +1 -0
- package/dist/client/static/js/kanagawa-wave-7rsxqd8r.js +1 -0
- package/dist/client/static/js/kanban-definition-PNTS6WVX-dhzp3qg5.js +89 -0
- package/dist/client/static/js/katex-eh1m1m1d.js +257 -0
- package/dist/client/static/js/kotlin-bw3n4j1v.js +1 -0
- package/dist/client/static/js/laserwave-37chepry.js +1 -0
- package/dist/client/static/js/less-w8v48sx0.js +1 -0
- package/dist/client/static/js/light-plus-mcbbmtzj.js +1 -0
- package/dist/client/static/js/lua-6at2ddf6.js +1 -0
- package/dist/client/static/js/lua-j2356waf.js +1 -0
- package/dist/client/static/js/main-rx9grv92.js +7 -0
- package/dist/client/static/js/makefile-22weg265.js +1 -0
- package/dist/client/static/js/markdown-ffw6rgk6.js +1 -0
- package/dist/client/static/js/material-theme-darker-pcm1tb69.js +1 -0
- package/dist/client/static/js/material-theme-lighter-cbdrfj3g.js +1 -0
- package/dist/client/static/js/material-theme-ocean-3rs19bm6.js +1 -0
- package/dist/client/static/js/material-theme-palenight-rxhkgd4c.js +1 -0
- package/dist/client/static/js/material-theme-x46yf0tm.js +1 -0
- package/dist/client/static/js/mermaid.core-h7wttbss.js +12 -0
- package/dist/client/static/js/min-dark-f279fhzv.js +1 -0
- package/dist/client/static/js/min-light-s53yjy4e.js +1 -0
- package/dist/client/static/js/mindmap-definition-NLK3R4M7-tq5dd1em.js +96 -0
- package/dist/client/static/js/mllike-cnahv8ak.js +1 -0
- package/dist/client/static/js/monokai-yr7h8283.js +1 -0
- package/dist/client/static/js/night-owl-8d01zsx4.js +1 -0
- package/dist/client/static/js/night-owl-light-7jbd0p3j.js +1 -0
- package/dist/client/static/js/nix-7e31jz1m.js +1 -0
- package/dist/client/static/js/nord-h1bak1eb.js +1 -0
- package/dist/client/static/js/objective-c-8r3dxert.js +1 -0
- package/dist/client/static/js/ocaml-bpjgcgwa.js +1 -0
- package/dist/client/static/js/one-dark-pro-8acf6cn2.js +1 -0
- package/dist/client/static/js/one-light-ysc1knem.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-a5yw789s.js +1 -0
- package/dist/client/static/js/pegDiagram-GJSIUBJH-e5hrdfzv.js +1 -0
- package/dist/client/static/js/perl-3t5fm1te.js +1 -0
- package/dist/client/static/js/perl-prxcva8r.js +1 -0
- package/dist/client/static/js/php-m9kcctzs.js +1 -0
- package/dist/client/static/js/pie-WAS4IAKB-x0y4v4r2.js +1 -0
- package/dist/client/static/js/pieDiagram-5QR66LMP-axvbvnz8.js +39 -0
- package/dist/client/static/js/plastic-8kfqgcmr.js +1 -0
- package/dist/client/static/js/poimandres-rjcckfek.js +1 -0
- package/dist/client/static/js/powershell-m5qb6mjj.js +1 -0
- package/dist/client/static/js/powershell-rrzhqtmb.js +1 -0
- package/dist/client/static/js/properties-55mrarxr.js +1 -0
- package/dist/client/static/js/properties-qq2pcfyk.js +1 -0
- package/dist/client/static/js/protobuf-578974t5.js +1 -0
- package/dist/client/static/js/protobuf-ggczeare.js +1 -0
- package/dist/client/static/js/python-dhypc3j4.js +1 -0
- package/dist/client/static/js/python-wbdfs2gc.js +1 -0
- package/dist/client/static/js/quadrantDiagram-O4NWA36T-wtn28cfm.js +7 -0
- package/dist/client/static/js/r-6b8dt1wp.js +1 -0
- package/dist/client/static/js/r-z4m38eb1.js +1 -0
- package/dist/client/static/js/racket-dhm8rebp.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-trrc3ta1.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-dxgvx21w.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-rbgkd8sk.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-exgw7j47.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-28tpamzk.js +1 -0
- package/dist/client/static/js/railroadDiagram-XR7U4H2S-avjkq945.js +1 -0
- package/dist/client/static/js/red-zgbwyj31.js +1 -0
- package/dist/client/static/js/requirementDiagram-PLB6GJNP-bntx7r6q.js +84 -0
- package/dist/client/static/js/rose-pine-azwmazxg.js +1 -0
- package/dist/client/static/js/rose-pine-dawn-3t3j9bnk.js +1 -0
- package/dist/client/static/js/rose-pine-moon-35ecvxkf.js +1 -0
- package/dist/client/static/js/ruby-nq98w40a.js +1 -0
- package/dist/client/static/js/ruby-t06c0e7g.js +1 -0
- package/dist/client/static/js/rust-6gqjxyf0.js +1 -0
- package/dist/client/static/js/rust-psncxtga.js +1 -0
- package/dist/client/static/js/sankeyDiagram-IPEJSGJF-ps8nkdm2.js +40 -0
- package/dist/client/static/js/sass-gsbyn3wh.js +1 -0
- package/dist/client/static/js/sass-k1jjq4y7.js +1 -0
- package/dist/client/static/js/scala-atdk263v.js +1 -0
- package/dist/client/static/js/scheme-181kqjff.js +1 -0
- package/dist/client/static/js/scheme-jvs3e9c8.js +1 -0
- package/dist/client/static/js/scss-zphrqp25.js +1 -0
- package/dist/client/static/js/sequenceDiagram-PO4LG4MO-3ckf1q6z.js +169 -0
- package/dist/client/static/js/shell-5rhwzbr3.js +1 -0
- package/dist/client/static/js/sizeCapture-INFHLROL-akvcr1x7.js +1 -0
- package/dist/client/static/js/slack-dark-j9p83tbc.js +1 -0
- package/dist/client/static/js/slack-ochin-fe90gs3m.js +1 -0
- package/dist/client/static/js/snazzy-light-pj44bwcm.js +1 -0
- package/dist/client/static/js/solarized-dark-54jyr51c.js +1 -0
- package/dist/client/static/js/solarized-light-ca8r58m6.js +1 -0
- package/dist/client/static/js/solidity-bx92jb30.js +1 -0
- package/dist/client/static/js/sql-9dq913c8.js +1 -0
- package/dist/client/static/js/sql-wsvbkyd1.js +1 -0
- package/dist/client/static/js/stateDiagram-v2-GCMORJYK-c82914fz.js +291 -0
- package/dist/client/static/js/stylus-fht9fjbw.js +1 -0
- package/dist/client/static/js/stylus-xh0f7m9m.js +1 -0
- package/dist/client/static/js/svelte-j54gfrvq.js +1 -0
- package/dist/client/static/js/swift-0rtnm3tm.js +1 -0
- package/dist/client/static/js/swift-rr9wc5y7.js +1 -0
- package/dist/client/static/js/swimlanes-2SLR337P-scgdefh4.js +1 -0
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-0x2ashav.js +8 -0
- package/dist/client/static/js/synthwave-84-yq047vcq.js +1 -0
- package/dist/client/static/js/timeline-definition-EJHVYXUP-z2ha1rhq.js +120 -0
- package/dist/client/static/js/tokyo-night-jfy87bj1.js +1 -0
- package/dist/client/static/js/toml-b5g7qp6k.js +1 -0
- package/dist/client/static/js/toml-prjdc335.js +1 -0
- package/dist/client/static/js/treeView-Q6P3EWNA-1a00b6kc.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-2q4f2f7m.js +1 -0
- package/dist/client/static/js/tsx-wh5xgm7f.js +1 -0
- package/dist/client/static/js/typescript-ge85req5.js +1 -0
- package/dist/client/static/js/usecaseDiagram-POWQR4AR-3wdmrfmk.js +370 -0
- package/dist/client/static/js/vennDiagram-UO4OBE2U-7m5tatzv.js +34 -0
- package/dist/client/static/js/vesper-0e7jx631.js +1 -0
- package/dist/client/static/js/vitesse-black-avx6j9e8.js +1 -0
- package/dist/client/static/js/vitesse-dark-5ypr9e1f.js +1 -0
- package/dist/client/static/js/vitesse-light-sze15mny.js +1 -0
- package/dist/client/static/js/vue-y8bb5f3h.js +1 -0
- package/dist/client/static/js/wardley-WFR3VGLG-x9v91the.js +1 -0
- package/dist/client/static/js/wardleyDiagram-VNRHLVJA-55ps9s4z.js +78 -0
- package/dist/client/static/js/xml-7bgz40qa.js +1 -0
- package/dist/client/static/js/xml-f6syr877.js +1 -0
- package/dist/client/static/js/xychartDiagram-PMCCYNJV-8bsjtm4t.js +7 -0
- package/dist/client/static/js/yaml-4ht9416k.js +1 -0
- package/dist/client/static/js/yaml-qwwswzvs.js +1 -0
- package/dist/client/static/js/zig-yf26r6vn.js +1 -0
- package/package.json +5 -2
- package/src/client/App.tsx +16 -0
- package/src/client/components/common/anchored-menu/index.test.tsx +3 -3
- package/src/client/components/common/anchored-menu/index.tsx +10 -16
- package/src/client/components/common/command-palette/ChordHint.tsx +36 -0
- package/src/client/components/common/command-palette/index.test.tsx +126 -0
- package/src/client/components/common/command-palette/index.tsx +216 -0
- package/src/client/components/common/context-usage-button/index.tsx +26 -17
- package/src/client/components/common/key-binding-cheatsheet/index.tsx +147 -0
- package/src/client/components/common/server-control/Panel.tsx +8 -9
- package/src/client/components/common/session-actions-menu/index.test.tsx +26 -0
- package/src/client/components/common/session-actions-menu/index.tsx +19 -15
- package/src/client/components/common/session-row/RunElapsed.tsx +50 -0
- package/src/client/components/common/session-row/TimeCell.tsx +38 -0
- package/src/client/components/common/session-row/TrailingSlot.tsx +26 -12
- package/src/client/components/common/session-row/index.tsx +5 -0
- package/src/client/components/common/session-row/session-row.test.tsx +26 -1
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +2 -0
- package/src/client/components/layout/desktop-layout/index.tsx +2 -2
- package/src/client/components/layout/session-sidebar/CategoryItem.tsx +2 -1
- package/src/client/components/layout/session-sidebar/Footer.tsx +13 -2
- package/src/client/components/layout/session-sidebar/SessionItem.test.ts +17 -0
- package/src/client/components/layout/session-sidebar/SessionItem.tsx +13 -7
- package/src/client/components/layout/session-sidebar/modern/WorkspaceSection.tsx +2 -1
- package/src/client/components/mobile/SessionSidebar.tsx +2 -0
- package/src/client/components/mobile/mobile-main-view/Header.test.tsx +122 -0
- package/src/client/components/mobile/mobile-main-view/Header.tsx +25 -26
- package/src/client/components/mobile/mobile-session-sidebar/Footer.tsx +11 -1
- package/src/client/components/mobile/mobile-session-sidebar/Item.tsx +2 -1
- package/src/client/components/mobile/mobile-session-sidebar/SessionRow.tsx +10 -5
- package/src/client/components/settings/Modal.tsx +3 -0
- package/src/client/components/settings/Sidebar.tsx +3 -2
- package/src/client/components/settings/categories/ChatSettings.test.tsx +2 -2
- package/src/client/components/settings/categories/ChatSettings.tsx +0 -2
- package/src/client/components/settings/categories/KeyboardSettings.tsx +31 -0
- package/src/client/components/settings/categories/NotificationSettings.tsx +9 -0
- package/src/client/components/settings/categories/SkillCatalogSettings.tsx +34 -16
- package/src/client/components/settings/categories/SkillSettings.tsx +22 -1
- package/src/client/components/settings/categories/chat-settings/groups.ts +2 -11
- package/src/client/components/settings/categories/{chat-settings/KeybindingsSection.tsx → keyboard-settings/ComposerKeys.tsx} +2 -2
- package/src/client/components/settings/categories/keyboard-settings/KeyRecorder.tsx +106 -0
- package/src/client/components/settings/categories/keyboard-settings/ShortcutTable.tsx +137 -0
- package/src/client/components/settings/categories/skill-catalog/GitImportPanel.tsx +13 -41
- package/src/client/components/settings/categories/skill-catalog/SkillCard.tsx +1 -1
- package/src/client/components/settings/categories/skill-catalog/catalog-ui.test.tsx +3 -6
- package/src/client/components/settings/categories/skill-settings/DetailHeader.tsx +43 -2
- package/src/client/components/settings/categories/skill-settings/DetailPane.tsx +9 -0
- package/src/client/components/settings/categories/skill-settings/pane.test.tsx +28 -0
- package/src/client/components/settings/categories/skill-settings/row-meta.ts +3 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.tsx +38 -5
- package/src/client/components/workspace/chat-timeline/chat-input/AttachmentToolbar.wait.test.tsx +158 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +28 -33
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +24 -67
- package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.search.test.tsx +4 -2
- package/src/client/components/workspace/chat-timeline/chat-input/WaitingDependencyPicker.tsx +101 -78
- package/src/client/components/workspace/chat-timeline/chat-input/props.ts +3 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Eval.test.tsx +20 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/panels/Eval.tsx +5 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolScreenshots.test.tsx +113 -0
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolScreenshots.tsx +198 -0
- package/src/client/components/workspace/editor/Body.tsx +0 -15
- package/src/client/components/workspace/editor/FileDocument.tsx +0 -26
- package/src/client/components/workspace/editor/FilePane.tsx +0 -15
- package/src/client/components/workspace/editor/Pane.tsx +4 -1
- package/src/client/components/workspace/editor/index.tsx +5 -8
- package/src/client/hooks/chat/omp/session-list.test.ts +13 -0
- package/src/client/hooks/chat/omp/session-list.tsx +33 -8
- package/src/client/hooks/chat/waiting/composer-wait.ts +2 -2
- package/src/client/hooks/commands/use-command-catalog.ts +52 -0
- package/src/client/hooks/commands/use-command-context.ts +21 -0
- package/src/client/hooks/commands/use-command-runtime.test.ts +117 -0
- package/src/client/hooks/commands/use-command-runtime.ts +62 -0
- package/src/client/hooks/commands/use-overlays.ts +35 -0
- package/src/client/hooks/commands/use-palette-items.ts +156 -0
- package/src/client/hooks/commands/use-plugin-commands.ts +69 -0
- package/src/client/hooks/editor/find-harness.test-util.ts +20 -3
- package/src/client/hooks/editor/use-editor-command-target.ts +46 -0
- package/src/client/hooks/editor/use-editor-find.test.ts +4 -9
- package/src/client/hooks/editor/use-editor-panel-keys.ts +24 -93
- package/src/client/hooks/editor/use-editor-panel-ui.ts +0 -10
- package/src/client/hooks/settings/skill-catalog.ts +3 -3
- package/src/client/hooks/settings/skill-git-import.ts +3 -11
- package/src/client/hooks/ui/icon-style.ts +10 -5
- package/src/client/hooks/ui/notification-events.test.ts +126 -0
- package/src/client/hooks/ui/notification-events.ts +61 -0
- package/src/client/hooks/ui/second-tick.ts +55 -0
- package/src/client/hooks/ui/theme.ts +9 -5
- package/src/client/hooks/workspace/commands.ts +51 -0
- package/src/client/lib/commands/context.ts +51 -0
- package/src/client/lib/commands/dispatcher.ts +101 -0
- package/src/client/lib/commands/editor-target.ts +36 -0
- package/src/client/lib/commands/keymap.test.ts +68 -0
- package/src/client/lib/commands/keymap.ts +151 -0
- package/src/client/lib/commands/overlays.ts +87 -0
- package/src/client/lib/commands/registry.ts +69 -0
- package/src/client/lib/notifications/os.test.ts +24 -0
- package/src/client/lib/notifications/os.ts +16 -0
- package/src/client/lib/notifications/watch.ts +48 -0
- package/src/client/lib/plugins/slots.ts +1 -0
- package/src/client/main.tsx +7 -0
- package/src/client/tailwind.css +5 -38
- package/src/server/db.server.test.ts +10 -4
- package/src/server/index.ts +12 -8
- package/src/server/lib/assets/theme-css.server.test.ts +58 -0
- package/src/server/lib/assets/theme-css.server.ts +52 -0
- package/src/server/lib/auth/guard.ts +6 -1
- package/src/server/lib/browser/runtime.test.ts +21 -16
- package/src/server/lib/db/client.test.ts +89 -0
- package/src/server/lib/db/client.ts +31 -0
- package/src/server/lib/db/compact-chat-overlay.ts +7 -1
- package/src/server/lib/db/schema.ts +4 -0
- package/src/server/lib/db/workspace-sync.ts +7 -7
- package/src/server/lib/harness/acp/session-permissions.ts +4 -0
- package/src/server/lib/lifecycle/fd-pressure.test.ts +43 -0
- package/src/server/lib/lifecycle/fd-pressure.ts +38 -0
- package/src/server/lib/lifecycle/listener.ts +4 -4
- package/src/server/lib/lifecycle/shell-entry.server.ts +29 -0
- package/src/server/lib/lifecycle/shell-route.ts +5 -4
- package/src/server/lib/notifications/feed.server.test.ts +127 -0
- package/src/server/lib/notifications/feed.server.ts +195 -0
- package/src/server/lib/notifications/schema.server.ts +47 -0
- package/src/server/lib/notifications/store.server.test.ts +118 -0
- package/src/server/lib/notifications/store.server.ts +103 -0
- package/src/server/lib/observer-ws.test.ts +49 -0
- package/src/server/lib/observer-ws.ts +2 -1
- package/src/server/lib/omp/config/definitions.test.ts +17 -18
- package/src/server/lib/omp/config/skills-catalog.ts +109 -73
- package/src/server/lib/omp/config/skills-git-repo.ts +10 -12
- package/src/server/lib/omp/rpc/frame-fold-frames.test.ts +2 -0
- package/src/server/lib/omp/rpc/manager.ts +4 -1
- package/src/server/lib/omp/rpc/run-model.test.ts +2 -0
- package/src/server/lib/omp/session/sidebar-data.server.ts +1 -0
- package/src/server/lib/realtime/hub.server.test.ts +27 -1
- package/src/server/lib/realtime/hub.server.ts +6 -2
- package/src/server/lib/realtime/hub.types.ts +9 -1
- package/src/server/lib/realtime/topics/catalog.server.ts +5 -0
- package/src/server/lib/realtime/topics/peer-relay.server.test.ts +27 -14
- package/src/server/lib/realtime/topics.server.test.ts +2 -1
- package/src/server/plugins/shell.server.test.ts +4 -4
- package/src/server/plugins/shell.server.ts +83 -22
- package/src/server/plugins/ssr.ts +13 -11
- package/src/server/plugins/static.ts +5 -7
- package/src/server/routes/health/probe.ts +7 -8
- package/src/server/routes/index.ts +2 -0
- package/src/server/routes/notifications/index.ts +6 -0
- package/src/server/routes/notifications/stream.test.ts +116 -0
- package/src/server/routes/notifications/stream.ts +88 -0
- package/src/server/routes/settings/skills-catalog-actions.ts +11 -31
- package/src/server/routes/settings/skills.test.ts +14 -0
- package/src/server/routes/settings/skills.ts +29 -21
- package/src/shared/lib/code/highlight-cache.test.ts +19 -8
- package/src/shared/lib/commands/catalog.ts +114 -0
- package/src/shared/lib/commands/chord.test.ts +66 -0
- package/src/shared/lib/commands/chord.ts +193 -0
- package/src/shared/lib/commands/conflicts.test.ts +43 -0
- package/src/shared/lib/commands/conflicts.ts +53 -0
- package/src/shared/lib/commands/record.test.ts +24 -0
- package/src/shared/lib/commands/record.ts +44 -0
- package/src/shared/lib/commands/resolve.test.ts +54 -0
- package/src/shared/lib/commands/resolve.ts +45 -0
- package/src/shared/lib/commands/score.test.ts +41 -0
- package/src/shared/lib/commands/score.ts +53 -0
- package/src/shared/lib/commands/types.ts +60 -0
- package/src/shared/lib/commands/user-keybindings.test.ts +33 -0
- package/src/shared/lib/commands/user-keybindings.ts +64 -0
- package/src/shared/lib/commands/when.test.ts +46 -0
- package/src/shared/lib/commands/when.ts +221 -0
- package/src/shared/lib/icons/icon-paint-authority.test.ts +9 -0
- package/src/shared/lib/icons/icon-paint-authority.ts +25 -8
- package/src/shared/lib/notifications/events.test.ts +77 -0
- package/src/shared/lib/notifications/events.ts +104 -0
- package/src/shared/lib/omp/session/prewarm-misc.test.ts +3 -2
- package/src/shared/lib/omp/session/schema-migrations.ts +4 -0
- package/src/shared/lib/omp/session/stream-state.server.test.ts +37 -1
- package/src/shared/lib/omp/session/stream-state.server.ts +42 -5
- package/src/shared/lib/omp/skill-source.test.ts +24 -0
- package/src/shared/lib/omp/skill-source.ts +20 -0
- package/src/shared/lib/panels/slot-labels.ts +6 -1
- package/src/shared/lib/realtime/protocol.ts +11 -0
- package/src/shared/lib/theme/css.ts +11 -0
- package/src/shared/lib/ui/menu-anchor.test.ts +17 -5
- package/src/shared/lib/ui/menu-anchor.ts +22 -5
- package/src/shared/lib/workspace/refresh-cadence.test.ts +34 -1
- package/src/shared/lib/workspace/relative-time.ts +22 -0
- package/src/shared/types/realtime.ts +10 -0
- package/src/shared/types/settings/skill.ts +1 -9
- package/src/shared/types/settings/state.ts +1 -0
- package/src/shared/types/workspace.ts +5 -0
- package/src/test-support/peer-harness.ts +32 -6
- package/dist/client/static/js/index-naa91727.css +0 -1
- package/dist/client/static/js/index-r3bhgvkt.js +0 -5696
- package/src/client/components/workspace/editor/CommandPalette.test.ts +0 -242
- package/src/client/components/workspace/editor/CommandPalette.tsx +0 -138
- package/src/client/components/workspace/editor/QuickOpenModal.tsx +0 -146
- package/src/client/hooks/ui/input-required-alert.ts +0 -50
- package/src/client/hooks/ui/notifications.ts +0 -54
- package/src/client/hooks/ui/run-outcome-alert.ts +0 -48
- package/src/client/hooks/ui/ui-alert.test.ts +0 -235
- package/src/client/hooks/workspace/keybindings.ts +0 -44
- package/src/shared/lib/notifications/outcomes.test.ts +0 -96
- package/src/shared/lib/notifications/outcomes.ts +0 -64
- package/src/shared/lib/ui/mobile-overlay.ts +0 -61
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t,l}from"./index-qmh0h87h.js";import{fl}from"./index-c20a46ww.js";import"./index-ga2xdef3.js";import{Li}from"./index-0a1ekhqf.js";function Eo(e,{measure:n}){let o=e.config?.swimlane?.lineHops;if(o===!1)return;let s=o==="gap"?"gap":"arc",r=e.edges.filter((i)=>Array.isArray(i.points)&&i.points.length>=2).map((i)=>({id:i.id,points:i.points,curve:i.curve,arrowTypeStart:i.arrowTypeStart,arrowTypeEnd:i.arrowTypeEnd}));fl(n.groups.edgePaths,r,{enabled:!0,jumpRadius:6,jumpStyle:s})}t(Eo,"applySwimlaneLineJumps");var mn="__swimlane_default__",ir=21,Mo=20;function bn(e){return Math.max(e.padding??Mo,Mo)}t(bn,"topLaneHorizontalPadding");function To(e){let{x:n,y:o,width:s,height:r}=e,i=e.swimlaneContentTop;if(typeof n!=="number"||typeof o!=="number"||typeof s!=="number"||typeof r!=="number"||typeof i!=="number"||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(r)||!Number.isFinite(i)||s<=0||r<=0){delete e.groupTitleRect;return}let a=o-r/2,g=Math.min(i,o+r/2),d=Math.min(ir,Math.max(0,g-a)),h=a+d;if(h<=a){delete e.groupTitleRect;return}e.groupTitleRect={left:n-s/2,right:n+s/2,top:a,bottom:h}}t(To,"assignTopLaneTitleRect");function Ro(e){let n=e.direction,o=e.nodes??=[];for(let i of e.nodes??[])if(i.isGroup&&!i.parentId){if(i.shape="swimlane",n)i.direction=n}let s=o.filter((i)=>!i.isGroup&&!i.parentId);if(s.length===0)return;let r=o.find((i)=>i.id===mn);if(!r)r={id:mn,label:"",isGroup:!0,shape:"swimlane",padding:20,look:e.config?.look,colorIndex:o.reduce((i,a)=>Math.max(i,a.colorIndex??-1),-1)+1,...n?{direction:n}:{}},o.push(r);else if(r.isGroup){if(r.shape="swimlane",n)r.direction=n}for(let i of s)i.parentId=mn}t(Ro,"prepareLayoutForSwimlanes");function wo(e){let n=new Map;for(let d of e.nodes??[])n.set(d.id,d);let o=[];for(let d of e.edges??[]){let h=typeof d.start==="string"?d.start:void 0,x=typeof d.end==="string"?d.end:void 0;if(!h||!x)continue;if(d.labelNodeId)continue;o.push({id:d.id,src:h,dst:x,ref:d})}let s=e.nodes??[],r=s.filter((d)=>d.isGroup),i=s.filter((d)=>!d.isGroup);return{nodes:[...[...r].reverse(),...i].map((d)=>d.id),edges:o,layout:e,nodeById:n}}t(wo,"toGraphView");function Ao(e,n,o,s){let{layout:r}=e,i=e.nodeById,a=s?.layerGap??100,g=s?.nodeGap??40,d=0;for(let E of n.layers){let p=0;for(let u of E){let c=i.get(u);if(!c){p++;continue}c.layer=d,c.order=p;let y=o.x[u]??p*g,v=o.y[u]??d*a;c.x=y,c.y=v,p++}d++}let h=r.nodes??[],x=new Map,m=[];for(let E of h){if(!E?.isGroup)continue;if(!E.parentId)m.push(E);let p=h.filter((M)=>M.parentId===E.id),u=1/0,c=-1/0,y=1/0,v=-1/0;for(let M of p){let T=M.x??o.x[M.id],B=M.y??o.y[M.id],C=M.width??0,I=M.height??0;if(T!=null&&B!=null)u=Math.min(u,T-C/2),c=Math.max(c,T+C/2),y=Math.min(y,B-I/2),v=Math.max(v,B+I/2)}if(u===1/0||y===1/0)E.x=E.x??0,E.y=E.y??0,E.width=E.width??0,E.height=E.height??0;else{let M=E.padding??20,T=E.parentId?M:2*bn(E),B=M,C=Math.max(0,c-u)+T,I=Math.max(0,v-y)+B,R=(u+c)/2,N=(y+v)/2;E.x=R,E.y=N,E.width=C,E.height=I,x.set(E.id,{minX:u,maxX:c,minY:y,maxY:v})}}if(m.length>0&&x.size>0){let E=1/0,p=-1/0,u=0;for(let c of m){let y=c.padding??20;if(y>u)u=y;let v=x.get(c.id);if(!v)continue;E=Math.min(E,v.minY),p=Math.max(p,v.maxY)}if(E!==1/0&&p!==-1/0){let c=Math.max(0,p-E),y=36,v=Math.max(u,36),M=c+2*v,T=(E+p)/2;for(let P of m)P.y=T,P.height=M,P.swimlaneContentTop=E;let B=[...m].sort((P,A)=>{let H=P.x??0,_=A.x??0;return H-_}),C=[],I=[],R=[];for(let P of B){let A=x.get(P.id);if(!A)continue;let H=Math.max(0,A.maxX-A.minX)+2*bn(P),_=(A.minX+A.maxX)/2;C.push(P.id),I.push(_),R.push(H)}let N=C.length;if(N>0){let P=new Map;if(N===1)P.set(C[0],R[0]);else{let A=[];for(let V=0;V<N-1;V++)A.push(I[V+1]-I[V]);let H=Array(N);H[0]=0;for(let V=0;V<N-1;V++)H[V+1]=2*A[V]-H[V];let _=0,F=Number.POSITIVE_INFINITY;for(let V=0;V<N;V++){let Z=R[V];if(V%2===0)_=Math.max(_,Z-H[V]);else F=Math.min(F,H[V]-Z)}let Y=_;if(_<=F)Y=(_+F)/2;else Y=_;for(let V=0;V<N;V++){let Z=H[V]+(V%2===0?Y:-Y),lt=Math.max(R[V],Z);P.set(C[V],lt)}}for(let A of m){let H=P.get(A.id);if(H!=null)A.width=H;To(A)}}}}}t(Ao,"writeBackToLayoutData");var cr="[EdgeLabelNodes]";function No(e){let n=[],o=[],s=new Map;for(let a of e.nodes)s.set(a.id,a);for(let a of e.edges){if(!a.label||a.label.length===0)continue;if(a.isLayoutOnly)continue;if(a.labelNodeId)continue;let g=a.start?s.get(a.start):void 0,d=a.end?s.get(a.end):void 0;if(!g||!d){l.warn(cr,`Edge ${a.id} has missing source or target node`);continue}let h=`edge-label-${a.start}-${a.end}-${a.id}`,m=g.parentId!==d.parentId?d.parentId:g.parentId,E={id:h,label:a.label,edgeStart:a.start??"",edgeEnd:a.end??"",shape:"labelRect",width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:m,isGroup:!1,labelStyle:Array.isArray(a.labelStyle)?a.labelStyle[0]:a.labelStyle??"",...g.dir?{dir:g.dir}:{}};n.push(E),a.labelNodeId=h,a.label=void 0,a.text=void 0;let p={id:`${a.id}-to-label`,start:a.start,end:h,type:"normal",isLayoutOnly:!0},u={id:`${a.id}-from-label`,start:h,end:a.end,type:"normal",isLayoutOnly:!0};o.push(p,u)}let r=[...e.nodes,...n],i=[...e.edges,...o];return{...e,nodes:r,edges:i}}t(No,"createEdgeLabelNodes");var Dt=0.001;function qn(e){let n=e.x??0,o=e.y??0,s=e.width??0,r=e.height??0;return s>0&&r>0?{cx:n,cy:o,rect:we(n,o,s,r)}:void 0}t(qn,"measuredNodeRect");function Zn(e){if(e.isGroup)return;let n=qn(e);if(!n)return;return{id:String(e.id??""),cx:n.cx,cy:n.cy,rect:n.rect}}t(Zn,"nodeBoundsInfoFor");function re(e,n,o=Dt){return Math.abs(e.x-n.x)<o&&Math.abs(e.y-n.y)<o}t(re,"samePoint");function ht(e,n,o=Dt){return Math.abs(e.x-n.x)<o}t(ht,"sameX");function mt(e,n,o=Dt){return Math.abs(e.y-n.y)<o}t(mt,"sameY");function wt(e,n,o=Dt){return mt(e,n,o)&&Math.abs(e.x-n.x)>o}t(wt,"isHorizontalSegment");function At(e,n,o=Dt){return ht(e,n,o)&&Math.abs(e.y-n.y)>o}t(At,"isVerticalSegment");function Ut(e,n,o,s){return Math.max(0,Math.min(Math.max(e,n),Math.max(o,s))-Math.max(Math.min(e,n),Math.min(o,s)))}t(Ut,"overlapLength");function ae(e,n,o=Dt){if(e.horizontal&&n.horizontal&&mt(e.a,n.a,o))return Ut(e.a.x,e.b.x,n.a.x,n.b.x);if(e.vertical&&n.vertical&&ht(e.a,n.a,o))return Ut(e.a.y,e.b.y,n.a.y,n.b.y);return 0}t(ae,"sameAxisSegmentOverlapLength");function Ae(e,n=Dt){let o=[];for(let s=0;s<e.length-1;s++){let r=e[s],i=e[s+1],a=wt(r,i,n),g=At(r,i,n);if(a||g)o.push({index:s,a:r,b:i,horizontal:a,vertical:g})}return o}t(Ae,"orthogonalSegmentsForPoints");function ee(e,n=Dt){let o=Ae(e,n),s=0;for(let r=1;r<o.length;r++)if(o[r-1].horizontal!==o[r].horizontal)s++;return s}t(ee,"countOrthogonalBends");function yt(e,n=Dt){let o=[];for(let s of e){let r=o.length>0?o[o.length-1]:void 0;if(!r||!re(r,s,n))o.push({x:s.x,y:s.y})}return o}t(yt,"dedupeConsecutivePoints");function Jn(e,n=Dt){if(!e||e.length!==4)return;let[o,s,r,i]=e;if(wt(o,s,n)&&At(s,r,n)&&wt(r,i,n))return{kind:"HVH",p0:o,p1:s,p2:r,p3:i};return At(o,s,n)&&wt(s,r,n)&&At(r,i,n)?{kind:"VHV",p0:o,p1:s,p2:r,p3:i}:void 0}t(Jn,"classifyThreeSegmentRoute");function tn(e,n,o,s=0){let r=Math.min(e.x,n.x),i=Math.max(e.x,n.x),a=Math.min(e.y,n.y),g=Math.max(e.y,n.y);return i>o.left-s&&r<o.right+s&&g>o.top-s&&a<o.bottom+s}t(tn,"segmentBoundsOverlapRect");function Qn(e,n,o=0){return e.x>n.left+o&&e.x<n.right-o&&e.y>n.top+o&&e.y<n.bottom-o}t(Qn,"pointInsideRect");function Oo(e,n){return e.left<=n.left&&e.right>=n.right&&e.top<=n.top&&e.bottom>=n.bottom}t(Oo,"rectContainsRect");function Ve(e,n){return e.left<n.right&&e.right>n.left&&e.top<n.bottom&&e.bottom>n.top}t(Ve,"rectsOverlap");function In(e,n){return{left:e.left-n,right:e.right+n,top:e.top-n,bottom:e.bottom+n}}t(In,"inflateRect");function we(e,n,o,s){return{left:e-o/2,right:e+o/2,top:n-s/2,bottom:n+s/2}}t(we,"rectFromCenterSize");function Jt(e){return qn(e)?.rect}t(Jt,"rectOfNodeBounds");function Se(e,n){switch(n){case"top":return{x:e.cx,y:e.rect.top};case"bottom":return{x:e.cx,y:e.rect.bottom};case"left":return{x:e.rect.left,y:e.cy};case"right":return{x:e.rect.right,y:e.cy}}}t(Se,"portForRectSide");function to(e,n,o,s,r,i=Dt){let a=n==="left"||n==="right",g=s==="left"||s==="right";if(a&&g){if(n==="right"&&s==="left"&&e.x<o.x||n==="left"&&s==="right"&&e.x>o.x){if(mt(e,o,i))return[e,o];let m=(e.x+o.x)/2;return[e,{x:m,y:e.y},{x:m,y:o.y},o]}if(n===s){if(mt(e,o,i))return;let m=n==="left"?Math.min(e.x,o.x)-r:Math.max(e.x,o.x)+r;return[e,{x:m,y:e.y},{x:m,y:o.y},o]}return}if(!a&&!g){if(n===s){if(ht(e,o,i))return;let E=n==="top"?Math.min(e.y,o.y)-r:Math.max(e.y,o.y)+r;return[e,{x:e.x,y:E},{x:o.x,y:E},o]}if(!(n==="bottom"&&s==="top"&&e.y<o.y||n==="top"&&s==="bottom"&&e.y>o.y))return;if(ht(e,o,i))return[e,o];let m=(e.y+o.y)/2;return[e,{x:e.x,y:m},{x:o.x,y:m},o]}if(a&&!g){let x=n==="right"&&o.x>e.x||n==="left"&&o.x<e.x,m=s==="top"&&e.y<o.y||s==="bottom"&&e.y>o.y;return x&&m?[e,{x:o.x,y:e.y},o]:void 0}let d=n==="bottom"&&o.y>e.y||n==="top"&&o.y<e.y,h=s==="left"&&e.x<o.x||s==="right"&&e.x>o.x;return d&&h?[e,{x:e.x,y:o.y},o]:void 0}t(to,"buildOrthogonalPortPath");function eo(e,n,o,s){return n==="left"||n==="right"?[e,{x:s,y:e.y},{x:s,y:o.y},o]:[e,{x:e.x,y:s},{x:o.x,y:s},o]}t(eo,"buildSameSideTrackPath");function en(e){let n=new Map,o=[];for(let s of e){if(s.isEdgeLabel)continue;let r=Zn(s);if(!r)continue;n.set(r.id,r),o.push({id:r.id,rect:r.rect})}return{nodeInfoById:n,realNodeRects:o}}t(en,"collectRealNodeBounds");function ye(e){let n=[],o=[];for(let s of e){let r=Zn(s);if(!r)continue;let i={id:r.id,rect:r.rect};if(s.isEdgeLabel)o.push(i);else n.push(i)}return{realNodeRects:n,labelNodeRects:o}}t(ye,"collectNodeRectEntries");function Bo(e,{includeEdgeLabels:n=!0}={}){let o=[];for(let s of e){if(s.isGroup||!n&&s.isEdgeLabel)continue;let r=s.x??0,i=s.y??0,a=s.width??0,g=s.height??0;o.push({nodeId:s.id,...we(r,i,a,g)})}return o}t(Bo,"collectLayoutNodeRects");function no(e,n,o=Dt){let{start:s,end:r}=e;if(!s||!r)return;let i=n.get(s),a=n.get(r);if(!i||!a)return;return{srcId:s,dstId:r,srcInfo:i,dstInfo:a,collinearX:Math.abs(i.cx-a.cx)<o,collinearY:Math.abs(i.cy-a.cy)<o}}t(no,"getNodePairGeometry");function Nt(e,n,o,s=[],r=0){for(let i of o){if(s.includes(i.id))continue;if(tn(e,n,i.rect,-r))return!0}return!1}t(Nt,"segmentHitsAnyRect");function oo(e,n,o,s,r=Dt,i=0.000001){let a=mt(e,n,r),g=ht(e,n,r),d=mt(o,s,r),h=ht(o,s,r);if(a&&d||g&&h)return!1;if(!(a||g)||!(d||h))return!1;let x=a?{a:e,b:n}:{a:o,b:s},m=g?{a:e,b:n}:{a:o,b:s},E=x.a.y,p=Math.min(x.a.x,x.b.x),u=Math.max(x.a.x,x.b.x),c=m.a.x,y=Math.min(m.a.y,m.b.y),v=Math.max(m.a.y,m.b.y);if(c<p||c>u||E<y||E>v)return!1;let M=Math.abs(c-x.a.x)<i&&Math.abs(E-x.a.y)<i||Math.abs(c-x.b.x)<i&&Math.abs(E-x.b.y)<i,T=Math.abs(c-m.a.x)<i&&Math.abs(E-m.a.y)<i||Math.abs(c-m.b.x)<i&&Math.abs(E-m.b.y)<i;return!(M&&T)}t(oo,"orthogonalSegmentsCross");function Fo(e,n,o,s,r=Dt){let i=mt(e,n,r),a=ht(e,n,r),g=mt(o,s,r),d=ht(o,s,r);if(a&&d&&ht(e,o,r))return Ut(e.y,n.y,o.y,s.y)>r;if(i&&g&&mt(e,o,r))return Ut(e.x,n.x,o.x,s.x)>r;return!1}t(Fo,"sameAxisSegmentsOverlap");function Ue(e,n,o,s,{epsilon:r=Dt,skipDegenerateOther:i=!1}={}){for(let a of o){if(a===s||a.isLayoutOnly)continue;let g=a.points;if(!g||g.length<2)continue;for(let d=0;d<g.length-1;d++){let h=g[d],x=g[d+1];if(i&&re(h,x,r))continue;if(oo(e,n,h,x,r)||Fo(e,n,h,x,r))return!0}}return!1}t(Ue,"segmentConflictsWithAnyEdge");function fe(e,n,o,s,r=Dt){let i=mt(e,n,r),a=ht(e,n,r),g=mt(o,s,r),d=ht(o,s,r);if(!(i&&d||a&&g))return!1;let h=i?{a:e,b:n}:{a:o,b:s},x=i?{a:o,b:s}:{a:e,b:n},m=h.a.y,E=Math.min(h.a.x,h.b.x),p=Math.max(h.a.x,h.b.x),u=x.a.x,c=Math.min(x.a.y,x.b.y),y=Math.max(x.a.y,x.b.y);return u>E+r&&u<p-r&&m>c+r&&m<y-r}t(fe,"orthogonalSegmentsStrictlyCross");function Mn(e,n,o){let s=Math.min(n,o),r=Math.max(n,o);return e>s+Dt&&e<r-Dt}t(Mn,"strictlyBetween");function Po(e,n,o){if(ht(e,n)&&ht(n,o))return Mn(n.y,e.y,o.y);if(mt(e,n)&&mt(n,o))return Mn(n.x,e.x,o.x);return!1}t(Po,"isCollinearIntermediate");function ko(e){let n=!1,o=[];for(let s=0;s<e.length;s++){let r=o[o.length-1],i=e[s],a=s+1<e.length?e[s+1]:void 0;if(r&&a){if(re(r,a)){s++,n=!0;continue}if(Po(r,i,a)){n=!0;continue}}o.push(i)}return{points:o,changed:n}}t(ko,"simplifyPolylineOnce");function je(e){let n=[e[0]];for(let s=1;s<e.length;s++){let r=n[n.length-1],i=e[s];if(!ht(r,i)&&!mt(r,i)){let a=n.length>=2?n[n.length-2]:void 0,d=(a?ht(a,r):!1)?{x:r.x,y:i.y}:{x:i.x,y:r.y};n.push(d)}n.push(i)}let o=[];for(let s of n){let r=o[o.length-1];if(!r||!re(r,s))o.push(s)}return o}t(je,"orthogonalizePolyline");function le(e){if(e.length<3)return e;let n=[...e];for(let o=0;o<32;o++){let s=ko(n);if(n=s.points,!s.changed)break}return n}t(le,"simplifyPolyline");var st=0.001,ar=0.5,So=4;function so(e,n,o){let s=e;if(s.isLayoutOnly||!s.points||s.points.length<o)return;let r=s.start?n.get(s.start):void 0,i=s.end?n.get(s.end):void 0;return{edge:s,points:s.points,srcRect:r?Jt(r):void 0,dstRect:i?Jt(i):void 0}}t(so,"endpointContextFor");function _o(e,n,o){if(mt(e,n,st))return{x:e.x<o.left?o.left:o.right,y:e.y};if(ht(e,n,st)){let s=e.y<o.top?o.top:o.bottom;return{x:e.x,y:s}}return{x:Math.min(o.right,Math.max(o.left,e.x)),y:Math.min(o.bottom,Math.max(o.top,e.y))}}t(_o,"segmentEnterPoint");function Sn(e,n,o){let s=o?1:-1,r=o?0:e.length-1;while(r>=0&&r<e.length&&Qn(e[r],n,ar))r+=s;if(r<0||r>=e.length)return e;let i=r-s;if(i<0||i>=e.length)return e;let a=_o(e[r],e[i],n);return o?[a,...e.slice(r)]:[...e.slice(0,r+1),a]}t(Sn,"clipEndpoint");function Ho(e,n){for(let o of e){let s=so(o,n,2);if(!s)continue;let r=[...s.points];if(s.srcRect)r=Sn(r,s.srcRect,!0);if(s.dstRect)r=Sn(r,s.dstRect,!1);r=le(je(r)),r=ro(r,s.srcRect,s.dstRect),s.edge.points=le(je(r))}}t(Ho,"clipEdgeEndpointsToNodeBoundaries");function Cn(e,n,o,s=!1){if(mt(e,n,st)){if(n.y<o.top-st||n.y>o.bottom+st)return n;if(s){if(e.x<o.left-st)return{x:o.left,y:e.y};if(e.x>o.right+st)return{x:o.right,y:e.y}}return{x:Math.abs(n.x-o.left)<=Math.abs(n.x-o.right)?o.left:o.right,y:e.y}}if(ht(e,n,st)){if(n.x<o.left-st||n.x>o.right+st)return n;if(s){if(e.y<o.top-st)return{x:e.x,y:o.top};if(e.y>o.bottom+st)return{x:e.x,y:o.bottom}}let r=Math.abs(n.y-o.top)<=Math.abs(n.y-o.bottom);return{x:e.x,y:r?o.top:o.bottom}}return n}t(Cn,"snapEndpointToBoundary");function We(e,n,o){let s=e[n];for(let r=n+o;r>=0&&r<e.length;r+=o){let i=e[r];if(!re(i,s,st))return i}return e[n+o]}t(We,"firstDistinctAdjacent");function Ke(e,n){let o=e+So,s=n-So;return o<=s?{lo:o,hi:s}:{lo:(e+n)/2,hi:(e+n)/2}}t(Ke,"cornerClearanceRange");function vn(e,n,o){let{lo:s,hi:r}=Ke(n,o);return Math.min(r,Math.max(s,e))}t(vn,"clampToCornerClearance");function Do(e){let n=Math.max(...e.map((s)=>s.lo)),o=Math.min(...e.map((s)=>s.hi));if(n>o)return;return{lo:n,hi:o}}t(Do,"intersectRanges");function Ln(e,n){return n==="left"||n==="right"?Ke(e.top,e.bottom):Ke(e.left,e.right)}t(Ln,"clearanceRangeForSide");function qe(e,n,o){let s=e.y>=o.top-st&&e.y<=o.bottom+st,r=e.x>=o.left-st&&e.x<=o.right+st;if(mt(e,n,st)&&s){if(Math.abs(e.x-o.left)<st)return"left";if(Math.abs(e.x-o.right)<st)return"right"}if(ht(e,n,st)&&r){if(Math.abs(e.y-o.top)<st)return"top";if(Math.abs(e.y-o.bottom)<st)return"bottom"}return}t(qe,"terminalSideForSegment");function Oe(e){return e==="left"||e==="right"}t(Oe,"isHorizontalSide");function Xo(e,n,o,s,r){let i=[],a=o?qe(e,n,o):void 0,g=s?qe(n,e,s):void 0;if(o&&a&&Oe(a)===r)i.push(Ln(o,a));if(s&&g&&Oe(g)===r)i.push(Ln(s,g));return i.length>0?Do(i):void 0}t(Xo,"straightClearanceRange");function En(e,n,o,s,r){let i=Xo(e,n,o,s,r);if(!i)return;let a=r?e.y:e.x,g=Math.min(i.hi,Math.max(i.lo,a));if(Math.abs(g-a)<st)return;return r?[{x:e.x,y:g},{x:n.x,y:g}]:[{x:g,y:e.y},{x:g,y:n.y}]}t(En,"clearStraightEndpointCornerAxis");function ro(e,n,o){if(e.length!==2)return e;let[s,r]=e;if(mt(s,r,st))return En(s,r,n,o,!0)??e;if(ht(s,r,st))return En(s,r,n,o,!1)??e;return e}t(ro,"clearStraightEndpointCornerConnections");function Yo(e,n,o){return Oe(o)?{x:e.x,y:vn(e.y,n.top,n.bottom)}:{x:vn(e.x,n.left,n.right),y:e.y}}t(Yo,"cornerClearedEndpoint");function Go(e,n,o,s,r,i){let a=e.map((g)=>({...g}));for(let g=n;g>=0&&g<e.length;g+=o){let d=e[g];if(i&&!mt(d,s,st))break;if(!i&&!ht(d,s,st))break;if(i)a[g].y=r.y;else a[g].x=r.x}return a}t(Go,"moveCollinearEndpointRun");function Tn(e,n,o){if(e.length<2)return e;let s=o?0:e.length-1,r=o?1:-1,i=e[s],a=We(e,s,r);if(!a)return e;let g=qe(i,a,n);if(!g)return e;let d=Oe(g),h=Yo(i,n,g);if(re(i,h,st))return e;return Go(e,s,r,i,h,d)}t(Tn,"clearEndpointCornerConnection");function Rn(e,n,o){let s=Math.min(e.x,n.x)>=o.left-st&&Math.max(e.x,n.x)<=o.right+st,r=Math.min(e.y,n.y)>=o.top-st&&Math.max(e.y,n.y)<=o.bottom+st;if(Math.abs(e.y-o.top)<st&&Math.abs(n.y-o.top)<st&&s)return"top";if(Math.abs(e.y-o.bottom)<st&&Math.abs(n.y-o.bottom)<st&&s)return"bottom";if(Math.abs(e.x-o.left)<st&&Math.abs(n.x-o.left)<st&&r)return"left";if(Math.abs(e.x-o.right)<st&&Math.abs(n.x-o.right)<st&&r)return"right";return}t(Rn,"borderSideForSegment");function wn(e,n,o,s){switch(e){case"top":return ht(n,o,st)&&o.y<s.top-st;case"bottom":return ht(n,o,st)&&o.y>s.bottom+st;case"left":return mt(n,o,st)&&o.x<s.left-st;case"right":return mt(n,o,st)&&o.x>s.right+st}}t(wn,"leavesOutward");function An(e,n,o){if(e.length<3)return e;if(o){let i=Rn(e[0],e[1],n);if(i&&wn(i,e[1],e[2],n))return e.slice(1);return e}let s=e.length-1,r=Rn(e[s-1],e[s],n);if(r&&wn(r,e[s-1],e[s-2],n))return e.slice(0,s);return e}t(An,"collapseOwnBorderStub");function zo(e,n,o){let s=e;if(n){let i=We(s,0,1);if(i){let a=Cn(i,s[0],n);if(a!==s[0])s=[a,...s.slice(1)]}s=An(s,n,!0)}if(o){let i=s.length-1,a=We(s,i,-1);if(a){let g=Cn(a,s[i],o,!0);if(g!==s[i])s=[...s.slice(0,i),g]}s=An(s,o,!1)}let r=ro(s,n,o);if(r!==s||s.length===2)return r;if(n)s=Tn(s,n,!0);if(o)s=Tn(s,o,!1);return s}t(zo,"snapAndCollapseEndpoints");function Nn(e,n){for(let o of e){let s=so(o,n,2);if(!s)continue;let r=yt(s.points,st),i=zo(r,s.srcRect,s.dstRect);if(i.length<3){s.edge.points=i;continue}let a=[i[0],{...i[0]},...i.slice(1,-1),i[i.length-1],{...i[i.length-1]}];s.edge.points=a}}t(Nn,"prepareEdgeEndpointsForRenderer");function io(e){return new Map(e.map((n)=>[n.id,n]))}t(io,"buildNodeMap");function $o(e,n){let o=e.parentId,s=null;while(o){let r=n.get(o);if(!r?.isGroup)break;s=r.id,o=r.parentId}return s}t($o,"resolveTopLevelGroupId");function On(e,n){let o=0,s=e.parentId;while(s){let r=n.get(s);if(!r?.isGroup)break;o++,s=r.parentId}return o}t(On,"groupDepth");function co(e){let n=1/0,o=-1/0,s=1/0,r=-1/0;for(let i of e){let{x:a,y:g}=i;if(typeof a!=="number"||typeof g!=="number")continue;let d=i.width??0,h=i.height??0;n=Math.min(n,a-d/2),o=Math.max(o,a+d/2),s=Math.min(s,g-h/2),r=Math.max(r,g+h/2)}if(n===1/0||s===1/0)return null;return{minX:n,maxX:o,minY:s,maxY:r}}t(co,"boundsForChildren");function Vo(e,n){let o=e.padding??20;e.x=(n.minX+n.maxX)/2,e.y=(n.minY+n.maxY)/2,e.width=Math.max(0,n.maxX-n.minX)+o,e.height=Math.max(0,n.maxY-n.minY)+o}t(Vo,"applyGroupBounds");function Uo(e){let n=io(e),o=e.filter((s)=>s.isGroup&&s.parentId).sort((s,r)=>On(r,n)-On(s,n));for(let s of o){let r=e.filter((a)=>a.parentId===s.id),i=co(r);if(i)Vo(s,i)}}t(Uo,"recomputeNestedGroupBounds");function Ze(e,n){let o=e.nodes??[],s=e.edges??[],r=o.filter((d)=>!d.isGroup),i=1/0,a=-1/0;for(let d of r){let h=d[n];if(typeof h!=="number")continue;i=Math.min(i,h),a=Math.max(a,h)}if(!Number.isFinite(i)||!Number.isFinite(a))return!1;let g=t((d)=>i+a-d,"mirror");for(let d of o){let h=d[n];if(typeof h==="number")d[n]=g(h);let x=d.groupTitleRect;if(x)d.groupTitleRect=n==="x"?{...x,left:g(x.right),right:g(x.left)}:{...x,top:g(x.bottom),bottom:g(x.top)}}for(let d of s)for(let h of d.points??[])h[n]=g(h[n]);return!0}t(Ze,"mirrorAxis");function jo(e){if(!(e.nodes??[]).some((o)=>!o.isGroup))return!0;return Ze(e,"y")}t(jo,"applyBtDirectionTransform");function Wo(e,n="LR"){let o=e.nodes??[],s=e.edges??[],r=o.filter((F)=>!F.isGroup),i=1/0,a=1/0;for(let F of r){let Y=F.x??0,V=F.y??0;if(Y<i)i=Y;if(V<a)a=V}if(!Number.isFinite(i)||!Number.isFinite(a))return!1;let g=36,d=0,h=0;for(let F of r)d+=F.width??0,h+=F.height??0;let x=d/r.length,m=h/r.length,E=m>0?Math.max(1,x/m):1;for(let F of r){let Y=F.x??0,Z=((F.y??0)-a)*E+g,lt=Y-i;F.x=Z,F.y=lt}for(let F of s){if(!F.points)continue;for(let Y of F.points){let V=Y.x,lt=(Y.y-a)*E+g,xt=V-i;Y.x=lt,Y.y=xt}}Uo(o);let p=o.filter((F)=>F.isGroup&&!F.parentId);if(p.length===0){if(n==="RL")Ze(e,"x");return!0}let u=io(o),c=new Map;for(let F of o){if(F.isGroup)continue;let Y=$o(F,u);if(!Y)continue;let V=c.get(Y)??[];V.push(F),c.set(Y,V)}let y=0;for(let F of p){let Y=F.padding??0;if(Y>y)y=Y}let v=[],M=1/0,T=-1/0;for(let F of p){let Y=c.get(F.id)??[],V=co(Y);if(!V)continue;M=Math.min(M,V.minX),T=Math.max(T,V.maxX),v.push({lane:F,contentTop:V.minY,contentBottom:V.maxY,centerY:(V.minY+V.maxY)/2})}if(M===1/0||T===-1/0)return!0;let B=Math.max(0,T-M),C=Math.max(y,10),I=B+2*C,R=g+I,A=(M+T)/2-I/2-g,H=A+R/2,_=Math.max(y,g);v.sort((F,Y)=>F.centerY-Y.centerY);for(let F=0;F<v.length;F++){let Y=v[F],V,Z;if(F===0)V=Y.contentTop-_;else V=(v[F-1].contentBottom+Y.contentTop)/2;if(F===v.length-1)Z=Y.contentBottom+_;else{let Ot=v[F+1];Z=(Y.contentBottom+Ot.contentTop)/2}let lt=Math.max(0,Z-V),xt=(V+Z)/2;Y.lane.x=H,Y.lane.y=xt,Y.lane.width=R,Y.lane.height=lt,Y.lane.swimlaneContentTop=Y.contentTop,Y.lane.groupTitleRect={left:A,right:A+g,top:V,bottom:Z}}if(n==="RL")Ze(e,"x");return!0}t(Wo,"applyLrDirectionTransform");var ie=0.000001,lr=8,Xe=lr,fr=[0,Xe,-Xe,2*Xe,-2*Xe];function Ko(e,n){let{nodeInfoById:o,realNodeRects:s}=en(n);for(let r of e){if(r.isLayoutOnly)continue;let i=r.points;if(!i||i.length<4)continue;let a=Jn(yt(i,ie),ie);if(!a)continue;let{p3:g}=a,d=a.kind==="HVH",h=no(r,o,ie);if(!h)continue;let{srcId:x,dstId:m,srcInfo:E,dstInfo:p,collinearX:u,collinearY:c}=h;if(u||c)continue;let y,v=E.rect;for(let M of fr){let T,B,C;if(d){let H=p.cy>E.cy?v.bottom:v.top,_=E.cx+M;if(_<=v.left+ie||_>=v.right-ie)continue;T={x:_,y:H},B={x:_,y:g.y},C={x:g.x,y:g.y}}else{let H=p.cx>E.cx?v.right:v.left,_=E.cy+M;if(_<=v.top+ie||_>=v.bottom-ie)continue;T={x:H,y:_},B={x:g.x,y:_},C={x:g.x,y:g.y}}let I=re(T,B,ie),R=re(B,C,ie);if(I&&R)continue;if(!I&&Nt(T,B,s,[x],1))continue;if(!R&&Nt(B,C,s,[m],1))continue;let N=!I&&Ue(T,B,e,r,{epsilon:ie,skipDegenerateOther:!0}),P=!R&&Ue(B,C,e,r,{epsilon:ie,skipDegenerateOther:!0});if(N||P)continue;if(I)y=[B,C];else if(R)y=[T,B];else y=[T,B,C];break}if(y)r.points=y}}t(Ko,"portSwapToLShape");function qo(e,n){let{realNodeRects:i,labelNodeRects:a}=ye(n.values());for(let g of e){if(g.isLayoutOnly)continue;let d=g.points;if(!d||d.length<4)continue;let h=yt(d,0.001);if(h.length<4)continue;let x=h.length-1,m=h[x],E=h[x-1],p=h[x-2],u=m.x-E.x,c=m.y-E.y,y=Math.hypot(u,c);if(y>=10||y<0.001)continue;let v=E.x-p.x,M=E.y-p.y;if(Math.hypot(v,M)<0.001)continue;let B=wt(E,m,0.001),C=At(E,m,0.001),I=wt(p,E,0.001),R=At(p,E,0.001);if(!(B&&R||C&&I))continue;let{end:N,start:P}=g,A=N?n.get(N):void 0;if(!A)continue;let H=A.x??0,_=A.y??0,F=Jt(A);if(!F)continue;let Y,V;if(R){let q=M<0;Y={x:H,y:p.y},V={x:H,y:q?F.bottom:F.top}}else{let q=v>0;Y={x:p.x,y:_},V={x:q?F.right:F.left,y:_}}if(Nt(Y,V,i,N?[N]:[],-2))continue;if(Nt(Y,V,a,[],-2))continue;if(P){let q=n.get(P),ot=q?Jt(q):void 0;if(ot&&Qn(Y,ot,2))continue}let Z=t((q,ot)=>`${q.x.toFixed(3)},${q.y.toFixed(3)}|${ot.x.toFixed(3)},${ot.y.toFixed(3)}`,"ownSegmentKey"),lt=new Set;for(let q=0;q<h.length-1;q++)lt.add(Z(h[q],h[q+1]));let xt=t((q,ot)=>{for(let dt of e){if(dt===g)continue;if(dt.isLayoutOnly)continue;let pt=dt.points;if(!pt||pt.length<2)continue;for(let It=0;It<pt.length-1;It++){let Et=pt[It],jt=pt[It+1];if(lt.has(Z(Et,jt)))continue;if(fe(q,ot,Et,jt,0.001))return!0}}return!1},"segmentCrossesOtherEdge");if(xt(Y,V))continue;if(x-3>=0){let q=h[x-3],ot=[P,N].filter((dt)=>Boolean(dt));if(Nt(q,Y,i,ot,-2))continue;if(xt(q,Y))continue}let kt=[...h.slice(0,x-2),Y,V];g.points=kt;let et=g.labelNodeId;if(et){let q=n.get(et);if(q){let ot=q.width??0,dt=q.height??0;if(ot>0&&dt>0){let pt,It,Et=-1;for(let jt=0;jt<kt.length-1;jt++){let Wt=kt[jt],Kt=kt[jt+1],ne=Math.hypot(Kt.x-Wt.x,Kt.y-Wt.y),Ce=mt(Wt,Kt,0.001),ue=ht(Wt,Kt,0.001);if(!(Ce&&ne>=ot+2||ue&&ne>=dt+2))continue;if(ne>Et)Et=ne,pt=(Wt.x+Kt.x)/2,It=(Wt.y+Kt.y)/2}if(pt!==void 0&&It!==void 0)q.x=pt,q.y=It}}}}}t(qo,"collapseShortTerminalStub");var tt=0.001,Ht=8,at=Ae,pn=t((e,n)=>ht(e,n,tt)||mt(e,n,tt),"orthogonallyAligned");function Zo(e,n){let r=t((p,u)=>{let c=p.x??0,y=p.y??0,v=u.x-c,M=u.y-y,T=(p.width??0)/2,B=(p.height??0)/2;if(Math.abs(M)*T>Math.abs(v)*B){if(M<0)B=-B;return{x:c+(M===0?0:B*v/M),y:y+B}}if(v<0)T=-T;return{x:c+T,y:y+(v===0?0:T*M/v)}},"rectIntersect"),i=t((p,u)=>{let c=yt(p.points??[]);if(c.length<2)return;let y=u?p.start:p.end,v=y?n.get(y):void 0,M=v?Jt(v):void 0;if(!v||!y||!M)return;let T=u?c[0]:c[c.length-1],B=u?c[1]:c[c.length-2],C=r(v,T),I=T;if(pn(B,C))I=B;if(ht(C,I,tt))return{edge:p,edgeId:String(p.id??""),nodeId:y,atStart:u,orientation:"V",coord:C.x,min:Math.min(C.y,I.y),max:Math.max(C.y,I.y),boundary:C,railEnd:I,rect:M};if(mt(C,I,tt))return{edge:p,edgeId:String(p.id??""),nodeId:y,atStart:u,orientation:"H",coord:C.y,min:Math.min(C.x,I.x),max:Math.max(C.x,I.x),boundary:C,railEnd:I,rect:M};return},"terminalLaneFor"),a=t((p,u)=>Math.max(0,Math.min(p.max,u.max)-Math.max(p.min,u.min)),"projectedOverlapLength"),g=t((p,u)=>{if(p.nodeId!==u.nodeId||p.orientation!==u.orientation)return!1;if(p.orientation==="H")return(Math.abs(p.boundary.x-p.rect.left)<1||Math.abs(p.boundary.x-p.rect.right)<1)&&ht(p.boundary,u.boundary,1);return(Math.abs(p.boundary.y-p.rect.top)<1||Math.abs(p.boundary.y-p.rect.bottom)<1)&&mt(p.boundary,u.boundary,1)},"sameTerminalFace"),d=t((p,u)=>{if(p.nodeId!==u.nodeId||p.orientation!==u.orientation)return!1;return a(p,u)>=Ht&&Math.abs(p.coord-u.coord)<0.5},"exactTerminalLaneConflict"),h=t((p,u)=>{if(p.nodeId!==u.nodeId||p.orientation!==u.orientation||p.orientation!=="H"||p.atStart===u.atStart)return!1;let c=a(p,u);if(c<Ht)return!1;let y=p.rect.bottom-p.rect.top;if(c<y||c>2*y)return!1;return g(p,u)&&Math.abs(p.coord-u.coord)<16},"nearTerminalLaneConflict"),x=t((p,u)=>{let c=yt(p.edge.points??[]);if(c.length<2)return;let y=p.orientation==="V"?{x:p.boundary.x+u,y:p.boundary.y}:{x:p.boundary.x,y:p.boundary.y+u},v=p.orientation==="V"?{x:p.railEnd.x+u,y:p.railEnd.y}:{x:p.railEnd.x,y:p.railEnd.y+u};if(!t(()=>{if(Math.abs(p.boundary.y-p.rect.top)<1||Math.abs(p.boundary.y-p.rect.bottom)<1)return mt(y,p.boundary,tt)&&y.x>=p.rect.left+1&&y.x<=p.rect.right-1;if(Math.abs(p.boundary.x-p.rect.left)<1||Math.abs(p.boundary.x-p.rect.right)<1)return ht(y,p.boundary,tt)&&y.y>=p.rect.top+1&&y.y<=p.rect.bottom-1;return!1},"boundaryStaysOnSameFace")())return;if(p.atStart){let I=c.length>1&&re(c[1],p.railEnd,tt),R=c.slice(I?2:1),N=R[0];if(N&&!pn(N,v))return;return[y,v,...R]}let T=c.length>1&&re(c[c.length-2],p.railEnd,tt),B=c.slice(0,T?-2:-1),C=B[B.length-1];if(C&&!pn(C,v))return;return[...B,v,y]},"shiftedCandidate"),m=t((p)=>{let u=p.edge,c=yt(u.points??[]);if(c.length!==2)return!1;let{start:y,end:v}=u,M=y?n.get(y):void 0,T=v?n.get(v):void 0;if(!M||!T)return!1;let B=M.x??0,C=M.y??0,I=T.x??0,R=T.y??0,[N,P]=c;return mt(N,P,tt)&&Math.abs(C-R)<1&&Math.abs(B-I)>1||ht(N,P,tt)&&Math.abs(B-I)<1&&Math.abs(C-R)>1},"laneIsStraightCollinearConnector"),E=[-7,7,-14,14,-21,21];for(let p=0;p<8;p++){let u=e.filter((y)=>!y.isLayoutOnly).flatMap((y)=>[i(y,!0),i(y,!1)]).filter((y)=>Boolean(y)),c=!1;for(let y=0;y<u.length&&!c;y++)for(let v=y+1;v<u.length&&!c;v++){let M=u[y],T=u[v];if(M.edge===T.edge||!(d(M,T)||h(M,T)))continue;let B=!d(M,T),C=[M,T].sort((I,R)=>{let N=m(I),P=m(R);if(N!==P)return Number(N)-Number(P);return Number(!R.atStart)-Number(!I.atStart)});for(let I of C){for(let R of E){let N=x(I,R);if(!N)continue;let P=i({...I.edge,points:N},I.atStart);if(!P||u.some((A)=>A.edge!==I.edge&&(d(P,A)||B&&h(P,A))))continue;I.edge.points=N,c=!0;break}if(c)break}}if(!c)return}}t(Zo,"separateSharedRenderedTerminalLanes");function Jo(e,n){let{realNodeRects:r,labelNodeRects:i}=ye(n.values()),a=t((d,h)=>{let{start:x,end:m}=d,E=at(h);if(E.length!==h.length-1)return!1;let p=[x,m].filter((u)=>Boolean(u));for(let u of E){if(Nt(u.a,u.b,r,p,-2))return!1;if(Nt(u.a,u.b,i,[],-2))return!1}for(let u of e){if(u===d||u.isLayoutOnly)continue;let c=u.points;if(!c||c.length<2)continue;for(let y of E)for(let v of at(yt(c))){if(ae(y,v,0.5)>=Ht)return!1;if(fe(y.a,y.b,v.a,v.b,tt))return!1}}return!0},"candidateIsSafe"),g=t((d,h)=>{if(h+4>=d.length)return;let x=d[h],m=d[h+1],E=d[h+2],p=d[h+3],u=d[h+4],c=wt(x,m)&&At(m,E)&&wt(E,p)&&At(p,u)&&ht(x,p,tt)&&ht(x,u,tt)&&ht(m,E,tt)&&(m.x-x.x)*(p.x-E.x)<0,y=At(x,m)&&wt(m,E)&&At(E,p)&&wt(p,u)&&mt(x,p,tt)&&mt(x,u,tt)&&mt(m,E,tt)&&(m.y-x.y)*(p.y-E.y)<0;if(c||y)return yt([...d.slice(0,h+1),u,...d.slice(h+5)]);if(h+5>=d.length)return;let v=d[h+5],M=At(x,m)&&wt(m,E)&&At(E,p)&&wt(p,u)&&At(u,v)&&ht(x,u,tt)&&ht(x,v,tt)&&ht(E,p,tt)&&(E.x-m.x)*(u.x-p.x)<0,T=wt(x,m)&&At(m,E)&&wt(E,p)&&At(p,u)&&wt(u,v)&&mt(x,u,tt)&&mt(x,v,tt)&&mt(E,p,tt)&&(E.y-m.y)*(u.y-p.y)<0;if(!M&&!T)return;return yt([...d.slice(0,h+1),v,...d.slice(h+6)])},"withoutDogleg");for(let d=0;d<8;d++){let h=!1;for(let x of e){if(x.isLayoutOnly)continue;let m=yt(x.points??[]);for(let E=0;E<=m.length-5;E++){let p=g(m,E);if(!p||!a(x,p))continue;x.points=p,h=!0;break}if(h)break}if(!h)return}}t(Jo,"collapseRedundantRectangularDoglegs");function Bn(e,n){let{realNodeRects:i,labelNodeRects:a}=ye(n.values()),g=e.filter((u)=>!u.isLayoutOnly),d=t((u,c,y)=>yt(u===c?y??[]:u.points??[]),"pointsFor"),h=t((u,c)=>{let y=0;for(let v=0;v<g.length;v++){let M=at(d(g[v],u,c));for(let T=v+1;T<g.length;T++){let B=at(d(g[T],u,c));for(let C of M)for(let I of B)if(fe(C.a,C.b,I.a,I.b,tt))y++}}return y},"strictCrossingCount"),x=t((u)=>{let c=at(u);if(c.length!==3)return;let y=c[1];if(c[0].horizontal===y.horizontal||c[2].horizontal===y.horizontal)return;return{index:y.index,horizontal:y.horizontal,vertical:y.vertical,segment:y}},"middleRail"),m=t((u,c)=>{let y=[u.start,u.end].filter((v)=>Boolean(v));return i.filter((v)=>{if(y.includes(v.id))return!1;let M=v.rect;if(c.horizontal)return Ut(c.a.x,c.b.x,M.left,M.right)>=Ht&&c.a.y>=M.top-2&&c.a.y<=M.bottom+2;return Ut(c.a.y,c.b.y,M.top,M.bottom)>=Ht&&c.a.x>=M.left-2&&c.a.x<=M.right+2})},"blockingRectsFor"),E=t((u,c,y)=>{let v=u.map((T)=>({...T}));if(c.horizontal)v[c.index].y=y,v[c.index+1].y=y;else if(c.vertical)v[c.index].x=y,v[c.index+1].x=y;else return;let M=le(yt(v));return at(M).length===M.length-1?M:void 0},"candidateByMovingRail"),p=t((u,c,y)=>{let v=[u.start,u.end].filter((T)=>Boolean(T)),M=at(c);if(M.length!==c.length-1)return!1;for(let T of M){if(Nt(T.a,T.b,i,v,-2))return!1;if(Nt(T.a,T.b,a,[],-2))return!1}for(let T of g){if(T===u)continue;for(let B of M)for(let C of at(d(T)))if(ae(B,C,0.5)>=Ht)return!1}return h(u,c)<=y},"candidateIsSafe");for(let u=0;u<8;u++){let c=h(),y=!1;for(let v of g){let M=d(v),T=x(M);if(!T)continue;let B=m(v,T.segment);if(B.length===0)continue;let C=T.horizontal?[Math.min(...B.map((I)=>I.rect.top))-20,Math.max(...B.map((I)=>I.rect.bottom))+20]:[Math.min(...B.map((I)=>I.rect.left))-20,Math.max(...B.map((I)=>I.rect.right))+20];for(let I of C){let R=E(M,T.segment,I);if(!R||!p(v,R,c))continue;v.points=R,y=!0;break}if(y)break}if(!y)return}}t(Bn,"liftObstacleHuggingSameSideRails");function Fn(e,n){let s=t((d)=>{let h=d.groupTitleRect;if(!h||typeof h.left!=="number"||typeof h.right!=="number"||typeof h.top!=="number"||typeof h.bottom!=="number"||!Number.isFinite(h.left)||!Number.isFinite(h.right)||!Number.isFinite(h.top)||!Number.isFinite(h.bottom)||h.right<=h.left||h.bottom<=h.top)return;return{left:h.left,right:h.right,top:h.top,bottom:h.bottom}},"validTitleRect"),r=t((d)=>{if(!d.isGroup||d.parentId)return;let h=d.direction,x=typeof h==="string"?h.toUpperCase():"";if(x==="LR"||x==="RL"||x==="BT")return;let m=s(d),{y:E,height:p}=d;if(!m||typeof E!=="number"||typeof p!=="number"||!Number.isFinite(E)||!Number.isFinite(p)||p<=0)return;let u=m.right-m.left,c=m.bottom-m.top;if(c<=0||u<c)return;return{node:d,rect:m}},"topLaneTitleFor"),i=t((d,h)=>{if(!d.horizontal)return!1;let x=d.a.y;if(x<=h.top+tt||x>=h.bottom-tt)return!1;return Ut(d.a.x,d.b.x,h.left,h.right)>=Ht},"horizontalSegmentIntersectsTitle"),a=[...n.values()].map(r).filter((d)=>Boolean(d));if(a.length===0)return;let g=0;for(let d of e){if(d.isLayoutOnly)continue;let h=yt(d.points??[]);for(let x of at(h))for(let m of a){if(!i(x,m.rect))continue;g=Math.max(g,m.rect.bottom-x.a.y+4)}}if(g<=tt)return;for(let d of a){let h=d.node.y,x=d.node.height;if(typeof h!=="number"||typeof x!=="number"||!Number.isFinite(h)||!Number.isFinite(x)||x<=0)continue;d.node.y=h-g/2,d.node.height=x+g,d.node.groupTitleRect={...d.rect,top:d.rect.top-g,bottom:d.rect.bottom-g}}}t(Fn,"liftTopLaneTitleBandsAboveRails");function Pn(e,n){let s=t((h)=>{let x=h.groupTitleRect;if(!x||typeof x.left!=="number"||typeof x.right!=="number"||typeof x.top!=="number"||typeof x.bottom!=="number"||!Number.isFinite(x.left)||!Number.isFinite(x.right)||!Number.isFinite(x.top)||!Number.isFinite(x.bottom)||x.right<=x.left||x.bottom<=x.top)return;return{left:x.left,right:x.right,top:x.top,bottom:x.bottom}},"validTitleRect"),r=t((h)=>{if(!h.isGroup||h.parentId)return;if(h.direction!=="LR")return;let m=s(h),{x:E,width:p}=h;if(!m||typeof E!=="number"||typeof p!=="number"||!Number.isFinite(E)||!Number.isFinite(p)||p<=0)return;let u=m.right-m.left,c=m.bottom-m.top;if(u<=0||c<u)return;return{node:h,rect:m}},"leftLaneTitleFor"),i=t((h,x)=>{if(!h.vertical)return!1;let m=h.a.x;if(m<=x.left+tt||m>=x.right-tt)return!1;return Ut(h.a.y,h.b.y,x.top,x.bottom)>=Ht},"verticalSegmentIntersectsTitle"),a=t((h,x)=>{if(!h.horizontal)return!1;let m=h.a.y;if(m<=x.top+tt||m>=x.bottom-tt)return!1;return Ut(h.a.x,h.b.x,x.left,x.right)>=Ht},"horizontalSegmentIntersectsTitle"),g=[...n.values()].map(r).filter((h)=>Boolean(h));if(g.length===0)return;let d=0;for(let h of e){if(h.isLayoutOnly)continue;let x=yt(h.points??[]);for(let m of at(x))for(let E of g)if(i(m,E.rect))d=Math.max(d,E.rect.right-m.a.x+4);else if(a(m,E.rect)){let p=Math.min(m.a.x,m.b.x);d=Math.max(d,E.rect.right-p+4)}}if(d<=tt)return;for(let h of g){let x=h.node.x,m=h.node.width;if(typeof x!=="number"||typeof m!=="number"||!Number.isFinite(x)||!Number.isFinite(m)||m<=0)continue;h.node.x=x-d/2,h.node.width=m+d,h.node.groupTitleRect={...h.rect,left:h.rect.left-d,right:h.rect.right-d}}}t(Pn,"shiftLeftLaneTitleBandsLeftOfRails");function Qo(e,n){let{realNodeRects:r}=ye(n.values()),i=e.filter((c)=>!c.isLayoutOnly),a=t((c,y=new Map)=>yt(y.get(c)??c.points??[]),"replacementPointsFor"),g=t((c=new Map)=>{let y=0;for(let v=0;v<i.length;v++){let M=at(a(i[v],c));for(let T=v+1;T<i.length;T++){let B=at(a(i[T],c));for(let C of M)for(let I of B)if(fe(C.a,C.b,I.a,I.b,tt))y++}}return y},"crossingCount"),d=t((c=new Map)=>i.reduce((y,v)=>y+ee(a(v,c)),0),"totalBends"),h=t((c)=>{let y=a(c);if(y.length<4)return;let v=y[y.length-2],M=y[y.length-1];if(!wt(v,M,tt)&&!At(v,M,tt))return;return{tailStart:v,terminal:M}},"terminalTailFor"),x=t((c,y)=>{let v=a(c);if(v.length<3)return;let M=v[0],T=v[1],B;if(wt(M,T,tt))B={x:T.x,y:y.tailStart.y};else if(At(M,T,tt))B={x:y.tailStart.x,y:T.y};else return;let C=le(yt([M,T,B,y.tailStart,y.terminal]));return at(C).length===C.length-1?C:void 0},"candidateWithDestinationTail"),m=t((c,y)=>{let v=[c.start,c.end].filter((M)=>Boolean(M));for(let M of at(y))if(Nt(M.a,M.b,r,v,-2))return!0;return!1},"pathHasNodeHit"),E=t((c,y,v)=>{for(let M of i){if(M===c)continue;for(let T of at(y))for(let B of at(a(M,v)))if(ae(T,B,0.5)>=Ht)return!0}return!1},"pathHasSharedTrack"),p=t((c,y,v)=>!m(c,y)&&!E(c,y,v),"candidateIsSafe"),u=t(()=>{let c=new Map;for(let y of i){let v=y.end;if(!v||!n.has(v))continue;if(a(y).length<4)continue;let T=c.get(v)??[];T.push(y),c.set(v,T)}return c},"edgesByDestination");for(let c=0;c<4;c++){let y=g();if(y===0)return;let v=d(),M,T=y,B=v;for(let C of u().values())for(let I=0;I<C.length;I++)for(let R=I+1;R<C.length;R++){let N=C[I],P=C[R],A=h(N),H=h(P);if(!A||!H)continue;let _=x(N,H),F=x(P,A);if(!_||!F)continue;let Y=new Map([[N,_],[P,F]]);if(!p(N,_,Y)||!p(P,F,Y))continue;let V=g(Y),Z=d(Y);if(V>=y)continue;if(V>T||V===T&&Z>=B)continue;M=Y,T=V,B=Z}if(!M)return;for(let[C,I]of M)C.points=I}}t(Qo,"swapDestinationTerminalTailsToReduceCrossings");function ts(e,n){let{realNodeRects:a,labelNodeRects:g}=ye(n.values()),d=e.filter((C)=>!C.isLayoutOnly),h=t((C,I=new Map)=>yt(I.get(C)??C.points??[]),"replacementPointsFor"),x=t((C=new Map)=>{let I=0;for(let R=0;R<d.length;R++){let N=at(h(d[R],C));for(let P=R+1;P<d.length;P++){let A=at(h(d[P],C));for(let H of N)for(let _ of A)if(fe(H.a,H.b,_.a,_.b,tt))I++}}return I},"strictCrossingCount"),m=t((C=new Map)=>d.reduce((I,R)=>I+ee(h(R,C)),0),"totalBends"),E=t((C)=>{let{start:I,end:R}=C,N=I?n.get(I):void 0,P=R?n.get(R):void 0,A=N?Jt(N):void 0,H=P?Jt(P):void 0;return A&&H?{src:A,dst:H}:void 0},"endpointRectsFor"),p=t((C,I,R)=>{if(R.index<=0||R.index+1>=I.length-1)return;let N=E(C);if(!N)return;if(R.vertical){let P=R.a.x,A=Math.min(N.src.left,N.dst.left),H=Math.max(N.src.right,N.dst.right),_=P<A-tt?"left":P>H+tt?"right":void 0;if(!_)return;return{edge:C,points:I,segmentIndex:R.index,axis:"vertical",side:_,coord:P,min:Math.min(R.a.y,R.b.y),max:Math.max(R.a.y,R.b.y)}}if(R.horizontal){let P=R.a.y,A=Math.min(N.src.top,N.dst.top),H=Math.max(N.src.bottom,N.dst.bottom),_=P<A-tt?"top":P>H+tt?"bottom":void 0;if(!_)return;return{edge:C,points:I,segmentIndex:R.index,axis:"horizontal",side:_,coord:P,min:Math.min(R.a.x,R.b.x),max:Math.max(R.a.x,R.b.x)}}return},"externalRailForSegment"),u=t(()=>{let C=[];for(let I of d){let R=h(I);for(let N of at(R)){let P=p(I,R,N);if(P)C.push(P)}}return C},"collectExternalRails"),c=t((C,I)=>C.edge!==I.edge&&C.axis===I.axis&&C.side===I.side&&Ut(C.min,C.max,I.min,I.max)>=Ht,"railsInteract"),y=t((C)=>{let I=[],R=new Set;for(let N of C){if(R.has(N))continue;let P=[N],A=[];R.add(N);while(P.length>0){let H=P.pop();A.push(H);for(let _ of C)if(!R.has(_)&&c(H,_))R.add(_),P.push(_)}if(A.length>1)I.push(A)}return I},"connectedComponents"),v=t((C)=>{let I=[];for(let R of C)if(!I.some((N)=>Math.abs(N-R.coord)<tt))I.push(R.coord);while(I.length<C.length){let R=Math.min(...I),N=Math.max(...I),P=C[0].side;I.push(P==="left"||P==="top"?R-12*(C.length-I.length):N+12*(C.length-I.length))}return I},"uniqueCoordsFor"),M=t((C)=>{let I=C.map((P)=>P.coord),R=v(C),N=[];if(C.length<=6){let P=Array(R.length).fill(!1),A=[],H=t(()=>{if(A.length===C.length){if(A.some((_,F)=>Math.abs(_-I[F])>=tt))N.push([...A]);return}for(let[_,F]of R.entries()){if(P[_])continue;P[_]=!0,A.push(F),H(),A.pop(),P[_]=!1}},"visit");return H(),N}for(let P=0;P<I.length;P++)for(let A=P+1;A<I.length;A++){let H=[...I];[H[P],H[A]]=[H[A],H[P]],N.push(H)}return N},"coordinateAssignmentsFor"),T=t((C,I)=>{let R=new Map;for(let[P,A]of C.entries()){let H=I[P],_=R.get(A.edge)??A.points.map((F)=>({x:F.x,y:F.y}));if(A.axis==="vertical")_[A.segmentIndex].x=H,_[A.segmentIndex+1].x=H;else _[A.segmentIndex].y=H,_[A.segmentIndex+1].y=H;R.set(A.edge,_)}let N=new Map;for(let[P,A]of R){let H=le(yt(A));if(at(H).length!==H.length-1)return;N.set(P,H)}return N},"replacementsForAssignment"),B=t((C)=>{for(let[I,R]of C){let N=[I.start,I.end].filter((P)=>Boolean(P));for(let P of at(R)){if(Nt(P.a,P.b,a,N,-2))return!1;if(Nt(P.a,P.b,g,[],-2))return!1}}for(let I=0;I<d.length;I++){let R=d[I],N=C.has(R),P=at(h(R,C));for(let A=I+1;A<d.length;A++){let H=d[A];if(!N&&!C.has(H))continue;let _=at(h(H,C));for(let F of P)for(let Y of _)if(ae(F,Y,0.5)>=Ht)return!1}}return!0},"candidateIsSafe");for(let C=0;C<4;C++){let I=x();if(I===0)return;let R,N=I,P=m(),A=Number.POSITIVE_INFINITY;for(let H of y(u()))for(let _ of M(H)){let F=T(H,_);if(!F||!B(F))continue;let Y=x(F);if(Y>=I)continue;let V=m(F),Z=H.reduce((lt,xt,Ot)=>lt+Math.abs(_[Ot]-xt.coord),0);if(Y>N||Y===N&&(V>P||V===P&&Z>=A))continue;R=F,N=Y,P=V,A=Z}if(!R)return;for(let[H,_]of R)H.points=_}}t(ts,"reassignCrossingExternalRailChannels");function es(e,n){let{realNodeRects:r,labelNodeRects:i}=ye(n.values()),a=e.filter((u)=>!u.isLayoutOnly),g=t((u,c,y)=>yt(u===c?y??[]:u.points??[]),"pointsFor"),d=t((u)=>at(u).reduce((c,y)=>{let v=y.a.x-y.b.x,M=y.a.y-y.b.y;return c+Math.hypot(v,M)},0),"pathLength"),h=t((u,c)=>{let y=0;for(let v=0;v<a.length;v++){let M=at(g(a[v],u,c));for(let T=v+1;T<a.length;T++){let B=at(g(a[T],u,c));for(let C of M)for(let I of B)if(fe(C.a,C.b,I.a,I.b,tt))y++}}return y},"strictCrossingCount"),x=t((u,c)=>{if(u.horizontal){let y=u.a.y;return(Math.abs(y-c.top)<1||Math.abs(y-c.bottom)<1)&&Ut(u.a.x,u.b.x,c.left,c.right)>=Ht}if(u.vertical){let y=u.a.x;return(Math.abs(y-c.left)<1||Math.abs(y-c.right)<1)&&Ut(u.a.y,u.b.y,c.top,c.bottom)>=Ht}return!1},"segmentRunsAlongRectBorder"),m=t((u)=>{let c=[u.start,u.end].filter((v)=>Boolean(v)),y=[];for(let v of c){let M=n.get(v),T=M?Jt(M):void 0;if(T)y.push(T)}return y},"endpointRectsFor"),E=t((u,c)=>{if(c+3>=u.length)return[];let y=u[c],v=u[c+1],M=u[c+2],T=u[c+3],B=wt(y,v,tt)&&At(v,M,tt)&&wt(M,T,tt),C=At(y,v,tt)&&wt(v,M,tt)&&At(M,T,tt);if(!B&&!C)return[];if(!(B?Math.sign(v.x-y.x)!==Math.sign(T.x-M.x):Math.sign(v.y-y.y)!==Math.sign(T.y-M.y)))return[];let R=ht(y,T,tt)||mt(y,T,tt)?[]:[{x:y.x,y:T.y},{x:T.x,y:y.y}],N=R.length===0?[[...u.slice(0,c+1),...u.slice(c+3)]]:R.map((A)=>[...u.slice(0,c+1),A,...u.slice(c+3)]),P=new Set;return N.map((A)=>le(yt(A))).filter((A)=>{if(at(A).length!==A.length-1)return!1;if(!A.some((_)=>re(_,T,tt)))return!1;let H=A.map((_)=>`${_.x.toFixed(3)},${_.y.toFixed(3)}`).join("|");if(P.has(H))return!1;return P.add(H),!0})},"shortcutCandidatesAt"),p=t((u,c,y)=>{let v=[u.start,u.end].filter((T)=>Boolean(T)),M=m(u);for(let T of at(c)){if(Nt(T.a,T.b,r,v,-2))return!1;if(Nt(T.a,T.b,i,[],-2))return!1;if(M.some((B)=>x(T,B)))return!1}for(let T of a){if(T===u)continue;for(let B of at(c))for(let C of at(g(T)))if(ae(B,C,0.5)>=Ht)return!1}return h(u,c)<=y},"candidateIsSafe");for(let u=0;u<8;u++){let c=h(),y,v,M=c,{POSITIVE_INFINITY:T,POSITIVE_INFINITY:B}=Number;for(let C of a){let I=g(C),R=ee(I,tt),N=d(I);for(let P=0;P<=I.length-4;P++)for(let A of E(I,P)){let H=ee(A,tt),_=d(A);if(!(H<R||H===R&&_<N-tt)||!p(C,A,c))continue;let Y=h(C,A);if(Y>M||Y===M&&(H>T||H===T&&_>=B))continue;y=C,v=A,M=Y,T=H,B=_}}if(!y||!v)return;y.points=v}}t(es,"shortcutRedundantOrthogonalJogs");function ns(e,n){let a=[];for(let O of n.values()){if(O.isGroup||O.isEdgeLabel)continue;let D=O.x??0,X=O.y??0,W=Jt(O);if(!W)continue;a.push({id:String(O.id??""),cx:D,cy:X,rect:W})}if(a.length===0)return;let g=new Map(a.map((O)=>[O.id,O])),d=a.map((O)=>({id:O.id,rect:O.rect})),h=["top","bottom","left","right"],x={top:Math.min(...a.map((O)=>O.rect.top))-20,bottom:Math.max(...a.map((O)=>O.rect.bottom))+20,left:Math.min(...a.map((O)=>O.rect.left))-20,right:Math.max(...a.map((O)=>O.rect.right))+20},m=e.filter((O)=>!O.isLayoutOnly),E=new Map(m.map((O,D)=>[O,D])),p=t((O)=>{let D=O==="left"||O==="top"?-1:1,X=[];for(let W=0;W<=2;W++)X.push(x[O]+D*20*W);return X},"outwardTracksForSide"),u=t((O,D=new Map)=>yt(D.get(O)??O.points??[]),"replacementPointsFor"),c=t((O,D)=>{let X=0;for(let W of O)for(let f of D)if(fe(W.a,W.b,f.a,f.b,tt))X++;return X},"crossingCountBetweenSegments"),y=t((O,D)=>c(at(O),at(D)),"crossingCountBetweenPaths"),v=t((O=new Map)=>{let D=0,X=[],W=new Set,f=[],b=t((S)=>{if(!W.has(S))W.add(S),f.push(S)},"addEdge");for(let S=0;S<m.length;S++){let L=m[S],w=u(L,O);for(let k=S+1;k<m.length;k++){let K=m[k],Q=y(w,u(K,O));if(Q>0)D+=Q,X.push({first:L,second:K,count:Q}),b(L),b(K)}}return f.sort((S,L)=>(E.get(S)??0)-(E.get(L)??0)),{count:D,pairs:X,edgeSet:W,edges:f}},"crossingSnapshot"),M=t((O,D)=>{let X=new Set(D.keys());if(X.size===0)return O.count;let W=0;for(let b of O.pairs)if(X.has(b.first)||X.has(b.second))W+=b.count;let f=0;for(let b=0;b<m.length;b++){let S=m[b],L=X.has(S),w=u(S,D);for(let k=b+1;k<m.length;k++){let K=m[k];if(!L&&!X.has(K))continue;f+=y(w,u(K,D))}}return O.count-W+f},"crossingCountWithReplacements"),T=t((O)=>{let D=new Map;for(let f of O.pairs){let b=D.get(f.first)??new Set;b.add(f.second),D.set(f.first,b);let S=D.get(f.second)??new Set;S.add(f.first),D.set(f.second,S)}let X=[],W=new Set;for(let f of O.edges){if(W.has(f))continue;let b=[f],S=[];W.add(f);while(b.length>0){let L=b.pop();S.push(L);for(let w of D.get(L)??[])if(!W.has(w))W.add(w),b.push(w)}if(S.sort((L,w)=>(E.get(L)??0)-(E.get(w)??0)),S.length>1)X.push(S)}return X},"crossingComponents"),B=t((O)=>[O.start,O.end].filter((D)=>Boolean(D)),"endpointIdsFor"),C=t((O)=>{let D=[];for(let X of T(O)){let W=new Set(X),f=new Set(X.flatMap((S)=>B(S))),b=[...X];for(let S of m){if(W.has(S))continue;if(B(S).some((L)=>f.has(L)))b.push(S)}b.sort((S,L)=>(E.get(S)??0)-(E.get(L)??0)),D.push(b)}return D},"pairSearchGroups"),I=t((O,D,X)=>M(O,new Map([[D,X]])),"crossingCountWithSingleReplacement"),R=t((O)=>{let D=new Map;for(let X of O.pairs)D.set(X.first,(D.get(X.first)??0)+X.count),D.set(X.second,(D.get(X.second)??0)+X.count);return D},"currentCrossingsByEdge"),N=t((O)=>O.slice(1).reduce((D,X,W)=>{let f=O[W];return D+Math.abs(X.x-f.x)+Math.abs(X.y-f.y)},0),"pathLength"),P=t((O=new Map)=>m.reduce((D,X)=>D+ee(u(X,O)),0),"totalBends"),A=t((O=new Map)=>m.reduce((D,X)=>D+N(u(X,O)),0),"totalLength"),H=t((O,D,X=new Map)=>{let W=at(D);for(let f of m){if(f===O)continue;for(let b of W)for(let S of at(u(f,X)))if(ae(b,S,0.5)>=Ht)return!0}return!1},"pathHasSegmentConflict"),_=t((O,D)=>{let X=[O.start,O.end].filter((W)=>Boolean(W));for(let W of at(D))if(Nt(W.a,W.b,d,X,-2))return!0;return!1},"pathHitsNode"),F=t((O,D)=>{let X=le(yt(D));if(at(X).length===X.length-1)O.push(X)},"pushOrthogonalCandidate"),Y=t((O)=>O==="left"||O==="right","sideIsHorizontal"),V=t((O,D,X)=>{switch(D){case"left":return Math.min(O.x,X.x)-20;case"right":return Math.max(O.x,X.x)+20;case"top":return Math.min(O.y,X.y)-20;case"bottom":return Math.max(O.y,X.y)+20}},"localTrackForSameSide"),Z=t((O,D,X,W)=>{let f=X==="left"||X==="top"?-1:1,b=[V(D,X,W),x[X]];for(let S of b)for(let L=0;L<=2;L++)F(O,eo(D,X,W,S+f*20*L))},"addSameSideCandidates"),lt=t((O,D,X,W,f)=>{for(let b of p(X))for(let S of p(f))F(O,[D,{x:b,y:D.y},{x:b,y:S},{x:W.x,y:S},W])},"addHorizontalToVerticalCandidates"),xt=t((O,D,X,W,f)=>{for(let b of p(X))for(let S of p(f))F(O,[D,{x:D.x,y:b},{x:S,y:b},{x:S,y:W.y},W])},"addVerticalToHorizontalCandidates"),Ot=t((O,D,X,W,f)=>{let b=[...p("top"),...p("bottom")];for(let S of p(X))for(let L of p(f))for(let w of b)F(O,[D,{x:S,y:D.y},{x:S,y:w},{x:L,y:w},{x:L,y:W.y},W])},"addHorizontalPairCandidates"),kt=t((O,D,X,W,f)=>{let b=[...p("left"),...p("right")];for(let S of p(X))for(let L of p(f))for(let w of b)F(O,[D,{x:D.x,y:S},{x:w,y:S},{x:w,y:L},{x:W.x,y:L},W])},"addVerticalPairCandidates"),et=t((O)=>{let D=new Set;return O.map((X)=>yt(X)).filter((X)=>{let W=X.map((f)=>`${f.x.toFixed(3)},${f.y.toFixed(3)}`).join("|");if(D.has(W)||X.length<2)return!1;return D.add(W),!0})},"dedupeCandidatePaths"),q=t((O,D,X,W)=>{let f=[],b=to(O,D,X,W,20,tt);if(b)F(f,b);if(D===W)Z(f,O,D,X);let S=Y(D),L=Y(W);if(S&&!L)lt(f,O,D,X,W);else if(!S&&L)xt(f,O,D,X,W);else if(S)Ot(f,O,D,X,W);else kt(f,O,D,X,W);return et(f)},"buildCandidatesForSides"),ot=t((O,D,X,W)=>{let f=[...p("left"),...p("right")],b=[...p("top"),...p("bottom")];for(let S of h){let L=Se(W,S),w=S==="top"||S==="bottom"?p(S):b;for(let k of f){F(O,[D,X,{x:k,y:X.y},{x:k,y:L.y},L]);for(let K of w)F(O,[D,X,{x:k,y:X.y},{x:k,y:K},{x:L.x,y:K},L])}}},"addVerticalDepartureOuterTrackCandidates"),dt=t((O,D,X,W)=>{let f=[...p("left"),...p("right")],b=[...p("top"),...p("bottom")];for(let S of h){let L=Se(W,S),w=S==="left"||S==="right"?p(S):f;for(let k of b){F(O,[D,X,{x:X.x,y:k},{x:L.x,y:k},L]);for(let K of w)F(O,[D,X,{x:X.x,y:k},{x:K,y:k},{x:K,y:L.y},L])}}},"addHorizontalDepartureOuterTrackCandidates"),pt=t((O)=>{let{start:D,end:X}=O,W=X?g.get(X):void 0;if(!D||!W)return[];let f=yt(O.points??[]);if(f.length<4)return[];let b=f[0],S=f[1],L=[];if(At(b,S,tt))ot(L,b,S,W);else if(wt(b,S,tt))dt(L,b,S,W);return L},"terminalPreservingOuterTrackCandidates"),It=t((O)=>{let{start:D,end:X}=O,W=D?g.get(D):void 0,f=X?g.get(X):void 0;if(!W||!f)return[];let b=[];for(let S of h){let L=Se(W,S);for(let w of h)b.push(...q(L,S,Se(f,w),w))}return b.push(...pt(O)),b},"candidatePathsFor"),Et=t(()=>new Map(m.map((O)=>[O,at(u(O))])),"currentSegmentsByEdge"),jt=t((O,D,X)=>{let W=new Set;for(let f of m){if(f===O)continue;let b=X.get(f)??at(u(f));if(D.some((S)=>b.some((L)=>ae(S,L,0.5)>=Ht)))W.add(f)}return W},"sharedTrackConflictsFor"),Wt=t((O,D,X,W)=>{let f=new Set;return It(O).map((S)=>le(yt(S))).filter((S)=>{if(_(O,S))return!1;let L=S.map((w)=>`${w.x.toFixed(3)},${w.y.toFixed(3)}`).join("|");if(f.has(L)||S.length<2)return!1;return f.add(L),!0}).map((S)=>{let L=at(S),w=0;for(let k of m){if(k===O)continue;w+=c(L,X.get(k)??at(u(k)))}return{candidate:S,candidateSegments:L,crossings:D.count-(W.get(O)??0)+w,bends:ee(S,tt),totalBends:ee(S),length:N(S)}}).filter(({crossings:S})=>S<=D.count).sort((S,L)=>S.crossings-L.crossings||S.bends-L.bends||S.length-L.length).slice(0,48).map((S)=>({path:S.candidate,segments:S.candidateSegments,sharedTrackConflicts:jt(O,S.candidateSegments,X),totalBends:S.totalBends,length:S.length}))},"pairCandidatesFor"),Kt=t((O,D,X,W,f,b)=>{let S=0;for(let w of O.pairs)if(w.first===D||w.second===D||w.first===W||w.second===W)S+=w.count;let L=c(X.segments,f.segments);for(let w of m){if(w===D||w===W)continue;let k=b.get(w)??at(u(w));L+=c(X.segments,k)+c(f.segments,k)}return O.count-S+L},"pairCrossingCount"),ne=t((O,D)=>{for(let X of O.sharedTrackConflicts)if(X!==D)return!1;return!0},"conflictsOnlyWith"),Ce=t((O,D)=>O.segments.some((X)=>D.segments.some((W)=>ae(X,W,0.5)>=Ht)),"candidatesShareTrack"),ue=t((O,D,X,W)=>ne(D,X.edge)&&ne(W,O.edge)&&!Ce(D,W),"pairCandidatesAreCompatible"),ve=t((O,D,X,W,f)=>{let b=Kt(O.current,D.edge,X,W.edge,f,O.baseSegments);if(b>=O.current.count)return;return{replacements:new Map([[D.edge,X.path],[W.edge,f.path]]),crossings:b,bends:O.currentBends-(O.baseBendsByEdge.get(D.edge)??0)-(O.baseBendsByEdge.get(W.edge)??0)+X.totalBends+f.totalBends,length:O.currentLength-(O.baseLengthByEdge.get(D.edge)??0)-(O.baseLengthByEdge.get(W.edge)??0)+X.length+f.length}},"scorePairReplacement"),rn=t((O,D)=>O.crossings<D.crossings||O.crossings===D.crossings&&(O.bends<D.bends||O.bends===D.bends&&O.length<D.length),"pairScoreIsBetter"),cn=t((O,D,X,W)=>{let f=W;for(let b of D.candidates)for(let S of X.candidates){if(!ue(D,b,X,S))continue;let L=ve(O,D,b,X,S);if(L&&rn(L,f))f=L}return f},"bestScoreForOptionPair"),an=t((O)=>{let D=P(),X=A(),W=Et(),f=R(O),b=new Map(m.map((Q)=>[Q,ee(u(Q))])),S=new Map(m.map((Q)=>[Q,N(u(Q))])),L=new Map,w=C(O);for(let Q of w)for(let j of Q){if(L.has(j))continue;let z=Wt(j,O,W,f);if(z.length>0)L.set(j,{edge:j,candidates:z})}let k={replacements:new Map,crossings:O.count,bends:D,length:X},K={current:O,currentBends:D,currentLength:X,baseBendsByEdge:b,baseLengthByEdge:S,baseSegments:W};for(let Q of w){let j=new Set(Q.filter((rt)=>O.edgeSet.has(rt))),z=Q.map((rt)=>L.get(rt)).filter((rt)=>Boolean(rt));for(let rt=0;rt<z.length;rt++){let ct=z[rt];for(let it=rt+1;it<z.length;it++){let nt=z[it];if(!j.has(ct.edge)&&!j.has(nt.edge))continue;k=cn(K,ct,nt,k)}}}return k.replacements.size>0?k.replacements:void 0},"bestPairedReplacement");for(let O=0;O<4;O++){let D=v(),X=D.count;if(X===0)return;let W,f,b=X,S=Number.POSITIVE_INFINITY;for(let w of D.edges){let k=ee(u(w),tt);for(let K of It(w)){let Q=_(w,K),j=!Q&&H(w,K),z=I(D,w,K),rt=ee(K,tt);if(Q||j)continue;if(!(z<X||z===X&&rt<k))continue;if(z>b||z===b&&rt>=S)continue;W=w,f=K,b=z,S=rt}}if(W&&f){W.points=f;continue}let L=an(D);if(!L)return;for(let[w,k]of L)w.points=k}}t(ns,"resolveRenderedOrthogonalCrossings");var pe=0.001,dr=8;function os(e,n){let{nodeInfoById:o,realNodeRects:s}=en(n),r=["top","bottom","left","right"],i=20,a={top:Math.min(...s.map((c)=>c.rect.top))-20,bottom:Math.max(...s.map((c)=>c.rect.bottom))+20,left:Math.min(...s.map((c)=>c.rect.left))-20,right:Math.max(...s.map((c)=>c.rect.right))+20},g=t((c,y,v,M)=>{let T=[],B=to(c,y,v,M,20,pe);if(B)T.push(B);if(y===M)T.push(eo(c,y,v,a[y]));return T},"buildOrthogonalPathCandidates"),d=t((c,y)=>{for(let v=0;v<c.length-1;v++){let M=c[v],T=c[v+1];if(Nt(M,T,s,y,1))return!0}return!1},"pathHitsNode"),h=t((c,y,v=!1)=>{let M=0,T=Ae(c,pe),{start:B,end:C}=y;for(let I of e){if(I===y||I.isLayoutOnly)continue;let{start:R,end:N}=I;if(!v&&B&&C&&(R===B||R===C||N===B||N===C))continue;let P=I.points;if(!P||P.length<2)continue;for(let A of T)for(let H of Ae(P,pe)){if(oo(A.a,A.b,H.a,H.b,pe,pe)){M++;continue}if(ae(A,H,pe)>=dr)M++}}return M},"pathConflictCount"),x=4,m=t((c,y)=>{let v=Math.abs(c.y-y.rect.top),M=Math.abs(c.y-y.rect.bottom),T=Math.abs(c.x-y.rect.left),B=Math.abs(c.x-y.rect.right),C="top",I=v;if(M<I)C="bottom",I=M;if(T<I)C="left",I=T;if(B<I)C="right",I=B;return C},"nearestSideOfRect"),E=new Map,p=t((c,y,v)=>{let M=E.get(c)??[];M.push({side:y,edgeId:v}),E.set(c,M)},"addFaceClaim");for(let c of e){if(c.isLayoutOnly)continue;let y=c.points??[];if(y.length<1)continue;let v=c.id??"",{start:M,end:T}=c;if(M){let B=o.get(M);if(B)p(M,m(y[0],B),v)}if(T){let B=o.get(T);if(B)p(T,m(y[y.length-1],B),v)}}let u=t((c,y,v)=>E.get(c)?.some((M)=>M.edgeId!==v&&M.side===y)??!1,"faceIsClaimed");for(let c of e){if(c.isLayoutOnly)continue;let y=c.points;if(!y||y.length<2)continue;let v=ee(y,pe);if(v<4)continue;let{start:M,end:T}=c;if(!M||!T)continue;let B=o.get(M),C=o.get(T);if(!B||!C)continue;let I=c.id??"",R=h(y,c,!0),N=h(y,c),P,A=R,H=v;for(let _ of r){if(u(M,_,I))continue;let F=Se(B,_);for(let Y of r){if(u(T,Y,I))continue;let V=Se(C,Y);for(let Z of g(F,_,V,Y)){if(d(Z,[M,T]))continue;let lt=ee(Z,pe);if(R>0){let xt=h(Z,c,!0);if(xt>A||xt===A&<>=H)continue;A=xt,H=lt,P=Z;continue}if(h(Z,c)>N)continue;if(lt<H)H=lt,P=Z}}}if(P){c.points=P;let _=E.get(M);if(_)E.set(M,_.filter((Y)=>Y.edgeId!==I));let F=E.get(T);if(F)E.set(T,F.filter((Y)=>Y.edgeId!==I));p(M,m(P[0],B),I),p(T,m(P[P.length-1],C),I)}}}t(os,"simplifyDetouredEdges");var Zt=0.001,Co=10,Ye=7;function kn(e,n){let o=n?0:e.length-1,s=n?1:-1,r=e[o],i=e[o+s];if(!r||!i)return;let a=i.x-r.x,g=i.y-r.y;if(Math.abs(a)+Math.abs(g)<Zt)return;if(Math.abs(g)<=Zt){let h=r.x+Math.sign(a)*Co;return{left:Math.min(r.x,h),right:Math.max(r.x,h),top:r.y-Ye,bottom:r.y+Ye}}if(Math.abs(a)<=Zt){let h=r.y+Math.sign(g)*Co;return{left:r.x-Ye,right:r.x+Ye,top:Math.min(r.y,h),bottom:Math.max(r.y,h)}}return{left:Math.min(r.x,i.x),right:Math.max(r.x,i.x),top:Math.min(r.y,i.y),bottom:Math.max(r.y,i.y)}}t(kn,"markerClearanceRectFor");function ss(e){return{left:Math.min(e.left,e.right),right:Math.max(e.left,e.right),top:Math.min(e.top,e.bottom),bottom:Math.max(e.top,e.bottom)}}t(ss,"normalizeRect");function _n(e,n){let o=yt(n),s=kn(o,!0),r=kn(o,!1);return[s,r].some((i)=>i&&Ve(e,ss(i)))}t(_n,"labelOverlapsOwnMarker");function ze(e,n){let o=[];for(let u of e){if(u.isLayoutOnly)continue;let c=u.points;if(!c||c.length<2)continue;for(let y=0;y<c.length-1;y++)o.push({edgeId:u.id,p1:c[y],p2:c[y+1]})}let s=[],r=[];for(let u of n.values()){let{isGroup:c,parentId:y}=u;if(c&&!y){let M=Jt(u);if(M)r.push({id:u.id,rect:M});continue}if(c)continue;if(u.isEdgeLabel)continue;let v=Jt(u);if(!v)continue;s.push({nodeId:u.id,rect:v})}let i=3,a=1,g=12,d=t((u,c)=>{let y=In(c,i);for(let{nodeId:v,rect:M}of s){if(v===u)continue;if(Ve(y,M))return!0}return!1},"labelOverlapsForeignNode"),h=t((u,c)=>{let y=In(c,i);for(let v of o){if(v.edgeId===u)continue;if(tn(v.p1,v.p2,y))return!0}return!1},"labelOverlapsForeignEdge"),x=t((u,c,y)=>d(u,y)||h(c,y),"labelOverlapsAnything"),m=[],E=t((u)=>{for(let{id:c,rect:y}of r)if(Oo(y,u))return c;return},"findContainingLane"),p=t((u,c)=>m.some((y)=>y.labelId!==u&&Ve(c,y.rect)),"overlapsPlacedLabel");for(let u of e){if(u.isLayoutOnly)continue;let c=u.labelNodeId;if(!c)continue;let y=n.get(c);if(!y)continue;let v=u.points;if(!v||v.length<2)continue;let M=y.width??0,T=y.height??0;if(M<=0||T<=0)continue;let B=[];for(let et=0;et<v.length-1;et++){let q=v[et],ot=v[et+1],dt=Math.abs(q.x-ot.x),pt=Math.abs(q.y-ot.y);if(dt<Zt&&pt<Zt)continue;if(dt>=Zt&&pt>=Zt)continue;B.push({idx:et,length:dt+pt,orientation:dt>=Zt?"horizontal":"vertical",midX:(q.x+ot.x)/2,midY:(q.y+ot.y)/2})}if(B.length===0)continue;let C=B.length>=3?B.filter((et)=>et.idx>0&&et.idx<B.length-1):B,I=C.length>0?C:B,R=M>=T?"horizontal":"vertical",N=t((et)=>[...et].sort((q,ot)=>{let dt=q.orientation===R,pt=ot.orientation===R;if(dt!==pt)return dt?-1:1;let It=q.length>=(q.orientation==="horizontal"?M:T)+2,Et=ot.length>=(ot.orientation==="horizontal"?M:T)+2;if(It!==Et)return It?-1:1;return ot.length-q.length}),"rankSegments"),P=B[0],A=B[B.length-1],H=[0.5,0.25,0.75,0.05,0.95,0.15,0.85,0.1,0.9],_=t((et,q)=>{let ot=v[et.idx],dt=v[et.idx+1];return{midX:ot.x+(dt.x-ot.x)*q,midY:ot.y+(dt.y-ot.y)*q}},"anchorAtT"),F=t((et,q,ot)=>Math.min(ot,Math.max(q,et)),"clamp"),Y=t((et,q)=>et.midX>=q.left-Zt&&et.midX<=q.right+Zt&&et.midY>=q.top-Zt&&et.midY<=q.bottom+Zt,"pointInsideRectInclusive"),V=t((et)=>{let q=we(et.midX,et.midY,M,T),ot=E(q);if(ot)return{laneId:ot,anchor:et,rect:q};let dt=r.find(({rect:ne})=>Y(et,ne));if(!dt)return;let pt=dt.rect.left+M/2+a,It=dt.rect.right-M/2-a,Et=dt.rect.top+T/2+a,jt=dt.rect.bottom-T/2-a;if(pt>It||Et>jt)return;let Wt={midX:F(et.midX,pt,It),midY:F(et.midY,Et,jt)},Kt=we(Wt.midX,Wt.midY,M,T);return Y(et,Kt)?{laneId:dt.id,anchor:Wt,rect:Kt}:void 0},"placementForAnchor"),Z=t((et,q,ot)=>et.orientation==="horizontal"?Math.abs(q.midX-ot.x):Math.abs(q.midY-ot.y),"distanceAlongSegment"),lt=t((et,q)=>{let dt=(et.orientation==="horizontal"?M/2:T/2)+g;if(et===P){let pt=v[et.idx];if(Z(et,q,pt)+Zt<dt)return!1}if(et===A){let pt=v[et.idx+1];if(Z(et,q,pt)+Zt<dt)return!1}return!0},"labelClearsTerminalEndpoints"),xt=t((et)=>{let q=N(et);for(let ot of q)for(let dt of H){let pt=_(ot,dt);if(!lt(ot,pt))continue;let It=V(pt);if(!It)continue;if(_n(It.rect,v))continue;if(p(c,It.rect))continue;if(!x(c,u.id,It.rect))return{laneId:It.laneId,anchor:It.anchor}}return},"tryPool"),Ot=t((et,q,ot=!1)=>{let dt=N(et);for(let pt of dt){let It={midX:pt.midX,midY:pt.midY};if(q&&!lt(pt,It))continue;let Et=V(It);if(Et&&!_n(Et.rect,v)&&!p(c,Et.rect)&&!d(c,Et.rect)&&(ot||!h(u.id,Et.rect)))return{laneId:Et.laneId,anchor:Et.anchor}}return},"findLaneContainingFallback"),kt=xt(I)??(I.length<B.length?xt(B):void 0)??Ot(B,!0)??Ot(B,!1)??Ot(B,!1,!0);if(kt){y.x=kt.anchor.midX,y.y=kt.anchor.midY,y.parentId=kt.laneId;let et=we(kt.anchor.midX,kt.anchor.midY,M,T),q=m.findIndex((ot)=>ot.labelId===c);if(q>=0)m[q]={labelId:c,rect:et};else m.push({labelId:c,rect:et})}}}t(ze,"anchorLabelsToPolyline");var yn=0.000001,ur=8,vo=ur/2,hr=3;function Hn(e,n){return e<n?`${e}::${n}`:`${n}::${e}`}t(Hn,"pairKey");function rs(e,n){let{nodeInfoById:o,realNodeRects:s}=en(n),r=new Map;for(let a of n){let g=a.id;if(a.isGroup)continue;if(a.isEdgeLabel){r.set(g,{w:a.width??0,h:a.height??0});continue}}let i=t((a,g,d,h)=>{let x=Hn(g,d),m=0,E=t((p)=>{if(!p)return;let u=r.get(p);if(!u)return;let c=h==="x"?u.w/2:u.h/2;if(c>m)m=c},"consider");E(a.labelNodeId);for(let p of e){if(p===a)continue;if(p.isLayoutOnly)continue;let{start:u,end:c}=p;if(!u||!c)continue;if(Hn(u,c)!==x)continue;E(p.labelNodeId)}return m>0?m+hr:0},"labelClearanceFor");for(let a of e){if(a.isLayoutOnly)continue;let g=a.points;if(!Jn(g,yn))continue;let d=no(a,o,yn);if(!d)continue;let{srcId:h,dstId:x,srcInfo:m,dstInfo:E,collinearX:p,collinearY:u}=d;if(p===u)continue;let c,y;if(p){let C=E.cy>m.cy;c={x:m.cx,y:C?m.rect.bottom:m.rect.top},y={x:E.cx,y:C?E.rect.top:E.rect.bottom}}else{let C=E.cx>m.cx;c={x:C?m.rect.right:m.rect.left,y:m.cy},y={x:C?E.rect.left:E.rect.right,y:E.cy}}if(Nt(c,y,s,[h,x],1))continue;let M=i(a,h,x,p?"x":"y"),T=M>vo?M:vo,B=[0,T,-T];for(let C of B){let I={...c},R={...y};if(p){if(I.x+=C,R.x+=C,I.x<=m.rect.left||I.x>=m.rect.right)continue;if(R.x<=E.rect.left||R.x>=E.rect.right)continue}else{if(I.y+=C,R.y+=C,I.y<=m.rect.top||I.y>=m.rect.bottom)continue;if(R.y<=E.rect.top||R.y>=E.rect.bottom)continue}if(Nt(I,R,s,[h,x],1))continue;if(Ue(I,R,e,a,{epsilon:yn}))continue;a.points=[I,R];break}}}t(rs,"straightenCollinearSiblingDetours");function Dn(e,n){let{realNodeRects:h,labelNodeRects:x}=ye(n.values()),m=t((I,R)=>Ae(R,0.001).map((N)=>({...N,edge:I,interior:N.index>=1&&N.index<=R.length-3})),"segmentsFor"),E=t(()=>{let I=[];for(let R of e){if(R.isLayoutOnly)continue;let N=R.points;if(!N||N.length<2)continue;I.push(...m(R,yt(N)))}return I},"allSegments"),p=t((I,R)=>{if(I.horizontal&&R.horizontal)return Ut(I.a.x,I.b.x,R.a.x,R.b.x)>=8&&Math.abs(I.a.y-R.a.y)<7;if(I.vertical&&R.vertical)return Ut(I.a.y,I.b.y,R.a.y,R.b.y)>=8&&Math.abs(I.a.x-R.a.x)<7;return!1},"hasCrowdedParallelTrack"),u=t((I,R)=>{let{start:N,end:P}=I,A=m(I,R);if(A.length!==R.length-1)return!1;let H=[N,P].filter((F)=>Boolean(F)),_=I.labelNodeId?[I.labelNodeId]:[];for(let F of A){if(Nt(F.a,F.b,h,H,-2))return!1;if(Nt(F.a,F.b,x,_,-2))return!1}for(let F of e){if(F===I||F.isLayoutOnly)continue;let Y=F.points;if(!Y||Y.length<2)continue;for(let V of A)for(let Z of m(F,yt(Y))){if(p(V,Z))return!1;if(fe(V.a,V.b,Z.a,Z.b,0.001))return!1}}return!0},"candidateIsSafe"),c=t((I,R)=>{let N=yt(I.edge.points??[]);if(N.length<4||I.index>=N.length-1)return;let P=N.map((A)=>({...A}));if(I.horizontal)P[I.index].y+=R,P[I.index+1].y+=R;else if(I.vertical)P[I.index].x+=R,P[I.index+1].x+=R;else return;return m(I.edge,P).length===P.length-1?P:void 0},"shiftedCandidate"),y=t((I,R)=>({x:I.x??(R.left+R.right)/2,y:I.y??(R.top+R.bottom)/2}),"nodeCenter"),v=t((I)=>{let R=I.edge,N=yt(R.points??[]);if(N.length!==4||I.index!==1)return;let P=R.start?n.get(R.start):void 0,A=R.end?n.get(R.end):void 0,H=P?Jt(P):void 0,_=A?Jt(A):void 0,F=N.slice(I.index+2);if(!P||!A||!H||!_||F.length===0)return;return{sourceCenter:y(P,H),targetCenter:y(A,_),sourceRect:H,tail:F}},"sourceDetourContextFor"),M=t((I,R,N,P,A,H)=>{let _=P.y>=N.y,F=_?A.bottom:A.top,Y=F+(_?20:-20);if(_&&I.b.y<=Y+0.001||!_&&I.b.y>=Y-0.001)return;let V=I.a.x+R;return yt([{x:N.x,y:F},{x:N.x,y:Y},{x:V,y:Y},{x:V,y:I.b.y},...H],0.001)},"verticalSourceDetour"),T=t((I,R,N,P,A,H)=>{let _=P.x>=N.x,F=_?A.right:A.left,Y=F+(_?20:-20);if(_&&I.b.x<=Y+0.001||!_&&I.b.x>=Y-0.001)return;let V=I.a.y+R;return yt([{x:F,y:N.y},{x:Y,y:N.y},{x:Y,y:V},{x:I.b.x,y:V},...H],0.001)},"horizontalSourceDetour"),B=t((I,R)=>{let N=v(I);if(!N)return;if(I.vertical)return M(I,R,N.sourceCenter,N.targetCenter,N.sourceRect,N.tail);if(I.horizontal)return T(I,R,N.sourceCenter,N.targetCenter,N.sourceRect,N.tail);return},"sourceDetourCandidate"),C=[-7,7,-14,14,-21,21];for(let I=0;I<12;I++){let R=E(),N=!1;for(let P=0;P<R.length&&!N;P++)for(let A=P+1;A<R.length&&!N;A++){let H=R[P],_=R[A];if(H.edge===_.edge||!p(H,_))continue;let F=[H,_].filter((Y)=>Y.interior);for(let Y of F){for(let V of C){let Z=c(Y,V);if(Z&&u(Y.edge,Z)){Y.edge.points=Z,N=!0;break}let lt=B(Y,V);if(lt&&u(Y.edge,lt)){Y.edge.points=lt,N=!0;break}}if(N)break}}if(!N)return}}t(Dn,"nudgeSharedInteriorSubpaths");function is(e,n,o,s){let r=n.x-e.x,i=n.y-e.y,a=s.x-o.x,g=s.y-o.y,d=r*g-i*a;if(Math.abs(d)<0.0000000001)return!1;let h=o.x-e.x,x=o.y-e.y,m=(h*g-x*a)/d,E=(h*i-x*r)/d,p=0.01;return m>p&&m<1-p&&E>p&&E<1-p}t(is,"segmentsIntersect");function cs(e){let n=e.nodes??[],o=e.edges??[],s=[];if(!o.length||!n.length)return s;let r=Bo(n),i=1,a=[];for(let d of o){if(d.isLayoutOnly)continue;let h=d.points;if(!h||h.length<2)continue;let{start:x,end:m,labelNodeId:E}=d,p=d.id??`${x}->${m}`;for(let u of r){if(u.nodeId===x||u.nodeId===m)continue;if(E&&u.nodeId===E)continue;for(let c=0;c<h.length-1;c++)if(tn(h[c],h[c+1],u,-i)){s.push({type:"edge-node-overlap",edgeId:p,targetId:u.nodeId,detail:`segment ${c} passes through node "${u.nodeId}"`});break}}for(let u=0;u<h.length-1;u++)a.push({edgeId:p,start:x,end:m,p1:h[u],p2:h[u+1]})}let g=new Set;for(let d=0;d<a.length;d++)for(let h=d+1;h<a.length;h++){let x=a[d],m=a[h];if(x.edgeId===m.edgeId)continue;if(x.start===m.start||x.start===m.end||x.end===m.start||x.end===m.end)continue;if(is(x.p1,x.p2,m.p1,m.p2)){let E=x.edgeId<m.edgeId?`${x.edgeId}|${m.edgeId}`:`${m.edgeId}|${x.edgeId}`;if(!g.has(E))g.add(E),s.push({type:"edge-edge-crossing",edgeId:x.edgeId,targetId:m.edgeId,detail:`edges "${x.edgeId}" and "${m.edgeId}" cross`})}}if(s.length>0){let d=s.filter((x)=>x.type==="edge-node-overlap").length,h=s.filter((x)=>x.type==="edge-edge-crossing").length;l.warn(`[SWIMLANE_VALIDATE] ${s.length} issue(s) detected: ${d} edge-node overlap(s), ${h} edge crossing(s)`);for(let x of s)l.warn(`[SWIMLANE_VALIDATE] ${x.type}: ${x.detail}`)}return s}t(cs,"validateSwimlanesLayout");function as(e,n){let o=e.nodes??[],s=e.edges??[],r=o.filter((g)=>!g.isGroup);if((n==="LR"||n==="RL")&&r.length>0&&!Wo(e,n))return;if(n==="BT"&&r.length>0&&!jo(e))return;for(let g of s){if(g.isLayoutOnly)continue;let d=g.points;if(!d||d.length<2)continue;g.points=le(je(d))}os(s,o),rs(s,o),Ko(s,o);let i=new Map;for(let g of o)i.set(String(g.id),g);ze(s,i),Ho(s,i),qo(s,i),Dn(s,i),Zo(s,i),Jo(s,i),Bn(s,i),Qo(s,i);let a=t(()=>{ns(s,i),ts(s,i),es(s,i),ze(s,i),Nn(s,i),Bn(s,i),ze(s,i),Nn(s,i)},"finalizeRenderedEdges");a(),Dn(s,i),a(),Fn(s,i),Pn(s,i),Fn(s,i),Pn(s,i)}t(as,"postProcessSwimlaneLayout");function xe(e){let n=new Map(e.nodeById),o=new Set,s=[];for(let i of e.edges){if(!n.has(i.src)||!n.has(i.dst))continue;let a=`${i.id}:${i.src}->${i.dst}`;if(o.has(a))continue;o.add(a),s.push(i)}return{nodes:[...n.keys()],edges:s,layout:e.layout,nodeById:n}}t(xe,"normalizeGraph");function ao(e,n){return e.edges.filter((o)=>o.dst===n)}t(ao,"incoming");function ls(e){let n=new Map;for(let o of e.nodes)n.set(o,[]);for(let o of e.edges)n.get(o.src).push(o.dst);return n}t(ls,"buildSuccessorMap");function lo(e){let n=ls(e);for(let o of n.values())o.sort((s,r)=>s.localeCompare(r));return n}t(lo,"buildSortedSuccessorMap");function nn(e){let n=new Map;for(let o of e.nodes)n.set(o,0);for(let o of e.edges)n.set(o.dst,(n.get(o.dst)??0)+1);return n}t(nn,"buildInDegreeMap");function fo(e){return[...e.entries()].filter(([,n])=>n===0).map(([n])=>n).sort((n,o)=>n.localeCompare(o))}t(fo,"sortedZeroInDegreeNodes");function on(e,n=()=>!0){let o=new Map,s=new Map;for(let r of e.nodes)o.set(r,[]),s.set(r,[]);for(let r of e.edges){if(!n(r))continue;s.get(r.src).push(r.dst),o.get(r.dst).push(r.src)}return{preds:o,succs:s}}t(on,"buildPredecessorSuccessorMaps");function uo(e,n,o,s){let r=0;for(let a of e.nodes){if(s?.skipGroups&&e.nodeById.get(a)?.isGroup)continue;r=Math.max(r,o[a]??0)}let i=Array.from({length:r+1},()=>[]);for(let a of n){if(s?.skipGroups&&e.nodeById.get(a)?.isGroup)continue;i[Math.max(0,o[a]??0)].push(a)}return i}t(uo,"buildLayersFromRanks");function Be(e){let n=nn(e),o=fo(n),s=[],r=lo(e);while(o.length){let i=o.shift();s.push(i);for(let a of r.get(i)??[])if(n.set(a,(n.get(a)??0)-1),(n.get(a)??0)===0){let g=0;while(g<o.length&&o[g]<a)g++;o.splice(g,0,a)}}return s.length===e.nodes.length?s:null}t(Be,"topoSortIfAcyclic");function Ne(e){let n=new Map,o=0;for(let s of e)n.set(s,o),o++;return n}t(Ne,"buildLayerIndex");function ho(e){let n=Array(e.length),o=t((s,r)=>{if(r-s<=1)return 0;let i=s+r>>1,a=o(s,i)+o(i,r),g=s,d=i,h=s;while(g<i||d<r)if(d>=r||g<i&&e[g]<=e[d])n[h++]=e[g++];else n[h++]=e[d++],a+=i-g;for(let x=s;x<r;x++)e[x]=n[x];return a},"count");return o(0,e.length)}t(ho,"countInversions");function fs(e){let n=xe(e),o=new Map;for(let m of n.nodes)o.set(m,[]);for(let m of n.edges)o.get(m.src).push(m);for(let m of o.values())m.sort((E,p)=>E.dst===p.dst?E.id.localeCompare(p.id):E.dst.localeCompare(p.dst));let s=Object.create(null);for(let m of n.nodes)s[m]=0;let r=[],i=t((m)=>{s[m]=1;for(let E of o.get(m)??[]){let p=E.dst;if(s[p]===0)i(p);else if(s[p]===1)r.push(E)}s[m]=2},"dfs"),a=nn(n),g=[...n.nodes.filter((m)=>(a.get(m)??0)===0),...n.nodes.filter((m)=>(a.get(m)??0)!==0)];for(let m of g)if(s[m]===0)i(m);let d=new Set(r.map((m)=>`${m.id}:${m.src}->${m.dst}`)),h=n.edges.map((m)=>d.has(`${m.id}:${m.src}->${m.dst}`)?{id:m.id,src:m.dst,dst:m.src,weight:m.weight,ref:m.ref}:m);return{acyclic:{nodes:[...n.nodes],edges:h,layout:n.layout,nodeById:new Map(n.nodeById)},reversed:r}}t(fs,"removeCycles_DFS");function ds(e){let n=new Map,o=t((s)=>{if(n.has(s))return n.get(s);let r=e.nodeById.get(s);if(!r)return n.set(s,null),null;let i=r.parentId;if(!i)return n.set(s,null),null;let g=o(i)??i;return n.set(s,g),g},"resolve");for(let s of e.nodes)o(s);return n}t(ds,"buildTopLaneMap");function de(e){let n=ds(e);return(o)=>n.get(o)??null}t(de,"createTopLaneResolver");function sn(e){let n=[];for(let o of e.layout.nodes??[])if(o.isGroup&&!o.parentId)n.push(o.id);return[...new Set(n)].reverse()}t(sn,"buildTopLaneOrder");function go(e,n){let o=sn(e);if(!n||n.length===0)return o;let s=new Set(o),r=new Set,i=[];for(let a of n){if(!s.has(a)||r.has(a))continue;r.add(a),i.push(a)}for(let a of o){if(r.has(a))continue;i.push(a)}return i}t(go,"resolveTopLaneOrder");var gr={EPSILON:0.000001},Je={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},Lo={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function us(e,n){let o=xe(e),s=n?.laneOf??(()=>null),r=n?.rankHint,{preds:i}=on(o);for(let C of i.values())C.sort((I,R)=>I.localeCompare(R));let a=Be(o)??[...o.nodes].sort((C,I)=>C.localeCompare(I)),g=new Map;for(let[C,I]of a.entries())g.set(I,C);let d=new Map,h=new Map;for(let C of o.nodes)h.set(C,[]);for(let C of a){let I=(i.get(C)??[]).filter((R)=>d.has(R));if(I.length>0){let R=hs(C,I,{laneOf:s,rankHint:r,topoIndex:g});d.set(C,R),h.get(R).push(C)}else if(!d.has(C))d.set(C,null)}for(let C of o.nodes)if(!d.has(C))d.set(C,null);let x=new Set;for(let C of o.nodes)if((d.get(C)??null)===null)x.add(C);let m=[...x].sort((C,I)=>{let R=g.get(C)??0,N=g.get(I)??0;if(R===N)return C.localeCompare(I);return R-N}),E=gs(o),p=new Map;for(let[C,I]of E.entries())p.set(C,[...I].sort((R,N)=>R.localeCompare(N)));let u=ms(p),c=ps(p),y=new Map;for(let C of o.nodes)y.set(C,[]);for(let C of c)for(let I of C.nodes){let R=y.get(I);if(R)R.push(C.id);else y.set(I,[C.id])}let v=[],M=[],T=new Set,B=t((C)=>{if(T.has(C))return;T.add(C),v.push(C);for(let I of h.get(C)??[])B(I);M.push(C)},"walk");for(let C of m)B(C);for(let C of a)B(C);return{parent:d,children:h,roots:m,componentOf:u,blocks:c,nodeBlocks:y,adjacency:p,preorder:v,postorder:M,topologicalOrder:a}}t(us,"buildDrivingTree");function hs(e,n,o){let s=o.laneOf(e);return[...n].sort((i,a)=>{let g=o.laneOf(i),d=o.laneOf(a),h=g!=null&&g===s,x=d!=null&&d===s;if(h!==x)return h?-1:1;let m=o.rankHint?.[i],E=o.rankHint?.[a];if(m!=null&&E!=null&&m!==E)return E-m;let p=o.topoIndex.get(i)??0,u=o.topoIndex.get(a)??0;if(p!==u)return p-u;return i.localeCompare(a)})[0]}t(hs,"chooseParent");function gs(e){let n=new Map;for(let o of e.nodes)n.set(o,new Set);for(let o of e.edges)n.get(o.src).add(o.dst),n.get(o.dst).add(o.src);return n}t(gs,"buildAdjacency");function ms(e){let n=new Map,o=0;for(let s of e.keys()){if(n.has(s))continue;let r=[s];while(r.length>0){let i=r.pop();if(n.has(i))continue;n.set(i,o);for(let a of e.get(i)??[])if(!n.has(a))r.push(a)}o++}return n}t(ms,"assignComponents");function ps(e){let n=new Map,o=new Map,s=[],r=[],i=0,a=t((g,d)=>{n.set(g,++i),o.set(g,i);for(let h of e.get(g)??[]){if(h===d)continue;if(!n.has(h)){if(s.push([g,h]),a(h,g),o.set(g,Math.min(o.get(g)??i,o.get(h)??i)),(o.get(h)??0)>=(n.get(g)??0))r.push(ys(g,h,s,r.length))}else if((n.get(h)??0)<(n.get(g)??0))s.push([g,h]),o.set(g,Math.min(o.get(g)??i,n.get(h)??i))}},"visit");for(let g of e.keys())if(!n.has(g))a(g,null);return r}t(ps,"computeBlocks");function ys(e,n,o,s){let r=[],i=new Set;while(o.length>0){let a=o.pop();if(r.push(a),i.add(a[0]),i.add(a[1]),a[0]===e&&a[1]===n||a[0]===n&&a[1]===e)break}return{id:s,edges:r,nodes:[...i]}}t(ys,"popBlock");function xs(e,n,o){let s=[...e.nodes],r=new Map;for(let[M,T]of s.entries())r.set(T,M);let i=s.length,a=Array(i).fill(-1),g=Array(i).fill(0),d=[],h=new Set;for(let M of s){let T=o.parent.get(M)??null,B=r.get(M);if(B==null)continue;if(T==null){if(a[B]=-1,g[B]=0,!h.has(M))h.add(M),d.push(M)}}while(d.length>0){let M=d.shift(),T=r.get(M);if(T==null)continue;let B=o.children.get(M)??[];for(let C of B){if(h.has(C))continue;let I=r.get(C);if(I==null)continue;a[I]=T,g[I]=g[T]+1,h.add(C),d.push(C)}}for(let M of s){if(h.has(M))continue;let T=r.get(M);if(T==null)continue;a[T]=-1,g[T]=0,h.add(M)}let x=Math.max(1,Math.ceil(Math.log2(Math.max(1,i)))+1),m=Array.from({length:x},()=>Array(i).fill(-1));for(let M=0;M<i;M++)m[0][M]=a[M];for(let M=1;M<x;M++)for(let T=0;T<i;T++){let B=m[M-1][T];m[M][T]=B===-1?-1:m[M-1][B]}let E=t((M,T)=>{if(M===-1||T===-1)return-1;if(g[M]<g[T])[M,T]=[T,M];let B=g[M]-g[T];for(let C=0;C<x;C++)if(B>>C&1){if(M=m[C][M],M===-1)return-1}if(M===T)return M;for(let C=x-1;C>=0;C--){let I=m[C][M],R=m[C][T];if(I===-1||R===-1)continue;if(I!==R)M=I,T=R}return m[0][M]},"lcaIndex"),p=Array.from({length:i},()=>new Map);for(let M of e.edges){let{src:T,dst:B}=M,C=n[T],I=n[B];if(C==null||I==null)continue;if(C>I)[T,B]=[B,T],[C,I]=[I,C];if(C==null||I==null||C===I)continue;let R=r.get(T),N=r.get(B);if(R==null||N==null)continue;let P=E(R,N);if(P===-1)continue;let A=p[P];for(let H=C;H<I;H++)A.set(H,(A.get(H)??0)+1)}let u=new Map,c=t((M,T)=>{if(T.size===0)return;for(let[B,C]of T)M.set(B,(M.get(B)??0)+C)},"mergeInto"),y=new Set,v=t((M)=>{let T=r.get(M);y.add(M);let B=T==null?void 0:p[T],C=B?new Map(B):new Map,I=o.children.get(M)??[];for(let R of I){let N=v(R),P=n[M];if(P!=null){let A=u.get(M);if(!A)A=new Map,u.set(M,A);let H=N.get(P)??0,_=n[R];if(_!=null&&_>P)H+=1;A.set(R,H)}c(C,N)}return C},"dfs");for(let M of o.roots)if(!y.has(M))v(M);for(let M of s)if(!y.has(M))v(M);return u}t(xs,"computeSubtreeCrossCounts");function bs(e,n,o){let s=new Map,r=t((i)=>{let a=o[i]??0,g=[...n.get(i)??[]];g.sort(mo(o));for(let d of g){r(d);let h=s.get(d);if(h!=null)a=Math.min(a,h)}s.set(i,a)},"annotate");for(let i of e)r(i);return s}t(bs,"annotateMinimumLayers");function mo(e){return(n,o)=>{let s=e[n]??0,r=e[o]??0;return s===r?n.localeCompare(o):s-r}}t(mo,"compareByRankThenId");function Is(e,n,o,s){let r=0;for(let d of n){let h=o[d]??0;if(h>r)r=h}let i=Array.from({length:r+1},()=>[]),a=new Set,g=t((d)=>{if(a.has(d))return;a.add(d);let h=o[d]??0;if(!i[h])i[h]=[];i[h].push(d);for(let x of s(d))g(x)},"emit");for(let d of e)g(d);for(let d of n)if(!a.has(d)){let h=o[d]??0;if(!i[h])i[h]=[];i[h].push(d),a.add(d)}return i}t(Is,"emitNodesInTreeOrder");function Ms(e){let n=[];for(let o of e){let s=new Set,r=[];for(let i of o){if(s.has(i))continue;s.add(i),r.push(i)}n.push(r)}return n}t(Ms,"deduplicateLayers");function Ss(e,n,o,s){return(r)=>{let i=e.get(r)??[];if(i.length===0)return[];let a=n[r]??0,g=[],d=[],h=o.get(r);for(let x of i){let m=s.get(x)??a;if(m>a)g.push({child:x,min:m});else d.push(x)}return g.sort((x,m)=>{if(x.min===m.min)return x.child.localeCompare(m.child);return x.min-m.min}),d.sort((x,m)=>{let E=h?.get(x)??0,p=h?.get(m)??0;if(E!==p)return E-p;let u=s.get(x)??a,c=s.get(m)??a;if(u!==c)return u-c;return x.localeCompare(m)}),[...g.map((x)=>x.child),...d]}}t(Ss,"createChildOrderer");function Qe(e,n,o){let s=us(e,{rankHint:n,laneOf:o}),{children:r,roots:i}=s;for(let m of e.nodes)if(!r.has(m))r.set(m,[]);let a=xs(e,n,s),g=[...i].sort(mo(n)),d=bs(g,r,n),h=Ss(r,n,a,d),x=Is(g,e.nodes,n,h);return x=Ms(x),x}t(Qe,"buildMultitreeLayerOrder");function Cs(e,n,o){let s=new Set(e),r=new Set(n),i=Ne(n),a=[];for(let g of o)if(s.has(g.src)&&r.has(g.dst))a.push(i.get(g.dst));return ho(a)}t(Cs,"countCrossingsBetweenAdjacent");function Xn(e,n,o){let s=[];for(let i of n){let a=o[i.src],g=o[i.dst];if(a==null||g==null||a===g)continue;let{src:d,dst:h}=i,x=a,m=g;if(a>g)d=i.dst,h=i.src,x=g,m=a;for(let E=x;E<m;E++)s.push({id:`${i.id}@${E}`,src:d,dst:h,ref:i.ref})}let r=0;for(let i=0;i+1<e.length;i++)r+=Cs(e[i],e[i+1],s);return r}t(Xn,"totalCrossings");function vs(e,n){let o={...n},{preds:s}=on(e),r=de(e),i=Qe(e,o,r),a=Xn(i,e.edges,o),g=Je.MAX_CROSSING_OPTIMIZATION_PASSES;for(let d=0;d<g;d++){let h=!1,x=[...e.nodes].sort((m,E)=>(o[E]??0)-(o[m]??0));for(let m of x){let E=o[m]??0;if(E===0)continue;let p=0;for(let v of s.get(m)??[])p=Math.max(p,(o[v]??0)+1);if(p>=E)continue;let u=E;o[m]=p;let c=Qe(e,o,r),y=Xn(c,e.edges,o);if(y<a)a=y,h=!0;else o[m]=u}if(!h)break}return o}t(vs,"optimizeRanksByCrossings");function Ls(e,n){let o=de(e),s=[...e.nodes].sort((r,i)=>(n[r]??0)-(n[i]??0)||r.localeCompare(i));for(let r of s){let i=o(r);if(!i)continue;let a=e.edges.filter((c)=>c.src===r);if(a.length===0)continue;let g=!1,d=0;for(let c of a){let y=o(c.dst);if(y==null||y===i)g=!0;else d++}if(d===0||g)continue;let h=0,x=!1;for(let c of e.edges){if(c.dst!==r)continue;let y=o(c.src);if(!y)continue;if(y===i)x=!0;else h++}if(h>0||!x)continue;let m=n[r]??0,E=m+d,p=0;for(let c of e.edges)if(c.dst===r)p=Math.max(p,(n[c.src]??0)+1);let u=Math.max(m,p,E);if(u!==m)n[r]=u}}t(Ls,"adjustCrossLaneSources");function Es(e,n){let o=xe(e),s=Be(o)??[...o.nodes].sort(),r=n?.compactSingleInput??!1,i=de(o),a=Object.create(null);for(let d of s){let h=ao(o,d),x=n?.ignoreCrossLaneEdges?h.filter((m)=>{let E=i(m.src),p=i(d);if(!E||!p)return!0;return E===p}):h;if(x.length===0)a[d]=0;else if(r&&x.length===1){let m=x[0].src,E=i(m),p=i(d);if(E!==p)a[d]=a[m]??0;else a[d]=(a[m]??0)+1}else{let m=-1/0;for(let E of x)m=Math.max(m,(a[E.src]??0)+1);a[d]=m===-1/0?0:m}}if(n?.optimizeRanksByCrossings??!1)a=vs(o,a);if(n?.ignoreCrossLaneEdges)Ls(o,a);return{layers:Qe(o,a,i),rankOf:a,dummy:new Set}}t(Es,"assignLayers_LongestPath");function Ts(e,n){let o=xe(e),r={...Es(o,{compactSingleInput:n?.compactSingleInput,ignoreCrossLaneEdges:n?.ignoreCrossLaneEdges,optimizeRanksByCrossings:n?.optimizeRanksByCrossings}).rankOf},i=de(o),{preds:a,succs:g}=on(o,(u)=>{if(n?.ignoreCrossLaneEdges){let c=i(u.src),y=i(u.dst);if(c&&y&&c!==y)return!1}return!0}),d=Be(o)??[...o.nodes],h=[...d].reverse(),x=t((u,c)=>{let y=0;for(let T of a.get(u)??[])y=Math.max(y,(r[T]??0)+1);let v=Number.POSITIVE_INFINITY,M=g.get(u)??[];if(M.length>0)v=Math.min(...M.map((T)=>(r[T]??0)-1));if(!Number.isFinite(v))v=Math.max(y,c);return Math.min(Math.max(c,y),v)},"clampFeasible"),m=Je.GRAVITY_ITERATIONS,E=t((u)=>{let c=!1;for(let y of u){let v=a.get(y)??[],M=g.get(y)??[];if(v.length===0&&M.length===0)continue;let T=v.length>0?v.reduce((R,N)=>R+(r[N]??0)+1,0)/v.length:r[y]??0,B=M.length>0?M.reduce((R,N)=>R+(r[N]??0)-1,0)/M.length:r[y]??0,C=Math.round((T+B)/2),I=x(y,C);if(I!==r[y])r[y]=I,c=!0}return c},"relaxOrder");for(let u=0;u<m;u++){let c=E(d),y=E(h);if(!c&&!y)break}for(let u of d){let c=0;for(let y of a.get(u)??[])c=Math.max(c,(r[y]??0)+1);if((r[u]??0)<c)r[u]=c}for(let u of h){let c=g.get(u)??[];if(c.length>0){let y=Math.min(...c.map((v)=>(r[v]??0)-1));if((r[u]??0)>y)r[u]=y}}return{layers:uo(o,d,r),rankOf:r,dummy:new Set}}t(Ts,"assignLayers_Gravity");function Rs(e){let n=nn(e),o=lo(e),s=fo(n),r=[];while(s.length>0){let i=[];for(let a of s){r.push(a);for(let g of o.get(a)??[])if(n.set(g,(n.get(g)??0)-1),(n.get(g)??0)===0)i.push(g)}s=i.sort((a,g)=>a.localeCompare(g))}return r.length===e.nodes.length?r:null}t(Rs,"topoSortByGenerationIfAcyclic");function ws(e,n){let o=xe(e),s=n?.direction==="LR"?Rs(o)??[...o.nodes].sort():Be(o)??[...o.nodes].sort(),r=de(o),i=t((x)=>r(x)??x,"laneOf"),a=Object.create(null),g=new Map,d=t((x,m)=>{if(n?.ignoreCrossLaneEdges??!0)return i(x)===i(m)?1:0;return 1},"edgeWeight");for(let x of s){if(o.nodeById.get(x)?.isGroup)continue;let E=ao(o,x),p=0;if(E.length>0)for(let v of E){let M=v.src,T=a[M]??0;p=Math.max(p,T+d(M,x))}let u=i(x),c=g.get(u)??0,y=Math.max(p,c);a[x]=y,g.set(u,y+1)}return{layers:uo(o,s,a,{skipGroups:!0}),rankOf:a,dummy:new Set}}t(ws,"assignLayers_LaneAwareCompact");function As(e,n){let o=xe(n),{rankOf:s}=e,r=e.layers.map((p)=>[...p]),i=new Set(e.dummy?[...e.dummy]:[]),a=0,g=new Map(o.nodeById),d=t((p)=>{let u=`placeholder-${a++}`,c={id:u,isGroup:!1,isDummy:!0,width:0,height:0};g.set(u,c),i.add(u);while(r.length<=p)r.push([]);return r[p].push(u),s[u]=p,u},"addDummyAt"),h=[...o.edges].sort((p,u)=>p.id===u.id?p.src===u.src?p.dst.localeCompare(u.dst):p.src.localeCompare(u.src):p.id.localeCompare(u.id)),x=[];for(let p of h){let u=s[p.src]??0,c=s[p.dst]??0;if(c-u<=1){x.push(p);continue}let y=p.src;for(let M=u+1,T=0;M<c;M++,T++){let B=d(M);x.push({id:`${p.id}#${T}`,src:y,dst:B,weight:p.weight,ref:p.ref}),y=B}let v=c-u-2;x.push({id:`${p.id}#${Math.max(v+1,0)}`,src:y,dst:p.dst,weight:p.weight,ref:p.ref})}let E={nodes:[...o.nodes,...[...i].filter((p)=>!o.nodes.includes(p))],edges:x,layout:o.layout,nodeById:g};return{layering:{layers:r,rankOf:s,dummy:i},graphWithDummies:E}}t(As,"makeProperLayering");function Yn(e){let n=e.length;if(n===0)return Number.POSITIVE_INFINITY;let o=[...e].sort((s,r)=>s-r);if(n%2===1)return o[(n-1)/2];return 0.5*(o[n/2-1]+o[n/2])}t(Yn,"median");function Gn(e){if(e.length===0)return Number.POSITIVE_INFINITY;return e.reduce((o,s)=>o+s,0)/e.length}t(Gn,"barycenter");function Ns(e,n,o,s){let r=new Map;for(let i of e)r.set(i,[]);for(let i of o)if(s==="down"){if(n.has(i.src)&&r.has(i.dst))r.get(i.dst).push(n.get(i.src))}else if(n.has(i.dst)&&r.has(i.src))r.get(i.src).push(n.get(i.dst));return r}t(Ns,"neighborPositionsFor");function Os(e,n,o){let s=o.get(e)??0,r=o.get(n)??0;return s!==r?s-r:e.localeCompare(n)}t(Os,"currentOrderTieBreak");function zn(e,n,o){let s=new Set(e),r=new Set(n),i=Ne(e),a=Ne(n),g=[];for(let h of o)if(s.has(h.src)&&r.has(h.dst))g.push({u:i.get(h.src),v:a.get(h.dst)});g.sort((h,x)=>h.u===x.u?h.v-x.v:h.u-x.u);let d=g.map((h)=>h.v);return ho(d)}t(zn,"countCrossingsBetweenAdjacent");function $e(e,n,o){return[...e].sort((s,r)=>{let i=Yn(n.get(s)??[]),a=Yn(n.get(r)??[]);if(i===a)return Os(s,r,o);if(!isFinite(i))return 1;if(!isFinite(a))return-1;return i-a})}t($e,"sortByHeuristic");function $n(e,n,o,s,r,i){let a=Ne(e),g=Ne(n),d=Ns(n,a,o,s);if(!r||!i||i.length===0)return $e(n,d,g);let h=new Map;for(let E of n){let p=r(E),u=h.get(p)??[];u.push(E),h.set(p,u)}let x=[];for(let E of i){let p=h.get(E);if(!p||p.length===0)continue;let u=$e(p,d,g);x.push(...u)}let m=h.get(null);if(m&&m.length>0){let E=$e(m,d,g);for(let p of E){let u=Gn(d.get(p)??[]),c=x.length;if(isFinite(u))for(let[y,v]of x.entries()){let M=Gn(d.get(v)??[]);if(u<M){c=y;break}}x.splice(c,0,p)}}return x}t($n,"reorderLayer");function Vn(e,n,o,s,r){let i=[...n],a=new Set(e),g=new Set(n),d=s?new Set(s):null,h=o.filter((c)=>a.has(c.src)&&g.has(c.dst)),x=d?o.filter((c)=>g.has(c.src)&&d.has(c.dst)):void 0,m=t((c)=>{let y=zn(e,c,h);if(x&&s)y+=zn(c,s,x);return y},"crossingScore"),E=r?new Map:null;if(r&&E)for(let c of n)E.set(c,r(c));let p=!0,u=m(i);while(p){p=!1;for(let c=0;c+1<i.length;c++){if(E){let M=E.get(i[c]),T=E.get(i[c+1]);if(M!==T)continue}let y=u;[i[c],i[c+1]]=[i[c+1],i[c]];let v=m(i);if(v<y)u=v,p=!0;else[i[c],i[c+1]]=[i[c+1],i[c]]}}return i}t(Vn,"transposeImprove");function Bs(e,n,o){let s=e.layers.map((g)=>[...g]),r=n.edges,i=de(n),a=go(n,o?.laneOrder);for(let g=0;g<3;g++){for(let d=1;d<s.length;d++)s[d]=$n(s[d-1],s[d],r,"down",i,a),s[d]=Vn(s[d-1],s[d],r,s[d+1],i);for(let d=s.length-2;d>=0;d--)s[d]=$n(s[d+1],s[d],r,"up",i,a),s[d]=Vn(s[d+1],s[d],r,s[d-1],i)}return{layers:s}}t(Bs,"orderLayers");function Fs(e,n,o){let s=o?.layerGap??Lo.DEFAULT_LAYER_GAP,r=o?.nodeGap??Lo.DEFAULT_NODE_GAP,i=o?.laneGap??r*2,a=o?.direction??"TB",g=a==="LR"||a==="RL",d=e.layers,h=Object.create(null),x=Object.create(null),m=t((A)=>n.nodeById.get(A),"getNode"),E=t((A)=>m(A)?.width??0,"getWidth"),p=t((A)=>m(A)?.height??0,"getHeight"),u=de(n),c=go(n,o?.laneOrder),y=d.map((A)=>A.reduce((H,_)=>Math.max(H,p(_)),0)),v=[];if(g)for(let A=0;A+1<d.length;A++){let H=d[A].reduce((xt,Ot)=>Math.max(xt,E(Ot)),0),_=d[A+1].reduce((xt,Ot)=>Math.max(xt,E(Ot)),0),F=y[A],Y=y[A+1],V=F/2+Y/2,Z=(H+_)/2,lt=Math.max(0,Z-V-s);v.push(lt)}let M=new Set;for(let A of d)for(let H of A)M.add(u(H));let T=M.has(null),B=c.filter((A)=>M.has(A)),C=[...T?[null]:[],...B],I=Object.create(null);for(let A of B)I[A]=0;if(T)I.null=0;for(let A of d){let H=Object.create(null),_=[];for(let F of A){let Y=u(F);if(Y===null)_.push(F);else(H[Y]||=[]).push(F)}for(let[F,Y]of Object.entries(H)){let V=Y.reduce((Z,lt)=>Z+E(lt),0)+r*Math.max(0,Y.length-1);I[F]=Math.max(I[F]??0,V)}if(T&&_.length){let F=_.reduce((Y,V)=>Y+E(V),0)+r*Math.max(0,_.length-1);I.null=Math.max(I.null??0,F)}}let R=new Map;{let A=C.map((F)=>(F===null?I.null:I[F])??0),_=-(A.reduce((F,Y)=>F+Y,0)+i*Math.max(0,C.length-1))/2;for(let F=0;F<C.length;F++){let Y=C[F],V=A[F]??0,Z=_+V/2;if(R.set(Y,Z),_+=V,F<C.length-1)_+=i}}let N=0;for(let[A,H]of d.entries()){let _=y[A]??0,F=new Map;for(let V of H){let Z=u(V),lt=F.get(Z)??[];lt.push(V),F.set(Z,lt)}for(let V of C){let Z=F.get(V)??[];if(Z.length===0)continue;let lt=R.get(V);if(Z.length===1){let xt=Z[0];h[xt]=lt,x[xt]=N+_/2}else{let xt=Z.map((et)=>E(et)),Ot=xt.reduce((et,q)=>et+q,0)+r*(Z.length-1),kt=lt-Ot/2;for(let[et,q]of Z.entries()){let ot=xt[et];h[q]=kt+ot/2,x[q]=N+_/2,kt+=ot+r}}}let Y=v[A]??0;N+=_+s+Y}let P=new Map;for(let A of n.edges){let H=A.ref.id;if(!P.has(H))P.set(H,[]);P.get(H).push(A)}for(let[,A]of P){if(A.length===0)continue;let H=A[0].ref,{start:_,end:F}=H;if(_==null||F==null)continue;let Y=Math.round(((h[_]??0)+(h[F]??0))/2),V=new Set;for(let Z of A)V.add(Z.src),V.add(Z.dst);for(let Z of V){if(Z===_||Z===F)continue;if(n.nodeById.get(Z)?.isDummy)h[Z]=Y}}return{x:h,y:x}}t(Fs,"assignCoordinates");var Ps=8;function ks(e){let n=2166136261;for(let o=0;o<e.length;o++)n^=e.charCodeAt(o),n=Math.imul(n,16777619);return n>>>0}t(ks,"hashString");function _s(e){let n=e>>>0;return()=>{n+=1831565813;let o=n;return o=Math.imul(o^o>>>15,o|1),o^=o+Math.imul(o^o>>>7,o|61),((o^o>>>14)>>>0)/4294967296}}t(_s,"mulberry32");function Hs(e,n){let o=[...e],s=_s(n);for(let r=o.length-1;r>0;r--){let i=Math.floor(s()*(r+1));[o[r],o[i]]=[o[i],o[r]]}return o}t(Hs,"deterministicShuffle");function Ds(e,n){let o=0;for(let[s,r]of e.entries())o+=Math.abs(s-(n.get(r)??s));return o}t(Ds,"sourceDistance");function Un(e,n){let o=new Map;for(let[r,i]of e.entries())o.set(i,r);let s=0;for(let{a:r,b:i,weight:a}of n){let g=o.get(r),d=o.get(i);if(g==null||d==null)continue;s+=a*Math.abs(g-d)}return s}t(Un,"laneArrangementCost");function Xs(e){let n=sn(e);if(n.length<2)return[];let o=new Map(n.map((i,a)=>[i,a])),s=de(e),r=new Map;for(let i of e.layout.edges??[]){if(i.isLayoutOnly)continue;let a=typeof i.start==="string"?i.start:void 0,g=typeof i.end==="string"?i.end:void 0;if(!a||!g||!e.nodeById.has(a)||!e.nodeById.has(g))continue;let d=s(a),h=s(g);if(!d||!h||d===h)continue;let x=o.get(d),m=o.get(h);if(x==null||m==null)continue;let[E,p]=x<=m?[d,h]:[h,d],u=`${E}\x00${p}`,c=r.get(u);if(c)c.weight++;else r.set(u,{a:E,b:p,weight:1})}return[...r.values()]}t(Xs,"buildWeightedLaneEdges");function jn(e,n,o){let s=[...e],r=Un(s,n),i=!0,a=0,g=Math.max(1,s.length);while(i&&a<g){i=!1,a++;for(let d=0;d+1<s.length;d++){[s[d],s[d+1]]=[s[d+1],s[d]];let h=Un(s,n);if(h<r)r=h,i=!0;else[s[d],s[d+1]]=[s[d+1],s[d]]}}return{order:s,cost:r,sourceDistance:Ds(s,o)}}t(jn,"greedySwitch");function Ys(e,n){if(e.cost!==n.cost)return e.cost<n.cost;return e.sourceDistance<n.sourceDistance}t(Ys,"isBetterCandidate");function Gs(e,n,o){let s=[...n].sort((r,i)=>r.a===i.a?r.b.localeCompare(i.b):r.a.localeCompare(i.a)).map(({a:r,b:i,weight:a})=>`${r}:${i}:${a}`).join("|");return ks(`${e.join("|")}#${s}#${o}`)}t(Gs,"seedForRestart");function zs(e,n={}){let o=sn(e);if(o.length<2)return o;let s=Xs(e);if(s.length===0)return o;let r=new Map(o.map((g,d)=>[g,d])),i=jn(o,s,r),a=Math.max(0,n.restarts??Ps);for(let g=0;g<a;g++){let d=Gs(o,s,g),h=Hs(o,d),x=jn(h,s,r);if(Ys(x,i))i=x}return i.order}t(zs,"optimizeTopLaneOrder");function $s(e,n){let o=n?.ignoreCrossLaneEdges??!0,s=n?.optimizeRanksByCrossings??!0,r=xe(e),i=n?.automaticLaneOrdering?zs(r,{restarts:Ps}):void 0,a=fs(r),g=a.acyclic,d=o?ws(g,{compactSingleInput:n?.compactSingleInput??Je.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:n?.direction}):Ts(g,{compactSingleInput:n?.compactSingleInput??Je.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:s}),{layering:h,graphWithDummies:x}=As(d,g),m=Bs(h,x,{laneOrder:i}),E=Fs(m,x,{layerGap:n?.layerGap,nodeGap:n?.nodeGap,direction:n?.direction,laneOrder:i});return{acyclic:g,reversed:a.reversed,layering:h,ordered:m,coordinates:E}}t($s,"sugiyamaLayout");var ft=gr.EPSILON,mr=8,Ie=15,Re=15,Ge=25,se=20,xn=10;function Wn(e,n,o){let s=e.x??0,r=e.y??0,i=n.x-s,a=n.y-r,g=Math.abs(i),d=Math.abs(a);if(g<ft&&d<ft)return o;let h=3;if(d>ft&&d*h>=g)return a>0?"bottom":"top";if(g>ft)return i>0?"right":"left";return o}t(Wn,"chooseOrthogonalSide");function Kn(e,n){return Math.abs(e.to-n.from)<ft||Math.abs(e.to-n.to)<ft?e.to:e.from}t(Kn,"sharedLineEndpointCoord");function Me(e,n){return e.orient==="vertical"?{x:e.coord,y:n}:{x:n,y:e.coord}}t(Me,"pointOnLine");function Vs(e,n){let o=e.nodes??[],s=e.edges??[],r=[];for(let f of s){if(f.isLayoutOnly)continue;r.push({...f,__originalEdge:f})}let i=new Map,a=new Map,g=[],d=n==="LR";for(let f of o)i.set(f.id,f);let h=o.filter((f)=>f.isGroup&&!f.parentId);for(let f of h){let b={id:f.id},S=t((L)=>{a.set(L.id,b),o.filter((w)=>w.parentId===L.id).forEach(S)},"assignLane");S(f)}let x=o.filter((f)=>!f.isGroup&&!f.isEdgeLabel).map((f)=>{let b=f.width??10,S=f.height??10,L=f.x??0,w=f.y??0,k=mr;return{nodeId:f.id,minX:L-b/2-k,maxX:L+b/2+k,minY:w-S/2-k,maxY:w+S/2+k,visualXHalfExtent:d?S/2+k:b/2+k}}),m=t((f,b,S,L)=>{let w=g.find((k)=>k.orientation===f&&Math.abs(k.coord-b)<1);if(!w)w={id:`pipe-${f}-${b.toFixed(0)}`,orientation:f,coord:b,spanMin:S,spanMax:L,tracks:[]},g.push(w);return w.spanMin=Math.min(w.spanMin,S),w.spanMax=Math.max(w.spanMax,L),w},"getOrAddPipe"),E=t((f,b)=>{let S=f.width??10,L=f.height??10,w=f.x??0,k=f.y??0;switch(b){case"top":return{x:w,y:k-L/2};case"bottom":return{x:w,y:k+L/2};case"left":return{x:w-S/2,y:k};case"right":return{x:w+S/2,y:k}}},"portForSide"),p=t((f,b,S)=>E(f,Wn(f,b,S?"bottom":"top")),"getOrthogonalPort"),u=[],c=[],y=new Set,v=1000,M=t((f,b,S)=>{if(u.length===0)return 0;let L=Math.abs(b.y-S.y)<ft,w=Math.abs(b.x-S.x)<ft;if(!L&&!w)return 0;let k=0;if(L){let K=b.y,Q=Math.min(b.x,S.x)-ft,j=Math.max(b.x,S.x)+ft;if(j<=Q)return 0;for(let z of u){if(z.edgeIndex===f||z.orientation!=="vertical")continue;if(z.pipe.coord<Q||z.pipe.coord>j)continue;if(z.from-ft<=K&&z.to+ft>=K)k+=v}}else if(w){let K=b.x,Q=Math.min(b.y,S.y)-ft,j=Math.max(b.y,S.y)+ft;if(j<=Q)return 0;for(let z of u){if(z.edgeIndex===f||z.orientation!=="horizontal")continue;if(z.pipe.coord<Q||z.pipe.coord>j)continue;if(z.from-ft<=K&&z.to+ft>=K)k+=v}}return k},"crossingPenalty"),T=r.map((f,b)=>{if(!f.start||!f.end)return{idx:b,crossLane:0,dx:0,dy:0};let S=i.get(f.start),L=i.get(f.end),w=a.get(f.start),k=a.get(f.end),K=w&&k&&w.id!==k.id?1:0,Q=S&&L?Math.abs((L.x??0)-(S.x??0)):0,j=S&&L?Math.abs((L.y??0)-(S.y??0)):0;return{idx:b,crossLane:K,dx:Q,dy:j}}).sort((f,b)=>{if(f.crossLane!==b.crossLane)return b.crossLane-f.crossLane;let S=f.dx+f.dy,L=b.dx+b.dy;if(Math.abs(S-L)>1)return S-L;return f.idx-b.idx}).map((f)=>f.idx),B=t((f,b,S,L)=>{let w=Math.min(f.x,b.x),k=Math.max(f.x,b.x),K=Math.min(f.y,b.y),Q=Math.max(f.y,b.y);return!!x.find((z)=>{if(S&&z.nodeId===S)return!1;if(L&&z.nodeId===L)return!1;if(Math.abs(f.x-b.x)>ft)return z.minY<f.y&&z.maxY>f.y&&z.maxX>w&&z.minX<k;else return z.minX<f.x&&z.maxX>f.x&&z.maxY>K&&z.minY<Q})},"isSegmentBlocked"),C=new Map,I=new Map;for(let f of r){if(!f.start||!f.end||f.start===f.end)continue;I.set(f.start,(I.get(f.start)??0)+1),I.set(f.end,(I.get(f.end)??0)+1)}let R=t((f,b)=>Wn(f,b,"bottom"),"determineSide"),N=new Map;for(let[f,b]of r.entries()){if(!b.start||!b.end||b.start===b.end)continue;if(b.points&&b.points.length>0)continue;let S=i.get(b.start),L=i.get(b.end);if(!S||!L)continue;let w=(L.x??0)-(S.x??0),k=(L.y??0)-(S.y??0);N.set(f,{edgeIdx:f,srcId:b.start,dstId:b.end,srcSide:R(S,{x:L.x??0,y:L.y??0}),dstSide:R(L,{x:S.x??0,y:S.y??0}),absDx:Math.abs(w),absDy:Math.abs(k),dxSign:Math.sign(w),dySign:Math.sign(k)})}let P=t((f)=>{if(f.srcSide==="top"||f.srcSide==="bottom")return f.absDx===0?1/0:f.absDy/f.absDx;return f.absDy===0?1/0:f.absDx/f.absDy},"preferenceStrength"),A=t((f)=>{if(f.srcSide==="top"||f.srcSide==="bottom")return f.dxSign>=0?"right":"left";return f.dySign>=0?"bottom":"top"},"secondarySide"),H=new Map;for(let f of N.values()){let b=`${f.srcId}:${f.srcSide}`;if(!H.has(b))H.set(b,[]);H.get(b).push(f)}let _=new Map,F=t((f,b)=>`${f}:${b}`,"loadKey");for(let f of N.values())_.set(F(f.srcId,f.srcSide),(_.get(F(f.srcId,f.srcSide))??0)+1),_.set(F(f.dstId,f.dstSide),(_.get(F(f.dstId,f.dstSide))??0)+1);for(let f of H.values()){if(f.length<2)continue;f.sort((b,S)=>{let L=P(b),w=P(S);if(Math.abs(L-w)>0.000000001)return w-L;return b.edgeIdx-S.edgeIdx});for(let b=1;b<f.length;b++){let S=f[b],L=A(S),w=_.get(F(S.srcId,S.srcSide))??0,k=_.get(F(S.srcId,L))??0;if(k>=w)continue;_.set(F(S.srcId,S.srcSide),w-1),_.set(F(S.srcId,L),k+1),S.srcSide=L}}let Y=t((f)=>{let b=f?.shape;return b==="question"||b==="diamond"},"isDiamondNode"),V=new Map;for(let f of N.values()){if(!V.has(f.dstId))V.set(f.dstId,new Set);V.get(f.dstId).add(f.dstSide)}for(let f of N.values()){if(!Y(i.get(f.srcId)))continue;let b=V.get(f.srcId);if(!b?.has(f.srcSide))continue;let S=A(f);if(b.has(S)||(_.get(F(f.srcId,S))??0)>0)continue;let L=_.get(F(f.srcId,f.srcSide))??0;_.set(F(f.srcId,f.srcSide),Math.max(0,L-1)),_.set(F(f.srcId,S),1),f.srcSide=S}for(let f of N.values()){let{edgeIdx:b,srcId:S,dstId:L,srcSide:w,dstSide:k}=f,K=i.get(S),Q=i.get(L),j=`${S}:${w}:src`,z=w==="top"||w==="bottom"?Q.x??0:Q.y??0;if(!C.has(j))C.set(j,[]);C.get(j).push({edgeIdx:b,oppositeCoord:z});let rt=`${L}:${k}:dst`,ct=k==="top"||k==="bottom"?K.x??0:K.y??0;if(!C.has(rt))C.set(rt,[]);C.get(rt).push({edgeIdx:b,oppositeCoord:ct})}let Z=new Map,lt=8;for(let[f,b]of C){if(b.length<2)continue;b.sort((Tt,Xt)=>Tt.oppositeCoord-Xt.oppositeCoord);let S=f.split(":"),L=S.slice(0,-2).join(":"),w=S[S.length-2],k=S[S.length-1],K=i.get(L);if(!K)continue;let j=w==="left"||w==="right"?K.height??10:K.width??10,z=K.shape,ct=z==="question"||z==="diamond"?j*0.3:j,nt=Math.min(20,Math.max(lt,ct/(b.length+1))),Bt=-(nt*(b.length-1))/2;for(let[Tt,Xt]of b.entries()){let Qt=Bt+Tt*nt,ln=`${Xt.edgeIdx}:${k}`;Z.set(ln,Qt)}}let xt=t((f)=>Boolean(r[f]?.labelNodeId),"edgeHasLabelNode"),Ot=t((f,b)=>{if(!f)return!1;return(C.get(`${f}:${b}:src`)??[]).some(({edgeIdx:S})=>xt(S))||(C.get(`${f}:${b}:dst`)??[]).some(({edgeIdx:S})=>xt(S))},"faceHasLabelNode"),kt=t((f,b,S)=>{if(b==="top"||b==="bottom")return{x:f.x+S,y:f.y};else return{x:f.x,y:f.y+S}},"applyPortOffset"),et=t((f,b,S)=>{let L=N.get(f),w={x:S.x??0,y:S.y??0},k={x:b.x??0,y:b.y??0},K=L?.srcSide??R(b,w),Q=L?.dstSide??R(S,k),j=L?E(b,L.srcSide):p(b,w,!0),z=L?E(S,L.dstSide):p(S,k,!1),rt=Z.get(`${f}:src`),ct=Z.get(`${f}:dst`);if(rt!==void 0)j=kt(j,K,rt);if(ct!==void 0)z=kt(z,Q,ct);return{pSrcPort:j,pDstPort:z,srcSide:K,dstSide:Q}},"portsForEdge");for(let f of T){let b=r[f];if(c[f]=[],!b.start||!b.end)continue;if(b.points&&b.points.length>0)continue;if(b.start===b.end)continue;let S=i.get(b.start),L=i.get(b.end);if(!S||!L)continue;let{pSrcPort:w,pDstPort:k,srcSide:K,dstSide:Q}=et(f,S,L),j={...w},z={...k},rt=K==="top"||K==="bottom",ct=Q==="top"||Q==="bottom";if(rt){let G=w.y>(S.y??0);j.y=G?w.y+se:w.y-se}else{let G=w.x>(S.x??0);j.x=G?w.x+se:w.x-se}if(ct){let G=k.y>(L.y??0);z.y=G?k.y+se:k.y-se}else{let G=k.x>(L.x??0);z.x=G?k.x+se:k.x-se}let it=t((G,U)=>{for(let J of x){if(U.includes(J.nodeId))continue;if(G.x>J.minX&&G.x<J.maxX&&G.y>J.minY&&G.y<J.maxY)return{inside:!0,obstacle:J}}return{inside:!1}},"isPointInObstacle"),nt=t((G,U,J,ut,Lt)=>{if(Lt){let Ft=G.y>(U.y??0);return{x:(J.x??0)>=G.x?ut.maxX+Ie:ut.minX-Ie,y:Ft?ut.maxY+Re:ut.minY-Re,leavesPositiveSide:Ft}}let Mt=G.x>(U.x??0),Rt=(J.y??0)>=G.y;return{x:Mt?ut.maxX+Ie:ut.minX-Ie,y:Rt?ut.maxY+Re:ut.minY-Re,leavesPositiveSide:Mt}},"obstacleDetour"),bt=[],Bt=[b.start,b.end],Tt=it(j,Bt);if(Tt.inside&&Tt.obstacle){let G=Tt.obstacle;if(rt){let U=nt(w,S,L,G,!0);j.x=U.x,j.y=U.y;let J=U.leavesPositiveSide?Math.min(G.minY-2,w.y+se):Math.max(G.maxY+2,w.y-se);bt=[{x:w.x,y:J},{x:U.x,y:J},{x:U.x,y:U.y}]}else{let U=nt(w,S,L,G,!1),J=U.leavesPositiveSide?Math.min(G.minX-2,w.x+se):Math.max(G.maxX+2,w.x-se);j.x=U.x,j.y=U.y,bt=[{x:J,y:w.y},{x:J,y:U.y},{x:U.x,y:U.y}]}}let Xt=[],Qt=it(z,Bt);if(Qt.inside&&Qt.obstacle){let G=Qt.obstacle;if(ct){let U=nt(k,L,S,G,!0);z.x=U.x,z.y=U.y,Xt=[{x:U.x,y:U.y},{x:k.x,y:U.y}]}else{let U=nt(k,L,S,G,!1);z.x=U.x,z.y=U.y,Xt=[{x:U.x,y:U.y},{x:U.x,y:k.y}]}}if(bt.length===0&&Xt.length===0){let G=Ie,U=Math.abs(j.x-z.x)<G,J=Math.abs(j.y-z.y)<G,ut=Z.get(`${f}:src`)!==void 0||Z.get(`${f}:dst`)!==void 0,Lt=(C.get(`${b.start??""}:${K}:src`)?.length??0)+(C.get(`${b.start??""}:${K}:dst`)?.length??0),Mt=(C.get(`${b.end??""}:${Q}:src`)?.length??0)+(C.get(`${b.end??""}:${Q}:dst`)?.length??0),Rt=Lt>1||Mt>1,Ft=I.get(b.start??"")??0,gt=I.get(b.end??"")??0,zt=Lt>1&&Ot(b.start,K)||Mt>1&&Ot(b.end,Q),oe=Lt<=1||Ft<=2,_t=Mt<=1||gt<=2;if((U||J)&&!ut&&(!Rt||Rt&&!zt&&oe&&_t)){if(!B(w,k,b.start,b.end)){b.points=[{...w},{...j},{...z},{...k}],y.add(f);let St=J?"horizontal":"vertical",Vt=J?w.y:w.x,Ct=J?Math.min(w.x,k.x):Math.min(w.y,k.y),vt=J?Math.max(w.x,k.x):Math.max(w.y,k.y),qt={id:`fast-path-${St}-${Vt.toFixed(0)}-${f}`,orientation:St,coord:Vt,spanMin:Ct,spanMax:vt,tracks:[]};u.push({edgeIndex:f,segmentIndex:0,orientation:St,pipe:qt,trackIndex:0,from:Ct,to:vt});continue}}}let ln=m("vertical",j.x,j.y,j.y);j.x=ln.coord;let Ks=m("vertical",z.x,z.y,z.y);z.x=Ks.coord;let he=Math.min(j.x,z.x)-50,ge=Math.max(j.x,z.x)+50,Le=Math.min(j.y,z.y)-50,Ee=Math.max(j.y,z.y)+50;for(let G of x){let U=Math.min(j.x,z.x),J=Math.max(j.x,z.x),ut=Math.min(j.y,z.y),Lt=Math.max(j.y,z.y);if(G.minX<J&&G.maxX>U&&G.minY<Lt&&G.maxY>ut)he=Math.min(he,G.minX-Ge),ge=Math.max(ge,G.maxX+Ge),Le=Math.min(Le,G.minY-Ge),Ee=Math.max(Ee,G.maxY+Ge)}for(let G of x){if(G.maxX<he||G.minX>ge||G.maxY<Le||G.minY>Ee)continue;let U=Ie;m("horizontal",G.minY-U,he,ge),m("horizontal",G.maxY+U,he,ge);let J=Re;m("vertical",G.minX-J,Le,Ee),m("vertical",G.maxX+J,Le,Ee)}m("horizontal",j.y,he,ge),m("horizontal",z.y,he,ge);let qs=g.filter((G)=>G.orientation==="horizontal"&&G.coord>=Le&&G.coord<=Ee),Zs=g.filter((G)=>G.orientation==="vertical"&&G.coord>=he&&G.coord<=ge),Fe=t((G,U)=>`${G.toFixed(1)},${U.toFixed(1)}`,"getKey"),Pe=Fe(j.x,j.y),po=Fe(z.x,z.y),ke=new Map,fn=new Map,dn=new Map,_e=new Set,be=[];ke.set(Pe,0),dn.set(Pe,"n"),be.push({key:Pe,f:Math.hypot(z.x-j.x,z.y-j.y),pt:j}),_e.add(Pe);let Yt=[],me=t((G,U)=>B(G,U,b.start,b.end),"checkSegmentBlocked"),un={x:z.x,y:j.y},Js=me(j,un),Qs=me(un,z),tr=Js||Qs,hn={x:j.x,y:z.y},er=me(j,hn),nr=me(hn,z),or=er||nr;if(!tr)if(Math.abs(j.y-z.y)<ft||Math.abs(j.x-z.x)<ft)Yt=[j,z];else Yt=[j,un,z];else if(!or)if(Math.abs(j.x-z.x)<ft)Yt=[j,z];else Yt=[j,hn,z];if(Yt.length===0)while(be.length>0){be.sort((gt,zt)=>gt.f-zt.f);let G=be.shift();if(_e.delete(G.key),G.key===po){let gt=po,zt=z;Yt=[zt];while(fn.has(gt)){let oe=fn.get(gt);Yt.unshift(oe),zt=oe,gt=Fe(oe.x,oe.y)}break}let U=G.pt.x,J=G.pt.y,ut=Zs.sort((gt,zt)=>gt.coord-zt.coord),Lt=ut.findIndex((gt)=>Math.abs(gt.coord-U)<1),Mt=qs.sort((gt,zt)=>gt.coord-zt.coord),Rt=Mt.findIndex((gt)=>Math.abs(gt.coord-J)<1),Ft=[];if(Lt>0)Ft.push({x:ut[Lt-1].coord,y:J});if(Lt>=0&&Lt<ut.length-1)Ft.push({x:ut[Lt+1].coord,y:J});if(Rt>0)Ft.push({x:U,y:Mt[Rt-1].coord});if(Rt>=0&&Rt<Mt.length-1)Ft.push({x:U,y:Mt[Rt+1].coord});for(let gt of Ft){let zt=Math.min(U,gt.x),oe=Math.max(U,gt.x),_t=Math.min(J,gt.y),$t=Math.max(J,gt.y);if(x.some((te)=>{if(te.nodeId===b.start||te.nodeId===b.end)return!1;if(zt!==oe)return te.minY<J&&te.maxY>J&&te.maxX>zt&&te.minX<oe;else return te.minX<U&&te.maxX>U&&te.maxY>_t&&te.minY<$t}))continue;let St=Fe(gt.x,gt.y),Vt=Math.abs(gt.x-U)+Math.abs(gt.y-J),Ct=M(f,G.pt,gt),vt=0,qt=z.x-j.x,Te=z.y-j.y,He=gt.x-U,gn=gt.y-J;if(Te>10&&gn<-5||Te<-10&&gn>5)vt=Math.abs(gn)*100;if(qt>10&&He<-5||qt<-10&&He>5)vt+=Math.abs(He)*50;let yo=0,xo=dn.get(G.key)??"n",bo=Math.abs(He)>ft?"h":"v";if(xo!=="n"&&xo!==bo)yo=50;let sr=Vt+Ct+vt+yo,De=(ke.get(G.key)??1/0)+sr,Io=Math.abs(z.x-gt.x)+Math.abs(z.y-gt.y);if(De<(ke.get(St)??1/0))if(fn.set(St,G.pt),ke.set(St,De),dn.set(St,bo),!_e.has(St))be.push({key:St,f:De+Io,pt:gt}),_e.add(St);else{let te=be.findIndex((rr)=>rr.key===St);if(te!==-1)be[te].f=De+Io}}}if(Yt.length===0)Yt=[j,{x:j.x,y:z.y},z];if(Yt.length>4){let G=Yt[0],U=Yt[Yt.length-1],J=Math.min(G.x,U.x),ut=Math.max(G.x,U.x),Lt=Math.min(G.y,U.y),Mt=Math.max(G.y,U.y);for(let _t of Yt)J=Math.min(J,_t.x),ut=Math.max(ut,_t.x),Lt=Math.min(Lt,_t.y),Mt=Math.max(Mt,_t.y);let Rt=ut>Math.max(G.x,U.x),Ft=J<Math.min(G.x,U.x);if(d){let _t=Re;if(Rt){let $t=Math.max(G.x,U.x),Pt=Math.min(G.y,U.y),St=Math.max(G.y,U.y),Vt=x.filter((Ct)=>Ct.minX<$t&&Ct.maxX>$t&&Ct.minY<St&&Ct.maxY>Pt);if(Vt.length>0){let Ct=Math.max(G.x,U.x);for(let vt of Vt){let qt=(vt.minX+vt.maxX)/2;if(vt.visualXHalfExtent===void 0||isNaN(vt.visualXHalfExtent))continue;let Te=qt+vt.visualXHalfExtent+_t;Ct=Math.max(Ct,Te)}if(!isNaN(Ct))ut=Ct}}if(Ft){let $t=x.filter((Pt)=>Pt.minX<Math.min(G.x,U.x)+_t&&Pt.minY<Math.max(G.y,U.y)&&Pt.maxY>Math.min(G.y,U.y));if($t.length>0){let Pt=Math.min(G.x,U.x);for(let St of $t){let Ct=(St.minX+St.maxX)/2-St.visualXHalfExtent-_t;Pt=Math.min(Pt,Ct)}J=Pt}}}let gt=t((_t)=>{let $t=U.y>G.y,Pt=x.filter((Ct)=>{let vt=Math.min(G.x,U.x)<Ct.maxX&&Math.max(G.x,U.x)>Ct.minX,qt=Math.min(G.y,U.y)<Ct.maxY&&Math.max(G.y,U.y)>Ct.minY;return vt&&qt}),St=Pt;if(d&&Pt.length>0){let Ct=Pt.filter((vt)=>vt.minX<_t&&vt.maxX>_t);if(Ct.length>0)St=Ct}if(St.length===0)return U.y;let Vt=Ie;if($t){let vt=Math.max(...St.map((qt)=>qt.maxY))+Vt;if(vt<U.y-ft)return vt}else{let vt=Math.min(...St.map((qt)=>qt.minY))-Vt;if(vt>U.y+ft)return vt}return U.y},"findBestReturnY"),zt=t((_t)=>{let $t=gt(_t),Pt={x:_t,y:G.y},St={x:_t,y:$t},Vt={x:U.x,y:$t},Ct=me(G,Pt),vt=me(Pt,St),qt=me(St,Vt),Te=$t!==U.y?me(Vt,U):!1;if(!Ct&&!vt&&!qt&&!Te){if(Math.abs($t-U.y)<ft)return[G,Pt,St,U];return[G,Pt,St,Vt,U]}return null},"trySimplifyWithDetourX"),oe=Rt&&!Ft?zt(ut):Ft&&!Rt?zt(J):null;if(oe)Yt=oe}let Gt=[w,...bt,...Yt,...Xt.reverse(),k];if(Gt.length>=3){let G=Gt[Gt.length-1],U=Gt[Gt.length-2],J=Gt[Gt.length-3],ut=Math.abs(J.y-U.y)<ft&&Math.abs(U.y-G.y)<ft,Lt=Math.abs(J.x-U.x)<ft&&Math.abs(U.x-G.x)<ft;if(ut){let Mt=Math.sign(U.x-J.x),Rt=Math.sign(G.x-J.x);if(Mt!==0&&Mt===Rt&&Math.abs(U.x-J.x)>Math.abs(G.x-J.x))Gt.splice(-2,1)}else if(Lt){let Mt=Math.sign(U.y-J.y),Rt=Math.sign(G.y-J.y);if(Mt!==0&&Mt===Rt&&Math.abs(U.y-J.y)>Math.abs(G.y-J.y))Gt.splice(-2,1)}}let ce=[Gt[0]];for(let G=1;G<Gt.length-1;G++){if(G===1){ce.push(Gt[G]);continue}let U=ce[ce.length-1],J=Gt[G],ut=Gt[G+1];if(Math.abs(U.y-J.y)<ft&&Math.abs(J.y-ut.y)<ft){let Lt=J.x>U.x,Mt=ut.x>J.x;if(Lt!==Mt){ce.push(J);continue}continue}if(Math.abs(U.x-J.x)<ft&&Math.abs(J.x-ut.x)<ft){let Lt=J.y>U.y,Mt=ut.y>J.y;if(Lt!==Mt){ce.push(J);continue}continue}ce.push(J)}ce.push(Gt[Gt.length-1]);for(let G=0;G<ce.length-1;G++){let U=ce[G],J=ce[G+1],ut=Math.abs(U.x-J.x)<ft?"vertical":"horizontal",Lt=ut==="vertical"?U.x:U.y,Mt=ut==="vertical"?Math.min(U.y,J.y):Math.min(U.x,J.x),Rt=ut==="vertical"?Math.max(U.y,J.y):Math.max(U.x,J.x),Ft=m(ut,Lt,Mt,Rt),gt={edgeIndex:f,segmentIndex:G,orientation:ut,pipe:Ft,trackIndex:0,from:Mt,to:Rt};if(u.push(gt),c[f].push(u.length-1),!Ft.tracks[0])Ft.tracks[0]={index:0,coord:Ft.coord,segments:[]};Ft.tracks[0].segments.push({edgeIndex:f,segmentIndex:G,from:Mt,to:Rt})}}let q=t((f,b)=>f.from<b.to&&b.from<f.to,"segmentsOverlap"),ot=t((f,b,S,L)=>{let w=!L.segments.some((K)=>(K.edgeIndex!==b.edgeIndex||K.segmentIndex!==b.segmentIndex)&&q(K,f)),k=!S.segments.some((K)=>(K.edgeIndex!==f.edgeIndex||K.segmentIndex!==f.segmentIndex)&&q(K,b));if(w&&k)return f.trackIndex=L.index,b.trackIndex=S.index,S.segments=[...S.segments.filter((K)=>K.edgeIndex!==f.edgeIndex||K.segmentIndex!==f.segmentIndex),{edgeIndex:b.edgeIndex,segmentIndex:b.segmentIndex,from:b.from,to:b.to}],L.segments=[...L.segments.filter((K)=>K.edgeIndex!==b.edgeIndex||K.segmentIndex!==b.segmentIndex),{edgeIndex:f.edgeIndex,segmentIndex:f.segmentIndex,from:f.from,to:f.to}],!0;return!1},"trySwapSegmentsAcrossTracks"),dt=t((f)=>{let b=f.tracks.length;return f.tracks[b]={index:b,coord:f.coord,segments:[]},b},"createNewTrack"),pt=t((f,b)=>{let S=f.pipe.tracks[f.trackIndex];S.segments=S.segments.filter((w)=>w.edgeIndex!==f.edgeIndex||w.segmentIndex!==f.segmentIndex),f.trackIndex=b,f.pipe.tracks[b].segments.push({edgeIndex:f.edgeIndex,segmentIndex:f.segmentIndex,from:f.from,to:f.to})},"moveSegmentToTrack"),It=t((f,b)=>{let S=c[f.edgeIndex];for(let L of S){let w=u[L];if(w.pipe===f.pipe)pt(w,b)}},"moveSegmentChainToTrack"),Et=t((f)=>{let b=c[f.edgeIndex],S=b.indexOf(u.indexOf(f)),L=[];if(S>0)L.push(u[b[S-1]]);if(S<b.length-1)L.push(u[b[S+1]]);return L},"getAdjacentSegmentsAlongEdge"),jt=t((f,b)=>{if(f.orientation===b.orientation)return!1;let S=f.orientation==="horizontal"?f:b,L=f.orientation==="horizontal"?b:f;return L.pipe.coord>S.from&&L.pipe.coord<S.to&&S.pipe.coord>L.from&&S.pipe.coord<L.to},"haveAnyCrossing"),Wt=t((f,b)=>{for(let S of f.tracks)if(!S.segments.some((w)=>(w.edgeIndex!==b.edgeIndex||w.segmentIndex!==b.segmentIndex)&&q(w,b)))return S.index;return-1},"findAvailableTrack"),Kt=t((f,b)=>{if(f.trackIndex===b.trackIndex)return q(f,b);let S=Et(f),L=Et(b);return S.some((w)=>L.some((k)=>jt(w,k)))},"segmentsConflict"),ne=t((f,b,S)=>{if(ot(f,b,f.pipe.tracks[f.trackIndex],b.pipe.tracks[b.trackIndex]))return;let L=Wt(f.pipe,b);S(b,L!==-1?L:dt(f.pipe))},"resolveTrackConflict"),Ce=t((f)=>{let b=0;for(let S=0;S<f.length;S++)for(let L=S+1;L<f.length;L++){let w=f[S],k=f[L];if(w.pipe!==k.pipe)continue;if(Kt(w,k))b++,ne(w,k,It)}return b},"resolveHandleConflicts"),ue=new Map,ve=t((f)=>{if(ue.has(f))return ue.get(f);let b=c[f];if(b.length===0){let Q={dest:0,deviation:0,base:0,delta:0};return ue.set(f,Q),Q}let L=u[b[0]].pipe.coord,w=L;for(let Q=1;Q<b.length;Q++){let j=u[b[Q]];if(j.orientation==="horizontal"){let{from:z,to:rt}=j;w=Math.abs(z-L)>Math.abs(rt-L)?z:rt;break}}let k=Math.abs(w-L),K={dest:w,deviation:k,base:L,delta:w-L};return ue.set(f,K),K},"getDestInfo"),rn=t(()=>{let f=0,b=new Map;for(let[L,w]of r.entries()){if(c[L].length===0)continue;if(!w.start)continue;if(!b.has(w.start))b.set(w.start,[]);b.get(w.start).push(L)}let S=t((L)=>{let w=r[L];if(!w.start||!w.end)return 0;let k=i.get(w.start),K=i.get(w.end);if(!k||!K)return 0;let Q=(K.x??0)-(k.x??0),j=(K.y??0)-(k.y??0);return Math.abs(Q)+Math.abs(j)},"getEdgeDistance");for(let L of b.values()){L.sort((k,K)=>{let Q=ve(k),j=ve(K);if(Math.abs(Q.deviation-j.deviation)>1)return Q.deviation-j.deviation;if(Math.abs(Q.dest-j.dest)>1)return Q.dest-j.dest;let z=S(k),rt=S(K);if(Math.abs(z-rt)>1)return rt-z;let ct=c[k].length,it=c[K].length;if(ct!==it)return ct-it;if(ct===1){let nt=c[k][0],bt=c[K][0];if(u[nt]&&u[bt]){let Bt=u[nt],Tt=u[bt],Xt=Math.abs(Bt.to-Bt.from),Qt=Math.abs(Tt.to-Tt.from);if(Math.abs(Xt-Qt)>1)return Xt-Qt}}return 0});let w=L.map((k)=>u[c[k][0]]);f+=Ce(w)}return f},"fixSourceHandleCrossings"),cn=t(()=>{let f=0,b=new Map;for(let[S,L]of r.entries()){if(c[S].length===0)continue;if(!L.end)continue;if(!b.has(L.end))b.set(L.end,[]);b.get(L.end).push(S)}for(let S of b.values()){S.sort((w,k)=>{let K=t((z)=>{let rt=c[z];if(rt.length<2)return 0;let ct=u[rt[rt.length-2]];return Math.abs(ct.to-ct.from)},"getDist"),Q=K(w),j=K(k);if(Math.abs(Q-j)>0.1)return Q-j;return w-k});let L=S.map((w)=>u[c[w][c[w].length-1]]);f+=Ce(L)}return f},"fixTargetHandleCrossings"),an=t(()=>{let f=0;for(let b of g){let S=[];for(let L of b.tracks)for(let w of L.segments){let k=c[w.edgeIndex].find((K)=>u[K].segmentIndex===w.segmentIndex);if(k!==void 0)S.push(u[k])}S.sort((L,w)=>L.edgeIndex-w.edgeIndex||L.segmentIndex-w.segmentIndex);for(let L=0;L<S.length;L++)for(let w=L+1;w<S.length;w++){let k=S[L],K=S[w];if(Kt(k,K))f++,ne(k,K,pt)}}return f},"fixPipeCrossings"),O=0,D=10;while(O<D){let f=0;if(f+=rn(),f+=cn(),f+=an(),f===0)break;O++}let X=new Map;for(let f of g){let b=[];f.tracks.forEach((L)=>{L.segments.forEach((w)=>{b.push({edgeIndex:w.edgeIndex,segmentIndex:w.segmentIndex,trackIndex:L.index,from:w.from,to:w.to})})}),b.sort((L,w)=>L.from-w.from);let S=[];if(b.length>0){let L=[b[0]],w=b[0].to;for(let k=1;k<b.length;k++){let K=b[k];if(K.from<w)L.push(K),w=Math.max(w,K.to);else S.push(L),L=[K],w=K.to}S.push(L)}for(let L of S){let w=new Set;L.forEach((nt)=>w.add(nt.trackIndex));let k=new Map;L.forEach((nt)=>{let bt=ve(nt.edgeIndex);k.set(nt.trackIndex,(k.get(nt.trackIndex)??0)+bt.delta)});let K=[...w].filter((nt)=>(k.get(nt)??0)<-1),Q=[...w].filter((nt)=>(k.get(nt)??0)>1),j=[...w].filter((nt)=>Math.abs(k.get(nt)??0)<=1);K.sort((nt,bt)=>(k.get(bt)??0)-(k.get(nt)??0)),Q.sort((nt,bt)=>(k.get(nt)??0)-(k.get(bt)??0));let z=t((nt,bt)=>{L.filter((Bt)=>Bt.trackIndex===nt).forEach((Bt)=>{let Tt=y.has(Bt.edgeIndex)?f.coord:bt;X.set(`${Bt.edgeIndex}-${Bt.segmentIndex}`,Tt)})},"assignCoord"),rt=0;for(let nt of K)rt++,z(nt,f.coord-rt*xn);if(j.length===0&&w.size>0){let nt=[...w].sort((Tt,Xt)=>Math.abs(k.get(Tt)??0)-Math.abs(k.get(Xt)??0))[0],bt=K.indexOf(nt);if(bt!==-1)K.splice(bt,1);let Bt=Q.indexOf(nt);if(Bt!==-1)Q.splice(Bt,1);j.push(nt)}let ct=0;for(let nt of j){if(ct===0)z(nt,f.coord);else{let bt=ct%2===1?1:-1,Bt=Math.ceil(ct/2);z(nt,f.coord+bt*Bt*xn*0.5)}ct++}let it=0;for(let nt of Q)it++,z(nt,f.coord+it*xn)}}for(let[f,b]of r.entries()){let S=c[f]??[];if(S.length===0)continue;let L=[],w=i.get(b.start),k=i.get(b.end),{pSrcPort:K,pDstPort:Q}=et(f,w,k),j=S.map((ct)=>{let it=u[ct],nt=X.get(`${it.edgeIndex}-${it.segmentIndex}`)??it.pipe.coord;return{orient:it.orientation,coord:nt,from:it.from,to:it.to}});L.push(K);for(let ct=0;ct<j.length;ct++){let it=j[ct],nt=L[L.length-1],bt=it.orient==="vertical"?nt.y:nt.x,Bt=it.orient==="vertical"?nt.x:nt.y,Tt=j[ct+1],Xt=ct<j.length-1;if(Math.abs(Bt-it.coord)>ft)L.push(Me(it,bt));if(Xt&&Tt.orient===it.orient){if(Math.abs(it.coord-Tt.coord)>ft){let Qt=it.orient==="vertical"?(bt+Tt.from)/2:Kn(it,Tt);L.push(Me(it,Qt),Me(Tt,Qt))}else if(ct===0||ct===j.length-2)L.push(Me(it,Kn(it,Tt)))}else if(Xt)L.push(Me(it,Tt.coord));else{let Qt=Math.abs(it.from-bt)<Math.abs(it.to-bt)?it.to:it.from;L.push(Me(it,Qt))}}let z=L[L.length-1];if(Math.abs(z.x-Q.x)>ft||Math.abs(z.y-Q.y)>ft)L.push(Q);let rt=[];if(L.length>0)rt.push(L[0]);for(let ct=1;ct<L.length;ct++){let it=L[ct],nt=rt[rt.length-1];if(Math.abs(it.x-nt.x)>ft||Math.abs(it.y-nt.y)>ft)rt.push(it)}b.points=rt}for(let f of r){let b=f.__originalEdge;if(b&&f.points)b.points=f.points}e.edges=(e.edges??[]).filter((f)=>!f.isLayoutOnly);let W=t((f,b)=>{let S=b.x??0,L=b.y??0,w=b.width??0,k=b.height??0;if(w<=0||k<=0)return f;let K=S-w/2,Q=S+w/2,j=L-k/2,z=L+k/2;if(f.x<K||f.x>Q||f.y<j||f.y>z)return f;let rt=f.x-K,ct=Q-f.x,it=f.y-j,nt=z-f.y,bt=Math.min(rt,ct,it,nt);if(bt===rt)return{x:K,y:f.y};if(bt===ct)return{x:Q,y:f.y};if(bt===it)return{x:f.x,y:j};return{x:f.x,y:z}},"nodeBoundaryClamp");for(let f of e.edges){let b=f.points;if(!b||b.length<2)continue;let{start:S,end:L}=f,w=S?i.get(S):void 0,k=L?i.get(L):void 0;if(w)b[0]=W(b[0],w);if(k)b[b.length-1]=W(b[b.length-1],k)}return e}t(Vs,"routeEdgesOrthogonal");function Us(e){return e.direction??"TB"}t(Us,"getSwimlaneDirection");function js(e){let n=wo(e),o=e.config.flowchart?.nodeSpacing??40,s=e.config.flowchart?.rankSpacing??100,r=e.config.swimlane?.ignoreCrossLaneEdges??!0,i=e.config.swimlane?.optimizeRanksByCrossings??!0,a=e.config.swimlane?.automaticLaneOrdering??!1,g=Us(e),{ordered:d,coordinates:h}=$s(n,{nodeGap:o,layerGap:s,ignoreCrossLaneEdges:r,optimizeRanksByCrossings:i,automaticLaneOrdering:a,direction:g});Ao(n,d,h,{nodeGap:o,layerGap:s});for(let x of e.edges??[])delete x.points;Vs(e,g);for(let x of e.edges??[])if(!x.curve||x.curve==="basis")x.curve="rounded";return as(e,g),cs(e),g}t(js,"runSwimlaneLayoutCore");function Ws(e){Ro(e);let n=No(e);e.nodes=n.nodes,e.edges=n.edges}t(Ws,"prepareSwimlaneLayout");var Ar=Li({prepareLayout:Ws,runLayoutCore:js,afterPaint:Eo});export{Ar as render};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{t}from"./index-qmh0h87h.js";import"./index-pe9j88d4.js";import{lf,cf}from"./index-31jrebvn.js";var o=t((r)=>`${lf(r)}
|
|
2
|
+
.swimlane.cluster:not([data-color-id]) rect {
|
|
3
|
+
stroke: ${r.clusterBorder} !important;
|
|
4
|
+
}
|
|
5
|
+
[data-look="neo"].cluster rect {
|
|
6
|
+
filter: none;
|
|
7
|
+
}
|
|
8
|
+
`,"getStyles"),m=o,D=cf({styles:m});export{D as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.freeze(JSON.parse('{"colors":{"activityBar.background":"#171520","activityBar.dropBackground":"#34294f66","activityBar.foreground":"#ffffffCC","activityBarBadge.background":"#f97e72","activityBarBadge.foreground":"#2a2139","badge.background":"#2a2139","badge.foreground":"#ffffff","breadcrumbPicker.background":"#232530","button.background":"#614D85","debugToolBar.background":"#463465","diffEditor.insertedTextBackground":"#0beb9935","diffEditor.removedTextBackground":"#fe445035","dropdown.background":"#232530","dropdown.listBackground":"#2a2139","editor.background":"#262335","editor.findMatchBackground":"#D18616bb","editor.findMatchHighlightBackground":"#D1861655","editor.findRangeHighlightBackground":"#34294f1a","editor.hoverHighlightBackground":"#463564","editor.lineHighlightBorder":"#7059AB66","editor.rangeHighlightBackground":"#49549539","editor.selectionBackground":"#ffffff20","editor.selectionHighlightBackground":"#ffffff20","editor.wordHighlightBackground":"#34294f88","editor.wordHighlightStrongBackground":"#34294f88","editorBracketMatch.background":"#34294f66","editorBracketMatch.border":"#495495","editorCodeLens.foreground":"#ffffff7c","editorCursor.background":"#241b2f","editorCursor.foreground":"#f97e72","editorError.foreground":"#fe4450","editorGroup.border":"#495495","editorGroup.dropBackground":"#4954954a","editorGroupHeader.tabsBackground":"#241b2f","editorGutter.addedBackground":"#206d4bd6","editorGutter.deletedBackground":"#fa2e46a4","editorGutter.modifiedBackground":"#b893ce8f","editorIndentGuide.activeBackground":"#A148AB80","editorIndentGuide.background":"#444251","editorLineNumber.activeForeground":"#ffffffcc","editorLineNumber.foreground":"#ffffff73","editorOverviewRuler.addedForeground":"#09f7a099","editorOverviewRuler.border":"#34294fb3","editorOverviewRuler.deletedForeground":"#fe445099","editorOverviewRuler.errorForeground":"#fe4450dd","editorOverviewRuler.findMatchForeground":"#D1861699","editorOverviewRuler.modifiedForeground":"#b893ce99","editorOverviewRuler.warningForeground":"#72f1b8cc","editorRuler.foreground":"#A148AB80","editorSuggestWidget.highlightForeground":"#f97e72","editorSuggestWidget.selectedBackground":"#ffffff36","editorWarning.foreground":"#72f1b8cc","editorWidget.background":"#171520DC","editorWidget.border":"#ffffff22","editorWidget.resizeBorder":"#ffffff44","errorForeground":"#fe4450","extensionButton.prominentBackground":"#f97e72","extensionButton.prominentHoverBackground":"#ff7edb","focusBorder":"#1f212b","foreground":"#ffffff","gitDecoration.addedResourceForeground":"#72f1b8cc","gitDecoration.deletedResourceForeground":"#fe4450","gitDecoration.ignoredResourceForeground":"#ffffff59","gitDecoration.modifiedResourceForeground":"#b893ceee","gitDecoration.untrackedResourceForeground":"#72f1b8","input.background":"#2a2139","inputOption.activeBorder":"#ff7edb99","inputValidation.errorBackground":"#fe445080","inputValidation.errorBorder":"#fe445000","list.activeSelectionBackground":"#ffffff20","list.activeSelectionForeground":"#ffffff","list.dropBackground":"#34294f66","list.errorForeground":"#fe4450E6","list.focusBackground":"#ffffff20","list.focusForeground":"#ffffff","list.highlightForeground":"#f97e72","list.hoverBackground":"#37294d99","list.hoverForeground":"#ffffff","list.inactiveFocusBackground":"#2a213999","list.inactiveSelectionBackground":"#ffffff20","list.inactiveSelectionForeground":"#ffffff","list.warningForeground":"#72f1b8bb","menu.background":"#463465","minimapGutter.addedBackground":"#09f7a099","minimapGutter.deletedBackground":"#fe4450","minimapGutter.modifiedBackground":"#b893ce","panelTitle.activeBorder":"#f97e72","peekView.border":"#495495","peekViewEditor.background":"#232530","peekViewEditor.matchHighlightBackground":"#D18616bb","peekViewResult.background":"#232530","peekViewResult.matchHighlightBackground":"#D1861655","peekViewResult.selectionBackground":"#2a213980","peekViewTitle.background":"#232530","pickerGroup.foreground":"#f97e72ea","progressBar.background":"#f97e72","scrollbar.shadow":"#2a2139","scrollbarSlider.activeBackground":"#9d8bca20","scrollbarSlider.background":"#9d8bca30","scrollbarSlider.hoverBackground":"#9d8bca50","selection.background":"#ffffff20","sideBar.background":"#241b2f","sideBar.dropBackground":"#34294f4c","sideBar.foreground":"#ffffff99","sideBarSectionHeader.background":"#241b2f","sideBarSectionHeader.foreground":"#ffffffca","statusBar.background":"#241b2f","statusBar.debuggingBackground":"#f97e72","statusBar.debuggingForeground":"#08080f","statusBar.foreground":"#ffffff80","statusBar.noFolderBackground":"#241b2f","statusBarItem.prominentBackground":"#2a2139","statusBarItem.prominentHoverBackground":"#34294f","tab.activeBorder":"#880088","tab.border":"#241b2f00","tab.inactiveBackground":"#262335","terminal.ansiBlue":"#03edf9","terminal.ansiBrightBlue":"#03edf9","terminal.ansiBrightCyan":"#03edf9","terminal.ansiBrightGreen":"#72f1b8","terminal.ansiBrightMagenta":"#ff7edb","terminal.ansiBrightRed":"#fe4450","terminal.ansiBrightYellow":"#fede5d","terminal.ansiCyan":"#03edf9","terminal.ansiGreen":"#72f1b8","terminal.ansiMagenta":"#ff7edb","terminal.ansiRed":"#fe4450","terminal.ansiYellow":"#f3e70f","terminal.foreground":"#ffffff","terminal.selectionBackground":"#ffffff20","terminalCursor.background":"#ffffff","terminalCursor.foreground":"#03edf9","textLink.activeForeground":"#ff7edb","textLink.foreground":"#f97e72","titleBar.activeBackground":"#241b2f","titleBar.inactiveBackground":"#241b2f","walkThrough.embeddedEditorBackground":"#232530","widget.shadow":"#2a2139"},"displayName":"Synthwave \'84","name":"synthwave-84","semanticHighlighting":true,"tokenColors":[{"scope":["comment","string.quoted.docstring.multi.python","string.quoted.docstring.multi.python punctuation.definition.string.begin.python","string.quoted.docstring.multi.python punctuation.definition.string.end.python"],"settings":{"fontStyle":"italic","foreground":"#848bbd"}},{"scope":["string.quoted","string.template","punctuation.definition.string"],"settings":{"foreground":"#ff8b39"}},{"scope":"string.template meta.embedded.line","settings":{"foreground":"#b6b1b1"}},{"scope":["variable","entity.name.variable"],"settings":{"foreground":"#ff7edb"}},{"scope":"variable.language","settings":{"fontStyle":"bold","foreground":"#fe4450"}},{"scope":"variable.parameter","settings":{"fontStyle":"italic"}},{"scope":["storage.type","storage.modifier"],"settings":{"foreground":"#fede5d"}},{"scope":"constant","settings":{"foreground":"#f97e72"}},{"scope":"string.regexp","settings":{"foreground":"#f97e72"}},{"scope":"constant.numeric","settings":{"foreground":"#f97e72"}},{"scope":"constant.language","settings":{"foreground":"#f97e72"}},{"scope":"constant.character.escape","settings":{"foreground":"#36f9f6"}},{"scope":"entity.name","settings":{"foreground":"#fe4450"}},{"scope":"entity.name.tag","settings":{"foreground":"#72f1b8"}},{"scope":["punctuation.definition.tag"],"settings":{"foreground":"#36f9f6"}},{"scope":"entity.other.attribute-name","settings":{"foreground":"#fede5d"}},{"scope":"entity.other.attribute-name.html","settings":{"fontStyle":"italic","foreground":"#fede5d"}},{"scope":["entity.name.type","meta.attribute.class.html"],"settings":{"foreground":"#fe4450"}},{"scope":"entity.other.inherited-class","settings":{"foreground":"#D50"}},{"scope":["entity.name.function","variable.function"],"settings":{"foreground":"#36f9f6"}},{"scope":["keyword.control.export.js","keyword.control.import.js"],"settings":{"foreground":"#72f1b8"}},{"scope":["constant.numeric.decimal.js"],"settings":{"foreground":"#2EE2FA"}},{"scope":"keyword","settings":{"foreground":"#fede5d"}},{"scope":"keyword.control","settings":{"foreground":"#fede5d"}},{"scope":"keyword.operator","settings":{"foreground":"#fede5d"}},{"scope":["keyword.operator.new","keyword.operator.expression","keyword.operator.logical"],"settings":{"foreground":"#fede5d"}},{"scope":"keyword.other.unit","settings":{"foreground":"#f97e72"}},{"scope":"support","settings":{"foreground":"#fe4450"}},{"scope":"support.function","settings":{"foreground":"#36f9f6"}},{"scope":"support.variable","settings":{"foreground":"#ff7edb"}},{"scope":["meta.object-literal.key","support.type.property-name"],"settings":{"foreground":"#ff7edb"}},{"scope":"punctuation.separator.key-value","settings":{"foreground":"#b6b1b1"}},{"scope":"punctuation.section.embedded","settings":{"foreground":"#fede5d"}},{"scope":["punctuation.definition.template-expression.begin","punctuation.definition.template-expression.end"],"settings":{"foreground":"#72f1b8"}},{"scope":["support.type.property-name.css","support.type.property-name.json"],"settings":{"foreground":"#72f1b8"}},{"scope":"switch-block.expr.js","settings":{"foreground":"#72f1b8"}},{"scope":"variable.other.constant.property.js, variable.other.property.js","settings":{"foreground":"#2ee2fa"}},{"scope":"constant.other.color","settings":{"foreground":"#f97e72"}},{"scope":"support.constant.font-name","settings":{"foreground":"#f97e72"}},{"scope":"entity.other.attribute-name.id","settings":{"foreground":"#36f9f6"}},{"scope":["entity.other.attribute-name.pseudo-element","entity.other.attribute-name.pseudo-class"],"settings":{"foreground":"#D50"}},{"scope":"support.function.misc.css","settings":{"foreground":"#fe4450"}},{"scope":["markup.heading","entity.name.section"],"settings":{"foreground":"#ff7edb"}},{"scope":["text.html","keyword.operator.assignment"],"settings":{"foreground":"#ffffffee"}},{"scope":"markup.quote","settings":{"fontStyle":"italic","foreground":"#b6b1b1cc"}},{"scope":"beginning.punctuation.definition.list","settings":{"foreground":"#ff7edb"}},{"scope":"markup.underline.link","settings":{"foreground":"#D50"}},{"scope":"string.other.link.description","settings":{"foreground":"#f97e72"}},{"scope":"meta.function-call.generic.python","settings":{"foreground":"#36f9f6"}},{"scope":"variable.parameter.function-call.python","settings":{"foreground":"#72f1b8"}},{"scope":"storage.type.cs","settings":{"foreground":"#fe4450"}},{"scope":"entity.name.variable.local.cs","settings":{"foreground":"#ff7edb"}},{"scope":["entity.name.variable.field.cs","entity.name.variable.property.cs"],"settings":{"foreground":"#ff7edb"}},{"scope":"constant.other.placeholder.c","settings":{"fontStyle":"italic","foreground":"#72f1b8"}},{"scope":["keyword.control.directive.include.c","keyword.control.directive.define.c"],"settings":{"foreground":"#72f1b8"}},{"scope":"storage.modifier.c","settings":{"foreground":"#fe4450"}},{"scope":"source.cpp keyword.operator","settings":{"foreground":"#fede5d"}},{"scope":"constant.other.placeholder.cpp","settings":{"fontStyle":"italic","foreground":"#72f1b8"}},{"scope":["keyword.control.directive.include.cpp","keyword.control.directive.define.cpp"],"settings":{"foreground":"#72f1b8"}},{"scope":"storage.modifier.specifier.const.cpp","settings":{"foreground":"#fe4450"}},{"scope":["source.elixir support.type.elixir","source.elixir meta.module.elixir entity.name.class.elixir"],"settings":{"foreground":"#36f9f6"}},{"scope":"source.elixir entity.name.function","settings":{"foreground":"#72f1b8"}},{"scope":["source.elixir constant.other.symbol.elixir","source.elixir constant.other.keywords.elixir"],"settings":{"foreground":"#36f9f6"}},{"scope":"source.elixir punctuation.definition.string","settings":{"foreground":"#72f1b8"}},{"scope":["source.elixir variable.other.readwrite.module.elixir","source.elixir variable.other.readwrite.module.elixir punctuation.definition.variable.elixir"],"settings":{"foreground":"#72f1b8"}},{"scope":"source.elixir .punctuation.binary.elixir","settings":{"fontStyle":"italic","foreground":"#ff7edb"}},{"scope":["entity.global.clojure"],"settings":{"fontStyle":"bold","foreground":"#36f9f6"}},{"scope":["storage.control.clojure"],"settings":{"fontStyle":"italic","foreground":"#36f9f6"}},{"scope":["meta.metadata.simple.clojure","meta.metadata.map.clojure"],"settings":{"fontStyle":"italic","foreground":"#fe4450"}},{"scope":["meta.quoted-expression.clojure"],"settings":{"fontStyle":"italic"}},{"scope":["meta.symbol.clojure"],"settings":{"foreground":"#ff7edbff"}},{"scope":"source.go","settings":{"foreground":"#ff7edbff"}},{"scope":"source.go meta.function-call.go","settings":{"foreground":"#36f9f6"}},{"scope":["source.go keyword.package.go","source.go keyword.import.go","source.go keyword.function.go","source.go keyword.type.go","source.go keyword.const.go","source.go keyword.var.go","source.go keyword.map.go","source.go keyword.channel.go","source.go keyword.control.go"],"settings":{"foreground":"#fede5d"}},{"scope":["source.go storage.type","source.go keyword.struct.go","source.go keyword.interface.go"],"settings":{"foreground":"#72f1b8"}},{"scope":["source.go constant.language.go","source.go constant.other.placeholder.go","source.go variable"],"settings":{"foreground":"#2EE2FA"}},{"scope":["markup.underline.link.markdown","markup.inline.raw.string.markdown"],"settings":{"fontStyle":"italic","foreground":"#72f1b8"}},{"scope":["string.other.link.title.markdown"],"settings":{"foreground":"#fede5d"}},{"scope":["markup.heading.markdown","entity.name.section.markdown"],"settings":{"fontStyle":"bold","foreground":"#ff7edb"}},{"scope":["markup.italic.markdown"],"settings":{"fontStyle":"italic","foreground":"#2EE2FA"}},{"scope":["markup.bold.markdown"],"settings":{"fontStyle":"bold","foreground":"#2EE2FA"}},{"scope":["punctuation.definition.quote.begin.markdown","markup.quote.markdown"],"settings":{"foreground":"#72f1b8"}},{"scope":["source.dart","source.python","source.scala"],"settings":{"foreground":"#ff7edbff"}},{"scope":["string.interpolated.single.dart"],"settings":{"foreground":"#f97e72"}},{"scope":["variable.parameter.dart"],"settings":{"foreground":"#72f1b8"}},{"scope":["constant.numeric.dart"],"settings":{"foreground":"#2EE2FA"}},{"scope":["variable.parameter.scala"],"settings":{"foreground":"#2EE2FA"}},{"scope":["meta.template.expression.scala"],"settings":{"foreground":"#72f1b8"}}],"type":"dark"}'));export{e as default};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import{t,ei,l,Ce,A,g,E,Nr,Md,R,p,h,Rr,ue,kn,Ye,zn}from"./index-qmh0h87h.js";var lt=function(){var r=t(function(w,a,f,d){for(f=f||{},d=w.length;d--;f[w[d]]=a);return f},"o"),e=[6,11,13,14,15,17,19,20,23,24],s=[1,12],i=[1,13],n=[1,14],u=[1,15],c=[1,16],o=[1,19],b=[1,20],k={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:t(function(a,f,d,m,v,y,N){var S=y.length-1;switch(v){case 1:return y[S-1];case 3:m.setDirection("LR");break;case 4:m.setDirection("TD");break;case 5:this.$=[];break;case 6:y[S-1].push(y[S]),this.$=y[S-1];break;case 7:case 8:this.$=y[S];break;case 9:case 10:this.$=[];break;case 11:m.getCommonDb().setDiagramTitle(y[S].substr(6)),this.$=y[S].substr(6);break;case 12:this.$=y[S].trim(),m.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=y[S].trim(),m.getCommonDb().setAccDescription(this.$);break;case 15:m.addSection(y[S].substr(8)),this.$=y[S].substr(8);break;case 18:m.addTask(y[S],0,""),this.$=y[S];break;case 19:m.addEvent(y[S].substr(2)),this.$=y[S];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},r(e,[2,5],{5:6}),r(e,[2,2]),r(e,[2,3]),r(e,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:s,15:i,17:n,19:u,20:c,21:17,22:18,23:o,24:b},r(e,[2,10],{1:[2,1]}),r(e,[2,6]),{12:21,14:s,15:i,17:n,19:u,20:c,21:17,22:18,23:o,24:b},r(e,[2,8]),r(e,[2,9]),r(e,[2,11]),{16:[1,22]},{18:[1,23]},r(e,[2,14]),r(e,[2,15]),r(e,[2,16]),r(e,[2,17]),r(e,[2,18]),r(e,[2,19]),r(e,[2,7]),r(e,[2,12]),r(e,[2,13])],defaultActions:{},parseError:t(function(a,f){if(f.recoverable)this.trace(a);else{var d=Error(a);throw d.hash=f,d}},"parseError"),parse:t(function(a){var f=this,d=[0],m=[],v=[null],y=[],N=this.table,S="",W=0,G=0,D=0,q=2,B=1,O=y.slice.call(arguments,1),H=Object.create(this.lexer),F={yy:{}};for(var U in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,U))F.yy[U]=this.yy[U];if(H.setInput(a,F.yy),F.yy.lexer=H,F.yy.parser=this,typeof H.yylloc>"u")H.yylloc={};var J=H.yylloc;y.push(J);var M=H.options&&H.options.ranges;if(typeof F.yy.parseError==="function")this.parseError=F.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function T(K){d.length=d.length-2*K,v.length=v.length-K,y.length=y.length-K}t(T,"popStack");function L(){var K=m.pop()||H.lex()||B;if(typeof K!=="number"){if(K instanceof Array)m=K,K=m.pop();K=f.symbols_[K]||K}return K}t(L,"lex");var I,P,V,C,at,tt,j={},et,X,ft,rt;while(!0){if(V=d[d.length-1],this.defaultActions[V])C=this.defaultActions[V];else{if(I===null||typeof I>"u")I=L();C=N[V]&&N[V][I]}if(typeof C>"u"||!C.length||!C[0]){var ot="";rt=[];for(et in N[V])if(this.terminals_[et]&&et>q)rt.push("'"+this.terminals_[et]+"'");if(H.showPosition)ot="Parse error on line "+(W+1)+`:
|
|
2
|
+
`+H.showPosition()+`
|
|
3
|
+
Expecting `+rt.join(", ")+", got '"+(this.terminals_[I]||I)+"'";else ot="Parse error on line "+(W+1)+": Unexpected "+(I==B?"end of input":"'"+(this.terminals_[I]||I)+"'");this.parseError(ot,{text:H.match,token:this.terminals_[I]||I,line:H.yylineno,loc:J,expected:rt})}if(C[0]instanceof Array&&C.length>1)throw Error("Parse Error: multiple actions possible at state: "+V+", token: "+I);switch(C[0]){case 1:if(d.push(I),v.push(H.yytext),y.push(H.yylloc),d.push(C[1]),I=null,!P){if(G=H.yyleng,S=H.yytext,W=H.yylineno,J=H.yylloc,D>0)D--}else I=P,P=null;break;case 2:if(X=this.productions_[C[1]][1],j.$=v[v.length-X],j._$={first_line:y[y.length-(X||1)].first_line,last_line:y[y.length-1].last_line,first_column:y[y.length-(X||1)].first_column,last_column:y[y.length-1].last_column},M)j._$.range=[y[y.length-(X||1)].range[0],y[y.length-1].range[1]];if(tt=this.performAction.apply(j,[S,G,W,F.yy,C[1],v,y].concat(O)),typeof tt<"u")return tt;if(X)d=d.slice(0,-1*X*2),v=v.slice(0,-1*X),y=y.slice(0,-1*X);d.push(this.productions_[C[1]][0]),v.push(j.$),y.push(j._$),ft=N[d[d.length-2]][d[d.length-1]],d.push(ft);break;case 3:return!0}}return!0},"parse")},_=function(){var w={EOF:1,parseError:t(function(f,d){if(this.yy.parser)this.yy.parser.parseError(f,d);else throw Error(f)},"parseError"),setInput:t(function(a,f){if(this.yy=f||this.yy||{},this._input=a,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 a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var f=a.match(/(?:\r\n?|\n).*/g);if(f)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),a},"input"),unput:t(function(a){var f=a.length,d=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var m=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),d.length-1)this.yylineno-=d.length-1;var v=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:d?(d.length===m.length?this.yylloc.first_column:0)+m[m.length-d.length].length-d[0].length:this.yylloc.first_column-f},this.options.ranges)this.yylloc.range=[v[0],v[0]+this.yyleng-f];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).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(a){this.unput(this.match.slice(a))},"less"),pastInput:t(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var a=this.match;if(a.length<20)a+=this._input.substr(0,20-a.length);return(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var a=this.pastInput(),f=Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
5
|
+
`+f+"^"},"showPosition"),test_match:t(function(a,f){var d,m,v;if(this.options.backtrack_lexer){if(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)v.yylloc.range=this.yylloc.range.slice(0)}if(m=a[0].match(/(?:\r\n?|\n).*/g),m)this.yylineno+=m.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:m?m[m.length-1].length-m[m.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],d=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(d)return d;else if(this._backtrack){for(var y in v)this[y]=v[y];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var a,f,d,m;if(!this._more)this.yytext="",this.match="";var v=this._currentRules();for(var y=0;y<v.length;y++)if(d=this._input.match(this.rules[v[y]]),d&&(!f||d[0].length>f[0].length)){if(f=d,m=y,this.options.backtrack_lexer)if(a=this.test_match(d,v[y]),a!==!1)return a;else if(this._backtrack){f=!1;continue}else return!1;else if(!this.options.flex)break}if(f){if(a=this.test_match(f,v[m]),a!==!1)return a;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var f=this.next();if(f)return f;else return this.lex()},"lex"),begin:t(function(f){this.conditionStack.push(f)},"begin"),popState:t(function(){var f=this.conditionStack.length-1;if(f>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(f){if(f=this.conditionStack.length-1-Math.abs(f||0),f>=0)return this.conditionStack[f];else return"INITIAL"},"topState"),pushState:t(function(f){this.begin(f)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(f,d,m,v){var y=v;switch(m){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin("acc_title"),15;break;case 10:return this.popState(),"acc_title_value";break;case 11:return this.begin("acc_descr"),17;break;case 12:return this.popState(),"acc_descr_value";break;case 13:this.begin("acc_descr_multiline");break;case 14:this.popState();break;case 15:return"acc_descr_multiline_value";case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}};return w}();k.lexer=_;function x(){this.yy={}}return t(x,"Parser"),x.prototype=k,k.Parser=x,new x}();lt.parser=lt;var Vt=lt,vt={};ei(vt,{addEvent:()=>Lt,addSection:()=>$t,addTask:()=>Ht,addTaskOrg:()=>Mt,clear:()=>St,default:()=>Ft,getCommonDb:()=>wt,getDirection:()=>Tt,getSections:()=>Nt,getTasks:()=>It,setDirection:()=>Et});var Q="",_t=0,ht="LR",dt=[],nt=[],Y=[],wt=t(()=>Md,"getCommonDb"),St=t(function(){dt.length=0,nt.length=0,Q="",Y.length=0,ht="LR",R()},"clear"),Et=t(function(r){ht=r},"setDirection"),Tt=t(function(){return ht},"getDirection"),$t=t(function(r){Q=r,dt.push(r)},"addSection"),Nt=t(function(){return dt},"getSections"),It=t(function(){let r=yt(),e=100,s=0;while(!r&&s<e)r=yt(),s++;return nt.push(...Y),nt},"getTasks"),Ht=t(function(r,e,s){let i={id:_t++,section:Q,type:Q,task:r,score:e?e:0,events:s?[s]:[]};Y.push(i)},"addTask"),Lt=t(function(r){Y.find((s)=>s.id===_t-1).events.push(r)},"addEvent"),Mt=t(function(r){let e={section:Q,type:Q,description:r,task:r,classes:[]};nt.push(e)},"addTaskOrg"),yt=t(function(){let r=t(function(s){return Y[s].processed},"compileTask"),e=!0;for(let[s,i]of Y.entries())r(s),e=e&&i.processed;return e},"compileTasks"),Ft={clear:St,getCommonDb:wt,getDirection:Tt,setDirection:Et,addSection:$t,getSections:Nt,getTasks:It,addTask:Ht,addTaskOrg:Mt,addEvent:Lt},At=0,it=t(function(r,e){let s=r.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),s.attr("rx",e.rx),s.attr("ry",e.ry),e.class!==void 0)s.attr("class",e.class);return s},"drawRect"),zt=t(function(r,e){let i=r.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=r.append("g");n.append("circle").attr("cx",e.cx-5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",e.cx+5).attr("cy",e.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function u(b){let k=Rr().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);b.append("path").attr("class","mouth").attr("d",k).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}t(u,"smile");function c(b){let k=Rr().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);b.append("path").attr("class","mouth").attr("d",k).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}t(c,"sad");function o(b){b.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}if(t(o,"ambivalent"),e.score>3)u(n);else if(e.score<3)c(n);else o(n);return i},"drawFace"),Ot=t(function(r,e){let s=r.append("circle");if(s.attr("cx",e.cx),s.attr("cy",e.cy),s.attr("class","actor-"+e.pos),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("r",e.r),s.class!==void 0)s.attr("class",s.class);if(e.title!==void 0)s.append("title").text(e.title);return s},"drawCircle"),Ct=t(function(r,e){let s=e.text.replace(/<br\s*\/?>/gi," "),i=r.append("text");if(i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class!==void 0)i.attr("class",e.class);let n=i.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.text(s),i},"drawText"),Gt=t(function(r,e){function s(n,u,c,o,b){return n+","+u+" "+(n+c)+","+u+" "+(n+c)+","+(u+o-b)+" "+(n+c-b*1.2)+","+(u+o)+" "+n+","+(u+o)}t(s,"genPoints");let i=r.append("polygon");i.attr("points",s(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+0.5*e.labelMargin,Ct(r,e)},"drawLabel"),Dt=t(function(r,e,s){let i=r.append("g"),n=ut();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=s.width,n.height=s.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,it(i,n),Rt(s)(e.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},s,e.colour)},"drawSection"),ct=-1,Kt=t(function(r,e,s,i){let n=e.x+s.width/2,u=r.append("g");ct++;let c=450;u.append("line").attr("id",i+"-task"+ct).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",c).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),zt(u,{cx:n,cy:300+(5-e.score)*30,score:e.score});let o=ut();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=s.width,o.height=s.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,it(u,o),Rt(s)(e.task,u,o.x,o.y,o.width,o.height,{class:"task"},s,e.colour)},"drawTask"),Ut=t(function(r,e){it(r,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),Xt=t(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),ut=t(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Rt=function(){function r(n,u,c,o,b,k,_,x){let w=u.append("text").attr("x",c+b/2).attr("y",o+k/2+5).style("font-color",x).style("text-anchor","middle").text(n);i(w,_)}t(r,"byText");function e(n,u,c,o,b,k,_,x,w){let{taskFontSize:a,taskFontFamily:f}=x,d=n.split(/<br\s*\/?>/gi);for(let m=0;m<d.length;m++){let v=m*a-a*(d.length-1)/2,y=u.append("text").attr("x",c+b/2).attr("y",o).attr("fill",w).style("text-anchor","middle").style("font-size",a).style("font-family",f);y.append("tspan").attr("x",c+b/2).attr("dy",v).text(d[m]),y.attr("y",o+k/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(y,_)}}t(e,"byTspan");function s(n,u,c,o,b,k,_,x){let w=u.append("switch"),f=w.append("foreignObject").attr("x",c).attr("y",o).attr("width",b).attr("height",k).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");f.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,w,c,o,b,k,_,x),i(f,_)}t(s,"byFo");function i(n,u){for(let c in u)if(c in u)n.attr(c,u[c])}return t(i,"_setTextAttrs"),function(n){return n.textPlacement==="fo"?s:n.textPlacement==="old"?r:e}}(),Zt=t(function(r,e){At=0,ct=-1,r.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics");function pt(r,e){r.each(function(){var s=h(this),i=s.text().split(/(\s+|<br>)/).reverse(),n,u=[],c=1.1,o=s.attr("y"),b=parseFloat(s.attr("dy")),k=s.text(null).append("tspan").attr("x",0).attr("y",o).attr("dy",b+"em");for(let _=0;_<i.length;_++)if(n=i[i.length-1-_],u.push(n),k.text(u.join(" ").trim()),k.node().getComputedTextLength()>e||n==="<br>"){if(u.pop(),k.text(u.join(" ").trim()),n==="<br>")u=[""];else u=[n];k=s.append("tspan").attr("x",0).attr("y",o).attr("dy",c+"em").text(n)}})}t(pt,"wrap");var jt=t(function(r,e,s,i,n,u=!1){let{theme:c,look:o}=i,b=c?.includes("redux"),k=i?.themeVariables?.THEME_COLOR_LIMIT??12,_=s%k-1,x=r.append("g");e.section=_,x.attr("class",(e.class?e.class+" ":"")+"timeline-node "+("section-"+_));let w=x.append("g"),a=x.append("g"),d=a.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(pt,e.width).node().getBBox(),m=i.fontSize?.replace?i.fontSize.replace("px",""):i.fontSize;if(e.height=d.height+m*1.1*0.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,a.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),b)a.attr("transform",`translate(${e.width/2}, ${u?e.padding/2+3:e.padding})`);if(Jt(w,e,_,n,i),o==="neo"){if(x.attr("data-look","neo"),b){let v=c.includes("dark"),y=r.node()?.ownerSVGElement??r.node(),N=h(y),S=N.attr("id")??"",W=S?`${S}-drop-shadow`:"drop-shadow";if(N.select(`#${W}`).empty()){let G=N.select("defs");(G.empty()?N.append("defs"):G).append("filter").attr("id",W).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity",v?"0.2":"0.06").attr("flood-color",v?"#FFFFFF":"#000000")}}}return e},"drawNode"),qt=t(function(r,e,s){let i=r.append("g"),u=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(pt,e.width).node().getBBox(),c=s.fontSize?.replace?s.fontSize.replace("px",""):s.fontSize;return i.remove(),u.height+c*1.1*0.5+e.padding},"getVirtualNodeHeight"),Jt=t(function(r,e,s,i,n){let{theme:u}=n,c=u?.includes("redux")?0:5,o=5,b=c>0?`M0 ${e.height-5} v${-e.height+10} q0,-${c},${c},-${c} h${e.width-10} q${c},0,${c},${c} v${e.height-5} H0 Z`:`M0 ${e.height-5} v${-(e.height-5)} h${e.width} v${e.height} H0 Z`;if(r.append("path").attr("id",i+"-node-"+At++).attr("class","node-bkg node-"+e.type).attr("d",b),!u?.includes("redux"))r.append("line").attr("class","node-line-"+s).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),z={drawRect:it,drawCircle:Ot,drawSection:Dt,drawText:Ct,drawLabel:Gt,drawTask:Kt,drawBackgroundRect:Ut,getTextObj:Xt,getNoteRect:ut,initGraphics:Zt,drawNode:jt,getVirtualNodeHeight:qt},Qt=t(function(r,e,s,i){let n=p(),{look:u,theme:c,themeVariables:o}=n,{useGradient:b,gradientStart:k,gradientStop:_}=o,x=n.timeline?.leftMargin??50;l.debug("timeline",i.db);let w=n.securityLevel,a;if(w==="sandbox")a=h("#i"+e);let d=(w==="sandbox"?h(a.nodes()[0].contentDocument.body):h("body")).select("#"+e);d.append("g");let m=i.db.getTasks(),v=i.db.getCommonDb().getDiagramTitle();l.debug("task",m),z.initGraphics(d,e);let y=i.db.getSections();l.debug("sections",y);let N=0,S=0,W=0,G=0,D=50+x,q=50;G=50;let B=0,O=!0;y.forEach(function(M){let T={number:B,descr:M,section:B,width:150,padding:20,maxHeight:N},L=z.getVirtualNodeHeight(d,T,n);l.debug("sectionHeight before draw",L),N=Math.max(N,L+20)});let H=0,F=0;l.debug("tasks.length",m.length);for(let[M,T]of m.entries()){let L={number:M,descr:T,section:T.section,width:150,padding:20,maxHeight:S},I=z.getVirtualNodeHeight(d,L,n);l.debug("taskHeight before draw",I),S=Math.max(S,I+20),H=Math.max(H,T.events.length);let P=0;for(let V of T.events){let C={descr:V,section:T.section,number:T.section,width:150,padding:20,maxHeight:50};P+=z.getVirtualNodeHeight(d,C,n)}if(T.events.length>0)P+=(T.events.length-1)*10;F=Math.max(F,P)}if(l.debug("maxSectionHeight before draw",N),l.debug("maxTaskHeight before draw",S),y&&y.length>0)y.forEach((M)=>{let T=m.filter((V)=>V.section===M),L={number:B,descr:M,section:B,width:200*Math.max(T.length,1)-50,padding:20,maxHeight:N};l.debug("sectionNode",L);let I=d.append("g"),P=z.drawNode(I,L,B,n,e);if(l.debug("sectionNode output",P),I.attr("transform",`translate(${D}, ${G})`),q+=N+50,T.length>0)mt(d,T,B,D,q,S,n,H,F,N,!1,e);D+=200*Math.max(T.length,1),q=G,B++});else O=!1,mt(d,m,B,D,q,S,n,H,F,N,!0,e);let U=d.node().getBBox();if(l.debug("bounds",U),v)d.append("text").text(v).attr("x",u==="neo"?U.x*2+x:U.width/2-x).attr("font-size","4ex").attr("font-weight","bold").attr("y",20);if(W=O?N+S+150:S+100,d.append("g").attr("class","lineWrapper").append("line").attr("x1",x).attr("y1",W).attr("x2",U.width+3*x).attr("y2",W).attr("stroke-width",4).attr("stroke","black").attr("marker-end",`url(#${e}-arrowhead)`),u==="neo"&&b&&c!=="neutral"){let M=d.select("defs"),L=(M.empty()?d.append("defs"):M).append("linearGradient").attr("id",d.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");L.append("stop").attr("offset","0%").attr("stop-color",k).attr("stop-opacity",1),L.append("stop").attr("offset","100%").attr("stop-color",_).attr("stop-opacity",1)}Nr(void 0,d,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),mt=t(function(r,e,s,i,n,u,c,o,b,k,_,x){for(let w of e){let a={descr:w.task,section:s,number:s,width:150,padding:20,maxHeight:u};l.debug("taskNode",a);let f=r.append("g").attr("class","taskWrapper"),m=z.drawNode(f,a,s,c,x).height;if(l.debug("taskHeight after draw",m),f.attr("transform",`translate(${i}, ${n})`),u=Math.max(u,m),w.events){let v=r.append("g").attr("class","lineWrapper"),y=u;n+=100,y=y+Yt(r,w.events,s,i,n,c,x),n-=100,v.append("line").attr("x1",i+95).attr("y1",n+u).attr("x2",i+95).attr("y2",n+u+100+b+100).attr("stroke-width",2).attr("stroke","black").attr("marker-end",`url(#${x}-arrowhead)`).attr("stroke-dasharray","5,5")}if(i=i+200,_&&!c.timeline?.disableMulticolor)s++}n=n-10},"drawTasks"),Yt=t(function(r,e,s,i,n,u,c){let o=0,b=n;n=n+100;for(let k of e){let _={descr:k,section:s,number:s,width:150,padding:20,maxHeight:50};l.debug("eventNode",_);let x=r.append("g").attr("class","eventWrapper"),a=z.drawNode(x,_,s,u,c,!0).height;o=o+a,x.attr("transform",`translate(${i}, ${n})`),n=n+10+a}return n=b,o},"drawEvents"),te={setConf:t(()=>{},"setConf"),draw:Qt},st=200,Z=5,ee=st+Z*2,gt=st+100,re=gt+Z*2,Wt=10,ne=0,kt=20,Pt=20,xt=30,Bt=50,ie=t(function(r,e,s,i){let n=p(),u=n.timeline?.leftMargin??50;l.debug("timeline",i.db);let c=ue(e);c.append("g");let o=i.db.getTasks(),b=i.db.getCommonDb().getDiagramTitle();l.debug("task",o),z.initGraphics(c);let k=i.db.getSections();l.debug("sections",k);let _=0,x=0,w=50+u,a=50,f=a,d=w,m=ee+Pt,v=re+Bt,y=d+m,N=0,S=k&&k.length>0,W=S?y:w+m,G=Math.max(50,m+v-Z*2);k.forEach(function(M){let T={number:N,descr:M,section:N,width:G,padding:Z,maxHeight:_},L=z.getVirtualNodeHeight(c,T,n);l.debug("sectionHeight before draw",L),_=Math.max(_,L)});let D=0;l.debug("tasks.length",o.length);for(let[M,T]of o.entries()){let L={number:M,descr:T,section:T.section,width:st,padding:Z,maxHeight:x},I=z.getVirtualNodeHeight(c,L,n);l.debug("taskHeight before draw",I),x=Math.max(x,I);let P=0;for(let V of T.events){let C={descr:V,section:T.section,number:T.section,width:gt,padding:Z,maxHeight:50};P+=z.getVirtualNodeHeight(c,C,n)}if(T.events.length>0)P+=(T.events.length-1)*Wt;D=Math.max(D,P)+ne}l.debug("maxSectionHeight before draw",_),l.debug("maxTaskHeight before draw",x);let B=Math.max(x,D)+xt;if(S)k.forEach((M)=>{let T=o.filter((j)=>j.section===M),L={number:N,descr:M,section:N,width:G,padding:Z,maxHeight:_};l.debug("sectionNode",L);let I=c.append("g"),P=z.drawNode(I,L,N,n);l.debug("sectionNode output",P);let V=W-m;I.attr("transform",`translate(${V}, ${a})`);let C=a+P.height+kt;if(T.length>0)bt(c,T,N,W,C,x,n,B,!1);let at=T.length,tt=P.height+kt+B*Math.max(at,1)-(at>0?xt*2:0);a+=tt,N++});else bt(c,o,N,W,a,x,n,B,!0);let O=c.node()?.getBBox();if(!O)throw Error("bbox not found");if(l.debug("bounds",O),b){if(c.append("text").text(b).attr("x",O.width/2-u).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),O=c.node()?.getBBox(),!O)throw Error("bbox not found");l.debug("bounds after title",O)}let[H]=kn(n.fontSize),F=(H??16)*2,U=(H??16)*0.5+20,J=c.append("g").attr("class","lineWrapper");J.append("line").attr("x1",W).attr("y1",f-F).attr("x2",W).attr("y2",O.y+O.height+U).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),J.lower(),Nr(void 0,c,n.timeline?.padding??50,n.timeline?.useMaxWidth??!1)},"draw"),bt=t(function(r,e,s,i,n,u,c,o,b){for(let k of e){let _={descr:k.task,section:s,number:s,width:st,padding:Z,maxHeight:u};l.debug("taskNode",_);let x=r.append("g").attr("class","taskWrapper"),w=z.drawNode(x,_,s,c),a=w.height;l.debug("taskHeight after draw",a);let f=i-Pt-w.width;if(x.attr("transform",`translate(${f}, ${n})`),u=Math.max(u,a),k.events&&k.events.length>0){let d=n,m=i+Bt;se(r,k.events,s,i,m,d,c)}if(n=n+o,b&&!c.timeline?.disableMulticolor)s++}},"drawTasks"),se=t(function(r,e,s,i,n,u,c){let o=u;for(let b of e){let k={descr:b,section:s,number:s,width:gt,padding:Z,maxHeight:0};l.debug("eventNode",k);let _=r.append("g").attr("class","eventWrapper"),w=z.drawNode(_,k,s,c).height;_.attr("transform",`translate(${n}, ${o})`);let a=r.append("g").attr("class","lineWrapper"),f=o+w/2;a.append("line").attr("x1",i).attr("y1",f).attr("x2",n).attr("y2",f).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5"),o=o+w+Wt}return o-u},"drawEvents"),ae={setConf:t(()=>{},"setConf"),draw:ie},oe=t((r)=>{let{theme:e}=E(),s=e?.includes("dark"),i=Ye(e,r.borderColorArray),n=r.svgId?.replace(/^#/,"")??"",u=n?`url(#${n}-drop-shadow)`:r.dropShadow??"none",c="";for(let o=0;o<zn(r.THEME_COLOR_LIMIT);o++){let b=`${17-3*o}`,k=i?r.borderColorArray[o%r.borderColorArray.length]:void 0,_=k??r.mainBkg,x=k??r.nodeBorder;c+=`
|
|
7
|
+
.section-${o-1} rect,
|
|
8
|
+
.section-${o-1} path,
|
|
9
|
+
.section-${o-1} circle {
|
|
10
|
+
fill: ${s&&i?r.mainBkg:_};
|
|
11
|
+
stroke: ${x};
|
|
12
|
+
stroke-width: ${r.strokeWidth};
|
|
13
|
+
filter: ${u};
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.section-${o-1} text {
|
|
17
|
+
fill: ${r.nodeBorder};
|
|
18
|
+
font-weight: ${r.fontWeight}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.node-icon-${o-1} {
|
|
22
|
+
font-size: 40px;
|
|
23
|
+
color: ${r["cScaleLabel"+o]};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.section-edge-${o-1} {
|
|
27
|
+
stroke: ${r["cScale"+o]};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.edge-depth-${o-1} {
|
|
31
|
+
stroke-width: ${b};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.section-${o-1} line {
|
|
35
|
+
stroke: ${r["cScaleInv"+o]};
|
|
36
|
+
stroke-width: 3;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.lineWrapper line {
|
|
40
|
+
stroke: ${r.nodeBorder};
|
|
41
|
+
stroke-width:${r.strokeWidth}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.disabled,
|
|
45
|
+
.disabled circle,
|
|
46
|
+
.disabled text {
|
|
47
|
+
fill: ${r.tertiaryColor??"lightgray"};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.disabled text {
|
|
51
|
+
fill: ${r.clusterBorder??"#efefef"};
|
|
52
|
+
}
|
|
53
|
+
`}return c},"genReduxSections"),le=t((r)=>{let e="",s=zn(r.THEME_COLOR_LIMIT);for(let i=0;i<s;i++)if(r["lineColor"+i]=r["lineColor"+i]??r["cScaleInv"+i],Ce(r["lineColor"+i]))r["lineColor"+i]=A(r["lineColor"+i],20);else r["lineColor"+i]=g(r["lineColor"+i],20);for(let i=0;i<s;i++){let n=""+(17-3*i);e+=`
|
|
54
|
+
.section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} path {
|
|
55
|
+
fill: ${r["cScale"+i]};
|
|
56
|
+
}
|
|
57
|
+
.section-${i-1} text {
|
|
58
|
+
fill: ${r["cScaleLabel"+i]};
|
|
59
|
+
}
|
|
60
|
+
.node-icon-${i-1} {
|
|
61
|
+
font-size: 40px;
|
|
62
|
+
color: ${r["cScaleLabel"+i]};
|
|
63
|
+
}
|
|
64
|
+
.section-edge-${i-1}{
|
|
65
|
+
stroke: ${r["cScale"+i]};
|
|
66
|
+
}
|
|
67
|
+
.edge-depth-${i-1}{
|
|
68
|
+
stroke-width: ${n};
|
|
69
|
+
}
|
|
70
|
+
.section-${i-1} line {
|
|
71
|
+
stroke: ${r["cScaleInv"+i]} ;
|
|
72
|
+
stroke-width: 3;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.lineWrapper line{
|
|
76
|
+
stroke: ${r["cScaleLabel"+i]} ;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.disabled, .disabled circle, .disabled text {
|
|
80
|
+
fill: ${r.tertiaryColor??"lightgray"};
|
|
81
|
+
}
|
|
82
|
+
.disabled text {
|
|
83
|
+
fill: ${r.clusterBorder??"#efefef"};
|
|
84
|
+
}
|
|
85
|
+
`}return e},"genSections"),ce=t((r)=>{let{theme:e}=E(),s=e?.includes("redux"),i=e==="neutral",n=r.svgId?.replace(/^#/,"")??"",u="";if(r.useGradient&&n&&r.THEME_COLOR_LIMIT&&!i){let c=zn(r.THEME_COLOR_LIMIT);for(let o=0;o<c;o++)u+=`
|
|
86
|
+
.section-${o-1}[data-look="neo"] rect,
|
|
87
|
+
.section-${o-1}[data-look="neo"] path,
|
|
88
|
+
.section-${o-1}[data-look="neo"] circle {
|
|
89
|
+
fill: ${r.mainBkg};
|
|
90
|
+
stroke: url(#${n}-gradient);
|
|
91
|
+
stroke-width: 2;
|
|
92
|
+
}
|
|
93
|
+
.section-${o-1}[data-look="neo"] line {
|
|
94
|
+
stroke: url(#${n}-gradient);
|
|
95
|
+
stroke-width: 2;
|
|
96
|
+
}`}return`
|
|
97
|
+
.edge {
|
|
98
|
+
stroke-width: 3;
|
|
99
|
+
}
|
|
100
|
+
${s?oe(r):le(r)}
|
|
101
|
+
${u}
|
|
102
|
+
.section-root rect, .section-root path, .section-root circle {
|
|
103
|
+
fill: ${r.git0};
|
|
104
|
+
}
|
|
105
|
+
.section-root text {
|
|
106
|
+
fill: ${r.gitBranchLabel0};
|
|
107
|
+
}
|
|
108
|
+
.icon-container {
|
|
109
|
+
height:100%;
|
|
110
|
+
display: flex;
|
|
111
|
+
justify-content: center;
|
|
112
|
+
align-items: center;
|
|
113
|
+
}
|
|
114
|
+
.edge {
|
|
115
|
+
fill: none;
|
|
116
|
+
}
|
|
117
|
+
.eventWrapper {
|
|
118
|
+
filter: brightness(120%);
|
|
119
|
+
}
|
|
120
|
+
`},"getStyles"),he=ce,de={setConf:t(()=>{},"setConf"),draw:t((r,e,s,i)=>{if((i?.db?.getDirection?.()??"LR")==="TD")return ae.draw(r,e,s,i);return te.draw(r,e,s,i)},"draw")},_e={db:vt,renderer:de,parser:Vt,styles:he};export{_e as diagram};
|