From db76225286267a866a082dddbfd13cb02285c7a9 Mon Sep 17 00:00:00 2001 From: Rick Hightower Date: Mon, 3 Aug 2026 09:12:42 -0500 Subject: [PATCH] Untrack dist-desktop; it is a build artifact [01KZ3Z46SDWDGVD3CFZ0Z1S9FB] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 126 files / 4.4 MB of generated desktop assets went in with the icon fix, because `npm run build:desktop` had just written them and `git add -A` does not know the difference. They are produced from .vercel/output/static on every build and embedded into the binary by the bundler — regenerable, never edited, and pure churn in a diff. --- .gitignore | 5 + .work/todo.jsonl | 1 + .../assets/abnfDiagram-VRR7QNED-DLdRCqX4.js | 1 - dist-desktop/assets/arc-DqK6O3qL.js | 1 - .../assets/architecture-TIHT7OUA-BWqzHezU.js | 1 - .../architectureDiagram-ZJ3FMSHR-DevFyLmc.js | 36 -- dist-desktop/assets/array-BifhSqXX.js | 1 - .../assets/blockDiagram-677ZJIJ3-Dn3HALPW.js | 132 ------- .../assets/c4Diagram-LMCZKHZV-B2PQ0JjZ.js | 10 - dist-desktop/assets/channel-C4fgBBJ4.js | 1 - .../assets/chunk-2Q5K7J3B-C1jixKkw.js | 1 - .../assets/chunk-32BRIVSS-DWU3ezKg.js | 1 - .../assets/chunk-52WLFC77-BOCvVCX1.js | 10 - .../assets/chunk-5FCAYU7R-DNtJmW0j.js | 1 - .../assets/chunk-5HE753X5-o8-OCfIL.js | 1 - .../assets/chunk-5JV3BV7I-DKfYBAeY.js | 1 - .../assets/chunk-5TONJI2A-DOX2waSJ.js | 2 - .../assets/chunk-5VM5RSS4-ZNzvKenW.js | 15 - .../assets/chunk-7BUUIJ7U-Bb538aSH.js | 1 - .../assets/chunk-BIQX33UG-CuPbkyWp.js | 1 - .../assets/chunk-C7G6YPKG-DW-1jWUA.js | 1 - .../assets/chunk-CQNSW5MT-BbEh_krl.js | 1 - .../assets/chunk-CYSBUYHQ-CbOq7Rc1.js | 1 - .../assets/chunk-EMLP6XTP-BoneA0Uo.js | 1 - .../assets/chunk-EX3LRPZG-CzaF5a2T.js | 231 ------------- .../assets/chunk-FWX5IMBZ-ComLEIwh.js | 2 - .../assets/chunk-HOUHSVGY-iJuv90UH.js | 1 - .../assets/chunk-ICXQ74PX-Czpgj8Uw.js | 2 - .../assets/chunk-JG7HCLWE-Dk4_aECj.js | 2 - .../assets/chunk-JWPE2WC7-DVXcaiue.js | 1 - .../assets/chunk-KEIR6QF5-Dj-OpFgW.js | 161 --------- .../assets/chunk-MOJQB5TN-Bju_yCKi.js | 88 ----- .../assets/chunk-MOZMSUNE-BgA8jCvb.js | 1 - .../assets/chunk-OGEWGWER-D-nWYRNR.js | 1 - .../assets/chunk-OSBZ3O6U-CX9EQ5t2.js | 1 - .../assets/chunk-PUDLZKDR-hlw4TonS.js | 156 --------- .../assets/chunk-Q4XR5HBZ-CQ8zkLYc.js | 70 ---- .../assets/chunk-QBLGF6JB-C9zGMqvP.js | 1 - .../assets/chunk-R7FJI6CG-BpBhcF6R.js | 1 - .../assets/chunk-RYQCIY6F-Dtr3kkSR.js | 1 - .../assets/chunk-U6XO7XAA-CR0BSRFR.js | 2 - .../assets/chunk-V7JOEXUC-Drt5hFEy.js | 206 ----------- .../assets/chunk-VAUOI2AC-AC9pRUsa.js | 1 - .../assets/chunk-VR4S4FIN-BTo4eV3J.js | 1 - .../assets/chunk-WYO6CB5R-Dv5kDyQC.js | 127 ------- .../assets/chunk-XXDRQBXY-Bq6zMMOx.js | 1 - .../assets/chunk-Y2CYZVJY-DsF7k-Jl.js | 1 - .../assets/chunk-YOTPTUD7-CjHV8V6f.js | 1 - .../assets/chunk-ZGVPDNZ5-DGInJAPD.js | 62 ---- .../assets/chunk-ZIRB5QZD-C6fEPe3t.js | 32 -- .../assets/classDiagram-OUVF2IWQ-D6qCu_tS.js | 1 - .../classDiagram-v2-EOCWNBFH-D6qCu_tS.js | 1 - dist-desktop/assets/client-CwgDvMJw.js | 3 - dist-desktop/assets/core-CwxXejkd.js | 1 - .../assets/cose-bilkent-JH36ORCC-ClqQrHIF.js | 1 - .../assets/cynefin-VYW2F7L2-4m18BxUG.js | 1 - .../cynefinDiagram-TSTJHNR4-CAKFzgf0.js | 62 ---- dist-desktop/assets/cytoscape.esm-CQFVGiJu.js | 321 ------------------ .../assets/dagre-VKFMJZFB-Cv2q18CS.js | 4 - dist-desktop/assets/dagre-dpRSp0QF.js | 1 - dist-desktop/assets/defaultLocale-C8Fc0cco.js | 1 - .../assets/diagram-FQU43EPY-C8Vn5v8I.js | 3 - .../assets/diagram-G47NLZAW-B5XCVQOu.js | 24 -- .../assets/diagram-NH7WQ7WH-Btsva5Mx.js | 24 -- .../assets/diagram-OA4YK3LP-B1b6NwZz.js | 30 -- .../assets/diagram-WEI45ONY-DzxhBgyP.js | 41 --- dist-desktop/assets/dist-qx0Iv9vM.js | 1 - .../assets/ebnfDiagram-CCIWWBDH-DiJBARG_.js | 1 - .../assets/erDiagram-Q63AITRT-BwmdWLsf.js | 85 ----- .../assets/eventmodeling-45OFAUF4-Dp0gpjhg.js | 1 - .../assets/flowDiagram-23GEKE2U-mMOyit70.js | 1 - .../assets/ganttDiagram-NO4QXBWP-BFiNAWzu.js | 292 ---------------- .../assets/gitGraph-TEB2WS4Q-Do0SQOtM.js | 1 - .../gitGraphDiagram-IHSO6WYX-CPtw8GFs.js | 106 ------ dist-desktop/assets/graphlib-DS17s2tU.js | 1 - dist-desktop/assets/index-CXgd9jpl.js | 22 -- dist-desktop/assets/info-DKCQHKI2-DIc7uC4I.js | 1 - .../assets/infoDiagram-FWYZ7A6U-BY1UX4W6.js | 2 - dist-desktop/assets/init-D6jRqBbL.js | 1 - dist-desktop/assets/input-mze7gZ5r.js | 1 - .../ishikawaDiagram-FXEZZL3T-Jj-U8PJa.js | 70 ---- .../journeyDiagram-5HDEW3XC-CCn-uNlj.js | 139 -------- .../kanban-definition-HUTT4EX6-CW9CwpnR.js | 89 ----- dist-desktop/assets/katex-B7rAX3Vi.js | 257 -------------- dist-desktop/assets/line-b9Ala942.js | 1 - dist-desktop/assets/linear-DhAcoVP9.js | 1 - dist-desktop/assets/login-xkhUej_P.js | 1 - dist-desktop/assets/map-BaFkSB1l.js | 1 - .../assets/mermaid-parser.core-Z7xZAZRH.js | 4 - dist-desktop/assets/mermaid.core-lwoghoVk.js | 11 - .../mindmap-definition-LN4V7U3C-Bib4remL.js | 96 ------ dist-desktop/assets/ordinal-hYBb2elL.js | 1 - .../assets/packet-7NZHBO7P-D2duWGIK.js | 1 - dist-desktop/assets/path-BWPyau1x.js | 1 - .../assets/pegDiagram-2B236MQR-CPt8QfP3.js | 1 - dist-desktop/assets/pie-RZYD4A2V-CynqTUkZ.js | 1 - .../assets/pieDiagram-ENE6RG2P-BBPaHS9V.js | 39 --- .../quadrantDiagram-ABIIQ3AL-UafGc-sH.js | 7 - .../assets/radar-I7S5WNFK-fIKE12aT.js | 1 - .../assets/railroad-3IZDKUUU-Bgx8HJTj.js | 1 - .../assets/railroad-abnf-AHOZXSZD-Nh6k60mH.js | 1 - .../assets/railroad-ebnf-EBAXGLYW-C74h3s_I.js | 1 - .../assets/railroad-peg-LSFZ7HO6-0hT-lN-u.js | 1 - .../railroadDiagram-RFXS5EU6-D7w_TgGh.js | 1 - dist-desktop/assets/react-BLJmJXjR.js | 1 - .../requirementDiagram-TGXJPOKE-Bk3E4jWx.js | 84 ----- .../assets/rolldown-runtime-aKtaBQYM.js | 1 - dist-desktop/assets/rough.esm-CSKSodPl.js | 1 - dist-desktop/assets/routes-BDn33g5C.js | 67 ---- .../assets/sankeyDiagram-HTMAVEWB-oWnBtA7E.js | 40 --- .../sequenceDiagram-DBY2YBRQ-CUG55-r_.js | 162 --------- .../assets/sizeCapture-X5ZJPWSS-B0uUizjq.js | 1 - dist-desktop/assets/src-UMNXGZaF.js | 1 - .../assets/stateDiagram-2N3HPSRC-u60ROSPY.js | 1 - .../stateDiagram-v2-6OUMAXLB-CR3Ef9C0.js | 1 - dist-desktop/assets/styles-Peq6Rcdg.css | 2 - .../assets/swimlanes-5IMT3BWC-hyAz1L8O.js | 2 - .../swimlanesDiagram-G3AALYLV-CGWZF_2o.js | 8 - .../timeline-definition-FHXFAJF6-DFMIv6oI.js | 120 ------- .../assets/treeView-QDETBFTQ-CygwzEgj.js | 1 - .../assets/treemap-6X3UGDF4-BbCXbaXr.js | 1 - dist-desktop/assets/utils-BTuSbA5p.js | 1 - .../assets/vennDiagram-L72KCM5P-DkYnXwoc.js | 34 -- .../assets/wardley-OPB4EBWU-BjXxCRf_.js | 1 - .../wardleyDiagram-EHGQE667-BewauNW1.js | 78 ----- .../xychartDiagram-FW5EYKEG-HaTasnSW.js | 7 - dist-desktop/desktop.json | 4 - dist-desktop/index.html | 16 - docs/roadmap.md | 38 +-- 129 files changed, 10 insertions(+), 3806 deletions(-) delete mode 100644 dist-desktop/assets/abnfDiagram-VRR7QNED-DLdRCqX4.js delete mode 100644 dist-desktop/assets/arc-DqK6O3qL.js delete mode 100644 dist-desktop/assets/architecture-TIHT7OUA-BWqzHezU.js delete mode 100644 dist-desktop/assets/architectureDiagram-ZJ3FMSHR-DevFyLmc.js delete mode 100644 dist-desktop/assets/array-BifhSqXX.js delete mode 100644 dist-desktop/assets/blockDiagram-677ZJIJ3-Dn3HALPW.js delete mode 100644 dist-desktop/assets/c4Diagram-LMCZKHZV-B2PQ0JjZ.js delete mode 100644 dist-desktop/assets/channel-C4fgBBJ4.js delete mode 100644 dist-desktop/assets/chunk-2Q5K7J3B-C1jixKkw.js delete mode 100644 dist-desktop/assets/chunk-32BRIVSS-DWU3ezKg.js delete mode 100644 dist-desktop/assets/chunk-52WLFC77-BOCvVCX1.js delete mode 100644 dist-desktop/assets/chunk-5FCAYU7R-DNtJmW0j.js delete mode 100644 dist-desktop/assets/chunk-5HE753X5-o8-OCfIL.js delete mode 100644 dist-desktop/assets/chunk-5JV3BV7I-DKfYBAeY.js delete mode 100644 dist-desktop/assets/chunk-5TONJI2A-DOX2waSJ.js delete mode 100644 dist-desktop/assets/chunk-5VM5RSS4-ZNzvKenW.js delete mode 100644 dist-desktop/assets/chunk-7BUUIJ7U-Bb538aSH.js delete mode 100644 dist-desktop/assets/chunk-BIQX33UG-CuPbkyWp.js delete mode 100644 dist-desktop/assets/chunk-C7G6YPKG-DW-1jWUA.js delete mode 100644 dist-desktop/assets/chunk-CQNSW5MT-BbEh_krl.js delete mode 100644 dist-desktop/assets/chunk-CYSBUYHQ-CbOq7Rc1.js delete mode 100644 dist-desktop/assets/chunk-EMLP6XTP-BoneA0Uo.js delete mode 100644 dist-desktop/assets/chunk-EX3LRPZG-CzaF5a2T.js delete mode 100644 dist-desktop/assets/chunk-FWX5IMBZ-ComLEIwh.js delete mode 100644 dist-desktop/assets/chunk-HOUHSVGY-iJuv90UH.js delete mode 100644 dist-desktop/assets/chunk-ICXQ74PX-Czpgj8Uw.js delete mode 100644 dist-desktop/assets/chunk-JG7HCLWE-Dk4_aECj.js delete mode 100644 dist-desktop/assets/chunk-JWPE2WC7-DVXcaiue.js delete mode 100644 dist-desktop/assets/chunk-KEIR6QF5-Dj-OpFgW.js delete mode 100644 dist-desktop/assets/chunk-MOJQB5TN-Bju_yCKi.js delete mode 100644 dist-desktop/assets/chunk-MOZMSUNE-BgA8jCvb.js delete mode 100644 dist-desktop/assets/chunk-OGEWGWER-D-nWYRNR.js delete mode 100644 dist-desktop/assets/chunk-OSBZ3O6U-CX9EQ5t2.js delete mode 100644 dist-desktop/assets/chunk-PUDLZKDR-hlw4TonS.js delete mode 100644 dist-desktop/assets/chunk-Q4XR5HBZ-CQ8zkLYc.js delete mode 100644 dist-desktop/assets/chunk-QBLGF6JB-C9zGMqvP.js delete mode 100644 dist-desktop/assets/chunk-R7FJI6CG-BpBhcF6R.js delete mode 100644 dist-desktop/assets/chunk-RYQCIY6F-Dtr3kkSR.js delete mode 100644 dist-desktop/assets/chunk-U6XO7XAA-CR0BSRFR.js delete mode 100644 dist-desktop/assets/chunk-V7JOEXUC-Drt5hFEy.js delete mode 100644 dist-desktop/assets/chunk-VAUOI2AC-AC9pRUsa.js delete mode 100644 dist-desktop/assets/chunk-VR4S4FIN-BTo4eV3J.js delete mode 100644 dist-desktop/assets/chunk-WYO6CB5R-Dv5kDyQC.js delete mode 100644 dist-desktop/assets/chunk-XXDRQBXY-Bq6zMMOx.js delete mode 100644 dist-desktop/assets/chunk-Y2CYZVJY-DsF7k-Jl.js delete mode 100644 dist-desktop/assets/chunk-YOTPTUD7-CjHV8V6f.js delete mode 100644 dist-desktop/assets/chunk-ZGVPDNZ5-DGInJAPD.js delete mode 100644 dist-desktop/assets/chunk-ZIRB5QZD-C6fEPe3t.js delete mode 100644 dist-desktop/assets/classDiagram-OUVF2IWQ-D6qCu_tS.js delete mode 100644 dist-desktop/assets/classDiagram-v2-EOCWNBFH-D6qCu_tS.js delete mode 100644 dist-desktop/assets/client-CwgDvMJw.js delete mode 100644 dist-desktop/assets/core-CwxXejkd.js delete mode 100644 dist-desktop/assets/cose-bilkent-JH36ORCC-ClqQrHIF.js delete mode 100644 dist-desktop/assets/cynefin-VYW2F7L2-4m18BxUG.js delete mode 100644 dist-desktop/assets/cynefinDiagram-TSTJHNR4-CAKFzgf0.js delete mode 100644 dist-desktop/assets/cytoscape.esm-CQFVGiJu.js delete mode 100644 dist-desktop/assets/dagre-VKFMJZFB-Cv2q18CS.js delete mode 100644 dist-desktop/assets/dagre-dpRSp0QF.js delete mode 100644 dist-desktop/assets/defaultLocale-C8Fc0cco.js delete mode 100644 dist-desktop/assets/diagram-FQU43EPY-C8Vn5v8I.js delete mode 100644 dist-desktop/assets/diagram-G47NLZAW-B5XCVQOu.js delete mode 100644 dist-desktop/assets/diagram-NH7WQ7WH-Btsva5Mx.js delete mode 100644 dist-desktop/assets/diagram-OA4YK3LP-B1b6NwZz.js delete mode 100644 dist-desktop/assets/diagram-WEI45ONY-DzxhBgyP.js delete mode 100644 dist-desktop/assets/dist-qx0Iv9vM.js delete mode 100644 dist-desktop/assets/ebnfDiagram-CCIWWBDH-DiJBARG_.js delete mode 100644 dist-desktop/assets/erDiagram-Q63AITRT-BwmdWLsf.js delete mode 100644 dist-desktop/assets/eventmodeling-45OFAUF4-Dp0gpjhg.js delete mode 100644 dist-desktop/assets/flowDiagram-23GEKE2U-mMOyit70.js delete mode 100644 dist-desktop/assets/ganttDiagram-NO4QXBWP-BFiNAWzu.js delete mode 100644 dist-desktop/assets/gitGraph-TEB2WS4Q-Do0SQOtM.js delete mode 100644 dist-desktop/assets/gitGraphDiagram-IHSO6WYX-CPtw8GFs.js delete mode 100644 dist-desktop/assets/graphlib-DS17s2tU.js delete mode 100644 dist-desktop/assets/index-CXgd9jpl.js delete mode 100644 dist-desktop/assets/info-DKCQHKI2-DIc7uC4I.js delete mode 100644 dist-desktop/assets/infoDiagram-FWYZ7A6U-BY1UX4W6.js delete mode 100644 dist-desktop/assets/init-D6jRqBbL.js delete mode 100644 dist-desktop/assets/input-mze7gZ5r.js delete mode 100644 dist-desktop/assets/ishikawaDiagram-FXEZZL3T-Jj-U8PJa.js delete mode 100644 dist-desktop/assets/journeyDiagram-5HDEW3XC-CCn-uNlj.js delete mode 100644 dist-desktop/assets/kanban-definition-HUTT4EX6-CW9CwpnR.js delete mode 100644 dist-desktop/assets/katex-B7rAX3Vi.js delete mode 100644 dist-desktop/assets/line-b9Ala942.js delete mode 100644 dist-desktop/assets/linear-DhAcoVP9.js delete mode 100644 dist-desktop/assets/login-xkhUej_P.js delete mode 100644 dist-desktop/assets/map-BaFkSB1l.js delete mode 100644 dist-desktop/assets/mermaid-parser.core-Z7xZAZRH.js delete mode 100644 dist-desktop/assets/mermaid.core-lwoghoVk.js delete mode 100644 dist-desktop/assets/mindmap-definition-LN4V7U3C-Bib4remL.js delete mode 100644 dist-desktop/assets/ordinal-hYBb2elL.js delete mode 100644 dist-desktop/assets/packet-7NZHBO7P-D2duWGIK.js delete mode 100644 dist-desktop/assets/path-BWPyau1x.js delete mode 100644 dist-desktop/assets/pegDiagram-2B236MQR-CPt8QfP3.js delete mode 100644 dist-desktop/assets/pie-RZYD4A2V-CynqTUkZ.js delete mode 100644 dist-desktop/assets/pieDiagram-ENE6RG2P-BBPaHS9V.js delete mode 100644 dist-desktop/assets/quadrantDiagram-ABIIQ3AL-UafGc-sH.js delete mode 100644 dist-desktop/assets/radar-I7S5WNFK-fIKE12aT.js delete mode 100644 dist-desktop/assets/railroad-3IZDKUUU-Bgx8HJTj.js delete mode 100644 dist-desktop/assets/railroad-abnf-AHOZXSZD-Nh6k60mH.js delete mode 100644 dist-desktop/assets/railroad-ebnf-EBAXGLYW-C74h3s_I.js delete mode 100644 dist-desktop/assets/railroad-peg-LSFZ7HO6-0hT-lN-u.js delete mode 100644 dist-desktop/assets/railroadDiagram-RFXS5EU6-D7w_TgGh.js delete mode 100644 dist-desktop/assets/react-BLJmJXjR.js delete mode 100644 dist-desktop/assets/requirementDiagram-TGXJPOKE-Bk3E4jWx.js delete mode 100644 dist-desktop/assets/rolldown-runtime-aKtaBQYM.js delete mode 100644 dist-desktop/assets/rough.esm-CSKSodPl.js delete mode 100644 dist-desktop/assets/routes-BDn33g5C.js delete mode 100644 dist-desktop/assets/sankeyDiagram-HTMAVEWB-oWnBtA7E.js delete mode 100644 dist-desktop/assets/sequenceDiagram-DBY2YBRQ-CUG55-r_.js delete mode 100644 dist-desktop/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js delete mode 100644 dist-desktop/assets/src-UMNXGZaF.js delete mode 100644 dist-desktop/assets/stateDiagram-2N3HPSRC-u60ROSPY.js delete mode 100644 dist-desktop/assets/stateDiagram-v2-6OUMAXLB-CR3Ef9C0.js delete mode 100644 dist-desktop/assets/styles-Peq6Rcdg.css delete mode 100644 dist-desktop/assets/swimlanes-5IMT3BWC-hyAz1L8O.js delete mode 100644 dist-desktop/assets/swimlanesDiagram-G3AALYLV-CGWZF_2o.js delete mode 100644 dist-desktop/assets/timeline-definition-FHXFAJF6-DFMIv6oI.js delete mode 100644 dist-desktop/assets/treeView-QDETBFTQ-CygwzEgj.js delete mode 100644 dist-desktop/assets/treemap-6X3UGDF4-BbCXbaXr.js delete mode 100644 dist-desktop/assets/utils-BTuSbA5p.js delete mode 100644 dist-desktop/assets/vennDiagram-L72KCM5P-DkYnXwoc.js delete mode 100644 dist-desktop/assets/wardley-OPB4EBWU-BjXxCRf_.js delete mode 100644 dist-desktop/assets/wardleyDiagram-EHGQE667-BewauNW1.js delete mode 100644 dist-desktop/assets/xychartDiagram-FW5EYKEG-HaTasnSW.js delete mode 100644 dist-desktop/desktop.json delete mode 100644 dist-desktop/index.html diff --git a/.gitignore b/.gitignore index c58ee17..174e7fd 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,8 @@ test-results/ # machine-local port assignments (see scripts/dev-ports.mjs) .dev-ports.json screenshots/ui/ + +# Generated by `npm run build:desktop` from .vercel/output/static — the +# Tauri bundler embeds these into the binary, so they are a build artifact, +# not a source. 126 files / 4.4 MB slipped in with the icon fix. +dist-desktop/ diff --git a/.work/todo.jsonl b/.work/todo.jsonl index b519ebe..10539e1 100644 --- a/.work/todo.jsonl +++ b/.work/todo.jsonl @@ -36,3 +36,4 @@ {"actor":"richardhightower","ev":"01KZ2N3TNS3RD3WJDE8J92W3JQ","item":"01KYZ8XMGPWDJ8KXXK23KV47NT","op":"close","set":{"resolution":"All 11 screens specified, 47 wireframes, 30 captures, rubrics walked; 3 defects found and fixed","status":"done"},"ts":"2026-08-03T01:51:47Z"} {"actor":"richardhightower","ev":"01KZ2N3TV3T28RPS0ASD1F4QYT","item":"01KYZ8X1X1V76HYNK8B5JYMD9W","op":"close","set":{"resolution":"Loop complete end to end: spec, wireframe, addressability, capture, rubric walk, CI gate","status":"done"},"ts":"2026-08-03T01:51:48Z"} {"actor":"richardhightower","ev":"01KZ3Z46SDCBA57YHAF7C3HCTD","item":"01KZ3Z46SDWDGVD3CFZ0Z1S9FB","op":"create","set":{"discovered_during":"01KYZ8X1X1V76HYNK8B5JYMD9W","kind":"bug","level":"task","milestone":"v0.3.1","priority":"P2","status":"todo","title":"cargo tauri build fails: scrubbed icon filename has no image extension","unplanned":true},"ts":"2026-08-03T14:06:00Z"} +{"actor":"richardhightower","ev":"01KZ3ZFQX1CHNG289DAEJ2AKDV","item":"01KZ3Z46SDWDGVD3CFZ0Z1S9FB","op":"close","set":{"resolution":"Icon renamed to 128x128@2x.png with the config; cargo tauri build now produces .app and .dmg","status":"done"},"ts":"2026-08-03T14:12:18Z"} diff --git a/dist-desktop/assets/abnfDiagram-VRR7QNED-DLdRCqX4.js b/dist-desktop/assets/abnfDiagram-VRR7QNED-DLdRCqX4.js deleted file mode 100644 index 3198c78..0000000 --- a/dist-desktop/assets/abnfDiagram-VRR7QNED-DLdRCqX4.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-5HE753X5-o8-OCfIL.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-UMNXGZaF.js";import"./chunk-WYO6CB5R-Dv5kDyQC.js";import"./chunk-VAUOI2AC-AC9pRUsa.js";import{n as r,r as i,t as a}from"./chunk-MOJQB5TN-Bju_yCKi.js";import{t as o}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as s}from"./mermaid-parser.core-Z7xZAZRH.js";var c=e().RailroadAbnf.parser.LangiumParser,l=t(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformAlternation`),u=t(e=>{let t=e.elements.map(f);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformConcatenation`),d=t(e=>{if(e.includes(`*`)){let[t,n]=e.split(`*`);return{min:t?parseInt(t,10):0,max:n?parseInt(n,10):1/0}}let t=parseInt(e,10);return{min:t,max:t}},`parseRepeat`),f=t(e=>{let t=p(e.primary);if(!e.repeat)return t;let{min:n,max:r}=d(e.repeat);return n===0&&r===1?{type:`optional`,element:t}:{type:`repetition`,element:t,min:n,max:r}},`transformElement`),p=t(e=>{switch(e.$type){case`AbnfStringLiteral`:return{type:`terminal`,value:e.value};case`AbnfNumVal`:return{type:`terminal`,value:e.value};case`AbnfRuleName`:return{type:`nonterminal`,name:e.name};case`AbnfGroup`:return l(e.element);case`AbnfOptionalGroup`:return{type:`optional`,element:l(e.element)};default:throw Error(`Unsupported ABNF primary node: ${e.$type}`)}},`transformPrimary`),m=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=t(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(m(e)))},`populateDb`),g={parser:{parse:t(e=>{a.clear(),n.debug(`[ABNF Parser] Starting Langium parse`);let t=c.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new s(t);let r=t.value;n.debug(`[ABNF Parser] Parsed rules:`,r.rules.length),h(r),n.debug(`[ABNF Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{g as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/arc-DqK6O3qL.js b/dist-desktop/assets/arc-DqK6O3qL.js deleted file mode 100644 index 5046079..0000000 --- a/dist-desktop/assets/arc-DqK6O3qL.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e,t}from"./path-BWPyau1x.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-qx0Iv9vM.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,r,i,a,o){var c=e-n,l=t-r,u=(o?a:-a)/d(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=r+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=i-a,w=m*_-g*h,T=(x<0?-1:1)*d(s(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+s.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-r,_=T.apply(this,arguments)-r,v=l(_-g),k=_>g;if(D||=e=O(),h1e-12))D.moveTo(0,0);else if(v>c-1e-12)D.moveTo(h*u(g),h*a(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*u(_),m*a(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=28)})([(function(e,t,n){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r}),(function(e,t,n){var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),c=n(5);function l(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,n!=null&&t!=null?this.rect=new a(t.x,t.y,n.width,n.height):this.rect=new a}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(e){this.rect.width=e},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(e){this.rect.height=e},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},l.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},l.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},l.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},l.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},l.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(!(r.source==n||r.target==n))throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},l.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},l.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;it?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal==`right`&&this.setWidth(t+this.labelWidth)),this.labelHeight&&(this.labelPosVertical==`top`?(this.rect.y-=this.labelHeight,this.setHeight(n+this.labelHeight)):this.labelPosVertical==`center`&&this.labelHeight>n?(this.rect.y-=(this.labelHeight-n)/2,this.setHeight(this.labelHeight)):this.labelPosVertical==`bottom`&&this.setHeight(n+this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},l.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new c(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=l}),(function(e,t,n){var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,n){function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(0),o=n(7),s=n(3),c=n(1),l=n(13),u=n(12),d=n(11);function f(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in f.prototype=Object.create(r.prototype),r)f[p]=r[p];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}else{var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(!(t.owner==n.owner&&t.owner==this))throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null}},f.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(!(t.owner!=null&&t.owner==this))throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a-1&&u>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(l,1),r.target!=r.source&&r.target.edges.splice(u,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},f.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,c=0;cn&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new u(this.left,this.top))},f.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d,f=this.nodes,p=f.length,m=0;mo&&(t=o),nc&&(r=c),ao&&(t=o),nc&&(r=c),a=this.nodes.length){var c=0;n.forEach(function(t){t.owner==e&&c++}),c==this.nodes.length&&(this.isConnected=!0)}},e.exports=f}),(function(e,t,n){var r,i=n(1);function a(e){r=n(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}else{i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(!(a!=null&&a.getGraphManager()==this))throw`Source not in this graph mgr!`;if(!(o!=null&&o.getGraphManager()==this))throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),!(n.source!=null&&n.target!=null))throw`Edge source and/or target is null!`;if(!(n.source.edges.indexOf(n)==-1&&n.target.edges.indexOf(n)==-1))throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n}},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]o)return n[0]=r,n[1]=c,n[2]=a,n[3]=y,!1;if(ia)return n[0]=s,n[1]=i,n[2]=_,n[3]=o,!1;if(ra?(n[0]=u,n[1]=d,C=!0):(n[0]=l,n[1]=c,C=!0):T===D&&(r>a?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=d,C=!0)),-E===D?a>r?(n[2]=v,n[3]=y,w=!0):(n[2]=_,n[3]=g,w=!0):E===D&&(a>r?(n[2]=h,n[3]=g,w=!0):(n[2]=b,n[3]=y,w=!0)),C&&w)return!1;if(r>a?i>o?(O=this.getCardinalDirection(T,D,4),k=this.getCardinalDirection(E,D,2)):(O=this.getCardinalDirection(-T,D,3),k=this.getCardinalDirection(-E,D,1)):i>o?(O=this.getCardinalDirection(-T,D,1),k=this.getCardinalDirection(-E,D,3)):(O=this.getCardinalDirection(T,D,2),k=this.getCardinalDirection(E,D,4)),!C)switch(O){case 1:j=c,A=r+-m/D,n[0]=A,n[1]=j;break;case 2:A=f,j=i+p*D,n[0]=A,n[1]=j;break;case 3:j=d,A=r+m/D,n[0]=A,n[1]=j;break;case 4:A=u,j=i+-p*D,n[0]=A,n[1]=j;break}if(!w)switch(k){case 1:N=g,M=a+-S/D,n[2]=M,n[3]=N;break;case 2:M=b,N=o+x*D,n[2]=M,n[3]=N;break;case 3:N=y,M=a+S/D,n[2]=M,n[3]=N;break;case 4:M=v,N=o+-x*D,n[2]=M,n[3]=N;break}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,c=t.y,l=n.x,u=n.y,d=i.x,f=i.y,p=void 0,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0;return h=c-o,_=a-s,y=s*o-a*c,g=f-u,v=l-d,b=d*u-l*f,x=h*v-g*_,x===0?null:(p=(_*b-v*y)/x,m=(g*y-h*b)/x,new r(p,m))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r=0){var u=(-c+Math.sqrt(c*c-4*s*l))/(2*s),d=(-c-Math.sqrt(c*c-4*s*l))/(2*s);return u>=0&&u<=1?[u]:d>=0&&d<=1?[d]:null}else return null},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){function r(){}r.sign=function(e){return e>0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(l[0]);s.length>0&&t;){var u=s[0];s.splice(0,1),o.add(u);for(var d=u.getEdges(),a=0;a-1&&l.splice(h,1)}o=new Set,c=new Map}}return e},f.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(d,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&l.push(e),r.set(e,t)}})}n=n.concat(l),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},f.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=f}),(function(e,t,n){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){var r=n(5);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);ta.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n,r,i,o,s=this.getAllNodes(),c;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),c=new Set,n=0;nc||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(c=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=c.length||u>=c[0].length)){for(var d=0;de}}]),e}()}),(function(e,t,n){function r(){}r.svd=function(e){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=e.length,this.n=e[0].length;var t=Math.min(this.m,this.n);this.s=function(e){for(var t=[];e-->0;)t.push(0);return t}(Math.min(this.m+1,this.n)),this.U=function(e){return function e(t){if(t.length==0)return 0;for(var n=[],r=0;r0;)t.push(0);return t}(this.n),i=function(e){for(var t=[];e-->0;)t.push(0);return t}(this.m),a=!0,o=!0,s=Math.min(this.m-1,this.n),c=Math.max(0,Math.min(this.n-2,this.m)),l=0;l=0;k--)if(this.s[k]!==0){for(var A=k+1;A=0;L--){if(function(e,t){return e&&t}(L0;){var U=void 0,W=void 0;for(U=E-2;U>=-1&&U!==-1;U--)if(Math.abs(n[U])<=re+ne*(Math.abs(this.s[U])+Math.abs(this.s[U+1]))){n[U]=0;break}if(U===E-2)W=4;else{var G=void 0;for(G=E-1;G>=U&&G!==U;G--){var ie=(G===E?0:Math.abs(n[G]))+(G===U+1?0:Math.abs(n[G-1]));if(Math.abs(this.s[G])<=re+ne*ie){this.s[G]=0;break}}G===U?W=3:G===E-1?W=1:(W=2,U=G)}switch(U++,W){case 1:var K=n[E-2];n[E-2]=0;for(var q=E-2;q>=U;q--){var J=r.hypot(this.s[q],K),Y=this.s[q]/J,X=K/J;if(this.s[q]=J,q!==U&&(K=-X*n[q-1],n[q-1]=Y*n[q-1]),o)for(var Z=0;Z=this.s[U+1]);){var De=this.s[U];if(this.s[U]=this.s[U+1],this.s[U+1]=De,o&&UMath.abs(t)?(n=t/e,n=Math.abs(e)*Math.sqrt(1+n*n)):t==0?n=0:(n=e/t,n=Math.abs(t)*Math.sqrt(1+n*n)),n},e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(D()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(D()):n.coseBase=r(n.layoutBase)})(e,function(e){return(()=>{var t={45:((e,t,n)=>{var r={};r.layoutBase=n(551),r.CoSEConstants=n(806),r.CoSEEdge=n(767),r.CoSEGraph=n(880),r.CoSEGraphManager=n(578),r.CoSELayout=n(765),r.CoSENode=n(991),r.ConstraintHandler=n(902),e.exports=r}),806:((e,t,n)=>{var r=n(551).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0,i.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,i.TREE_REDUCTION_ON_INCREMENTAL=!0,i.PURE_INCREMENTAL=i.DEFAULT_INCREMENTAL,e.exports=i}),767:((e,t,n)=>{var r=n(551).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),880:((e,t,n)=>{var r=n(551).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),578:((e,t,n)=>{var r=n(551).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),765:((e,t,n)=>{var r=n(551).FDLayout,i=n(578),a=n(880),o=n(991),s=n(767),c=n(806),l=n(902),u=n(551).FDLayoutConstants,d=n(551).LayoutConstants,f=n(551).Point,p=n(551).PointD,m=n(551).DimensionD,h=n(551).Layout,g=n(551).Integer,_=n(551).IGeometry,v=n(551).LGraph,y=n(551).Transform,b=n(551).LinkedList;function x(){r.call(this),this.toBeTiled={},this.constraints={}}for(var S in x.prototype=Object.create(r.prototype),r)x[S]=r[S];x.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},x.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},x.prototype.newNode=function(e){return new o(this.graphManager,e)},x.prototype.newEdge=function(e){return new s(null,null,e)},x.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(c.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=c.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=c.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=u.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=u.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},x.prototype.initSpringEmbedder=function(){r.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/u.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},x.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},x.prototype.classicLayout=function(){if(this.nodesWithGravity=this.calculateNodesToApplyGravitationTo(),this.graphManager.setAllNodesToApplyGravitation(this.nodesWithGravity),this.calcNoOfChildrenForAllNodes(),this.graphManager.calcLowestCommonAncestors(),this.graphManager.calcInclusionTreeDepths(),this.graphManager.getRoot().calcEstimatedSize(),this.calcIdealEdgeLengths(),!this.incremental){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return Object.keys(this.constraints).length>0&&(l.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),c.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},x.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%u.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),c.PURE_INCREMENTAL?this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),c.PURE_INCREMENTAL?this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},x.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n0&&this.updateDisplacements();for(var n=0;n0&&(r.fixedNodeWeight=a)}}if(this.constraints.relativePlacementConstraint){var o=new Map,s=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(t){e.fixedNodesOnHorizontal.add(t),e.fixedNodesOnVertical.add(t)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var l=this.constraints.alignmentConstraint.vertical,n=0;n=2*e.length/3;r--)t=Math.floor(Math.random()*(r+1)),n=e[r],e[r]=e[t],e[t]=n;return e},this.nodesInRelativeHorizontal=[],this.nodesInRelativeVertical=[],this.nodeToRelativeConstraintMapHorizontal=new Map,this.nodeToRelativeConstraintMapVertical=new Map,this.nodeToTempPositionMapHorizontal=new Map,this.nodeToTempPositionMapVertical=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){if(t.left){var n=o.has(t.left)?o.get(t.left):t.left,r=o.has(t.right)?o.get(t.right):t.right;e.nodesInRelativeHorizontal.includes(n)||(e.nodesInRelativeHorizontal.push(n),e.nodeToRelativeConstraintMapHorizontal.set(n,[]),e.dummyToNodeForVerticalAlignment.has(n)?e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(n,e.idToNodeMap.get(n).getCenterX())),e.nodesInRelativeHorizontal.includes(r)||(e.nodesInRelativeHorizontal.push(r),e.nodeToRelativeConstraintMapHorizontal.set(r,[]),e.dummyToNodeForVerticalAlignment.has(r)?e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()):e.nodeToTempPositionMapHorizontal.set(r,e.idToNodeMap.get(r).getCenterX())),e.nodeToRelativeConstraintMapHorizontal.get(n).push({right:r,gap:t.gap}),e.nodeToRelativeConstraintMapHorizontal.get(r).push({left:n,gap:t.gap})}else{var i=s.has(t.top)?s.get(t.top):t.top,a=s.has(t.bottom)?s.get(t.bottom):t.bottom;e.nodesInRelativeVertical.includes(i)||(e.nodesInRelativeVertical.push(i),e.nodeToRelativeConstraintMapVertical.set(i,[]),e.dummyToNodeForHorizontalAlignment.has(i)?e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(i,e.idToNodeMap.get(i).getCenterY())),e.nodesInRelativeVertical.includes(a)||(e.nodesInRelativeVertical.push(a),e.nodeToRelativeConstraintMapVertical.set(a,[]),e.dummyToNodeForHorizontalAlignment.has(a)?e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()):e.nodeToTempPositionMapVertical.set(a,e.idToNodeMap.get(a).getCenterY())),e.nodeToRelativeConstraintMapVertical.get(i).push({bottom:a,gap:t.gap}),e.nodeToRelativeConstraintMapVertical.get(a).push({top:i,gap:t.gap})}});else{var d=new Map,f=new Map;this.constraints.relativePlacementConstraint.forEach(function(e){if(e.left){var t=o.has(e.left)?o.get(e.left):e.left,n=o.has(e.right)?o.get(e.right):e.right;d.has(t)?d.get(t).push(n):d.set(t,[n]),d.has(n)?d.get(n).push(t):d.set(n,[t])}else{var r=s.has(e.top)?s.get(e.top):e.top,i=s.has(e.bottom)?s.get(e.bottom):e.bottom;f.has(r)?f.get(r).push(i):f.set(r,[i]),f.has(i)?f.get(i).push(r):f.set(i,[r])}});var p=function(e,t){var n=[],r=[],i=new b,a=new Set,o=0;return e.forEach(function(s,c){if(!a.has(c)){n[o]=[],r[o]=!1;var l=c;for(i.push(l),a.add(l),n[o].push(l);i.length!=0;)l=i.shift(),t.has(l)&&(r[o]=!0),e.get(l).forEach(function(e){a.has(e)||(i.push(e),a.add(e),n[o].push(e))});o++}}),{components:n,isFixed:r}},m=p(d,e.fixedNodesOnHorizontal);this.componentsOnHorizontal=m.components,this.fixedComponentsOnHorizontal=m.isFixed;var h=p(f,e.fixedNodesOnVertical);this.componentsOnVertical=h.components,this.fixedComponentsOnVertical=h.isFixed}}},x.prototype.updateDisplacements=function(){var e=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){var n=e.idToNodeMap.get(t.nodeId);n.displacementX=0,n.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,n=0;n1){var s;for(s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(d.WORLD_CENTER_X-o.x/2,d.WORLD_CENTER_Y-o.y/2))},x.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);x.branchRadialLayout(t,null,0,359,0,r);var i=v.calculateBounds(e),a=new y;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var g=h[0];h.splice(0,1);var v=u.indexOf(g);v>=0&&u.splice(v,1),p--,d--}m=t==null?0:(u.indexOf(h[0])+1)%p;for(var y=Math.abs(r-n)/d,b=m;f!=d;b=++b%p){var S=u[b].getOtherEnd(e);if(S!=t){var C=(n+f*y)%360,w=(C+y)%360;x.branchRadialLayout(S,e,C,w,i+a,a),f++}}},x.maxDiagonalInTree=function(e){for(var t=g.MIN_VALUE,n=0;nt&&(t=r)}return t},x.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},x.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),c=i.getChild();c.add(a);for(var l=0;li?(r.rect.x-=(r.labelWidth-i)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-i)/2):r.labelPosHorizontal==`right`&&r.setWidth(i+r.labelWidth)),r.labelHeight&&(r.labelPosVertical==`top`?(r.rect.y-=r.labelHeight,r.setHeight(a+r.labelHeight),r.labelMarginTop=r.labelHeight):r.labelPosVertical==`center`&&r.labelHeight>a?(r.rect.y-=(r.labelHeight-a)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-a)/2):r.labelPosVertical==`bottom`&&r.setHeight(a+r.labelHeight))}})},x.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop,a=t.labelMarginLeft,o=t.labelMarginTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i,a,o)}},x.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop,o=r.labelMarginLeft,s=r.labelMarginTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a,o,s)})},x.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},x.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;ru&&(u=f.rect.height)}n+=u+e.verticalPadding}},x.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];if(n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height,i.setCenter(n.tiledMemberPack[r].centerX,n.tiledMemberPack[r].centerY),i.labelMarginLeft=0,i.labelMarginTop=0,c.NODE_DIMENSIONS_INCLUDE_LABELS){var a=i.rect.width,o=i.rect.height;i.labelWidth&&(i.labelPosHorizontal==`left`?(i.rect.x-=i.labelWidth,i.setWidth(a+i.labelWidth),i.labelMarginLeft=i.labelWidth):i.labelPosHorizontal==`center`&&i.labelWidth>a?(i.rect.x-=(i.labelWidth-a)/2,i.setWidth(i.labelWidth),i.labelMarginLeft=(i.labelWidth-a)/2):i.labelPosHorizontal==`right`&&i.setWidth(a+i.labelWidth)),i.labelHeight&&(i.labelPosVertical==`top`?(i.rect.y-=i.labelHeight,i.setHeight(o+i.labelHeight),i.labelMarginTop=i.labelHeight):i.labelPosVertical==`center`&&i.labelHeight>o?(i.rect.y-=(i.labelHeight-o)/2,i.setHeight(i.labelHeight),i.labelMarginTop=(i.labelHeight-o)/2):i.labelPosVertical==`bottom`&&i.setHeight(o+i.labelHeight))}})},x.prototype.tileNodes=function(e,t){var n=this.tileNodesByFavoringDim(e,t,!0),r=this.tileNodesByFavoringDim(e,t,!1),i=this.getOrgRatio(n);return this.getOrgRatio(r)s&&(s=e.getWidth())});var l=a/i,u=o/i,d=(n-r)**2+4*(l+r)*(u+n)*i,f=(r-n+Math.sqrt(d))/(2*(l+r)),p;t?(p=Math.ceil(f),p==f&&p++):p=Math.floor(f);var m=p*(l+r)-r;return s>m&&(m=s),m+=r*2,m},x.prototype.tileNodesByFavoringDim=function(e,t,n){var r=c.TILING_PADDING_VERTICAL,i=c.TILING_PADDING_HORIZONTAL,a=c.TILING_COMPARE_BY,o={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:r,horizontalPadding:i,centerX:0,centerY:0};a&&(o.idealRowWidth=this.calcIdealRowWidth(e,n));var s=function(e){return e.rect.width*e.rect.height},l=function(e,t){return s(t)-s(e)};e.sort(function(e,t){var n=l;return o.idealRowWidth?(n=a,n(e.id,t.id)):n(e,t)});for(var u=0,d=0,f=0;f0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},x.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},x.prototype.canAddHorizontal=function(e,t,n){if(e.idealRowWidth){var r=e.rows.length-1;return e.rowWidth[r]+t+e.horizontalPadding<=e.idealRowWidth}var i=this.getShortestRowIndex(e);if(i<0)return!0;var a=e.rowWidth[i];if(a+e.horizontalPadding+t<=e.width)return!0;var o=0;e.rowHeight[i]0&&(o=n+e.verticalPadding-e.rowHeight[i]);var s=e.width-a>=t+e.horizontalPadding?(e.height+o)/(a+t+e.horizontalPadding):(e.height+o)/e.width;o=n+e.verticalPadding;var c=e.widtha&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var d=i;d<=a;d++)l[0]+=this.grid[d][o-1].length+this.grid[d][o].length-1;if(a0)for(var d=o;d<=s;d++)l[3]+=this.grid[i-1][d].length+this.grid[i][d].length-1;for(var f=g.MAX_VALUE,p,m,h=0;h{var r=n(551).FDLayoutNode,i=n(551).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.calculateDisplacement=function(){var e=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i{function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0){var a=0;r.forEach(function(e){t==`horizontal`?(f.set(e,c.has(e)?l[c.get(e)]:i.get(e)),a+=f.get(e)):(f.set(e,c.has(e)?u[c.get(e)]:i.get(e)),a+=f.get(e))}),a/=r.length,e.forEach(function(e){n.has(e)||f.set(e,a)})}else{var o=0;e.forEach(function(e){t==`horizontal`?o+=c.has(e)?l[c.get(e)]:i.get(e):o+=c.has(e)?u[c.get(e)]:i.get(e)}),o/=e.length,e.forEach(function(e){f.set(e,o)})}});for(var h=function(){var r=m.shift();e.get(r).forEach(function(e){if(f.get(e.id)o&&(o=v),ys&&(s=y)}}catch(e){p=!0,m=e}finally{try{!d&&h.return&&h.return()}finally{if(p)throw m}}var b=(r+o)/2-(a+s)/2,x=!0,S=!1,C=void 0;try{for(var w=e[Symbol.iterator](),T;!(x=(T=w.next()).done);x=!0){var E=T.value;f.set(E,f.get(E)+b)}}catch(e){S=!0,C=e}finally{try{!x&&w.return&&w.return()}finally{if(S)throw C}}})}return f},v=function(e){var t=0,n=0,r=0,i=0;if(e.forEach(function(e){e.left?l[c.get(e.left)]-l[c.get(e.right)]>=0?t++:n++:u[c.get(e.top)]-u[c.get(e.bottom)]>=0?r++:i++}),t>n&&r>i)for(var a=0;an)for(var o=0;oi)for(var s=0;s1)t.fixedNodeConstraint.forEach(function(e,t){S[t]=[e.position.x,e.position.y],C[t]=[l[c.get(e.nodeId)],u[c.get(e.nodeId)]]}),w=!0;else if(t.alignmentConstraint)(function(){var e=0;if(t.alignmentConstraint.vertical){for(var n=t.alignmentConstraint.vertical,i=function(t){var i=new Set;n[t].forEach(function(e){i.add(e)});var a=new Set([].concat(r(i)).filter(function(e){return E.has(e)})),o=void 0;o=a.size>0?l[c.get(a.values().next().value)]:g(i).x,n[t].forEach(function(t){S[e]=[o,u[c.get(t)]],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},a=0;a0?l[c.get(i.values().next().value)]:g(n).y,o[t].forEach(function(t){S[e]=[l[c.get(t)],a],C[e]=[l[c.get(t)],u[c.get(t)]],e++})},d=0;dA&&(A=k[M].length,j=M);if(A0){var W={x:0,y:0};t.fixedNodeConstraint.forEach(function(e,t){var n={x:l[c.get(e.nodeId)],y:u[c.get(e.nodeId)]},r=e.position,i=h(r,n);W.x+=i.x,W.y+=i.y}),W.x/=t.fixedNodeConstraint.length,W.y/=t.fixedNodeConstraint.length,l.forEach(function(e,t){l[t]+=W.x}),u.forEach(function(e,t){u[t]+=W.y}),t.fixedNodeConstraint.forEach(function(e){l[c.get(e.nodeId)]=e.position.x,u[c.get(e.nodeId)]=e.position.y})}if(t.alignmentConstraint){if(t.alignmentConstraint.vertical)for(var G=t.alignmentConstraint.vertical,ie=function(e){var t=new Set;G[e].forEach(function(e){t.add(e)});var n=new Set([].concat(r(t)).filter(function(e){return E.has(e)})),i=void 0;i=n.size>0?l[c.get(n.values().next().value)]:g(t).x,t.forEach(function(e){E.has(e)||(l[c.get(e)]=i)})},K=0;K0?u[c.get(n.values().next().value)]:g(t).y,t.forEach(function(e){E.has(e)||(u[c.get(e)]=i)})},Y=0;Y{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(45)})()})})),k=e(t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(O()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeFcose=r(O()):n.cytoscapeFcose=r(n.coseBase)})(e,function(e){return(()=>{var t={658:(e=>{e.exports=Object.assign==null?function(e){return[...arguments].slice(1).forEach(function(t){Object.keys(t).forEach(function(n){return e[n]=t[n]})}),e}:Object.assign.bind(Object)}),548:((e,t,n)=>{var r=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o=e[Symbol.iterator](),s;!(r=(s=o.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(e){i=!0,a=e}finally{try{!r&&o.return&&o.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw TypeError(`Invalid attempt to destructure non-iterable instance`)}}(),i=n(140).layoutBase.LinkedList,a={};a.getTopMostNodes=function(e){for(var t={},n=0;n0&&l.merge(e)});for(var u=0;u1){l=s[0],u=l.connectedEdges().length,s.forEach(function(e){e.connectedEdges().length0&&r.set(`dummy`+(r.size+1),p),m},a.relocateComponent=function(e,t,n){if(!n.fixedNodeConstraint){var i=1/0,a=-1/0,o=1/0,s=-1/0;if(n.quality==`draft`){var c=!0,l=!1,u=void 0;try{for(var d=t.nodeIndexes[Symbol.iterator](),f;!(c=(f=d.next()).done);c=!0){var p=f.value,m=r(p,2),h=m[0],g=m[1],_=n.cy.getElementById(h);if(_){var v=_.boundingBox(),y=t.xCoords[g]-v.w/2,b=t.xCoords[g]+v.w/2,x=t.yCoords[g]-v.h/2,S=t.yCoords[g]+v.h/2;ya&&(a=b),xs&&(s=S)}}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}var C=e.x-(a+i)/2,w=e.y-(s+o)/2;t.xCoords=t.xCoords.map(function(e){return e+C}),t.yCoords=t.yCoords.map(function(e){return e+w})}else{Object.keys(t).forEach(function(e){var n=t[e],r=n.getRect().x,c=n.getRect().x+n.getRect().width,l=n.getRect().y,u=n.getRect().y+n.getRect().height;ra&&(a=c),ls&&(s=u)});var T=e.x-(a+i)/2,E=e.y-(s+o)/2;Object.keys(t).forEach(function(e){var n=t[e];n.setCenter(n.getCenterX()+T,n.getCenterY()+E)})}}},a.calcBoundingBox=function(e,t,n,r){for(var i=2**53-1,a=-(2**53-1),o=2**53-1,s=-(2**53-1),c=void 0,l=void 0,u=void 0,d=void 0,f=e.descendants().not(`:parent`),p=f.length,m=0;mc&&(i=c),au&&(o=u),s{var r=n(548),i=n(140).CoSELayout,a=n(140).CoSENode,o=n(140).layoutBase.PointD,s=n(140).layoutBase.DimensionD,c=n(140).layoutBase.LayoutConstants,l=n(140).layoutBase.FDLayoutConstants,u=n(140).CoSEConstants;e.exports={coseLayout:function(e,t){var n=e.cy,d=e.eles,f=d.nodes(),p=d.edges(),m=void 0,h=void 0,g=void 0,_={};e.randomize&&(m=t.nodeIndexes,h=t.xCoords,g=t.yCoords);var v=function(e){return typeof e==`function`},y=function(e,t){return v(e)?e(t):e},b=r.calcParentsWithoutChildren(n,d),x=function e(t,n,i,c){for(var l=n.length,u=0;u0){var S=void 0;S=i.getGraphManager().add(i.newGraph(),p),e(S,f,i,c)}}},S=function(t,n,r){for(var i=0,a=0,o=0;o0?u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=i/a:v(e.idealEdgeLength)?u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=50:u.DEFAULT_EDGE_LENGTH=l.DEFAULT_EDGE_LENGTH=e.idealEdgeLength,u.MIN_REPULSION_DIST=l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,u.DEFAULT_RADIAL_SEPARATION=l.DEFAULT_EDGE_LENGTH)},C=function(e,t){t.fixedNodeConstraint&&(e.constraints.fixedNodeConstraint=t.fixedNodeConstraint),t.alignmentConstraint&&(e.constraints.alignmentConstraint=t.alignmentConstraint),t.relativePlacementConstraint&&(e.constraints.relativePlacementConstraint=t.relativePlacementConstraint)};e.nestingFactor!=null&&(u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(u.DEFAULT_GRAVITY_STRENGTH=l.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(u.MAX_ITERATIONS=l.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(u.DEFAULT_GRAVITY_RANGE_FACTOR=l.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_STRENGTH=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(u.DEFAULT_COOLING_FACTOR_INCREMENTAL=l.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.tilingCompareBy!=null&&(u.TILING_COMPARE_BY=e.tilingCompareBy),e.quality==`proof`?c.QUALITY=2:c.QUALITY=0,u.NODE_DIMENSIONS_INCLUDE_LABELS=l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!e.randomize,u.ANIMATE=l.ANIMATE=c.ANIMATE=e.animate,u.TILE=e.tile,u.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,u.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal,u.DEFAULT_INCREMENTAL=l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=!0,u.PURE_INCREMENTAL=!e.randomize,c.DEFAULT_UNIFORM_LEAF_NODE_SIZES=e.uniformNodeDimensions,e.step==`transformed`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!1),e.step==`enforced`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!1),e.step==`cose`&&(u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!1,u.APPLY_LAYOUT=!0),e.step==`all`&&(e.randomize?u.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:u.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,u.ENFORCE_CONSTRAINTS=!0,u.APPLY_LAYOUT=!0),e.fixedNodeConstraint||e.alignmentConstraint||e.relativePlacementConstraint?u.TREE_REDUCTION_ON_INCREMENTAL=!1:u.TREE_REDUCTION_ON_INCREMENTAL=!0;var w=new i,T=w.newGraphManager();return x(T.addRoot(),r.getTopMostNodes(f),w,e),S(w,T,p),C(w,e),w.runLayout(),_}}}),212:((e,t,n)=>{var r=function(){function e(e,t){for(var n=0;n0)if(f){var p=o.getTopMostNodes(t.eles.nodes());if(l=o.connectComponents(n,t.eles,p),l.forEach(function(e){var t=e.boundingBox();u.push({x:t.x1+t.w/2,y:t.y1+t.h/2})}),t.randomize&&l.forEach(function(e){t.eles=e,i.push(s(t))}),t.quality=="default"||t.quality==`proof`){var m=n.collection();if(t.tile){var h=new Map,g=[],_=[],v=0,y={nodeIndexes:h,xCoords:g,yCoords:_},b=[];if(l.forEach(function(e,t){e.edges().length==0&&(e.nodes().forEach(function(t,n){m.merge(e.nodes()[n]),t.isParent()||(y.nodeIndexes.set(e.nodes()[n].id(),v++),y.xCoords.push(e.nodes()[0].position().x),y.yCoords.push(e.nodes()[0].position().y))}),b.push(t))}),m.length>1){var x=m.boundingBox();u.push({x:x.x1+x.w/2,y:x.y1+x.h/2}),l.push(m),i.push(y);for(var S=b.length-1;S>=0;S--)l.splice(b[S],1),i.splice(b[S],1),u.splice(b[S],1)}}l.forEach(function(e,n){t.eles=e,a.push(c(t,i[n])),o.relocateComponent(u[n],a[n],t)})}else l.forEach(function(e,n){o.relocateComponent(u[n],i[n],t)});var C=new Set;if(l.length>1){var w=[],T=r.filter(function(e){return e.css(`display`)==`none`});l.forEach(function(e,n){var r=void 0;if(t.quality==`draft`&&(r=i[n].nodeIndexes),e.nodes().not(T).length>0){var s={};s.edges=[],s.nodes=[];var c=void 0;e.nodes().not(T).forEach(function(e){if(t.quality==`draft`)if(!e.isParent())c=r.get(e.id()),s.nodes.push({x:i[n].xCoords[c]-e.boundingbox().w/2,y:i[n].yCoords[c]-e.boundingbox().h/2,width:e.boundingbox().w,height:e.boundingbox().h});else{var l=o.calcBoundingBox(e,i[n].xCoords,i[n].yCoords,r);s.nodes.push({x:l.topLeftX,y:l.topLeftY,width:l.width,height:l.height})}else a[n][e.id()]&&s.nodes.push({x:a[n][e.id()].getLeft(),y:a[n][e.id()].getTop(),width:a[n][e.id()].getWidth(),height:a[n][e.id()].getHeight()})}),e.edges().forEach(function(e){var c=e.source(),l=e.target();if(c.css(`display`)!=`none`&&l.css(`display`)!=`none`)if(t.quality==`draft`){var u=r.get(c.id()),d=r.get(l.id()),f=[],p=[];if(c.isParent()){var m=o.calcBoundingBox(c,i[n].xCoords,i[n].yCoords,r);f.push(m.topLeftX+m.width/2),f.push(m.topLeftY+m.height/2)}else f.push(i[n].xCoords[u]),f.push(i[n].yCoords[u]);if(l.isParent()){var h=o.calcBoundingBox(l,i[n].xCoords,i[n].yCoords,r);p.push(h.topLeftX+h.width/2),p.push(h.topLeftY+h.height/2)}else p.push(i[n].xCoords[d]),p.push(i[n].yCoords[d]);s.edges.push({startX:f[0],startY:f[1],endX:p[0],endY:p[1]})}else a[n][c.id()]&&a[n][l.id()]&&s.edges.push({startX:a[n][c.id()].getCenterX(),startY:a[n][c.id()].getCenterY(),endX:a[n][l.id()].getCenterX(),endY:a[n][l.id()].getCenterY()})}),s.nodes.length>0&&(w.push(s),C.add(n))}});var E=d.packComponents(w,t.randomize).shifts;if(t.quality==`draft`)i.forEach(function(e,t){var n=e.xCoords.map(function(e){return e+E[t].dx}),r=e.yCoords.map(function(e){return e+E[t].dy});e.xCoords=n,e.yCoords=r});else{var D=0;C.forEach(function(e){Object.keys(a[e]).forEach(function(t){var n=a[e][t];n.setCenter(n.getCenterX()+E[D].dx,n.getCenterY()+E[D].dy)}),D++})}}}else{var O=t.eles.boundingBox();if(u.push({x:O.x1+O.w/2,y:O.y1+O.h/2}),t.randomize){var k=s(t);i.push(k)}t.quality=="default"||t.quality==`proof`?(a.push(c(t,i[0])),o.relocateComponent(u[0],a[0],t)):o.relocateComponent(u[0],i[0],t)}var A=function(e,n){if(t.quality=="default"||t.quality==`proof`){typeof e==`number`&&(e=n);var r=void 0,o=void 0,s=e.data(`id`);return a.forEach(function(e){s in e&&(r={x:e[s].getRect().getCenterX(),y:e[s].getRect().getCenterY()},o=e[s])}),t.nodeDimensionsIncludeLabels&&(o.labelWidth&&(o.labelPosHorizontal==`left`?r.x+=o.labelWidth/2:o.labelPosHorizontal==`right`&&(r.x-=o.labelWidth/2)),o.labelHeight&&(o.labelPosVertical==`top`?r.y+=o.labelHeight/2:o.labelPosVertical==`bottom`&&(r.y-=o.labelHeight/2))),r??={x:e.position(`x`),y:e.position(`y`)},{x:r.x,y:r.y}}else{var c=void 0;return i.forEach(function(t){var n=t.nodeIndexes.get(e.id());n!=null&&(c={x:t.xCoords[n],y:t.yCoords[n]})}),c??={x:e.position(`x`),y:e.position(`y`)},{x:c.x,y:c.y}}};if(t.quality=="default"||t.quality==`proof`||t.randomize){var j=o.calcParentsWithoutChildren(n,r),M=r.filter(function(e){return e.css(`display`)==`none`});t.eles=r.not(M),r.nodes().not(`:parent`).not(M).layoutPositions(e,t,A),j.length>0&&j.forEach(function(e){e.position(A(e))})}else console.log(`If randomize option is set to false, then quality option must be 'default' or 'proof'.`)}}]),e}()}),657:((e,t,n)=>{var r=n(548),i=n(140).layoutBase.Matrix,a=n(140).layoutBase.SVD;e.exports={spectralLayout:function(e){var t=e.cy,n=e.eles,o=n.nodes(),s=n.nodes(`:parent`),c=new Map,l=new Map,u=new Map,d=[],f=[],p=[],m=[],h=[],g=[],_=[],v=[],y=void 0,b=1e8,x=1e-9,S=e.piTol,C=e.samplingType,w=e.nodeSeparation,T=void 0,E=function(){for(var e=0,t=0,n=!1;t=i;){o=r[i++];for(var m=d[o],_=0;_u&&(u=h[x],f=x)}return f},O=function(e){var t=void 0;if(e){t=Math.floor(Math.random()*y);for(var n=0;n=1)break;u=l}for(var h=0;h=1)break;u=l}for(var b=0;b0&&(r.isParent()?d[t].push(u.get(r.id())):d[t].push(r.id()))})});var B=function(e){var n=l.get(e),r=void 0;c.get(e).forEach(function(i){r=t.getElementById(i).isParent()?u.get(i):i,d[n].push(r),d[l.get(r)].push(e)})},V=!0,ee=!1,te=void 0;try{for(var H=c.keys()[Symbol.iterator](),ne;!(V=(ne=H.next()).done);V=!0){var re=ne.value;B(re)}}catch(e){ee=!0,te=e}finally{try{!V&&H.return&&H.return()}finally{if(ee)throw te}}y=l.size;var U=void 0;if(y>2){T=y{var r=n(212),i=function(e){e&&e(`layout`,`fcose`,r)};typeof cytoscape<`u`&&i(cytoscape),e.exports=i}),140:(t=>{t.exports=e})},n={};function r(e){var i=n[e];if(i!==void 0)return i.exports;var a=n[e]={exports:{}};return t[e](a,a.exports,r),a.exports}return r(579)})()})}))(),1),A={L:`left`,R:`right`,T:`top`,B:`bottom`},j={L:n(e=>`${e},${e/2} 0,${e} 0,0`,`L`),R:n(e=>`0,${e/2} ${e},0 ${e},${e}`,`R`),T:n(e=>`0,0 ${e},0 ${e/2},${e}`,`T`),B:n(e=>`${e/2},0 ${e},${e} 0,${e}`,`B`)},M={L:n((e,t)=>e-t+2,`L`),R:n((e,t)=>e-2,`R`),T:n((e,t)=>e-t+2,`T`),B:n((e,t)=>e-2,`B`)},N=n(function(e){return F(e)?e===`L`?`R`:`L`:e===`T`?`B`:`T`},`getOppositeArchitectureDirection`),P=n(function(e){let t=e;return t===`L`||t===`R`||t===`T`||t===`B`},`isArchitectureDirection`),F=n(function(e){let t=e;return t===`L`||t===`R`},`isArchitectureDirectionX`),I=n(function(e){let t=e;return t===`T`||t===`B`},`isArchitectureDirectionY`),L=n(function(e,t){let n=F(e)&&I(t),r=I(e)&&F(t);return n||r},`isArchitectureDirectionXY`),R=n(function(e){let t=e[0],n=e[1],r=F(t)&&I(n),i=I(t)&&F(n);return r||i},`isArchitecturePairXY`),z=n(function(e){return e!==`LL`&&e!==`RR`&&e!==`TT`&&e!==`BB`},`isValidArchitectureDirectionPair`),B=n(function(e,t){let n=`${e}${t}`;return z(n)?n:void 0},`getArchitectureDirectionPair`),V=n(function([e,t],n){let r=n[0],i=n[1];return F(r)?I(i)?[e+(r===`L`?-1:1),t+(i===`T`?1:-1)]:[e+(r===`L`?-1:1),t]:F(i)?[e+(i===`L`?1:-1),t+(r===`T`?1:-1)]:[e,t+(r===`T`?1:-1)]},`shiftPositionByArchitectureDirectionPair`),ee=n(function(e){return e===`LT`||e===`TL`?[1,1]:e===`BL`||e===`LB`?[1,-1]:e===`BR`||e===`RB`?[-1,-1]:[-1,1]},`getArchitectureDirectionXYFactors`),te=n(function(e,t){return L(e,t)?`bend`:F(e)?`horizontal`:`vertical`},`getArchitectureDirectionAlignment`),H=n(function(e){return e.type===`service`},`isArchitectureService`),ne=n(function(e){return e.type===`junction`},`isArchitectureJunction`),re=n(e=>e.data(),`edgeData`),U=n(e=>e.data(),`nodeData`),W=d.architecture,G=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.elements={},this.diagramId=``,this.setAccTitle=c,this.getAccTitle=h,this.setDiagramTitle=s,this.getDiagramTitle=p,this.getAccDescription=f,this.setAccDescription=a,this.clear()}static{n(this,`ArchitectureDB`)}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.layoutHints=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId=``,l()}addService({id:e,icon:t,in:n,title:r,iconText:i}){if(this.registeredIds[e]!==void 0)throw Error(`The service id [${e}] is already in use by another ${this.registeredIds[e]}`);if(n!==void 0){if(e===n)throw Error(`The service [${e}] cannot be placed within itself`);if(this.registeredIds[n]===void 0)throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[n]===`node`)throw Error(`The service [${e}]'s parent is not a group`)}this.registeredIds[e]=`node`,this.nodes[e]={id:e,type:`service`,icon:t,iconText:i,title:r,edges:[],in:n}}getServices(){return Object.values(this.nodes).filter(H)}addJunction({id:e,in:t}){if(this.registeredIds[e]!==void 0)throw Error(`The junction id [${e}] is already in use by another ${this.registeredIds[e]}`);if(t!==void 0){if(e===t)throw Error(`The junction [${e}] cannot be placed within itself`);if(this.registeredIds[t]===void 0)throw Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[t]===`node`)throw Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds[e]=`node`,this.nodes[e]={id:e,type:`junction`,edges:[],in:t}}getJunctions(){return Object.values(this.nodes).filter(ne)}getNodes(){return Object.values(this.nodes)}getNode(e){return this.nodes[e]??null}addGroup({id:e,icon:t,in:n,title:r}){if(this.registeredIds?.[e]!==void 0)throw Error(`The group id [${e}] is already in use by another ${this.registeredIds[e]}`);if(n!==void 0){if(e===n)throw Error(`The group [${e}] cannot be placed within itself`);if(this.registeredIds?.[n]===void 0)throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[n]===`node`)throw Error(`The group [${e}]'s parent is not a group`)}this.registeredIds[e]=`group`,this.groups[e]={id:e,icon:t,title:r,in:n}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:e,rhsId:t,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:c}){if(!P(n))throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);if(!P(r))throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(this.nodes[e]===void 0&&this.groups[e]===void 0)throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[t]===void 0&&this.groups[t]===void 0)throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);let l=this.nodes[e].in,u=this.nodes[t].in;if(o&&l&&u&&l==u)throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(s&&l&&u&&l==u)throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:t,rhsDir:r,rhsInto:a,rhsGroup:s,title:c};this.edges.push(d),this.nodes[e]&&this.nodes[t]&&(this.nodes[e].edges.push(this.edges[this.edges.length-1]),this.nodes[t].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw Error(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;e.members.forEach(n=>{if(this.registeredIds[n]!==`node`)throw Error(`align ${e.direction} references [${n}], which is not a service or junction`);if(t.has(n))throw Error(`align ${e.direction} lists [${n}] more than once`);t.add(n)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let e={},t=Object.entries(this.nodes).reduce((t,[n,r])=>(t[n]=r.edges.reduce((t,r)=>{let i=this.getNode(r.lhsId)?.in,a=this.getNode(r.rhsId)?.in;if(i&&a&&i!==a){let t=te(r.lhsDir,r.rhsDir);t!==`bend`&&(e[i]??={},e[i][a]=t,e[a]??={},e[a][i]=t)}if(r.lhsId===n){let e=B(r.lhsDir,r.rhsDir);e&&(t[e]=r.rhsId)}else{let e=B(r.rhsDir,r.lhsDir);e&&(t[e]=r.lhsId)}return t},{}),t),{}),r=Object.keys(t)[0],i={[r]:1},a=Object.keys(t).reduce((e,t)=>t===r?e:{...e,[t]:1},{}),o=n(e=>{let n={[e]:[0,0]},r=[e];for(;r.length>0;){let e=r.shift();if(e){i[e]=1,delete a[e];let o=t[e],[s,c]=n[e];Object.entries(o).forEach(([e,t])=>{i[t]||(n[t]=V([s,c],e),r.push(t))})}}return n},`BFS`),s=[o(r)];for(;Object.keys(a).length>0;)s.push(o(Object.keys(a)[0]));this.dataStructures={adjList:t,spatialMaps:s,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}getConfig(){return v({...W,...u().architecture})}getConfigField(e){return this.getConfig()[e]}},ie=n((e,t)=>{b(e,t),e.groups.map(e=>t.addGroup(e)),e.services.map(e=>t.addService({...e,type:`service`})),e.junctions.map(e=>t.addJunction({...e,type:`junction`})),e.edges.map(e=>t.addEdge(e)),e.alignments?.map(e=>t.addLayoutHint({direction:e.direction,members:[...e.members]}))},`populateDb`),K={parser:{yy:void 0},parse:n(async e=>{let t=await x(`architecture`,e);r.debug(t);let n=K.parser?.yy;if(!(n instanceof G))throw Error(`parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);ie(t,n)},`parse`)},q=n(e=>` - .edge { - stroke-width: ${e.archEdgeWidth}; - stroke: ${e.archEdgeColor}; - fill: none; - } - - .arrow { - fill: ${e.archEdgeArrowColor}; - } - - .node-bkg { - fill: none; - stroke: ${e.archGroupBorderColor}; - stroke-width: ${e.archGroupBorderWidth}; - stroke-dasharray: 8; - } - .node-icon-text { - display: flex; - align-items: center; - } - - .node-icon-text > div { - color: #fff; - margin: 1px; - height: fit-content; - text-align: center; - overflow: hidden; - display: -webkit-box; - -webkit-box-orient: vertical; - } -`,`getStyles`);function J(e,t){if(e===0)return t();let n=Math.random,r=e>>>0;Math.random=function(){r=r+1831565813>>>0;let e=r;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296};try{return t()}finally{Math.random=n}}n(J,`withSeededRandom`);var Y=n(e=>`${e}`,`wrapIcon`),X={prefix:`mermaid-architecture`,height:80,width:80,icons:{database:{body:Y(``)},server:{body:Y(``)},disk:{body:Y(``)},internet:{body:Y(``)},cloud:{body:Y(``)},unknown:S,blank:{body:Y(``)}}},Z=n(async function(e,t,n,r){let i=n.getConfigField(`padding`),a=n.getConfigField(`iconSize`),o=a/2,s=a/6,c=s/2;await Promise.all(t.edges().map(async t=>{let{source:a,sourceDir:l,sourceArrow:u,sourceGroup:d,target:f,targetDir:p,targetArrow:h,targetGroup:g,label:v}=re(t),{x:y,y:b}=t[0].sourceEndpoint(),{x,y:S}=t[0].midpoint(),{x:C,y:w}=t[0].targetEndpoint(),E=i+4;if(d&&(F(l)?y+=l===`L`?-E:E:b+=l===`T`?-E:E+18),g&&(F(p)?C+=p===`L`?-E:E:w+=p===`T`?-E:E+18),!d&&n.getNode(a)?.type===`junction`&&(F(l)?y+=l===`L`?o:-o:b+=l===`T`?o:-o),!g&&n.getNode(f)?.type===`junction`&&(F(p)?C+=p===`L`?o:-o:w+=p===`T`?o:-o),t[0]._private.rscratch){let t=e.insert(`g`);if(t.insert(`path`).attr(`d`,`M ${y},${b} L ${x},${S} L${C},${w} `).attr(`class`,`edge`).attr(`id`,`${r}-${_(a,f,{prefix:`L`})}`),u){let e=F(l)?M[l](y,s):y-c,n=I(l)?M[l](b,s):b-c;t.insert(`polygon`).attr(`points`,j[l](s)).attr(`transform`,`translate(${e},${n})`).attr(`class`,`arrow`)}if(h){let e=F(p)?M[p](C,s):C-c,n=I(p)?M[p](w,s):w-c;t.insert(`polygon`).attr(`points`,j[p](s)).attr(`transform`,`translate(${e},${n})`).attr(`class`,`arrow`)}if(v){let e=L(l,p)?`XY`:F(l)?`X`:`Y`,n=0;n=e===`X`?Math.abs(y-C):e===`Y`?Math.abs(b-w)/1.5:Math.abs(y-C)/2;let r=t.append(`g`);if(await T(r,v,{useHtmlLabels:!1,width:n,classes:`architecture-service-label`},m()),r.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`),e===`X`)r.attr(`transform`,`translate(`+x+`, `+S+`)`);else if(e===`Y`)r.attr(`transform`,`translate(`+x+`, `+S+`) rotate(-90)`);else if(e===`XY`){let e=B(l,p);if(e&&R(e)){let t=r.node().getBoundingClientRect(),[n,i]=ee(e);r.attr(`dominant-baseline`,`auto`).attr(`transform`,`rotate(${-1*n*i*45})`);let a=r.node().getBoundingClientRect();r.attr(`transform`,` - translate(${x}, ${S-t.height/2}) - translate(${n*a.width/2}, ${i*a.height/2}) - rotate(${-1*n*i*45}, 0, ${t.height/2}) - `)}}}}}))},`drawEdges`),ae=n(async function(e,t,n,r){let i=n.getConfigField(`padding`)*.75,a=n.getConfigField(`fontSize`),o=n.getConfigField(`iconSize`)/2;await Promise.all(t.nodes().map(async t=>{let s=U(t);if(s.type===`group`){let{h:c,w:l,x1:u,y1:d}=t.boundingBox(),f=e.append(`rect`);f.attr(`id`,`${r}-group-${s.id}`).attr(`x`,u+o).attr(`y`,d+o).attr(`width`,l).attr(`height`,c).attr(`class`,`node-bkg`);let p=e.append(`g`),h=u,g=d;if(s.icon){let e=p.append(`g`);e.html(`${await w(s.icon,{height:i,width:i,fallbackPrefix:X.prefix})}`),e.attr(`transform`,`translate(`+(h+o+1)+`, `+(g+o+1)+`)`),h+=i,g+=a/2-1-2}if(s.label){let e=p.append(`g`);await T(e,s.label,{useHtmlLabels:!1,width:l,classes:`architecture-service-label`},m()),e.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`start`).attr(`text-anchor`,`start`),e.attr(`transform`,`translate(`+(h+o+4)+`, `+(g+o+2)+`)`)}n.setElementForId(s.id,f)}}))},`drawGroups`),Q=n(async function(e,t,n,r){let i=m();for(let a of n){let n=t.append(`g`),o=e.getConfigField(`iconSize`);if(a.title){let e=n.append(`g`);await T(e,a.title,{useHtmlLabels:!1,width:o*1.5,classes:`architecture-service-label`},i),e.attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`),e.attr(`transform`,`translate(`+o/2+`, `+o+`)`)}let s=n.append(`g`);if(a.icon)s.html(`${await w(a.icon,{height:o,width:o,fallbackPrefix:X.prefix})}`);else if(a.iconText){s.html(`${await w(`blank`,{height:o,width:o,fallbackPrefix:X.prefix})}`);let e=s.append(`g`).append(`foreignObject`).attr(`width`,o).attr(`height`,o).append(`div`).attr(`class`,`node-icon-text`).attr(`style`,`height: ${o}px;`).append(`div`).html(g(a.iconText,i)),t=parseInt(window.getComputedStyle(e.node(),null).getPropertyValue(`font-size`).replace(/\D/g,``))??16;e.attr(`style`,`-webkit-line-clamp: ${Math.floor((o-2)/t)};`)}else s.append(`path`).attr(`class`,`node-bkg`).attr(`id`,`${r}-node-${a.id}`).attr(`d`,`M0,${o} V5 Q0,0 5,0 H${o-5} Q${o},0 ${o},5 V${o} Z`);n.attr(`id`,`${r}-service-${a.id}`).attr(`class`,`architecture-service`);let{width:c,height:l}=n.node().getBBox();a.width=c,a.height=l,e.setElementForId(a.id,n)}return 0},`drawServices`),oe=n(function(e,t,n,r){n.forEach(n=>{let i=t.append(`g`),a=e.getConfigField(`iconSize`);i.append(`g`).append(`rect`).attr(`id`,`${r}-node-${n.id}`).attr(`fill-opacity`,`0`).attr(`width`,a).attr(`height`,a),i.attr(`class`,`architecture-junction`);let{width:o,height:s}=i._groups[0][0].getBBox();i.width=o,i.height=s,e.setElementForId(n.id,i)})},`drawJunctions`);C([{name:X.prefix,icons:X}]),E.use(k.default);function se(e,t,n){e.forEach(e=>{t.add({group:`nodes`,data:{type:`service`,id:e.id,icon:e.icon,label:e.title,parent:e.in,width:n.getConfigField(`iconSize`),height:n.getConfigField(`iconSize`)},classes:`node-service`})})}n(se,`addServices`);function ce(e,t,n){e.forEach(e=>{t.add({group:`nodes`,data:{type:`junction`,id:e.id,parent:e.in,width:n.getConfigField(`iconSize`),height:n.getConfigField(`iconSize`)},classes:`node-junction`})})}n(ce,`addJunctions`);function le(e,t){t.nodes().map(t=>{let n=U(t);n.type!==`group`&&(n.x=t.position().x,n.y=t.position().y,e.getElementById(n.id).attr(`transform`,`translate(`+(n.x||0)+`,`+(n.y||0)+`)`))})}n(le,`positionNodes`);function ue(e,t){e.forEach(e=>{t.add({group:`nodes`,data:{type:`group`,id:e.id,icon:e.icon,label:e.title,parent:e.in},classes:`node-group`})})}n(ue,`addGroups`);function de(e,t){e.forEach(e=>{let{lhsId:n,rhsId:r,lhsInto:i,lhsGroup:a,rhsInto:o,lhsDir:s,rhsDir:c,rhsGroup:l,title:u}=e,d=L(e.lhsDir,e.rhsDir)?`segments`:`straight`,f={id:`${n}-${r}`,label:u,source:n,sourceDir:s,sourceArrow:i,sourceGroup:a,sourceEndpoint:s===`L`?`0 50%`:s===`R`?`100% 50%`:s===`T`?`50% 0`:`50% 100%`,target:r,targetDir:c,targetArrow:o,targetGroup:l,targetEndpoint:c===`L`?`0 50%`:c===`R`?`100% 50%`:c===`T`?`50% 0`:`50% 100%`};t.add({group:`edges`,data:f,classes:d})})}n(de,`addEdges`);function fe(e,t,r,i=[]){let a=n((e,t)=>Object.entries(e).reduce((e,[n,i])=>{let a=0,o=Object.entries(i);if(o.length===1)return e[n]=o[0][1],e;for(let i=0;i{let n={},r={};return Object.entries(t).forEach(([t,[i,a]])=>{let o=e.getNode(t)?.in??`default`;n[a]??={},n[a][o]??=[],n[a][o].push(t),r[i]??={},r[i][o]??=[],r[i][o].push(t)}),{horiz:Object.values(a(n,`horizontal`)).filter(e=>e.length>1),vert:Object.values(a(r,`vertical`)).filter(e=>e.length>1)}}).reduce(([e,t],{horiz:n,vert:r})=>[[...e,...n],[...t,...r]],[[],[]]),c=new Set;i.forEach(e=>e.members.forEach(e=>c.add(e)));let l=n(e=>e.filter(e=>!e.some(e=>c.has(e))),`dropOverlapping`),u=l(o),d=l(s);return i.forEach(e=>{e.members.length<2||(e.direction===`row`?u.push([...e.members]):d.push([...e.members]))}),{horizontal:u,vertical:d}}n(fe,`getAlignments`);function pe(e,t,r=[]){let i=[],a=t.getConfigField(`iconSize`),o=t.getConfigField(`idealEdgeLengthMultiplier`),s=o*a,c=new Set;r.forEach(e=>{for(let t=0;t`${e[0]},${e[1]}`,`posToStr`),u=n(e=>e.split(`,`).map(e=>parseInt(e)),`strToPos`);return e.forEach(e=>{let t=Object.fromEntries(Object.entries(e).map(([e,t])=>[l(t),e])),n=[l([0,0])],r={},s={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;n.length>0;){let e=n.shift();if(e){r[e]=1;let d=t[e];if(d){let f=u(e);Object.entries(s).forEach(([e,s])=>{let u=l([f[0]+s[0],f[1]+s[1]]),p=t[u];if(p&&!r[u]){if(n.push(u),c.has(`${d}|${p}`))return;i.push({[A[e]]:p,[A[N(e)]]:d,gap:o*a})}})}}}}),i}n(pe,`getRelativeConstraints`);function me(e,t,a,o,s,{spatialMaps:c,groupAlignments:l}){return new Promise(u=>{let d=i(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),f=E({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`straight`,"source-endpoint":`data(sourceEndpoint)`,"target-endpoint":`data(targetEndpoint)`}},{selector:`edge[label]`,style:{label:`data(label)`}},{selector:`edge.segments`,style:{"curve-style":`segments`,"segment-weights":`0`,"segment-distances":[.5],"edge-distances":`endpoints`,"source-endpoint":`data(sourceEndpoint)`,"target-endpoint":`data(targetEndpoint)`}},{selector:`node`,style:{"compound-sizing-wrt-labels":`include`}},{selector:`node[label]`,style:{"text-valign":`bottom`,"text-halign":`center`,"font-size":`${s.getConfigField(`fontSize`)}px`}},{selector:`.node-service`,style:{label:`data(label)`,width:`data(width)`,height:`data(height)`}},{selector:`.node-junction`,style:{width:`data(width)`,height:`data(height)`}},{selector:`.node-group`,style:{padding:`${s.getConfigField(`padding`)}px`}}],layout:{name:`grid`,boundingBox:{x1:0,x2:100,y1:0,y2:100}}});d.remove(),ue(a,f),se(e,f,s),ce(t,f,s),de(o,f);let p=s.getLayoutHints(),m=fe(s,c,l,p),h=pe(c,s,p),g=s.getConfigField(`iconSize`),_=s.getConfigField(`idealEdgeLengthMultiplier`)*g,v=.5*g,y=s.getConfigField(`edgeElasticity`),b=s.getConfigField(`seed`),x=f.layout({name:`fcose`,quality:`proof`,randomize:s.getConfigField(`randomize`),nodeSeparation:s.getConfigField(`nodeSeparation`),numIter:s.getConfigField(`numIter`),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(e){let[t,n]=e.connectedNodes(),{parent:r}=U(t),{parent:i}=U(n);return r===i?_:v},edgeElasticity(e){let[t,n]=e.connectedNodes(),{parent:r}=U(t),{parent:i}=U(n);return r===i?y:.001},alignmentConstraint:m,relativePlacementConstraint:h});x.one(`layoutstop`,()=>{function e(e,t,n,r){let i,a,{x:o,y:s}=e,{x:c,y:l}=t;a=(r-s+(o-n)*(s-l)/(o-c))/Math.sqrt(1+((s-l)/(o-c))**2),i=Math.sqrt((r-s)**2+(n-o)**2-a**2);let u=Math.sqrt((c-o)**2+(l-s)**2);i/=u;let d=(c-o)*(r-s)-(l-s)*(n-o);switch(!0){case d>=0:d=1;break;case d<0:d=-1;break}let f=(c-o)*(n-o)+(l-s)*(r-s);switch(!0){case f>=0:f=1;break;case f<0:f=-1;break}return a=Math.abs(a)*d,i*=f,{distances:a,weights:i}}n(e,`getSegmentWeights`),f.startBatch();for(let t of Object.values(f.edges()))if(t.data?.()){let{x:n,y:r}=t.source().position(),{x:i,y:a}=t.target().position();if(n!==i&&r!==a){let n=t.sourceEndpoint(),r=t.targetEndpoint(),{sourceDir:i}=re(t),[a,o]=I(i)?[n.x,r.y]:[r.x,n.y],{weights:s,distances:c}=e(n,r,a,o);t.style(`segment-distances`,c),t.style(`segment-weights`,s)}}f.endBatch(),J(b,()=>x.run())});try{J(b,()=>x.run())}catch(e){throw e instanceof RangeError&&e.message.includes(`Invalid array length`)?Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis."):e}f.ready(e=>{r.info(`Ready`,e),u(f)})})}n(me,`layoutArchitecture`);var he={parser:K,get db(){return new G},renderer:{draw:n(async(e,t,n,r)=>{let i=r.db;i.setDiagramId(t);let a=i.getServices(),s=i.getJunctions(),c=i.getGroups(),l=i.getEdges(),u=i.getDataStructures(),d=y(t),f=d.append(`g`);f.attr(`class`,`architecture-edges`);let p=d.append(`g`);p.attr(`class`,`architecture-services`);let m=d.append(`g`);m.attr(`class`,`architecture-groups`),await Q(i,p,a,t),oe(i,p,s,t);let h=await me(a,s,c,l,i,u);await Z(f,h,i,t),await ae(m,h,i,t),le(i,h),o(void 0,d,i.getConfigField(`padding`),i.getConfigField(`useMaxWidth`))},`draw`)},styles:q};export{he as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/array-BifhSqXX.js b/dist-desktop/assets/array-BifhSqXX.js deleted file mode 100644 index b0a084a..0000000 --- a/dist-desktop/assets/array-BifhSqXX.js +++ /dev/null @@ -1 +0,0 @@ -Array.prototype.slice;function e(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}export{e as t}; \ No newline at end of file diff --git a/dist-desktop/assets/blockDiagram-677ZJIJ3-Dn3HALPW.js b/dist-desktop/assets/blockDiagram-677ZJIJ3-Dn3HALPW.js deleted file mode 100644 index 537ca0a..0000000 --- a/dist-desktop/assets/blockDiagram-677ZJIJ3-Dn3HALPW.js +++ /dev/null @@ -1,132 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-UMNXGZaF.js";import{O as r,T as i,a,b as o,c as s,it as c,s as l,x as u,z as d}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as f}from"./channel-C4fgBBJ4.js";import{A as p,B as m,C as h,D as g,E as _,F as v,G as y,H as b,I as x,L as S,M as C,N as w,O as T,P as E,R as D,T as O,U as k,V as A,W as j,a as M,b as ee,et as te,g as N,j as ne,k as re,l as ie,v as ae,w as oe,z as se}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as ce}from"./line-b9Ala942.js";import"./chunk-HOUHSVGY-iJuv90UH.js";import{n as P}from"./chunk-Q4XR5HBZ-CQ8zkLYc.js";import{t as le}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{n as ue,t as F}from"./chunk-7BUUIJ7U-Bb538aSH.js";import{n as de,t as fe}from"./chunk-OGEWGWER-D-nWYRNR.js";import{t as pe}from"./graphlib-DS17s2tU.js";function me(e){return Array.isArray(e)}function he(e){if(ee(e))return e;let t=y(e);if(!ge(e))return{};if(me(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(ae(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?ye(r,e):_e(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return _e(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return be(n,e),_e(n,e),ve(n,e),n}function ge(e){switch(y(e)){case h:case O:case oe:case g:case _:case T:case re:case p:case w:case ne:case C:case E:case v:case x:case S:case D:case se:case m:case k:case j:case A:case b:return!0;default:return!1}}function _e(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function ve(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r=n)&&(e[r]=t[r])}function be(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var xe=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,15],r=[1,7],i=[1,13],a=[1,14],o=[1,19],s=[1,16],c=[1,17],l=[1,18],u=[8,30],d=[8,10,21,28,29,30,31,39,43,46],f=[1,23],p=[1,24],m=[8,10,15,16,21,28,29,30,31,39,43,46],h=[8,10,15,16,21,27,28,29,30,31,39,43,46],g=[1,49],_={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACELINE`,5:`NL`,7:`SPACE`,8:`EOF`,10:`BLOCK_DIAGRAM_KEY`,15:`LINK`,16:`START_LINK`,17:`LINK_LABEL`,18:`STR`,21:`SPACE_BLOCK`,27:`SIZE`,28:`COLUMNS`,29:`id-block`,30:`end`,31:`NODE_ID`,34:`DIR`,35:`NODE_DSTART`,36:`NODE_DEND`,37:`BLOCK_ARROW_START`,38:`BLOCK_ARROW_END`,39:`classDef`,40:`CLASSDEF_ID`,41:`CLASSDEF_STYLEOPTS`,42:`DEFAULT`,43:`class`,44:`CLASSENTITY_IDS`,45:`STYLECLASS`,46:`style`,47:`STYLE_ENTITY_IDS`,48:`STYLE_DEFINITION_DATA`},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.getLogger().debug(`Rule: separator (NL) `);break;case 5:r.getLogger().debug(`Rule: separator (Space) `);break;case 6:r.getLogger().debug(`Rule: separator (EOF) `);break;case 7:r.getLogger().debug(`Rule: hierarchy: `,a[s-1]),r.setHierarchy(a[s-1]);break;case 8:r.getLogger().debug(`Stop NL `);break;case 9:r.getLogger().debug(`Stop EOF `);break;case 10:r.getLogger().debug(`Stop NL2 `);break;case 11:r.getLogger().debug(`Stop EOF2 `);break;case 12:r.getLogger().debug(`Rule: statement: `,a[s]),typeof a[s].length==`number`?this.$=a[s]:this.$=[a[s]];break;case 13:r.getLogger().debug(`Rule: statement #2: `,a[s-1]),this.$=[a[s-1]].concat(a[s]);break;case 14:r.getLogger().debug(`Rule: link: `,a[s],e),this.$={edgeTypeStr:a[s],label:``};break;case 15:r.getLogger().debug(`Rule: LABEL link: `,a[s-3],a[s-1],a[s]),this.$={edgeTypeStr:a[s],label:a[s-1]};break;case 18:let t=parseInt(a[s]),n=r.generateId();this.$={id:n,type:`space`,label:``,width:t,children:[]};break;case 23:r.getLogger().debug(`Rule: (nodeStatement link node) `,a[s-2],a[s-1],a[s],` typestr: `,a[s-1].edgeTypeStr);let i=r.edgeStrToEdgeData(a[s-1].edgeTypeStr),o=r.edgeStrToEdgeStartData(a[s-1].edgeTypeStr),c=r.edgeStrToThickness(a[s-1].edgeTypeStr),l=r.edgeStrToPattern(a[s-1].edgeTypeStr);this.$=[{id:a[s-2].id,label:a[s-2].label,type:a[s-2].type,directions:a[s-2].directions},{id:a[s-2].id+`-`+a[s].id,start:a[s-2].id,end:a[s].id,label:a[s-1].label,type:`edge`,thickness:c,pattern:l,directions:a[s].directions,arrowTypeEnd:i,arrowTypeStart:o},{id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions}];break;case 24:r.getLogger().debug(`Rule: nodeStatement (abc88 node size) `,a[s-1],a[s]),this.$={id:a[s-1].id,label:a[s-1].label,type:r.typeStr2Type(a[s-1].typeStr),directions:a[s-1].directions,widthInColumns:parseInt(a[s],10)};break;case 25:r.getLogger().debug(`Rule: nodeStatement (node) `,a[s]),this.$={id:a[s].id,label:a[s].label,type:r.typeStr2Type(a[s].typeStr),directions:a[s].directions,widthInColumns:1};break;case 26:r.getLogger().debug(`APA123`,this?this:`na`),r.getLogger().debug(`COLUMNS: `,a[s]),this.$={type:`column-setting`,columns:a[s]===`auto`?-1:parseInt(a[s])};break;case 27:r.getLogger().debug(`Rule: id-block statement : `,a[s-2],a[s-1]),r.generateId(),this.$={...a[s-2],type:`composite`,children:a[s-1]};break;case 28:r.getLogger().debug(`Rule: blockStatement : `,a[s-2],a[s-1],a[s]);let u=r.generateId();this.$={id:u,type:`composite`,label:``,children:a[s-1]};break;case 29:r.getLogger().debug(`Rule: node (NODE_ID separator): `,a[s]),this.$={id:a[s]};break;case 30:r.getLogger().debug(`Rule: node (NODE_ID nodeShapeNLabel separator): `,a[s-1],a[s]),this.$={id:a[s-1],label:a[s].label,typeStr:a[s].typeStr,directions:a[s].directions};break;case 31:r.getLogger().debug(`Rule: dirList: `,a[s]),this.$=[a[s]];break;case 32:r.getLogger().debug(`Rule: dirList: `,a[s-1],a[s]),this.$=[a[s-1]].concat(a[s]);break;case 33:r.getLogger().debug(`Rule: nodeShapeNLabel: `,a[s-2],a[s-1],a[s]),this.$={typeStr:a[s-2]+a[s],label:a[s-1]};break;case 34:r.getLogger().debug(`Rule: BLOCK_ARROW nodeShapeNLabel: `,a[s-3],a[s-2],` #3:`,a[s-1],a[s]),this.$={typeStr:a[s-3]+a[s],label:a[s-2],directions:a[s-1]};break;case 35:case 36:this.$={type:`classDef`,id:a[s-1].trim(),css:a[s].trim()};break;case 37:this.$={type:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:this.$={type:`applyStyles`,id:a[s-1].trim(),stylesStr:a[s].trim()};break}},`anonymous`),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{8:[1,20]},t(u,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:r,28:i,29:a,31:o,39:s,43:c,46:l}),t(d,[2,16],{14:22,15:f,16:p}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(m,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:o},{10:n,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(h,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:o},{31:[2,14]},{17:[1,36]},t(m,[2,24]),{10:n,11:37,13:4,14:22,15:f,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:i,29:a,31:o,39:s,43:c,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(h,[2,30]),{18:[1,43]},{18:[1,44]},t(m,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:g},{15:[1,50]},t(d,[2,27]),t(h,[2,33]),{38:[1,51]},{33:52,34:g,38:[2,31]},{31:[2,15]},t(h,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};_.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:e(function(e,t,n,r){switch(n){case 0:return e.getLogger().debug(`Found block-beta`),10;case 1:return e.getLogger().debug(`Found id-block`),29;case 2:return e.getLogger().debug(`Found block`),10;case 3:e.getLogger().debug(`.`,t.yytext);break;case 4:e.getLogger().debug(`_`,t.yytext);break;case 5:return 5;case 6:return t.yytext=-1,28;case 7:return t.yytext=t.yytext.replace(/columns\s+/,``),e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),28;case 8:this.pushState(`md_string`);break;case 9:return`MD_STR`;case 10:this.popState();break;case 11:this.pushState(`string`);break;case 12:e.getLogger().debug(`LEX: POPPING STR:`,t.yytext),this.popState();break;case 13:return e.getLogger().debug(`LEX: STR end:`,t.yytext),`STR`;case 14:return t.yytext=t.yytext.replace(/space\:/,``),e.getLogger().debug(`SPACE NUM (LEX)`,t.yytext),21;case 15:return t.yytext=`1`,e.getLogger().debug(`COLUMNS (LEX)`,t.yytext),21;case 16:return 42;case 17:return`LINKSTYLE`;case 18:return`INTERPOLATE`;case 19:return this.pushState(`CLASSDEF`),39;case 20:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 21:return this.popState(),this.pushState(`CLASSDEFID`),40;case 22:return this.popState(),41;case 23:return this.pushState(`CLASS`),43;case 24:return this.popState(),this.pushState(`CLASS_STYLE`),44;case 25:return this.popState(),45;case 26:return this.pushState(`STYLE_STMNT`),46;case 27:return this.popState(),this.pushState(`STYLE_DEFINITION`),47;case 28:return this.popState(),48;case 29:return this.pushState(`acc_title`),`acc_title`;case 30:return this.popState(),`acc_title_value`;case 31:return this.pushState(`acc_descr`),`acc_descr`;case 32:return this.popState(),`acc_descr_value`;case 33:this.pushState(`acc_descr_multiline`);break;case 34:this.popState();break;case 35:return`acc_descr_multiline_value`;case 36:return 30;case 37:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().debug(`Lex: ))`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 41:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 42:return this.popState(),e.getLogger().debug(`Lex: (-`),`NODE_DEND`;case 43:return this.popState(),e.getLogger().debug(`Lex: -)`),`NODE_DEND`;case 44:return this.popState(),e.getLogger().debug(`Lex: ((`),`NODE_DEND`;case 45:return this.popState(),e.getLogger().debug(`Lex: ]]`),`NODE_DEND`;case 46:return this.popState(),e.getLogger().debug(`Lex: (`),`NODE_DEND`;case 47:return this.popState(),e.getLogger().debug(`Lex: ])`),`NODE_DEND`;case 48:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 49:return this.popState(),e.getLogger().debug(`Lex: /]`),`NODE_DEND`;case 50:return this.popState(),e.getLogger().debug(`Lex: )]`),`NODE_DEND`;case 51:return this.popState(),e.getLogger().debug(`Lex: )`),`NODE_DEND`;case 52:return this.popState(),e.getLogger().debug(`Lex: ]>`),`NODE_DEND`;case 53:return this.popState(),e.getLogger().debug(`Lex: ]`),`NODE_DEND`;case 54:return e.getLogger().debug(`Lexa: -)`),this.pushState(`NODE`),35;case 55:return e.getLogger().debug(`Lexa: (-`),this.pushState(`NODE`),35;case 56:return e.getLogger().debug(`Lexa: ))`),this.pushState(`NODE`),35;case 57:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 58:return e.getLogger().debug(`Lex: (((`),this.pushState(`NODE`),35;case 59:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 60:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 61:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 62:return e.getLogger().debug(`Lexc: >`),this.pushState(`NODE`),35;case 63:return e.getLogger().debug(`Lexa: ([`),this.pushState(`NODE`),35;case 64:return e.getLogger().debug(`Lexa: )`),this.pushState(`NODE`),35;case 65:return this.pushState(`NODE`),35;case 66:return this.pushState(`NODE`),35;case 67:return this.pushState(`NODE`),35;case 68:return this.pushState(`NODE`),35;case 69:return this.pushState(`NODE`),35;case 70:return this.pushState(`NODE`),35;case 71:return this.pushState(`NODE`),35;case 72:return e.getLogger().debug(`Lexa: [`),this.pushState(`NODE`),35;case 73:return this.pushState(`BLOCK_ARROW`),e.getLogger().debug(`LEX ARR START`),37;case 74:return e.getLogger().debug(`Lex: NODE_ID`,t.yytext),31;case 75:return e.getLogger().debug(`Lex: EOF`,t.yytext),8;case 76:this.pushState(`md_string`);break;case 77:this.pushState(`md_string`);break;case 78:return`NODE_DESCR`;case 79:this.popState();break;case 80:e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`);break;case 81:e.getLogger().debug(`LEX ARR: Starting string`),this.pushState(`string`);break;case 82:return e.getLogger().debug(`LEX: NODE_DESCR:`,t.yytext),`NODE_DESCR`;case 83:e.getLogger().debug(`LEX POPPING`),this.popState();break;case 84:e.getLogger().debug(`Lex: =>BAE`),this.pushState(`ARROW_DIR`);break;case 85:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (right): dir:`,t.yytext),`DIR`;case 86:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (left):`,t.yytext),`DIR`;case 87:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (x):`,t.yytext),`DIR`;case 88:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (y):`,t.yytext),`DIR`;case 89:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (up):`,t.yytext),`DIR`;case 90:return t.yytext=t.yytext.replace(/^,\s*/,``),e.getLogger().debug(`Lex (down):`,t.yytext),`DIR`;case 91:return t.yytext=`]>`,e.getLogger().debug(`Lex (ARROW_DIR end):`,t.yytext),this.popState(),this.popState(),`BLOCK_ARROW_END`;case 92:return e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 93:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 94:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 95:return e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 96:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 97:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 98:return e.getLogger().debug(`Lex: START_LINK`,t.yytext),this.pushState(`LLABEL`),16;case 99:this.pushState(`md_string`);break;case 100:return e.getLogger().debug(`Lex: Starting string`),this.pushState(`string`),`LINK_LABEL`;case 101:return this.popState(),e.getLogger().debug(`Lex: LINK`,`#`+t.yytext+`#`),15;case 102:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 103:return this.popState(),e.getLogger().debug(`Lex: LINK`,t.yytext),15;case 104:return e.getLogger().debug(`Lex: COLON`,t.yytext),t.yytext=t.yytext.slice(1),27}},`anonymous`),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}}})();function v(){this.yy={}}return e(v,`Parser`),v.prototype=_,_.Parser=v,new v})();xe.parser=xe;var Se=xe,I=new Map,Ce=[],we=new Map,Te=`color`,Ee=`fill`,De=`bgFill`,Oe=`,`,L=new Map,ke=``,Ae=e(e=>l.sanitizeText(e,u()),`sanitizeText`),je=e(function(e,t=``){let n=L.get(e);n||(n={id:e,styles:[],textStyles:[]},L.set(e,n)),t?.split(Oe).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(Te).exec(e)){let e=t.replace(Ee,De).replace(Te,Ee);n.textStyles.push(e)}n.styles.push(t)})},`addStyleClass`),Me=e(function(e,t=``){let n=I.get(e);t!=null&&(n.styles=t.split(Oe))},`addStyle2Node`),Ne=e(function(e,t){e.split(`,`).forEach(function(e){let n=I.get(e);if(n===void 0){let t=e.trim();n={id:t,type:`na`,children:[]},I.set(t,n)}n.classes||=[],n.classes.push(t)})},`setCssClass`),Pe=e((e,n)=>{let r=e.flat(),i=[],a=r.find(e=>e?.type===`column-setting`)?.columns??-1;for(let e of r){if(typeof a==`number`&&a>0&&e.type!==`column-setting`&&typeof e.widthInColumns==`number`&&e.widthInColumns>a&&t.warn(`Block ${e.id} width ${e.widthInColumns} exceeds configured column width ${a}`),e.label&&=Ae(e.label),e.type===`classDef`){je(e.id,e.css);continue}if(e.type===`applyClass`){Ne(e.id,e?.styleClass??``);continue}if(e.type===`applyStyles`){e?.stylesStr&&Me(e.id,e?.stylesStr);continue}if(e.type===`column-setting`)n.columns=e.columns??-1;else if(e.type===`edge`){let t=(we.get(e.id)??0)+1;we.set(e.id,t),e.id=t+`-`+e.id,Ce.push(e)}else{e.label||(e.type===`composite`?e.label=``:e.label=e.id);let t=I.get(e.id);if(t===void 0?I.set(e.id,e):(e.type!==`na`&&(t.type=e.type),e.label!==e.id&&(t.label=e.label)),e.children&&Pe(e.children,e),e.type===`space`){let t=e.width??1;for(let n=0;n{t.debug(`Clear called`),a(),R={id:`root`,type:`composite`,children:[],columns:-1},I=new Map([[`root`,R]]),Fe=[],L=new Map,Ce=[],we=new Map,ke=``},`clear`);function Le(e){switch(t.debug(`typeStr2Type`,e),e){case`[]`:return`square`;case`()`:return t.debug(`we have a round`),`round`;case`(())`:return`circle`;case`>]`:return`rect_left_inv_arrow`;case`{}`:return`diamond`;case`{{}}`:return`hexagon`;case`([])`:return`stadium`;case`[[]]`:return`subroutine`;case`[()]`:return`cylinder`;case`((()))`:return`doublecircle`;case`[//]`:return`lean_right`;case`[\\\\]`:return`lean_left`;case`[/\\]`:return`trapezoid`;case`[\\/]`:return`inv_trapezoid`;case`<[]>`:return`block_arrow`;default:return`na`}}e(Le,`typeStr2Type`);function Re(e){switch(t.debug(`typeStr2Type`,e),e){case`==`:return`thick`;default:return`normal`}}e(Re,`edgeTypeStr2Type`);function ze(e){switch(e.trim().slice(-1)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`>`:return`arrow_point`;default:return``}}e(ze,`edgeStrToEdgeData`);function Be(e){switch(e.trim().charAt(0)){case`x`:return`arrow_cross`;case`o`:return`arrow_circle`;case`<`:return`arrow_point`;default:return`arrow_open`}}e(Be,`edgeStrToEdgeStartData`);function Ve(e){return e.includes(`==`)?`thick`:`normal`}e(Ve,`edgeStrToThickness`);function He(e){return e.includes(`.-`)?`dotted`:`solid`}e(He,`edgeStrToPattern`);var Ue=0,We={getConfig:e(()=>o().block,`getConfig`),typeStr2Type:Le,edgeTypeStr2Type:Re,edgeStrToEdgeData:ze,edgeStrToEdgeStartData:Be,edgeStrToThickness:Ve,edgeStrToPattern:He,getLogger:e(()=>t,`getLogger`),getBlocksFlat:e(()=>[...I.values()],`getBlocksFlat`),getBlocks:e(()=>Fe||[],`getBlocks`),getEdges:e(()=>Ce,`getEdges`),setHierarchy:e(e=>{R.children=e,Pe(e,R),Fe=R.children},`setHierarchy`),getBlock:e(e=>I.get(e),`getBlock`),setBlock:e(e=>{I.set(e.id,e)},`setBlock`),getColumns:e(e=>{let t=I.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},`getColumns`),getClasses:e(function(){return L},`getClasses`),clear:Ie,generateId:e(()=>(Ue++,`id-`+Math.random().toString(36).substr(2,12)+`-`+Ue),`generateId`),setDiagramId:e(e=>{ke=e},`setDiagramId`),getDiagramId:e(()=>ke,`getDiagramId`)},z=e((e,t)=>{let n=f;return c(n(e,`r`),n(e,`g`),n(e,`b`),t)},`fade`),Ge=e(e=>`.label { - font-family: ${e.fontFamily}; - color: ${e.nodeTextColor||e.textColor}; - } - .cluster-label text { - fill: ${e.titleColor}; - } - .cluster-label span,p { - color: ${e.titleColor}; - } - - - - .label text,span,p { - fill: ${e.nodeTextColor||e.textColor}; - color: ${e.nodeTextColor||e.textColor}; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${e.mainBkg}; - stroke: ${e.nodeBorder}; - stroke-width: 1px; - } - .flowchart-label text { - text-anchor: middle; - } - // .flowchart-label .text-outer-tspan { - // text-anchor: middle; - // } - // .flowchart-label .text-inner-tspan { - // text-anchor: start; - // } - - .node .label { - text-align: center; - } - .node.clickable { - cursor: pointer; - } - - .arrowheadPath { - fill: ${e.arrowheadColor}; - } - - .edgePath .path { - stroke: ${e.lineColor}; - stroke-width: 2.0px; - } - - .flowchart-link { - stroke: ${e.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${e.edgeLabelBackground}; - /* - * This is for backward compatibility with existing code that didn't - * add a \`

\` around edge labels. - * - * TODO: We should probably remove this in a future release. - */ - p { - margin: 0; - padding: 0; - display: inline; - } - rect { - opacity: 0.5; - background-color: ${e.edgeLabelBackground}; - fill: ${e.edgeLabelBackground}; - } - text-align: center; - } - - /* For html labels only */ - .labelBkg { - background-color: ${e.edgeLabelBackground}; - } - - .node .cluster { - // fill: ${z(e.mainBkg,.5)}; - fill: ${z(e.clusterBkg,.5)}; - stroke: ${z(e.clusterBorder,.2)}; - box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; - stroke-width: 1px; - } - - .cluster text { - fill: ${e.titleColor}; - } - - .cluster span,p { - color: ${e.titleColor}; - } - /* .cluster div { - color: ${e.titleColor}; - } */ - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: ${e.fontFamily}; - font-size: 12px; - background: ${e.tertiaryColor}; - border: 1px solid ${e.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .flowchartTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.textColor}; - } - ${le()} -`,`getStyles`),Ke=e((e,t,n,r)=>{t.forEach(t=>{qe[t](e,n,r)})},`insertMarkers`),qe={extension:e((e,n,r)=>{t.trace(`Making markers for `,r),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionStart`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd`).attr(`class`,`marker extension `+n).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`)},`extension`),composition:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).attr(`refX`,6).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`stroke`,`black`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`stroke`,`black`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6)},`lollipop`),point:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,6).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`)},`point`),circle:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,11).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`)},`circle`),cross:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,12).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`)},`cross`),barb:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`)},Je=Ke;function B(e,t){if(e===0||!Number.isInteger(e))throw Error(`Columns must be an integer !== 0.`);if(t<0||!Number.isInteger(t))throw Error(`Position must be a non-negative integer.`+t);return e<0?{px:t,py:0}:e===1?{px:0,py:t}:{px:t%e,py:Math.floor(t/e)}}e(B,`calculateBlockPosition`);var Ye=e(e=>{let n=0,r=0;for(let i of e.children){let{width:e,height:a,x:o,y:s}=i.size??{width:0,height:0,x:0,y:0};if(t.debug(`getMaxChildSize abc95 child:`,i.id,`width:`,e,`height:`,a,`x:`,o,`y:`,s,i.type),i.type===`space`)continue;let c=e/(i.widthInColumns??1);c>n&&(n=c),a>r&&(r=a)}return{width:n,height:r}},`getMaxChildSize`);function V(e,n,r=0,i=0,a=8){t.debug(`setBlockSizes abc95 (start)`,e.id,e?.size?.x,`block width =`,e?.size,`siblingWidth`,r),e?.size?.width||(e.size={width:r,height:i,x:0,y:0});let o=0,s=0;if(e.children?.length>0){for(let t of e.children)V(t,n,0,0,a);let c=Ye(e);o=c.width,s=c.height,t.debug(`setBlockSizes abc95 maxWidth of`,e.id,`:s children is `,o,s);for(let n of e.children)n.size&&(t.debug(`abc95 Setting size of children of ${e.id} id=${n.id} ${o} ${s} ${JSON.stringify(n.size)}`),n.size.width=o*(n.widthInColumns??1)+a*((n.widthInColumns??1)-1),n.size.height=s,n.size.x=0,n.size.y=0,t.debug(`abc95 updating size of ${e.id} children child:${n.id} maxWidth:${o} maxHeight:${s}`));for(let t of e.children)V(t,n,o,s,a);let l=e.columns??-1,u=0;for(let t of e.children)u+=t.widthInColumns??1;let d=e.children.length;l>0&&l0?Math.min(e.children.length,l):e.children.length;if(n>0){let r=(p-n*a-a)/n;t.debug(`abc95 (growing to fit) width`,e.id,p,e.size?.width,r);for(let t of e.children)t.size&&(t.size.width=r)}}e.size={width:p,height:m,x:0,y:0}}t.debug(`setBlockSizes abc94 (done)`,e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}e(V,`setBlockSizes`);function H(e,n,r=8){t.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);let i=e.columns??-1;if(t.debug(`layoutBlocks columns abc95`,e.id,`=>`,i,e),e.children&&e.children.length>0){let a=e?.children[0]?.size?.width??0,o=e.children.length*a+(e.children.length-1)*r;t.debug(`widthOfChildren 88`,o,`posX`);let s=new Map;{let t=0;for(let n of e.children){if(!n.size)continue;let{py:e}=B(i,t),r=s.get(e)??0;n.size.height>r&&s.set(e,n.size.height);let a=n?.widthInColumns??1;i>0&&(a=Math.min(a,i-t%i)),t+=a}}let c=new Map;{let e=0,t=[...s.keys()].sort((e,t)=>e-t);for(let n of t)c.set(n,e),e+=(s.get(n)??0)+r}let l=0;t.debug(`abc91 block?.size?.x`,e.id,e?.size?.x);let u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,d=0;for(let a of e.children){let o=e;if(!a.size)continue;let{width:f,height:p}=a.size,{px:m,py:h}=B(i,l);if(h!=d&&(d=h,u=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-r,t.debug(`New row in layout for block`,e.id,` and child `,a.id,d)),t.debug(`abc89 layout blocks (child) id: ${a.id} Pos: ${l} (px, py) ${m},${h} (${o?.size?.x},${o?.size?.y}) parent: ${o.id} width: ${f}${r}`),o.size){let e=f/2;a.size.x=u+r+e,t.debug(`abc91 layout blocks (calc) px, pyid:${a.id} startingPos=X${u} new startingPosX${a.size.x} ${e} padding=${r} width=${f} halfWidth=${e} => x:${a.size.x} y:${a.size.y} ${a.widthInColumns} (width * (child?.w || 1)) / 2 ${f*(a?.widthInColumns??1)/2}`),u=a.size.x+e;let n=c.get(h)??0,i=s.get(h)??p;a.size.y=o.size.y-o.size.height/2+n+i/2+r,t.debug(`abc88 layout blocks (calc) px, pyid:${a.id}startingPosX${u}${r}${e}=>x:${a.size.x}y:${a.size.y}${a.widthInColumns}(width * (child?.w || 1)) / 2${f*(a?.widthInColumns??1)/2}`)}a.children&&H(a,n,r);let g=a?.widthInColumns??1;i>0&&(g=Math.min(g,i-l%i)),l+=g,t.debug(`abc88 columnsPos`,a,l)}}t.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}e(H,`layoutBlocks`);function Xe(e,{minX:t,minY:n,maxX:r,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!==`root`){let{x:a,y:o,width:s,height:c}=e.size;a-s/2r&&(r=a+s/2),o+c/2>i&&(i=o+c/2)}if(e.children)for(let a of e.children)({minX:t,minY:n,maxX:r,maxY:i}=Xe(a,{minX:t,minY:n,maxX:r,maxY:i}));return{minX:t,minY:n,maxX:r,maxY:i}}e(Xe,`findBounds`);function Ze(e){let n=e.getBlock(`root`);if(!n)return;let r=u()?.block?.padding??8;V(n,e,0,0,r),H(n,e,r),t.debug(`getBlocks`,JSON.stringify(n,null,2));let{minX:i,minY:a,maxX:o,maxY:s}=Xe(n),c=s-a;return{x:i,y:a,width:o-i,height:c}}e(Ze,`layout`);var U=e(async(e,t,n,r=!1,a=!1)=>{let o=t||``;typeof o==`object`&&(o=o[0]);let s=u(),c=i(s);return await P(e,o,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:a,width:1/0},s)},`createLabel`),Qe=e((e,t,n,r,i)=>{t.arrowTypeStart&&et(e,`start`,t.arrowTypeStart,n,r,i),t.arrowTypeEnd&&et(e,`end`,t.arrowTypeEnd,n,r,i)},`addEdgeMarkers`),$e={arrow_cross:`cross`,arrow_point:`point`,arrow_barb:`barb`,arrow_circle:`circle`,aggregation:`aggregation`,extension:`extension`,composition:`composition`,dependency:`dependency`,lollipop:`lollipop`},et=e((e,n,r,i,a,o)=>{let s=$e[r];if(!s){t.warn(`Unknown arrow type: ${r}`);return}let c=n===`start`?`Start`:`End`;e.attr(`marker-${n}`,`url(${i}#${a}_${o}-${s}${c})`)},`addEdgeMarker`),tt={},W={},nt=e(async(e,t)=>{let r=u(),a=i(r),o=e.insert(`g`).attr(`class`,`edgeLabel`),s=o.insert(`g`).attr(`class`,`label`),c=t.labelType===`markdown`,l=await P(e,t.label,{style:t.labelStyle,useHtmlLabels:a,addSvgBackground:c,isNode:!1,markdown:c,width:c?void 0:1/0},r);s.node().appendChild(l);let d=l.getBBox(),f=d;if(a){let e=l.children[0],t=n(l);d=e.getBoundingClientRect(),f=d,t.attr(`width`,d.width),t.attr(`height`,d.height)}else{let e=n(l).select(`text`).node();e&&typeof e.getBBox==`function`&&(f=e.getBBox())}s.attr(`transform`,F(f,a)),tt[t.id]=o,t.width=d.width,t.height=d.height;let p;if(t.startLabelLeft){let r=e.insert(`g`).attr(`class`,`edgeTerminals`),i=r.insert(`g`).attr(`class`,`inner`),o=await U(i,t.startLabelLeft,t.labelStyle);p=o;let s=o.getBBox();if(a){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}i.attr(`transform`,F(s,a)),W[t.id]||(W[t.id]={}),W[t.id].startLeft=r,G(p,t.startLabelLeft)}if(t.startLabelRight){let r=e.insert(`g`).attr(`class`,`edgeTerminals`),i=r.insert(`g`).attr(`class`,`inner`),o=await U(i,t.startLabelRight,t.labelStyle);p=o;let s=o.getBBox();if(a){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}i.attr(`transform`,F(s,a)),W[t.id]||(W[t.id]={}),W[t.id].startRight=r,G(p,t.startLabelRight)}if(t.endLabelLeft){let r=e.insert(`g`).attr(`class`,`edgeTerminals`),i=r.insert(`g`).attr(`class`,`inner`),o=await U(r,t.endLabelLeft,t.labelStyle);p=o;let s=o.getBBox();if(a){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}i.attr(`transform`,F(s,a)),W[t.id]||(W[t.id]={}),W[t.id].endLeft=r,G(p,t.endLabelLeft)}if(t.endLabelRight){let r=e.insert(`g`).attr(`class`,`edgeTerminals`),i=r.insert(`g`).attr(`class`,`inner`),o=await U(r,t.endLabelRight,t.labelStyle);p=o;let s=o.getBBox();if(a){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}i.attr(`transform`,F(s,a)),W[t.id]||(W[t.id]={}),W[t.id].endRight=r,G(p,t.endLabelRight)}return l},`insertEdgeLabel`);function G(e,t){i(u())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}e(G,`setTerminalWidth`);var rt=e((e,n)=>{t.debug(`Moving label abc88 `,e.id,e.label,tt[e.id],n);let r=n.updatedPath?n.updatedPath:n.originalPath,{subGraphTitleTotalMargin:i}=de(u());if(e.label){let a=tt[e.id],o=e.x,s=e.y;if(r){let i=N.calcLabelPosition(r);t.debug(`Moving label `+e.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),n.updatedPath&&(o=i.x,s=i.y)}a.attr(`transform`,`translate(${o}, ${s+i/2})`)}if(e.startLabelLeft){let t=W[e.id].startLeft,n=e.x,i=e.y;if(r){let t=N.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.startLabelRight){let t=W[e.id].startRight,n=e.x,i=e.y;if(r){let t=N.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelLeft){let t=W[e.id].endLeft,n=e.x,i=e.y;if(r){let t=N.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelRight){let t=W[e.id].endRight,n=e.x,i=e.y;if(r){let t=N.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}},`positionEdgeLabel`),it=e((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),at=e((e,n,r)=>{t.debug(`intersection calc abc89: - outsidePoint: ${JSON.stringify(n)} - insidePoint : ${JSON.stringify(r)} - node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,a=e.y,o=Math.abs(i-r.x),s=e.width/2,c=r.xMath.abs(i-n.x)*l){let e=r.y{t.debug(`abc88 cutPathAtIntersect`,e,n);let r=[],i=e[0],a=!1;return e.forEach(e=>{if(!it(n,e)&&!a){let t=at(n,i,e),o=!1;r.forEach(e=>{o||=e.x===t.x&&e.y===t.y}),r.some(e=>e.x===t.x&&e.y===t.y)||r.push(t),a=!0}else i=e,a||r.push(e)}),r},`cutPathAtIntersect`),st=e(function(e,n,i,a,o,s,c){let l=i.points;t.debug(`abc88 InsertEdge: edge=`,i,`e=`,n);let d=!1,f=s.node(n.v);var p=s.node(n.w);p?.intersect&&f?.intersect&&(l=l.slice(1,i.points.length-1),l.unshift(f.intersect(l[0])),l.push(p.intersect(l[l.length-1]))),i.toCluster&&(t.debug(`to cluster abc88`,a[i.toCluster]),l=ot(i.points,a[i.toCluster].node),d=!0),i.fromCluster&&(t.debug(`from cluster abc88`,a[i.fromCluster]),l=ot(l.reverse(),a[i.fromCluster].node).reverse(),d=!0);let m=l.filter(e=>!Number.isNaN(e.y)),h=te;i.curve&&(o===`graph`||o===`flowchart`)&&(h=i.curve);let{x:g,y:_}=ue(i),v=ce().x(g).y(_).curve(h),y;switch(i.thickness){case`normal`:y=`edge-thickness-normal`;break;case`thick`:y=`edge-thickness-thick`;break;case`invisible`:y=`edge-thickness-thick`;break;default:y=``}switch(i.pattern){case`solid`:y+=` edge-pattern-solid`;break;case`dotted`:y+=` edge-pattern-dotted`;break;case`dashed`:y+=` edge-pattern-dashed`;break}let b=e.append(`path`).attr(`d`,v(m)).attr(`id`,i.id).attr(`class`,` `+y+(i.classes?` `+i.classes:``)).attr(`style`,i.style),x=``;(u().flowchart.arrowMarkerAbsolute||u().state.arrowMarkerAbsolute)&&(x=r(!0)),Qe(b,i,x,c,o);let S={};return d&&(S.updatedPath=l),S.originalPath=i.points,S},`insertEdge`),ct=e(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n);break}return t},`expandAndDeduplicateDirections`),lt=e((e,t,n,r)=>{let i=ct(e),a=t.height+2*n.padding,o=a/2,s=r??t.width+2*o+n.padding,c=n.padding/2;return i.has(`right`)&&i.has(`left`)&&i.has(`up`)&&i.has(`down`)?[{x:0,y:0},{x:o,y:0},{x:s/2,y:2*c},{x:s-o,y:0},{x:s,y:0},{x:s,y:-a/3},{x:s+2*c,y:-a/2},{x:s,y:-2*a/3},{x:s,y:-a},{x:s-o,y:-a},{x:s/2,y:-a-2*c},{x:o,y:-a},{x:0,y:-a},{x:0,y:-2*a/3},{x:-2*c,y:-a/2},{x:0,y:-a/3}]:i.has(`right`)&&i.has(`left`)&&i.has(`up`)?[{x:o,y:0},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}]:i.has(`right`)&&i.has(`left`)&&i.has(`down`)?[{x:0,y:0},{x:o,y:-a},{x:s-o,y:-a},{x:s,y:0}]:i.has(`right`)&&i.has(`up`)&&i.has(`down`)?[{x:0,y:0},{x:s,y:-o},{x:s,y:-a+o},{x:0,y:-a}]:i.has(`left`)&&i.has(`up`)&&i.has(`down`)?[{x:s,y:0},{x:0,y:-o},{x:0,y:-a+o},{x:s,y:-a}]:i.has(`right`)&&i.has(`left`)?[{x:o,y:0},{x:o,y:-c},{x:s-o,y:-c},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:s-o,y:-a+c},{x:o,y:-a+c},{x:o,y:-a},{x:0,y:-a/2}]:i.has(`up`)&&i.has(`down`)?[{x:s/2,y:0},{x:0,y:-c},{x:o,y:-c},{x:o,y:-a+c},{x:0,y:-a+c},{x:s/2,y:-a},{x:s,y:-a+c},{x:s-o,y:-a+c},{x:s-o,y:-c},{x:s,y:-c}]:i.has(`right`)&&i.has(`up`)?[{x:0,y:0},{x:s,y:-o},{x:0,y:-a}]:i.has(`right`)&&i.has(`down`)?[{x:0,y:0},{x:s,y:0},{x:0,y:-a}]:i.has(`left`)&&i.has(`up`)?[{x:s,y:0},{x:0,y:-o},{x:s,y:-a}]:i.has(`left`)&&i.has(`down`)?[{x:s,y:0},{x:0,y:0},{x:s,y:-a}]:i.has(`right`)?[{x:o,y:-c},{x:o,y:-c},{x:s-o,y:-c},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:s-o,y:-a+c},{x:o,y:-a+c},{x:o,y:-a+c}]:i.has(`left`)?[{x:o,y:0},{x:o,y:-c},{x:s-o,y:-c},{x:s-o,y:-a+c},{x:o,y:-a+c},{x:o,y:-a},{x:0,y:-a/2}]:i.has(`up`)?[{x:o,y:-c},{x:o,y:-a+c},{x:0,y:-a+c},{x:s/2,y:-a},{x:s,y:-a+c},{x:s-o,y:-a+c},{x:s-o,y:-c}]:i.has(`down`)?[{x:s/2,y:0},{x:0,y:-c},{x:o,y:-c},{x:o,y:-a+c},{x:s-o,y:-a+c},{x:s-o,y:-c},{x:s,y:-c}]:[{x:0,y:0}]},`getArrowPoints`);function ut(e,t){return e.intersect(t)}e(ut,`intersectNode`);var dt=ut;function ft(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x0}e(_t,`sameSign`);var vt=gt,yt=bt;function bt(e,t,n){var r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));for(var c=r-e.width/2-o,l=i-e.height/2-s,u=0;u1&&a.sort(function(e,t){var r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`)},q=e(async(e,t,r,a)=>{let o=u(),s,c=t.useHtmlLabels||i(o);s=r||`node default`;let l=e.insert(`g`).attr(`class`,s).attr(`id`,t.domId||t.id),f=l.insert(`g`).attr(`class`,`label`).attr(`style`,t.labelStyle),p;p=t.labelText===void 0?``:typeof t.labelText==`string`?t.labelText:t.labelText[0];let m;m=t.labelType===`markdown`?P(f,d(M(p),o),{useHtmlLabels:c,width:t.width||o.flowchart.wrappingWidth,classes:`markdown-node-label`},o):await U(f,d(M(p),o),t.labelStyle,!1,a);let h=m.getBBox(),g=t.padding/2;if(i(o)){let e=m.children[0],t=n(m);await fe(e,p),h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}return c?f.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`):f.attr(`transform`,`translate(0, `+-h.height/2+`)`),t.centerLabel&&f.attr(`transform`,`translate(`+-h.width/2+`, `+-h.height/2+`)`),f.insert(`rect`,`:first-child`),{shapeSvg:l,bbox:h,halfPadding:g,label:f}},`labelHelper`),J=e((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`);function Y(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}e(Y,`insertPolygonShape`);var xt=e(async(e,n)=>{n.useHtmlLabels||i(u())||(n.centerLabel=!0);let{shapeSvg:r,bbox:a,halfPadding:o}=await q(e,n,`node `+n.classes,!0);t.info(`Classes = `,n.classes);let s=r.insert(`rect`,`:first-child`);return s.attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,-a.width/2-o).attr(`y`,-a.height/2-o).attr(`width`,a.width+n.padding).attr(`height`,a.height+n.padding),J(n,s),n.intersect=function(e){return K.rect(n,e)},r},`note`),St=e(e=>e?` `+e:``,`formatClass`),X=e((e,t)=>`${t||`node default`}${St(e.classes)} ${St(e.class)}`,`getClassesFromNode`),Ct=e(async(e,n)=>{let{shapeSvg:r,bbox:i}=await q(e,n,X(n,void 0),!0),a=i.width+n.padding+(i.height+n.padding),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];t.info(`Question main (Circle)`);let s=Y(r,a,a,o);return s.attr(`style`,n.style),J(n,s),n.intersect=function(e){return t.warn(`Intersect called`),K.polygon(n,o,e)},r},`question`),wt=e((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id);return n.insert(`polygon`,`:first-child`).attr(`points`,[{x:0,y:28/2},{x:28/2,y:0},{x:0,y:-28/2},{x:-28/2,y:0}].map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`state-start`).attr(`r`,7).attr(`width`,28).attr(`height`,28),t.width=28,t.height=28,t.intersect=function(e){return K.circle(t,14,e)},n},`choice`),Tt=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=t.positioned?t.height:r.height+t.padding,a=i/4,o=t.positioned?t.width:r.width+2*a+t.padding,s=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-i/2},{x:o-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],c=Y(n,o,i,s);return c.attr(`style`,t.style),J(t,c),t.intersect=function(e){return K.polygon(t,s,e)},n},`hexagon`),Et=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,void 0,!0),i=r.height+2*t.padding,a=i/2,o=r.width+2*a+t.padding,s=t.positioned&&(t.widthInColumns??1)>1&&t.width>o?t.width:o,c=lt(t.directions,r,t,s),l=Y(n,s,i,c);return l.attr(`style`,t.style),J(t,l),t.intersect=function(e){return K.polygon(t,c,e)},n},`block_arrow`),Dt=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return Y(n,i,a,o).attr(`style`,t.style),t.width=i+a,t.height=a,t.intersect=function(e){return K.polygon(t,o,e)},n},`rect_left_inv_arrow`),Ot=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`lean_right`),kt=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`lean_left`),At=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`trapezoid`),jt=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`inv_trapezoid`),Mt=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`rect_right_inv_arrow`),Nt=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=i/2,o=a/(2.5+i/50),s=r.height+o+t.padding,c=`M 0,`+o+` a `+a+`,`+o+` 0,0,0 `+i+` 0 a `+a+`,`+o+` 0,0,0 `+-i+` 0 l 0,`+s+` a `+a+`,`+o+` 0,0,0 `+i+` 0 l 0,`+-s;return J(t,n.attr(`label-offset-y`,o).insert(`path`,`:first-child`).attr(`style`,t.style).attr(`d`,c).attr(`transform`,`translate(`+-i/2+`,`+-(s/2+o)+`)`)),t.intersect=function(e){let n=K.rect(t,e),r=n.x-t.x;if(a!=0&&(Math.abs(r)t.height/2-o)){let i=o*o*(1-r*r/(a*a));i!=0&&(i=Math.sqrt(i)),i=o-i,e.y-t.y>0&&(i=-i),n.y+=i}return n},n},`cylinder`),Pt=e(async(e,n)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await q(e,n,`node `+n.classes+` `+n.class,!0),o=r.insert(`rect`,`:first-child`),s=n.positioned?n.width:i.width+n.padding,c=n.positioned?n.height:i.height+n.padding,l=n.positioned?-s/2:-i.width/2-a,u=n.positioned?-c/2:-i.height/2-a;if(o.attr(`class`,`basic label-container`).attr(`style`,n.style).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c),n.props){let e=new Set(Object.keys(n.props));n.props.borders&&(Z(o,n.props.borders,s,c),e.delete(`borders`)),e.forEach(e=>{t.warn(`Unknown node property ${e}`)})}return J(n,o),n.intersect=function(e){return K.rect(n,e)},r},`rect`),Ft=e(async(e,n)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await q(e,n,`node `+n.classes,!0),o=r.insert(`rect`,`:first-child`),s=n.positioned?n.width:i.width+n.padding,c=n.positioned?n.height:i.height+n.padding,l=n.positioned?-s/2:-i.width/2-a,u=n.positioned?-c/2:-i.height/2-a;if(o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c),n.props){let e=new Set(Object.keys(n.props));n.props.borders&&(Z(o,n.props.borders,s,c),e.delete(`borders`)),e.forEach(e=>{t.warn(`Unknown node property ${e}`)})}return J(n,o),n.intersect=function(e){return K.rect(n,e)},r},`composite`),It=e(async(e,n)=>{let{shapeSvg:r}=await q(e,n,`label`,!0);t.trace(`Classes = `,n.class);let i=r.insert(`rect`,`:first-child`);if(i.attr(`width`,0).attr(`height`,0),r.attr(`class`,`label edgeLabel`),n.props){let e=new Set(Object.keys(n.props));n.props.borders&&(Z(i,n.props.borders,0,0),e.delete(`borders`)),e.forEach(e=>{t.warn(`Unknown node property ${e}`)})}return J(n,i),n.intersect=function(e){return K.rect(n,e)},r},`labelRect`);function Z(n,r,i,a){let o=[],s=e(e=>{o.push(e,0)},`addBorder`),c=e(e=>{o.push(0,e)},`skipBorder`);r.includes(`t`)?(t.debug(`add top border`),s(i)):c(i),r.includes(`r`)?(t.debug(`add right border`),s(a)):c(a),r.includes(`b`)?(t.debug(`add bottom border`),s(i)):c(i),r.includes(`l`)?(t.debug(`add left border`),s(a)):c(a),n.attr(`stroke-dasharray`,o.join(` `))}e(Z,`applyNodePropertyBorders`);var Lt=e(async(e,r)=>{let a;a=r.classes?`node `+r.classes:`node default`;let o=e.insert(`g`).attr(`class`,a).attr(`id`,r.domId||r.id),s=o.insert(`rect`,`:first-child`),c=o.insert(`line`),l=o.insert(`g`).attr(`class`,`label`),d=r.labelText.flat?r.labelText.flat():r.labelText,f=``;f=typeof d==`object`?d[0]:d,t.info(`Label text abc79`,f,d,typeof d==`object`);let p=await U(l,f,r.labelStyle,!0,!0),m={width:0,height:0};if(i(u())){let e=p.children[0],t=n(p);m=e.getBoundingClientRect(),t.attr(`width`,m.width),t.attr(`height`,m.height)}t.info(`Text 2`,d);let h=d.slice(1,d.length),g=p.getBBox(),_=await U(l,h.join?h.join(`
`):h,r.labelStyle,!0,!0);if(i(u())){let e=_.children[0],t=n(_);m=e.getBoundingClientRect(),t.attr(`width`,m.width),t.attr(`height`,m.height)}let v=r.padding/2;return n(_).attr(`transform`,`translate( `+(m.width>g.width?0:(g.width-m.width)/2)+`, `+(g.height+v+5)+`)`),n(p).attr(`transform`,`translate( `+(m.width{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.height+t.padding,a=r.width+i/4+t.padding;return J(t,n.insert(`rect`,`:first-child`).attr(`style`,t.style).attr(`rx`,i/2).attr(`ry`,i/2).attr(`x`,-a/2).attr(`y`,-i/2).attr(`width`,a).attr(`height`,i)),t.intersect=function(e){return K.rect(t,e)},n},`stadium`),zt=e(async(e,n)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await q(e,n,X(n,void 0),!0),o=r.insert(`circle`,`:first-child`);return o.attr(`style`,n.style).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`r`,i.width/2+a).attr(`width`,i.width+n.padding).attr(`height`,i.height+n.padding),t.info(`Circle main`),J(n,o),n.intersect=function(e){return t.info(`Circle intersect`,n,i.width/2+a,e),K.circle(n,i.width/2+a,e)},r},`circle`),Bt=e(async(e,n)=>{let{shapeSvg:r,bbox:i,halfPadding:a}=await q(e,n,X(n,void 0),!0),o=r.insert(`g`,`:first-child`),s=o.insert(`circle`),c=o.insert(`circle`);return o.attr(`class`,n.class),s.attr(`style`,n.style).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`r`,i.width/2+a+5).attr(`width`,i.width+n.padding+10).attr(`height`,i.height+n.padding+10),c.attr(`style`,n.style).attr(`rx`,n.rx).attr(`ry`,n.ry).attr(`r`,i.width/2+a).attr(`width`,i.width+n.padding).attr(`height`,i.height+n.padding),t.info(`DoubleCircle main`),J(n,s),n.intersect=function(e){return t.info(`DoubleCircle intersect`,n,i.width/2+a+5,e),K.circle(n,i.width/2+a+5,e)},r},`doublecircle`),Vt=e(async(e,t)=>{let{shapeSvg:n,bbox:r}=await q(e,t,X(t,void 0),!0),i=r.width+t.padding,a=r.height+t.padding,o=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],s=Y(n,i,a,o);return s.attr(`style`,t.style),J(t,s),t.intersect=function(e){return K.polygon(t,o,e)},n},`subroutine`),Ht=e((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),r=n.insert(`circle`,`:first-child`);return r.attr(`class`,`state-start`).attr(`r`,7).attr(`width`,14).attr(`height`,14),J(t,r),t.intersect=function(e){return K.circle(t,7,e)},n},`start`),Ut=e((e,t,n)=>{let r=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),i=70,a=10;return n===`LR`&&(i=10,a=70),J(t,r.append(`rect`).attr(`x`,-1*i/2).attr(`y`,-1*a/2).attr(`width`,i).attr(`height`,a).attr(`class`,`fork-join`)),t.height+=t.padding/2,t.width+=t.padding/2,t.intersect=function(e){return K.rect(t,e)},r},`forkJoin`),Wt={rhombus:Ct,composite:Ft,question:Ct,rect:Pt,labelRect:It,rectWithTitle:Lt,choice:wt,circle:zt,doublecircle:Bt,stadium:Rt,hexagon:Tt,block_arrow:Et,rect_left_inv_arrow:Dt,lean_right:Ot,lean_left:kt,trapezoid:At,inv_trapezoid:jt,rect_right_inv_arrow:Mt,cylinder:Nt,start:Ht,end:e((e,t)=>{let n=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),r=n.insert(`circle`,`:first-child`),i=n.insert(`circle`,`:first-child`);return i.attr(`class`,`state-start`).attr(`r`,7).attr(`width`,14).attr(`height`,14),r.attr(`class`,`state-end`).attr(`r`,5).attr(`width`,10).attr(`height`,10),J(t,i),t.intersect=function(e){return K.circle(t,7,e)},n},`end`),note:xt,subroutine:Vt,fork:Ut,join:Ut,class_box:e(async(e,t)=>{let r=t.padding/2,a;a=t.classes?`node `+t.classes:`node default`;let o=e.insert(`g`).attr(`class`,a).attr(`id`,t.domId||t.id),s=o.insert(`rect`,`:first-child`),c=o.insert(`line`),l=o.insert(`line`),d=0,f=4,p=o.insert(`g`).attr(`class`,`label`),m=0,h=t.classData.annotations?.[0],g=await U(p,t.classData.annotations[0]?`«`+t.classData.annotations[0]+`»`:``,t.labelStyle,!0,!0),_=g.getBBox();if(i(u())){let e=g.children[0],t=n(g);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}t.classData.annotations[0]&&(f+=_.height+4,d+=_.width);let v=t.classData.label;t.classData.type!==void 0&&t.classData.type!==``&&(i(u())?v+=`<`+t.classData.type+`>`:v+=`<`+t.classData.type+`>`);let y=await U(p,v,t.labelStyle,!0,!0);n(y).attr(`class`,`classTitle`);let b=y.getBBox();if(i(u())){let e=y.children[0],t=n(y);b=e.getBoundingClientRect(),t.attr(`width`,b.width),t.attr(`height`,b.height)}f+=b.height+4,b.width>d&&(d=b.width);let x=[];t.classData.members.forEach(async e=>{let r=e.getDisplayDetails(),a=r.displayText;i(u())&&(a=a.replace(//g,`>`));let o=await U(p,a,r.cssStyle?r.cssStyle:t.labelStyle,!0,!0),s=o.getBBox();if(i(u())){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}s.width>d&&(d=s.width),f+=s.height+4,x.push(o)}),f+=8;let S=[];if(t.classData.methods.forEach(async e=>{let r=e.getDisplayDetails(),a=r.displayText;i(u())&&(a=a.replace(//g,`>`));let o=await U(p,a,r.cssStyle?r.cssStyle:t.labelStyle,!0,!0),s=o.getBBox();if(i(u())){let e=o.children[0],t=n(o);s=e.getBoundingClientRect(),t.attr(`width`,s.width),t.attr(`height`,s.height)}s.width>d&&(d=s.width),f+=s.height+4,S.push(o)}),f+=8,h){let e=(d-_.width)/2;n(g).attr(`transform`,`translate( `+(-1*d/2+e)+`, `+-1*f/2+`)`),m=_.height+4}let C=(d-b.width)/2;return n(y).attr(`transform`,`translate( `+(-1*d/2+C)+`, `+(-1*f/2+m)+`)`),m+=b.height+4,c.attr(`class`,`divider`).attr(`x1`,-d/2-r).attr(`x2`,d/2+r).attr(`y1`,-f/2-r+8+m).attr(`y2`,-f/2-r+8+m),m+=8,x.forEach(e=>{n(e).attr(`transform`,`translate( `+-d/2+`, `+(-1*f/2+m+8/2)+`)`);let t=e?.getBBox();m+=(t?.height??0)+4}),m+=8,l.attr(`class`,`divider`).attr(`x1`,-d/2-r).attr(`x2`,d/2+r).attr(`y1`,-f/2-r+8+m).attr(`y2`,-f/2-r+8+m),m+=8,S.forEach(e=>{n(e).attr(`transform`,`translate( `+-d/2+`, `+(-1*f/2+m)+`)`);let t=e?.getBBox();m+=(t?.height??0)+4}),s.attr(`style`,t.style).attr(`class`,`outer title-state`).attr(`x`,-d/2-r).attr(`y`,-(f/2)-r).attr(`width`,d+t.padding).attr(`height`,f+t.padding),J(t,s),t.intersect=function(e){return K.rect(t,e)},o},`class_box`)},Q={},Gt=e(async(e,t,n)=>{let r,i;if(t.link){let a;u().securityLevel===`sandbox`?a=`_top`:t.linkTarget&&(a=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,a),i=await Wt[t.shape](r,t,n)}else i=await Wt[t.shape](e,t,n),r=i;return t.tooltip&&i.attr(`title`,t.tooltip),t.class&&i.attr(`class`,`node default `+t.class),Q[t.id]=r,t.haveCallback&&Q[t.id].attr(`class`,Q[t.id].attr(`class`)+` clickable`),r},`insertNode`),Kt=e(e=>{let n=Q[e.id];t.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let r=e.diff||0;return e.clusterNode?n.attr(`transform`,`translate(`+(e.x+r-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):n.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),r},`positionNode`);function qt(e,t,n=!1){let r=e,i=`default`;(r?.classes?.length||0)>0&&(i=(r?.classes??[]).join(` `)),i+=` flowchart-label`;let a=0,s=``,c;switch(r.type){case`round`:a=5,s=`rect`;break;case`composite`:a=0,s=`composite`,c=0;break;case`square`:s=`rect`;break;case`diamond`:s=`question`;break;case`hexagon`:s=`hexagon`;break;case`block_arrow`:s=`block_arrow`;break;case`odd`:s=`rect_left_inv_arrow`;break;case`lean_right`:s=`lean_right`;break;case`lean_left`:s=`lean_left`;break;case`trapezoid`:s=`trapezoid`;break;case`inv_trapezoid`:s=`inv_trapezoid`;break;case`rect_left_inv_arrow`:s=`rect_left_inv_arrow`;break;case`circle`:s=`circle`;break;case`ellipse`:s=`ellipse`;break;case`stadium`:s=`stadium`;break;case`subroutine`:s=`subroutine`;break;case`cylinder`:s=`cylinder`;break;case`group`:s=`rect`;break;case`doublecircle`:s=`doublecircle`;break;default:s=`rect`}let l=ie(r?.styles??[]),u=r.label,d=r.size??{width:0,height:0,x:0,y:0},f=t.getDiagramId();return{labelStyle:l.labelStyle,shape:s,labelText:u,rx:a,ry:a,class:i,style:l.style,id:r.id,domId:f?`${f}-${r.id}`:r.id,directions:r.directions,width:d.width,height:d.height,x:d.x,y:d.y,positioned:n,intersect:void 0,type:r.type,padding:c??o()?.block?.padding??0,widthInColumns:r.widthInColumns??1}}e(qt,`getNodeFromBlock`);async function Jt(e,t,n){let r=qt(t,n,!1);if(r.type===`group`)return;let i=await Gt(e,r,{config:o()}),a=i.node().getBBox(),s=n.getBlock(r.id);s.size={width:a.width,height:a.height,x:0,y:0,node:i},n.setBlock(s),i.remove()}e(Jt,`calculateBlockSize`);async function Yt(e,t,n){let r=qt(t,n,!0);n.getBlock(r.id).type!==`space`&&(await Gt(e,r,{config:o()}),t.intersect=r?.intersect,Kt(r))}e(Yt,`insertBlockPositioned`);async function $(e,t,n,r){for(let i of t)await r(e,i,n),i.children&&await $(e,i.children,n,r)}e($,`performOperations`);async function Xt(e,t,n){await $(e,t,n,Jt)}e(Xt,`calculateBlockSizes`);async function Zt(e,t,n){await $(e,t,n,Yt)}e(Zt,`insertBlocks`);async function Qt(e,t,n,r,i){let a=new pe({multigraph:!0,compound:!0});a.setGraph({rankdir:`TB`,nodesep:10,ranksep:10,marginx:8,marginy:8});for(let e of n)e.size&&a.setNode(e.id,{width:e.size.width,height:e.size.height,intersect:e.intersect});for(let n of t)if(n.start&&n.end){let t=r.getBlock(n.start),o=r.getBlock(n.end);if(t?.size&&o?.size){let r=t.size,s=o.size,c=[{x:r.x,y:r.y},{x:r.x+(s.x-r.x)/2,y:r.y+(s.y-r.y)/2},{x:s.x,y:s.y}],l=i?`${i}-${n.id}`:n.id,u=`${n.thickness===`thick`?`edge-thickness-thick`:`edge-thickness-normal`} ${n.pattern===`dotted`?`edge-pattern-dotted`:`edge-pattern-solid`} flowchart-link LS-a1 LE-b1`;st(e,{v:n.start,w:n.end,name:l},{...n,id:l,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:u},void 0,`block`,a,i),n.label&&(await nt(e,{...n,label:n.label,labelStyle:`stroke: #333; stroke-width: 1.5px;fill:none;`,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:c,classes:u}),rt({...n,x:c[1].x,y:c[1].y},{originalPath:c}))}}}e(Qt,`insertEdges`);var $t={parser:Se,db:We,renderer:{draw:e(async function(e,r,i,a){let{securityLevel:c,block:l}=o(),u=a.db;u.setDiagramId(r);let d;c===`sandbox`&&(d=n(`#i`+r));let f=n(c===`sandbox`?d.nodes()[0].contentDocument.body:`body`),p=c===`sandbox`?f.select(`[id="${r}"]`):n(`[id="${r}"]`);Je(p,[`point`,`circle`,`cross`],a.type,r);let m=u.getBlocks(),h=u.getBlocksFlat(),g=u.getEdges(),_=p.insert(`g`).attr(`class`,`block`);await Xt(_,m,u);let v=Ze(u);if(await Zt(_,m,u),await Qt(_,g,h,u,r),v){let e=v,n=Math.max(1,Math.round(.125*(e.width/e.height))),r=e.height+n+10,i=e.width+10,{useMaxWidth:a}=l;s(p,r,i,!!a),t.debug(`Here Bounds`,v,e),p.attr(`viewBox`,`${e.x-5} ${e.y-5} ${e.width+10} ${e.height+10}`)}},`draw`),getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`)},styles:Ge};export{$t as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/c4Diagram-LMCZKHZV-B2PQ0JjZ.js b/dist-desktop/assets/c4Diagram-LMCZKHZV-B2PQ0JjZ.js deleted file mode 100644 index 9beb0a0..0000000 --- a/dist-desktop/assets/c4Diagram-LMCZKHZV-B2PQ0JjZ.js +++ /dev/null @@ -1,10 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-UMNXGZaF.js";import{H as r,U as i,c as a,r as o,s,v as l,x as u,y as d,z as f}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as p}from"./dist-qx0Iv9vM.js";import{_ as m,n as h,r as g}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{a as _,s as v}from"./chunk-32BRIVSS-DWU3ezKg.js";var y=p(),b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,24],r=[1,25],i=[1,26],a=[1,27],o=[1,28],s=[1,63],l=[1,64],u=[1,65],d=[1,66],f=[1,67],p=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],z=[1,54],B=[1,55],V=[1,56],H=[1,57],ee=[1,58],te=[1,59],ne=[1,60],re=[14,42],ie=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ae=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],U=[1,82],W=[1,83],G=[1,84],K=[1,85],q=[12,14,42],oe=[12,14,33,42],se=[12,14,33,42,76,77,79,80],ce=[12,33],le=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],J={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:`error`,6:`direction_tb`,7:`direction_bt`,8:`direction_rl`,9:`direction_lr`,11:`C4_CONTEXT`,12:`NEWLINE`,14:`EOF`,15:`C4_CONTAINER`,16:`C4_COMPONENT`,17:`C4_DYNAMIC`,18:`C4_DEPLOYMENT`,22:`title`,23:`accDescription`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`LBRACE`,34:`ENTERPRISE_BOUNDARY`,36:`SYSTEM_BOUNDARY`,37:`BOUNDARY`,38:`CONTAINER_BOUNDARY`,39:`NODE`,40:`NODE_L`,41:`NODE_R`,42:`RBRACE`,44:`PERSON`,45:`PERSON_EXT`,46:`SYSTEM`,47:`SYSTEM_DB`,48:`SYSTEM_QUEUE`,49:`SYSTEM_EXT`,50:`SYSTEM_EXT_DB`,51:`SYSTEM_EXT_QUEUE`,52:`CONTAINER`,53:`CONTAINER_DB`,54:`CONTAINER_QUEUE`,55:`CONTAINER_EXT`,56:`CONTAINER_EXT_DB`,57:`CONTAINER_EXT_QUEUE`,58:`COMPONENT`,59:`COMPONENT_DB`,60:`COMPONENT_QUEUE`,61:`COMPONENT_EXT`,62:`COMPONENT_EXT_DB`,63:`COMPONENT_EXT_QUEUE`,64:`REL`,65:`BIREL`,66:`REL_U`,67:`REL_D`,68:`REL_L`,69:`REL_R`,70:`REL_B`,71:`REL_INDEX`,72:`UPDATE_EL_STYLE`,73:`UPDATE_REL_STYLE`,74:`UPDATE_LAYOUT_CONFIG`,76:`STR`,77:`STR_KEY`,78:`STR_VALUE`,79:`ATTRIBUTE`,80:`ATTRIBUTE_EMPTY`},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``;break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{13:70,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{13:71,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{13:72,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{13:73,19:20,20:21,21:22,22:n,23:r,24:i,26:a,28:o,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{14:[1,74]},t(re,[2,13],{43:23,29:49,30:61,32:62,20:75,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne}),t(re,[2,14]),t(ie,[2,16],{12:[1,76]}),t(re,[2,36],{12:[1,77]}),t(ae,[2,19]),t(ae,[2,20]),{25:[1,78]},{27:[1,79]},t(ae,[2,23]),{35:80,75:81,76:U,77:W,79:G,80:K},{35:86,75:81,76:U,77:W,79:G,80:K},{35:87,75:81,76:U,77:W,79:G,80:K},{35:88,75:81,76:U,77:W,79:G,80:K},{35:89,75:81,76:U,77:W,79:G,80:K},{35:90,75:81,76:U,77:W,79:G,80:K},{35:91,75:81,76:U,77:W,79:G,80:K},{35:92,75:81,76:U,77:W,79:G,80:K},{35:93,75:81,76:U,77:W,79:G,80:K},{35:94,75:81,76:U,77:W,79:G,80:K},{35:95,75:81,76:U,77:W,79:G,80:K},{35:96,75:81,76:U,77:W,79:G,80:K},{35:97,75:81,76:U,77:W,79:G,80:K},{35:98,75:81,76:U,77:W,79:G,80:K},{35:99,75:81,76:U,77:W,79:G,80:K},{35:100,75:81,76:U,77:W,79:G,80:K},{35:101,75:81,76:U,77:W,79:G,80:K},{35:102,75:81,76:U,77:W,79:G,80:K},{35:103,75:81,76:U,77:W,79:G,80:K},{35:104,75:81,76:U,77:W,79:G,80:K},t(q,[2,59]),{35:105,75:81,76:U,77:W,79:G,80:K},{35:106,75:81,76:U,77:W,79:G,80:K},{35:107,75:81,76:U,77:W,79:G,80:K},{35:108,75:81,76:U,77:W,79:G,80:K},{35:109,75:81,76:U,77:W,79:G,80:K},{35:110,75:81,76:U,77:W,79:G,80:K},{35:111,75:81,76:U,77:W,79:G,80:K},{35:112,75:81,76:U,77:W,79:G,80:K},{35:113,75:81,76:U,77:W,79:G,80:K},{35:114,75:81,76:U,77:W,79:G,80:K},{35:115,75:81,76:U,77:W,79:G,80:K},{20:116,29:49,30:61,32:62,34:s,36:l,37:u,38:d,39:f,40:p,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne},{12:[1,118],33:[1,117]},{35:119,75:81,76:U,77:W,79:G,80:K},{35:120,75:81,76:U,77:W,79:G,80:K},{35:121,75:81,76:U,77:W,79:G,80:K},{35:122,75:81,76:U,77:W,79:G,80:K},{35:123,75:81,76:U,77:W,79:G,80:K},{35:124,75:81,76:U,77:W,79:G,80:K},{35:125,75:81,76:U,77:W,79:G,80:K},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(re,[2,15]),t(ie,[2,17],{21:22,19:130,22:n,23:r,24:i,26:a,28:o}),t(re,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:n,23:r,24:i,26:a,28:o,34:s,36:l,37:u,38:d,39:f,40:p,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:z,69:B,70:V,71:H,72:ee,73:te,74:ne}),t(ae,[2,21]),t(ae,[2,22]),t(q,[2,39]),t(oe,[2,71],{75:81,35:132,76:U,77:W,79:G,80:K}),t(se,[2,73]),{78:[1,133]},t(se,[2,75]),t(se,[2,76]),t(q,[2,40]),t(q,[2,41]),t(q,[2,42]),t(q,[2,43]),t(q,[2,44]),t(q,[2,45]),t(q,[2,46]),t(q,[2,47]),t(q,[2,48]),t(q,[2,49]),t(q,[2,50]),t(q,[2,51]),t(q,[2,52]),t(q,[2,53]),t(q,[2,54]),t(q,[2,55]),t(q,[2,56]),t(q,[2,57]),t(q,[2,58]),t(q,[2,60]),t(q,[2,61]),t(q,[2,62]),t(q,[2,63]),t(q,[2,64]),t(q,[2,65]),t(q,[2,66]),t(q,[2,67]),t(q,[2,68]),t(q,[2,69]),t(q,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(ce,[2,28]),t(ce,[2,29]),t(ce,[2,30]),t(ce,[2,31]),t(ce,[2,32]),t(ce,[2,33]),t(ce,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(ie,[2,18]),t(re,[2,38]),t(oe,[2,72]),t(se,[2,74]),t(q,[2,24]),t(q,[2,35]),t(le,[2,25]),t(le,[2,26],{12:[1,138]}),t(le,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,l=``,u=0,d=0,f=0,p=2,m=1,h=o.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(t,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;o.push(y);var b=g.options&&g.options.ranges;typeof _.yy.parseError==`function`?this.parseError=_.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function x(e){r.length-=2*e,a.length-=e,o.length-=e}e(x,`popStack`);function S(){var e=i.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=r[r.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=s[T]&&s[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],s[T])this.terminals_[k]&&k>p&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(u+1)+`: -`+g.showPosition()+` -Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(u+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:r.push(C),a.push(g.yytext),o.push(g.yylloc),r.push(E[1]),C=null,w?(C=w,w=null):(d=g.yyleng,l=g.yytext,u=g.yylineno,y=g.yylloc,f>0&&f--);break;case 2:if(A=this.productions_[E[1]][1],O.$=a[a.length-A],O._$={first_line:o[o.length-(A||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(A||1)].first_column,last_column:o[o.length-1].last_column},b&&(O._$.range=[o[o.length-(A||1)].range[0],o[o.length-1].range[1]]),D=this.performAction.apply(O,[l,d,u,_.yy,E[1],a,o].concat(h)),D!==void 0)return D;A&&(r=r.slice(0,-1*A*2),a=a.slice(0,-1*A),o=o.slice(0,-1*A)),r.push(this.productions_[E[1]][0]),a.push(O.$),o.push(O._$),j=s[r[r.length-2]][r[r.length-1]],r.push(j);break;case 3:return!0}}return!0},`parse`)};J.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:e(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin(`acc_title`),24;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),26;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin(`person_ext`),45;case 23:return this.begin(`person`),44;case 24:return this.begin(`system_ext_queue`),51;case 25:return this.begin(`system_ext_db`),50;case 26:return this.begin(`system_ext`),49;case 27:return this.begin(`system_queue`),48;case 28:return this.begin(`system_db`),47;case 29:return this.begin(`system`),46;case 30:return this.begin(`boundary`),37;case 31:return this.begin(`enterprise_boundary`),34;case 32:return this.begin(`system_boundary`),36;case 33:return this.begin(`container_ext_queue`),57;case 34:return this.begin(`container_ext_db`),56;case 35:return this.begin(`container_ext`),55;case 36:return this.begin(`container_queue`),54;case 37:return this.begin(`container_db`),53;case 38:return this.begin(`container`),52;case 39:return this.begin(`container_boundary`),38;case 40:return this.begin(`component_ext_queue`),63;case 41:return this.begin(`component_ext_db`),62;case 42:return this.begin(`component_ext`),61;case 43:return this.begin(`component_queue`),60;case 44:return this.begin(`component_db`),59;case 45:return this.begin(`component`),58;case 46:return this.begin(`node`),39;case 47:return this.begin(`node`),39;case 48:return this.begin(`node_l`),40;case 49:return this.begin(`node_r`),41;case 50:return this.begin(`rel`),64;case 51:return this.begin(`birel`),65;case 52:return this.begin(`rel_u`),66;case 53:return this.begin(`rel_u`),66;case 54:return this.begin(`rel_d`),67;case 55:return this.begin(`rel_d`),67;case 56:return this.begin(`rel_l`),68;case 57:return this.begin(`rel_l`),68;case 58:return this.begin(`rel_r`),69;case 59:return this.begin(`rel_r`),69;case 60:return this.begin(`rel_b`),70;case 61:return this.begin(`rel_index`),71;case 62:return this.begin(`update_el_style`),72;case 63:return this.begin(`update_rel_style`),73;case 64:return this.begin(`update_layout_config`),74;case 65:return`EOF_IN_STRUCT`;case 66:return this.begin(`attribute`),`ATTRIBUTE_EMPTY`;case 67:this.begin(`attribute`);break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin(`string`);break;case 73:this.popState();break;case 74:return`STR`;case 75:this.begin(`string_kv`);break;case 76:return this.begin(`string_kv_key`),`STR_KEY`;case 77:this.popState(),this.begin(`string_kv_value`);break;case 78:return`STR_VALUE`;case 79:this.popState(),this.popState();break;case 80:return`STR`;case 81:return`LBRACE`;case 82:return`RBRACE`;case 83:return`SPACE`;case 84:return`EOL`;case 85:return 14}},`anonymous`),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}}})();function ue(){this.yy={}}return e(ue,`Parser`),ue.prototype=J,J.Parser=ue,new ue})();b.parser=b;var x=b,S=[],C=[``],w=`global`,T=``,E=[{alias:`global`,label:{text:`global`},type:{text:`global`},tags:null,link:null,parentBoundary:``}],D=[],O=``,k=!1,A=4,j=2,M,N=e(function(){return M},`getC4Type`),P=e(function(e){M=f(e,u())},`setC4Type`),F=e(function(e,t,n,r,i,a,o,s,l){if(e==null||t==null||n==null||r==null)return;let u={},d=D.find(e=>e.from===t&&e.to===n);if(d?u=d:D.push(u),u.type=e,u.from=t,u.to=n,u.label={text:r},i==null)u.techn={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];u[e]={text:t}}else u.techn={text:i};if(a==null)u.descr={text:``};else if(typeof a==`object`){let[e,t]=Object.entries(a)[0];u[e]={text:t}}else u.descr={text:a};if(typeof o==`object`){let[e,t]=Object.entries(o)[0];u[e]=t}else u.sprite=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];u[e]=t}else u.tags=s;if(typeof l==`object`){let[e,t]=Object.entries(l)[0];u[e]=t}else u.link=l;u.wrap=J()},`addRel`),I=e(function(e,t,n,r,i,a,o){if(t===null||n===null)return;let s={},l=S.find(e=>e.alias===t);if(l&&t===l.alias?s=l:(s.alias=t,S.push(s)),n==null?s.label={text:``}:s.label={text:n},r==null)s.descr={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];s[e]={text:t}}else s.descr={text:r};if(typeof i==`object`){let[e,t]=Object.entries(i)[0];s[e]=t}else s.sprite=i;if(typeof a==`object`){let[e,t]=Object.entries(a)[0];s[e]=t}else s.tags=a;if(typeof o==`object`){let[e,t]=Object.entries(o)[0];s[e]=t}else s.link=o;s.typeC4Shape={text:e},s.parentBoundary=w,s.wrap=J()},`addPersonOrSystem`),L=e(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=S.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,S.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.techn={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.techn={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};if(typeof a==`object`){let[e,t]=Object.entries(a)[0];l[e]=t}else l.sprite=a;if(typeof o==`object`){let[e,t]=Object.entries(o)[0];l[e]=t}else l.tags=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];l[e]=t}else l.link=s;l.wrap=J(),l.typeC4Shape={text:e},l.parentBoundary=w},`addContainer`),R=e(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=S.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,S.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.techn={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.techn={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};if(typeof a==`object`){let[e,t]=Object.entries(a)[0];l[e]=t}else l.sprite=a;if(typeof o==`object`){let[e,t]=Object.entries(o)[0];l[e]=t}else l.tags=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];l[e]=t}else l.link=s;l.wrap=J(),l.typeC4Shape={text:e},l.parentBoundary=w},`addComponent`),z=e(function(e,t,n,r,i){if(e===null||t===null)return;let a={},o=E.find(t=>t.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,E.push(a)),t==null?a.label={text:``}:a.label={text:t},n==null)a.type={text:`system`};else if(typeof n==`object`){let[e,t]=Object.entries(n)[0];a[e]={text:t}}else a.type={text:n};if(typeof r==`object`){let[e,t]=Object.entries(r)[0];a[e]=t}else a.tags=r;if(typeof i==`object`){let[e,t]=Object.entries(i)[0];a[e]=t}else a.link=i;a.parentBoundary=w,a.wrap=J(),T=w,w=e,C.push(T)},`addPersonOrSystemBoundary`),B=e(function(e,t,n,r,i){if(e===null||t===null)return;let a={},o=E.find(t=>t.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,E.push(a)),t==null?a.label={text:``}:a.label={text:t},n==null)a.type={text:`container`};else if(typeof n==`object`){let[e,t]=Object.entries(n)[0];a[e]={text:t}}else a.type={text:n};if(typeof r==`object`){let[e,t]=Object.entries(r)[0];a[e]=t}else a.tags=r;if(typeof i==`object`){let[e,t]=Object.entries(i)[0];a[e]=t}else a.link=i;a.parentBoundary=w,a.wrap=J(),T=w,w=e,C.push(T)},`addContainerBoundary`),V=e(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=E.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,E.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.type={text:`node`};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.type={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};if(typeof o==`object`){let[e,t]=Object.entries(o)[0];l[e]=t}else l.tags=o;if(typeof s==`object`){let[e,t]=Object.entries(s)[0];l[e]=t}else l.link=s;l.nodeType=e,l.parentBoundary=w,l.wrap=J(),T=w,w=t,C.push(T)},`addDeploymentNode`),H=e(function(){w=T,C.pop(),T=C.pop(),C.push(T)},`popBoundaryParseStack`),ee=e(function(e,t,n,r,i,a,o,s,l,u,d){let f=S.find(e=>e.alias===t);if(!(f===void 0&&(f=E.find(e=>e.alias===t),f===void 0))){if(n!=null)if(typeof n==`object`){let[e,t]=Object.entries(n)[0];f[e]=t}else f.bgColor=n;if(r!=null)if(typeof r==`object`){let[e,t]=Object.entries(r)[0];f[e]=t}else f.fontColor=r;if(i!=null)if(typeof i==`object`){let[e,t]=Object.entries(i)[0];f[e]=t}else f.borderColor=i;if(a!=null)if(typeof a==`object`){let[e,t]=Object.entries(a)[0];f[e]=t}else f.shadowing=a;if(o!=null)if(typeof o==`object`){let[e,t]=Object.entries(o)[0];f[e]=t}else f.shape=o;if(s!=null)if(typeof s==`object`){let[e,t]=Object.entries(s)[0];f[e]=t}else f.sprite=s;if(l!=null)if(typeof l==`object`){let[e,t]=Object.entries(l)[0];f[e]=t}else f.techn=l;if(u!=null)if(typeof u==`object`){let[e,t]=Object.entries(u)[0];f[e]=t}else f.legendText=u;if(d!=null)if(typeof d==`object`){let[e,t]=Object.entries(d)[0];f[e]=t}else f.legendSprite=d}},`updateElStyle`),te=e(function(e,t,n,r,i,a,o){let s=D.find(e=>e.from===t&&e.to===n);if(s!==void 0){if(r!=null)if(typeof r==`object`){let[e,t]=Object.entries(r)[0];s[e]=t}else s.textColor=r;if(i!=null)if(typeof i==`object`){let[e,t]=Object.entries(i)[0];s[e]=t}else s.lineColor=i;if(a!=null)if(typeof a==`object`){let[e,t]=Object.entries(a)[0];s[e]=parseInt(t)}else s.offsetX=parseInt(a);if(o!=null)if(typeof o==`object`){let[e,t]=Object.entries(o)[0];s[e]=parseInt(t)}else s.offsetY=parseInt(o)}},`updateRelStyle`),ne=e(function(e,t,n){let r=A,i=j;if(typeof t==`object`){let e=Object.values(t)[0];r=parseInt(e)}else r=parseInt(t);if(typeof n==`object`){let e=Object.values(n)[0];i=parseInt(e)}else i=parseInt(n);r>=1&&(A=r),i>=1&&(j=i)},`updateLayoutConfig`),re=e(function(){return A},`getC4ShapeInRow`),ie=e(function(){return j},`getC4BoundaryInRow`),ae=e(function(){return w},`getCurrentBoundaryParse`),U=e(function(){return T},`getParentBoundaryParse`),W=e(function(e){return e==null?S:S.filter(t=>t.parentBoundary===e)},`getC4ShapeArray`),G=e(function(e){return S.find(t=>t.alias===e)},`getC4Shape`),K=e(function(e){return Object.keys(W(e))},`getC4ShapeKeys`),q=e(function(e){return e==null?E:E.filter(t=>t.parentBoundary===e)},`getBoundaries`),oe=q,se=e(function(){return D},`getRels`),ce=e(function(){return O},`getTitle`),le=e(function(e){k=e},`setWrap`),J=e(function(){return k},`autoWrap`),ue={addPersonOrSystem:I,addPersonOrSystemBoundary:z,addContainer:L,addContainerBoundary:B,addComponent:R,addDeploymentNode:V,popBoundaryParseStack:H,addRel:F,updateElStyle:ee,updateRelStyle:te,updateLayoutConfig:ne,autoWrap:J,setWrap:le,getC4ShapeArray:W,getC4Shape:G,getC4ShapeKeys:K,getBoundaries:q,getBoundarys:oe,getCurrentBoundaryParse:ae,getParentBoundaryParse:U,getRels:se,getTitle:ce,getC4Type:N,getC4ShapeInRow:re,getC4BoundaryInRow:ie,setAccTitle:i,getAccTitle:d,getAccDescription:l,setAccDescription:r,getConfig:e(()=>u().c4,`getConfig`),clear:e(function(){S=[],E=[{alias:`global`,label:{text:`global`},type:{text:`global`},tags:null,link:null,parentBoundary:``}],T=``,w=`global`,C=[``],D=[],C=[``],O=``,k=!1,A=4,j=2},`clear`),LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:e(function(e){O=f(e,u())},`setTitle`),setC4Type:P},de=e(function(e,t){return _(e,t)},`drawRect`),fe=e(function(e,t,n,r,i,a){let o=e.append(`image`);o.attr(`width`,t),o.attr(`height`,n),o.attr(`x`,r),o.attr(`y`,i);let s=a.startsWith(`data:image/png;base64`)?a:(0,y.sanitizeUrl)(a);o.attr(`xlink:href`,s)},`drawImage`),pe=e((e,t,n,r)=>{let i=e.append(`g`),a=0;for(let e of t){let t=e.textColor?e.textColor:`#444444`,o=e.lineColor?e.lineColor:`#444444`,s=e.offsetX?parseInt(e.offsetX):0,l=e.offsetY?parseInt(e.offsetY):0;if(a===0){let t=i.append(`line`);t.attr(`x1`,e.startPoint.x),t.attr(`y1`,e.startPoint.y),t.attr(`x2`,e.endPoint.x),t.attr(`y2`,e.endPoint.y),t.attr(`stroke-width`,`1`),t.attr(`stroke`,o),t.style(`fill`,`none`),e.type!==`rel_b`&&t.attr(`marker-end`,`url(#`+r+`-arrowhead)`),(e.type===`birel`||e.type===`rel_b`)&&t.attr(`marker-start`,`url(#`+r+`-arrowend)`),a=-1}else{let t=i.append(`path`);t.attr(`fill`,`none`).attr(`stroke-width`,`1`).attr(`stroke`,o).attr(`d`,`Mstartx,starty Qcontrolx,controly stopx,stopy `.replaceAll(`startx`,e.startPoint.x).replaceAll(`starty`,e.startPoint.y).replaceAll(`controlx`,e.startPoint.x+(e.endPoint.x-e.startPoint.x)/2-(e.endPoint.x-e.startPoint.x)/4).replaceAll(`controly`,e.startPoint.y+(e.endPoint.y-e.startPoint.y)/2).replaceAll(`stopx`,e.endPoint.x).replaceAll(`stopy`,e.endPoint.y)),e.type!==`rel_b`&&t.attr(`marker-end`,`url(#`+r+`-arrowhead)`),(e.type===`birel`||e.type===`rel_b`)&&t.attr(`marker-start`,`url(#`+r+`-arrowend)`)}let u=n.messageFont();Y(n)(e.label.text,i,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+s,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+l,e.label.width,e.label.height,{fill:t},u),e.techn&&e.techn.text!==``&&(u=n.messageFont(),Y(n)(`[`+e.techn.text+`]`,i,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+s,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+n.messageFontSize+5+l,Math.max(e.label.width,e.techn.width),e.techn.height,{fill:t,"font-style":`italic`},u))}},`drawRels`),me=e(function(e,t,n){let r=e.append(`g`),i=t.bgColor?t.bgColor:`none`,a=t.borderColor?t.borderColor:`#444444`,o=t.fontColor?t.fontColor:`black`,s={"stroke-width":1,"stroke-dasharray":`7.0,7.0`};t.nodeType&&(s={"stroke-width":1}),de(r,{x:t.x,y:t.y,fill:i,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:s});let l=n.boundaryFont();l.fontWeight=`bold`,l.fontSize+=2,l.fontColor=o,Y(n)(t.label.text,r,t.x,t.y+t.label.Y,t.width,t.height,{fill:`#444444`},l),t.type&&t.type.text!==``&&(l=n.boundaryFont(),l.fontColor=o,Y(n)(t.type.text,r,t.x,t.y+t.type.Y,t.width,t.height,{fill:`#444444`},l)),t.descr&&t.descr.text!==``&&(l=n.boundaryFont(),l.fontSize-=2,l.fontColor=o,Y(n)(t.descr.text,r,t.x,t.y+t.descr.Y,t.width,t.height,{fill:`#444444`},l))},`drawBoundary`),he=e(function(e,t,n){let r=t.bgColor?t.bgColor:n[t.typeC4Shape.text+`_bg_color`],i=t.borderColor?t.borderColor:n[t.typeC4Shape.text+`_border_color`],a=t.fontColor?t.fontColor:`#FFFFFF`,o=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=`;switch(t.typeC4Shape.text){case`person`:o=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=`;break;case`external_person`:o=`data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=`;break}let s=e.append(`g`);s.attr(`class`,`person-man`);let l=v();switch(t.typeC4Shape.text){case`person`:case`external_person`:case`system`:case`external_system`:case`container`:case`external_container`:case`component`:case`external_component`:l.x=t.x,l.y=t.y,l.fill=r,l.width=t.width,l.height=t.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},de(s,l);break;case`system_db`:case`external_system_db`:case`container_db`:case`external_container_db`:case`component_db`:case`external_component_db`:s.append(`path`).attr(`fill`,r).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height`.replaceAll(`startx`,t.x).replaceAll(`starty`,t.y).replaceAll(`half`,t.width/2).replaceAll(`height`,t.height)),s.append(`path`).attr(`fill`,`none`).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10`.replaceAll(`startx`,t.x).replaceAll(`starty`,t.y).replaceAll(`half`,t.width/2));break;case`system_queue`:case`external_system_queue`:case`container_queue`:case`external_container_queue`:case`component_queue`:case`external_component_queue`:s.append(`path`).attr(`fill`,r).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half`.replaceAll(`startx`,t.x).replaceAll(`starty`,t.y).replaceAll(`width`,t.width).replaceAll(`half`,t.height/2)),s.append(`path`).attr(`fill`,`none`).attr(`stroke-width`,`0.5`).attr(`stroke`,i).attr(`d`,`Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half`.replaceAll(`startx`,t.x+t.width).replaceAll(`starty`,t.y).replaceAll(`half`,t.height/2));break}let u=Ce(n,t.typeC4Shape.text);switch(s.append(`text`).attr(`fill`,a).attr(`font-family`,u.fontFamily).attr(`font-size`,u.fontSize-2).attr(`font-style`,`italic`).attr(`lengthAdjust`,`spacing`).attr(`textLength`,t.typeC4Shape.width).attr(`x`,t.x+t.width/2-t.typeC4Shape.width/2).attr(`y`,t.y+t.typeC4Shape.Y).text(`<<`+t.typeC4Shape.text+`>>`),t.typeC4Shape.text){case`person`:case`external_person`:fe(s,48,48,t.x+t.width/2-24,t.y+t.image.Y,o);break}let d=n[t.typeC4Shape.text+`Font`]();return d.fontWeight=`bold`,d.fontSize+=2,d.fontColor=a,Y(n)(t.label.text,s,t.x,t.y+t.label.Y,t.width,t.height,{fill:a},d),d=n[t.typeC4Shape.text+`Font`](),d.fontColor=a,t.techn&&t.techn?.text!==``?Y(n)(t.techn.text,s,t.x,t.y+t.techn.Y,t.width,t.height,{fill:a,"font-style":`italic`},d):t.type&&t.type.text!==``&&Y(n)(t.type.text,s,t.x,t.y+t.type.Y,t.width,t.height,{fill:a,"font-style":`italic`},d),t.descr&&t.descr.text!==``&&(d=n.personFont(),d.fontColor=a,Y(n)(t.descr.text,s,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},d)),t.height},`drawC4Shape`),ge=e(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-database`).attr(`fill-rule`,`evenodd`).attr(`clip-rule`,`evenodd`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z`)},`insertDatabaseIcon`),_e=e(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-computer`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z`)},`insertComputerIcon`),ve=e(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-clock`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z`)},`insertClockIcon`),ye=e(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`)},`insertArrowHead`),be=e(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowend`).attr(`refX`,1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`)},`insertArrowEnd`),xe=e(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-filled-head`).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`insertArrowFilledHead`),Se=e(function(e,t){let n=e.append(`defs`).append(`marker`).attr(`id`,t+`-crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,16).attr(`refY`,4);n.append(`path`).attr(`fill`,`black`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1px`).attr(`d`,`M 9,2 V 6 L16,4 Z`),n.append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1px`).attr(`d`,`M 0,1 L 6,7 M 6,1 L 0,7`)},`insertArrowCrossHead`),Ce=e((e,t)=>({fontFamily:e[t+`FontFamily`],fontSize:e[t+`FontSize`],fontWeight:e[t+`FontWeight`]}),`getC4ShapeFont`),Y=(function(){function t(e,t,n,r,a,o,s){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`text-anchor`,`middle`).text(e),s)}e(t,`byText`);function n(e,t,n,r,a,o,l,u){let{fontSize:d,fontFamily:f,fontWeight:p}=u,m=e.split(s.lineBreakRegex);for(let e=0;e=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>Ee)&&(t=this.nextData.startx+e.margin+Z.nextLinePaddingX,r=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=r+e.height,this.nextData.cnt=1),e.x=t,e.y=r,this.updateVal(this.data,`startx`,t,Math.min),this.updateVal(this.data,`starty`,r,Math.min),this.updateVal(this.data,`stopx`,n,Math.max),this.updateVal(this.data,`stopy`,i,Math.max),this.updateVal(this.nextData,`startx`,t,Math.min),this.updateVal(this.nextData,`starty`,r,Math.min),this.updateVal(this.nextData,`stopx`,n,Math.max),this.updateVal(this.nextData,`stopy`,i,Math.max)}init(e){this.name=``,this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},ke(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},ke=e(function(e){o(Z,e),e.fontFamily&&(Z.personFontFamily=Z.systemFontFamily=Z.messageFontFamily=e.fontFamily),e.fontSize&&(Z.personFontSize=Z.systemFontSize=Z.messageFontSize=e.fontSize),e.fontWeight&&(Z.personFontWeight=Z.systemFontWeight=Z.messageFontWeight=e.fontWeight)},`setConf`),Ae=e((e,t)=>({fontFamily:e[t+`FontFamily`],fontSize:e[t+`FontSize`],fontWeight:e[t+`FontWeight`]}),`c4ShapeFont`),je=e(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),`boundaryFont`),Me=e(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`);function Q(e,t,n,r,i){if(!t[e].width)if(n)t[e].text=m(t[e].text,i,r),t[e].textLines=t[e].text.split(s.lineBreakRegex).length,t[e].width=i,t[e].height=h(t[e].text,r);else{let n=t[e].text.split(s.lineBreakRegex);t[e].textLines=n.length;let i=0;t[e].height=0,t[e].width=0;for(let a of n)t[e].width=Math.max(g(a,r),t[e].width),i=h(a,r),t[e].height=t[e].height+i}}e(Q,`calcC4ShapeTextWH`);var Ne=e(function(e,t,n){t.x=n.data.startx,t.y=n.data.starty,t.width=n.data.stopx-n.data.startx,t.height=n.data.stopy-n.data.starty,t.label.y=Z.c4ShapeMargin-35;let r=t.wrap&&Z.wrap,i=je(Z);i.fontSize+=2,i.fontWeight=`bold`,Q(`label`,t,r,i,g(t.label.text,i)),X.drawBoundary(e,t,Z)},`drawBoundary`),Pe=e(function(e,t,n,r){let i=0;for(let a of r){i=0;let r=n[a],o=Ae(Z,r.typeC4Shape.text);switch(o.fontSize-=2,r.typeC4Shape.width=g(`«`+r.typeC4Shape.text+`»`,o),r.typeC4Shape.height=o.fontSize+2,r.typeC4Shape.Y=Z.c4ShapePadding,i=r.typeC4Shape.Y+r.typeC4Shape.height-4,r.image={width:0,height:0,Y:0},r.typeC4Shape.text){case`person`:case`external_person`:r.image.width=48,r.image.height=48,r.image.Y=i,i=r.image.Y+r.image.height;break}r.sprite&&(r.image.width=48,r.image.height=48,r.image.Y=i,i=r.image.Y+r.image.height);let s=r.wrap&&Z.wrap,l=Z.width-Z.c4ShapePadding*2,u=Ae(Z,r.typeC4Shape.text);u.fontSize+=2,u.fontWeight=`bold`,Q(`label`,r,s,u,l),r.label.Y=i+8,i=r.label.Y+r.label.height,r.type&&r.type.text!==``?(r.type.text=`[`+r.type.text+`]`,Q(`type`,r,s,Ae(Z,r.typeC4Shape.text),l),r.type.Y=i+5,i=r.type.Y+r.type.height):r.techn&&r.techn.text!==``&&(r.techn.text=`[`+r.techn.text+`]`,Q(`techn`,r,s,Ae(Z,r.techn.text),l),r.techn.Y=i+5,i=r.techn.Y+r.techn.height);let d=i,f=r.label.width;r.descr&&r.descr.text!==``&&(Q(`descr`,r,s,Ae(Z,r.typeC4Shape.text),l),r.descr.Y=i+20,i=r.descr.Y+r.descr.height,f=Math.max(r.label.width,r.descr.width),d=i-r.descr.textLines*5),f+=Z.c4ShapePadding,r.width=Math.max(r.width||Z.width,f,Z.width),r.height=Math.max(r.height||Z.height,d,Z.height),r.margin=r.margin||Z.c4ShapeMargin,e.insert(r),X.drawC4Shape(t,r,Z)}e.bumpLastMargin(Z.c4ShapeMargin)},`drawC4ShapeArray`),$=class{static{e(this,`Point`)}constructor(e,t){this.x=e,this.y=t}},Fe=e(function(e,t){let n=e.x,r=e.y,i=t.x,a=t.y,o=n+e.width/2,s=r+e.height/2,l=Math.abs(n-i),u=Math.abs(r-a),d=u/l,f=e.height/e.width,p=null;return r==a&&ni?p=new $(n,s):n==i&&ra&&(p=new $(o,r)),n>i&&r=d?new $(n,s+d*e.width/2):new $(o-l/u*e.height/2,r+e.height):n=d?new $(n+e.width,s+d*e.width/2):new $(o+l/u*e.height/2,r+e.height):na?p=f>=d?new $(n+e.width,s-d*e.width/2):new $(o+e.height/2*l/u,r):n>i&&r>a&&(p=f>=d?new $(n,s-e.width/2*d):new $(o-e.height/2*l/u,r)),p},`getIntersectPoint`),Ie=e(function(e,t){let n={x:0,y:0};n.x=t.x+t.width/2,n.y=t.y+t.height/2;let r=Fe(e,n);return n.x=e.x+e.width/2,n.y=e.y+e.height/2,{startPoint:r,endPoint:Fe(t,n)}},`getIntersectPoints`),Le=e(function(e,t,n,r,i){let a=0;for(let e of t){a+=1;let t=e.wrap&&Z.wrap,i=Me(Z);r.db.getC4Type()===`C4Dynamic`&&(e.label.text=a+`: `+e.label.text);let o=g(e.label.text,i);Q(`label`,e,t,i,o),e.techn&&e.techn.text!==``&&(o=g(e.techn.text,i),Q(`techn`,e,t,i,o)),e.descr&&e.descr.text!==``&&(o=g(e.descr.text,i),Q(`descr`,e,t,i,o));let s=Ie(n(e.from),n(e.to));e.startPoint=s.startPoint,e.endPoint=s.endPoint}X.drawRels(e,t,Z,i)},`drawRels`);function Re(e,t,n,r,i){let a=new Oe(i);a.data.widthLimit=n.data.widthLimit/Math.min(De,r.length);for(let[o,s]of r.entries()){let r=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=r,r=s.image.Y+s.image.height);let l=s.wrap&&Z.wrap,u=je(Z);if(u.fontSize+=2,u.fontWeight=`bold`,Q(`label`,s,l,u,a.data.widthLimit),s.label.Y=r+8,r=s.label.Y+s.label.height,s.type&&s.type.text!==``&&(s.type.text=`[`+s.type.text+`]`,Q(`type`,s,l,je(Z),a.data.widthLimit),s.type.Y=r+5,r=s.type.Y+s.type.height),s.descr&&s.descr.text!==``){let e=je(Z);e.fontSize-=2,Q(`descr`,s,l,e,a.data.widthLimit),s.descr.Y=r+20,r=s.descr.Y+s.descr.height}if(o==0||o%De===0){let e=n.data.startx+Z.diagramMarginX,t=n.data.stopy+Z.diagramMarginY+r;a.setData(e,e,t,t)}else{let e=a.data.stopx===a.data.startx?a.data.startx:a.data.stopx+Z.diagramMarginX,t=a.data.starty;a.setData(e,e,t,t)}a.name=s.alias;let d=i.db.getC4ShapeArray(s.alias),f=i.db.getC4ShapeKeys(s.alias);f.length>0&&Pe(a,e,d,f),t=s.alias;let p=i.db.getBoundaries(t);p.length>0&&Re(e,t,a,p,i),s.alias!==`global`&&Ne(e,s,a),n.data.stopy=Math.max(a.data.stopy+Z.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(a.data.stopx+Z.c4ShapeMargin,n.data.stopx),we=Math.max(we,n.data.stopx),Te=Math.max(Te,n.data.stopy)}}e(Re,`drawInsideBoundary`);var ze={drawPersonOrSystemArray:Pe,drawBoundary:Ne,setConf:ke,draw:e(function(e,r,i,o){Z=u().c4;let s=u().securityLevel,l;s===`sandbox`&&(l=n(`#i`+r));let d=n(s===`sandbox`?l.nodes()[0].contentDocument.body:`body`),f=o.db;o.db.setWrap(Z.wrap),Ee=f.getC4ShapeInRow(),De=f.getC4BoundaryInRow(),t.debug(`C:${JSON.stringify(Z,null,2)}`);let p=s===`sandbox`?d.select(`[id="${r}"]`):n(`[id="${r}"]`);X.insertComputerIcon(p,r),X.insertDatabaseIcon(p,r),X.insertClockIcon(p,r);let m=new Oe(o);m.setData(Z.diagramMarginX,Z.diagramMarginX,Z.diagramMarginY,Z.diagramMarginY),m.data.widthLimit=screen.availWidth,we=Z.diagramMarginX,Te=Z.diagramMarginY;let h=o.db.getTitle();Re(p,``,m,o.db.getBoundaries(``),o),X.insertArrowHead(p,r),X.insertArrowEnd(p,r),X.insertArrowCrossHead(p,r),X.insertArrowFilledHead(p,r),Le(p,o.db.getRels(),o.db.getC4Shape,o,r),m.data.stopx=we,m.data.stopy=Te;let g=m.data,_=g.stopy-g.starty+2*Z.diagramMarginY,v=g.stopx-g.startx+2*Z.diagramMarginX;h&&p.append(`text`).text(h).attr(`x`,(g.stopx-g.startx)/2-4*Z.diagramMarginX).attr(`y`,g.starty+Z.diagramMarginY),a(p,_,v,Z.useMaxWidth);let y=h?60:0;p.attr(`viewBox`,g.startx-Z.diagramMarginX+` -`+(Z.diagramMarginY+y)+` `+v+` `+(_+y)),t.debug(`models:`,g)},`draw`)},Be={parser:x,db:ue,renderer:ze,styles:e(e=>`.person { - stroke: ${e.personBorder}; - fill: ${e.personBkg}; - } -`,`getStyles`),init:e(({c4:e,wrap:t})=>{ze.setConf(e),ue.setWrap(t)},`init`)};export{Be as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/channel-C4fgBBJ4.js b/dist-desktop/assets/channel-C4fgBBJ4.js deleted file mode 100644 index 8e63e6e..0000000 --- a/dist-desktop/assets/channel-C4fgBBJ4.js +++ /dev/null @@ -1 +0,0 @@ -import{at as e,ot as t}from"./chunk-WYO6CB5R-Dv5kDyQC.js";var n=(n,r)=>t.lang.round(e.parse(n)[r]);export{n as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-2Q5K7J3B-C1jixKkw.js b/dist-desktop/assets/chunk-2Q5K7J3B-C1jixKkw.js deleted file mode 100644 index 4c6fa39..0000000 --- a/dist-desktop/assets/chunk-2Q5K7J3B-C1jixKkw.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var t=class{constructor(e){this.init=e,this.records=this.init()}static{e(this,`ImperativeState`)}reset(){this.records=this.init()}};export{t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-32BRIVSS-DWU3ezKg.js b/dist-desktop/assets/chunk-32BRIVSS-DWU3ezKg.js deleted file mode 100644 index 4680930..0000000 --- a/dist-desktop/assets/chunk-32BRIVSS-DWU3ezKg.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-UMNXGZaF.js";import{j as n}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as r}from"./dist-qx0Iv9vM.js";var i=r(),a=e((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),o=e((e,t)=>{a(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:`rect`}).lower()},`drawBackgroundRect`),s=e((e,t)=>{let r=t.text.replace(n,` `),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.attr(`class`,`legend`),i.style(`text-anchor`,t.anchor),t.class&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.text(r),i},`drawText`),c=e((e,t,n,r)=>{let a=e.append(`image`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,o)},`drawImage`),l=e((e,t,n,r)=>{let a=e.append(`use`);a.attr(`x`,t),a.attr(`y`,n);let o=(0,i.sanitizeUrl)(r);a.attr(`xlink:href`,`#${o}`)},`drawEmbeddedImage`),u=e(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),d=e(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),f=e(()=>{let e=t(`.mermaidTooltip`);return e.empty()&&(e=t(`body`).append(`div`).attr(`class`,`mermaidTooltip`).style(`opacity`,0).style(`position`,`absolute`).style(`text-align`,`center`).style(`max-width`,`200px`).style(`padding`,`2px`).style(`font-size`,`12px`).style(`background`,`#ffffde`).style(`border`,`1px solid #333`).style(`border-radius`,`2px`).style(`pointer-events`,`none`).style(`z-index`,`100`)),e},`createTooltip`);export{a,d as c,c as i,o as n,s as o,l as r,u as s,f as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-52WLFC77-BOCvVCX1.js b/dist-desktop/assets/chunk-52WLFC77-BOCvVCX1.js deleted file mode 100644 index 04c43e2..0000000 --- a/dist-desktop/assets/chunk-52WLFC77-BOCvVCX1.js +++ /dev/null @@ -1,10 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-UMNXGZaF.js";import{T as r,b as i,x as a}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{$ as o,J as s,K as c,Q as l,X as u,Y as d,Z as f,et as p,g as m,nt as h,q as g,rt as _,tt as v,u as y}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as b}from"./line-b9Ala942.js";import{n as x}from"./chunk-Q4XR5HBZ-CQ8zkLYc.js";import{i as S,n as ee,r as C,t as w}from"./chunk-7BUUIJ7U-Bb538aSH.js";import{n as T}from"./chunk-OGEWGWER-D-nWYRNR.js";import{i as E,n as D}from"./chunk-C7G6YPKG-DW-1jWUA.js";import{t as te}from"./rough.esm-CSKSodPl.js";import{r as O}from"./chunk-ZGVPDNZ5-DGInJAPD.js";var ne=e((e,t,n,r,i,a=!1,o)=>{t.arrowTypeStart&&j(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&j(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),k={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},A=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],j=e((e,n,r,i,a,o,s=!1,c)=>{let l=k[r],u=l&&A.includes(l.type);if(!l){t.warn(`Unknown arrow type: ${r}`);return}let d=`${a}_${o}-${l.type}${n===`start`?`Start`:`End`}${s&&u?`-margin`:``}`;if(c&&c.trim()!==``){let t=`${d}_${c.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(t)){let e=document.getElementById(d);if(e){let n=e.cloneNode(!0);n.id=t,n.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,c),l.fill&&e.setAttribute(`fill`,c)}),e.parentNode?.appendChild(n)}}e.attr(`marker-${n}`,`url(${i}#${t})`)}else e.attr(`marker-${n}`,`url(${i}#${d})`)},`addEdgeMarker`),re=e(e=>typeof e==`string`?e:a()?.flowchart?.curve,`resolveEdgeCurveType`),M=new Map,N=new Map,P=e(()=>{M.clear(),N.clear()},`clear`),F=e(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),I=e(async(e,i)=>{let o=a(),s=r(o),{labelStyles:c}=E(i);i.labelStyle=c;let l=e.insert(`g`).attr(`class`,`edgeLabel`),u=l.insert(`g`).attr(`class`,`label`).attr(`data-id`,i.id),d=i.labelType===`markdown`,f=await x(e,i.label,{style:F(i.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:d,width:void 0},o);u.node().appendChild(f),t.info(`abc82`,i,i.labelType);let p=f.getBBox(),m=p;if(s){let e=f.children[0],t=n(f);p=e.getBoundingClientRect(),m=p,t.attr(`width`,p.width),t.attr(`height`,p.height)}else{let e=n(f).select(`text`).node();e&&typeof e.getBBox==`function`&&(m=e.getBBox())}u.attr(`transform`,w(m,s)),M.set(i.id,l),i.width=p.width,i.height=p.height;let h;if(i.startLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await O(r,i.startLabelLeft,F(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,w(o,s)),N.get(i.id)||N.set(i.id,{}),N.get(i.id).startLeft=t,L(h,i.startLabelLeft)}if(i.startLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await O(r,i.startLabelRight,F(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,w(o,s)),N.get(i.id)||N.set(i.id,{}),N.get(i.id).startRight=t,L(h,i.startLabelRight)}if(i.endLabelLeft){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await O(t,i.endLabelLeft,F(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,w(o,s)),N.get(i.id)||N.set(i.id,{}),N.get(i.id).endLeft=t,L(h,i.endLabelLeft)}if(i.endLabelRight){let t=e.insert(`g`).attr(`class`,`edgeTerminals`),r=t.insert(`g`).attr(`class`,`inner`),a=await O(t,i.endLabelRight,F(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,w(o,s)),N.get(i.id)||N.set(i.id,{}),N.get(i.id).endRight=t,L(h,i.endLabelRight)}return f},`insertEdgeLabel`);function L(e,t){r(a())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}e(L,`setTerminalWidth`);var R=e((e,n)=>{t.debug(`Moving label abc88 `,e.id,e.label,M.get(e.id),n);let r=n.updatedPath?n.updatedPath:n.originalPath,{subGraphTitleTotalMargin:i}=T(a());if(e.label){let a=M.get(e.id),o=e.x,s=e.y;if(r){let i=m.calcLabelPosition(r);t.debug(`Moving label `+e.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),n.updatedPath&&(o=i.x,s=i.y)}a.attr(`transform`,`translate(${o}, ${s+i/2})`)}if(e.startLabelLeft){let t=N.get(e.id).startLeft,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.startLabelRight){let t=N.get(e.id).startRight,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelLeft){let t=N.get(e.id).endLeft,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}if(e.endLabelRight){let t=N.get(e.id).endRight,n=e.x,i=e.y;if(r){let t=m.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,r);n=t.x,i=t.y}t.attr(`transform`,`translate(${n}, ${i})`)}},`positionEdgeLabel`),ie=e((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith(`-to-label`)||!Array.isArray(t)||t.length!==2)return t;let[n,r]=t,i=Math.abs(r.x-n.x),a=Math.abs(r.y-n.y);return i<.001||a<.001?t:a>=i?[n,{x:n.x,y:r.y},r]:[n,{x:r.x,y:n.y},r]},`orthogonalizeToLabelClippedPoints`),z=e((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),B=e((e,n,r)=>{t.debug(`intersection calc abc89: - outsidePoint: ${JSON.stringify(n)} - insidePoint : ${JSON.stringify(r)} - node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let i=e.x,a=e.y,o=Math.abs(i-r.x),s=e.width/2,c=r.xMath.abs(i-n.x)*l){let e=r.y{t.warn(`abc88 cutPathAtIntersect`,e,n);let r=[],i=e[0],a=!1;return e.forEach(e=>{if(t.info(`abc88 checking point`,e,n),!z(n,e)&&!a){let o=B(n,i,e);t.debug(`abc88 inside`,e,i,o),t.debug(`abc88 intersection`,o,n);let s=!1;r.forEach(e=>{s||=e.x===o.x&&e.y===o.y}),r.some(e=>e.x===o.x&&e.y===o.y)?t.warn(`abc88 no intersect`,o,r):r.push(o),a=!0}else t.warn(`abc88 outside`,e,i),i=e,a||r.push(e)}),t.debug(`returning points`,r),r},`cutPathAtIntersect`);function H(e){let t=[],n=[];for(let r=1;r5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}e(H,`extractCornerPoints`);var U=e(function(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=n/Math.sqrt(r*r+i*i);return{x:t.x-a*r,y:t.y-a*i}},`findAdjacentPoint`),ae=e(function(e){let{cornerPointPositions:n}=H(e),r=[];for(let i=0;i10&&Math.abs(a.y-n.y)>=10?(t.debug(`Corner point fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),f=o.x===s.x?{x:l<0?s.x-5+d:s.x+5-d,y:u<0?s.y-d:s.y+d}:{x:l<0?s.x-d:s.x+d,y:u<0?s.y-5+d:s.y+5-d}):t.debug(`Corner point skipping fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),r.push(f,c)}else r.push(e[i]);return r},`fixCorners`),oe=e((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(i).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),W=e(function(e,r,i,x,C,w,T,E=!1){if(!T)throw Error(`insertEdge: missing diagramId for edge "${r.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:O,layout:k}=a(),A=r.points,j=!1,M=C;var N=w;let P=[];for(let e in r.cssCompiledStyles)D(e)||P.push(r.cssCompiledStyles[e]);if(k===`swimlane`){if(N.intersect&&M.intersect&&Array.isArray(A)&&A.length>=2)if(A.length===2)A=[M.intersect(A[0]),N.intersect(A[1])];else{let e=A.slice(1,-1),t=e[0],n=e[e.length-1],r=.5,i=Math.abs(A[A.length-1].x-n.x)!Number.isNaN(e.y)),L=re(r.curve);L!==`rounded`&&(I=ae(I));let R=_;switch(L){case`linear`:R=_;break;case`basis`:R=p;break;case`cardinal`:R=o;break;case`bumpX`:R=v;break;case`bumpY`:R=h;break;case`catmullRom`:R=l;break;case`monotoneX`:R=u;break;case`monotoneY`:R=f;break;case`natural`:R=d;break;case`step`:R=s;break;case`stepAfter`:R=c;break;case`stepBefore`:R=g;break;case`rounded`:R=_;break;default:R=p}let{x:z,y:B}=ee(r),H=b().x(z).y(B).curve(R),U;switch(r.thickness){case`normal`:U=`edge-thickness-normal`;break;case`thick`:U=`edge-thickness-thick`;break;case`invisible`:U=`edge-thickness-invisible`;break;default:U=`edge-thickness-normal`}switch(r.pattern){case`solid`:U+=` edge-pattern-solid`;break;case`dotted`:U+=` edge-pattern-dotted`;break;case`dashed`:U+=` edge-pattern-dashed`;break;default:U+=` edge-pattern-solid`}let W,K=L===`rounded`?G(q(I,r),5):H(I),J=Array.isArray(r.style)?r.style:[r.style],Y=J.find(e=>e?.startsWith(`stroke:`)),X=``;r.animate&&(X=`edge-animation-fast`),r.animation&&(X=`edge-animation-`+r.animation);let Z=!1;if(r.look===`handDrawn`){let t=te.svg(e);Object.assign([],I);let i=t.path(K,{roughness:.3,seed:O});U+=` transition`,W=n(i).select(`path`).attr(`id`,`${T}-${r.id}`).attr(`class`,` `+U+(r.classes?` `+r.classes:``)+(X?` `+X:``)).attr(`style`,J?J.reduce((e,t)=>e+`;`+t,``):``);let a=W.attr(`d`);W.attr(`d`,a),e.node().appendChild(W.node())}else{let t=P.join(`;`),n=J?J.reduce((e,t)=>e+t+`;`,``):``,i=(t?t+`;`+n+`;`:n)+`;`+(J?J.reduce((e,t)=>e+`;`+t,``):``);W=e.append(`path`).attr(`d`,K).attr(`id`,`${T}-${r.id}`).attr(`class`,` `+U+(r.classes?` `+r.classes:``)+(X?` `+X:``)).attr(`style`,i),Y=i.match(/stroke:([^;]+)/)?.[1],Z=r.animate===!0||!!r.animation||t.includes(`animation`);let a=W.node(),o=typeof a.getTotalLength==`function`?a.getTotalLength():0,s=S[r.arrowTypeStart]||0,c=S[r.arrowTypeEnd]||0;if(r.look===`neo`&&!Z){let e=`stroke-dasharray: ${r.pattern===`dotted`||r.pattern===`dashed`?oe(o,s,c):`0 ${s} ${o-s-c} ${c}`}; stroke-dashoffset: 0;`;W.attr(`style`,e+W.attr(`style`))}}W.attr(`data-edge`,!0),W.attr(`data-et`,`edge`),W.attr(`data-id`,r.id),W.attr(`data-points`,F),W.attr(`data-look`,y(r.look)),r.showPoints&&I.forEach(t=>{e.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,t.x).attr(`cy`,t.y)});let Q=``;(a().flowchart.arrowMarkerAbsolute||a().state.arrowMarkerAbsolute)&&(Q=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,Q=Q.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),t.info(`arrowTypeStart`,r.arrowTypeStart),t.info(`arrowTypeEnd`,r.arrowTypeEnd);let se=!Z&&r?.look===`neo`;ne(W,r,Q,T,x,se,Y);let ce=Math.floor(A.length/2),le=A[ce];m.isLabelCoordinateInPath(le,W.attr(`d`))||(j=!0);let $={};return j&&($.updatedPath=A),$.originalPath=r.points,$},`insertEdge`);function G(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a({...e}));if(e.length>=2&&C[t.arrowTypeStart]){let r=C[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=K(i,a),s=r*Math.cos(o),c=r*Math.sin(o);n[0].x=i.x+s,n[0].y=i.y+c}let r=e.length;if(r>=2&&C[t.arrowTypeEnd]){let i=C[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=K(o,a),c=i*Math.cos(s),l=i*Math.sin(s);n[r-1].x=a.x-c,n[r-1].y=a.y-l}return n}e(q,`applyMarkerOffsetsToPoints`);var J=e((e,t,n,r)=>{t.forEach(t=>{Y[t](e,n,r)})},`insertMarkers`),Y={extension:e((e,n,r)=>{t.trace(`Making markers for `,r),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionStart`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd`).attr(`class`,`marker extension `+n).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`),e.append(`marker`).attr(`id`,r+`_`+n+`-extensionStart-margin`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,7 18,13 18,1`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`),e.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd-margin`).attr(`class`,`marker extension `+n).attr(`refX`,9).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,1 10,13 18,7`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`)},`extension`),composition:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart-margin`).attr(`class`,`marker composition `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`viewBox`,`0 0 15 15`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd-margin`).attr(`class`,`marker composition `+t).attr(`refX`,3.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).attr(`refX`,6).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,4).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,16).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2)},`lollipop`),point:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,11.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,10.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 11.5 7 L 0 14 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,1).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0,7 11.5,14 11.5,0`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`point`),circle:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,11).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refY`,5).attr(`refX`,12.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-2).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`circle`),cross:e((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,12).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,17.7).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,-3.5).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5).style(`stroke-dasharray`,`1,0`)},`cross`),barb:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`),barbNeo:e((e,t,n)=>{let{themeVariables:r}=i(),{transitionColor:a}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd-margin`).attr(`refX`,17).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`).attr(`fill`,`${a}`)},`barbNeo`),only_one:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`)},`only_one`),zero_or_one:e((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,21).attr(`cy`,9).attr(`r`,6),r.append(`path`).attr(`d`,`M9,0 L9,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,9).attr(`r`,6),i.append(`path`).attr(`d`,`M21,0 L21,18`)},`zero_or_one`),one_or_more:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`)},`one_or_more`),zero_or_more:e((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,48).attr(`cy`,18).attr(`r`,6),r.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,18).attr(`r`,6),i.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`)},`zero_or_more`),only_one_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`).attr(`stroke-width`,`${a}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`).attr(`stroke-width`,`${a}`)},`only_one_neo`),zero_or_one_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a,mainBkg:o}=r,s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);s.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${a}`).attr(`r`,6),s.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${a}`);let c=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);c.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${a}`).attr(`r`,6),c.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${a}`)},`zero_or_one_neo`),one_or_more_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`).attr(`stroke-width`,`${a}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`).attr(`stroke-width`,`${a}`)},`one_or_more_neo`),zero_or_more_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a,mainBkg:o}=r,s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);s.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${a}`),s.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${a}`);let c=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);c.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${a}`),c.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${a}`)},`zero_or_more_neo`),requirement_arrow:e((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,0 - L20,10 - M20,10 - L0,20`)},`requirement_arrow`),requirement_contains:e((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`g`);r.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),r.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),r.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10)},`requirement_contains`),requirement_arrow_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`stroke-width`,`${a}`).attr(`viewBox`,`0 0 25 20`).append(`path`).attr(`d`,`M0,0 - L20,10 - M20,10 - L0,20`).attr(`stroke-linejoin`,`miter`)},`requirement_arrow_neo`),requirement_contains_neo:e((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`g`);o.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),o.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),o.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10),o.selectAll(`*`).attr(`stroke-width`,`${a}`)},`requirement_contains_neo`)},X=J;export{X as a,I as i,M as n,R as o,W as r,N as s,P as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-5FCAYU7R-DNtJmW0j.js b/dist-desktop/assets/chunk-5FCAYU7R-DNtJmW0j.js deleted file mode 100644 index cc4772a..0000000 --- a/dist-desktop/assets/chunk-5FCAYU7R-DNtJmW0j.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,S as t,b as n,n as r,o as i,u as a,w as o,x as s}from"./chunk-KEIR6QF5-Dj-OpFgW.js";var c=class extends r{static{s(this,`WardleyValueConverter`)}runCustomConverter(e,t,n){switch(e.name.toUpperCase()){case`LINK_LABEL`:return t.substring(1).trim();default:return}}},l={parser:{ValueConverter:s(()=>new c,`ValueConverter`)}};function u(r=i){let s=o(e(r),a),c=o(t({shared:s}),n,l);return s.ServiceRegistry.register(c),{shared:s,Wardley:c}}s(u,`createWardleyServices`);export{u as n,l as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-5HE753X5-o8-OCfIL.js b/dist-desktop/assets/chunk-5HE753X5-o8-OCfIL.js deleted file mode 100644 index 042bfa2..0000000 --- a/dist-desktop/assets/chunk-5HE753X5-o8-OCfIL.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,S as t,m as n,n as r,o as i,t as a,u as o,w as s,x as c}from"./chunk-KEIR6QF5-Dj-OpFgW.js";var l=class extends a{static{c(this,`RailroadAbnfTokenBuilder`)}constructor(){super([`railroad-abnf-beta`])}},u=class extends r{static{c(this,`RailroadAbnfValueConverter`)}runConverter(e,t,n){let r=super.runConverter(e,t,n);if(e.name===`TITLE`&&typeof r==`string`){let e=r.trim();if(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))return e.slice(1,-1)}return r}runCustomConverter(e,t,n){if(e.name===`ABNF_STRING`)return t.slice(1,-1)}},d={parser:{TokenBuilder:c(()=>new l,`TokenBuilder`),ValueConverter:c(()=>new u,`ValueConverter`)}};function f(r=i){let a=s(e(r),o),c=s(t({shared:a}),n,d);return a.ServiceRegistry.register(c),{shared:a,RailroadAbnf:c}}c(f,`createRailroadAbnfServices`);export{f as n,d as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-5JV3BV7I-DKfYBAeY.js b/dist-desktop/assets/chunk-5JV3BV7I-DKfYBAeY.js deleted file mode 100644 index 9e18781..0000000 --- a/dist-desktop/assets/chunk-5JV3BV7I-DKfYBAeY.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,S as t,i as n,o as r,s as i,t as a,u as o,w as s,x as c}from"./chunk-KEIR6QF5-Dj-OpFgW.js";var l=class extends a{static{c(this,`EventModelingTokenBuilder`)}constructor(){super([`eventmodeling`])}},u=new Set([`cmd`,`command`]),d=new Set([`evt`,`event`]),f=new Set([`rmo`,`readmodel`]),p=new Set([`pcr`,`processor`]),m=new Set([`ui`]);function h(e){let t=e.validation.EventModelingValidator,n=e.validation.ValidationRegistry;if(n){let e={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};n.register(e,t)}}c(h,`registerValidationChecks`);var g=class{static{c(this,`EventModelingValidator`)}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(u.has(e.modelEntityType)?this.validateSources(e,new Set([...m,...p]),`command`,`ui or processor`,t):d.has(e.modelEntityType)?this.validateSources(e,u,`event`,`command`,t):f.has(e.modelEntityType)?this.validateSources(e,d,`read model`,`event`,t):p.has(e.modelEntityType)?this.validateSources(e,f,`processor`,`read model`,t):m.has(e.modelEntityType)&&this.validateSources(e,f,`ui`,`read model`,t))}validateSources(e,t,n,r,i){for(let a of e.sourceFrames){let o=a.ref;o!==void 0&&!t.has(o.modelEntityType)&&i(`error`,`A ${n} can only receive input from a ${r}, not from '${o.modelEntityType}'.`,{node:e,property:`sourceFrames`})}}},_={parser:{TokenBuilder:c(()=>new l,`TokenBuilder`),ValueConverter:c(()=>new n,`ValueConverter`)},validation:{EventModelingValidator:c(()=>new g,`EventModelingValidator`)}};function v(n=r){let a=s(e(n),o),c=s(t({shared:a}),i,_);return a.ServiceRegistry.register(c),h(c),{shared:a,EventModel:c}}c(v,`createEventModelingServices`);export{v as n,_ as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-5TONJI2A-DOX2waSJ.js b/dist-desktop/assets/chunk-5TONJI2A-DOX2waSJ.js deleted file mode 100644 index 7402f95..0000000 --- a/dist-desktop/assets/chunk-5TONJI2A-DOX2waSJ.js +++ /dev/null @@ -1,2 +0,0 @@ -import{C as e,S as t,g as n,n as r,o as i,t as a,u as o,w as s,x as c}from"./chunk-KEIR6QF5-Dj-OpFgW.js";var l=class extends a{static{c(this,`RailroadTokenBuilder`)}constructor(){super([`railroad-beta`])}},u=c(e=>{let t=e.slice(1,-1),n=``;for(let e=0;enew l,`TokenBuilder`),ValueConverter:c(()=>new d,`ValueConverter`)}};function p(r=i){let a=s(e(r),o),c=s(t({shared:a}),n,f);return a.ServiceRegistry.register(c),{shared:a,Railroad:c}}c(p,`createRailroadServices`);export{p as n,f as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-5VM5RSS4-ZNzvKenW.js b/dist-desktop/assets/chunk-5VM5RSS4-ZNzvKenW.js deleted file mode 100644 index 31131d3..0000000 --- a/dist-desktop/assets/chunk-5VM5RSS4-ZNzvKenW.js +++ /dev/null @@ -1,15 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var t=e(()=>` - /* Font Awesome icon styling - consolidated */ - .label-icon { - display: inline-block; - height: 1em; - overflow: visible; - vertical-align: -0.125em; - } - - .node .label-icon path { - fill: currentColor; - stroke: revert; - stroke-width: revert; - } -`,`getIconStyles`);export{t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-7BUUIJ7U-Bb538aSH.js b/dist-desktop/assets/chunk-7BUUIJ7U-Bb538aSH.js deleted file mode 100644 index 044c05d..0000000 --- a/dist-desktop/assets/chunk-7BUUIJ7U-Bb538aSH.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var t=e((e,t)=>{if(t)return`translate(`+-e.width/2+`, `+-e.height/2+`)`;let n=e.x??0,r=e.y??0;return`translate(`+-(n+e.width/2)+`, `+-(r+e.height/2)+`)`},`computeLabelTransform`),n={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},r={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function i(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=a(e),t=a(t);let[n,r]=[e.x,e.y],[i,o]=[t.x,t.y],s=i-n,c=o-r;return{angle:Math.atan(c/s),deltaX:s,deltaY:c}}e(i,`calculateDeltaAndAngle`);var a=e(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),o=e(t=>({x:e(function(e,r,o){let s=0,c=a(o[0]).x=0?1:-1)}else if(r===o.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){let{angle:e,deltaX:r}=i(o[o.length-1],o[o.length-2]);s=n[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}let l=Math.abs(a(e).x-a(o[o.length-1]).x),u=Math.abs(a(e).y-a(o[o.length-1]).y),d=Math.abs(a(e).x-a(o[0]).x),f=Math.abs(a(e).y-a(o[0]).y),p=n[t.arrowTypeStart],m=n[t.arrowTypeEnd];if(l0&&u0&&f=0?1:-1)}else if(r===o.length-1&&Object.hasOwn(n,t.arrowTypeEnd)){let{angle:e,deltaY:r}=i(o[o.length-1],o[o.length-2]);s=n[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}let l=Math.abs(a(e).y-a(o[o.length-1]).y),u=Math.abs(a(e).x-a(o[o.length-1]).x),d=Math.abs(a(e).y-a(o[0]).y),f=Math.abs(a(e).x-a(o[0]).x),p=n[t.arrowTypeStart],m=n[t.arrowTypeEnd];if(l0&&u0&&fnew l,`TokenBuilder`),ValueConverter:c(()=>new n,`ValueConverter`)}};function d(n=i){let a=s(e(n),o),c=s(t({shared:a}),r,u);return a.ServiceRegistry.register(c),{shared:a,Info:c}}c(d,`createInfoServices`);export{d as n,u as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-C7G6YPKG-DW-1jWUA.js b/dist-desktop/assets/chunk-C7G6YPKG-DW-1jWUA.js deleted file mode 100644 index fb9dee2..0000000 --- a/dist-desktop/assets/chunk-C7G6YPKG-DW-1jWUA.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{x as t}from"./chunk-WYO6CB5R-Dv5kDyQC.js";var n=e(e=>{let{handDrawnSeed:n}=t();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:n}},`solidStateFill`),r=e(e=>{let t=i([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),i=e(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),a=e(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),o=e(e=>{let{stylesArray:t}=r(e),n=[],i=[],o=[],s=[];return t.forEach(e=>{let t=e[0];a(t)?n.push(e.join(`:`)+` !important`):(i.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&o.push(e.join(`:`)+` !important`),t===`fill`&&s.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:i.join(`;`),stylesArray:t,borderStyles:o,backgroundStyles:s}},`styles2String`),s=e((e,n)=>{let{themeVariables:i,handDrawnSeed:a}=t(),{nodeBorder:o,mainBkg:s}=i,{stylesMap:l}=r(e);return Object.assign({roughness:.7,fill:l.get(`fill`)||s,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:l.get(`stroke`)||o,seed:a,strokeWidth:l.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:c(l.get(`stroke-dasharray`))},n)},`userNodeOverrides`),c=e(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);export{s as a,o as i,a as n,n as r,r as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-CQNSW5MT-BbEh_krl.js b/dist-desktop/assets/chunk-CQNSW5MT-BbEh_krl.js deleted file mode 100644 index 587d5cf..0000000 --- a/dist-desktop/assets/chunk-CQNSW5MT-BbEh_krl.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,S as t,n,o as r,t as i,u as a,v as o,w as s,x as c}from"./chunk-KEIR6QF5-Dj-OpFgW.js";var l=class extends n{static{c(this,`TreeViewValueConverter`)}runCustomConverter(e,t,n){if(e.name===`INDENTATION`)return t?.length||0;if(e.name===`QUOTED_NAME`)return t.substring(1,t.length-1);if(e.name===`BARE_NAME`)return t.replace(/[\t ]+$/,``);if(e.name===`CLASS_ANNOTATION`)return t.trim().substring(3).trim();if(e.name===`ICON_ANNOTATION`){let e=t.trim();return e.substring(5,e.length-1)}if(e.name===`DESC_ANNOTATION`)return t.trim().substring(2).trim()}},u=class extends i{static{c(this,`TreeViewTokenBuilder`)}constructor(){super([`treeView-beta`])}},d={parser:{TokenBuilder:c(()=>new u,`TokenBuilder`),ValueConverter:c(()=>new l,`ValueConverter`)}};function f(n=r){let i=s(e(n),a),c=s(t({shared:i}),o,d);return i.ServiceRegistry.register(c),{shared:i,TreeView:c}}c(f,`createTreeViewServices`);export{f as n,d as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-CYSBUYHQ-CbOq7Rc1.js b/dist-desktop/assets/chunk-CYSBUYHQ-CbOq7Rc1.js deleted file mode 100644 index 024de46..0000000 --- a/dist-desktop/assets/chunk-CYSBUYHQ-CbOq7Rc1.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,S as t,c as n,i as r,o as i,t as a,u as o,w as s,x as c}from"./chunk-KEIR6QF5-Dj-OpFgW.js";var l=class extends a{static{c(this,`GitGraphTokenBuilder`)}constructor(){super([`gitGraph`])}},u={parser:{TokenBuilder:c(()=>new l,`TokenBuilder`),ValueConverter:c(()=>new r,`ValueConverter`)}};function d(r=i){let a=s(e(r),o),c=s(t({shared:a}),n,u);return a.ServiceRegistry.register(c),{shared:a,GitGraph:c}}c(d,`createGitGraphServices`);export{d as n,u as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-EMLP6XTP-BoneA0Uo.js b/dist-desktop/assets/chunk-EMLP6XTP-BoneA0Uo.js deleted file mode 100644 index eb457cb..0000000 --- a/dist-desktop/assets/chunk-EMLP6XTP-BoneA0Uo.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,S as t,d as n,i as r,o as i,t as a,u as o,w as s,x as c}from"./chunk-KEIR6QF5-Dj-OpFgW.js";var l=class extends a{static{c(this,`PacketTokenBuilder`)}constructor(){super([`packet`])}},u={parser:{TokenBuilder:c(()=>new l,`TokenBuilder`),ValueConverter:c(()=>new r,`ValueConverter`)}};function d(r=i){let a=s(e(r),o),c=s(t({shared:a}),n,u);return a.ServiceRegistry.register(c),{shared:a,Packet:c}}c(d,`createPacketServices`);export{d as n,u as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-EX3LRPZG-CzaF5a2T.js b/dist-desktop/assets/chunk-EX3LRPZG-CzaF5a2T.js deleted file mode 100644 index c2da566..0000000 --- a/dist-desktop/assets/chunk-EX3LRPZG-CzaF5a2T.js +++ /dev/null @@ -1,231 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-UMNXGZaF.js";import{$ as r,H as i,K as a,U as o,a as s,s as c,v as l,w as u,x as d,y as f}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{g as p,s as m}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as h}from"./chunk-32BRIVSS-DWU3ezKg.js";import{t as g}from"./chunk-XXDRQBXY-Bq6zMMOx.js";import{t as _}from"./chunk-VR4S4FIN-BTo4eV3J.js";import{r as v}from"./chunk-FWX5IMBZ-ComLEIwh.js";var y=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],p=[1,20],m=[1,21],h=[1,22],g=[1,23],_=[1,24],v=[1,26],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,32],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,34],A=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],j=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],M=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],N={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NL`,6:`SD`,14:`DESCR`,15:`-->`,16:`HIDE_EMPTY`,17:`scale`,18:`WIDTH`,19:`COMPOSIT_STATE`,20:`STRUCT_START`,21:`STRUCT_STOP`,22:`STATE_DESCR`,23:`AS`,24:`ID`,25:`FORK`,26:`JOIN`,27:`CHOICE`,28:`CONCURRENT`,29:`note`,31:`NOTE_TEXT`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,38:`CLICK`,39:`STRING`,40:`HREF`,41:`classDef`,42:`CLASSDEF_ID`,43:`CLASSDEF_STYLEOPTS`,44:`DEFAULT`,45:`style`,46:`STYLE_IDS`,47:`STYLEDEF_STYLEOPTS`,48:`class`,49:`CLASSENTITY_IDS`,50:`STYLECLASS`,51:`direction_tb`,52:`direction_bt`,53:`direction_rl`,54:`direction_lr`,56:`;`,57:`EDGE_STATE`,58:`STYLE_SEPARATOR`,59:`left_of`,60:`right_of`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var c=a[s],l=a[s-2].trim();if(a[s].match(`:`)){var u=a[s].split(`:`);c=u[0],l=[l,u[1]]}this.$={stmt:`state`,id:c,type:`default`,description:l};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:c,17:l,19:u,22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,7]),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(A,[2,11]),t(A,[2,12],{14:[1,40],15:[1,41]}),t(A,[2,16]),{18:[1,42]},t(A,[2,18],{20:[1,43]}),{23:[1,44]},t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(A,[2,28]),{34:[1,49]},{36:[1,50]},t(A,[2,31]),{13:51,24:f,57:k},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(j,[2,44],{58:[1,56]}),t(j,[2,45],{58:[1,57]}),t(A,[2,38]),t(A,[2,39]),t(A,[2,40]),t(A,[2,41]),t(A,[2,6]),t(A,[2,13]),{13:58,24:f,57:k},t(A,[2,17]),t(M,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(A,[2,29]),t(A,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(A,[2,14],{14:[1,71]}),{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,72],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(A,[2,34]),t(A,[2,35]),t(A,[2,36]),t(A,[2,37]),t(j,[2,46]),t(j,[2,47]),t(A,[2,15]),t(A,[2,19]),t(M,a,{7:78}),t(A,[2,26]),t(A,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:s,8:8,9:10,10:12,11:13,12:14,13:15,16:c,17:l,19:u,21:[1,81],22:d,24:f,25:p,26:m,27:h,28:g,29:_,32:25,33:v,35:y,37:b,38:x,41:S,45:C,48:w,51:T,52:E,53:D,54:O,57:k},t(A,[2,32]),t(A,[2,33]),t(A,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};N.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(t,n,r,i){function a(){let e=n.yytext.indexOf(`%%`);if(e===0)return!1;if(e>0){let r=n.yytext.slice(0,e),i=n.yytext.slice(e);i&&t.lexer.unput(i),n.yytext=r}return!0}switch(e(a,`processId`),r){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState(`SCALE`),17;case 14:return 18;case 15:this.popState();break;case 16:return this.begin(`acc_title`),33;case 17:return this.popState(),`acc_title_value`;case 18:return this.begin(`acc_descr`),35;case 19:return this.popState(),`acc_descr_value`;case 20:this.begin(`acc_descr_multiline`);break;case 21:this.popState();break;case 22:return`acc_descr_multiline_value`;case 23:return this.pushState(`CLASSDEF`),41;case 24:return this.popState(),this.pushState(`CLASSDEFID`),`DEFAULT_CLASSDEF_ID`;case 25:return this.popState(),this.pushState(`CLASSDEFID`),42;case 26:return this.popState(),43;case 27:return this.pushState(`CLASS`),48;case 28:return this.popState(),this.pushState(`CLASS_STYLE`),49;case 29:return this.popState(),50;case 30:return this.pushState(`STYLE`),45;case 31:return this.popState(),this.pushState(`STYLEDEF_STYLES`),46;case 32:return this.popState(),47;case 33:return this.pushState(`SCALE`),17;case 34:return 18;case 35:this.popState();break;case 36:this.pushState(`STATE`);break;case 37:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),n.yytext=n.yytext.slice(0,-10).trim(),27;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState(`STATE_STRING`);break;case 48:return this.pushState(`STATE_ID`),`AS`;case 49:return a()?(this.popState(),`ID`):void 0;case 50:this.popState();break;case 51:return`STATE_DESCR`;case 52:throw Error(`Error: State name must be a single word. Found: "`+n.yytext.trim()+`"`);case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState(`struct`),20;case 56:return this.popState(),21;case 57:break;case 58:return this.begin(`NOTE`),29;case 59:return this.popState(),this.pushState(`NOTE_ID`),59;case 60:return this.popState(),this.pushState(`NOTE_ID`),60;case 61:this.popState(),this.pushState(`FLOATING_NOTE`);break;case 62:return this.popState(),this.pushState(`FLOATING_NOTE_ID`),`AS`;case 63:break;case 64:return`NOTE_TEXT`;case 65:return a()?(this.popState(),`ID`):void 0;case 66:return a()?(this.popState(),this.pushState(`NOTE_TEXT`),24):void 0;case 67:return this.popState(),n.yytext=n.yytext.substr(2).trim(),31;case 68:return this.popState(),n.yytext=n.yytext.slice(0,-8).trim(),31;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:return a()?24:void 0;case 74:return n.yytext=n.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return`INVALID`}},`anonymous`),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}}})();function P(){this.yy={}}return e(P,`Parser`),P.prototype=N,N.Parser=P,new P})();y.parser=y;var b=y,x=`TB`,S=`TB`,C=`dir`,w=`state`,T=`root`,E=`relation`,D=`classDef`,O=`style`,k=`applyClass`,A=`default`,j=`divider`,M=`fill:none`,N=`fill: #333`,P=`c`,ee=`markdown`,F=`normal`,I=`rect`,L=`rectWithTitle`,te=`stateStart`,ne=`stateEnd`,R=`divider`,re=`roundedWithTitle`,ie=`note`,ae=`noteGroup`,z=`statediagram`,oe=`${z}-state`,B=`transition`,se=`note`,ce=`${B} note-edge`,le=`${z}-${se}`,ue=`${z}-cluster`,de=`${z}-cluster-alt`,V=`parent`,H=`note`,fe=`state`,U=`----`,pe=`${U}${H}`,W=`${U}${V}`,G=e((e,t=S)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`),me={getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`),draw:e(async function(e,n,r,i){t.info(`REF0:`),t.info(`Drawing state diagram (v2)`,n);let{securityLevel:a,state:o,layout:s}=d();i.db.extract(i.db.getRootDocV2());let c=i.db.getData(),l=g(n,a);c.type=i.type,c.layoutAlgorithm=s,c.nodeSpacing=o?.nodeSpacing||50,c.rankSpacing=o?.rankSpacing||50,d().look===`neo`?c.markers=[`barbNeo`]:c.markers=[`barb`],c.diagramId=n,await v(c,l);try{(typeof i.db.getLinks==`function`?i.db.getLinks():new Map).forEach((e,n)=>{let r=typeof n==`string`?n:typeof n?.id==`string`?n.id:``,i=c.nodes.find(e=>e.id===r);if(!r){t.warn(`⚠️ Invalid or missing stateId from key:`,JSON.stringify(n));return}let a=l.node()?.querySelectorAll(`g.node, g.rough-node`),o;if(a?.forEach(e=>{let t=e.textContent?.trim();(e.id===i?.domId||t===r)&&(o=e)}),!o){t.warn(`⚠️ Could not find node matching text:`,r);return}let s=o.parentNode;if(!s){t.warn(`⚠️ Node has no parent, cannot wrap:`,r);return}let u=document.createElementNS(`http://www.w3.org/2000/svg`,`a`),d=e.url.replace(/^"+|"+$/g,``);if(u.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,d),u.setAttribute(`target`,`_blank`),e.tooltip){let t=e.tooltip.replace(/^"+|"+$/g,``);u.setAttribute(`title`,t),o.setAttribute(`title`,t)}s.replaceChild(u,o),u.appendChild(o),t.info(`🔗 Wrapped node in tag for:`,r,e.url)})}catch(e){t.error(`❌ Error injecting clickable links:`,e)}p.insertTitle(l,`statediagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),_(l,8,z,o?.useMaxWidth??!0)},`draw`),getDir:G},K=new Map,q=0;function J(e=``,t=0,n=``,r=U){return`${fe}-${e}${n!==null&&n.length>0?`${r}${n}`:``}-${t}`}e(J,`stateDomId`);var he=e((e,n,r,i,a,o,s,l)=>{t.trace(`items`,n),n.forEach(t=>{switch(t.stmt){case w:Z(e,t,r,i,a,o,s,l);break;case A:Z(e,t,r,i,a,o,s,l);break;case E:{Z(e,t.state1,r,i,a,o,s,l),Z(e,t.state2,r,i,a,o,s,l);let n=s===`neo`,u={id:`edge`+q,start:t.state1.id,end:t.state2.id,arrowhead:`normal`,arrowTypeEnd:n?`arrow_barb_neo`:`arrow_barb`,style:M,labelStyle:``,label:c.sanitizeText(t.description??``,d()),arrowheadStyle:N,labelpos:P,labelType:ee,thickness:F,classes:B,look:s};a.push(u),q++}break}})},`setupDoc`),ge=e((e,t=S)=>{let n=t;if(e.doc)for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`);function Y(e,t,n){if(!t.id||t.id===``||t.id===``)return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(` `).forEach(e=>{let r=n.get(e);r&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...r.styles])}));let r=e.find(e=>e.id===t.id);r?Object.assign(r,t):e.push(t)}e(Y,`insertOrUpdateNode`);function X(e){return e?.classes?.join(` `)??``}e(X,`getClassesFromDbInfo`);function _e(e){return e?.styles??[]}e(_e,`getStylesFromDbInfo`);var Z=e((e,n,r,i,a,o,s,l)=>{let u=n.id,f=r.get(u),p=X(f),m=_e(f),h=d();if(t.info(`dataFetcher parsedItem`,n,f,m),u!==`root`){let r=I;n.start===!0?r=te:n.start===!1&&(r=ne),n.type!==A&&(r=n.type),K.get(u)||K.set(u,{id:u,shape:r,description:c.sanitizeText(u,h),cssClasses:`${p} ${oe}`,cssStyles:m});let d=K.get(u);n.description&&(Array.isArray(d.description)?(d.shape=L,d.description.push(n.description)):d.description?.length&&d.description.length>0?(d.shape=L,d.description===u?d.description=[n.description]:d.description=[d.description,n.description]):(d.shape=I,d.description=n.description),d.description=c.sanitizeTextOrArray(d.description,h)),d.description?.length===1&&d.shape===L&&(d.type===`group`?d.shape=re:d.shape=I),!d.type&&n.doc&&(t.info(`Setting cluster for XCX`,u,ge(n)),d.type=`group`,d.isGroup=!0,d.dir=ge(n),d.explicitDir=n.doc.some(e=>e.stmt===`dir`),d.shape=n.type===j?R:re,d.cssClasses=`${d.cssClasses} ${ue} ${o?de:``}`);let f={labelStyle:``,shape:d.shape,label:d.description,cssClasses:d.cssClasses,cssCompiledStyles:[],cssStyles:d.cssStyles,id:u,dir:d.dir,domId:J(u,q),type:d.type,isGroup:d.type===`group`,padding:8,rx:10,ry:10,look:s,labelType:`markdown`};if(f.shape===R&&(f.label=``),e&&e.id!==`root`&&(t.trace(`Setting node `,u,` to be child of its parent `,e.id),f.parentId=e.id),f.centerLabel=!0,n.note){let e={labelStyle:``,shape:ie,label:n.note.text,labelType:`markdown`,cssClasses:le,cssStyles:[],cssCompiledStyles:[],id:u+pe+`-`+q,domId:J(u,q,H),type:d.type,isGroup:d.type===`group`,padding:h.flowchart?.padding,look:s,position:n.note.position},t=u+W,r={labelStyle:``,shape:ae,label:n.note.text,cssClasses:d.cssClasses,cssStyles:[],id:u+W,domId:J(u,q,V),type:`group`,isGroup:!0,padding:16,look:s,position:n.note.position};q++,r.id=t,e.parentId=t,Y(i,r,l),Y(i,e,l),Y(i,f,l);let o=u,c=e.id;n.note.position===`left of`&&(o=e.id,c=u),a.push({id:o+`-`+c,start:o,end:c,arrowhead:`none`,arrowTypeEnd:``,style:M,labelStyle:``,classes:ce,arrowheadStyle:N,labelpos:P,labelType:ee,thickness:F,look:s})}else Y(i,f,l)}n.doc&&(t.trace(`Adding nodes children `),he(n,n.doc,r,i,a,!o,s,l))},`dataFetcher`),ve=e(()=>{K.clear(),q=0},`reset`),Q={START_NODE:`[*]`,START_TYPE:`start`,END_NODE:`[*]`,END_TYPE:`end`,COLOR_KEYWORD:`color`,FILL_KEYWORD:`fill`,BG_FILL:`bgFill`,STYLECLASS_SEP:`,`},ye=e(()=>new Map,`newClassesList`),be=e(()=>({relations:[],states:new Map,documents:{}}),`newDoc`),$=e(e=>JSON.parse(JSON.stringify(e)),`clone`),xe=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=ye(),this.documents={root:be()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=f,this.setAccTitle=o,this.getAccDescription=l,this.setAccDescription=i,this.setDiagramTitle=a,this.getDiagramTitle=u,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{e(this,`StateDB`)}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let t of Array.isArray(e)?e:e.doc)switch(t.stmt){case w:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case E:this.addRelation(t.state1,t.state2,t.description);break;case D:this.addStyleClass(t.id.trim(),t.classes);break;case O:this.handleStyleDef(t);break;case k:this.setCssClass(t.id.trim(),t.styleClass);break;case`click`:this.addLink(t.id,t.url,t.tooltip);break}let t=this.getStates(),n=d();ve(),Z(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,n.look,this.classes);for(let e of this.nodes)if(Array.isArray(e.label)){if(e.description=e.label.slice(1),e.isGroup&&e.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${e.id}]`);e.label=e.label[0]}}handleStyleDef(e){let t=e.id.trim().split(`,`),n=e.styleClass.split(`,`);for(let e of t){let t=this.getState(e);if(!t){let n=e.trim();this.addState(n),t=this.getState(n)}t&&(t.styles=n.map(e=>e.replace(/;/g,``)?.trim()))}}setRootDoc(e){t.info(`Setting root doc`,e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,t,n){if(t.stmt===E){this.docTranslator(e,t.state1,!0),this.docTranslator(e,t.state2,!1);return}if(t.stmt===w&&(t.id===Q.START_NODE?(t.id=e.id+(n?`_start`:`_end`),t.start=n):t.id=t.id.trim()),t.stmt!==T&&t.stmt!==w||!t.doc)return;let r=[],i=[];for(let e of t.doc)if(e.type===j){let t=$(e);t.doc=$(i),r.push(t),i=[]}else i.push(e);if(r.length>0&&i.length>0){let e={stmt:w,id:m(),type:`divider`,doc:$(i)};r.push($(e)),t.doc=r}t.doc.forEach(e=>this.docTranslator(t,e,!0))}getRootDocV2(){return this.docTranslator({id:T,stmt:T},{id:T,stmt:T,doc:this.rootDoc},!0),{id:T,doc:this.rootDoc}}addState(e,n=A,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0,l=void 0){let u=e?.trim();if(!this.currentDocument.states.has(u))t.info(`Adding state `,u,i),this.currentDocument.states.set(u,{stmt:w,id:u,descriptions:[],type:n,doc:r,note:a,classes:[],styles:[],textStyles:[]});else{let e=this.currentDocument.states.get(u);if(!e)throw Error(`State not found: ${u}`);e.doc||=r,e.type||=n}if(i&&(t.info(`Setting state description`,u,i),(Array.isArray(i)?i:[i]).forEach(e=>this.addDescription(u,e.trim()))),a){let e=this.currentDocument.states.get(u);if(!e)throw Error(`State not found: ${u}`);e.note=a,e.note.text=c.sanitizeText(e.note.text,d())}o&&(t.info(`Setting state classes`,u,o),(Array.isArray(o)?o:[o]).forEach(e=>this.setCssClass(u,e.trim()))),s&&(t.info(`Setting state styles`,u,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(u,e.trim()))),l&&(t.info(`Setting state styles`,u,s),(Array.isArray(l)?l:[l]).forEach(e=>this.setTextStyle(u,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:be()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=ye(),e||(this.links=new Map,s())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){t.info(`Documents = `,this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,n,r){this.links.set(e,{url:n,tooltip:r}),t.warn(`Adding link`,e,n,r)}getLinks(){return this.links}startIdIfNeeded(e=``){return e===Q.START_NODE?(this.startEndCount++,`${Q.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e=``,t=A){return e===Q.START_NODE?Q.START_TYPE:t}endIdIfNeeded(e=``){return e===Q.END_NODE?(this.startEndCount++,`${Q.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e=``,t=A){return e===Q.END_NODE?Q.END_TYPE:t}addRelationObjs(e,t,n=``){let r=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),o=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(r,i,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,o,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:c.sanitizeText(n,d())})}addRelation(e,t,n){if(typeof e==`object`&&typeof t==`object`)this.addRelationObjs(e,t,n);else if(typeof e==`string`&&typeof t==`string`){let r=this.startIdIfNeeded(e.trim()),i=this.startTypeIfNeeded(e),a=this.endIdIfNeeded(t.trim()),o=this.endTypeIfNeeded(t);this.addState(r,i),this.addState(a,o),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:n?c.sanitizeText(n,d()):void 0})}}addDescription(e,t){let n=this.currentDocument.states.get(e),r=t.startsWith(`:`)?t.replace(`:`,``).trim():t;n?.descriptions?.push(c.sanitizeText(r,d()))}cleanupLabel(e){return e.startsWith(`:`)?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,t=``){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let n=this.classes.get(e);t&&n&&t.split(Q.STYLECLASS_SEP).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(Q.COLOR_KEYWORD).exec(e)){let e=t.replace(Q.FILL_KEYWORD,Q.BG_FILL).replace(Q.COLOR_KEYWORD,Q.FILL_KEYWORD);n.textStyles.push(e)}n.styles.push(t)})}getClasses(){return this.classes}setupToolTips(e){let t=h();n(e).select(`svg`).selectAll(`g.node, g.rough-node`).on(`mouseover`,e=>{let i=n(e.currentTarget),a=i.attr(`title`);if(a===null)return;let o=e.currentTarget?.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.style(`left`,window.scrollX+o.left+(o.right-o.left)/2+`px`).style(`top`,window.scrollY+o.bottom+`px`),t.html(r.sanitize(a)),i.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),n(e.currentTarget).classed(`hover`,!1)})}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=this.getState(e);if(!n){let t=e.trim();this.addState(t),n=this.getState(t)}n?.classes?.push(t)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===C)}getDirection(){return this.getDirectionStatement()?.value??x}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:C,value:e})}trimColon(e){return e.startsWith(`:`)?e.slice(1).trim():e.trim()}getData(){let e=d();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:G(this.getRootDocV2())}}getConfig(){return d().state}},Se=e(e=>` -defs [id$="-barbEnd"] { - fill: ${e.transitionColor}; - stroke: ${e.transitionColor}; - } -g.stateGroup text { - fill: ${e.nodeBorder}; - stroke: none; - font-size: 10px; -} -g.stateGroup text { - fill: ${e.textColor}; - stroke: none; - font-size: 10px; - -} -g.stateGroup .state-title { - font-weight: bolder; - fill: ${e.stateLabelColor}; -} - -g.stateGroup rect { - fill: ${e.mainBkg}; - stroke: ${e.nodeBorder}; -} - -g.stateGroup line { - stroke: ${e.lineColor}; - stroke-width: ${e.strokeWidth||1}; -} - -.transition { - stroke: ${e.transitionColor}; - stroke-width: ${e.strokeWidth||1}; - fill: none; -} - -.stateGroup .composit { - fill: ${e.background}; - border-bottom: 1px -} - -.stateGroup .alt-composit { - fill: #e0e0e0; - border-bottom: 1px -} - -.state-note { - stroke: ${e.noteBorderColor}; - fill: ${e.noteBkgColor}; - - text { - fill: ${e.noteTextColor}; - stroke: none; - font-size: 10px; - } -} - -.stateLabel .box { - stroke: none; - stroke-width: 0; - fill: ${e.mainBkg}; - opacity: 0.5; -} - -.edgeLabel .label rect { - fill: ${e.labelBackgroundColor}; - opacity: 0.5; -} -.edgeLabel { - background-color: ${e.edgeLabelBackground}; - p { - background-color: ${e.edgeLabelBackground}; - } - rect { - opacity: 0.5; - background-color: ${e.edgeLabelBackground}; - fill: ${e.edgeLabelBackground}; - } - text-align: center; -} -.edgeLabel .label text { - fill: ${e.transitionLabelColor||e.tertiaryTextColor}; -} -.label div .edgeLabel { - color: ${e.transitionLabelColor||e.tertiaryTextColor}; -} - -.stateLabel text { - fill: ${e.stateLabelColor}; - font-size: 10px; - font-weight: bold; -} - -.node circle.state-start { - fill: ${e.specialStateColor}; - stroke: ${e.specialStateColor}; -} - -.node .fork-join { - fill: ${e.specialStateColor}; - stroke: ${e.specialStateColor}; -} - -.node circle.state-end { - fill: ${e.innerEndBackground}; - stroke: ${e.background}; - stroke-width: 1.5 -} -.end-state-inner { - fill: ${e.compositeBackground||e.background}; - // stroke: ${e.background}; - stroke-width: 1.5 -} - -.node rect { - fill: ${e.stateBkg||e.mainBkg}; - stroke: ${e.stateBorder||e.nodeBorder}; - stroke-width: ${e.strokeWidth||1}px; -} -.node polygon { - fill: ${e.mainBkg}; - stroke: ${e.stateBorder||e.nodeBorder};; - stroke-width: ${e.strokeWidth||1}px; -} -[id$="-barbEnd"] { - fill: ${e.lineColor}; -} - -.statediagram-cluster rect { - fill: ${e.compositeTitleBackground}; - stroke: ${e.stateBorder||e.nodeBorder}; - stroke-width: ${e.strokeWidth||1}px; -} - -.cluster-label, .nodeLabel { - color: ${e.stateLabelColor}; - // line-height: 1; -} - -.statediagram-cluster rect.outer { - rx: 5px; - ry: 5px; -} -.statediagram-state .divider { - stroke: ${e.stateBorder||e.nodeBorder}; -} - -.statediagram-state .title-state { - rx: 5px; - ry: 5px; -} -.statediagram-cluster.statediagram-cluster .inner { - fill: ${e.compositeBackground||e.background}; -} -.statediagram-cluster.statediagram-cluster-alt .inner { - fill: ${e.altBackground?e.altBackground:`#efefef`}; -} - -.statediagram-cluster .inner { - rx:0; - ry:0; -} - -.statediagram-state rect.basic { - rx: 5px; - ry: 5px; -} -.statediagram-state rect.divider { - stroke-dasharray: 10,10; - fill: ${e.altBackground?e.altBackground:`#efefef`}; -} - -.note-edge { - stroke-dasharray: 5; -} - -.statediagram-note rect { - fill: ${e.noteBkgColor}; - stroke: ${e.noteBorderColor}; - stroke-width: 1px; - rx: 0; - ry: 0; -} -.statediagram-note rect { - fill: ${e.noteBkgColor}; - stroke: ${e.noteBorderColor}; - stroke-width: 1px; - rx: 0; - ry: 0; -} - -.statediagram-note text { - fill: ${e.noteTextColor}; -} - -.statediagram-note .nodeLabel { - color: ${e.noteTextColor}; -} -.statediagram .edgeLabel { - color: red; // ${e.noteTextColor}; -} - -[id$="-dependencyStart"], [id$="-dependencyEnd"] { - fill: ${e.lineColor}; - stroke: ${e.lineColor}; - stroke-width: ${e.strokeWidth||1}; -} - -.statediagramTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.textColor}; -} - -[data-look="neo"].statediagram-cluster rect { - fill: ${e.mainBkg}; - stroke: ${e.useGradient?`url(`+e.svgId+`-gradient)`:e.stateBorder||e.nodeBorder}; - stroke-width: ${e.strokeWidth??1}; -} -[data-look="neo"].statediagram-cluster rect.outer { - rx: ${e.radius}px; - ry: ${e.radius}px; - filter: ${e.dropShadow?e.dropShadow.replace(`url(#drop-shadow)`,`url(${e.svgId}-drop-shadow)`):`none`} -} -`,`getStyles`);export{Se as i,b as n,me as r,xe as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-FWX5IMBZ-ComLEIwh.js b/dist-desktop/assets/chunk-FWX5IMBZ-ComLEIwh.js deleted file mode 100644 index b405a8c..0000000 --- a/dist-desktop/assets/chunk-FWX5IMBZ-ComLEIwh.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-VKFMJZFB-Cv2q18CS.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-UMNXGZaF.js","assets/rolldown-runtime-aKtaBQYM.js","assets/chunk-WYO6CB5R-Dv5kDyQC.js","assets/index-CXgd9jpl.js","assets/react-BLJmJXjR.js","assets/utils-BTuSbA5p.js","assets/chunk-ICXQ74PX-Czpgj8Uw.js","assets/dist-qx0Iv9vM.js","assets/chunk-HOUHSVGY-iJuv90UH.js","assets/chunk-Q4XR5HBZ-CQ8zkLYc.js","assets/chunk-7BUUIJ7U-Bb538aSH.js","assets/chunk-OGEWGWER-D-nWYRNR.js","assets/graphlib-DS17s2tU.js","assets/dagre-dpRSp0QF.js","assets/map-BaFkSB1l.js","assets/chunk-RYQCIY6F-Dtr3kkSR.js","assets/chunk-C7G6YPKG-DW-1jWUA.js","assets/chunk-ZGVPDNZ5-DGInJAPD.js","assets/rough.esm-CSKSodPl.js","assets/chunk-52WLFC77-BOCvVCX1.js","assets/line-b9Ala942.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/swimlanes-5IMT3BWC-hyAz1L8O.js","assets/cose-bilkent-JH36ORCC-ClqQrHIF.js","assets/cytoscape.esm-CQFVGiJu.js"])))=>i.map(i=>d[i]); -import{t as e}from"./index-CXgd9jpl.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-UMNXGZaF.js";import{b as r,s as i}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{d as a}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{a as o,i as s,s as c}from"./chunk-ZGVPDNZ5-DGInJAPD.js";import{a as l,i as u,o as d,r as f}from"./chunk-52WLFC77-BOCvVCX1.js";var p={common:i,getConfig:r,insertCluster:s,insertEdge:f,insertEdgeLabel:u,insertMarkers:l,insertNode:o,interpolateToCurve:a,labelHelper:c,log:n,positionEdgeLabel:d},m={},h=t(e=>{for(let t of e)m[t.name]=t},`registerLayoutLoaders`);t(()=>{h([{name:`dagre`,loader:t(async()=>await e(()=>import(`./dagre-VKFMJZFB-Cv2q18CS.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24])),`loader`)},{name:`swimlane`,loader:t(async()=>await e(()=>import(`./swimlanes-5IMT3BWC-hyAz1L8O.js`),__vite__mapDeps([25,5,3,6,7,1,2,4,8,9,10,11,12,13,14,17,16,18,19,20,21,22,23,24])),`loader`)},{name:`cose-bilkent`,loader:t(async()=>await e(()=>import(`./cose-bilkent-JH36ORCC-ClqQrHIF.js`),__vite__mapDeps([26,3,1,2,27])),`loader`)}])},`registerDefaultLayoutLoaders`)();var g=t(async(e,t,n)=>{if(!(e.layoutAlgorithm in m))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let r=m[e.layoutAlgorithm],i=await r.loader(),{theme:a,themeVariables:o}=e.config,{useGradient:s,gradientStart:c,gradientStop:l}=o,u=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${u}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${a?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${u}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${a?.includes(`dark`)?`#FFFFFF`:`#000000`}`),s){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,c).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,l).attr(`stop-opacity`,1)}return i.render(e,t,p,{algorithm:r.algorithm},n)},`render`),_=t((e=``,{fallback:t=`dagre`}={})=>{if(e in m)return e;if(t in m)return n.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`);export{h as n,g as r,_ as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-HOUHSVGY-iJuv90UH.js b/dist-desktop/assets/chunk-HOUHSVGY-iJuv90UH.js deleted file mode 100644 index e168d2b..0000000 --- a/dist-desktop/assets/chunk-HOUHSVGY-iJuv90UH.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-UMNXGZaF.js";import{b as n,z as r}from"./chunk-WYO6CB5R-Dv5kDyQC.js";var i=Object.freeze({left:0,top:0,width:16,height:16}),a=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),o=Object.freeze({...i,...a}),s=Object.freeze({...o,body:``,hidden:!1}),c=Object.freeze({width:null,height:null}),l=Object.freeze({...c,...a}),u=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!d(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!d(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!d(e,n)?null:e}return null},d=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function f(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function p(e,t){let n=f(e,t);for(let r in s)r in a?r in e&&!(r in n)&&(n[r]=a[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function m(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function h(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=p(r[e]||i[e],a)}return o(t),n.forEach(o),p(e,a)}function g(e,t){if(e.icons[t])return h(e,t,[]);let n=m(e,[t])[t];return n?h(e,t,n):null}var _=/(-?[0-9.]*[0-9]+[0-9.]*)/g,v=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(_);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=v.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function b(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(``,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function x(e,t){return e?``+e+``+t:t}function S(e,t,n){let r=b(e);return x(r.defs,t+r.content+n)}var C=e=>e===`unset`||e===`undefined`||e===`none`;function w(e,t){let n={...o,...e},r={...l,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=S(a,``,``))});let s=r.width,c=r.height,u=i.width,d=i.height,f,p;s===null?(p=c===null?`1em`:c===`auto`?d:c,f=y(p,u/d)):(f=s===`auto`?u:s,p=c===null?y(f,d/u):c===`auto`?d:c);let m={},h=(e,t)=>{C(t)||(m[e]=t.toString())};h(`width`,f),h(`height`,p);let g=[i.left,i.top,u,d];return m.viewBox=g.join(` `),{attributes:m,viewBox:g,body:a}}var T=/\sid="(\S+)"/g,E=new Map;function D(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=E.get(e)||0;return E.set(e,t+1),t?`${e}${t}`:e}function O(e){let t=[],n;for(;n=T.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=D(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function k(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return``+e+``}var A={body:`?`,height:80,width:80},j=new Map,M=new Map,N=e(e=>{for(let n of e){if(!n.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(t.debug(`Registering icon pack:`,n.name),`loader`in n)M.set(n.name,n.loader);else if(`icons`in n)j.set(n.name,n.icons);else throw t.error(`Invalid icon loader:`,n),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),P=e(async(e,n)=>{let r=u(e,!0,n!==void 0);if(!r)throw Error(`Invalid icon name: ${e}`);let i=r.prefix||n;if(!i)throw Error(`Icon name must contain a prefix: ${e}`);let a=j.get(i);if(!a){let e=M.get(i);if(!e)throw Error(`Icon set not found: ${r.prefix}`);try{a={...await e(),prefix:i},j.set(i,a)}catch(e){throw t.error(e),Error(`Failed to load icon set: ${r.prefix}`)}}let o=g(a,r.name);if(!o)throw Error(`Icon not found: ${e}`);return o},`getRegisteredIconData`),F=e(async e=>{try{return await P(e),!0}catch{return!1}},`isIconAvailable`),I=e(async(e,i,a)=>{let o;try{o=await P(e,i?.fallbackPrefix)}catch(e){t.error(e),o=A}let s=w(o,i);return r(k(O(s.body),{...s.attributes,...a}),n())},`getIconSVG`);export{A as i,F as n,N as r,I as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-ICXQ74PX-Czpgj8Uw.js b/dist-desktop/assets/chunk-ICXQ74PX-Czpgj8Uw.js deleted file mode 100644 index 7f15439..0000000 --- a/dist-desktop/assets/chunk-ICXQ74PX-Czpgj8Uw.js +++ /dev/null @@ -1,2 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-UMNXGZaF.js";import{R as r,h as i,p as a,r as o,s}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as c}from"./dist-qx0Iv9vM.js";function l(e){this._context=e}l.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function u(e){return new l(e)}var d=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function f(e){return new d(e,!0)}function ee(e){return new d(e,!1)}function p(){}function m(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function h(e){this._context=e}h.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:m(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function te(e){return new h(e)}function ne(e){this._context=e}ne.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function re(e){return new ne(e)}function ie(e){this._context=e}ie.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:m(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ae(e){return new ie(e)}function oe(e,t){this._basis=new h(e),this._beta=t}oe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var se=(function e(t){function n(e){return t===1?new h(e):new oe(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function g(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function _(e,t){this._context=e,this._k=(1-t)/6}_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:g(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ce=(function e(t){function n(e){return new _(e,t)}return n.tension=function(t){return e(+t)},n})(0);function v(e,t){this._context=e,this._k=(1-t)/6}v.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var le=(function e(t){function n(e){return new v(e,t)}return n.tension=function(t){return e(+t)},n})(0);function y(e,t){this._context=e,this._k=(1-t)/6}y.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:g(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ue=(function e(t){function n(e){return new y(e,t)}return n.tension=function(t){return e(+t)},n})(0);function b(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function de(e,t){this._context=e,this._alpha=t}de.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var fe=(function e(t){function n(e){return t?new de(e,t):new _(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function pe(e,t){this._context=e,this._alpha=t}pe.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var me=(function e(t){function n(e){return t?new pe(e,t):new v(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function he(e,t){this._context=e,this._alpha=t}he.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:b(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ge=(function e(t){function n(e){return t?new he(e,t):new y(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function _e(e){this._context=e}_e.prototype={areaStart:p,areaEnd:p,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function ve(e){return new _e(e)}function ye(e){return e<0?-1:1}function be(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(ye(a)+ye(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function xe(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function x(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function S(e){this._context=e}S.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:x(this,this._t0,xe(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,x(this,xe(this,n=be(this,e,t)),n);break;default:x(this,this._t0,n=be(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Se(e){this._context=new Ce(e)}(Se.prototype=Object.create(S.prototype)).point=function(e,t){S.prototype.point.call(this,t,e)};function Ce(e){this._context=e}Ce.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function we(e){return new S(e)}function Te(e){return new Se(e)}function Ee(e){this._context=e}Ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=De(e),i=De(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function w(e){return new C(e,.5)}function T(e){return new C(e,0)}function ke(e){return new C(e,1)}function E(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ae(){}function je(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function D(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Me=`[object RegExp]`,O=`[object String]`,k=`[object Number]`,A=`[object Boolean]`,j=`[object Arguments]`,Ne=`[object Symbol]`,Pe=`[object Date]`,Fe=`[object Map]`,Ie=`[object Set]`,Le=`[object Array]`,Re=`[object ArrayBuffer]`,ze=`[object Object]`,M=`[object DataView]`,Be=`[object Uint8Array]`,Ve=`[object Uint8ClampedArray]`,He=`[object Uint16Array]`,Ue=`[object Uint32Array]`,We=`[object Int8Array]`,Ge=`[object Int16Array]`,Ke=`[object Int32Array]`,qe=`[object Float32Array]`,Je=`[object Float64Array]`,Ye=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})();function N(e){return Ye.Buffer!==void 0&&Ye.Buffer.isBuffer(e)}function Xe(e){return Number.isSafeInteger(e)&&e>=0}function Ze(e){return e!=null&&typeof e!=`function`&&Xe(e.length)}function Qe(e){return e===`__proto__`}function P(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function F(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function $e(e,t){return I(e,void 0,e,new Map,t)}function I(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(P(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(D(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),L(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case k:case O:case A:{let t=new e.constructor(e?.valueOf());return L(t,e),t}case j:{let t={};return L(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function nt(e){return tt(e)}function R(e){return typeof e==`object`&&!!e&&D(e)===`[object Arguments]`}function z(e){return typeof e==`object`&&!!e}function rt(e){return z(e)&&Ze(e)}function B(e){return F(e)}function V(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(V.Cache||Map),n}V.Cache=Map;function it(e){if(P(e))return e;if(Array.isArray(e)||F(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function at(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;ee.args);r(e),i=o(i,[...e])}else i=n.args;if(!i)return;let s=a(e,t),c=`config`;return i[c]!==void 0&&(s===`flowchart-v2`&&(s=`flowchart`),i[s]=i[c],delete i[c]),i},`detectInit`),dt=e(function(e,n=null){try{let r=RegExp(`[%]{2}(?![{]${lt.source})(?=[}][%]{2}).* -`,`ig`);e=e.trim().replace(r,``).replace(/'/gm,`"`),t.debug(`Detecting diagram directive${n===null?``:` type:`+n} based on the text:${e}`);let a,o=[];for(;(a=i.exec(e))!==null;)if(a.index===i.lastIndex&&i.lastIndex++,a&&!n||n&&a[1]?.match(n)||n&&a[2]?.match(n)){let e=a[1]?a[1]:a[2],t=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:e,args:t})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(r){return t.error(`ERROR: ${r.message} - Unable to parse directive type: '${n}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),ft=e(function(e){return e.replace(i,``)},`removeDirectives`),pt=e(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function U(e,t){return e?ct[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}e(U,`interpolateToCurve`);function mt(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,st.sanitizeUrl)(n)}e(mt,`formatUrl`);var ht=e((e,...n)=>{let r=e.split(`.`),i=r.length-1,a=r[i],o=window;for(let n=0;n{n+=W(e,t),t=e}),G(e,n/2)}e(gt,`traverseEdge`);function _t(e){return e.length===1?e[0]:gt(e)}e(_t,`calcLabelPosition`);var vt=e((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),G=e((e,t)=>{let n,r=t;for(let t of e){if(n){let e=W(t,n);if(e===0)return n;if(e=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:vt((1-i)*n.x+i*t.x,5),y:vt((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),yt=e((e,n,r)=>{t.info(`our points ${JSON.stringify(n)}`),n[0]!==r&&(n=n.reverse());let i=G(n,25),a=e?10:5,o=Math.atan2(n[0].y-i.y,n[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(o)*a+(n[0].x+i.x)/2,s.y=-Math.cos(o)*a+(n[0].y+i.y)/2,s},`calcCardinalityPosition`);function bt(e,n,r){let i=structuredClone(r);t.info(`our points`,i),n!==`start_left`&&n!==`start_right`&&i.reverse();let a=G(i,25+e),o=10+e*.5,s=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return n===`start_left`?(c.x=Math.sin(s+Math.PI)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s+Math.PI)*o+(i[0].y+a.y)/2):n===`end_right`?(c.x=Math.sin(s-Math.PI)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s-Math.PI)*o+(i[0].y+a.y)/2-5):n===`end_left`?(c.x=Math.sin(s)*o+(i[0].x+a.x)/2-5,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2-5):(c.x=Math.sin(s)*o+(i[0].x+a.x)/2,c.y=-Math.cos(s)*o+(i[0].y+a.y)/2),c}e(bt,`calcTerminalLabelPosition`);function K(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}e(K,`getStylesFromArray`);var xt=0,St=e(()=>(xt++,`id-`+Math.random().toString(36).substr(2,12)+`-`+xt),`generateId`);function Ct(e){let t=``;for(let n=0;nCt(e.length),`random`),Tt=e(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),Et=e(function(e,t){let n=t.text.replace(s.lineBreakRegex,` `),[,r]=Z(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),Dt=V((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`
`},n),s.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=J(`${e} `,n),c=J(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=Ot(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),Ot=V((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(J(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function q(e,t){return Y(e,t).height}e(q,`calculateTextHeight`);function J(e,t){return Y(e,t).width}e(J,`calculateTextWidth`);var Y=V((e,t)=>{let{fontSize:r=12,fontFamily:i=`Arial`,fontWeight:a=400}=t;if(!e)return{width:0,height:0};let[,o]=Z(r),c=[`sans-serif`,i],l=e.split(s.lineBreakRegex),u=[],d=n(`body`);if(!d.remove)return{width:0,height:0,lineHeight:0};let f=d.append(`svg`);for(let e of c){let t=0,n={width:0,height:0,lineHeight:0};for(let r of l){let i=Tt();i.text=r||`​`;let s=Et(f,i).style(`font-size`,o).style(`font-weight`,a).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}u.push(n)}return f.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),kt=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{e(this,`InitIDGenerator`)}},X,At=e(function(e){return X||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),X.innerHTML=e,unescape(X.textContent)},`entityDecode`);function jt(e){return`str`in e}e(jt,`isDetailedError`);var Mt=e((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Z=e(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function Q(e,t){return ot({},e,t)}e(Q,`cleanAndMerge`);var Nt={assignWithDepth:o,wrapLabel:Dt,calculateTextHeight:q,calculateTextWidth:J,calculateTextDimensions:Y,cleanAndMerge:Q,detectInit:ut,detectDirective:dt,isSubstringInArray:pt,interpolateToCurve:U,calcLabelPosition:_t,calcCardinalityPosition:yt,calcTerminalLabelPosition:bt,formatUrl:mt,getStylesFromArray:K,generateId:St,random:wt,runFunc:ht,entityDecode:At,insertTitle:Mt,isLabelCoordinateInPath:$,parseFontSize:Z,InitIDGenerator:kt},Pt=e(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),Ft=e(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),It=e((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function Lt(e){return e??null}e(Lt,`handleUndefinedAttr`);function $(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}e($,`isLabelCoordinateInPath`);export{ce as $,Je as A,Ne as B,j as C,M as D,A as E,k as F,D as G,Ue as H,ze as I,w as J,ke as K,Me as L,Ke as M,We as N,Pe as O,Fe as P,fe as Q,Ie as R,N as S,Le as T,Be as U,He as V,Ve as W,we as X,Oe as Y,Te as Z,Dt as _,Ft as a,P as b,It as c,U as d,te as et,jt as f,Nt as g,ft as h,Q as i,Ge as j,qe as k,K as l,wt as m,q as n,ee as nt,Pt as o,Z as p,T as q,J as r,u as rt,St as s,Y as t,f as tt,Lt as u,B as v,Re as w,Ze as x,R as y,O as z}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-JG7HCLWE-Dk4_aECj.js b/dist-desktop/assets/chunk-JG7HCLWE-Dk4_aECj.js deleted file mode 100644 index 60bc5ca..0000000 --- a/dist-desktop/assets/chunk-JG7HCLWE-Dk4_aECj.js +++ /dev/null @@ -1,2 +0,0 @@ -import{C as e,S as t,_ as n,n as r,o as i,t as a,u as o,w as s,x as c}from"./chunk-KEIR6QF5-Dj-OpFgW.js";var l=class extends a{static{c(this,`RailroadPegTokenBuilder`)}constructor(){super([`railroad-peg-beta`])}},u=c(e=>{let t=e.slice(1,-1),n=``;for(let e=0;enew l,`TokenBuilder`),ValueConverter:c(()=>new d,`ValueConverter`)}};function p(r=i){let a=s(e(r),o),c=s(t({shared:a}),n,f);return a.ServiceRegistry.register(c),{shared:a,RailroadPeg:c}}c(p,`createRailroadPegServices`);export{p as n,f as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-JWPE2WC7-DVXcaiue.js b/dist-desktop/assets/chunk-JWPE2WC7-DVXcaiue.js deleted file mode 100644 index 89f16f4..0000000 --- a/dist-desktop/assets/chunk-JWPE2WC7-DVXcaiue.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";function t(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}e(t,`populateCommonDb`);export{t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-KEIR6QF5-Dj-OpFgW.js b/dist-desktop/assets/chunk-KEIR6QF5-Dj-OpFgW.js deleted file mode 100644 index 8e32672..0000000 --- a/dist-desktop/assets/chunk-KEIR6QF5-Dj-OpFgW.js +++ /dev/null @@ -1,161 +0,0 @@ -var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,n)=>t(e,`name`,{value:n,configurable:!0}),s=(e,t)=>function(){return e&&(t=(0,e[r(e)[0]])(e=0)),t},c=(e,t)=>function(){return t||(0,e[r(e)[0]])((t={exports:{}}).exports,t),t.exports},l=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},u=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(let c of r(i))!a.call(e,c)&&c!==o&&t(e,c,{get:()=>i[c],enumerable:!(s=n(i,c))||s.enumerable});return e},d=(e,t,n)=>(u(e,t,`default`),n&&u(n,t,`default`)),f=(n,r,a)=>(a=n==null?{}:e(i(n)),u(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),p=e=>u(t({},`__esModule`,{value:!0}),e),m={};l(m,{AnnotatedTextEdit:()=>T,ChangeAnnotation:()=>de,ChangeAnnotationIdentifier:()=>w,CodeAction:()=>We,CodeActionContext:()=>Ue,CodeActionKind:()=>Ve,CodeActionTriggerKind:()=>He,CodeDescription:()=>se,CodeLens:()=>Ge,Color:()=>S,ColorInformation:()=>te,ColorPresentation:()=>ne,Command:()=>le,CompletionItem:()=>Oe,CompletionItemKind:()=>Se,CompletionItemLabelDetails:()=>De,CompletionItemTag:()=>we,CompletionList:()=>ke,CreateFile:()=>D,DeleteFile:()=>fe,Diagnostic:()=>ce,DiagnosticRelatedInformation:()=>ie,DiagnosticSeverity:()=>ae,DiagnosticTag:()=>oe,DocumentHighlight:()=>Fe,DocumentHighlightKind:()=>Pe,DocumentLink:()=>qe,DocumentSymbol:()=>Be,DocumentUri:()=>h,EOL:()=>ft,FoldingRange:()=>re,FoldingRangeKind:()=>C,FormattingOptions:()=>Ke,Hover:()=>je,InlayHint:()=>it,InlayHintKind:()=>nt,InlayHintLabelPart:()=>rt,InlineCompletionContext:()=>ut,InlineCompletionItem:()=>ot,InlineCompletionList:()=>st,InlineCompletionTriggerKind:()=>ct,InlineValueContext:()=>tt,InlineValueEvaluatableExpression:()=>et,InlineValueText:()=>Qe,InlineValueVariableLookup:()=>$e,InsertReplaceEdit:()=>Te,InsertTextFormat:()=>Ce,InsertTextMode:()=>Ee,Location:()=>x,LocationLink:()=>ee,MarkedString:()=>Ae,MarkupContent:()=>xe,MarkupKind:()=>be,OptionalVersionedTextDocumentIdentifier:()=>ve,ParameterInformation:()=>Me,Position:()=>y,Range:()=>b,RenameFile:()=>O,SelectedCompletionInfo:()=>lt,SelectionRange:()=>Je,SemanticTokenModifiers:()=>Xe,SemanticTokenTypes:()=>Ye,SemanticTokens:()=>Ze,SignatureInformation:()=>Ne,StringValue:()=>at,SymbolInformation:()=>Re,SymbolKind:()=>Ie,SymbolTag:()=>Le,TextDocument:()=>pt,TextDocumentEdit:()=>E,TextDocumentIdentifier:()=>ge,TextDocumentItem:()=>ye,TextEdit:()=>ue,URI:()=>g,VersionedTextDocumentIdentifier:()=>_e,WorkspaceChange:()=>he,WorkspaceEdit:()=>k,WorkspaceFolder:()=>dt,WorkspaceSymbol:()=>ze,integer:()=>_,uinteger:()=>v});var h,g,_,v,y,b,x,ee,S,te,ne,C,re,ie,ae,oe,se,ce,le,ue,de,w,T,E,D,O,fe,k,pe,me,he,ge,_e,ve,ye,be,xe,Se,Ce,we,Te,Ee,De,Oe,ke,Ae,je,Me,Ne,Pe,Fe,Ie,Le,Re,ze,Be,Ve,He,Ue,We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,A,ht=s({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){(function(e){function t(e){return typeof e==`string`}o(t,`is`),e.is=t})(h||={}),(function(e){function t(e){return typeof e==`string`}o(t,`is`),e.is=t})(g||={}),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}o(t,`is`),e.is=t})(_||={}),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}o(t,`is`),e.is=t})(v||={}),(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=v.MAX_VALUE),t===Number.MAX_VALUE&&(t=v.MAX_VALUE),{line:e,character:t}}o(t,`create`),e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&A.uinteger(t.line)&&A.uinteger(t.character)}o(n,`is`),e.is=n})(y||={}),(function(e){function t(e,t,n,r){if(A.uinteger(e)&&A.uinteger(t)&&A.uinteger(n)&&A.uinteger(r))return{start:y.create(e,t),end:y.create(n,r)};if(y.is(e)&&y.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}o(t,`create`),e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&y.is(t.start)&&y.is(t.end)}o(n,`is`),e.is=n})(b||={}),(function(e){function t(e,t){return{uri:e,range:t}}o(t,`create`),e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&b.is(t.range)&&(A.string(t.uri)||A.undefined(t.uri))}o(n,`is`),e.is=n})(x||={}),(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}o(t,`create`),e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&b.is(t.targetRange)&&A.string(t.targetUri)&&b.is(t.targetSelectionRange)&&(b.is(t.originSelectionRange)||A.undefined(t.originSelectionRange))}o(n,`is`),e.is=n})(ee||={}),(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}o(t,`create`),e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&A.numberRange(t.red,0,1)&&A.numberRange(t.green,0,1)&&A.numberRange(t.blue,0,1)&&A.numberRange(t.alpha,0,1)}o(n,`is`),e.is=n})(S||={}),(function(e){function t(e,t){return{range:e,color:t}}o(t,`create`),e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&b.is(t.range)&&S.is(t.color)}o(n,`is`),e.is=n})(te||={}),(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}o(t,`create`),e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&A.string(t.label)&&(A.undefined(t.textEdit)||ue.is(t))&&(A.undefined(t.additionalTextEdits)||A.typedArray(t.additionalTextEdits,ue.is))}o(n,`is`),e.is=n})(ne||={}),(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(C||={}),(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return A.defined(n)&&(o.startCharacter=n),A.defined(r)&&(o.endCharacter=r),A.defined(i)&&(o.kind=i),A.defined(a)&&(o.collapsedText=a),o}o(t,`create`),e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&A.uinteger(t.startLine)&&A.uinteger(t.startLine)&&(A.undefined(t.startCharacter)||A.uinteger(t.startCharacter))&&(A.undefined(t.endCharacter)||A.uinteger(t.endCharacter))&&(A.undefined(t.kind)||A.string(t.kind))}o(n,`is`),e.is=n})(re||={}),(function(e){function t(e,t){return{location:e,message:t}}o(t,`create`),e.create=t;function n(e){let t=e;return A.defined(t)&&x.is(t.location)&&A.string(t.message)}o(n,`is`),e.is=n})(ie||={}),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ae||={}),(function(e){e.Unnecessary=1,e.Deprecated=2})(oe||={}),(function(e){function t(e){let t=e;return A.objectLiteral(t)&&A.string(t.href)}o(t,`is`),e.is=t})(se||={}),(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return A.defined(n)&&(o.severity=n),A.defined(r)&&(o.code=r),A.defined(i)&&(o.source=i),A.defined(a)&&(o.relatedInformation=a),o}o(t,`create`),e.create=t;function n(e){let t=e;return A.defined(t)&&b.is(t.range)&&A.string(t.message)&&(A.number(t.severity)||A.undefined(t.severity))&&(A.integer(t.code)||A.string(t.code)||A.undefined(t.code))&&(A.undefined(t.codeDescription)||A.string(t.codeDescription?.href))&&(A.string(t.source)||A.undefined(t.source))&&(A.undefined(t.relatedInformation)||A.typedArray(t.relatedInformation,ie.is))}o(n,`is`),e.is=n})(ce||={}),(function(e){function t(e,t,...n){let r={title:e,command:t};return A.defined(n)&&n.length>0&&(r.arguments=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return A.defined(t)&&A.string(t.title)&&A.string(t.command)}o(n,`is`),e.is=n})(le||={}),(function(e){function t(e,t){return{range:e,newText:t}}o(t,`replace`),e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}o(n,`insert`),e.insert=n;function r(e){return{range:e,newText:``}}o(r,`del`),e.del=r;function i(e){let t=e;return A.objectLiteral(t)&&A.string(t.newText)&&b.is(t.range)}o(i,`is`),e.is=i})(ue||={}),(function(e){function t(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&A.string(t.label)&&(A.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(A.string(t.description)||t.description===void 0)}o(n,`is`),e.is=n})(de||={}),(function(e){function t(e){let t=e;return A.string(t)}o(t,`is`),e.is=t})(w||={}),(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}o(t,`replace`),e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}o(n,`insert`),e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}o(r,`del`),e.del=r;function i(e){let t=e;return ue.is(t)&&(de.is(t.annotationId)||w.is(t.annotationId))}o(i,`is`),e.is=i})(T||={}),(function(e){function t(e,t){return{textDocument:e,edits:t}}o(t,`create`),e.create=t;function n(e){let t=e;return A.defined(t)&&ve.is(t.textDocument)&&Array.isArray(t.edits)}o(n,`is`),e.is=n})(E||={}),(function(e){function t(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&A.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||A.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||A.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||w.is(t.annotationId))}o(n,`is`),e.is=n})(D||={}),(function(e){function t(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}o(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&A.string(t.oldUri)&&A.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||A.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||A.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||w.is(t.annotationId))}o(n,`is`),e.is=n})(O||={}),(function(e){function t(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&A.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||A.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||A.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||w.is(t.annotationId))}o(n,`is`),e.is=n})(fe||={}),(function(e){function t(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>A.string(e.kind)?D.is(e)||O.is(e)||fe.is(e):E.is(e)))}o(t,`is`),e.is=t})(k||={}),pe=class{static{o(this,`TextEditChangeImpl`)}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,i;if(n===void 0?r=ue.insert(e,t):w.is(n)?(i=n,r=T.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=T.insert(e,t,i)),this.edits.push(r),i!==void 0)return i}replace(e,t,n){let r,i;if(n===void 0?r=ue.replace(e,t):w.is(n)?(i=n,r=T.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=T.replace(e,t,i)),this.edits.push(r),i!==void 0)return i}delete(e,t){let n,r;if(t===void 0?n=ue.del(e):w.is(t)?(r=t,n=T.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=T.del(e,r)),this.edits.push(n),r!==void 0)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw Error(`Text edit change is not configured to manage change annotations.`)}},me=class{static{o(this,`ChangeAnnotations`)}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(w.is(e)?n=e:(n=this.nextId(),t=e),this._annotations[n]!==void 0)throw Error(`Id ${n} is already in use.`);if(t===void 0)throw Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}},he=class{static{o(this,`WorkspaceChange`)}constructor(e){this._textEditChanges=Object.create(null),e===void 0?this._workspaceEdit={}:(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new me(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(E.is(e)){let t=new pe(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{let n=new pe(e.changes[t]);this._textEditChanges[t]=n}))}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(ve.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let t={uri:e.uri,version:e.version},n=this._textEditChanges[t.uri];if(!n){let e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new pe(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw Error(`Workspace edit is not configured for normal text edit changes.`);let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new pe(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new me,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;de.is(t)||w.is(t)?r=t:n=t;let i,a;if(r===void 0?i=D.create(e,n):(a=w.is(r)?r:this._changeAnnotations.manage(r),i=D.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}renameFile(e,t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let i;de.is(n)||w.is(n)?i=n:r=n;let a,o;if(i===void 0?a=O.create(e,t,r):(o=w.is(i)?i:this._changeAnnotations.manage(i),a=O.create(e,t,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o}deleteFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;de.is(t)||w.is(t)?r=t:n=t;let i,a;if(r===void 0?i=fe.create(e,n):(a=w.is(r)?r:this._changeAnnotations.manage(r),i=fe.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}},(function(e){function t(e){return{uri:e}}o(t,`create`),e.create=t;function n(e){let t=e;return A.defined(t)&&A.string(t.uri)}o(n,`is`),e.is=n})(ge||={}),(function(e){function t(e,t){return{uri:e,version:t}}o(t,`create`),e.create=t;function n(e){let t=e;return A.defined(t)&&A.string(t.uri)&&A.integer(t.version)}o(n,`is`),e.is=n})(_e||={}),(function(e){function t(e,t){return{uri:e,version:t}}o(t,`create`),e.create=t;function n(e){let t=e;return A.defined(t)&&A.string(t.uri)&&(t.version===null||A.integer(t.version))}o(n,`is`),e.is=n})(ve||={}),(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}o(t,`create`),e.create=t;function n(e){let t=e;return A.defined(t)&&A.string(t.uri)&&A.string(t.languageId)&&A.integer(t.version)&&A.string(t.text)}o(n,`is`),e.is=n})(ye||={}),(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}o(t,`is`),e.is=t})(be||={}),(function(e){function t(e){let t=e;return A.objectLiteral(e)&&be.is(t.kind)&&A.string(t.value)}o(t,`is`),e.is=t})(xe||={}),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(Se||={}),(function(e){e.PlainText=1,e.Snippet=2})(Ce||={}),(function(e){e.Deprecated=1})(we||={}),(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}o(t,`create`),e.create=t;function n(e){let t=e;return t&&A.string(t.newText)&&b.is(t.insert)&&b.is(t.replace)}o(n,`is`),e.is=n})(Te||={}),(function(e){e.asIs=1,e.adjustIndentation=2})(Ee||={}),(function(e){function t(e){let t=e;return t&&(A.string(t.detail)||t.detail===void 0)&&(A.string(t.description)||t.description===void 0)}o(t,`is`),e.is=t})(De||={}),(function(e){function t(e){return{label:e}}o(t,`create`),e.create=t})(Oe||={}),(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}o(t,`create`),e.create=t})(ke||={}),(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}o(t,`fromPlainText`),e.fromPlainText=t;function n(e){let t=e;return A.string(t)||A.objectLiteral(t)&&A.string(t.language)&&A.string(t.value)}o(n,`is`),e.is=n})(Ae||={}),(function(e){function t(e){let t=e;return!!t&&A.objectLiteral(t)&&(xe.is(t.contents)||Ae.is(t.contents)||A.typedArray(t.contents,Ae.is))&&(e.range===void 0||b.is(e.range))}o(t,`is`),e.is=t})(je||={}),(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}o(t,`create`),e.create=t})(Me||={}),(function(e){function t(e,t,...n){let r={label:e};return A.defined(t)&&(r.documentation=t),A.defined(n)?r.parameters=n:r.parameters=[],r}o(t,`create`),e.create=t})(Ne||={}),(function(e){e.Text=1,e.Read=2,e.Write=3})(Pe||={}),(function(e){function t(e,t){let n={range:e};return A.number(t)&&(n.kind=t),n}o(t,`create`),e.create=t})(Fe||={}),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(Ie||={}),(function(e){e.Deprecated=1})(Le||={}),(function(e){function t(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}o(t,`create`),e.create=t})(Re||={}),(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}o(t,`create`),e.create=t})(ze||={}),(function(e){function t(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}o(t,`create`),e.create=t;function n(e){let t=e;return t&&A.string(t.name)&&A.number(t.kind)&&b.is(t.range)&&b.is(t.selectionRange)&&(t.detail===void 0||A.string(t.detail))&&(t.deprecated===void 0||A.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}o(n,`is`),e.is=n})(Be||={}),(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})(Ve||={}),(function(e){e.Invoked=1,e.Automatic=2})(He||={}),(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return A.defined(t)&&A.typedArray(t.diagnostics,ce.is)&&(t.only===void 0||A.typedArray(t.only,A.string))&&(t.triggerKind===void 0||t.triggerKind===He.Invoked||t.triggerKind===He.Automatic)}o(n,`is`),e.is=n})(Ue||={}),(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):le.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return t&&A.string(t.title)&&(t.diagnostics===void 0||A.typedArray(t.diagnostics,ce.is))&&(t.kind===void 0||A.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||le.is(t.command))&&(t.isPreferred===void 0||A.boolean(t.isPreferred))&&(t.edit===void 0||k.is(t.edit))}o(n,`is`),e.is=n})(We||={}),(function(e){function t(e,t){let n={range:e};return A.defined(t)&&(n.data=t),n}o(t,`create`),e.create=t;function n(e){let t=e;return A.defined(t)&&b.is(t.range)&&(A.undefined(t.command)||le.is(t.command))}o(n,`is`),e.is=n})(Ge||={}),(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}o(t,`create`),e.create=t;function n(e){let t=e;return A.defined(t)&&A.uinteger(t.tabSize)&&A.boolean(t.insertSpaces)}o(n,`is`),e.is=n})(Ke||={}),(function(e){function t(e,t,n){return{range:e,target:t,data:n}}o(t,`create`),e.create=t;function n(e){let t=e;return A.defined(t)&&b.is(t.range)&&(A.undefined(t.target)||A.string(t.target))}o(n,`is`),e.is=n})(qe||={}),(function(e){function t(e,t){return{range:e,parent:t}}o(t,`create`),e.create=t;function n(t){let n=t;return A.objectLiteral(n)&&b.is(n.range)&&(n.parent===void 0||e.is(n.parent))}o(n,`is`),e.is=n})(Je||={}),(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(Ye||={}),(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(Xe||={}),(function(e){function t(e){let t=e;return A.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}o(t,`is`),e.is=t})(Ze||={}),(function(e){function t(e,t){return{range:e,text:t}}o(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&b.is(t.range)&&A.string(t.text)}o(n,`is`),e.is=n})(Qe||={}),(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}o(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&b.is(t.range)&&A.boolean(t.caseSensitiveLookup)&&(A.string(t.variableName)||t.variableName===void 0)}o(n,`is`),e.is=n})($e||={}),(function(e){function t(e,t){return{range:e,expression:t}}o(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&b.is(t.range)&&(A.string(t.expression)||t.expression===void 0)}o(n,`is`),e.is=n})(et||={}),(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}o(t,`create`),e.create=t;function n(e){let t=e;return A.defined(t)&&b.is(e.stoppedLocation)}o(n,`is`),e.is=n})(tt||={}),(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}o(t,`is`),e.is=t})(nt||={}),(function(e){function t(e){return{value:e}}o(t,`create`),e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&(t.tooltip===void 0||A.string(t.tooltip)||xe.is(t.tooltip))&&(t.location===void 0||x.is(t.location))&&(t.command===void 0||le.is(t.command))}o(n,`is`),e.is=n})(rt||={}),(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}o(t,`create`),e.create=t;function n(e){let t=e;return A.objectLiteral(t)&&y.is(t.position)&&(A.string(t.label)||A.typedArray(t.label,rt.is))&&(t.kind===void 0||nt.is(t.kind))&&t.textEdits===void 0||A.typedArray(t.textEdits,ue.is)&&(t.tooltip===void 0||A.string(t.tooltip)||xe.is(t.tooltip))&&(t.paddingLeft===void 0||A.boolean(t.paddingLeft))&&(t.paddingRight===void 0||A.boolean(t.paddingRight))}o(n,`is`),e.is=n})(it||={}),(function(e){function t(e){return{kind:`snippet`,value:e}}o(t,`createSnippet`),e.createSnippet=t})(at||={}),(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}o(t,`create`),e.create=t})(ot||={}),(function(e){function t(e){return{items:e}}o(t,`create`),e.create=t})(st||={}),(function(e){e.Invoked=0,e.Automatic=1})(ct||={}),(function(e){function t(e,t){return{range:e,text:t}}o(t,`create`),e.create=t})(lt||={}),(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}o(t,`create`),e.create=t})(ut||={}),(function(e){function t(e){let t=e;return A.objectLiteral(t)&&g.is(t.uri)&&A.string(t.name)}o(t,`is`),e.is=t})(dt||={}),ft=[` -`,`\r -`,`\r`],(function(e){function t(e,t,n,r){return new mt(e,t,n,r)}o(t,`create`),e.create=t;function n(e){let t=e;return!!(A.defined(t)&&A.string(t.uri)&&(A.undefined(t.languageId)||A.string(t.languageId))&&A.uinteger(t.lineCount)&&A.func(t.getText)&&A.func(t.positionAt)&&A.func(t.offsetAt))}o(n,`is`),e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}o(r,`applyEdits`),e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,c=0;for(;o0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return y.create(0,e);for(;ne?r=i:n=i+1}let i=n-1;return y.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1n(e))}o(c,`stringArray`),e.stringArray=c}}),vt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var t=gt(),n;(function(e){let t={dispose(){}};e.None=function(){return t}})(n||(e.Event=n={}));var r=class{static{o(this,`CallbackList`)}add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:o(()=>this.remove(e,t),`dispose`)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r{this._callbacks||=new r,this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let a={dispose:o(()=>{this._callbacks&&(this._callbacks.remove(t,n),a.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},`dispose`)};return Array.isArray(i)&&i.push(a),a},this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&=(this._callbacks.dispose(),void 0)}};e.Emitter=i,i._noop=function(){}}}),yt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t=gt(),n=_t(),r=vt(),i;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:r.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r.Event.None});function t(t){let r=t;return r&&(r===e.None||r===e.Cancelled||n.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}o(t,`is`),e.is=t})(i||(e.CancellationToken=i={}));var a=Object.freeze(function(e,n){let r=(0,t.default)().timer.setTimeout(e.bind(n),0);return{dispose(){r.dispose()}}}),s=class{static{o(this,`MutableToken`)}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||=new r.Emitter,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),void 0)}};e.CancellationTokenSource=class{static{o(this,`CancellationTokenSource`)}get token(){return this._token||=new s,this._token}cancel(){this._token?this._token.cancel():this._token=i.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=i.None}}}}),bt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var t=_t(),n;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(n||(e.ErrorCodes=n={})),e.ResponseError=class e extends Error{static{o(this,`ResponseError`)}constructor(r,i,a){super(i),this.code=t.number(r)?r:n.UnknownErrorCode,this.data=a,Object.setPrototypeOf(this,e.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};var r=class e{static{o(this,`ParameterStructures`)}constructor(e){this.kind=e}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};e.ParameterStructures=r,r.auto=new r(`auto`),r.byPosition=new r(`byPosition`),r.byName=new r(`byName`);var i=class{static{o(this,`AbstractMessageSignature`)}constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return r.auto}};e.AbstractMessageSignature=i,e.RequestType0=class extends i{static{o(this,`RequestType0`)}constructor(e){super(e,0)}},e.RequestType=class extends i{static{o(this,`RequestType`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.RequestType1=class extends i{static{o(this,`RequestType1`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.RequestType2=class extends i{static{o(this,`RequestType2`)}constructor(e){super(e,2)}},e.RequestType3=class extends i{static{o(this,`RequestType3`)}constructor(e){super(e,3)}},e.RequestType4=class extends i{static{o(this,`RequestType4`)}constructor(e){super(e,4)}},e.RequestType5=class extends i{static{o(this,`RequestType5`)}constructor(e){super(e,5)}},e.RequestType6=class extends i{static{o(this,`RequestType6`)}constructor(e){super(e,6)}},e.RequestType7=class extends i{static{o(this,`RequestType7`)}constructor(e){super(e,7)}},e.RequestType8=class extends i{static{o(this,`RequestType8`)}constructor(e){super(e,8)}},e.RequestType9=class extends i{static{o(this,`RequestType9`)}constructor(e){super(e,9)}},e.NotificationType=class extends i{static{o(this,`NotificationType`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.NotificationType0=class extends i{static{o(this,`NotificationType0`)}constructor(e){super(e,0)}},e.NotificationType1=class extends i{static{o(this,`NotificationType1`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.NotificationType2=class extends i{static{o(this,`NotificationType2`)}constructor(e){super(e,2)}},e.NotificationType3=class extends i{static{o(this,`NotificationType3`)}constructor(e){super(e,3)}},e.NotificationType4=class extends i{static{o(this,`NotificationType4`)}constructor(e){super(e,4)}},e.NotificationType5=class extends i{static{o(this,`NotificationType5`)}constructor(e){super(e,5)}},e.NotificationType6=class extends i{static{o(this,`NotificationType6`)}constructor(e){super(e,6)}},e.NotificationType7=class extends i{static{o(this,`NotificationType7`)}constructor(e){super(e,7)}},e.NotificationType8=class extends i{static{o(this,`NotificationType8`)}constructor(e){super(e,8)}},e.NotificationType9=class extends i{static{o(this,`NotificationType9`)}constructor(e){super(e,9)}};var a;(function(e){function n(e){let n=e;return n&&t.string(n.method)&&(t.string(n.id)||t.number(n.id))}o(n,`isRequest`),e.isRequest=n;function r(e){let n=e;return n&&t.string(n.method)&&e.id===void 0}o(r,`isNotification`),e.isNotification=r;function i(e){let n=e;return n&&(n.result!==void 0||!!n.error)&&(t.string(n.id)||t.number(n.id)||n.id===null)}o(i,`isResponse`),e.isResponse=i})(a||(e.Message=a={}))}}),xt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var n;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(n||(e.Touch=n={}));var r=class{static{o(this,`LinkedMap`)}constructor(){this[t]=`LinkedMap`,this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=n.None){let r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t,r=n.None){let i=this._map.get(e);if(i)i.value=t,r!==n.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;case n.Last:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error(`Invalid list`);let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw Error(`LinkedMap got modified during iteration.`);r=r.next}}keys(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:o(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.key,done:!1};return t=t.next,e}else return{value:void 0,done:!0}},`next`)};return n}values(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:o(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.value,done:!1};return t=t.next,e}else return{value:void 0,done:!0}},`next`)};return n}entries(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:o(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:[t.key,t.value],done:!1};return t=t.next,e}else return{value:void 0,done:!0}},`next`)};return n}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw Error(`Invalid list`);this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw Error(`Invalid list`);this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw Error(`Invalid list`);e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw Error(`Invalid list`);e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw Error(`Invalid list`);t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw Error(`Invalid list`);if(!(t!==n.First&&t!==n.Last)){if(t===n.First){if(e===this._head)return;let t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;let t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}};e.LinkedMap=r,e.LRUCache=class extends r{static{o(this,`LRUCache`)}constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}}}),St=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(e){function t(e){return{dispose:e}}o(t,`create`),e.create=t})(t||(e.Disposable=t={}))}}),Ct=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=yt(),n;(function(e){e.Continue=0,e.Cancelled=1})(n||={}),e.SharedArraySenderStrategy=class{static{o(this,`SharedArraySenderStrategy`)}constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=n.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,n.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};var r=class{static{o(this,`SharedArrayBufferCancellationToken`)}constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===n.Cancelled}get onCancellationRequested(){throw Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`)}},i=class{static{o(this,`SharedArrayBufferCancellationTokenSource`)}constructor(e){this.token=new r(e)}cancel(){}dispose(){}};e.SharedArrayReceiverStrategy=class{static{o(this,`SharedArrayReceiverStrategy`)}constructor(){this.kind=`request`}createCancellationTokenSource(e){let n=e.$cancellationData;return n===void 0?new t.CancellationTokenSource:new i(n)}}}}),wt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=gt();e.Semaphore=class{static{o(this,`Semaphore`)}constructor(e=1){if(e<=0)throw Error(`Capacity must be greater than 0`);this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error(`To many thunks active`);try{let t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}}}),Tt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var t=gt(),n=_t(),r=vt(),i=wt(),a;(function(e){function t(e){let t=e;return t&&n.func(t.listen)&&n.func(t.dispose)&&n.func(t.onError)&&n.func(t.onClose)&&n.func(t.onPartialMessage)}o(t,`is`),e.is=t})(a||(e.MessageReader=a={}));var s=class{static{o(this,`AbstractMessageReader`)}constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:Error(`Reader received error. Reason: ${n.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageReader=s;var c;(function(e){function n(e){let n,r,i=new Map,a,o=new Map;if(e===void 0||typeof e==`string`)n=e??`utf-8`;else{if(n=e.charset??`utf-8`,e.contentDecoder!==void 0&&(r=e.contentDecoder,i.set(r.name,r)),e.contentDecoders!==void 0)for(let t of e.contentDecoders)i.set(t.name,t);if(e.contentTypeDecoder!==void 0&&(a=e.contentTypeDecoder,o.set(a.name,a)),e.contentTypeDecoders!==void 0)for(let t of e.contentTypeDecoders)o.set(t.name,t)}return a===void 0&&(a=(0,t.default)().applicationJson.decoder,o.set(a.name,a)),{charset:n,contentDecoder:r,contentDecoders:i,contentTypeDecoder:a,contentTypeDecoders:o}}o(n,`fromOptions`),e.fromOptions=n})(c||={}),e.ReadableStreamMessageReader=class extends s{static{o(this,`ReadableStreamMessageReader`)}constructor(e,n){super(),this.readable=e,this.options=c.fromOptions(n),this.buffer=(0,t.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new i.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let e=this.buffer.tryReadHeaders(!0);if(!e)return;let t=e.get(`content-length`);if(!t){this.fireError(Error(`Header must provide a Content-Length property. -${JSON.stringify(Object.fromEntries(e))}`));return}let n=parseInt(t);if(isNaN(n)){this.fireError(Error(`Content-Length value must be a number. Got ${t}`));return}this.nextMessageLength=n}let e=this.buffer.tryReadBody(this.nextMessageLength);if(e===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let t=this.options.contentDecoder===void 0?e:await this.options.contentDecoder.decode(e),n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&=(this.partialMessageTimer.dispose(),void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}}}),Et=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=gt(),n=_t(),r=wt(),i=vt(),a=`Content-Length: `,s=`\r -`,c;(function(e){function t(e){let t=e;return t&&n.func(t.dispose)&&n.func(t.onClose)&&n.func(t.onError)&&n.func(t.write)}o(t,`is`),e.is=t})(c||(e.MessageWriter=c={}));var l=class{static{o(this,`AbstractMessageWriter`)}constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:Error(`Writer received error. Reason: ${n.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageWriter=l;var u;(function(e){function n(e){return e===void 0||typeof e==`string`?{charset:e??`utf-8`,contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:e.charset??`utf-8`,contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}o(n,`fromOptions`),e.fromOptions=n})(u||={}),e.WriteableStreamMessageWriter=class extends l{static{o(this,`WriteableStreamMessageWriter`)}constructor(e,t){super(),this.writable=e,this.options=u.fromOptions(t),this.errorCount=0,this.writeSemaphore=new r.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>this.options.contentEncoder===void 0?e:this.options.contentEncoder.encode(e)).then(t=>{let n=[];return n.push(a,t.byteLength.toString(),s),n.push(s),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(``),`ascii`),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}}}),Dt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=13,n=10,r=`\r -`;e.AbstractMessageBuffer=class{static{o(this,`AbstractMessageBuffer`)}constructor(e=`utf-8`){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e==`string`?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let i=0,a=0,o=0,s=0;row:for(;athis._totalLength)throw Error(`Cannot read so many bytes!`);if(this._chunks[0].byteLength===e){let t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){let t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}let t=this.allocNative(e),n=0;for(;e>0;){let r=this._chunks[0];if(r.byteLength>e){let i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}}}),Ot=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var t=gt(),n=_t(),r=bt(),i=xt(),a=vt(),s=yt(),c;(function(e){e.type=new r.NotificationType(`$/cancelRequest`)})(c||={});var l;(function(e){function t(e){return typeof e==`string`||typeof e==`number`}o(t,`is`),e.is=t})(l||(e.ProgressToken=l={}));var u;(function(e){e.type=new r.NotificationType(`$/progress`)})(u||={}),e.ProgressType=class{static{o(this,`ProgressType`)}constructor(){}};var d;(function(e){function t(e){return n.func(e)}o(t,`is`),e.is=t})(d||={}),e.NullLogger=Object.freeze({error:o(()=>{},`error`),warn:o(()=>{},`warn`),info:o(()=>{},`info`),log:o(()=>{},`log`)});var f;(function(e){e[e.Off=0]=`Off`,e[e.Messages=1]=`Messages`,e[e.Compact=2]=`Compact`,e[e.Verbose=3]=`Verbose`})(f||(e.Trace=f={}));var p;(function(e){e.Off=`off`,e.Messages=`messages`,e.Compact=`compact`,e.Verbose=`verbose`})(p||(e.TraceValues=p={})),(function(e){function t(t){if(!n.string(t))return e.Off;switch(t=t.toLowerCase(),t){case`off`:return e.Off;case`messages`:return e.Messages;case`compact`:return e.Compact;case`verbose`:return e.Verbose;default:return e.Off}}o(t,`fromString`),e.fromString=t;function r(t){switch(t){case e.Off:return`off`;case e.Messages:return`messages`;case e.Compact:return`compact`;case e.Verbose:return`verbose`;default:return`off`}}o(r,`toString`),e.toString=r})(f||(e.Trace=f={}));var m;(function(e){e.Text=`text`,e.JSON=`json`})(m||(e.TraceFormat=m={})),(function(e){function t(t){return n.string(t)?(t=t.toLowerCase(),t===`json`?e.JSON:e.Text):e.Text}o(t,`fromString`),e.fromString=t})(m||(e.TraceFormat=m={}));var h;(function(e){e.type=new r.NotificationType(`$/setTrace`)})(h||(e.SetTraceNotification=h={}));var g;(function(e){e.type=new r.NotificationType(`$/logTrace`)})(g||(e.LogTraceNotification=g={}));var _;(function(e){e[e.Closed=1]=`Closed`,e[e.Disposed=2]=`Disposed`,e[e.AlreadyListening=3]=`AlreadyListening`})(_||(e.ConnectionErrors=_={}));var v=class e extends Error{static{o(this,`ConnectionError`)}constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};e.ConnectionError=v;var y;(function(e){function t(e){let t=e;return t&&n.func(t.cancelUndispatched)}o(t,`is`),e.is=t})(y||(e.ConnectionStrategy=y={}));var b;(function(e){function t(e){let t=e;return t&&(t.kind===void 0||t.kind===`id`)&&n.func(t.createCancellationTokenSource)&&(t.dispose===void 0||n.func(t.dispose))}o(t,`is`),e.is=t})(b||(e.IdCancellationReceiverStrategy=b={}));var x;(function(e){function t(e){let t=e;return t&&t.kind===`request`&&n.func(t.createCancellationTokenSource)&&(t.dispose===void 0||n.func(t.dispose))}o(t,`is`),e.is=t})(x||(e.RequestCancellationReceiverStrategy=x={}));var ee;(function(e){e.Message=Object.freeze({createCancellationTokenSource(e){return new s.CancellationTokenSource}});function t(e){return b.is(e)||x.is(e)}o(t,`is`),e.is=t})(ee||(e.CancellationReceiverStrategy=ee={}));var S;(function(e){e.Message=Object.freeze({sendCancellation(e,t){return e.sendNotification(c.type,{id:t})},cleanup(e){}});function t(e){let t=e;return t&&n.func(t.sendCancellation)&&n.func(t.cleanup)}o(t,`is`),e.is=t})(S||(e.CancellationSenderStrategy=S={}));var te;(function(e){e.Message=Object.freeze({receiver:ee.Message,sender:S.Message});function t(e){let t=e;return t&&ee.is(t.receiver)&&S.is(t.sender)}o(t,`is`),e.is=t})(te||(e.CancellationStrategy=te={}));var ne;(function(e){function t(e){let t=e;return t&&n.func(t.handleMessage)}o(t,`is`),e.is=t})(ne||(e.MessageStrategy=ne={}));var C;(function(e){function t(e){let t=e;return t&&(te.is(t.cancellationStrategy)||y.is(t.connectionStrategy)||ne.is(t.messageStrategy))}o(t,`is`),e.is=t})(C||(e.ConnectionOptions=C={}));var re;(function(e){e[e.New=1]=`New`,e[e.Listening=2]=`Listening`,e[e.Closed=3]=`Closed`,e[e.Disposed=4]=`Disposed`})(re||={});function ie(p,y,x,ee){let S=x===void 0?e.NullLogger:x,C=0,ie=0,ae=0,oe,se=new Map,ce,le=new Map,ue=new Map,de,w=new i.LinkedMap,T=new Map,E=new Set,D=new Map,O=f.Off,fe=m.Text,k,pe=re.New,me=new a.Emitter,he=new a.Emitter,ge=new a.Emitter,_e=new a.Emitter,ve=new a.Emitter,ye=ee&&ee.cancellationStrategy?ee.cancellationStrategy:te.Message;function be(e){if(e===null)throw Error(`Can't send requests with id null since the response can't be correlated.`);return`req-`+e.toString()}o(be,`createRequestQueueKey`);function xe(e){return e===null?`res-unknown-`+(++ae).toString():`res-`+e.toString()}o(xe,`createResponseQueueKey`);function Se(){return`not-`+(++ie).toString()}o(Se,`createNotificationQueueKey`);function Ce(e,t){r.Message.isRequest(t)?e.set(be(t.id),t):r.Message.isResponse(t)?e.set(xe(t.id),t):e.set(Se(),t)}o(Ce,`addMessageToQueue`);function we(e){}o(we,`cancelUndispatched`);function Te(){return pe===re.Listening}o(Te,`isListening`);function Ee(){return pe===re.Closed}o(Ee,`isClosed`);function De(){return pe===re.Disposed}o(De,`isDisposed`);function Oe(){(pe===re.New||pe===re.Listening)&&(pe=re.Closed,he.fire(void 0))}o(Oe,`closeHandler`);function ke(e){me.fire([e,void 0,void 0])}o(ke,`readErrorHandler`);function Ae(e){me.fire(e)}o(Ae,`writeErrorHandler`),p.onClose(Oe),p.onError(ke),y.onClose(Oe),y.onError(Ae);function je(){de||w.size===0||(de=(0,t.default)().timer.setImmediate(()=>{de=void 0,Ne()}))}o(je,`triggerMessageQueue`);function Me(e){r.Message.isRequest(e)?Fe(e):r.Message.isNotification(e)?Le(e):r.Message.isResponse(e)?Ie(e):Re(e)}o(Me,`handleMessage`);function Ne(){if(w.size===0)return;let e=w.shift();try{let t=ee?.messageStrategy;ne.is(t)?t.handleMessage(e,Me):Me(e)}finally{je()}}o(Ne,`processMessageQueue`);let Pe=o(e=>{try{if(r.Message.isNotification(e)&&e.method===c.type.method){let t=e.params.id,n=be(t),i=w.get(n);if(r.Message.isRequest(i)){let r=ee?.connectionStrategy,a=r&&r.cancelUndispatched?r.cancelUndispatched(i,we):void 0;if(a&&(a.error!==void 0||a.result!==void 0)){w.delete(n),D.delete(t),a.id=i.id,He(a,e.method,Date.now()),y.write(a).catch(()=>S.error(`Sending response for canceled message failed.`));return}}let a=D.get(t);if(a!==void 0){a.cancel(),We(e);return}else E.add(t)}Ce(w,e)}finally{je()}},`callback`);function Fe(e){if(De())return;function t(t,n,i){let a={jsonrpc:`2.0`,id:e.id};t instanceof r.ResponseError?a.error=t.toJson():a.result=t===void 0?null:t,He(a,n,i),y.write(a).catch(()=>S.error(`Sending response failed.`))}o(t,`reply`);function i(t,n,r){let i={jsonrpc:`2.0`,id:e.id,error:t.toJson()};He(i,n,r),y.write(i).catch(()=>S.error(`Sending response failed.`))}o(i,`replyError`);function a(t,n,r){t===void 0&&(t=null);let i={jsonrpc:`2.0`,id:e.id,result:t};He(i,n,r),y.write(i).catch(()=>S.error(`Sending response failed.`))}o(a,`replySuccess`),Ue(e);let s=se.get(e.method),c,l;s&&(c=s.type,l=s.handler);let u=Date.now();if(l||oe){let o=e.id??String(Date.now()),s=b.is(ye.receiver)?ye.receiver.createCancellationTokenSource(o):ye.receiver.createCancellationTokenSource(e);e.id!==null&&E.has(e.id)&&s.cancel(),e.id!==null&&D.set(o,s);try{let d;if(l)if(e.params===void 0){if(c!==void 0&&c.numberOfParams!==0){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines ${c.numberOfParams} params but received none.`),e.method,u);return}d=l(s.token)}else if(Array.isArray(e.params)){if(c!==void 0&&c.parameterStructures===r.ParameterStructures.byName){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);return}d=l(...e.params,s.token)}else{if(c!==void 0&&c.parameterStructures===r.ParameterStructures.byPosition){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);return}d=l(e.params,s.token)}else oe&&(d=oe(e.method,e.params,s.token));let f=d;d?f.then?f.then(n=>{D.delete(o),t(n,e.method,u)},t=>{D.delete(o),t instanceof r.ResponseError?i(t,e.method,u):t&&n.string(t.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}):(D.delete(o),t(d,e.method,u)):(D.delete(o),a(d,e.method,u))}catch(a){D.delete(o),a instanceof r.ResponseError?t(a,e.method,u):a&&n.string(a.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${a.message}`),e.method,u):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else i(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}o(Fe,`handleRequest`);function Ie(e){if(!De())if(e.id===null)e.error?S.error(`Received response message without id: Error is: -${JSON.stringify(e.error,void 0,4)}`):S.error(`Received response message without id. No further error information provided.`);else{let t=e.id,n=T.get(t);if(Ge(e,n),n!==void 0){T.delete(t);try{if(e.error){let t=e.error;n.reject(new r.ResponseError(t.code,t.message,t.data))}else if(e.result!==void 0)n.resolve(e.result);else throw Error(`Should never happen.`)}catch(e){e.message?S.error(`Response handler '${n.method}' failed with message: ${e.message}`):S.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}o(Ie,`handleResponse`);function Le(e){if(De())return;let t,n;if(e.method===c.type.method){let t=e.params.id;E.delete(t),We(e);return}else{let r=le.get(e.method);r&&(n=r.handler,t=r.type)}if(n||ce)try{if(We(e),n)if(e.params===void 0)t!==void 0&&t.numberOfParams!==0&&t.parameterStructures!==r.ParameterStructures.byName&&S.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){let i=e.params;e.method===u.type.method&&i.length===2&&l.is(i[0])?n({token:i[0],value:i[1]}):(t!==void 0&&(t.parameterStructures===r.ParameterStructures.byName&&S.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&S.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${i.length} arguments`)),n(...i))}else t!==void 0&&t.parameterStructures===r.ParameterStructures.byPosition&&S.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params);else ce&&ce(e.method,e.params)}catch(t){t.message?S.error(`Notification handler '${e.method}' failed with message: ${t.message}`):S.error(`Notification handler '${e.method}' failed unexpectedly.`)}else ge.fire(e)}o(Le,`handleNotification`);function Re(e){if(!e){S.error(`Received empty message.`);return}S.error(`Received message which is neither a response nor a notification message: -${JSON.stringify(e,null,4)}`);let t=e;if(n.string(t.id)||n.number(t.id)){let e=t.id,n=T.get(e);n&&n.reject(Error(`The received response has neither a result nor an error property.`))}}o(Re,`handleInvalidMessage`);function ze(e){if(e!=null)switch(O){case f.Verbose:return JSON.stringify(e,null,4);case f.Compact:return JSON.stringify(e);default:return}}o(ze,`stringifyTrace`);function Be(e){if(!(O===f.Off||!k))if(fe===m.Text){let t;(O===f.Verbose||O===f.Compact)&&e.params&&(t=`Params: ${ze(e.params)} - -`),k.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Ke(`send-request`,e)}o(Be,`traceSendingRequest`);function Ve(e){if(!(O===f.Off||!k))if(fe===m.Text){let t;(O===f.Verbose||O===f.Compact)&&(t=e.params?`Params: ${ze(e.params)} - -`:`No parameters provided. - -`),k.log(`Sending notification '${e.method}'.`,t)}else Ke(`send-notification`,e)}o(Ve,`traceSendingNotification`);function He(e,t,n){if(!(O===f.Off||!k))if(fe===m.Text){let r;(O===f.Verbose||O===f.Compact)&&(e.error&&e.error.data?r=`Error data: ${ze(e.error.data)} - -`:e.result?r=`Result: ${ze(e.result)} - -`:e.error===void 0&&(r=`No result returned. - -`)),k.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else Ke(`send-response`,e)}o(He,`traceSendingResponse`);function Ue(e){if(!(O===f.Off||!k))if(fe===m.Text){let t;(O===f.Verbose||O===f.Compact)&&e.params&&(t=`Params: ${ze(e.params)} - -`),k.log(`Received request '${e.method} - (${e.id})'.`,t)}else Ke(`receive-request`,e)}o(Ue,`traceReceivedRequest`);function We(e){if(!(O===f.Off||!k||e.method===g.type.method))if(fe===m.Text){let t;(O===f.Verbose||O===f.Compact)&&(t=e.params?`Params: ${ze(e.params)} - -`:`No parameters provided. - -`),k.log(`Received notification '${e.method}'.`,t)}else Ke(`receive-notification`,e)}o(We,`traceReceivedNotification`);function Ge(e,t){if(!(O===f.Off||!k))if(fe===m.Text){let n;if((O===f.Verbose||O===f.Compact)&&(e.error&&e.error.data?n=`Error data: ${ze(e.error.data)} - -`:e.result?n=`Result: ${ze(e.result)} - -`:e.error===void 0&&(n=`No result returned. - -`)),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:``;k.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else k.log(`Received response ${e.id} without active response promise.`,n)}else Ke(`receive-response`,e)}o(Ge,`traceReceivedResponse`);function Ke(e,t){if(!k||O===f.Off)return;let n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};k.log(n)}o(Ke,`logLSPMessage`);function qe(){if(Ee())throw new v(_.Closed,`Connection is closed.`);if(De())throw new v(_.Disposed,`Connection is disposed.`)}o(qe,`throwIfClosedOrDisposed`);function Je(){if(Te())throw new v(_.AlreadyListening,`Connection is already listening`)}o(Je,`throwIfListening`);function Ye(){if(!Te())throw Error(`Call listen() first.`)}o(Ye,`throwIfNotListening`);function Xe(e){return e===void 0?null:e}o(Xe,`undefinedToNull`);function Ze(e){if(e!==null)return e}o(Ze,`nullToUndefined`);function Qe(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}o(Qe,`isNamedParam`);function $e(e,t){switch(e){case r.ParameterStructures.auto:return Qe(t)?Ze(t):[Xe(t)];case r.ParameterStructures.byName:if(!Qe(t))throw Error(`Received parameters by name but param is not an object literal.`);return Ze(t);case r.ParameterStructures.byPosition:return[Xe(t)];default:throw Error(`Unknown parameter structure ${e.toString()}`)}}o($e,`computeSingleParam`);function et(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=$e(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e{qe();let i,a;if(n.string(e)){i=e;let n=t[0],o=0,s=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(o=1,s=n);let c=t.length,l=c-o;switch(l){case 0:a=void 0;break;case 1:a=$e(s,t[o]);break;default:if(s===r.ParameterStructures.byName)throw Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);a=t.slice(o,c).map(e=>Xe(e));break}}else{let n=t;i=e.method,a=et(e,n)}let o={jsonrpc:`2.0`,method:i,params:a};return Ve(o),y.write(o).catch(e=>{throw S.error(`Sending notification failed.`),e})},`sendNotification`),onNotification:o((e,t)=>{qe();let r;return n.func(e)?ce=e:t&&(n.string(e)?(r=e,le.set(e,{type:void 0,handler:t})):(r=e.method,le.set(e.method,{type:e,handler:t}))),{dispose:o(()=>{r===void 0?ce=void 0:le.delete(r)},`dispose`)}},`onNotification`),onProgress:o((e,t,n)=>{if(ue.has(t))throw Error(`Progress handler for token ${t} already registered`);return ue.set(t,n),{dispose:o(()=>{ue.delete(t)},`dispose`)}},`onProgress`),sendProgress:o((e,t,n)=>tt.sendNotification(u.type,{token:t,value:n}),`sendProgress`),onUnhandledProgress:_e.event,sendRequest:o((e,...t)=>{qe(),Ye();let i,a,c;if(n.string(e)){i=e;let n=t[0],o=t[t.length-1],l=0,u=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(l=1,u=n);let d=t.length;s.CancellationToken.is(o)&&(--d,c=o);let f=d-l;switch(f){case 0:a=void 0;break;case 1:a=$e(u,t[l]);break;default:if(u===r.ParameterStructures.byName)throw Error(`Received ${f} parameters for 'by Name' request parameter structure.`);a=t.slice(l,d).map(e=>Xe(e));break}}else{let n=t;i=e.method,a=et(e,n);let r=e.numberOfParams;c=s.CancellationToken.is(n[r])?n[r]:void 0}let l=C++,u;c&&(u=c.onCancellationRequested(()=>{let e=ye.sender.sendCancellation(tt,l);return e===void 0?(S.log(`Received no promise from cancellation strategy when cancelling id ${l}`),Promise.resolve()):e.catch(()=>{S.log(`Sending cancellation messages for id ${l} failed`)})}));let d={jsonrpc:`2.0`,id:l,method:i,params:a};return Be(d),typeof ye.sender.enableCancellation==`function`&&ye.sender.enableCancellation(d),new Promise(async(e,t)=>{let n=o(t=>{e(t),ye.sender.cleanup(l),u?.dispose()},`resolveWithCleanup`),a=o(e=>{t(e),ye.sender.cleanup(l),u?.dispose()},`rejectWithCleanup`),s={method:i,timerStart:Date.now(),resolve:n,reject:a};try{await y.write(d),T.set(l,s)}catch(e){throw S.error(`Sending request failed.`),s.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,e.message?e.message:`Unknown reason`)),e}})},`sendRequest`),onRequest:o((e,t)=>{qe();let r=null;return d.is(e)?(r=void 0,oe=e):n.string(e)?(r=null,t!==void 0&&(r=e,se.set(e,{handler:t,type:void 0}))):t!==void 0&&(r=e.method,se.set(e.method,{type:e,handler:t})),{dispose:o(()=>{r!==null&&(r===void 0?oe=void 0:se.delete(r))},`dispose`)}},`onRequest`),hasPendingResponse:o(()=>T.size>0,`hasPendingResponse`),trace:o(async(e,t,r)=>{let i=!1,a=m.Text;r!==void 0&&(n.boolean(r)?i=r:(i=r.sendNotification||!1,a=r.traceFormat||m.Text)),O=e,fe=a,k=O===f.Off?void 0:t,i&&!Ee()&&!De()&&await tt.sendNotification(h.type,{value:f.toString(e)})},`trace`),onError:me.event,onClose:he.event,onUnhandledNotification:ge.event,onDispose:ve.event,end:o(()=>{y.end()},`end`),dispose:o(()=>{if(De())return;pe=re.Disposed,ve.fire(void 0);let e=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,`Pending response rejected since connection got disposed`);for(let t of T.values())t.reject(e);T=new Map,D=new Map,E=new Set,w=new i.LinkedMap,n.func(y.dispose)&&y.dispose(),n.func(p.dispose)&&p.dispose()},`dispose`),listen:o(()=>{qe(),Je(),pe=re.Listening,p.listen(Pe)},`listen`),inspect:o(()=>{(0,t.default)().console.log(`inspect`)},`inspect`)};return tt.onNotification(g.type,e=>{if(O===f.Off||!k)return;let t=O===f.Verbose||O===f.Compact;k.log(e.message,t?e.verbose:void 0)}),tt.onNotification(u.type,e=>{let t=ue.get(e.token);t?t(e.value):_e.fire(e)}),tt}o(ie,`createMessageConnection`),e.createMessageConnection=ie}}),kt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=bt();Object.defineProperty(e,"Message",{enumerable:!0,get:o(function(){return t.Message},`get`)}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:o(function(){return t.RequestType},`get`)}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:o(function(){return t.RequestType0},`get`)}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:o(function(){return t.RequestType1},`get`)}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:o(function(){return t.RequestType2},`get`)}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:o(function(){return t.RequestType3},`get`)}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:o(function(){return t.RequestType4},`get`)}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:o(function(){return t.RequestType5},`get`)}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:o(function(){return t.RequestType6},`get`)}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:o(function(){return t.RequestType7},`get`)}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:o(function(){return t.RequestType8},`get`)}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:o(function(){return t.RequestType9},`get`)}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:o(function(){return t.ResponseError},`get`)}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:o(function(){return t.ErrorCodes},`get`)}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:o(function(){return t.NotificationType},`get`)}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:o(function(){return t.NotificationType0},`get`)}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:o(function(){return t.NotificationType1},`get`)}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:o(function(){return t.NotificationType2},`get`)}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:o(function(){return t.NotificationType3},`get`)}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:o(function(){return t.NotificationType4},`get`)}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:o(function(){return t.NotificationType5},`get`)}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:o(function(){return t.NotificationType6},`get`)}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:o(function(){return t.NotificationType7},`get`)}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:o(function(){return t.NotificationType8},`get`)}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:o(function(){return t.NotificationType9},`get`)}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:o(function(){return t.ParameterStructures},`get`)});var n=xt();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:o(function(){return n.LinkedMap},`get`)}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:o(function(){return n.LRUCache},`get`)}),Object.defineProperty(e,"Touch",{enumerable:!0,get:o(function(){return n.Touch},`get`)});var r=St();Object.defineProperty(e,"Disposable",{enumerable:!0,get:o(function(){return r.Disposable},`get`)});var i=vt();Object.defineProperty(e,"Event",{enumerable:!0,get:o(function(){return i.Event},`get`)}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:o(function(){return i.Emitter},`get`)});var a=yt();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:o(function(){return a.CancellationTokenSource},`get`)}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:o(function(){return a.CancellationToken},`get`)});var s=Ct();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:o(function(){return s.SharedArraySenderStrategy},`get`)}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:o(function(){return s.SharedArrayReceiverStrategy},`get`)});var c=Tt();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:o(function(){return c.MessageReader},`get`)}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:o(function(){return c.AbstractMessageReader},`get`)}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:o(function(){return c.ReadableStreamMessageReader},`get`)});var l=Et();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:o(function(){return l.MessageWriter},`get`)}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:o(function(){return l.AbstractMessageWriter},`get`)}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:o(function(){return l.WriteableStreamMessageWriter},`get`)});var u=Dt();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:o(function(){return u.AbstractMessageBuffer},`get`)});var d=Ot();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:o(function(){return d.ConnectionStrategy},`get`)}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:o(function(){return d.ConnectionOptions},`get`)}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:o(function(){return d.NullLogger},`get`)}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:o(function(){return d.createMessageConnection},`get`)}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:o(function(){return d.ProgressToken},`get`)}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:o(function(){return d.ProgressType},`get`)}),Object.defineProperty(e,"Trace",{enumerable:!0,get:o(function(){return d.Trace},`get`)}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:o(function(){return d.TraceValues},`get`)}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:o(function(){return d.TraceFormat},`get`)}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:o(function(){return d.SetTraceNotification},`get`)}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:o(function(){return d.LogTraceNotification},`get`)}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:o(function(){return d.ConnectionErrors},`get`)}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:o(function(){return d.ConnectionError},`get`)}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:o(function(){return d.CancellationReceiverStrategy},`get`)}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:o(function(){return d.CancellationSenderStrategy},`get`)}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:o(function(){return d.CancellationStrategy},`get`)}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:o(function(){return d.MessageStrategy},`get`)}),e.RAL=gt().default}}),At=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=kt(),n=class e extends t.AbstractMessageBuffer{static{o(this,`MessageBuffer`)}constructor(e=`utf-8`){super(e),this.asciiDecoder=new TextDecoder(`ascii`)}emptyBuffer(){return e.emptyBuffer}fromString(e,t){return new TextEncoder().encode(e)}toString(e,t){return t===`ascii`?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}};n.emptyBuffer=new Uint8Array;var r=class{static{o(this,`ReadableStreamWrapper`)}constructor(e){this.socket=e,this._onData=new t.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,t.RAL)().console.error(`Converting blob to array buffer failed.`)})},this.socket.addEventListener(`message`,this._messageListener)}onClose(e){return this.socket.addEventListener(`close`,e),t.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),t.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),t.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}onData(e){return this._onData.event(e)}},i=class{static{o(this,`WritableStreamWrapper`)}constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener(`close`,e),t.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),t.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),t.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}write(e,t){if(typeof e==`string`){if(t!==void 0&&t!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},a=new TextEncoder,s=Object.freeze({messageBuffer:Object.freeze({create:o(e=>new n(e),`create`)}),applicationJson:Object.freeze({encoder:Object.freeze({name:`application/json`,encode:o((e,t)=>{if(t.charset!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))},`encode`)}),decoder:Object.freeze({name:`application/json`,decode:o((e,t)=>{if(!(e instanceof Uint8Array))throw Error(`In a Browser environments only Uint8Arrays are supported.`);return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))},`decode`)})}),stream:Object.freeze({asReadableStream:o(e=>new r(e),`asReadableStream`),asWritableStream:o(e=>new i(e),`asWritableStream`)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:o(()=>clearTimeout(r),`dispose`)}},setImmediate(e,...t){let n=setTimeout(e,0,...t);return{dispose:o(()=>clearTimeout(n),`dispose`)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:o(()=>clearInterval(r),`dispose`)}}})});function c(){return s}o(c,`RIL`),(function(e){function n(){t.RAL.install(s)}o(n,`install`),e.install=n})(c||={}),e.default=c}}),jt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,At().default.install();var r=kt();n(kt(),e),e.BrowserMessageReader=class extends r.AbstractMessageReader{static{o(this,`BrowserMessageReader`)}constructor(e){super(),this._onData=new r.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener(`error`,e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}},e.BrowserMessageWriter=class extends r.AbstractMessageWriter{static{o(this,`BrowserMessageWriter`)}constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener(`error`,e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};function i(e,t,n,i){return n===void 0&&(n=r.NullLogger),r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}o(i,`createMessageConnection`),e.createMessageConnection=i}}),Mt=c({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){t.exports=jt()}}),j=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=jt(),n;(function(e){e.clientToServer=`clientToServer`,e.serverToClient=`serverToClient`,e.both=`both`})(n||(e.MessageDirection=n={})),e.RegistrationType=class{static{o(this,`RegistrationType`)}constructor(e){this.method=e}},e.ProtocolRequestType0=class extends t.RequestType0{static{o(this,`ProtocolRequestType0`)}constructor(e){super(e)}},e.ProtocolRequestType=class extends t.RequestType{static{o(this,`ProtocolRequestType`)}constructor(e){super(e,t.ParameterStructures.byName)}},e.ProtocolNotificationType0=class extends t.NotificationType0{static{o(this,`ProtocolNotificationType0`)}constructor(e){super(e)}},e.ProtocolNotificationType=class extends t.NotificationType{static{o(this,`ProtocolNotificationType`)}constructor(e){super(e,t.ParameterStructures.byName)}}}}),Nt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}o(t,`boolean`),e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}o(n,`string`),e.string=n;function r(e){return typeof e==`number`||e instanceof Number}o(r,`number`),e.number=r;function i(e){return e instanceof Error}o(i,`error`),e.error=i;function a(e){return typeof e==`function`}o(a,`func`),e.func=a;function s(e){return Array.isArray(e)}o(s,`array`),e.array=s;function c(e){return s(e)&&e.every(e=>n(e))}o(c,`stringArray`),e.stringArray=c;function l(e,t){return Array.isArray(e)&&e.every(t)}o(l,`typedArray`),e.typedArray=l;function u(e){return typeof e==`object`&&!!e}o(u,`objectLiteral`),e.objectLiteral=u}}),Pt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/implementation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ImplementationRequest=n={}))}}),Ft=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/typeDefinition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeDefinitionRequest=n={}))}}),It=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t=j(),n;(function(e){e.method=`workspace/workspaceFolders`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(n||(e.WorkspaceFoldersRequest=n={}));var r;(function(e){e.method=`workspace/didChangeWorkspaceFolders`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(r||(e.DidChangeWorkspaceFoldersNotification=r={}))}}),Lt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=j(),n;(function(e){e.method=`workspace/configuration`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ConfigurationRequest=n={}))}}),Rt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/documentColor`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DocumentColorRequest=n={}));var r;(function(e){e.method=`textDocument/colorPresentation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.ColorPresentationRequest=r={}))}}),zt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/foldingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.FoldingRangeRequest=n={}));var r;(function(e){e.method=`workspace/foldingRange/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.FoldingRangeRefreshRequest=r={}))}}),Bt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/declaration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DeclarationRequest=n={}))}}),Vt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/selectionRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.SelectionRangeRequest=n={}))}}),Ht=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t=jt(),n=j(),r;(function(e){e.type=new t.ProgressType;function n(t){return t===e.type}o(n,`is`),e.is=n})(r||(e.WorkDoneProgress=r={}));var i;(function(e){e.method=`window/workDoneProgress/create`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method)})(i||(e.WorkDoneProgressCreateRequest=i={}));var a;(function(e){e.method=`window/workDoneProgress/cancel`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(a||(e.WorkDoneProgressCancelNotification=a={}))}}),Ut=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/prepareCallHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.CallHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`callHierarchy/incomingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.CallHierarchyIncomingCallsRequest=r={}));var i;(function(e){e.method=`callHierarchy/outgoingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.CallHierarchyOutgoingCallsRequest=i={}))}}),Wt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t=j(),n;(function(e){e.Relative=`relative`})(n||(e.TokenFormat=n={}));var r;(function(e){e.method=`textDocument/semanticTokens`,e.type=new t.RegistrationType(e.method)})(r||(e.SemanticTokensRegistrationType=r={}));var i;(function(e){e.method=`textDocument/semanticTokens/full`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(i||(e.SemanticTokensRequest=i={}));var a;(function(e){e.method=`textDocument/semanticTokens/full/delta`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(a||(e.SemanticTokensDeltaRequest=a={}));var o;(function(e){e.method=`textDocument/semanticTokens/range`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(o||(e.SemanticTokensRangeRequest=o={}));var s;(function(e){e.method=`workspace/semanticTokens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(s||(e.SemanticTokensRefreshRequest=s={}))}}),Gt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=j(),n;(function(e){e.method=`window/showDocument`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ShowDocumentRequest=n={}))}}),Kt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/linkedEditingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.LinkedEditingRangeRequest=n={}))}}),qt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t=j(),n;(function(e){e.file=`file`,e.folder=`folder`})(n||(e.FileOperationPatternKind=n={}));var r;(function(e){e.method=`workspace/willCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.WillCreateFilesRequest=r={}));var i;(function(e){e.method=`workspace/didCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(i||(e.DidCreateFilesNotification=i={}));var a;(function(e){e.method=`workspace/willRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(a||(e.WillRenameFilesRequest=a={}));var o;(function(e){e.method=`workspace/didRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(o||(e.DidRenameFilesNotification=o={}));var s;(function(e){e.method=`workspace/didDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(s||(e.DidDeleteFilesNotification=s={}));var c;(function(e){e.method=`workspace/willDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(c||(e.WillDeleteFilesRequest=c={}))}}),Jt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=j(),n;(function(e){e.document=`document`,e.project=`project`,e.group=`group`,e.scheme=`scheme`,e.global=`global`})(n||(e.UniquenessLevel=n={}));var r;(function(e){e.$import=`import`,e.$export=`export`,e.local=`local`})(r||(e.MonikerKind=r={}));var i;(function(e){e.method=`textDocument/moniker`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.MonikerRequest=i={}))}}),Yt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/prepareTypeHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`typeHierarchy/supertypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.TypeHierarchySupertypesRequest=r={}));var i;(function(e){e.method=`typeHierarchy/subtypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.TypeHierarchySubtypesRequest=i={}))}}),Xt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/inlineValue`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineValueRequest=n={}));var r;(function(e){e.method=`workspace/inlineValue/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.InlineValueRefreshRequest=r={}))}}),Zt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t=j(),n;(function(e){e.method=`textDocument/inlayHint`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlayHintRequest=n={}));var r;(function(e){e.method=`inlayHint/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.InlayHintResolveRequest=r={}));var i;(function(e){e.method=`workspace/inlayHint/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(i||(e.InlayHintRefreshRequest=i={}))}}),Qt=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t=jt(),n=Nt(),r=j(),i;(function(e){function t(e){let t=e;return t&&n.boolean(t.retriggerRequest)}o(t,`is`),e.is=t})(i||(e.DiagnosticServerCancellationData=i={}));var a;(function(e){e.Full=`full`,e.Unchanged=`unchanged`})(a||(e.DocumentDiagnosticReportKind=a={}));var s;(function(e){e.method=`textDocument/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(s||(e.DocumentDiagnosticRequest=s={}));var c;(function(e){e.method=`workspace/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(c||(e.WorkspaceDiagnosticRequest=c={}));var l;(function(e){e.method=`workspace/diagnostic/refresh`,e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)})(l||(e.DiagnosticRefreshRequest=l={}))}}),$t=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;var t=(ht(),p(m)),n=Nt(),r=j(),i;(function(e){e.Markup=1,e.Code=2;function t(e){return e===1||e===2}o(t,`is`),e.is=t})(i||(e.NotebookCellKind=i={}));var a;(function(e){function r(e,t){let n={executionOrder:e};return(t===!0||t===!1)&&(n.success=t),n}o(r,`create`),e.create=r;function i(e){let r=e;return n.objectLiteral(r)&&t.uinteger.is(r.executionOrder)&&(r.success===void 0||n.boolean(r.success))}o(i,`is`),e.is=i;function a(e,t){return e===t?!0:e==null||t==null?!1:e.executionOrder===t.executionOrder&&e.success===t.success}o(a,`equals`),e.equals=a})(a||(e.ExecutionSummary=a={}));var s;(function(e){function r(e,t){return{kind:e,document:t}}o(r,`create`),e.create=r;function s(e){let r=e;return n.objectLiteral(r)&&i.is(r.kind)&&t.DocumentUri.is(r.document)&&(r.metadata===void 0||n.objectLiteral(r.metadata))}o(s,`is`),e.is=s;function c(e,t){let n=new Set;return e.document!==t.document&&n.add(`document`),e.kind!==t.kind&&n.add(`kind`),e.executionSummary!==t.executionSummary&&n.add(`executionSummary`),(e.metadata!==void 0||t.metadata!==void 0)&&!l(e.metadata,t.metadata)&&n.add(`metadata`),(e.executionSummary!==void 0||t.executionSummary!==void 0)&&!a.equals(e.executionSummary,t.executionSummary)&&n.add(`executionSummary`),n}o(c,`diff`),e.diff=c;function l(e,t){if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!=`object`)return!1;let r=Array.isArray(e),i=Array.isArray(t);if(r!==i)return!1;if(r&&i){if(e.length!==t.length)return!1;for(let n=0;n0}o(t,`hasId`),e.hasId=t})(T||(e.StaticRegistrationOptions=T={}));var E;(function(e){function t(e){let t=e;return t&&(t.documentSelector===null||se.is(t.documentSelector))}o(t,`is`),e.is=t})(E||(e.TextDocumentRegistrationOptions=E={}));var D;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(t.workDoneProgress===void 0||r.boolean(t.workDoneProgress))}o(t,`is`),e.is=t;function n(e){let t=e;return t&&r.boolean(t.workDoneProgress)}o(n,`hasWorkDoneProgress`),e.hasWorkDoneProgress=n})(D||(e.WorkDoneProgressOptions=D={}));var O;(function(e){e.method=`initialize`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(O||(e.InitializeRequest=O={}));var fe;(function(e){e.unknownProtocolVersion=1})(fe||(e.InitializeErrorCodes=fe={}));var k;(function(e){e.method=`initialized`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(k||(e.InitializedNotification=k={}));var pe;(function(e){e.method=`shutdown`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType0(e.method)})(pe||(e.ShutdownRequest=pe={}));var me;(function(e){e.method=`exit`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType0(e.method)})(me||(e.ExitNotification=me={}));var he;(function(e){e.method=`workspace/didChangeConfiguration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(he||(e.DidChangeConfigurationNotification=he={}));var ge;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(ge||(e.MessageType=ge={}));var _e;(function(e){e.method=`window/showMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(_e||(e.ShowMessageNotification=_e={}));var ve;(function(e){e.method=`window/showMessageRequest`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(ve||(e.ShowMessageRequest=ve={}));var ye;(function(e){e.method=`window/logMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(ye||(e.LogMessageNotification=ye={}));var be;(function(e){e.method=`telemetry/event`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(be||(e.TelemetryEventNotification=be={}));var xe;(function(e){e.None=0,e.Full=1,e.Incremental=2})(xe||(e.TextDocumentSyncKind=xe={}));var Se;(function(e){e.method=`textDocument/didOpen`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(Se||(e.DidOpenTextDocumentNotification=Se={}));var Ce;(function(e){function t(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}o(t,`isIncremental`),e.isIncremental=t;function n(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}o(n,`isFull`),e.isFull=n})(Ce||(e.TextDocumentContentChangeEvent=Ce={}));var we;(function(e){e.method=`textDocument/didChange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(we||(e.DidChangeTextDocumentNotification=we={}));var Te;(function(e){e.method=`textDocument/didClose`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(Te||(e.DidCloseTextDocumentNotification=Te={}));var Ee;(function(e){e.method=`textDocument/didSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(Ee||(e.DidSaveTextDocumentNotification=Ee={}));var De;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(De||(e.TextDocumentSaveReason=De={}));var Oe;(function(e){e.method=`textDocument/willSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(Oe||(e.WillSaveTextDocumentNotification=Oe={}));var ke;(function(e){e.method=`textDocument/willSaveWaitUntil`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ke||(e.WillSaveTextDocumentWaitUntilRequest=ke={}));var Ae;(function(e){e.method=`workspace/didChangeWatchedFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(Ae||(e.DidChangeWatchedFilesNotification=Ae={}));var je;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(je||(e.FileChangeType=je={}));var Me;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(n.URI.is(t.baseUri)||n.WorkspaceFolder.is(t.baseUri))&&r.string(t.pattern)}o(t,`is`),e.is=t})(Me||(e.RelativePattern=Me={}));var Ne;(function(e){e.Create=1,e.Change=2,e.Delete=4})(Ne||(e.WatchKind=Ne={}));var Pe;(function(e){e.method=`textDocument/publishDiagnostics`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(Pe||(e.PublishDiagnosticsNotification=Pe={}));var Fe;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Fe||(e.CompletionTriggerKind=Fe={}));var Ie;(function(e){e.method=`textDocument/completion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ie||(e.CompletionRequest=Ie={}));var Le;(function(e){e.method=`completionItem/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Le||(e.CompletionResolveRequest=Le={}));var Re;(function(e){e.method=`textDocument/hover`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Re||(e.HoverRequest=Re={}));var ze;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(ze||(e.SignatureHelpTriggerKind=ze={}));var Be;(function(e){e.method=`textDocument/signatureHelp`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Be||(e.SignatureHelpRequest=Be={}));var Ve;(function(e){e.method=`textDocument/definition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ve||(e.DefinitionRequest=Ve={}));var He;(function(e){e.method=`textDocument/references`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(He||(e.ReferencesRequest=He={}));var Ue;(function(e){e.method=`textDocument/documentHighlight`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ue||(e.DocumentHighlightRequest=Ue={}));var We;(function(e){e.method=`textDocument/documentSymbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(We||(e.DocumentSymbolRequest=We={}));var Ge;(function(e){e.method=`textDocument/codeAction`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ge||(e.CodeActionRequest=Ge={}));var Ke;(function(e){e.method=`codeAction/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ke||(e.CodeActionResolveRequest=Ke={}));var qe;(function(e){e.method=`workspace/symbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(qe||(e.WorkspaceSymbolRequest=qe={}));var Je;(function(e){e.method=`workspaceSymbol/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Je||(e.WorkspaceSymbolResolveRequest=Je={}));var Ye;(function(e){e.method=`textDocument/codeLens`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ye||(e.CodeLensRequest=Ye={}));var Xe;(function(e){e.method=`codeLens/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Xe||(e.CodeLensResolveRequest=Xe={}));var Ze;(function(e){e.method=`workspace/codeLens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(Ze||(e.CodeLensRefreshRequest=Ze={}));var Qe;(function(e){e.method=`textDocument/documentLink`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Qe||(e.DocumentLinkRequest=Qe={}));var $e;(function(e){e.method=`documentLink/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})($e||(e.DocumentLinkResolveRequest=$e={}));var et;(function(e){e.method=`textDocument/formatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(et||(e.DocumentFormattingRequest=et={}));var tt;(function(e){e.method=`textDocument/rangeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(tt||(e.DocumentRangeFormattingRequest=tt={}));var nt;(function(e){e.method=`textDocument/rangesFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(nt||(e.DocumentRangesFormattingRequest=nt={}));var rt;(function(e){e.method=`textDocument/onTypeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(rt||(e.DocumentOnTypeFormattingRequest=rt={}));var it;(function(e){e.Identifier=1})(it||(e.PrepareSupportDefaultBehavior=it={}));var at;(function(e){e.method=`textDocument/rename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(at||(e.RenameRequest=at={}));var ot;(function(e){e.method=`textDocument/prepareRename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ot||(e.PrepareRenameRequest=ot={}));var st;(function(e){e.method=`workspace/executeCommand`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(st||(e.ExecuteCommandRequest=st={}));var ct;(function(e){e.method=`workspace/applyEdit`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(`workspace/applyEdit`)})(ct||(e.ApplyWorkspaceEditRequest=ct={}))}}),nn=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var t=jt();function n(e,n,r,i){return t.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,t.createMessageConnection)(e,n,r,i)}o(n,`createProtocolConnection`),e.createProtocolConnection=n}}),rn=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,n(jt(),e),n((ht(),p(m)),e),n(j(),e),n(tn(),e);var r=nn();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:o(function(){return r.createProtocolConnection},`get`)});var i;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(i||(e.LSPErrorCodes=i={}))}}),an=c({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var r=Mt();n(Mt(),e),n(rn(),e);function i(e,t,n,i){return(0,r.createMessageConnection)(e,t,n,i)}o(i,`createProtocolConnection`),e.createProtocolConnection=i}}),on={};l(on,{AbstractAstReflection:()=>fn,AbstractCstNode:()=>ZA,AbstractLangiumParser:()=>oj,AbstractParserErrorMessageProvider:()=>cj,AbstractThreadedAsyncParser:()=>AN,AstUtils:()=>Cn,BiMap:()=>pM,Cancellation:()=>Z,CompositeCstNodeImpl:()=>$A,ContextCache:()=>xM,CstNodeBuilder:()=>XA,CstUtils:()=>sn,DEFAULT_TOKENIZE_OPTIONS:()=>YM,DONE_RESULT:()=>bn,DatatypeSymbol:()=>nj,DefaultAstNodeDescriptionProvider:()=>RM,DefaultAstNodeLocator:()=>BM,DefaultAsyncParser:()=>kN,DefaultCommentProvider:()=>ON,DefaultConfigurationProvider:()=>HM,DefaultDocumentBuilder:()=>GM,DefaultDocumentValidator:()=>NM,DefaultHydrator:()=>NN,DefaultIndexManager:()=>KM,DefaultJsonSerializer:()=>DM,DefaultLangiumDocumentFactory:()=>aM,DefaultLangiumDocuments:()=>oM,DefaultLangiumProfiler:()=>tP,DefaultLexer:()=>XM,DefaultLexerErrorMessageProvider:()=>JM,DefaultLinker:()=>cM,DefaultNameProvider:()=>uM,DefaultReferenceDescriptionProvider:()=>zM,DefaultReferences:()=>dM,DefaultScopeComputation:()=>mM,DefaultScopeProvider:()=>wM,DefaultServiceRegistry:()=>OM,DefaultTokenBuilder:()=>Fj,DefaultValueConverter:()=>Ij,DefaultWorkspaceLock:()=>MN,DefaultWorkspaceManager:()=>qM,Deferred:()=>Kj,Disposable:()=>WM,DisposableCache:()=>yM,DocumentCache:()=>SM,DocumentState:()=>Q,DocumentValidator:()=>LM,EMPTY_SCOPE:()=>vM,EMPTY_STREAM:()=>yn,EmptyFileSystem:()=>XN,EmptyFileSystemProvider:()=>YN,ErrorWithLocation:()=>ia,GrammarAST:()=>Rn,GrammarUtils:()=>ra,IndentationAwareLexer:()=>qN,IndentationAwareTokenBuilder:()=>KN,JSDocDocumentationProvider:()=>DN,LangiumCompletionParser:()=>uj,LangiumParser:()=>sj,LangiumParserErrorMessageProvider:()=>lj,LeafCstNodeImpl:()=>QA,LexingMode:()=>GN,MapScope:()=>gM,Module:()=>IN,MultiMap:()=>fM,MultiMapScope:()=>_M,OperationCancelled:()=>Uj,ParserWorker:()=>jN,ProfilingTask:()=>nP,Reduction:()=>Sn,RefResolving:()=>sM,RegExpUtils:()=>sa,RootCstNodeImpl:()=>tj,SimpleCache:()=>bM,StreamImpl:()=>gn,StreamScope:()=>hM,TextDocument:()=>Jj,TreeStreamImpl:()=>xn,URI:()=>tM,UriTrie:()=>iM,UriUtils:()=>rM,VALIDATE_EACH_NODE:()=>MM,ValidationCategory:()=>AM,ValidationRegistry:()=>jM,ValueConverter:()=>Lj,WorkspaceCache:()=>CM,assertCondition:()=>oa,assertUnreachable:()=>aa,createCompletionParser:()=>Mj,createDefaultCoreModule:()=>PN,createDefaultSharedCoreModule:()=>FN,createGrammarConfig:()=>_o,createLangiumParser:()=>Nj,createParser:()=>mj,delayNextTick:()=>Rj,diagnosticData:()=>kM,eagerLoad:()=>zN,getDiagnosticRange:()=>PM,indentationBuilderDefaultOptions:()=>WN,inject:()=>LN,interruptAndCheck:()=>Gj,isAstNode:()=>M,isAstNodeDescription:()=>un,isAstNodeWithComment:()=>TM,isCompositeCstNode:()=>pn,isIMultiModeLexerDefinition:()=>QM,isJSDoc:()=>tN,isLeafCstNode:()=>mn,isLinkingError:()=>dn,isMultiReference:()=>ln,isNamed:()=>lM,isOperationCancelled:()=>Wj,isReference:()=>cn,isRootCstNode:()=>hn,isTokenTypeArray:()=>ZM,isTokenTypeDictionary:()=>$M,loadGrammarFromJson:()=>eP,parseJSDoc:()=>eN,prepareLangiumParser:()=>Pj,setInterruptionPeriod:()=>Hj,startCancelableOperation:()=>Vj,stream:()=>N,toDiagnosticData:()=>IM,toDiagnosticSeverity:()=>FM});var sn={};l(sn,{DefaultNameRegexp:()=>Wi,RangeComparison:()=>Vi,compareRange:()=>Hi,findCommentNode:()=>Ki,findDeclarationNodeAtOffset:()=>Gi,findLeafNodeAtOffset:()=>Ji,findLeafNodeBeforeOffset:()=>Yi,flattenCst:()=>Li,getDatatypeNode:()=>Fi,getInteriorNodes:()=>ea,getNextNode:()=>Qi,getPreviousNode:()=>Zi,getStartlineNode:()=>$i,inRange:()=>Ui,isChildNode:()=>Ri,isCommentNode:()=>qi,streamCst:()=>Ii,toDocumentSegment:()=>Bi,tokenToRange:()=>zi});function M(e){return typeof e==`object`&&!!e&&typeof e.$type==`string`}o(M,`isAstNode`);function cn(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`ref`in e}o(cn,`isReference`);function ln(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`items`in e}o(ln,`isMultiReference`);function un(e){return typeof e==`object`&&!!e&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.path==`string`}o(un,`isAstNodeDescription`);function dn(e){return typeof e==`object`&&!!e&&typeof e.info==`object`&&typeof e.message==`string`}o(dn,`isLinkingError`);var fn=class{static{o(this,`AbstractAstReflection`)}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw Error(`Type ${e.container.$type||`undefined`} not found.`);let n=t.properties[e.property]?.referenceType;if(!n)throw Error(`Property ${e.property||`undefined`} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return M(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||=this.subtypes[e]={};let r=n[t];if(r!==void 0)return r;{let r=this.types[e],i=r?r.superTypes.some(e=>this.isSubtype(e,t)):!1;return n[t]=i,i}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let t=this.getAllTypes(),n=[];for(let r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}};function pn(e){return typeof e==`object`&&!!e&&Array.isArray(e.content)}o(pn,`isCompositeCstNode`);function mn(e){return typeof e==`object`&&!!e&&typeof e.tokenType==`object`}o(mn,`isLeafCstNode`);function hn(e){return pn(e)&&typeof e.fullText==`string`}o(hn,`isRootCstNode`);var gn=class e{static{o(this,`StreamImpl`)}constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:o(()=>this.nextFn(e.state),`next`),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){let e=[],t=this.iterator(),n;do n=t.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){let n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do if(t=this.nextFn(e.first),!t.done)return t;while(!t.done);e.firstDone=!0}do if(t=e.iterator.next(),!t.done)return t;while(!t.done);return bn})}join(e=`,`){let t=this.iterator(),n=``,r,i=!1;do r=t.next(),r.done||(i&&(n+=e),n+=_n(r.value)),i=!0;while(!r.done);return n}indexOf(e,t=0){let n=this.iterator(),r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(t){return new e(this.startFn,e=>{let{done:n,value:r}=this.nextFn(e);return n?bn:{done:!1,value:t(r)}})}filter(t){return new e(this.startFn,e=>{let n;do if(n=this.nextFn(e),!n.done&&t(n.value))return n;while(!n.done);return bn})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){let n=this.iterator(),r=t,i=n.next();for(;!i.done;)r=r===void 0?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){let r=e.next();if(r.done)return n;let i=this.recursiveReduce(e,t,n);return i===void 0?r.value:t(i,r.value)}find(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:n,value:r}=this.nextFn(e.this);if(!n){let n=t(r);if(vn(n))e.iterator=n[Symbol.iterator]();else return{done:!1,value:n}}}while(e.iterator);return bn})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let n=t>1?this.flat(t-1):this;return new e(()=>({this:n.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:t,value:r}=n.nextFn(e.this);if(!t)if(vn(r))e.iterator=r[Symbol.iterator]();else return{done:!1,value:r}}while(e.iterator);return bn})}head(){let e=this.iterator().next();if(!e.done)return e.value}tail(t=1){return new e(()=>{let e=this.startFn();for(let n=0;n({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?bn:this.nextFn(e.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),e=>{let n;do if(n=this.nextFn(e.internalState),!n.done){let r=t?t(n.value):n.value;if(!e.set.has(r))return e.set.add(r),n}while(!n.done);return bn})}exclude(e,t){let n=new Set;for(let r of e){let e=t?t(r):r;n.add(e)}return this.filter(e=>{let r=t?t(e):e;return!n.has(r)})}};function _n(e){return typeof e==`string`?e:e===void 0?`undefined`:typeof e.toString==`function`?e.toString():Object.prototype.toString.call(e)}o(_n,`toString`);function vn(e){return!!e&&typeof e[Symbol.iterator]==`function`}o(vn,`isIterable`);var yn=new gn(()=>void 0,()=>bn),bn=Object.freeze({done:!0,value:void 0});function N(...e){if(e.length===1){let t=e[0];if(t instanceof gn)return t;if(vn(t))return new gn(()=>t[Symbol.iterator](),e=>e.next());if(typeof t.length==`number`)return new gn(()=>({index:0}),e=>e.index1?new gn(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&=(e.iterators.pop(),!1);e.iterators.length>0;){let n=e.iterators[e.iterators.length-1].next();if(n.done)e.iterators.pop();else return e.iterators.push(t(n.value)[Symbol.iterator]()),n}return bn})}iterator(){let e={state:this.startFn(),next:o(()=>this.nextFn(e.state),`next`),prune:o(()=>{e.state.pruned=!0},`prune`),[Symbol.iterator]:()=>e};return e}},Sn;(function(e){function t(e){return e.reduce((e,t)=>e+t,0)}o(t,`sum`),e.sum=t;function n(e){return e.reduce((e,t)=>e*t,0)}o(n,`product`),e.product=n;function r(e){return e.reduce((e,t)=>Math.min(e,t))}o(r,`min`),e.min=r;function i(e){return e.reduce((e,t)=>Math.max(e,t))}o(i,`max`),e.max=i})(Sn||={});var Cn={};l(Cn,{assignMandatoryProperties:()=>Fn,copyAstNode:()=>Ln,findRootNode:()=>On,getContainerOfType:()=>Tn,getDocument:()=>Dn,getReferenceNodes:()=>kn,hasContainerOfType:()=>En,linkContentToContainer:()=>wn,streamAllContents:()=>jn,streamAst:()=>Mn,streamContents:()=>An,streamReferences:()=>Pn});function wn(e,t={}){for(let[n,r]of Object.entries(e))n.startsWith(`$`)||(Array.isArray(r)?r.forEach((r,i)=>{M(r)&&(r.$container=e,r.$containerProperty=n,r.$containerIndex=i,t.deep&&wn(r,t))}):M(r)&&(r.$container=e,r.$containerProperty=n,t.deep&&wn(r,t)))}o(wn,`linkContentToContainer`);function Tn(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}o(Tn,`getContainerOfType`);function En(e,t){let n=e;for(;n;){if(t(n))return!0;n=n.$container}return!1}o(En,`hasContainerOfType`);function Dn(e){let t=On(e).$document;if(!t)throw Error(`AST node has no document.`);return t}o(Dn,`getDocument`);function On(e){for(;e.$container;)e=e.$container;return e}o(On,`findRootNode`);function kn(e){return cn(e)?e.ref?[e.ref]:[]:ln(e)?e.items.map(e=>e.ref):[]}o(kn,`getReferenceNodes`);function An(e,t){if(!e)throw Error(`Node must be an AstNode.`);let n=t?.range;return new gn(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexAn(e,t))}o(jn,`streamAllContents`);function Mn(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return t?.range&&!Nn(e,t.range)?new xn(e,()=>[]):new xn(e,e=>An(e,t),{includeRoot:!0})}o(Mn,`streamAst`);function Nn(e,t){if(!t)return!0;let n=e.$cstNode?.range;return n?Ui(n,t):!1}o(Nn,`isAstNodeInRange`);function Pn(e){return new gn(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexBn,AbstractParserRule:()=>Hn,AbstractRule:()=>Wn,AbstractType:()=>Kn,Action:()=>Jn,Alternatives:()=>Xn,ArrayLiteral:()=>Qn,ArrayType:()=>er,Assignment:()=>nr,BooleanLiteral:()=>ir,CharacterRange:()=>or,Condition:()=>cr,Conjunction:()=>ur,CrossReference:()=>fr,Disjunction:()=>mr,EndOfFile:()=>gr,Grammar:()=>vr,GrammarImport:()=>br,Group:()=>Sr,InferredType:()=>wr,InfixRule:()=>Er,InfixRuleOperatorList:()=>Or,InfixRuleOperators:()=>Ar,Interface:()=>Mr,Keyword:()=>Pr,LangiumGrammarAstReflection:()=>Pi,LangiumGrammarTerminals:()=>zn,NamedArgument:()=>Ir,NegatedToken:()=>Rr,Negation:()=>Br,NumberLiteral:()=>Hr,Parameter:()=>Wr,ParameterReference:()=>Kr,ParserRule:()=>Jr,ReferenceType:()=>Xr,RegexToken:()=>Qr,ReturnType:()=>ei,RuleCall:()=>ni,SimpleType:()=>ii,StringLiteral:()=>oi,TerminalAlternatives:()=>ci,TerminalElement:()=>ui,TerminalGroup:()=>fi,TerminalRule:()=>mi,TerminalRuleCall:()=>gi,Type:()=>vi,TypeAttribute:()=>bi,TypeDefinition:()=>Si,UnionType:()=>wi,UnorderedGroup:()=>Ei,UntilToken:()=>Oi,ValueLiteral:()=>Ai,Wildcard:()=>Mi,isAbstractElement:()=>Vn,isAbstractParserRule:()=>Un,isAbstractRule:()=>Gn,isAbstractType:()=>qn,isAction:()=>Yn,isAlternatives:()=>Zn,isArrayLiteral:()=>$n,isArrayType:()=>tr,isAssignment:()=>rr,isBooleanLiteral:()=>ar,isCharacterRange:()=>sr,isCondition:()=>lr,isConjunction:()=>dr,isCrossReference:()=>pr,isDisjunction:()=>hr,isEndOfFile:()=>_r,isGrammar:()=>yr,isGrammarImport:()=>xr,isGroup:()=>Cr,isInferredType:()=>Tr,isInfixRule:()=>Dr,isInfixRuleOperatorList:()=>kr,isInfixRuleOperators:()=>jr,isInterface:()=>Nr,isKeyword:()=>Fr,isNamedArgument:()=>Lr,isNegatedToken:()=>zr,isNegation:()=>Vr,isNumberLiteral:()=>Ur,isParameter:()=>Gr,isParameterReference:()=>qr,isParserRule:()=>Yr,isReferenceType:()=>Zr,isRegexToken:()=>$r,isReturnType:()=>ti,isRuleCall:()=>ri,isSimpleType:()=>ai,isStringLiteral:()=>si,isTerminalAlternatives:()=>li,isTerminalElement:()=>di,isTerminalGroup:()=>pi,isTerminalRule:()=>hi,isTerminalRuleCall:()=>_i,isType:()=>yi,isTypeAttribute:()=>xi,isTypeDefinition:()=>Ci,isUnionType:()=>Ti,isUnorderedGroup:()=>Di,isUntilToken:()=>ki,isValueLiteral:()=>ji,isWildcard:()=>Ni,reflection:()=>P});var zn={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},Bn={$type:`AbstractElement`,cardinality:`cardinality`};function Vn(e){return P.isInstance(e,Bn.$type)}o(Vn,`isAbstractElement`);var Hn={$type:`AbstractParserRule`};function Un(e){return P.isInstance(e,Hn.$type)}o(Un,`isAbstractParserRule`);var Wn={$type:`AbstractRule`};function Gn(e){return P.isInstance(e,Wn.$type)}o(Gn,`isAbstractRule`);var Kn={$type:`AbstractType`};function qn(e){return P.isInstance(e,Kn.$type)}o(qn,`isAbstractType`);var Jn={$type:`Action`,cardinality:`cardinality`,feature:`feature`,inferredType:`inferredType`,operator:`operator`,type:`type`};function Yn(e){return P.isInstance(e,Jn.$type)}o(Yn,`isAction`);var Xn={$type:`Alternatives`,cardinality:`cardinality`,elements:`elements`};function Zn(e){return P.isInstance(e,Xn.$type)}o(Zn,`isAlternatives`);var Qn={$type:`ArrayLiteral`,elements:`elements`};function $n(e){return P.isInstance(e,Qn.$type)}o($n,`isArrayLiteral`);var er={$type:`ArrayType`,elementType:`elementType`};function tr(e){return P.isInstance(e,er.$type)}o(tr,`isArrayType`);var nr={$type:`Assignment`,cardinality:`cardinality`,feature:`feature`,operator:`operator`,predicate:`predicate`,terminal:`terminal`};function rr(e){return P.isInstance(e,nr.$type)}o(rr,`isAssignment`);var ir={$type:`BooleanLiteral`,true:`true`};function ar(e){return P.isInstance(e,ir.$type)}o(ar,`isBooleanLiteral`);var or={$type:`CharacterRange`,cardinality:`cardinality`,left:`left`,lookahead:`lookahead`,parenthesized:`parenthesized`,right:`right`};function sr(e){return P.isInstance(e,or.$type)}o(sr,`isCharacterRange`);var cr={$type:`Condition`};function lr(e){return P.isInstance(e,cr.$type)}o(lr,`isCondition`);var ur={$type:`Conjunction`,left:`left`,right:`right`};function dr(e){return P.isInstance(e,ur.$type)}o(dr,`isConjunction`);var fr={$type:`CrossReference`,cardinality:`cardinality`,deprecatedSyntax:`deprecatedSyntax`,isMulti:`isMulti`,terminal:`terminal`,type:`type`};function pr(e){return P.isInstance(e,fr.$type)}o(pr,`isCrossReference`);var mr={$type:`Disjunction`,left:`left`,right:`right`};function hr(e){return P.isInstance(e,mr.$type)}o(hr,`isDisjunction`);var gr={$type:`EndOfFile`,cardinality:`cardinality`};function _r(e){return P.isInstance(e,gr.$type)}o(_r,`isEndOfFile`);var vr={$type:`Grammar`,imports:`imports`,interfaces:`interfaces`,isDeclared:`isDeclared`,name:`name`,rules:`rules`,types:`types`};function yr(e){return P.isInstance(e,vr.$type)}o(yr,`isGrammar`);var br={$type:`GrammarImport`,path:`path`};function xr(e){return P.isInstance(e,br.$type)}o(xr,`isGrammarImport`);var Sr={$type:`Group`,cardinality:`cardinality`,elements:`elements`,guardCondition:`guardCondition`,predicate:`predicate`};function Cr(e){return P.isInstance(e,Sr.$type)}o(Cr,`isGroup`);var wr={$type:`InferredType`,name:`name`};function Tr(e){return P.isInstance(e,wr.$type)}o(Tr,`isInferredType`);var Er={$type:`InfixRule`,call:`call`,dataType:`dataType`,inferredType:`inferredType`,name:`name`,operators:`operators`,parameters:`parameters`,returnType:`returnType`};function Dr(e){return P.isInstance(e,Er.$type)}o(Dr,`isInfixRule`);var Or={$type:`InfixRuleOperatorList`,associativity:`associativity`,operators:`operators`};function kr(e){return P.isInstance(e,Or.$type)}o(kr,`isInfixRuleOperatorList`);var Ar={$type:`InfixRuleOperators`,precedences:`precedences`};function jr(e){return P.isInstance(e,Ar.$type)}o(jr,`isInfixRuleOperators`);var Mr={$type:`Interface`,attributes:`attributes`,name:`name`,superTypes:`superTypes`};function Nr(e){return P.isInstance(e,Mr.$type)}o(Nr,`isInterface`);var Pr={$type:`Keyword`,cardinality:`cardinality`,predicate:`predicate`,value:`value`};function Fr(e){return P.isInstance(e,Pr.$type)}o(Fr,`isKeyword`);var Ir={$type:`NamedArgument`,calledByName:`calledByName`,parameter:`parameter`,value:`value`};function Lr(e){return P.isInstance(e,Ir.$type)}o(Lr,`isNamedArgument`);var Rr={$type:`NegatedToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function zr(e){return P.isInstance(e,Rr.$type)}o(zr,`isNegatedToken`);var Br={$type:`Negation`,value:`value`};function Vr(e){return P.isInstance(e,Br.$type)}o(Vr,`isNegation`);var Hr={$type:`NumberLiteral`,value:`value`};function Ur(e){return P.isInstance(e,Hr.$type)}o(Ur,`isNumberLiteral`);var Wr={$type:`Parameter`,name:`name`};function Gr(e){return P.isInstance(e,Wr.$type)}o(Gr,`isParameter`);var Kr={$type:`ParameterReference`,parameter:`parameter`};function qr(e){return P.isInstance(e,Kr.$type)}o(qr,`isParameterReference`);var Jr={$type:`ParserRule`,dataType:`dataType`,definition:`definition`,entry:`entry`,fragment:`fragment`,inferredType:`inferredType`,name:`name`,parameters:`parameters`,returnType:`returnType`};function Yr(e){return P.isInstance(e,Jr.$type)}o(Yr,`isParserRule`);var Xr={$type:`ReferenceType`,isMulti:`isMulti`,referenceType:`referenceType`};function Zr(e){return P.isInstance(e,Xr.$type)}o(Zr,`isReferenceType`);var Qr={$type:`RegexToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,regex:`regex`};function $r(e){return P.isInstance(e,Qr.$type)}o($r,`isRegexToken`);var ei={$type:`ReturnType`,name:`name`};function ti(e){return P.isInstance(e,ei.$type)}o(ti,`isReturnType`);var ni={$type:`RuleCall`,arguments:`arguments`,cardinality:`cardinality`,predicate:`predicate`,rule:`rule`};function ri(e){return P.isInstance(e,ni.$type)}o(ri,`isRuleCall`);var ii={$type:`SimpleType`,primitiveType:`primitiveType`,stringType:`stringType`,typeRef:`typeRef`};function ai(e){return P.isInstance(e,ii.$type)}o(ai,`isSimpleType`);var oi={$type:`StringLiteral`,value:`value`};function si(e){return P.isInstance(e,oi.$type)}o(si,`isStringLiteral`);var ci={$type:`TerminalAlternatives`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function li(e){return P.isInstance(e,ci.$type)}o(li,`isTerminalAlternatives`);var ui={$type:`TerminalElement`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`};function di(e){return P.isInstance(e,ui.$type)}o(di,`isTerminalElement`);var fi={$type:`TerminalGroup`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`};function pi(e){return P.isInstance(e,fi.$type)}o(pi,`isTerminalGroup`);var mi={$type:`TerminalRule`,definition:`definition`,fragment:`fragment`,hidden:`hidden`,name:`name`,type:`type`};function hi(e){return P.isInstance(e,mi.$type)}o(hi,`isTerminalRule`);var gi={$type:`TerminalRuleCall`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,rule:`rule`};function _i(e){return P.isInstance(e,gi.$type)}o(_i,`isTerminalRuleCall`);var vi={$type:`Type`,name:`name`,type:`type`};function yi(e){return P.isInstance(e,vi.$type)}o(yi,`isType`);var bi={$type:`TypeAttribute`,defaultValue:`defaultValue`,isOptional:`isOptional`,name:`name`,type:`type`};function xi(e){return P.isInstance(e,bi.$type)}o(xi,`isTypeAttribute`);var Si={$type:`TypeDefinition`};function Ci(e){return P.isInstance(e,Si.$type)}o(Ci,`isTypeDefinition`);var wi={$type:`UnionType`,types:`types`};function Ti(e){return P.isInstance(e,wi.$type)}o(Ti,`isUnionType`);var Ei={$type:`UnorderedGroup`,cardinality:`cardinality`,elements:`elements`};function Di(e){return P.isInstance(e,Ei.$type)}o(Di,`isUnorderedGroup`);var Oi={$type:`UntilToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`};function ki(e){return P.isInstance(e,Oi.$type)}o(ki,`isUntilToken`);var Ai={$type:`ValueLiteral`};function ji(e){return P.isInstance(e,Ai.$type)}o(ji,`isValueLiteral`);var Mi={$type:`Wildcard`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`};function Ni(e){return P.isInstance(e,Mi.$type)}o(Ni,`isWildcard`);var Pi=class extends fn{static{o(this,`LangiumGrammarAstReflection`)}constructor(){super(...arguments),this.types={AbstractElement:{name:Bn.$type,properties:{cardinality:{name:Bn.cardinality}},superTypes:[]},AbstractParserRule:{name:Hn.$type,properties:{},superTypes:[Wn.$type,Kn.$type]},AbstractRule:{name:Wn.$type,properties:{},superTypes:[]},AbstractType:{name:Kn.$type,properties:{},superTypes:[]},Action:{name:Jn.$type,properties:{cardinality:{name:Jn.cardinality},feature:{name:Jn.feature},inferredType:{name:Jn.inferredType},operator:{name:Jn.operator},type:{name:Jn.type,referenceType:Kn.$type}},superTypes:[Bn.$type]},Alternatives:{name:Xn.$type,properties:{cardinality:{name:Xn.cardinality},elements:{name:Xn.elements,defaultValue:[]}},superTypes:[Bn.$type]},ArrayLiteral:{name:Qn.$type,properties:{elements:{name:Qn.elements,defaultValue:[]}},superTypes:[Ai.$type]},ArrayType:{name:er.$type,properties:{elementType:{name:er.elementType}},superTypes:[Si.$type]},Assignment:{name:nr.$type,properties:{cardinality:{name:nr.cardinality},feature:{name:nr.feature},operator:{name:nr.operator},predicate:{name:nr.predicate},terminal:{name:nr.terminal}},superTypes:[Bn.$type]},BooleanLiteral:{name:ir.$type,properties:{true:{name:ir.true,defaultValue:!1}},superTypes:[cr.$type,Ai.$type]},CharacterRange:{name:or.$type,properties:{cardinality:{name:or.cardinality},left:{name:or.left},lookahead:{name:or.lookahead},parenthesized:{name:or.parenthesized,defaultValue:!1},right:{name:or.right}},superTypes:[ui.$type]},Condition:{name:cr.$type,properties:{},superTypes:[]},Conjunction:{name:ur.$type,properties:{left:{name:ur.left},right:{name:ur.right}},superTypes:[cr.$type]},CrossReference:{name:fr.$type,properties:{cardinality:{name:fr.cardinality},deprecatedSyntax:{name:fr.deprecatedSyntax,defaultValue:!1},isMulti:{name:fr.isMulti,defaultValue:!1},terminal:{name:fr.terminal},type:{name:fr.type,referenceType:Kn.$type}},superTypes:[Bn.$type]},Disjunction:{name:mr.$type,properties:{left:{name:mr.left},right:{name:mr.right}},superTypes:[cr.$type]},EndOfFile:{name:gr.$type,properties:{cardinality:{name:gr.cardinality}},superTypes:[Bn.$type]},Grammar:{name:vr.$type,properties:{imports:{name:vr.imports,defaultValue:[]},interfaces:{name:vr.interfaces,defaultValue:[]},isDeclared:{name:vr.isDeclared,defaultValue:!1},name:{name:vr.name},rules:{name:vr.rules,defaultValue:[]},types:{name:vr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:br.$type,properties:{path:{name:br.path}},superTypes:[]},Group:{name:Sr.$type,properties:{cardinality:{name:Sr.cardinality},elements:{name:Sr.elements,defaultValue:[]},guardCondition:{name:Sr.guardCondition},predicate:{name:Sr.predicate}},superTypes:[Bn.$type]},InferredType:{name:wr.$type,properties:{name:{name:wr.name}},superTypes:[Kn.$type]},InfixRule:{name:Er.$type,properties:{call:{name:Er.call},dataType:{name:Er.dataType},inferredType:{name:Er.inferredType},name:{name:Er.name},operators:{name:Er.operators},parameters:{name:Er.parameters,defaultValue:[]},returnType:{name:Er.returnType,referenceType:Kn.$type}},superTypes:[Hn.$type]},InfixRuleOperatorList:{name:Or.$type,properties:{associativity:{name:Or.associativity},operators:{name:Or.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:Ar.$type,properties:{precedences:{name:Ar.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:Mr.$type,properties:{attributes:{name:Mr.attributes,defaultValue:[]},name:{name:Mr.name},superTypes:{name:Mr.superTypes,defaultValue:[],referenceType:Kn.$type}},superTypes:[Kn.$type]},Keyword:{name:Pr.$type,properties:{cardinality:{name:Pr.cardinality},predicate:{name:Pr.predicate},value:{name:Pr.value}},superTypes:[Bn.$type]},NamedArgument:{name:Ir.$type,properties:{calledByName:{name:Ir.calledByName,defaultValue:!1},parameter:{name:Ir.parameter,referenceType:Wr.$type},value:{name:Ir.value}},superTypes:[]},NegatedToken:{name:Rr.$type,properties:{cardinality:{name:Rr.cardinality},lookahead:{name:Rr.lookahead},parenthesized:{name:Rr.parenthesized,defaultValue:!1},terminal:{name:Rr.terminal}},superTypes:[ui.$type]},Negation:{name:Br.$type,properties:{value:{name:Br.value}},superTypes:[cr.$type]},NumberLiteral:{name:Hr.$type,properties:{value:{name:Hr.value}},superTypes:[Ai.$type]},Parameter:{name:Wr.$type,properties:{name:{name:Wr.name}},superTypes:[]},ParameterReference:{name:Kr.$type,properties:{parameter:{name:Kr.parameter,referenceType:Wr.$type}},superTypes:[cr.$type]},ParserRule:{name:Jr.$type,properties:{dataType:{name:Jr.dataType},definition:{name:Jr.definition},entry:{name:Jr.entry,defaultValue:!1},fragment:{name:Jr.fragment,defaultValue:!1},inferredType:{name:Jr.inferredType},name:{name:Jr.name},parameters:{name:Jr.parameters,defaultValue:[]},returnType:{name:Jr.returnType,referenceType:Kn.$type}},superTypes:[Hn.$type]},ReferenceType:{name:Xr.$type,properties:{isMulti:{name:Xr.isMulti,defaultValue:!1},referenceType:{name:Xr.referenceType}},superTypes:[Si.$type]},RegexToken:{name:Qr.$type,properties:{cardinality:{name:Qr.cardinality},lookahead:{name:Qr.lookahead},parenthesized:{name:Qr.parenthesized,defaultValue:!1},regex:{name:Qr.regex}},superTypes:[ui.$type]},ReturnType:{name:ei.$type,properties:{name:{name:ei.name}},superTypes:[]},RuleCall:{name:ni.$type,properties:{arguments:{name:ni.arguments,defaultValue:[]},cardinality:{name:ni.cardinality},predicate:{name:ni.predicate},rule:{name:ni.rule,referenceType:Wn.$type}},superTypes:[Bn.$type]},SimpleType:{name:ii.$type,properties:{primitiveType:{name:ii.primitiveType},stringType:{name:ii.stringType},typeRef:{name:ii.typeRef,referenceType:Kn.$type}},superTypes:[Si.$type]},StringLiteral:{name:oi.$type,properties:{value:{name:oi.value}},superTypes:[Ai.$type]},TerminalAlternatives:{name:ci.$type,properties:{cardinality:{name:ci.cardinality},elements:{name:ci.elements,defaultValue:[]},lookahead:{name:ci.lookahead},parenthesized:{name:ci.parenthesized,defaultValue:!1}},superTypes:[ui.$type]},TerminalElement:{name:ui.$type,properties:{cardinality:{name:ui.cardinality},lookahead:{name:ui.lookahead},parenthesized:{name:ui.parenthesized,defaultValue:!1}},superTypes:[Bn.$type]},TerminalGroup:{name:fi.$type,properties:{cardinality:{name:fi.cardinality},elements:{name:fi.elements,defaultValue:[]},lookahead:{name:fi.lookahead},parenthesized:{name:fi.parenthesized,defaultValue:!1}},superTypes:[ui.$type]},TerminalRule:{name:mi.$type,properties:{definition:{name:mi.definition},fragment:{name:mi.fragment,defaultValue:!1},hidden:{name:mi.hidden,defaultValue:!1},name:{name:mi.name},type:{name:mi.type}},superTypes:[Wn.$type]},TerminalRuleCall:{name:gi.$type,properties:{cardinality:{name:gi.cardinality},lookahead:{name:gi.lookahead},parenthesized:{name:gi.parenthesized,defaultValue:!1},rule:{name:gi.rule,referenceType:mi.$type}},superTypes:[ui.$type]},Type:{name:vi.$type,properties:{name:{name:vi.name},type:{name:vi.type}},superTypes:[Kn.$type]},TypeAttribute:{name:bi.$type,properties:{defaultValue:{name:bi.defaultValue},isOptional:{name:bi.isOptional,defaultValue:!1},name:{name:bi.name},type:{name:bi.type}},superTypes:[]},TypeDefinition:{name:Si.$type,properties:{},superTypes:[]},UnionType:{name:wi.$type,properties:{types:{name:wi.types,defaultValue:[]}},superTypes:[Si.$type]},UnorderedGroup:{name:Ei.$type,properties:{cardinality:{name:Ei.cardinality},elements:{name:Ei.elements,defaultValue:[]}},superTypes:[Bn.$type]},UntilToken:{name:Oi.$type,properties:{cardinality:{name:Oi.cardinality},lookahead:{name:Oi.lookahead},parenthesized:{name:Oi.parenthesized,defaultValue:!1},terminal:{name:Oi.terminal}},superTypes:[ui.$type]},ValueLiteral:{name:Ai.$type,properties:{},superTypes:[]},Wildcard:{name:Mi.$type,properties:{cardinality:{name:Mi.cardinality},lookahead:{name:Mi.lookahead},parenthesized:{name:Mi.parenthesized,defaultValue:!1}},superTypes:[ui.$type]}}}},P=new Pi;function Fi(e){let t=e,n=!1;for(;t;){let e=Tn(t.grammarSource,Yr);if(e&&e.dataType)t=t.container,n=!0;else if(n)return t;else return}}o(Fi,`getDatatypeNode`);function Ii(e){return new xn(e,e=>pn(e)?e.content:[],{includeRoot:!0})}o(Ii,`streamCst`);function Li(e){return Ii(e).filter(mn)}o(Li,`flattenCst`);function Ri(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}o(Ri,`isChildNode`);function zi(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}o(zi,`tokenToRange`);function Bi(e){if(!e)return;let{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}o(Bi,`toDocumentSegment`);var Vi;(function(e){e[e.Before=0]=`Before`,e[e.After=1]=`After`,e[e.OverlapFront=2]=`OverlapFront`,e[e.OverlapBack=3]=`OverlapBack`,e[e.Inside=4]=`Inside`,e[e.Outside=5]=`Outside`})(Vi||={});function Hi(e,t){if(e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return Vi.After;let n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.lineVi.After}o(Ui,`inRange`);var Wi=/^[\w\p{L}]$/u;function Gi(e,t,n=Wi){if(e){if(t>0){let r=t-e.offset,i=e.text.charAt(r);n.test(i)||t--}return Ji(e,t)}}o(Gi,`findDeclarationNodeAtOffset`);function Ki(e,t){if(e){let n=Zi(e,!0);if(n&&qi(n,t))return n;if(hn(e)){let n=e.content.findIndex(e=>!e.hidden);for(let r=n-1;r>=0;r--){let n=e.content[r];if(qi(n,t))return n}}}}o(Ki,`findCommentNode`);function qi(e,t){return mn(e)&&t.includes(e.tokenType.name)}o(qi,`isCommentNode`);function Ji(e,t){if(mn(e))return e;if(pn(e)){let n=Xi(e,t,!1);if(n)return Ji(n,t)}}o(Ji,`findLeafNodeAtOffset`);function Yi(e,t){if(mn(e))return e;if(pn(e)){let n=Xi(e,t,!0);if(n)return Yi(n,t)}}o(Yi,`findLeafNodeBeforeOffset`);function Xi(e,t,n){let r=0,i=e.content.length-1,a;for(;r<=i;){let o=Math.floor((r+i)/2),s=e.content[o];if(s.offset<=t&&s.end>t)return s;s.end<=t?(a=n?s:void 0,r=o+1):i=o-1}return a}o(Xi,`binarySearch`);function Zi(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e);for(;r>0;){r--;let e=n.content[r];if(t||!e.hidden)return e}e=n}}o(Zi,`getPreviousNode`);function Qi(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e),i=n.content.length-1;for(;rWa,findNameAssignment:()=>Ga,findNodeForKeyword:()=>Ha,findNodeForProperty:()=>za,findNodesForKeyword:()=>Va,findNodesForKeywordInternal:()=>Ua,findNodesForProperty:()=>Ra,getActionAtElement:()=>qa,getActionType:()=>ro,getAllReachableRules:()=>Na,getAllRulesUsedForCrossReferences:()=>Fa,getCrossReferenceTerminal:()=>Ia,getEntryRule:()=>ja,getExplicitRuleType:()=>to,getHiddenRules:()=>Ma,getRuleType:()=>ao,getRuleTypeName:()=>io,getTypeName:()=>no,isArrayCardinality:()=>Ya,isArrayOperator:()=>Xa,isCommentTerminal:()=>La,isDataType:()=>$a,isDataTypeRule:()=>Za,isOptionalCardinality:()=>Ja,terminalRegex:()=>oo});var ia=class extends Error{static{o(this,`ErrorWithLocation`)}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}};function aa(e,t=`Error: Got unexpected value.`){throw Error(t)}o(aa,`assertUnreachable`);function oa(e,t=`Error: Condition is violated.`){if(!e)throw Error(t)}o(oa,`assertCondition`);var sa={};l(sa,{NEWLINE_REGEXP:()=>xa,escapeRegExp:()=>Oa,getTerminalParts:()=>wa,isMultilineComment:()=>Ta,isWhitespace:()=>Da,partialMatches:()=>ka,partialRegExp:()=>Aa,whitespaceCharacters:()=>Ea});function F(e){return e.charCodeAt(0)}o(F,`cc`);function ca(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}o(ca,`insertToSet`);function la(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t],e[t]=!0}o(la,`addFlag`);function ua(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}o(ua,`ASSERT_EXISTS`);function da(){throw Error(`Internal Error - Should never get here!`)}o(da,`ASSERT_NEVER_REACH_HERE`);function fa(e){return e.type===`Character`}o(fa,`isCharacter`);var pa=[];for(let e=F(`0`);e<=F(`9`);e++)pa.push(e);var ma=[F(`_`)].concat(pa);for(let e=F(`a`);e<=F(`z`);e++)ma.push(e);for(let e=F(`A`);e<=F(`Z`);e++)ma.push(e);var ha=[F(` `),F(`\f`),F(` -`),F(`\r`),F(` `),F(`\v`),F(` `),F(`\xA0`),F(` `),F(` `),F(` `),F(` `),F(` `),F(` `),F(` `),F(` `),F(` `),F(` `),F(` `),F(` `),F(`\u2028`),F(`\u2029`),F(` `),F(` `),F(` `),F(``)],ga=/[0-9a-fA-F]/,_a=/[0-9]/,va=/[1-9]/,ya=class{static{o(this,`RegExpParser`)}constructor(){this.idx=0,this.input=``,this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar(`/`);let t=this.disjunction();this.consumeChar(`/`);let n={type:`Flags`,loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case`g`:la(n,`global`);break;case`i`:la(n,`ignoreCase`);break;case`m`:la(n,`multiLine`);break;case`u`:la(n,`unicode`);break;case`y`:la(n,`sticky`);break}if(this.idx!==this.input.length)throw Error(`Redundant input: `+this.input.substring(this.idx));return{type:`Pattern`,flags:n,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()===`|`;)this.consumeChar(`|`),e.push(this.alternative());return{type:`Disjunction`,value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:`Alternative`,value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case`^`:return{type:`StartAnchor`,loc:this.loc(e)};case`$`:return{type:`EndAnchor`,loc:this.loc(e)};case`\\`:switch(this.popChar()){case`b`:return{type:`WordBoundary`,loc:this.loc(e)};case`B`:return{type:`NonWordBoundary`,loc:this.loc(e)}}throw Error(`Invalid Assertion Escape`);case`(`:this.consumeChar(`?`);let t;switch(this.popChar()){case`=`:t=`Lookahead`;break;case`!`:t=`NegativeLookahead`;break;case`<`:switch(this.popChar()){case`=`:t=`Lookbehind`;break;case`!`:t=`NegativeLookbehind`}break}ua(t);let n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}return da()}quantifier(e=!1){let t,n=this.idx;switch(this.popChar()){case`*`:t={atLeast:0,atMost:1/0};break;case`+`:t={atLeast:1,atMost:1/0};break;case`?`:t={atLeast:0,atMost:1};break;case`{`:let n=this.integerIncludingZero();switch(this.popChar()){case`}`:t={atLeast:n,atMost:n};break;case`,`:let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar(`}`);break}if(e===!0&&t===void 0)return;ua(t);break}if(!(e===!0&&t===void 0)&&ua(t))return this.peekChar(0)===`?`?(this.consumeChar(`?`),t.greedy=!1):t.greedy=!0,t.type=`Quantifier`,t.loc=this.loc(n),t}atom(){let e,t=this.idx;switch(this.peekChar()){case`.`:e=this.dotAll();break;case`\\`:e=this.atomEscape();break;case`[`:e=this.characterClass();break;case`(`:e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),ua(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):da()}dotAll(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[F(` -`),F(`\r`),F(`\u2028`),F(`\u2029`)]}}atomEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:return this.decimalEscapeAtom();case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:`GroupBackReference`,value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case`d`:e=pa;break;case`D`:e=pa,t=!0;break;case`s`:e=ha;break;case`S`:e=ha,t=!0;break;case`w`:e=ma;break;case`W`:e=ma,t=!0;break}return ua(e)?{type:`Set`,value:e,complement:t}:da()}controlEscapeAtom(){let e;switch(this.popChar()){case`f`:e=F(`\f`);break;case`n`:e=F(` -`);break;case`r`:e=F(`\r`);break;case`t`:e=F(` `);break;case`v`:e=F(`\v`);break}return ua(e)?{type:`Character`,value:e}:da()}controlLetterEscapeAtom(){this.consumeChar(`c`);let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error(`Invalid `);return{type:`Character`,value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar(`0`),{type:`Character`,value:F(`\0`)}}hexEscapeSequenceAtom(){return this.consumeChar(`x`),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar(`u`),this.parseHexDigits(4)}identityEscapeAtom(){return{type:`Character`,value:F(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` -`:case`\r`:case`\u2028`:case`\u2029`:case`\\`:case`]`:throw Error(`TBD`);default:return{type:`Character`,value:F(this.popChar())}}}characterClass(){let e=[],t=!1;for(this.consumeChar(`[`),this.peekChar(0)===`^`&&(this.consumeChar(`^`),t=!0);this.isClassAtom();){let t=this.classAtom();if(t.type,fa(t)&&this.isRangeDash()){this.consumeChar(`-`);let n=this.classAtom();if(n.type,fa(n)){if(n.value=this.input.length)throw Error(`Unexpected end of input`);this.idx++}loc(e){return{begin:e,end:this.idx}}},ba=class{static{o(this,`BaseRegExpVisitor`)}visitChildren(e){for(let t in e){let n=e[t];e.hasOwnProperty(t)&&(n.type===void 0?Array.isArray(n)&&n.forEach(e=>{this.visit(e)},this):this.visit(n))}}visit(e){switch(e.type){case`Pattern`:this.visitPattern(e);break;case`Flags`:this.visitFlags(e);break;case`Disjunction`:this.visitDisjunction(e);break;case`Alternative`:this.visitAlternative(e);break;case`StartAnchor`:this.visitStartAnchor(e);break;case`EndAnchor`:this.visitEndAnchor(e);break;case`WordBoundary`:this.visitWordBoundary(e);break;case`NonWordBoundary`:this.visitNonWordBoundary(e);break;case`Lookahead`:this.visitLookahead(e);break;case`NegativeLookahead`:this.visitNegativeLookahead(e);break;case`Lookbehind`:this.visitLookbehind(e);break;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);break;case`Character`:this.visitCharacter(e);break;case`Set`:this.visitSet(e);break;case`Group`:this.visitGroup(e);break;case`GroupBackReference`:this.visitGroupBackReference(e);break;case`Quantifier`:this.visitQuantifier(e);break}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},xa=/\r?\n/gm,Sa=new ya,Ca=new class extends ba{static{o(this,`TerminalRegExpVisitor`)}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join(``)}reset(e){this.multiline=!1,this.regex=e,this.startRegexp=``,this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let t=String.fromCharCode(e.value);if(!this.multiline&&t===` -`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let e=Oa(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){let t=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(t);this.multiline=!!` -`.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type===`Group`&&e.quantifier||super.visitChildren(e)}};function wa(e){try{typeof e!=`string`&&(e=e.source),e=`/${e}/`;let t=Sa.pattern(e),n=[];for(let r of t.value.value)Ca.reset(e),Ca.visit(r),n.push({start:Ca.startRegexp,end:Ca.endRegex});return n}catch{return[]}}o(wa,`getTerminalParts`);function Ta(e){try{return typeof e==`string`&&(e=new RegExp(e)),e=e.toString(),Ca.reset(e),Ca.visit(Sa.pattern(e)),Ca.multiline}catch{return!1}}o(Ta,`isMultilineComment`);var Ea=`\f -\r \v \xA0            \u2028\u2029   `.split(``);function Da(e){let t=typeof e==`string`?new RegExp(e):e;return Ea.some(e=>t.test(e))}o(Da,`isWhitespace`);function Oa(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}o(Oa,`escapeRegExp`);function ka(e,t){let n=Aa(e),r=t.match(n);return!!r&&r[0].length>0}o(ka,`partialMatches`);function Aa(e){typeof e==`string`&&(e=new RegExp(e));let t=e,n=e.source,r=0;function i(){let e=``,a;function s(t){e+=n.substr(r,t),r+=t}o(s,`appendRaw`);function c(t){e+=`(?:`+n.substr(r,t)+`|$)`,r+=t}for(o(c,`appendOptional`);r`,r)-r+1);break;default:c(2);break}break;case`[`:a=/\[(?:\\.|.)*?\]/g,a.lastIndex=r,a=a.exec(n)||[],c(a[0].length);break;case`|`:case`^`:case`$`:case`*`:case`+`:case`?`:s(1);break;case`{`:a=/\{\d+,?\d*\}/g,a.lastIndex=r,a=a.exec(n),a?s(a[0].length):c(1);break;case`(`:if(n[r+1]===`?`)switch(n[r+2]){case`:`:e+=`(?:`,r+=3,e+=i()+`|$)`;break;case`=`:e+=`(?=`,r+=3,e+=i()+`)`;break;case`!`:a=r,r+=3,i(),e+=n.substr(a,r-a);break;case`<`:switch(n[r+3]){case`=`:case`!`:a=r,r+=4,i(),e+=n.substr(a,r-a);break;default:s(n.indexOf(`>`,r)-r+1),e+=i()+`|$)`;break}break}else s(1),e+=i()+`|$)`;break;case`)`:return++r,e;default:c(1);break}return e}return o(i,`process`),new RegExp(i(),e.flags)}o(Aa,`partialRegExp`);function ja(e){return e.rules.find(e=>Yr(e)&&e.entry)}o(ja,`getEntryRule`);function Ma(e){return e.rules.filter(e=>hi(e)&&e.hidden)}o(Ma,`getHiddenRules`);function Na(e,t){let n=new Set,r=ja(e);if(!r)return new Set(e.rules);let i=[r].concat(Ma(e));for(let e of i)Pa(e,n,t);let a=new Set;for(let t of e.rules)(n.has(t.name)||hi(t)&&t.hidden)&&a.add(t);return a}o(Na,`getAllReachableRules`);function Pa(e,t,n){t.add(e.name),jn(e).forEach(e=>{if(ri(e)||n&&_i(e)){let r=e.rule.ref;r&&!t.has(r.name)&&Pa(r,t,n)}})}o(Pa,`ruleDfs`);function Fa(e){let t=new Set;return jn(e).forEach(e=>{pr(e)&&(Yr(e.type.ref)&&t.add(e.type.ref),Tr(e.type.ref)&&Yr(e.type.ref.$container)&&t.add(e.type.ref.$container))}),t}o(Fa,`getAllRulesUsedForCrossReferences`);function Ia(e){if(e.terminal)return e.terminal;if(e.type.ref)return Ga(e.type.ref)?.terminal}o(Ia,`getCrossReferenceTerminal`);function La(e){return e.hidden&&!Da(oo(e))}o(La,`isCommentTerminal`);function Ra(e,t){return!e||!t?[]:Ba(e,t,e.astNode,!0)}o(Ra,`findNodesForProperty`);function za(e,t,n){if(!e||!t)return;let r=Ba(e,t,e.astNode,!0);if(r.length!==0)return n=n===void 0?0:Math.max(0,Math.min(n,r.length-1)),r[n]}o(za,`findNodeForProperty`);function Ba(e,t,n,r){if(!r){let n=Tn(e.grammarSource,rr);if(n&&n.feature===t)return[e]}return pn(e)&&e.astNode===n?e.content.flatMap(e=>Ba(e,t,n,!1)):[]}o(Ba,`findNodesForPropertyInternal`);function Va(e,t){return e?Ua(e,t,e?.astNode):[]}o(Va,`findNodesForKeyword`);function Ha(e,t,n){if(!e)return;let r=Ua(e,t,e?.astNode);if(r.length!==0)return n=n===void 0?0:Math.max(0,Math.min(n,r.length-1)),r[n]}o(Ha,`findNodeForKeyword`);function Ua(e,t,n){if(e.astNode!==n)return[];if(Fr(e.grammarSource)&&e.grammarSource.value===t)return[e];let r=Ii(e).iterator(),i,a=[];do if(i=r.next(),!i.done){let e=i.value;e.astNode===n?Fr(e.grammarSource)&&e.grammarSource.value===t&&a.push(e):r.prune()}while(!i.done);return a}o(Ua,`findNodesForKeywordInternal`);function Wa(e){let t=e.astNode;for(;t===e.container?.astNode;){let t=Tn(e.grammarSource,rr);if(t)return t;e=e.container}}o(Wa,`findAssignment`);function Ga(e){let t=e;return Tr(t)&&(Yn(t.$container)?t=t.$container.$container:Un(t.$container)?t=t.$container:aa(t.$container)),Ka(e,t,new Map)}o(Ga,`findNameAssignment`);function Ka(e,t,n){function r(t,r){let i;return Tn(t,rr)||(i=Ka(r,r,n)),n.set(e,i),i}if(o(r,`go`),n.has(e))return n.get(e);n.set(e,void 0);for(let i of jn(t))if(rr(i)&&i.feature.toLowerCase()===`name`)return n.set(e,i),i;else if(ri(i)&&Yr(i.rule.ref))return r(i,i.rule.ref);else if(ai(i)&&i.typeRef?.ref)return r(i,i.typeRef.ref)}o(Ka,`findNameAssignmentInternal`);function qa(e){let t=e.$container;if(Cr(t)){let n=t.elements,r=n.indexOf(e);for(let e=r-1;e>=0;e--){let t=n[e];if(Yn(t))return t;{let t=jn(n[e]).find(Yn);if(t)return t}}}if(Vn(t))return qa(t)}o(qa,`getActionAtElement`);function Ja(e,t){return e===`?`||e===`*`||Cr(t)&&!!t.guardCondition}o(Ja,`isOptionalCardinality`);function Ya(e){return e===`*`||e===`+`}o(Ya,`isArrayCardinality`);function Xa(e){return e===`+=`}o(Xa,`isArrayOperator`);function Za(e){return Qa(e,new Set)}o(Za,`isDataTypeRule`);function Qa(e,t){if(t.has(e))return!0;t.add(e);for(let n of jn(e))if(ri(n)){if(!n.rule.ref||Yr(n.rule.ref)&&!Qa(n.rule.ref,t)||Dr(n.rule.ref))return!1}else if(rr(n))return!1;else if(Yn(n))return!1;return!!e.definition}o(Qa,`isDataTypeRuleInternal`);function $a(e){return eo(e.type,new Set)}o($a,`isDataType`);function eo(e,t){if(t.has(e))return!0;if(t.add(e),tr(e)||Zr(e))return!1;if(Ti(e))return e.types.every(e=>eo(e,t));if(ai(e)){if(e.primitiveType!==void 0||e.stringType!==void 0)return!0;if(e.typeRef!==void 0){let n=e.typeRef.ref;return yi(n)?eo(n.type,t):!1}else return!1}else return!1}o(eo,`isDataTypeInternal`);function to(e){if(!hi(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){let t=e.returnType.ref;if(t)return t.name}}}o(to,`getExplicitRuleType`);function no(e){if(Un(e))return Yr(e)&&Za(e)?e.name:to(e)??e.name;if(Nr(e)||yi(e)||ti(e))return e.name;if(Yn(e)){let t=ro(e);if(t)return t}else if(Tr(e))return e.name;throw Error(`Cannot get name of Unknown Type`)}o(no,`getTypeName`);function ro(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return no(e.type.ref)}o(ro,`getActionType`);function io(e){return hi(e)?e.type?.name??`string`:Yr(e)&&Za(e)?e.name:to(e)??e.name}o(io,`getRuleTypeName`);function ao(e){return hi(e)?e.type?.name??`string`:to(e)??e.name}o(ao,`getRuleType`);function oo(e){let t={s:!1,i:!1,u:!1},n=co(e.definition,t),r=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join(``);return new RegExp(n,r)}o(oo,`terminalRegex`);var so=`[\\s\\S]`;function co(e,t){if(li(e))return lo(e);if(pi(e))return uo(e);if(sr(e))return mo(e);if(_i(e)){let t=e.rule.ref;if(!t)throw Error(`Missing rule reference.`);return go(co(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}else if(zr(e))return po(e);else if(ki(e))return fo(e);else if($r(e)){let n=e.regex.lastIndexOf(`/`),r=e.regex.substring(1,n),i=e.regex.substring(n+1);return t&&(t.i=i.includes(`i`),t.s=i.includes(`s`),t.u=i.includes(`u`)),go(r,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}else if(Ni(e))return go(so,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});else throw Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}o(co,`abstractElementToRegex`);function lo(e){return go(e.elements.map(e=>co(e)).join(`|`),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}o(lo,`terminalAlternativesToRegex`);function uo(e){return go(e.elements.map(e=>co(e)).join(``),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}o(uo,`terminalGroupToRegex`);function fo(e){return go(`${so}*?${co(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}o(fo,`untilTokenToRegex`);function po(e){return go(`(?!${co(e.terminal)})${so}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}o(po,`negateTokenToRegex`);function mo(e){return e.right?go(`[${ho(e.left)}-${ho(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):go(ho(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}o(mo,`characterRangeToRegex`);function ho(e){return Oa(e.value)}o(ho,`keywordToRegex`);function go(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?``:`?:`)}${e})`),t.cardinality?`${e}${t.cardinality}`:e}o(go,`withCardinality`);function _o(e){let t=[],n=e.Grammar;for(let e of n.rules)hi(e)&&La(e)&&Ta(oo(e))&&t.push(e.name);return{multilineCommentRules:t,nameRegexp:Wi}}o(_o,`createGrammarConfig`);var vo=typeof global==`object`&&global&&global.Object===Object&&global,yo=typeof self==`object`&&self&&self.Object===Object&&self,bo=vo||yo||Function(`return this`)(),xo=bo.Symbol,So=Object.prototype,Co=So.hasOwnProperty,wo=So.toString,To=xo?xo.toStringTag:void 0;function Eo(e){var t=Co.call(e,To),n=e[To];try{e[To]=void 0;var r=!0}catch{}var i=wo.call(e);return r&&(t?e[To]=n:delete e[To]),i}o(Eo,`getRawTag`);var Do=Eo,Oo=Object.prototype.toString;function ko(e){return Oo.call(e)}o(ko,`objectToString`);var Ao=ko,jo=`[object Null]`,Mo=`[object Undefined]`,No=xo?xo.toStringTag:void 0;function Po(e){return e==null?e===void 0?Mo:jo:No&&No in Object(e)?Do(e):Ao(e)}o(Po,`baseGetTag`);var Fo=Po;function Io(e){return typeof e==`object`&&!!e}o(Io,`isObjectLike`);var Lo=Io,Ro=`[object Symbol]`;function zo(e){return typeof e==`symbol`||Lo(e)&&Fo(e)==Ro}o(zo,`isSymbol`);var Bo=zo;function Vo(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n0){if(++t>=Qs)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}o(tc,`shortOut`);var nc=tc;function rc(e){return function(){return e}}o(rc,`constant`);var ic=rc,ac=(function(){try{var e=Hs(Object,`defineProperty`);return e({},``,{}),e}catch{}})(),oc=nc(ac?function(e,t){return ac(e,`toString`,{configurable:!0,enumerable:!1,value:ic(t),writable:!0})}:gs);function sc(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}o(_c,`arrayIncludes`);var vc=_c,yc=9007199254740991,bc=/^(?:0|[1-9]\d*)$/;function xc(e,t){var n=typeof e;return t??=yc,!!t&&(n==`number`||n!=`symbol`&&bc.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Lc}o(Rc,`isLength`);var zc=Rc;function Bc(e){return e!=null&&zc(e.length)&&!Ss(e)}o(Bc,`isArrayLike`);var Vc=Bc;function Hc(e,t,n){if(!ts(n))return!1;var r=typeof t;return(r==`number`?Vc(n)&&Sc(t,n.length):r==`string`&&t in n)?Ec(n[t],e):!1}o(Hc,`isIterateeCall`);var Uc=Hc;function Wc(e){return Ic(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&Uc(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r-1}o(Bu,`listCacheHas`);var Vu=Bu;function Hu(e,t){var n=this.__data__,r=Pu(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}o(Hu,`listCacheSet`);var Uu=Hu;function Wu(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(s)?t>1?Pd(s,t-1,n,r,i):Ad(i,s):r||(i[i.length]=s)}return i}o(Pd,`baseFlatten`);var Fd=Pd;function Id(e){return e!=null&&e.length?Fd(e,1):[]}o(Id,`flatten`);var Ld=Id,Rd=Jl(Object.getPrototypeOf,Object);function zd(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++rs))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Lm?new jm:void 0;for(a.set(e,t),a.set(t,e);++d2?t[2]:void 0;for(i&&Uc(t[0],t[1],i)&&(r=1);++n=hg&&(a=Fm,o=!1,t=new jm(t));outer:for(;++i-1?i[a?t[s]:s]:void 0}}o(Rg,`createFind`);var zg=Rg,Bg=Math.max;function Vg(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:ms(n);return i<0&&(i=Bg(r+i,0)),uc(e,Yh(t,3),i)}o(Vg,`findIndex`);var Hg=zg(Vg);function Ug(e){return e&&e.length?e[0]:void 0}o(Ug,`head`);var Wg=Ug;function Gg(e,t){var n=-1,r=Vc(e)?Array(e.length):[];return rg(e,function(e,i,a){r[++n]=t(e,i,a)}),r}o(Gg,`baseMap`);var Kg=Gg;function qg(e,t){return(I(e)?Ho:Kg)(e,Yh(t,3))}o(qg,`map`);var B=qg;function Jg(e,t){return Fd(B(e,t),1)}o(Jg,`flatMap`);var Yg=Jg,Xg=Object.prototype.hasOwnProperty,Zg=sg(function(e,t,n){Xg.call(e,n)?e[n].push(t):wc(e,n,[t])}),Qg=Object.prototype.hasOwnProperty;function $g(e,t){return e!=null&&Qg.call(e,t)}o($g,`baseHas`);var e_=$g;function t_(e,t){return e!=null&&Fh(e,t,e_)}o(t_,`has`);var V=t_,n_=`[object String]`;function r_(e){return typeof e==`string`||!I(e)&&Lo(e)&&Fo(e)==n_}o(r_,`isString`);var i_=r_;function a_(e,t){return Ho(t,function(t){return e[t]})}o(a_,`baseValues`);var o_=a_;function s_(e){return e==null?[]:o_(e,eu(e))}o(s_,`values`);var H=s_,c_=Math.max;function l_(e,t,n,r){e=Vc(e)?e:H(e),n=n&&!r?ms(n):0;var i=e.length;return n<0&&(n=c_(i+n,0)),i_(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&gc(e,t,n)>-1}o(l_,`includes`);var u_=l_,d_=Math.max;function f_(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:ms(n);return i<0&&(i=d_(r+i,0)),gc(e,t,i)}o(f_,`indexOf`);var p_=f_,m_=`[object Map]`,h_=`[object Set]`,g_=Object.prototype.hasOwnProperty;function __(e){if(e==null)return!0;if(Vc(e)&&(I(e)||typeof e==`string`||typeof e.splice==`function`||ll(e)||Ul(e)||rl(e)))return!e.length;var t=Kf(e);if(t==m_||t==h_)return!e.size;if(Jc(e))return!Ql(e).length;for(var n in e)if(g_.call(e,n))return!1;return!0}o(__,`isEmpty`);var U=__,v_=`[object RegExp]`;function y_(e){return Lo(e)&&Fo(e)==v_}o(y_,`baseIsRegExp`);var b_=y_,x_=Vl&&Vl.isRegExp,S_=x_?Ll(x_):b_;function C_(e){return e===void 0}o(C_,`isUndefined`);var w_=C_,T_=`Expected a function`;function E_(e){if(typeof e!=`function`)throw TypeError(T_);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}o(E_,`negate`);var D_=E_;function O_(e,t,n,r){if(!ts(e))return e;t=xd(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i=G_){var l=t?null:W_(e);if(l)return Um(l);o=!1,i=Fm,c=new jm}else c=t?[]:s;outer:for(;++r{t.accept(e)})}},rv=class extends nv{static{o(this,`NonTerminal`)}constructor(e){super([]),this.idx=1,nu(this,N_(e,e=>e!==void 0))}set definition(e){}get definition(){return this.referencedRule===void 0?[]:this.referencedRule.definition}accept(e){e.visit(this)}},iv=class extends nv{static{o(this,`Rule`)}constructor(e){super(e.definition),this.orgText=``,nu(this,N_(e,e=>e!==void 0))}},av=class extends nv{static{o(this,`Alternative`)}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,nu(this,N_(e,e=>e!==void 0))}},ov=class extends nv{static{o(this,`Option`)}constructor(e){super(e.definition),this.idx=1,nu(this,N_(e,e=>e!==void 0))}},sv=class extends nv{static{o(this,`RepetitionMandatory`)}constructor(e){super(e.definition),this.idx=1,nu(this,N_(e,e=>e!==void 0))}},cv=class extends nv{static{o(this,`RepetitionMandatoryWithSeparator`)}constructor(e){super(e.definition),this.idx=1,nu(this,N_(e,e=>e!==void 0))}},W=class extends nv{static{o(this,`Repetition`)}constructor(e){super(e.definition),this.idx=1,nu(this,N_(e,e=>e!==void 0))}},lv=class extends nv{static{o(this,`RepetitionWithSeparator`)}constructor(e){super(e.definition),this.idx=1,nu(this,N_(e,e=>e!==void 0))}},uv=class extends nv{static{o(this,`Alternation`)}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,nu(this,N_(e,e=>e!==void 0))}},G=class{static{o(this,`Terminal`)}constructor(e){this.idx=1,nu(this,N_(e,e=>e!==void 0))}accept(e){e.visit(this)}};function dv(e){return B(e,fv)}o(dv,`serializeGrammar`);function fv(e){function t(e){return B(e,fv)}if(o(t,`convertDefinition`),e instanceof rv){let t={type:`NonTerminal`,name:e.nonTerminalName,idx:e.idx};return i_(e.label)&&(t.label=e.label),t}else if(e instanceof av)return{type:`Alternative`,definition:t(e.definition)};else if(e instanceof ov)return{type:`Option`,idx:e.idx,definition:t(e.definition)};else if(e instanceof sv)return{type:`RepetitionMandatory`,idx:e.idx,definition:t(e.definition)};else if(e instanceof cv)return{type:`RepetitionMandatoryWithSeparator`,idx:e.idx,separator:fv(new G({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof lv)return{type:`RepetitionWithSeparator`,idx:e.idx,separator:fv(new G({terminalType:e.separator})),definition:t(e.definition)};else if(e instanceof W)return{type:`Repetition`,idx:e.idx,definition:t(e.definition)};else if(e instanceof uv)return{type:`Alternation`,idx:e.idx,definition:t(e.definition)};else if(e instanceof G){let t={type:`Terminal`,name:e.terminalType.name,label:ev(e.terminalType),idx:e.idx};i_(e.label)&&(t.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=S_(n)?n.source:n),t}else if(e instanceof iv)return{type:`Rule`,name:e.name,orgText:e.orgText,definition:t(e.definition)};else throw Error(`non exhaustive match`)}o(fv,`serializeProduction`);var pv=class{static{o(this,`GAstVisitor`)}visit(e){let t=e;switch(t.constructor){case rv:return this.visitNonTerminal(t);case av:return this.visitAlternative(t);case ov:return this.visitOption(t);case sv:return this.visitRepetitionMandatory(t);case cv:return this.visitRepetitionMandatoryWithSeparator(t);case lv:return this.visitRepetitionWithSeparator(t);case W:return this.visitRepetition(t);case uv:return this.visitAlternation(t);case G:return this.visitTerminal(t);case iv:return this.visitRule(t);default:throw Error(`non exhaustive match`)}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}};function mv(e){return e instanceof av||e instanceof ov||e instanceof W||e instanceof sv||e instanceof cv||e instanceof lv||e instanceof G||e instanceof iv}o(mv,`isSequenceProd`);function hv(e,t=[]){return e instanceof ov||e instanceof W||e instanceof lv?!0:e instanceof uv?U_(e.definition,e=>hv(e,t)):e instanceof rv&&u_(t,e)?!1:e instanceof nv?(e instanceof rv&&t.push(e),Ng(e.definition,e=>hv(e,t))):!1}o(hv,`isOptionalProd`);function gv(e){return e instanceof uv}o(gv,`isBranchingProd`);function _v(e){if(e instanceof rv)return`SUBRULE`;if(e instanceof ov)return`OPTION`;if(e instanceof uv)return`OR`;if(e instanceof sv)return`AT_LEAST_ONE`;if(e instanceof cv)return`AT_LEAST_ONE_SEP`;if(e instanceof lv)return`MANY_SEP`;if(e instanceof W)return`MANY`;if(e instanceof G)return`CONSUME`;throw Error(`non exhaustive match`)}o(_v,`getProductionDslName`);var vv=class{static{o(this,`RestWalker`)}walk(e,t=[]){z(e.definition,(n,r)=>{let i=Sg(e.definition,r+1);if(n instanceof rv)this.walkProdRef(n,i,t);else if(n instanceof G)this.walkTerminal(n,i,t);else if(n instanceof av)this.walkFlat(n,i,t);else if(n instanceof ov)this.walkOption(n,i,t);else if(n instanceof sv)this.walkAtLeastOne(n,i,t);else if(n instanceof cv)this.walkAtLeastOneSep(n,i,t);else if(n instanceof lv)this.walkManySep(n,i,t);else if(n instanceof W)this.walkMany(n,i,t);else if(n instanceof uv)this.walkOr(n,i,t);else throw Error(`non exhaustive match`)})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){let r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){let r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){let r=[new ov({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){let r=yv(e,t,n);this.walk(e,r)}walkMany(e,t,n){let r=[new ov({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){let r=yv(e,t,n);this.walk(e,r)}walkOr(e,t,n){let r=t.concat(n);z(e.definition,e=>{let t=new av({definition:[e]});this.walk(t,r)})}};function yv(e,t,n){return[new ov({definition:[new G({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}o(yv,`restForRepetitionWithSeparator`);function bv(e){if(e instanceof rv)return bv(e.referencedRule);if(e instanceof G)return Cv(e);if(mv(e))return xv(e);if(gv(e))return Sv(e);throw Error(`non exhaustive match`)}o(bv,`first`);function xv(e){let t=[],n=e.definition,r=0,i=n.length>r,a,o=!0;for(;i&&o;)a=n[r],o=hv(a),t=t.concat(bv(a)),r+=1,i=n.length>r;return Y_(t)}o(xv,`firstForSequence`);function Sv(e){return Y_(Ld(B(e.definition,e=>bv(e))))}o(Sv,`firstForBranching`);function Cv(e){return[e.terminalType]}o(Cv,`firstForTerminal`);var wv=`_~IN~_`,Tv=class extends vv{static{o(this,`ResyncFollowsWalker`)}constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){let r=Dv(e.referencedRule,e.idx)+this.topProd.name,i=bv(new av({definition:t.concat(n)}));this.follows[r]=i}};function Ev(e){let t={};return z(e,e=>{let n=new Tv(e).startWalking();nu(t,n)}),t}o(Ev,`computeAllProdsFollows`);function Dv(e,t){return e.name+t+wv}o(Dv,`buildBetweenProdsFollowPrefix`);var Ov={},kv=new ya;function Av(e){let t=e.toString();if(Ov.hasOwnProperty(t))return Ov[t];{let e=kv.pattern(t);return Ov[t]=e,e}}o(Av,`getRegExpAst`);function jv(){Ov={}}o(jv,`clearRegExpParserCache`);var Mv=`Complement Sets are not supported for first char optimization`,Nv=`Unable to use "first char" lexer optimizations: -`;function Pv(e,t=!1){try{let t=Av(e);return Fv(t.value,{},t.flags.ignoreCase)}catch(n){if(n.message===Mv)t&&Z_(`${Nv} Unable to optimize: < ${e.toString()} > - Complement Sets cannot be automatically optimized. - This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n=``;t&&(n=` - This will disable the lexer's first char optimizations. - See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),X_(`${Nv} - Failed parsing: < ${e.toString()} > - Using the @chevrotain/regexp-to-ast library - Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}o(Pv,`getOptimizedStartCodesIndices`);function Fv(e,t,n){switch(e.type){case`Disjunction`:for(let r=0;r{if(typeof e==`number`)Iv(e,t,n);else{let r=e;if(n===!0)for(let e=r.from;e<=r.to;e++)Iv(e,t,n);else{for(let e=r.from;e<=r.to&&e=by){let e=r.from>=by?r.from:by,n=r.to,i=Sy(e),a=Sy(n);for(let e=i;e<=a;e++)t[e]=e}}}});break;case`Group`:Fv(a.value,t,n);break;default:throw Error(`Non Exhaustive Match`)}let o=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type===`Group`&&zv(a)===!1||a.type!==`Group`&&o===!1)break}break;default:throw Error(`non exhaustive match!`)}return H(t)}o(Fv,`firstCharOptimizedIndices`);function Iv(e,t,n){let r=Sy(e);t[r]=r,n===!0&&Lv(e,t)}o(Iv,`addOptimizedIdxToResult`);function Lv(e,t){let n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){let e=Sy(r.charCodeAt(0));t[e]=e}else{let e=n.toLowerCase();if(e!==n){let n=Sy(e.charCodeAt(0));t[n]=n}}}o(Lv,`handleIgnoreCase`);function Rv(e,t){return Hg(e.value,e=>{if(typeof e==`number`)return u_(t,e);{let n=e;return Hg(t,e=>n.from<=e&&e<=n.to)!==void 0}})}o(Rv,`findCode`);function zv(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?I(e.value)?Ng(e.value,zv):zv(e.value):!1}o(zv,`isWholeOptional`);var Bv=class extends ba{static{o(this,`CharCodeFinder`)}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case`Lookahead`:this.visitLookahead(e);return;case`NegativeLookahead`:this.visitNegativeLookahead(e);return;case`Lookbehind`:this.visitLookbehind(e);return;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){u_(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?Rv(e,this.targetCharCodes)===void 0&&(this.found=!0):Rv(e,this.targetCharCodes)!==void 0&&(this.found=!0)}};function Vv(e,t){if(t instanceof RegExp){let n=Av(t),r=new Bv(e);return r.visit(n),r.found}else return Hg(t,t=>u_(e,t.charCodeAt(0)))!==void 0}o(Vv,`canMatchCharCode`);var Hv=`PATTERN`,Uv=`defaultMode`,Wv=`modes`;function Gv(e,t){t=ug(t,{debug:!1,safeMode:!1,positionTracking:`full`,lineTerminatorCharacters:[`\r`,` -`],tracer:o((e,t)=>t(),`tracer`)});let n=t.tracer;n(`initCharCodeToOptimizedIndexMap`,()=>{Cy()});let r;n(`Reject Lexer.NA`,()=>{r=z_(e,e=>e[Hv]===Vy.NA)});let i=!1,a;n(`Transform Patterns`,()=>{i=!1,a=B(r,e=>{let t=e[Hv];if(S_(t)){let e=t.source;return e.length===1&&e!==`^`&&e!==`$`&&e!==`.`&&!t.ignoreCase?e:e.length===2&&e[0]===`\\`&&!u_([`d`,`D`,`s`,`S`,`t`,`r`,`n`,`t`,`0`,`c`,`b`,`B`,`f`,`v`,`w`,`W`],e[1])?e[1]:ly(t)}else if(Ss(t))return i=!0,{exec:t};else if(typeof t==`object`)return i=!0,t;else if(typeof t==`string`){if(t.length===1)return t;{let e=t.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`);return ly(new RegExp(e))}}else throw Error(`non exhaustive match`)})});let s,c,l,u,d;n(`misc mapping`,()=>{s=B(r,e=>e.tokenTypeIdx),c=B(r,e=>{let t=e.GROUP;if(t!==Vy.SKIPPED){if(i_(t))return t;if(w_(t))return!1;throw Error(`non exhaustive match`)}}),l=B(r,e=>{let t=e.LONGER_ALT;if(t)return I(t)?B(t,e=>p_(r,e)):[p_(r,t)]}),u=B(r,e=>e.PUSH_MODE),d=B(r,e=>V(e,`POP_MODE`))});let f;n(`Line Terminator Handling`,()=>{let e=vy(t.lineTerminatorCharacters);f=B(r,e=>!1),t.positionTracking!==`onlyOffset`&&(f=B(r,t=>V(t,`LINE_BREAKS`)?!!t.LINE_BREAKS:gy(t,e)===!1&&Vv(e,t.PATTERN)))});let p,m,h,g;n(`Misc Mapping #2`,()=>{p=B(r,py),m=B(a,my),h=L_(r,(e,t)=>{let n=t.GROUP;return i_(n)&&n!==Vy.SKIPPED&&(e[n]=[]),e},{}),g=B(a,(e,t)=>({pattern:a[t],longerAlt:l[t],canLineTerminator:f[t],isCustom:p[t],short:m[t],group:c[t],push:u[t],pop:d[t],tokenTypeIdx:s[t],tokenType:r[t]}))});let _=!0,v=[];return t.safeMode||n(`First Char Optimization`,()=>{v=L_(r,(e,n,r)=>{if(typeof n.PATTERN==`string`)yy(e,Sy(n.PATTERN.charCodeAt(0)),g[r]);else if(I(n.START_CHARS_HINT)){let t;z(n.START_CHARS_HINT,n=>{let i=Sy(typeof n==`string`?n.charCodeAt(0):n);t!==i&&(t=i,yy(e,i,g[r]))})}else if(S_(n.PATTERN))if(n.PATTERN.unicode)_=!1,t.ensureOptimizations&&X_(`${Nv} Unable to analyze < ${n.PATTERN.toString()} > pattern. - The regexp unicode flag is not currently supported by the regexp-to-ast library. - This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let i=Pv(n.PATTERN,t.ensureOptimizations);U(i)&&(_=!1),z(i,t=>{yy(e,t,g[r])})}else t.ensureOptimizations&&X_(`${Nv} TokenType: <${n.name}> is using a custom token pattern without providing parameter. - This will disable the lexer's first char optimizations. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),_=!1;return e},[])}),{emptyGroups:h,patternIdxToConfig:g,charCodeToPatternIdxToConfig:v,hasCustom:i,canBeOptimized:_}}o(Gv,`analyzeTokenTypes`);function Kv(e,t){let n=[],r=Jv(e);n=n.concat(r.errors);let i=Yv(r.valid),a=i.valid;return n=n.concat(i.errors),n=n.concat(qv(a)),n=n.concat(ry(a)),n=n.concat(iy(a,t)),n=n.concat(ay(a)),n}o(Kv,`validatePatterns`);function qv(e){let t=[],n=Lg(e,e=>S_(e[Hv]));return t=t.concat(Zv(n)),t=t.concat(ey(n)),t=t.concat(ty(n)),t=t.concat(ny(n)),t=t.concat(Qv(n)),t}o(qv,`validateRegExpPattern`);function Jv(e){let t=Lg(e,e=>!V(e,Hv));return{errors:B(t,e=>({message:`Token Type: ->`+e.name+`<- missing static 'PATTERN' property`,type:K.MISSING_PATTERN,tokenTypes:[e]})),valid:vg(e,t)}}o(Jv,`findMissingPatterns`);function Yv(e){let t=Lg(e,e=>{let t=e[Hv];return!S_(t)&&!Ss(t)&&!V(t,`exec`)&&!i_(t)});return{errors:B(t,e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.`,type:K.INVALID_PATTERN,tokenTypes:[e]})),valid:vg(e,t)}}o(Yv,`findInvalidPatterns`);var Xv=/[^\\][$]/;function Zv(e){class t extends ba{static{o(this,`EndAnchorFinder`)}constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return B(Lg(e,e=>{let n=e.PATTERN;try{let e=Av(n),r=new t;return r.visit(e),r.found}catch{return Xv.test(n.source)}}),e=>({message:`Unexpected RegExp Anchor Error: - Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$' - See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:K.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}o(Zv,`findEndOfInputAnchor`);function Qv(e){return B(Lg(e,e=>e.PATTERN.test(``)),e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' must not match an empty string`,type:K.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}o(Qv,`findEmptyMatchRegExps`);var $v=/[^\\[][\^]|^\^/;function ey(e){class t extends ba{static{o(this,`StartAnchorFinder`)}constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return B(Lg(e,e=>{let n=e.PATTERN;try{let e=Av(n),r=new t;return r.visit(e),r.found}catch{return $v.test(n.source)}}),e=>({message:`Unexpected RegExp Anchor Error: - Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^' - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:K.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}o(ey,`findStartOfInputAnchor`);function ty(e){return B(Lg(e,e=>{let t=e[Hv];return t instanceof RegExp&&(t.multiline||t.global)}),e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' may NOT contain global('g') or multiline('m')`,type:K.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}o(ty,`findUnsupportedFlags`);function ny(e){let t=[],n=B(e,n=>L_(e,(e,r)=>n.PATTERN.source===r.PATTERN.source&&!u_(t,r)&&r.PATTERN!==Vy.NA?(t.push(r),e.push(r),e):e,[]));return n=wm(n),B(Lg(n,e=>e.length>1),e=>{let t=B(e,e=>e.name);return{message:`The same RegExp pattern ->${Wg(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(`, `)} <-`,type:K.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}o(ny,`findDuplicatePatterns`);function ry(e){return B(Lg(e,e=>{if(!V(e,`GROUP`))return!1;let t=e.GROUP;return t!==Vy.SKIPPED&&t!==Vy.NA&&!i_(t)}),e=>({message:`Token Type: ->`+e.name+`<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String`,type:K.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}o(ry,`findInvalidGroupType`);function iy(e,t){return B(Lg(e,e=>e.PUSH_MODE!==void 0&&!u_(t,e.PUSH_MODE)),e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:K.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}o(iy,`findModesThatDoNotExist`);function ay(e){let t=[],n=L_(e,(e,t,n)=>{let r=t.PATTERN;return r===Vy.NA||(i_(r)?e.push({str:r,idx:n,tokenType:t}):S_(r)&&sy(r)&&e.push({str:r.source,idx:n,tokenType:t})),e},[]);return z(e,(e,r)=>{z(n,({str:n,idx:i,tokenType:a})=>{if(r${a.name}<- can never be matched. -Because it appears AFTER the Token Type ->${e.name}<-in the lexer's definition. -See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:K.UNREACHABLE_PATTERN,tokenTypes:[e,a]})}})}),t}o(ay,`findUnreachablePatterns`);function oy(e,t){if(S_(t)){if(cy(t))return!1;let n=t.exec(e);return n!==null&&n.index===0}else if(Ss(t))return t(e,0,[],{});else if(V(t,`exec`))return t.exec(e,0,[],{});else if(typeof t==`string`)return t===e;else throw Error(`non exhaustive match`)}o(oy,`tryToMatchStrToPattern`);function sy(e){return Hg([`.`,`\\`,`[`,`]`,`|`,`^`,`$`,`(`,`)`,`?`,`*`,`+`,`{`],t=>e.source.indexOf(t)!==-1)===void 0}o(sy,`noMetaChar`);function cy(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\? property in its definition -`,type:K.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),V(e,Wv)||r.push({message:`A MultiMode Lexer cannot be initialized without a <`+Wv+`> property in its definition -`,type:K.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),V(e,Wv)&&V(e,Uv)&&!V(e.modes,e.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${Uv}: <${e.defaultMode}>which does not exist -`,type:K.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),V(e,Wv)&&z(e.modes,(e,t)=>{z(e,(n,i)=>{w_(n)?r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${t}> at index: <${i}> -`,type:K.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):V(n,`LONGER_ALT`)&&z(I(n.LONGER_ALT)?n.LONGER_ALT:[n.LONGER_ALT],i=>{!w_(i)&&!u_(e,i)&&r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${n.name}> outside of mode <${t}> -`,type:K.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})})}),r}o(uy,`performRuntimeChecks`);function dy(e,t,n){let r=[],i=!1,a=z_(wm(Ld(H(e.modes))),e=>e[Hv]===Vy.NA),o=vy(n);return t&&z(a,e=>{let t=gy(e,o);if(t!==!1){let n={message:_y(e,t),type:t.issue,tokenType:e};r.push(n)}else V(e,`LINE_BREAKS`)?e.LINE_BREAKS===!0&&(i=!0):Vv(o,e.PATTERN)&&(i=!0)}),t&&!i&&r.push({message:`Warning: No LINE_BREAKS Found. - This Lexer has been defined to track line and column information, - But none of the Token Types can be identified as matching a line terminator. - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS - for details.`,type:K.NO_LINE_BREAKS_FLAGS}),r}o(dy,`performWarningRuntimeChecks`);function fy(e){let t={};return z(eu(e),n=>{let r=e[n];if(I(r))t[n]=[];else throw Error(`non exhaustive match`)}),t}o(fy,`cloneEmptyGroups`);function py(e){let t=e.PATTERN;if(S_(t))return!1;if(Ss(t)||V(t,`exec`))return!0;if(i_(t))return!1;throw Error(`non exhaustive match`)}o(py,`isCustomPattern`);function my(e){return i_(e)&&e.length===1?e.charCodeAt(0):!1}o(my,`isShortPattern`);var hy={test:o(function(e){let t=e.length;for(let n=this.lastIndex;n Token Type - Root cause: ${t.errMsg}. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===K.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. - The problem is in the <${e.name}> Token Type - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error(`non exhaustive match`)}o(_y,`buildLineBreakIssueMessage`);function vy(e){return B(e,e=>i_(e)?e.charCodeAt(0):e)}o(vy,`getCharCodes`);function yy(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}o(yy,`addToMapOfArrays`);var by=256,xy=[];function Sy(e){return e255?255+~~(e/255):e}}o(Cy,`initCharCodeToOptimizedIndexMap`);function wy(e,t){let n=e.tokenTypeIdx;return n===t.tokenTypeIdx||t.isParent===!0&&t.categoryMatchesMap[n]===!0}o(wy,`tokenStructuredMatcher`);function Ty(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}o(Ty,`tokenStructuredMatcherNoCategories`);var Ey=1,Dy={};function Oy(e){let t=ky(e);Ay(t),My(t),jy(t),z(t,e=>{e.isParent=e.categoryMatches.length>0})}o(Oy,`augmentTokenTypes`);function ky(e){let t=Sm(e),n=e,r=!0;for(;r;){n=wm(Ld(B(n,e=>e.CATEGORIES)));let e=vg(n,t);t=t.concat(e),U(e)?r=!1:n=e}return t}o(ky,`expandCategories`);function Ay(e){z(e,e=>{Py(e)||(Dy[Ey]=e,e.tokenTypeIdx=Ey++),Fy(e)&&!I(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Fy(e)||(e.CATEGORIES=[]),Iy(e)||(e.categoryMatches=[]),Ly(e)||(e.categoryMatchesMap={})})}o(Ay,`assignTokenDefaultProps`);function jy(e){z(e,e=>{e.categoryMatches=[],z(e.categoryMatchesMap,(t,n)=>{e.categoryMatches.push(Dy[n].tokenTypeIdx)})})}o(jy,`assignCategoriesTokensProp`);function My(e){z(e,e=>{Ny([],e)})}o(My,`assignCategoriesMapProp`);function Ny(e,t){z(e,e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),z(t.CATEGORIES,n=>{let r=e.concat(t);u_(r,n)||Ny(r,n)})}o(Ny,`singleAssignCategoriesToksMap`);function Py(e){return V(e,`tokenTypeIdx`)}o(Py,`hasShortKeyProperty`);function Fy(e){return V(e,`CATEGORIES`)}o(Fy,`hasCategoriesProperty`);function Iy(e){return V(e,`categoryMatches`)}o(Iy,`hasExtendingTokensTypesProperty`);function Ly(e){return V(e,`categoryMatchesMap`)}o(Ly,`hasExtendingTokensTypesMapProperty`);function Ry(e){return V(e,`tokenTypeIdx`)}o(Ry,`isTokenType`);var zy={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,n,r,i,a){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`}},K;(function(e){e[e.MISSING_PATTERN=0]=`MISSING_PATTERN`,e[e.INVALID_PATTERN=1]=`INVALID_PATTERN`,e[e.EOI_ANCHOR_FOUND=2]=`EOI_ANCHOR_FOUND`,e[e.UNSUPPORTED_FLAGS_FOUND=3]=`UNSUPPORTED_FLAGS_FOUND`,e[e.DUPLICATE_PATTERNS_FOUND=4]=`DUPLICATE_PATTERNS_FOUND`,e[e.INVALID_GROUP_TYPE_FOUND=5]=`INVALID_GROUP_TYPE_FOUND`,e[e.PUSH_MODE_DOES_NOT_EXIST=6]=`PUSH_MODE_DOES_NOT_EXIST`,e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]=`MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE`,e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]=`MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY`,e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]=`MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST`,e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]=`LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED`,e[e.SOI_ANCHOR_FOUND=11]=`SOI_ANCHOR_FOUND`,e[e.EMPTY_MATCH_PATTERN=12]=`EMPTY_MATCH_PATTERN`,e[e.NO_LINE_BREAKS_FLAGS=13]=`NO_LINE_BREAKS_FLAGS`,e[e.UNREACHABLE_PATTERN=14]=`UNREACHABLE_PATTERN`,e[e.IDENTIFY_TERMINATOR=15]=`IDENTIFY_TERMINATOR`,e[e.CUSTOM_LINE_BREAK=16]=`CUSTOM_LINE_BREAK`,e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]=`MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE`})(K||={});var By={deferDefinitionErrorsHandling:!1,positionTracking:`full`,lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` -`,`\r`],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:zy,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(By);var Vy=class{static{o(this,`Lexer`)}constructor(e,t=By){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent <${e}>`);let{time:r,value:i}=Q_(t),a=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}else return t()},typeof t==`boolean`)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. -a boolean 2nd argument is no longer supported`);this.config=nu({},By,t);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n==`number`&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT(`Lexer Constructor`,()=>{let n,r=!0;this.TRACE_INIT(`Lexer Config handling`,()=>{if(this.config.lineTerminatorsPattern===By.lineTerminatorsPattern)this.config.lineTerminatorsPattern=hy;else if(this.config.lineTerminatorCharacters===By.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error(`"safeMode" and "ensureOptimizations" flags are mutually exclusive.`);this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),I(e)?n={modes:{defaultMode:Sm(e)},defaultMode:Uv}:(r=!1,n=Sm(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT(`performRuntimeChecks`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(uy(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT(`performWarningRuntimeChecks`,()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(dy(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},z(n.modes,(e,t)=>{n.modes[t]=z_(e,e=>w_(e))});let i=eu(n.modes);if(z(n.modes,(e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,()=>{if(this.modes.push(n),this.config.skipValidations===!1&&this.TRACE_INIT(`validatePatterns`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(Kv(e,i))}),U(this.lexerDefinitionErrors)){Oy(e);let r;this.TRACE_INIT(`analyzeTokenTypes`,()=>{r=Gv(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[n]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig,this.emptyGroups=nu({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=r.canBeOptimized}})}),this.defaultMode=n.defaultMode,!U(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let e=B(this.lexerDefinitionErrors,e=>e.message).join(`----------------------- -`);throw Error(`Errors detected in definition of Lexer: -`+e)}z(this.lexerDefinitionWarning,e=>{Z_(e.message)}),this.TRACE_INIT(`Choosing sub-methods implementations`,()=>{if(r&&(this.handleModes=Ys),this.trackStartLines===!1&&(this.computeNewColumn=gs),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Ys),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT(`Failed Optimization Warnings`,()=>{let e=L_(this.canModeBeOptimized,(e,t,n)=>(t===!1&&e.push(n),e),[]);if(t.ensureOptimizations&&!U(e))throw Error(`Lexer Modes: < ${e.join(`, `)} > cannot be optimized. - Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. - Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT(`clearRegExpParserCache`,()=>{jv()}),this.TRACE_INIT(`toFastProperties`,()=>{$_(this)})})}tokenize(e,t=this.defaultMode){if(!U(this.lexerDefinitionErrors)){let e=B(this.lexerDefinitionErrors,e=>e.message).join(`----------------------- -`);throw Error(`Unable to Tokenize because Errors detected in definition of Lexer: -`+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,a,s,c,l,u,d,f,p,m,h,g,_,v=e,y=v.length,b=0,x=0,ee=this.hasCustom?0:Math.floor(e.length/10),S=Array(ee),te=[],ne=this.trackStartLines?1:void 0,C=this.trackStartLines?1:void 0,re=fy(this.emptyGroups),ie=this.trackStartLines,ae=this.config.lineTerminatorsPattern,oe=0,se=[],ce=[],le=[],ue=[];Object.freeze(ue);let de=!1,w=o(e=>{if(le.length===1&&e.tokenType.PUSH_MODE===void 0){let t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);te.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{le.pop();let e=bg(le);se=this.patternIdxToConfig[e],ce=this.charCodeToPatternIdxToConfig[e],oe=se.length;let t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;de=!!(ce&&t)}},`pop_mode`);function T(e){le.push(e),ce=this.charCodeToPatternIdxToConfig[e],se=this.patternIdxToConfig[e],oe=se.length,oe=se.length;let t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;de=!!(ce&&t)}o(T,`push_mode`),T.call(this,t);let E,D=this.config.recoveryEnabled;for(;bc.length){c=a,d=a.length,l=u,E=t;break}}}break}}if(d!==-1){if(f=E.group,f!==void 0&&(c=c===null?e.substring(b,b+d):c,p=E.tokenTypeIdx,m=this.createTokenInstance(c,b,p,E.tokenType,ne,C,d),this.handlePayload(m,l),f===!1?x=this.addToken(S,x,m):re[f].push(m)),ie===!0&&E.canLineTerminator===!0){let t=0,n,r;ae.lastIndex=0;do c=c===null?e.substring(b,b+d):c,n=ae.test(c),n===!0&&(r=ae.lastIndex-1,t++);while(n===!0);t===0?C=this.computeNewColumn(C,d):(ne+=t,C=d-r,this.updateTokenEndLineColumnLocation(m,f,r,t,ne,C,d))}else C=this.computeNewColumn(C,d);b+=d,this.handleModes(E,w,T,m)}else{let t=b,n=ne,i=C,a=D===!1;for(;a===!1&&b ${Hy(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return`Redundant input, expecting EOF but found: `+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){let a=` -but found: '`+Wg(t).image+`'`;return r?`Expecting: `+r+a:`Expecting: one of these possible Token sequences: -${B(B(L_(e,(e,t)=>e.concat(t),[]),e=>`[${B(e,e=>Hy(e)).join(`, `)}]`),(e,t)=>` ${t+1}. ${e}`).join(` -`)}`+a},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){let i=` -but found: '`+Wg(t).image+`'`;return n?`Expecting: `+n+i:`Expecting: expecting at least one iteration which starts with one of these possible Token sequences:: - <${B(e,e=>`[${B(e,e=>Hy(e)).join(`,`)}]`).join(` ,`)}>`+i}};Object.freeze(ib);var ab={buildRuleNotFoundError(e,t){return`Invalid grammar, reference to a rule which is not defined: ->`+t.nonTerminalName+`<- -inside top level rule: ->`+e.name+`<-`}},ob={buildDuplicateFoundError(e,t){function n(e){return e instanceof G?e.terminalType.name:e instanceof rv?e.nonTerminalName:``}o(n,`getExtraProductionArgument`);let r=e.name,i=Wg(t),a=i.idx,s=_v(i),c=n(i),l=`->${s}${a>0?a:``}<- ${c?`with argument: ->${c}<-`:``} - appears more than once (${t.length} times) in the top level rule: ->${r}<-. - For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES - `;return l=l.replace(/[ \t]+/g,` `),l=l.replace(/\s\s+/g,` -`),l},buildNamespaceConflictError(e){return`Namespace conflict found in grammar. -The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>. -To resolve this make sure each Terminal and Non-Terminal names are unique -This is easy to accomplish by using the convention that Terminal names start with an uppercase letter -and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=B(e.prefixPath,e=>Hy(e)).join(`, `),n=e.alternation.idx===0?``:e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(` ,`)}> due to common lookahead prefix -in inside <${e.topLevelRule.name}> Rule, -<${t}> may appears as a prefix path in all these alternatives. -See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX -For Further details.`},buildAlternationAmbiguityError(e){let t=e.alternation.idx===0?``:e.alternation.idx,n=e.prefixPath.length===0,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(` ,`)}> in inside <${e.topLevelRule.name}> Rule, -`;if(n)r+=`These alternatives are all empty (match no tokens), making them indistinguishable. -Only the last alternative may be empty. -`;else{let t=B(e.prefixPath,e=>Hy(e)).join(`, `);r+=`<${t}> may appears as a prefix path in all these alternatives. -`}return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES -For Further details.`,r},buildEmptyRepetitionError(e){let t=_v(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens. -This could lead to an infinite loop.`},buildTokenNameError(e){return`deprecated`},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in inside <${e.topLevelRule.name}> Rule. -Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives: - inside <${e.topLevelRule.name}> Rule. - has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name;return`Left Recursion found in grammar. -rule: <${t}> can be invoked from itself (directly or indirectly) -without consuming any Tokens. The grammar path that causes this is: - ${`${t} --> ${B(e.leftRecursionPath,e=>e.name).concat([t]).join(` --> `)}`} - To fix this refactor your grammar to remove the left recursion. -see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return`deprecated`},buildDuplicateRuleNameError(e){let t;return t=e.topLevelRule instanceof iv?e.topLevelRule.name:e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function sb(e,t){let n=new cb(e,t);return n.resolveRefs(),n.errors}o(sb,`resolveGrammar`);var cb=class extends pv{static{o(this,`GastRefResolverVisitor`)}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){z(H(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:pS.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},lb=class extends vv{static{o(this,`AbstractNextPossibleTokensWalker`)}constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName=``,this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error(`The path does not start with the walker's top Rule!`);return this.ruleStack=Sm(this.path.ruleStack).reverse(),this.occurrenceStack=Sm(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}}updateExpectedNext(){U(this.ruleStack)?(this.nextProductionName=``,this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},ub=class extends lb{static{o(this,`NextAfterTokenWalker`)}constructor(e,t){super(e,t),this.path=t,this.nextTerminalName=``,this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let e=new av({definition:t.concat(n)});this.possibleTokTypes=bv(e),this.found=!0}}},db=class extends vv{static{o(this,`AbstractNextTerminalAfterProductionWalker`)}constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},fb=class extends db{static{o(this,`NextTerminalAfterManyWalker`)}walkMany(e,t,n){if(e.idx===this.occurrence){let e=Wg(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof G&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,n)}},pb=class extends db{static{o(this,`NextTerminalAfterManySepWalker`)}walkManySep(e,t,n){if(e.idx===this.occurrence){let e=Wg(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof G&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,n)}},mb=class extends db{static{o(this,`NextTerminalAfterAtLeastOneWalker`)}walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){let e=Wg(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof G&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,n)}},hb=class extends db{static{o(this,`NextTerminalAfterAtLeastOneSepWalker`)}walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){let e=Wg(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof G&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,n)}};function gb(e,t,n=[]){n=Sm(n);let r=[],i=0;function a(t){return t.concat(Sg(e,i+1))}o(a,`remainingPathWith`);function s(e){let i=gb(a(e),t,n);return r.concat(i)}for(o(s,`getAlternativesForProd`);n.length{U(e.definition)===!1&&(r=s(e.definition))}),r;else if(t instanceof G)n.push(t.terminalType);else throw Error(`non exhaustive match`);i++}return r.push({partialPath:n,suffixDef:Sg(e,i)}),r}o(gb,`possiblePathsFrom`);function _b(e,t,n,r){let i=`EXIT_NONE_TERMINAL`,a=[i],o=`EXIT_ALTERNATIVE`,s=!1,c=t.length,l=c-r-1,u=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!U(d);){let e=d.pop();if(e===o){s&&bg(d).idx<=l&&d.pop();continue}let r=e.def,f=e.idx,p=e.ruleStack,m=e.occurrenceStack;if(U(r))continue;let h=r[0];if(h===i){let e={idx:f,def:Sg(r),ruleStack:wg(p),occurrenceStack:wg(m)};d.push(e)}else if(h instanceof G)if(f=0;e--){let t={idx:f,def:h.definition[e].definition.concat(Sg(r)),ruleStack:p,occurrenceStack:m};d.push(t),d.push(o)}else if(h instanceof av)d.push({idx:f,def:h.definition.concat(Sg(r)),ruleStack:p,occurrenceStack:m});else if(h instanceof iv)d.push(vb(h,f,p,m));else throw Error(`non exhaustive match`)}return u}o(_b,`nextPossibleTokensAfter`);function vb(e,t,n,r){let i=Sm(n);i.push(e.name);let a=Sm(r);return a.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:a}}o(vb,`expandTopLevelRule`);var q;(function(e){e[e.OPTION=0]=`OPTION`,e[e.REPETITION=1]=`REPETITION`,e[e.REPETITION_MANDATORY=2]=`REPETITION_MANDATORY`,e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]=`REPETITION_MANDATORY_WITH_SEPARATOR`,e[e.REPETITION_WITH_SEPARATOR=4]=`REPETITION_WITH_SEPARATOR`,e[e.ALTERNATION=5]=`ALTERNATION`})(q||={});function yb(e){if(e instanceof ov||e===`Option`)return q.OPTION;if(e instanceof W||e===`Repetition`)return q.REPETITION;if(e instanceof sv||e===`RepetitionMandatory`)return q.REPETITION_MANDATORY;if(e instanceof cv||e===`RepetitionMandatoryWithSeparator`)return q.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof lv||e===`RepetitionWithSeparator`)return q.REPETITION_WITH_SEPARATOR;if(e instanceof uv||e===`Alternation`)return q.ALTERNATION;throw Error(`non exhaustive match`)}o(yb,`getProdType`);function bb(e){let{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,a=yb(r);return a===q.ALTERNATION?jb(t,n,i):Mb(t,n,a,i)}o(bb,`getLookaheadPaths`);function xb(e,t,n,r,i,a){let o=jb(e,t,n);return a(o,r,Fb(o)?Ty:wy,i)}o(xb,`buildLookaheadFuncForOr`);function Sb(e,t,n,r,i,a){let o=Mb(e,t,i,n),s=Fb(o)?Ty:wy;return a(o[0],s,r)}o(Sb,`buildLookaheadFuncForOptionalProd`);function Cb(e,t,n,r){let i=e.length,a=Ng(e,e=>Ng(e,e=>e.length===1));if(t)return function(t){let r=B(t,e=>e.GATE);for(let t=0;tLd(e)),(e,t,n)=>(z(t,t=>{V(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),z(t.categoryMatches,t=>{V(e,t)||(e[t]=n)})}),e),{});return function(){let e=this.LA(1);return t[e.tokenTypeIdx]}}else return function(){for(let t=0;te.length===1),i=e.length;if(r&&!n){let t=Ld(e);if(t.length===1&&U(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}else{let e=L_(t,(e,t,n)=>(e[t.tokenTypeIdx]=!0,z(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){let t=this.LA(1);return e[t.tokenTypeIdx]===!0}}}else return function(){nextPath:for(let n=0;ngb([e],1)),r=Db(n.length),i=B(n,e=>{let t={};return z(e,e=>{z(Ob(e.partialPath),e=>{t[e]=!0})}),t}),a=n;for(let e=1;e<=t;e++){let n=a;a=Db(n.length);for(let o=0;o{z(Ob(e.partialPath),e=>{i[o][e]=!0})})}}}}return r}o(Ab,`lookAheadSequenceFromAlternatives`);function jb(e,t,n,r){let i=new Eb(e,q.ALTERNATION,r);return t.accept(i),Ab(i.result,n)}o(jb,`getLookaheadPathsForOr`);function Mb(e,t,n,r){let i=new Eb(e,n);t.accept(i);let a=i.result,o=new Tb(t,e,n).startWalking();return Ab([new av({definition:a}),new av({definition:o})],r)}o(Mb,`getLookaheadPathsForOptionalProd`);function Nb(e,t){compareOtherPath:for(let n=0;n{let r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]})}o(Pb,`isStrictPrefixOfPath`);function Fb(e){return Ng(e,e=>Ng(e,e=>Ng(e,e=>U(e.categoryMatches))))}o(Fb,`areTokenCategoriesNotUsed`);function Ib(e){return B(e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}),e=>Object.assign({type:pS.CUSTOM_LOOKAHEAD_VALIDATION},e))}o(Ib,`validateLookahead`);function Lb(e,t,n,r){let i=Yg(e,e=>Rb(e,n)),a=ex(e,t,n),o=Yg(e,e=>Xb(e,n)),s=Yg(e,t=>Hb(t,e,r,n));return i.concat(a,o,s)}o(Lb,`validateGrammar`);function Rb(e,t){let n=new Vb;e.accept(n);let r=n.allProductions;return B(H(N_(Zg(r,zb),e=>e.length>1)),n=>{let r=Wg(n),i=t.buildDuplicateFoundError(e,n),a=_v(r),o={message:i,type:pS.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:a,occurrence:r.idx},s=Bb(r);return s&&(o.parameter=s),o})}o(Rb,`validateDuplicateProductions`);function zb(e){return`${_v(e)}_#_${e.idx}_#_${Bb(e)}`}o(zb,`identifyProductionForDuplicates`);function Bb(e){return e instanceof G?e.terminalType.name:e instanceof rv?e.nonTerminalName:``}o(Bb,`getExtraProductionArgument`);var Vb=class extends pv{static{o(this,`OccurrenceValidationCollector`)}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}};function Hb(e,t,n,r){let i=[];if(L_(t,(t,n)=>n.name===e.name?t+1:t,0)>1){let t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:pS.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}o(Hb,`validateRuleDoesNotAlreadyExist`);function Ub(e,t,n){let r=[],i;return u_(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:pS.INVALID_RULE_OVERRIDE,ruleName:e})),r}o(Ub,`validateRuleIsOverridden`);function Wb(e,t,n,r=[]){let i=[],a=Gb(t.definition);if(U(a))return[];{let t=e.name;u_(a,e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:pS.LEFT_RECURSION,ruleName:t});let o=Yg(vg(a,r.concat([e])),t=>{let i=Sm(r);return i.push(t),Wb(e,t,n,i)});return i.concat(o)}}o(Wb,`validateNoLeftRecursion`);function Gb(e){let t=[];if(U(e))return t;let n=Wg(e);if(n instanceof rv)t.push(n.referencedRule);else if(n instanceof av||n instanceof ov||n instanceof sv||n instanceof cv||n instanceof lv||n instanceof W)t=t.concat(Gb(n.definition));else if(n instanceof uv)t=Ld(B(n.definition,e=>Gb(e.definition)));else if(!(n instanceof G))throw Error(`non exhaustive match`);let r=hv(n),i=e.length>1;if(r&&i){let n=Sg(e);return t.concat(Gb(n))}else return t}o(Gb,`getFirstNoneTerminal`);var Kb=class extends pv{static{o(this,`OrCollector`)}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}};function qb(e,t){let n=new Kb;e.accept(n);let r=n.alternations;return Yg(r,n=>Yg(wg(n.definition),(r,i)=>U(_b([r],[],wy,1))?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:pS.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]))}o(qb,`validateEmptyOrAlternative`);function Jb(e,t,n){let r=new Kb;e.accept(r);let i=r.alternations;return i=z_(i,e=>e.ignoreAmbiguities===!0),Yg(i,r=>{let i=r.idx,a=jb(i,e,r.maxLookahead||t,r),o=Qb(a,r,e,n),s=$b(a,r,e,n);return o.concat(s)})}o(Jb,`validateAmbiguousAlternationAlternatives`);var Yb=class extends pv{static{o(this,`RepetitionCollector`)}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}};function Xb(e,t){let n=new Kb;e.accept(n);let r=n.alternations;return Yg(r,n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:pS.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[])}o(Xb,`validateTooManyAlts`);function Zb(e,t,n){let r=[];return z(e,e=>{let i=new Yb;e.accept(i);let a=i.allProductions;z(a,i=>{let a=yb(i),o=i.maxLookahead||t,s=i.idx,c=Mb(s,e,a,o)[0];if(U(Ld(c))){let t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:pS.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),r}o(Zb,`validateSomeNonEmptyLookaheadPath`);function Qb(e,t,n,r){let i=[];return B(L_(e,(n,r,a)=>(t.definition[a].ignoreAmbiguities===!0||z(r,r=>{let o=[a];z(e,(e,n)=>{a!==n&&Nb(e,r)&&t.definition[n].ignoreAmbiguities!==!0&&o.push(n)}),o.length>1&&!Nb(i,r)&&(i.push(r),n.push({alts:o,path:r}))}),n),[]),e=>{let i=B(e.alts,e=>e+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:pS.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}})}o(Qb,`checkAlternativesAmbiguities`);function $b(e,t,n,r){let i=L_(e,(e,t,n)=>{let r=B(t,e=>({idx:n,path:e}));return e.concat(r)},[]);return wm(Yg(i,e=>{if(t.definition[e.idx].ignoreAmbiguities===!0)return[];let a=e.idx,o=e.path;return B(Lg(i,e=>t.definition[e.idx].ignoreAmbiguities!==!0&&e.idx{let i=[e.idx+1,a+1],o=t.idx===0?``:t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:pS.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:i}})}))}o($b,`checkPrefixAlternativesAmbiguities`);function ex(e,t,n){let r=[],i=B(t,e=>e.name);return z(e,e=>{let t=e.name;if(u_(i,t)){let i=n.buildNamespaceConflictError(e);r.push({message:i,type:pS.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),r}o(ex,`checkTerminalAndNoneTerminalsNameSpace`);function tx(e){let t=ug(e,{errMsgProvider:ab}),n={};return z(e.rules,e=>{n[e.name]=e}),sb(n,t.errMsgProvider)}o(tx,`resolveGrammar`);function nx(e){return e=ug(e,{errMsgProvider:ob}),Lb(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}o(nx,`validateGrammar`);var rx=`MismatchedTokenException`,ix=`NoViableAltException`,ax=`EarlyExitException`,ox=`NotAllInputParsedException`,sx=[rx,ix,ax,ox];Object.freeze(sx);function cx(e){return u_(sx,e.name)}o(cx,`isRecognitionException`);var lx=class extends Error{static{o(this,`RecognitionException`)}constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},ux=class extends lx{static{o(this,`MismatchedTokenException`)}constructor(e,t,n){super(e,t),this.previousToken=n,this.name=rx}},dx=class extends lx{static{o(this,`NoViableAltException`)}constructor(e,t,n){super(e,t),this.previousToken=n,this.name=ix}},fx=class extends lx{static{o(this,`NotAllInputParsedException`)}constructor(e,t){super(e,t),this.name=ox}},px=class extends lx{static{o(this,`EarlyExitException`)}constructor(e,t,n){super(e,t),this.previousToken=n,this.name=ax}},mx={},hx=`InRuleRecoveryException`,gx=class extends Error{static{o(this,`InRuleRecoveryException`)}constructor(e){super(e),this.name=hx}},_x=class{static{o(this,`Recoverable`)}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=V(e,`recoveryEnabled`)?e.recoveryEnabled:dS.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=vx)}getTokenToInsert(e){let t=nb(e,``,NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){let i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],c=!1,l=this.LA(1),u=this.LA(1),d=o(()=>{let e=this.LA(0),t=new ux(this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:l,previous:e,ruleName:this.getCurrRuleFullName()}),l,this.LA(0));t.resyncedTokens=wg(s),this.SAVE_ERROR(t)},`generateErrorMessage`);for(;!c;)if(this.tokenMatcher(u,r)){d();return}else if(n.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(u,i)?c=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,s));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){let n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new gx(`sad sad panda`)}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||U(t))return!1;let n=this.LA(1);return Hg(t,e=>this.tokenMatcher(n,e))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey();return u_(this.getFollowSetFromFollowKey(t),e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),n=2;for(;;){let r=Hg(e,e=>rb(t,e));if(r!==void 0)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return mx;let e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return B(e,(n,r)=>r===0?mx:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])})}flattenFollowSet(){return Ld(B(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e)))}getFollowSetFromFollowKey(e){if(e===mx)return[tb];let t=e.ruleName+e.idxInCallingRule+wv+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,tb)||t.push(e),t}reSyncTo(e){let t=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return wg(t)}attemptInRepetitionRecovery(e,t,n,r,i,a,o){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:Sm(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return B(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}};function vx(e,t,n,r,i,a,o){let s=this.getKeyForAutomaticLookahead(r,i),c=this.firstAfterRepMap[s];if(c===void 0){let e=this.getCurrRuleFullName(),t=this.getGAstProductions()[e];c=new a(t,i).startWalking(),this.firstAfterRepMap[s]=c}let l=c.token,u=c.occurrence,d=c.isEndOfRule;this.RULE_STACK.length===1&&d&&l===void 0&&(l=tb,u=1),!(l===void 0||u===void 0)&&this.shouldInRepetitionRecoveryBeTried(l,u,o)&&this.tryInRepetitionRecovery(e,t,n,l)}o(vx,`attemptInRepetitionRecovery`);var yx=4,bx=8,xx=8,Sx=1<Wb(e,e,ob))}validateEmptyOrAlternatives(e){return Yg(e,e=>qb(e,ob))}validateAmbiguousAlternationAlternatives(e,t){return Yg(e,e=>Jb(e,t,ob))}validateSomeNonEmptyLookaheadPath(e,t){return Zb(e,t,ob)}buildLookaheadForAlternation(e){return xb(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Cb)}buildLookaheadForOptional(e){return Sb(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,yb(e.prodType),wb)}},Ax=class{static{o(this,`LooksAhead`)}initLooksAhead(e){this.dynamicTokensEnabled=V(e,`dynamicTokensEnabled`)?e.dynamicTokensEnabled:dS.dynamicTokensEnabled,this.maxLookahead=V(e,`maxLookahead`)?e.maxLookahead:dS.maxLookahead,this.lookaheadStrategy=V(e,`lookaheadStrategy`)?e.lookaheadStrategy:new kx({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){z(e,e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{let{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:o}=Mx(e);z(t,t=>{let n=t.idx===0?``:t.idx;this.TRACE_INIT(`${_v(t)}${n}`,()=>{let n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=Ox(this.fullRuleNameToShort[e.name],Sx,t.idx);this.setLaFuncCache(r,n)})}),z(n,t=>{this.computeLookaheadFunc(e,t.idx,wx,`Repetition`,t.maxLookahead,_v(t))}),z(r,t=>{this.computeLookaheadFunc(e,t.idx,Cx,`Option`,t.maxLookahead,_v(t))}),z(i,t=>{this.computeLookaheadFunc(e,t.idx,Tx,`RepetitionMandatory`,t.maxLookahead,_v(t))}),z(a,t=>{this.computeLookaheadFunc(e,t.idx,Dx,`RepetitionMandatoryWithSeparator`,t.maxLookahead,_v(t))}),z(o,t=>{this.computeLookaheadFunc(e,t.idx,Ex,`RepetitionWithSeparator`,t.maxLookahead,_v(t))})})})}computeLookaheadFunc(e,t,n,r,i,a){this.TRACE_INIT(`${a}${t===0?``:t}`,()=>{let a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),o=Ox(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(o,a)})}getKeyForAutomaticLookahead(e,t){return Ox(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},jx=new class extends pv{static{o(this,`DslMethodsCollectorVisitor`)}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}};function Mx(e){jx.reset(),e.accept(jx);let t=jx.dslMethods;return jx.reset(),t}o(Mx,`collectMethods`);function Nx(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffsete.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>: - ${t.join(` - -`).replace(/\n/g,` - `)}`)}},`validateVisitor`)},n.prototype.constructor=n,n._RULE_NAMES=t,n}o(Bx,`createBaseSemanticVisitorConstructor`);function Vx(e,t,n){let r=o(function(){},`derivedConstructor`);Rx(r,e+`BaseSemanticsWithDefaults`);let i=Object.create(n.prototype);return z(t,e=>{i[e]=zx}),r.prototype=i,r.prototype.constructor=r,r}o(Vx,`createBaseVisitorConstructorWithDefaults`);var Hx;(function(e){e[e.REDUNDANT_METHOD=0]=`REDUNDANT_METHOD`,e[e.MISSING_METHOD=1]=`MISSING_METHOD`})(Hx||={});function Ux(e,t){return Wx(e,t)}o(Ux,`validateVisitor`);function Wx(e,t){return wm(B(Lg(t,t=>Ss(e[t])===!1),t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Hx.MISSING_METHOD,methodName:t})))}o(Wx,`validateMissingCstMethods`);var Gx=class{static{o(this,`TreeBuilder`)}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=V(e,`nodeLocationTracking`)?e.nodeLocationTracking:dS.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Ys,this.cstFinallyStateUpdate=Ys,this.cstPostTerminal=Ys,this.cstPostNonTerminal=Ys,this.cstPostRule=Ys;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Px,this.setNodeLocationFromNode=Px,this.cstPostRule=Ys,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Ys,this.setNodeLocationFromNode=Ys,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Nx,this.setNodeLocationFromNode=Nx,this.cstPostRule=Ys,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Ys,this.setNodeLocationFromNode=Ys,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Ys,this.setNodeLocationFromNode=Ys,this.cstPostRule=Ys,this.setInitialNodeLocation=Ys;else throw Error(`Invalid config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];Fx(n,t,e),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];Ix(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(w_(this.baseCstVisitorConstructor)){let e=Bx(this.className,eu(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(w_(this.baseCstVisitorWithDefaultsConstructor)){let e=Vx(this.className,eu(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},Kx=class{static{o(this,`LexerAdapter`)}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error(`Missing invocation at the end of the Parser's constructor.`);this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):uS}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?uS:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},qx=class{static{o(this,`RecognizerApi`)}ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=fS){if(u_(this.definedRulesNames,e)){let t={message:ob.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:pS.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);let r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=fS){let r=Ub(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);let i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(cx(e))return!1;throw e}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return dv(H(this.gastProductionsCache))}},Jx=class{static{o(this,`RecognizerEngine`)}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Ty,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},V(t,`serializedGrammar`))throw Error(`The Parser's configuration can no longer contain a property. - See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 - For Further details.`);if(I(e)){if(U(e))throw Error(`A Token Vocabulary cannot be empty. - Note that the first argument for the parser constructor - is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset==`number`)throw Error(`The Parser constructor no longer accepts a token vector as the first argument. - See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 - For Further details.`)}if(I(e))this.tokensMap=L_(e,(e,t)=>(e[t.name]=t,e),{});else if(V(e,`modes`)&&Ng(Ld(H(e.modes)),Ry)){let t=Y_(Ld(H(e.modes)));this.tokensMap=L_(t,(e,t)=>(e[t.name]=t,e),{})}else if(ts(e))this.tokensMap=Sm(e);else throw Error(` argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition`);this.tokensMap.EOF=tb;let n=Ng(V(e,`modes`)?Ld(H(e.modes)):H(e),e=>U(e.categoryMatches));this.tokenMatcher=n?Ty:wy,Oy(H(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called' -Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let r=V(n,`resyncEnabled`)?n.resyncEnabled:fS.resyncEnabled,i=V(n,`recoveryValueFunc`)?n.recoveryValueFunc:fS.recoveryValueFunc,a=this.ruleShortNameIdx<t.call(this)&&e.call(this),`lookAheadFunc`)}}else i=e;if(r.call(this)===!0)return i.call(this)}atLeastOneInternal(e,t){let n=this.getKeyForAutomaticLookahead(Tx,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof t!=`function`){i=t.DEF;let e=t.GATE;if(e!==void 0){let t=r;r=o(()=>e.call(this)&&t.call(this),`lookAheadFunc`)}}else i=t;if(r.call(this)===!0){let e=this.doSingleRepetition(i);for(;r.call(this)===!0&&e===!0;)e=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,q.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],r,Tx,e,mb)}atLeastOneSepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(Dx,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let t=o(()=>this.tokenMatcher(this.LA(1),i),`separatorLookAheadFunc`);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,hb],t,Dx,e,hb)}else throw this.raiseEarlyExitException(e,q.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let n=this.getKeyForAutomaticLookahead(wx,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof t!=`function`){i=t.DEF;let e=t.GATE;if(e!==void 0){let t=r;r=o(()=>e.call(this)&&t.call(this),`lookaheadFunction`)}}else i=t;let a=!0;for(;r.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],r,wx,e,fb,a)}manySepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(Ex,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let t=o(()=>this.tokenMatcher(this.LA(1),i),`separatorLookAheadFunc`);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,pb],t,Ex,e,pb)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,Dx,e,i)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let n=this.getKeyForAutomaticLookahead(Sx,t),r=I(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(i!==void 0)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new fx(t,e))}}subruleInternal(e,t,n){let r;try{let i=n===void 0?void 0:n.ARGS;return this.subruleIdx=t,r=e.apply(this,i),this.cstPostNonTerminal(r,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),r}catch(t){throw this.subruleInternalError(t,n,e.ruleName)}}subruleInternalError(e,t,n){throw cx(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{let t=this.LA(1);this.tokenMatcher(t,e)===!0?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r,i=this.LA(0);throw r=n!==void 0&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new ux(r,t,i))}consumeInternalRecovery(e,t,n){if(this.recoveryEnabled&&n.name===`MismatchedTokenException`&&!this.isBackTracking()){let r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===hx?n:e}}else throw n}saveRecogState(){let e=this.errors,t=Sm(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),tb)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},Yx=class{static{o(this,`ErrorHandler`)}initErrorHandler(e){this._errors=[],this.errorMessageProvider=V(e,`errorMessageProvider`)?e.errorMessageProvider:dS.errorMessageProvider}SAVE_ERROR(e){if(cx(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Sm(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error(`Trying to save an Error which is not a RecognitionException`)}get errors(){return Sm(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){let r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],a=Mb(e,i,t,this.maxLookahead)[0],o=[];for(let e=1;e<=this.maxLookahead;e++)o.push(this.LA(e));let s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new px(s,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let n=this.getCurrRuleFullName(),r=this.getGAstProductions()[n],i=jb(e,r,this.maxLookahead),a=[];for(let e=1;e<=this.maxLookahead;e++)a.push(this.LA(e));let o=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:a,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new dx(s,this.LA(1),o))}},Xx=class{static{o(this,`ContentAssist`)}initContentAssist(){}computeContentAssist(e,t){let n=this.gastProductionsCache[e];if(w_(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return _b([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let t=Wg(e.ruleStack),n=this.getGAstProductions()[t];return new ub(n,e).startWalking()}},Zx={description:`This Object indicates the Parser is during Recording Phase`};Object.freeze(Zx);var Qx=!0,$x=2**bx-1,eS=$y({name:`RECORDING_PHASE_TOKEN`,pattern:Vy.NA});Oy([eS]);var tS=nb(eS,`This IToken indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(tS);var nS={name:`This CSTNode indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},rS=class{static{o(this,`GastRecorder`)}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT(`Enable Recording`,()=>{for(let e=0;e<10;e++){let t=e>0?e:``;this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT(`Deleting Recording methods`,()=>{let e=this;for(let t=0;t<10;t++){let n=t>0?t:``;delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return uS}topLevelRuleRecord(e,t){try{let n=new iv({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(e.KNOWN_RECORDER_ERROR!==!0)try{e.message+=` - This error was thrown during the "grammar recording phase" For more info see: - https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw e}throw e}}optionInternalRecord(e,t){return iS.call(this,ov,e,t)}atLeastOneInternalRecord(e,t){iS.call(this,sv,t,e)}atLeastOneSepFirstInternalRecord(e,t){iS.call(this,cv,t,e,Qx)}manyInternalRecord(e,t){iS.call(this,W,t,e)}manySepFirstInternalRecord(e,t){iS.call(this,lv,t,e,Qx)}orInternalRecord(e,t){return aS.call(this,e,t)}subruleInternalRecord(e,t,n){if(sS(t),!e||V(e,`ruleName`)===!1){let n=Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}> - inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=bg(this.recordingProdStack),i=e.ruleName,a=new rv({idx:t,nonTerminalName:i,label:n?.LABEL,referencedRule:void 0});return r.definition.push(a),this.outputCst?nS:Zx}consumeInternalRecord(e,t,n){if(sS(t),!Py(e)){let n=Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}> - inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=bg(this.recordingProdStack),i=new G({idx:t,terminalType:e,label:n?.LABEL});return r.definition.push(i),tS}};function iS(e,t,n,r=!1){sS(n);let i=bg(this.recordingProdStack),a=Ss(t)?t:t.DEF,o=new e({definition:[],idx:n});return r&&(o.separator=t.SEP),V(t,`MAX_LOOKAHEAD`)&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),a.call(this),i.definition.push(o),this.recordingProdStack.pop(),Zx}o(iS,`recordProd`);function aS(e,t){sS(t);let n=bg(this.recordingProdStack),r=I(e)===!1,i=r===!1?e:e.DEF,a=new uv({definition:[],idx:t,ignoreAmbiguities:r&&e.IGNORE_AMBIGUITIES===!0});return V(e,`MAX_LOOKAHEAD`)&&(a.maxLookahead=e.MAX_LOOKAHEAD),a.hasPredicates=U_(i,e=>Ss(e.GATE)),n.definition.push(a),z(i,e=>{let t=new av({definition:[]});a.definition.push(t),V(e,`IGNORE_AMBIGUITIES`)?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:V(e,`GATE`)&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),Zx}o(aS,`recordOrProd`);function oS(e){return e===0?``:`${e}`}o(oS,`getIdxSuffix`);function sS(e){if(e<0||e>$x){let t=Error(`Invalid DSL Method idx value: <${e}> - Idx value must be a none negative value smaller than ${$x+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}o(sS,`assertMethodIdxIsValid`);var cS=class{static{o(this,`PerformanceTracer`)}initPerformanceTracer(e){if(V(e,`traceInitPerf`)){let t=e.traceInitPerf,n=typeof t==`number`;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=dS.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent <${e}>`);let{time:r,value:i}=Q_(t),a=r>10?console.warn:console.log;return this.traceInitIndent time: ${r}ms`),this.traceInitIndent--,i}else return t()}};function lS(e,t){t.forEach(t=>{let n=t.prototype;Object.getOwnPropertyNames(n).forEach(r=>{if(r===`constructor`)return;let i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(e.prototype,r,i):e.prototype[r]=t.prototype[r]})})}o(lS,`applyMixins`);var uS=nb(tb,``,NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(uS);var dS=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:ib,nodeLocationTracking:`none`,traceInitPerf:!1,skipValidations:!1}),fS=Object.freeze({recoveryValueFunc:o(()=>void 0,`recoveryValueFunc`),resyncEnabled:!0}),pS;(function(e){e[e.INVALID_RULE_NAME=0]=`INVALID_RULE_NAME`,e[e.DUPLICATE_RULE_NAME=1]=`DUPLICATE_RULE_NAME`,e[e.INVALID_RULE_OVERRIDE=2]=`INVALID_RULE_OVERRIDE`,e[e.DUPLICATE_PRODUCTIONS=3]=`DUPLICATE_PRODUCTIONS`,e[e.UNRESOLVED_SUBRULE_REF=4]=`UNRESOLVED_SUBRULE_REF`,e[e.LEFT_RECURSION=5]=`LEFT_RECURSION`,e[e.NONE_LAST_EMPTY_ALT=6]=`NONE_LAST_EMPTY_ALT`,e[e.AMBIGUOUS_ALTS=7]=`AMBIGUOUS_ALTS`,e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]=`CONFLICT_TOKENS_RULES_NAMESPACE`,e[e.INVALID_TOKEN_NAME=9]=`INVALID_TOKEN_NAME`,e[e.NO_NON_EMPTY_LOOKAHEAD=10]=`NO_NON_EMPTY_LOOKAHEAD`,e[e.AMBIGUOUS_PREFIX_ALTS=11]=`AMBIGUOUS_PREFIX_ALTS`,e[e.TOO_MANY_ALTS=12]=`TOO_MANY_ALTS`,e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]=`CUSTOM_LOOKAHEAD_VALIDATION`})(pS||={});function mS(e=void 0){return function(){return e}}o(mS,`EMPTY_ALT`);var hS=class e{static{o(this,`Parser`)}static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT(`performSelfAnalysis`,()=>{let t;this.selfAnalysisDone=!0;let n=this.className;this.TRACE_INIT(`toFastProps`,()=>{$_(this)}),this.TRACE_INIT(`Grammar Recording`,()=>{try{this.enableRecording(),z(this.definedRulesNames,e=>{let t=this[e].originalGrammarAction,n;this.TRACE_INIT(`${e} Rule`,()=>{n=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=n})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT(`Grammar Resolving`,()=>{r=tx({rules:H(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT(`Grammar Validations`,()=>{if(U(r)&&this.skipValidations===!1){let e=nx({rules:H(this.gastProductionsCache),tokenTypes:H(this.tokensMap),errMsgProvider:ob,grammarName:n}),t=Ib({lookaheadStrategy:this.lookaheadStrategy,rules:H(this.gastProductionsCache),tokenTypes:H(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(e,t)}}),U(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT(`computeAllProdsFollows`,()=>{let e=Ev(H(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT(`ComputeLookaheadFunctions`,()=>{var e,t;(t=(e=this.lookaheadStrategy).initialize)==null||t.call(e,{rules:H(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(H(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!U(this.definitionErrors))throw t=B(this.definitionErrors,e=>e.message),Error(`Parser Definition Errors detected: - ${t.join(` -------------------------------- -`)}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),V(t,`ignoredIssues`))throw Error(`The IParserConfig property has been deprecated. - Please use the flag on the relevant DSL method instead. - See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES - For further details.`);this.skipValidations=V(t,`skipValidations`)?t.skipValidations:dS.skipValidations}};hS.DEFER_DEFINITION_ERRORS_HANDLING=!1,lS(hS,[_x,Ax,Gx,Kx,Jx,qx,Yx,Xx,rS,cS]);var gS=class extends hS{static{o(this,`EmbeddedActionsParser`)}constructor(e,t=dS){let n=Sm(t);n.outputCst=!1,super(e,n)}};function _S(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n-1}o(AS,`listCacheHas`);var jS=AS;function MS(e,t){var n=this.__data__,r=wS(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}o(MS,`listCacheSet`);var NS=MS;function PS(e){var t=-1,n=e==null?0:e.length;for(this.clear();++ts))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Nw?new Dw:void 0;for(a.set(e,t),a.set(t,e);++d-1&&e%1==0&&e-1&&e%1==0&&e<=LT}o(RT,`isLength`);var zT=RT,BT=`[object Arguments]`,VT=`[object Array]`,HT=`[object Boolean]`,UT=`[object Date]`,WT=`[object Error]`,GT=`[object Function]`,KT=`[object Map]`,qT=`[object Number]`,JT=`[object Object]`,YT=`[object RegExp]`,XT=`[object Set]`,ZT=`[object String]`,QT=`[object WeakMap]`,$T=`[object ArrayBuffer]`,eE=`[object DataView]`,tE=`[object Float32Array]`,nE=`[object Float64Array]`,rE=`[object Int8Array]`,iE=`[object Int16Array]`,aE=`[object Int32Array]`,oE=`[object Uint8Array]`,sE=`[object Uint8ClampedArray]`,cE=`[object Uint16Array]`,lE=`[object Uint32Array]`,J={};J[tE]=J[nE]=J[rE]=J[iE]=J[aE]=J[oE]=J[sE]=J[cE]=J[lE]=!0,J[BT]=J[VT]=J[$T]=J[HT]=J[eE]=J[UT]=J[WT]=J[GT]=J[KT]=J[qT]=J[JT]=J[YT]=J[XT]=J[ZT]=J[QT]=!1;function uE(e){return yT(e)&&zT(e.length)&&!!J[sC(e)]}o(uE,`baseIsTypedArray`);var dE=uE;function fE(e){return function(t){return e(t)}}o(fE,`baseUnary`);var pE=fE,mE=typeof exports==`object`&&exports&&!exports.nodeType&&exports,hE=mE&&typeof module==`object`&&module&&!module.nodeType&&module,gE=hE&&hE.exports===mE&&WS.process,_E=(function(){try{return hE&&hE.require&&hE.require(`util`).types||gE&&gE.binding&&gE.binding(`util`)}catch{}})(),vE=_E&&_E.isTypedArray,yE=vE?pE(vE):dE,bE=Object.prototype.hasOwnProperty;function xE(e,t){var n=oT(e),r=!n&&ET(e),i=!n&&!r&&MT(e),a=!n&&!r&&!i&&yE(e),o=n||r||i||a,s=o?_T(e.length,String):[],c=s.length;for(var l in e)(t||bE.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||IT(l,c)))&&s.push(l);return s}o(xE,`arrayLikeKeys`);var SE=xE,CE=Object.prototype;function wE(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||CE)}o(wE,`isPrototype`);var TE=wE;function EE(e,t){return function(n){return e(t(n))}}o(EE,`overArg`);var DE=EE(Object.keys,Object),OE=Object.prototype.hasOwnProperty;function kE(e){if(!TE(e))return DE(e);var t=[];for(var n in Object(e))OE.call(e,n)&&n!=`constructor`&&t.push(n);return t}o(kE,`baseKeys`);var AE=kE;function jE(e){return e!=null&&zT(e.length)&&!hC(e)}o(jE,`isArrayLike`);var ME=jE;function NE(e){return ME(e)?SE(e):AE(e)}o(NE,`keys`);var PE=NE;function FE(e){return cT(e,PE,hT)}o(FE,`getAllKeys`);var IE=FE,LE=1,RE=Object.prototype.hasOwnProperty;function zE(e,t,n,r,i,a){var o=n&LE,s=IE(e),c=s.length;if(c!=IE(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:RE.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++lek(e,t,n)))}o(ak,`alternation`);function ok(e,t,n){let r=X(e,t,n,{type:RO});return dk(e,r),uk(e,t,n,fk(e,t,r,n,sk(e,t,n)))}o(ok,`option`);function sk(e,t,n){let r=IO(MO(n.definition,n=>ek(e,t,n)),e=>e!==void 0);return r.length===1?r[0]:r.length===0?void 0:mk(e,r)}o(sk,`block`);function ck(e,t,n,r,i){let a=r.left,o=r.right,s=X(e,t,n,{type:KO});dk(e,s);let c=X(e,t,n,{type:qO});return a.loopback=s,c.loopback=s,e.decisionMap[LO(t,i?`RepetitionMandatoryWithSeparator`:`RepetitionMandatory`,n.idx)]=s,Y(o,s),i===void 0?(Y(s,a),Y(s,c)):(Y(s,c),Y(s,i.left),Y(i.right,a)),{left:a,right:c}}o(ck,`plus`);function lk(e,t,n,r,i){let a=r.left,o=r.right,s=X(e,t,n,{type:GO});dk(e,s);let c=X(e,t,n,{type:qO}),l=X(e,t,n,{type:WO});return s.loopback=l,c.loopback=l,Y(s,a),Y(s,c),Y(o,l),i===void 0?Y(l,s):(Y(l,c),Y(l,i.left),Y(i.right,a)),e.decisionMap[LO(t,i?`RepetitionWithSeparator`:`Repetition`,n.idx)]=s,{left:s,right:c}}o(lk,`star`);function uk(e,t,n,r){let i=r.left,a=r.right;return Y(i,a),e.decisionMap[LO(t,`Option`,n.idx)]=i,r}o(uk,`optional`);function dk(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}o(dk,`defineDecisionState`);function fk(e,t,n,r,...i){let a=X(e,t,r,{type:UO,start:n});n.end=a;for(let e of i)e===void 0?Y(n,a):(Y(n,e.left),Y(e.right,a));let o={left:n,right:a};return e.decisionMap[LO(t,pk(r),r.idx)]=n,o}o(fk,`makeAlts`);function pk(e){if(e instanceof uv)return`Alternation`;if(e instanceof ov)return`Option`;if(e instanceof W)return`Repetition`;if(e instanceof lv)return`RepetitionWithSeparator`;if(e instanceof sv)return`RepetitionMandatory`;if(e instanceof cv)return`RepetitionMandatoryWithSeparator`;throw Error(`Invalid production type encountered`)}o(pk,`getProdType`);function mk(e,t){let n=t.length;for(let r=0;re.alt)}get key(){let e=``;for(let t in this.map)e+=t+`:`;return e}};function Sk(e,t=!0){return`${t?`a${e.alt}`:``}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join(`_`)}`}o(Sk,`getATNConfigKey`);function Ck(e,t,n){for(var r=-1,i=e.length;++r0&&n(s)?t>1?Mk(s,t-1,n,r,i):aT(i,s):r||(i[i.length]=s)}return i}o(Mk,`baseFlatten`);var Nk=Mk;function Pk(e,t){return Nk(MO(e,t),1)}o(Pk,`flatMap`);var Fk=Pk;function Ik(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a-1}o(Wk,`arrayIncludes`);var Gk=Wk;function Kk(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=Zk){var l=t?null:Xk(e);if(l)return Bw(l);o=!1,i=jw,c=new Dw}else c=t?[]:s;outer:for(;++r{let i=r.toString(),a=n[i];return a===void 0?(a={atnStartState:e,decision:t,states:{}},n[i]=a,a):a}}o(xA,`createDFACache`);var SA=class{static{o(this,`PredicateSet`)}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e=``,t=this.predicates.length;for(let n=0;nconsole.log(e))}initialize(e){this.atn=QO(e.rules),this.dfas=EA(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:n,hasPredicates:r,dynamicTokensEnabled:i}=e,a=this.dfas,o=this.logging,s=LO(n,`Alternation`,t),c=this.atn.decisionMap[s].decision,l=MO(bb({maxLookahead:1,occurrence:t,prodType:`Alternation`,rule:n}),e=>MO(e,e=>e[0]));if(TA(l,!1)&&!i){let e=bA(l,(e,t,n)=>(lA(t,t=>{t&&(e[t.tokenTypeIdx]=n,lA(t.categoryMatches,t=>{e[t]=n}))}),e),{});return r?function(t){let n=this.LA(1),r=e[n.tokenTypeIdx];if(t!==void 0&&r!==void 0){let e=t[r]?.GATE;if(e!==void 0&&e.call(this)===!1)return}return r}:function(){let t=this.LA(1);return e[t.tokenTypeIdx]}}else if(r)return function(e){let t=new SA,n=e===void 0?0:e.length;for(let r=0;rMO(e,e=>e[0]));if(TA(l)&&l[0][0]&&!i){let e=l[0],t=rA(e);if(t.length===1&&mA(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}else{let e=bA(t,(e,t)=>(t!==void 0&&(e[t.tokenTypeIdx]=!0,lA(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){let t=this.LA(1);return e[t.tokenTypeIdx]===!0}}}return function(){let e=DA.call(this,a,c,CA,o);return typeof e!=`object`&&e===0}}};function TA(e,t=!0){let n=new Set;for(let r of e){let e=new Set;for(let i of r){if(i===void 0){if(t)break;return!1}let r=[i.tokenTypeIdx].concat(i.categoryMatches);for(let t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}o(TA,`isLL1Sequence`);function EA(e){let t=e.decisionStates.length,n=Array(t);for(let r=0;rHy(e)).join(`, `),n=e.production.idx===0?``:e.production.idx,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(`, `)}> in <${MA(e.production)}${n}> inside <${e.topLevelRule.name}> Rule, -<${t}> may appears as a prefix path in all these alternatives. -`;return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES -For Further details.`,r}o(jA,`buildAmbiguityError`);function MA(e){if(e instanceof rv)return`SUBRULE`;if(e instanceof ov)return`OPTION`;if(e instanceof uv)return`OR`;if(e instanceof sv)return`AT_LEAST_ONE`;if(e instanceof cv)return`AT_LEAST_ONE_SEP`;if(e instanceof lv)return`MANY_SEP`;if(e instanceof W)return`MANY`;if(e instanceof G)return`CONSUME`;throw Error(`non exhaustive match`)}o(MA,`getProductionDslName`);function NA(e,t,n){return{actualToken:n,possibleTokenTypes:tA(Fk(t.configs.elements,e=>e.state.transitions).filter(e=>e instanceof YO).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}o(NA,`buildAdaptivePredictError`);function PA(e,t){return e.edges[t.tokenTypeIdx]}o(PA,`getExistingTargetState`);function FA(e,t,n){let r=new xk,i=[];for(let a of e.elements){if(n.is(a.alt)===!1)continue;if(a.state.type===HO){i.push(a);continue}let e=a.state.transitions.length;for(let n=0;n0&&!WA(a))for(let e of i)a.add(e);return a}o(FA,`computeReachSet`);function IA(e,t){if(e instanceof YO&&rb(t,e.tokenType))return e.target}o(IA,`getReachableTarget`);function LA(e,t){let n;for(let r of e.elements)if(t.is(r.alt)===!0){if(n===void 0)n=r.alt;else if(n!==r.alt)return}return n}o(LA,`getUniqueAlt`);function RA(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}o(RA,`newDFAState`);function zA(e,t,n,r){return r=BA(e,r),t.edges[n.tokenTypeIdx]=r,r}o(zA,`addDFAEdge`);function BA(e,t){if(t===bk)return t;let n=t.configs.key,r=e.states[n];return r===void 0?(t.configs.finalize(),e.states[n]=t,t):r}o(BA,`addDFAState`);function VA(e){let t=new xk,n=e.transitions.length;for(let r=0;r0){let n=[...e.stack];HA({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);let r=n.transitions.length;for(let i=0;i1)return!0;return!1}o(JA,`hasConflictingAltSet`);function YA(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}o(YA,`hasStateAssociatedWithOneAlt`),ht();var XA=class{static{o(this,`CstNodeBuilder`)}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new tj(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new $A;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){let n=new QA(e.startOffset,e.image.length,zi(e),e.tokenType,!t);return n.grammarSource=t,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){let t=e.container;if(t){let n=t.content.indexOf(e);n>=0&&t.content.splice(n,1)}}addHiddenNodes(e){let t=[];for(let n of e){let e=new QA(n.startOffset,n.image.length,zi(n),n.tokenType,!0);e.root=this.rootNode,t.push(e)}let n=this.current,r=!1;if(n.content.length>0){n.content.push(...t);return}for(;n.container;){let e=n.container.content.indexOf(n);if(e>0){n.container.content.splice(e,0,...t),r=!0;break}n=n.container}r||this.rootNode.content.unshift(...t)}construct(e){let t=this.current;typeof e.$type==`string`&&!e.$infix&&(this.current.astNode=e),e.$cstNode=t;let n=this.nodeStack.pop();n?.content.length===0&&this.removeNode(n)}},ZA=class{static{o(this,`AbstractCstNode`)}get hidden(){return!1}get astNode(){let e=typeof this._astNode?.$type==`string`?this._astNode:this.container?.astNode;if(!e)throw Error(`This node has no associated AST element`);return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},QA=class extends ZA{static{o(this,`LeafCstNodeImpl`)}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,n,r,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=r,this._length=t,this._range=n}},$A=class extends ZA{static{o(this,`CompositeCstNodeImpl`)}constructor(){super(...arguments),this.content=new ej(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){let e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===void 0){let{range:n}=e,{range:r}=t;this._rangeCache={start:n.start,end:r.end.line=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},ej=class e extends Array{static{o(this,`CstNodeContainer`)}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,e.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(let t of e)t.container=this.parent}},tj=class extends $A{static{o(this,`RootCstNodeImpl`)}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text=``,this._text=e??``}},nj=Symbol(`Datatype`);function rj(e){return e.$type===nj}o(rj,`isDataTypeNode`);var ij=`​`,aj=o(e=>e.endsWith(ij)?e:e+ij,`withRuleSuffix`),oj=class{static{o(this,`AbstractLangiumParser`)}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let t=this.lexer.definition,n=e.LanguageMetaData.mode===`production`;e.shared.profilers.LangiumProfiler?.isActive(`parsing`)?this.wrapper=new pj(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask(`parsing`,e.LanguageMetaData.languageId)):this.wrapper=new fj(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},sj=class extends oj{static{o(this,`LangiumParser`)}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new XA,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){let n=this.computeRuleType(e),r;Dr(e)&&(r=e.name,this.registerPrecedenceMap(e));let i=this.wrapper.DEFINE_RULE(aj(e.name),this.startImplementation(n,r,t).bind(this));return this.allRules.set(e.name,i),Yr(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){let t=e.name,n=new Map;for(let t=0;t0&&(t=this.construct()),t===void 0)throw Error(`No result from parser`);if(this.stack.length>0)throw Error(`Parser stack is not empty after parsing`);return t}startImplementation(e,t,n){return r=>{let i=!this.isRecording()&&e!==void 0;if(i){let n={$type:e};this.stack.push(n),e===nj?n.value=``:t!==void 0&&(n.$infixName=t)}return n(r),i?this.construct():void 0}}extractHiddenTokens(e){let t=this.lexerResult.hidden;if(!t.length)return[];let n=e.startOffset;for(let e=0;en)return t.splice(0,e);return t.splice(0,t.length)}consume(e,t,n){let r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){let e=this.extractHiddenTokens(r);this.nodeBuilder.addHiddenNodes(e);let t=this.nodeBuilder.buildLeafNode(r,n),{assignment:i,crossRef:a}=this.getAssignment(n),o=this.current;if(i){let e=Fr(n)?r.image:this.converter.convert(r.image,t);this.assign(i.operator,i.feature,e,t,a)}else if(rj(o)){let e=r.image;Fr(n)||(e=this.converter.convert(e,t).toString()),o.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset==`number`&&!isNaN(e.endOffset)}subrule(e,t,n,r,i){let a;!this.isRecording()&&!n&&(a=this.nodeBuilder.buildCompositeNode(r));let o;try{o=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(o===void 0&&!n&&(o=this.construct()),o!==void 0&&a&&a.length>0&&this.performSubruleAssignment(o,r,a))}}performSubruleAssignment(e,t,n){let{assignment:r,crossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){let t=this.current;if(rj(t))t.value+=e.toString();else if(typeof e==`object`&&e){let n=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(n)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(t.feature&&t.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(n.$cstNode);let r={$type:e};this.stack.push(r),this.assign(t.operator,t.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;let e=this.stack.pop();return this.nodeBuilder.construct(e),`$infixName`in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):rj(e)?this.converter.convert(e.value,e.$cstNode):(Fn(this.astReflection,e),e)}constructInfix(e,t){let n=e.parts;if(!Array.isArray(n)||n.length===0)return;let r=e.operators;if(!Array.isArray(r)||n.length<2)return n[0];let i=0,a=-1;for(let e=0;ea?(a=o.precedence,i=e):o.precedence===a&&(o.rightAssoc||(i=e))}let o=r.slice(0,i),s=r.slice(i+1),c=n.slice(0,i+1),l=n.slice(i+1),u={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:c,operators:o},d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:s},f=this.constructInfix(u,t),p=this.constructInfix(d,t);return{$type:e.$type,$cstNode:e.$cstNode,left:f,operator:r[i],right:p}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=Tn(e,rr);this.assignmentMap.set(e,{assignment:t,crossRef:t&&pr(t.terminal)?t.terminal.isMulti?`multi`:`single`:void 0})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){let a=this.current,o;switch(o=i===`single`&&typeof n==`string`?this.linker.buildReference(a,t,r,n):i===`multi`&&typeof n==`string`?this.linker.buildMultiReference(a,t,r,n):n,e){case`=`:a[t]=o;break;case`?=`:a[t]=!0;break;case`+=`:Array.isArray(a[t])||(a[t]=[]),a[t].push(o)}}assignWithoutOverride(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];t===void 0?e[n]=r:Array.isArray(t)&&Array.isArray(r)&&(r.push(...t),e[n]=r)}let n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},cj=class{static{o(this,`AbstractParserErrorMessageProvider`)}buildMismatchTokenMessage(e){return ib.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return ib.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return ib.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return ib.buildEarlyExitMessage(e)}},lj=class extends cj{static{o(this,`LangiumParserErrorMessageProvider`)}buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(`:KW`)?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},uj=class extends oj{static{o(this,`LangiumCompletionParser`)}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let t=this.lexer.tokenize(e,{mode:`partial`});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){let n=this.wrapper.DEFINE_RULE(aj(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{let n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},dj={recoveryEnabled:!0,nodeLocationTracking:`full`,skipValidations:!0,errorMessageProvider:new lj},fj=class extends gS{static{o(this,`ChevrotainWrapper`)}constructor(e,t){let n=t&&`maxLookahead`in t;super(e,{...dj,lookaheadStrategy:n?new kx({maxLookahead:t.maxLookahead}):new wA({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,n){return this.RULE(e,t,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},pj=class extends fj{static{o(this,`ProfilerWrapper`)}constructor(e,t,n){super(e,t),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,n){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,n)}finally{this.task.stopSubTask(this.ruleName(t))}}};function mj(e,t,n){return hj({parser:t,tokens:n,ruleNames:new Map},e),t}o(mj,`createParser`);function hj(e,t){let n=Na(t,!1),r=N(t.rules).filter(Yr).filter(e=>n.has(e));for(let t of r){let n={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(t,_j(n,t.definition))}let i=N(t.rules).filter(Dr).filter(e=>n.has(e));for(let t of i)e.parser.rule(t,gj(e,t))}o(hj,`buildRules`);function gj(e,t){let n=t.call.rule.ref;if(!n)throw Error(`Could not resolve reference to infix operator rule: `+t.call.rule.$refText);if(hi(n))throw Error(`Cannot use terminal rule in infix expression`);let r=t.operators.precedences.flatMap(e=>e.operators),i={$type:`Group`,elements:[]},a={$container:i,$type:`Assignment`,feature:`parts`,operator:`+=`,terminal:t.call},s={$container:i,$type:`Group`,elements:[],cardinality:`*`};i.elements.push(a,s);let c={$container:s,$type:`Assignment`,feature:`operators`,operator:`+=`,terminal:{$type:`Alternatives`,elements:r}},l={...a,$container:s};s.elements.push(c,l);let u=r.map(t=>e.tokens[t.value]).map((t,n)=>({ALT:o(()=>e.parser.consume(n,t,c),`ALT`)})),d;return t=>{d??=kj(e,n),e.parser.subrule(0,d,!1,a,t),e.parser.many(0,{DEF:o(()=>{e.parser.alternatives(0,u),e.parser.subrule(1,d,!1,l,t)},`DEF`)})}}o(gj,`buildInfixRule`);function _j(e,t,n=!1){let r;if(Fr(t))r=Dj(e,t);else if(Yn(t))r=vj(e,t);else if(rr(t))r=_j(e,t.terminal);else if(pr(t))r=Ej(e,t);else if(ri(t))r=yj(e,t);else if(Zn(t))r=Sj(e,t);else if(Di(t))r=Cj(e,t);else if(Cr(t))r=wj(e,t);else if(_r(t)){let n=e.consume++;r=o(()=>e.parser.consume(n,tb,t),`method`)}else throw new ia(t.$cstNode,`Unexpected element type: ${t.$type}`);return Oj(e,n?void 0:Tj(t),r,t.cardinality)}o(_j,`buildElement`);function vj(e,t){let n=no(t);return()=>e.parser.action(n,t)}o(vj,`buildAction`);function yj(e,t){let n=t.rule.ref;if(Un(n)){let r=e.subrule++,i=Yr(n)&&n.fragment,a=t.arguments.length>0?bj(n,t.arguments):()=>({}),o;return s=>{o??=kj(e,n),e.parser.subrule(r,o,i,t,a(s))}}else if(hi(n)){let r=e.consume++,i=jj(e,n.name);return()=>e.parser.consume(r,i,t)}else if(n)aa(n);else throw new ia(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}o(yj,`buildRuleCall`);function bj(e,t){if(t.some(e=>e.calledByName)){let e=t.map(e=>({parameterName:e.parameter?.ref?.name,predicate:xj(e.value)}));return t=>{let n={};for(let{parameterName:r,predicate:i}of e)r&&(n[r]=i(t));return n}}else{let n=t.map(e=>xj(e.value));return t=>{let r={};for(let i=0;it(e)||n(e)}else if(dr(e)){let t=xj(e.left),n=xj(e.right);return e=>t(e)&&n(e)}else if(Vr(e)){let t=xj(e.value);return e=>!t(e)}else if(qr(e)){let t=e.parameter.ref.name;return e=>e!==void 0&&e[t]===!0}else if(ar(e)){let t=!!e.true;return()=>t}aa(e)}o(xj,`buildPredicate`);function Sj(e,t){if(t.elements.length===1)return _j(e,t.elements[0]);{let n=[];for(let r of t.elements){let t={ALT:_j(e,r,!0)},i=Tj(r);i&&(t.GATE=xj(i)),n.push(t)}let r=e.or++;return t=>e.parser.alternatives(r,n.map(e=>{let n={ALT:o(()=>e.ALT(t),`ALT`)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n}))}}o(Sj,`buildAlternatives`);function Cj(e,t){if(t.elements.length===1)return _j(e,t.elements[0]);let n=[];for(let r of t.elements){let t={ALT:_j(e,r,!0)},i=Tj(r);i&&(t.GATE=xj(i)),n.push(t)}let r=e.or++,i=o((e,t)=>`uGroup_${e}_${t.getRuleStack().join(`-`)}`,`idFunc`),a=o(t=>e.parser.alternatives(r,n.map((n,a)=>{let s={ALT:o(()=>!0,`ALT`)},c=e.parser;s.ALT=()=>{if(n.ALT(t),!c.isRecording()){let e=i(r,c);c.unorderedGroups.get(e)||c.unorderedGroups.set(e,[]);let t=c.unorderedGroups.get(e);t?.[a]===void 0&&(t[a]=!0)}};let l=n.GATE;return l?s.GATE=()=>l(t):s.GATE=()=>!c.unorderedGroups.get(i(r,c))?.[a],s})),`alternatives`),s=Oj(e,Tj(t),a,`*`);return t=>{s(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}o(Cj,`buildUnorderedGroup`);function wj(e,t){let n=t.elements.map(t=>_j(e,t));return e=>n.forEach(t=>t(e))}o(wj,`buildGroup`);function Tj(e){if(Cr(e))return e.guardCondition}o(Tj,`getGuardCondition`);function Ej(e,t,n=t.terminal){if(!n){if(!t.type.ref)throw Error(`Could not resolve reference to type: `+t.type.$refText);let n=Ga(t.type.ref)?.terminal;if(!n)throw Error(`Could not find name assignment for type: `+no(t.type.ref));return Ej(e,t,n)}else if(ri(n)&&Yr(n.rule.ref)){let r=n.rule.ref,i=e.subrule++,a;return n=>{a??=kj(e,r),e.parser.subrule(i,a,!1,t,n)}}else if(ri(n)&&hi(n.rule.ref)){let r=e.consume++,i=jj(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}else if(Fr(n)){let r=e.consume++,i=jj(e,n.value);return()=>e.parser.consume(r,i,t)}else throw Error(`Could not build cross reference parser`)}o(Ej,`buildCrossReference`);function Dj(e,t){let n=e.consume++,r=e.tokens[t.value];if(!r)throw Error(`Could not find token for keyword: `+t.value);return()=>e.parser.consume(n,r,t)}o(Dj,`buildKeyword`);function Oj(e,t,n,r){let i=t&&xj(t);if(!r)if(i){let t=e.or++;return r=>e.parser.alternatives(t,[{ALT:o(()=>n(r),`ALT`),GATE:o(()=>i(r),`GATE`)},{ALT:mS(),GATE:o(()=>!i(r),`GATE`)}])}else return n;if(r===`*`){let t=e.many++;return r=>e.parser.many(t,{DEF:o(()=>n(r),`DEF`),GATE:i?()=>i(r):void 0})}else if(r===`+`){let t=e.many++;if(i){let r=e.or++;return a=>e.parser.alternatives(r,[{ALT:o(()=>e.parser.atLeastOne(t,{DEF:o(()=>n(a),`DEF`)}),`ALT`),GATE:o(()=>i(a),`GATE`)},{ALT:mS(),GATE:o(()=>!i(a),`GATE`)}])}else return r=>e.parser.atLeastOne(t,{DEF:o(()=>n(r),`DEF`)})}else if(r===`?`){let t=e.optional++;return r=>e.parser.optional(t,{DEF:o(()=>n(r),`DEF`),GATE:i?()=>i(r):void 0})}else aa(r)}o(Oj,`wrap`);function kj(e,t){let n=Aj(e,t),r=e.parser.getRule(n);if(!r)throw Error(`Rule "${n}" not found."`);return r}o(kj,`getRule`);function Aj(e,t){if(Un(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!Yr(r);)(Cr(r)||Zn(r)||Di(r))&&(i=r.elements.indexOf(n).toString()+`:`+i),n=r,r=r.$container;return i=r.name+`:`+i,e.ruleNames.set(t,i),i}}o(Aj,`getRuleName`);function jj(e,t){let n=e.tokens[t];if(!n)throw Error(`Token "${t}" not found."`);return n}o(jj,`getToken`);function Mj(e){let t=e.Grammar,n=e.parser.Lexer,r=new uj(e);return mj(t,r,n.definition),r.finalize(),r}o(Mj,`createCompletionParser`);function Nj(e){let t=Pj(e);return t.finalize(),t}o(Nj,`createLangiumParser`);function Pj(e){let t=e.Grammar,n=e.parser.Lexer;return mj(t,new sj(e),n.definition)}o(Pj,`prepareLangiumParser`);var Fj=class{static{o(this,`DefaultTokenBuilder`)}constructor(){this.diagnostics=[]}buildTokens(e,t){let n=N(Na(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return i.push(...r),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(hi).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){let t=oo(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,r={name:e.name,PATTERN:n};return typeof n==`function`&&(r.LINE_BREAKS=!0),e.hidden&&(r.GROUP=Da(t)?Vy.SKIPPED:`hidden`),r}requiresCustomPattern(e){return!!(e.flags.includes(`u`)||e.flags.includes(`s`))}regexPatternFunction(e){let t=new RegExp(e,e.flags+`y`);return(e,n)=>(t.lastIndex=n,t.exec(e))}buildKeywordTokens(e,t,n){return e.filter(Un).flatMap(e=>jn(e).filter(Fr)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,!!n?.caseInsensitive))}buildKeywordToken(e,t,n){let r=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)};return typeof r==`function`&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp(Oa(e.value),`i`):e.value}findLongerAlt(e,t){return t.reduce((t,n)=>{let r=n?.PATTERN;return r?.source&&ka(`^`+r.source+`$`,e.value)&&t.push(n),t},[])}},Ij=class{static{o(this,`DefaultValueConverter`)}convert(e,t){let n=t.grammarSource;if(pr(n)&&(n=Ia(n)),ri(n)){let r=n.rule.ref;if(!r)throw Error(`This cst node was not parsed by a rule.`);return this.runConverter(r,e,t)}return e}runConverter(e,t,n){switch(e.name.toUpperCase()){case`INT`:return Lj.convertInt(t);case`STRING`:return Lj.convertString(t);case`ID`:return Lj.convertID(t)}switch(ao(e)?.toLowerCase()){case`number`:return Lj.convertNumber(t);case`boolean`:return Lj.convertBoolean(t);case`bigint`:return Lj.convertBigint(t);case`date`:return Lj.convertDate(t);default:return t}}},Lj;(function(e){function t(e){let t=``;for(let r=1;r{typeof setImmediate>`u`?setTimeout(e,0):setImmediate(e)})}o(Rj,`delayNextTick`);var zj=0,Bj=10;function Vj(){return zj=performance.now(),new Z.CancellationTokenSource}o(Vj,`startCancelableOperation`);function Hj(e){Bj=e}o(Hj,`setInterruptionPeriod`);var Uj=Symbol(`OperationCancelled`);function Wj(e){return e===Uj}o(Wj,`isOperationCancelled`);async function Gj(e){if(e===Z.CancellationToken.None)return;let t=performance.now();if(t-zj>=Bj&&(zj=t,await Rj(),zj=performance.now()),e.isCancellationRequested)throw Uj}o(Gj,`interruptAndCheck`);var Kj=class{static{o(this,`Deferred`)}constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}},qj=class e{static{o(this,`FullTextDocument`)}constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(t,n){for(let n of t)if(e.isIncremental(n)){let e=Qj(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);let i=Math.max(e.start.line,0),a=Math.max(e.end.line,0),o=this._lineOffsets,s=Xj(n.text,!1,t);if(a-i===s.length)for(let e=0,t=s.length;ee?r=i:n=i+1}let i=n-1;return e=this.ensureBeforeEOL(e,t[i]),{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line];if(e.character<=0)return n;let r=e.line+1t&&Zj(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}static isFull(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}},Jj;(function(e){function t(e,t,n,r){return new qj(e,t,n,r)}o(t,`create`),e.create=t;function n(e,t,n){if(e instanceof qj)return e.update(t,n),e;throw Error(`TextDocument.update: document must be created by TextDocument.create`)}o(n,`update`),e.update=n;function r(e,t){let n=e.getText(),r=Yj(t.map($j),(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),i=0,a=[];for(let t of r){let r=e.offsetAt(t.range.start);if(ri&&a.push(n.substring(i,r)),t.newText.length&&a.push(t.newText),i=e.offsetAt(t.range.end)}return a.push(n.substr(i)),a.join(``)}o(r,`applyEdits`),e.applyEdits=r})(Jj||={});function Yj(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);Yj(r,t),Yj(i,t);let a=0,o=0,s=0;for(;an.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}o(Qj,`getWellformedRange`);function $j(e){let t=Qj(e.range);return t===e.range?e:{newText:e.newText,range:t}}o($j,`getWellformedEdit`);var eM;(()=>{var e={975:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}o(t,`e`);function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s2){var c=r.lastIndexOf(`/`);if(c!==r.length-1){c===-1?(r=``,i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1;a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}o(n,`r`);var r={resolve:o(function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},`resolve`),normalize:o(function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},`normalize`),isAbsolute:o(function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},`isAbsolute`),join:o(function(){if(arguments.length===0)return`.`;for(var e,n=0;n0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},`join`),relative:o(function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;il){if(n.charCodeAt(s+d)===47)return n.slice(s+d+1);if(d===0)return n.slice(s+d)}else o>l&&(e.charCodeAt(i+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(i+d);if(f!==n.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=i+u+1;d<=a;++d)d!==a&&e.charCodeAt(d)!==47||(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+n.slice(s+u):(s+=u,n.charCodeAt(s)===47&&++s,n.slice(s))},`relative`),_makeLong:o(function(e){return e},`_makeLong`),dirname:o(function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},`dirname`),basename:o(function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,c=-1;for(r=e.length-1;r>=0;--r){var l=e.charCodeAt(r);if(l===47){if(!o){i=r+1;break}}else c===-1&&(o=!1,c=r+1),s>=0&&(l===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=c))}return i===a?a=c:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},`basename`),extname:o(function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c!==47)i===-1&&(a=!1,i=s+1),c===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},`extname`),format:o(function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return(function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r})(0,e)},`format`),parse:o(function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=r;--u)if((i=e.charCodeAt(u))!==47)c===-1&&(l=!1,c=u+1),i===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1);else if(!l){s=u+1;break}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(n.base=n.name=s===0&&a?e.slice(1,c):e.slice(s,c)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,c)):(n.name=e.slice(s,o),n.base=e.slice(s,c)),n.ext=e.slice(o,c)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},`parse`),sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}o(n,`r`),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:o(()=>d,`URI`),Utils:o(()=>te,`Utils`)}),typeof process==`object`?i=process.platform===`win32`:typeof navigator==`object`&&(i=navigator.userAgent.indexOf(`Windows`)>=0);let a=/^\w[\w\d+.-]*$/,s=/^\//,c=/^\/\//;function l(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!a.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!s.test(e.path))throw Error(`[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character`)}else if(c.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}o(l,`a`);let u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static{o(this,`l`)}static isUri(e){return e instanceof d||!!e&&typeof e.authority==`string`&&typeof e.fragment==`string`&&typeof e.path==`string`&&typeof e.query==`string`&&typeof e.scheme==`string`&&typeof e.fsPath==`string`&&typeof e.with==`function`&&typeof e.toString==`function`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=(function(e,t){return e||t?e:`file`})(e,a),this.authority=t||``,this.path=(function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t})(this.scheme,n||``),this.query=r||``,this.fragment=i||``,l(this,a))}get fsPath(){return _(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new p(t,n,r,i,a)}static parse(e,t=!1){let n=u.exec(e);return n?new p(n[2]||``,x(n[4]||``),x(n[5]||``),x(n[7]||``),x(n[9]||``),t):new p(``,``,``,``,``)}static file(e){let t=``;if(i&&(e=e.replace(/\\/g,`/`)),e[0]===`/`&&e[1]===`/`){let n=e.indexOf(`/`,2);n===-1?(t=e.substring(2),e=`/`):(t=e.substring(2,n),e=e.substring(n)||`/`)}return new p(`file`,t,e,``,``)}static from(e){let t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{let t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}let f=i?1:void 0;class p extends d{static{o(this,`d`)}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=_(this,!1),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||=v(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}let m={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function h(e,t,n){let r,i=-1;for(let a=0;a=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=m[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}o(h,`m`);function g(e){let t;for(let n=0;n1&&e.scheme===`file`?`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i&&(n=n.replace(/\//g,`\\`)),n}o(_,`v`);function v(e,t){let n=t?g:h,r=``,{scheme:i,authority:a,path:o,query:s,fragment:c}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),c&&(r+=`#`,r+=t?c:h(c,!1,!1)),r}o(v,`b`);function y(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}o(y,`C`);let b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function x(e){return e.match(b)?e.replace(b,(e=>y(e))):e}o(x,`w`);var ee=n(975);let S=ee.posix||ee;var te;(function(e){e.joinPath=function(e,...t){return e.with({path:S.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=S.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=S.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return S.basename(e.path)},e.extname=function(e){return S.extname(e.path)}})(te||={}),eM=r})();var{URI:tM,Utils:nM}=eM,rM;(function(e){e.basename=nM.basename,e.dirname=nM.dirname,e.extname=nM.extname,e.joinPath=nM.joinPath,e.resolvePath=nM.resolvePath;let t=typeof process==`object`&&process?.platform===`win32`;function n(e,t){return e?.toString()===t?.toString()}o(n,`equals`),e.equals=n;function r(e,n){let r=typeof e==`string`?tM.parse(e).path:e.path,i=typeof n==`string`?tM.parse(n).path:n.path,a=r.split(`/`).filter(e=>e.length>0),o=i.split(`/`).filter(e=>e.length>0);if(t){let e=/^[A-Z]:$/;if(a[0]&&e.test(a[0])&&(a[0]=a[0].toLowerCase()),o[0]&&e.test(o[0])&&(o[0]=o[0].toLowerCase()),a[0]!==o[0])return i.substring(1)}let s=0;for(;s({name:e.name,uri:rM.joinPath(tM.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(rM.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){let n=e.split(`/`);e.charAt(e.length-1)===`/`&&n.pop();let r=this.root;for(let e of n){let n=r.children.get(e);if(!n)if(t)n={name:e,children:new Map,parent:r},r.children.set(e,n);else return;r=n}return r}collectValues(e){let t=[];e.element&&t.push(e.element);for(let n of e.children.values())t.push(...this.collectValues(n));return t}},Q;(function(e){e[e.Changed=0]=`Changed`,e[e.Parsed=1]=`Parsed`,e[e.IndexedContent=2]=`IndexedContent`,e[e.ComputedScopes=3]=`ComputedScopes`,e[e.Linked=4]=`Linked`,e[e.IndexedReferences=5]=`IndexedReferences`,e[e.Validated=6]=`Validated`})(Q||={});var aM=class{static{o(this,`DefaultLangiumDocumentFactory`)}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=Z.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){return t??=tM.parse(e.uri),Z.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromString(e,t,n){return Z.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,n){if(typeof t==`string`){let r=this.parse(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}else if(`$model`in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}else{let r=this.parse(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}async createAsync(e,t,n){if(typeof t==`string`){let r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}else{let r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n)i={parseResult:e,uri:t,state:Q.Parsed,references:[],textDocument:n};else{let n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:Q.Parsed,references:[],get textDocument(){return n()}}}return e.value.$document=i,i}async update(e,t){let n=e.parseResult.value.$cstNode?.root.fullText,r=this.textDocuments?.get(e.uri.toString()),i=r?r.getText():await this.fileSystemProvider.readFile(e.uri);if(r)Object.defineProperty(e,"textDocument",{value:r});else{let t=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:t})}return n!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=Q.Parsed,e}parse(e,t,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,n)}parseAsync(e,t,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){let n=this.serviceRegistry,r;return()=>r??=Jj.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??``)}},oM=class{static{o(this,`DefaultLangiumDocuments`)}constructor(e){this.documentTrie=new iM,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return N(this.documentTrie.all())}addDocument(e){let t=e.uri.toString();if(this.documentTrie.has(t))throw Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){let t=e.toString();return this.documentTrie.find(t)}getDocuments(e){let t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then(e=>(this.addDocument(e),e));{let n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&this.documentBuilder().resetToState(n,Q.Changed),n}deleteDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&(n.state=Q.Changed,this.documentTrie.delete(t)),n}deleteDocuments(e){let t=e.toString(),n=this.documentTrie.findAll(t);for(let e of n)e.state=Q.Changed;return this.documentTrie.delete(t),n}},sM=Symbol(`RefResolving`),cM=class{static{o(this,`DefaultLinker`)}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=Z.CancellationToken.None){if(this.profiler?.isActive(`linking`)){let n=this.profiler.createTask(`linking`,this.languageId);n.start();try{for(let r of Mn(e.parseResult.value))await Gj(t),Pn(r).forEach(t=>{let i=`${r.$type}:${t.property}`;n.startSubTask(i);try{this.doLink(t,e)}finally{n.stopSubTask(i)}})}finally{n.stop()}}else for(let n of Mn(e.parseResult.value))await Gj(t),Pn(n).forEach(t=>this.doLink(t,e))}doLink(e,t){let n=e.reference;if(`_ref`in n&&n._ref===void 0){n._ref=sM;try{let t=this.getCandidate(e);dn(t)?n._ref=t:(n._nodeDescription=t,n._ref=this.loadAstNode(t)??this.createLinkingError(e,t))}catch(t){console.error(`An error occurred while resolving reference to '${n.$refText}':`,t);let r=t.message??String(t);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${r}`}}t.references.push(n)}else if(`_items`in n&&n._items===void 0){n._items=sM;try{let t=this.getCandidates(e),r=[];if(dn(t))n._linkingError=t;else for(let e of t){let t=this.loadAstNode(e);t&&r.push({ref:t,$nodeDescription:e})}n._items=r}catch(t){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${t}`},n._items=[]}t.references.push(n)}}unlink(e){for(let t of e.references)`_ref`in t?(t._ref=void 0,delete t._nodeDescription):`_items`in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,n,r){let i=this,a={$refNode:n,$refText:r,_ref:void 0,get ref(){if(M(this._ref))return this._ref;if(un(this._nodeDescription)){let n=i.loadAstNode(this._nodeDescription);this._ref=n??i.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){this._ref=sM;let n=On(e).$document,r=i.getLinkedNode({reference:a,container:e,property:t});if(r.error&&n&&n.state0))return this._linkingError=i.createLinkingError({reference:a,container:e,property:t})}};return a}throwCyclicReferenceError(e,t,n){throw Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${n}')`)}getLinkedNode(e){try{let t=this.getCandidate(e);if(dn(t))return{error:t};let n=this.loadAstNode(t);return n?{node:n,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);let n=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;let t=this.langiumDocuments().getDocument(e.documentUri);if(t)return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){let n=On(e.container).$document;return n&&n.statepr(e)&&e.isMulti)}findDeclarations(e){if(e){let t=Wa(e),n=e.astNode;if(t&&n){let r=n[t.feature];if(cn(r)||ln(r))return kn(r);if(Array.isArray(r)){for(let t of r)if((cn(t)||ln(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return kn(t)}}if(n){let t=this.nameProvider.getNameNode(n);if(t&&(t===e||Ri(e,t)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){let t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(t.head());if(n){for(let t of Pn(n))if(ln(t.reference)&&t.reference.items.some(t=>t.ref===e))return t.reference.items.map(e=>e.ref)}return[e]}else return[e]}getNodeFromReferenceDescription(e){if(!e)return;let t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}findDeclarationNodes(e){let t=this.findDeclarations(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e)??e.$cstNode;t&&n.push(t)}return n}findReferences(e,t){let n=[];t.includeDeclaration&&n.push(...this.getSelfReferences(e));let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter(e=>rM.equals(e.sourceUri,t.documentUri))),n.push(...r),N(n)}getSelfReferences(e){let t=this.getSelfNodes(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e);if(t){let r=Dn(e),i=this.nodeLocator.getAstNodePath(e);n.push({sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:Bi(t),local:!0})}}return n}},fM=class{static{o(this,`MultiMap`)}constructor(e){if(this.map=new Map,e)for(let[t,n]of e)this.add(t,n)}get size(){return Sn.sum(N(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let r=n.indexOf(t);if(r>=0)return n.length===1?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?N(t):yn}has(e,t){if(t===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,n)=>t.forEach(t=>e(t,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return N(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return N(this.map.keys())}values(){return N(this.map.values()).flat()}entriesGroupedByKey(){return N(this.map.entries())}},pM=class{static{o(this,`BiMap`)}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let t=this.map.get(e);return t===void 0?!1:(this.map.delete(e),this.inverse.delete(t),!0)}},mM=class{static{o(this,`DefaultScopeComputation`)}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=Z.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,n=An,r=Z.CancellationToken.None){let i=[];this.addExportedSymbol(e,i,t);for(let a of n(e))await Gj(r),this.addExportedSymbol(a,i,t);return i}addExportedSymbol(e,t,n){let r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async collectLocalSymbols(e,t=Z.CancellationToken.None){let n=e.parseResult.value,r=new fM;for(let i of jn(n))await Gj(t),this.addLocalSymbol(i,e,r);return r}addLocalSymbol(e,t,n){let r=e.$container;if(r){let i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}},hM=class{static{o(this,`StreamScope`)}constructor(e,t,n){this.elements=e,this.outerScope=t,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}},gM=class{static{o(this,`MapScope`)}constructor(e,t,n){this.elements=new Map,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(let t of e){let e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.set(e,t)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t),r=n?[n]:[];return(this.concatOuterScope||r.length>0)&&this.outerScope?N(r).concat(this.outerScope.getElements(e)):N(r)}getAllElements(){let e=N(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},_M=class{static{o(this,`MultiMapScope`)}constructor(e,t,n){this.elements=new fM,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(let t of e){let e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.add(e,t)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t)[0];if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);return(this.concatOuterScope||n.length===0)&&this.outerScope?N(n).concat(this.outerScope.getElements(e)):N(n)}getAllElements(){let e=N(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},vM={getElement(){},getElements(){return yn},getAllElements(){return yn}},yM=class{static{o(this,`DisposableCache`)}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw Error(`This cache has already been disposed`)}},bM=class extends yM{static{o(this,`SimpleCache`)}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){let n=t();return this.cache.set(e,n),n}else return}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},xM=class extends yM{static{o(this,`ContextCache`)}constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();let r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){let e=n();return r.set(t,e),e}else return}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){let t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){let t=this.converter(e),n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}},SM=class extends xM{static{o(this,`DocumentCache`)}constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(let e of t)this.clear(e)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{let n=e.concat(t);for(let e of n)this.clear(e)}))}},CM=class extends bM{static{o(this,`WorkspaceCache`)}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},wM=class{static{o(this,`DefaultScopeProvider`)}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new CM(e.shared)}getScope(e){let t=[],n=this.reflection.getReferenceType(e),r=Dn(e.container).localSymbols;if(r){let i=e.container;do r.has(i)&&t.push(r.getStream(i).filter(e=>this.reflection.isSubtype(e.type,n))),i=i.$container;while(i)}let i=this.getGlobalScope(n,e);for(let e=t.length-1;e>=0;e--)i=this.createScope(t[e],i);return i}createScope(e,t,n){return new hM(N(e),t,n)}createScopeForNodes(e,t,n){return new hM(N(e).map(e=>{let t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new _M(this.indexManager.allElements(e)))}};function TM(e){return typeof e.$comment==`string`}o(TM,`isAstNodeWithComment`);function EM(e){return typeof e==`object`&&!!e&&(`$ref`in e||`$error`in e)}o(EM,`isIntermediateReference`);var DM=class{static{o(this,`DefaultJsonSerializer`)}constructor(e){this.ignoreProperties=new Set([`$container`,`$containerProperty`,`$containerIndex`,`$document`,`$cstNode`]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let n=t??{},r=t?.replacer,i=o((e,t)=>this.replacer(e,t,n),`defaultReplacer`),a=r?(e,t)=>r(e,t,i):i;try{return this.currentDocument=Dn(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let n=t??{},r=JSON.parse(e);return this.linkNode(r,r,n),r}replacer(e,t,{refText:n,sourceText:r,textRegions:i,comments:a,uriConverter:o}){if(!this.ignoreProperties.has(e))if(cn(t)){let e=t.ref,r=n?t.$refText:void 0;if(e){let t=Dn(e),n=``;this.currentDocument&&this.currentDocument!==t&&(n=o?o(t.uri,e):t.uri.toString());let i=this.astNodeLocator.getAstNodePath(e);return{$ref:`${n}#${i}`,$refText:r}}else return{$error:t.error?.message??`Could not resolve reference`,$refText:r}}else if(ln(t)){let e=n?t.$refText:void 0,r=[];for(let e of t.items){let t=e.ref,n=Dn(e.ref),i=``;this.currentDocument&&this.currentDocument!==n&&(i=o?o(n.uri,t):n.uri.toString());let a=this.astNodeLocator.getAstNodePath(t);r.push(`${i}#${a}`)}return{$refs:r,$refText:e}}else if(M(t)){let n;if(i&&(n=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&n?.$textRegion&&(n.$textRegion.documentURI=this.currentDocument?.uri.toString())),r&&!e&&(n??={...t},n.$sourceText=t.$cstNode?.text),a){n??={...t};let e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,``))}return n??t}else return t}addAstNodeRegionWithAssignmentsTo(e){let t=o(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),`createDocumentSegment`);if(e.$cstNode){let n=e.$textRegion=t(e.$cstNode),r=n.assignments={};return Object.keys(e).filter(e=>!e.startsWith(`$`)).forEach(n=>{let i=Ra(e.$cstNode,n).map(t);i.length!==0&&(r[n]=i)}),e}}linkNode(e,t,n,r,i,a){for(let[r,i]of Object.entries(e))if(Array.isArray(i))for(let a=0;a{await this.handleException(()=>e.call(t,n,r,i),`An error occurred during validation`,r,n)}}async handleException(e,t,n,r){try{await e()}catch(e){if(Wj(e))throw e;console.error(`${t}:`,e),e instanceof Error&&e.stack&&console.error(e.stack),n(`error`,`${t}: ${e instanceof Error?e.message:String(e)}`,{node:r})}}addEntry(e,t){if(e===`AstNode`){this.entries.add(`AstNode`,t);return}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,t)}getChecks(e,t){let n=N(this.entries.get(e)).concat(this.entries.get(`AstNode`));return t&&(n=n.filter(e=>t.includes(e.category))),n.map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,`An error occurred during set-up of the validation`,t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,`An error occurred during tear-down of the validation`,t))}wrapPreparationException(e,t,n){return async(r,i,a,o)=>{await this.handleException(()=>e.call(n,r,i,a,o),t,i,r)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},MM=Object.freeze({validateNode:!0,validateChildren:!0}),NM=class{static{o(this,`DefaultDocumentValidator`)}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},n=Z.CancellationToken.None){let r=e.parseResult,i=[];if(await Gj(n),(!t.categories||t.categories.includes(`built-in`))&&(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some(e=>e.data?.code===LM.LexingError)||(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some(e=>e.data?.code===LM.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>e.data?.code===LM.LinkingError))))return i;try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(Wj(e))throw e;console.error(`An error occurred during validation:`,e)}return await Gj(n),i}processLexingErrors(e,t,n){let r=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let e of r){let n=e.severity??`error`,r={severity:FM(n),range:{start:{line:e.line-1,character:e.column-1},end:{line:e.line-1,character:e.column+e.length-1}},message:e.message,data:IM(n),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,n){for(let n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if(`previousToken`in n){let t=n.previousToken;if(isNaN(t.startOffset)){let t={line:0,character:0};e={start:t,end:t}}else{let n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=zi(n.token);if(e){let r={severity:FM(`error`),range:e,message:n.message,data:kM(LM.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,n){for(let n of e.references){let e=n.error;if(e){let r={node:e.info.container,range:n.$refNode?.range,property:e.info.property,index:e.info.index,data:{code:LM.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic(`error`,e.message,r))}}}async validateAst(e,t,n=Z.CancellationToken.None){let r=[],i=o((e,t,n)=>{r.push(this.toDiagnostic(e,t,n))},`acceptor`);return await this.validateAstBefore(e,t,i,n),await this.validateAstNodes(e,t,i,n),await this.validateAstAfter(e,t,i,n),r}async validateAstBefore(e,t,n,r=Z.CancellationToken.None){let i=this.validationRegistry.checksBefore;for(let a of i)await Gj(r),await a(e,n,t.categories??[],r)}async validateAstNodes(e,t,n,r=Z.CancellationToken.None){if(this.profiler?.isActive(`validating`)){let i=this.profiler.createTask(`validating`,this.languageId);i.start();try{let a=Mn(e).iterator();for(let e of a){i.startSubTask(e.$type);let o=this.validateSingleNodeOptions(e,t);if(o.validateNode)try{let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}finally{i.stopSubTask(e.$type)}o.validateChildren||a.prune()}}finally{i.stop()}}else{let i=Mn(e).iterator();for(let e of i){await Gj(r);let a=this.validateSingleNodeOptions(e,t);if(a.validateNode){let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}a.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return MM}async validateAstAfter(e,t,n,r=Z.CancellationToken.None){let i=this.validationRegistry.checksAfter;for(let a of i)await Gj(r),await a(e,n,t.categories??[],r)}toDiagnostic(e,t,n){return{message:t,range:PM(n),severity:FM(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}};function PM(e){if(e.range)return e.range;let t;return typeof e.property==`string`?t=za(e.node.$cstNode,e.property,e.index):typeof e.keyword==`string`&&(t=Ha(e.node.$cstNode,e.keyword,e.index)),t??=e.node.$cstNode,t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}o(PM,`getDiagnosticRange`);function FM(e){switch(e){case`error`:return 1;case`warning`:return 2;case`info`:return 3;case`hint`:return 4;default:throw Error(`Invalid diagnostic severity: `+e)}}o(FM,`toDiagnosticSeverity`);function IM(e){switch(e){case`error`:return kM(LM.LexingError);case`warning`:return kM(LM.LexingWarning);case`info`:return kM(LM.LexingInfo);case`hint`:return kM(LM.LexingHint);default:throw Error(`Invalid diagnostic severity: `+e)}}o(IM,`toDiagnosticData`);var LM;(function(e){e.LexingError=`lexing-error`,e.LexingWarning=`lexing-warning`,e.LexingInfo=`lexing-info`,e.LexingHint=`lexing-hint`,e.ParsingError=`parsing-error`,e.LinkingError=`linking-error`})(LM||={});var RM=class{static{o(this,`DefaultAstNodeDescriptionProvider`)}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n){let r=n??Dn(e);t??=this.nameProvider.getName(e);let i=this.astNodeLocator.getAstNodePath(e);if(!t)throw Error(`Node at path ${i} has no name.`);let a,s=o(()=>a??=Bi(this.nameProvider.getNameNode(e)??e.$cstNode),`nameSegmentGetter`);return{node:e,name:t,get nameSegment(){return s()},selectionSegment:Bi(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},zM=class{static{o(this,`DefaultReferenceDescriptionProvider`)}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Z.CancellationToken.None){let n=[],r=e.parseResult.value;for(let e of Mn(r))await Gj(t),Pn(e).forEach(e=>{e.reference.error||n.push(...this.createInfoDescriptions(e))});return n}createInfoDescriptions(e){let t=e.reference;if(t.error||!t.$refNode)return[];let n=[];cn(t)&&t.$nodeDescription?n=[t.$nodeDescription]:ln(t)&&(n=t.items.map(e=>e.$nodeDescription).filter(e=>e!==void 0));let r=Dn(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),a=[],o=Bi(t.$refNode);for(let e of n)a.push({sourceUri:r,sourcePath:i,targetUri:e.documentUri,targetPath:e.path,segment:o,local:rM.equals(e.documentUri,r)});return a}},BM=class{static{o(this,`DefaultAstNodeLocator`)}constructor(){this.segmentSeparator=`/`,this.indexSeparator=`@`}getAstNodePath(e){if(e.$container){let t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return``}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw Error(`Missing '$containerProperty' in AST node.`);return t===void 0?e:e+this.indexSeparator+t}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||t.length===0)return e;let n=t.indexOf(this.indexSeparator);if(n>0){let r=t.substring(0,n),i=parseInt(t.substring(n+1));return e[r]?.[i]}return e[t]},e)}},VM={};d(VM,f(vt(),1));var HM=class{static{o(this,`DefaultConfigurationProvider`)}constructor(e){this._ready=new Kj,this.onConfigurationSectionUpdateEmitter=new VM.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){let t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,n[t])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings!=`object`||e.settings===null||Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},UM=f(an(),1),WM;(function(e){function t(e){return{dispose:o(async()=>await e(),`dispose`)}}o(t,`create`),e.create=t})(WM||={});var GM=class{static{o(this,`DefaultDocumentBuilder`)}constructor(e){this.updateBuildOptions={validation:{categories:[`built-in`,`fast`]}},this.updateListeners=[],this.buildPhaseListeners=new fM,this.documentPhaseListeners=new fM,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Q.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=Z.CancellationToken.None){for(let n of e){let e=n.uri.toString();if(n.state===Q.Validated){if(typeof t.validation==`boolean`&&t.validation)this.resetToState(n,Q.IndexedReferences);else if(typeof t.validation==`object`){let r=this.findMissingValidationCategories(n,t);r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:r}},result:this.buildState.get(e)?.result}),n.state=Q.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=Q.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=Z.CancellationToken.None){this.currentState=Q.Changed;let r=[];for(let e of t){let t=this.langiumDocuments.deleteDocuments(e);for(let e of t)r.push(e.uri),this.cleanUpDeleted(e)}let i=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(let e of i){let t=this.langiumDocuments.getDocument(e);t===void 0&&(t=this.langiumDocumentFactory.fromModel({$type:`INVALID`},e),t.state=Q.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,Q.Changed)}let a=N(i).concat(r).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!a.has(e.uri.toString())&&this.shouldRelink(e,a)).forEach(e=>this.resetToState(e,Q.ComputedScopes)),await this.emitUpdate(i,r),await Gj(n);let o=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state=1}findMissingValidationCategories(e,t){let n=this.buildState.get(e.uri.toString()),r=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=n?.result?.validationChecks?new Set(n?.result?.validationChecks):n?.completed?r:new Set;return N(t===void 0||t.validation===!0?r:typeof t.validation==`object`?t.validation.categories??r:[]).filter(e=>!i.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let t=await this.fileSystemProvider.stat(e);if(t.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(n=>n(e,t)))}sortDocuments(e){let t=0,n=e.length-1;for(;t=0&&!this.hasTextDocument(e[n]);)n--;te.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),WM.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case Q.Changed:case Q.Parsed:this.indexManager.removeContent(e.uri);case Q.IndexedContent:e.localSymbols=void 0;case Q.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case Q.Linked:this.indexManager.removeReferences(e.uri);case Q.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case Q.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=Q.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,Q.Parsed,n,e=>this.langiumDocumentFactory.update(e,n)),await this.runCancelable(e,Q.IndexedContent,n,e=>this.indexManager.updateContent(e,n)),await this.runCancelable(e,Q.ComputedScopes,n,async e=>{e.localSymbols=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectLocalSymbols(e,n)});let r=e.filter(e=>this.shouldLink(e));await this.runCancelable(r,Q.Linked,n,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n)),await this.runCancelable(r,Q.IndexedReferences,n,e=>this.indexManager.updateReferences(e,n));let i=e.filter(e=>this.shouldValidate(e)?!0:(this.markAsCompleted(e),!1));await this.runCancelable(i,Q.Validated,n,async e=>{await this.validate(e,n),this.markAsCompleted(e)})}markAsCompleted(e){let t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(let n of e){let e=n.uri.toString(),r=this.buildState.get(e);(!r||r.completed)&&this.buildState.set(e,{completed:!1,options:t,result:r?.result})}}async runCancelable(e,t,n,r){for(let i of e)i.statee.state===t);await this.notifyBuildPhase(i,t,n),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),WM.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),WM.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,n){let r;return t&&`path`in t?r=t:n=t,n??=Z.CancellationToken.None,r?this.awaitDocumentState(e,r,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,t,n){let r=this.langiumDocuments.getDocument(t);return r?r.state>=e?Promise.resolve(t):n.isCancellationRequested?Promise.reject(Uj):this.currentState>=e&&e>r.state?Promise.reject(new UM.ResponseError(UM.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${Q[r.state]}, requiring ${Q[e]}, but workspace state is already ${Q[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{let a=this.onDocumentPhase(e,e=>{rM.equals(e.uri,t)&&(a.dispose(),o.dispose(),r(e.uri))}),o=n.onCancellationRequested(()=>{a.dispose(),o.dispose(),i(Uj)})}):Promise.reject(new UM.ResponseError(UM.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(Uj):new Promise((n,r)=>{let i=this.onBuildPhase(e,()=>{i.dispose(),a.dispose(),n()}),a=t.onCancellationRequested(()=>{i.dispose(),a.dispose(),r(Uj)})})}async notifyDocumentPhase(e,t,n){let r=this.documentPhaseListeners.get(t).slice();for(let t of r)try{await Gj(n),await t(e,n)}catch(e){if(!Wj(e))throw e}}async notifyBuildPhase(e,t,n){if(e.length===0)return;let r=this.buildPhaseListeners.get(t).slice();for(let t of r)await Gj(n),await t(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){let n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,r=this.getBuildOptions(e),i=typeof r.validation==`object`?{...r.validation}:{};i.categories=this.findMissingValidationCategories(e,r);let a=await n.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;let o=this.buildState.get(e.uri.toString());o&&(o.result??={},o.result.validationChecks?o.result.validationChecks=N(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},KM=class{static{o(this,`DefaultIndexManager`)}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new xM,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let n=Dn(e).uri,r=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{rM.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)})}),N(r)}allElements(e,t){let n=N(this.symbolIndex.keys());return t&&(n=n.filter(e=>!t||t.has(e))),n.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){let t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=Z.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),r=e.uri.toString();this.symbolIndex.set(r,n),this.symbolByTypeIndex.clear(r)}async updateReferences(e,t=Z.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(e=>!e.local&&t.has(e.targetUri.toString())):!1}},qM=class{static{o(this,`DefaultWorkspaceManager`)}constructor(e){this.initialBuildOptions={},this._ready=new Kj,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=Z.CancellationToken.None){let n=await this.performStartup(e);await Gj(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){let t=[],n=o(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},`collector`);await this.loadAdditionalDocuments(e,n);let r=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,r)));let i=N(r).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{t(await this.langiumDocuments.getOrCreateDocument(e))}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return tM.parse(e.uri)}async traverseFolder(e,t){try{let n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(t){console.error(`Failure to read directory content of `+e.toString(!0),t)}}async searchFolder(e){let t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){let t=rM.basename(e.uri);return t.startsWith(`.`)?!1:e.isDirectory?t!==`node_modules`&&t!==`out`:e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},JM=class{static{o(this,`DefaultLexerErrorMessageProvider`)}buildUnexpectedCharactersMessage(e,t,n,r,i){return zy.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return zy.buildUnableToPopLexerModeMessage(e)}},YM={mode:`full`},XM=class{static{o(this,`DefaultLexer`)}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);let n=$M(t)?Object.values(t):t,r=e.LanguageMetaData.mode===`production`;this.chevrotainLexer=new Vy(n,{positionTracking:`full`,skipValidations:r,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=YM){let n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if($M(e))return e;let t=QM(e)?Object.values(e.modes).flat():e,n={};return t.forEach(e=>n[e.name]=e),n}};function ZM(e){return Array.isArray(e)&&(e.length===0||`name`in e[0])}o(ZM,`isTokenTypeArray`);function QM(e){return e&&`modes`in e&&`defaultMode`in e}o(QM,`isIMultiModeLexerDefinition`);function $M(e){return!ZM(e)&&!QM(e)}o($M,`isTokenTypeDictionary`),ht();function eN(e,t,n){let r,i;typeof e==`string`?(i=t,r=n):(i=e.range.start,r=t),i||=y.create(0,0);let a=nN(e),o=vN(r);return dN({index:0,tokens:aN({lines:a,position:i,options:o}),position:i})}o(eN,`parseJSDoc`);function tN(e,t){let n=vN(t),r=nN(e);if(r.length===0)return!1;let i=r[0],a=r[r.length-1],o=n.start,s=n.end;return!!o?.exec(i)&&!!s?.exec(a)}o(tN,`isJSDoc`);function nN(e){let t=``;return t=typeof e==`string`?e:e.text,t.split(xa)}o(nN,`getLines`);var rN=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,iN=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function aN(e){let t=[],n=e.position.line,r=e.position.character;for(let i=0;i=s.length){if(t.length>0){let e=y.create(n,r);t.push({type:`break`,content:``,range:b.create(e,e)})}}else{rN.lastIndex=c;let e=rN.exec(s);if(e){let i=e[0],a=e[1],o=y.create(n,r+c),l=y.create(n,r+c+i.length);t.push({type:`tag`,content:a,range:b.create(o,l)}),c+=i.length,c=lN(s,c)}if(c0&&t[t.length-1].type===`break`?t.slice(0,-1):t}o(aN,`tokenize`);function oN(e,t,n,r){let i=[];if(e.length===0){let e=y.create(n,r),a=y.create(n,r+t.length);i.push({type:`text`,content:t,range:b.create(e,a)})}else{let a=0;for(let o of e){let e=o.index,s=t.substring(a,e);s.length>0&&i.push({type:`text`,content:t.substring(a,e),range:b.create(y.create(n,a+r),y.create(n,e+r))});let c=s.length+1,l=o[1];if(i.push({type:`inline-tag`,content:l,range:b.create(y.create(n,a+c+r),y.create(n,a+c+l.length+r))}),c+=l.length,o.length===4){c+=o[2].length;let e=o[3];i.push({type:`text`,content:e,range:b.create(y.create(n,a+c+r),y.create(n,a+c+e.length+r))})}else i.push({type:`text`,content:``,range:b.create(y.create(n,a+c+r),y.create(n,a+c+r))});a=e+o[0].length}let o=t.substring(a);o.length>0&&i.push({type:`text`,content:o,range:b.create(y.create(n,a+r),y.create(n,a+r+o.length))})}return i}o(oN,`buildInlineTokens`);var sN=/\S/,cN=/\s*$/;function lN(e,t){let n=e.substring(t).match(sN);return n?t+n.index:e.length}o(lN,`skipWhitespace`);function uN(e){let t=e.match(cN);if(t&&typeof t.index==`number`)return t.index}o(uN,`lastCharacter`);function dN(e){let t=y.create(e.position.line,e.position.character);if(e.tokens.length===0)return new bN([],b.create(t,t));let n=[];for(;e.indext.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>`name`in e)}toString(){let e=``;for(let t of this.elements)if(e.length===0)e=t.toString();else{let n=t.toString();e+=EN(e)+n}return e.trim()}toMarkdown(e){let t=``;for(let n of this.elements)if(t.length===0)t=n.toMarkdown(e);else{let r=n.toMarkdown(e);t+=EN(t)+r}return t.trim()}},xN=class{static{o(this,`JSDocTagImpl`)}constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`,t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e} -${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){let t=this.content.toMarkdown(e);if(this.inline){let n=SN(this.name,t,e??{});if(typeof n==`string`)return n}let n=``;e?.tag===`italic`||e?.tag===void 0?n=`*`:e?.tag===`bold`?n=`**`:e?.tag===`bold-italic`&&(n=`***`);let r=`${n}@${this.name}${n}`;return this.content.inlines.length===1?r=`${r} \u2014 ${t}`:this.content.inlines.length>1&&(r=`${r} -${t}`),this.inline?`{${r}}`:r}};function SN(e,t,n){if(e===`linkplain`||e===`linkcode`||e===`link`){let r=t.indexOf(` `),i=t;if(r>0){let e=lN(t,r);i=t.substring(e),t=t.substring(0,r)}return(e===`linkcode`||e===`link`&&n.link===`code`)&&(i=`\`${i}\``),n.renderLink?.(t,i)??CN(t,i)}}o(SN,`renderInlineTag`);function CN(e,t){try{return tM.parse(e,!0),`[${t}](${e})`}catch{return e}}o(CN,`renderLinkDefault`);var wN=class{static{o(this,`JSDocTextImpl`)}constructor(e,t){this.inlines=e,this.range=t}toString(){let e=``;for(let t=0;tn.range.start.line&&(e+=` -`)}return e}toMarkdown(e){let t=``;for(let n=0;nr.range.start.line&&(t+=` -`)}return t}},TN=class{static{o(this,`JSDocLineImpl`)}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}};function EN(e){return e.endsWith(` -`)?` -`:` - -`}o(EN,`fillNewlines`);var DN=class{static{o(this,`JSDocDocumentationProvider`)}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let t=this.commentProvider.getComment(e);if(t&&tN(t))return eN(t).toMarkdown({renderLink:o((t,n)=>this.documentationLinkRenderer(e,t,n),`renderLink`),renderTag:o(t=>this.documentationTagRenderer(e,t),`renderTag`)})}documentationLinkRenderer(e,t,n){let r=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(r&&r.nameSegment){let e=r.nameSegment.range.start.line+1,t=r.nameSegment.range.start.character+1;return`[${n}](${r.documentUri.with({fragment:`L${e},${t}`}).toString()})`}else return}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){let n=Dn(e).localSymbols;if(!n)return;let r=e;do{let e=n.getStream(r).find(e=>e.name===t);if(e)return e;r=r.$container}while(r)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}},ON=class{static{o(this,`DefaultCommentProvider`)}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return TM(e)?e.$comment:Ki(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},kN=class{static{o(this,`DefaultAsyncParser`)}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},AN=class{static{o(this,`AbstractThreadedAsyncParser`)}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{if(this.queue.length>0){let t=this.queue.shift();t&&(e.lock(),t.resolve(e))}}),this.workerPool.push(e)}}async parse(e,t){let n=await this.acquireParserWorker(t),r=new Kj,i,a=t.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(e=>{let t=this.hydrator.hydrate(e);r.resolve(t)}).catch(e=>{r.reject(e)}).finally(()=>{a.dispose(),clearTimeout(i)}),r.promise}terminateWorker(e){e.terminate();let t=this.workerPool.indexOf(e);t>=0&&this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(let e of this.workerPool)if(e.ready)return e.lock(),e;let t=new Kj;return e.onCancellationRequested(()=>{let e=this.queue.indexOf(t);e>=0&&this.queue.splice(e,1),t.reject(Uj)}),this.queue.push(t),t.promise}},jN=class{static{o(this,`ParserWorker`)}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,n,r){this.onReadyEmitter=new VM.Emitter,this.deferred=new Kj,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=r,t(e=>{let t=e;this.deferred.resolve(t),this.unlock()}),n(e=>{this.deferred.reject(e),this.unlock()})}terminate(){this.deferred.reject(Uj),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw Error(`Parser worker is busy`);return this._parsing=!0,this.deferred=new Kj,this.sendMessage(e),this.deferred.promise}},MN=class{static{o(this,`DefaultWorkspaceLock`)}constructor(){this.previousTokenSource=new Z.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let t=Vj();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n=Z.CancellationToken.None){let r=new Kj,i={action:t,deferred:r,cancellationToken:n};return e.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:n})=>{try{let r=await Promise.resolve().then(()=>e(n));t.resolve(r)}catch(e){Wj(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},NN=class{static{o(this,`DefaultHydrator`)}constructor(e){this.grammarElementIdMap=new pM,this.tokenTypeIdMap=new pM,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let t=new Map,n=new Map;for(let n of Mn(e))t.set(n,{});if(e.$cstNode)for(let t of Ii(e.$cstNode))n.set(t,{});return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){let n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(let[r,i]of Object.entries(e))if(!r.startsWith(`$`))if(Array.isArray(i)){let e=[];n[r]=e;for(let n of i)M(n)?e.push(this.dehydrateAstNode(n,t)):cn(n)?e.push(this.dehydrateReference(n,t)):e.push(n)}else M(i)?n[r]=this.dehydrateAstNode(i,t):cn(i)?n[r]=this.dehydrateReference(i,t):i!==void 0&&(n[r]=i);return n}dehydrateReference(e,t){let n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=t.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,t){let n=t.cstNodes.get(e);return hn(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=t.astNodes.get(e.astNode),pn(e)?n.content=e.content.map(e=>this.dehydrateCstNode(e,t)):mn(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){let t=e.value,n=this.createHydrationContext(t);return`$cstNode`in t&&this.hydrateCstNode(t.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){let t=new Map,n=new Map;for(let n of Mn(e))t.set(n,{});let r;if(e.$cstNode)for(let t of Ii(e.$cstNode)){let e;`fullText`in t?(e=new tj(t.fullText),r=e):`content`in t?e=new $A:`tokenType`in t&&(e=this.hydrateCstLeafNode(t)),e&&(n.set(t,e),e.root=r)}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){let n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for(let[r,i]of Object.entries(e))if(!r.startsWith(`$`))if(Array.isArray(i)){let e=[];n[r]=e;for(let a of i)M(a)?e.push(this.setParent(this.hydrateAstNode(a,t),n)):cn(a)?e.push(this.hydrateReference(a,n,r,t)):e.push(a)}else M(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):cn(i)?n[r]=this.hydrateReference(i,n,r,t):i!==void 0&&(n[r]=i);return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){let r=t.cstNodes.get(e);if(typeof e.grammarSource==`number`&&(r.grammarSource=this.getGrammarElement(e.grammarSource)),r.astNode=t.astNodes.get(e.astNode),pn(r))for(let i of e.content){let e=this.hydrateCstNode(i,t,n++);r.content.push(e)}return r}hydrateCstLeafNode(e){let t=this.getTokenType(e.tokenType),n=e.offset,r=e.length,i=e.startLine,a=e.startColumn,o=e.endLine,s=e.endColumn,c=e.hidden;return new QA(n,r,{start:{line:i,character:a},end:{line:o,character:s}},t,c)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(let t of Mn(this.grammar))Vn(t)&&this.grammarElementIdMap.set(t,e++)}};function PN(e){return{documentation:{CommentProvider:o(e=>new ON(e),`CommentProvider`),DocumentationProvider:o(e=>new DN(e),`DocumentationProvider`)},parser:{AsyncParser:o(e=>new kN(e),`AsyncParser`),GrammarConfig:o(e=>_o(e),`GrammarConfig`),LangiumParser:o(e=>Nj(e),`LangiumParser`),CompletionParser:o(e=>Mj(e),`CompletionParser`),ValueConverter:o(()=>new Ij,`ValueConverter`),TokenBuilder:o(()=>new Fj,`TokenBuilder`),Lexer:o(e=>new XM(e),`Lexer`),ParserErrorMessageProvider:o(()=>new lj,`ParserErrorMessageProvider`),LexerErrorMessageProvider:o(()=>new JM,`LexerErrorMessageProvider`)},workspace:{AstNodeLocator:o(()=>new BM,`AstNodeLocator`),AstNodeDescriptionProvider:o(e=>new RM(e),`AstNodeDescriptionProvider`),ReferenceDescriptionProvider:o(e=>new zM(e),`ReferenceDescriptionProvider`)},references:{Linker:o(e=>new cM(e),`Linker`),NameProvider:o(()=>new uM,`NameProvider`),ScopeProvider:o(e=>new wM(e),`ScopeProvider`),ScopeComputation:o(e=>new mM(e),`ScopeComputation`),References:o(e=>new dM(e),`References`)},serializer:{Hydrator:o(e=>new NN(e),`Hydrator`),JsonSerializer:o(e=>new DM(e),`JsonSerializer`)},validation:{DocumentValidator:o(e=>new NM(e),`DocumentValidator`),ValidationRegistry:o(e=>new jM(e),`ValidationRegistry`)},shared:o(()=>e.shared,`shared`)}}o(PN,`createDefaultCoreModule`);function FN(e){return{ServiceRegistry:o(e=>new OM(e),`ServiceRegistry`),workspace:{LangiumDocuments:o(e=>new oM(e),`LangiumDocuments`),LangiumDocumentFactory:o(e=>new aM(e),`LangiumDocumentFactory`),DocumentBuilder:o(e=>new GM(e),`DocumentBuilder`),IndexManager:o(e=>new KM(e),`IndexManager`),WorkspaceManager:o(e=>new qM(e),`WorkspaceManager`),FileSystemProvider:o(t=>e.fileSystemProvider(t),`FileSystemProvider`),WorkspaceLock:o(()=>new MN,`WorkspaceLock`),ConfigurationProvider:o(e=>new HM(e),`ConfigurationProvider`)},profilers:{}}}o(FN,`createDefaultSharedCoreModule`);var IN;(function(e){e.merge=(e,t)=>UN(UN({},e),t)})(IN||={});function LN(e,t,n,r,i,a,o,s,c){return BN([e,t,n,r,i,a,o,s,c].reduce(UN,{}))}o(LN,`inject`);var RN=Symbol(`isProxy`);function zN(e){if(e&&e[RN])for(let t of Object.values(e))zN(t);return e}o(zN,`eagerLoad`);function BN(e,t){let n=new Proxy({},{deleteProperty:o(()=>!1,`deleteProperty`),set:o(()=>{throw Error(`Cannot set property on injected service container`)},`set`),get:o((r,i)=>i===RN||HN(r,i,e,t||n),`get`),getOwnPropertyDescriptor:o((r,i)=>(HN(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),`getOwnPropertyDescriptor`),has:o((t,n)=>n in e,`has`),ownKeys:o(()=>[...Object.getOwnPropertyNames(e)],`ownKeys`)});return n}o(BN,`_inject`);var VN=Symbol();function HN(e,t,n,r){if(t in e){if(e[t]instanceof Error)throw Error(`Construction failure. Please make sure that your dependencies are constructable. Cause: `+e[t]);if(e[t]===VN)throw Error(`Cycle detected. Please make "`+String(t)+`" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies`);return e[t]}else if(t in n){let i=n[t];e[t]=VN;try{e[t]=typeof i==`function`?i(r):BN(i,r)}catch(n){throw e[t]=n instanceof Error?n:void 0,n}return e[t]}else return}o(HN,`_resolve`);function UN(e,t){if(t){for(let[n,r]of Object.entries(t))if(r!=null)if(typeof r==`object`){let t=e[n];typeof t==`object`&&t?e[n]=UN(t,r):e[n]=UN({},r)}else e[n]=r}return e}o(UN,`_merge`);var WN={indentTokenName:`INDENT`,dedentTokenName:`DEDENT`,whitespaceTokenName:`WS`,ignoreIndentationDelimiters:[]},GN;(function(e){e.REGULAR=`indentation-sensitive`,e.IGNORE_INDENTATION=`ignore-indentation`})(GN||={});var KN=class extends Fj{static{o(this,`IndentationAwareTokenBuilder`)}constructor(e=WN){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...WN,...e},this.indentTokenType=$y({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=$y({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){let n=super.buildTokens(e,t);if(!ZM(n))throw Error(`Invalid tokens built by default builder`);let{indentTokenName:r,dedentTokenName:i,whitespaceTokenName:a,ignoreIndentationDelimiters:o}=this.options,s,c,l,u=[];for(let e of n){for(let[t,n]of o)e.name===t?e.PUSH_MODE=GN.IGNORE_INDENTATION:e.name===n&&(e.POP_MODE=!0);e.name===i?s=e:e.name===r?c=e:e.name===a?l=e:u.push(e)}if(!s||!c||!l)throw Error(`Some indentation/whitespace tokens not found!`);return o.length>0?{modes:{[GN.REGULAR]:[s,c,...u,l],[GN.IGNORE_INDENTATION]:[...u,l]},defaultMode:GN.REGULAR}:[s,c,l,...u]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return t===0||`\r -`.includes(e[t-1])}matchWhitespace(e,t,n,r){this.whitespaceRegExp.lastIndex=t;let i=this.whitespaceRegExp.exec(e);return{currIndentLevel:i?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:i}}createIndentationTokenInstance(e,t,n,r){let i=this.getLineNumber(t,r);return nb(e,n,r,r+n.length,i,i,1,n.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,n,r){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:i,prevIndentLevel:a,match:o}=this.matchWhitespace(e,t,n,r);return i<=a?null:(this.indentationStack.push(i),o)}dedentMatcher(e,t,n,r){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:i,prevIndentLevel:a,match:o}=this.matchWhitespace(e,t,n,r);if(i>=a)return null;let s=this.indentationStack.lastIndexOf(i);if(s===-1)return this.diagnostics.push({severity:`error`,message:`Invalid dedent level ${i} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:o?.[0]?.length??0,line:this.getLineNumber(e,t),column:1}),null;let c=this.indentationStack.length-s-1,l=e.substring(0,t).match(/[\r\n]+$/)?.[0].length??1;for(let r=0;r1;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,``,e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},qN=class extends XM{static{o(this,`IndentationAwareLexer`)}constructor(e){if(super(e),e.parser.TokenBuilder instanceof KN)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw Error(`IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder`)}tokenize(e,t=YM){let n=super.tokenize(e),r=n.report;t?.mode===`full`&&n.tokens.push(...r.remainingDedents),r.remainingDedents=[];let{indentTokenType:i,dedentTokenType:a}=this.indentationTokenBuilder,o=i.tokenTypeIdx,s=a.tokenTypeIdx,c=[],l=n.tokens.length-1;for(let e=0;e=0&&c.push(n.tokens[l]),n.tokens=c,n}},JN={};l(JN,{AstUtils:()=>Cn,BiMap:()=>pM,Cancellation:()=>Z,ContextCache:()=>xM,CstUtils:()=>sn,DONE_RESULT:()=>bn,Deferred:()=>Kj,Disposable:()=>WM,DisposableCache:()=>yM,DocumentCache:()=>SM,EMPTY_STREAM:()=>yn,ErrorWithLocation:()=>ia,GrammarUtils:()=>ra,MultiMap:()=>fM,OperationCancelled:()=>Uj,Reduction:()=>Sn,RegExpUtils:()=>sa,SimpleCache:()=>bM,StreamImpl:()=>gn,TreeStreamImpl:()=>xn,URI:()=>tM,UriTrie:()=>iM,UriUtils:()=>rM,WorkspaceCache:()=>CM,assertCondition:()=>oa,assertUnreachable:()=>aa,delayNextTick:()=>Rj,interruptAndCheck:()=>Gj,isOperationCancelled:()=>Wj,loadGrammarFromJson:()=>eP,setInterruptionPeriod:()=>Hj,startCancelableOperation:()=>Vj,stream:()=>N}),d(JN,VM);var YN=class{static{o(this,`EmptyFileSystemProvider`)}stat(e){throw Error(`No file system is available.`)}statSync(e){throw Error(`No file system is available.`)}async exists(){return!1}existsSync(){return!1}readBinary(){throw Error(`No file system is available.`)}readBinarySync(){throw Error(`No file system is available.`)}readFile(){throw Error(`No file system is available.`)}readFileSync(){throw Error(`No file system is available.`)}async readDirectory(){return[]}readDirectorySync(){return[]}},XN={fileSystemProvider:o(()=>new YN,`fileSystemProvider`)},ZN={Grammar:o(()=>void 0,`Grammar`),LanguageMetaData:o(()=>({caseInsensitive:!1,fileExtensions:[`.langium`],languageId:`langium`}),`LanguageMetaData`)},QN={AstReflection:o(()=>new Pi,`AstReflection`)};function $N(){let e=LN(FN(XN),QN),t=LN(PN({shared:e}),ZN);return e.ServiceRegistry.register(t),t}o($N,`createMinimalGrammarServices`);function eP(e){let t=$N(),n=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(n,tM.parse(`memory:/${n.name??`grammar`}.langium`)),n}o(eP,`loadGrammarFromJson`),d(on,JN);var tP=class{static{o(this,`DefaultLangiumProfiler`)}constructor(e){this.activeCategories=new Set,this.allCategories=new Set([`validating`,`parsing`,`linking`]),this.activeCategories=e??new Set(this.allCategories),this.records=new fM}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(e=>this.activeCategories.add(e)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(e=>this.activeCategories.delete(e)):this.activeCategories.clear()}createTask(e,t){if(!this.isActive(e))throw Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${t}'.`),new nP(t=>this.records.add(e,this.dumpRecord(e,t)),t)}dumpRecord(e,t){console.info(`Task ${e}.${t.identifier} executed in ${t.duration.toFixed(2)}ms and ended at ${t.date.toISOString()}`);let n=[];for(let e of t.entries.keys()){let r=t.entries.get(e),i=r.reduce((e,t)=>e+t);n.push({name:`${t.identifier}.${e}`,count:r.length,duration:i})}let r=t.duration-n.map(e=>e.duration).reduce((e,t)=>e+t,0);n.push({name:t.identifier,count:1,duration:r}),n.sort((e,t)=>t.duration-e.duration);function i(e){return Math.round(100*e)/100}return o(i,`Round`),console.table(n.map(e=>({Element:e.name,Count:e.count,"Self %":i(100*e.duration/t.duration),"Time (ms)":i(e.duration)}))),t}getRecords(...e){return e.length===0?this.records.values():this.records.entries().filter(t=>e.some(e=>e===t[0])).flatMap(e=>e[1])}},nP=class{static{o(this,`ProfilingTask`)}constructor(e,t){this.stack=[],this.entries=new fM,this.addRecord=e,this.identifier=t}start(){if(this.startTime!==void 0)throw Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(e=>e.id).join(`, `)}.`);let e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){let t=this.stack.pop();if(!t)throw Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw Error(`Sub-Task "${t.id}" is not already stopped.`);let n=performance.now()-t.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=n);let r=n-t.content;this.entries.add(e,r)}},rP;(e=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[\w ]+)\]/}})(rP||={});var iP;(e=>{e.Terminals={DOMAIN_NAME:/complex|complicated|clear|chaotic|confusion/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(iP||={});var aP;(e=>{e.Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/}})(aP||={});var oP;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(oP||={});var sP;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(sP||={});var cP;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(cP||={});var lP;(e=>{e.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(lP||={});var uP;(e=>{e.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(uP||={});var dP;(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ABNF_RULENAME:/[A-Za-z][A-Za-z0-9-]*/,ABNF_STRING:/"[^"]*"/,ABNF_NUMVAL:/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\.[0-9A-Fa-f]+)*/,ABNF_REPEAT:/[0-9]*\*[0-9]*/,ABNF_EXACT_REPEAT:/[0-9]+/,ABNF_WHITESPACE:/[\t \r\n]+/,ABNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,ABNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,ABNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ABNF_COMMENT:/;[^\n\r]*/}})(dP||={});var fP;(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EBNF_ID:/[A-Z_a-z][\w-]*/,EBNF_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,EBNF_SPECIAL_SEQUENCE:/\?(?=[^?;]*[^?\s;][^?;]*\?)[^?;]*\?/,EBNF_WHITESPACE:/[\t \r\n]+/,EBNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EBNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EBNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EBNF_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//,EBNF_ISO_COMMENT:/\(\*[\s\S]*?\*\)/}})(fP||={});var pP;(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,RR_ID:/[A-Z_a-z][\w-]*/,RR_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,RR_WHITESPACE:/[\t \r\n]+/,RR_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,RR_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,RR_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,RR_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//}})(pP||={});var mP;(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,PEG_ID:/[A-Z_a-z][\w-]*/,PEG_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,PEG_WHITESPACE:/[\t \r\n]+/,PEG_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,PEG_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,PEG_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,PEG_LINE_COMMENT:/#[^\n\r]*/}})(mP||={});var hP;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(hP||={});var gP;(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,CLASS_ANNOTATION:/[ \t]+:::[ \t]*[A-Za-z_][\w-]*/,ICON_ANNOTATION:/[ \t]+icon\([\w-]*(?::[\w-]+)?\)/,DESC_ANNOTATION:/[ \t]+##[^\n\r]*/,INDENTATION:/[ \t]{1,}/,QUOTED_NAME:/"[^"]*"|'[^']*'/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,BARE_NAME:/(?!:::|icon\(|##)[^ \t\n\r"'](?:(?![ \t]+:::[ \t]*[A-Za-z_]|[ \t]+icon\(|[ \t]+##)[^\n\r])*/}})(gP||={});var _P;(e=>{e.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(_P||={}),{...rP.Terminals,...iP.Terminals,...aP.Terminals,...oP.Terminals,...sP.Terminals,...cP.Terminals,...lP.Terminals,...uP.Terminals,...dP.Terminals,...fP.Terminals,...pP.Terminals,...mP.Terminals,...gP.Terminals,...hP.Terminals,..._P.Terminals};var vP={$type:`AbnfAlternation`,alternatives:`alternatives`},yP={$type:`AbnfConcatenation`,elements:`elements`},bP={$type:`AbnfElement`,primary:`primary`,repeat:`repeat`},xP={$type:`AbnfGroup`,element:`element`},SP={$type:`AbnfNumVal`,value:`value`},CP={$type:`AbnfOptionalGroup`,element:`element`},wP={$type:`AbnfPrimary`},TP={$type:`AbnfRule`,definition:`definition`,name:`name`},EP={$type:`AbnfRuleName`,name:`name`},DP={$type:`AbnfStringLiteral`,value:`value`},OP={$type:`Accelerator`,name:`name`,x:`x`,y:`y`},kP={$type:`Alignment`,direction:`direction`,members:`members`},AP={$type:`Anchor`,evolution:`evolution`,name:`name`,visibility:`visibility`},jP={$type:`Annotation`,number:`number`,text:`text`,x:`x`,y:`y`},MP={$type:`Annotations`,x:`x`,y:`y`},NP={$type:`Architecture`,accDescr:`accDescr`,accTitle:`accTitle`,alignments:`alignments`,edges:`edges`,groups:`groups`,junctions:`junctions`,services:`services`,title:`title`};function PP(e){return $.isInstance(e,NP.$type)}o(PP,`isArchitecture`);var FP={$type:`Axis`,label:`label`,name:`name`},IP={$type:`Branch`,name:`name`,order:`order`};function LP(e){return $.isInstance(e,IP.$type)}o(LP,`isBranch`);var RP={$type:`Checkout`,branch:`branch`},zP={$type:`CherryPicking`,id:`id`,parent:`parent`,tags:`tags`},BP={$type:`ClassDefStatement`,className:`className`,styleText:`styleText`},VP={$type:`Commit`,id:`id`,message:`message`,tags:`tags`,type:`type`};function HP(e){return $.isInstance(e,VP.$type)}o(HP,`isCommit`);var UP={$type:`Common`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`},WP={$type:`Component`,decorator:`decorator`,evolution:`evolution`,inertia:`inertia`,label:`label`,name:`name`,visibility:`visibility`},GP={$type:`Curve`,entries:`entries`,label:`label`,name:`name`},KP={$type:`Cynefin`,accDescr:`accDescr`,accTitle:`accTitle`,domains:`domains`,title:`title`,transitions:`transitions`};function qP(e){return $.isInstance(e,KP.$type)}o(qP,`isCynefin`);var JP={$type:`Deaccelerator`,name:`name`,x:`x`,y:`y`},YP={$type:`Decorator`,strategy:`strategy`},XP={$type:`Direction`,accDescr:`accDescr`,accTitle:`accTitle`,dir:`dir`,statements:`statements`,title:`title`},ZP={$type:`DomainBlock`,domain:`domain`,items:`items`};function QP(e){return $.isInstance(e,ZP.$type)}o(QP,`isDomainBlock`);var $P={$type:`DomainItem`,label:`label`};function eF(e){return $.isInstance(e,$P.$type)}o(eF,`isDomainItem`);var tF={$type:`EbnfChoice`,alternatives:`alternatives`},nF={$type:`EbnfExceptionPostfix`,except:`except`},rF={$type:`EbnfGroup`,element:`element`},iF={$type:`EbnfNonTerminal`,name:`name`},aF={$type:`EbnfOneOrMorePostfix`,operator:`operator`},oF={$type:`EbnfOptional`,element:`element`},sF={$type:`EbnfOptionalPostfix`,operator:`operator`},cF={$type:`EbnfPostfix`},lF={$type:`EbnfPrimary`},uF={$type:`EbnfRepetition`,element:`element`},dF={$type:`EbnfRule`,definition:`definition`,name:`name`},fF={$type:`EbnfSequence`,elements:`elements`},pF={$type:`EbnfSpecial`,text:`text`},mF={$type:`EbnfTerm`,base:`base`,postfixes:`postfixes`},hF={$type:`EbnfTerminal`,value:`value`},gF={$type:`EbnfZeroOrMorePostfix`,operator:`operator`},_F={$type:`Edge`,lhsDir:`lhsDir`,lhsGroup:`lhsGroup`,lhsId:`lhsId`,lhsInto:`lhsInto`,rhsDir:`rhsDir`,rhsGroup:`rhsGroup`,rhsId:`rhsId`,rhsInto:`rhsInto`,title:`title`},vF={$type:`EmDataEntity`,dataBlockValue:`dataBlockValue`,dataType:`dataType`,name:`name`},yF={$type:`EmFrame`},bF={$type:`EmGwt`,givenStatements:`givenStatements`,sourceFrame:`sourceFrame`,thenStatements:`thenStatements`,whenStatements:`whenStatements`},xF={$type:`EmGwtStatement`,entityIdentifier:`entityIdentifier`},SF={$type:`EmModelEntity`,name:`name`};function CF(e){return e===`rmo`||e===`readmodel`||e===`ui`||e===`cmd`||e===`command`||e===`evt`||e===`event`||e===`pcr`||e===`processor`}o(CF,`isEmModelEntityType`);var wF={$type:`EmNoteEntity`,dataBlockValue:`dataBlockValue`,dataType:`dataType`,sourceFrame:`sourceFrame`},TF={$type:`EmResetFrame`,dataInlineValue:`dataInlineValue`,dataReference:`dataReference`,dataType:`dataType`,entityIdentifier:`entityIdentifier`,modelEntityType:`modelEntityType`,name:`name`,sourceFrames:`sourceFrames`};function EF(e){return $.isInstance(e,TF.$type)}o(EF,`isEmResetFrame`);var DF={$type:`EmTimeFrame`,dataInlineValue:`dataInlineValue`,dataReference:`dataReference`,dataType:`dataType`,entityIdentifier:`entityIdentifier`,modelEntityType:`modelEntityType`,name:`name`,sourceFrames:`sourceFrames`},OF={$type:`Entry`,axis:`axis`,value:`value`},kF={$type:`EventModel`,accDescr:`accDescr`,accTitle:`accTitle`,dataEntities:`dataEntities`,frames:`frames`,gwtEntities:`gwtEntities`,modelEntities:`modelEntities`,noteEntities:`noteEntities`,title:`title`},AF={$type:`Evolution`,stages:`stages`},jF={$type:`EvolutionStage`,boundary:`boundary`,name:`name`,secondName:`secondName`},MF={$type:`Evolve`,component:`component`,target:`target`},NF={$type:`GitGraph`,accDescr:`accDescr`,accTitle:`accTitle`,statements:`statements`,title:`title`};function PF(e){return $.isInstance(e,NF.$type)}o(PF,`isGitGraph`);var FF={$type:`Group`,icon:`icon`,id:`id`,in:`in`,title:`title`},IF={$type:`Info`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`};function LF(e){return $.isInstance(e,IF.$type)}o(LF,`isInfo`);var RF={$type:`Item`,classSelector:`classSelector`,name:`name`},zF={$type:`Junction`,id:`id`,in:`in`},BF={$type:`Label`,negX:`negX`,negY:`negY`,offsetX:`offsetX`,offsetY:`offsetY`},VF={$type:`Leaf`,classSelector:`classSelector`,name:`name`,value:`value`},HF={$type:`Link`,arrow:`arrow`,from:`from`,fromPort:`fromPort`,linkLabel:`linkLabel`,to:`to`,toPort:`toPort`},UF={$type:`Merge`,branch:`branch`,id:`id`,tags:`tags`,type:`type`};function WF(e){return $.isInstance(e,UF.$type)}o(WF,`isMerge`);var GF={$type:`Note`,evolution:`evolution`,text:`text`,visibility:`visibility`},KF={$type:`Option`,name:`name`,value:`value`},qF={$type:`Packet`,accDescr:`accDescr`,accTitle:`accTitle`,blocks:`blocks`,title:`title`};function JF(e){return $.isInstance(e,qF.$type)}o(JF,`isPacket`);var YF={$type:`PacketBlock`,bits:`bits`,end:`end`,label:`label`,start:`start`};function XF(e){return $.isInstance(e,YF.$type)}o(XF,`isPacketBlock`);var ZF={$type:`PegAny`,dot:`dot`},QF={$type:`PegGroup`,element:`element`},$F={$type:`PegIdentifier`,name:`name`},eI={$type:`PegLiteral`,value:`value`},tI={$type:`PegOrderedChoice`,alternatives:`alternatives`},nI={$type:`PegPrefix`,operator:`operator`,suffix:`suffix`},rI={$type:`PegPrimary`},iI={$type:`PegRule`,definition:`definition`,name:`name`},aI={$type:`PegSequence`,elements:`elements`},oI={$type:`PegSuffix`,operator:`operator`,primary:`primary`},sI={$type:`Pie`,accDescr:`accDescr`,accTitle:`accTitle`,sections:`sections`,showData:`showData`,title:`title`};function cI(e){return $.isInstance(e,sI.$type)}o(cI,`isPie`);var lI={$type:`PieSection`,label:`label`,value:`value`};function uI(e){return $.isInstance(e,lI.$type)}o(uI,`isPieSection`);var dI={$type:`Pipeline`,components:`components`,parent:`parent`},fI={$type:`PipelineComponent`,evolution:`evolution`,label:`label`,name:`name`},pI={$type:`Radar`,accDescr:`accDescr`,accTitle:`accTitle`,axes:`axes`,curves:`curves`,options:`options`,title:`title`},mI={$type:`Railroad`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`};function hI(e){return $.isInstance(e,mI.$type)}o(hI,`isRailroad`);var gI={$type:`RailroadAbnf`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`};function _I(e){return $.isInstance(e,gI.$type)}o(_I,`isRailroadAbnf`);var vI={$type:`RailroadChoiceExpr`,alternatives:`alternatives`},yI={$type:`RailroadEbnf`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`};function bI(e){return $.isInstance(e,yI.$type)}o(bI,`isRailroadEbnf`);var xI={$type:`RailroadExpression`},SI={$type:`RailroadNonTerminalExpr`,name:`name`},CI={$type:`RailroadOneOrMoreExpr`,element:`element`},wI={$type:`RailroadOptionalExpr`,element:`element`},TI={$type:`RailroadPeg`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`};function EI(e){return $.isInstance(e,TI.$type)}o(EI,`isRailroadPeg`);var DI={$type:`RailroadRule`,definition:`definition`,name:`name`},OI={$type:`RailroadSequenceExpr`,elements:`elements`},kI={$type:`RailroadSpecialExpr`,text:`text`},AI={$type:`RailroadTerminalExpr`,value:`value`},jI={$type:`RailroadZeroOrMoreExpr`,element:`element`},MI={$type:`Section`,classSelector:`classSelector`,name:`name`},NI={$type:`Service`,icon:`icon`,iconText:`iconText`,id:`id`,in:`in`,title:`title`},PI={$type:`Size`,height:`height`,width:`width`},FI={$type:`Statement`},II={$type:`Transition`,from:`from`,label:`label`,to:`to`};function LI(e){return $.isInstance(e,II.$type)}o(LI,`isTransition`);var RI={$type:`Treemap`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`,TreemapRows:`TreemapRows`};function zI(e){return $.isInstance(e,RI.$type)}o(zI,`isTreemap`);var BI={$type:`TreemapRow`,indent:`indent`,item:`item`},VI={$type:`TreeNode`,classAnnotation:`classAnnotation`,descAnnotation:`descAnnotation`,iconAnnotation:`iconAnnotation`,indent:`indent`,name:`name`},HI={$type:`TreeView`,accDescr:`accDescr`,accTitle:`accTitle`,nodes:`nodes`,title:`title`},UI={$type:`Wardley`,accDescr:`accDescr`,accelerators:`accelerators`,accTitle:`accTitle`,anchors:`anchors`,annotation:`annotation`,annotations:`annotations`,components:`components`,deaccelerators:`deaccelerators`,evolution:`evolution`,evolves:`evolves`,links:`links`,notes:`notes`,pipelines:`pipelines`,size:`size`,title:`title`};function WI(e){return $.isInstance(e,UI.$type)}o(WI,`isWardley`);var GI=class extends fn{constructor(){super(...arguments),this.types={AbnfAlternation:{name:vP.$type,properties:{alternatives:{name:vP.alternatives,defaultValue:[]}},superTypes:[]},AbnfConcatenation:{name:yP.$type,properties:{elements:{name:yP.elements,defaultValue:[]}},superTypes:[]},AbnfElement:{name:bP.$type,properties:{primary:{name:bP.primary},repeat:{name:bP.repeat}},superTypes:[]},AbnfGroup:{name:xP.$type,properties:{element:{name:xP.element}},superTypes:[wP.$type]},AbnfNumVal:{name:SP.$type,properties:{value:{name:SP.value}},superTypes:[wP.$type]},AbnfOptionalGroup:{name:CP.$type,properties:{element:{name:CP.element}},superTypes:[wP.$type]},AbnfPrimary:{name:wP.$type,properties:{},superTypes:[]},AbnfRule:{name:TP.$type,properties:{definition:{name:TP.definition},name:{name:TP.name}},superTypes:[]},AbnfRuleName:{name:EP.$type,properties:{name:{name:EP.name}},superTypes:[wP.$type]},AbnfStringLiteral:{name:DP.$type,properties:{value:{name:DP.value}},superTypes:[wP.$type]},Accelerator:{name:OP.$type,properties:{name:{name:OP.name},x:{name:OP.x},y:{name:OP.y}},superTypes:[]},Alignment:{name:kP.$type,properties:{direction:{name:kP.direction},members:{name:kP.members,defaultValue:[]}},superTypes:[]},Anchor:{name:AP.$type,properties:{evolution:{name:AP.evolution},name:{name:AP.name},visibility:{name:AP.visibility}},superTypes:[]},Annotation:{name:jP.$type,properties:{number:{name:jP.number},text:{name:jP.text},x:{name:jP.x},y:{name:jP.y}},superTypes:[]},Annotations:{name:MP.$type,properties:{x:{name:MP.x},y:{name:MP.y}},superTypes:[]},Architecture:{name:NP.$type,properties:{accDescr:{name:NP.accDescr},accTitle:{name:NP.accTitle},alignments:{name:NP.alignments,defaultValue:[]},edges:{name:NP.edges,defaultValue:[]},groups:{name:NP.groups,defaultValue:[]},junctions:{name:NP.junctions,defaultValue:[]},services:{name:NP.services,defaultValue:[]},title:{name:NP.title}},superTypes:[]},Axis:{name:FP.$type,properties:{label:{name:FP.label},name:{name:FP.name}},superTypes:[]},Branch:{name:IP.$type,properties:{name:{name:IP.name},order:{name:IP.order}},superTypes:[FI.$type]},Checkout:{name:RP.$type,properties:{branch:{name:RP.branch}},superTypes:[FI.$type]},CherryPicking:{name:zP.$type,properties:{id:{name:zP.id},parent:{name:zP.parent},tags:{name:zP.tags,defaultValue:[]}},superTypes:[FI.$type]},ClassDefStatement:{name:BP.$type,properties:{className:{name:BP.className},styleText:{name:BP.styleText}},superTypes:[]},Commit:{name:VP.$type,properties:{id:{name:VP.id},message:{name:VP.message},tags:{name:VP.tags,defaultValue:[]},type:{name:VP.type}},superTypes:[FI.$type]},Common:{name:UP.$type,properties:{accDescr:{name:UP.accDescr},accTitle:{name:UP.accTitle},title:{name:UP.title}},superTypes:[]},Component:{name:WP.$type,properties:{decorator:{name:WP.decorator},evolution:{name:WP.evolution},inertia:{name:WP.inertia,defaultValue:!1},label:{name:WP.label},name:{name:WP.name},visibility:{name:WP.visibility}},superTypes:[]},Curve:{name:GP.$type,properties:{entries:{name:GP.entries,defaultValue:[]},label:{name:GP.label},name:{name:GP.name}},superTypes:[]},Cynefin:{name:KP.$type,properties:{accDescr:{name:KP.accDescr},accTitle:{name:KP.accTitle},domains:{name:KP.domains,defaultValue:[]},title:{name:KP.title},transitions:{name:KP.transitions,defaultValue:[]}},superTypes:[]},Deaccelerator:{name:JP.$type,properties:{name:{name:JP.name},x:{name:JP.x},y:{name:JP.y}},superTypes:[]},Decorator:{name:YP.$type,properties:{strategy:{name:YP.strategy}},superTypes:[]},Direction:{name:XP.$type,properties:{accDescr:{name:XP.accDescr},accTitle:{name:XP.accTitle},dir:{name:XP.dir},statements:{name:XP.statements,defaultValue:[]},title:{name:XP.title}},superTypes:[NF.$type]},DomainBlock:{name:ZP.$type,properties:{domain:{name:ZP.domain},items:{name:ZP.items,defaultValue:[]}},superTypes:[]},DomainItem:{name:$P.$type,properties:{label:{name:$P.label}},superTypes:[]},EbnfChoice:{name:tF.$type,properties:{alternatives:{name:tF.alternatives,defaultValue:[]}},superTypes:[]},EbnfExceptionPostfix:{name:nF.$type,properties:{except:{name:nF.except}},superTypes:[cF.$type]},EbnfGroup:{name:rF.$type,properties:{element:{name:rF.element}},superTypes:[lF.$type]},EbnfNonTerminal:{name:iF.$type,properties:{name:{name:iF.name}},superTypes:[lF.$type]},EbnfOneOrMorePostfix:{name:aF.$type,properties:{operator:{name:aF.operator}},superTypes:[cF.$type]},EbnfOptional:{name:oF.$type,properties:{element:{name:oF.element}},superTypes:[lF.$type]},EbnfOptionalPostfix:{name:sF.$type,properties:{operator:{name:sF.operator}},superTypes:[cF.$type]},EbnfPostfix:{name:cF.$type,properties:{},superTypes:[]},EbnfPrimary:{name:lF.$type,properties:{},superTypes:[]},EbnfRepetition:{name:uF.$type,properties:{element:{name:uF.element}},superTypes:[lF.$type]},EbnfRule:{name:dF.$type,properties:{definition:{name:dF.definition},name:{name:dF.name}},superTypes:[]},EbnfSequence:{name:fF.$type,properties:{elements:{name:fF.elements,defaultValue:[]}},superTypes:[]},EbnfSpecial:{name:pF.$type,properties:{text:{name:pF.text}},superTypes:[lF.$type]},EbnfTerm:{name:mF.$type,properties:{base:{name:mF.base},postfixes:{name:mF.postfixes,defaultValue:[]}},superTypes:[]},EbnfTerminal:{name:hF.$type,properties:{value:{name:hF.value}},superTypes:[lF.$type]},EbnfZeroOrMorePostfix:{name:gF.$type,properties:{operator:{name:gF.operator}},superTypes:[cF.$type]},Edge:{name:_F.$type,properties:{lhsDir:{name:_F.lhsDir},lhsGroup:{name:_F.lhsGroup,defaultValue:!1},lhsId:{name:_F.lhsId},lhsInto:{name:_F.lhsInto,defaultValue:!1},rhsDir:{name:_F.rhsDir},rhsGroup:{name:_F.rhsGroup,defaultValue:!1},rhsId:{name:_F.rhsId},rhsInto:{name:_F.rhsInto,defaultValue:!1},title:{name:_F.title}},superTypes:[]},EmDataEntity:{name:vF.$type,properties:{dataBlockValue:{name:vF.dataBlockValue},dataType:{name:vF.dataType},name:{name:vF.name}},superTypes:[]},EmFrame:{name:yF.$type,properties:{},superTypes:[]},EmGwt:{name:bF.$type,properties:{givenStatements:{name:bF.givenStatements,defaultValue:[]},sourceFrame:{name:bF.sourceFrame,referenceType:yF.$type},thenStatements:{name:bF.thenStatements,defaultValue:[]},whenStatements:{name:bF.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:xF.$type,properties:{entityIdentifier:{name:xF.entityIdentifier,referenceType:SF.$type}},superTypes:[]},EmModelEntity:{name:SF.$type,properties:{name:{name:SF.name}},superTypes:[]},EmNoteEntity:{name:wF.$type,properties:{dataBlockValue:{name:wF.dataBlockValue},dataType:{name:wF.dataType},sourceFrame:{name:wF.sourceFrame,referenceType:yF.$type}},superTypes:[]},EmResetFrame:{name:TF.$type,properties:{dataInlineValue:{name:TF.dataInlineValue},dataReference:{name:TF.dataReference,referenceType:vF.$type},dataType:{name:TF.dataType},entityIdentifier:{name:TF.entityIdentifier},modelEntityType:{name:TF.modelEntityType},name:{name:TF.name},sourceFrames:{name:TF.sourceFrames,defaultValue:[],referenceType:yF.$type}},superTypes:[yF.$type]},EmTimeFrame:{name:DF.$type,properties:{dataInlineValue:{name:DF.dataInlineValue},dataReference:{name:DF.dataReference,referenceType:vF.$type},dataType:{name:DF.dataType},entityIdentifier:{name:DF.entityIdentifier},modelEntityType:{name:DF.modelEntityType},name:{name:DF.name},sourceFrames:{name:DF.sourceFrames,defaultValue:[],referenceType:yF.$type}},superTypes:[yF.$type]},Entry:{name:OF.$type,properties:{axis:{name:OF.axis,referenceType:FP.$type},value:{name:OF.value}},superTypes:[]},EventModel:{name:kF.$type,properties:{accDescr:{name:kF.accDescr},accTitle:{name:kF.accTitle},dataEntities:{name:kF.dataEntities,defaultValue:[]},frames:{name:kF.frames,defaultValue:[]},gwtEntities:{name:kF.gwtEntities,defaultValue:[]},modelEntities:{name:kF.modelEntities,defaultValue:[]},noteEntities:{name:kF.noteEntities,defaultValue:[]},title:{name:kF.title}},superTypes:[]},Evolution:{name:AF.$type,properties:{stages:{name:AF.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:jF.$type,properties:{boundary:{name:jF.boundary},name:{name:jF.name},secondName:{name:jF.secondName}},superTypes:[]},Evolve:{name:MF.$type,properties:{component:{name:MF.component},target:{name:MF.target}},superTypes:[]},GitGraph:{name:NF.$type,properties:{accDescr:{name:NF.accDescr},accTitle:{name:NF.accTitle},statements:{name:NF.statements,defaultValue:[]},title:{name:NF.title}},superTypes:[]},Group:{name:FF.$type,properties:{icon:{name:FF.icon},id:{name:FF.id},in:{name:FF.in},title:{name:FF.title}},superTypes:[]},Info:{name:IF.$type,properties:{accDescr:{name:IF.accDescr},accTitle:{name:IF.accTitle},title:{name:IF.title}},superTypes:[]},Item:{name:RF.$type,properties:{classSelector:{name:RF.classSelector},name:{name:RF.name}},superTypes:[]},Junction:{name:zF.$type,properties:{id:{name:zF.id},in:{name:zF.in}},superTypes:[]},Label:{name:BF.$type,properties:{negX:{name:BF.negX,defaultValue:!1},negY:{name:BF.negY,defaultValue:!1},offsetX:{name:BF.offsetX},offsetY:{name:BF.offsetY}},superTypes:[]},Leaf:{name:VF.$type,properties:{classSelector:{name:VF.classSelector},name:{name:VF.name},value:{name:VF.value}},superTypes:[RF.$type]},Link:{name:HF.$type,properties:{arrow:{name:HF.arrow},from:{name:HF.from},fromPort:{name:HF.fromPort},linkLabel:{name:HF.linkLabel},to:{name:HF.to},toPort:{name:HF.toPort}},superTypes:[]},Merge:{name:UF.$type,properties:{branch:{name:UF.branch},id:{name:UF.id},tags:{name:UF.tags,defaultValue:[]},type:{name:UF.type}},superTypes:[FI.$type]},Note:{name:GF.$type,properties:{evolution:{name:GF.evolution},text:{name:GF.text},visibility:{name:GF.visibility}},superTypes:[]},Option:{name:KF.$type,properties:{name:{name:KF.name},value:{name:KF.value,defaultValue:!1}},superTypes:[]},Packet:{name:qF.$type,properties:{accDescr:{name:qF.accDescr},accTitle:{name:qF.accTitle},blocks:{name:qF.blocks,defaultValue:[]},title:{name:qF.title}},superTypes:[]},PacketBlock:{name:YF.$type,properties:{bits:{name:YF.bits},end:{name:YF.end},label:{name:YF.label},start:{name:YF.start}},superTypes:[]},PegAny:{name:ZF.$type,properties:{dot:{name:ZF.dot}},superTypes:[rI.$type]},PegGroup:{name:QF.$type,properties:{element:{name:QF.element}},superTypes:[rI.$type]},PegIdentifier:{name:$F.$type,properties:{name:{name:$F.name}},superTypes:[rI.$type]},PegLiteral:{name:eI.$type,properties:{value:{name:eI.value}},superTypes:[rI.$type]},PegOrderedChoice:{name:tI.$type,properties:{alternatives:{name:tI.alternatives,defaultValue:[]}},superTypes:[]},PegPrefix:{name:nI.$type,properties:{operator:{name:nI.operator},suffix:{name:nI.suffix}},superTypes:[]},PegPrimary:{name:rI.$type,properties:{},superTypes:[]},PegRule:{name:iI.$type,properties:{definition:{name:iI.definition},name:{name:iI.name}},superTypes:[]},PegSequence:{name:aI.$type,properties:{elements:{name:aI.elements,defaultValue:[]}},superTypes:[]},PegSuffix:{name:oI.$type,properties:{operator:{name:oI.operator},primary:{name:oI.primary}},superTypes:[]},Pie:{name:sI.$type,properties:{accDescr:{name:sI.accDescr},accTitle:{name:sI.accTitle},sections:{name:sI.sections,defaultValue:[]},showData:{name:sI.showData,defaultValue:!1},title:{name:sI.title}},superTypes:[]},PieSection:{name:lI.$type,properties:{label:{name:lI.label},value:{name:lI.value}},superTypes:[]},Pipeline:{name:dI.$type,properties:{components:{name:dI.components,defaultValue:[]},parent:{name:dI.parent}},superTypes:[]},PipelineComponent:{name:fI.$type,properties:{evolution:{name:fI.evolution},label:{name:fI.label},name:{name:fI.name}},superTypes:[]},Radar:{name:pI.$type,properties:{accDescr:{name:pI.accDescr},accTitle:{name:pI.accTitle},axes:{name:pI.axes,defaultValue:[]},curves:{name:pI.curves,defaultValue:[]},options:{name:pI.options,defaultValue:[]},title:{name:pI.title}},superTypes:[]},Railroad:{name:mI.$type,properties:{accDescr:{name:mI.accDescr},accTitle:{name:mI.accTitle},rules:{name:mI.rules,defaultValue:[]},title:{name:mI.title}},superTypes:[]},RailroadAbnf:{name:gI.$type,properties:{accDescr:{name:gI.accDescr},accTitle:{name:gI.accTitle},rules:{name:gI.rules,defaultValue:[]},title:{name:gI.title}},superTypes:[]},RailroadChoiceExpr:{name:vI.$type,properties:{alternatives:{name:vI.alternatives,defaultValue:[]}},superTypes:[xI.$type]},RailroadEbnf:{name:yI.$type,properties:{accDescr:{name:yI.accDescr},accTitle:{name:yI.accTitle},rules:{name:yI.rules,defaultValue:[]},title:{name:yI.title}},superTypes:[]},RailroadExpression:{name:xI.$type,properties:{},superTypes:[]},RailroadNonTerminalExpr:{name:SI.$type,properties:{name:{name:SI.name}},superTypes:[xI.$type]},RailroadOneOrMoreExpr:{name:CI.$type,properties:{element:{name:CI.element}},superTypes:[xI.$type]},RailroadOptionalExpr:{name:wI.$type,properties:{element:{name:wI.element}},superTypes:[xI.$type]},RailroadPeg:{name:TI.$type,properties:{accDescr:{name:TI.accDescr},accTitle:{name:TI.accTitle},rules:{name:TI.rules,defaultValue:[]},title:{name:TI.title}},superTypes:[]},RailroadRule:{name:DI.$type,properties:{definition:{name:DI.definition},name:{name:DI.name}},superTypes:[]},RailroadSequenceExpr:{name:OI.$type,properties:{elements:{name:OI.elements,defaultValue:[]}},superTypes:[xI.$type]},RailroadSpecialExpr:{name:kI.$type,properties:{text:{name:kI.text}},superTypes:[xI.$type]},RailroadTerminalExpr:{name:AI.$type,properties:{value:{name:AI.value}},superTypes:[xI.$type]},RailroadZeroOrMoreExpr:{name:jI.$type,properties:{element:{name:jI.element}},superTypes:[xI.$type]},Section:{name:MI.$type,properties:{classSelector:{name:MI.classSelector},name:{name:MI.name}},superTypes:[RF.$type]},Service:{name:NI.$type,properties:{icon:{name:NI.icon},iconText:{name:NI.iconText},id:{name:NI.id},in:{name:NI.in},title:{name:NI.title}},superTypes:[]},Size:{name:PI.$type,properties:{height:{name:PI.height},width:{name:PI.width}},superTypes:[]},Statement:{name:FI.$type,properties:{},superTypes:[]},Transition:{name:II.$type,properties:{from:{name:II.from},label:{name:II.label},to:{name:II.to}},superTypes:[]},TreeNode:{name:VI.$type,properties:{classAnnotation:{name:VI.classAnnotation},descAnnotation:{name:VI.descAnnotation},iconAnnotation:{name:VI.iconAnnotation},indent:{name:VI.indent},name:{name:VI.name}},superTypes:[]},TreeView:{name:HI.$type,properties:{accDescr:{name:HI.accDescr},accTitle:{name:HI.accTitle},nodes:{name:HI.nodes,defaultValue:[]},title:{name:HI.title}},superTypes:[]},Treemap:{name:RI.$type,properties:{accDescr:{name:RI.accDescr},accTitle:{name:RI.accTitle},title:{name:RI.title},TreemapRows:{name:RI.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:BI.$type,properties:{indent:{name:BI.indent},item:{name:BI.item}},superTypes:[]},Wardley:{name:UI.$type,properties:{accDescr:{name:UI.accDescr},accelerators:{name:UI.accelerators,defaultValue:[]},accTitle:{name:UI.accTitle},anchors:{name:UI.anchors,defaultValue:[]},annotation:{name:UI.annotation,defaultValue:[]},annotations:{name:UI.annotations,defaultValue:[]},components:{name:UI.components,defaultValue:[]},deaccelerators:{name:UI.deaccelerators,defaultValue:[]},evolution:{name:UI.evolution},evolves:{name:UI.evolves,defaultValue:[]},links:{name:UI.links,defaultValue:[]},notes:{name:UI.notes,defaultValue:[]},pipelines:{name:UI.pipelines,defaultValue:[]},size:{name:UI.size},title:{name:UI.title}},superTypes:[]}}}static{o(this,`MermaidAstReflection`)}},$=new GI,KI,qI=o(()=>KI??=eP(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"alignments","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Alignment","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"align"},{"$type":"Assignment","feature":"direction","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"row"},{"$type":"Keyword","value":"column"}]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@20"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[\\\\w ]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),`ArchitectureGrammarGrammar`),JI,YI=o(()=>JI??=eP(`{"$type":"Grammar","isDeclared":true,"name":"CynefinGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Cynefin","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"cynefin-beta"},{"$type":"Keyword","value":"cynefin-beta:"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"domains","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"transitions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"domain","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Assignment","feature":"items","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainItem","definition":{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Transition","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":"-->"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"DOMAIN_NAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complex"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complicated"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"clear"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"chaotic"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"confusion"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`CynefinGrammarGrammar`),XI,ZI=o(()=>XI??=eP('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}'),`EventModelingGrammar`),QI,$I=o(()=>QI??=eP(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),`GitGraphGrammarGrammar`),eL,tL=o(()=>eL??=eP(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`InfoGrammarGrammar`),nL,rL=o(()=>nL??=eP(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`PacketGrammarGrammar`),iL,aL=o(()=>iL??=eP(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`PieGrammarGrammar`),oL,sL=o(()=>oL??=eP(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`),`RadarGrammarGrammar`),cL,lL=o(()=>cL??=eP(`{"$type":"Grammar","isDeclared":true,"name":"RailroadAbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_RULENAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Za-z][A-Za-z0-9-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_NUMVAL","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\\\\.[0-9A-Fa-f]+)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]*\\\\*[0-9]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_EXACT_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_COMMENT","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadAbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-abnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfAlternation","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfConcatenation","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfElement","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfStringLiteral","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfNumVal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRuleName","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfOptionalGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadAbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfAlternation","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfConcatenation","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfElement","attributes":[{"$type":"TypeAttribute","name":"repeat","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"AbnfStringLiteral","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfNumVal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfRuleName","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"AbnfOptionalGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]}],"imports":[],"types":[]}`),`RailroadAbnfGrammarGrammar`),uL,dL=o(()=>uL??=eP(`{"$type":"Grammar","isDeclared":true,"name":"RailroadEbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_SPECIAL_SEQUENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\?(?=[^?;]*[^?\\\\s;][^?;]*\\\\?)[^?;]*\\\\?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_ISO_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\(\\\\*[\\\\s\\\\S]*?\\\\*\\\\)/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadEbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-ebnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"="},{"$type":"Keyword","value":"::="}]},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"|"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":",","cardinality":"?"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerm","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"base","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"postfixes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerminal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfNonTerminal","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSpecial","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptional","returnType":{"$ref":"#/interfaces@11"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRepetition","returnType":{"$ref":"#/interfaces@12"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPostfix","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptionalPostfix","returnType":{"$ref":"#/interfaces@13"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfZeroOrMorePostfix","returnType":{"$ref":"#/interfaces@14"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOneOrMorePostfix","returnType":{"$ref":"#/interfaces@15"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfExceptionPostfix","returnType":{"$ref":"#/interfaces@16"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"except","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadEbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfTerm","attributes":[{"$type":"TypeAttribute","name":"base","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false},{"$type":"TypeAttribute","name":"postfixes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfPostfix","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfNonTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfSpecial","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptional","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfRepetition","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptionalPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfZeroOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfOneOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfExceptionPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"except","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}]}],"imports":[],"types":[]}`),`RailroadEbnfGrammarGrammar`),fL,pL=o(()=>fL??=eP(`{"$type":"Grammar","isDeclared":true,"name":"RailroadGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"RR_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Railroad","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadExpression","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSequenceExpr","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"sequence"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadChoiceExpr","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"choice"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOptionalExpr","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"optional"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOneOrMoreExpr","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"oneOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadZeroOrMoreExpr","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"zeroOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadTerminalExpr","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"terminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadNonTerminalExpr","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"nonterminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSpecialExpr","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"special"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"Railroad","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadExpression","attributes":[],"superTypes":[]},{"$type":"Interface","name":"RailroadSequenceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadChoiceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOptionalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOneOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadZeroOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadNonTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadSpecialExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`),`RailroadGrammarGrammar`),mL,hL=o(()=>mL??=eP(`{"$type":"Grammar","isDeclared":true,"name":"RailroadPegGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/#[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadPeg","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-peg-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"<-"},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegOrderedChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrefix","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"&"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"!"}}],"cardinality":"?"},{"$type":"Assignment","feature":"suffix","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSuffix","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrimary","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegLiteral","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegIdentifier","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegAny","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Assignment","feature":"dot","operator":"=","terminal":{"$type":"Keyword","value":"."}},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadPeg","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegOrderedChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegPrefix","attributes":[{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"suffix","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSuffix","attributes":[{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}},"isOptional":false},{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"PegPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"PegLiteral","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegIdentifier","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegGroup","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"PegAny","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"dot","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`),`RailroadPegGrammarGrammar`),gL,_L=o(()=>gL??=eP(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`),`TreemapGrammarGrammar`),vL,yL=o(()=>vL??=eP(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"CLASS_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+:::[ \\\\t]*[A-Za-z_][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ICON_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+icon\\\\([\\\\w-]*(?::[\\\\w-]+)?\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"DESC_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+##[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"QUOTED_NAME","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"BARE_NAME","definition":{"$type":"RegexToken","regex":"/(?!:::|icon\\\\(|##)[^ \\\\t\\\\n\\\\r\\"'](?:(?![ \\\\t]+:::[ \\\\t]*[A-Za-z_]|[ \\\\t]+icon\\\\(|[ \\\\t]+##)[^\\\\n\\\\r])*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"classAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"iconAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"descAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n *\\n * Supports both quoted labels (\\"my file\\") and bare labels (index.js).\\n * Annotations (:::class, icon(), ## description) are parsed directly into\\n * AST fields by the grammar. Value conversion for stripping quotes, extracting\\n * class names, icon names, and description text happens in valueConverter.ts.\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treeView keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`),`TreeViewGrammarGrammar`),bL,xL=o(()=>bL??=eP(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`WardleyGrammarGrammar`),SL={languageId:`architecture`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},CL={languageId:`cynefin`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},wL={languageId:`eventmodeling`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},TL={languageId:`gitGraph`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},EL={languageId:`info`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},DL={languageId:`packet`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},OL={languageId:`pie`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},kL={languageId:`radar`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},AL={languageId:`railroadAbnf`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},jL={languageId:`railroadEbnf`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},ML={languageId:`railroad`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},NL={languageId:`railroadPeg`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},PL={languageId:`treemap`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},FL={languageId:`treeView`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},IL={languageId:`wardley`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},LL={AstReflection:o(()=>new GI,`AstReflection`)},RL={Grammar:o(()=>qI(),`Grammar`),LanguageMetaData:o(()=>SL,`LanguageMetaData`),parser:{}},zL={Grammar:o(()=>YI(),`Grammar`),LanguageMetaData:o(()=>CL,`LanguageMetaData`),parser:{}},BL={Grammar:o(()=>ZI(),`Grammar`),LanguageMetaData:o(()=>wL,`LanguageMetaData`),parser:{}},VL={Grammar:o(()=>$I(),`Grammar`),LanguageMetaData:o(()=>TL,`LanguageMetaData`),parser:{}},HL={Grammar:o(()=>tL(),`Grammar`),LanguageMetaData:o(()=>EL,`LanguageMetaData`),parser:{}},UL={Grammar:o(()=>rL(),`Grammar`),LanguageMetaData:o(()=>DL,`LanguageMetaData`),parser:{}},WL={Grammar:o(()=>aL(),`Grammar`),LanguageMetaData:o(()=>OL,`LanguageMetaData`),parser:{}},GL={Grammar:o(()=>sL(),`Grammar`),LanguageMetaData:o(()=>kL,`LanguageMetaData`),parser:{}},KL={Grammar:o(()=>lL(),`Grammar`),LanguageMetaData:o(()=>AL,`LanguageMetaData`),parser:{}},qL={Grammar:o(()=>dL(),`Grammar`),LanguageMetaData:o(()=>jL,`LanguageMetaData`),parser:{}},JL={Grammar:o(()=>pL(),`Grammar`),LanguageMetaData:o(()=>ML,`LanguageMetaData`),parser:{}},YL={Grammar:o(()=>hL(),`Grammar`),LanguageMetaData:o(()=>NL,`LanguageMetaData`),parser:{}},XL={Grammar:o(()=>_L(),`Grammar`),LanguageMetaData:o(()=>PL,`LanguageMetaData`),parser:{}},ZL={Grammar:o(()=>yL(),`Grammar`),LanguageMetaData:o(()=>FL,`LanguageMetaData`),parser:{}},QL={Grammar:o(()=>xL(),`Grammar`),LanguageMetaData:o(()=>IL,`LanguageMetaData`),parser:{}},$L={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},eR=class extends Ij{static{o(this,`AbstractMermaidValueConverter`)}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);return r===void 0&&(r=this.runCustomConverter(e,t,n)),r===void 0?super.runConverter(e,t,n):r}runCommonConverter(e,t,n){let r=$L[e.name];if(r===void 0)return;let i=r.exec(t);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm,` `);if(i[2]!==void 0)return i[2].replace(/^\s*/gm,``).replace(/\s+$/gm,``).replace(/[\t ]{2,}/gm,` `).replace(/[\n\r]{2,}/gm,` -`)}}},tR=class extends eR{static{o(this,`CommonValueConverter`)}runCustomConverter(e,t,n){}},nR=class extends Fj{static{o(this,`AbstractMermaidTokenBuilder`)}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){let r=super.buildKeywordTokens(e,t,n);return r.forEach(e=>{this.keywords.has(e.name)&&e.PATTERN!==void 0&&(e.PATTERN=RegExp(e.PATTERN.toString()+`(?:(?=%%)|(?!\\S))`))}),r}};(class extends nR{static{o(this,`CommonTokenBuilder`)}});export{FN as C,PN as S,EF as T,YL as _,zL as a,QL as b,VL as c,UL as d,WL as f,JL as g,qL as h,tR as i,HL as l,KL as m,eR as n,XN as o,GL as p,RL as r,BL as s,nR as t,LL as u,ZL as v,LN as w,o as x,XL as y}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-MOJQB5TN-Bju_yCKi.js b/dist-desktop/assets/chunk-MOJQB5TN-Bju_yCKi.js deleted file mode 100644 index 6492768..0000000 --- a/dist-desktop/assets/chunk-MOJQB5TN-Bju_yCKi.js +++ /dev/null @@ -1,88 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-UMNXGZaF.js";import{D as n,a as r,b as i,c as a,x as o,z as s}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as c}from"./chunk-VAUOI2AC-AC9pRUsa.js";var l=``,u=``,d=``,f=[],p=new Map,m=e(e=>s(e,o()),`sanitizeText`),h=e(e=>{switch(e.type){case`terminal`:return{...e,value:m(e.value)};case`nonterminal`:return{...e,name:m(e.name)};case`sequence`:return{...e,elements:e.elements.map(h)};case`choice`:return{...e,alternatives:e.alternatives.map(h)};case`optional`:return{...e,element:h(e.element)};case`repetition`:return{...e,element:h(e.element),separator:e.separator?h(e.separator):void 0};case`special`:return{...e,text:m(e.text)}}},`sanitizeAstNode`),g=e(()=>{l=``,u=``,d=``,f.length=0,p.clear(),r(),t.debug(`[Railroad] Database cleared`)},`clear`),_=e(e=>{l=m(e),t.debug(`[Railroad] Title set:`,e)},`setTitle`),v=e(()=>l,`getTitle`),y={clear:g,setTitle:_,getTitle:v,addRule:e(e=>{let n={...e,name:m(e.name),definition:h(e.definition),comment:e.comment?m(e.comment):void 0};t.debug(`[Railroad] Adding rule:`,n.name),p.has(n.name)&&t.warn(`[Railroad] Rule '${n.name}' is already defined. Overwriting.`),f.push(n),p.set(n.name,n)},`addRule`),getRules:e(()=>f,`getRules`),getRule:e(e=>p.get(e),`getRule`),setAccTitle:e(e=>{u=m(e).replace(/^\s+/g,``),t.debug(`[Railroad] Accessibility title set:`,e)},`setAccTitle`),getAccTitle:e(()=>u,`getAccTitle`),setAccDescription:e(e=>{d=m(e).replace(/\n\s+/g,` -`),t.debug(`[Railroad] Accessibility description set:`,e)},`setAccDescription`),getAccDescription:e(()=>d,`getAccDescription`),setDiagramTitle:_,getDiagramTitle:v},b={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:`monospace`,terminalFill:`#FFFFC0`,terminalStroke:`#000000`,terminalTextColor:`#000000`,nonTerminalFill:`#FFFFFF`,nonTerminalStroke:`#000000`,nonTerminalTextColor:`#000000`,lineColor:`#000000`,strokeWidth:2,markerFill:`#000000`,commentFill:`#E8E8E8`,commentStroke:`#888888`,commentTextColor:`#666666`,specialFill:`#F0E0FF`,specialStroke:`#8800CC`,ruleNameColor:`#000066`,showMarkers:!0,markerRadius:5},x=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,S=/^[\w "',.-]+$/,C=new Set([`compactMode`,`padding`,`verticalSeparation`,`horizontalSeparation`,`arcRadius`,`fontSize`,`fontFamily`,`terminalFill`,`terminalStroke`,`terminalTextColor`,`nonTerminalFill`,`nonTerminalStroke`,`nonTerminalTextColor`,`lineColor`,`strokeWidth`,`markerFill`,`commentFill`,`commentStroke`,`commentTextColor`,`specialFill`,`specialStroke`,`ruleNameColor`,`showMarkers`,`markerRadius`]),w=e(e=>e?Object.keys(e).every(e=>e===`railroad`||C.has(e)):!1,`isRailroadStyleOptions`),T=e(e=>e?`railroad`in e&&e.railroad?e.railroad:w(e)?e:{}:{},`extractRailroadOverrides`),E=e(e=>{if(!e||w(e))return{};let{railroad:t,svgId:n,theme:r,look:i,...a}=e;return a},`extractThemeOverrides`),D=e((e,t)=>{if(typeof e!=`string`)return t;let n=e.trim();return x.test(n)?n:t},`sanitizeColorValue`),O=e((e,t)=>{if(typeof e!=`string`)return t;let n=e.trim();return S.test(n)?n:t},`sanitizeFontFamilyValue`),k=e((e,t)=>{let n=typeof e==`number`?e:typeof e==`string`?Number.parseFloat(e):NaN;return Number.isFinite(n)&&n>=0?n:t},`sanitizeNumberValue`),A=e(e=>{let t=typeof e==`number`?e:typeof e==`string`?Number.parseFloat(e):NaN;return Number.isFinite(t)&&t>0?t:void 0},`parseThemeFontSize`),j=e(e=>{let t=O(e.fontFamily,b.fontFamily),n=A(e.fontSize)??b.fontSize;return{...b,fontFamily:t,fontSize:n,terminalFill:D(e.secondBkg??e.secondaryColor,b.terminalFill),terminalStroke:D(e.secondaryBorderColor??e.lineColor,b.terminalStroke),terminalTextColor:D(e.secondaryTextColor??e.textColor,b.terminalTextColor),nonTerminalFill:D(e.mainBkg??e.background,b.nonTerminalFill),nonTerminalStroke:D(e.primaryBorderColor??e.lineColor,b.nonTerminalStroke),nonTerminalTextColor:D(e.primaryTextColor??e.textColor,b.nonTerminalTextColor),lineColor:D(e.lineColor,b.lineColor),markerFill:D(e.lineColor,b.markerFill),commentFill:D(e.labelBackground??e.tertiaryColor,b.commentFill),commentStroke:D(e.tertiaryBorderColor??e.lineColor,b.commentStroke),commentTextColor:D(e.tertiaryTextColor??e.textColor,b.commentTextColor),specialFill:D(e.tertiaryColor??e.secondaryColor,b.specialFill),specialStroke:D(e.tertiaryBorderColor??e.secondaryBorderColor,b.specialStroke),ruleNameColor:D(e.titleColor??e.textColor,b.ruleNameColor)}},`buildThemeDefaults`),M=e(e=>{let t=i(),r=j({...n(),...t.themeVariables??{},...E(e)}),a={...t.railroad??{},...T(e)};return{compactMode:a.compactMode??r.compactMode,padding:k(a.padding,r.padding),verticalSeparation:k(a.verticalSeparation,r.verticalSeparation),horizontalSeparation:k(a.horizontalSeparation,r.horizontalSeparation),arcRadius:k(a.arcRadius,r.arcRadius),fontSize:k(a.fontSize,r.fontSize),fontFamily:O(a.fontFamily,r.fontFamily),terminalFill:D(a.terminalFill,r.terminalFill),terminalStroke:D(a.terminalStroke,r.terminalStroke),terminalTextColor:D(a.terminalTextColor,r.terminalTextColor),nonTerminalFill:D(a.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:D(a.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:D(a.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:D(a.lineColor,r.lineColor),strokeWidth:k(a.strokeWidth,r.strokeWidth),markerFill:D(a.markerFill,r.markerFill),commentFill:D(a.commentFill,r.commentFill),commentStroke:D(a.commentStroke,r.commentStroke),commentTextColor:D(a.commentTextColor,r.commentTextColor),specialFill:D(a.specialFill,r.specialFill),specialStroke:D(a.specialStroke,r.specialStroke),ruleNameColor:D(a.ruleNameColor,r.ruleNameColor),showMarkers:a.showMarkers??r.showMarkers,markerRadius:k(a.markerRadius,r.markerRadius)}},`buildRailroadStyleOptions`),N=e(e=>{let{fontFamily:t,fontSize:n,terminalFill:r,terminalStroke:i,terminalTextColor:a,nonTerminalFill:o,nonTerminalStroke:s,nonTerminalTextColor:c,lineColor:l,strokeWidth:u,markerFill:d,commentFill:f,commentStroke:p,commentTextColor:m,specialFill:h,specialStroke:g,ruleNameColor:_}=M(e);return` - .railroad-diagram { - font-family: ${t}; - font-size: ${n}px; - } - - .railroad-terminal rect { - fill: ${r}; - stroke: ${i}; - stroke-width: ${u}px; - } - - .railroad-terminal text { - fill: ${a}; - font-family: ${t}; - font-size: ${n}px; - text-anchor: middle; - dominant-baseline: middle; - } - - .railroad-nonterminal rect { - fill: ${o}; - stroke: ${s}; - stroke-width: ${u}px; - } - - .railroad-nonterminal text { - fill: ${c}; - font-family: ${t}; - font-size: ${n}px; - text-anchor: middle; - dominant-baseline: middle; - } - - .railroad-line { - stroke: ${l}; - stroke-width: ${u}px; - fill: none; - } - - .railroad-start circle, - .railroad-end circle { - fill: ${d}; - } - - .railroad-comment ellipse { - fill: ${f}; - stroke: ${p}; - stroke-width: ${u}px; - } - - .railroad-comment text { - fill: ${m}; - font-style: italic; - font-family: ${t}; - font-size: ${n}px; - text-anchor: middle; - dominant-baseline: middle; - } - - .railroad-special rect { - fill: ${h}; - stroke: ${g}; - stroke-width: ${u}px; - stroke-dasharray: 5,3; - } - - .railroad-special text { - fill: ${c}; - font-family: ${t}; - font-size: ${n}px; - text-anchor: middle; - dominant-baseline: middle; - } - - .railroad-rule-name { - font-weight: bold; - fill: ${_}; - font-family: ${t}; - font-size: ${n}px; - } - - .railroad-group { - /* Grouping container, no specific styles */ - } -`},`getStyles`),P=class{constructor(){this.d=``}static{e(this,`PathBuilder`)}moveTo(e,t){return this.d+=`M ${e} ${t} `,this}lineTo(e,t){return this.d+=`L ${e} ${t} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,t,n,r,i,a,o){return this.d+=`A ${e} ${t} ${n} ${+!!r} ${+!!i} ${a} ${o} `,this}build(){return this.d.trim()}},F=class{constructor(e,t=M()){this.textCache=new Map,this.svg=e,this.config=t}static{e(this,`RailroadRenderer`)}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);let t=this.svg.append(`text`).attr(`font-family`,this.config.fontFamily).attr(`font-size`,this.config.fontSize).text(e),n=t.node().getBBox(),r={width:n.width,height:n.height};return t.remove(),this.textCache.set(e,r),r}renderTerminal(e,t){let n=this.measureText(t),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-terminal`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i).attr(`rx`,10).attr(`ry`,10),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderNonTerminal(e,t){let n=this.measureText(t),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-nonterminal`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(t),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderSequence(e,t){let n=t.map(t=>this.renderExpression(e,t)),r=0,i=0,a=0;for(let e of n)r+=e.dimensions.width,i=Math.max(i,e.dimensions.up),a=Math.max(a,e.dimensions.down);r+=(n.length-1)*this.config.horizontalSeparation;let o=e.append(`g`).attr(`class`,`railroad-sequence`),s=0;for(let e=0;ethis.renderExpression(e,t)),r=0,i=0;for(let e of n)r=Math.max(r,e.dimensions.width),i+=e.dimensions.height;i+=(n.length-1)*this.config.verticalSeparation;let a=this.config.arcRadius,o=a*4,s=r+o,c=e.append(`g`).attr(`class`,`railroad-choice`),l=0,u=i/2;for(let e of n){let t=l,n=t+e.dimensions.up,i=a*2+(r-e.dimensions.width)/2;c.node().appendChild(e.element).setAttribute(`transform`,`translate(${i}, ${t})`);let o=new P,d=n>u;n===u?o.moveTo(0,u).lineTo(i,n):o.moveTo(0,u).arcTo(a,a,0,!1,d,a,u+(d?a:-a)).lineTo(a,n-(d?a:-a)).arcTo(a,a,0,!1,!d,a*2,n).lineTo(i,n),c.append(`path`).attr(`class`,`railroad-line`).attr(`d`,o.build());let f=new P,p=i+e.dimensions.width,m=s-a*2;n===u?f.moveTo(p,n).lineTo(s,u):f.moveTo(p,n).lineTo(m,n).arcTo(a,a,0,!1,!d,s-a,n+(d?-a:a)).lineTo(s-a,u+(d?a:-a)).arcTo(a,a,0,!1,d,s,u),c.append(`path`).attr(`class`,`railroad-line`).attr(`d`,f.build()),l+=e.dimensions.height+this.config.verticalSeparation}return{element:c.node(),dimensions:{width:s,height:i,up:u,down:i-u}}}renderOptional(e,t){let n=this.renderExpression(e,t),r=this.config.arcRadius,i=r*2,a=n.dimensions.width+r*4,o=n.dimensions.height+i,s=e.append(`g`).attr(`class`,`railroad-optional`),c=r*2,l=i;s.node().appendChild(n.element).setAttribute(`transform`,`translate(${c}, ${l})`);let u=l+n.dimensions.up,d=new P().moveTo(0,u).lineTo(r*2,u);s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,d.build());let f=new P().moveTo(c+n.dimensions.width,u).lineTo(a,u);s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,f.build());let p=new P().moveTo(0,u).arcTo(r,r,0,!1,!1,r,u-r).lineTo(r,r).arcTo(r,r,0,!1,!0,r*2,0).lineTo(a-r*2,0).arcTo(r,r,0,!1,!0,a-r,r).lineTo(a-r,u-r).arcTo(r,r,0,!1,!1,a,u);return s.append(`path`).attr(`class`,`railroad-line`).attr(`d`,p.build()),{element:s.node(),dimensions:{width:a,height:o,up:u,down:o-u}}}renderRepetition(e,t,n){let r=this.renderExpression(e,t),i=this.config.arcRadius,a=i*2,o=r.dimensions.width+i*4,s=n===0,c=r.dimensions.height+a+(s?a:0),l=e.append(`g`).attr(`class`,`railroad-repetition`),u=i*2,d=s?a:0;l.node().appendChild(r.element).setAttribute(`transform`,`translate(${u}, ${d})`);let f=d+r.dimensions.up;l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new P().moveTo(0,f).lineTo(i*2,f).build()),l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new P().moveTo(u+r.dimensions.width,f).lineTo(o,f).build());let p=d+r.dimensions.height+i,m=new P().moveTo(u+r.dimensions.width,f).arcTo(i,i,0,!1,!0,u+r.dimensions.width+i,f+i).lineTo(u+r.dimensions.width+i,p).arcTo(i,i,0,!1,!0,u+r.dimensions.width,p+i).lineTo(i*2,p+i).arcTo(i,i,0,!1,!0,i,p).lineTo(i,f+i).arcTo(i,i,0,!1,!0,i*2,f);if(l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,m.build()),s){let e=new P().moveTo(0,f).arcTo(i,i,0,!1,!1,i,f-i).lineTo(i,i).arcTo(i,i,0,!1,!0,i*2,0).lineTo(o-i*2,0).arcTo(i,i,0,!1,!0,o-i,i).lineTo(o-i,f-i).arcTo(i,i,0,!1,!1,o,f);l.append(`path`).attr(`class`,`railroad-line`).attr(`d`,e.build())}return{element:l.node(),dimensions:{width:o,height:c,up:f,down:c-f}}}renderSpecial(e,t){let n=this.measureText(`? `+t+` ?`),r=n.width+this.config.padding*2,i=n.height+this.config.padding*2,a=e.append(`g`).attr(`class`,`railroad-special`);return a.append(`rect`).attr(`x`,0).attr(`y`,0).attr(`width`,r).attr(`height`,i),a.append(`text`).attr(`x`,r/2).attr(`y`,i/2).text(`? `+t+` ?`),{element:a.node(),dimensions:{width:r,height:i,up:i/2,down:i/2}}}renderExpression(e,t){switch(t.type){case`terminal`:return this.renderTerminal(e,t.value);case`nonterminal`:return this.renderNonTerminal(e,t.name);case`sequence`:return this.renderSequence(e,t.elements);case`choice`:return this.renderChoice(e,t.alternatives);case`optional`:return this.renderOptional(e,t.element);case`repetition`:return this.renderRepetition(e,t.element,t.min);case`special`:return this.renderSpecial(e,t.text);default:throw Error(`Unknown node type: ${t.type}`)}}renderRule(e,t){let n=this.svg.append(`g`).attr(`class`,`railroad-rule`).attr(`transform`,`translate(0, ${t})`),r=e.name+` =`,i=this.measureText(r).width+20,a=i+20,o=n.append(`g`),s=this.renderExpression(o,e.definition),c=Math.max(20,s.dimensions.up),l=c-s.dimensions.up;return o.attr(`transform`,`translate(${a}, ${l})`),n.append(`g`).attr(`class`,`railroad-rule-name-group`).append(`text`).attr(`class`,`railroad-rule-name`).attr(`x`,0).attr(`y`,c).text(r),n.append(`g`).attr(`class`,`railroad-start`).append(`circle`).attr(`cx`,i).attr(`cy`,c).attr(`r`,this.config.markerRadius),n.append(`g`).attr(`class`,`railroad-end`).append(`circle`).attr(`cx`,a+s.dimensions.width+10).attr(`cy`,c).attr(`r`,this.config.markerRadius),n.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new P().moveTo(i+this.config.markerRadius,c).lineTo(a,c).build()),n.append(`path`).attr(`class`,`railroad-line`).attr(`d`,new P().moveTo(a+s.dimensions.width,c).lineTo(a+s.dimensions.width+10-this.config.markerRadius,c).build()),{height:Math.max(40,l+s.dimensions.height+this.config.padding*2),width:a+s.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let t=this.config.padding,n=0;for(let r of e){let e=this.renderRule(r,t);t+=e.height+this.config.verticalSeparation,n=Math.max(n,e.width)}return{width:n+this.config.padding*2,height:t+this.config.padding}}},I=e((e,t,n)=>{a(e,t.height,t.width,n),e.attr(`viewBox`,`0 0 ${t.width} ${t.height}`)},`configureRailroadSvgSize`),L={draw:e((e,n,r)=>{t.debug(`[Railroad] Rendering diagram -`+e);try{let e=c(n);e.attr(`class`,`railroad-diagram`);let r=i().railroad?.useMaxWidth??!0,a=y.getRules();if(t.debug(`[Railroad] Rendering ${a.length} rules`),a.length===0){t.warn(`[Railroad] No rules to render`),I(e,{height:100,width:200},r);return}I(e,new F(e,M()).renderDiagram(a),r),t.debug(`[Railroad] Render complete`)}catch(e){throw t.error(`[Railroad] Render error:`,e),e}},`draw`)};export{N as n,L as r,y as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-MOZMSUNE-BgA8jCvb.js b/dist-desktop/assets/chunk-MOZMSUNE-BgA8jCvb.js deleted file mode 100644 index 557bf09..0000000 --- a/dist-desktop/assets/chunk-MOZMSUNE-BgA8jCvb.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,S as t,n,o as r,r as i,t as a,u as o,w as s,x as c}from"./chunk-KEIR6QF5-Dj-OpFgW.js";var l=class extends a{static{c(this,`ArchitectureTokenBuilder`)}constructor(){super([`architecture`])}},u=class extends n{static{c(this,`ArchitectureValueConverter`)}runCustomConverter(e,t,n){if(e.name===`ARCH_ICON`)return t.replace(/[()]/g,``).trim();if(e.name===`ARCH_TEXT_ICON`)return t.replace(/["()]/g,``);if(e.name===`ARCH_TITLE`){let e=t.replace(/^\[|]$/g,``).trim();return(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))&&(e=e.slice(1,-1),e=e.replace(/\\"/g,`"`).replace(/\\'/g,`'`)),e.trim()}}},d={parser:{TokenBuilder:c(()=>new l,`TokenBuilder`),ValueConverter:c(()=>new u,`ValueConverter`)}};function f(n=r){let a=s(e(n),o),c=s(t({shared:a}),i,d);return a.ServiceRegistry.register(c),{shared:a,Architecture:c}}c(f,`createArchitectureServices`);export{f as n,d as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-OGEWGWER-D-nWYRNR.js b/dist-desktop/assets/chunk-OGEWGWER-D-nWYRNR.js deleted file mode 100644 index a3dd93f..0000000 --- a/dist-desktop/assets/chunk-OGEWGWER-D-nWYRNR.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{f as t,x as n}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{p as r}from"./chunk-ICXQ74PX-Czpgj8Uw.js";var i=e(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`);async function a(i,a){let o=i.getElementsByTagName(`img`);if(!o||o.length===0)return;let s=a.replace(/]*>/g,``).trim()===``;await Promise.all([...o].map(i=>new Promise(a=>{function o(){if(i.style.display=`flex`,i.style.flexDirection=`column`,s){let[e=t.fontSize]=r(n().fontSize?n().fontSize:window.getComputedStyle(document.body).fontSize),a=e*5+`px`;i.style.minWidth=a,i.style.maxWidth=a}else i.style.width=`100%`;a(i)}e(o,`setupImage`),setTimeout(()=>{i.complete&&o()}),i.addEventListener(`error`,o),i.addEventListener(`load`,o)})))}e(a,`configureLabelImages`);export{i as n,a as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-OSBZ3O6U-CX9EQ5t2.js b/dist-desktop/assets/chunk-OSBZ3O6U-CX9EQ5t2.js deleted file mode 100644 index 83b8b1d..0000000 --- a/dist-desktop/assets/chunk-OSBZ3O6U-CX9EQ5t2.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,S as t,a as n,i as r,o as i,t as a,u as o,w as s,x as c}from"./chunk-KEIR6QF5-Dj-OpFgW.js";var l=class extends a{static{c(this,`CynefinTokenBuilder`)}constructor(){super([`cynefin-beta`])}},u={parser:{TokenBuilder:c(()=>new l,`TokenBuilder`),ValueConverter:c(()=>new r,`ValueConverter`)}};function d(r=i){let a=s(e(r),o),c=s(t({shared:a}),n,u);return a.ServiceRegistry.register(c),{shared:a,Cynefin:c}}c(d,`createCynefinServices`);export{d as n,u as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-PUDLZKDR-hlw4TonS.js b/dist-desktop/assets/chunk-PUDLZKDR-hlw4TonS.js deleted file mode 100644 index 82af9d9..0000000 --- a/dist-desktop/assets/chunk-PUDLZKDR-hlw4TonS.js +++ /dev/null @@ -1,156 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-UMNXGZaF.js";import{$ as r,G as i,H as a,K as o,U as s,a as c,d as l,it as u,k as d,s as f,v as p,w as ee,x as m,y as h}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as te}from"./channel-C4fgBBJ4.js";import{c as g,g as _}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as ne}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{t as re}from"./chunk-32BRIVSS-DWU3ezKg.js";import{t as v}from"./chunk-XXDRQBXY-Bq6zMMOx.js";import{t as y}from"./chunk-VR4S4FIN-BTo4eV3J.js";import{o as b}from"./chunk-ZGVPDNZ5-DGInJAPD.js";import{r as x,t as S}from"./chunk-FWX5IMBZ-ComLEIwh.js";import{n as C,t as w}from"./chunk-ZIRB5QZD-C6fEPe3t.js";var T=`flowchart-`,E=class{constructor(){this.vertexCounter=0,this.config=m(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=s,this.setAccDescription=a,this.setDiagramTitle=o,this.getAccTitle=h,this.getAccDescription=p,this.getDiagramTitle=ee,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{e(this,`FlowDB`)}sanitizeText(e){return f.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,n,r,i,a,o,s={},c){if(!e||e.trim().length===0)return;let l;if(c!==void 0){let e;e=c.includes(` -`)?c+` -`:`{ -`+c+` -}`,l=C(e,{schema:w})}let u=this.edges.find(t=>t.id===e);if(u){let e=l;e?.animate!==void 0&&(u.animate=e.animate),e?.animation!==void 0&&(u.animation=e.animation),e?.curve!==void 0&&(u.interpolate=e.curve);return}let d,f=this.vertices.get(e);if(f===void 0&&(n===void 0&&r===void 0&&i!=null&&t.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),f={id:e,labelType:`text`,domId:T+e+`-`+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,f)),this.vertexCounter++,n===void 0?f.text===void 0&&(f.text=e):(this.config=m(),d=this.sanitizeText(n.text.trim()),f.labelType=n.type,d.startsWith(`"`)&&d.endsWith(`"`)&&(d=d.substring(1,d.length-1)),f.text=d),r!==void 0&&(f.type=r),i?.forEach(e=>{f.styles.push(e)}),a?.forEach(e=>{f.classes.push(e)}),o!==void 0&&(f.dir=o),f.props===void 0?f.props=s:s!==void 0&&Object.assign(f.props,s),l!==void 0){if(l.shape){if(l.shape!==l.shape.toLowerCase()||l.shape.includes(`_`))throw Error(`No such shape: ${l.shape}. Shape names should be lowercase.`);if(!b(l.shape))throw Error(`No such shape: ${l.shape}.`);f.type=l?.shape}l?.label&&(f.text=l?.label,f.labelType=this.sanitizeNodeLabelType(l?.labelType)),l?.icon&&(f.icon=l?.icon,!l.label?.trim()&&f.text===e&&(f.text=``)),l?.form&&(f.form=l?.form),l?.pos&&(f.pos=l?.pos),l?.img&&(f.img=l?.img,!l.label?.trim()&&f.text===e&&(f.text=``)),l?.constraint&&(f.constraint=l.constraint),l.w&&(f.assetWidth=Number(l.w)),l.h&&(f.assetHeight=Number(l.h))}}addSingleLink(e,n,r,i){let a={start:e,end:n,type:void 0,text:``,labelType:`text`,classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};t.info(`abc78 Got edge...`,a);let o=r.text;if(o!==void 0&&(a.text=this.sanitizeText(o.text.trim()),a.text.startsWith(`"`)&&a.text.endsWith(`"`)&&(a.text=a.text.substring(1,a.text.length-1)),a.labelType=this.sanitizeNodeLabelType(o.type)),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length>10?10:r.length),i&&!this.edges.some(e=>e.id===i))a.id=i,a.isUserDefinedId=!0;else{let e=this.edges.filter(e=>e.start===a.start&&e.end===a.end);e.length===0?a.id=g(a.start,a.end,{counter:0,prefix:`L`}):a.id=g(a.start,a.end,{counter:e.length+1,prefix:`L`})}if(this.edges.length<(this.config.maxEdges??500))t.info(`Pushing edge...`),this.edges.push(a);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}. - -Initialize mermaid with maxEdges set to a higher number to allow more edges. -You cannot set this config via configuration inside the diagram as it is a secure config. -You have to call mermaid.initialize.`)}isLinkData(e){return typeof e==`object`&&!!e&&`id`in e&&typeof e.id==`string`}addLink(e,n,r){let i=this.isLinkData(r)?r.id.replace(`@`,``):void 0;t.info(`addLink`,e,n,i);for(let t of e)for(let a of n){let o=t===e[e.length-1],s=a===n[0];o&&s?this.addSingleLink(t,a,r,i):this.addSingleLink(t,a,r,void 0)}}updateLinkInterpolate(e,t){e.forEach(e=>{e==="default"?this.edges.defaultInterpolate=t:this.edges[e].interpolate=t})}updateLink(e,t){e.forEach(e=>{if(typeof e==`number`&&e>=this.edges.length)throw Error(`The index ${e} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);e==="default"?this.edges.defaultStyle=t:(this.edges[e].style=t,(this.edges[e]?.style?.length??0)>0&&!this.edges[e]?.style?.some(e=>e?.startsWith(`fill`))&&this.edges[e]?.style?.push(`fill:none`))})}addClass(e,t){let n=t.join().replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);e.split(`,`).forEach(e=>{let t=this.classes.get(e);t===void 0&&(t={id:e,styles:[],textStyles:[]},this.classes.set(e,t)),n?.forEach(e=>{if(/color/.exec(e)){let n=e.replace(`fill`,`bgFill`);t.textStyles.push(n)}t.styles.push(e)})})}setDirection(e){this.direction=e.trim(),/.*/.exec(this.direction)&&(this.direction=`LR`),/.*v/.exec(this.direction)&&(this.direction=`TB`),this.direction===`TD`&&(this.direction=`TB`)}setClass(e,t){for(let n of e.split(`,`)){let e=this.vertices.get(n);e&&e.classes.push(t);let r=this.edges.find(e=>e.id===n);r&&r.classes.push(t);let i=this.subGraphLookup.get(n);i&&i.classes.push(t)}}setTooltip(e,t){if(t!==void 0){t=this.sanitizeText(t);for(let n of e.split(`,`))this.tooltips.set(this.version===`gen-1`?this.lookUpDomId(n):n,t)}}setClickFun(e,t,n){if(m().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{let n=this.lookUpDomId(e),i=document.querySelector(`[id="${n}"]`);i!==null&&i.addEventListener(`click`,()=>{_.runFunc(t,...r)},!1)}))}setLink(e,t,n){e.split(`,`).forEach(e=>{let r=this.vertices.get(e);r!==void 0&&(r.link=_.formatUrl(t,this.config),r.linkTarget=n)}),this.setClass(e,`clickable`)}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,t,n){e.split(`,`).forEach(e=>{this.setClickFun(e,t,n)}),this.setClass(e,`clickable`)}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let t=re();n(e).select(`svg`).selectAll(`g.node`).on(`mouseover`,e=>{let i=n(e.currentTarget),a=i.attr(`title`);if(a===null)return;let o=e.currentTarget?.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.text(i.attr(`title`)).style(`left`,window.scrollX+o.left+(o.right-o.left)/2+`px`).style(`top`,window.scrollY+o.bottom+`px`),t.html(r.sanitize(a)),i.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),n(e.currentTarget).classed(`hover`,!1)})}clear(e=`gen-2`){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId=``,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=m(),c()}setGen(e){this.version=e||`gen-2`}defaultStyle(){return`fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;`}addSubGraph(n,r,i){let a=n.text.trim(),o=i.text;n===i&&/\s/.exec(i.text)&&(a=void 0);let s=e(e=>{let t={boolean:{},number:{},string:{}},n=[],r;return{nodeList:e.filter(function(e){let i=typeof e;return e.stmt&&e.stmt===`dir`?(r=e.value,!1):e.trim()===``?!1:i in t?t[i].hasOwnProperty(e)?!1:t[i][e]=!0:!n.includes(e)&&n.push(e)}),dir:r}},`uniq`)(r.flat()),c=s.nodeList,l=s.dir,u=l!==void 0,d=m().flowchart??{},f=l??(d.inheritDir?this.getDirection()??m().direction??void 0:void 0);if(this.version===`gen-1`)for(let e=0;e2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=t,this.subGraphs[t].id===e)return{result:!0,count:0};let r=0,i=1;for(;r=0){let n=this.indexNodes2(e,t);if(n.result)return{result:!0,count:i+n.count};i+=n.count}r+=1}return{result:!1,count:i}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2(`none`,this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(e){let t=e.trim(),n=`arrow_open`;switch(t[0]){case`<`:n=`arrow_point`,t=t.slice(1);break;case`x`:n=`arrow_cross`,t=t.slice(1);break;case`o`:n=`arrow_circle`,t=t.slice(1);break}let r=`normal`;return t.includes(`=`)&&(r=`thick`),t.includes(`.`)&&(r=`dotted`),{type:n,stroke:r}}countChar(e,t){let n=t.length,r=0;for(let i=0;i`:r=`arrow_point`,t.startsWith(`<`)&&(r=`double_`+r,n=n.slice(1));break;case`o`:r=`arrow_circle`,t.startsWith(`o`)&&(r=`double_`+r,n=n.slice(1));break}let i=`normal`,a=n.length-1;n.startsWith(`=`)&&(i=`thick`),n.startsWith(`~`)&&(i=`invisible`);let o=this.countChar(`.`,n);return o&&(i=`dotted`,a=o),{type:r,stroke:i,length:a}}destructLink(e,t){let n=this.destructEndLink(e),r;if(t){if(r=this.destructStartLink(t),r.stroke!==n.stroke)return{type:`INVALID`,stroke:`INVALID`};if(r.type===`arrow_open`)r.type=n.type;else{if(r.type!==n.type)return{type:`INVALID`,stroke:`INVALID`};r.type=`double_`+r.type}return r.type===`double_arrow`&&(r.type=`double_arrow_point`),r.length=n.length,r}return n}exists(e,t){for(let n of e)if(n.nodes.includes(t))return!0;return!1}makeUniq(e,t){let n=[];return e.nodes.forEach((r,i)=>{this.exists(t,r)||n.push(e.nodes[i])}),{nodes:n}}getTypeFromVertex(e){if(e.img)return`imageSquare`;if(e.icon)return e.form===`circle`?`iconCircle`:e.form===`square`?`iconSquare`:e.form===`rounded`?`iconRounded`:`icon`;switch(e.type){case`square`:case void 0:return`squareRect`;case`round`:return`roundedRect`;case`ellipse`:return`ellipse`;default:return e.type}}findNode(e,t){return e.find(e=>e.id===t)}destructEdgeType(e){let t=`none`,n=`arrow_point`;switch(e){case`arrow_point`:case`arrow_circle`:case`arrow_cross`:n=e;break;case`double_arrow_point`:case`double_arrow_circle`:case`double_arrow_cross`:t=e.replace(`double_`,``),n=t;break}return{arrowTypeStart:t,arrowTypeEnd:n}}addNodeFromVertex(e,t,n,r,i,a){let o=n.get(e.id),s=r.get(e.id)??!1,c=this.findNode(t,e.id);if(c)c.cssStyles=e.styles,c.cssCompiledStyles=this.getCompiledStyles(e.classes),c.cssClasses=e.classes.join(` `);else{let n={id:e.id,label:e.text,labelType:e.labelType,labelStyle:``,parentId:o,padding:i.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles([`default`,`node`,...e.classes]),cssClasses:`default `+e.classes.join(` `),dir:e.dir,domId:e.domId,look:a,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};s?t.push({...n,isGroup:!0,shape:`rect`}):t.push({...n,isGroup:!1,shape:this.getTypeFromVertex(e)})}}getCompiledStyles(e){let t=[];for(let n of e){let e=this.classes.get(n);e?.styles&&(t=[...t,...e.styles??[]].map(e=>e.trim())),e?.textStyles&&(t=[...t,...e.textStyles??[]].map(e=>e.trim()))}return t}getData(){let e=m(),t=[],n=[],r=this.getSubGraphs(),i=new Map,a=new Map;for(let e=r.length-1;e>=0;e--){let t=r[e];t.nodes.length>0&&a.set(t.id,!0);for(let e of t.nodes)i.set(e,t.id)}for(let n=r.length-1;n>=0;n--){let a=r[n];t.push({id:a.id,label:a.title,labelStyle:``,labelType:a.labelType,parentId:i.get(a.id),padding:8,cssCompiledStyles:this.getCompiledStyles(a.classes),cssClasses:a.classes.join(` `),shape:`rect`,dir:a.dir===`TD`?`TB`:a.dir,explicitDir:a.hasExplicitDir,isGroup:!0,look:e.look})}this.getVertices().forEach(n=>{this.addNodeFromVertex(n,t,i,a,e,e.look||`classic`)});let o=this.getEdges();return o.forEach((t,r)=>{let{arrowTypeStart:i,arrowTypeEnd:a}=this.destructEdgeType(t.type),s=[...o.defaultStyle??[]];t.style&&s.push(...t.style);let c={id:g(t.start,t.end,{counter:r,prefix:`L`},t.id),isUserDefinedId:t.isUserDefinedId,start:t.start,end:t.end,type:t.type??`normal`,label:t.text,labelType:t.labelType,labelpos:`c`,thickness:t.stroke,minlen:t.length,classes:t?.stroke===`invisible`?``:`edge-thickness-normal edge-pattern-solid flowchart-link`,arrowTypeStart:t?.stroke===`invisible`||t?.type===`arrow_open`?`none`:i,arrowTypeEnd:t?.stroke===`invisible`||t?.type===`arrow_open`?`none`:a,arrowheadStyle:`fill: #333`,cssCompiledStyles:this.getCompiledStyles(t.classes),labelStyle:s,style:s,pattern:t.stroke,look:e.look,animate:t.animate,animation:t.animation,curve:t.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};n.push(c)}),{nodes:t,edges:n,other:{},config:e}}defaultConfig(){return l.flowchart}},D={getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`),draw:e(async function(e,n,r,i,a){t.info(`REF0:`),t.info(`Drawing state diagram (v2)`,n);let{securityLevel:o,flowchart:s,layout:c}=m();i.db.setDiagramId(n),t.debug(`Before getData: `);let l=i.db.getData();t.debug(`Data: `,l);let u=v(n,o),d=i.db.getDirection();l.type=i.type,l.layoutAlgorithm=S(c),l.layoutAlgorithm===`dagre`&&c===`elk`&&t.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),l.direction=d,l.nodeSpacing=s?.nodeSpacing||50,l.rankSpacing=s?.rankSpacing||50,l.markers=[`point`,`circle`,`cross`],l.diagramId=n,t.debug(`REF1:`,l),await x(l,u,a);let f=l.config.flowchart?.diagramPadding??8;_.insertTitle(u,`flowchartTitleText`,s?.titleTopMargin||0,i.db.getDiagramTitle()),y(u,f,`flowchart`,s?.useMaxWidth||!1)},`draw`)},O=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],o=[2,2],s=[1,13],c=[1,14],l=[1,15],u=[1,16],d=[1,23],f=[1,25],p=[1,26],ee=[1,27],m=[1,50],h=[1,49],te=[1,29],g=[1,30],_=[1,31],ne=[1,32],re=[1,33],v=[1,45],y=[1,47],b=[1,43],x=[1,48],S=[1,44],C=[1,51],w=[1,46],T=[1,52],E=[1,53],D=[1,34],O=[1,35],ie=[1,36],ae=[1,37],oe=[1,38],k=[1,58],A=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],j=[1,62],M=[1,61],N=[1,63],se=[8,9,11,75,77,78],ce=[1,79],le=[1,92],ue=[1,97],de=[1,96],fe=[1,93],pe=[1,89],me=[1,95],he=[1,91],ge=[1,98],_e=[1,94],ve=[1,99],ye=[1,90],be=[8,9,10,11,40,75,77,78],P=[8,9,10,11,40,46,75,77,78],F=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],xe=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],Se=[44,60,89,102,105,106,109,111,114,115,116],Ce=[1,122],we=[1,123],Te=[1,125],Ee=[1,124],De=[44,60,62,74,89,102,105,106,109,111,114,115,116],Oe=[1,134],ke=[1,148],Ae=[1,149],je=[1,150],Me=[1,151],Ne=[1,136],Pe=[1,138],Fe=[1,142],Ie=[1,143],Le=[1,144],Re=[1,145],ze=[1,146],Be=[1,147],Ve=[1,152],He=[1,153],Ue=[1,132],We=[1,133],Ge=[1,140],Ke=[1,135],qe=[1,139],Je=[1,137],Ye=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Xe=[1,155],Ze=[1,157],I=[8,9,11],L=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],R=[1,177],z=[1,173],B=[1,174],V=[1,178],H=[1,175],U=[1,176],Qe=[77,116,119],W=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],$e=[10,106],et=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],G=[1,248],K=[1,246],q=[1,250],J=[1,244],Y=[1,245],X=[1,247],Z=[1,249],Q=[1,251],tt=[1,269],nt=[8,9,11,106],$=[8,9,10,11,60,84,105,106,109,110,111,112],rt={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:`error`,8:`SEMI`,9:`NEWLINE`,10:`SPACE`,11:`EOF`,12:`GRAPH`,13:`NODIR`,14:`DIR`,27:`subgraph`,29:`SQS`,31:`SQE`,32:`end`,34:`acc_title`,35:`acc_title_value`,36:`acc_descr`,37:`acc_descr_value`,38:`acc_descr_multiline_value`,40:`SHAPE_DATA`,44:`AMP`,46:`STYLE_SEPARATOR`,48:`DOUBLECIRCLESTART`,49:`DOUBLECIRCLEEND`,50:`PS`,51:`PE`,52:`(-`,53:`-)`,54:`STADIUMSTART`,55:`STADIUMEND`,56:`SUBROUTINESTART`,57:`SUBROUTINEEND`,58:`VERTEX_WITH_PROPS_START`,59:`NODE_STRING[field]`,60:`COLON`,61:`NODE_STRING[value]`,62:`PIPE`,63:`CYLINDERSTART`,64:`CYLINDEREND`,65:`DIAMOND_START`,66:`DIAMOND_STOP`,67:`TAGEND`,68:`TRAPSTART`,69:`TRAPEND`,70:`INVTRAPSTART`,71:`INVTRAPEND`,74:`TESTSTR`,75:`START_LINK`,77:`LINK`,78:`LINK_ID`,80:`STR`,81:`MD_STR`,84:`STYLE`,85:`LINKSTYLE`,86:`CLASSDEF`,87:`CLASS`,88:`CLICK`,89:`DOWN`,90:`UP`,93:`idString[vertex]`,94:`idString[class]`,95:`CALLBACKNAME`,96:`CALLBACKARGS`,97:`HREF`,98:`LINK_TARGET`,99:`STR[link]`,100:`STR[tooltip]`,102:`DEFAULT`,104:`INTERPOLATE`,105:`NUM`,106:`COMMA`,109:`NODE_STRING`,110:`UNIT`,111:`BRKT`,112:`PCT`,114:`MINUS`,115:`MULT`,116:`UNICODE_TEXT`,117:`TEXT`,118:`TAGSTART`,119:`EDGE_TEXT`,121:`direction_tb`,122:`direction_bt`,123:`direction_rl`,124:`direction_lr`,125:`direction_td`},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 2:this.$=[];break;case 3:(!Array.isArray(a[s])||a[s].length>0)&&a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 183:this.$=a[s];break;case 11:r.setDirection(`TB`),this.$=`TB`;break;case 12:r.setDirection(a[s-1]),this.$=a[s-1];break;case 27:this.$=a[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 34:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 35:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 37:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 38:case 39:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 43:this.$=a[s-1]+a[s];break;case 44:this.$=a[s];break;case 45:r.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s]),r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 46:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 47:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 48:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 49:r.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s]),this.$={stmt:a[s-1],nodes:a[s-1],shapeData:a[s]};break;case 50:this.$={stmt:a[s],nodes:a[s]};break;case 51:this.$=[a[s]];break;case 52:r.addVertex(a[s-5][a[s-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s-4]),this.$=a[s-5].concat(a[s]);break;case 53:this.$=a[s-4].concat(a[s]);break;case 54:this.$=a[s];break;case 55:this.$=a[s-2],r.setClass(a[s-2],a[s]);break;case 56:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`square`);break;case 57:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`doublecircle`);break;case 58:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`circle`);break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`ellipse`);break;case 60:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`stadium`);break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`subroutine`);break;case 62:this.$=a[s-7],r.addVertex(a[s-7],a[s-1],`rect`,void 0,void 0,void 0,Object.fromEntries([[a[s-5],a[s-3]]]));break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`cylinder`);break;case 64:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`round`);break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`diamond`);break;case 66:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`hexagon`);break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`odd`);break;case 68:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`trapezoid`);break;case 69:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`inv_trapezoid`);break;case 70:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_right`);break;case 71:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_left`);break;case 72:this.$=a[s],r.addVertex(a[s]);break;case 73:a[s-1].text=a[s],this.$=a[s-1];break;case 74:case 75:a[s-2].text=a[s-1],this.$=a[s-2];break;case 76:this.$=a[s];break;case 77:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 78:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1],id:a[s-3]};break;case 79:this.$={text:a[s],type:`text`};break;case 80:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 81:this.$={text:a[s],type:`string`};break;case 82:this.$={text:a[s],type:`markdown`};break;case 83:var c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 84:var c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length,id:a[s-1]};break;case 85:this.$=a[s-1];break;case 86:this.$={text:a[s],type:`text`};break;case 87:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 88:this.$={text:a[s],type:`string`};break;case 89:case 104:this.$={text:a[s],type:`markdown`};break;case 101:this.$={text:a[s],type:`text`};break;case 102:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 103:this.$={text:a[s],type:`text`};break;case 105:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 106:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 107:case 115:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 108:case 116:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 109:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 110:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 111:this.$=a[s-2],r.setLink(a[s-2],a[s]);break;case 112:this.$=a[s-4],r.setLink(a[s-4],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 113:this.$=a[s-4],r.setLink(a[s-4],a[s-2],a[s]);break;case 114:this.$=a[s-6],r.setLink(a[s-6],a[s-4],a[s]),r.setTooltip(a[s-6],a[s-2]);break;case 117:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 118:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 119:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 120:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 121:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 122:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 123:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 124:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 125:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 126:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 127:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 128:case 130:this.$=[a[s]];break;case 129:case 131:a[s-2].push(a[s]),this.$=a[s-2];break;case 133:this.$=a[s-1]+a[s];break;case 181:this.$=a[s];break;case 182:this.$=a[s-1]+``+a[s];break;case 184:this.$=a[s-1]+``+a[s];break;case 185:this.$={stmt:`dir`,value:`TB`};break;case 186:this.$={stmt:`dir`,value:`BT`};break;case 187:this.$={stmt:`dir`,value:`RL`};break;case 188:this.$={stmt:`dir`,value:`LR`};break;case 189:this.$={stmt:`dir`,value:`TD`};break}},`anonymous`),table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},t(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,33:24,34:f,36:p,38:ee,42:28,43:39,44:m,45:40,47:41,60:h,84:te,85:g,86:_,87:ne,88:re,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E,121:D,122:O,123:ie,124:ae,125:oe},t(a,[2,9]),t(a,[2,10]),t(a,[2,11]),{8:[1,55],9:[1,56],10:k,15:54,18:57},t(A,[2,3]),t(A,[2,4]),t(A,[2,5]),t(A,[2,6]),t(A,[2,7]),t(A,[2,8]),{8:j,9:M,11:N,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:j,9:M,11:N,21:68},{8:j,9:M,11:N,21:69},{8:j,9:M,11:N,21:70},{8:j,9:M,11:N,21:71},{8:j,9:M,11:N,21:72},{8:j,9:M,10:[1,73],11:N,21:74},t(A,[2,36]),{35:[1,75]},{37:[1,76]},t(A,[2,39]),t(se,[2,50],{18:77,39:78,10:k,40:ce}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:le,44:ue,60:de,80:[1,87],89:fe,95:[1,84],97:[1,85],101:86,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},t(A,[2,185]),t(A,[2,186]),t(A,[2,187]),t(A,[2,188]),t(A,[2,189]),t(be,[2,51]),t(be,[2,54],{46:[1,100]}),t(P,[2,72],{113:113,29:[1,101],44:m,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:h,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:v,102:y,105:b,106:x,109:S,111:C,114:w,115:T,116:E}),t(F,[2,181]),t(F,[2,142]),t(F,[2,143]),t(F,[2,144]),t(F,[2,145]),t(F,[2,146]),t(F,[2,147]),t(F,[2,148]),t(F,[2,149]),t(F,[2,150]),t(F,[2,151]),t(F,[2,152]),t(a,[2,12]),t(a,[2,18]),t(a,[2,19]),{9:[1,114]},t(xe,[2,26],{18:115,10:k}),t(A,[2,27]),{42:116,43:39,44:m,45:40,47:41,60:h,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},t(A,[2,40]),t(A,[2,41]),t(A,[2,42]),t(Se,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Ce,81:we,116:Te,119:Ee},{75:[1,126],77:[1,127]},t(De,[2,83]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),t(A,[2,31]),t(A,[2,32]),{10:Oe,12:ke,14:Ae,27:je,28:128,32:Me,44:Ne,60:Pe,75:Fe,80:[1,130],81:[1,131],83:141,84:Ie,85:Le,86:Re,87:ze,88:Be,89:Ve,90:He,91:129,105:Ue,109:We,111:Ge,114:Ke,115:qe,116:Je},t(Ye,o,{5:154}),t(A,[2,37]),t(A,[2,38]),t(se,[2,48],{44:Xe}),t(se,[2,49],{18:156,10:k,40:Ze}),t(be,[2,44]),{44:m,47:158,60:h,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},{102:[1,159],103:160,105:[1,161]},{44:m,47:162,60:h,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},{44:m,47:163,60:h,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},t(I,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},t(I,[2,115],{120:168,10:[1,167],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),t(I,[2,117],{10:[1,169]}),t(L,[2,183]),t(L,[2,170]),t(L,[2,171]),t(L,[2,172]),t(L,[2,173]),t(L,[2,174]),t(L,[2,175]),t(L,[2,176]),t(L,[2,177]),t(L,[2,178]),t(L,[2,179]),t(L,[2,180]),{44:m,47:170,60:h,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},{30:171,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:179,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:181,50:[1,180],67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:182,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:183,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:184,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{109:[1,185]},{30:186,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:187,65:[1,188],67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:189,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:190,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{30:191,67:R,80:z,81:B,82:172,116:V,117:H,118:U},t(F,[2,182]),t(a,[2,20]),t(xe,[2,25]),t(se,[2,46],{39:192,18:193,10:k,40:ce}),t(Se,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{77:[1,197],79:198,116:Te,119:Ee},t(Qe,[2,79]),t(Qe,[2,81]),t(Qe,[2,82]),t(Qe,[2,168]),t(Qe,[2,169]),{76:199,79:121,80:Ce,81:we,116:Te,119:Ee},t(De,[2,84]),{8:j,9:M,10:Oe,11:N,12:ke,14:Ae,21:201,27:je,29:[1,200],32:Me,44:Ne,60:Pe,75:Fe,83:141,84:Ie,85:Le,86:Re,87:ze,88:Be,89:Ve,90:He,91:202,105:Ue,109:We,111:Ge,114:Ke,115:qe,116:Je},t(W,[2,101]),t(W,[2,103]),t(W,[2,104]),t(W,[2,157]),t(W,[2,158]),t(W,[2,159]),t(W,[2,160]),t(W,[2,161]),t(W,[2,162]),t(W,[2,163]),t(W,[2,164]),t(W,[2,165]),t(W,[2,166]),t(W,[2,167]),t(W,[2,90]),t(W,[2,91]),t(W,[2,92]),t(W,[2,93]),t(W,[2,94]),t(W,[2,95]),t(W,[2,96]),t(W,[2,97]),t(W,[2,98]),t(W,[2,99]),t(W,[2,100]),{6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,203],33:24,34:f,36:p,38:ee,42:28,43:39,44:m,45:40,47:41,60:h,84:te,85:g,86:_,87:ne,88:re,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E,121:D,122:O,123:ie,124:ae,125:oe},{10:k,18:204},{44:[1,205]},t(be,[2,43]),{10:[1,206],44:m,60:h,89:v,102:y,105:b,106:x,109:S,111:C,113:113,114:w,115:T,116:E},{10:[1,207]},{10:[1,208],106:[1,209]},t($e,[2,128]),{10:[1,210],44:m,60:h,89:v,102:y,105:b,106:x,109:S,111:C,113:113,114:w,115:T,116:E},{10:[1,211],44:m,60:h,89:v,102:y,105:b,106:x,109:S,111:C,113:113,114:w,115:T,116:E},{80:[1,212]},t(I,[2,109],{10:[1,213]}),t(I,[2,111],{10:[1,214]}),{80:[1,215]},t(L,[2,184]),{80:[1,216],98:[1,217]},t(be,[2,55],{113:113,44:m,60:h,89:v,102:y,105:b,106:x,109:S,111:C,114:w,115:T,116:E}),{31:[1,218],67:R,82:219,116:V,117:H,118:U},t(et,[2,86]),t(et,[2,88]),t(et,[2,89]),t(et,[2,153]),t(et,[2,154]),t(et,[2,155]),t(et,[2,156]),{49:[1,220],67:R,82:219,116:V,117:H,118:U},{30:221,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{51:[1,222],67:R,82:219,116:V,117:H,118:U},{53:[1,223],67:R,82:219,116:V,117:H,118:U},{55:[1,224],67:R,82:219,116:V,117:H,118:U},{57:[1,225],67:R,82:219,116:V,117:H,118:U},{60:[1,226]},{64:[1,227],67:R,82:219,116:V,117:H,118:U},{66:[1,228],67:R,82:219,116:V,117:H,118:U},{30:229,67:R,80:z,81:B,82:172,116:V,117:H,118:U},{31:[1,230],67:R,82:219,116:V,117:H,118:U},{67:R,69:[1,231],71:[1,232],82:219,116:V,117:H,118:U},{67:R,69:[1,234],71:[1,233],82:219,116:V,117:H,118:U},t(se,[2,45],{18:156,10:k,40:Ze}),t(se,[2,47],{44:Xe}),t(Se,[2,75]),t(Se,[2,74]),{62:[1,235],67:R,82:219,116:V,117:H,118:U},t(Se,[2,77]),t(Qe,[2,80]),{77:[1,236],79:198,116:Te,119:Ee},{30:237,67:R,80:z,81:B,82:172,116:V,117:H,118:U},t(Ye,o,{5:238}),t(W,[2,102]),t(A,[2,35]),{43:239,44:m,45:40,47:41,60:h,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},{10:k,18:240},{10:G,60:K,84:q,92:241,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:252,104:[1,253],105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:254,104:[1,255],105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{105:[1,256]},{10:G,60:K,84:q,92:257,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{44:m,47:258,60:h,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},t(I,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},t(I,[2,116]),t(I,[2,118],{10:[1,262]}),t(I,[2,119]),t(P,[2,56]),t(et,[2,87]),t(P,[2,57]),{51:[1,263],67:R,82:219,116:V,117:H,118:U},t(P,[2,64]),t(P,[2,59]),t(P,[2,60]),t(P,[2,61]),{109:[1,264]},t(P,[2,63]),t(P,[2,65]),{66:[1,265],67:R,82:219,116:V,117:H,118:U},t(P,[2,67]),t(P,[2,68]),t(P,[2,70]),t(P,[2,69]),t(P,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(Se,[2,78]),{31:[1,266],67:R,82:219,116:V,117:H,118:U},{6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,267],33:24,34:f,36:p,38:ee,42:28,43:39,44:m,45:40,47:41,60:h,84:te,85:g,86:_,87:ne,88:re,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E,121:D,122:O,123:ie,124:ae,125:oe},t(be,[2,53]),{43:268,44:m,45:40,47:41,60:h,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E},t(I,[2,121],{106:tt}),t(nt,[2,130],{108:270,10:G,60:K,84:q,105:J,109:Y,110:X,111:Z,112:Q}),t($,[2,132]),t($,[2,134]),t($,[2,135]),t($,[2,136]),t($,[2,137]),t($,[2,138]),t($,[2,139]),t($,[2,140]),t($,[2,141]),t(I,[2,122],{106:tt}),{10:[1,271]},t(I,[2,123],{106:tt}),{10:[1,272]},t($e,[2,129]),t(I,[2,105],{106:tt}),t(I,[2,106],{113:113,44:m,60:h,89:v,102:y,105:b,106:x,109:S,111:C,114:w,115:T,116:E}),t(I,[2,110]),t(I,[2,112],{10:[1,273]}),t(I,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:j,9:M,11:N,21:278},t(A,[2,34]),t(be,[2,52]),{10:G,60:K,84:q,105:J,107:279,108:243,109:Y,110:X,111:Z,112:Q},t($,[2,133]),{14:le,44:ue,60:de,89:fe,101:280,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},{14:le,44:ue,60:de,89:fe,101:281,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye,120:88},{98:[1,282]},t(I,[2,120]),t(P,[2,58]),{30:283,67:R,80:z,81:B,82:172,116:V,117:H,118:U},t(P,[2,66]),t(Ye,o,{5:284}),t(nt,[2,131],{108:270,10:G,60:K,84:q,105:J,109:Y,110:X,111:Z,112:Q}),t(I,[2,126],{120:168,10:[1,285],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),t(I,[2,127],{120:168,10:[1,286],14:le,44:ue,60:de,89:fe,105:pe,106:me,109:he,111:ge,114:_e,115:ve,116:ye}),t(I,[2,114]),{31:[1,287],67:R,82:219,116:V,117:H,118:U},{6:11,7:12,8:s,9:c,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,288],33:24,34:f,36:p,38:ee,42:28,43:39,44:m,45:40,47:41,60:h,84:te,85:g,86:_,87:ne,88:re,89:v,102:y,105:b,106:x,109:S,111:C,113:42,114:w,115:T,116:E,121:D,122:O,123:ie,124:ae,125:oe},{10:G,60:K,84:q,92:289,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},{10:G,60:K,84:q,92:290,105:J,107:242,108:243,109:Y,110:X,111:Z,112:Q},t(P,[2,62]),t(A,[2,33]),t(I,[2,124],{106:tt}),t(I,[2,125],{106:tt})],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,ee=o.slice.call(arguments,1),m=Object.create(this.lexer),h={yy:{}};for(var te in this.yy)Object.prototype.hasOwnProperty.call(this.yy,te)&&(h.yy[te]=this.yy[te]);m.setInput(t,h.yy),h.yy.lexer=m,h.yy.parser=this,m.yylloc===void 0&&(m.yylloc={});var g=m.yylloc;o.push(g);var _=m.options&&m.options.ranges;typeof h.yy.parseError==`function`?this.parseError=h.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ne(e){r.length-=2*e,a.length-=e,o.length-=e}e(ne,`popStack`);function re(){var e=i.pop()||m.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(re,`lex`);for(var v,y,b,x,S,C={},w,T,E,D;;){if(b=r[r.length-1],this.defaultActions[b]?x=this.defaultActions[b]:(v??=re(),x=s[b]&&s[b][v]),x===void 0||!x.length||!x[0]){var O=``;for(w in D=[],s[b])this.terminals_[w]&&w>f&&D.push(`'`+this.terminals_[w]+`'`);O=m.showPosition?`Parse error on line `+(l+1)+`: -`+m.showPosition()+` -Expecting `+D.join(`, `)+`, got '`+(this.terminals_[v]||v)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(v==p?`end of input`:`'`+(this.terminals_[v]||v)+`'`),this.parseError(O,{text:m.match,token:this.terminals_[v]||v,line:m.yylineno,loc:g,expected:D})}if(x[0]instanceof Array&&x.length>1)throw Error(`Parse Error: multiple actions possible at state: `+b+`, token: `+v);switch(x[0]){case 1:r.push(v),a.push(m.yytext),o.push(m.yylloc),r.push(x[1]),v=null,y?(v=y,y=null):(u=m.yyleng,c=m.yytext,l=m.yylineno,g=m.yylloc,d>0&&d--);break;case 2:if(T=this.productions_[x[1]][1],C.$=a[a.length-T],C._$={first_line:o[o.length-(T||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(T||1)].first_column,last_column:o[o.length-1].last_column},_&&(C._$.range=[o[o.length-(T||1)].range[0],o[o.length-1].range[1]]),S=this.performAction.apply(C,[c,u,l,h.yy,x[1],a,o].concat(ee)),S!==void 0)return S;T&&(r=r.slice(0,-1*T*2),a=a.slice(0,-1*T),o=o.slice(0,-1*T)),r.push(this.productions_[x[1]][0]),a.push(C.$),o.push(C._$),E=s[r[r.length-2]][r[r.length-1]],r.push(E);break;case 3:return!0}}return!0},`parse`)};rt.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:e(function(e,t,n,r){switch(n){case 0:return this.begin(`acc_title`),34;case 1:return this.popState(),`acc_title_value`;case 2:return this.begin(`acc_descr`),36;case 3:return this.popState(),`acc_descr_value`;case 4:this.begin(`acc_descr_multiline`);break;case 5:this.popState();break;case 6:return`acc_descr_multiline_value`;case 7:return this.pushState(`shapeData`),t.yytext=``,40;case 8:return this.pushState(`shapeDataStr`),40;case 9:return this.popState(),40;case 10:return t.yytext=t.yytext.replace(/\n\s*/g,`
`),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin(`callbackname`);break;case 14:this.popState();break;case 15:this.popState(),this.begin(`callbackargs`);break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return`MD_STR`;case 20:this.popState();break;case 21:this.begin(`md_string`);break;case 22:return`STR`;case 23:this.popState();break;case 24:this.pushState(`string`);break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin(`click`);break;case 33:this.popState();break;case 34:return 88;case 35:return e.lex.firstGraph()&&this.begin(`dir`),12;case 36:return e.lex.firstGraph()&&this.begin(`dir`),12;case 37:return e.lex.firstGraph()&&this.begin(`dir`),12;case 38:return e.lex.firstGraph()&&this.begin(`dir`),12;case 39:return 27;case 40:return 32;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return 98;case 45:return this.popState(),13;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return this.popState(),14;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:return 111;case 64:return 46;case 65:return 60;case 66:return 44;case 67:return 8;case 68:return 106;case 69:return 115;case 70:return this.popState(),77;case 71:return this.pushState(`edgeText`),75;case 72:return 119;case 73:return this.popState(),77;case 74:return this.pushState(`thickEdgeText`),75;case 75:return 119;case 76:return this.popState(),77;case 77:return this.pushState(`dottedEdgeText`),75;case 78:return 119;case 79:return 77;case 80:return this.popState(),53;case 81:return`TEXT`;case 82:return this.pushState(`ellipseText`),52;case 83:return this.popState(),55;case 84:return this.pushState(`text`),54;case 85:return this.popState(),57;case 86:return this.pushState(`text`),56;case 87:return 58;case 88:return this.pushState(`text`),67;case 89:return this.popState(),64;case 90:return this.pushState(`text`),63;case 91:return this.popState(),49;case 92:return this.pushState(`text`),48;case 93:return this.popState(),69;case 94:return this.popState(),71;case 95:return 117;case 96:return this.pushState(`trapText`),68;case 97:return this.pushState(`trapText`),70;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return`SEP`;case 102:return 89;case 103:return 115;case 104:return 111;case 105:return 44;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;case 110:return this.pushState(`text`),62;case 111:return this.popState(),51;case 112:return this.pushState(`text`),50;case 113:return this.popState(),31;case 114:return this.pushState(`text`),29;case 115:return this.popState(),66;case 116:return this.pushState(`text`),65;case 117:return`TEXT`;case 118:return`QUOTE`;case 119:return 9;case 120:return 10;case 121:return 11}},`anonymous`),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:swimlane-beta\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}}})();function it(){this.yy={}}return e(it,`Parser`),it.prototype=rt,rt.Parser=it,new it})();O.parser=O;var ie=O,ae=Object.assign({},ie);ae.parse=e=>{let t=e.replace(/}\s*\n/g,`} -`);return ie.parse(t)};var oe=ae,k=e((e,t)=>{let n=te;return u(n(e,`r`),n(e,`g`),n(e,`b`),t)},`fade`),A=e(e=>`.label { - font-family: ${e.fontFamily}; - color: ${e.nodeTextColor||e.textColor}; - } - .cluster-label text { - fill: ${e.titleColor}; - } - .cluster-label span { - color: ${e.titleColor}; - } - .cluster-label span p { - background-color: transparent; - } - - .label text,span { - fill: ${e.nodeTextColor||e.textColor}; - color: ${e.nodeTextColor||e.textColor}; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${e.mainBkg}; - stroke: ${e.nodeBorder}; - stroke-width: ${e.strokeWidth??1}px; - } - .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { - text-anchor: middle; - } - - .node .katex path { - fill: #000; - stroke: #000; - stroke-width: 1px; - } - - .rough-node .label,.node .label, .image-shape .label, .icon-shape .label { - text-align: center; - } - .node.clickable { - cursor: pointer; - } - - - .root .anchor path { - fill: ${e.lineColor} !important; - stroke-width: 0; - stroke: ${e.lineColor}; - } - - .arrowheadPath { - fill: ${e.arrowheadColor}; - } - - .edgePath .path { - stroke: ${e.lineColor}; - stroke-width: ${e.strokeWidth??2}px; - } - - .flowchart-link { - stroke: ${e.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${e.edgeLabelBackground}; - p { - background-color: ${e.edgeLabelBackground}; - } - rect { - opacity: 0.5; - background-color: ${e.edgeLabelBackground}; - fill: ${e.edgeLabelBackground}; - } - text-align: center; - } - - /* For html labels only */ - .labelBkg { - background-color: ${k(e.edgeLabelBackground,.5)}; - // background-color: - } - - .cluster rect { - fill: ${e.clusterBkg}; - stroke: ${e.clusterBorder}; - stroke-width: 1px; - } - - .cluster text { - fill: ${e.titleColor}; - } - - .cluster span { - color: ${e.titleColor}; - } - /* .cluster div { - color: ${e.titleColor}; - } */ - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: ${e.fontFamily}; - font-size: 12px; - background: ${e.tertiaryColor}; - border: 1px solid ${e.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .flowchartTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.textColor}; - } - - rect.text { - fill: none; - stroke-width: 0; - } - - .icon-shape, .image-shape { - background-color: ${e.edgeLabelBackground}; - p { - background-color: ${e.edgeLabelBackground}; - padding: 2px; - } - .label rect { - opacity: 0.5; - background-color: ${e.edgeLabelBackground}; - fill: ${e.edgeLabelBackground}; - } - text-align: center; - } - ${ne()} -`,`getStyles`),j=e(({defaultLayout:t,styles:n=A}={})=>({parser:oe,get db(){return new E},renderer:D,styles:n,init:e(e=>{e.flowchart||={};let n=d().layout??t??e.layout;n&&i({layout:n}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,i({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},`init`)}),`createFlowDiagram`),M=j();export{M as n,A as r,j as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-Q4XR5HBZ-CQ8zkLYc.js b/dist-desktop/assets/chunk-Q4XR5HBZ-CQ8zkLYc.js deleted file mode 100644 index 3bde446..0000000 --- a/dist-desktop/assets/chunk-Q4XR5HBZ-CQ8zkLYc.js +++ /dev/null @@ -1,70 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-UMNXGZaF.js";import{A as r,F as i,b as a,s as o,z as s}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{a as c}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{n as l,t as u}from"./chunk-HOUHSVGY-iJuv90UH.js";function d(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var f=d();function p(e){f=e}var m={exec:()=>null};function h(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(_.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var g=(()=>{try{return!0}catch{return!1}})(),_={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^
/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},ee=/^(?:[ \t]*(?:\n|$))+/,te=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ne=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,v=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,re=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,y=/(?:[*+-]|\d{1,9}[.)])/,ie=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ae=h(ie).replace(/bull/g,y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),oe=h(ie).replace(/bull/g,y).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),b=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,se=/^[^\n]+/,x=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ce=h(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,x).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),le=h(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,y).getRegex(),S=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,C=/|$))/,ue=h(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,C).replace(`tag`,S).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),de=h(b).replace(`hr`,v).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,S).getRegex(),w={blockquote:h(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,de).getRegex(),code:te,def:ce,fences:ne,heading:re,hr:v,html:ue,lheading:ae,list:le,newline:ee,paragraph:de,table:m,text:se},fe=h(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,v).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,S).getRegex(),pe={...w,lheading:oe,table:fe,paragraph:h(b).replace(`hr`,v).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,fe).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,S).getRegex()},me={...w,html:h(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,C).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:m,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:h(b).replace(`hr`,v).replace(`heading`,` *#{1,6} *[^ -]`).replace(`lheading`,ae).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},he=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ge=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,_e=/^( {2,}|\\)\n(?!\s*$)/,ve=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,g?"(?`+)[^`]+\k(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),D=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Te=h(D,`u`).replace(/punct/g,T).getRegex(),Ee=h(D,`u`).replace(/punct/g,xe).getRegex(),O=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,De=h(O,`gu`).replace(/notPunctSpace/g,ye).replace(/punctSpace/g,E).replace(/punct/g,T).getRegex(),Oe=h(O,`gu`).replace(/notPunctSpace/g,Ce).replace(/punctSpace/g,Se).replace(/punct/g,xe).getRegex(),ke=h(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,ye).replace(/punctSpace/g,E).replace(/punct/g,T).getRegex(),Ae=h(/\\(punct)/,`gu`).replace(/punct/g,T).getRegex(),je=h(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Me=h(C).replace(`(?:-->|$)`,`-->`).getRegex(),Ne=h(`^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^`).replace(`comment`,Me).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),k=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Pe=h(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,k).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),A=h(/^!?\[(label)\]\[(ref)\]/).replace(`label`,k).replace(`ref`,x).getRegex(),j=h(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,x).getRegex(),Fe=h(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,A).replace(`nolink`,j).getRegex(),Ie=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,M={_backpedal:m,anyPunctuation:Ae,autolink:je,blockSkip:we,br:_e,code:ge,del:m,emStrongLDelim:Te,emStrongRDelimAst:De,emStrongRDelimUnd:ke,escape:he,link:Pe,nolink:j,punctuation:be,reflink:A,reflinkSearch:Fe,tag:Ne,text:ve,url:m},Le={...M,link:h(/^!?\[(label)\]\((.*?)\)/).replace(`label`,k).getRegex(),reflink:h(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,k).getRegex()},N={...M,emStrongRDelimAst:Oe,emStrongLDelim:Ee,url:h(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Ie).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:h(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":`>`,'"':`"`,"'":`'`},Be=e=>ze[e];function I(e,t){if(t){if(_.escapeTest.test(e))return e.replace(_.escapeReplace,Be)}else if(_.escapeTestNoEncode.test(e))return e.replace(_.escapeReplaceNoEncode,Be);return e}function Ve(e){try{e=encodeURI(e).replace(_.percentDecode,`%`)}catch{return null}return e}function He(e,t){let n=e.replace(_.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(_.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length0?-2:-1}function We(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function Ge(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(` -`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(` -`)}var R=class{options;rules;lexer;constructor(e){this.options=e||f}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:L(e,` -`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Ge(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=L(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:L(t[0],` -`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=L(t[0],` -`).split(` -`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(` -`,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),l=e.split(` -`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+` -`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){let f=e.split(` -`,1)[0],p;if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),p=l):p=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||t.test(l)||n.test(l))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=` -`+p.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=` -`+l}!u&&!l.trim()&&(u=!0),r+=f+` -`,e=e.substring(f.length+1),c=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f=null,p;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p=f[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;ee.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===` -`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=L(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Ue(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),We(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return We(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},z=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||f,this.options.tokenizer=this.options.tokenizer||new R,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:_,block:P.normal,inline:F.normal};this.options.pedantic?(t.block=P.pedantic,t.inline=F.pedantic):this.options.gfm&&(t.block=P.gfm,this.options.breaks?t.inline=F.breaks:t.inline=F.gfm),this.tokenizer.rules=t}static get rules(){return{block:P,inline:F}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(_.carriageReturn,` -`),this.blockTokens(e,this.tokens);for(let e=0;e(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=` -`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(` -`)?``:` -`)+r.raw,n.text+=` -`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(` -`)?``:` -`)+r.raw,n.text+=` -`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(` -`)?``:` -`)+r.raw,a.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(` -`)?``:` -`)+r.raw,n.text+=` -`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},B=class{options;parser;constructor(e){this.options=e||f}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(_.notSpaceStart)?.[0],i=e.replace(_.endingNewline,``)+` -`;return r?`

`+(n?i:I(i,!0))+`
-`:`
`+(n?i:I(i,!0))+`
-`}blockquote({tokens:e}){return`
-${this.parser.parse(e)}
-`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} -`}hr(e){return`
-`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t -`+r+` -`}listitem(e){let t=``;if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type===`paragraph`?(e.tokens[0].text=n+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=n+` `+I(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`
  • ${t}
  • -`}checkbox({checked:e}){return``}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    -`}table(e){let t=``,n=``;for(let t=0;t${r}`,` - -`+t+` -`+r+`
    -`}tablerow({text:e}){return` -${e} -`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+` -`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${I(e,!0)}`}br(e){return`
    `}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Ve(e);if(i===null)return r;e=i;let a=`
    `+r+``,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Ve(e);if(i===null)return I(n);e=i;let a=`${n}`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:I(e.text)}},V=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}},H=class e{options;renderer;textRenderer;constructor(e){this.options=e||f,this.options.renderer=this.options.renderer||new B,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new V}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``;for(let r=0;r{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new B(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new R(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new U;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];U.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&U.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return z.lex(e,t??this.defaults)}parser(e,t){return H.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?z.lex:z.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?H.parse:H.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?z.lex:z.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?H.parse:H.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=` -Please report this to https://github.com/markedjs/marked.`,e){let e=`

    An error occurred:

    `+I(n.message+``,!0)+`
    `;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function G(e,t){return W.parse(e,t)}G.options=G.setOptions=function(e){return W.setOptions(e),G.defaults=W.defaults,p(G.defaults),G},G.getDefaults=d,G.defaults=f,G.use=function(...e){return W.use(...e),G.defaults=W.defaults,p(G.defaults),G},G.walkTokens=function(e,t){return W.walkTokens(e,t)},G.parseInline=W.parseInline,G.Parser=H,G.parser=H.parse,G.Renderer=B,G.TextRenderer=V,G.Lexer=z,G.lexer=z.lex,G.Tokenizer=R,G.Hooks=U,G.parse=G,G.options,G.setOptions,G.use,G.walkTokens,G.parseInline,H.parse,z.lex;function Ke(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(` -[ ]{${Math.min.apply(Math,r)}}`,`g`);n=n.map(function(e){return e.replace(i,` -`)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(` -`)&&(o=String(e).split(` -`).map(function(e,t){return t===0?e:`${i}${e}`}).join(` -`)),a+=o+n[t+1]}),a}function qe(e,{markdownAutoWrap:t}){return Ke(e.replace(//g,` -`).replace(/\n{2,}/g,` -`))}e(qe,`preprocessMarkdown`);function Je(e){return e.split(/\\n|\n|/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(e=>({content:e,type:`normal`}))??[])}e(Je,`nonMarkdownToLines`);function Ye(t,n={}){let r=qe(t,n),i=G.lexer(r),a=[[]],o=0;function s(e,t=`normal`){e.type===`text`?e.text.split(` -`).forEach((e,n)=>{n!==0&&(o++,a.push([])),e.split(` `).forEach(e=>{e=e.replace(/'/g,`'`),e&&a[o].push({content:e,type:t})})}):e.type===`strong`||e.type===`em`?e.tokens.forEach(t=>{s(t,e.type)}):e.type===`html`&&a[o].push({content:e.text,type:`normal`})}return e(s,`processNode`),i.forEach(e=>{e.type===`paragraph`?e.tokens?.forEach(e=>{s(e)}):e.type===`html`?a[o].push({content:e.text,type:`normal`}):a[o].push({content:e.raw,type:`normal`})}),a}e(Ye,`markdownToLines`);function Xe(e){return e?`

    ${e.replace(/\\n|\n/g,`
    `)}

    `:``}e(Xe,`nonMarkdownToHTML`);function Ze(n,{markdownAutoWrap:r}={}){let i=G.lexer(n);function a(e){return e.type===`text`?r===!1?e.text.replace(/\n */g,`
    `).replace(/ /g,` `):e.text.replace(/\n */g,`
    `):e.type===`strong`?`${e.tokens?.map(a).join(``)}`:e.type===`em`?`${e.tokens?.map(a).join(``)}`:e.type===`paragraph`?`

    ${e.tokens?.map(a).join(``)}

    `:e.type===`space`?``:e.type===`html`?`${e.text}`:e.type===`escape`?e.text:(t.warn(`Unsupported markdown: ${e.type}`),e.raw)}return e(a,`output`),i.map(a).join(``)}e(Ze,`markdownToHTML`);function Qe(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(e=>e.segment):[...e]}e(Qe,`splitTextToChars`);function $e(e,t){return K(e,[],Qe(t.content),t.type)}e($e,`splitWordToFitWidth`);function K(e,t,n,r){if(n.length===0)return[{content:t.join(``),type:r},{content:``,type:r}];let[i,...a]=n,o=[...t,i];return e([{content:o.join(``),type:r}])?K(e,o,a,r):(t.length===0&&i&&(t.push(i),n.shift()),[{content:t.join(``),type:r},{content:n.join(``),type:r}])}e(K,`splitWordToFitWidthRecursion`);function et(e,t){if(e.some(({content:e})=>e.includes(` -`)))throw Error(`splitLineToFitWidth does not support newlines in the line`);return q(e,t)}e(et,`splitLineToFitWidth`);function q(e,t,n=[],r=[]){if(e.length===0)return r.length>0&&n.push(r),n.length>0?n:[];let i=``;e[0].content===` `&&(i=` `,e.shift());let a=e.shift()??{content:` `,type:`normal`},o=[...r];if(i!==``&&o.push({content:i,type:`normal`}),o.push(a),t(o))return q(e,t,n,o);if(r.length>0)n.push(r),e.unshift(a);else if(a.content){let[r,i]=$e(t,a);n.push([r]),i.content&&e.unshift(i)}return q(e,t,n)}e(q,`splitLineToFitWidthRecursion`);function J(e,t){t&&e.attr(`style`,t)}e(J,`applyStyle`);var tt=16384;async function Y(e,t,n,c,l=!1,u=a()){let d=e.append(`foreignObject`);d.attr(`width`,`${Math.min(10*n,tt)}px`),d.attr(`height`,`${Math.min(10*n,tt)}px`);let f=d.append(`xhtml:div`),p=r(t.label)?await i(t.label.replace(o.lineBreakRegex,` -`),u):s(t.label,u),m=t.isNode?`nodeLabel`:`edgeLabel`,h=f.append(`span`);h.html(p),J(h,t.labelStyle),h.attr(`class`,`${m} ${c}`),J(f,t.labelStyle),f.style(`display`,`table-cell`),f.style(`white-space`,`nowrap`),f.style(`line-height`,`1.5`),n!==1/0&&(f.style(`max-width`,n+`px`),f.style(`text-align`,`center`)),f.attr(`xmlns`,`http://www.w3.org/1999/xhtml`),l&&f.attr(`class`,`labelBkg`);let g=f.node().getBoundingClientRect();return g.width===n&&(f.style(`display`,`table`),f.style(`white-space`,`break-spaces`),f.style(`width`,n+`px`),g=f.node().getBoundingClientRect()),d.node()}e(Y,`addHtmlSpan`);function X(e,t,n,r=!1){let i=e.append(`tspan`).attr(`class`,`text-outer-tspan`).attr(`x`,0).attr(`y`,t*n-.1+`em`).attr(`dy`,n+`em`);return r&&i.attr(`text-anchor`,`middle`),i}e(X,`createTspan`);function nt(e,t,n){let r=e.append(`text`),i=X(r,1,t);Q(i,n);let a=i.node().getComputedTextLength();return r.remove(),a}e(nt,`computeWidthOfText`);function rt(e,t,n){let r=e.append(`text`),i=X(r,1,t);Q(i,[{content:n,type:`normal`}]);let a=i.node()?.getBoundingClientRect();return a&&r.remove(),a}e(rt,`computeDimensionOfText`);function it(t,n,r,i=!1,a=!1){let o=1.1,s=n.append(`g`),c=s.insert(`rect`).attr(`class`,`background`).attr(`style`,`stroke: none`),l=s.append(`text`).attr(`y`,`-10.1`);a&&l.attr(`text-anchor`,`middle`);let u=0;for(let n of r){let r=e(e=>nt(s,o,e)<=t,`checkWidth`),i=r(n)?[n]:et(n,r);for(let e of i)Q(X(l,u,o,a),e),u++}if(i){let e=l.node().getBBox();return c.attr(`x`,e.x-2).attr(`y`,e.y-2).attr(`width`,e.width+4).attr(`height`,e.height+4),s.node()}else return l.node()}e(it,`createFormattedText`);function Z(e){return e.replace(/&(amp|lt|gt);/g,(e,t)=>{switch(t){case`amp`:return`&`;case`lt`:return`<`;case`gt`:return`>`;default:return e}})}e(Z,`decodeHTMLEntities`);function Q(e,t){e.text(``),t.forEach((t,n)=>{let r=e.append(`tspan`).attr(`font-style`,t.type===`em`?`italic`:`normal`).attr(`class`,`text-inner-tspan`).attr(`font-weight`,t.type===`strong`?`bold`:`normal`);n===0?r.text(Z(t.content)):r.text(` `+Z(t.content))})}e(Q,`updateTextContentAndStyles`);async function $(e,t={}){let n=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,r,i)=>(n.push((async()=>{let n=`${r}:${i}`;return await l(n)?await u(n,void 0,{class:`label-icon`}):``})()),e));let r=await Promise.all(n);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??``)}e($,`replaceIconSubstring`);var at=e(async(e,i=``,{style:a=``,isTitle:o=!1,classes:s=``,useHtmlLabels:l=!0,markdown:u=!0,isNode:d=!0,width:f=200,addSvgBackground:p=!1}={},m)=>{if(t.debug(`XYZ createText`,i,a,o,s,l,d,`addSvgBackground: `,p),l){let t=await $(c(u?Ze(i,m):Xe(i)),m),n=i.replace(/\\\\/g,`\\`);return await Y(e,{isNode:d,label:r(i)?n:t,labelStyle:a.replace(`fill:`,`color:`)},f,s,p,m)}else{let t=c(i.replace(//g,`
    `)),r=it(f,e,u?Ye(t.replace(`
    `,`
    `),m):Je(t),i?p:!1,!d);if(d){/stroke:/.exec(a)&&(a=a.replace(`stroke:`,`lineColor:`));let e=a.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);n(r).attr(`style`,e)}else{let e=a.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/background:/g,`fill:`);n(r).select(`rect`).attr(`style`,e.replace(/background:/g,`fill:`));let t=a.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);n(r).select(`text`).attr(`style`,t)}return o?n(r).selectAll(`tspan.text-outer-tspan`).classed(`title-row`,!0):n(r).selectAll(`tspan.text-outer-tspan`).classed(`row`,!0),r}},`createText`);export{at as n,Ke as r,rt as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-QBLGF6JB-C9zGMqvP.js b/dist-desktop/assets/chunk-QBLGF6JB-C9zGMqvP.js deleted file mode 100644 index 516b2f7..0000000 --- a/dist-desktop/assets/chunk-QBLGF6JB-C9zGMqvP.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,S as t,i as n,o as r,p as i,t as a,u as o,w as s,x as c}from"./chunk-KEIR6QF5-Dj-OpFgW.js";var l=class extends a{static{c(this,`RadarTokenBuilder`)}constructor(){super([`radar-beta`])}},u={parser:{TokenBuilder:c(()=>new l,`TokenBuilder`),ValueConverter:c(()=>new n,`ValueConverter`)}};function d(n=r){let a=s(e(n),o),c=s(t({shared:a}),i,u);return a.ServiceRegistry.register(c),{shared:a,Radar:c}}c(d,`createRadarServices`);export{d as n,u as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-R7FJI6CG-BpBhcF6R.js b/dist-desktop/assets/chunk-R7FJI6CG-BpBhcF6R.js deleted file mode 100644 index f75900c..0000000 --- a/dist-desktop/assets/chunk-R7FJI6CG-BpBhcF6R.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,S as t,n,o as r,t as i,u as a,w as o,x as s,y as c}from"./chunk-KEIR6QF5-Dj-OpFgW.js";var l=class extends i{static{s(this,`TreemapTokenBuilder`)}constructor(){super([`treemap`])}},u=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,d=class extends n{static{s(this,`TreemapValueConverter`)}runCustomConverter(e,t,n){if(e.name===`NUMBER2`)return parseFloat(t.replace(/,/g,``));if(e.name===`SEPARATOR`||e.name===`STRING2`)return t.substring(1,t.length-1);if(e.name===`INDENTATION`)return t.length;if(e.name===`ClassDef`){if(typeof t!=`string`)return t;let e=u.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}};function f(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}s(f,`registerValidationChecks`);var p=class{static{s(this,`TreemapValidator`)}checkSingleRoot(e,t){let n;for(let r of e.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:(r.indent===void 0||n!==void 0&&n>=parseInt(r.indent,10))&&t(`error`,`Multiple root nodes are not allowed in a treemap.`,{node:r,property:`item`}))}},m={parser:{TokenBuilder:s(()=>new l,`TokenBuilder`),ValueConverter:s(()=>new d,`ValueConverter`)},validation:{TreemapValidator:s(()=>new p,`TreemapValidator`)}};function h(n=r){let i=o(e(n),a),s=o(t({shared:i}),c,m);return i.ServiceRegistry.register(s),f(s),{shared:i,Treemap:s}}s(h,`createTreemapServices`);export{h as n,m as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-RYQCIY6F-Dtr3kkSR.js b/dist-desktop/assets/chunk-RYQCIY6F-Dtr3kkSR.js deleted file mode 100644 index 3dfcde6..0000000 --- a/dist-desktop/assets/chunk-RYQCIY6F-Dtr3kkSR.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-UMNXGZaF.js";import{r as n,t as r}from"./graphlib-DS17s2tU.js";import{r as i,t as a}from"./map-BaFkSB1l.js";var o=4;function s(e){return i(e,o)}function c(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:l(e),edges:u(e)};return n(e.graph())||(t.value=s(e.graph())),t}function l(e){return a(e.nodes(),function(t){var r=e.node(t),i=e.parent(t),a={v:t};return n(r)||(a.value=r),n(i)||(a.parent=i),a})}function u(e){return a(e.edges(),function(t){var r=e.edge(t),i={v:t.v,w:t.w};return n(t.name)||(i.name=t.name),n(r)||(i.value=r),i})}var d=new Map,f=new Map,p=new Map,m=e(()=>{f.clear(),p.clear(),d.clear()},`clear`),h=e((e,n)=>{let r=f.get(n)||[];return t.trace(`In isDescendant`,n,` `,e,` = `,r.includes(e)),r.includes(e)},`isDescendant`),g=e((e,n)=>{let r=f.get(n)||[];return t.info(`Descendants of `,n,` is `,r),t.info(`Edge is `,e),e.v===n||e.w===n?!1:r?r.includes(e.v)||h(e.v,n)||h(e.w,n)||r.includes(e.w):(t.debug(`Tilt, `,n,`,not in descendants`),!1)},`edgeInCluster`),_=e((e,n,r,i)=>{t.warn(`Copying children of `,e,`root`,i,`data`,n.node(e),i);let a=n.children(e)||[];e!==i&&a.push(e),t.warn(`Copying (nodes) clusterId`,e,`nodes`,a),a.forEach(a=>{if(n.children(a).length>0)_(a,n,r,i);else{let o=n.node(a);t.info(`cp `,a,` to `,i,` with parent `,e),r.setNode(a,o),i!==n.parent(a)&&(t.warn(`Setting parent`,a,n.parent(a)),r.setParent(a,n.parent(a))),e!==i&&a!==e?(t.debug(`Setting parent`,a,e),r.setParent(a,e)):(t.info(`In copy `,e,`root`,i,`data`,n.node(e),i),t.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,e!==i,`node!==clusterId`,a!==e));let s=n.edges(a);t.debug(`Copying Edges`,s),s.forEach(a=>{t.info(`Edge`,a);let o=n.edge(a.v,a.w,a.name);t.info(`Edge data`,o,i);try{if(g(a,i)){let e=f.get(i)||[],s=e.includes(a.v)||h(a.v,i)||a.v===i,c=e.includes(a.w)||h(a.w,i)||a.w===i;if(s&&c)t.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),t.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]));else{let e=s?i:a.v,r=c?i:a.w;t.info(`Rebinding cross-boundary edge as `,e,r,o,a.name),n.setEdge(e,r,o,a.name)}}else t.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,e)}catch(e){t.error(e)}})}t.debug(`Removing node`,a),n.removeNode(a)})},`copy`),v=e((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)p.set(i,e),r=[...r,...v(i,t)];return r},`extractDescendants`),y=e((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),b=e((e,n,r)=>{let i=n.children(e);if(t.trace(`Searching children of id `,e,i),i.length<1)return e;let a;for(let e of i){let t=b(e,n,r),i=y(n,r,t);if(t)if(i.length>0)a=t;else return t}return a},`findNonClusterChild`),x=e(e=>!d.has(e)||!d.get(e).externalConnections?e:d.has(e)?d.get(e).id:e,`getAnchorId`),S=e((e,n)=>{if(!e||n>10){t.debug(`Opting out, no graph `);return}else t.debug(`Opting in, graph `);e.nodes().forEach(function(n){e.children(n).length>0&&(t.warn(`Cluster identified`,n,` Replacement id in edges: `,b(n,e,n)),f.set(n,v(n,e)),d.set(n,{id:b(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){let r=e.children(n),i=e.edges();r.length>0?(t.debug(`Cluster identified`,n,f),i.forEach(e=>{h(e.v,n)^h(e.w,n)&&(t.warn(`Edge: `,e,` leaves cluster `,n),t.warn(`Descendants of XXX `,n,`: `,f.get(n)),d.get(n).externalConnections=!0)})):t.debug(`Not a cluster `,n,f)});for(let t of d.keys()){let n=d.get(t).id,r=e.parent(n);r!==t&&d.has(r)&&!d.get(r).externalConnections&&(d.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&d.get(t)?.externalConnections&&i&&E(e,n,t)){let r=D(e,t,e.parent(n));r&&(d.get(t).id=r)}}e.edges().forEach(function(n){let r=e.edge(n);t.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(n)),t.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(e.edge(n)));let i=n.v,a=n.w;if(t.warn(`Fix XXX`,d,`ids:`,n.v,n.w,`Translating: `,d.get(n.v),` --- `,d.get(n.w)),d.get(n.v)||d.get(n.w)){if(t.warn(`Fixing and trying - removing XXX`,n.v,n.w,n.name),i=x(n.v),a=x(n.w),e.removeEdge(n.v,n.w,n.name),i!==n.v){let t=e.parent(i);d.get(t).externalConnections=!0,r.fromCluster=n.v}if(a!==n.w){let t=e.parent(a);d.get(t).externalConnections=!0,r.toCluster=n.w}t.warn(`Fix Replacing with XXX`,i,a,n.name),e.setEdge(i,a,r,n.name)}}),t.warn(`Adjusted Graph`,c(e)),C(e,0),t.trace(d)},`adjustClustersAndEdges`),C=e((e,n)=>{if(t.warn(`extractor - `,n,c(e),e.children(`D`)),n>10){t.error(`Bailing out`);return}let i=e.nodes(),a=!1;for(let t of i){let n=e.children(t);a||=n.length>0}if(!a){t.debug(`Done, no node has children`,e.nodes());return}t.debug(`Nodes = `,i,n);for(let a of i)if(t.debug(`Extracting node`,a,d,d.has(a)&&!d.get(a).externalConnections,!e.parent(a),e.node(a),e.children(`D`),` Depth `,n),!d.has(a))t.debug(`Not a cluster`,a,n);else if(d.get(a)?.clusterData?.explicitDir&&e.children(a)&&e.children(a).length>0){t.warn(`Cluster with explicit dir, creating subgraph for children`,a,n);let i=d.get(a).clusterData.dir,o=new r({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});_(a,e,o,a);let s=e.node(a)||{};e.setNode(a,{...s,clusterNode:!0,id:a,clusterData:d.get(a).clusterData,label:d.get(a).label,graph:o}),t.warn(`Subgraph for cluster with explicit dir created:`,a,c(o))}else if(!d.get(a).externalConnections&&e.children(a)&&e.children(a).length>0){t.warn(`Cluster without external connections, without a parent and with children`,a,n);let i=e.graph().rankdir===`TB`?`LR`:`TB`;d.get(a)?.clusterData?.dir&&(i=d.get(a).clusterData.dir,t.warn(`Fixing dir`,d.get(a).clusterData.dir,i));let o=new r({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});_(a,e,o,a);let s=e.node(a)||{};e.setNode(a,{...s,clusterNode:!0,id:a,clusterData:d.get(a).clusterData,label:d.get(a).label,graph:o}),t.debug(`Old graph after copy`,c(e))}else t.warn(`Cluster ** `,a,` **not meeting the criteria !externalConnections:`,!d.get(a).externalConnections,` no parent: `,!e.parent(a),` children `,e.children(a)&&e.children(a).length>0,e.children(`D`),n),t.debug(d);i=e.nodes(),t.warn(`New list of nodes`,i);for(let r of i){let i=e.node(r);t.warn(` Now next level`,r,i),i?.clusterNode&&C(i.graph,n+1)}},`extractor`),w=e((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=w(e,e.children(t));n=[...n,...r]}),n},`sorter`),T=e(e=>w(e,e.children()),`sortNodesByHierarchy`),E=e((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=d.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),D=e((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||h(i,n))continue;let r=b(i,e,t);if(r&&!E(e,r,t))return r}return null},`findSafeAnchorNode`);export{T as a,b as i,m as n,c as o,d as r,S as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-U6XO7XAA-CR0BSRFR.js b/dist-desktop/assets/chunk-U6XO7XAA-CR0BSRFR.js deleted file mode 100644 index 9298b06..0000000 --- a/dist-desktop/assets/chunk-U6XO7XAA-CR0BSRFR.js +++ /dev/null @@ -1,2 +0,0 @@ -import{C as e,S as t,h as n,n as r,o as i,t as a,u as o,w as s,x as c}from"./chunk-KEIR6QF5-Dj-OpFgW.js";var l=class extends a{static{c(this,`RailroadEbnfTokenBuilder`)}constructor(){super([`railroad-ebnf-beta`])}},u=c(e=>{let t=e.slice(1,-1),n=``;for(let e=0;enew l,`TokenBuilder`),ValueConverter:c(()=>new d,`ValueConverter`)}};function p(r=i){let a=s(e(r),o),c=s(t({shared:a}),n,f);return a.ServiceRegistry.register(c),{shared:a,RailroadEbnf:c}}c(p,`createRailroadEbnfServices`);export{p as n,f as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-V7JOEXUC-Drt5hFEy.js b/dist-desktop/assets/chunk-V7JOEXUC-Drt5hFEy.js deleted file mode 100644 index 6f6feb6..0000000 --- a/dist-desktop/assets/chunk-V7JOEXUC-Drt5hFEy.js +++ /dev/null @@ -1,206 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-UMNXGZaF.js";import{$ as r,H as i,K as a,M as o,U as s,a as c,s as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{c as h,g}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as _}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{t as v}from"./chunk-32BRIVSS-DWU3ezKg.js";import{t as y}from"./chunk-XXDRQBXY-Bq6zMMOx.js";import{t as b}from"./chunk-VR4S4FIN-BTo4eV3J.js";import{r as x,t as S}from"./chunk-FWX5IMBZ-ComLEIwh.js";var C=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,18],r=[1,19],i=[1,20],a=[1,41],o=[1,26],s=[1,42],c=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],p=[1,45],m=[1,35],h=[1,36],g=[1,37],_=[1,38],v=[1,27],y=[1,28],b=[1,29],x=[1,30],S=[1,31],C=[1,44],w=[1,46],T=[1,43],E=[1,47],D=[1,9],O=[1,8,9],k=[1,58],A=[1,59],j=[1,60],M=[1,61],N=[1,62],P=[1,63],ee=[1,64],F=[1,8,9,41],te=[1,77],I=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],L=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],R=[13,60,86,100,102,103],z=[13,60,73,74,86,100,102,103],ne=[13,60,68,69,70,71,72,86,100,102,103],B=[1,103],V=[1,121],H=[1,117],U=[1,113],W=[1,119],G=[1,114],K=[1,115],q=[1,116],J=[1,118],Y=[1,120],re=[22,50,60,61,82,86,87,88,89,90],ie=[1,128],X=[12,39],ae=[1,8,9,39,41,44,46],Z=[1,8,9,22],oe=[1,153],se=[1,8,9,61],Q=[1,8,9,22,50,60,61,82,86,87,88,89,90],ce={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,classLiteralName:17,DOT:18,className:19,GENERICTYPE:20,relationStatement:21,LABEL:22,namespaceStatement:23,classStatement:24,memberStatement:25,annotationStatement:26,clickStatement:27,styleStatement:28,cssClassStatement:29,noteStatement:30,classDefStatement:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,namespaceIdentifier:38,STRUCT_START:39,classStatements:40,STRUCT_STOP:41,NAMESPACE:42,classIdentifier:43,STYLE_SEPARATOR:44,members:45,ANNOTATION_START:46,ANNOTATION_END:47,CLASS:48,emptyBody:49,SPACE:50,MEMBER:51,SEPARATOR:52,relation:53,NOTE_FOR:54,noteText:55,NOTE:56,CLASSDEF:57,classList:58,stylesOpt:59,ALPHA:60,COMMA:61,direction_tb:62,direction_bt:63,direction_rl:64,direction_lr:65,relationType:66,lineType:67,AGGREGATION:68,EXTENSION:69,COMPOSITION:70,DEPENDENCY:71,LOLLIPOP:72,LINE:73,DOTTED_LINE:74,CALLBACK:75,LINK:76,LINK_TARGET:77,CLICK:78,CALLBACK_NAME:79,CALLBACK_ARGS:80,HREF:81,STYLE:82,CSSCLASS:83,style:84,styleComponent:85,NUM:86,COLON:87,UNIT:88,BRKT:89,PCT:90,commentToken:91,textToken:92,graphCodeTokens:93,textNoTagsToken:94,TAGSTART:95,TAGEND:96,"==":97,"--":98,DEFAULT:99,MINUS:100,keywords:101,UNICODE_TEXT:102,BQUOTE_STR:103,$accept:0,$end:1},terminals_:{2:`error`,7:`CLASS_DIAGRAM`,8:`NEWLINE`,9:`EOF`,12:`SQS`,13:`STR`,14:`SQE`,18:`DOT`,20:`GENERICTYPE`,22:`LABEL`,33:`acc_title`,34:`acc_title_value`,35:`acc_descr`,36:`acc_descr_value`,37:`acc_descr_multiline_value`,39:`STRUCT_START`,41:`STRUCT_STOP`,42:`NAMESPACE`,44:`STYLE_SEPARATOR`,46:`ANNOTATION_START`,47:`ANNOTATION_END`,48:`CLASS`,50:`SPACE`,51:`MEMBER`,52:`SEPARATOR`,54:`NOTE_FOR`,56:`NOTE`,57:`CLASSDEF`,60:`ALPHA`,61:`COMMA`,62:`direction_tb`,63:`direction_bt`,64:`direction_rl`,65:`direction_lr`,68:`AGGREGATION`,69:`EXTENSION`,70:`COMPOSITION`,71:`DEPENDENCY`,72:`LOLLIPOP`,73:`LINE`,74:`DOTTED_LINE`,75:`CALLBACK`,76:`LINK`,77:`LINK_TARGET`,78:`CLICK`,79:`CALLBACK_NAME`,80:`CALLBACK_ARGS`,81:`HREF`,82:`STYLE`,83:`CSSCLASS`,86:`NUM`,87:`COLON`,88:`UNIT`,89:`BRKT`,90:`PCT`,93:`graphCodeTokens`,95:`TAGSTART`,96:`TAGEND`,97:`==`,98:`--`,99:`DEFAULT`,100:`MINUS`,101:`keywords`,102:`UNICODE_TEXT`,103:`BQUOTE_STR`},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,1],[15,3],[15,2],[19,1],[19,3],[19,1],[19,2],[19,2],[19,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[23,4],[23,5],[38,2],[38,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,3],[24,6],[24,4],[24,7],[24,6],[43,2],[43,3],[49,0],[49,2],[49,2],[26,4],[45,1],[45,2],[25,1],[25,2],[25,1],[25,1],[21,3],[21,4],[21,4],[21,5],[30,3],[30,2],[31,3],[58,1],[58,3],[32,1],[32,1],[32,1],[32,1],[53,3],[53,2],[53,2],[53,1],[66,1],[66,1],[66,1],[66,1],[66,1],[67,1],[67,1],[27,3],[27,4],[27,3],[27,4],[27,4],[27,5],[27,3],[27,4],[27,4],[27,5],[27,4],[27,5],[27,5],[27,6],[28,3],[29,3],[59,1],[59,3],[84,1],[84,2],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[91,1],[91,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[92,1],[94,1],[94,1],[94,1],[94,1],[16,1],[16,1],[16,1],[16,1],[17,1],[55,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(D,[2,5],{8:[1,48]}),{8:[1,49]},t(O,[2,19],{22:[1,50]}),t(O,[2,21]),t(O,[2,22]),t(O,[2,23]),t(O,[2,24]),t(O,[2,25]),t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,29]),t(O,[2,30]),{34:[1,51]},{36:[1,52]},t(O,[2,33]),t(O,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:k,69:A,70:j,71:M,72:N,73:P,74:ee}),{39:[1,65]},t(F,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(O,[2,65]),t(O,[2,66]),{16:69,60:p,86:C,100:w,102:T},{16:39,17:40,19:70,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:71,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:72,60:p,86:C,100:w,102:T,103:E},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:p,86:C,100:w,102:T,103:E},{13:te,55:76},{58:78,60:[1,79]},t(O,[2,76]),t(O,[2,77]),t(O,[2,78]),t(O,[2,79]),t(I,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:p,86:C,100:w,102:T,103:E}),t(I,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:p,86:C,100:w,102:T,103:E},{16:39,17:40,19:87,60:p,86:C,100:w,102:T,103:E},t(L,[2,133]),t(L,[2,134]),t(L,[2,135]),t(L,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(D,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:n,35:r,37:i,42:a,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:n,35:r,37:i,38:22,42:a,43:23,46:o,48:s,51:c,52:l,54:u,56:d,57:f,60:p,62:m,63:h,64:g,65:_,75:v,76:y,78:b,82:x,83:S,86:C,100:w,102:T,103:E},t(O,[2,20]),t(O,[2,31]),t(O,[2,32]),{13:[1,91],16:39,17:40,19:90,60:p,86:C,100:w,102:T,103:E},{53:92,66:56,67:57,68:k,69:A,70:j,71:M,72:N,73:P,74:ee},t(O,[2,64]),{67:93,73:P,74:ee},t(R,[2,83],{66:94,68:k,69:A,70:j,71:M,72:N}),t(z,[2,84]),t(z,[2,85]),t(z,[2,86]),t(z,[2,87]),t(z,[2,88]),t(ne,[2,89]),t(ne,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:a,43:23,48:s,54:u,56:d},{16:100,60:p,86:C,100:w,102:T},{41:[1,102],45:101,51:B},{16:104,60:p,86:C,100:w,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:V,50:H,59:110,60:U,82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},{60:[1,122]},{13:te,55:123},t(F,[2,72]),t(F,[2,138]),{22:V,50:H,59:124,60:U,61:[1,125],82:W,84:111,85:112,86:G,87:K,88:q,89:J,90:Y},t(re,[2,74]),{16:39,17:40,19:126,60:p,86:C,100:w,102:T,103:E},t(I,[2,16]),t(I,[2,17]),t(I,[2,18]),{11:127,12:ie,39:[2,36]},t(X,[2,9],{16:85,17:86,15:130,18:[1,129],60:p,86:C,100:w,102:T,103:E}),t(X,[2,10]),t(ae,[2,55],{11:131,12:ie}),t(D,[2,7]),{9:[1,132]},t(Z,[2,67]),{16:39,17:40,19:133,60:p,86:C,100:w,102:T,103:E},{13:[1,135],16:39,17:40,19:134,60:p,86:C,100:w,102:T,103:E},t(R,[2,82],{66:136,68:k,69:A,70:j,71:M,72:N}),t(R,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:a,43:23,48:s,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(F,[2,48],{39:[1,142]}),{41:[1,143]},t(F,[2,50]),{41:[2,61],45:144,51:B},{47:[1,145]},{16:39,17:40,19:146,60:p,86:C,100:w,102:T,103:E},t(O,[2,91],{13:[1,147]}),t(O,[2,93],{13:[1,149],77:[1,148]}),t(O,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(O,[2,105],{61:oe}),t(se,[2,107],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),t(Q,[2,109]),t(Q,[2,111]),t(Q,[2,112]),t(Q,[2,113]),t(Q,[2,114]),t(Q,[2,115]),t(Q,[2,116]),t(Q,[2,117]),t(Q,[2,118]),t(Q,[2,119]),t(O,[2,106]),t(F,[2,71]),t(O,[2,73],{61:oe}),{60:[1,155]},t(I,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:p,86:C,100:w,102:T,103:E},t(X,[2,12]),t(ae,[2,56]),{1:[2,4]},t(Z,[2,69]),t(Z,[2,68]),{16:39,17:40,19:158,60:p,86:C,100:w,102:T,103:E},t(R,[2,80]),t(F,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:a,43:23,48:s,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:a,43:23,48:s,54:u,56:d},{45:163,51:B},t(F,[2,49]),{41:[2,62]},t(F,[2,52],{39:[1,164]}),t(O,[2,60]),t(O,[2,92]),t(O,[2,94]),t(O,[2,95],{77:[1,165]}),t(O,[2,98]),t(O,[2,99],{13:[1,166]}),t(O,[2,101],{13:[1,168],77:[1,167]}),{22:V,50:H,60:U,82:W,84:169,85:112,86:G,87:K,88:q,89:J,90:Y},t(Q,[2,110]),t(re,[2,75]),{14:[1,170]},t(X,[2,11]),t(Z,[2,70]),t(F,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:B},t(O,[2,96]),t(O,[2,100]),t(O,[2,102]),t(O,[2,103],{77:[1,174]}),t(se,[2,108],{85:154,22:V,50:H,60:U,82:W,86:G,87:K,88:q,89:J,90:Y}),t(ae,[2,8]),t(F,[2,51]),{41:[1,175]},t(F,[2,54]),t(O,[2,104]),t(F,[2,53])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],127:[2,37],132:[2,4],144:[2,62],160:[2,40],161:[2,43],162:[2,46]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};ce.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:e(function(e,t,n,r){switch(n){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin(`acc_title`),33;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),35;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return`EDGE_STATE`;case 18:this.begin(`callback_name`);break;case 19:this.popState();break;case 20:this.popState(),this.begin(`callback_args`);break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return`STR`;case 26:this.begin(`string`);break;case 27:return 82;case 28:return 57;case 29:return this.begin(`namespace`),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin(`namespace-body`),39;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;case 35:return`EOF_IN_STRUCT`;case 36:return 8;case 37:break;case 38:return`EDGE_STATE`;case 39:return this.begin(`class`),48;case 40:return this.popState(),8;case 41:break;case 42:return this.popState(),this.popState(),41;case 43:return this.begin(`class-body`),39;case 44:return this.popState(),41;case 45:return`EOF_IN_STRUCT`;case 46:return`EDGE_STATE`;case 47:return`OPEN_IN_STRUCT`;case 48:break;case 49:return`MEMBER`;case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return`GENERICTYPE`;case 61:this.begin(`generic`);break;case 62:this.popState();break;case 63:return`BQUOTE_STR`;case 64:this.begin(`bqstring`);break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return`PLUS`;case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return`EQUALS`;case 89:return`EQUALS`;case 90:return 60;case 91:return 12;case 92:return 14;case 93:return`PUNCTUATION`;case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98:return 9}},`anonymous`),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}}})();function $(){this.yy={}}return e($,`Parser`),$.prototype=ce,ce.Parser=$,new $})();C.parser=C;var w=C,T=[`#`,`+`,`~`,`-`,``],E=class{static{e(this,`ClassMember`)}constructor(e,t){this.memberType=t,this.visibility=``,this.classifier=``,this.text=``;let n=m(e,f());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+o(this.id);this.memberType===`method`&&(e+=`(${o(this.parameters.trim())})`,this.returnType&&(e+=` : `+o(this.returnType))),e=e.trim();let t=this.parseClassifier();return{displayText:e,cssStyle:t}}parseMember(e){let t=``;if(this.memberType===`method`){let n=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(n){let e=n[1]?n[1].trim():``;if(T.includes(e)&&(this.visibility=e),this.id=n[2],this.parameters=n[3]?n[3].trim():``,t=n[4]?n[4].trim():``,this.returnType=n[5]?n[5].trim():``,t===``){let e=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(e)&&(t=e,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=e.length,r=e.substring(0,1),i=e.substring(n-1);T.includes(r)&&(this.visibility=r),/[$*]/.exec(i)&&(t=i),this.id=e.substring(this.visibility===``?0:1,t===``?n:n-1)}this.classifier=t,this.id=this.id.startsWith(` `)?` `+this.id.trim():this.id.trim();let n=`${this.visibility?`\\`+this.visibility:``}${o(this.id)}${this.memberType===`method`?`(${o(this.parameters)})${this.returnType?` : `+o(this.returnType):``}`:``}`;this.text=n.replaceAll(`<`,`<`).replaceAll(`>`,`>`),this.text.startsWith(`\\<`)&&(this.text=this.text.replace(`\\<`,`~`))}parseClassifier(){switch(this.classifier){case`*`:return`font-style:italic;`;case`$`:return`text-decoration:underline;`;default:return``}}},D=`classId-`,O=0,k=e(e=>l.sanitizeText(e,f()),`sanitizeText`),A=class o{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId=``,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=e(e=>{let t=v();n(e).select(`svg`).selectAll(`g`).filter(function(){return n(this).attr(`title`)!==null}).on(`mouseover`,e=>{let i=n(e.currentTarget),a=i.attr(`title`);if(!a)return;let o=e.currentTarget.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.html(r.sanitize(a)).style(`left`,`${window.scrollX+o.left+o.width/2}px`).style(`top`,`${window.scrollY+o.bottom+4}px`),i.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),n(e.currentTarget).classed(`hover`,!1)})},`setupToolTips`),this.direction=`TB`,this.setAccTitle=s,this.getAccTitle=p,this.setAccDescription=i,this.getAccDescription=u,this.setDiagramTitle=a,this.getDiagramTitle=d,this.getConfig=e(()=>f().class,`getConfig`),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{e(this,`ClassDB`)}splitClassNameAndType(e){let t=l.sanitizeText(e,f()),n=``,r=t;if(t.indexOf(`~`)>0){let e=t.split(`~`);r=k(e[0]),n=k(e[1])}return{className:r,type:n}}setClassLabel(e,t){let n=l.sanitizeText(e,f());t&&=k(t);let{className:r}=this.splitClassNameAndType(n);this.classes.get(r).label=t,this.classes.get(r).text=`${t}${this.classes.get(r).type?`<${this.classes.get(r).type}>`:``}`}addClass(e){let t=l.sanitizeText(e,f()),{className:n,type:r}=this.splitClassNameAndType(t);if(this.classes.has(n))return;let i=l.sanitizeText(n,f());this.classes.set(i,{id:i,type:r,label:i,text:`${i}${r?`<${r}>`:``}`,shape:`classBox`,cssClasses:`default`,methods:[],members:[],annotations:[],styles:[],domId:D+i+`-`+O}),O++}addInterface(e,t){let n={id:`interface${this.interfaces.length}`,label:e,classId:t};this.interfaces.push(n)}setDiagramId(e){this.diagramId=e}lookUpDomId(e){let t=l.sanitizeText(e,f());if(this.classes.has(t)){let e=this.classes.get(t).domId;return this.diagramId?`${this.diagramId}-${e}`:e}throw Error(`Class not found: `+t)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId=``,this.direction=`TB`,c()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(e){let t=typeof e==`number`?`note${e}`:e;return this.notes.get(t)}getNotes(){return this.notes}addRelation(e){t.debug(`Adding relation: `+JSON.stringify(e));let n=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1===this.relationType.LOLLIPOP&&!n.includes(e.relation.type2)?(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1=`interface${this.interfaces.length-1}`):e.relation.type2===this.relationType.LOLLIPOP&&!n.includes(e.relation.type1)?(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2=`interface${this.interfaces.length-1}`):(this.addClass(e.id1),this.addClass(e.id2)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=l.sanitizeText(e.relationTitle1.trim(),f()),e.relationTitle2=l.sanitizeText(e.relationTitle2.trim(),f()),this.relations.push(e)}addAnnotation(e,t){let n=this.splitClassNameAndType(e).className;this.classes.get(n).annotations.push(t)}addMember(e,t){this.addClass(e);let n=this.splitClassNameAndType(e).className,r=this.classes.get(n);if(typeof t==`string`){let e=t.trim();e.startsWith(`<<`)&&e.endsWith(`>>`)?r.annotations.push(k(e.substring(2,e.length-2))):e.indexOf(`)`)>0?r.methods.push(new E(e,`method`)):e&&r.members.push(new E(e,`attribute`))}}addMembers(e,t){Array.isArray(t)&&(t.reverse(),t.forEach(t=>this.addMember(e,t)))}addNote(e,t){let n=this.notes.size,r={id:`note${n}`,class:t,text:e,index:n};return this.notes.set(r.id,r),r.id}cleanupLabel(e){return e.startsWith(`:`)&&(e=e.substring(1)),k(e.trim())}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=e;/\d/.exec(e[0])&&(n=D+n),n=this.splitClassNameAndType(n).className;let r=this.classes.get(n);r&&(r.cssClasses+=` `+t)})}defineClass(e,t){for(let n of e){let e=this.styleClasses.get(n);e===void 0&&(e={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,e)),t&&t.forEach(t=>{if(/color/.exec(t)){let n=t.replace(`fill`,`bgFill`);e.textStyles.push(n)}e.styles.push(t)}),this.classes.forEach(e=>{e.cssClasses.includes(n)&&e.styles.push(...t.flatMap(e=>e.split(`,`)))})}}setTooltip(e,t){e.split(`,`).forEach(e=>{if(t!==void 0){let n=this.splitClassNameAndType(e).className,r=this.classes.get(n);r&&(r.tooltip=k(t))}})}getTooltip(e,t){return t&&this.namespaces.has(t)?this.namespaces.get(t).classes.get(e).tooltip:this.classes.get(e).tooltip}setLink(e,t,n){let r=f();e.split(`,`).forEach(e=>{let i=e;/\d/.exec(e[0])&&(i=D+i),i=this.splitClassNameAndType(i).className;let a=this.classes.get(i);a&&(a.link=g.formatUrl(t,r),r.securityLevel===`sandbox`?a.linkTarget=`_top`:typeof n==`string`?a.linkTarget=k(n):a.linkTarget=`_blank`)}),this.setCssClass(e,`clickable`)}setClickEvent(e,t,n){e.split(`,`).forEach(e=>{this.setClickFunc(e,t,n);let r=this.splitClassNameAndType(e).className,i=this.classes.get(r);i&&(i.haveCallback=!0)}),this.setCssClass(e,`clickable`)}setClickFunc(e,t,n){let r=l.sanitizeText(e,f());if(f().securityLevel!==`loose`||t===void 0)return;let i=this.splitClassNameAndType(r).className;if(this.classes.has(i)){let e=[];if(typeof n==`string`){e=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{let n=this.lookUpDomId(i),r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,()=>{g.runFunc(t,...e)},!1)})}}bindFunctions(e){this.functions.forEach(t=>{t(e)})}escapeHtml(e){return e.replace(/&/g,`&`).replace(//g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)}getDirection(){return this.direction}setDirection(e){this.direction=e}static resolveQualifiedId(e,t){let n=t.at(-1);return n?`${n}.${e}`:e}static getAncestorIds(e){let t=e.split(`.`),n=Array(t.length);n[0]=t[0];for(let e=1;e0?i[e-1]:void 0,o=e===i.length-1,s=o&&t?t:r[e];this.namespaces.has(n)?o&&(this.namespaces.get(n).explicit=!0):this.namespaces.set(n,this.createNamespaceNode(n,s,a,o)),a&&this.linkParentChild(a,n)}return n}popNamespace(){this.namespaceStack.pop()}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,t,n){if(this.namespaces.has(e)){for(let n of t){let{className:t}=this.splitClassNameAndType(n),r=this.getClass(t);r.parent=e,this.namespaces.get(e).classes.set(t,r)}for(let t of n){let n=this.getNote(t);n.parent=e,this.namespaces.get(e).notes.set(t,n)}}}setCssStyle(e,t){let n=this.classes.get(e);if(!(!t||!n))for(let e of t)e.includes(`,`)?n.styles.push(...e.split(`,`)):n.styles.push(e)}getArrowMarker(e){let t;switch(e){case 0:t=`aggregation`;break;case 1:t=`extension`;break;case 2:t=`composition`;break;case 3:t=`dependency`;break;case 4:t=`lollipop`;break;default:t=`none`}return t}resolveExplicitAncestor(e){let t=e;for(;t;){let e=this.namespaces.get(t);if(!e)return;if(e.explicit)return t;t=e.parent}}getData(){let e=[],t=[],n=f(),r=n.class?.hierarchicalNamespaces??!0;for(let t of this.namespaces.values()){if(!r&&!t.explicit)continue;let i={id:t.id,label:r?t.label:t.id,isGroup:!0,padding:n.class.padding??16,shape:`rect`,cssStyles:[],look:n.look,parentId:r?t.parent:void 0};e.push(i)}for(let t of this.classes.values()){let i=r?t.parent:this.resolveExplicitAncestor(t.parent),a={...t,type:void 0,isGroup:!1,parentId:i,look:n.look};e.push(a)}for(let i of this.notes.values()){let a=r?i.parent:this.resolveExplicitAncestor(i.parent),o={id:i.id,label:i.text,isGroup:!1,shape:`note`,padding:n.class.padding??6,cssStyles:[`text-align: left`,`white-space: nowrap`,`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look,parentId:a,labelType:`markdown`};e.push(o);let s=this.classes.get(i.class)?.id;if(s){let e={id:`edgeNote${i.index}`,start:i.id,end:s,type:`normal`,thickness:`normal`,classes:`relation`,arrowTypeStart:`none`,arrowTypeEnd:`none`,arrowheadStyle:``,labelStyle:[``],style:[`fill: none`],pattern:`dotted`,look:n.look};t.push(e)}}for(let t of this.interfaces){let r={id:t.id,label:t.label,isGroup:!1,shape:`rect`,cssStyles:[`opacity: 0;`],look:n.look};e.push(r)}let i=0;for(let e of this.relations){i++;let r={id:h(e.id1,e.id2,{prefix:`id`,counter:i}),start:e.id1,end:e.id2,type:`normal`,label:e.title,labelpos:`c`,thickness:`normal`,classes:`relation`,arrowTypeStart:this.getArrowMarker(e.relation.type1),arrowTypeEnd:this.getArrowMarker(e.relation.type2),startLabelRight:e.relationTitle1===`none`?``:e.relationTitle1,endLabelLeft:e.relationTitle2===`none`?``:e.relationTitle2,arrowheadStyle:``,labelStyle:[`display: inline-block`],style:e.style||``,pattern:e.relation.lineType==1?`dashed`:`solid`,look:n.look,labelType:`markdown`};t.push(r)}return{nodes:e,edges:t,other:{},config:n,direction:this.getDirection()}}},j=e(e=>`g.classGroup text { - fill: ${e.nodeBorder||e.classText}; - stroke: none; - font-family: ${e.fontFamily}; - font-size: 10px; - - .title { - font-weight: bolder; - } - -} - - .cluster-label text { - fill: ${e.titleColor}; - } - .cluster-label span { - color: ${e.titleColor}; - } - .cluster-label span p { - background-color: transparent; - } - - .cluster rect { - fill: ${e.clusterBkg}; - stroke: ${e.clusterBorder}; - stroke-width: 1px; - } - - .cluster text { - fill: ${e.titleColor}; - } - - .cluster span { - color: ${e.titleColor}; - } - -.nodeLabel, .edgeLabel { - color: ${e.classText}; -} - -.noteLabel .nodeLabel, .noteLabel .edgeLabel { - color: ${e.noteTextColor}; -} -.edgeLabel .label rect { - fill: ${e.mainBkg}; -} -.label text { - fill: ${e.classText}; -} - -.labelBkg { - background: ${e.mainBkg}; -} -.edgeLabel .label span { - background: ${e.mainBkg}; -} - -.classTitle { - font-weight: bolder; -} -.node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${e.mainBkg}; - stroke: ${e.nodeBorder}; - stroke-width: ${e.strokeWidth}; - } - - -.divider { - stroke: ${e.nodeBorder}; - stroke-width: 1; -} - -g.clickable { - cursor: pointer; -} - -g.classGroup rect { - fill: ${e.mainBkg}; - stroke: ${e.nodeBorder}; -} - -g.classGroup line { - stroke: ${e.nodeBorder}; - stroke-width: 1; -} - -.classLabel .box { - stroke: none; - stroke-width: 0; - fill: ${e.mainBkg}; - opacity: 0.5; -} - -.classLabel .label { - fill: ${e.nodeBorder}; - font-size: 10px; -} - -.relation { - stroke: ${e.lineColor}; - stroke-width: ${e.strokeWidth}; - fill: none; -} - -.dashed-line{ - stroke-dasharray: 3; -} - -.dotted-line{ - stroke-dasharray: 1 2; -} - -[id$="-compositionStart"], .composition { - fill: ${e.lineColor} !important; - stroke: ${e.lineColor} !important; - stroke-width: 1; -} - -[id$="-compositionEnd"], .composition { - fill: ${e.lineColor} !important; - stroke: ${e.lineColor} !important; - stroke-width: 1; -} - -[id$="-dependencyStart"], .dependency { - fill: ${e.lineColor} !important; - stroke: ${e.lineColor} !important; - stroke-width: 1; -} - -[id$="-dependencyEnd"], .dependency { - fill: ${e.lineColor} !important; - stroke: ${e.lineColor} !important; - stroke-width: 1; -} - -[id$="-extensionStart"], .extension { - fill: transparent !important; - stroke: ${e.lineColor} !important; - stroke-width: 1; -} - -[id$="-extensionEnd"], .extension { - fill: transparent !important; - stroke: ${e.lineColor} !important; - stroke-width: 1; -} - -[id$="-aggregationStart"], .aggregation { - fill: transparent !important; - stroke: ${e.lineColor} !important; - stroke-width: 1; -} - -[id$="-aggregationEnd"], .aggregation { - fill: transparent !important; - stroke: ${e.lineColor} !important; - stroke-width: 1; -} - -[id$="-lollipopStart"], .lollipop { - fill: ${e.mainBkg} !important; - stroke: ${e.lineColor} !important; - stroke-width: 1; -} - -[id$="-lollipopEnd"], .lollipop { - fill: ${e.mainBkg} !important; - stroke: ${e.lineColor} !important; - stroke-width: 1; -} - -.edgeTerminals { - font-size: 11px; - line-height: initial; -} - -.classTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.textColor}; -} - -.edgeLabel[data-look="neo"] { - background-color: ${e.edgeLabelBackground}; - p { - background-color: ${e.edgeLabelBackground}; - } - rect { - opacity: 0.5; - background-color: ${e.edgeLabelBackground}; - fill: ${e.edgeLabelBackground}; - } - text-align: center; -} - ${_()} -`,`getStyles`),M={getClasses:e(function(e,t){return t.db.getClasses()},`getClasses`),draw:e(async function(e,n,r,i){t.info(`REF0:`),t.info(`Drawing class diagram (v3)`,n);let{securityLevel:a,state:o,layout:s}=f();i.db.setDiagramId(n);let c=i.db.getData(),l=y(n,a);c.type=i.type,c.layoutAlgorithm=S(s),c.nodeSpacing=o?.nodeSpacing||50,c.rankSpacing=o?.rankSpacing||50,c.markers=[`aggregation`,`extension`,`composition`,`dependency`,`lollipop`],c.diagramId=n,await x(c,l),g.insertTitle(l,`classDiagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),b(l,8,`classDiagram`,o?.useMaxWidth??!0)},`draw`),getDir:e((e,t=`TB`)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`)};export{j as i,w as n,M as r,A as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-VAUOI2AC-AC9pRUsa.js b/dist-desktop/assets/chunk-VAUOI2AC-AC9pRUsa.js deleted file mode 100644 index a0785ba..0000000 --- a/dist-desktop/assets/chunk-VAUOI2AC-AC9pRUsa.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-UMNXGZaF.js";import{x as n}from"./chunk-WYO6CB5R-Dv5kDyQC.js";var r=e(e=>{let{securityLevel:r}=n(),i=t(`body`);return r===`sandbox`&&(i=t((t(`#i${e}`).node()?.contentDocument??document).body)),i.select(`#${e}`)},`selectSvgElement`);export{r as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-VR4S4FIN-BTo4eV3J.js b/dist-desktop/assets/chunk-VR4S4FIN-BTo4eV3J.js deleted file mode 100644 index 6e01b65..0000000 --- a/dist-desktop/assets/chunk-VR4S4FIN-BTo4eV3J.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-UMNXGZaF.js";import{c as n}from"./chunk-WYO6CB5R-Dv5kDyQC.js";var r=e((e,r,o,s)=>{e.attr(`class`,o);let{width:c,height:l,x:u,y:d}=i(e,r);n(e,l,c,s);let f=a(u,d,c,l,r);e.attr(`viewBox`,f),t.debug(`viewBox configured: ${f} with padding: ${r}`)},`setupViewPortForSVG`),i=e((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),a=e((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`);export{r as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-WYO6CB5R-Dv5kDyQC.js b/dist-desktop/assets/chunk-WYO6CB5R-Dv5kDyQC.js deleted file mode 100644 index 2c2ab99..0000000 --- a/dist-desktop/assets/chunk-WYO6CB5R-Dv5kDyQC.js +++ /dev/null @@ -1,127 +0,0 @@ -import{t as e}from"./index-CXgd9jpl.js";import{n as t,t as n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{h as r,m as i}from"./src-UMNXGZaF.js";var a={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let i=n<.5?n*(1+t):n+t-n*t,o=2*n-i;switch(r){case`r`:return a.hue2rgb(o,i,e+1/3)*255;case`g`:return a.hue2rgb(o,i,e)*255;case`b`:return a.hue2rgb(o,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,c=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return c*100;switch(i){case e:return((t-n)/s+(tt>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},unit:{dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},s={};for(let e=0;e<=255;e++)s[e]=o.unit.dec2hex(e);var c={ALL:0,RGB:1,HSL:2},l=class{constructor(){this.type=c.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=c.ALL}is(e){return this.type===e}},u=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new l}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=c.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=o.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=o.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=o.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=o.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=o.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=o.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(c.HSL)&&t!==void 0?t:(this._ensureHSL(),o.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(c.HSL)&&t!==void 0?t:(this._ensureHSL(),o.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(c.HSL)&&t!==void 0?t:(this._ensureHSL(),o.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(c.RGB)&&t!==void 0?t:(this._ensureRGB(),o.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(c.RGB)&&t!==void 0?t:(this._ensureRGB(),o.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(c.RGB)&&t!==void 0?t:(this._ensureRGB(),o.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(c.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(c.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(c.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(c.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(c.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(c.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},`transparent`),d={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(d.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,l=a?0:-1,f=o?255:15;return u.set({r:(r>>c*(l+3)&f)*s,g:(r>>c*(l+2)&f)*s,b:(r>>c*(l+1)&f)*s,a:a?(r&f)*s/255:1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${s[Math.round(t)]}${s[Math.round(n)]}${s[Math.round(r)]}${s[Math.round(i*255)]}`:`#${s[Math.round(t)]}${s[Math.round(n)]}${s[Math.round(r)]}`}},f={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let t=e.match(f.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return o.channel.clamp.h(parseFloat(e)*.9);case`rad`:return o.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return o.channel.clamp.h(parseFloat(e)*360)}}return o.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(f.re);if(!n)return;let[,r,i,a,s,c]=n;return u.set({h:f._hue2deg(r),s:o.channel.clamp.s(parseFloat(i)),l:o.channel.clamp.l(parseFloat(a)),a:s?o.channel.clamp.a(c?parseFloat(s)/100:parseFloat(s)):1},e)},stringify:e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${o.lang.round(t)}, ${o.lang.round(n)}%, ${o.lang.round(r)}%, ${i})`:`hsl(${o.lang.round(t)}, ${o.lang.round(n)}%, ${o.lang.round(r)}%)`}},p={colors:{aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyanaqua:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,transparent:`#00000000`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},parse:e=>{e=e.toLowerCase();let t=p.colors[e];if(t)return d.parse(t)},stringify:e=>{let t=d.stringify(e);for(let e in p.colors)if(p.colors[e]===t)return e}},m={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let n=e.match(m.re);if(!n)return;let[,r,i,a,s,c,l,d,f]=n;return u.set({r:o.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:o.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:o.channel.clamp.b(l?parseFloat(c)*2.55:parseFloat(c)),a:d?o.channel.clamp.a(f?parseFloat(d)/100:parseFloat(d)):1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${o.lang.round(t)}, ${o.lang.round(n)}, ${o.lang.round(r)}, ${o.lang.round(i)})`:`rgb(${o.lang.round(t)}, ${o.lang.round(n)}, ${o.lang.round(r)})`}},h={format:{keyword:p,hex:d,rgb:m,rgba:m,hsl:f,hsla:f},parse:e=>{if(typeof e!=`string`)return e;let t=d.parse(e)||m.parse(e)||f.parse(e)||p.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(c.HSL)||e.data.r===void 0?f.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?m.stringify(e):d.stringify(e)},g=(e,t)=>{let n=h.parse(e);for(let e in t)n[e]=o.channel.clamp[e](t[e]);return h.stringify(n)},_=(e,t,n=0,r=1)=>{if(typeof e!=`number`)return g(e,{a:t});let i=u.set({r:o.channel.clamp.r(e),g:o.channel.clamp.g(t),b:o.channel.clamp.b(n),a:o.channel.clamp.a(r)});return h.stringify(i)},ee=e=>{let{r:t,g:n,b:r}=h.parse(e),i=.2126*o.channel.toLinear(t)+.7152*o.channel.toLinear(n)+.0722*o.channel.toLinear(r);return o.lang.round(i)},v=e=>ee(e)>=.5,y=e=>!v(e),b=(e,t,n)=>{let r=h.parse(e),i=r[t],a=o.channel.clamp[t](i+n);return i!==a&&(r[t]=a),h.stringify(r)},x=(e,t)=>b(e,`l`,t),S=(e,t)=>b(e,`l`,-t),C=(e,t)=>{let n=h.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return g(e,r)},te=(e,t,n=50)=>{let{r,g:i,b:a,a:o}=h.parse(e),{r:s,g:c,b:l,a:u}=h.parse(t),d=n/100,f=d*2-1,p=o-u,m=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,g=1-m;return _(r*m+s*g,i*m+c*g,a*m+l*g,o*d+u*(1-d))},w=(e,t=100)=>{let n=h.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,te(n,e,t)};function ne(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n`u`?null:A(BigInt.prototype.toString),je=typeof Symbol>`u`?null:A(Symbol.prototype.toString),O=A(Object.prototype.hasOwnProperty),Me=A(Object.prototype.toString),k=A(RegExp.prototype.test),Ne=j(TypeError);function A(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return me(e,t,n)}}function j(e){return function(){return he(e,[...arguments])}}function M(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Se;if(le&&le(e,null),!xe(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ue(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Pe(e){for(let t=0;t/g),Xe=D(/\${[\w\W]*/g),Ze=D(/^data-[\-\w.\u00B7-\uFFFF]+$/),Qe=D(/^aria-[\-\w]+$/),$e=D(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),et=D(/^(?:\w+script|data):/i),tt=D(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),nt=D(/^html$/i),rt=D(/^[a-z][.\w]*(-[.\w]+)+$/i),it=D(/<[/\w!]/g),at=D(/<[/\w]/g),ot=D(/<\/no(script|embed|frames)/i),st=D(/\/>/i),F={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ct=function(){return typeof window>`u`?null:window},lt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},ut=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},dt=function(e,t,n,r){return O(e,t)&&xe(e[t])?M(r.base?N(r.base):{},e[t],r.transform):n};function ft(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ct(),t=e=>ft(e);if(t.version=`3.4.12`,t.removed=[],!e||!e.document||e.document.nodeType!==F.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=P(d,`cloneNode`),p=P(d,`remove`),m=P(d,`nextSibling`),h=P(d,`childNodes`),g=P(d,`parentNode`),_=P(d,`shadowRoot`),ee=P(d,`attributes`),v=o&&o.prototype?P(o.prototype,`nodeType`):null,y=o&&o.prototype?P(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let b,x=``,S,C=!1,te=0,w=function(){if(te>0)throw Ne(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},ne=function(e){w(),te++;try{return b.createHTML(e)}finally{te--}},re=function(e){w(),te++;try{return b.createScriptURL(e)}finally{te--}},ie=function(){return C||=(S=lt(u,i),!0),S},ae=n,oe=ae.implementation,se=ae.createNodeIterator,le=ae.createDocumentFragment,ue=ae.getElementsByTagName,de=r.importNode,T=ut();t.isSupported=typeof ce==`function`&&typeof g==`function`&&oe&&oe.createHTMLDocument!==void 0;let pe=Je,me=Ye,he=Xe,Oe=Ze,ke=Qe,Ae=et,je=tt,Me=rt,A=$e,j=null,Pe=M({},[...Le,...Re,...ze,...Ve,...Ue]),I=null,pt=M({},[...We,...Ge,...Ke,...qe]),L=Object.seal(fe(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),R=null,z=null,B=Object.seal(fe(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),mt=!0,ht=!0,gt=!1,_t=!0,V=!1,H=!0,vt=!1,yt=!1,bt=null,xt=null,St=!1,Ct=!1,wt=!1,Tt=!1,Et=!0,Dt=!1,Ot=`user-content-`,kt=!0,At=!1,jt={},U=null,W=M({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),G=null,Mt=M({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Nt=null,Pt=M({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Ft=`http://www.w3.org/1998/Math/MathML`,It=`http://www.w3.org/2000/svg`,K=`http://www.w3.org/1999/xhtml`,q=K,Lt=!1,Rt=null,zt=M({},[Ft,It,K],Ce),J=E([`mi`,`mo`,`mn`,`ms`,`mtext`]),Bt=M({},J),Y=E([`annotation-xml`]),Vt=M({},Y),Ht=M({},[`title`,`style`,`font`,`a`,`script`]),Ut=null,Wt=[`application/xhtml+xml`,`text/html`],X=null,Gt=null,Kt=n.createElement(`form`),qt=function(e){return e instanceof RegExp||e instanceof Function},Jt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Gt&&Gt===e)return;(!e||typeof e!=`object`)&&(e={}),e=N(e),Ut=Wt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,X=Ut===`application/xhtml+xml`?Ce:Se,j=dt(e,`ALLOWED_TAGS`,Pe,{transform:X}),I=dt(e,`ALLOWED_ATTR`,pt,{transform:X}),Rt=dt(e,`ALLOWED_NAMESPACES`,zt,{transform:Ce}),Nt=dt(e,`ADD_URI_SAFE_ATTR`,Pt,{transform:X,base:Pt}),G=dt(e,`ADD_DATA_URI_TAGS`,Mt,{transform:X,base:Mt}),U=dt(e,`FORBID_CONTENTS`,W,{transform:X}),R=dt(e,`FORBID_TAGS`,N({}),{transform:X}),z=dt(e,`FORBID_ATTR`,N({}),{transform:X}),jt=O(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?N(e.USE_PROFILES):e.USE_PROFILES:!1,mt=e.ALLOW_ARIA_ATTR!==!1,ht=e.ALLOW_DATA_ATTR!==!1,gt=e.ALLOW_UNKNOWN_PROTOCOLS||!1,_t=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,V=e.SAFE_FOR_TEMPLATES||!1,H=e.SAFE_FOR_XML!==!1,vt=e.WHOLE_DOCUMENT||!1,Ct=e.RETURN_DOM||!1,wt=e.RETURN_DOM_FRAGMENT||!1,Tt=e.RETURN_TRUSTED_TYPE||!1,St=e.FORCE_BODY||!1,Et=e.SANITIZE_DOM!==!1,Dt=e.SANITIZE_NAMED_PROPS||!1,kt=e.KEEP_CONTENT!==!1,At=e.IN_PLACE||!1,A=Ie(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:$e,q=typeof e.NAMESPACE==`string`?e.NAMESPACE:K,Bt=O(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?N(e.MATHML_TEXT_INTEGRATION_POINTS):M({},J),Vt=O(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?N(e.HTML_INTEGRATION_POINTS):M({},Y);let t=O(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?N(e.CUSTOM_ELEMENT_HANDLING):fe(null);if(L=fe(null),O(t,`tagNameCheck`)&&qt(t.tagNameCheck)&&(L.tagNameCheck=t.tagNameCheck),O(t,`attributeNameCheck`)&&qt(t.attributeNameCheck)&&(L.attributeNameCheck=t.attributeNameCheck),O(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(L.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),D(L),V&&(ht=!1),wt&&(Ct=!0),jt&&(j=M({},Ue),I=fe(null),jt.html===!0&&(M(j,Le),M(I,We)),jt.svg===!0&&(M(j,Re),M(I,Ge),M(I,qe)),jt.svgFilters===!0&&(M(j,ze),M(I,Ge),M(I,qe)),jt.mathMl===!0&&(M(j,Ve),M(I,Ke),M(I,qe))),B.tagCheck=null,B.attributeCheck=null,O(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?B.tagCheck=e.ADD_TAGS:xe(e.ADD_TAGS)&&(j===Pe&&(j=N(j)),M(j,e.ADD_TAGS,X))),O(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?B.attributeCheck=e.ADD_ATTR:xe(e.ADD_ATTR)&&(I===pt&&(I=N(I)),M(I,e.ADD_ATTR,X))),O(e,`ADD_URI_SAFE_ATTR`)&&xe(e.ADD_URI_SAFE_ATTR)&&M(Nt,e.ADD_URI_SAFE_ATTR,X),O(e,`FORBID_CONTENTS`)&&xe(e.FORBID_CONTENTS)&&(U===W&&(U=N(U)),M(U,e.FORBID_CONTENTS,X)),O(e,`ADD_FORBID_CONTENTS`)&&xe(e.ADD_FORBID_CONTENTS)&&(U===W&&(U=N(U)),M(U,e.ADD_FORBID_CONTENTS,X)),kt&&(j[`#text`]=!0),vt&&M(j,[`html`,`head`,`body`]),j.table&&(M(j,[`tbody`]),delete R.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Ne(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Ne(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=b;b=e.TRUSTED_TYPES_POLICY;try{x=ne(``)}catch(e){throw b=t,e}}else e.TRUSTED_TYPES_POLICY===null?(b=void 0,x=``):(b===void 0&&(b=ie()),b&&typeof x==`string`&&(x=ne(``)));E&&E(e),Gt=e},Yt=M({},[...Re,...ze,...Be]),Xt=M({},[...Ve,...He]),Zt=function(e,t,n){return t.namespaceURI===K?e===`svg`:t.namespaceURI===Ft?e===`svg`&&(n===`annotation-xml`||Bt[n]):!!Yt[e]},Qt=function(e,t,n){return t.namespaceURI===K?e===`math`:t.namespaceURI===It?e===`math`&&Vt[n]:!!Xt[e]},$t=function(e,t,n){return t.namespaceURI===It&&!Vt[n]||t.namespaceURI===Ft&&!Bt[n]?!1:!Xt[e]&&(Ht[e]||!Yt[e])},en=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:q,tagName:`template`});let n=Se(e.tagName),r=Se(t.tagName);return Rt[e.namespaceURI]?e.namespaceURI===It?Zt(n,t,r):e.namespaceURI===Ft?Qt(n,t,r):e.namespaceURI===K?$t(n,t,r):!!(Ut===`application/xhtml+xml`&&Rt[e.namespaceURI]):!1},tn=function(e){ye(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw Ne(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},nn=function(e){an(e);let t=h(e);if(t){let e=[];ge(t,t=>{ye(e,t)}),ge(e,e=>{try{p(e)}catch{}})}let n=ee(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},Z=function(e,n){try{ye(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{ye(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(Ct||wt)try{tn(n)}catch{}else try{n.setAttribute(e,``)}catch{}},rn=function(e){let t=ee(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||I[X(i)]))try{e.removeAttribute(i)}catch{}}},an=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(v?v(e):e.nodeType)===F.element&&rn(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},on=function(e){if(!H)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=v?v(e):e.nodeType;if(n===F.processingInstruction||n===F.comment&&k(at,e.data)){try{p(e)}catch{}continue}if(n===F.element){let t=e,n=X(y?y(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&n!==`label`&&n!==`output`&&t.removeAttribute(`for`)}catch{}}let r=h(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},sn=function(e){let t=null,r=null;if(St)e=``+e;else{let t=we(e,/^[\r\n\t ]+/);r=t&&t[0]}Ut===`application/xhtml+xml`&&q===K&&(e=``+e+``);let i=b?ne(e):e;if(q===K)try{t=new l().parseFromString(i,Ut)}catch{}if(!t||!t.documentElement){t=oe.createDocument(q,`template`,null);try{t.documentElement.innerHTML=Lt?x:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),q===K?ue.call(t,vt?`html`:`body`)[0]:vt?t.documentElement:a},cn=function(e){return se.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},ln=function(e){return e=Te(e,pe,` `),e=Te(e,me,` `),e=Te(e,he,` `),e},un=function(e){e.normalize();let t=se.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;)n.data=ln(n.data),n=t.nextNode();let r=e.querySelectorAll?.call(e,`template`);r&&ge(r,e=>{Q(e.content)&&un(e.content)})},dn=function(e){let t=y?y(e):null;return typeof t!=`string`||X(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==ee(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==v(e)||e.childNodes!==h(e)},Q=function(e){if(!v||typeof e!=`object`||!e)return!1;try{return v(e)===F.documentFragment}catch{return!1}},fn=function(e){if(!v||typeof e!=`object`||!e)return!1;try{return typeof v(e)==`number`}catch{return!1}};function $(e,n,r){e.length!==0&&ge(e,e=>{e.call(t,n,r,Gt)})}let pn=function(e,t){return!!(H&&e.hasChildNodes()&&!fn(e.firstElementChild)&&k(it,e.textContent)&&k(it,e.innerHTML)||H&&e.namespaceURI===K&&t===`style`&&fn(e.firstElementChild)||e.nodeType===F.processingInstruction||H&&e.nodeType===F.comment&&k(at,e.data))},mn=function(e,t){if(!R[t]&&vn(t)&&(L.tagNameCheck instanceof RegExp&&k(L.tagNameCheck,t)||L.tagNameCheck instanceof Function&&L.tagNameCheck(t)))return!1;if(kt&&!U[t]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=At?n[i]:f(n[i],!0);t.insertBefore(r,m(e))}}}return tn(e),!0},hn=function(e,n){if($(T.beforeSanitizeElements,e,null),e!==n&&g(e)===null)return!0;if(dn(e))return tn(e),!0;let r=X(y?y(e):e.nodeName);if($(T.uponSanitizeElement,e,{tagName:r,allowedTags:j}),e!==n&&g(e)===null)return!0;if(pn(e,r))return tn(e),!0;if(R[r]||!(B.tagCheck instanceof Function&&B.tagCheck(r))&&!j[r]){let t=mn(e,r);return t===!1&&$(T.afterSanitizeElements,e,null),t}if((v?v(e):e.nodeType)===F.element&&!en(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&k(ot,e.innerHTML))return tn(e),!0;if(V&&e.nodeType===F.text){let n=ln(e.textContent);e.textContent!==n&&(ye(t.removed,{element:e.cloneNode()}),e.textContent=n)}return $(T.afterSanitizeElements,e,null),!1},gn=function(e,t,r){if(z[t]||H&&t===`patchsrc`||H&&t===`for`&&e!==`label`&&e!==`output`||Et&&(t===`id`||t===`name`)&&(r in n||r in Kt))return!1;let i=I[t]||B.attributeCheck instanceof Function&&B.attributeCheck(t,e);if(!(ht&&k(Oe,t))&&!(mt&&k(ke,t))){if(!i){if(!(vn(e)&&(L.tagNameCheck instanceof RegExp&&k(L.tagNameCheck,e)||L.tagNameCheck instanceof Function&&L.tagNameCheck(e))&&(L.attributeNameCheck instanceof RegExp&&k(L.attributeNameCheck,t)||L.attributeNameCheck instanceof Function&&L.attributeNameCheck(t,e))||t===`is`&&L.allowCustomizedBuiltInElements&&(L.tagNameCheck instanceof RegExp&&k(L.tagNameCheck,r)||L.tagNameCheck instanceof Function&&L.tagNameCheck(r))))return!1}else if(!Nt[t]&&!k(A,Te(r,je,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&Ee(r,`data:`)===0&&G[e])&&!(gt&&!k(Ae,Te(r,je,``)))&&r)return!1}return!0},_n=M({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),vn=function(e){return!_n[Se(e)]&&k(Me,e)},yn=function(e,t,n,r){if(b&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return ne(r);case`TrustedScriptURL`:return re(r)}return r},bn=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),dn(e)?tn(e):ve(t.removed)}catch{Z(n,e)}},xn=function(e){$(T.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||dn(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:I,forceKeepAttr:void 0},r=t.length,i=X(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=X(o),u=c,d=o===`value`?u:De(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,$(T.uponSanitizeAttribute,e,n),d=n.attrValue,Dt&&(l===`id`||l===`name`)&&Ee(d,Ot)!==0&&(Z(o,e),d=Ot+d),H&&k(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){Z(o,e);continue}if(l===`attributename`&&we(d,`href`)){Z(o,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr){Z(o,e);continue}if(!_t&&k(st,d)){Z(o,e);continue}if(V&&(d=ln(d)),!gn(i,l,d)){Z(o,e);continue}d=yn(i,l,s,d),d!==u&&bn(e,o,s,d)}}$(T.afterSanitizeAttributes,e,null)},Sn=function(e){let t=null,n=cn(e);for($(T.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if($(T.uponSanitizeShadowNode,t,null),hn(t,e),xn(t),Q(t.content)&&Sn(t.content),(v?v(t):t.nodeType)===F.element){let e=_(t);Q(e)&&(Cn(e),Sn(e))}$(T.afterSanitizeShadowDOM,e,null)},Cn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Sn(e.shadow);continue}let n=e.node,r=(v?v(n):n.nodeType)===F.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=y?y(n):null;if(typeof e==`string`&&X(e)===`template`){let e=n.content;Q(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(n);Q(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Lt=!e,Lt&&(e=``),typeof e!=`string`&&!fn(e)&&(e=Fe(e),typeof e!=`string`))throw Ne(`dirty is not a string, aborting`);if(!t.isSupported)return e;yt?(j=bt,I=xt):Jt(n),(T.uponSanitizeElement.length>0||T.uponSanitizeAttribute.length>0)&&(j=N(j)),T.uponSanitizeAttribute.length>0&&(I=N(I)),t.removed=[];let c=At&&typeof e!=`string`&&fn(e);if(c){on(e);let t=y?y(e):e.nodeName;if(typeof t==`string`){let n=X(t);if(!j[n]||R[n])throw nn(e),Ne(`root node is forbidden and cannot be sanitized in-place`)}if(dn(e))throw nn(e),Ne(`root node is clobbered and cannot be sanitized in-place`);try{Cn(e)}catch(t){throw nn(e),t}}else if(fn(e))i=sn(``),a=i.ownerDocument.importNode(e,!0),a.nodeType===F.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Cn(a);else{if(!Ct&&!V&&!vt&&e.indexOf(`<`)===-1)return b&&Tt?ne(e):e;if(i=sn(e),!i)return Ct?null:Tt?x:``}i&&St&&tn(i.firstChild);let l=c?e:i,u=cn(l);try{for(;o=u.nextNode();)hn(o,l),xn(o),Q(o.content)&&Sn(o.content)}catch(n){throw c&&(nn(e),ge(t.removed,e=>{e.element&&an(e.element)})),n}if(c)return ge(t.removed,e=>{e.element&&an(e.element)}),V&&un(e),e;if(Ct){if(V&&un(i),wt)for(s=le.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(I.shadowroot||I.shadowrootmode)&&(s=de.call(r,s,!0)),s}let d=vt?i.outerHTML:i.innerHTML;return vt&&j[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&k(nt,i.ownerDocument.doctype.name)&&(d=` -`+d),V&&(d=ln(d)),b&&Tt?ne(d):d},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Jt(e),yt=!0,bt=j,xt=I},t.clearConfig=function(){Gt=null,yt=!1,bt=null,xt=null,b=S,x=``},t.isValidAttribute=function(e,t,n){Gt||Jt({});let r=X(e),i=X(t);return gn(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&O(T,e)&&ye(T[e],t)},t.removeHook=function(e,t){if(O(T,e)){if(t!==void 0){let n=_e(T[e],t);return n===-1?void 0:be(T[e],n,1)[0]}return ve(T[e])}},t.removeHooks=function(e){O(T,e)&&(T[e]=[])},t.removeAllHooks=function(){T=ut()},t}var I=ft(),pt=t((e,t,{depth:n=2,clobber:r=!1}={})=>{let i={depth:n,clobber:r};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(t=>pt(e,t,i)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(t=>{e.includes(t)||e.push(t)}),e):e===void 0||n<=0?typeof e==`object`&&e&&typeof t==`object`?Object.assign(e,t):t:(t!==void 0&&typeof e==`object`&&typeof t==`object`&&Object.keys(t).forEach(i=>{typeof t[i]==`object`&&t[i]!==null&&(e[i]===void 0||typeof e[i]==`object`)?(e[i]===void 0&&(e[i]=Array.isArray(t[i])?[]:{}),e[i]=pt(e[i],t[i],{depth:n-1,clobber:r})):(r||typeof e[i]!=`object`&&typeof t[i]!=`object`)&&(e[i]=t[i])}),e)},`assignWithDepth`),L=pt,R=`#ffffff`,z=`#f2f2f2`,B=t((e,t)=>t?C(e,{s:-40,l:10}):C(e,{s:-40,l:-10}),`mkBorder`),mt=class{static{t(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#fff4dd`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.useGradient=!0,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||B(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||B(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||B(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||B(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||w(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||w(this.tertiaryColor),this.lineColor=this.lineColor||w(this.background),this.arrowheadColor=this.arrowheadColor||w(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?S(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||S(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||w(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||x(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||`navy`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||S(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||S(this.mainBkg,10)):(this.rowOdd=this.rowOdd||x(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||x(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},ht=t(e=>{let t=new mt;return t.calculate(e),t},`getThemeVariables`),gt=class{static{t(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=x(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=w(this.background),this.secondaryBorderColor=B(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=B(this.tertiaryColor,this.darkMode),this.primaryTextColor=w(this.primaryColor),this.secondaryTextColor=w(this.secondaryColor),this.tertiaryTextColor=w(this.tertiaryColor),this.lineColor=w(this.background),this.textColor=w(this.background),this.mainBkg=`#1f2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=x(w(`#323D47`),10),this.lineColor=`calculated`,this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=`calculated`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#F9FFFE`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`calculated`,this.activationBkgColor=`calculated`,this.sequenceNumberColor=`black`,this.clusterBkg=`#302F3D`,this.sectionBkgColor=S(`#EAE8D9`,30),this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`#EAE8D9`,this.excludeBkgColor=S(this.sectionBkgColor,10),this.taskBorderColor=_(255,255,255,70),this.taskBkgColor=`calculated`,this.taskTextColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=_(255,255,255,50),this.activeTaskBkgColor=`#81B1DB`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#E83737`,this.critBkgColor=`#E83737`,this.taskTextDarkColor=`calculated`,this.todayLineColor=`#DB5757`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=this.rowOdd||x(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||S(this.mainBkg,10),this.labelColor=`calculated`,this.errorBkgColor=`#a44141`,this.errorTextColor=`#ddd`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`}updateColors(){this.secondBkg=x(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=x(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=x(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=w(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#555`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=`#f4f4f4`,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=C(this.primaryColor,{h:64}),this.fillType3=C(this.secondaryColor,{h:64}),this.fillType4=C(this.primaryColor,{h:-64}),this.fillType5=C(this.secondaryColor,{h:-64}),this.fillType6=C(this.primaryColor,{h:128}),this.fillType7=C(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||`#0b0000`,this.cScale2=this.cScale2||`#4d1037`,this.cScale3=this.cScale3||`#3f5258`,this.cScale4=this.cScale4||`#4f2f1b`,this.cScale5=this.cScale5||`#6e0a0a`,this.cScale6=this.cScale6||`#3b0048`,this.cScale7=this.cScale7||`#995a01`,this.cScale8=this.cScale8||`#154706`,this.cScale9=this.cScale9||`#161722`,this.cScale10=this.cScale10||`#00296f`,this.cScale11=this.cScale11||`#01629c`,this.cScale12=this.cScale12||`#010029`,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330});for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},_t=t(e=>{let t=new gt;return t.calculate(e),t},`getThemeVariables`),V=class{static{t(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#ECECFF`,this.secondaryColor=C(this.primaryColor,{h:120}),this.secondaryColor=`#ffffde`,this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.primaryColor,this.darkMode),this.secondaryBorderColor=B(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=B(this.tertiaryColor,this.darkMode),this.primaryTextColor=w(this.primaryColor),this.secondaryTextColor=w(this.secondaryColor),this.tertiaryTextColor=w(this.tertiaryColor),this.lineColor=w(this.background),this.textColor=w(this.background),this.background=`white`,this.mainBkg=`#ECECFF`,this.secondBkg=`#ffffde`,this.lineColor=`#333333`,this.border1=`#9370DB`,this.primaryBorderColor=B(this.primaryColor,this.darkMode),this.border2=`#aaaa33`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`rgba(232,232,232, 0.8)`,this.textColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.clusterBkg=`#FBFBFF`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor=`calculated`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBorderColor=`calculated`,this.critBkgColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.sectionBkgColor=_(102,102,255,.49),this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#fff400`,this.taskBorderColor=`#534fbc`,this.taskBkgColor=`#8a90dd`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`#534fbc`,this.activeTaskBkgColor=`#bfc7ff`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`navy`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=`calculated`,this.rowEven=`calculated`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))`,this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||S(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||S(this.tertiaryColor,40);for(let e=0;e{this[e]===`calculated`&&(this[e]=void 0)}),typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},H=t(e=>{let t=new V;return t.calculate(e),t},`getThemeVariables`),vt=class{static{t(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#cde498`,this.secondaryColor=`#cdffb2`,this.background=`white`,this.mainBkg=`#cde498`,this.secondBkg=`#cdffb2`,this.lineColor=`green`,this.border1=`#13540c`,this.border2=`#6eaa49`,this.arrowheadColor=`green`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.tertiaryColor=x(`#cde498`,10),this.primaryBorderColor=B(this.primaryColor,this.darkMode),this.secondaryBorderColor=B(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=B(this.tertiaryColor,this.darkMode),this.primaryTextColor=w(this.primaryColor),this.secondaryTextColor=w(this.secondaryColor),this.tertiaryTextColor=w(this.primaryColor),this.lineColor=w(this.background),this.textColor=w(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#333`,this.edgeLabelBackground=`#e8e8e8`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`#333`,this.signalTextColor=`#333`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`#326932`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`#6eaa49`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#6eaa49`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`#487e3a`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))`}updateColors(){this.actorBorder=S(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||S(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||S(this.tertiaryColor,40);for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},yt=t(e=>{let t=new vt;return t.calculate(e),t},`getThemeVariables`),bt=class{static{t(this,`Theme`)}constructor(){this.primaryColor=`#eee`,this.contrast=`#707070`,this.secondaryColor=x(this.contrast,55),this.background=`#ffffff`,this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.primaryColor,this.darkMode),this.secondaryBorderColor=B(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=B(this.tertiaryColor,this.darkMode),this.primaryTextColor=w(this.primaryColor),this.secondaryTextColor=w(this.secondaryColor),this.tertiaryTextColor=w(this.tertiaryColor),this.lineColor=w(this.background),this.textColor=w(this.background),this.mainBkg=`#eee`,this.secondBkg=`calculated`,this.lineColor=`#666`,this.border1=`#999`,this.border2=`calculated`,this.note=`#ffa`,this.text=`#333`,this.critical=`#d42`,this.done=`#bbb`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`white`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=this.actorBorder,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`calculated`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBkgColor=`calculated`,this.critBorderColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.rowOdd=this.rowOdd||x(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||`#f4f4f4`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){this.secondBkg=x(this.contrast,55),this.border2=this.contrast,this.actorBorder=x(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor=`#999`,this.noteBkgColor=`#666`,this.noteTextColor=`#fff`,this.cScale0=this.cScale0||`#555`,this.cScale1=this.cScale1||`#F4F4F4`,this.cScale2=this.cScale2||`#555`,this.cScale3=this.cScale3||`#BBB`,this.cScale4=this.cScale4||`#777`,this.cScale5=this.cScale5||`#999`,this.cScale6=this.cScale6||`#DDD`,this.cScale7=this.cScale7||`#FFF`,this.cScale8=this.cScale8||`#DDD`,this.cScale9=this.cScale9||`#BBB`,this.cScale10=this.cScale10||`#999`,this.cScale11=this.cScale11||`#777`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},xt=t(e=>{let t=new bt;return t.calculate(e),t},`getThemeVariables`),St=class{static{t(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=B(this.primaryColor,this.darkMode),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#000000`,this.stateBorder=`#000000`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));`,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||B(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||B(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||B(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||B(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||w(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||w(this.tertiaryColor),this.lineColor=this.lineColor||w(this.background),this.arrowheadColor=this.arrowheadColor||w(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?S(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||S(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||w(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=C(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||x(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||C(e,{h:30}),this.cScale4=this.cScale4||C(e,{h:60}),this.cScale5=this.cScale5||C(e,{h:90}),this.cScale6=this.cScale6||C(e,{h:120}),this.cScale7=this.cScale7||C(e,{h:150}),this.cScale8=this.cScale8||C(e,{h:210,l:150}),this.cScale9=this.cScale9||C(e,{h:270}),this.cScale10=this.cScale10||C(e,{h:300}),this.cScale11=this.cScale11||C(e,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Ct=t(e=>{let t=new St;return t.calculate(e),t},`getThemeVariables`),wt=class{static{t(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=x(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=w(this.background),this.secondaryBorderColor=B(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=B(this.tertiaryColor,this.darkMode),this.primaryTextColor=w(this.primaryColor),this.secondaryTextColor=w(this.secondaryColor),this.tertiaryTextColor=w(this.tertiaryColor),this.mainBkg=`#2a2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=x(w(`#323D47`),10),this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=w(this.background),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||B(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||B(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||B(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||B(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||w(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||w(this.tertiaryColor),this.lineColor=this.lineColor||w(this.background),this.arrowheadColor=this.arrowheadColor||w(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?S(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||S(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||w(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||x(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Tt=t(e=>{let t=new wt;return t.calculate(e),t},`getThemeVariables`),Et=class{static{t(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=B(`#28253D`,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.clusterBkg=`#F9F9FB`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||B(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||B(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||B(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||B(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#FEF9C3`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||w(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||w(this.tertiaryColor),this.lineColor=this.lineColor||w(this.background),this.arrowheadColor=this.arrowheadColor||w(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?S(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||S(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||w(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=C(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||x(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground=`#F9F9FB`,this.altBackground=`#F9F9FB`,this.stateEdgeLabelBackground=`#FFFFFF`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Dt=t(e=>{let t=new Et;return t.calculate(e),t},`getThemeVariables`),Ot=class{static{t(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=x(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=w(this.background),this.secondaryBorderColor=B(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=B(this.tertiaryColor,this.darkMode),this.primaryTextColor=w(this.primaryColor),this.secondaryTextColor=w(this.secondaryColor),this.tertiaryTextColor=w(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=x(w(`#323D47`),10),this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=w(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.filterColor=`#FFFFFF`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||B(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||B(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||B(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||B(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||w(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||w(this.tertiaryColor),this.lineColor=this.lineColor||w(this.background),this.arrowheadColor=this.arrowheadColor||w(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?S(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||S(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||w(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||x(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground=`#16141F`,this.altBackground=`#16141F`,this.compositeTitleBackground=`#16141F`,this.stateEdgeLabelBackground=`#16141F`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||C(this.primaryColor,{h:30}),this.cScale4=this.cScale4||C(this.primaryColor,{h:60}),this.cScale5=this.cScale5||C(this.primaryColor,{h:90}),this.cScale6=this.cScale6||C(this.primaryColor,{h:120}),this.cScale7=this.cScale7||C(this.primaryColor,{h:150}),this.cScale8=this.cScale8||C(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||C(this.primaryColor,{h:270}),this.cScale10=this.cScale10||C(this.primaryColor,{h:300}),this.cScale11=this.cScale11||C(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},kt=t(e=>{let t=new Ot;return t.calculate(e),t},`getThemeVariables`),At=class{static{t(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=B(this.primaryColor,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[`#FDF4FF`,`#F0FDFA`,`#FFF7ED`,`#ECFEFF`,`#F0FDF4`,`#F5F3FF`,`#FEF2F2`,`#FEFCE8`,`#EEF2FF`,`#F7FEE7`,`#F0F9FF`,`#FFF1F2`],this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||B(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||B(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||B(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||B(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||w(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||w(this.tertiaryColor),this.lineColor=this.lineColor||w(this.background),this.arrowheadColor=this.arrowheadColor||w(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?S(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||S(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||w(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=C(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||x(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},jt=t(e=>{let t=new At;return t.calculate(e),t},`getThemeVariables`),U=class{static{t(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=x(this.primaryColor,16),this.tertiaryColor=C(this.primaryColor,{h:-160}),this.primaryBorderColor=w(this.background),this.secondaryBorderColor=B(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=B(this.tertiaryColor,this.darkMode),this.primaryTextColor=w(this.primaryColor),this.secondaryTextColor=w(this.secondaryColor),this.tertiaryTextColor=w(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=x(w(`#323D47`),10),this.border1=`#ccc`,this.border2=_(255,255,255,.25),this.arrowheadColor=w(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[],this.filterColor=`#FFFFFF`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||C(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||C(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||B(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||B(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||B(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||B(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||w(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||w(this.tertiaryColor),this.lineColor=this.lineColor||w(this.background),this.arrowheadColor=this.arrowheadColor||w(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?S(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||S(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||w(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor=`#FFFFFF`,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||x(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},W={base:{getThemeVariables:ht},dark:{getThemeVariables:_t},default:{getThemeVariables:H},forest:{getThemeVariables:yt},neutral:{getThemeVariables:xt},neo:{getThemeVariables:Ct},"neo-dark":{getThemeVariables:Tt},redux:{getThemeVariables:Dt},"redux-dark":{getThemeVariables:kt},"redux-color":{getThemeVariables:jt},"redux-dark-color":{getThemeVariables:t(e=>{let t=new U;return t.calculate(e),t},`getThemeVariables`)}},G={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:`basis`,padding:15,defaultRenderer:`dagre-wrapper`,wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:`arc`,ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:`"Open Sans", sans-serif`,actorFontWeight:400,noteFontSize:14,noteFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,noteFontWeight:400,noteAlign:`center`,messageFontSize:16,messageFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:`%Y-%m-%d`,topAxis:!1,displayMode:``,weekday:`sunday`},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],titleColor:``,titleFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,titleFontSize:`4ex`},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:`dagre-wrapper`,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:`20`,compositTitleSize:35,radius:5,defaultRenderer:`dagre-wrapper`},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:`TB`,minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:`gray`,fill:`honeydew`,fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:`right`,highlightSlice:``},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:`top`,yAxisPosition:`left`,quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:`vertical`,plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:`#f9f9f9`,text_color:`#333`,rect_border_size:`0.5px`,rect_border_color:`#bbb`,rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:`cose-bilkent`},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:``},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:`main`,mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:`"Open Sans", sans-serif`,personFontWeight:`normal`,external_personFontSize:14,external_personFontFamily:`"Open Sans", sans-serif`,external_personFontWeight:`normal`,systemFontSize:14,systemFontFamily:`"Open Sans", sans-serif`,systemFontWeight:`normal`,external_systemFontSize:14,external_systemFontFamily:`"Open Sans", sans-serif`,external_systemFontWeight:`normal`,system_dbFontSize:14,system_dbFontFamily:`"Open Sans", sans-serif`,system_dbFontWeight:`normal`,external_system_dbFontSize:14,external_system_dbFontFamily:`"Open Sans", sans-serif`,external_system_dbFontWeight:`normal`,system_queueFontSize:14,system_queueFontFamily:`"Open Sans", sans-serif`,system_queueFontWeight:`normal`,external_system_queueFontSize:14,external_system_queueFontFamily:`"Open Sans", sans-serif`,external_system_queueFontWeight:`normal`,boundaryFontSize:14,boundaryFontFamily:`"Open Sans", sans-serif`,boundaryFontWeight:`normal`,messageFontSize:12,messageFontFamily:`"Open Sans", sans-serif`,messageFontWeight:`normal`,containerFontSize:14,containerFontFamily:`"Open Sans", sans-serif`,containerFontWeight:`normal`,external_containerFontSize:14,external_containerFontFamily:`"Open Sans", sans-serif`,external_containerFontWeight:`normal`,container_dbFontSize:14,container_dbFontFamily:`"Open Sans", sans-serif`,container_dbFontWeight:`normal`,external_container_dbFontSize:14,external_container_dbFontFamily:`"Open Sans", sans-serif`,external_container_dbFontWeight:`normal`,container_queueFontSize:14,container_queueFontFamily:`"Open Sans", sans-serif`,container_queueFontWeight:`normal`,external_container_queueFontSize:14,external_container_queueFontFamily:`"Open Sans", sans-serif`,external_container_queueFontWeight:`normal`,componentFontSize:14,componentFontFamily:`"Open Sans", sans-serif`,componentFontWeight:`normal`,external_componentFontSize:14,external_componentFontFamily:`"Open Sans", sans-serif`,external_componentFontWeight:`normal`,component_dbFontSize:14,component_dbFontFamily:`"Open Sans", sans-serif`,component_dbFontWeight:`normal`,external_component_dbFontSize:14,external_component_dbFontFamily:`"Open Sans", sans-serif`,external_component_dbFontWeight:`normal`,component_queueFontSize:14,component_queueFontFamily:`"Open Sans", sans-serif`,component_queueFontWeight:`normal`,external_component_queueFontSize:14,external_component_queueFontFamily:`"Open Sans", sans-serif`,external_component_queueFontWeight:`normal`,wrap:!0,wrapPadding:10,person_bg_color:`#08427B`,person_border_color:`#073B6F`,external_person_bg_color:`#686868`,external_person_border_color:`#8A8A8A`,system_bg_color:`#1168BD`,system_border_color:`#3C7FC0`,system_db_bg_color:`#1168BD`,system_db_border_color:`#3C7FC0`,system_queue_bg_color:`#1168BD`,system_queue_border_color:`#3C7FC0`,external_system_bg_color:`#999999`,external_system_border_color:`#8A8A8A`,external_system_db_bg_color:`#999999`,external_system_db_border_color:`#8A8A8A`,external_system_queue_bg_color:`#999999`,external_system_queue_border_color:`#8A8A8A`,container_bg_color:`#438DD5`,container_border_color:`#3C7FC0`,container_db_bg_color:`#438DD5`,container_db_border_color:`#3C7FC0`,container_queue_bg_color:`#438DD5`,container_queue_border_color:`#3C7FC0`,external_container_bg_color:`#B3B3B3`,external_container_border_color:`#A6A6A6`,external_container_db_bg_color:`#B3B3B3`,external_container_db_border_color:`#A6A6A6`,external_container_queue_bg_color:`#B3B3B3`,external_container_queue_border_color:`#A6A6A6`,component_bg_color:`#85BBF0`,component_border_color:`#78A8D8`,component_db_bg_color:`#85BBF0`,component_db_border_color:`#78A8D8`,component_queue_bg_color:`#85BBF0`,component_queue_border_color:`#78A8D8`,external_component_bg_color:`#CCCCCC`,external_component_border_color:`#BFBFBF`,external_component_db_bg_color:`#CCCCCC`,external_component_db_border_color:`#BFBFBF`,external_component_queue_bg_color:`#CCCCCC`,external_component_queue_border_color:`#BFBFBF`},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:`gradient`,nodeAlignment:`justify`,showValues:!0,prefix:``,suffix:``,nodeWidth:10,nodePadding:12,labelStyle:`legacy`},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:``,filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:`default`,look:`classic`,handDrawnSeed:0,layout:`dagre`,maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:`"trebuchet ms", verdana, arial, sans-serif;`,logLevel:5,securityLevel:`strict`,startOnLoad:!0,arrowMarkerAbsolute:!1,secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`suppressErrorRendering`,`maxEdges`],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Mt={...G,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:`BRANDES_KOEPF`,forceNodeModelOrder:!1,considerModelOrder:`NODES_AND_EDGES`},themeCSS:void 0,themeVariables:W.default.getThemeVariables(),sequence:{...G.sequence,messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`),noteFont:t(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},`noteFont`),actorFont:t(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},`actorFont`)},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...G.gantt,tickInterval:void 0,useWidth:void 0},c4:{...G.c4,useWidth:void 0,personFont:t(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},`personFont`),flowchart:{...G.flowchart,inheritDir:!1},external_personFont:t(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},`external_personFont`),systemFont:t(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},`systemFont`),external_systemFont:t(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},`external_systemFont`),system_dbFont:t(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},`system_dbFont`),external_system_dbFont:t(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},`external_system_dbFont`),system_queueFont:t(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},`system_queueFont`),external_system_queueFont:t(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},`external_system_queueFont`),containerFont:t(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},`containerFont`),external_containerFont:t(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},`external_containerFont`),container_dbFont:t(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},`container_dbFont`),external_container_dbFont:t(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},`external_container_dbFont`),container_queueFont:t(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},`container_queueFont`),external_container_queueFont:t(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},`external_container_queueFont`),componentFont:t(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},`componentFont`),external_componentFont:t(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},`external_componentFont`),component_dbFont:t(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},`component_dbFont`),external_component_dbFont:t(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},`external_component_dbFont`),component_queueFont:t(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},`component_queueFont`),external_component_queueFont:t(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},`external_component_queueFont`),boundaryFont:t(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},`boundaryFont`),messageFont:t(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`)},pie:{...G.pie,useWidth:984},xyChart:{...G.xyChart,useWidth:void 0},requirement:{...G.requirement,useWidth:void 0},packet:{...G.packet},eventmodeling:{...G.eventmodeling},treeView:{...G.treeView,useWidth:void 0},radar:{...G.radar},railroad:{...G.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...G.ishikawa},sankey:{...G.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:`,`},venn:{...G.venn},cynefin:{...G.cynefin}},Nt=t((e,t=``)=>Object.keys(e).reduce((n,r)=>Array.isArray(e[r])?n:typeof e[r]==`object`&&e[r]!==null?[...n,t+r,...Nt(e[r],``)]:[...n,t+r],[]),`keyify`),Pt=new Set(Nt(Mt,``)),Ft=Mt,It={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},K=t((e,t)=>{for(let n of Object.keys(e)){let r=e[n];(n.startsWith(`__`)||n.includes(`proto`)||n.includes(`constr`)||typeof r!=`string`||!t.test(r))&&(i.debug(`sanitize deleting dictionary entry:`,n,r),delete e[n])}},`sanitizeDictionaryConfig`),q=t(e=>{if(i.debug(`sanitizeDirective called with`,e),!(typeof e!=`object`||!e)){if(Array.isArray(e)){e.forEach(e=>q(e));return}for(let t of Object.keys(e)){if(i.debug(`Checking key`,t),t.startsWith(`__`)||t.includes(`proto`)||t.includes(`constr`)||!Pt.has(t)||e[t]==null){i.debug(`sanitize deleting key: `,t),delete e[t];continue}if(typeof e[t]==`object`){let n=It[t];n?K(e[t],n):(i.debug(`sanitizing object`,t),q(e[t]));continue}for(let n of[`themeCSS`,`fontFamily`,`altFontFamily`])t.includes(n)&&(i.debug(`sanitizing css option`,t),e[t]=Lt(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let n=e.themeVariables[t];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]=``)}i.debug(`After sanitization`,e)}},`sanitizeDirective`),Lt=t(e=>{let t=0,n=0;for(let r of e){if(t!(e===!1||[`false`,`null`,`0`].includes(String(e).trim().toLowerCase())),`evaluate`),J=L({},Rt),Bt,Y=[],Vt=L({},Rt),Ht=t((e,t)=>{let n=L({},e),r={};for(let e of t)Jt(e),r=L(r,e);if(n=L(n,r),r.theme&&r.theme in W){let e=L(L({},Bt).themeVariables||{},r.themeVariables);n.theme&&n.theme in W&&(n.themeVariables=W[n.theme].getThemeVariables(e))}return Vt=n,en(Vt),Vt},`updateCurrentConfig`),Ut=t(e=>(J=L({},Rt),J=L(J,e),e.theme&&W[e.theme]&&(J.themeVariables=W[e.theme].getThemeVariables(e.themeVariables)),Ht(J,Y),J),`setSiteConfig`),Wt=t(e=>{Bt=L({},e)},`saveConfigFromInitialize`),X=t(e=>(J=L(J,e),Ht(J,Y),J),`updateSiteConfig`),Gt=t(()=>L({},J),`getSiteConfig`),Kt=t(e=>(en(e),L(Vt,e),qt()),`setConfig`),qt=t(()=>L({},Vt),`getConfig`),Jt=t(e=>{e&&([`secure`,...J.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(i.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith(`__`)&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]==`string`&&(e[t].includes(`<`)||e[t].includes(`>`)||e[t].includes(`url(data:`))&&delete e[t],typeof e[t]==`object`&&Jt(e[t])}))},`sanitize`),Yt=t(e=>{q(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Y.push(e),Ht(J,Y)},`addDirective`),Xt=t((e=J)=>{Y=[],Ht(e,Y)},`reset`),Zt={LAZY_LOAD_DEPRECATED:`The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.`,FLOWCHART_HTML_LABELS_DEPRECATED:`flowchart.htmlLabels is deprecated. Please use global htmlLabels instead.`},Qt={},$t=t(e=>{Qt[e]||(i.warn(Zt[e]),Qt[e]=!0)},`issueWarning`),en=t(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&$t(`LAZY_LOAD_DEPRECATED`)},`checkConfig`),tn=t(()=>{let e={};Bt&&(e=L(e,Bt));for(let t of Y)e=L(e,t);return e},`getUserDefinedConfig`),nn=t(e=>(e.flowchart?.htmlLabels!=null&&$t(`FLOWCHART_HTML_LABELS_DEPRECATED`),zt(e.htmlLabels??e.flowchart?.htmlLabels??!0)),`getEffectiveHtmlLabels`),Z=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,rn=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,an=/\s*%%.*\n/gm,on=class extends Error{static{t(this,`UnknownDiagramError`)}constructor(e){super(e),this.name=`UnknownDiagramError`}},sn={},cn=t(function(e,t){e=e.replace(Z,``).replace(rn,``).replace(an,` -`);for(let[n,{detector:r}]of Object.entries(sn))if(r(e,t))return n;throw new on(`No diagram type detected matching given configuration for text: ${e}`)},`detectType`),ln=t((...e)=>{for(let{id:t,detector:n,loader:r}of e)un(t,n,r)},`registerLazyLoadedDiagrams`),un=t((e,t,n)=>{sn[e]&&i.warn(`Detector with key ${e} already exists. Overwriting.`),sn[e]={detector:t,loader:n},i.debug(`Detector with key ${e} added${n?` with loader`:``}`)},`addDetector`),dn=t(e=>sn[e].loader,`getDiagramLoader`),Q=//gi,fn=t(e=>e?xn(e).replace(/\\n/g,`#br#`).split(`#br#`):[``],`getRows`),$=(()=>{let e=!1;return()=>{e||=(pn(),!0)}})();function pn(){let e=`data-temp-href-target`;I.addHook(`beforeSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(`target`)&&t.setAttribute(e,t.getAttribute(`target`)??``)}),I.addHook(`afterSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(e)&&(t.setAttribute(`target`,t.getAttribute(e)??``),t.removeAttribute(e),t.getAttribute(`target`)===`_blank`&&t.setAttribute(`rel`,`noopener`))})}t(pn,`setupDompurifyHooks`);var mn=t(e=>($(),I.sanitize(e)),`removeScript`),hn=t((e,t)=>{if(nn(t)){let n=t.securityLevel;n===`antiscript`||n===`strict`||n===`sandbox`?e=mn(e):n!==`loose`&&(e=xn(e),e=e.replace(//g,`>`),e=e.replace(/=/g,`=`),e=bn(e))}return e},`sanitizeMore`),gn=t((e,t)=>e&&(e=t.dompurifyConfig?I.sanitize(hn(e,t),t.dompurifyConfig).toString():I.sanitize(hn(e,t),{FORBID_TAGS:[`style`]}).toString(),e),`sanitizeText`),_n=t((e,t)=>typeof e==`string`?gn(e,t):e.flat().map(e=>gn(e,t)),`sanitizeTextOrArray`),vn=t(e=>Q.test(e),`hasBreaks`),yn=t(e=>e.split(Q),`splitBreaks`),bn=t(e=>e.replace(/#br#/g,`
    `),`placeholderToBreak`),xn=t(e=>e.replace(Q,`#br#`),`breakToPlaceholder`),Sn=t(e=>{let t=``;return e&&(t=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},`getUrl`),Cn=t(function(...e){let t=e.filter(e=>!isNaN(e));return Math.max(...t)},`getMax`),wn=t(function(...e){let t=e.filter(e=>!isNaN(e));return Math.min(...t)},`getMin`),Tn=t(function(e){let t=e.split(/(,)/),n=[];for(let e=0;e0&&e+1Math.max(0,e.split(t).length-1),`countOccurrence`),Dn=t((e,t)=>{let n=En(e,`~`),r=En(t,`~`);return n===1&&r===1},`shouldCombineSets`),On=t(e=>{let t=En(e,`~`),n=!1;if(t<=1)return e;t%2!=0&&e.startsWith(`~`)&&(e=e.substring(1),n=!0);let r=[...e],i=r.indexOf(`~`),a=r.lastIndexOf(`~`);for(;i!==-1&&a!==-1&&i!==a;)r[i]=`<`,r[a]=`>`,i=r.indexOf(`~`),a=r.lastIndexOf(`~`);return n&&r.unshift(`~`),r.join(``)},`processSet`),kn=t(()=>window.MathMLElement!==void 0,`isMathMLSupported`),An=/\$\$(.*?)\$\$/g,jn=t(e=>(e.match(An)?.length??0)>0,`hasKatex`),Mn=t(async(e,t)=>{let n=document.createElement(`div`);n.innerHTML=await Pn(e,t),n.id=`katex-temp`,n.style.visibility=`hidden`,n.style.position=`absolute`,n.style.top=`0`,document.querySelector(`body`)?.insertAdjacentElement(`beforeend`,n);let r={width:n.clientWidth,height:n.clientHeight};return n.remove(),r},`calculateMathMLDimensions`),Nn=t(async(t,n)=>{if(!jn(t))return t;if(!(kn()||n.legacyMathML||n.forceLegacyMathML))return t.replace(An,`MathML is unsupported in this environment.`);{let{default:r}=await e(async()=>{let{default:e}=await import(`./katex-B7rAX3Vi.js`);return{default:e}},[]),i=n.forceLegacyMathML||!kn()&&n.legacyMathML?`htmlAndMathml`:`mathml`;return t.split(Q).map(e=>jn(e)?`
    ${e}
    `:`
    ${e}
    `).join(``).replace(An,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g,` `).replace(//g,``))}return t.replace(An,`Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.`)},`renderKatexUnsanitized`),Pn=t(async(e,t)=>gn(await Nn(e,t),t),`renderKatexSanitized`),Fn={getRows:fn,sanitizeText:gn,sanitizeTextOrArray:_n,hasBreaks:vn,splitBreaks:yn,lineBreakRegex:Q,removeScript:mn,getUrl:Sn,evaluate:zt,getMax:Cn,getMin:wn},In=t(function(e,t){for(let n of t)e.attr(n[0],n[1])},`d3Attrs`),Ln=t(function(e,t,n){let r=new Map;return n?(r.set(`width`,`100%`),r.set(`style`,`max-width: ${t}px;`)):(r.set(`height`,e),r.set(`width`,t)),r},`calculateSvgSizeAttrs`),Rn=t(function(e,t,n,r){In(e,Ln(t,n,r))},`configureSvgSize`),zn=t(function(e,t,n,r){let a=t.node().getBBox(),o=a.width,s=a.height;i.info(`SVG bounds: ${o}x${s}`,a);let c=0,l=0;i.info(`Graph bounds: ${c}x${l}`,e),c=o+n*2,l=s+n*2,i.info(`Calculated bounds: ${c}x${l}`),Rn(t,l,c,r);let u=`${a.x-n} ${a.y-n} ${a.width+2*n} ${a.height+2*n}`;t.attr(`viewBox`,u)},`setupGraphViewbox`),Bn={};function Vn(e){return[...e.cssRules].map(e=>e.cssText).join(` -`)}t(Vn,`cssStyleSheetToString`);var Hn=t((e,t,n,r)=>{let a=``;return e in Bn&&Bn[e]?a=Bn[e]({...n,svgId:r}):i.warn(`No theme found for ${e}`),` & { - font-family: ${n.fontFamily}; - font-size: ${n.fontSize}; - fill: ${n.textColor} - } - @keyframes edge-animation-frame { - from { - stroke-dashoffset: 0; - } - } - @keyframes dash { - to { - stroke-dashoffset: 0; - } - } - & .edge-animation-slow { - stroke-dasharray: 9,5 !important; - stroke-dashoffset: 900; - animation: dash 50s linear infinite; - stroke-linecap: round; - } - & .edge-animation-fast { - stroke-dasharray: 9,5 !important; - stroke-dashoffset: 900; - animation: dash 20s linear infinite; - stroke-linecap: round; - } - /* Classes common for multiple diagrams */ - - & .error-icon { - fill: ${n.errorBkgColor}; - } - & .error-text { - fill: ${n.errorTextColor}; - stroke: ${n.errorTextColor}; - } - - & .edge-thickness-normal { - stroke-width: ${n.strokeWidth??1}px; - } - & .edge-thickness-thick { - stroke-width: 3.5px - } - & .edge-pattern-solid { - stroke-dasharray: 0; - } - & .edge-thickness-invisible { - stroke-width: 0; - fill: none; - } - & .edge-pattern-dashed{ - stroke-dasharray: 3; - } - .edge-pattern-dotted { - stroke-dasharray: 2; - } - - & .marker { - fill: ${n.lineColor}; - stroke: ${n.lineColor}; - } - & .marker.cross { - stroke: ${n.lineColor}; - } - - & svg { - font-family: ${n.fontFamily}; - font-size: ${n.fontSize}; - } - & p { - margin: 0 - } - - ${a} - .node .neo-node { - stroke: ${n.nodeBorder}; - } - - [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon { - stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; - filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; - } - [data-look="neo"].swimlane.cluster rect { - filter: none; - } - - - [data-look="neo"].node path { - stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; - stroke-width: ${n.strokeWidth??1}px; - } - - [data-look="neo"].node .outer-path { - filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; - } - - [data-look="neo"].node .neo-line path { - stroke: ${n.nodeBorder}; - filter: none; - } - - [data-look="neo"].node circle{ - stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; - filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; - } - - [data-look="neo"].node circle .state-start{ - fill: #000000; - } - - [data-look="neo"].icon-shape .icon { - fill: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; - filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; - } - - [data-look="neo"].icon-shape .icon-neo path { - stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder}; - filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`}; - } - - ${t} -`},`getStyles`),Un=t((e,t)=>{t!==void 0&&(Bn[e]=t)},`addStylesForDiagram`),Wn=Hn,Gn={};n(Gn,{clear:()=>Xn,getAccDescription:()=>er,getAccTitle:()=>Qn,getDiagramTitle:()=>nr,setAccDescription:()=>$n,setAccTitle:()=>Zn,setDiagramTitle:()=>tr});var Kn=``,qn=``,Jn=``,Yn=t(e=>gn(e,qt()),`sanitizeText`),Xn=t(()=>{Kn=``,Jn=``,qn=``},`clear`),Zn=t(e=>{Kn=Yn(e).replace(/^\s+/g,``)},`setAccTitle`),Qn=t(()=>Kn,`getAccTitle`),$n=t(e=>{Jn=Yn(e).replace(/\n\s+/g,` -`)},`setAccDescription`),er=t(()=>Jn,`getAccDescription`),tr=t(e=>{qn=Yn(e)},`setDiagramTitle`),nr=t(()=>qn,`getDiagramTitle`),rr=i,ir=r,ar=qt,or=Kt,sr=Rt,cr=t(e=>gn(e,ar()),`sanitizeText`),lr=zn,ur=t(()=>Gn,`getCommonDb`),dr={},fr=t((e,t,n)=>{dr[e]&&rr.warn(`Diagram with id ${e} already registered. Overwriting.`),dr[e]=t,n&&un(e,n),Un(e,t.styles),t.injectUtils?.(rr,ir,ar,cr,lr,ur(),()=>{})},`registerDiagram`),pr=t(e=>{if(e in dr)return dr[e];throw new mr(e)},`getDiagram`),mr=class extends Error{static{t(this,`DiagramNotFoundError`)}constructor(e){super(`Diagram ${e} not found.`)}};export{I as $,jn as A,cr as B,dn as C,H as D,Gt as E,Pn as F,or as G,$n as H,Xt as I,zn as J,tr as K,Lt as L,Tn as M,fr as N,Sn as O,ln as P,X as Q,q as R,pr as S,nn as T,Zn as U,Wt as V,Kt as W,Wn as X,lr as Y,W as Z,Z as _,Xn as a,h as at,qt as b,Rn as c,sr as d,S as et,Ft as f,zt as g,rn as h,Mn as i,_ as it,Q as j,tn as k,Vn as l,sn as m,Yt as n,b as nt,Gn as o,o as ot,cn as p,Ut as q,L as r,y as rt,Fn as s,on as t,x as tt,Rt as u,er as v,nr as w,ar as x,Qn as y,gn as z}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-XXDRQBXY-Bq6zMMOx.js b/dist-desktop/assets/chunk-XXDRQBXY-Bq6zMMOx.js deleted file mode 100644 index 1db543a..0000000 --- a/dist-desktop/assets/chunk-XXDRQBXY-Bq6zMMOx.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-UMNXGZaF.js";var n=e((e,n)=>{let r;return n===`sandbox`&&(r=t(`#i`+e)),t(n===`sandbox`?r.nodes()[0].contentDocument.body:`body`).select(`[id="${e}"]`)},`getDiagramElement`);export{n as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-Y2CYZVJY-DsF7k-Jl.js b/dist-desktop/assets/chunk-Y2CYZVJY-DsF7k-Jl.js deleted file mode 100644 index 70c3d40..0000000 --- a/dist-desktop/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +++ /dev/null @@ -1 +0,0 @@ -var e=Object.defineProperty,t=(t,n)=>e(t,`name`,{value:n,configurable:!0}),n=(t,n)=>{for(var r in n)e(t,r,{get:n[r],enumerable:!0})};export{t as n,n as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-YOTPTUD7-CjHV8V6f.js b/dist-desktop/assets/chunk-YOTPTUD7-CjHV8V6f.js deleted file mode 100644 index 3b9e741..0000000 --- a/dist-desktop/assets/chunk-YOTPTUD7-CjHV8V6f.js +++ /dev/null @@ -1 +0,0 @@ -import{C as e,S as t,f as n,n as r,o as i,t as a,u as o,w as s,x as c}from"./chunk-KEIR6QF5-Dj-OpFgW.js";var l=class extends a{static{c(this,`PieTokenBuilder`)}constructor(){super([`pie`,`showData`])}},u=class extends r{static{c(this,`PieValueConverter`)}runCustomConverter(e,t,n){if(e.name===`PIE_SECTION_LABEL`)return t.replace(/"/g,``).trim()}},d={parser:{TokenBuilder:c(()=>new l,`TokenBuilder`),ValueConverter:c(()=>new u,`ValueConverter`)}};function f(r=i){let a=s(e(r),o),c=s(t({shared:a}),n,d);return a.ServiceRegistry.register(c),{shared:a,Pie:c}}c(f,`createPieServices`);export{f as n,d as t}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-ZGVPDNZ5-DGInJAPD.js b/dist-desktop/assets/chunk-ZGVPDNZ5-DGInJAPD.js deleted file mode 100644 index 530bb02..0000000 --- a/dist-desktop/assets/chunk-ZGVPDNZ5-DGInJAPD.js +++ /dev/null @@ -1,62 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-UMNXGZaF.js";import{A as r,B as i,M as a,T as o,b as s,g as c,x as l,z as u}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{a as d,r as f,u as p}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as m}from"./chunk-HOUHSVGY-iJuv90UH.js";import{n as h}from"./chunk-Q4XR5HBZ-CQ8zkLYc.js";import{n as g,t as _}from"./chunk-OGEWGWER-D-nWYRNR.js";import{a as v,i as y,r as b,t as x}from"./chunk-C7G6YPKG-DW-1jWUA.js";import{t as S}from"./rough.esm-CSKSodPl.js";var C=e(async(e,t,r)=>{let i,a=t.useHtmlLabels||c(l()?.htmlLabels);i=r||`node default`;let o=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),s=o.insert(`g`).attr(`class`,`label`).attr(`style`,p(t.labelStyle)),f;f=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let m=!!t.icon||!!t.img,g=t.labelType===`markdown`,v=await h(s,u(d(f),l()),{useHtmlLabels:a,width:t.width||l().flowchart?.wrappingWidth,classes:g?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:m,markdown:g},l()),y=v.getBBox(),b=(t?.padding??0)/2;if(a){let e=v.children[0],t=n(v);await _(e,f),y=e.getBoundingClientRect(),t.attr(`width`,y.width),t.attr(`height`,y.height)}return a?s.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`):s.attr(`transform`,`translate(0, `+-y.height/2+`)`),t.centerLabel&&s.attr(`transform`,`translate(`+-y.width/2+`, `+-y.height/2+`)`),s.insert(`rect`,`:first-child`),{shapeSvg:o,bbox:y,halfPadding:b,label:s}},`labelHelper`),w=e(async(e,t,r)=>{let i=r.useHtmlLabels??o(l()),a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.labelStyle||``),s=await h(a,u(d(t),l()),{useHtmlLabels:i,width:r.width||l()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),c=s.getBBox(),f=r.padding/2;if(o(l())){let e=s.children[0],t=n(s);c=e.getBoundingClientRect(),t.attr(`width`,c.width),t.attr(`height`,c.height)}return i?a.attr(`transform`,`translate(`+-c.width/2+`, `+-c.height/2+`)`):a.attr(`transform`,`translate(0, `+-c.height/2+`)`),r.centerLabel&&a.attr(`transform`,`translate(`+-c.width/2+`, `+-c.height/2+`)`),a.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:c,halfPadding:f,label:a}},`insertLabel`),T=e((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),E=e((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function D(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}e(D,`createPathFromPoints`);function O(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}e(O,`generateFullSineWavePoints`);function k(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;ie.tagName===`path`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),i=n.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);r.setAttribute(`d`,i);let a=n.find(e=>e.getAttribute(`fill`)!==`none`),o=n.find(e=>e.getAttribute(`stroke`)!==`none`),s=e((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(a){let e={fill:s(a,`fill`),"fill-opacity":s(a,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}if(o){let e={stroke:s(o,`stroke`),"stroke-width":s(o,`stroke-width`)??`1`,"stroke-opacity":s(o,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&r.setAttribute(e,t)})}let c=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return c.appendChild(r),c}e(A,`mergePaths`);var j=e((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),M=e(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let s=l(),c=o(s);return await h(e,a,{style:n,isTitle:r,useHtmlLabels:c,markdown:!1,isNode:i,width:1/0},s)},`createLabel`),N=e((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),P=e(async(e,r)=>{let i=l(),{themeVariables:a,handDrawnSeed:o}=i,{clusterBkg:s,clusterBorder:u}=a,d=u,{labelStyles:f,nodeStyles:p,borderStyles:m,backgroundStyles:g}=y(r),_=e.insert(`g`).attr(`class`,`cluster swimlane `+(r.cssClasses||``)).attr(`id`,r.id).attr(`data-id`,r.id).attr(`data-et`,`cluster`).attr(`data-look`,r.look),b=c(i.flowchart.htmlLabels),x=r.direction===`LR`,C=_.insert(`g`).attr(`class`,`cluster-label swimlane-label`),w=await h(C,r.label,{style:r.labelStyle,useHtmlLabels:b,isNode:!0,width:r.width}),T=w.getBBox();if(b){let e=w.children[0],t=n(w);T=e.getBoundingClientRect(),t.attr(`width`,T.width),t.attr(`height`,T.height)}let E=r.padding??0,D=r.width<=T.width+E?T.width+E:r.width;r.width<=T.width+E?r.diff=(D-r.width)/2-E:r.diff=-E;let O=r.height,k=r.y-O/2,A=r.y+O/2,M=r.x-D/2,N=r.swimlaneContentTop===void 0?k+O/3:r.swimlaneContentTop,P=x?4:0,F=T.height+2*P,I,L;if(x){let e=Math.max(F,T.height+2*P),t=M+e,n=Math.max(0,D-e);if(r.look===`handDrawn`){let i=S.svg(_),a=v(r,{roughness:.7,fill:s,stroke:d,fillWeight:3,seed:o}),c=v(r,{roughness:.7,fill:`none`,stroke:d,seed:o}),l=i.rectangle(M,k,e,O,a);I=_.insert(()=>l,`:first-child`);let u=i.rectangle(t,k,n,O,c);L=_.insert(()=>u,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),I.select(`path`).attr(`style`,g.join(`;`).replace(`fill`,`stroke`))}else I=_.insert(`rect`,`:first-child`),L=_.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,p).attr(`x`,M).attr(`y`,k).attr(`width`,e).attr(`height`,O).attr(`fill`,s).attr(`stroke`,d),L.attr(`class`,`swimlane-body`).attr(`style`,p).attr(`x`,t).attr(`y`,k).attr(`width`,n).attr(`height`,O).attr(`fill`,`none`).attr(`stroke`,d);let i=M+e/2,a=r.y;C.attr(`transform`,`translate(${i}, ${a}) rotate(-90) translate(${-T.width/2}, ${-T.height/2})`)}else{let e=Math.max(0,N-k),t=Math.min(F,e),n=k+t,i=Math.max(0,A-n),a=r.x-D/2;if(r.look===`handDrawn`){let e=S.svg(_),c=v(r,{roughness:.7,fill:s,stroke:d,fillWeight:3,seed:o}),l=v(r,{roughness:.7,fill:`none`,stroke:d,seed:o}),u=e.rectangle(a,k,D,t,c);I=_.insert(()=>u,`:first-child`);let f=e.rectangle(a,n,D,i,l);L=_.insert(()=>f,`:first-child`),I.select(`path:nth-child(2)`).attr(`style`,m.join(`;`)),I.select(`path`).attr(`style`,g.join(`;`).replace(`fill`,`stroke`))}else I=_.insert(`rect`,`:first-child`),L=_.insert(`rect`,`:first-child`),I.attr(`class`,`swimlane-title`).attr(`style`,p).attr(`x`,a).attr(`y`,k).attr(`width`,D).attr(`height`,t).attr(`fill`,s).attr(`stroke`,d),L.attr(`class`,`swimlane-body`).attr(`style`,p).attr(`x`,a).attr(`y`,n).attr(`width`,D).attr(`height`,i).attr(`fill`,`none`).attr(`stroke`,d);let c=r.x-T.width/2,l=k+(t-T.height)/2;C.attr(`transform`,`translate(${c}, ${l})`)}if(t.trace(`Swimlane data `,r,JSON.stringify(r)),f){let e=C.select(`span`);e&&e.attr(`style`,f)}return r.offsetX=0,r.width=D,r.height=O,r.offsetY=T.height-E/2,r.intersect=function(e){return j(r,e)},{cluster:_,labelBBox:T}},`swimlane`),F=e(async(e,r)=>{t.info(`Creating subgraph rect for `,r.id,r);let i=l(),{themeVariables:a,handDrawnSeed:s}=i,{clusterBkg:c,clusterBorder:u}=a,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=y(r),_=e.insert(`g`).attr(`class`,`cluster `+r.cssClasses).attr(`id`,r.domId).attr(`data-look`,r.look),b=o(i),x=_.insert(`g`).attr(`class`,`cluster-label `),C;C=r.labelType===`markdown`?await h(x,r.label,{style:r.labelStyle,useHtmlLabels:b,isNode:!0,width:r.width}):await M(x,r.label,r.labelStyle||``,!1,!0);let w=C.getBBox();if(o(i)){let e=C.children[0],t=n(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=r.width<=w.width+r.padding?w.width+r.padding:r.width;r.width<=w.width+r.padding?r.diff=(T-r.width)/2-r.padding:r.diff=-r.padding;let E=r.height,D=r.x-T/2,O=r.y-E/2;t.trace(`Data `,r,JSON.stringify(r));let k;if(r.look===`handDrawn`){let e=S.svg(_),n=v(r,{roughness:.7,fill:c,stroke:u,fillWeight:3,seed:s}),i=e.path(N(D,O,T,E,0),n);k=_.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,m.join(`;`).replace(`fill`,`stroke`))}else k=_.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,r.rx).attr(`ry`,r.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=g(i);if(x.attr(`transform`,`translate(${r.x-w.width/2}, ${r.y-r.height/2+A})`),d){let e=x.select(`span`);e&&e.attr(`style`,d)}let P=k.node().getBBox();return r.offsetX=0,r.width=P.width,r.height=P.height,r.offsetY=w.height-r.padding/2,r.intersect=function(e){return j(r,e)},{cluster:_,labelBBox:w}},`rect`),I={rect:F,squareRect:F,roundedWithTitle:e(async(e,t)=>{let r=l(),{themeVariables:i,handDrawnSeed:a}=r,{altBackground:s,compositeBackground:c,compositeTitleBackground:u,nodeBorder:d}=i,f=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),p=f.insert(`g`,`:first-child`),m=f.insert(`g`).attr(`class`,`cluster-label`),h=f.append(`rect`),g=await M(m,t.label,t.labelStyle,void 0,!0),_=g.getBBox();if(o(r)){let e=g.children[0],t=n(g);_=e.getBoundingClientRect(),t.attr(`width`,_.width),t.attr(`height`,_.height)}let v=0*t.padding,y=v/2,b=(t.width<=_.width+t.padding?_.width+t.padding:t.width)+v;t.width<=_.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height+v,C=t.height+v-_.height-6,w=t.x-b/2,T=t.y-x/2;t.width=b;let E=t.y-t.height/2-y+_.height+2,D;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=S.svg(f),r=t.rx||t.ry?n.path(N(w,T,b,x,10),{roughness:.7,fill:u,fillStyle:`solid`,stroke:d,seed:a}):n.rectangle(w,T,b,x,{seed:a});D=f.insert(()=>r,`:first-child`);let i=n.rectangle(w,E,b,C,{fill:e?s:c,fillStyle:e?`hachure`:`solid`,stroke:d,seed:a});D=f.insert(()=>r,`:first-child`),h=f.insert(()=>i)}else D=p.insert(`rect`,`:first-child`),D.attr(`class`,`outer`).attr(`x`,w).attr(`y`,T).attr(`width`,b).attr(`height`,x).attr(`data-look`,t.look),h.attr(`class`,`inner`).attr(`x`,w).attr(`y`,E).attr(`width`,b).attr(`height`,C);return m.attr(`transform`,`translate(${t.x-_.width/2}, ${T+1-(o(r)?0:3)})`),t.height=D.node().getBBox().height,t.offsetX=0,t.offsetY=_.height-t.padding/2,t.labelBBox=_,t.intersect=function(e){return j(t,e)},{cluster:f,labelBBox:_}},`roundedWithTitle`),noteGroup:e((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return j(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:e((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=l(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,c=t.width+s;t.diff=-t.padding;let u=t.height+s,d=t.x-c/2,f=t.y-u/2;t.width=c;let p;if(t.look===`handDrawn`){let e=S.svg(a).rectangle(d,f,c,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});p=a.insert(()=>e,`:first-child`)}else{p=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),p.attr(`class`,e).attr(`x`,d).attr(`y`,f).attr(`width`,c).attr(`height`,u).attr(`data-look`,t.look)}return t.height=p.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return j(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:e(async(e,r)=>{t.info(`Creating subgraph rect for `,r.id,r);let i=l(),{themeVariables:a,handDrawnSeed:s}=i,{clusterBkg:c,clusterBorder:u}=a,{labelStyles:d,nodeStyles:f,borderStyles:p,backgroundStyles:m}=y(r),_=e.insert(`g`).attr(`class`,`cluster `+r.cssClasses).attr(`id`,r.domId).attr(`data-look`,r.look),b=o(i),x=_.insert(`g`).attr(`class`,`cluster-label `),C=await h(x,r.label,{style:r.labelStyle,useHtmlLabels:b,isNode:!0,width:r.width}),w=C.getBBox();if(o(i)){let e=C.children[0],t=n(C);w=e.getBoundingClientRect(),t.attr(`width`,w.width),t.attr(`height`,w.height)}let T=r.width<=w.width+r.padding?w.width+r.padding:r.width;r.width<=w.width+r.padding?r.diff=(T-r.width)/2-r.padding:r.diff=-r.padding;let E=r.height,D=r.x-T/2,O=r.y-E/2;t.trace(`Data `,r,JSON.stringify(r));let k;if(r.look===`handDrawn`){let e=S.svg(_),n=v(r,{roughness:.7,fill:c,stroke:u,fillWeight:4,seed:s}),i=e.path(N(D,O,T,E,r.rx),n);k=_.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,p.join(`;`)),k.select(`path`).attr(`style`,m.join(`;`).replace(`fill`,`stroke`))}else k=_.insert(`rect`,`:first-child`),k.attr(`style`,f).attr(`rx`,r.rx).attr(`ry`,r.ry).attr(`x`,D).attr(`y`,O).attr(`width`,T).attr(`height`,E);let{subGraphTitleTopMargin:A}=g(i);if(x.attr(`transform`,`translate(${r.x-w.width/2}, ${r.y-r.height/2+A})`),d){let e=x.select(`span`);e&&e.attr(`style`,d)}let M=k.node().getBBox();return r.offsetX=0,r.width=M.width,r.height=M.height,r.offsetY=w.height-r.padding/2,r.intersect=function(e){return j(r,e)},{cluster:_,labelBBox:w}},`kanbanSection`),swimlane:P},L=new Map,ee=e(async(e,t)=>{let n=await I[t.shape||`rect`](e,t);return L.set(t.id,n),n},`insertCluster`),R=e(()=>{L=new Map},`clear`);function z(e,t){return e.intersect(t)}e(z,`intersectNode`);var te=z;function B(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x0}e(re,`sameSign`);var ie=ne;function W(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return au,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,p(s)),T(n,d),n.intersect=function(e){return t.info(`Circle intersect`,n,1,e),G.circle(n,1,e)},o}e(K,`anchor`);function ae(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}e(ae,`generateArcPoints`);function oe(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}e(oe,`calculateArcSagitta`);async function se(t,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?16:a,s=n.look===`neo`?12:a,c=e(e=>e+s,`calcTotalHeight`),l=e(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await C(t,n,E(n)),f=c(n?.height?n?.height:d.height),[p,m]=l(f),h=oe(f,p,m),g=(n?.width?n?.width:d.width)+o*2+h-h,_=f,{cssStyles:b}=n,x=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...ae(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...ae(g/2,_/2,g/2,-_/2,p,m,!0)],w=S.svg(u),O=v(n,{});n.look!==`handDrawn`&&(O.roughness=0,O.fillStyle=`solid`);let k=D(x),A=w.path(k,O),j=u.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),b&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,b),i&&n.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,i),j.attr(`transform`,`translate(${p/2}, 0)`),T(n,j),n.intersect=function(e){return G.polygon(n,x,e)},u}e(se,`bowTieRect`);function q(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}e(q,`insertPolygonShape`);var ce=12;async function le(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+ce),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+ce,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+ce},{x:0+ce,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=D(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(s,l,u,p);return r&&m.attr(`style`,r),T(t,m),t.intersect=function(e){return G.polygon(t,p,e)},s}e(le,`card`);function ue(e,t){let{nodeStyles:n}=y(t);t.label=``;let r=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=S.svg(r),c=v(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=D(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return G.polygon(t,o,e)},r}e(ue,`choice`);async function de(e,n,r){let{labelStyles:i,nodeStyles:a}=y(n);n.labelStyle=i;let{shapeSvg:o,bbox:s,halfPadding:c}=await C(e,n,E(n)),l=r?.padding??c,u=n.look===`neo`?s.width/2+32:s.width/2+l,d,{cssStyles:f}=n;if(n.look===`handDrawn`){let e=S.svg(o),t=v(n,{}),r=e.circle(0,0,u*2,t);d=o.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,p(f))}else d=o.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,a).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return T(n,d),n.calcIntersect=function(e,t){let n=e.width/2;return G.circle(e,n,t)},n.intersect=function(e){return t.info(`Circle intersect`,n,u,e),G.circle(n,u,e)},o}e(de,`circle`);function fe(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y} - M ${i.x},${i.y} L ${o.x},${o.y}`}e(fe,`createLine`);function pe(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r,n.label=``;let a=e.insert(`g`).attr(`class`,E(n)).attr(`id`,n.domId??n.id),o=Math.max(30,n?.width??0),{cssStyles:s}=n,c=S.svg(a),l=v(n,{});n.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=c.circle(0,0,o*2,l),d=fe(o),f=c.path(d,l),p=a.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),s&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,s),i&&n.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,i),T(n,p),n.intersect=function(e){return t.info(`crossedCircle intersect`,n,{radius:o,point:e}),G.circle(n,o,e)},a}e(pe,`crossedCircle`);function J(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iw,`:first-child`).attr(`stroke-opacity`,0),O.insert(()=>b,`:first-child`),O.attr(`class`,`text`),f&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,m,e)},i}e(me,`curlyBraceLeft`);function Y(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iw,`:first-child`).attr(`stroke-opacity`,0),O.insert(()=>b,`:first-child`),O.attr(`class`,`text`),f&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,m,e)},i}e(he,`curlyBraceRight`);function X(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;iA,`:first-child`).attr(`stroke-opacity`,0),j.insert(()=>x,`:first-child`),j.insert(()=>O,`:first-child`),j.attr(`class`,`text`),f&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),T(t,j),t.intersect=function(e){return G.polygon(t,h,e)},i}e(ge,`curlyBraces`);async function _e(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=S.svg(s),m=v(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,g=u,_=h-d,b=g/4,x=[{x:_,y:0},{x:b,y:0},{x:0,y:g/2},{x:b,y:g},{x:_,y:g},...k(-_,-g/2,d,50,270,90)],w=D(x),O=p.path(w,m),A=s.insert(()=>O,`:first-child`);return A.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&A.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&A.selectChildren(`path`).attr(`style`,r),A.attr(`transform`,`translate(${-l/2}, ${-u/2})`),T(t,A),t.intersect=function(e){return G.polygon(t,x,e)},s}e(_e,`curvedTrapezoid`);var ve=e((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),ye=e((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),be=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),xe=8,Se=8;async function Ce(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-o,t.widtho,`:first-child`),h=s.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=ve(0,0,u,m,d,f);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,p(g)).attr(`style`,r)}return h.attr(`label-offset-y`,f),h.attr(`transform`,`translate(${-u/2}, ${-(m/2+f)})`),T(t,h),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(e){let n=G.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(Ce,`cylinder`);async function we(e,t,n){let{labelStyles:r,nodeStyles:i}=y(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await C(e,t,E(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:f,ry:m}=t,{cssStyles:h}=t;if(n?.rx&&n.ry&&(f=n.rx,m=n.ry),t.look===`handDrawn`){let e=S.svg(a),n=v(t,{}),r=f||m?e.path(N(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,p(h))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,p(f)).attr(`ry`,p(m)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return T(t,d),t.calcIntersect=function(e,t){return G.rect(e,t)},t.intersect=function(e){return G.rect(t,e)},a}e(we,`drawRect`);async function Te(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await we(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=S.svg(c),n=v(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}e(Te,`datastore`);async function Ee(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=S.svg(o),g=v(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],b=h.polygon(_.map(e=>[e.x,e.y]),g),x=o.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),T(t,x),t.intersect=function(e){return G.rect(t,e)},o}e(Ee,`dividedRectangle`);async function De(e,n){let{labelStyles:r,nodeStyles:i}=y(n),a=n.look===`neo`?12:5;n.labelStyle=r;let o=n.padding??0,s=n.look===`neo`?16:o,{shapeSvg:c,bbox:l}=await C(e,n,E(n)),u=(n?.width?n?.width/2:l.width/2)+(s??0),d=u-a,f,{cssStyles:m}=n;if(n.look===`handDrawn`){let e=S.svg(c),t=v(n,{roughness:.2,strokeWidth:2.5}),r=v(n,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,u*2,t),a=e.circle(0,0,d*2,r);f=c.insert(`g`,`:first-child`),f.attr(`class`,p(n.cssClasses)).attr(`style`,p(m)),f.node()?.appendChild(i),f.node()?.appendChild(a)}else{f=c.insert(`g`,`:first-child`);let e=f.insert(`circle`,`:first-child`),t=f.insert(`circle`);f.attr(`class`,`basic label-container`).attr(`style`,i),e.attr(`class`,`outer-circle`).attr(`style`,i).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,i).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return T(n,f),n.intersect=function(e){return t.info(`DoubleCircle intersect`,n,u,e),G.circle(n,u,e)},c}e(De,`doublecircle`);function Oe(e,n,{config:{themeVariables:r}}){let{labelStyles:i,nodeStyles:a}=y(n);n.label=``,n.labelStyle=i;let o=e.insert(`g`).attr(`class`,E(n)).attr(`id`,n.domId??n.id),{cssStyles:s}=n,c=S.svg(o),{nodeBorder:l}=r,u=v(n,{fillStyle:`solid`});n.look!==`handDrawn`&&(u.roughness=0);let d=c.circle(0,0,14,u),f=o.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),s&&s.length>0&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,s),a&&n.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,a),T(n,f),n.intersect=function(e){return t.info(`filledCircle intersect`,n,{radius:7,point:e}),G.circle(n,7,e)},o}e(Oe,`filledCircle`);var ke=10,Ae=10;async function je(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?a*2:a;(n.width||n.height)&&(n.height=n?.height??0,n.heightb,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,m),i&&n.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,i),n.width=u,n.height=d,T(n,x),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-d/2+(n.padding??0)/2+(c.y-(c.top??0))})`),n.intersect=function(e){return t.info(`Triangle intersect`,n,p,e),G.polygon(n,p,e)},s}e(je,`flippedTriangle`);function Me(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=y(t);t.label=``;let o=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=S.svg(o),p=v(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),T(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return G.rect(t,e)},o}e(Me,`forkJoin`);async function Ne(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let a=n.look===`neo`?16:n.padding??0,o=n.look===`neo`?12:n.padding??0;(n.width||n.height)&&(n.height=(n?.height??0)-o*2,n.height<10&&(n.height=10),n.width=(n?.width??0)-a*2,n.width<15&&(n.width=15));let{shapeSvg:s,bbox:c}=await C(e,n,E(n)),l=(n?.width?n?.width:Math.max(15,c.width))+a*2,u=(n?.height?n?.height:Math.max(10,c.height))+o*2,d=u/2,{cssStyles:f}=n,p=S.svg(s),m=v(n,{});n.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...k(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],g=D(h),_=p.path(g,m),b=s.insert(()=>_,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),f&&n.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,f),i&&n.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,i),T(n,b),n.intersect=function(e){return t.info(`Pill intersect`,n,{radius:d,point:e}),G.polygon(n,h,e)},s}e(Ne,`halfRoundedRectangle`);var Pe=e((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function Fe(e,t){let{labelStyles:n,nodeStyles:r}=y(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await C(e,t,E(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=S.svg(c),n=v(t,{}),r=Pe(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=q(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,T(t,m),t.intersect=function(e){return G.polygon(t,p,e)},c}e(Fe,`hexagon`);async function Ie(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.label=``,n.labelStyle=r;let{shapeSvg:a}=await C(e,n,E(n)),o=Math.max(30,n?.width??0),s=Math.max(30,n?.height??0),{cssStyles:c}=n,l=S.svg(a),u=v(n,{});n.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:o,y:0},{x:0,y:s},{x:o,y:s}],f=D(d),p=l.path(f,u),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),c&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,c),i&&n.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,i),m.attr(`transform`,`translate(${-o/2}, ${-s/2})`),T(n,m),n.intersect=function(e){return t.info(`Pill intersect`,n,{points:d}),G.polygon(n,d,e)},a}e(Ie,`hourglass`);async function Le(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=y(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await C(e,n,`icon-shape default`),p=n.pos===`t`,h=c,g=c,{nodeBorder:_}=r,{stylesMap:b}=x(n),w=-g/2,E=-h/2,D=n.label?8:0,O=S.svg(u),k=v(n,{stroke:`none`,fill:`none`});n.look!==`handDrawn`&&(k.roughness=0,k.fillStyle=`solid`);let A=O.rectangle(w,E,g,h,k),j=Math.max(g,d.width),M=h+d.height+D,N=O.rectangle(-j/2,-M/2,j,M,{...k,fill:`transparent`,stroke:`none`}),P=u.insert(()=>A,`:first-child`),F=u.insert(()=>N);if(n.icon){let e=u.append(`g`);e.html(`${await m(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+D/2-i/2-o:-d.height/2-D/2-i/2-o})`),e.attr(`style`,`color: ${b.get(`stroke`)??_};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-M/2:M/2-d.height})`),P.attr(`transform`,`translate(0,${p?d.height/2+D/2:-d.height/2-D/2})`),T(n,F),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return G.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=p?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+D},{x:r+g/2,y:i-a/2+d.height+D},{x:r+g/2,y:i+a/2},{x:r-g/2,y:i+a/2},{x:r-g/2,y:i-a/2+d.height+D},{x:r-d.width/2,y:i-a/2+d.height+D}]:[{x:r-g/2,y:i-a/2},{x:r+g/2,y:i-a/2},{x:r+g/2,y:i-a/2+h},{x:r+d.width/2,y:i-a/2+h},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+h},{x:r-g/2,y:i-a/2+h}],G.polygon(n,o,e)},u}e(Le,`icon`);async function Re(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=y(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,label:f}=await C(e,n,`icon-shape default`),p=n.label?8:0,h=n.pos===`t`,{nodeBorder:g,mainBkg:_}=r,{stylesMap:b}=x(n),w=S.svg(u),E=v(n,{});n.look!==`handDrawn`&&(E.roughness=0,E.fillStyle=`solid`),E.stroke=b.get(`fill`)??_;let D=u.append(`g`);n.icon&&D.html(`${await m(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let O=D.node().getBBox(),k=O.width,A=O.height,j=O.x,M=O.y,N=Math.max(k,A)*Math.SQRT2+40,P=w.circle(0,0,N,E),F=Math.max(N,d.width),I=N+d.height+p,L=w.rectangle(-F/2,-I/2,F,I,{...E,fill:`transparent`,stroke:`none`}),ee=u.insert(()=>P,`:first-child`),R=u.insert(()=>L);return D.attr(`transform`,`translate(${-k/2-j},${h?d.height/2+p/2-A/2-M:-d.height/2-p/2-A/2-M})`),D.attr(`style`,`color: ${b.get(`stroke`)??g};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${h?-I/2:I/2-d.height})`),ee.attr(`transform`,`translate(0,${h?d.height/2+p/2:-d.height/2-p/2})`),T(n,R),n.intersect=function(e){return t.info(`iconSquare intersect`,n,e),G.rect(n,e)},u}e(Re,`iconCircle`);async function ze(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=y(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await C(e,n,`icon-shape default`),h=n.pos===`t`,g=c+f*2,_=c+f*2,{nodeBorder:b,mainBkg:w}=r,{stylesMap:E}=x(n),D=-_/2,O=-g/2,k=n.label?8:0,A=S.svg(u),j=v(n,{});n.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let M=A.path(N(D,O,_,g,5),j),P=Math.max(_,d.width),F=g+d.height+k,I=A.rectangle(-P/2,-F/2,P,F,{...j,fill:`transparent`,stroke:`none`}),L=u.insert(()=>M,`:first-child`).attr(`class`,`icon-shape2`),ee=u.insert(()=>I);if(n.icon){let e=u.append(`g`);e.html(`${await m(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${h?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??b};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${h?-F/2:F/2-d.height})`),L.attr(`transform`,`translate(0,${h?d.height/2+k/2:-d.height/2-k/2})`),T(n,ee),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return G.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+k},{x:r+_/2,y:i-a/2+d.height+k},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+k},{x:r-d.width/2,y:i-a/2+d.height+k}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+g},{x:r+d.width/2,y:i-a/2+g},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+g},{x:r-_/2,y:i-a/2+g}],G.polygon(n,o,e)},u}e(ze,`iconRounded`);async function Be(e,n,{config:{themeVariables:r,flowchart:i}}){let{labelStyles:a}=y(n);n.labelStyle=a;let o=n.assetHeight??48,s=n.assetWidth??48,c=Math.max(o,s),l=i?.wrappingWidth;n.width=Math.max(c,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await C(e,n,`icon-shape default`),h=n.pos===`t`,g=c+f*2,_=c+f*2,{nodeBorder:b,mainBkg:w}=r,{stylesMap:E}=x(n),D=-_/2,O=-g/2,k=n.label?8:0,A=S.svg(u),j=v(n,{});n.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`),j.stroke=E.get(`fill`)??w;let M=A.path(N(D,O,_,g,.1),j),P=Math.max(_,d.width),F=g+d.height+k,I=A.rectangle(-P/2,-F/2,P,F,{...j,fill:`transparent`,stroke:`none`}),L=u.insert(()=>M,`:first-child`),ee=u.insert(()=>I);if(n.icon){let e=u.append(`g`);e.html(`${await m(n.icon,{height:c,width:c,fallbackPrefix:``})}`);let t=e.node().getBBox(),r=t.width,i=t.height,a=t.x,o=t.y;e.attr(`transform`,`translate(${-r/2-a},${h?d.height/2+k/2-i/2-o:-d.height/2-k/2-i/2-o})`),e.attr(`style`,`color: ${E.get(`stroke`)??b};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${h?-F/2:F/2-d.height})`),L.attr(`transform`,`translate(0,${h?d.height/2+k/2:-d.height/2-k/2})`),T(n,ee),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return G.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{x:r-d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2},{x:r+d.width/2,y:i-a/2+d.height+k},{x:r+_/2,y:i-a/2+d.height+k},{x:r+_/2,y:i+a/2},{x:r-_/2,y:i+a/2},{x:r-_/2,y:i-a/2+d.height+k},{x:r-d.width/2,y:i-a/2+d.height+k}]:[{x:r-_/2,y:i-a/2},{x:r+_/2,y:i-a/2},{x:r+_/2,y:i-a/2+g},{x:r+d.width/2,y:i-a/2+g},{x:r+d.width/2/2,y:i+a/2},{x:r-d.width/2,y:i+a/2},{x:r-d.width/2,y:i-a/2+g},{x:r-_/2,y:i-a/2+g}],G.polygon(n,o,e)},u}e(Be,`iconSquare`);async function Ve(e,n,{config:{flowchart:r}}){let i=new Image;i.src=n?.img??``,await i.decode();let a=Number(i.naturalWidth.toString().replace(`px`,``)),o=Number(i.naturalHeight.toString().replace(`px`,``));n.imageAspectRatio=a/o;let{labelStyles:s}=y(n);n.labelStyle=s;let c=r?.wrappingWidth;n.defaultWidth=r?.wrappingWidth;let l=Math.max(n.label?c??0:0,n?.assetWidth??a),u=n.constraint===`on`&&n?.assetHeight?n.assetHeight*n.imageAspectRatio:l,d=n.constraint===`on`?u/n.imageAspectRatio:n?.assetHeight??o;n.width=Math.max(u,c??0);let{shapeSvg:f,bbox:p,label:m}=await C(e,n,`image-shape default`),h=n.pos===`t`,g=-u/2,_=-d/2,b=n.label?8:0,x=S.svg(f),w=v(n,{});n.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let E=x.rectangle(g,_,u,d,w),D=Math.max(u,p.width),O=d+p.height+b,k=x.rectangle(-D/2,-O/2,D,O,{...w,fill:`none`,stroke:`none`}),A=f.insert(()=>E,`:first-child`),j=f.insert(()=>k);if(n.img){let e=f.append(`image`);e.attr(`href`,n.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?O/2-d:-O/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-b/2:d/2-p.height/2+b/2})`),A.attr(`transform`,`translate(0,${h?p.height/2+b/2:-p.height/2-b/2})`),T(n,j),n.intersect=function(e){if(t.info(`iconSquare intersect`,n,e),!n.label)return G.rect(n,e);let r=n.x??0,i=n.y??0,a=n.height??0,o=[];return o=h?[{x:r-p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2},{x:r+p.width/2,y:i-a/2+p.height+b},{x:r+u/2,y:i-a/2+p.height+b},{x:r+u/2,y:i+a/2},{x:r-u/2,y:i+a/2},{x:r-u/2,y:i-a/2+p.height+b},{x:r-p.width/2,y:i-a/2+p.height+b}]:[{x:r-u/2,y:i-a/2},{x:r+u/2,y:i-a/2},{x:r+u/2,y:i-a/2+d},{x:r+p.width/2,y:i-a/2+d},{x:r+p.width/2/2,y:i+a/2},{x:r-p.width/2,y:i+a/2},{x:r-p.width/2,y:i-a/2+d},{x:r-u/2,y:i-a/2+d}],G.polygon(n,o,e)},f}e(Ve,`imageSquare`);async function He(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=Math.max(c.width+(o??0)*2,t?.width??0),u=Math.max(c.height+(a??0)*2,t?.height??0),d=[{x:0,y:0},{x:l,y:0},{x:l+3*u/6,y:-u},{x:-3*u/6,y:-u}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),p&&f.attr(`style`,p)}else f=q(s,l,u,d);return r&&f.attr(`style`,r),t.width=l,t.height=u,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}e(He,`inv_trapezoid`);async function Ue(e,t){let{shapeSvg:n,bbox:r,label:i}=await C(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),T(t,a),t.intersect=function(e){return G.rect(t,e)},n}e(Ue,`labelRect`);async function We(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}e(We,`lean_left`);async function Ge(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}e(Ge,`lean_right`);function Ke(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.label=``,n.labelStyle=r;let a=e.insert(`g`).attr(`class`,E(n)).attr(`id`,n.domId??n.id),{cssStyles:o}=n,s=Math.max(35,n?.width??0),c=Math.max(35,n?.height??0),l=[{x:s,y:0},{x:0,y:c+7/2},{x:s-14,y:c+7/2},{x:0,y:2*c},{x:s,y:c-7/2},{x:14,y:c-7/2}],u=S.svg(a),d=v(n,{});n.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=D(l),p=u.path(f,d),m=a.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),o&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,o),i&&n.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,i),m.attr(`transform`,`translate(-${s/2},${-c})`),T(n,m),n.intersect=function(e){return t.info(`lightningBolt intersect`,n,e),G.polygon(n,l,e)},a}e(Ke,`lightningBolt`);var qe=e((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),Je=e((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),Ye=e((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Xe=10,Ze=10;async function Qe(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.widtho,`:first-child`).attr(`class`,`line`),g=s.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=qe(0,0,u,m,d,f,h);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,p(_)).attr(`style`,r)}return g.attr(`label-offset-y`,f),g.attr(`transform`,`translate(${-u/2}, ${-(m/2+f)})`),T(t,g),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=G.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}e(Qe,`linedCylinder`);async function $e(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=S.svg(s),g=v(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...O(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],b=h.polygon(_.map(e=>[e.x,e.y]),g),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),T(t,x),t.intersect=function(e){return G.polygon(t,_,e)},s}e($e,`linedWaveEdgedRect`);async function et(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await C(e,t,E(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,g=-m/2,{cssStyles:_}=t,b=S.svg(c),x=v(t,{}),w=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],O=[{x:h,y:g+s},{x:h+p-s,y:g+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g},{x:h,y:g}];t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let k=D(w),j=b.path(k,x),M=D(O),N=b.path(M,x);t.look!==`handDrawn`&&(j=A(j),N=A(N));let P=c.insert(`g`,`:first-child`);return P.insert(()=>j),P.insert(()=>N),P.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&P.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),T(t,P),t.intersect=function(e){return G.polygon(t,w,e)},c}e(et,`multiRect`);async function tt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,g=-m/2,{cssStyles:_}=t,b=O(h-10,g+m+10,h+d-10,g+m+10,p,.8),x=b?.[b.length-1],w=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...b,{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:x.y-20},{x:h+d+10,y:x.y-20},{x:h+d+10,y:g-10},{x:h+10,y:g-10},{x:h+10,y:g},{x:h,y:g},{x:h,y:g+10}],k=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:x.y-10},{x:h+d,y:x.y-10},{x:h+d,y:g},{x:h,y:g}],A=S.svg(i),j=v(t,{});t.look!==`handDrawn`&&(j.roughness=0,j.fillStyle=`solid`);let M=D(w),N=A.path(M,j),P=D(k),F=A.path(P,j),I=i.insert(()=>N,`:first-child`);return I.insert(()=>F),I.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&I.selectAll(`path`).attr(`style`,r),I.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),T(t,I),t.intersect=function(e){return G.polygon(t,w,e)},i}e(tt,`multiWaveEdgedRectangle`);async function nt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=y(t);t.labelStyle=r,t.useHtmlLabels||o(s())||(t.centerLabel=!0);let{shapeSvg:a,bbox:c,label:l}=await C(e,t,E(t)),u=Math.max(c.width+(t.padding??0)*2,t?.width??0),d=Math.max(c.height+(t.padding??0)*2,t?.height??0),f=-u/2,p=-d/2,{cssStyles:m}=t,h=S.svg(a),g=v(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=h.rectangle(f,p,u,d,g),b=a.insert(()=>_,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),l.attr(`class`,`label noteLabel`),m&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,m),i&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,i),l.attr(`transform`,`translate(${-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),T(t,b),t.intersect=function(e){return G.rect(t,e)},a}e(nt,`note`);var rt=e((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function it(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=S.svg(i),n=v(t,{}),r=rt(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=q(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),T(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=G.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}e(it,`question`);async function at(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width??c.width)+(t.look===`neo`?a*2:a),d=(t?.height??c.height)+(t.look===`neo`?o*2:o),f=-u/2,p=-d/2,m=p/2,h=[{x:f+m,y:p},{x:f,y:0},{x:f+m,y:-p},{x:-f,y:-p},{x:-f,y:p}],{cssStyles:g}=t,_=S.svg(s),b=v(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=D(h),w=_.path(x,b),O=s.insert(()=>w,`:first-child`);return O.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&O.selectAll(`path`).attr(`style`,r),O.attr(`transform`,`translate(${-m/2},0)`),l.attr(`transform`,`translate(${-m/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),T(t,O),t.intersect=function(e){return G.polygon(t,h,e)},s}e(at,`rect_left_inv_arrow`);async function ot(e,r){let{labelStyles:i,nodeStyles:a}=y(r);r.labelStyle=i;let s;s=r.cssClasses?`node `+r.cssClasses:`node default`;let c=e.insert(`g`).attr(`class`,s).attr(`id`,r.domId||r.id),u=c.insert(`g`),d=c.insert(`g`).attr(`class`,`label`).attr(`style`,a),f=r.description,p=r.label,m=await M(d,p,r.labelStyle,!0,!0),h={width:0,height:0};if(o(l())){let e=m.children[0],t=n(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}t.info(`Text 2`,f);let g=f||[],_=m.getBBox(),b=await M(d,Array.isArray(g)?g.join(`
    `):g,r.labelStyle,!0,!0),x=b.children[0],C=n(b);h=x.getBoundingClientRect(),C.attr(`width`,h.width),C.attr(`height`,h.height);let w=(r.padding||0)/2;n(b).attr(`transform`,`translate( `+(h.width>_.width?0:(_.width-h.width)/2)+`, `+(_.height+w+5)+`)`),n(m).attr(`transform`,`translate( `+(h.width<_.width?0:-(_.width-h.width)/2)+`, 0)`),h=d.node().getBBox(),d.attr(`transform`,`translate(`+-h.width/2+`, `+(-h.height/2-w+3)+`)`);let E=h.width+(r.padding||0),D=h.height+(r.padding||0),O=-h.width/2-w,k=-h.height/2-w,A,j;if(r.look===`handDrawn`){let e=S.svg(c),n=v(r,{}),i=e.path(N(O,k,E,D,r.rx||0),n),a=e.line(-h.width/2-w,-h.height/2-w+_.height+w,h.width/2+w,-h.height/2-w+_.height+w,n);j=c.insert(()=>(t.debug(`Rough node insert CXC`,i),a),`:first-child`),A=c.insert(()=>(t.debug(`Rough node insert CXC`,i),i),`:first-child`)}else A=u.insert(`rect`,`:first-child`),j=u.insert(`line`),A.attr(`class`,`outer title-state`).attr(`style`,a).attr(`x`,-h.width/2-w).attr(`y`,-h.height/2-w).attr(`width`,h.width+(r.padding||0)).attr(`height`,h.height+(r.padding||0)),j.attr(`class`,`divider`).attr(`x1`,-h.width/2-w).attr(`x2`,h.width/2+w).attr(`y1`,-h.height/2-w+_.height+w).attr(`y2`,-h.height/2-w+_.height+w);return T(r,A),r.intersect=function(e){return G.rect(r,e)},c}e(ot,`rectWithTitle`);async function st(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return we(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}e(st,`roundedRect`);var Z=8;async function ct(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?Z:Z*2),u=(t?.height??s.height)+a*2,d=l-Z,f=u,m=Z-l/2,h=-u/2,{cssStyles:g}=t,_=S.svg(o),b=v(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:m,y:h},{x:m+d,y:h},{x:m+d,y:h+f},{x:m-Z,y:h+f},{x:m-Z,y:h},{x:m,y:h},{x:m,y:h+f}],w=_.polygon(x.map(e=>[e.x,e.y]),b),D=o.insert(()=>w,`:first-child`);return D.attr(`class`,`basic label-container outer-path`).attr(`style`,p(g)),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),g&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${Z/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),T(t,D),t.intersect=function(e){return G.rect(t,e)},o}e(ct,`shadedProcess`);async function lt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await C(e,t,E(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:g}=t,_=S.svg(s),b=v(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],w=D(x),O=_.path(w,b),k=s.insert(()=>O,`:first-child`);return k.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,r),k.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),T(t,k),t.intersect=function(e){return G.polygon(t,x,e)},s}e(lt,`slopedRect`);async function ut(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return we(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}e(ut,`squareRect`);async function dt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=S.svg(s),m=v(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...k(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...k(u/2-d,0,d,50,270,450)],g=D(h),_=p.path(g,m),b=s.insert(()=>_,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),T(t,b),t.intersect=function(e){return G.polygon(t,h,e)},s}e(dt,`stadium`);async function ft(e,t){return we(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}e(ft,`state`);function pt(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=y(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=S.svg(u),f=v(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,g=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),_=u.insert(()=>p,`:first-child`);if(_.insert(()=>g),t.look!==`handDrawn`&&_.attr(`class`,`outer-path`),a&&_.selectAll(`path`).attr(`style`,a),i&&_.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;_.attr(`style`,`filter:url(#${n})`)}return T(t,_),t.intersect=function(e){return G.circle(t,(t.width??0)/2,e)},u}e(pt,`stateEnd`);function mt(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=S.svg(a).circle(0,0,t.width,b(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return T(t,o),t.intersect=function(e){return G.circle(t,(t.width??7)/2,e)},a}e(mt,`stateStart`);var ht=8;async function gt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width??c.width)+2*ht+a,u=(t?.height??c.height)+o,d=l-2*ht,f=u,m=-l/2,h=-u/2,g=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=e.rectangle(m,h,d+16,f,n),i=e.line(m+ht,h,m+ht,h+f,n),a=e.line(m+ht+d,h,m+ht+d,h+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,p(c)),T(t,o)}else{let e=q(s,d,f,g);r&&e.attr(`style`,r),T(t,e)}return t.intersect=function(e){return G.polygon(t,g,e)},s}e(gt,`subroutine`);var _t=.2;async function vt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-_t*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height?t?.height:c.height)+o*2,u=_t*l,d=_t*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=S.svg(s),b=v(t,{}),x=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],w=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let O=D(x),k=_.path(O,b),A=D(w),j=_.path(A,{...b,fillStyle:`solid`}),M=s.insert(()=>j,`:first-child`);return M.insert(()=>k,`:first-child`),M.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),T(t,M),t.intersect=function(e){return G.polygon(t,x,e)},s}e(vt,`taggedRect`);async function yt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await C(e,t,E(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=S.svg(i),h=v(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...O(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],_=-s/2+s/2*.1,b=-f/2-d*.4,x=[{x:_+s-u,y:(b+c)*1.3},{x:_+s,y:b+c-d},{x:_+s,y:(b+c)*.9},...O(_+s,(b+c)*1.25,_+s-u,(b+c)*1.3,-c*.02,.5)],w=D(g),k=m.path(w,h),A=D(x),j=m.path(A,{...h,fillStyle:`solid`}),M=i.insert(()=>j,`:first-child`);return M.insert(()=>k,`:first-child`),M.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&M.selectAll(`path`).attr(`style`,r),M.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),T(t,M),t.intersect=function(e){return G.polygon(t,g,e)},i}e(yt,`taggedWaveEdgedRectangle`);async function bt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await C(e,t,E(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),T(t,u),t.intersect=function(e){return G.rect(t,e)},i}e(bt,`text`);var xt=e((e,t,n,r,i,a)=>`M${e},${t} - a${i},${a} 0,0,1 0,${-r} - l${n},0 - a${i},${a} 0,0,1 0,${r} - M${n},${-r} - a${i},${a} 0,0,0 0,${r} - l${-n},0`,`createCylinderPathD`),St=e((e,t,n,r,i,a)=>[`M${e},${t}`,`M${e+n},${t}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(` `),`createOuterCylinderPathD`),Ct=e((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`),wt=5,Tt=10;async function Et(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?12:i/2;if(t.width||t.height){let e=t.height??0;t.height=(t.height??0)-a,t.heighta,`:first-child`),h=o.insert(()=>i,`:first-child`),h.attr(`class`,`basic label-container`),m&&h.attr(`style`,m)}else{let e=xt(0,0,f,l,d,u);h=o.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,p(m)).attr(`style`,r),h.attr(`class`,`basic label-container outer-path`),m&&h.selectAll(`path`).attr(`style`,m),r&&h.selectAll(`path`).attr(`style`,r)}return h.attr(`label-offset-x`,d),h.attr(`transform`,`translate(${-f/2}, ${l/2} )`),c.attr(`transform`,`translate(${-(s.width/2)-d-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),T(t,h),t.intersect=function(e){let n=G.rect(t,e),r=n.y-(t.y??0);if(u!=0&&(Math.abs(r)<(t.height??0)/2||Math.abs(r)==(t.height??0)/2&&Math.abs(n.x-(t.x??0))>(t.width??0)/2-d)){let i=d*d*(1-r*r/(u*u));i!=0&&(i=Math.sqrt(Math.abs(i))),i=d-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},o}e(Et,`tiltedCylinder`);async function Dt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=(t.look,i),o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:-3*l/6,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=S.svg(s),n=v(t,{}),r=D(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=q(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,T(t,f),t.intersect=function(e){return G.polygon(t,d,e)},s}e(Dt,`trapezoid`);async function Ot(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<5&&(t.height=5),t.width=(t.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o*2,{cssStyles:d}=t,f=S.svg(s),p=v(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],h=D(m),g=f.path(h,p),_=s.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container outer-path`),d&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,r),T(t,_),t.intersect=function(e){return G.polygon(t,m,e)},s}e(Ot,`trapezoidalPentagon`);var kt=10,At=10;async function jt(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let a=n.padding??0,o=n.look===`neo`?a*2:a;(n.width||n.height)&&(n.width=((n?.width??0)-o)/2,n.widthO,`:first-child`).attr(`transform`,`translate(${-m/2}, ${m/2})`).attr(`class`,`outer-path`);return _&&n.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,_),i&&n.look!==`handDrawn`&&k.selectChildren(`path`).attr(`style`,i),n.width=p,n.height=m,T(n,k),d.attr(`transform`,`translate(${-u.width/2-(u.x-(u.left??0))}, ${m/2-(u.height+(n.padding??0)/(f?2:1)-(u.y-(u.top??0)))})`),n.intersect=function(e){return t.info(`Triangle intersect`,n,g,e),G.polygon(n,g,e)},s}e(jt,`triangle`);async function Mt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=!0;(t.width||t.height)&&(s=!1,t.width=(t?.width??0)-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:c,bbox:l,label:u}=await C(e,t,E(t)),d=(t?.width?t?.width:l.width)+(a??0)*2,f=(t?.height?t?.height:l.height)+(o??0)*2,p=t.look===`neo`?f/4:f/8,m=f+(s?p:-p),{cssStyles:h}=t,g=14-d,_=g>0?g/2:0,b=S.svg(c),x=v(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let w=[{x:-d/2-_,y:m/2},...O(-d/2-_,m/2,d/2+_,m/2,p,.8),{x:d/2+_,y:-m/2},{x:-d/2-_,y:-m/2}],k=D(w),A=b.path(k,x),j=c.insert(()=>A,`:first-child`);return j.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&j.selectAll(`path`).attr(`style`,r),j.attr(`transform`,`translate(0,${-p/2})`),u.attr(`transform`,`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))},${-f/2+(t.padding??0)-p-(l.y-(l.top??0))})`),T(t,j),t.intersect=function(e){return G.polygon(t,w,e)},c}e(Mt,`waveEdgedRectangle`);async function Nt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?20:i;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let e=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-20/9*e),t.width-=a*2}let{shapeSvg:s,bbox:c}=await C(e,t,E(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o,d=u/8,f=u+d*2,{cssStyles:p}=t,m=S.svg(s),h=v(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-l/2,y:f/2},...O(-l/2,f/2,l/2,f/2,d,1),{x:l/2,y:-f/2},...O(l/2,-f/2,-l/2,-f/2,d,-1)],_=D(g),b=m.path(_,h),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),T(t,x),t.intersect=function(e){return G.polygon(t,g,e)},s}e(Nt,`waveRectangle`);var Q=10;async function Pt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-i*2-Q,10),t.height=Math.max((t?.height??0)-a*2-Q,10));let{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=(t?.width?t?.width:s.width)+i*2+Q,u=(t?.height?t?.height:s.height)+a*2+Q,d=l-Q,f=u-Q,p=-d/2,m=-f/2,{cssStyles:h}=t,g=S.svg(o),_=v(t,{}),b=[{x:p-Q,y:m-Q},{x:p-Q,y:m+f},{x:p+d,y:m+f},{x:p+d,y:m-Q}],x=`M${p-Q},${m-Q} L${p+d},${m-Q} L${p+d},${m+f} L${p-Q},${m+f} L${p-Q},${m-Q} - M${p-Q},${m} L${p+d},${m} - M${p},${m-Q} L${p},${m+f}`;t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let w=g.path(x,_),D=o.insert(()=>w,`:first-child`);return D.attr(`transform`,`translate(${Q/2}, ${Q/2})`),D.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${-(s.width/2)+Q/2-(s.x-(s.left??0))}, ${-(s.height/2)+Q/2-(s.y-(s.top??0))})`),T(t,D),t.intersect=function(e){return G.polygon(t,b,e)},o}e(Pt,`windowPane`);var Ft=new Set([`redux-color`,`redux-dark-color`]),It=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]);async function Lt(e,t){let r=t;r.alias&&(t.label=r.alias);let{theme:i,themeVariables:a}=s(),{rowEven:o,rowOdd:l,nodeBorder:u,borderColorArray:d}=a;if(t.look===`handDrawn`){let{themeVariables:n}=s(),{background:r}=n;await Lt(e,{...t,id:t.id+`-background`,domId:(t.domId||t.id)+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let p=s();t.useHtmlLabels=p.htmlLabels;let m=p.er?.diagramPadding??10,h=p.er?.entityPadding??6,{cssStyles:g}=t,{labelStyles:_,nodeStyles:b}=y(t);if(r.attributes.length===0&&t.label){let n={rx:0,ry:0,labelPaddingX:m,labelPaddingY:m*1.5,classes:``};f(t.label,p)+n.labelPaddingX*20){let e=w.width+m*2-(A+j+M+N);A+=e/I,j+=e/I,M>0&&(M+=e/I),N>0&&(N+=e/I)}let ee=A+j+M+N,R=S.svg(C),z=v(t,{});t.look!==`handDrawn`&&(z.roughness=0,z.fillStyle=`solid`);let te=0;k.length>0&&(te=k.reduce((e,t)=>e+(t?.rowHeight??0),0));let B=Math.max(L.width+m*2,t?.width||0,ee),V=Math.max((te??0)+w.height,t?.height||0),H=-B/2,U=-V/2;if(C.selectAll(`g:not(:first-child)`).each((e,t,r)=>{let i=n(r[t]),a=i.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]),i.attr(`class`).includes(`attribute-name`)?o+=A:i.attr(`class`).includes(`attribute-keys`)?o+=A+j:i.attr(`class`).includes(`attribute-comment`)&&(o+=A+j+M))}i.attr(`transform`,`translate(${H+m/2+o}, ${s+U+w.height+h/2})`)}),C.select(`.name`).attr(`transform`,`translate(`+-w.width/2+`, `+(U+h/2)+`)`),i!=null&&Ft.has(i)){let e=r.colorIndex??0;C.attr(`data-color-id`,`color-${e%d.length}`)}let ne=R.rectangle(H,U,B,V,z),re=C.insert(()=>ne,`:first-child`).attr(`class`,`outer-path`).attr(`style`,g.join(``));O.push(0);for(let[e,t]of k.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=R.rectangle(H,w.height+U+t?.yOffset,B,t?.rowHeight,{...z,fill:n?o:l,stroke:u});C.insert(()=>r,`g.label`).attr(`style`,g.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let ie=1e-4,W=zt(H,w.height+U,B+H,w.height+U,ie),K=R.polygon(W.map(e=>[e.x,e.y]),z);if(C.insert(()=>K).attr(`class`,`divider`),W=zt(A+H,w.height+U,A+H,V+U,ie),K=R.polygon(W.map(e=>[e.x,e.y]),z),C.insert(()=>K).attr(`class`,`divider`),P){let e=A+j+H;W=zt(e,w.height+U,e,V+U,ie),K=R.polygon(W.map(e=>[e.x,e.y]),z),C.insert(()=>K).attr(`class`,`divider`)}if(F){let e=A+j+M+H;W=zt(e,w.height+U,e,V+U,ie),K=R.polygon(W.map(e=>[e.x,e.y]),z),C.insert(()=>K).attr(`class`,`divider`)}for(let e of O){let t=w.height+U+e;W=zt(H,t,B+H,t,ie),K=R.polygon(W.map(e=>[e.x,e.y]),z),C.insert(()=>K).attr(`class`,`divider`)}if(T(t,re),b&&t.look!==`handDrawn`)if(i!=null&&It.has(i))C.selectAll(`path`).attr(`style`,b);else{let e=b.split(`;`)?.filter(e=>e.includes(`stroke`))?.map(e=>`${e}`).join(`; `);C.selectAll(`path`).attr(`style`,e??``),C.selectAll(`.row-rect-even path`).attr(`style`,b)}return t.intersect=function(e){return G.rect(t,e)},C}e(Lt,`erBox`);async function Rt(e,t,r,i=0,o=0,s=[],l=``){let u=e.insert(`g`).attr(`class`,`label ${s.join(` `)}`).attr(`transform`,`translate(${i}, ${o})`).attr(`style`,l);t!==a(t)&&(t=a(t),t=t.replaceAll(`<`,`<`).replaceAll(`>`,`>`));let d=u.node().appendChild(await h(u,t,{width:f(t,r)+100,style:l,useHtmlLabels:r.htmlLabels},r));if(t.includes(`<`)||t.includes(`>`)){let e=d.children[0];for(e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`);e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`)}let p=d.getBBox();if(c(r.htmlLabels)){let e=d.children[0];e.style.textAlign=`start`;let t=n(d);p=e.getBoundingClientRect(),t.attr(`width`,p.width),t.attr(`height`,p.height)}return p}e(Rt,`addText`);function zt(e,t,n,r,i){return e===n?[{x:e-i/2,y:t},{x:e+i/2,y:t},{x:n+i/2,y:r},{x:n-i/2,y:r}]:[{x:e,y:t-i/2},{x:e,y:t+i/2},{x:n,y:r+i/2},{x:n,y:r-i/2}]}e(zt,`lineToPolygon`);async function Bt(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,E(t)).attr(`id`,t.domId||t.id),s=null,c=null,l=null,u=null,d=0,f=0,p=0;if(s=o.insert(`g`).attr(`class`,`annotation-group text`),t.annotations.length>0){let e=t.annotations[0];await Vt(s,{text:`\xAB${e}\xBB`},0),d=s.node().getBBox().height}c=o.insert(`g`).attr(`class`,`label-group text`),await Vt(c,t,0,[`font-weight: bolder`]);let m=c.node().getBBox();f=m.height,l=o.insert(`g`).attr(`class`,`members-group text`);let h=0;for(let e of t.members){let t=await Vt(l,e,h,[e.parseClassifier()]);h+=t+a}p=l.node().getBBox().height,p<=0&&(p=i/2),u=o.insert(`g`).attr(`class`,`methods-group text`);let g=0;for(let e of t.methods){let t=await Vt(u,e,g,[e.parseClassifier()]);g+=t+a}let _=o.node().getBBox();if(s!==null){let e=s.node().getBBox();s.attr(`transform`,`translate(${-e.width/2})`)}return c.attr(`transform`,`translate(${-m.width/2}, ${d})`),_=o.node().getBBox(),l.attr(`transform`,`translate(0, ${d+f+i*2})`),_=o.node().getBBox(),u.attr(`transform`,`translate(0, ${d+f+(p?p+i*4:i*2)})`),_=o.node().getBBox(),{shapeSvg:o,bbox:_}}e(Bt,`textHelper`);async function Vt(t,a,o,l=[]){let u=t.insert(`g`).attr(`class`,`label`).attr(`style`,l.join(`; `)),p=s(),m=`useHtmlLabels`in a?a.useHtmlLabels:c(p.htmlLabels)??!0,g=``;g=`text`in a?a.text:a.label,!m&&g.startsWith(`\\`)&&(g=g.substring(1)),r(g)&&(m=!0);let _=await h(u,i(d(g)),{width:f(g,p)+50,classes:`markdown-node-label`,useHtmlLabels:m},p),v,y=1;if(m){let t=_.children[0],r=n(_);y=t.innerHTML.split(`
    `).length,t.innerHTML.includes(``)&&(y+=t.innerHTML.split(``).length-1);let i=t.getElementsByTagName(`img`);if(i){let t=g.replace(/]*>/g,``).trim()===``;await Promise.all([...i].map(n=>new Promise(r=>{function i(){if(n.style.display=`flex`,n.style.flexDirection=`column`,t){let e=p.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,t=parseInt(e,10)*5+`px`;n.style.minWidth=t,n.style.maxWidth=t}else n.style.width=`100%`;r(n)}e(i,`setupImage`),setTimeout(()=>{n.complete&&i()}),n.addEventListener(`error`,i),n.addEventListener(`load`,i)})))}v=t.getBoundingClientRect(),r.attr(`width`,v.width),r.attr(`height`,v.height)}else{l.includes(`font-weight: bolder`)&&n(_).selectAll(`tspan`).attr(`font-weight`,``),y=_.children.length;let e=_.children[0];(_.textContent===``||_.textContent.includes(`>`))&&(e.textContent=g[0]+g.substring(1).replaceAll(`>`,`>`).replaceAll(`<`,`<`).trim(),g[1]===` `&&(e.textContent=e.textContent[0]+` `+e.textContent.substring(1))),e.textContent===`undefined`&&(e.textContent=``),v=_.getBBox()}return u.attr(`transform`,`translate(0,`+(-v.height/(2*y)+o)+`)`),v.height}e(Vt,`addText`);async function Ht(e,t){let r=l(),{themeVariables:i}=r,{useGradient:a}=i,o=r.class.padding??12,s=o,u=t.useHtmlLabels??c(r.htmlLabels)??!0,d=t;d.annotations=d.annotations??[],d.members=d.members??[],d.methods=d.methods??[];let{shapeSvg:f,bbox:p}=await Bt(e,t,r,u,s),{labelStyles:m,nodeStyles:h}=y(t);t.labelStyle=m,t.cssStyles=d.styles||``;let g=d.styles?.join(`;`)||h||``;t.cssStyles||=g.replaceAll(`!important`,``).split(`;`);let _=d.members.length===0&&d.methods.length===0&&!r.class?.hideEmptyMembersBox,b=S.svg(f),x=v(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let C=Math.max(t.width??0,p.width),w=Math.max(t.height??0,p.height),E=(t.height??0)>p.height;d.members.length===0&&d.methods.length===0?w+=s:d.members.length>0&&d.methods.length===0&&(w+=s*2);let D=-C/2,O=-w/2,k=_?o*2:d.members.length===0&&d.methods.length===0?-o:0;E&&(k=o*2);let A=b.rectangle(D-o,O-o-(_?o:d.members.length===0&&d.methods.length===0?-o/2:0),C+2*o,w+2*o+k,x),j=f.insert(()=>A,`:first-child`);j.attr(`class`,`basic label-container outer-path`);let M=j.node().getBBox(),N=f.select(`.annotation-group`).node().getBBox().height-(_?o/2:0)||0,P=f.select(`.label-group`).node().getBBox().height-(_?o/2:0)||0,F=f.select(`.members-group`).node().getBBox().height-(_?o/2:0)||0,I=(N+P+O+o-(O-o-(_?o:d.members.length===0&&d.methods.length===0?-o/2:0)))/2;if(f.selectAll(`.text`).each((e,t,i)=>{let a=n(i[t]),c=a.attr(`transform`),l=0;if(c){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(c);e&&(l=parseFloat(e[2]))}let p=l+O+o-(_?o:d.members.length===0&&d.methods.length===0?-o/2:0);if(a.attr(`class`).includes(`methods-group`)){let e=Math.max(F,s/2);p=E?Math.max(I,N+P+e+O+s*2+o)+s*2:N+P+e+O+s*4+o}d.members.length===0&&d.methods.length===0&&r.class?.hideEmptyMembersBox&&(p=d.annotations.length>0?l-s:l),u||(p-=4);let m=D;(a.attr(`class`).includes(`label-group`)||a.attr(`class`).includes(`annotation-group`))&&(m=-a.node()?.getBBox().width/2||0,f.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(m=0)})),a.attr(`transform`,`translate(${m}, ${p})`)}),d.members.length>0||d.methods.length>0||_){let e=N+P+O+o,n=b.line(M.x,e,M.x+M.width,e+.001,x);f.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!a?` neo-line`:``}`).attr(`style`,g)}if(_||d.members.length>0||d.methods.length>0){let e=N+P+F+O+s*2+o,n=b.line(M.x,E?Math.max(I,e):e,M.x+M.width,(E?Math.max(I,e):e)+.001,x);f.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!a?` neo-line`:``}`).attr(`style`,g)}if(d.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,g),j.select(`:nth-child(2)`).attr(`style`,g),f.selectAll(`.divider`).select(`path`).attr(`style`,g),t.labelStyle?f.selectAll(`span`).attr(`style`,t.labelStyle):f.selectAll(`span`).attr(`style`,g),!u){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(g);if(t){let e=t[0].replace(`color`,`fill`);f.selectAll(`tspan`).attr(`style`,e)}else if(m){let t=e.exec(m);if(t){let e=t[0].replace(`color`,`fill`);f.selectAll(`tspan`).attr(`style`,e)}}}return T(t,j),t.intersect=function(e){return G.rect(t,e)},f}e(Ht,`classBox`);async function Ut(e,t){let{labelStyles:r,nodeStyles:i}=y(t);t.labelStyle=r;let a=t,o=t,s=`verifyMethod`in t,c=E(t),{themeVariables:u}=l(),{borderColorArray:d,requirementEdgeLabelBackground:f}=u,p=e.insert(`g`).attr(`class`,c).attr(`id`,t.domId??t.id),m;m=s?await $(p,`<<${a.type}>>`,0,t.labelStyle):await $(p,`<<Element>>`,0,t.labelStyle);let h=m,g=await $(p,a.name,h,t.labelStyle+`; font-weight: bold;`);if(h+=g+20,s){let e=await $(p,`${a.requirementId?`ID: ${a.requirementId}`:``}`,h,t.labelStyle);h+=e;let n=await $(p,`${a.text?`Text: ${a.text}`:``}`,h,t.labelStyle);h+=n;let r=await $(p,`${a.risk?`Risk: ${a.risk}`:``}`,h,t.labelStyle);h+=r,await $(p,`${a.verifyMethod?`Verification: ${a.verifyMethod}`:``}`,h,t.labelStyle)}else{let e=await $(p,`${o.type?`Type: ${o.type}`:``}`,h,t.labelStyle);h+=e,await $(p,`${o.docRef?`Doc Ref: ${o.docRef}`:``}`,h,t.labelStyle)}let _=(p.node()?.getBBox().width??200)+20,b=(p.node()?.getBBox().height??200)+20,x=-_/2,C=-b/2,w=S.svg(p),D=v(t,{});t.look!==`handDrawn`&&(D.roughness=0,D.fillStyle=`solid`);let O=w.rectangle(x,C,_,b,D),k=p.insert(()=>O,`:first-child`);if(k.attr(`class`,`basic label-container outer-path`).attr(`style`,i),d?.length){let e=t.colorIndex??0;p.attr(`data-color-id`,`color-${e%d.length}`)}if(p.selectAll(`.label`).each((e,t,r)=>{let i=n(r[t]),a=i.attr(`transform`),o=0,s=0;if(a){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);e&&(o=parseFloat(e[1]),s=parseFloat(e[2]))}let c=s-b/2,l=x+20/2;(t===0||t===1)&&(l=o),i.attr(`transform`,`translate(${l}, ${c+20})`)}),h>m+g+20){let e=C+m+g+20,n;if(t.look===`neo`){let t=.001,r=[[x,e],[x+_,e],[x+_,e+t],[x,e+t]];n=w.polygon(r,D)}else n=w.line(x,e,x+_,e,D);p.insert(()=>n).attr(`class`,`divider`)}return T(t,k),t.intersect=function(e){return G.rect(t,e)},i&&t.look!==`handDrawn`&&(f||d?.length)&&p.selectAll(`path`).attr(`style`,i),p}e(Ut,`requirementBox`);async function $(e,t,r,a=``){if(t===``)return 0;let o=e.insert(`g`).attr(`class`,`label`).attr(`style`,a),s=l(),c=s.htmlLabels??!0,u=await h(o,i(d(t)),{width:f(t,s)+50,classes:`markdown-node-label`,useHtmlLabels:c,style:a},s),p;if(c){let e=u.children[0],t=n(u);p=e.getBoundingClientRect(),t.attr(`width`,p.width),t.attr(`height`,p.height)}else{let e=u.children[0];for(let t of e.children)a&&t.setAttribute(`style`,a);p=u.getBBox(),p.height+=6}return o.attr(`transform`,`translate(${-p.width/2},${-p.height/2+r})`),p.height}e($,`addText`);var Wt=e(e=>{switch(e){case`Very High`:return`red`;case`High`:return`orange`;case`Medium`:return null;case`Low`:return`blue`;case`Very Low`:return`lightblue`}},`colorFromPriority`);async function Gt(e,t,{config:n}){let{labelStyles:r,nodeStyles:i}=y(t);t.labelStyle=r||``;let a=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:s,label:c}=await C(e,t,E(t)),l=t.padding||10,u=``,d;`ticket`in t&&t.ticket&&n?.kanban?.ticketBaseUrl&&(u=n?.kanban?.ticketBaseUrl.replace(`#TICKET#`,t.ticket),d=o.insert(`svg:a`,`:first-child`).attr(`class`,`kanban-ticket-link`).attr(`xlink:href`,u).attr(`target`,`_blank`));let f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||``,width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},p,m;d?{label:p,bbox:m}=await w(d,`ticket`in t&&t.ticket||``,f):{label:p,bbox:m}=await w(o,`ticket`in t&&t.ticket||``,f);let{label:h,bbox:g}=await w(o,`assigned`in t&&t.assigned||``,f);t.width=a;let _=t?.width||0,b=Math.max(m.height,g.height)/2,x=Math.max(s.height+20,t?.height||0)+b,D=-_/2,O=-x/2;c.attr(`transform`,`translate(`+(l-_/2)+`, `+(-b-s.height/2)+`)`),p.attr(`transform`,`translate(`+(l-_/2)+`, `+(-b+s.height/2)+`)`),h.attr(`transform`,`translate(`+(l+_/2-g.width-20)+`, `+(-b+s.height/2)+`)`);let k,{rx:A,ry:j}=t,{cssStyles:M}=t;if(t.look===`handDrawn`){let e=S.svg(o),n=v(t,{}),r=A||j?e.path(N(D,O,_,x,A||0),n):e.rectangle(D,O,_,x,n);k=o.insert(()=>r,`:first-child`),k.attr(`class`,`basic label-container`).attr(`style`,M||null)}else{k=o.insert(`rect`,`:first-child`),k.attr(`class`,`basic label-container __APA__`).attr(`style`,i).attr(`rx`,A??5).attr(`ry`,j??5).attr(`x`,D).attr(`y`,O).attr(`width`,_).attr(`height`,x);let e=`priority`in t&&t.priority;if(e){let t=o.append(`line`),n=D+2,r=O+Math.floor((A??0)/2),i=O+x-Math.floor((A??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,Wt(e))}}return T(t,k),t.height=x,t.intersect=function(e){return G.rect(t,e)},o}e(Gt,`kanbanItem`);async function Kt(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await C(e,n,E(n)),l=o.width+10*s,u=o.height+8*s,d=.15*l,{cssStyles:f}=n,m=o.width+20,h=o.height+20,g=Math.max(l,m),_=Math.max(u,h);c.attr(`transform`,`translate(${-o.width/2}, ${-o.height/2})`);let b,x=`M0 0 - a${d},${d} 1 0,0 ${g*.25},${-1*_*.1} - a${d},${d} 1 0,0 ${g*.25},0 - a${d},${d} 1 0,0 ${g*.25},0 - a${d},${d} 1 0,0 ${g*.25},${_*.1} - - a${d},${d} 1 0,0 ${g*.15},${_*.33} - a${d*.8},${d*.8} 1 0,0 0,${_*.34} - a${d},${d} 1 0,0 ${-1*g*.15},${_*.33} - - a${d},${d} 1 0,0 ${-1*g*.25},${_*.15} - a${d},${d} 1 0,0 ${-1*g*.25},0 - a${d},${d} 1 0,0 ${-1*g*.25},0 - a${d},${d} 1 0,0 ${-1*g*.25},${-1*_*.15} - - a${d},${d} 1 0,0 ${-1*g*.1},${-1*_*.33} - a${d*.8},${d*.8} 1 0,0 0,${-1*_*.34} - a${d},${d} 1 0,0 ${g*.1},${-1*_*.33} - H0 V0 Z`;if(n.look===`handDrawn`){let e=S.svg(a),t=v(n,{}),r=e.path(x,t);b=a.insert(()=>r,`:first-child`),b.attr(`class`,`basic label-container`).attr(`style`,p(f))}else b=a.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`d`,x);return b.attr(`transform`,`translate(${-g/2}, ${-_/2})`),T(n,b),n.calcIntersect=function(e,t){return G.rect(e,t)},n.intersect=function(e){return t.info(`Bang intersect`,n,e),G.rect(n,e)},a}e(Kt,`bang`);async function qt(e,n){let{labelStyles:r,nodeStyles:i}=y(n);n.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s,label:c}=await C(e,n,E(n)),l=o.width+2*s,u=o.height+2*s,d=.15*l,f=.25*l,m=.35*l,h=.2*l,{cssStyles:g}=n,_,b=`M0 0 - a${d},${d} 0 0,1 ${l*.25},${-1*l*.1} - a${m},${m} 1 0,1 ${l*.4},${-1*l*.1} - a${f},${f} 1 0,1 ${l*.35},${l*.2} - - a${d},${d} 1 0,1 ${l*.15},${u*.35} - a${h},${h} 1 0,1 ${-1*l*.15},${u*.65} - - a${f},${d} 1 0,1 ${-1*l*.25},${l*.15} - a${m},${m} 1 0,1 ${-1*l*.5},0 - a${d},${d} 1 0,1 ${-1*l*.25},${-1*l*.15} - - a${d},${d} 1 0,1 ${-1*l*.1},${-1*u*.35} - a${h},${h} 1 0,1 ${l*.1},${-1*u*.65} - H0 V0 Z`;if(n.look===`handDrawn`){let e=S.svg(a),t=v(n,{}),r=e.path(b,t);_=a.insert(()=>r,`:first-child`),_.attr(`class`,`basic label-container`).attr(`style`,p(g))}else _=a.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`d`,b);return c.attr(`transform`,`translate(${-o.width/2}, ${-o.height/2})`),_.attr(`transform`,`translate(${-l/2}, ${-u/2})`),T(n,_),n.calcIntersect=function(e,t){return G.rect(e,t)},n.intersect=function(e){return t.info(`Cloud intersect`,n,e),G.rect(n,e)},a}e(qt,`cloud`);async function Jt(e,t){let{labelStyles:n,nodeStyles:r}=y(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await C(e,t,E(t)),c=a.width+8*o,l=a.height+2*o,u=t.look===`neo`?` - M${-c/2} ${l/2-5} - v${-l+10} - q0,-5 5,-5 - h${c-10} - q5,0 5,5 - v${l-5} - H${-c/2} - Z - `:` - M${-c/2} ${l/2-5} - v${-l+10} - q0,-5 5,-5 - h${c-10} - q5,0 5,5 - v${l-10} - q0,5 -5,5 - h${-(c-10)} - q-5,0 -5,-5 - Z - `;if(!t.domId)throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let d=i.append(`path`).attr(`id`,t.domId).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,u);return i.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-c/2).attr(`y1`,l/2).attr(`x2`,c/2).attr(`y2`,l/2),s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>s.node()),T(t,d),t.calcIntersect=function(e,t){return G.rect(e,t)},t.intersect=function(e){return G.rect(t,e)},i}e(Jt,`defaultMindmapNode`);async function Yt(e,t){return de(e,t,{padding:t.padding??0})}e(Yt,`mindmapCircle`);var Xt=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:ut},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:st},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:dt},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:gt},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:Ce},{semanticName:`Data Store`,name:`Data Store`,shortName:`datastore`,description:`Data flow diagram data store`,aliases:[`data-store`],handler:Te},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:de},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:Kt},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:qt},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:it},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:Fe},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:Ge},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:We},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:Dt},{semanticName:`Manual Operation`,name:`Trapezoid Base Top`,shortName:`trap-t`,description:`Represents a manual task`,aliases:[`manual`,`trapezoid-top`,`inv-trapezoid`],internalAliases:[`inv_trapezoid`],handler:He},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:De},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:bt},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:le},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:ct},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:mt},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:pt},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:Me},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:Ie},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:me},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:he},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:ge},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:Ke},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:Mt},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:Ne},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:Et},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:Qe},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:_e},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:Ee},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:jt},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:Pt},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:Oe},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:Ot},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:je},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:lt},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:tt},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:et},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:se},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:pe},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:yt},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:vt},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:Nt},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:at},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:$e}],Zt=e(()=>{let e=[...Object.entries({state:ft,choice:ue,note:nt,rectWithTitle:ot,labelRect:Ue,iconSquare:Be,iconCircle:Re,icon:Le,iconRounded:ze,imageSquare:Ve,anchor:K,kanbanItem:Gt,mindmapCircle:Yt,defaultMindmapNode:Jt,classBox:Ht,erBox:Lt,requirementBox:Ut}),...Xt.flatMap(e=>[e.shortName,...`aliases`in e?e.aliases:[],...`internalAliases`in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(e)},`generateShapeMap`)();function Qt(e){return e in Zt}e(Qt,`isValidShape`);var $t=new Map;async function en(e,t,n){let r,i;t.shape===`rect`&&(t.rx&&t.ry?t.shape=`roundedRect`:t.shape=`squareRect`);let a=t.shape?Zt[t.shape]:void 0;if(!a)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;n.config.securityLevel===`sandbox`?o=`_top`:t.linkTarget&&(o=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,o??null),i=await a(r,t,n)}else i=await a(e,t,n),r=i;return r.attr(`data-look`,p(t.look)),t.tooltip&&i.attr(`title`,t.tooltip),$t.set(t.id,r),t.haveCallback&&r.attr(`class`,r.attr(`class`)+` clickable`),r}e(en,`insertNode`);var tn=e((e,t)=>{$t.set(t.id,e)},`setNodeElem`),nn=e(()=>{$t.clear()},`clear`),rn=e(e=>{let n=$t.get(e.id);t.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let r=e.diff||0;return e.clusterNode?n.attr(`transform`,`translate(`+(e.x+r-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):n.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),r},`positionNode`);export{en as a,rn as c,ee as i,tn as l,nn as n,Qt as o,M as r,C as s,R as t,T as u}; \ No newline at end of file diff --git a/dist-desktop/assets/chunk-ZIRB5QZD-C6fEPe3t.js b/dist-desktop/assets/chunk-ZIRB5QZD-C6fEPe3t.js deleted file mode 100644 index a523465..0000000 --- a/dist-desktop/assets/chunk-ZIRB5QZD-C6fEPe3t.js +++ /dev/null @@ -1,32 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";function t(e){return e==null}e(t,`isNothing`);function n(e){return typeof e==`object`&&!!e}e(n,`isObject`);function r(e){return Array.isArray(e)?e:t(e)?[]:[e]}e(r,`toArray`);function i(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;ns&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}e(d,`getLine`);function f(e,t){return s.repeat(` `,t-e.length)+e}e(f,`padStart`);function p(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||=79,typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],a,o=-1;a=n.exec(e.buffer);)i.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var c=``,l,u,p=Math.min(e.line+t.linesAfter,i.length).toString().length,m=t.maxLength-(t.indent+p+3);for(l=1;l<=t.linesBefore&&!(o-l<0);l++)u=d(e.buffer,r[o-l],i[o-l],e.position-(r[o]-r[o-l]),m),c=s.repeat(` `,t.indent)+f((e.line-l+1).toString(),p)+` | `+u.str+` -`+c;for(u=d(e.buffer,r[o],i[o],e.position,m),c+=s.repeat(` `,t.indent)+f((e.line+1).toString(),p)+` | `+u.str+` -`,c+=s.repeat(`-`,t.indent+p+3+u.pos)+`^ -`,l=1;l<=t.linesAfter&&!(o+l>=i.length);l++)u=d(e.buffer,r[o+l],i[o+l],e.position-(r[o]-r[o+l]),m),c+=s.repeat(` `,t.indent)+f((e.line+l+1).toString(),p)+` | `+u.str+` -`;return c.replace(/\n$/,``)}e(p,`makeSnippet`);var m=p,h=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],g=[`scalar`,`sequence`,`mapping`];function _(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}e(_,`compileStyleAliases`);function v(e,t){if(t||={},Object.keys(t).forEach(function(t){if(h.indexOf(t)===-1)throw new u(`Unknown option "`+t+`" is met in definition of "`+e+`" YAML type.`)}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=_(t.styleAliases||null),g.indexOf(this.kind)===-1)throw new u(`Unknown kind "`+this.kind+`" is specified for "`+e+`" YAML type.`)}e(v,`Type$1`);var y=v;function b(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}e(b,`compileList`);function ee(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,r;function i(e){e.multi?(t.multi[e.kind].push(e),t.multi.fallback.push(e)):t[e.kind][e.tag]=t.fallback[e.tag]=e}for(e(i,`collectType`),n=0,r=arguments.length;n=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},`binary`),octal:e(function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},`octal`),decimal:e(function(e){return e.toString(10)},`decimal`),hexadecimal:e(function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)},`hexadecimal`)},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),_e=RegExp(`^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function ve(e){return!(e===null||!_e.test(e)||e[e.length-1]===`_`)}e(ve,`resolveYamlFloat`);function ye(e){var t=e.replace(/_/g,``).toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}e(ye,`constructYamlFloat`);var be=/^[-+]?[0-9]+e/;function xe(e,t){var n;if(isNaN(e))switch(t){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(e===1/0)switch(t){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(e===-1/0)switch(t){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(s.isNegativeZero(e))return`-0.0`;return n=e.toString(10),be.test(n)?n.replace(`e`,`.e`):n}e(xe,`representYamlFloat`);function Se(e){return Object.prototype.toString.call(e)===`[object Number]`&&(e%1!=0||s.isNegativeZero(e))}e(Se,`isFloat`);var Ce=new y(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:ve,construct:ye,predicate:Se,represent:xe,defaultStyle:`lowercase`}),we=te.extend({implicit:[ae,le,ge,Ce]}),Te=we,Ee=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),De=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$`);function Oe(e){return e===null?!1:Ee.exec(e)!==null||De.exec(e)!==null}e(Oe,`resolveYamlTimestamp`);function ke(e){var t,n,r,i,a,o,s,c=0,l=null,u,d,f;if(t=Ee.exec(e),t===null&&(t=De.exec(e)),t===null)throw Error(`Date resolve error`);if(n=+t[1],r=t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+=`0`;c=+c}return t[9]&&(u=+t[10],d=+(t[11]||0),l=(u*60+d)*6e4,t[9]===`-`&&(l=-l)),f=new Date(Date.UTC(n,r,i,a,o,s,c)),l&&f.setTime(f.getTime()-l),f}e(ke,`constructYamlTimestamp`);function Ae(e){return e.toISOString()}e(Ae,`representYamlTimestamp`);var je=new y(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:Oe,construct:ke,instanceOf:Date,represent:Ae});function Me(e){return e===`<<`||e===null}e(Me,`resolveYamlMerge`);var Ne=new y(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:Me}),S=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function Pe(e){if(e===null)return!1;var t,n,r=0,i=e.length,a=S;for(n=0;n64)){if(t<0)return!1;r+=6}return r%8==0}e(Pe,`resolveYamlBinary`);function Fe(e){var t,n,r=e.replace(/[\r\n=]/g,``),i=r.length,a=S,o=0,s=[];for(t=0;t>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,n===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):n===18?(s.push(o>>10&255),s.push(o>>2&255)):n===12&&s.push(o>>4&255),new Uint8Array(s)}e(Fe,`constructYamlBinary`);function Ie(e){var t=``,n=0,r,i,a=e.length,o=S;for(r=0;r>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=a%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}e(Ie,`representYamlBinary`);function Le(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}e(Le,`isBinary`);var Re=new y(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:Pe,construct:Fe,predicate:Le,represent:Ie}),ze=Object.prototype.hasOwnProperty,Be=Object.prototype.toString;function Ve(e){if(e===null)return!0;var t=[],n,r,i,a,o,s=e;for(n=0,r=s.length;n>10)+55296,(e-65536&1023)+56320)}e(ft,`charFromCodepoint`);function pt(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}e(pt,`setProperty`);var mt=Array(256),ht=Array(256);for(M=0;M<256;M++)mt[M]=+!!dt(M),ht[M]=dt(M);var M;function gt(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Qe,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}e(gt,`State$1`);function _t(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=m(n),new u(t,n)}e(_t,`generateError`);function N(e,t){throw _t(e,t)}e(N,`throwError`);function P(e,t){e.onWarning&&e.onWarning.call(null,_t(e,t))}e(P,`throwWarning`);var vt={YAML:e(function(e,t,n){var r,i,a;e.version!==null&&N(e,`duplication of %YAML directive`),n.length!==1&&N(e,`YAML directive accepts exactly one argument`),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&N(e,`ill-formed argument of the YAML directive`),i=parseInt(r[1],10),a=parseInt(r[2],10),i!==1&&N(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&P(e,`unsupported YAML version of the document`)},`handleYamlDirective`),TAG:e(function(e,t,n){var r,i;n.length!==2&&N(e,`TAG directive accepts exactly two arguments`),r=n[0],i=n[1],ot.test(r)||N(e,`ill-formed tag handle (first argument) of the TAG directive`),C.call(e.tagMap,r)&&N(e,`there is a previously declared suffix for "`+r+`" tag handle`),st.test(i)||N(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{i=decodeURIComponent(i)}catch{N(e,`tag prefix is malformed: `+i)}e.tagMap[r]=i},`handleTagDirective`)};function F(e,t,n,r){var i,a,o,s;if(t1&&(e.result+=s.repeat(` -`,t-1))}e(B,`writeFoldedLines`);function bt(e,t,n){var r,i,a,o,s,c,l,u,d=e.kind,f=e.result,p=e.input.charCodeAt(e.position);if(A(p)||j(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),A(i)||n&&j(i)))return!1;for(e.kind=`scalar`,e.result=``,a=o=e.position,s=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),A(i)||n&&j(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),A(r))break}else if(e.position===e.lineStart&&z(e)||n&&j(p))break;else if(O(p))if(c=e.line,l=e.lineStart,u=e.lineIndent,R(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=u;break}s&&=(F(e,a,o,!1),B(e,e.line-c),a=o=e.position,!1),k(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return F(e,a,o,!1),e.result?!0:(e.kind=d,e.result=f,!1)}e(bt,`readPlainScalar`);function xt(e,t){var n=e.input.charCodeAt(e.position),r,i;if(n!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(F(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else O(n)?(F(e,r,i,!0),B(e,R(e,!1,t)),r=i=e.position):e.position===e.lineStart&&z(e)?N(e,`unexpected end of the document within a single quoted scalar`):(e.position++,i=e.position);N(e,`unexpected end of the stream within a single quoted scalar`)}e(xt,`readSingleQuotedScalar`);function St(e,t){var n,r,i,a,o,s=e.input.charCodeAt(e.position);if(s!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(s=e.input.charCodeAt(e.position))!==0;)if(s===34)return F(e,n,e.position,!0),e.position++,!0;else if(s===92){if(F(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),O(s))R(e,!1,t);else if(s<256&&mt[s])e.result+=ht[s],e.position++;else if((o=lt(s))>0){for(i=o,a=0;i>0;i--)s=e.input.charCodeAt(++e.position),(o=ct(s))>=0?a=(a<<4)+o:N(e,`expected hexadecimal character`);e.result+=ft(a),e.position++}else N(e,`unknown escape sequence`);n=r=e.position}else O(s)?(F(e,n,r,!0),B(e,R(e,!1,t)),n=r=e.position):e.position===e.lineStart&&z(e)?N(e,`unexpected end of the document within a double quoted scalar`):(e.position++,r=e.position);N(e,`unexpected end of the stream within a double quoted scalar`)}e(St,`readDoubleQuotedScalar`);function Ct(e,t){var n=!0,r,i,a,o=e.tag,s,c=e.anchor,l,u,d,f,p,m=Object.create(null),h,g,_,v=e.input.charCodeAt(e.position);if(v===91)u=93,p=!1,s=[];else if(v===123)u=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),v=e.input.charCodeAt(++e.position);v!==0;){if(R(e,!0,t),v=e.input.charCodeAt(e.position),v===u)return e.position++,e.tag=o,e.anchor=c,e.kind=p?`mapping`:`sequence`,e.result=s,!0;n?v===44&&N(e,`expected the node content, but found ','`):N(e,`missed comma between flow collection entries`),g=h=_=null,d=f=!1,v===63&&(l=e.input.charCodeAt(e.position+1),A(l)&&(d=f=!0,e.position++,R(e,!0,t))),r=e.line,i=e.lineStart,a=e.position,V(e,t,w,!1,!0),g=e.tag,h=e.result,R(e,!0,t),v=e.input.charCodeAt(e.position),(f||e.line===r)&&v===58&&(d=!0,v=e.input.charCodeAt(++e.position),R(e,!0,t),V(e,t,w,!1,!0),_=e.result),p?I(e,s,m,g,h,_,r,i,a):d?s.push(I(e,null,m,g,h,_,r,i,a)):s.push(h),R(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(n=!0,v=e.input.charCodeAt(++e.position)):n=!1}N(e,`unexpected end of the stream within a flow collection`)}e(Ct,`readFlowCollection`);function wt(e,t){var n,r,i=E,a=!1,o=!1,c=t,l=0,u=!1,d,f=e.input.charCodeAt(e.position);if(f===124)r=!1;else if(f===62)r=!0;else return!1;for(e.kind=`scalar`,e.result=``;f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)E===i?i=f===43?nt:tt:N(e,`repeat of a chomping mode identifier`);else if((d=ut(f))>=0)d===0?N(e,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?N(e,`repeat of an indentation width identifier`):(c=t+d-1,o=!0);else break;if(k(f)){do f=e.input.charCodeAt(++e.position);while(k(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!O(f)&&f!==0)}for(;f!==0;){for(L(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!o||e.lineIndentc&&(c=e.lineIndent),O(f)){l++;continue}if(e.lineIndentt)&&c!==0)N(e,`bad indentation of a sequence entry`);else if(e.lineIndentt)&&(g&&(o=e.line,s=e.lineStart,c=e.position),V(e,t,T,!0,i)&&(g?m=e.result:h=e.result),g||(I(e,d,f,p,m,h,o,s,c),p=m=h=null),R(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&v!==0)N(e,`bad indentation of a mapping entry`);else if(e.lineIndentt?c=1:e.lineIndent===t?c=0:e.lineIndentt?c=1:e.lineIndent===t?c=0:e.lineIndent tag; it should be "scalar", not "`+e.kind+`"`),d=0,f=e.implicitTypes.length;d`),e.result!==null&&m.kind!==e.kind&&N(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+m.kind+`", not "`+e.kind+`"`),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):N(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),e.tag!==null||e.anchor!==null||u}e(V,`composeNode`);function At(e){var t=e.position,n,r,i,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(R(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!A(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&N(e,`directive name must not be less than one character in length`);o!==0;){for(;k(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!O(o));break}if(O(o))break;for(n=e.position;o!==0&&!A(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&L(e),C.call(vt,r)?vt[r](e,r,i):P(e,`unknown document directive "`+r+`"`)}if(R(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,R(e,!0,-1)):a&&N(e,`directives end mark is expected`),V(e,e.lineIndent-1,T,!1,!0),R(e,!0,-1),e.checkLineBreaks&&it.test(e.input.slice(t,e.position))&&P(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&z(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,R(e,!0,-1));return}if(e.position=55296&&n<=56319&&t+1=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}e(Y,`codePointAt`);function yn(e){return/^\n* /.test(e)}e(yn,`needIndentIndicator`);var bn=1,xn=2,Sn=3,Cn=4,X=5;function wn(e,t,n,r,i,a,o,s){var c,l=0,u=null,d=!1,f=!1,p=r!==-1,m=-1,h=_n(Y(e,0))&&vn(Y(e,e.length-1));if(t||o)for(c=0;c=65536?c+=2:c++){if(l=Y(e,c),!J(l))return X;h&&=gn(l,u,s),u=l}else{for(c=0;c=65536?c+=2:c++){if(l=Y(e,c),l===H)d=!0,p&&(f||=c-m-1>r&&e[m+1]!==` `,m=c);else if(!J(l))return X;h&&=gn(l,u,s),u=l}f||=p&&c-m-1>r&&e[m+1]!==` `}return!d&&!f?h&&!o&&!i(e)?bn:a===G?X:xn:n>9&&yn(e)?X:o?a===G?X:xn:f?Cn:Sn}e(wn,`chooseScalarStyle`);function Tn(t,n,r,i,a){t.dump=(function(){if(n.length===0)return t.quotingType===G?`""`:`''`;if(!t.noCompatMode&&(sn.indexOf(n)!==-1||cn.test(n)))return t.quotingType===G?`"`+n+`"`:`'`+n+`'`;var o=t.indent*Math.max(1,r),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-o),c=i||t.flowLevel>-1&&r>=t.flowLevel;function l(e){return mn(t,e)}switch(e(l,`testAmbiguity`),wn(n,c,t.indent,s,l,t.quotingType,t.forceQuotes&&!i,a)){case bn:return n;case xn:return`'`+n.replace(/'/g,`''`)+`'`;case Sn:return`|`+En(n,t.indent)+Dn(pn(n,o));case Cn:return`>`+En(n,t.indent)+Dn(pn(On(n,s),o));case X:return`"`+An(n)+`"`;default:throw new u(`impossible error: invalid scalar style`)}})()}e(Tn,`writeScalar`);function En(e,t){var n=yn(e)?String(t):``,r=e[e.length-1]===` -`;return n+(r&&(e[e.length-2]===` -`||e===` -`)?`+`:r?``:`-`)+` -`}e(En,`blockHeader`);function Dn(e){return e[e.length-1]===` -`?e.slice(0,-1):e}e(Dn,`dropEndingNewline`);function On(e,t){for(var n=/(\n+)([^\n]*)/g,r=(function(){var r=e.indexOf(` -`);return r=r===-1?e.length:r,n.lastIndex=r,kn(e.slice(0,r),t)})(),i=e[0]===` -`||e[0]===` `,a,o;o=n.exec(e);){var s=o[1],c=o[2];a=c[0]===` `,r+=s+(!i&&!a&&c!==``?` -`:``)+kn(c,t),i=a}return r}e(On,`foldString`);function kn(e,t){if(e===``||e[0]===` `)return e;for(var n=/ [^ ]/g,r,i=0,a,o=0,s=0,c=``;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=` -`+e.slice(i,a),i=a+1),o=s;return c+=` -`,e.length-i>t&&o>i?c+=e.slice(i,o)+` -`+e.slice(o+1):c+=e.slice(i),c.slice(1)}e(kn,`foldLine`);function An(e){for(var t=``,n=0,r,i=0;i=65536?i+=2:i++)n=Y(e,i),r=W[n],!r&&J(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||un(n);return t}e(An,`escapeString`);function jn(e,t,n){var r=``,i=e.tag,a,o,s;for(a=0,o=n.length;a1024&&(u+=`? `),u+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),Q(e,t,l,!1,!1)&&(u+=e.dump,r+=u));e.tag=i,e.dump=`{`+r+`}`}e(Nn,`writeFlowMapping`);function Pn(e,t,n,r){var i=``,a=e.tag,o=Object.keys(n),s,c,l,d,f,p;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys==`function`)o.sort(e.sortKeys);else if(e.sortKeys)throw new u(`sortKeys must be a boolean or a function`);for(s=0,c=o.length;s1024,f&&(e.dump&&H===e.dump.charCodeAt(0)?p+=`?`:p+=`? `),p+=e.dump,f&&(p+=K(e,t)),Q(e,t+1,d,!0,f)&&(e.dump&&H===e.dump.charCodeAt(0)?p+=`:`:p+=`: `,p+=e.dump,i+=p));e.tag=a,e.dump=i||`{}`}e(Pn,`writeBlockMapping`);function Z(e,t,n){var r,i=n?e.explicitTypes:e.implicitTypes,a,o,s,c;for(a=0,o=i.length;a tag resolver accepts not "`+c+`" style`);e.dump=r}return!0}return!1}e(Z,`detectType`);function Q(e,t,n,r,i,a,o){e.tag=null,e.dump=n,Z(e,n,!1)||Z(e,n,!0);var s=Ft.call(e.dump),c=r,l;r&&=e.flowLevel<0||e.flowLevel>t;var d=s===`[object Object]`||s===`[object Array]`,f,p;if(d&&(f=e.duplicates.indexOf(n),p=f!==-1),(e.tag!==null&&e.tag!==`?`||p||e.indent!==2&&t>0)&&(i=!1),p&&e.usedDuplicates[f])e.dump=`*ref_`+f;else{if(d&&p&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),s===`[object Object]`)r&&Object.keys(e.dump).length!==0?(Pn(e,t,e.dump,i),p&&(e.dump=`&ref_`+f+e.dump)):(Nn(e,t,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(s===`[object Array]`)r&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?Mn(e,t-1,e.dump,i):Mn(e,t,e.dump,i),p&&(e.dump=`&ref_`+f+e.dump)):(jn(e,t,e.dump),p&&(e.dump=`&ref_`+f+` `+e.dump));else if(s===`[object String]`)e.tag!==`?`&&Tn(e,e.dump,t,a,c);else if(s===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new u(`unacceptable kind of an object to dump `+s)}e.tag!==null&&e.tag!==`?`&&(l=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`),l=e.tag[0]===`!`?`!`+l:l.slice(0,18)===`tag:yaml.org,2002:`?`!!`+l.slice(18):`!<`+l+`>`,e.dump=l+` `+e.dump)}return!0}e(Q,`writeNode`);function Fn(e,t){var n=[],r=[],i,a;for($(e,n,r),i=0,a=r.length;i{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/classDiagram-v2-EOCWNBFH-D6qCu_tS.js b/dist-desktop/assets/classDiagram-v2-EOCWNBFH-D6qCu_tS.js deleted file mode 100644 index f51b5b4..0000000 --- a/dist-desktop/assets/classDiagram-v2-EOCWNBFH-D6qCu_tS.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-UMNXGZaF.js";import"./chunk-WYO6CB5R-Dv5kDyQC.js";import"./chunk-ICXQ74PX-Czpgj8Uw.js";import"./chunk-HOUHSVGY-iJuv90UH.js";import"./chunk-Q4XR5HBZ-CQ8zkLYc.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-D-nWYRNR.js";import"./chunk-32BRIVSS-DWU3ezKg.js";import"./chunk-XXDRQBXY-Bq6zMMOx.js";import"./chunk-VR4S4FIN-BTo4eV3J.js";import"./chunk-C7G6YPKG-DW-1jWUA.js";import"./chunk-ZGVPDNZ5-DGInJAPD.js";import"./chunk-52WLFC77-BOCvVCX1.js";import"./chunk-FWX5IMBZ-ComLEIwh.js";import{i as t,n,r,t as i}from"./chunk-V7JOEXUC-Drt5hFEy.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/client-CwgDvMJw.js b/dist-desktop/assets/client-CwgDvMJw.js deleted file mode 100644 index 154ec05..0000000 --- a/dist-desktop/assets/client-CwgDvMJw.js +++ /dev/null @@ -1,3 +0,0 @@ -import{i as e,n as t}from"./rolldown-runtime-aKtaBQYM.js";import{t as n}from"./react-BLJmJXjR.js";var r=`1.6.25`;function i(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}function a(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function o(e){let t=e.split(` - at `);return t.length<=1?e:(t.splice(1,1),t.join(` - at `))}function s(e,t){class n extends e{#e;constructor(...e){if(a()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=o(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,"constructor",{get(){return t},enumerable:!1,configurable:!0}),n}var c={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};s(class extends Error{constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:c[e]){super(t?.message,t?.cause?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,this.body=t}},Error);var l=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}},u=i({INVALID_OAUTH_CONFIGURATION:`Invalid OAuth configuration`,TOKEN_URL_NOT_FOUND:`Invalid OAuth configuration. Token URL not found.`,PROVIDER_CONFIG_NOT_FOUND:`No config found for provider`,PROVIDER_ID_REQUIRED:`Provider ID is required`,INVALID_OAUTH_CONFIG:`Invalid OAuth configuration.`,SESSION_REQUIRED:`Session is required`,ISSUER_MISMATCH:`OAuth issuer mismatch. The authorization server issuer does not match the expected value (RFC 9207).`,ISSUER_MISSING:`OAuth issuer parameter missing. The authorization server did not include the required iss parameter (RFC 9207).`}),d=()=>({id:`generic-oauth-client`,version:r,$InferServerPlugin:{},$ERROR_CODES:u}),f=Object.create(null),p=e=>({}),m=new Proxy(f,{get(e,t){return p()[t]??f[t]},has(e,t){return t in p()||t in f},set(e,t,n){let r=p(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=p(!0);return delete n[t],!0},ownKeys(){let e=p(!0);return Object.keys(e)}});m.NODE_ENV;function h(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return h(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return h(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return h(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return h(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return h(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return h(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return h(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});var g=47;function _(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===g;)t--;return t===e.length?e:e.slice(0,t)}function v(e){try{return(_(new URL(e).pathname)||`/`)!==`/`}catch{throw new l(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function y(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new l(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof l?t:new l(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function b(e,t=`/api/auth`){if(y(e),v(e))return e;let n=_(e);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function ee(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function te(e,t,n,r,i){if(e)return b(e,t);if(r!==!1){let e=m.BETTER_AUTH_URL||m.NEXT_PUBLIC_BETTER_AUTH_URL||m.PUBLIC_BETTER_AUTH_URL||m.NUXT_PUBLIC_BETTER_AUTH_URL||m.NUXT_PUBLIC_AUTH_URL||(m.BASE_URL===`/`?void 0:m.BASE_URL);if(e)return b(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&ee(o,`proto`)&&ee(a,`host`))try{return b(`${o}://${a}`,t)}catch{}if(n){let e=ne(n.url);if(!e)throw new l(`Could not get origin from request. Please provide a valid base URL.`);return b(e,t)}if(typeof window<`u`&&window.location)return b(window.location.origin,t)}function ne(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var re=[`javascript:`,`data:`,`vbscript:`];function ie(e){let t;try{t=new URL(e)}catch{return!0}return!re.includes(t.protocol)}var x=[],S=0,C=null,w=4,ae=globalThis.nanostoresGlobal||={epoch:0},oe=()=>{for(S=0;S{let t=[],n={get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{for(let t=S+w;t(e.events=e.events||{},e.events[n+D]||(e.events[n+D]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);r.splice(i,1),r.length||(delete e.events[n],e.events[n+D](),delete e.events[n+D])}),le=(e,t)=>O(e,t,se,t=>{let n=e.set,r=e.setKey;return e.setKey&&=(n,i)=>{let a;if(t({abort:()=>{a=!0},changed:n,newValue:{...e.value,[n]:i}}),!a)return r(n,i)},e.set=e=>{let r;if(t({abort:()=>{r=!0},newValue:e}),!r)return n(e)},()=>{e.set=n,e.setKey=r}}),ue=1e3,de=(e,t)=>O(e,n=>{let r=t(n);r&&e.events[E].push(r)},ce,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[E]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[E])t();e.events[E]=[]}},ue)},()=>{e.listen=n,e.off=r}});function fe(e,t,n){let r=new Set(t);return e.listen((e,i,a)=>{(a===void 0?t.some(t=>e[t]!==i[t]):r.has(a)||r.has(a.split(/\.|\[/)[0]))&&n(e,i,a)})}function pe(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function k(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n{t(e.value,n)&&r()})}var he={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},ge=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,A={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},_e=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function ve(e){return e instanceof Date&&!isNaN(e.getTime())}function ye(e){let t=_e.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return ve(f)?f:null}function be(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim(),s=o.toLowerCase();if(s.length<=9&&s in A)return A[s];if(!ge.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(he).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t){r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);return}if(a&&typeof t==`string`){let e=ye(t);if(e)return e}return i?i(e,t):t})}catch(t){if(n)throw t;return e}}function xe(e,t={strict:!0}){return be(e,t)}var Se={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&ie(e.data.url)&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},j=Symbol.for(`better-auth:broadcast-channel`),Ce=()=>Math.floor(Date.now()/1e3),we=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(!(typeof window>`u`))try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:Ce()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event!==`session`||!t?.data||this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function M(e=`better-auth.message`){return globalThis[j]||(globalThis[j]=new we(e)),globalThis[j]}var N=Symbol.for(`better-auth:focus-manager`),Te=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function P(){return globalThis[N]||(globalThis[N]=new Te),globalThis[N]}var F=Symbol.for(`better-auth:online-manager`),Ee=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function I(){return globalThis[F]||(globalThis[F]=new Ee),globalThis[F]}var L=()=>Math.floor(Date.now()/1e3),De=5;function Oe(e){let{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},l=()=>s||I().isOnline,u=e=>{if(l()){if(e?.event===`storage`){t();return}if(e?.event===`poll`){c.lastSessionRequest=L(),t();return}if(e?.event===`visibilitychange`){if(L()-c.lastSessionRequest{M().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{n()&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=M().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=P().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=I().subscribe(e=>{e&&u({event:`visibilitychange`})})},g=()=>{c.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,f(),p(),m(),h(),g(),c.cleanupBroadcastSetup=M().setup(),c.cleanupFocusSetup=P().setup(),c.cleanupOnlineSetup=I().setup())},cleanup:()=>{c.isInitialized&&(c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.unsubscribeSignal&&=(c.unsubscribeSignal(),void 0),c.cleanupBroadcastSetup&&=(c.cleanupBroadcastSetup(),void 0),c.cleanupFocusSetup&&=(c.cleanupFocusSetup(),void 0),c.cleanupOnlineSetup&&=(c.cleanupOnlineSetup(),void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:u,broadcastSessionUpdate:d}}var ke=()=>typeof window>`u`;function R(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}function Ae(e){return!e||e.session===null&&e.user===null?null:e}function je(e,t){return k(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function Me(e,t){let n=T(!1),r,i=e=>s(e),a=T({data:null,error:null,isPending:!0,isRefetching:!1,refetch:i});me(a,je);let o=e=>{if(r!==e)return;let t=a.get();r=void 0,!(!t.isPending&&!t.isRefetching)&&a.set({...t,isPending:!1,isRefetching:!1,refetch:i})},s=async t=>{r?.abort();let n=new AbortController;r=n;let s=a.get();a.set({...s,isPending:s.data===null,isRefetching:!0,error:null,refetch:i});try{let r=await e(`/get-session`,{method:`GET`,query:t?.query,signal:n.signal});if(n.signal.aborted){o(n);return}let{data:s,error:c}=R(r);if(s?.needsRefresh)try{let t=await e(`/get-session`,{method:`POST`,signal:n.signal});if(n.signal.aborted){o(n);return}({data:s,error:c}=R(t))}catch{if(n.signal.aborted){o(n);return}}if(c){let e=a.get(),t=c?.status===401;a.set({data:t?null:e.data,error:c,isPending:!1,isRefetching:!1,refetch:i});return}let l=Ae(s),u=a.get(),d=u.data!=null&&l!=null&&k(u.data,l)?u.data:l;a.set({data:d,error:null,isPending:!1,isRefetching:!1,refetch:i})}catch(e){if(n.signal.aborted){o(n);return}let t=a.get();a.set({data:t.data,error:e,isPending:!1,isRefetching:!1,refetch:i})}},c=()=>{};return de(a,()=>{let e;ke()||(e=setTimeout(()=>{s()},0));let i=Oe({fetchSession:s,shouldPollSession:()=>a.get().data!=null,sessionSignal:n,options:t});return i.init(),c=i.broadcastSessionUpdate,()=>{e&&clearTimeout(e);let t=r;t?.abort(),t&&o(t),i.cleanup()}}),{session:a,$sessionSignal:n,broadcastSessionUpdate:e=>c(e)}}function z(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function B(e,t,n=`.`,r){if(!z(t))return B(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(Array.isArray(a)&&Array.isArray(i[t])?i[t]=[...a,...i[t]]:z(a)&&z(i[t])?i[t]=B(a,i[t],(n?`${n}.`:``)+t.toString(),r):i[t]=a))}return i}function Ne(e){return(...t)=>t.reduce((t,n)=>B(t,n,``,e),{})}var Pe=Ne(),Fe=Object.defineProperty,Ie=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,H=(e,t,n)=>t in e?Fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,U=(e,t)=>{for(var n in t||={})Re.call(t,n)&&H(e,n,t[n]);if(V)for(var n of V(t))ze.call(t,n)&&H(e,n,t[n]);return e},W=(e,t)=>Ie(e,Le(t)),Be=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},Ve=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let r=await i.init?.call(i,e.toString(),t);n=r.options||n,e=r.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},G=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},Ge=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function Ke(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return Ge.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function qe(e){try{return JSON.parse(e),!0}catch{return!1}}function Je(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function Ye(e){try{return JSON.parse(e)}catch{return e}}function Xe(e){return typeof e==`function`}function Ze(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&Xe(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&Xe(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}function Qe(...e){let t={};for(let n of e)if(n)if(n instanceof Headers)n.forEach((e,n)=>{t[n]=e});else{let e=Array.isArray(n)?n:Object.entries(n);for(let[n,r]of e)r!=null&&(t[n]=r)}return t}async function $e(e){let t=new Headers(Qe(e?.headers,await We(e)));if(!t.has(`content-type`)){let n=et(e?.body);n&&t.set(`content-type`,n)}return t}function et(e){return Je(e)?`application/json`:null}function tt(e){let t=e.get(`content-type`);return t?t.split(`;`)[0].trim().toLowerCase():null}function nt(e,t){let{body:n}=e;return n?!Je(n)||typeof n==`string`?n:tt(t)===`application/x-www-form-urlencoded`?new URLSearchParams(n).toString():JSON.stringify(n):null}function rt(e,t){if(t?.method)return t.method.toUpperCase();if(e.startsWith(`@`)){let n=e.split(`@`)[1]?.split(`/`)[0];return ot.includes(n)?n.toUpperCase():t?.body?`POST`:`GET`}return t?.body?`POST`:`GET`}function it(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var at=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function K(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new at(n.issues);return n.value}var ot=[`get`,`post`,`put`,`patch`,`delete`],st=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){let r=e.plugins?.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1)?.schema||e.schema;if(r){let e=t;r.config?.prefix&&e.startsWith(r.config.prefix)&&(e=e.replace(r.config.prefix,``),r.config.baseURL&&(t=t.replace(r.config.prefix,r.config.baseURL))),r.config?.baseURL&&e.startsWith(r.config.baseURL)&&(e=e.replace(r.config.baseURL,``)),e.startsWith(`/`)&&e.charAt(1)===`@`&&(e=e.substring(1));let i=r.schema[e];if(i){let e=n?.headers;if(i.headers&&!n?.disableValidation){let t={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((e,n)=>{t[n.toLowerCase()]=e});else if(typeof n.headers==`object`)for(let[e,r]of Object.entries(n.headers))r!=null&&(t[e.toLowerCase()]=r)}let r=await K(i.headers,t),a={};for(let[e,t]of Object.entries(r))a[e.toLowerCase()]=t;e=a}let r=W(U({},n),{method:i.method,output:i.output,headers:e});return n?.disableValidation||(r=W(U({},r),{body:i.input?await K(i.input,n?.body):n?.body,params:i.params?await K(i.params,n?.params):n?.params,query:i.query?await K(i.query,n?.query):n?.query})),{url:t,options:r}}}return{url:t,options:n}}}),ct=e=>{async function t(t,n){let r=W(U(U({},e),n),{headers:Qe(e?.headers,n?.headers),plugins:[...e?.plugins||[],st(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await q(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await q(t,r)}return t},lt=e=>e===`.`||e===`..`;function ut(e,t){let n=e;for(let[e,r]of t)n=n.replace(e,r);if(lt(n))throw TypeError(`Path parameters cannot be reserved path segments`);return encodeURIComponent(n)}function dt(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``;if(e.startsWith(`@`)){let t=e.toString().split(`@`)[1].split(`/`)[0];ot.includes(t)&&(e=e.replace(`@${t}/`,`/`))}a.endsWith(`/`)||(a+=`/`);let[o,s]=e.replace(a,``).split(`?`),c=new URLSearchParams(s);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)c.append(e,n);continue}else n=JSON.stringify(t);c.set(e,n)}let l=new Map;if(r)if(Array.isArray(r)){let e=o.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];l.set(n,String(e))}}else for(let[e,t]of Object.entries(r))l.set(`:${e}`,String(t));o=o.split(`/`).map(e=>ut(e,l)).join(`/`),o=o.replace(/^\/+/,``);let u=c.toString();return u=u.length>0?`?${u}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${o}${u}`,a):`${a}${o}${u}`}var q=async(e,t)=>{let{hooks:n,url:r,options:i}=await Ve(e,t),a=Ze(i),o=new AbortController,s=i.signal??o.signal,c=dt(r,i),l=await $e(i),u=nt(i,l),d=rt(r,i),f=W(U({},i),{url:c,headers:l,body:u,method:d,signal:s});for(let e of n.onRequest)if(e){let t=await e(f);typeof t==`object`&&t&&Object.assign(f,t)}(`pipeTo`in f&&typeof f.pipeTo==`function`||typeof t?.body?.pipe==`function`)&&(`duplex`in f||(f.duplex=`half`));let{clearTimeout:p}=it(i,o),m=await a(f.url,f);p();let h={response:m,request:f};for(let e of n.onResponse)if(e){let n=await e(W(U({},h),{response:t?.hookOptions?.cloneResponse?m.clone():m}));n instanceof Response?m=n:typeof n==`object`&&n&&(m=n.response)}if(m.ok){if(f.method===`HEAD`)return{data:``,error:null};let e=Ke(m),r={data:null,response:m,request:f};if(e===`json`||e===`text`){let e=await m.text();r.data=await(f.jsonParser??Ye)(e)}else r.data=await m[e]();f?.output&&f.output&&!f.disableValidation&&(r.data=await K(f.output,r.data));for(let e of n.onSuccess)e&&await e(W(U({},r),{response:t?.hookOptions?.cloneResponse?m.clone():m}));return t?.throw?r.data:{data:r.data,error:null}}let g=t?.jsonParser??Ye,_=await m.text(),v=qe(_),y=v?await g(_):null,b={response:m,responseText:_,request:f,error:W(U({},y),{status:m.status,statusText:m.statusText})};for(let e of n.onError)e&&await e(W(U({},b),{response:t?.hookOptions?.cloneResponse?m.clone():m}));if(t?.retry){let r=Ue(t.retry),i=t.retryAttempt??0;if(await r.shouldAttemptRetry(i,m)){for(let e of n.onRetry)e&&await e(h);let a=r.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await q(e,W(U({},t),{retryAttempt:i+1}))}}if(t?.throw)throw new Be(m.status,m.statusText,v?y:_);return{data:null,error:W(U({},y),{status:m.status,statusText:m.statusText})}},ft=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},pt=(e,t)=>{let n=`credentials`in Request.prototype,r=te(e?.baseURL,e?.basePath,void 0,t)??ft(e?.basePath)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=ct({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?xe(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[Se],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=Me(d,e),h=e?.plugins||[],g={},_={$sessionSignal:f,session:p},v={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},y=[{signal:`$sessionSignal`,matcher(e){return e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/revoke-other-sessions`||e===`/change-email`||e===`/change-password`},callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of h)e.getAtoms&&Object.assign(_,e.getAtoms?.(d)),e.pathMethods&&Object.assign(v,e.pathMethods),e.atomListeners&&y.push(...e.atomListeners);let b={notify:e=>{_[e].set(!_[e].get())},listen:(e,t)=>{_[e].subscribe(t)},atoms:_};for(let t of h)t.getActions&&(g=Pe(t.getActions?.(d,b,e)??{},g));return{get baseURL(){return r},pluginsActions:g,pluginsAtoms:_,pluginPathMethods:v,atomListeners:y,$fetch:d,$store:b}};function mt(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function ht(e){return e.charAt(0).toUpperCase()+e.slice(1)}var gt=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,_t=/['\u2019]/g;function vt(e){return e.replace(_t,``).match(gt)??[]}function yt(e){return vt(e).map(e=>e.toLowerCase()).join(`-`)}function bt(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function xt(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||mt(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(yt).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=bt(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10),e.callback?.(c)}}})}})}return a()}var J=e(n(),1);function St(e,t={}){let n=(0,J.useRef)(e.get()),{keys:r,deps:i=[e,r]}=t,a=(0,J.useCallback)(t=>{let i=e=>{n.current!==e&&(n.current=e,t())};return i(e.value),r?.length?fe(e,r,i):e.listen(i)},i),o=()=>n.current;return(0,J.useSyncExternalStore)(a,o,o)}function Ct(e){return`use${ht(e)}`}function wt(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,$fetch:i,$store:a,atomListeners:o}=pt(e),s={};for(let[e,t]of Object.entries(r))s[Ct(e)]=()=>St(t);return xt({...n,...s,$fetch:i,$store:a},i,t,r,o)}var Tt=t({authClient:()=>Y,authEnabled:()=>!0,getBearerToken:()=>Z,signIn:()=>Et,signOut:()=>kt}),Y=wt({plugins:[d()],fetchOptions:{onRequest(e){let t=Z();return t&&e.headers.set(`Authorization`,`Bearer ${t}`),e}}}),X=`grok-auth.bearer-token`;function Z(){if(typeof window>`u`)return null;try{return window.sessionStorage.getItem(X)}catch{return null}}function Q(e){if(!(typeof window>`u`))try{e?window.sessionStorage.setItem(X,e):window.sessionStorage.removeItem(X)}catch{}}function $(){return typeof window<`u`&&window.location.hostname.endsWith(`.grok-sandbox.com`)}async function Et(e,t={}){let n=t.callbackURL??`/`,r=t.errorCallbackURL??`/`,i=$()?Dt(e):null;if(Z()||!$())try{await Y.signOut()}catch{}if(Q(null),$()){if(!i)throw Error(`Pop-up blocked — allow pop-ups for sign-in`);let e=await Ot(i);if(!e)throw Error(`Sign-in was cancelled or failed`);Q(e);try{await Y.getSession()}catch{}if(typeof window<`u`){let e=new URL(n,window.location.origin),t=window.location;(e.origin!==t.origin||e.pathname!==t.pathname||e.search!==t.search)&&(window.location.href=n)}return}let{data:a,error:o}=await Y.signIn.oauth2({providerId:e,callbackURL:n,errorCallbackURL:r});if(o)throw Error(o.message??`Sign-in failed`);a?.url&&(window.location.href=a.url)}function Dt(e){let t=`${window.location.origin}/auth/popup?providerId=${encodeURIComponent(e)}`,n=`grok-signin-${Date.now()}`;return window.open(t,n,`popup,width=500,height=650`)}function Ot(e){return new Promise(t=>{let n=window.location.origin,r=!1,i,a=e=>{r||(r=!0,c(),t(e))},o=e=>{if(e.origin!==n)return;let t=e.data;!t||t.source!==`grok-auth-popup`||a(t.token??null)},s=window.setInterval(()=>{e.closed&&(window.clearInterval(s),i=window.setTimeout(()=>a(null),400))},300);function c(){window.clearInterval(s),i!==void 0&&window.clearTimeout(i),window.removeEventListener(`message`,o)}window.addEventListener(`message`,o)})}async function kt(e=`/`){try{await Y.signOut()}finally{Q(null)}window.location.href=e}export{kt as i,Tt as n,Et as r,Y as t}; \ No newline at end of file diff --git a/dist-desktop/assets/core-CwxXejkd.js b/dist-desktop/assets/core-CwxXejkd.js deleted file mode 100644 index 7eed138..0000000 --- a/dist-desktop/assets/core-CwxXejkd.js +++ /dev/null @@ -1 +0,0 @@ -async function e(e,t={},n){return window.__TAURI_INTERNALS__.invoke(e,t,n)}export{e as invoke}; \ No newline at end of file diff --git a/dist-desktop/assets/cose-bilkent-JH36ORCC-ClqQrHIF.js b/dist-desktop/assets/cose-bilkent-JH36ORCC-ClqQrHIF.js deleted file mode 100644 index ad06af1..0000000 --- a/dist-desktop/assets/cose-bilkent-JH36ORCC-ClqQrHIF.js +++ /dev/null @@ -1 +0,0 @@ -import{i as e,t}from"./rolldown-runtime-aKtaBQYM.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as r,p as i}from"./src-UMNXGZaF.js";import{t as a}from"./cytoscape.esm-CQFVGiJu.js";var o=t(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=26)})([(function(e,t,n){function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r}),(function(e,t,n){var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[3],Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),c=n(4);function l(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,n!=null&&t!=null?this.rect=new a(t.x,t.y,n.width,n.height):this.rect=new a}for(var u in l.prototype=Object.create(r.prototype),r)l[u]=r[u];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(e){this.rect.width=e},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(e){this.rect.height=e},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},l.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},l.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},l.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},l.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},l.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(!(r.source==n||r.target==n))throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},l.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},l.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;it&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&(this.labelPos==`center`?this.rect.y-=(this.labelHeight-n)/2:this.labelPos==`top`&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},l.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new c(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=l}),(function(e,t,n){function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){var r=n(2),i=n(10),a=n(0),o=n(6),s=n(3),c=n(1),l=n(13),u=n(12),d=n(11);function f(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var p in f.prototype=Object.create(r.prototype),r)f[p]=r[p];f.prototype.getNodes=function(){return this.nodes},f.prototype.getEdges=function(){return this.edges},f.prototype.getGraphManager=function(){return this.graphManager},f.prototype.getParent=function(){return this.parent},f.prototype.getLeft=function(){return this.left},f.prototype.getRight=function(){return this.right},f.prototype.getTop=function(){return this.top},f.prototype.getBottom=function(){return this.bottom},f.prototype.isConnected=function(){return this.isConnected},f.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}else{var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(!(t.owner==n.owner&&t.owner==this))throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null}},f.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(!(t.owner!=null&&t.owner==this))throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a-1&&u>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(l,1),r.target!=r.source&&r.target.edges.splice(u,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},f.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,c=0;cn&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new u(this.left,this.top))},f.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,c,u,d,f=this.nodes,p=f.length,m=0;mo&&(t=o),nc&&(r=c),ao&&(t=o),nc&&(r=c),a=this.nodes.length){var c=0;n.forEach(function(t){t.owner==e&&c++}),c==this.nodes.length&&(this.isConnected=!0)}},e.exports=f}),(function(e,t,n){var r,i=n(1);function a(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==null)throw`Parent node is null!`;if(this.graphs.indexOf(e)>-1)throw`Graph already in this graph mgr!`;if(this.graphs.push(e),e.parent!=null)throw`Already has a parent!`;if(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}else{i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(!(a!=null&&a.getGraphManager()==this))throw`Source not in this graph mgr!`;if(!(o!=null&&o.getGraphManager()==this))throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),!(n.source!=null&&n.target!=null))throw`Edge source and/or target is null!`;if(!(n.source.edges.indexOf(n)==-1&&n.target.edges.indexOf(n)==-1))throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n}},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]o)return n[0]=r,n[1]=c,n[2]=a,n[3]=y,!1;if(ia)return n[0]=s,n[1]=i,n[2]=_,n[3]=o,!1;if(ra?(n[0]=u,n[1]=d,C=!0):(n[0]=l,n[1]=c,C=!0):T===D&&(r>a?(n[0]=s,n[1]=c,C=!0):(n[0]=f,n[1]=d,C=!0)),-E===D?a>r?(n[2]=v,n[3]=y,w=!0):(n[2]=_,n[3]=g,w=!0):E===D&&(a>r?(n[2]=h,n[3]=g,w=!0):(n[2]=b,n[3]=y,w=!0)),C&&w)return!1;if(r>a?i>o?(O=this.getCardinalDirection(T,D,4),k=this.getCardinalDirection(E,D,2)):(O=this.getCardinalDirection(-T,D,3),k=this.getCardinalDirection(-E,D,1)):i>o?(O=this.getCardinalDirection(-T,D,1),k=this.getCardinalDirection(-E,D,3)):(O=this.getCardinalDirection(T,D,2),k=this.getCardinalDirection(E,D,4)),!C)switch(O){case 1:j=c,A=r+-m/D,n[0]=A,n[1]=j;break;case 2:A=f,j=i+p*D,n[0]=A,n[1]=j;break;case 3:j=d,A=r+m/D,n[0]=A,n[1]=j;break;case 4:A=u,j=i+-p*D,n[0]=A,n[1]=j;break}if(!w)switch(k){case 1:N=g,M=a+-S/D,n[2]=M,n[3]=N;break;case 2:M=b,N=o+x*D,n[2]=M,n[3]=N;break;case 3:N=y,M=a+S/D,n[2]=M,n[3]=N;break;case 4:M=v,N=o+-x*D,n[2]=M,n[3]=N;break}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,c=t.y,l=n.x,u=n.y,d=i.x,f=i.y,p=void 0,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0;return h=c-o,_=a-s,y=s*o-a*c,g=f-u,v=l-d,b=d*u-l*f,x=h*v-g*_,x===0?null:(p=(_*b-v*y)/x,m=(g*y-h*b)/x,new r(p,m))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n0&&t;){for(s.push(l[0]);s.length>0&&t;){var u=s[0];s.splice(0,1),o.add(u);for(var d=u.getEdges(),a=0;a-1&&l.splice(h,1)}o=new Set,c=new Map}}return e},f.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i0){for(var i=this.edgeToDummyNodes.get(n),a=0;a=0&&t.splice(d,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&l.push(e),r.set(e,t)}})}n=n.concat(l),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},f.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=f}),(function(e,t,n){function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);ta.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(e>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},l.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n,r,i,o,s=this.getAllNodes(),c;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),c=new Set,n=0;nc||s>c)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(c=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>c||s>c)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},l.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement=c.length||u>=c[0].length)){for(var d=0;de}}]),e}()}),(function(e,t,n){var r=function(){function e(e,t){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(o()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(o()):n.coseBase=r(n.layoutBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=7)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(c.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},v.prototype.tick=function(){if(this.totalIterations++,this.totalIterations===this.maxIterations&&!this.isTreeGrowing&&!this.isGrowthFinished)if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;if(this.totalIterations%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged())if(this.prunedNodesAll.length>0)this.isTreeGrowing=!0;else return!0;this.coolingCycle++,this.layoutQuality==0?this.coolingAdjuster=this.coolingCycle:this.layoutQuality==1&&(this.coolingAdjuster=this.coolingCycle/3),this.coolingFactor=Math.max(this.initialCoolingFactor-this.coolingCycle**+(Math.log(100*(this.initialCoolingFactor-this.finalTemperature))/Math.log(this.maxCoolingCycle))/100*this.coolingAdjuster,this.finalTemperature),this.animationPeriod=Math.ceil(this.initialAnimationPeriod*Math.sqrt(this.coolingFactor))}if(this.isTreeGrowing){if(this.growTreeIterations%10==0)if(this.prunedNodesAll.length>0){this.graphManager.updateBounds(),this.updateGrid(),this.growTree(this.prunedNodesAll),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL}else this.isTreeGrowing=!1,this.isGrowthFinished=!0;this.growTreeIterations++}if(this.isGrowthFinished){if(this.isConverged())return!0;this.afterGrowthIterations%10==0&&(this.graphManager.updateBounds(),this.updateGrid()),this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},v.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n1){var s;for(s=0;sr&&(r=Math.floor(o.y)),a=Math.floor(o.x+c.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(u.WORLD_CENTER_X-o.x/2,u.WORLD_CENTER_Y-o.y/2))},v.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),c.DEFAULT_RADIAL_SEPARATION);v.branchRadialLayout(t,null,0,359,0,r);var i=g.calculateBounds(e),a=new _;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o1;){var _=g[0];g.splice(0,1);var y=u.indexOf(_);y>=0&&u.splice(y,1),p--,d--}m=t==null?0:(u.indexOf(g[0])+1)%p;for(var b=Math.abs(r-n)/d,x=m;f!=d;x=++x%p){var S=u[x].getOtherEnd(e);if(S!=t){var C=(n+f*b)%360,w=(C+b)%360;v.branchRadialLayout(S,e,C,w,i+a,a),f++}}},v.maxDiagonalInTree=function(e){for(var t=m.MIN_VALUE,n=0;nt&&(t=r)}return t},v.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},v.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),c=i.getChild();c.add(a);for(var l=0;l=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},v.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)})},v.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},v.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;rc&&(c=u.rect.height)}n+=c+e.verticalPadding}},v.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height})},v.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:c.TILING_PADDING_VERTICAL,horizontalPadding:c.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:+(e.rect.width*e.rect.height0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},v.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;rn&&(t=r,n=e.rowWidth[r]);return t},v.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a=0;e.rowHeight[r]0&&(a=n+e.verticalPadding-e.rowHeight[r]);var o=e.width-i>=t+e.horizontalPadding?(e.height+a)/(i+t+e.horizontalPadding):(e.height+a)/e.width;a=n+e.verticalPadding;var s=e.widtha&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;so&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var c=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]0)for(var u=i;u<=a;u++)c[0]+=this.grid[u][o-1].length+this.grid[u][o].length-1;if(a0)for(var u=o;u<=s;u++)c[3]+=this.grid[i-1][u].length+this.grid[i][u].length-1;for(var d=m.MAX_VALUE,f,p,h=0;h{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(s()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeCoseBilkent=r(s()):n.cytoscapeCoseBilkent=r(n.coseBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=1)})([(function(t,n){t.exports=e}),(function(e,t,n){var r=n(0).layoutBase.LayoutConstants,i=n(0).layoutBase.FDLayoutConstants,a=n(0).CoSEConstants,o=n(0).CoSELayout,s=n(0).CoSENode,c=n(0).layoutBase.PointD,l=n(0).layoutBase.DimensionD,u={ready:function(){},stop:function(){},quality:`default`,nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:`end`,animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function d(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function f(e){this.options=d(u,e),p(this.options)}var p=function(e){e.nodeRepulsion!=null&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),e.idealEdgeLength!=null&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),e.edgeElasticity!=null&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),e.nestingFactor!=null&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),e.quality==`draft`?r.QUALITY=0:e.quality==`proof`?r.QUALITY=2:r.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=i.ANIMATE=r.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};f.prototype.run=function(){var e,t,n=this.options;this.idToLNode={};var r=this.layout=new o,i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:`layoutstart`,layout:this});var a=r.newGraphManager();this.gm=a;var s=this.options.eles.nodes(),c=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),r);for(var l=0;l0){var h=n.getGraphManager().add(n.newGraph(),u);this.processChildrenList(h,o,n)}}},f.prototype.stop=function(){return this.stopped=!0,this};var m=function(e){e(`layout`,`cose-bilkent`,f)};typeof cytoscape<`u`&&m(cytoscape),e.exports=m})])})}))(),1);a.use(c.default);function l(e,t){e.forEach(e=>{let n={id:e.id,labelText:e.label,height:e.height,width:e.width,padding:e.padding??0};Object.keys(e).forEach(t=>{[`id`,`label`,`height`,`width`,`padding`,`x`,`y`].includes(t)||(n[t]=e[t])}),t.add({group:`nodes`,data:n,position:{x:e.x??0,y:e.y??0}})})}n(l,`addNodes`);function u(e,t){e.forEach(e=>{let n={id:e.id,source:e.start,target:e.end};Object.keys(e).forEach(t=>{[`id`,`start`,`end`].includes(t)||(n[t]=e[t])}),t.add({group:`edges`,data:n})})}n(u,`addEdges`);function d(e){return new Promise(t=>{let n=i(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),o=a({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`bezier`}}]});n.remove(),l(e.nodes,o),u(e.edges,o),o.nodes().forEach(function(e){e.layoutDimensions=()=>{let t=e.data();return{w:t.width,h:t.height}}}),o.layout({name:`cose-bilkent`,quality:`proof`,styleEnabled:!1,animate:!1}).run(),o.ready(e=>{r.info(`Cytoscape ready`,e),t(o)})})}n(d,`createCytoscapeInstance`);function f(e){return e.nodes().map(e=>{let t=e.data(),n=e.position(),r={id:t.id,x:n.x,y:n.y};return Object.keys(t).forEach(e=>{e!==`id`&&(r[e]=t[e])}),r})}n(f,`extractPositionedNodes`);function p(e){return e.edges().map(e=>{let t=e.data(),n=e._private.rscratch,r={id:t.id,source:t.source,target:t.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(t).forEach(e=>{[`id`,`source`,`target`].includes(e)||(r[e]=t[e])}),r})}n(p,`extractPositionedEdges`);async function m(e,t){r.debug(`Starting cose-bilkent layout algorithm`);try{h(e);let t=await d(e),n=f(t),i=p(t);return r.debug(`Layout completed: ${n.length} nodes, ${i.length} edges`),{nodes:n,edges:i}}catch(e){throw r.error(`Error in cose-bilkent layout algorithm:`,e),e}}n(m,`executeCoseBilkentLayout`);function h(e){if(!e)throw Error(`Layout data is required`);if(!e.config)throw Error(`Configuration is required in layout data`);if(!e.rootNode)throw Error(`Root node is required`);if(!e.nodes||!Array.isArray(e.nodes))throw Error(`No nodes found in layout data`);if(!Array.isArray(e.edges))throw Error(`Edges array is required in layout data`);return!0}n(h,`validateLayoutData`);var g=n(async(e,t,{insertCluster:n,insertEdge:r,insertEdgeLabel:i,insertMarkers:a,insertNode:o,log:s,positionEdgeLabel:c},{algorithm:l})=>{let u={},d={},f=t.select(`g`);a(f,e.markers,e.type,e.diagramId);let p=f.insert(`g`).attr(`class`,`subgraphs`),h=f.insert(`g`).attr(`class`,`edgePaths`),g=f.insert(`g`).attr(`class`,`edgeLabels`),_=f.insert(`g`).attr(`class`,`nodes`);s.debug(`Inserting nodes into DOM for dimension calculation`),await Promise.all(e.nodes.map(async t=>{if(t.isGroup){let e={...t};d[t.id]=e,u[t.id]=e,await n(p,t)}else{let n={...t};u[t.id]=n;let r=await o(_,t,{config:e.config,dir:e.direction||`TB`}),i=r.node().getBBox();n.width=i.width,n.height=i.height,n.domId=r,s.debug(`Node ${t.id} dimensions: ${i.width}x${i.height}`)}})),s.debug(`Running cose-bilkent layout algorithm`);let v=await m({...e,nodes:e.nodes.map(e=>{let t=u[e.id];return{...e,width:t.width,height:t.height}})},e.config);s.debug(`Positioning nodes based on layout results`),v.nodes.forEach(e=>{let t=u[e.id];t?.domId&&(t.domId.attr(`transform`,`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,s.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),v.edges.forEach(t=>{let n=e.edges.find(e=>e.id===t.id);n&&(n.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),s.debug(`Inserting and positioning edges`),await Promise.all(e.edges.map(async t=>{await i(g,t);let n=u[t.start??``],a=u[t.end??``];if(n&&a){let i=v.edges.find(e=>e.id===t.id);if(i){s.debug(`APA01 positionedEdge`,i);let o={...t};c(o,r(h,o,d,e.type,n,a,e.diagramId))}else{let i={...t,points:[{x:n.x||0,y:n.y||0},{x:a.x||0,y:a.y||0}]};c(i,r(h,i,d,e.type,n,a,e.diagramId))}}})),s.debug(`Cose-bilkent rendering completed`)},`render`);export{g as render}; \ No newline at end of file diff --git a/dist-desktop/assets/cynefin-VYW2F7L2-4m18BxUG.js b/dist-desktop/assets/cynefin-VYW2F7L2-4m18BxUG.js deleted file mode 100644 index ac41342..0000000 --- a/dist-desktop/assets/cynefin-VYW2F7L2-4m18BxUG.js +++ /dev/null @@ -1 +0,0 @@ -import"./chunk-KEIR6QF5-Dj-OpFgW.js";import{n as e}from"./chunk-OSBZ3O6U-CX9EQ5t2.js";export{e as createCynefinServices}; \ No newline at end of file diff --git a/dist-desktop/assets/cynefinDiagram-TSTJHNR4-CAKFzgf0.js b/dist-desktop/assets/cynefinDiagram-TSTJHNR4-CAKFzgf0.js deleted file mode 100644 index 5a55412..0000000 --- a/dist-desktop/assets/cynefinDiagram-TSTJHNR4-CAKFzgf0.js +++ /dev/null @@ -1,62 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-UMNXGZaF.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{i as p}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as m}from"./chunk-VAUOI2AC-AC9pRUsa.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as g}from"./mermaid-parser.core-Z7xZAZRH.js";var _=e(()=>({domains:new Map,transitions:[]}),`createDefaultData`),v=_(),y={getDomains:e(()=>v.domains,`getDomains`),getTransitions:e(()=>v.transitions,`getTransitions`),setDomains:e(e=>{if(e)for(let t of e){let e=t.domain,n=(t.items??[]).map(e=>({label:e.label}));v.domains.set(e,{name:e,items:n})}},`setDomains`),setTransitions:e(e=>{e&&(v.transitions=e.filter(e=>e.from===e.to?(t.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},`setTransitions`),getConfig:e(()=>p({...l.cynefin,...s().cynefin}),`getConfig`),clear:e(()=>{o(),v=_()},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r},b=e(e=>{h(e,y),y.setDomains(e.domains),y.setTransitions(e.transitions)},`populate`),x={parse:e(async e=>{let n=await g(`cynefin`,e);t.debug(n),b(n)},`parse`)};function S(e){let t=e+1831565813|0;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}e(S,`seededRandom`);function C(e){let t=0;for(let n=0;n{let n=e/2,r=t/2;return{complex:{cx:n/2,cy:r/2,x:0,y:0,w:n,h:r},complicated:{cx:n+n/2,cy:r/2,x:n,y:0,w:n,h:r},chaotic:{cx:n/2,cy:r+r/2,x:0,y:r,w:n,h:r},clear:{cx:n+n/2,cy:r+r/2,x:n,y:r,w:n,h:r},confusion:{cx:n,cy:r,x:n*.7,y:r*.7,w:n*.6,h:r*.6}}},`getDomainLayouts`),j=e(()=>p(n(),s().themeVariables).cynefin,`getCynefinDomainColors`),M=3,N={draw:e((e,n,r,i)=>{let a=i.db,o=a.getDomains(),s=a.getTransitions(),l=a.getDiagramTitle(),u=a.getAccTitle(),d=a.getAccDescription(),f=a.getConfig(),p=j();t.debug(`Rendering Cynefin diagram`);let h=f.width,g=f.height,_=f.padding,v=f.showDomainDescriptions,y=f.boundaryAmplitude,b=h+_*2,x=g+_*2,S={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},C=m(n);c(C,x,b,f.useMaxWidth??!0),C.attr(`viewBox`,`0 0 ${b} ${x}`),u&&C.append(`title`).text(u),d&&C.append(`desc`).text(d);let N=C.append(`g`).attr(`transform`,`translate(${_}, ${_})`),P=A(h,g),F=w(f.seed,n),I=N.append(`g`).attr(`class`,`cynefin-backgrounds`),L=[`complex`,`complicated`,`chaotic`,`clear`];for(let e of L){let t=P[e];I.append(`rect`).attr(`class`,`cynefinDomain`).attr(`x`,t.x).attr(`y`,t.y).attr(`width`,t.w).attr(`height`,t.h).attr(`fill`,S[e]).attr(`fill-opacity`,.4).attr(`stroke`,`none`)}let R=N.append(`g`).attr(`class`,`cynefin-boundaries`);R.append(`path`).attr(`class`,`cynefinBoundary`).attr(`d`,T(h,g,F,y)).attr(`fill`,`none`),R.append(`path`).attr(`class`,`cynefinBoundary`).attr(`d`,E(h,g,F+100,y)).attr(`fill`,`none`),R.append(`path`).attr(`class`,`cynefinCliff`).attr(`d`,D(h,g)).attr(`fill`,`none`);let z=h*.15,B=g*.15;N.append(`path`).attr(`class`,`cynefinConfusion`).attr(`d`,O(h/2,g/2,z,B)).attr(`fill`,S.confusion).attr(`fill-opacity`,.5);let V=N.append(`g`).attr(`class`,`cynefin-labels`);for(let e of L){let t=P[e];V.append(`text`).attr(`class`,`cynefinDomainLabel`).attr(`x`,t.cx).attr(`y`,v?t.cy-30:t.cy).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(e.charAt(0).toUpperCase()+e.slice(1))}if(V.append(`text`).attr(`class`,`cynefinDomainLabel`).attr(`x`,h/2).attr(`y`,v?g/2-10:g/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(`Confusion`),v){let e=N.append(`g`).attr(`class`,`cynefin-subtitles`);for(let t of L){let n=P[t],r=k[t];e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,n.cx).attr(`y`,n.cy-10).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(r.model),e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,n.cx).attr(`y`,n.cy+5).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(r.practice)}e.append(`text`).attr(`class`,`cynefinSubtitle`).attr(`x`,h/2).attr(`y`,g/2+8).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(k.confusion.practice)}let H=N.append(`g`).attr(`class`,`cynefin-items`);for(let e of[`complex`,`complicated`,`chaotic`,`clear`,`confusion`]){let t=o.get(e);if(!t||t.items.length===0)continue;let n=P[e],r=e===`confusion`,i=t.items,a=0;r&&t.items.length>M&&(a=t.items.length-M,i=t.items.slice(0,M));let s;if(r){let e=v?22:14;s=n.cy+e}else s=n.cy+(v?25:15);if([...i].forEach((t,r)=>{let i=s+r*30,a=H.append(`g`),o=a.append(`text`).attr(`class`,`cynefinItemText`).attr(`x`,0).attr(`y`,26/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).text(t.label),c=t.label.length*7,l=o.node();if(l&&typeof l.getBBox==`function`){let e=l.getBBox();e.width>0&&(c=e.width)}let u=c+20,d=n.cx-u/2;a.attr(`transform`,`translate(${d}, ${i})`),a.insert(`rect`,`text`).attr(`class`,`cynefinItem`).attr(`x`,0).attr(`y`,0).attr(`width`,u).attr(`height`,26).attr(`rx`,4).attr(`ry`,4).attr(`fill`,S[e]).attr(`fill-opacity`,.95),o.attr(`x`,u/2).attr(`y`,26/2)}),a>0){let t=s+i.length*30,r=`+${a} more`,o=H.append(`g`),c=o.append(`text`).attr(`class`,`cynefinItemText`).attr(`x`,0).attr(`y`,26/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).text(r),l=r.length*7,u=c.node();if(u&&typeof u.getBBox==`function`){let e=u.getBBox();e.width>0&&(l=e.width)}let d=l+20,f=n.cx-d/2;o.attr(`transform`,`translate(${f}, ${t})`),o.insert(`rect`,`text`).attr(`class`,`cynefinItemOverflow`).attr(`x`,0).attr(`y`,0).attr(`width`,d).attr(`height`,26).attr(`rx`,4).attr(`ry`,4).attr(`fill`,S[e]).attr(`fill-opacity`,.6),c.attr(`x`,d/2).attr(`y`,26/2)}}if(s.length>0){let e=C.select(`defs`).empty()?C.append(`defs`):C.select(`defs`),r=`cynefin-arrow-${n}`;e.append(`marker`).attr(`id`,r).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`cynefinArrowHead`);let i=N.append(`g`).attr(`class`,`cynefin-arrows`);s.forEach(e=>{let n=P[e.from],a=P[e.to];if(!n||!a)return;if(e.from===e.to){t.warn(`Cynefin renderer: skipping self-loop on domain "${e.from}"`);return}let o=n.cx,s=n.cy,c=a.cx,l=a.cy,u=(o+c)/2,d=(s+l)/2,f=c-o,p=l-s,m=Math.sqrt(f*f+p*p),h=m*.15,g=-p/m,_=f/m,v=u+g*h,y=d+_*h;i.append(`path`).attr(`class`,`cynefinArrowLine`).attr(`d`,`M${o},${s} Q${v},${y} ${c},${l}`).attr(`fill`,`none`).attr(`marker-end`,`url(#${r})`),e.label&&i.append(`text`).attr(`class`,`cynefinArrowLabel`).attr(`x`,v).attr(`y`,y-6).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`auto`).text(e.label)})}l&&N.append(`text`).attr(`class`,`cynefinTitle`).attr(`x`,h/2).attr(`y`,-_/2).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(l)},`draw`)},P=e(()=>p(n(),s().themeVariables).cynefin,`getCynefinTheme`),F={parser:x,db:y,renderer:N,styles:e(()=>{let e=P();return` - .cynefinDomain { - stroke: none; - } - .cynefinDomainLabel { - font-size: ${e.domainFontSize}px; - font-weight: bold; - fill: ${e.labelColor}; - } - .cynefinSubtitle { - font-size: ${e.itemFontSize-1}px; - fill: ${e.textColor}; - font-style: italic; - } - .cynefinItem { - fill-opacity: 0.95; - stroke: ${e.boundaryColor}; - stroke-width: 1; - } - .cynefinItemText { - font-size: ${e.itemFontSize}px; - fill: ${e.textColor}; - } - .cynefinItemOverflow { - fill-opacity: 0.6; - stroke: ${e.boundaryColor}; - stroke-width: 1; - stroke-dasharray: 3 2; - } - .cynefinBoundary { - stroke: ${e.boundaryColor}; - stroke-width: ${e.boundaryWidth}; - stroke-dasharray: 6 3; - } - .cynefinCliff { - stroke: ${e.cliffColor}; - stroke-width: ${e.cliffWidth}; - } - .cynefinConfusion { - stroke: ${e.boundaryColor}; - stroke-width: 1.5; - stroke-dasharray: 4 2; - } - .cynefinArrowLine { - stroke: ${e.arrowColor}; - stroke-width: ${e.arrowWidth}; - fill: none; - } - .cynefinArrowHead { - fill: ${e.arrowColor}; - stroke: none; - } - .cynefinArrowLabel { - font-size: ${e.itemFontSize-1}px; - fill: ${e.textColor}; - } - .cynefinTitle { - font-size: ${e.domainFontSize+2}px; - font-weight: bold; - fill: ${e.labelColor}; - } - `},`styles`)};export{F as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/cytoscape.esm-CQFVGiJu.js b/dist-desktop/assets/cytoscape.esm-CQFVGiJu.js deleted file mode 100644 index 6fb80b4..0000000 --- a/dist-desktop/assets/cytoscape.esm-CQFVGiJu.js +++ /dev/null @@ -1,321 +0,0 @@ -function e(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function s(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function l(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function u(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d(){throw TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function f(e,n){return t(e)||l(e,n)||_(e,n)||u()}function p(e){return n(e)||c(e)||_(e)||d()}function m(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}function h(e){var t=m(e,`string`);return typeof t==`symbol`?t:t+``}function g(e){"@babel/helpers - typeof";return g=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},g(e)}function _(t,n){if(t){if(typeof t==`string`)return e(t,n);var r={}.toString.call(t).slice(8,-1);return r===`Object`&&t.constructor&&(r=t.constructor.name),r===`Map`||r===`Set`?Array.from(t):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}var v=typeof window>`u`?null:window,y=v?v.navigator:null;v&&v.document;var b=g(``),x=g({}),S=g(function(){}),C=typeof HTMLElement>`u`?`undefined`:g(HTMLElement),w=function(e){return e&&e.instanceString&&E(e.instanceString)?e.instanceString():null},T=function(e){return e!=null&&g(e)==b},E=function(e){return e!=null&&g(e)===S},D=function(e){return!N(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},O=function(e){return e!=null&&g(e)===x&&!D(e)&&e.constructor===Object},k=function(e){return e!=null&&g(e)===x},A=function(e){return e!=null&&g(e)===g(1)&&!isNaN(e)},j=function(e){return A(e)&&Math.floor(e)===e},M=function(e){if(C!==`undefined`)return e!=null&&e instanceof HTMLElement},N=function(e){return P(e)||F(e)},P=function(e){return w(e)===`collection`&&e._private.single},F=function(e){return w(e)===`collection`&&!e._private.single},I=function(e){return w(e)===`core`},L=function(e){return w(e)===`stylesheet`},R=function(e){return w(e)===`event`},z=function(e){return e==null||!!(e===``||e.match(/^\s+$/))},B=function(e){return typeof HTMLElement>`u`?!1:e instanceof HTMLElement},V=function(e){return O(e)&&A(e.x1)&&A(e.x2)&&A(e.y1)&&A(e.y2)},H=function(e){return k(e)&&E(e.then)},U=function(){return y&&y.userAgent.match(/msie|trident|edge/i)},W=function(e,t){t||=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return`undefined`;for(var e=[],t=0;tt)},ce=function(e,t){return-1*se(e,t)},X=Object.assign==null?function(e){for(var t=arguments,n=1;n1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var u=RegExp(`^`+re+`$`).exec(e);if(u){if(n=parseInt(u[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,r=parseFloat(u[2]),r<0||r>100||(r/=100,i=parseFloat(u[3]),i<0||i>100)||(i/=100,a=u[4],a!==void 0&&(a=parseFloat(a),a<0||a>1)))return;if(r===0)o=s=c=Math.round(i*255);else{var d=i<.5?i*(1+r):i+r-i*r,f=2*i-d;o=Math.round(255*l(f,d,n+1/3)),s=Math.round(255*l(f,d,n)),c=Math.round(255*l(f,d,n-1/3))}t=[o,s,c,a]}return t},de=function(e){var t,n=RegExp(`^`+te+`$`).exec(e);if(n){t=[];for(var r=[],i=1;i<=3;i++){var a=n[i];if(a[a.length-1]===`%`&&(r[i]=!0),a=parseFloat(a),r[i]&&(a=a/100*255),a<0||a>255)return;t.push(Math.floor(a))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var c=n[4];if(c!==void 0){if(c=parseFloat(c),c<0||c>1)return;t.push(c)}}return t},fe=function(e){return me[e.toLowerCase()]},pe=function(e){return(D(e)?e:null)||fe(e)||le(e)||de(e)||ue(e)},me={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},he=function(e){for(var t=e.map,n=e.keys,r=n.length,i=0;i=s||t<0||_&&n>=d}function C(){var e=t();if(S(e))return w(e);p=setTimeout(C,x(e))}function w(e){return p=void 0,v&&l?y(e):(l=u=void 0,f)}function T(){p!==void 0&&clearTimeout(p),h=0,l=m=u=p=void 0}function E(){return p===void 0?f:w(t())}function D(){var e=t(),n=S(e);if(l=arguments,u=this,m=e,n){if(p===void 0)return b(m);if(_)return clearTimeout(p),p=setTimeout(C,s),y(m)}return p===void 0&&(p=setTimeout(C,s)),f}return D.cancel=T,D.flush=E,D}return it=o,it}var st=ve(ot()),ct=v?v.performance:null,lt=ct&&ct.now?function(){return ct.now()}:function(){return Date.now()},ut=function(){if(v){if(v.requestAnimationFrame)return function(e){v.requestAnimationFrame(e)};if(v.mozRequestAnimationFrame)return function(e){v.mozRequestAnimationFrame(e)};if(v.webkitRequestAnimationFrame)return function(e){v.webkitRequestAnimationFrame(e)};if(v.msRequestAnimationFrame)return function(e){v.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(lt())},1e3/60)}}(),dt=function(e){return ut(e)},ft=lt,pt=9261,mt=65599,ht=5381,gt=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pt,n;n=e.next(),!n.done;)t=t*mt+n.value|0;return t},_t=function(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:pt)*mt+e|0},vt=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ht;return(t<<5)+t+e|0},yt=function(e,t){return e*2097152+t},bt=function(e){return e[0]*2097152+e[1]},xt=function(e,t){return[_t(e[0],t[0]),vt(e[1],t[1])]},St=function(e,t){var n={value:0,done:!1},r=0,i=e.length;return gt({next:function(){return r=0;r--)e[r]===t&&e.splice(r,1)},Jt=function(e){e.splice(0,e.length)},Yt=function(e,t){for(var n=0;n`u`?`undefined`:g(Set))===$t?en:Set,nn=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||t===void 0||!I(e)){Lt(`An element must have a core reference and parameters set`);return}var r=t.group;if(r??=t.data&&t.data.source!=null&&t.data.target!=null?`edges`:`nodes`,r!==`nodes`&&r!==`edges`){Lt("An element must be of type `nodes` or `edges`; you specified `"+r+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:t.selectable===void 0||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:t.grabbable===void 0||!!t.grabbable,pannable:t.pannable===void 0?r===`edges`:!!t.pannable,active:!1,classes:new tn,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x??(i.position.x=0),i.position.y??(i.position.y=0),t.renderedPosition){var a=t.renderedPosition,o=e.pan(),s=e.zoom();i.position={x:(a.x-o.x)/s,y:(a.y-o.y)/s}}var c=[];D(t.classes)?c=t.classes:T(t.classes)&&(c=t.classes.split(/\s+/));for(var l=0,u=c.length;lt)},l=function(e,t,i,a,o){var s;if(i??=0,o??=n,i<0)throw Error(`lo must be non-negative`);for(a??=e.length;in;0<=n?t++:t--)l.push(t);return l}).apply(this).reverse(),c=[],a=0,o=s.length;ah;0<=h?++f:--f)g.push(a(e,r));return g},m=function(e,t,r,i){var a,o,s;for(i??=n,a=e[r];r>t;){if(s=r-1>>1,o=e[s],i(a,o)<0){e[r]=o,r=s;continue}break}return e[r]=a},h=function(e,t,r){var i,a,o,s,c;for(r??=n,a=e.length,c=t,o=e[t],i=2*t+1;i0;){var x=_.pop(),S=h(x),C=x.id();if(d[C]=S,S!==1/0)for(var w=x.neighborhood().intersect(p),E=0;E0)for(n.unshift(t);u[i];){var a=u[i];n.unshift(a.edge),n.unshift(a.node),r=a.node,i=r.id()}return o.spawn(n)}}}},gn={kruskal:function(e){e||=function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,i=n.length,a=Array(i),o=n,s=function(e){for(var t=0;t0;){if(b(),S++,y===l){for(var C=[],w=i,T=l,E=g[T];C.unshift(w),E!=null&&C.unshift(E),w=h[T],w!=null;)T=w.id(),E=g[T];return{found:!0,distance:u[y],path:this.spawn(C),steps:S}}f[y]=!0;for(var D=v._private.edges,O=0;OE&&(p[w]=E,g[w]=C,_[w]=y),!i){var D=C*l+S;!i&&p[D]>E&&(p[D]=E,g[D]=S,_[D]=y)}}}for(var O=0;O1&&arguments[1]!==void 0?arguments[1]:a,r=v(e),i=[],o=r;;){if(o==null)return t.spawn();var c=_(o),l=c.edge,u=c.pred;if(i.unshift(o[0]),o.same(n)&&i.length>0)break;l!=null&&i.unshift(l),o=u}return s.spawn(i)},x=0;x=0;l--){var u=c[l],d=u[1],f=u[2];(t[d]===o&&t[f]===s||t[d]===s&&t[f]===o)&&c.splice(l,1)}for(var p=0;pr;)t=wn(Math.floor(Math.random()*t.length),e,t),n--;return t},En={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy(function(e){return e.isLoop()});var i=n.length,a=r.length,o=Math.ceil((Math.log(i)/Math.LN2)**2),s=Math.floor(i/Cn);if(i<2){Lt(`At least 2 nodes are required for Karger-Stein algorithm`);return}for(var c=[],l=0;l1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=-1/0,i=t;i1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=0,i=0,a=t;a1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;r?e=e.slice(t,n):(n0&&e.splice(0,t));for(var o=0,s=e.length-1;s>=0;s--){var c=e[s];a?isFinite(c)||(e[s]=-1/0,o++):e.splice(s,1)}i&&e.sort(function(e,t){return e-t});var l=e.length,u=Math.floor(l/2);return l%2==0?(e[u-1+o]+e[u+o])/2:e[u+1+o]},Fn=function(e){return Math.PI*e/180},In=function(e,t){return Math.atan2(t,e)-Math.PI/2},Ln=Math.log2||function(e){return Math.log(e)/Math.log(2)},Rn=function(e){return e>0?1:e<0?-1:0},zn=function(e,t){return Math.sqrt(Bn(e,t))},Bn=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},Vn=function(e){for(var t=e.length,n=0,r=0;r=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},qn=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},Jn=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},Yn=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},Xn=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},Zn=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},Qn=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,r,i,a;if(t.length===1)n=r=i=a=t[0];else if(t.length===2)n=i=t[0],a=r=t[1];else if(t.length===4){var o=f(t,4);n=o[0],r=o[1],i=o[2],a=o[3]}return e.x1-=a,e.x2+=r,e.y1-=n,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},$n=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},er=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},tr=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},nr=function(e,t){return tr(e,t.x,t.y)},rr=function(e,t){return tr(e,t.x1,t.y1)&&tr(e,t.x2,t.y2)},ir=Math.hypot??function(e,t){return Math.sqrt(e*e+t*t)};function ar(e,t){if(e.length<3)throw Error(`Need at least 3 vertices`);var n=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},r=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},i=function(e,t){return{x:e.x*t,y:e.y*t}},a=function(e,t){return e.x*t.y-e.y*t.x},o=function(e){var t=ir(e.x,e.y);return t===0?{x:0,y:0}:{x:e.x/t,y:e.y/t}},s=function(e){for(var t=0,n=0;n7&&arguments[7]!==void 0?arguments[7]:`auto`,c=s===`auto`?jr(i,a):s,l=i/2,u=a/2;c=Math.min(c,l,u);var d=c!==l,f=c!==u,p;if(d){var m=n-l+c-o,h=r-u-o;if(p=Cr(e,t,n,r,m,h,n+l-c+o,h,!1),p.length>0)return p}if(f){var g=n+l+o;if(p=Cr(e,t,n,r,g,r-u+c-o,g,r+u-c+o,!1),p.length>0)return p}if(d){var _=n-l+c-o,v=r+u+o;if(p=Cr(e,t,n,r,_,v,n+l-c+o,v,!1),p.length>0)return p}if(f){var y=n-l-o;if(p=Cr(e,t,n,r,y,r-u+c-o,y,r+u-c+o,!1),p.length>0)return p}var b,x=n-l+c,S=r-u+c;if(b=xr(e,t,n,r,x,S,c+o),b.length>0&&b[0]<=x&&b[1]<=S)return[b[0],b[1]];var C=n+l-c,w=r-u+c;if(b=xr(e,t,n,r,C,w,c+o),b.length>0&&b[0]>=C&&b[1]<=w)return[b[0],b[1]];var T=n+l-c,E=r+u-c;if(b=xr(e,t,n,r,T,E,c+o),b.length>0&&b[0]>=T&&b[1]>=E)return[b[0],b[1]];var D=n-l+c,O=r+u-c;return b=xr(e,t,n,r,D,O,c+o),b.length>0&&b[0]<=D&&b[1]>=O?[b[0],b[1]]:[]},cr=function(e,t,n,r,i,a,o){var s=o,c=Math.min(n,i),l=Math.max(n,i),u=Math.min(r,a),d=Math.max(r,a);return c-s<=e&&e<=l+s&&u-s<=t&&t<=d+s},lr=function(e,t,n,r,i,a,o,s,c){var l={x1:Math.min(n,o,i)-c,x2:Math.max(n,o,i)+c,y1:Math.min(r,s,a)-c,y2:Math.max(r,s,a)+c};return!(el.x2||tl.y2)},ur=function(e,t,n,r){n-=r;var i=t*t-4*e*n;if(i<0)return[];var a=Math.sqrt(i),o=2*e;return[(-t+a)/o,(-t-a)/o]},dr=function(e,t,n,r,i){e===0&&(e=1e-5),t/=e,n/=e,r/=e;var a,o=(3*n-t*t)/9,s=-(27*r)+t*(9*n-t*t*2),c,l,u,d,f;if(s/=54,a=o*o*o+s*s,i[1]=0,d=t/3,a>0){l=s+Math.sqrt(a),l=l<0?-((-l)**(1/3)):l**(1/3),u=s-Math.sqrt(a),u=u<0?-((-u)**(1/3)):u**(1/3),i[0]=-d+l+u,d+=(l+u)/2,i[4]=i[2]=-d,d=Math.sqrt(3)*(-u+l)/2,i[3]=d,i[5]=-d;return}if(i[5]=i[3]=0,a===0){f=s<0?-((-s)**(1/3)):s**(1/3),i[0]=-d+2*f,i[4]=i[2]=-(f+d);return}o=-o,c=o*o*o,c=Math.acos(s/Math.sqrt(c)),f=2*Math.sqrt(o),i[0]=-d+f*Math.cos(c/3),i[2]=-d+f*Math.cos((c+2*Math.PI)/3),i[4]=-d+f*Math.cos((c+4*Math.PI)/3)},fr=function(e,t,n,r,i,a,o,s){var c=1*n*n-4*n*i+2*n*o+4*i*i-4*i*o+o*o+r*r-4*r*a+2*r*s+4*a*a-4*a*s+s*s,l=9*n*i-3*n*n-3*n*o-6*i*i+3*i*o+9*r*a-3*r*r-3*r*s-6*a*a+3*a*s,u=3*n*n-6*n*i+n*o-n*e+2*i*i+2*i*e-o*e+3*r*r-6*r*a+r*s-r*t+2*a*a+2*a*t-s*t,d=1*n*i-n*n+n*e-i*e+r*a-r*r+r*t-a*t,f=[];dr(c,l,u,d,f);for(var p=1e-7,m=[],h=0;h<6;h+=2)Math.abs(f[h+1])=0&&f[h]<=1&&m.push(f[h]);m.push(1),m.push(0);for(var g=-1,_,v,y,b=0;b=0?yc?(e-i)*(e-i)+(t-a)*(t-a):l-d},mr=function(e,t,n){for(var r,i,a,o,s,c=0,l=0;l=e&&e>=a||r<=e&&e<=a)s=(e-r)/(a-r)*(o-i)+i,s>t&&c++;else continue;return c%2!=0},hr=function(e,t,n,r,i,a,o,s,c){var l=Array(n.length),u;s[0]==null?u=s:(u=Math.atan(s[1]/s[0]),s[0]<0?u+=Math.PI/2:u=-u-Math.PI/2);for(var d=Math.cos(-u),f=Math.sin(-u),p=0;p0?_r(vr(l,-c)):l)},gr=function(e,t,n,r,i,a,o,s){for(var c=Array(n.length*2),l=0;l=0&&h<=1&&_.push(h),g>=0&&g<=1&&_.push(g),_.length===0)return[];var v=_[0]*s[0]+e,y=_[0]*s[1]+t;return _.length>1?_[0]==_[1]?[v,y]:[v,y,_[1]*s[0]+e,_[1]*s[1]+t]:[v,y]},Sr=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},Cr=function(e,t,n,r,i,a,o,s,c){var l=e-i,u=n-e,d=o-i,f=t-a,p=r-t,m=s-a,h=d*f-m*l,g=u*f-p*l,_=m*u-d*p;if(_!==0){var v=h/_,y=g/_,b=.001,x=0-b,S=1+b;return x<=v&&v<=S&&x<=y&&y<=S||c?[e+v*u,t+v*p]:[]}else if(h===0||g===0)return Sr(e,n,o)===o?[o,s]:Sr(e,n,i)===i?[i,a]:Sr(i,o,n)===n?[n,r]:[];else return[]},wr=function(e,t,n,r,i){var a=[],o=r/2,s=i/2,c=t,l=n;a.push({x:c+o*e[0],y:l+s*e[1]});for(var u=1;u0?_r(vr(u,-s)):u}else f=n;for(var m,h,g,_,v=0;v2){for(var p=[l[0],l[1]],m=(p[0]-e)**2+(p[1]-t)**2,h=1;hl&&(l=t)},get:function(e){return c[e]}},d=0;d0?v.edgesTo(_)[0]:_.edgesTo(v)[0];var b=r(y);_=_.id(),l[_]>l[m]+b&&(l[_]=l[m]+b,d.nodes.indexOf(_)<0?d.push(_):d.updateItem(_),c[_]=0,n[_]=[]),l[_]==l[m]+b&&(c[_]=c[_]+c[m],n[_].push(m))}else for(var x=0;x0;){for(var T=t.pop(),E=0;E0&&o.push(n[s]);o.length!==0&&i.push(r.collection(o))}return i},ti=function(e,t){for(var n=0;n5&&arguments[5]!==void 0?arguments[5]:ai,o=r,s,c,l=0;l=2?di(e,t,n,0,ci,li):di(e,t,n,0,si)},squaredEuclidean:function(e,t,n){return di(e,t,n,0,ci)},manhattan:function(e,t,n){return di(e,t,n,0,si)},max:function(e,t,n){return di(e,t,n,-1/0,ui)}};fi[`squared-euclidean`]=fi.squaredEuclidean,fi.squaredeuclidean=fi.squaredEuclidean;function pi(e,t,n,r,i,a){var o=E(e)?e:fi[e]||fi.euclidean;return t===0&&E(e)?o(i,a):o(t,n,r,i,a)}var mi=Kt({k:2,m:2,sensitivityThreshold:1e-4,distance:`euclidean`,maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),hi=function(e){return mi(e)},gi=function(e,t,n,r,i){var a=i===`kMedoids`?function(e){return r[e](n)}:function(e){return n[e]},o=function(e){return r[e](t)},s=n,c=t;return pi(e,r.length,a,o,s,c)},_i=function(e,t,n){for(var r=n.length,i=Array(r),a=Array(r),o=Array(t),s=null,c=0;cn)return!1;return!0},Si=function(e,t,n){for(var r=0;ro&&(o=t[c][l],s=l);i[s].push(e[c])}for(var u=0;u=i.threshold||i.mode===`dendrogram`&&e.length===1)return!1;var p=t[a],m=t[r[a]],h=i.mode===`dendrogram`?{left:p,right:m,key:p.key}:{value:p.value.concat(m.value),key:p.key};e[p.index]=h,e.splice(m.index,1),t[p.key]=h;for(var g=0;gn[m.key][_.key]&&(s=n[m.key][_.key])):i.linkage===`max`?(s=n[p.key][_.key],n[p.key][_.key]0&&r.push(i);return r},Ki=function(e,t,n){for(var r=[],i=0;io&&(a=c,o=t[i*e+c])}a>0&&r.push(a)}for(var l=0;lc&&(s=l,c=u)}n[i]=a[s]}return r=Ki(e,t,n),r},Ji=function(e){for(var t=this.cy(),n=this.nodes(),r=Hi(e),i={},a=0;a=E?(D=E,E=k,O=A):k>D&&(D=k);for(var j=0;j0);S[w%r.minIterations*o+L]=R,I+=R}if(I>0&&(w>=r.minIterations-1||w==r.maxIterations-1)){for(var z=0,B=0;B1||i>1)&&(o=!0),u[t]=[],e.outgoers().forEach(function(e){e.isEdge()&&u[t].push(e.id())})}else d[t]=[void 0,e.target().id()]}):a.forEach(function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(s?c?o=!0:c=t:s=t),u[t]=[],e.connectedEdges().forEach(function(e){return u[t].push(e.id())})):d[t]=[e.source().id(),e.target().id()]});var f={found:!1,trail:void 0};if(o)return f;if(c&&s)if(i){if(l&&c!=l)return f;l=c}else if(l&&c!=l&&s!=l)return f;else l||=c;else l||=a[0].id();var p=function(e){for(var t=e,n=[e],r,a,o;u[t].length;)r=u[t].shift(),a=d[r][0],o=d[r][1],t==o?!i&&t!=a&&(u[a]=u[a].filter(function(e){return e!=r}),t=a):(u[o]=u[o].filter(function(e){return e!=r}),t=o),n.unshift(r),n.unshift(t);return n},m=[],h=[];for(h=p(l);h.length!=1;)u[h[0]].length==0?(m.unshift(a.getElementById(h.shift())),m.unshift(a.getElementById(h.shift()))):h=p(h.shift()).concat(h);for(var g in m.unshift(a.getElementById(h.shift())),u)if(u[g].length)return f;return f.found=!0,f.trail=this.spawn(m,!0),f}},Qi=function(){var e=this,t={},n=0,r=0,i=[],a=[],o={},s=function(n,r){for(var o=a.length-1,s=[],c=e.spawn();a[o].x!=n||a[o].y!=r;)s.push(a.pop().edge),o--;s.push(a.pop().edge),s.forEach(function(n){var r=n.connectedNodes().intersection(e);c.merge(n),r.forEach(function(n){var r=n.id(),i=n.connectedEdges().intersection(e);c.merge(n),t[r].cutVertex?c.merge(i.filter(function(e){return e.isLoop()})):c.merge(i)})}),i.push(c)},c=function(l,u,d){l===d&&(r+=1),t[u]={id:n,low:n++,cutVertex:!1};var f=e.getElementById(u).connectedEdges().intersection(e);if(f.size()===0)i.push(e.spawn(e.getElementById(u)));else{var p,m,h,g;f.forEach(function(e){p=e.source().id(),m=e.target().id(),h=p===u?m:p,h!==d&&(g=e.id(),o[g]||(o[g]=!0,a.push({x:u,y:h,edge:e})),h in t?t[u].low=Math.min(t[u].low,t[h].id):(c(l,h,u),t[u].low=Math.min(t[u].low,t[h].low),t[u].id<=t[h].low&&(t[u].cutVertex=!0,s(u,h))))})}};e.forEach(function(e){if(e.isNode()){var n=e.id();n in t||(r=0,c(n,n),t[n].cutVertex=r>1)}});var l=Object.keys(t).filter(function(e){return t[e].cutVertex}).map(function(t){return e.getElementById(t)});return{cut:e.spawn(l),components:i}},$i={hopcroftTarjanBiconnected:Qi,htbc:Qi,htb:Qi,hopcroftTarjanBiconnectedComponents:Qi},ea=function(){var e=this,t={},n=0,r=[],i=[],a=e.spawn(e),o=function(s){if(i.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach(function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))}),t[s].index===t[s].low){for(var c=e.spawn();;){var l=i.pop();if(c.merge(e.getElementById(l)),t[l].low=t[s].index,t[l].explored=!0,l===s)break}var u=c.edgesWith(c),d=c.merge(u);r.push(d),a=a.difference(d)}};return e.forEach(function(e){if(e.isNode()){var n=e.id();n in t||o(n)}}),{cut:a,components:r}},ta={tarjanStronglyConnected:ea,tsc:ea,tscc:ea,tarjanStronglyConnectedComponents:ea},na={};[an,hn,gn,vn,bn,Sn,En,Rr,Br,Hr,Wr,ii,ji,Bi,Yi,Zi,$i,ta].forEach(function(e){X(na,e)});var ra=0,ia=1,aa=2,oa=function(e){if(!(this instanceof oa))return new oa(e);this.id=`Thenable/1.0.7`,this.state=ra,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e==`function`&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};oa.prototype={fulfill:function(e){return sa(this,ia,`fulfillValue`,e)},reject:function(e){return sa(this,aa,`rejectReason`,e)},then:function(e,t){var n=this,r=new oa;return n.onFulfilled.push(ua(e,r,`fulfill`)),n.onRejected.push(ua(t,r,`reject`)),ca(n),r.proxy}};var sa=function(e,t,n,r){return e.state===ra&&(e.state=t,e[n]=r,ca(e)),e},ca=function(e){e.state===ia?la(e,`onFulfilled`,e.fulfillValue):e.state===aa&&la(e,`onRejected`,e.rejectReason)},la=function(e,t,n){if(e[t].length!==0){var r=e[t];e[t]=[];var i=function(){for(var e=0;e0}},clearQueue:function(){return function(){var e=this,t=e.length===void 0?[e]:e;if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n-1}return Eo=t,Eo}var ko,Ao;function jo(){if(Ao)return ko;Ao=1;var e=yo();function t(t,n){var r=this.__data__,i=e(r,t);return i<0?(++this.size,r.push([t,n])):r[i][1]=n,this}return ko=t,ko}var Mo,No;function Po(){if(No)return Mo;No=1;var e=po(),t=So(),n=To(),r=Oo(),i=jo();function a(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1&&n%1==0&&n0&&this.spawn(r).updateStyle().emit(`class`),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return t!=null&&t._private.classes.has(e)},toggleClass:function(e,t){D(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=t===void 0,i=[],a=0,o=n.length;a0&&this.spawn(i).updateStyle().emit(`class`),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(t==null)t=250;else if(t===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},t),n}};hc.className=hc.classNames=hc.classes;var Z={metaChar:`[\\!\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\\`\\{\\|\\}\\~]`,comparatorOp:`=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=`,boolOp:`\\?|\\!|\\^`,string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Y,meta:`degree|indegree|outdegree`,separator:`\\s*,\\s*`,descendant:`\\s+`,child:`\\s+>\\s+`,subject:`\\$`,group:`node|edge|\\*`,directedEdge:`\\s+->\\s+`,undirectedEdge:`\\s+<->\\s+`};Z.variable=`(?:[\\w-.]|(?:\\\\`+Z.metaChar+`))+`,Z.className=`(?:[\\w-]|(?:\\\\`+Z.metaChar+`))+`,Z.value=Z.string+`|`+Z.number,Z.id=Z.variable,(function(){var e=Z.comparatorOp.split(`|`),t,n;for(n=0;n=0)&&t!==`=`&&(Z.comparatorOp+=`|\\!`+t)})();var gc=function(){return{checks:[]}},Q={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},_c=[{selector:`:selected`,matches:function(e){return e.selected()}},{selector:`:unselected`,matches:function(e){return!e.selected()}},{selector:`:selectable`,matches:function(e){return e.selectable()}},{selector:`:unselectable`,matches:function(e){return!e.selectable()}},{selector:`:locked`,matches:function(e){return e.locked()}},{selector:`:unlocked`,matches:function(e){return!e.locked()}},{selector:`:visible`,matches:function(e){return e.visible()}},{selector:`:hidden`,matches:function(e){return!e.visible()}},{selector:`:transparent`,matches:function(e){return e.transparent()}},{selector:`:grabbed`,matches:function(e){return e.grabbed()}},{selector:`:free`,matches:function(e){return!e.grabbed()}},{selector:`:removed`,matches:function(e){return e.removed()}},{selector:`:inside`,matches:function(e){return!e.removed()}},{selector:`:grabbable`,matches:function(e){return e.grabbable()}},{selector:`:ungrabbable`,matches:function(e){return!e.grabbable()}},{selector:`:animated`,matches:function(e){return e.animated()}},{selector:`:unanimated`,matches:function(e){return!e.animated()}},{selector:`:parent`,matches:function(e){return e.isParent()}},{selector:`:childless`,matches:function(e){return e.isChildless()}},{selector:`:child`,matches:function(e){return e.isChild()}},{selector:`:orphan`,matches:function(e){return e.isOrphan()}},{selector:`:nonorphan`,matches:function(e){return e.isChild()}},{selector:`:compound`,matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:`:loop`,matches:function(e){return e.isLoop()}},{selector:`:simple`,matches:function(e){return e.isSimple()}},{selector:`:active`,matches:function(e){return e.active()}},{selector:`:inactive`,matches:function(e){return!e.active()}},{selector:`:backgrounding`,matches:function(e){return e.backgrounding()}},{selector:`:nonbackgrounding`,matches:function(e){return!e.backgrounding()}}].sort(function(e,t){return ce(e.selector,t.selector)}),vc=function(){for(var e={},t,n=0;n<_c.length;n++)t=_c[n],e[t.selector]=t.matches;return e}(),yc=function(e,t){return vc[e](t)},bc=`(`+_c.map(function(e){return e.selector}).join(`|`)+`)`,xc=function(e){return e.replace(RegExp(`\\\\(`+Z.metaChar+`)`,`g`),function(e,t){return t})},Sc=function(e,t,n){e[e.length-1]=n},Cc=[{name:`group`,query:!0,regex:`(`+Z.group+`)`,populate:function(e,t,n){var r=f(n,1)[0];t.checks.push({type:Q.GROUP,value:r===`*`?r:r+`s`})}},{name:`state`,query:!0,regex:bc,populate:function(e,t,n){var r=f(n,1)[0];t.checks.push({type:Q.STATE,value:r})}},{name:`id`,query:!0,regex:`\\#(`+Z.id+`)`,populate:function(e,t,n){var r=f(n,1)[0];t.checks.push({type:Q.ID,value:xc(r)})}},{name:`className`,query:!0,regex:`\\.(`+Z.className+`)`,populate:function(e,t,n){var r=f(n,1)[0];t.checks.push({type:Q.CLASS,value:xc(r)})}},{name:`dataExists`,query:!0,regex:`\\[\\s*(`+Z.variable+`)\\s*\\]`,populate:function(e,t,n){var r=f(n,1)[0];t.checks.push({type:Q.DATA_EXIST,field:xc(r)})}},{name:`dataCompare`,query:!0,regex:`\\[\\s*(`+Z.variable+`)\\s*(`+Z.comparatorOp+`)\\s*(`+Z.value+`)\\s*\\]`,populate:function(e,t,n){var r=f(n,3),i=r[0],a=r[1],o=r[2];o=RegExp(`^`+Z.string+`$`).exec(o)==null?parseFloat(o):o.substring(1,o.length-1),t.checks.push({type:Q.DATA_COMPARE,field:xc(i),operator:a,value:o})}},{name:`dataBool`,query:!0,regex:`\\[\\s*(`+Z.boolOp+`)\\s*(`+Z.variable+`)\\s*\\]`,populate:function(e,t,n){var r=f(n,2),i=r[0],a=r[1];t.checks.push({type:Q.DATA_BOOL,field:xc(a),operator:i})}},{name:`metaCompare`,query:!0,regex:`\\[\\[\\s*(`+Z.meta+`)\\s*(`+Z.comparatorOp+`)\\s*(`+Z.number+`)\\s*\\]\\]`,populate:function(e,t,n){var r=f(n,3),i=r[0],a=r[1],o=r[2];t.checks.push({type:Q.META_COMPARE,field:xc(i),operator:a,value:parseFloat(o)})}},{name:`nextQuery`,separator:!0,regex:Z.separator,populate:function(e,t){var n=e.currentSubject,r=e.edgeCount,i=e.compoundCount,a=e[e.length-1];return n!=null&&(a.subject=n,e.currentSubject=null),a.edgeCount=r,a.compoundCount=i,e.edgeCount=0,e.compoundCount=0,e[e.length++]=gc()}},{name:`directedEdge`,separator:!0,regex:Z.directedEdge,populate:function(e,t){if(e.currentSubject==null){var n=gc(),r=t,i=gc();return n.checks.push({type:Q.DIRECTED_EDGE,source:r,target:i}),Sc(e,t,n),e.edgeCount++,i}else{var a=gc(),o=t,s=gc();return a.checks.push({type:Q.NODE_SOURCE,source:o,target:s}),Sc(e,t,a),e.edgeCount++,s}}},{name:`undirectedEdge`,separator:!0,regex:Z.undirectedEdge,populate:function(e,t){if(e.currentSubject==null){var n=gc(),r=t,i=gc();return n.checks.push({type:Q.UNDIRECTED_EDGE,nodes:[r,i]}),Sc(e,t,n),e.edgeCount++,i}else{var a=gc(),o=t,s=gc();return a.checks.push({type:Q.NODE_NEIGHBOR,node:o,neighbor:s}),Sc(e,t,a),s}}},{name:`child`,separator:!0,regex:Z.child,populate:function(e,t){if(e.currentSubject==null){var n=gc(),r=gc(),i=e[e.length-1];return n.checks.push({type:Q.CHILD,parent:i,child:r}),Sc(e,t,n),e.compoundCount++,r}else if(e.currentSubject===t){var a=gc(),o=e[e.length-1],s=gc(),c=gc(),l=gc(),u=gc();return a.checks.push({type:Q.COMPOUND_SPLIT,left:o,right:s,subject:c}),c.checks=t.checks,t.checks=[{type:Q.TRUE}],u.checks.push({type:Q.TRUE}),s.checks.push({type:Q.PARENT,parent:u,child:l}),Sc(e,o,a),e.currentSubject=c,e.compoundCount++,l}else{var d=gc(),f=gc(),p=[{type:Q.PARENT,parent:d,child:f}];return d.checks=t.checks,t.checks=p,e.compoundCount++,f}}},{name:`descendant`,separator:!0,regex:Z.descendant,populate:function(e,t){if(e.currentSubject==null){var n=gc(),r=gc(),i=e[e.length-1];return n.checks.push({type:Q.DESCENDANT,ancestor:i,descendant:r}),Sc(e,t,n),e.compoundCount++,r}else if(e.currentSubject===t){var a=gc(),o=e[e.length-1],s=gc(),c=gc(),l=gc(),u=gc();return a.checks.push({type:Q.COMPOUND_SPLIT,left:o,right:s,subject:c}),c.checks=t.checks,t.checks=[{type:Q.TRUE}],u.checks.push({type:Q.TRUE}),s.checks.push({type:Q.ANCESTOR,ancestor:u,descendant:l}),Sc(e,o,a),e.currentSubject=c,e.compoundCount++,l}else{var d=gc(),f=gc(),p=[{type:Q.ANCESTOR,ancestor:d,descendant:f}];return d.checks=t.checks,t.checks=p,e.compoundCount++,f}}},{name:`subject`,modifier:!0,regex:Z.subject,populate:function(e,t){if(e.currentSubject!=null&&e.currentSubject!==t)return zt("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=t;var n=e[e.length-1].checks[0],r=n==null?null:n.type;r===Q.DIRECTED_EDGE?n.type=Q.NODE_TARGET:r===Q.UNDIRECTED_EDGE&&(n.type=Q.NODE_NEIGHBOR,n.node=n.nodes[1],n.neighbor=n.nodes[0],n.nodes=null)}}];Cc.forEach(function(e){return e.regexObj=RegExp(`^`+e.regex)});var wc=function(e){for(var t,n,r,i=0;i0&&l.edgeCount>0)return zt("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(l.edgeCount>1)return zt("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;l.edgeCount===1&&zt("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(e){return e??``},t=function(t){return T(t)?`"`+t+`"`:e(t)},n=function(e){return` `+e+` `},r=function(r,a){var o=r.type,s=r.value;switch(o){case Q.GROUP:var c=e(s);return c.substring(0,c.length-1);case Q.DATA_COMPARE:var l=r.field,u=r.operator;return`[`+l+n(e(u))+t(s)+`]`;case Q.DATA_BOOL:var d=r.operator,f=r.field;return`[`+e(d)+f+`]`;case Q.DATA_EXIST:return`[`+r.field+`]`;case Q.META_COMPARE:var p=r.operator;return`[[`+r.field+n(e(p))+t(s)+`]]`;case Q.STATE:return s;case Q.ID:return`#`+s;case Q.CLASS:return`.`+s;case Q.PARENT:case Q.CHILD:return i(r.parent,a)+n(`>`)+i(r.child,a);case Q.ANCESTOR:case Q.DESCENDANT:return i(r.ancestor,a)+` `+i(r.descendant,a);case Q.COMPOUND_SPLIT:var m=i(r.left,a),h=i(r.subject,a),g=i(r.right,a);return m+(m.length>0?` `:``)+h+g;case Q.TRUE:return``}},i=function(e,t){return e.checks.reduce(function(n,i,a){return n+(t===e&&a===0?`$`:``)+r(i,t)},``)},a=``,o=0;o1&&o=0&&(t=t.replace(`!`,``),u=!0),t.indexOf(`@`)>=0&&(t=t.replace(`@`,``),l=!0),(i||o||l)&&(s=!i&&!a?``:``+e,c=``+n),l&&(e=s=s.toLowerCase(),n=c=c.toLowerCase()),t){case`*=`:r=s.indexOf(c)>=0;break;case`$=`:r=s.indexOf(c,s.length-c.length)>=0;break;case`^=`:r=s.indexOf(c)===0;break;case`=`:r=e===n;break;case`>`:d=!0,r=e>n;break;case`>=`:d=!0,r=e>=n;break;case`<`:d=!0,r=e0;){var l=i.shift();t(l),a.add(l.id()),o&&r(i,a,l)}return e}function Vc(e,t,n){if(n.isParent())for(var r=n._private.children,i=0;i1&&arguments[1]!==void 0?arguments[1]:!0;return Bc(this,e,t,Vc)};function Hc(e,t,n){if(n.isChild()){var r=n._private.parent;t.has(r.id())||e.push(r)}}zc.forEachUp=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Bc(this,e,t,Hc)};function Uc(e,t,n){Hc(e,t,n),Vc(e,t,n)}zc.forEachUpAndDown=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Bc(this,e,t,Uc)},zc.ancestors=zc.parents;var Wc=Gc={data:pc.data({field:`data`,bindingEvent:`data`,allowBinding:!0,allowSetting:!0,settingEvent:`data`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:pc.removeData({field:`data`,event:`data`,triggerFnName:`trigger`,triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:pc.data({field:`scratch`,bindingEvent:`scratch`,allowBinding:!0,allowSetting:!0,settingEvent:`scratch`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,updateStyle:!0}),removeScratch:pc.removeData({field:`scratch`,event:`scratch`,triggerFnName:`trigger`,triggerEvent:!0,updateStyle:!0}),rscratch:pc.data({field:`rscratch`,allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:pc.removeData({field:`rscratch`,triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}},Gc;Wc.attr=Wc.data,Wc.removeAttr=Wc.removeData;var Kc=Gc,qc={};function Jc(e){return function(t){var n=this;if(t===void 0&&(t=!0),n.length!==0)if(n.isNode()&&!n.removed()){for(var r=0,i=n[0],a=i._private.edges,o=0;ot}),minIndegree:Yc(`indegree`,function(e,t){return et}),minOutdegree:Yc(`outdegree`,function(e,t){return et})}),X(qc,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r0,d=u;u&&(l=l[0]);var f=d?l.position():{x:0,y:0};t===void 0?i!==void 0&&c.position({x:i.x+f.x,y:i.y+f.y}):c.position(e,t+f[e])}else{var p=n.position(),m=o?n.parent():null,h=m&&m.length>0,g=h;h&&(m=m[0]);var _=g?m.position():{x:0,y:0};return i={x:p.x-_.x,y:p.y-_.y},e===void 0?i:i[e]}else if(!a)return;return this}},Xc.modelPosition=Xc.point=Xc.position,Xc.modelPositions=Xc.points=Xc.positions,Xc.renderedPoint=Xc.renderedPosition,Xc.relativePoint=Xc.relativePosition;var el=Zc,tl=function(e){switch(e){case`left`:case`right-inside`:return`left`;case`right`:case`left-inside`:return`right`;default:return`center`}},nl=function(e){switch(e){case`top`:case`bottom-inside`:return`top`;case`bottom`:case`top-inside`:return`bottom`;default:return`center`}},rl=function(e){switch(e){case`left`:return`right`;case`right`:return`left`;case`left-inside`:return`left`;case`right-inside`:return`right`;default:return`center`}},il=al={},al;al.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),a=t.x1*r+i.x,o=t.x2*r+i.x,s=t.y1*r+i.y,c=t.y2*r+i.y;return{x1:a,x2:o,y1:s,y2:c,w:o-a,h:c-s}},al.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=this.cy();return!t.styleEnabled()||!t.hasCompoundNodes()||this.forEachUp(function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify(`bounds`)}}),this},al.updateCompoundBounds=function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes()||!e&&t.batching())return this;function n(e){if(!e.isParent())return;var t=e._private,n=e.children(),r=e.pstyle(`compound-sizing-wrt-labels`).value===`include`,i={width:{val:e.pstyle(`min-width`).pfValue,left:e.pstyle(`min-width-bias-left`),right:e.pstyle(`min-width-bias-right`)},height:{val:e.pstyle(`min-height`).pfValue,top:e.pstyle(`min-height-bias-top`),bottom:e.pstyle(`min-height-bias-bottom`)}},a=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;(a.w===0||a.h===0)&&(a={w:e.pstyle(`width`).pfValue,h:e.pstyle(`height`).pfValue},a.x1=o.x-a.w/2,a.x2=o.x+a.w/2,a.y1=o.y-a.h/2,a.y2=o.y+a.h/2);function s(e,t,n){var r=0,i=0,a=t+n;return e>0&&a>0&&(r=t/a*e,i=n/a*e),{biasDiff:r,biasComplementDiff:i}}function c(e,t,n,r){if(n.units===`%`)switch(r){case`width`:return e>0?n.pfValue*e:0;case`height`:return t>0?n.pfValue*t:0;case`average`:return e>0&&t>0?n.pfValue*(e+t)/2:0;case`min`:return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case`max`:return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}else if(n.units===`px`)return n.pfValue;else return 0}var l=i.width.left.value;i.width.left.units===`px`&&i.width.val>0&&(l=l*100/i.width.val);var u=i.width.right.value;i.width.right.units===`px`&&i.width.val>0&&(u=u*100/i.width.val);var d=i.height.top.value;i.height.top.units===`px`&&i.height.val>0&&(d=d*100/i.height.val);var f=i.height.bottom.value;i.height.bottom.units===`px`&&i.height.val>0&&(f=f*100/i.height.val);var p=s(i.width.val-a.w,l,u),m=p.biasDiff,h=p.biasComplementDiff,g=s(i.height.val-a.h,d,f),_=g.biasDiff,v=g.biasComplementDiff;t.autoPadding=c(a.w,a.h,e.pstyle(`padding`),e.pstyle(`padding-relative-to`).value),t.autoWidth=Math.max(a.w,i.width.val),o.x=(-m+a.x1+a.x2+h)/2,t.autoHeight=Math.max(a.h,i.height.val),o.y=(-_+a.y1+a.y2+v)/2}for(var r=0;re.x2?r:e.x2,e.y1=ne.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},cl=function(e,t){return t==null?e:sl(e,t.x1,t.y1,t.x2,t.y2)},ll=function(e,t,n){return Xt(e,t,n)},ul=function(e,t,n){if(!t.cy().headless()){var r=t._private,i=r.rstyle,a=i.arrowWidth/2,o=t.pstyle(n+`-arrow-shape`).value,s,c;if(o!==`none`){n===`source`?(s=i.srcX,c=i.srcY):n===`target`?(s=i.tgtX,c=i.tgtY):(s=i.midX,c=i.midY);var l=r.arrowBounds=r.arrowBounds||{},u=l[n]=l[n]||{};u.x1=s-a,u.y1=c-a,u.x2=s+a,u.y2=c+a,u.w=u.x2-u.x1,u.h=u.y2-u.y1,Zn(u,1),sl(e,u.x1,u.y1,u.x2,u.y2)}}},dl=function(e,t,n){if(!t.cy().headless()){var r=n?n+`-`:``,i=t._private,a=i.rstyle;if(t.pstyle(r+`label`).strValue){var o=t.pstyle(`text-halign`),s=t.pstyle(`text-valign`),c=ll(a,`labelWidth`,n),l=ll(a,`labelHeight`,n),u=ll(a,`labelX`,n),d=ll(a,`labelY`,n),f=t.pstyle(r+`text-margin-x`).pfValue,p=t.pstyle(r+`text-margin-y`).pfValue,m=t.isEdge(),h=t.pstyle(r+`text-rotation`),g=t.pstyle(`text-outline-width`).pfValue,_=t.pstyle(`text-border-width`).pfValue/2,v=t.pstyle(`text-background-padding`).pfValue,y=2,b=l,x=c,S=x/2,C=b/2,w,T,E,D;if(m)w=u-S,T=u+S,E=d-C,D=d+C;else{switch(tl(o.value)){case`left`:w=u-x,T=u;break;case`center`:w=u-S,T=u+S;break;case`right`:w=u,T=u+x;break}switch(nl(s.value)){case`top`:E=d-b,D=d;break;case`center`:E=d-C,D=d+C;break;case`bottom`:E=d,D=d+b;break}}var O=f-Math.max(g,_)-v-y,k=f+Math.max(g,_)+v+y,A=p-Math.max(g,_)-v-y,j=p+Math.max(g,_)+v+y;w+=O,T+=k,E+=A,D+=j;var M=n||`main`,N=i.labelBounds,P=N[M]=N[M]||{};P.x1=w,P.y1=E,P.x2=T,P.y2=D,P.w=T-w,P.h=D-E,P.leftPad=O,P.rightPad=k,P.topPad=A,P.botPad=j;var F=m&&h.strValue===`autorotate`,I=h.pfValue!=null&&h.pfValue!==0;if(F||I){var L=F?ll(i.rstyle,`labelAngle`,n):h.pfValue,R=Math.cos(L),z=Math.sin(L),B=(w+T)/2,V=(E+D)/2;if(!m){switch(tl(o.value)){case`left`:B=T;break;case`right`:B=w;break}switch(nl(s.value)){case`top`:V=D;break;case`bottom`:V=E;break}}var H=function(e,t){return e-=B,t-=V,{x:e*R-t*z+B,y:e*z+t*R+V}},U=H(w,E),W=H(w,D),G=H(T,E),K=H(T,D);w=Math.min(U.x,W.x,G.x,K.x),T=Math.max(U.x,W.x,G.x,K.x),E=Math.min(U.y,W.y,G.y,K.y),D=Math.max(U.y,W.y,G.y,K.y)}var q=M+`Rot`,J=N[q]=N[q]||{};J.x1=w,J.y1=E,J.x2=T,J.y2=D,J.w=T-w,J.h=D-E,sl(e,w,E,T,D),sl(i.labelBounds.all,w,E,T,D)}return e}},fl=function(e,t){if(!t.cy().headless()){var n=t.pstyle(`outline-opacity`).value,r=t.pstyle(`outline-width`).value+t.pstyle(`outline-offset`).value;pl(e,t,n,r,`outside`,r/2)}},pl=function(e,t,n,r,i,a){if(!(n===0||r<=0||i===`inside`)){var o=t.cy().renderer(),s=o.nodeShapes[o.getNodeShape(t)];if(s){var c=t.position(),l=c.x,u=c.y,d=t.width(),f=t.height();s.hasMiterBounds?(i===`center`&&(r/=2),cl(e,s.miterBounds(l,u,d,f,r))):a!=null&&a>0&&Qn(e,[a,a,a,a])}}},ml=function(e,t){if(!t.cy().headless()){var n=t.pstyle(`border-opacity`).value,r=t.pstyle(`border-width`).pfValue,i=t.pstyle(`border-position`).value;pl(e,t,n,r,i)}},hl=function(e,t){var n=e._private.cy,r=n.styleEnabled(),i=n.headless(),a=Kn(),o=e._private,s=e.isNode(),c=e.isEdge(),l,u,d,f,p,m,h=o.rstyle,g=s&&r?e.pstyle(`bounds-expansion`).pfValue:[0],_=function(e){return e.pstyle(`display`).value!==`none`},v=!r||_(e)&&(!c||_(e.source())&&_(e.target()));if(v){var y=0,b=0;r&&t.includeOverlays&&(y=e.pstyle(`overlay-opacity`).value,y!==0&&(b=e.pstyle(`overlay-padding`).value));var x=0,S=0;r&&t.includeUnderlays&&(x=e.pstyle(`underlay-opacity`).value,x!==0&&(S=e.pstyle(`underlay-padding`).value));var C=Math.max(b,S),w=0,T=0;if(r&&(w=e.pstyle(`width`).pfValue,T=w/2),s&&t.includeNodes){var E=e.position();p=E.x,m=E.y;var D=e.outerWidth()/2,O=e.outerHeight()/2;l=p-D,u=p+D,d=m-O,f=m+O,sl(a,l,d,u,f),r&&fl(a,e),r&&t.includeOutlines&&!i&&fl(a,e),r&&ml(a,e)}else if(c&&t.includeEdges)if(r&&!i){var k=e.pstyle(`curve-style`).strValue;if(l=Math.min(h.srcX,h.midX,h.tgtX),u=Math.max(h.srcX,h.midX,h.tgtX),d=Math.min(h.srcY,h.midY,h.tgtY),f=Math.max(h.srcY,h.midY,h.tgtY),l-=T,u+=T,d-=T,f+=T,sl(a,l,d,u,f),k===`haystack`){var A=h.haystackPts;if(A&&A.length===2){if(l=A[0].x,d=A[0].y,u=A[1].x,f=A[1].y,l>u){var j=l;l=u,u=j}if(d>f){var M=d;d=f,f=M}sl(a,l-T,d-T,u+T,f+T)}}else if(k===`bezier`||k===`unbundled-bezier`||ee(k,`segments`)||ee(k,`taxi`)){var N;switch(k){case`bezier`:case`unbundled-bezier`:N=h.bezierPts;break;case`segments`:case`taxi`:case`round-segments`:case`round-taxi`:N=h.linePts;break}if(N!=null)for(var P=0;Pu){var R=l;l=u,u=R}if(d>f){var z=d;d=f,f=z}l-=T,u+=T,d-=T,f+=T,sl(a,l,d,u,f)}if(r&&t.includeEdges&&c&&(ul(a,e,`mid-source`),ul(a,e,`mid-target`),ul(a,e,`source`),ul(a,e,`target`)),r&&e.pstyle(`ghost`).value===`yes`){var B=e.pstyle(`ghost-offset-x`).pfValue,V=e.pstyle(`ghost-offset-y`).pfValue;sl(a,a.x1+B,a.y1+V,a.x2+B,a.y2+V)}var H=o.bodyBounds=o.bodyBounds||{};$n(H,a),Qn(H,g),Zn(H,1),r&&(l=a.x1,u=a.x2,d=a.y1,f=a.y2,sl(a,l-C,d-C,u+C,f+C));var U=o.overlayBounds=o.overlayBounds||{};$n(U,a),Qn(U,g),Zn(U,1);var W=o.labelBounds=o.labelBounds||{};W.all==null?W.all=Kn():Jn(W.all),r&&t.includeLabels&&(t.includeMainLabels&&dl(a,e,null),c&&(t.includeSourceLabels&&dl(a,e,`source`),t.includeTargetLabels&&dl(a,e,`target`)))}return a.x1=ol(a.x1),a.y1=ol(a.y1),a.x2=ol(a.x2),a.y2=ol(a.y2),a.w=ol(a.x2-a.x1),a.h=ol(a.y2-a.y1),a.w>0&&a.h>0&&v&&(Qn(a,g),Zn(a,1)),a},gl=function(e){var t=0,n=function(e){return+!!e<0&&arguments[0]!==void 0?arguments[0]:Bl,t=arguments.length>1?arguments[1]:void 0,n=0;n=0;s--)o(s);return this},Hl.removeAllListeners=function(){return this.removeListener(`*`)},Hl.emit=Hl.trigger=function(e,t,n){var r=this.listeners,i=r.length;return this.emitting++,D(t)||(t=[t]),Gl(this,function(e,a){n!=null&&(r=[{event:a.event,type:a.type,namespace:a.namespace,callback:n}],i=r.length);for(var o=function(){var n=r[s];if(n.type===a.type&&(!n.namespace||n.namespace===a.namespace||n.namespace===Ll)&&e.eventMatches(e.context,n,a)){var i=[a];t!=null&&Yt(i,t),e.beforeEmit(e.context,n,a),n.conf&&n.conf.one&&(e.listeners=e.listeners.filter(function(e){return e!==n}));var o=e.callbackContext(e.context,n,a),c=n.callback.apply(o,i);e.afterEmit(e.context,n,a),c===!1&&(a.stopPropagation(),a.preventDefault())}},s=0;s1&&!r){var i=this.length-1,a=this[i],o=a._private.data.id;this[i]=void 0,this[e]=a,n.set(o,{ele:a,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&T(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r=0;t--){var n=this[t];e(n)&&this.unmergeAt(t)}return this},map:function(e,t){for(var n=[],r=this,i=0;in&&(n=s,r=o)}return{value:n,ele:r}},min:function(e,t){for(var n=1/0,r,i=this,a=0;a=0&&i`u`?`undefined`:g(Symbol))!=e&&g(Symbol.iterator)!=e&&($l[Symbol.iterator]=function(){var e=this,t={value:void 0,done:!1},n=0,r=this.length;return s({next:function(){return n1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],r=n.cy();if(r.styleEnabled()&&n)return n._private.styleDirty&&(n._private.styleDirty=!1,r.style().apply(n)),n._private.style[e]??(t?r.style().getDefaultProperty(e):null)},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return n.pfValue===void 0?n.value:n.pfValue}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];if(n)return t.style().getRenderedStyle(n,e)},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,i=n.style();if(O(e)){var a=e;i.applyBypass(this,a,r),this.emitAndNotify(`style`)}else if(T(e))if(t===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}else i.applyBypass(this,e,t,r),this.emitAndNotify(`style`);else if(e===void 0){var s=this[0];return s?i.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),i=this;if(e===void 0)for(var a=0;a0&&t.push(u[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)},`neighborhood`),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),fu.neighbourhood=fu.neighborhood,fu.closedNeighbourhood=fu.closedNeighborhood,fu.openNeighbourhood=fu.openNeighborhood,X(fu,{source:Rc(function(e){var t=this[0],n;return t&&(n=t._private.source||t.cy().collection()),n&&e?n.filter(e):n},`source`),target:Rc(function(e){var t=this[0],n;return t&&(n=t._private.target||t.cy().collection()),n&&e?n.filter(e):n},`target`),sources:gu({attr:`source`}),targets:gu({attr:`target`})});function gu(e){return function(t){for(var n=[],r=0;r0);return a},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),fu.componentsOf=fu.components;var yu=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(e===void 0){Lt(`A collection must have a reference to the core`);return}var i=new Qt,a=!1;if(!t)t=[];else if(t.length>0&&O(t[0])&&!P(t[0])){a=!0;for(var o=[],s=new tn,c=0,l=t.length;c0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this,r=n.cy(),i=r._private,a=[],o=[],s,c=0,l=n.length;c0){for(var I=s.length===n.length?n:new yu(r,s),L=0;L0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this,r=[],i={},a=n._private.cy;function o(e){for(var t=e._private.edges,n=0;n0&&(e?E.emitAndNotify(`remove`):t&&E.emit(`remove`));for(var D=0;D0?i=o:r=o;while(Math.abs(a)>1e-7&&++s<10);return o}function _(t){for(var r=0,o=1,s=i-1;o!==s&&c[o]<=t;++o)r+=a;--o;var l=(t-c[o])/(c[o+1]-c[o]),u=r+l*a,d=p(u,e,n);return d>=.001?m(t,u):d===0?u:g(t,r,r+a)}var v=!1;function y(){v=!0,(e!==t||n!==r)&&h()}var b=function(i){return v||y(),e===t&&n===r?i:i===0?0:i===1?1:f(_(i),t,r)};b.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var x=`generateBezier(`+[e,t,n,r]+`)`;return b.toString=function(){return x},b}var Cu=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var i={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:i.v,dv:e(i)}}function n(n,r){var i={dx:n.v,dv:e(n)},a=t(n,r*.5,i),o=t(n,r*.5,a),s=t(n,r,o),c=1/6*(i.dx+2*(a.dx+o.dx)+s.dx),l=1/6*(i.dv+2*(a.dv+o.dv)+s.dv);return n.x+=c*r,n.v+=l*r,n}return function e(t,r,i){var a={x:-1,v:0,tension:null,friction:null},o=[0],s=0,c=1/1e4,l=16/1e3,u,d,f;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i||=null,a.tension=t,a.friction=r,u=i!==null,u?(s=e(t,r),d=s/i*l):d=l;f=n(f||a,d),o.push(1+f.x),s+=16,Math.abs(f.x)>c&&Math.abs(f.v)>c;);return u?function(e){return o[e*(o.length-1)|0]}:s}}(),wu=function(e,t,n,r){var i=Su(e,t,n,r);return function(e,t,n){return e+(t-e)*i(n)}},Tu={linear:function(e,t,n){return e+(t-e)*n},ease:wu(.25,.1,.25,1),"ease-in":wu(.42,0,1,1),"ease-out":wu(0,0,.58,1),"ease-in-out":wu(.42,0,.58,1),"ease-in-sine":wu(.47,0,.745,.715),"ease-out-sine":wu(.39,.575,.565,1),"ease-in-out-sine":wu(.445,.05,.55,.95),"ease-in-quad":wu(.55,.085,.68,.53),"ease-out-quad":wu(.25,.46,.45,.94),"ease-in-out-quad":wu(.455,.03,.515,.955),"ease-in-cubic":wu(.55,.055,.675,.19),"ease-out-cubic":wu(.215,.61,.355,1),"ease-in-out-cubic":wu(.645,.045,.355,1),"ease-in-quart":wu(.895,.03,.685,.22),"ease-out-quart":wu(.165,.84,.44,1),"ease-in-out-quart":wu(.77,0,.175,1),"ease-in-quint":wu(.755,.05,.855,.06),"ease-out-quint":wu(.23,1,.32,1),"ease-in-out-quint":wu(.86,0,.07,1),"ease-in-expo":wu(.95,.05,.795,.035),"ease-out-expo":wu(.19,1,.22,1),"ease-in-out-expo":wu(1,0,0,1),"ease-in-circ":wu(.6,.04,.98,.335),"ease-out-circ":wu(.075,.82,.165,1),"ease-in-out-circ":wu(.785,.135,.15,.86),spring:function(e,t,n){if(n===0)return Tu.linear;var r=Cu(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":wu};function Eu(e,t,n,r,i){if(r===1||t===n)return n;var a=i(t,n,r);return e==null?a:((e.roundValue||e.color)&&(a=Math.round(a)),e.min!==void 0&&(a=Math.max(a,e.min)),e.max!==void 0&&(a=Math.min(a,e.max)),a)}function Du(e,t){return e.pfValue!=null||e.value!=null?e.pfValue!=null&&(t==null||t.type.units!==`%`)?e.pfValue:e.value:e}function Ou(e,t,n,r,i){var a=i==null?null:i.type;n<0?n=0:n>1&&(n=1);var o=Du(e,i),s=Du(t,i);if(A(o)&&A(s))return Eu(a,o,s,n,r);if(D(o)&&D(s)){for(var c=[],l=0;l0?(d===`spring`&&f.push(o.duration),o.easingImpl=Tu[d].apply(null,f)):o.easingImpl=Tu[d]}var p=o.easingImpl,m=o.duration===0?1:(n-c)/o.duration;if(o.applying&&(m=o.progress),m<0?m=0:m>1&&(m=1),o.delay==null){var h=o.startPosition,g=o.position;if(g&&i&&!e.locked()){var _={};Au(h.x,g.x)&&(_.x=Ou(h.x,g.x,m,p)),Au(h.y,g.y)&&(_.y=Ou(h.y,g.y,m,p)),e.position(_)}var v=o.startPan,y=o.pan,b=a.pan,x=y!=null&&r;x&&(Au(v.x,y.x)&&(b.x=Ou(v.x,y.x,m,p)),Au(v.y,y.y)&&(b.y=Ou(v.y,y.y,m,p)),e.emit(`pan`));var S=o.startZoom,C=o.zoom,w=C!=null&&r;w&&(Au(S,C)&&(a.zoom=Gn(a.minZoom,Ou(S,C,m,p),a.maxZoom)),e.emit(`zoom`)),(x||w)&&e.emit(`viewport`);var E=o.style;if(E&&E.length>0&&i){for(var D=0;D=0;t--){var n=e[t];n()}e.splice(0,e.length)},u=a.length-1;u>=0;u--){var d=a[u],f=d._private;if(f.stopped){a.splice(u,1),f.hooked=!1,f.playing=!1,f.started=!1,l(f.frames);continue}!f.playing&&!f.applying||(f.playing&&f.applying&&(f.applying=!1),f.started||ju(t,d,e),ku(t,d,e,n),f.applying&&=!1,l(f.frames),f.step!=null&&f.step(e),d.completed()&&(a.splice(u,1),f.hooked=!1,f.playing=!1,f.started=!1,l(f.completes)),s=!0)}return!n&&a.length===0&&o.length===0&&r.push(t),s}for(var a=!1,o=0;o0?t.notify(`draw`,n):t.notify(`draw`)),n.unmerge(r),t.emit(`step`)}var Nu={animate:pc.animate(),animation:pc.animation(),animated:pc.animated(),clearQueue:pc.clearQueue(),delay:pc.delay(),delayAnimation:pc.delayAnimation(),stop:pc.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function t(){e._private.animationsRunning&&dt(function(n){Mu(n,e),t()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(t,n){Mu(n,e)},n.beforeRenderPriorities.animations):t()}},Pu={qualifierCompare:function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return r==null||e!==n.target&&P(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return t.qualifier==null?e:n.target}},Fu=function(e){return T(e)?new Fc(e):e},Iu={createEmitter:function(){var e=this._private;return e.emitter||=new Vl(Pu,this),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,Fu(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,Fu(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,Fu(t),n),this},once:function(e,t,n){return this.emitter().one(e,Fu(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}};pc.eventAliasesOn(Iu);var Lu={png:function(e){var t=this._private.renderer;return e||={},t.png(e)},jpg:function(e){var t=this._private.renderer;return e||={},e.bg=e.bg||`#fff`,t.jpg(e)}};Lu.jpeg=Lu.jpg;var Ru={layout:function(e){var t=this;if(e==null){Lt(`Layout options must be specified to make a layout`);return}if(e.name==null){Lt("A `name` must be specified to make a layout");return}var n=e.name,r=t.extension(`layout`,n);if(r==null){Lt("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}return new r(X({},e,{cy:t,eles:T(e.eles)?t.$(e.eles):e.eles==null?t.$():e.eles}))}};Ru.createLayout=Ru.makeLayout=Ru.layout;var zu={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();t!=null&&r.merge(t);return}if(n.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,t)}},notifications:function(e){var t=this._private;return e===void 0?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount??=0,e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var n=Object.keys(e),r=0;r0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]})},onRender:function(e){return this.on(`render`,e)},offRender:function(e){return this.off(`render`,e)}};Vu.invalidateDimensions=Vu.resize;var Hu={collection:function(e,t){return T(e)?this.$(e):N(e)?e.collection():D(e)?(t||={},new yu(this,e,t.unique,t.removed)):new yu(this)},nodes:function(e){var t=this.$(function(e){return e.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(e){return e.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}};Hu.elements=Hu.filter=Hu.$;var Uu={},Wu=`t`,Gu=`f`;Uu.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r0;if(f||d&&p){var m=void 0;f&&p||f?m=l.properties:p&&(m=l.mappedProperties);for(var h=0;h1&&(b=1),s.color){var S=r.valueMin[0],C=r.valueMax[0],w=r.valueMin[1],T=r.valueMax[1],E=r.valueMin[2],D=r.valueMax[2],O=r.valueMin[3]==null?1:r.valueMin[3],k=r.valueMax[3]==null?1:r.valueMax[3],j=[Math.round(S+(C-S)*b),Math.round(w+(T-w)*b),Math.round(E+(D-E)*b),Math.round(O+(k-O)*b)];a={bypass:r.bypass,name:r.name,value:j,strValue:`rgb(`+j[0]+`, `+j[1]+`, `+j[2]+`)`}}else if(s.number){var M=r.valueMin+(r.valueMax-r.valueMin)*b;a=this.parse(r.name,M,r.bypass,f)}else return!1;if(!a)return h(),!1;a.mapping=r,r=a;break;case o.data:for(var N=r.field.split(`.`),P=d.data,F=0;F0&&a>0){for(var s={},c=!1,l=0;l0?e.delayAnimation(o).play().promise().then(t):t()}).then(function(){return e.animation({style:s,duration:a,easing:e.pstyle(`transition-timing-function`).value,queue:!1}).play().promise()}).then(function(){n.removeBypasses(e,i),e.emitAndNotify(`style`),r.transitioning=!1})}else r.transitioning&&=(this.removeBypasses(e,i),e.emitAndNotify(`style`),!1)},Uu.checkTrigger=function(e,t,n,r,i,a){var o=this.properties[t],s=i(o);e.removed()||s!=null&&s(n,r,e)&&a(o)},Uu.checkZOrderTrigger=function(e,t,n,r){var i=this;this.checkTrigger(e,t,n,r,function(e){return e.triggersZOrder},function(){i._private.cy.notify(`zorder`,e)})},Uu.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBounds},function(t){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache()})},Uu.checkConnectedEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfConnectedEdges},function(t){e.connectedEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},Uu.checkParallelEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfParallelEdges},function(t){e.parallelEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},Uu.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r),this.checkConnectedEdgesBoundsTrigger(e,t,n,r),this.checkParallelEdgesBoundsTrigger(e,t,n,r)};var Ku={};Ku.applyBypass=function(e,t,n,r){var i=this,a=[],o=!0;if(t===`*`||t===`**`){if(n!==void 0)for(var s=0;si.length?r.substr(i.length):``}function c(){a=a.length>o.length?a.substr(o.length):``}for(;!r.match(/^\s*$/);){var l=r.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!l){zt(`Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: `+r);break}i=l[0];var u=l[1];if(u!==`core`&&new Fc(u).invalid){zt(`Skipping parsing of block: Invalid selector found in string stylesheet: `+u),s();continue}var d=l[2],f=!1;a=d;for(var p=[];!a.match(/^\s*$/);){var m=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!m){zt(`Skipping parsing of block: Invalid formatting of style property and value definitions found in:`+d),f=!0;break}o=m[0];var h=m[1],g=m[2];if(!t.properties[h]){zt(`Skipping property: Invalid property name in: `+o),c();continue}if(!n.parse(h,g)){zt(`Skipping property: Invalid property definition in: `+o),c();continue}p.push({name:h,val:g}),c()}if(f){s();break}n.selector(u);for(var _=0;_=7&&t[0]===`d`&&(u=new RegExp(s.data.regex).exec(t))){if(n)return!1;var f=s.data;return{name:e,value:u,strValue:``+t,mapped:f,field:u[1],bypass:n}}else if(t.length>=10&&t[0]===`m`&&(d=new RegExp(s.mapData.regex).exec(t))){if(n||l.multiple)return!1;var p=s.mapData;if(!(l.color||l.number))return!1;var m=this.parse(e,d[4]);if(!m||m.mapped)return!1;var h=this.parse(e,d[5]);if(!h||h.mapped)return!1;if(m.pfValue===h.pfValue||m.strValue===h.strValue)return zt("`"+e+`: `+t+"` is not a valid mapper because the output range is zero; converting to `"+e+`: `+m.strValue+"`"),this.parse(e,m.strValue);if(l.color){var g=m.value,_=h.value;if(g[0]===_[0]&&g[1]===_[1]&&g[2]===_[2]&&(g[3]===_[3]||(g[3]==null||g[3]===1)&&(_[3]==null||_[3]===1)))return!1}return{name:e,value:d,strValue:``+t,mapped:p,field:d[1],fieldMin:parseFloat(d[2]),fieldMax:parseFloat(d[3]),valueMin:m.value,valueMax:h.value,bypass:n}}}if(l.multiple&&r!==`multiple`){var v=c?t.split(/\s+/):D(t)?t:[t];if(l.evenMultiple&&v.length%2!=0)return null;for(var y=[],b=[],x=[],S=``,C=!1,w=0;w0?` `:``)+O.strValue}return l.validate&&!l.validate(y,b)?null:l.singleEnum&&C?y.length===1&&T(y[0])?{name:e,value:y[0],strValue:y[0],bypass:n}:null:{name:e,value:y,pfValue:x,strValue:S,bypass:n,units:b}}var k=function(){for(var r=0;rl.max||l.strictMax&&t===l.max))return null;var F={name:e,value:t,strValue:``+t+(A||``),units:A,bypass:n};return l.unitless||A!==`px`&&A!==`em`?F.pfValue=t:F.pfValue=A===`px`||!A?t:this.getEmSizeInPixels()*t,(A===`ms`||A===`s`)&&(F.pfValue=A===`ms`?t:1e3*t),(A===`deg`||A===`rad`)&&(F.pfValue=A===`rad`?t:Fn(t)),A===`%`&&(F.pfValue=t/100),F}else if(l.propList){var I=[],L=``+t;if(L!==`none`){for(var R=L.split(/\s*,\s*|\s+/),z=0;z0&&o>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){s=Math.min((a-2*t)/n.w,(o-2*t)/n.h),s=s>this._private.maxZoom?this._private.maxZoom:s,s=s=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t=this._private,n=t.pan,r=t.zoom,i,a,o=!1;if(t.zoomingEnabled||(o=!0),A(e)?a=e:O(e)&&(a=e.level,e.position==null?e.renderedPosition!=null&&(i=e.renderedPosition):i=On(e.position,r,n),i!=null&&!t.panningEnabled&&(o=!0)),a=a>t.maxZoom?t.maxZoom:a,a=at.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=s,i.push(`zoom`))}if(r&&(!a||!e.cancelOnFailedZoom)&&t.panningEnabled){var c=e.pan;A(c.x)&&(t.pan.x=c.x,o=!1),A(c.y)&&(t.pan.y=c.y,o=!1),o||i.push(`pan`)}return i.length>0&&(i.push(`viewport`),this.emit(i.join(` `)),this.notify(`viewport`)),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit(`pan viewport`),this.notify(`viewport`)),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(T(e)){var n=e;e=this.mutableElements().filter(n)}else N(e)||(e=this.mutableElements());if(e.length!==0){var r=e.boundingBox(),i=this.width(),a=this.height();return t=t===void 0?this._private.zoom:t,{x:(i-t*(r.x1+r.x2))/2,y:(a-t*(r.y1+r.y2))/2}}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled||this.viewport({pan:{x:0,y:0},zoom:1}),this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,t=e.container,n=this;return e.sizeCache=e.sizeCache||(t?function(){var e=n.window().getComputedStyle(t),r=function(t){return parseFloat(e.getPropertyValue(t))};return{width:t.clientWidth-r(`padding-left`)-r(`padding-right`),height:t.clientHeight-r(`padding-top`)-r(`padding-bottom`)}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}};rd.centre=rd.center,rd.autolockNodes=rd.autolock,rd.autoungrabifyNodes=rd.autoungrabify;var id={data:pc.data({field:`data`,bindingEvent:`data`,allowBinding:!0,allowSetting:!0,settingEvent:`data`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,updateStyle:!0}),removeData:pc.removeData({field:`data`,event:`data`,triggerFnName:`trigger`,triggerEvent:!0,updateStyle:!0}),scratch:pc.data({field:`scratch`,bindingEvent:`scratch`,allowBinding:!0,allowSetting:!0,settingEvent:`scratch`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,updateStyle:!0}),removeScratch:pc.removeData({field:`scratch`,event:`scratch`,triggerFnName:`trigger`,triggerEvent:!0,updateStyle:!0})};id.attr=id.data,id.removeAttr=id.removeData;var ad=function(e){var t=this;e=X({},e);var n=e.container;n&&!M(n)&&M(n[0])&&(n=n[0]);var r=n?n._cyreg:null;r||={},r&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var a=v!==void 0&&n!==void 0&&!e.headless,o=e;o.layout=X({name:a?`grid`:`null`},o.layout),o.renderer=X({name:a?`canvas`:`null`},o.renderer);var s=function(e,t,n){return t===void 0?n===void 0?e:n:t},c=this._private={container:n,ready:!1,options:o,elements:new yu(this),listeners:[],aniEles:new yu(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?a:o.styleEnabled,zoom:A(o.zoom)?o.zoom:1,pan:{x:O(o.pan)&&A(o.pan.x)?o.pan.x:0,y:O(o.pan)&&A(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var l=function(e,t){if(e.some(H))return fa.all(e).then(t);t(e)};c.styleEnabled&&t.setStyle([]);var u=X({},o,o.renderer);t.initRenderer(u);var d=function(e,n,r){t.notifications(!1);var i=t.mutableElements();i.length>0&&i.remove(),e!=null&&(O(e)||D(e))&&t.add(e),t.one(`layoutready`,function(e){t.notifications(!0),t.emit(e),t.one(`load`,n),t.emitAndNotify(`load`)}).one(`layoutstop`,function(){t.one(`done`,r),t.emit(`done`)});var a=X({},t._private.options.layout);a.eles=t.elements(),t.layout(a).run()};l([o.style,o.elements],function(e){var n=e[0],a=e[1];c.styleEnabled&&t.style().append(n),d(a,function(){t.startAnimationLoop(),c.ready=!0,E(o.ready)&&t.on(`ready`,o.ready);for(var e=0;e0,s=!!e.boundingBox,c=Kn(s?e.boundingBox:structuredClone(t.extent())),l;if(N(e.roots))l=e.roots;else if(D(e.roots)){for(var u=[],d=0;d0;){var M=j(),P=E(M,k);if(P)M.outgoers().filter(function(e){return e.isNode()&&n.has(e)}).forEach(A);else if(P===null){zt("Detected double maximal shift for node `"+M.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var F=0;if(e.avoidOverlap)for(var I=0;I0&&_[0].length<=3?a/2:0),l=2*Math.PI/_[r].length*i;return r===0&&_[0].length===1&&(o=1),{x:ee.x+o*Math.cos(l),y:ee.y+o*Math.sin(l)}}else{var u=_[r].length,d=Math.max(u===1?0:s?(c.w-e.padding*2-Y.w)/((e.grid?ne:u)-1):(c.w-e.padding*2-Y.w)/((e.grid?ne:u)+1),F);return{x:ee.x+(i+1-(u+1)/2)*d,y:ee.y+(r+1-(U+1)/2)*te}}},ie={downward:0,leftward:90,upward:180,rightward:-90};return Object.keys(ie).indexOf(e.direction)===-1&&Lt(`Invalid direction '${e.direction}' specified for breadthfirst layout. Valid values are: ${Object.keys(ie).join(`, `)}`),n.nodes().layoutPositions(this,e,function(t){return Ot(re(t),c,ie[e.direction])}),this};var fd={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function pd(e){this.options=X({},fd,e)}pd.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=t.counterclockwise===void 0?t.clockwise:!t.counterclockwise,a=r.nodes().not(`:parent`);t.sort&&(a=a.sort(t.sort));for(var o=Kn(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},c=(t.sweep===void 0?2*Math.PI-2*Math.PI/a.length:t.sweep)/Math.max(1,a.length-1),l,u=0,d=0;d1&&t.avoidOverlap){u*=1.75;var h=Math.cos(c)-Math.cos(0),g=Math.sin(c)-Math.sin(0),_=Math.sqrt(u*u/(h*h+g*g));l=Math.max(_,l)}return r.nodes().layoutPositions(this,t,function(e,n){var r=t.startAngle+n*c*(i?1:-1),a=l*Math.cos(r),o=l*Math.sin(r);return{x:s.x+a,y:s.y+o}}),this};var md={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function hd(e){this.options=X({},md,e)}hd.prototype.run=function(){for(var e=this.options,t=e,n=t.counterclockwise===void 0?t.clockwise:!t.counterclockwise,r=e.cy,i=t.eles,a=i.nodes().not(`:parent`),o=Kn(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},c=[],l=0,u=0;u0&&Math.abs(_[0].value-y.value)>=h&&(_=[],g.push(_)),_.push(y)}var b=l+t.minNodeSpacing;if(!t.avoidOverlap){var x=g.length>0&&g[0].length>1,S=(Math.min(o.w,o.h)/2-b)/(g.length+x?1:0);b=Math.min(b,S)}for(var C=0,w=0;w1&&t.avoidOverlap){var D=Math.cos(E)-Math.cos(0),O=Math.sin(E)-Math.sin(0),k=Math.sqrt(b*b/(D*D+O*O));C=Math.max(k,C)}T.r=C,C+=b}if(t.equidistant){for(var A=0,j=0,M=0;M=e.numIter||(Ed(r,e),r.temperature*=e.coolingFactor,r.temperature=e.animationThreshold&&a(),dt(u)):(Rd(r,e),s())};u()}else{for(;l;)l=o(c),c++;Rd(r,e),s()}return this},vd.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit(`layoutstop`),this},vd.prototype.destroy=function(){return this.thread&&this.thread.stop(),this};var yd=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),a=Kn(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},s=n.eles.components(),c={},l=0;l0){o.graphSet.push(C);for(var l=0;lr.count?0:r.graph},xd=function(e,t,n,r){var i=r.graphSet[n];if(-10)var c=r.nodeOverlap*s,l=Math.sqrt(i*i+a*a),u=c*i/l,d=c*a/l;else var f=jd(e,i,a),p=jd(t,-1*i,-1*a),m=p.x-f.x,h=p.y-f.y,g=m*m+h*h,l=Math.sqrt(g),c=(e.nodeRepulsion+t.nodeRepulsion)/g,u=c*m/l,d=c*h/l;e.isLocked||(e.offsetX-=u,e.offsetY-=d),t.isLocked||(t.offsetX+=u,t.offsetY+=d)}},Ad=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else var i=t.maxX-e.minX;if(r>0)var a=e.maxY-t.minY;else var a=t.maxY-e.minY;return i>=0&&a>=0?Math.sqrt(i*i+a*a):0},jd=function(e,t,n){var r=e.positionX,i=e.positionY,a=e.height||1,o=e.width||1,s=n/t,c=a/o,l={};return t===0&&0n?(l.x=r,l.y=i+a/2,l):0t&&-1*c<=s&&s<=c?(l.x=r-o/2,l.y=i-o*n/2/t,l):0=c)?(l.x=r+a*t/2/n,l.y=i+a/2,l):0>n&&(s<=-1*c||s>=c)?(l.x=r-a*t/2/n,l.y=i-a/2,l):l},Md=function(e,t){for(var n=0;nn){var h=t.gravity*f/m,g=t.gravity*p/m;d.offsetX+=h,d.offsetY+=g}}}}},Pd=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var a=n[r++],o=e.idToIndex[a],s=e.layoutNodes[o],c=s.children;if(0n)var i={x:n*e/r,y:n*t/r};else var i={x:e,y:t};return i},Ld=function(e,t){var n=e.parentId;if(n!=null){var r=t.layoutNodes[t.idToIndex[n]],i=!1;if((r.maxX==null||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,i=!0),(r.minX==null||e.minX-r.padLeftr.maxY)&&(r.maxY=e.maxY+r.padBottom,i=!0),(r.minY==null||e.minY-r.padToph&&(f+=m+t.componentSpacing,d=0,p=0,m=0)}}},zd={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}};function Bd(e){this.options=X({},zd,e)}Bd.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=r.nodes().not(`:parent`);t.sort&&(i=i.sort(t.sort));var a=Kn(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(a.h===0||a.w===0)r.nodes().layoutPositions(this,t,function(e){return{x:a.x1,y:a.y1}});else{var o=i.size(),s=Math.sqrt(o*a.h/a.w),c=Math.round(s),l=Math.round(a.w/a.h*s),u=function(e){if(e==null)return Math.min(c,l);Math.min(c,l)==c?c=e:l=e},d=function(e){if(e==null)return Math.max(c,l);Math.max(c,l)==c?c=e:l=e},f=t.rows,p=t.cols==null?t.columns:t.cols;if(f!=null&&p!=null)c=f,l=p;else if(f!=null&&p==null)c=f,l=Math.ceil(o/c);else if(f==null&&p!=null)l=p,c=Math.ceil(o/l);else if(l*c>o){var m=u(),h=d();(m-1)*h>=o?u(m-1):(h-1)*m>=o&&d(h-1)}else for(;l*c=o?d(_+1):u(g+1)}var v=a.w/l,y=a.h/c;if(t.condense&&(v=0,y=0),t.avoidOverlap)for(var b=0;b=l&&(j=0,A++)},N={},P=0;P(y=pr(e,t,b[x],b[x+1],b[x+2],b[x+3])))return g(n,y),!0}else if(o.edgeType===`bezier`||o.edgeType===`multibezier`||o.edgeType===`self`||o.edgeType===`compound`){for(var b=o.allpts,x=0;x+5(y=fr(e,t,b[x],b[x+1],b[x+2],b[x+3],b[x+4],b[x+5])))return g(n,y),!0}for(var h=h||r.source,v=v||r.target,S=i.getArrowWidth(c,d),C=[{name:`source`,x:o.arrowStartX,y:o.arrowStartY,angle:o.srcArrowAngle},{name:`target`,x:o.arrowEndX,y:o.arrowEndY,angle:o.tgtArrowAngle},{name:`mid-source`,x:o.midX,y:o.midY,angle:o.midsrcArrowAngle},{name:`mid-target`,x:o.midX,y:o.midY,angle:o.midtgtArrowAngle}],x=0;x0&&(_(h),_(v))}function y(e,t,n){return Xt(e,t,n)}function b(n,r){var i=n._private,a=f,o=r?r+`-`:``;n.boundingBox();var s=i.labelBounds[r||`main`],c=n.pstyle(o+`label`).value;if(!(n.pstyle(`text-events`).strValue!==`yes`||!c)){var l=y(i.rscratch,`labelX`,r),u=y(i.rscratch,`labelY`,r),d=y(i.rscratch,`labelAngle`,r),p=n.pstyle(o+`text-margin-x`).pfValue,m=n.pstyle(o+`text-margin-y`).pfValue,h=s.x1-a-p,_=s.x2+a-p,v=s.y1-a-m,b=s.y2+a-m;if(d){var x=Math.cos(d),S=Math.sin(d),C=function(e,t){return e-=l,t-=u,{x:e*x-t*S+l,y:e*S+t*x+u}},w=C(h,v),T=C(h,b),E=C(_,v),D=C(_,b);if(mr(e,t,[w.x+p,w.y+m,E.x+p,E.y+m,D.x+p,D.y+m,T.x+p,T.y+m]))return g(n),!0}else if(tr(s,e,t))return g(n),!0}}for(var x=o.length-1;x>=0;x--){var S=o[x];S.isNode()?_(S)||b(S):v(S)||b(S)||b(S,`source`)||b(S,`target`)}return s},Qd.getAllInBox=function(e,t,n,r){var i=this.getCachedZSortedEles().interactive,a=2/this.cy.zoom(),o=[],s=Math.min(e,n),c=Math.max(e,n),l=Math.min(t,r),u=Math.max(t,r);e=s,n=c,t=l,r=u;var d=Kn({x1:e,y1:t,x2:n,y2:r}),p=[{x:d.x1,y:d.y1},{x:d.x2,y:d.y1},{x:d.x2,y:d.y2},{x:d.x1,y:d.y2}],m=[[p[0],p[1]],[p[1],p[2]],[p[2],p[3]],[p[3],p[0]]];function h(e,t,n){return Xt(e,t,n)}function g(e,t){var n=e._private,r=a,i=``;e.boundingBox();var o=n.labelBounds.main;if(!o)return null;var s=h(n.rscratch,`labelX`,t),c=h(n.rscratch,`labelY`,t),l=h(n.rscratch,`labelAngle`,t),u=e.pstyle(i+`text-margin-x`).pfValue,d=e.pstyle(i+`text-margin-y`).pfValue,f=o.x1-r-u,p=o.x2+r-u,m=o.y1-r-d,g=o.y2+r-d;if(l){var _=Math.cos(l),v=Math.sin(l),y=function(e,t){return e-=s,t-=c,{x:e*_-t*v+s,y:e*v+t*_+c}};return[y(f,m),y(p,m),y(p,g),y(f,g)]}else return[{x:f,y:m},{x:p,y:m},{x:p,y:g},{x:f,y:g}]}function _(e,t,n,r){function i(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}return i(e,n,r)!==i(t,n,r)&&i(e,t,n)!==i(e,t,r)}for(var v=0;v0?-(Math.PI-e.ang):Math.PI+e.ang},Sf=function(e,t,n,r,i){if(e===yf?xf(rf,nf):bf(t,e,nf),bf(t,n,rf),af=nf.nx*rf.ny-nf.ny*rf.nx,of=nf.nx*rf.nx-nf.ny*-rf.ny,lf=Math.asin(Math.max(-1,Math.min(1,af))),Math.abs(lf)<1e-6){ef=t.x,tf=t.y,df=pf=0;return}sf=1,cf=!1,of<0?lf<0?lf=Math.PI+lf:(lf=Math.PI-lf,sf=-1,cf=!0):lf>0&&(sf=-1,cf=!0),pf=t.radius===void 0?r:t.radius,uf=lf/2,mf=Math.min(nf.len/2,rf.len/2),i?(ff=Math.abs(Math.cos(uf)*pf/Math.sin(uf)),ff>mf?(ff=mf,df=Math.abs(ff*Math.sin(uf)/Math.cos(uf))):df=pf):(ff=Math.min(mf,pf),df=Math.abs(ff*Math.sin(uf)/Math.cos(uf))),_f=t.x+rf.nx*ff,vf=t.y+rf.ny*ff,ef=_f-rf.ny*df*sf,tf=vf+rf.nx*df*sf,hf=t.x+nf.nx*ff,gf=t.y+nf.ny*ff,yf=t};function Cf(e,t){t.radius===0?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function wf(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return r===0||t.radius===0?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(Sf(e,t,n,r,i),{cx:ef,cy:tf,radius:df,startX:hf,startY:gf,stopX:_f,stopY:vf,startAngle:nf.ang+Math.PI/2*sf,endAngle:rf.ang-Math.PI/2*sf,counterClockwise:cf})}var Tf=.01,Ef=Math.sqrt(2*Tf),Df={};Df.findMidptPtsEtc=function(e,t){var n=t.posPts,r=t.intersectionPts,i=t.vectorNormInverse,a,o=e.pstyle(`source-endpoint`),s=e.pstyle(`target-endpoint`),c=o.units!=null&&s.units!=null,l=function(e,t,n,r){var i=r-t,a=n-e,o=Math.sqrt(a*a+i*i);return{x:-i/o,y:a/o}};switch(e.pstyle(`edge-distances`).value){case`node-position`:a=n;break;case`intersection`:a=r;break;case`endpoints`:if(c){var u=f(this.manualEndptToPx(e.source()[0],o),2),d=u[0],p=u[1],m=f(this.manualEndptToPx(e.target()[0],s),2),h=m[0],g=m[1],_={x1:d,y1:p,x2:h,y2:g};i=l(d,p,h,g),a=_}else zt(`Edge ${e.id()} has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).`),a=r;break}return{midptPts:a,vectorNormInverse:i}},Df.findHaystackPoints=function(e){for(var t=0;t0?Math.max(e-t,0):Math.min(e+t,0)},O=D(T,C),k=D(E,w),A=!1;_===l?g=Math.abs(O)>Math.abs(k)?i:r:_===c||_===s?(g=r,A=!0):(_===a||_===o)&&(g=i,A=!0);var j=g===r,M=j?k:O,N=j?E:T,P=Rn(N),F=!1;!(A&&(y||x))&&(_===s&&N<0||_===c&&N>0||_===a&&N>0||_===o&&N<0)&&(P*=-1,M=P*Math.abs(M),F=!0);var I=y?(b<0?1+b:b)*M:(b<0?M:0)+b*P,L=function(e){return Math.abs(e)=Math.abs(M)},R=L(I),z=L(Math.abs(M)-Math.abs(I));if((R||z)&&!F)if(j){var B=Math.abs(N)<=f/2,V=Math.abs(T)<=p/2;if(B){var H=(u.x1+u.x2)/2;n.segpts=[H,u.y1,H,u.y2]}else if(V){var U=(u.y1+u.y2)/2;n.segpts=[u.x1,U,u.x2,U]}else n.segpts=[u.x1,u.y2]}else{var W=Math.abs(N)<=d/2,G=Math.abs(E)<=m/2;if(W){var K=(u.y1+u.y2)/2;n.segpts=[u.x1,K,u.x2,K]}else if(G){var q=(u.x1+u.x2)/2;n.segpts=[q,u.y1,q,u.y2]}else n.segpts=[u.x2,u.y1]}else if(j){var J=u.y1+I+(h?f/2*P:0);n.segpts=[u.x1,J,u.x2,J]}else{var ee=u.x1+I+(h?d/2*P:0);n.segpts=[ee,u.y1,ee,u.y2]}if(n.isRound){var Y=e.pstyle(`taxi-radius`).value,te=e.pstyle(`radius-type`).value[0]===`arc-radius`;n.radii=Array(n.segpts.length/2).fill(Y),n.isArcRadius=Array(n.segpts.length/2).fill(te)}},Df.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if(n.edgeType===`bezier`){var r=t.srcPos,i=t.tgtPos,a=t.srcW,o=t.srcH,s=t.tgtW,c=t.tgtH,l=t.srcShape,u=t.tgtShape,d=t.srcCornerRadius,f=t.tgtCornerRadius,p=t.srcRs,m=t.tgtRs,h=!A(n.startX)||!A(n.startY),g=!A(n.arrowStartX)||!A(n.arrowStartY),_=!A(n.endX)||!A(n.endY),v=!A(n.arrowEndX)||!A(n.arrowEndY),y=3*(this.getArrowWidth(e.pstyle(`width`).pfValue,e.pstyle(`arrow-scale`).value)*this.arrowShapeWidth),b=zn({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),x=bh.poolIndex()){var g=m;m=h,h=g}var _=u.srcPos=m.position(),v=u.tgtPos=h.position(),y=u.srcW=m.outerWidth(),b=u.srcH=m.outerHeight(),S=u.tgtW=h.outerWidth(),C=u.tgtH=h.outerHeight(),w=u.srcShape=n.nodeShapes[t.getNodeShape(m)],T=u.tgtShape=n.nodeShapes[t.getNodeShape(h)],E=u.srcCornerRadius=m.pstyle(`corner-radius`).value===`auto`?`auto`:m.pstyle(`corner-radius`).pfValue,D=u.tgtCornerRadius=h.pstyle(`corner-radius`).value===`auto`?`auto`:h.pstyle(`corner-radius`).pfValue,O=u.tgtRs=h._private.rscratch,k=u.srcRs=m._private.rscratch;u.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var j=0;j=Ef||(G=Math.sqrt(Math.max(W*W,Tf)+Math.max(U*U,Tf)));var K=u.vector={x:W,y:U},q=u.vectorNorm={x:K.x/G,y:K.y/G},J={x:-q.y,y:q.x};u.nodesOverlap=!A(G)||T.checkPoint(L[0],L[1],0,S,C,v.x,v.y,D,O)||w.checkPoint(z[0],z[1],0,y,b,_.x,_.y,E,k),u.vectorNormInverse=J,d={nodesOverlap:u.nodesOverlap,dirCounts:u.dirCounts,calculatedIntersection:!0,hasBezier:u.hasBezier,hasUnbundled:u.hasUnbundled,eles:u.eles,srcPos:v,srcRs:O,tgtPos:_,tgtRs:k,srcW:S,srcH:C,tgtW:y,tgtH:b,srcIntn:B,tgtIntn:R,srcShape:T,tgtShape:w,posPts:{x1:H.x2,y1:H.y2,x2:H.x1,y2:H.y1},intersectionPts:{x1:V.x2,y1:V.y2,x2:V.x1,y2:V.y1},vector:{x:-K.x,y:-K.y},vectorNorm:{x:-q.x,y:-q.y},vectorNormInverse:{x:-J.x,y:-J.y}}}var Y=I?d:u;N.nodesOverlap=Y.nodesOverlap,N.srcIntn=Y.srcIntn,N.tgtIntn=Y.tgtIntn,N.isRound=P.startsWith(`round`),r&&(m.isParent()||m.isChild()||h.isParent()||h.isChild())&&(m.parents().anySame(h)||h.parents().anySame(m)||m.same(h)&&m.isParent())?t.findCompoundLoopPoints(M,Y,j,F):m===h?t.findLoopPoints(M,Y,j,F):P.endsWith(`segments`)?t.findSegmentsPoints(M,Y):P.endsWith(`taxi`)?t.findTaxiPoints(M,Y):P===`straight`||!F&&u.eles.length%2==1&&j===Math.floor(u.eles.length/2)?t.findStraightEdgePoints(M):t.findBezierPoints(M,Y,j,F,I),t.findEndpoints(M),t.tryToCorrectInvalidPoints(M,Y),t.checkForInvalidEdgeWarning(M),t.storeAllpts(M),t.storeEdgeProjections(M),t.calculateArrowAngles(M),t.recalculateEdgeLabelProjections(M),t.calculateLabelAngles(M)}},x=0;x0){var ne=s,re=Bn(ne,An(i)),ie=Bn(ne,An(te)),ae=re;ie2&&Bn(ne,{x:te[2],y:te[3]})0){var _e=c,ve=Bn(_e,An(i)),ye=Bn(_e,An(ge)),be=ve;ye2&&Bn(_e,{x:ge[2],y:ge[3]})=l||v){d={cp:h,segment:_};break}}if(d)break}var y=d.cp,b=d.segment,x=(l-f)/b.length,S=b.t1-b.t0,C=c?b.t0+S*x:b.t1-S*x;C=Gn(0,C,1),t=Un(y.p0,y.p1,y.p2,C),i=Ff(y.p0,y.p1,y.p2,C);break;case`straight`:case`segments`:case`haystack`:for(var w=0,T,E,D,O,k=r.allpts.length,A=0;A+3=l));A+=2);var j=(l-E)/T;j=Gn(0,j,1),t=Wn(D,O,j),i=Pf(D,O);break}o(`labelX`,n,t.x),o(`labelY`,n,t.y),o(`labelAutoAngle`,n,i)}};c(`source`),c(`target`),this.applyLabelDimensions(e)}},Mf.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,`source`),this.applyPrefixedLabelDimensions(e,`target`))},Mf.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),i=Ct(r,e._private.labelDimsKey);if(Xt(n.rscratch,`prefixedLabelDimsKey`,t)!==i){Zt(n.rscratch,`prefixedLabelDimsKey`,t,i);var a=this.calculateLabelDimensions(e,r),o=e.pstyle(`line-height`).pfValue,s=e.pstyle(`font-size`).pfValue,c=e.pstyle(`text-wrap`).strValue,l=Xt(n.rscratch,`labelWrapCachedLines`,t)||[],u=c===`wrap`?Math.max(l.length,1):1,d=s*o,f=a.width,p=a.height+(u-1)*(o-1)*s;Zt(n.rstyle,`labelWidth`,t,f),Zt(n.rscratch,`labelWidth`,t,f),Zt(n.rstyle,`labelHeight`,t,p),Zt(n.rscratch,`labelHeight`,t,p),Zt(n.rscratch,`labelLineHeight`,t,d),Zt(n.rscratch,`labelActualDescent`,t,a.labelActualDescent)}},Mf.getLabelText=function(e,t){var n=e._private,r=t?t+`-`:``,i=e.pstyle(r+`label`).strValue,a=e.pstyle(`text-transform`).value,s=function(e,r){return r?(Zt(n.rscratch,e,t,r),r):Xt(n.rscratch,e,t)};if(!i)return``;a==`none`||(a==`uppercase`?i=i.toUpperCase():a==`lowercase`&&(i=i.toLowerCase()));var c=e.pstyle(`text-wrap`).value;if(c===`wrap`){var l=s(`labelKey`);if(l!=null&&s(`labelWrapKey`)===l)return s(`labelWrapCachedText`);for(var u=`​`,d=i.split(` -`),f=e.pstyle(`text-max-width`).pfValue,p=e.pstyle(`text-overflow-wrap`).value===`anywhere`,m=[],h=/[\s\u200b]+|$/g,g=0;gf){var y=_.matchAll(h),b=``,x=0,S=o(y),C;try{for(S.s();!(C=S.n()).done;){var w=C.value,T=w[0],E=_.substring(x,w.index);x=w.index+T.length;var D=b.length===0?E:b+E+T;this.calculateLabelDimensions(e,D).width<=f?b+=E+T:(b&&m.push(b),b=E+T)}}catch(e){S.e(e)}finally{S.f()}b.match(/^[\s\u200b]+$/)||m.push(b)}else m.push(_)}s(`labelWrapCachedLines`,m),i=s(`labelWrapCachedText`,m.join(` -`)),s(`labelWrapKey`,l)}else if(c===`ellipsis`){var O=e.pstyle(`text-max-width`).pfValue,k=``,A=`…`,j=!1;if(this.calculateLabelDimensions(e,i).widthO);M++)k+=i[M],M===i.length-1&&(j=!0);return j||(k+=A),k}return i},Mf.getLabelJustification=function(e){var t=e.pstyle(`text-justification`).strValue,n=e.pstyle(`text-halign`).strValue;return t===`auto`?e.isNode()?rl(n):`center`:t},Mf.calculateLabelDimensions=function(e,t){var n=this.cy.window().document,r=0,i=e.pstyle(`font-style`).strValue,a=e.pstyle(`font-size`).pfValue,o=e.pstyle(`font-family`).strValue,s=e.pstyle(`font-weight`).strValue,c=e.pstyle(`text-metrics`).strValue||`font`,l=this.labelCalcCanvas,u=this.labelCalcCanvasContext;if(!l){l=this.labelCalcCanvas=n.createElement(`canvas`),u=this.labelCalcCanvasContext=l.getContext(`2d`);var d=l.style;d.position=`absolute`,d.left=`-9999px`,d.top=`-9999px`,d.zIndex=`-1`,d.visibility=`hidden`,d.pointerEvents=`none`}u.font=`${i} ${s} ${a}px ${o}`;for(var f=0,p=0,m=t.split(` -`),h=m.length,g=0,_=0,v=0;v1&&arguments[1]!==void 0?arguments[1]:!0;if(t.merge(e),n)for(var r=0;r=e.desktopTapThreshold2}var E=a(t);b&&(e.hoverData.tapholdCancelled=!0);var D=function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];t.length===0?(t.push(v[0]),t.push(v[1])):(t[0]+=v[0],t[1]+=v[1])};n=!0,i(m,[`mousemove`,`vmousemove`,`tapdrag`],t,{x:l[0],y:l[1]});var O=function(e){return{originalEvent:t,type:e,position:{x:l[0],y:l[1]}}},k=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||r.emit(O(`boxstart`)),f[4]=1,e.hoverData.selecting=!0,e.redrawHint(`select`,!0),e.redraw()};if(e.hoverData.which===3){if(b){var j=O(`cxtdrag`);_?_.emit(j):r.emit(j),e.hoverData.cxtDragged=!0,(!e.hoverData.cxtOver||m!==e.hoverData.cxtOver)&&(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit(O(`cxtdragout`)),e.hoverData.cxtOver=m,m&&m.emit(O(`cxtdragover`)))}}else if(e.hoverData.dragging){if(n=!0,r.panningEnabled()&&r.userPanningEnabled()){var M;if(e.hoverData.justStartedPan){var N=e.hoverData.mdownPos;M={x:(l[0]-N[0])*s,y:(l[1]-N[1])*s},e.hoverData.justStartedPan=!1}else M={x:v[0]*s,y:v[1]*s};r.panBy(M),r.emit(O(`dragpan`)),e.hoverData.dragged=!0}l=e.projectIntoViewport(t.clientX,t.clientY)}else if(f[4]==1&&(_==null||_.pannable()))b&&(!e.hoverData.dragging&&r.boxSelectionEnabled()&&(E||!r.panningEnabled()||!r.userPanningEnabled())?k():!e.hoverData.selecting&&r.panningEnabled()&&r.userPanningEnabled()&&o(_,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,f[4]=0,e.data.bgActivePosistion=An(u),e.redrawHint(`select`,!0),e.redraw()),_&&_.pannable()&&_.active()&&_.unactivate());else{if(_&&_.pannable()&&_.active()&&_.unactivate(),(!_||!_.grabbed())&&m!=g&&(g&&i(g,[`mouseout`,`tapdragout`],t,{x:l[0],y:l[1]}),m&&i(m,[`mouseover`,`tapdragover`],t,{x:l[0],y:l[1]}),e.hoverData.last=m),_)if(b){if(r.boxSelectionEnabled()&&E)_&&_.grabbed()&&(h(y),_.emit(O(`freeon`)),y.emit(O(`free`)),e.dragData.didDrag&&(_.emit(O(`dragfreeon`)),y.emit(O(`dragfree`)))),k();else if(_&&_.grabbed()&&e.nodeIsDraggable(_)){var P=!e.dragData.didDrag;P&&e.redrawHint(`eles`,!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||p(y,{inDragLayer:!0});var F={x:0,y:0};if(A(v[0])&&A(v[1])&&(F.x+=v[0],F.y+=v[1],P)){var I=e.hoverData.dragDelta;I&&A(I[0])&&A(I[1])&&(F.x+=I[0],F.y+=I[1])}e.hoverData.draggingEles=!0,y.silentShift(F).emit(O(`position`)).emit(O(`drag`)),e.redrawHint(`drag`,!0),e.redraw()}}else D();n=!0}if(f[2]=l[0],f[3]=l[1],n)return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1}},!1);var E,D,O;e.registerBinding(t,`mouseup`,function(t){if(!(e.hoverData.which===1&&t.which!==1&&e.hoverData.capture)&&e.hoverData.capture){e.hoverData.capture=!1;var r=e.cy,o=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,c=e.findNearestElement(o[0],o[1],!0,!1),l=e.dragData.possibleDragElements,u=e.hoverData.down,d=a(t);e.data.bgActivePosistion&&(e.redrawHint(`select`,!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,u&&u.unactivate();var f=function(e){return{originalEvent:t,type:e,position:{x:o[0],y:o[1]}}};if(e.hoverData.which===3){var p=f(`cxttapend`);if(u?u.emit(p):r.emit(p),!e.hoverData.cxtDragged){var m=f(`cxttap`);u?u.emit(m):r.emit(m)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(e.hoverData.which===1){if(i(c,[`mouseup`,`tapend`,`vmouseup`],t,{x:o[0],y:o[1]}),!e.dragData.didDrag&&!e.hoverData.dragged&&!e.hoverData.selecting&&!e.hoverData.isOverThresholdDrag&&(i(u,[`click`,`tap`,`vclick`],t,{x:o[0],y:o[1]}),D=!1,t.timeStamp-O<=r.multiClickDebounceTime()?(E&&clearTimeout(E),D=!0,O=null,i(u,[`dblclick`,`dbltap`,`vdblclick`],t,{x:o[0],y:o[1]})):(E=setTimeout(function(){D||i(u,[`oneclick`,`onetap`,`voneclick`],t,{x:o[0],y:o[1]})},r.multiClickDebounceTime()),O=t.timeStamp)),u==null&&!e.dragData.didDrag&&!e.hoverData.selecting&&!e.hoverData.dragged&&!a(t)&&(r.$(n).unselect([`tapunselect`]),l.length>0&&e.redrawHint(`eles`,!0),e.dragData.possibleDragElements=l=r.collection()),c==u&&!e.dragData.didDrag&&!e.hoverData.selecting&&c!=null&&c._private.selectable&&(e.hoverData.dragging||(r.selectionType()===`additive`||d?c.selected()?c.unselect([`tapunselect`]):c.select([`tapselect`]):d||(r.$(n).unmerge(c).unselect([`tapunselect`]),c.select([`tapselect`]))),e.redrawHint(`eles`,!0)),e.hoverData.selecting){var g=r.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint(`select`,!0),g.length>0&&e.redrawHint(`eles`,!0),r.emit(f(`boxend`)),r.selectionType()===`additive`||d||r.$(n).unmerge(g).unselect(),g.emit(f(`box`)).stdFilter(function(e){return e.selectable()&&!e.selected()}).select().emit(f(`boxselect`)),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint(`select`,!0),e.redrawHint(`eles`,!0),e.redraw()),!s[4]){e.redrawHint(`drag`,!0),e.redrawHint(`eles`,!0);var _=u&&u.grabbed();h(l),_&&(u.emit(f(`freeon`)),l.emit(f(`free`)),e.dragData.didDrag&&(u.emit(f(`dragfreeon`)),l.emit(f(`dragfree`))))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}},!1);var k=[],j=4,M,N=1e5,P=function(e,t){for(var n=0;n=j){var i=k;if(M=P(i,5),!M){var a=Math.abs(i[0]);M=F(i)&&a>5}if(M)for(var o=0;o5&&(r=Rn(r)*5),f=r/-250,M&&(f/=N,f*=3),f*=e.wheelSensitivity,t.deltaMode===1&&(f*=33);var p=s.zoom()*10**f;t.type===`gesturechange`&&(p=e.gestureStartZoom*t.scale),s.zoom({level:p,renderedPosition:{x:d[0],y:d[1]}}),s.emit({type:t.type===`gesturechange`?`pinchzoom`:`scrollzoom`,originalEvent:t,position:{x:u[0],y:u[1]}})}}}};e.registerBinding(e.container,`wheel`,I,!0),e.registerBinding(t,`scroll`,function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout(function(){e.scrollingPage=!1},250)},!0),e.registerBinding(e.container,`gesturestart`,function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()},!0),e.registerBinding(e.container,`gesturechange`,function(t){e.hasTouchStarted||I(t)},!0),e.registerBinding(e.container,`mouseout`,function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:`mouseout`,position:{x:n[0],y:n[1]}})},!1),e.registerBinding(e.container,`mouseover`,function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:`mouseover`,position:{x:n[0],y:n[1]}})},!1);var L,R,z,B,V,H,U,W,G,K,q,J,ee,Y=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},te=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)},ne;e.registerBinding(e.container,`touchstart`,ne=function(t){if(e.hasTouchStarted=!0,w(t)){_(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,r=e.touchData.now,a=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);r[0]=o[0],r[1]=o[1]}if(t.touches[1]){var o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);r[2]=o[0],r[3]=o[1]}if(t.touches[2]){var o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);r[4]=o[0],r[5]=o[1]}var s=function(e){return{originalEvent:t,type:e,position:{x:r[0],y:r[1]}}};if(t.touches[1]){e.touchData.singleTouchMoved=!0,h(e.dragData.touchDragEles);var c=e.findContainerClientCoords();G=c[0],K=c[1],q=c[2],J=c[3],L=t.touches[0].clientX-G,R=t.touches[0].clientY-K,z=t.touches[1].clientX-G,B=t.touches[1].clientY-K,ee=0<=L&&L<=q&&0<=z&&z<=q&&0<=R&&R<=J&&0<=B&&B<=J;var u=n.pan(),d=n.zoom();V=Y(L,R,z,B),H=te(L,R,z,B),U=[(L+z)/2,(R+B)/2],W=[(U[0]-u.x)/d,(U[1]-u.y)/d];var f=200,g=f*f;if(H=1){for(var T=e.touchData.startPosition=[null,null,null,null,null,null],E=0;E=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var x=t.touches[0].clientX-G,S=t.touches[0].clientY-K,C=t.touches[1].clientX-G,T=t.touches[1].clientY-K,E=te(x,S,C,T),D=E/H,O=150,k=O*O,j=1.5;if(D>=j*j||E>=k){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0);var M=d(`cxttapend`);e.touchData.start?(e.touchData.start.unactivate().emit(M),e.touchData.start=null):a.emit(M)}}if(n&&e.touchData.cxt){var M=d(`cxtdrag`);e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0),e.touchData.start?e.touchData.start.emit(M):a.emit(M),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var N=e.findNearestElement(s[0],s[1],!0,!0);(!e.touchData.cxtOver||N!==e.touchData.cxtOver)&&(e.touchData.cxtOver&&e.touchData.cxtOver.emit(d(`cxtdragout`)),e.touchData.cxtOver=N,N&&N.emit(d(`cxtdragover`)))}else if(n&&t.touches[2]&&a.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||a.emit(d(`boxstart`)),e.touchData.selecting=!0,e.touchData.didSelect=!0,r[4]=1,!r||r.length===0||r[0]===void 0?(r[0]=(s[0]+s[2]+s[4])/3,r[1]=(s[1]+s[3]+s[5])/3,r[2]=(s[0]+s[2]+s[4])/3+1,r[3]=(s[1]+s[3]+s[5])/3+1):(r[2]=(s[0]+s[2]+s[4])/3,r[3]=(s[1]+s[3]+s[5])/3),e.redrawHint(`select`,!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&a.zoomingEnabled()&&a.panningEnabled()&&a.userZoomingEnabled()&&a.userPanningEnabled()){t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0);var P=e.dragData.touchDragEles;if(P){e.redrawHint(`drag`,!0);for(var F=0;F0&&!e.hoverData.draggingEles&&!e.swipePanning&&e.data.bgActivePosistion!=null&&(e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0),e.redraw())}},!1);var ie;e.registerBinding(t,`touchcancel`,ie=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()});var ae,oe,se,ce;if(e.registerBinding(t,`touchend`,ae=function(t){var r=e.touchData.start;if(e.touchData.capture)t.touches.length===0&&(e.touchData.capture=!1),t.preventDefault();else return;var a=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o=e.cy,s=o.zoom(),c=e.touchData.now,l=e.touchData.earlier;if(t.touches[0]){var u=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);c[0]=u[0],c[1]=u[1]}if(t.touches[1]){var u=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);c[2]=u[0],c[3]=u[1]}if(t.touches[2]){var u=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);c[4]=u[0],c[5]=u[1]}var d=function(e){return{originalEvent:t,type:e,position:{x:c[0],y:c[1]}}};r&&r.unactivate();var f;if(e.touchData.cxt){if(f=d(`cxttapend`),r?r.emit(f):o.emit(f),!e.touchData.cxtDragged){var p=d(`cxttap`);r?r.emit(p):o.emit(p)}e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,e.redraw();return}if(!t.touches[2]&&o.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var m=o.collection(e.getAllInBox(a[0],a[1],a[2],a[3]));a[0]=void 0,a[1]=void 0,a[2]=void 0,a[3]=void 0,a[4]=0,e.redrawHint(`select`,!0),o.emit(d(`boxend`)),m.emit(d(`box`)).stdFilter(function(e){return e.selectable()&&!e.selected()}).select().emit(d(`boxselect`)),m.nonempty()&&e.redrawHint(`eles`,!0),e.redraw()}if(r?.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0);else if(!t.touches[1]&&!t.touches[0]&&!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0);var g=e.dragData.touchDragEles;if(r!=null){var _=r._private.grabbed;h(g),e.redrawHint(`drag`,!0),e.redrawHint(`eles`,!0),_&&(r.emit(d(`freeon`)),g.emit(d(`free`)),e.dragData.didDrag&&(r.emit(d(`dragfreeon`)),g.emit(d(`dragfree`)))),i(r,[`touchend`,`tapend`,`vmouseup`,`tapdragout`],t,{x:c[0],y:c[1]}),r.unactivate(),e.touchData.start=null}else i(e.findNearestElement(c[0],c[1],!0,!0),[`touchend`,`tapend`,`vmouseup`,`tapdragout`],t,{x:c[0],y:c[1]});var v=e.touchData.startPosition[0]-c[0],y=v*v,b=e.touchData.startPosition[1]-c[1],x=(y+b*b)*s*s;e.touchData.singleTouchMoved||(r||o.$(`:selected`).unselect([`tapunselect`]),i(r,[`tap`,`vclick`],t,{x:c[0],y:c[1]}),oe=!1,t.timeStamp-ce<=o.multiClickDebounceTime()?(se&&clearTimeout(se),oe=!0,ce=null,i(r,[`dbltap`,`vdblclick`],t,{x:c[0],y:c[1]})):(se=setTimeout(function(){oe||i(r,[`onetap`,`voneclick`],t,{x:c[0],y:c[1]})},o.multiClickDebounceTime()),ce=t.timeStamp)),r!=null&&!e.dragData.didDrag&&r._private.selectable&&x`u`){var X=[],le=function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},ue=function(e){return{event:e,touch:le(e)}},de=function(e){X.push(ue(e))},fe=function(e){for(var t=0;t0)return l[0]}return null},p=Object.keys(d),m=0;m0?d:sr(i,a,e,t,n,r,o,s)},checkPoint:function(e,t,n,r,i,a,o,s){s=s===`auto`?jr(r,i):s;var c=2*s;if(hr(e,t,this.points,a,o,r,i-c,[0,-1],n)||hr(e,t,this.points,a,o,r-c,i,[0,-1],n))return!0;var l=r/2+2*n,u=i/2+2*n;return!!(mr(e,t,[a-l,o-u,a-l,o,a+l,o,a+l,o-u])||br(e,t,c,c,a+r/2-s,o+i/2-s,n)||br(e,t,c,c,a-r/2+s,o+i/2-s,n))}}},qf.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon(`triangle`,Or(3,0)),this.generateRoundPolygon(`round-triangle`,Or(3,0)),this.generatePolygon(`rectangle`,Or(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon(`diamond`,n),this.generateRoundPolygon(`round-diamond`,n),this.generatePolygon(`pentagon`,Or(5,0)),this.generateRoundPolygon(`round-pentagon`,Or(5,0)),this.generatePolygon(`hexagon`,Or(6,0)),this.generateRoundPolygon(`round-hexagon`,Or(6,0)),this.generatePolygon(`heptagon`,Or(7,0)),this.generateRoundPolygon(`round-heptagon`,Or(7,0)),this.generatePolygon(`octagon`,Or(8,0)),this.generateRoundPolygon(`round-octagon`,Or(8,0));var r=Array(20),i=Ar(5,0),a=Ar(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s=e.deqFastCost*h)break}else if(i){if(p>=e.deqCost*c||p>=e.deqAvgCost*s)break}else if(m>=e.deqNoDrawCost*Qf)break;var g=e.deq(t,d,u);if(g.length>0)for(var _=0;_0&&(e.onDeqd(t,l),!i&&e.shouldRedraw(t,l,d,u)&&r())},a=e.priority||It;n.beforeRender(i,a(t))}}}},ep=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pt;r(this,e),this.idsByKey=new Qt,this.keyForId=new Qt,this.cachesByLvl=new Qt,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n}return a(e,[{key:`getIdsFor`,value:function(e){e??Lt(`Can not get id list for null key`);var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new tn,t.set(e,n)),n}},{key:`addIdForKey`,value:function(e,t){e!=null&&this.getIdsFor(e).add(t)}},{key:`deleteIdForKey`,value:function(e,t){e!=null&&this.getIdsFor(e).delete(t)}},{key:`getNumberOfIdsForKey`,value:function(e){return e==null?0:this.getIdsFor(e).size}},{key:`updateKeyMappingFor`,value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:`deleteKeyMappingFor`,value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:`keyHasChangedFor`,value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:`isInvalid`,value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:`getCachesAt`,value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new Qt,t.set(e,r),n.push(e)),r}},{key:`getCache`,value:function(e,t){return this.getCachesAt(t).get(e)}},{key:`get`,value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return r!=null&&this.updateKeyMappingFor(e),r}},{key:`getForCachedKey`,value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:`hasCache`,value:function(e,t){return this.getCachesAt(t).has(e)}},{key:`has`,value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:`setCache`,value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:`set`,value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:`deleteCache`,value:function(e,t){this.getCachesAt(t).delete(e)}},{key:`delete`,value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:`invalidateKey`,value:function(e){var t=this;this.lvls.forEach(function(n){return t.deleteCache(e,n)})}},{key:`invalidate`,value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||this.getNumberOfIdsForKey(n)===0}}])}(),tp=25,np=50,rp=-4,ip=3,ap=7.99,op=8,sp=1024,cp=1024,lp=1024,up=.2,dp=.8,fp=10,pp=.15,mp=.1,hp=.9,gp=.9,_p=100,vp=1,yp={dequeue:`dequeue`,downscale:`downscale`,highQuality:`highQuality`},bp=Kt({getKey:null,doesEleInvalidateKey:Pt,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:Nt,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),xp=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=bp(t);X(n,r),n.lookup=new ep(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},Sp=xp.prototype;Sp.reasons=yp,Sp.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},Sp.getRetiredTextureQueue=function(e){var t=this,n=t.eleImgCaches.retired=t.eleImgCaches.retired||{};return n[e]=n[e]||[]},Sp.getElementQueue=function(){var e=this;return e.eleCacheQueue=e.eleCacheQueue||new pn(function(e,t){return t.reqs-e.reqs})},Sp.getElementKeyToQueue=function(){var e=this;return e.eleKeyToCacheQueue=e.eleKeyToCacheQueue||{}},Sp.getElement=function(e,t,n,r,i){var a=this,o=this.renderer,s=o.cy.zoom(),c=this.lookup;if(!t||t.w===0||t.h===0||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed()||!a.allowEdgeTxrCaching&&e.isEdge()||!a.allowParentTxrCaching&&e.isParent())return null;if(r??=Math.ceil(Ln(s*n)),r=ap||r>ip)return null;var l=2**r,u=t.h*l,d=t.w*l,f=o.eleTextBiggerThanMin(e,l);if(!this.isVisible(e,f))return null;var p=c.get(e,r);if(p&&p.invalidated&&(p.invalidated=!1,p.texture.invalidatedWidth-=p.width),p)return p;var m=u<=tp?tp:u<=np?np:Math.ceil(u/np)*np;if(u>lp||d>cp)return null;var h=a.getTextureQueue(m),g=h[h.length-2],_=function(){return a.recycleTexture(m,d)||a.addTexture(m,d)};g||=h[h.length-1],g||=_(),g.width-g.usedWidthr;D--)T=a.getElement(e,t,n,D,yp.downscale);E()}else return a.queueElement(e,S.level-1),S;else{var O;if(!y&&!b&&!x)for(var k=r-1;k>=rp;k--){var A=c.get(e,k);if(A){O=A;break}}if(v(O))return a.queueElement(e,r),O;g.context.translate(g.usedWidth,0),g.context.scale(l,l),this.drawElement(g.context,e,t,f,!1),g.context.scale(1/l,1/l),g.context.translate(-g.usedWidth,0)}return p={x:g.usedWidth,texture:g,level:r,scale:l,width:d,height:u,scaledLabelShown:f},g.usedWidth+=Math.ceil(d+op),g.eleCaches.push(p),c.set(e,r,p),a.checkTextureFullness(g),p},Sp.invalidateElements=function(e){for(var t=0;t=up*e.width&&this.retireTexture(e)},Sp.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>dp&&e.fullnessChecks>=fp?qt(t,e):e.fullnessChecks++},Sp.retireTexture=function(e){var t=this,n=e.height,r=t.getTextureQueue(n),i=this.lookup;qt(r,e),e.retired=!0;for(var a=e.eleCaches,o=0;o=t)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,Jt(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),qt(i,o),r.push(o),o}},Sp.queueElement=function(e,t){var n=this,r=n.getElementQueue(),i=n.getElementKeyToQueue(),a=this.getKey(e),o=i[a];if(o)o.level=Math.max(o.level,t),o.eles.merge(e),o.reqs++,r.updateItem(o);else{var s={eles:e.spawn().merge(e),level:t,reqs:1,key:a};r.push(s),i[a]=s}},Sp.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=[],a=t.lookup,o=0;o0;o++){var s=n.pop(),c=s.key,l=s.eles[0],u=a.hasCache(l,s.level);if(r[c]=null,!u){i.push(s);var d=t.getBoundingBox(l);t.getElement(l,d,e,s.level,yp.dequeue)}}return i},Sp.removeFromQueue=function(e){var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=this.getKey(e),a=r[i];a!=null&&(a.eles.length===1?(a.reqs=Mt,n.updateItem(a),n.pop(),r[i]=null):a.eles.unmerge(e))},Sp.onDequeue=function(e){this.onDequeues.push(e)},Sp.offDequeue=function(e){qt(this.onDequeues,e)},Sp.setupDequeueing=$f.setupDequeueing({deqRedrawThreshold:_p,deqCost:pp,deqAvgCost:mp,deqNoDrawCost:hp,deqFastCost:gp,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n=Ep||n>Tp)return null}r.validateLayersElesOrdering(n,e);var o=r.layersByLevel,s=2**n,c=o[n]=o[n]||[],l,u=r.levelIsComplete(n,e),d,f=function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return d=o[t],!0},i=function(e){if(!d)for(var r=n+e;wp<=r&&r<=Tp&&!t(r);r+=e);};i(1),i(-1);for(var a=c.length-1;a>=0;a--){var s=c[a];s.invalid&&qt(c,s)}};if(!u)f();else return c;var p=function(){if(!l){l=Kn();for(var t=0;tIp||a>Ip||i*a>Fp)return null;var o=r.makeLayer(l,n);if(t!=null){var u=c.indexOf(t)+1;c.splice(u,0,o)}else(e.insert===void 0||e.insert)&&c.unshift(o);return o};if(r.skipping&&!a)return null;for(var h=null,g=e.length/Cp,_=!a,v=0;v=g||!rr(h.bb,y.boundingBox()))&&(h=m({insert:!0,after:h}),!h))return null;d||_?r.queueLayer(h,y):r.drawEleInLayer(h,y,n,t),h.eles.push(y),x[n]=h}return d||(_?null:c)},zp.getEleLevelForLayerLevel=function(e,t){return e},zp.drawEleInLayer=function(e,t,n,r){var i=this,a=this.renderer,o=e.context,s=t.boundingBox();s.w===0||s.h===0||!t.visible()||(n=i.getEleLevelForLayerLevel(n,r),a.setImgSmoothing(o,!1),a.drawCachedElement(o,t,null,null,n,Lp),a.setImgSmoothing(o,!0))},zp.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||n.length===0)return!1;for(var r=0,i=0;i0||a.invalid)return!1;r+=a.eles.length}return r===t.length},zp.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r0){t=!0;break}}return t},zp.invalidateElements=function(e){var t=this;e.length!==0&&(t.lastInvalidationTime=ft(),!(e.length===0||!t.haveLayers())&&t.updateElementsInLayers(e,function(e,n,r){t.invalidateLayer(e)}))},zp.invalidateLayer=function(e){if(this.lastInvalidationTime=ft(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];qt(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s=t._private.rscratch;if(!(a&&!t.visible())&&!(s.badLine||s.allpts==null||isNaN(s.allpts[0]))){var c;n&&(c=n,e.translate(-c.x1,-c.y1));var l=a?t.pstyle(`opacity`).value:1,u=a?t.pstyle(`line-opacity`).value:1,d=t.pstyle(`curve-style`).value,f=t.pstyle(`line-style`).value,p=t.pstyle(`width`).pfValue,m=t.pstyle(`line-cap`).value,h=t.pstyle(`line-outline-width`).value,g=t.pstyle(`line-outline-color`).value,_=l*u,v=l*u,y=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_;d===`straight-triangle`?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=p,e.lineCap=m,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,f),e.lineCap=`butt`)},b=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_;if(e.lineWidth=p+h,e.lineCap=m,h>0)o.colorStrokeStyle(e,g[0],g[1],g[2],n);else{e.lineCap=`butt`;return}d===`straight-triangle`?o.drawEdgeTrianglePath(t,e,s.allpts):(o.drawEdgePath(t,e,s.allpts,f),e.lineCap=`butt`)},x=function(){i&&o.drawEdgeOverlay(e,t)},S=function(){i&&o.drawEdgeUnderlay(e,t)},C=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v;o.drawArrowheads(e,t,n)},w=function(){o.drawElementText(e,t,null,r)};if(e.lineJoin=`round`,t.pstyle(`ghost`).value===`yes`){var T=t.pstyle(`ghost-offset-x`).pfValue,E=t.pstyle(`ghost-offset-y`).pfValue,D=_*t.pstyle(`ghost-opacity`).value;e.translate(T,E),y(D),C(D),e.translate(-T,-E)}else b();S(),y(),C(),x(),w(),n&&e.translate(c.x1,c.y1)}};var rm=function(e){if(![`overlay`,`underlay`].includes(e))throw Error(`Invalid state`);return function(t,n){if(n.visible()){var r=n.pstyle(`${e}-opacity`).value;if(r!==0){var i=this,a=i.usePaths(),o=n._private.rscratch,s=2*n.pstyle(`${e}-padding`).pfValue,c=n.pstyle(`${e}-color`).value;t.lineWidth=s,o.edgeType===`self`&&!a?t.lineCap=`butt`:t.lineCap=`round`,i.colorStrokeStyle(t,c[0],c[1],c[2],r),i.drawEdgePath(n,t,o.allpts,`solid`)}}}};nm.drawEdgeOverlay=rm(`overlay`),nm.drawEdgeUnderlay=rm(`underlay`),nm.drawEdgePath=function(e,t,n,r){var i=e._private.rscratch,a=t,s,c=!1,l=this.usePaths(),u=e.pstyle(`line-dash-pattern`).pfValue,d=e.pstyle(`line-dash-offset`).pfValue;if(l){var f=n.join(`$`);i.pathCacheKey&&i.pathCacheKey===f?(s=t=i.pathCache,c=!0):(s=t=new Path2D,i.pathCacheKey=f,i.pathCache=s)}if(a.setLineDash)switch(r){case`dotted`:a.setLineDash([1,1]);break;case`dashed`:a.setLineDash(u),a.lineDashOffset=d;break;case`solid`:a.setLineDash([]);break}if(!c&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case`bezier`:case`self`:case`compound`:case`multibezier`:for(var p=2;p+35&&arguments[5]!==void 0?arguments[5]:!0,o=this;if(r==null){if(a&&!o.eleTextBiggerThanMin(t))return}else if(r===!1)return;if(t.isNode()){var s=t.pstyle(`label`);if(!s||!s.value)return;var c=o.getLabelJustification(t),l=t.pstyle(`text-metrics`).strValue===`glyph`;e.textAlign=c,e.textBaseline=l?`alphabetic`:`bottom`}else{var u=t.element()._private.rscratch.badLine,d=t.pstyle(`label`),f=t.pstyle(`source-label`),p=t.pstyle(`target-label`);if(u||(!d||!d.value)&&(!f||!f.value)&&(!p||!p.value))return;e.textAlign=`center`,e.textBaseline=`bottom`}var m=!n,h;n&&(h=n,e.translate(-h.x1,-h.y1)),i==null?(o.drawText(e,t,null,m,a),t.isEdge()&&(o.drawText(e,t,`source`,m,a),o.drawText(e,t,`target`,m,a))):o.drawText(e,t,i,m,a),n&&e.translate(h.x1,h.y1)},am.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:!0,r=t.pstyle(`font-style`).strValue,i=t.pstyle(`font-size`).pfValue+`px`,a=t.pstyle(`font-family`).strValue,o=t.pstyle(`font-weight`).strValue,s=n?t.effectiveOpacity()*t.pstyle(`text-opacity`).value:1,c=t.pstyle(`text-outline-opacity`).value*s,l=t.pstyle(`color`).value,u=t.pstyle(`text-outline-color`).value;e.font=r+` `+o+` `+i+` `+a,e.lineJoin=`round`,this.colorFillStyle(e,l[0],l[1],l[2],s),this.colorStrokeStyle(e,u[0],u[1],u[2],c)};function om(e,t,n,r,i){var a=Math.min(r,i)/2,o=t+r/2,s=n+i/2;e.beginPath(),e.arc(o,s,a,0,Math.PI*2),e.closePath()}function sm(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,o=Math.min(a,r/2,i/2);e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath()}am.getTextAngle=function(e,t){var n,r=e._private.rscratch,i=t?t+`-`:``,a=e.pstyle(i+`text-rotation`);if(a.strValue===`autorotate`){var o=Xt(r,`labelAngle`,t);n=e.isEdge()?o:0}else n=a.strValue===`none`?0:a.pfValue;return n},am.drawText=function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=t._private.rscratch,o=i?t.effectiveOpacity():1;if(!(i&&(o===0||t.pstyle(`text-opacity`).value===0))){n===`main`&&(n=null);var s=Xt(a,`labelX`,n),c=Xt(a,`labelY`,n),l,u,d=this.getLabelText(t,n);if(d!=null&&d!==``&&!isNaN(s)&&!isNaN(c)){this.setupTextStyle(e,t,i);var f=n?n+`-`:``,p=Xt(a,`labelWidth`,n),m=Xt(a,`labelHeight`,n),h=Xt(a,`labelActualDescent`,n),g=t.pstyle(f+`text-margin-x`).pfValue,_=t.pstyle(f+`text-margin-y`).pfValue,v=t.isEdge(),y=t.pstyle(`text-halign`).value,b=t.pstyle(`text-valign`).value;v&&(y=`center`,b=`center`),s+=g,c+=_;var x=r?this.getTextAngle(t,n):0;x!==0&&(l=s,u=c,e.translate(l,u),e.rotate(x),s=0,c=0);var S=tl(y),C=nl(b);switch(C){case`top`:break;case`center`:c+=m/2;break;case`bottom`:c+=m;break}var w=t.pstyle(`text-background-opacity`).value,T=t.pstyle(`text-border-opacity`).value,E=t.pstyle(`text-border-width`).pfValue,D=t.pstyle(`text-background-padding`).pfValue,O=t.pstyle(`text-background-shape`).strValue,k=O===`round-rectangle`||O===`roundrectangle`,A=O===`circle`,j=2;if(w>0||E>0&&T>0){var M=e.fillStyle,N=e.strokeStyle,P=e.lineWidth,F=t.pstyle(`text-background-color`).value,I=t.pstyle(`text-border-color`).value,L=t.pstyle(`text-border-style`).value,R=w>0,z=E>0&&T>0,B=s-D;switch(S){case`left`:B-=p;break;case`center`:B-=p/2;break}var V=c-m-D,H=p+2*D,U=m+2*D;if(R&&(e.fillStyle=`rgba(${F[0]},${F[1]},${F[2]},${w*o})`),z&&(e.strokeStyle=`rgba(${I[0]},${I[1]},${I[2]},${T*o})`,e.lineWidth=E,e.setLineDash))switch(L){case`dotted`:e.setLineDash([1,1]);break;case`dashed`:e.setLineDash([4,2]);break;case`double`:e.lineWidth=E/4,e.setLineDash([]);break;default:e.setLineDash([]);break}if(k?(e.beginPath(),sm(e,B,V,H,U,j)):A?(e.beginPath(),om(e,B,V,H,U)):(e.beginPath(),e.rect(B,V,H,U)),R&&e.fill(),z&&e.stroke(),z&&L===`double`){var W=E/2;e.beginPath(),k?sm(e,B+W,V+W,H-2*W,U-2*W,j):e.rect(B+W,V+W,H-2*W,U-2*W),e.stroke()}e.fillStyle=M,e.strokeStyle=N,e.lineWidth=P,e.setLineDash&&e.setLineDash([])}var G=2*t.pstyle(`text-outline-width`).pfValue;if(G>0&&(e.lineWidth=G),c-=h,t.pstyle(`text-wrap`).value===`wrap`){var K=Xt(a,`labelWrapCachedLines`,n),q=Xt(a,`labelLineHeight`,n),J=p/2,ee=this.getLabelJustification(t);switch(ee===`auto`||(S===`left`?ee===`left`?s+=-p:ee===`center`&&(s+=-J):S===`center`?ee===`left`?s+=-J:ee===`right`&&(s+=J):S===`right`&&(ee===`center`?s+=J:ee===`right`&&(s+=p))),C){case`top`:c-=(K.length-1)*q;break;case`center`:case`bottom`:c-=(K.length-1)*q;break}for(var Y=0;Y0&&e.strokeText(K[Y],s,c),e.fillText(K[Y],s,c),c+=q}else G>0&&e.strokeText(d,s,c),e.fillText(d,s,c);x!==0&&(e.rotate(-x),e.translate(-l,-u))}}};var cm={};cm.drawNode=function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s,c,l=t._private,u=l.rscratch,d=t.position();if(!(!A(d.x)||!A(d.y))&&!(a&&!t.visible())){var f=a?t.effectiveOpacity():1,p=o.usePaths(),m,h=!1,g=t.padding();s=t.width()+2*g,c=t.height()+2*g;var _;n&&(_=n,e.translate(-_.x1,-_.y1));for(var v=t.pstyle(`background-image`).value,y=Array(v.length),b=Array(v.length),x=0,S=0;S0&&arguments[0]!==void 0?arguments[0]:D;o.eleFillStyle(e,t,n)},W=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:I;o.colorStrokeStyle(e,O[0],O[1],O[2],t)},G=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:B;o.colorStrokeStyle(e,R[0],R[1],R[2],t)},K=function(e,t,n,r){var i=o.nodePathCache=o.nodePathCache||[],a=wt(n===`polygon`?n+`,`+r.join(`,`):n,``+t,``+e,``+H),s=i[a],c,l=!1;return s==null?(c=new Path2D,i[a]=u.pathCache=c):(c=s,l=!0,u.pathCache=c),{path:c,cacheHit:l}},q=t.pstyle(`shape`).strValue,J=t.pstyle(`shape-polygon-points`).pfValue;if(p){e.translate(d.x,d.y);var ee=K(s,c,q,J);m=ee.path,h=ee.cacheHit}var Y=function(){if(!h){var n=d;p&&(n={x:0,y:0}),o.nodeShapes[o.getNodeShape(t)].draw(m||e,n.x,n.y,s,c,H,u)}p?e.fill(m):e.fill()},te=function(){for(var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=l.backgrounding,a=0,s=0;s0&&arguments[0]!==void 0&&arguments[0],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f;o.hasPie(t)&&(o.drawPie(e,t,r),n&&(p||o.nodeShapes[o.getNodeShape(t)].draw(e,d.x,d.y,s,c,H,u)))},re=function(){var n=arguments.length>0&&arguments[0]!==void 0&&arguments[0],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f;o.hasStripe(t)&&(e.save(),p?e.clip(u.pathCache):(o.nodeShapes[o.getNodeShape(t)].draw(e,d.x,d.y,s,c,H,u),e.clip()),o.drawStripe(e,t,r),e.restore(),n&&(p||o.nodeShapes[o.getNodeShape(t)].draw(e,d.x,d.y,s,c,H,u)))},ie=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f,n=(T>0?T:-T)*t,r=T>0?0:255;T!==0&&(o.colorFillStyle(e,r,r,r,n),p?e.fill(m):e.fill())},ae=function(){if(E>0){if(e.lineWidth=E,e.lineCap=M,e.lineJoin=j,e.setLineDash)switch(k){case`dotted`:e.setLineDash([1,1]);break;case`dashed`:e.setLineDash(P),e.lineDashOffset=F;break;case`solid`:case`double`:e.setLineDash([]);break}if(N!==`center`){if(e.save(),e.lineWidth*=2,N===`inside`)p?e.clip(m):e.clip();else{var t=new Path2D;t.rect(-s/2-E,-c/2-E,s+2*E,c+2*E),t.addPath(m),e.clip(t,`evenodd`)}p?e.stroke(m):e.stroke(),e.restore()}else p?e.stroke(m):e.stroke();if(k===`double`){e.lineWidth=E/3;var n=e.globalCompositeOperation;e.globalCompositeOperation=`destination-out`,p?e.stroke(m):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},oe=function(){if(L>0){if(e.lineWidth=L,e.lineCap=`butt`,e.setLineDash)switch(z){case`dotted`:e.setLineDash([1,1]);break;case`dashed`:e.setLineDash([4,2]);break;case`solid`:case`double`:e.setLineDash([]);break}var n=d;p&&(n={x:0,y:0});var r=o.getNodeShape(t),i=E;N===`inside`&&(i=0),N===`outside`&&(i*=2);var a=(s+i+(L+V))/s,l=(c+i+(L+V))/c,u=s*a,f=c*l,m=o.nodeShapes[r].points,h;if(p&&(h=K(u,f,r,m).path),r===`ellipse`)o.drawEllipsePath(h||e,n.x,n.y,u,f);else if([`round-diamond`,`round-heptagon`,`round-hexagon`,`round-octagon`,`round-pentagon`,`round-polygon`,`round-triangle`,`round-tag`].includes(r)){var g=0,_=0,v=0;r===`round-diamond`?g=(i+V+L)*1.4:r===`round-heptagon`?(g=(i+V+L)*1.075,v=-(i/2+V+L)/35):r===`round-hexagon`?g=(i+V+L)*1.12:r===`round-pentagon`?(g=(i+V+L)*1.13,v=-(i/2+V+L)/15):r===`round-tag`?(g=(i+V+L)*1.12,_=(i/2+L+V)*.07):r===`round-triangle`&&(g=(i+V+L)*(Math.PI/2),v=-(i+V/2+L)/Math.PI),g!==0&&(a=(s+g)/s,u=s*a,[`round-hexagon`,`round-tag`].includes(r)||(l=(c+g)/c,f=c*l)),H=H===`auto`?Mr(u,f):H;for(var y=u/2,b=f/2,x=H+(i+L+V)/2,S=Array(m.length/2),C=Array(m.length/2),w=0;w0){if(r||=n.position(),i==null||a==null){var f=n.padding();i=n.width()+2*f,a=n.height()+2*f}o.colorFillStyle(t,l[0],l[1],l[2],c),o.nodeShapes[u].draw(t,r.x,r.y,i+s*2,a+s*2,d),t.fill()}}}};cm.drawNodeOverlay=lm(`overlay`),cm.drawNodeUnderlay=lm(`underlay`),cm.hasPie=function(e){return e=e[0],e._private.hasPie},cm.hasStripe=function(e){return e=e[0],e._private.hasStripe},cm.drawPie=function(e,t,n,r){t=t[0],r||=t.position();var i=t.cy().style(),a=t.pstyle(`pie-size`),o=t.pstyle(`pie-hole`),s=t.pstyle(`pie-start-angle`).pfValue,c=r.x,l=r.y,u=t.width(),d=t.height(),f=Math.min(u,d)/2,p,m=0;if(this.usePaths()&&(c=0,l=0),a.units===`%`?f*=a.pfValue:a.pfValue!==void 0&&(f=a.pfValue/2),o.units===`%`?p=f*o.pfValue:o.pfValue!==void 0&&(p=o.pfValue/2),!(p>=f))for(var h=1;h<=i.pieBackgroundN;h++){var g=t.pstyle(`pie-`+h+`-background-size`).value,_=t.pstyle(`pie-`+h+`-background-color`).value,v=t.pstyle(`pie-`+h+`-background-opacity`).value*n,y=g/100;y+m>1&&(y=1-m);var b=1.5*Math.PI+2*Math.PI*m;b+=s;var x=2*Math.PI*y,S=b+x;g===0||m>=1||m+y>1||(p===0?(e.beginPath(),e.moveTo(c,l),e.arc(c,l,f,b,S),e.closePath()):(e.beginPath(),e.arc(c,l,f,b,S),e.arc(c,l,p,S,b,!0),e.closePath()),this.colorFillStyle(e,_[0],_[1],_[2],v),e.fill(),m+=y)}},cm.drawStripe=function(e,t,n,r){t=t[0],r||=t.position();var i=t.cy().style(),a=r.x,o=r.y,s=t.width(),c=t.height(),l=0,u=this.usePaths();e.save();var d=t.pstyle(`stripe-direction`).value,f=t.pstyle(`stripe-size`);switch(d){case`vertical`:break;case`righward`:e.rotate(-Math.PI/2);break}var p=s,m=c;f.units===`%`?(p*=f.pfValue,m*=f.pfValue):f.pfValue!==void 0&&(p=f.pfValue,m=f.pfValue),u&&(a=0,o=0),o-=p/2,a-=m/2;for(var h=1;h<=i.stripeBackgroundN;h++){var g=t.pstyle(`stripe-`+h+`-background-size`).value,_=t.pstyle(`stripe-`+h+`-background-color`).value,v=t.pstyle(`stripe-`+h+`-background-opacity`).value*n,y=g/100;y+l>1&&(y=1-l),!(g===0||l>=1||l+y>1)&&(e.beginPath(),e.rect(a,o+m*l,p,m*y),e.closePath(),this.colorFillStyle(e,_[0],_[1],_[2],v),e.fill(),l+=y)}e.restore()};var um={},dm=100;um.getPixelRatio=function(){var e=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var t=this.cy.window(),n=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/n},um.paintCache=function(e){for(var t=this.paintCaches=this.paintCaches||[],n=!0,r,i=0;it.minMbLowQualFrames&&(t.motionBlurPxRatio=t.mbPxRBlurry)),t.clearingMotionBlur&&(t.motionBlurPxRatio=1),t.textureDrawLastFrame&&!d&&(u[t.NODE]=!0,u[t.SELECT_BOX]=!0);var v=n.style(),y=n.zoom(),b=o===void 0?y:o,x=n.pan(),S={x:x.x,y:x.y},C={zoom:y,pan:{x:x.x,y:x.y}},w=t.prevViewport;!(w===void 0||C.zoom!==w.zoom||C.pan.x!==w.pan.x||C.pan.y!==w.pan.y)&&!(h&&!m)&&(t.motionBlurPxRatio=1),s&&(S=s),b*=c,S.x*=c,S.y*=c;var T=t.getCachedZSortedEles();function E(e,n,r,i,a){var o=e.globalCompositeOperation;e.globalCompositeOperation=`destination-out`,t.colorFillStyle(e,255,255,255,t.motionBlurTransparency),e.fillRect(n,r,i,a),e.globalCompositeOperation=o}function D(e,n){var a,c,u,d;!t.clearingMotionBlur&&(e===l.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]||e===l.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG])?(a={x:x.x*p,y:x.y*p},c=y*p,u=t.canvasWidth*p,d=t.canvasHeight*p):(a=S,c=b,u=t.canvasWidth,d=t.canvasHeight),e.setTransform(1,0,0,1,0,0),n===`motionBlur`?E(e,0,0,u,d):!r&&(n===void 0||n)&&e.clearRect(0,0,u,d),i||(e.translate(a.x,a.y),e.scale(c,c)),s&&e.translate(s.x,s.y),o&&e.scale(o,o)}if(d||(t.textureDrawLastFrame=!1),d){if(t.textureDrawLastFrame=!0,!t.textureCache){t.textureCache={},t.textureCache.bb=n.mutableElements().boundingBox(),t.textureCache.texture=t.data.bufferCanvases[t.TEXTURE_BUFFER];var O=t.data.bufferContexts[t.TEXTURE_BUFFER];O.setTransform(1,0,0,1,0,0),O.clearRect(0,0,t.canvasWidth*t.textureMult,t.canvasHeight*t.textureMult),t.render({forcedContext:O,drawOnlyNodeLayer:!0,forcedPxRatio:c*t.textureMult});var C=t.textureCache.viewport={zoom:n.zoom(),pan:n.pan(),width:t.canvasWidth,height:t.canvasHeight};C.mpan={x:(0-C.pan.x)/C.zoom,y:(0-C.pan.y)/C.zoom}}u[t.DRAG]=!1,u[t.NODE]=!1;var k=l.contexts[t.NODE],A=t.textureCache.texture,C=t.textureCache.viewport;k.setTransform(1,0,0,1,0,0),f?E(k,0,0,C.width,C.height):k.clearRect(0,0,C.width,C.height);var j=v.core(`outside-texture-bg-color`).value,M=v.core(`outside-texture-bg-opacity`).value;t.colorFillStyle(k,j[0],j[1],j[2],M),k.fillRect(0,0,C.width,C.height);var y=n.zoom();D(k,!1),k.clearRect(C.mpan.x,C.mpan.y,C.width/C.zoom/c,C.height/C.zoom/c),k.drawImage(A,C.mpan.x,C.mpan.y,C.width/C.zoom/c,C.height/C.zoom/c)}else t.textureOnViewport&&!r&&(t.textureCache=null);var N=n.extent(),P=t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming||t.hoverData.draggingEles||t.cy.animated(),F=t.hideEdgesOnViewport&&P,I=[];if(I[t.NODE]=!u[t.NODE]&&f&&!t.clearedForMotionBlur[t.NODE]||t.clearingMotionBlur,I[t.NODE]&&(t.clearedForMotionBlur[t.NODE]=!0),I[t.DRAG]=!u[t.DRAG]&&f&&!t.clearedForMotionBlur[t.DRAG]||t.clearingMotionBlur,I[t.DRAG]&&(t.clearedForMotionBlur[t.DRAG]=!0),u[t.NODE]||i||a||I[t.NODE]){var L=f&&!I[t.NODE]&&p!==1,k=r||(L?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]:l.contexts[t.NODE]);D(k,f&&!L?`motionBlur`:void 0),F?t.drawCachedNodes(k,T.nondrag,c,N):t.drawLayeredElements(k,T.nondrag,c,N),t.debug&&t.drawDebugPoints(k,T.nondrag),!i&&!f&&(u[t.NODE]=!1)}if(!a&&(u[t.DRAG]||i||I[t.DRAG])){var L=f&&!I[t.DRAG]&&p!==1,k=r||(L?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]:l.contexts[t.DRAG]);D(k,f&&!L?`motionBlur`:void 0),F?t.drawCachedNodes(k,T.drag,c,N):t.drawCachedElements(k,T.drag,c,N),t.debug&&t.drawDebugPoints(k,T.drag),!i&&!f&&(u[t.DRAG]=!1)}if(this.drawSelectionRectangle(e,D),f&&p!==1){var R=l.contexts[t.NODE],z=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE],B=l.contexts[t.DRAG],V=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG],H=function(e,n,r){e.setTransform(1,0,0,1,0,0),r||!_?e.clearRect(0,0,t.canvasWidth,t.canvasHeight):E(e,0,0,t.canvasWidth,t.canvasHeight);var i=p;e.drawImage(n,0,0,t.canvasWidth*i,t.canvasHeight*i,0,0,t.canvasWidth,t.canvasHeight)};(u[t.NODE]||I[t.NODE])&&(H(R,z,I[t.NODE]),u[t.NODE]=!1),(u[t.DRAG]||I[t.DRAG])&&(H(B,V,I[t.DRAG]),u[t.DRAG]=!1)}t.prevViewport=C,t.clearingMotionBlur&&(t.clearingMotionBlur=!1,t.motionBlurCleared=!0,t.motionBlur=!0),f&&(t.motionBlurTimeout=setTimeout(function(){t.motionBlurTimeout=null,t.clearedForMotionBlur[t.NODE]=!1,t.clearedForMotionBlur[t.DRAG]=!1,t.motionBlur=!1,t.clearingMotionBlur=!d,t.mbFrames=0,u[t.NODE]=!0,u[t.DRAG]=!0,t.redraw()},dm)),r||n.emit(`render`)};var fm;um.drawSelectionRectangle=function(e,t){var n=this,r=n.cy,i=n.data,a=r.style(),o=e.drawOnlyNodeLayer,s=e.drawAllLayers,c=i.canvasNeedsRedraw,l=e.forcedContext;if(n.showFps||!o&&c[n.SELECT_BOX]&&!s){var u=l||i.contexts[n.SELECT_BOX];if(t(u),n.selection[4]==1&&(n.hoverData.selecting||n.touchData.selecting)){var d=n.cy.zoom(),f=a.core(`selection-box-border-width`).value/d;u.lineWidth=f,u.fillStyle=`rgba(`+a.core(`selection-box-color`).value[0]+`,`+a.core(`selection-box-color`).value[1]+`,`+a.core(`selection-box-color`).value[2]+`,`+a.core(`selection-box-opacity`).value+`)`,u.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),f>0&&(u.strokeStyle=`rgba(`+a.core(`selection-box-border-color`).value[0]+`,`+a.core(`selection-box-border-color`).value[1]+`,`+a.core(`selection-box-border-color`).value[2]+`,`+a.core(`selection-box-opacity`).value+`)`,u.strokeRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]))}if(i.bgActivePosistion&&!n.hoverData.selecting){var d=n.cy.zoom(),p=i.bgActivePosistion;u.fillStyle=`rgba(`+a.core(`active-bg-color`).value[0]+`,`+a.core(`active-bg-color`).value[1]+`,`+a.core(`active-bg-color`).value[2]+`,`+a.core(`active-bg-opacity`).value+`)`,u.beginPath(),u.arc(p.x,p.y,a.core(`active-bg-size`).pfValue/d,0,2*Math.PI),u.fill()}var m=n.lastRedrawTime;if(n.showFps&&m){m=Math.round(m);var h=Math.round(1e3/m),g=`1 frame = `+m+` ms = `+h+` fps`;u.setTransform(1,0,0,1,0,0),u.fillStyle=`rgba(255, 0, 0, 0.75)`,u.strokeStyle=`rgba(255, 0, 0, 0.75)`,u.font=`30px Arial`,fm||=u.measureText(g).actualBoundingBoxAscent,u.fillText(g,0,fm),u.strokeRect(0,fm+10,250,20),u.fillRect(0,fm+10,250*Math.min(h/60,1),20)}s||(c[n.SELECT_BOX]=!1)}};function pm(e,t,n){var r=e.createShader(t);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw Error(e.getShaderInfoLog(r));return r}function mm(e,t,n){var r=pm(e,e.VERTEX_SHADER,t),i=pm(e,e.FRAGMENT_SHADER,n),a=e.createProgram();if(e.attachShader(a,r),e.attachShader(a,i),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS))throw Error(`Could not initialize shaders`);return a}function hm(e,t,n){n===void 0&&(n=t);var r=e.makeOffscreenCanvas(t,n),i=r.context=r.getContext(`2d`);return r.clear=function(){return i.clearRect(0,0,r.width,r.height)},r.clear(),r}function gm(e){var t=e.pixelRatio,n=e.cy.zoom(),r=e.cy.pan();return{zoom:n*t,pan:{x:r.x*t,y:r.y*t}}}function _m(e){var t=e.pixelRatio;return e.cy.zoom()*t}function vm(e,t,n,r,i){var a=r*n+t.x,o=i*n+t.y;return o=Math.round(e.canvasHeight-o),[a,o]}function ym(e,t){return t.picking?!0:e.pstyle(`background-fill`).value!==`solid`||e.pstyle(`background-image`).strValue!==`none`?!1:e.pstyle(`border-width`).value===0||e.pstyle(`border-opacity`).value===0||e.pstyle(`border-style`).value===`solid`}function bm(e,t){if(e.length!==t.length)return!1;for(var n=0;n>0&255)/255,n[1]=(e>>8&255)/255,n[2]=(e>>16&255)/255,n[3]=(e>>24&255)/255,n}function Cm(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function wm(e,t){var n=e.createTexture();return n.buffer=function(t){e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_NEAREST),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)},n.deleteTexture=function(){e.deleteTexture(n)},n}function Tm(e,t){switch(t){case`float`:return[1,e.FLOAT,4];case`vec2`:return[2,e.FLOAT,4];case`vec3`:return[3,e.FLOAT,4];case`vec4`:return[4,e.FLOAT,4];case`int`:return[1,e.INT,4];case`ivec2`:return[2,e.INT,4]}}function Em(e,t,n){switch(t){case e.FLOAT:return new Float32Array(n);case e.INT:return new Int32Array(n)}}function Dm(e,t,n,r,i,a){switch(t){case e.FLOAT:return new Float32Array(n.buffer,a*r,i);case e.INT:return new Int32Array(n.buffer,a*r,i)}}function Om(e,t,n,r){var i=f(Tm(e,t),2),a=i[0],o=i[1],s=Em(e,o,r),c=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,c),e.bufferData(e.ARRAY_BUFFER,s,e.STATIC_DRAW),o===e.FLOAT?e.vertexAttribPointer(n,a,o,!1,0,0):o===e.INT&&e.vertexAttribIPointer(n,a,o,0,0),e.enableVertexAttribArray(n),e.bindBuffer(e.ARRAY_BUFFER,null),c}function km(e,t,n,r){var i=f(Tm(e,n),3),a=i[0],o=i[1],s=i[2],c=Em(e,o,t*a),l=a*s,u=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,u),e.bufferData(e.ARRAY_BUFFER,t*l,e.DYNAMIC_DRAW),e.enableVertexAttribArray(r),o===e.FLOAT?e.vertexAttribPointer(r,a,o,!1,l,0):o===e.INT&&e.vertexAttribIPointer(r,a,o,l,0),e.vertexAttribDivisor(r,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var d=Array(t),p=0;pi&&(a=i/t,o=t*a,s=n*a),{scale:a,texW:o,texH:s}}},{key:`draw`,value:function(e,t,n){var r=this;if(this.locked)throw Error(`can't draw, atlas is locked`);var i=this.texSize,a=this.texRows,o=this.texHeight,s=this.getScale(t),c=s.scale,l=s.texW,u=s.texH,d=function(e,r){if(n&&r){var i=r.context,a=e.x,s=e.row,l=a,u=o*s;i.save(),i.translate(l,u),i.scale(c,c),n(i,t),i.restore()}},f=[null,null],p=function(){d(r.freePointer,r.canvas),f[0]={x:r.freePointer.x,y:r.freePointer.row*o,w:l,h:u},f[1]={x:r.freePointer.x+l,y:r.freePointer.row*o,w:0,h:u},r.freePointer.x+=l,r.freePointer.x==i&&(r.freePointer.x=0,r.freePointer.row++)},m=function(){var e=r.scratch,t=r.canvas;e.clear(),d({x:0,row:0},e);var n=i-r.freePointer.x,a=l-n,s=o,c=r.freePointer.x,p=r.freePointer.row*o,m=n;t.context.drawImage(e,0,0,m,s,c,p,m,s),f[0]={x:c,y:p,w:m,h:u};var h=n,g=(r.freePointer.row+1)*o,_=a;t&&t.context.drawImage(e,h,0,_,s,0,g,_,s),f[1]={x:0,y:g,w:_,h:u},r.freePointer.x=a,r.freePointer.row++},h=function(){r.freePointer.x=0,r.freePointer.row++};if(this.freePointer.x+l<=i)p();else if(this.freePointer.row>=a-1)return!1;else this.freePointer.x===i?(h(),p()):this.enableWrapping?m():(h(),p());return this.keyToLocation.set(e,f),this.needsBuffer=!0,f}},{key:`getOffsets`,value:function(e){return this.keyToLocation.get(e)}},{key:`isEmpty`,value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:`canFit`,value:function(e){if(this.locked)return!1;var t=this.texSize,n=this.texRows,r=this.getScale(e).texW;return this.freePointer.x+r>t?this.freePointer.row1&&arguments[1]!==void 0?arguments[1]:{},r=n.forceRedraw,i=r!==void 0&&r,a=n.filterEle,s=a===void 0?function(){return!0}:a,c=n.filterType,l=c===void 0?function(){return!0}:c,u=!1,d=!1,f=o(e),p;try{for(f.s();!(p=f.n()).done;){var m=p.value;if(s(m)){var h=o(this.renderTypes.values()),g;try{var _=function(){var e=g.value,n=e.type;if(l(n)){var r=t.collections.get(e.collection),a=e.getKey(m),o=Array.isArray(a)?a:[a];if(i)o.forEach(function(e){return r.markKeyForGC(e)}),d=!0;else{var s=e.getID?e.getID(m):m.id(),c=t._key(n,s),f=t.typeAndIdToKey.get(c);f!==void 0&&!bm(o,f)&&(u=!0,t.typeAndIdToKey.delete(c),f.forEach(function(e){return r.markKeyForGC(e)}))}}};for(h.s();!(g=h.n()).done;)_()}catch(e){h.e(e)}finally{h.f()}}}}catch(e){f.e(e)}finally{f.f()}return d&&(this.gc(),u=!1),u}},{key:`gc`,value:function(){var e=o(this.collections.values()),t;try{for(e.s();!(t=e.n()).done;)t.value.gc()}catch(t){e.e(t)}finally{e.f()}}},{key:`getOrCreateAtlas`,value:function(e,t,n,r){var i=this.renderTypes.get(t),a=this.collections.get(i.collection),o=!1,s=a.draw(r,n,function(t){i.drawClipped?(t.save(),t.beginPath(),t.rect(0,0,n.w,n.h),t.clip(),i.drawElement(t,e,n,!0,!0),t.restore()):i.drawElement(t,e,n,!0,!0),o=!0});if(o){var c=i.getID?i.getID(e):e.id(),l=this._key(t,c);this.typeAndIdToKey.has(l)?this.typeAndIdToKey.get(l).push(r):this.typeAndIdToKey.set(l,[r])}return s}},{key:`getAtlasInfo`,value:function(e,t){var n=this,r=this.renderTypes.get(t),i=r.getKey(e);return(Array.isArray(i)?i:[i]).map(function(i){var a=r.getBoundingBox(e,i),o=n.getOrCreateAtlas(e,t,a,i),s=f(o.getOffsets(i),2),c=s[0];return{atlas:o,tex:c,tex1:c,tex2:s[1],bb:a}})}},{key:`getDebugInfo`,value:function(){var e=[],t=o(this.collections),n;try{for(t.s();!(n=t.n()).done;){var r=f(n.value,2),i=r[0],a=r[1].getCounts(),s=a.keyCount,c=a.atlasCount;e.push({type:i,keyCount:s,atlasCount:c})}}catch(e){t.e(e)}finally{t.f()}return e}}])}(),Wm=function(){function e(t){r(this,e),this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.batchAtlases=[]}return a(e,[{key:`getMaxAtlasesPerBatch`,value:function(){return this.maxAtlasesPerBatch}},{key:`getAtlasSize`,value:function(){return this.atlasSize}},{key:`getIndexArray`,value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(e,t){return t})}},{key:`startBatch`,value:function(){this.batchAtlases=[]}},{key:`getAtlasCount`,value:function(){return this.batchAtlases.length}},{key:`getAtlases`,value:function(){return this.batchAtlases}},{key:`canAddToCurrentBatch`,value:function(e){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(e)}},{key:`getAtlasIndexForBatch`,value:function(e){var t=this.batchAtlases.indexOf(e);if(t<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw Error(`cannot add more atlases to batch`);this.batchAtlases.push(e),t=this.batchAtlases.length-1}return t}}])}(),Gm=` - float circleSD(vec2 p, float r) { - return distance(vec2(0), p) - r; // signed distance - } -`,Km=` - float rectangleSD(vec2 p, vec2 b) { - vec2 d = abs(p)-b; - return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0); - } -`,qm=` - float roundRectangleSD(vec2 p, vec2 b, vec4 cr) { - cr.xy = (p.x > 0.0) ? cr.xy : cr.zw; - cr.x = (p.y > 0.0) ? cr.x : cr.y; - vec2 q = abs(p) - b + cr.x; - return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x; - } -`,Jm=` - float ellipseSD(vec2 p, vec2 ab) { - p = abs( p ); // symmetry - - // find root with Newton solver - vec2 q = ab*(p-ab); - float w = (q.x1.0) ? d : -d; - } -`,Ym={SCREEN:{name:`screen`,screen:!0},PICKING:{name:`picking`,picking:!0}},Xm={IGNORE:1,USE_BB:2},Zm=0,Qm=1,$m=2,eh=3,th=4,nh=5,rh=6,ih=7,ah=function(){function e(t,n,i){r(this,e),this.r=t,this.gl=n,this.maxInstances=i.webglBatchSize,this.atlasSize=i.webglTexSize,this.bgColor=i.bgColor,this.debug=i.webglDebug,this.batchDebugInfo=[],i.enableWrapping=!0,i.createTextureCanvas=hm,this.atlasManager=new Um(t,i),this.batchManager=new Wm(i),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(Ym.SCREEN),this.pickingProgram=this._createShaderProgram(Ym.PICKING),this.vao=this._createVAO()}return a(e,[{key:`addAtlasCollection`,value:function(e,t){this.atlasManager.addAtlasCollection(e,t)}},{key:`addTextureAtlasRenderType`,value:function(e,t){this.atlasManager.addRenderType(e,t)}},{key:`addSimpleShapeRenderType`,value:function(e,t){this.simpleShapeOptions.set(e,t)}},{key:`invalidate`,value:function(e){var t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).type,n=this.atlasManager;return t?n.invalidate(e,{filterType:function(e){return e===t},forceRedraw:!0}):n.invalidate(e)}},{key:`gc`,value:function(){this.atlasManager.gc()}},{key:`_createShaderProgram`,value:function(e){var t=this.gl,n=`#version 300 es - precision highp float; - - uniform mat3 uPanZoomMatrix; - uniform int uAtlasSize; - - // instanced - in vec2 aPosition; // a vertex from the unit square - - in mat3 aTransform; // used to transform verticies, eg into a bounding box - in int aVertType; // the type of thing we are rendering - - // the z-index that is output when using picking mode - in vec4 aIndex; - - // For textures - in int aAtlasId; // which shader unit/atlas to use - in vec4 aTex; // x/y/w/h of texture in atlas - - // for edges - in vec4 aPointAPointB; - in vec4 aPointCPointD; - in vec2 aLineWidth; // also used for node border width - - // simple shapes - in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left] - in vec4 aColor; // also used for edges - in vec4 aBorderColor; // aLineWidth is used for border width - - // output values passed to the fragment shader - out vec2 vTexCoord; - out vec4 vColor; - out vec2 vPosition; - // flat values are not interpolated - flat out int vAtlasId; - flat out int vVertType; - flat out vec2 vTopRight; - flat out vec2 vBotLeft; - flat out vec4 vCornerRadius; - flat out vec4 vBorderColor; - flat out vec2 vBorderWidth; - flat out vec4 vIndex; - - void main(void) { - int vid = gl_VertexID; - vec2 position = aPosition; // TODO make this a vec3, simplifies some code below - - if(aVertType == ${Zm}) { - float texX = aTex.x; // texture coordinates - float texY = aTex.y; - float texW = aTex.z; - float texH = aTex.w; - - if(vid == 1 || vid == 2 || vid == 4) { - texX += texW; - } - if(vid == 2 || vid == 4 || vid == 5) { - texY += texH; - } - - float d = float(uAtlasSize); - vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1 - - gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); - } - else if(aVertType == ${th} || aVertType == ${ih} - || aVertType == ${nh} || aVertType == ${rh}) { // simple shapes - - // the bounding box is needed by the fragment shader - vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat - vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat - vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated - - // calculations are done in the fragment shader, just pass these along - vColor = aColor; - vCornerRadius = aCornerRadius; - vBorderColor = aBorderColor; - vBorderWidth = aLineWidth; - - gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); - } - else if(aVertType == ${Qm}) { - vec2 source = aPointAPointB.xy; - vec2 target = aPointAPointB.zw; - - // adjust the geometry so that the line is centered on the edge - position.y = position.y - 0.5; - - // stretch the unit square into a long skinny rectangle - vec2 xBasis = target - source; - vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x)); - vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y; - - gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0); - vColor = aColor; - } - else if(aVertType == ${$m}) { - vec2 pointA = aPointAPointB.xy; - vec2 pointB = aPointAPointB.zw; - vec2 pointC = aPointCPointD.xy; - vec2 pointD = aPointCPointD.zw; - - // adjust the geometry so that the line is centered on the edge - position.y = position.y - 0.5; - - vec2 p0, p1, p2, pos; - if(position.x == 0.0) { // The left side of the unit square - p0 = pointA; - p1 = pointB; - p2 = pointC; - pos = position; - } else { // The right side of the unit square, use same approach but flip the geometry upside down - p0 = pointD; - p1 = pointC; - p2 = pointB; - pos = vec2(0.0, -position.y); - } - - vec2 p01 = p1 - p0; - vec2 p12 = p2 - p1; - vec2 p21 = p1 - p2; - - // Find the normal vector. - vec2 tangent = normalize(normalize(p12) + normalize(p01)); - vec2 normal = vec2(-tangent.y, tangent.x); - - // Find the vector perpendicular to p0 -> p1. - vec2 p01Norm = normalize(vec2(-p01.y, p01.x)); - - // Determine the bend direction. - float sigma = sign(dot(p01 + p21, normal)); - float width = aLineWidth[0]; - - if(sign(pos.y) == -sigma) { - // This is an intersecting vertex. Adjust the position so that there's no overlap. - vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm); - gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); - } else { - // This is a non-intersecting vertex. Treat it like a mitre join. - vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm); - gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0); - } - - vColor = aColor; - } - else if(aVertType == ${eh} && vid < 3) { - // massage the first triangle into an edge arrow - if(vid == 0) - position = vec2(-0.15, -0.3); - if(vid == 1) - position = vec2( 0.0, 0.0); - if(vid == 2) - position = vec2( 0.15, -0.3); - - gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0); - vColor = aColor; - } - else { - gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space - } - - vAtlasId = aAtlasId; - vVertType = aVertType; - vIndex = aIndex; - } - `,r=this.batchManager.getIndexArray(),i=mm(t,n,`#version 300 es - precision highp float; - - // declare texture unit for each texture atlas in the batch - ${r.map(function(e){return`uniform sampler2D uTexture${e};`}).join(` - `)} - - uniform vec4 uBGColor; - uniform float uZoom; - - in vec2 vTexCoord; - in vec4 vColor; - in vec2 vPosition; // model coordinates - - flat in int vAtlasId; - flat in vec4 vIndex; - flat in int vVertType; - flat in vec2 vTopRight; - flat in vec2 vBotLeft; - flat in vec4 vCornerRadius; - flat in vec4 vBorderColor; - flat in vec2 vBorderWidth; - - out vec4 outColor; - - ${Gm} - ${Km} - ${qm} - ${Jm} - - vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha - return vec4( - top.rgb + (bot.rgb * (1.0 - top.a)), - top.a + (bot.a * (1.0 - top.a)) - ); - } - - vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance - // scale to the zoom level so that borders don't look blurry when zoomed in - // note 1.5 is an aribitrary value chosen because it looks good - return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); - } - - void main(void) { - if(vVertType == ${Zm}) { - // look up the texel from the texture unit - ${r.map(function(e){return`if(vAtlasId == ${e}) outColor = texture(uTexture${e}, vTexCoord);`}).join(` - else `)} - } - else if(vVertType == ${eh}) { - // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out'; - outColor = blend(vColor, uBGColor); - outColor.a = 1.0; // make opaque, masks out line under arrow - } - else if(vVertType == ${th} && vBorderWidth == vec2(0.0)) { // simple rectangle with no border - outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done - } - else if(vVertType == ${th} || vVertType == ${ih} - || vVertType == ${nh} || vVertType == ${rh}) { // use SDF - - float outerBorder = vBorderWidth[0]; - float innerBorder = vBorderWidth[1]; - float borderPadding = outerBorder * 2.0; - float w = vTopRight.x - vBotLeft.x - borderPadding; - float h = vTopRight.y - vBotLeft.y - borderPadding; - vec2 b = vec2(w/2.0, h/2.0); // half width, half height - vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center - - float d; // signed distance - if(vVertType == ${th}) { - d = rectangleSD(p, b); - } else if(vVertType == ${ih} && w == h) { - d = circleSD(p, b.x); // faster than ellipse - } else if(vVertType == ${ih}) { - d = ellipseSD(p, b); - } else { - d = roundRectangleSD(p, b, vCornerRadius.wzyx); - } - - // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling - // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box - if(d > 0.0) { - if(d > outerBorder) { - discard; - } else { - outColor = distInterp(vBorderColor, vec4(0), d - outerBorder); - } - } else { - if(d > innerBorder) { - vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor; - vec4 innerBorderColor = blend(vBorderColor, vColor); - outColor = distInterp(innerBorderColor, outerColor, d); - } - else { - vec4 outerColor; - if(innerBorder == 0.0 && outerBorder == 0.0) { - outerColor = vec4(0); - } else if(innerBorder == 0.0) { - outerColor = vBorderColor; - } else { - outerColor = blend(vBorderColor, vColor); - } - outColor = distInterp(vColor, outerColor, d - innerBorder); - } - } - } - else { - outColor = vColor; - } - - ${e.picking?`if(outColor.a == 0.0) discard; - else outColor = vIndex;`:``} - } - `);i.aPosition=t.getAttribLocation(i,`aPosition`),i.aIndex=t.getAttribLocation(i,`aIndex`),i.aVertType=t.getAttribLocation(i,`aVertType`),i.aTransform=t.getAttribLocation(i,`aTransform`),i.aAtlasId=t.getAttribLocation(i,`aAtlasId`),i.aTex=t.getAttribLocation(i,`aTex`),i.aPointAPointB=t.getAttribLocation(i,`aPointAPointB`),i.aPointCPointD=t.getAttribLocation(i,`aPointCPointD`),i.aLineWidth=t.getAttribLocation(i,`aLineWidth`),i.aColor=t.getAttribLocation(i,`aColor`),i.aCornerRadius=t.getAttribLocation(i,`aCornerRadius`),i.aBorderColor=t.getAttribLocation(i,`aBorderColor`),i.uPanZoomMatrix=t.getUniformLocation(i,`uPanZoomMatrix`),i.uAtlasSize=t.getUniformLocation(i,`uAtlasSize`),i.uBGColor=t.getUniformLocation(i,`uBGColor`),i.uZoom=t.getUniformLocation(i,`uZoom`),i.uTextures=[];for(var a=0;a1&&arguments[1]!==void 0?arguments[1]:Ym.SCREEN;this.panZoomMatrix=e,this.renderTarget=t,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:`startBatch`,value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:`endFrame`,value:function(){this.endBatch()}},{key:`_isVisible`,value:function(e,t){return e.visible()?t&&t.isVisible?t.isVisible(e):!0:!1}},{key:`drawTexture`,value:function(e,t,n){var r=this.atlasManager,i=this.batchManager,a=r.getRenderTypeOpts(n);if(this._isVisible(e,a)&&!(e.isEdge()&&!this._isValidEdge(e))){if(this.renderTarget.picking&&a.getTexPickingMode){var s=a.getTexPickingMode(e);if(s===Xm.IGNORE)return;if(s==Xm.USE_BB){this.drawPickingRectangle(e,t,n);return}}var c=o(r.getAtlasInfo(e,n)),l;try{for(c.s();!(l=c.n()).done;){var u=l.value,d=u.atlas,p=u.tex1,m=u.tex2;i.canAddToCurrentBatch(d)||this.endBatch();for(var h=i.getAtlasIndexForBatch(d),g=0,_=[[p,!0],[m,!1]];g<_.length;g++){var v=f(_[g],2),y=v[0],b=v[1];if(y.w!=0){var x=this.instanceCount;this.vertTypeBuffer.getView(x)[0]=Zm,Sm(t,this.indexBuffer.getView(x));var S=this.atlasIdBuffer.getView(x);S[0]=h;var C=this.texBuffer.getView(x);C[0]=y.x,C[1]=y.y,C[2]=y.w,C[3]=y.h;var w=this.transformBuffer.getMatrixView(x);this.setTransformMatrix(e,w,a,u,b),this.instanceCount++,b||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(e){c.e(e)}finally{c.f()}}}},{key:`setTransformMatrix`,value:function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=0;if(n.shapeProps&&n.shapeProps.padding&&(a=e.pstyle(n.shapeProps.padding).pfValue),r){var o=r.bb,s=r.tex1,c=r.tex2,l=s.w/(s.w+c.w);i||(l=1-l);var u=this._getAdjustedBB(o,a,i,l);this._applyTransformMatrix(t,u,n,e)}else{var d=n.getBoundingBox(e),f=this._getAdjustedBB(d,a,!0,1);this._applyTransformMatrix(t,f,n,e)}}},{key:`_applyTransformMatrix`,value:function(e,t,n,r){var i,a;Pm(e);var o=n.getRotation?n.getRotation(r):0;if(o!==0){var s=n.getRotationPoint(r),c=s.x,l=s.y;Im(e,e,[c,l]),Lm(e,e,o);var u=n.getRotationOffset(r);i=u.x+(t.xOffset||0),a=u.y+(t.yOffset||0)}else i=t.x1,a=t.y1;Im(e,e,[i,a]),Rm(e,e,[t.w,t.h])}},{key:`_getAdjustedBB`,value:function(e,t,n,r){var i=e.x1,a=e.y1,o=e.w,s=e.h,c=e.yOffset;t&&(i-=t,a-=t,o+=2*t,s+=2*t);var l=0,u=o*r;return n&&r<1?o=u:!n&&r<1&&(l=o-u,i+=l,o=u),{x1:i,y1:a,w:o,h:s,xOffset:l,yOffset:c}}},{key:`drawPickingRectangle`,value:function(e,t,n){var r=this.atlasManager.getRenderTypeOpts(n),i=this.instanceCount;this.vertTypeBuffer.getView(i)[0]=th,Sm(t,this.indexBuffer.getView(i)),xm([0,0,0],1,this.colorBuffer.getView(i));var a=this.transformBuffer.getMatrixView(i);this.setTransformMatrix(e,a,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:`drawNode`,value:function(e,t,n){var r=this.simpleShapeOptions.get(n);if(this._isVisible(e,r)){var i=r.shapeProps,a=this._getVertTypeForShape(e,i.shape);if(a===void 0||r.isSimple&&!r.isSimple(e,this.renderTarget)){this.drawTexture(e,t,n);return}var o=this.instanceCount;if(this.vertTypeBuffer.getView(o)[0]=a,a===nh||a===rh){var s=r.getBoundingBox(e),c=this._getCornerRadius(e,i.radius,s),l=this.cornerRadiusBuffer.getView(o);l[0]=c,l[1]=c,l[2]=c,l[3]=c,a===rh&&(l[0]=0,l[2]=0)}Sm(t,this.indexBuffer.getView(o));var u=this.renderTarget.picking?1:n===`node-body`?e.effectiveOpacity():1,d=this.renderTarget.picking?1:e.pstyle(i.opacity).value*u,f=e.pstyle(i.color).value;xm(f,d,this.colorBuffer.getView(o));var p=this.lineWidthBuffer.getView(o);if(p[0]=0,p[1]=0,i.border){var m=e.pstyle(`border-width`).value;if(m>0){var h=e.pstyle(`border-color`).value;xm(h,u*e.pstyle(`border-opacity`).value,this.borderColorBuffer.getView(o));var g=e.pstyle(`border-position`).value;if(g===`inside`)p[0]=0,p[1]=-m;else if(g===`outside`)p[0]=m,p[1]=0;else{var _=m/2;p[0]=_,p[1]=-_}}}var v=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(e,v,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:`_getVertTypeForShape`,value:function(e,t){switch(e.pstyle(t).value){case`rectangle`:return th;case`ellipse`:return ih;case`roundrectangle`:case`round-rectangle`:return nh;case`bottom-round-rectangle`:return rh;default:return}}},{key:`_getCornerRadius`,value:function(e,t,n){var r=n.w,i=n.h;if(e.pstyle(t).value===`auto`)return jr(r,i);var a=e.pstyle(t).pfValue,o=r/2,s=i/2;return Math.min(a,s,o)}},{key:`drawEdgeArrow`,value:function(e,t,n){if(e.visible()){var r=e._private.rscratch,i,a,o;if(n===`source`?(i=r.arrowStartX,a=r.arrowStartY,o=r.srcArrowAngle):(i=r.arrowEndX,a=r.arrowEndY,o=r.tgtArrowAngle),!(isNaN(i)||i==null||isNaN(a)||a==null||isNaN(o)||o==null)&&e.pstyle(n+`-arrow-shape`).value!==`none`){var s=e.pstyle(n+`-arrow-color`).value,c=e.pstyle(`opacity`).value*e.pstyle(`line-opacity`).value,l=e.pstyle(`width`).pfValue,u=e.pstyle(`arrow-scale`).value,d=this.r.getArrowWidth(l,u),f=this.instanceCount,p=this.transformBuffer.getMatrixView(f);Pm(p),Im(p,p,[i,a]),Rm(p,p,[d,d]),Lm(p,p,o),this.vertTypeBuffer.getView(f)[0]=eh,Sm(t,this.indexBuffer.getView(f)),xm(s,c,this.colorBuffer.getView(f)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:`drawEdgeLine`,value:function(e,t){if(e.visible()){var n=this._getEdgePoints(e);if(n){var r=e.pstyle(`opacity`).value,i=e.pstyle(`line-opacity`).value,a=e.pstyle(`width`).pfValue,o=e.pstyle(`line-color`).value,s=r*i;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var c=this.instanceCount;this.vertTypeBuffer.getView(c)[0]=Qm,Sm(t,this.indexBuffer.getView(c)),xm(o,s,this.colorBuffer.getView(c));var l=this.lineWidthBuffer.getView(c);l[0]=a;var u=this.pointAPointBBuffer.getView(c);u[0]=n[0],u[1]=n[1],u[2]=n[2],u[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var d=0;d=this.maxInstances&&this.endBatch()}}}}},{key:`_isValidEdge`,value:function(e){var t=e._private.rscratch;return!(t.badLine||t.allpts==null||isNaN(t.allpts[0]))}},{key:`_getEdgePoints`,value:function(e){var t=e._private.rscratch;if(this._isValidEdge(e)){var n=t.allpts;if(n.length==4)return n;var r=this._getNumSegments(e);return this._getCurveSegmentPoints(n,r)}}},{key:`_getNumSegments`,value:function(e){return Math.min(15,this.maxInstances)}},{key:`_getCurveSegmentPoints`,value:function(e,t){if(e.length==4)return e;for(var n=Array((t+1)*2),r=0;r<=t;r++)if(r==0)n[0]=e[0],n[1]=e[1];else if(r==t)n[r*2]=e[e.length-2],n[r*2+1]=e[e.length-1];else{var i=r/t;this._setCurvePoint(e,i,n,r*2)}return n}},{key:`_setCurvePoint`,value:function(e,t,n,r){if(e.length<=2)n[r]=e[0],n[r+1]=e[1];else{for(var i=Array(e.length-2),a=0;a0}},s=function(e){return e.pstyle(`text-events`).strValue===`yes`?Xm.USE_BB:Xm.IGNORE},c=function(e){var t=e.position(),n=t.x,r=t.y,i=e.outerWidth(),a=e.outerHeight();return{w:i,h:a,x1:n-i/2,y1:r-a/2}};n.drawing.addAtlasCollection(`node`,{texRows:e.webglTexRowsNodes}),n.drawing.addAtlasCollection(`label`,{texRows:e.webglTexRows}),n.drawing.addTextureAtlasRenderType(`node-body`,{collection:`node`,getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),n.drawing.addSimpleShapeRenderType(`node-body`,{getBoundingBox:c,isSimple:ym,shapeProps:{shape:`shape`,color:`background-color`,opacity:`background-opacity`,radius:`corner-radius`,border:!0}}),n.drawing.addSimpleShapeRenderType(`node-overlay`,{getBoundingBox:c,isVisible:o(`overlay`),shapeProps:{shape:`overlay-shape`,color:`overlay-color`,opacity:`overlay-opacity`,padding:`overlay-padding`,radius:`overlay-corner-radius`}}),n.drawing.addSimpleShapeRenderType(`node-underlay`,{getBoundingBox:c,isVisible:o(`underlay`),shapeProps:{shape:`underlay-shape`,color:`underlay-color`,opacity:`underlay-opacity`,padding:`underlay-padding`,radius:`underlay-corner-radius`}}),n.drawing.addTextureAtlasRenderType(`label`,{collection:`label`,getTexPickingMode:s,getKey:lh(t.getLabelKey,null),getBoundingBox:uh(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:i(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:a(`label`)}),n.drawing.addTextureAtlasRenderType(`edge-source-label`,{collection:`label`,getTexPickingMode:s,getKey:lh(t.getSourceLabelKey,`source`),getBoundingBox:uh(t.getSourceLabelBox,`source`),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:i(`source`),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:a(`source-label`)}),n.drawing.addTextureAtlasRenderType(`edge-target-label`,{collection:`label`,getTexPickingMode:s,getKey:lh(t.getTargetLabelKey,`target`),getBoundingBox:uh(t.getTargetLabelBox,`target`),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:i(`target`),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:a(`target-label`)});var l=st(function(){console.log(`garbage collect flag set`),n.data.gc=!0},1e4);n.onUpdateEleCalcs(function(e,t){var r=!1;t&&t.length>0&&(r|=n.drawing.invalidate(t)),r&&l()}),dh(n)};function sh(e){var t=e.cy.container();return pe(t&&t.style&&t.style.backgroundColor||`white`)}function ch(e,t){var n=e._private.rscratch;return Xt(n,`labelWrapCachedLines`,t)||[]}var lh=function(e,t){return function(n){var r=e(n),i=ch(n,t);return i.length>1?i.map(function(e,t){return`${r}_${t}`}):r}},uh=function(e,t){return function(n,r){var i=e(n);if(typeof r==`string`){var a=r.indexOf(`_`);if(a>0){var o=Number(r.substring(a+1)),s=ch(n,t),c=i.h/s.length,l=c*o,u=i.y1+l;return{x1:i.x1,w:i.w,y1:u,h:c,yOffset:l}}}return i}};function dh(e){var t=e.render;e.render=function(n){n||={};var r=e.cy;e.webgl&&(r.zoom()>ap?(fh(e),t.call(e,n)):(ph(e),Sh(e,n,Ym.SCREEN)))};var n=e.matchCanvasSize;e.matchCanvasSize=function(t){n.call(e,t),e.pickingFrameBuffer.setFramebufferAttachmentSizes(e.canvasWidth,e.canvasHeight),e.pickingFrameBuffer.needsDraw=!0},e.findNearestElements=function(t,n,r,i){return bh(e,t,n)};var r=e.invalidateCachedZSortedEles;e.invalidateCachedZSortedEles=function(){r.call(e),e.pickingFrameBuffer.needsDraw=!0};var i=e.notify;e.notify=function(t,n){i.call(e,t,n),t===`viewport`||t===`bounds`?e.pickingFrameBuffer.needsDraw=!0:t===`background`&&e.drawing.invalidate(n,{type:`node-body`})}}function fh(e){var t=e.data.contexts[e.WEBGL];t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}function ph(e){var t=function(t){t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.canvasWidth,e.canvasHeight),t.restore()};t(e.data.contexts[e.NODE]),t(e.data.contexts[e.DRAG])}function mh(e){var t=e.canvasWidth,n=e.canvasHeight,r=gm(e),i=r.pan,a=r.zoom,o=Nm();Im(o,o,[i.x,i.y]),Rm(o,o,[a,a]);var s=Nm();zm(s,t,n);var c=Nm();return Fm(c,s,o),c}function hh(e,t){var n=e.canvasWidth,r=e.canvasHeight,i=gm(e),a=i.pan,o=i.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,n,r),t.translate(a.x,a.y),t.scale(o,o)}function gh(e,t){e.drawSelectionRectangle(t,function(t){return hh(e,t)})}function _h(e){var t=e.data.contexts[e.NODE];t.save(),hh(e,t),t.strokeStyle=`rgba(0, 0, 0, 0.3)`,t.beginPath(),t.moveTo(-1e3,0),t.lineTo(1e3,0),t.stroke(),t.beginPath(),t.moveTo(0,-1e3),t.lineTo(0,1e3),t.stroke(),t.restore()}function vh(e){var t=function(t,n,r){for(var i=t.atlasManager.getAtlasCollection(n),a=e.data.contexts[e.NODE],o=i.atlases,s=0;s=0&&b.add(S)}return b}function bh(e,t,n){var r=yh(e,t,n),i=e.getCachedZSortedEles(),a,s,c=o(r),l;try{for(c.s();!(l=c.n()).done;){var u=i[l.value];if(!a&&u.isNode()&&(a=u),!s&&u.isEdge()&&(s=u),a&&s)break}}catch(e){c.e(e)}finally{c.f()}return[a,s].filter(Boolean)}function xh(e,t,n){var r=e.drawing;t+=1,n.isNode()?(r.drawNode(n,t,`node-underlay`),r.drawNode(n,t,`node-body`),r.drawTexture(n,t,`label`),r.drawNode(n,t,`node-overlay`)):(r.drawEdgeLine(n,t),r.drawEdgeArrow(n,t,`source`),r.drawEdgeArrow(n,t,`target`),r.drawTexture(n,t,`label`),r.drawTexture(n,t,`edge-source-label`),r.drawTexture(n,t,`edge-target-label`))}function Sh(e,t,n){var r;e.webglDebug&&(r=performance.now());var i=e.drawing,a=0;if(n.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&gh(e,t),e.data.canvasNeedsRedraw[e.NODE]||n.picking){var s=e.data.contexts[e.WEBGL];n.screen?(s.clearColor(0,0,0,0),s.enable(s.BLEND),s.blendFunc(s.ONE,s.ONE_MINUS_SRC_ALPHA)):s.disable(s.BLEND),s.clear(s.COLOR_BUFFER_BIT|s.DEPTH_BUFFER_BIT),s.viewport(0,0,s.canvas.width,s.canvas.height);var c=mh(e),l=e.getCachedZSortedEles();if(a=l.length,i.startFrame(c,n),n.screen){for(var u=0;u0&&a>0){f.clearRect(0,0,i,a),f.globalCompositeOperation=`source-over`;var p=this.getCachedZSortedEles();if(e.full)f.translate(-n.x1*c,-n.y1*c),f.scale(c,c),this.drawElements(f,p),f.scale(1/c,1/c),f.translate(n.x1*c,n.y1*c);else{var m=t.pan(),h={x:m.x*c,y:m.y*c};c*=t.zoom(),f.translate(h.x,h.y),f.scale(c,c),this.drawElements(f,p),f.scale(1/c,1/c),f.translate(-h.x,-h.y)}e.bg&&(f.globalCompositeOperation=`destination-over`,f.fillStyle=e.bg,f.rect(0,0,i,a),f.fill())}return d};function jh(e,t){for(var n=atob(e),r=new ArrayBuffer(n.length),i=new Uint8Array(r),a=0;a`u`?`undefined`:g(OffscreenCanvas))===`undefined`?(n=this.cy.window().document.createElement(`canvas`),n.width=e,n.height=t):n=new OffscreenCanvas(e,t),n},[Hp,Yp,nm,im,am,cm,um,oh,Ch,Ah,Ph].forEach(function(e){X($,e)});var Rh=[{type:`layout`,extensions:qd},{type:`renderer`,extensions:[{name:`null`,impl:Jd},{name:`base`,impl:Xf},{name:`canvas`,impl:Fh}]}],zh={},Bh={};function Vh(e,t,n){var r=n,i=function(n){zt("Can not register `"+t+"` for `"+e+"` since `"+n+"` already exists in the prototype and can not be overridden")};if(e===`core`){if(ad.prototype[t])return i(t);ad.prototype[t]=n}else if(e===`collection`){if(yu.prototype[t])return i(t);yu.prototype[t]=n}else if(e===`layout`){for(var a=function(e){this.options=e,n.call(this,e),O(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[],this.createEmitter()},o=a.prototype=Object.create(n.prototype),s=[],c=0;cMath.max(t,Math.min(n,e)),`clamp`),T=e((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),E=e(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`,`shouldMergeSelfLoopSegments`),D=e((e,t,n,r,i)=>{let a=[],o=new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof n?.x==`number`&&typeof n?.y==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof e?.x==`number`&&typeof e?.y==`number`&&a.push(e)})}),a.length===0)return T(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),c=s.x-t.x,l=s.y-t.y;return Math.abs(c)>Math.abs(l)?c>0?`right`:`left`:Math.abs(l)>0?l>0?`bottom`:`top`:T(i)},`getSelfLoopSide`),O=e((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,c=Math.max(36,Math.min(100,e.width*.8)),l=w(Math.max(r,e.width*.35),36,c),u=w(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-l/2,y:e},{x:i-l/2,y:e+u},{x:i+l/2,y:e+u},{x:i+l/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-l/2},{x:e+u,y:a-l/2},{x:e+u,y:a+l/2},{x:e,y:a+l/2}]}case`left`:{let e=i-o;return[{x:e,y:a-l/2},{x:e-u,y:a-l/2},{x:e-u,y:a+l/2},{x:e,y:a+l/2}]}default:{let e=a-s;return[{x:i-l/2,y:e},{x:i-l/2,y:e-u},{x:i+l/2,y:e-u},{x:i+l/2,y:e}]}}},`getSelfLoopPoints`),k=e((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,c=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+c/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-c/2-4}}},`getSelfLoopLabelPosition`),A=e((e,t=0,{mergeSelfLoops:n=!0}={})=>{let r=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(t=>{let a=e.edge(t);if(n&&a.selfLoop){let e=a.selfLoop.id;r.has(e)||r.set(e,[]),r.get(e).push({edge:a,start:t.v,end:t.w})}else i.push({edge:a,start:t.v,end:t.w})}),r.forEach(n=>{if(n.length!==3){n.forEach(e=>i.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,o,s]=n,c=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,l=e.node(c.start);if(!l){n.forEach(e=>i.push(e));return}let u={width:o.edge.width,height:o.edge.height},d=D(e,l,n,c.start,a),f=O(l,d,t,u.width??0),p=k(l,f,d,t,u),m={...o.edge,...c,id:c.id,points:f,start:c.start,end:c.end,x:p.x,y:p.y,width:u.width,height:u.height,labelStyle:o.edge.labelStyle,fromCluster:r.edge.fromCluster??o.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??o.edge.toCluster??s.edge.toCluster};delete m.selfLoop,delete m.originalEdge,i.push({edge:m,start:m.start,end:m.end})}),i},`getEdgesToRender`),j=e(async(n,i,c,d,g,_)=>{t.warn(`Graph in recursive render:XAX`,l(i),g);let y=i.graph().rankdir;t.trace(`Dir in recursive render - dir:`,y);let C=n.insert(`g`).attr(`class`,`root`);i.nodes()?t.info(`Recursive render XXX`,i.nodes()):t.info(`No nodes found for`,i),i.edges().length>0&&t.info(`Recursive edges`,i.edge(i.edges()[0]));let w=C.insert(`g`).attr(`class`,`clusters`),T=C.insert(`g`).attr(`class`,`edgePaths`),D=C.insert(`g`).attr(`class`,`edgeLabels`),O=C.insert(`g`).attr(`class`,`nodes`),k=E(c);await Promise.all(i.nodes().map(async function(e){let n=i.node(e);if(g!==void 0){let n=JSON.parse(JSON.stringify(g.clusterData));t.trace(`Setting data for parent cluster XXX - Node.id = `,e,` - data=`,n.height,` -Parent cluster`,g.height),i.setNode(g.id,n),i.parent(e)||(t.trace(`Setting parent`,e,g.id),i.setParent(e,g.id,n))}if(t.info(`(Insert) Node XXX`+e+`: `+JSON.stringify(i.node(e))),n?.clusterNode){t.info(`Cluster identified XBX`,e,n.width,i.node(e));let{ranksep:r,nodesep:a}=i.graph();n.graph.setGraph({...n.graph.graph(),ranksep:r+25,nodesep:a});let o=await j(O,n.graph,c,d,i.node(e),_),s=o.elem;v(n,s),n.diff=o.diff||0,t.info(`New compound node after recursive render XAX`,e,`width`,n.width,`height`,n.height),h(s,n)}else i.children(e).length>0?(t.trace(`Cluster - the non recursive path XBX`,e,n.id,n,n.width,`Graph:`,i),t.trace(s(n.id,i)),u.set(n.id,{id:s(n.id,i),node:n})):(t.trace(`Node - the non recursive path XAX`,e,O,i.node(e),y),await f(O,i.node(e),{config:_,dir:y}))})),await e(async()=>{let e=i.edges().map(async function(e){let n=i.edge(e.v,e.w,e.name);if(t.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(e)),t.info(`Edge `+e.v+` -> `+e.w+`: `,e,` `,JSON.stringify(i.edge(e))),t.info(`Fix`,u,`ids:`,e.v,e.w,`Translating: `,u.get(e.v),u.get(e.w)),k&&n.selfLoop){if(n.selfLoop.order!==1)return;let e=n.id;n.id=n.selfLoop.id,await b(D,n),n.id=e;return}await b(D,n)});await Promise.all(e)},`processEdges`)(),t.info(`Graph before layout:`,JSON.stringify(l(i))),t.info(`############################################# XXX`),t.info(`### Layout ### XXX`),t.info(`############################################# XXX`),a(i),t.info(`Graph after layout:`,JSON.stringify(l(i)));let M=0,{subGraphTitleTotalMargin:N}=r(_);await Promise.all(o(i).map(async function(e){let n=i.node(e);if(t.info(`Position XBX => `+e+`: (`+n.x,`,`+n.y,`) width: `,n.width,` height: `,n.height),n?.clusterNode)n.y+=N,t.info(`A tainted cluster node XBX1`,e,n.id,n.width,n.height,n.x,n.y,i.parent(e)),u.get(n.id).node=n,p(n);else if(i.children(e).length>0){t.info(`A pure cluster node XBX1`,e,n.id,n.x,n.y,n.width,n.height,i.parent(e)),n.height+=N,i.node(n.parentId);let r=n?.padding/2||0,a=n?.labelBBox?.height||0,o=a-r||0;t.debug(`OffsetY`,o,`labelHeight`,a,`halfPadding`,r),await m(w,n),u.get(n.id).node=n}else{let e=i.node(n.parentId);n.y+=N/2,t.info(`A regular node XBX1 - using the padding`,n.id,`parent`,n.parentId,n.width,n.height,n.x,n.y,`offsetY`,n.offsetY,`parent`,e,e?.offsetY,n),p(n)}}));let P=N/2;return A(i,P,{mergeSelfLoops:k}).forEach(function({edge:e,start:n,end:r}){t.info(`Edge `+n+` -> `+r+`: `+JSON.stringify(e),e),e.points.forEach(e=>e.y+=P);let a=i.node(n),o=i.node(r);x(e,S(T,e,u,c,a,o,d))}),i.nodes().forEach(function(e){let n=i.node(e);t.info(e,n.type,n.diff),n.isGroup&&(M=n.diff)}),t.warn(`Returning from recursive render XAX`,C,M),{elem:C,diff:M}},`recursiveRender`),M=e(async(e,r)=>{let a=new i({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=r.select(`g`);y(o,e.markers,e.type,e.diagramId),g(),C(),_(),c(),e.nodes.forEach(e=>{a.setNode(e.id,{...e}),e.parentId&&a.setParent(e.id,e.parentId)}),t.debug(`Edges:`,e.edges),e.edges.forEach(e=>{if(e.start===e.end){let t=e.start,n=t+`---`+t+`---1`,r=t+`---`+t+`---2`,i=a.node(t);a.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),a.setParent(n,i.parentId),a.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),a.setParent(r,i.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e),l=structuredClone(e);s.originalEdge=o,s.selfLoop={id:o.id,order:0},c.originalEdge=o,c.selfLoop={id:o.id,order:1},l.originalEdge=o,l.selfLoop={id:o.id,order:2},s.label=``,s.arrowTypeEnd=`none`,s.endLabelLeft=``,s.endLabelRight=``,s.startLabelLeft=``,s.id=t+`-cyclic-special-1`,c.startLabelRight=``,c.startLabelLeft=``,c.endLabelLeft=``,c.endLabelRight=``,c.arrowTypeStart=`none`,c.arrowTypeEnd=`none`,c.id=t+`-cyclic-special-mid`,l.label=``,l.startLabelRight=``,l.startLabelLeft=``,l.arrowTypeStart=`none`,i.isGroup&&(s.fromCluster=t,l.toCluster=t),l.id=t+`-cyclic-special-2`,l.arrowTypeStart=`none`,a.setEdge(t,n,s,t+`-cyclic-special-0`),a.setEdge(n,r,c,t+`-cyclic-special-1`),a.setEdge(r,t,l,t+`-cyclic-special-2`)}else a.setEdge(e.start,e.end,{...e},e.id)}),t.warn(`Graph at first:`,JSON.stringify(l(a))),d(a),t.warn(`Graph after XAX:`,JSON.stringify(l(a)));let s=n();await j(o,a,e.type,e.diagramId,void 0,s)},`render`);export{A as getEdgesToRender,M as render}; \ No newline at end of file diff --git a/dist-desktop/assets/dagre-dpRSp0QF.js b/dist-desktop/assets/dagre-dpRSp0QF.js deleted file mode 100644 index 2ba02d2..0000000 --- a/dist-desktop/assets/dagre-dpRSp0QF.js +++ /dev/null @@ -1 +0,0 @@ -import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,H as s,I as c,J as l,K as u,L as d,N as f,O as p,Q as m,S as h,T as g,U as _,V as v,W as ee,X as y,Y as te,Z as b,_ as ne,a as x,c as re,d as ie,et as S,f as C,h as ae,i as w,it as oe,k as se,m as ce,n as T,nt as le,o as E,p as ue,r as D,s as de,t as O,tt as fe,u as pe,z as me}from"./graphlib-DS17s2tU.js";import{a as he,c as k,d as ge,f as _e,i as ve,l as ye,n as be,o as xe,r as Se,s as Ce,t as A,u as we}from"./map-BaFkSB1l.js";var Te=/\s/;function Ee(e){for(var t=e.length;t--&&Te.test(e.charAt(t)););return t}var De=/^\s+/;function Oe(e){return e&&e.slice(0,Ee(e)+1).replace(De,``)}var ke=NaN,Ae=/^[-+]0x[0-9a-f]+$/i,je=/^0b[01]+$/i,Me=/^0o[0-7]+$/i,Ne=parseInt;function Pe(e){if(typeof e==`number`)return e;if(S(e))return ke;if(b(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=b(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Oe(e);var n=je.test(e);return n||Me.test(e)?Ne(e.slice(2),n?2:8):Ae.test(e)?ke:+e}var Fe=1/0,Ie=17976931348623157e292;function j(e){return e?(e=Pe(e),e===Fe||e===-Fe?(e<0?-1:1)*Ie:e===e?e:0):e===0?e:0}function Le(e){var t=j(e),n=t%1;return t===t?n?t-n:t:0}function M(e,t,n){if(!b(n))return!1;var r=typeof t;return(r==`number`?me(n)&&_(t,n.length):r==`string`&&t in n)?s(n[t],e):!1}function Re(e){return n(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&M(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r2?t[2]:void 0;for(i&&M(t[0],t[1],i)&&(r=1);++n-1?i[a?t[o]:o]:void 0}}var ct=Math.max;function lt(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:Le(n);return i<0&&(i=ct(r+i,0)),ee(e,C(t,3),i)}var F=st(lt);function ut(e,t){return e==null?e:ie(e,de(t),k)}function dt(e,t){return e&&pe(e,de(t))}function ft(e,t){return e>t}var pt=Object.prototype.hasOwnProperty;function mt(e,t){return e!=null&&pt.call(e,t)}function ht(e,t){return e!=null&&ae(e,t,mt)}var gt=`[object String]`;function _t(e){return typeof e==`string`||!m(e)&&fe(e)&&le(e)==gt}function vt(e,t){return et||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e=s?c:c*(n[r]==`desc`?-1:1)}return e.index-t.index}function wt(t,n,r){n=n.length?e(n,function(e){return m(e)?function(t){return g(t,e.length===1?e[0]:e)}:e}):[y];var i=-1;return n=e(n,o(C)),xt(be(t,function(t,r,a){return{criteria:e(n,function(e){return e(t)}),index:++i,value:t}}),function(e,t){return Ct(e,t,r)})}var Tt=ue(`length`),Et=`\\ud800-\\udfff`,Dt=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,Ot=`\\ufe0e\\ufe0f`,kt=`[`+Et+`]`,H=`[`+Dt+`]`,U=`\\ud83c[\\udffb-\\udfff]`,At=`(?:`+H+`|`+U+`)`,jt=`[^`+Et+`]`,Mt=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Nt=`[\\ud800-\\udbff][\\udc00-\\udfff]`,Pt=`\\u200d`,Ft=At+`?`,It=`[`+Ot+`]?`,Lt=`(?:`+Pt+`(?:`+[jt,Mt,Nt].join(`|`)+`)`+It+Ft+`)*`,Rt=It+Ft+Lt,zt=`(?:`+[jt+H+`?`,H,Mt,Nt,kt].join(`|`)+`)`,Bt=RegExp(U+`(?=`+U+`)|`+zt+Rt,`g`);function Vt(e){for(var t=Bt.lastIndex=0;Bt.test(e);)++t;return t}function Ht(e){return Je(e)?Vt(e):Tt(e)}function Ut(e,t){return bt(e,t,function(t,n){return ce(e,n)})}var W=ze(function(e,t){return e==null?{}:Ut(e,t)}),Wt=Math.ceil,Gt=Math.max;function Kt(e,t,n,r){for(var i=-1,a=Gt(Wt((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}function qt(e){return function(t,n,r){return r&&typeof r!=`number`&&M(t,n,r)&&(n=r=void 0),t=j(t),n===void 0?(n=t,t=0):n=j(n),r=r===void 0?t1&&M(e,t[0],t[1])?t=[]:n>2&&M(t[0],t[1],t[2])&&(t=[t[0]]),wt(e,r(t,1),[])}),Zt=0;function q(e){var t=++Zt;return p(e)+t}function Qt(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r0;--s)if(o=t[s].dequeue(),o){r=r.concat(J(e,t,n,o,!0));break}}}return r}function J(e,t,n,r,i){var a=i?[]:void 0;return E(e.inEdges(r.v),function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,cn(t,n,s)}),E(e.outEdges(r.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,cn(t,n,o)}),e.removeNode(r.v),a}function sn(e,t){var n=new O,r=0,i=0;E(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),E(e.edges(),function(e){var a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s),i=Math.max(i,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)});var a=G(i+r+3).map(function(){return new en}),o=r+1;return E(n.nodes(),function(e){cn(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function cn(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function ln(e){E(e.graph().acyclicer===`greedy`?an(e,t(e)):un(e),function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,q(`rev`))});function t(e){return function(t){return e.edge(t).weight}}}function un(e){var t=[],n={},r={};function i(a){Object.prototype.hasOwnProperty.call(r,a)||(r[a]=!0,n[a]=!0,E(e.outEdges(a),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return E(e.nodes(),i),t}function dn(e){E(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function Y(e,t,n,r){var i;do i=q(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function fn(e){var t=new O().setGraph(e.graph());return E(e.nodes(),function(n){t.setNode(n,e.node(n))}),E(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function pn(e){var t=new O({multigraph:e.isMultigraph()}).setGraph(e.graph());return E(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),E(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function mn(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function X(e){var t=A(G(vn(e)+1),function(){return[]});return E(e.nodes(),function(n){var r=e.node(n),i=r.rank;D(i)||(t[i][r.order]=n)}),t}function hn(e){var t=B(A(e.nodes(),function(t){return e.node(t).rank}));E(e.nodes(),function(n){var r=e.node(n);ht(r,`rank`)&&(r.rank-=t)})}function gn(e){var t=B(A(e.nodes(),function(t){return e.node(t).rank})),n=[];E(e.nodes(),function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)});var r=0,i=e.graph().nodeRankFactor;E(n,function(t,n){D(t)&&n%i!==0?--r:r&&E(t,function(t){e.node(t).rank+=r})})}function _n(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),Y(e,`border`,i,t)}function vn(e){return R(A(e.nodes(),function(t){var n=e.node(t).rank;if(!D(n))return n}))}function yn(e,t){var n={lhs:[],rhs:[]};return E(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function bn(e,t){var n=Qe();try{return t()}finally{console.log(e+` time: `+(Qe()-n)+`ms`)}}function xn(e,t){return t()}function Sn(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&E(r,t),Object.prototype.hasOwnProperty.call(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;ao.lim&&(s=o,c=!0),V(x(t.edges(),function(t){return c===tr(e,e.node(t.v),s)&&c!==tr(e,e.node(t.w),s)}),function(e){return Z(t,e)})}function Qn(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),Jn(e),Gn(e,t),$n(e,t)}function $n(e,t){var n=Wn(e,F(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),E(n,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function er(e,t,n){return e.hasEdge(t,n)}function tr(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}function nr(e){switch(e.graph().ranker){case`network-simplex`:ar(e);break;case`tight-tree`:ir(e);break;case`longest-path`:rr(e);break;default:ar(e)}}var rr=Fn;function ir(e){Fn(e),In(e)}function ar(e){$(e)}function or(e){var t=Y(e,`root`,{},`_root`),n=cr(e),r=R(w(n))-1,i=2*r+1;e.graph().nestingRoot=t,E(e.edges(),function(t){e.edge(t).minlen*=i});var a=lr(e)+1;E(e.children(),function(o){sr(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}function sr(e,t,n,r,i,a,o){var s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}var c=_n(e,`_bt`),l=_n(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,E(s,function(s){sr(e,t,n,r,i,a,s);var u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-a[o]+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}function cr(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&E(a,function(e){n(e,i+1)}),t[r]=i}return E(e.children(),function(e){n(e,1)}),t}function lr(e){return T(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function ur(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,E(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}function dr(e,t,n){var r={},i;E(n,function(n){for(var a=e.parent(n),o,s;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function fr(e,t,n){var r=pr(e),i=new O({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(t){return e.node(t)});return E(e.nodes(),function(a){var o=e.node(a),s=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),E(e[n](a),function(t){var n=t.v===a?t.w:t.v,r=i.edge(n,a),o=D(r)?0:r.weight;i.setEdge(n,a,{weight:e.edge(t).weight+o})}),Object.prototype.hasOwnProperty.call(o,`minRank`)&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function pr(e){for(var t;e.hasNode(t=q(`_root`)););return t}function mr(e,t){for(var n=0,r=1;r0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n})),c}function gr(e){var t={},n=x(e.nodes(),function(t){return!e.children(t).length}),r=A(G(R(A(n,function(t){return e.node(t).rank}))+1),function(){return[]});function i(n){ht(t,n)||(t[n]=!0,r[e.node(n).rank].push(n),E(e.successors(n),i))}return E(K(n,function(t){return e.node(t).rank}),i),r}function _r(e,t){return A(t,function(t){var n=e.inEdges(t);if(n.length){var r=T(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}else return{v:t}})}function vr(e,t){var n={};return E(e,function(e,t){var r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};D(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),E(t.edges(),function(e){var t=n[e.v],r=n[e.w];!D(t)&&!D(r)&&(r.indegree++,t.out.push(n[e.w]))}),yr(x(n,function(e){return!e.indegree}))}function yr(e){var t=[];function n(e){return function(t){t.merged||(D(t.barycenter)||D(e.barycenter)||t.barycenter>=e.barycenter)&&br(e,t)}}function r(t){return function(n){n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),E(i.in.reverse(),n(i)),E(i.out,r(i))}return A(x(t,function(e){return!e.merged}),function(e){return W(e,[`vs`,`i`,`barycenter`,`weight`])})}function br(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function xr(e,t){var n=yn(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),r=n.lhs,i=K(n.rhs,function(e){return-e.i}),a=[],o=0,s=0,c=0;r.sort(Cr(!!t)),c=Sr(a,i,c),E(r,function(e){c+=e.vs.length,a.push(e.vs),o+=e.barycenter*e.weight,s+=e.weight,c=Sr(a,i,c)});var l={vs:N(a)};return s&&(l.barycenter=o/s,l.weight=s),l}function Sr(e,t,n){for(var r;t.length&&(r=P(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Cr(e){return function(t,n){return t.barycentern.barycenter?1:e?n.i-t.i:t.i-n.i}}function wr(e,t,n,r){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,c={};o&&(i=x(i,function(e){return e!==o&&e!==s}));var l=_r(e,i);E(l,function(t){if(e.children(t.v).length){var i=wr(e,t.v,n,r);c[t.v]=i,Object.prototype.hasOwnProperty.call(i,`barycenter`)&&Er(t,i)}});var u=vr(l,n);Tr(u,c);var d=xr(u,r);if(o&&(d.vs=N([o,d.vs,s]),e.predecessors(o).length)){var f=e.node(e.predecessors(o)[0]),p=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(d,`barycenter`)||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+f.order+p.order)/(d.weight+2),d.weight+=2}return d}function Tr(e,t){E(e,function(e){e.vs=N(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function Er(e,t){D(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function Dr(e){var t=vn(e),n=Or(e,G(1,t+1),`inEdges`),r=Or(e,G(t-1,-1,-1),`outEdges`),i=gr(e);Ar(e,i);for(var a=1/0,o,s=0,c=0;c<4;++s,++c){kr(s%2?n:r,s%4>=2),i=X(e);var l=mr(e,i);lo||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function Nr(e){var t={},n=0;function r(i){var a=n;E(e.children(i),r),t[i]={low:a,lim:n++}}return E(e.children(),r),t}function Pr(e,t){var n={};function r(t,r){var i=0,a=0,o=t.length,s=P(r);return E(r,function(t,c){var l=Ir(e,t),u=l?e.node(l).order:o;(l||t===s)&&(E(r.slice(a,c+1),function(t){E(e.predecessors(t),function(r){var a=e.node(r),o=a.order;(oo)&&Lr(n,t,s)})})}function i(t,n){var i=-1,a,o=0;return E(n,function(s,c){if(e.node(s).dummy===`border`){var l=e.predecessors(s);l.length&&(a=e.node(l[0]).order,r(n,o,c,i,a),o=c,i=a)}r(n,o,n.length,a,t.length)}),n}return T(t,i),n}function Ir(e,t){if(e.node(t).dummy)return F(e.predecessors(t),function(t){return e.node(t).dummy})}function Lr(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function Rr(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function zr(e,t,n,r){var i={},a={},o={};return E(t,function(e){E(e,function(e,t){i[e]=e,a[e]=e,o[e]=t})}),E(t,function(e){var t=-1;E(e,function(e){var s=r(e);if(s.length){s=K(s,function(e){return o[e]});for(var c=(s.length-1)/2,l=Math.floor(c),u=Math.ceil(c);l<=u;++l){var d=s[l];a[e]===e&&t{var t=n(` buildLayoutGraph`,()=>si(e));n(` runLayout`,()=>Zr(t,n)),n(` updateInputGraph`,()=>Qr(e,t))})}function Zr(e,t){t(` makeSpaceForEdgeLabels`,()=>ci(e)),t(` removeSelfEdges`,()=>_i(e)),t(` acyclic`,()=>ln(e)),t(` nestingGraph.run`,()=>or(e)),t(` rank`,()=>nr(pn(e))),t(` injectEdgeLabelProxies`,()=>li(e)),t(` removeEmptyRanks`,()=>gn(e)),t(` nestingGraph.cleanup`,()=>ur(e)),t(` normalizeRanks`,()=>hn(e)),t(` assignRankMinMax`,()=>ui(e)),t(` removeEdgeLabelProxies`,()=>di(e)),t(` normalize.run`,()=>Mn(e)),t(` parentDummyChains`,()=>jr(e)),t(` addBorderSegments`,()=>Sn(e)),t(` order`,()=>Dr(e)),t(` insertSelfEdges`,()=>vi(e)),t(` adjustCoordinateSystem`,()=>wn(e)),t(` position`,()=>Jr(e)),t(` positionSelfEdges`,()=>yi(e)),t(` removeBorderNodes`,()=>gi(e)),t(` normalize.undo`,()=>Pn(e)),t(` fixupEdgeLabelCoords`,()=>mi(e)),t(` undoCoordinateSystem`,()=>Tn(e)),t(` translateGraph`,()=>fi(e)),t(` assignNodeIntersects`,()=>pi(e)),t(` reversePoints`,()=>hi(e)),t(` acyclic.undo`,()=>dn(e))}function Qr(e,t){E(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),E(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var $r=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],ei={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},ti=[`acyclicer`,`ranker`,`rankdir`,`align`],ni=[`width`,`height`],ri={width:0,height:0},ii=[`minlen`,`weight`,`width`,`height`,`labeloffset`],ai={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},oi=[`labelpos`];function si(e){var t=new O({multigraph:!0,compound:!0}),n=xi(e.graph());return t.setGraph(z({},ei,bi(n,$r),W(n,ti))),E(e.nodes(),function(n){var r=xi(e.node(n));t.setNode(n,tt(bi(r,ni),ri)),t.setParent(n,e.parent(n))}),E(e.edges(),function(n){var r=xi(e.edge(n));t.setEdge(n,z({},ai,bi(r,ii),W(r,oi)))}),t}function ci(e){var t=e.graph();t.ranksep/=2,E(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function li(e){E(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);Y(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}function ui(e){var t=0;E(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=R(t,r.maxRank))}),e.graph().maxRank=t}function di(e){E(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function fi(e){var t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){var a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}E(e.nodes(),function(t){c(e.node(t))}),E(e.edges(),function(t){var n=e.edge(t);Object.prototype.hasOwnProperty.call(n,`x`)&&c(n)}),t-=o,r-=s,E(e.nodes(),function(n){var i=e.node(n);i.x-=t,i.y-=r}),E(e.edges(),function(n){var i=e.edge(n);E(i.points,function(e){e.x-=t,e.y-=r}),Object.prototype.hasOwnProperty.call(i,`x`)&&(i.x-=t),Object.prototype.hasOwnProperty.call(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function pi(e){E(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(mn(r,a)),n.points.push(mn(i,o))})}function mi(e){E(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset;break}})}function hi(e){E(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function gi(e){E(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(P(n.borderLeft)),o=e.node(P(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),E(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function _i(e){E(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function vi(e){E(X(e),function(t){var n=0;E(t,function(t,r){var i=e.node(t);i.order=r+n,E(i.selfEdges,function(t){Y(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function yi(e){E(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function bi(e,t){return I(W(e,t),Number)}function xi(e){var t={};return E(e,function(e,n){t[n.toLowerCase()]=e}),t}export{Xr as t}; \ No newline at end of file diff --git a/dist-desktop/assets/defaultLocale-C8Fc0cco.js b/dist-desktop/assets/defaultLocale-C8Fc0cco.js deleted file mode 100644 index f76e162..0000000 --- a/dist-desktop/assets/defaultLocale-C8Fc0cco.js +++ /dev/null @@ -1 +0,0 @@ -function e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function t(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function n(e){return e=t(Math.abs(e)),e?e[1]:NaN}function r(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(n.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function i(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(e){if(!(t=a.exec(e)))throw Error(`invalid format: `+e);var t;return new s({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}o.prototype=s.prototype;function s(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}s.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type};function c(e){out:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var l;function u(e,n){var r=t(e,n);if(!r)return l=void 0,e.toPrecision(n);var i=r[0],a=r[1],o=a-(l=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,s=i.length;return o===s?i:o>s?i+Array(o-s+1).join(`0`):o>0?i.slice(0,o)+`.`+i.slice(o):`0.`+Array(1-o).join(`0`)+t(e,Math.max(0,n+o-1))[0]}function d(e,n){var r=t(e,n);if(!r)return e+``;var i=r[0],a=r[1];return a<0?`0.`+Array(-a).join(`0`)+i:i.length>a+1?i.slice(0,a+1)+`.`+i.slice(a+1):i+Array(a-i.length+2).join(`0`)}var f={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>d(e*100,t),r:d,s:u,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function p(e){return e}var m=Array.prototype.map,h=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`];function g(e){var t=e.grouping===void 0||e.thousands===void 0?p:r(m.call(e.grouping,Number),e.thousands+``),a=e.currency===void 0?``:e.currency[0]+``,s=e.currency===void 0?``:e.currency[1]+``,u=e.decimal===void 0?`.`:e.decimal+``,d=e.numerals===void 0?p:i(m.call(e.numerals,String)),g=e.percent===void 0?`%`:e.percent+``,_=e.minus===void 0?`−`:e.minus+``,v=e.nan===void 0?`NaN`:e.nan+``;function y(e,n){e=o(e);var r=e.fill,i=e.align,p=e.sign,m=e.symbol,y=e.zero,b=e.width,x=e.comma,S=e.precision,C=e.trim,w=e.type;w===`n`?(x=!0,w=`g`):f[w]||(S===void 0&&(S=12),C=!0,w=`g`),(y||r===`0`&&i===`=`)&&(y=!0,r=`0`,i=`=`);var T=(n&&n.prefix!==void 0?n.prefix:``)+(m===`$`?a:m===`#`&&/[boxX]/.test(w)?`0`+w.toLowerCase():``),E=(m===`$`?s:/[%p]/.test(w)?g:``)+(n&&n.suffix!==void 0?n.suffix:``),D=f[w],O=/[defgprs%]/.test(w);S=S===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function k(e){var n=T,a=E,o,s,f;if(w===`c`)a=D(e)+a,e=``;else{e=+e;var m=e<0||1/e<0;if(e=isNaN(e)?v:D(Math.abs(e),S),C&&(e=c(e)),m&&+e==0&&p!==`+`&&(m=!1),n=(m?p===`(`?p:_:p===`-`||p===`(`?``:p)+n,a=(w===`s`&&!isNaN(e)&&l!==void 0?h[8+l/3]:``)+a+(m&&p===`(`?`)`:``),O){for(o=-1,s=e.length;++of||f>57){a=(f===46?u+e.slice(o+1):e.slice(o))+a,e=e.slice(0,o);break}}}x&&!y&&(e=t(e,1/0));var g=n.length+e.length+a.length,k=g>1)+n+e+a+k.slice(g);break;default:e=k+n+e+a;break}return d(e)}return k.toString=function(){return e+``},k}function b(e,t){var r=Math.max(-8,Math.min(8,Math.floor(n(t)/3)))*3,i=10**-r,a=y((e=o(e),e.type=`f`,e),{suffix:h[8+r/3]});return function(e){return a(i*e)}}return{format:y,formatPrefix:b}}var _,v,y;b({thousands:`,`,grouping:[3],currency:[`$`,``]});function b(e){return _=g(e),v=_.format,y=_.formatPrefix,_}export{n as i,y as n,o as r,v as t}; \ No newline at end of file diff --git a/dist-desktop/assets/diagram-FQU43EPY-C8Vn5v8I.js b/dist-desktop/assets/diagram-FQU43EPY-C8Vn5v8I.js deleted file mode 100644 index 9aa866f..0000000 --- a/dist-desktop/assets/diagram-FQU43EPY-C8Vn5v8I.js +++ /dev/null @@ -1,3 +0,0 @@ -import{T as e}from"./chunk-KEIR6QF5-Dj-OpFgW.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-UMNXGZaF.js";import{H as i,K as a,U as o,Y as s,a as c,b as l,f as u,v as d,w as f,x as p,y as m,z as h}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{_ as g,i as ee,t as te}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as ne}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as re}from"./mermaid-parser.core-Z7xZAZRH.js";var _=`position frame`,v=`frame positioned`,y=`position relation`,b=`relation positioned`,ie=t(function(e){n.debug(`options str`,e)},`setOptions`),ae=t(function(){return{}},`getOptions`),oe=t(function(){x(),c()},`clear`);function x(){S={}}t(x,`reset`);var se=u.eventmodeling,ce=t(()=>ee({...se,...l().eventmodeling}),`getConfig`),S={};function C(){let e=le,{ast:t}=S,r=E();if(!t)throw Error(`No data for EventModel`);return t.frames.forEach((i,a)=>{let o=N(i,t.dataEntities,r);e=q(e,{$kind:_,index:a,frame:i,textProps:o});let s;B(i)?(n.debug(`source frame`,i.sourceFrames),s=t.frames.filter(e=>i.sourceFrames.some(t=>t.$refText===e.name)),s.forEach(t=>{e=q(e,{$kind:y,index:a,frame:i,sourceFrame:t})})):e=q(e,{$kind:y,index:a,frame:i})}),e={...e,sortedSwimlanesArray:L(e.swimlanes)},e}t(C,`getState`);function w(e){S.ast=e}t(w,`setAst`);var T={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:`bold`,boxTextPadding:10,swimlaneTextFontWeight:`bold`,labelUiAutomation:`UI/Automation`,labelUiAutomationPrefix:`UI/A: `,labelCommandReadModel:`Command/Read Model`,labelCommandReadModelPrefix:`C/RM: `,labelEvents:`Events`,labelEventsPrefix:`Stream: `};function E(){return T}t(E,`getDiagramProps`);var le={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function D(e){let t=e.split(`.`);if(t.length===2)return t[0]}t(D,`extractNamespace`);function O(e){let t=e.split(`.`);return t.length===2?t[1]:e}t(O,`extractName`);function k(e,t){if(!(!t||t.length===0))return Object.values(e).find(e=>e.namespace===t)}t(k,`findSwimlaneByNamespace`);function A(e,t,n){return Math.max(t,...Object.keys(e).filter(e=>{let r=Number.parseInt(e);return r>t&&rNumber.parseInt(e)))+1}t(A,`findNextAvailableIndex`);function j(e,t){let n=D(e.entityIdentifier),r=k(t,n);switch(e.modelEntityType){case`ui`:case`pcr`:case`processor`:return r?{index:r.index,label:r.namespace||T.labelUiAutomation}:n?{index:A(t,0,100),label:T.labelUiAutomationPrefix+n}:{index:0,label:T.labelUiAutomation};case`rmo`:case`readmodel`:case`cmd`:case`command`:return r?{index:r.index,label:r.namespace||T.labelCommandReadModel}:n?{index:A(t,100,200),label:T.labelCommandReadModelPrefix+n}:{index:100,label:T.labelCommandReadModel};default:return r?{index:r.index,label:r.namespace||T.labelEvents}:n?{index:A(t,200,300),label:T.labelEventsPrefix+n}:{index:200,label:T.labelEvents}}}t(j,`calculateSwimlaneProps`);function M(e){let{themeVariables:t}=l();switch(e.modelEntityType){case`ui`:return{fill:t.emUiFill??`white`,stroke:t.emUiStroke??`#dbdada`};case`pcr`:case`processor`:return{fill:t.emProcessorFill??`#edb3f6`,stroke:t.emProcessorStroke??`#b88cbf`};case`rmo`:case`readmodel`:return{fill:t.emReadModelFill??`#d3f1a2`,stroke:t.emReadModelStroke??`#a3b732`};case`cmd`:case`command`:return{fill:t.emCommandFill??`#bcd6fe`,stroke:t.emCommandStroke??`#679ac3`};case`evt`:case`event`:return{fill:t.emEventFill??`#ffb778`,stroke:t.emEventStroke??`#c19a0f`};default:return{fill:`red`,stroke:`black`}}}t(M,`calculateEntityVisualProps`);function N(e,t,r){let i=l(),a=h(O(e.entityIdentifier)??``,i),o,s={fontSize:16,fontWeight:700,fontFamily:`"trebuchet ms", verdana, arial, sans-serif`,joinWith:`
    `},c=`${g(a,r.textMaxWidth,s)}`;if(e.dataInlineValue&&(o=e.dataInlineValue,o=o.substring(o.indexOf(`{`)+1),o=o.substring(0,o.lastIndexOf(`}`)-1),o=h(o,i),o=g(o,r.textMaxWidth,s),o=o.replaceAll(` `,` `)),e.dataReference){let n=t.find(t=>t.name===e.dataReference?.$refText);n&&(o=n.dataBlockValue,o=o.substring(o.indexOf(`{ -`)+2),o=o.substring(0,o.lastIndexOf(`}`)-1),o=h(o,i),o=g(o,r.textMaxWidth,s),o=o.replaceAll(` `,` `),o+=`
    `)}let u=o!==void 0;u&&(c+=`

    ${o}`);let d={fontSize:s.fontSize,fontWeight:s.fontWeight,fontFamily:s.fontFamily},f=te(c,d),p=u?f.width/3:f.width,m={content:c,width:p,height:f.height};return n.debug(`[${e.name}] ${e.entityIdentifier} text`,m),m}t(N,`calculateTextProps`);function P(e,t){let n=t,r=M(n.frame),i={width:n.textProps.width+2*T.boxTextPadding,height:n.textProps.height+2*T.boxTextPadding};return[{$kind:v,frame:n.frame,index:n.index,visual:r,dimension:i,textProps:n.textProps}]}t(P,`decidePositionFrame`);function F(e,t,n){return t===void 0?T.contentStartX:t.index===e.index&&e.r?e.r+T.boxPadding:n===void 0?T.contentStartX:n.r-T.boxOverlap+T.boxPadding}t(F,`calculateX`);function I(e,t){let n=[...e.map(e=>e.r),t];return Math.max(...n)}t(I,`calculateMaxRight`);function L(e){return Object.values(e).sort((e,t)=>e.index-t.index)}t(L,`sortedSwimlanesArray`);function R(e,t){let n=t,r=j(n.frame,e.swimlanes),i;i=r.index in e.swimlanes?e.swimlanes[r.index]:{index:r.index,label:r.label,r:0,y:r.index*T.swimlaneMinHeight+T.swimlaneGap,height:T.swimlaneMinHeight,maxHeight:T.swimlaneMinHeight};let a=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,o=e.previousSwimlaneNumber===void 0?void 0:e.swimlanes[e.previousSwimlaneNumber],s={width:Math.max(T.boxMinWidth,Math.min(T.boxMaxWidth,n.dimension.width))+2*T.boxPadding,height:Math.max(T.boxMinHeight,Math.min(T.boxMaxHeight,n.dimension.height))+2*T.boxPadding},c=F(i,o,a),l=c+s.width+T.boxPadding,u=I(Object.values(e.swimlanes),l);i.r=c+s.width,i.maxHeight=Math.max(i.maxHeight,s.height),i.height=Math.max(T.swimlaneMinHeight,i.maxHeight)+2*T.swimlanePadding;let d={x:c,y:T.swimlanePadding+i.y,r:l,dimension:s,leftSibling:!1,swimlane:i,visual:n.visual,text:n.textProps.content,frame:n.frame,index:n.index},f={...e,boxes:[...e.boxes,d],swimlanes:{...e.swimlanes,[`${i.index}`]:i},previousSwimlaneNumber:r.index,previousFrame:n.frame,maxR:u},p=L(f.swimlanes);p.length>0&&(p[0].y=0);for(let e=1;e0}t(B,`hasSourceFrame`);function V(e,t){if(t!=null)return e.find(e=>e.frame.name===t.name)}t(V,`findBoxByFrame`);function H(e,t,n){if(!(n<0))for(let r=n;r>=0;r--){let n=e[r];if(n.swimlane.index!==t)return n}}t(H,`findBoxByLineIndex`);function U(t,n){let r=n;if(e(r.frame)||z(r.index,r.frame))return[];let i=V(t.boxes,r.frame);if(i===void 0)throw Error(`Target box not found for frame ${r.frame.name}`);let a;return a=r.sourceFrame?V(t.boxes,r.sourceFrame):H(t.boxes,i.swimlane.index,r.index-1),a===void 0?[]:[{$kind:b,frame:r.frame,index:r.index,sourceBox:a,targetBox:i}]}t(U,`decidePositionRelation`);function W(e,t){let n=t,r={visual:{fill:`none`,stroke:`#000`},source:{x:n.sourceBox.x,y:n.sourceBox.y},target:{x:n.targetBox.x,y:n.targetBox.y},sourceBox:n.sourceBox,targetBox:n.targetBox};return{...e,relations:[...e.relations,r]}}t(W,`evolveRelationPositioned`);var ue={[_]:P,[y]:U},de={[v]:R,[b]:W};function G(e,t){let r=ue[t.$kind];if(r==null)return[];let i=r(e,t);return n.debug(`decided events`,i),i}t(G,`decide`);function K(e,t){let r=t.reduce((e,t)=>{let n=de[t.$kind];return n==null?e:n(e,t)},e);return n.debug(`evolve events`,{state:e,newState:r,events:t}),r}t(K,`evolve`);function q(e,t){return K(e,G(e,t))}t(q,`dispatch`);var J={getConfig:ce,setOptions:ie,getOptions:ae,clear:oe,setAccTitle:o,getAccTitle:m,getAccDescription:d,setAccDescription:i,setDiagramTitle:a,getDiagramTitle:f,setAst:w,getDiagramProps:E,getState:C},fe={parse:t(async e=>{let t=await re(`eventmodeling`,e);n.debug(t),J.setAst(t),ne(t,J)},`parse`)},Y=p()?.eventmodeling;function X(e,t){return n=>{let r=n.swimlane.y+t.swimlanePadding,i=e.append(`g`).attr(`class`,`em-box`);i.append(`rect`).attr(`x`,n.x).attr(`y`,r).attr(`rx`,`3`).attr(`width`,n.dimension.width).attr(`height`,n.dimension.height).attr(`stroke`,n.visual.stroke).attr(`fill`,n.visual.fill),i.append(`foreignObject`).attr(`x`,n.x+t.boxPadding).attr(`y`,r+10).attr(`width`,n.dimension.width-2*t.boxPadding).attr(`height`,n.dimension.height-2*t.boxPadding).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`).append(`span`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(n.text)}}t(X,`renderD3Box`);function Z(e,t){return e>t}t(Z,`dirUpwards`);function Q(e,t,r,i){return a=>{let o=a.sourceBox.swimlane.y+t.swimlanePadding,s=a.targetBox.swimlane.y+t.swimlanePadding,c=Z(o,s),l=a.sourceBox.x+a.sourceBox.dimension.width*2/3,u=a.targetBox.x+a.targetBox.dimension.width/3,d,f;n.debug(`rendering relation up=${c} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),c?(d=o,f=s+a.targetBox.dimension.height):(d=o+a.sourceBox.dimension.height,f=s);let p=i.emRelationStroke??a.visual.stroke;e.append(`path`).attr(`class`,`em-relation`).attr(`fill`,a.visual.fill).attr(`stroke`,p).attr(`stroke-width`,`1`).attr(`marker-end`,`url(#${r})`).attr(`d`,`M${l} ${d} L${u} ${f}`)}}t(Q,`renderD3Relation`);function $(e,t,n,r){return i=>{let a=e.append(`g`).attr(`class`,`em-swimlane`),o=r.emSwimlaneBackgroundOdd??`rgb(250,250,250)`,s=r.emSwimlaneBackgroundStroke??`rgb(240,240,240)`;a.append(`rect`).attr(`x`,0).attr(`y`,i.y).attr(`rx`,`3`).attr(`width`,t+n.swimlanePadding).attr(`height`,i.height).attr(`fill`,o).attr(`stroke`,s),a.append(`text`).attr(`font-weight`,n.swimlaneTextFontWeight).attr(`x`,30).attr(`y`,i.y+30).text(i.label)}}t($,`renderD3Swimlane`);var pe={parser:fe,db:J,renderer:{draw:t(function(e,t,i,a){if(n.debug(`in eventmodeling renderer`,e+` -`,`id:`,t,i),!Y)throw Error(`EventModeling config not found`);let o=a.db,{themeVariables:c,eventmodeling:l}=p(),u=r(`[id="${t}"]`),d=o.getDiagramProps(),f=o.getState(),m=`em-arrowhead-${t}`,h=c.emArrowhead??`#000000`;f.sortedSwimlanesArray.forEach($(u,f.maxR,d,c)),f.boxes.forEach(X(u,d)),f.relations.forEach(Q(u,d,m,c)),u.append(`defs`).append(`marker`).attr(`id`,m).attr(`markerWidth`,`10`).attr(`markerHeight`,`7`).attr(`refX`,`10`).attr(`refY`,`3.5`).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0 0, 10 3.5, 0 7`).attr(`fill`,h),s(void 0,u,l?.padding??30,l?.useMaxWidth)},`draw`)},styles:t(e=>``,`getStyles`)};export{pe as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/diagram-G47NLZAW-B5XCVQOu.js b/dist-desktop/assets/diagram-G47NLZAW-B5XCVQOu.js deleted file mode 100644 index e6a7d73..0000000 --- a/dist-desktop/assets/diagram-G47NLZAW-B5XCVQOu.js +++ /dev/null @@ -1,24 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-UMNXGZaF.js";import{D as r,H as i,K as a,U as o,a as s,b as c,c as l,f as u,v as d,w as f,y as p}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as m}from"./ordinal-hYBb2elL.js";import{t as h}from"./defaultLocale-C8Fc0cco.js";import{i as g}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as _}from"./chunk-VAUOI2AC-AC9pRUsa.js";import{t as v}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as y}from"./mermaid-parser.core-Z7xZAZRH.js";import{t as b}from"./chunk-VR4S4FIN-BTo4eV3J.js";import{i as x,n as S}from"./chunk-C7G6YPKG-DW-1jWUA.js";function C(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function w(){return this.eachAfter(C)}function T(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function E(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function D(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o=0;)n+=r[i].value;t.value=n})}function A(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function j(e){for(var t=this,n=M(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function M(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function N(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function P(){return Array.from(this)}function F(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function I(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*L(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i=0;--s)i.push(a=o[s]=new W(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(U)}function z(){return R(this).eachBefore(H)}function B(e){return e.children}function V(e){return Array.isArray(e)?e[1]:null}function H(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function U(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function W(e){this.data=e,this.depth=this.height=0,this.parent=null}W.prototype=R.prototype={constructor:W,count:w,each:T,eachAfter:D,eachBefore:E,find:O,sum:k,sort:A,path:j,ancestors:N,descendants:P,leaves:F,links:I,copy:z,[Symbol.iterator]:L};function G(e){if(typeof e!=`function`)throw Error();return e}function K(){return 0}function q(e){return function(){return e}}function J(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function ee(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++sv&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p1?t:1)},n})(ne);function ae(){var e=ie,t=!1,n=1,r=1,i=[0],a=K,o=K,s=K,c=K,l=K;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(J),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d{S(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){s(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function X(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=e.cssCompiledStyles),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}e(X,`buildHierarchy`);var oe=e((t,n)=>{v(t,n);let r=[];for(let e of t.TreemapRows??[])e.$type===`ClassDefStatement`&&n.addClass(e.className??``,e.styleText??``);for(let e of t.TreemapRows??[]){let t=e.item;if(!t)continue;let i=e.indent?parseInt(e.indent):0,a=se(t),o=t.classSelector?n.getStylesForClass(t.classSelector):[],s=o.length>0?o:void 0,c={level:i,name:a,type:t.$type,value:t.value,classSelector:t.classSelector,cssCompiledStyles:s};r.push(c)}let i=X(r),a=e((e,t)=>{for(let r of e)n.addNode(r,t),r.children&&r.children.length>0&&a(r.children,t+1)},`addNodesRecursively`);a(i,0)},`populate`),se=e(e=>e.name?String(e.name):``,`getItemName`),Z={parser:{yy:void 0},parse:e(async e=>{try{let n=await y(`treemap`,e);t.debug(`Treemap AST:`,n);let r=Z.parser?.yy;if(!(r instanceof Y))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);oe(n,r)}catch(e){throw t.error(`Error parsing treemap:`,e),e}},`parse`)},ce=10,Q=10,$=25,le={draw:e((r,i,a,o)=>{let s=o.db,u=s.getConfig(),d=u.padding??ce,f=s.getDiagramTitle(),p=s.getRoot(),{themeVariables:g}=c();if(!p)return;let v=f?30:0,y=_(i),S=u.nodeWidth?u.nodeWidth*Q:960,C=u.nodeHeight?u.nodeHeight*Q:500,w=S,T=C+v;y.attr(`viewBox`,`0 0 ${w} ${T}`),l(y,T,w,u.useMaxWidth);let E;try{let t=u.valueFormat||`,`;if(t===`$0,0`)E=e(e=>`$`+h(`,`)(e),`valueFormat`);else if(t.startsWith(`$`)&&t.includes(`,`)){let n=/\.\d+/.exec(t),r=n?n[0]:``;E=e(e=>`$`+h(`,`+r)(e),`valueFormat`)}else if(t.startsWith(`$`)){let n=t.substring(1);E=e(e=>`$`+h(n||``)(e),`valueFormat`)}else E=h(t)}catch(e){t.error(`Error creating format function:`,e),E=h(`,`)}let D=m().range([`transparent`,g.cScale0,g.cScale1,g.cScale2,g.cScale3,g.cScale4,g.cScale5,g.cScale6,g.cScale7,g.cScale8,g.cScale9,g.cScale10,g.cScale11]),O=m().range([`transparent`,g.cScalePeer0,g.cScalePeer1,g.cScalePeer2,g.cScalePeer3,g.cScalePeer4,g.cScalePeer5,g.cScalePeer6,g.cScalePeer7,g.cScalePeer8,g.cScalePeer9,g.cScalePeer10,g.cScalePeer11]),k=m().range([g.cScaleLabel0,g.cScaleLabel1,g.cScaleLabel2,g.cScaleLabel3,g.cScaleLabel4,g.cScaleLabel5,g.cScaleLabel6,g.cScaleLabel7,g.cScaleLabel8,g.cScaleLabel9,g.cScaleLabel10,g.cScaleLabel11]);f&&y.append(`text`).attr(`x`,w/2).attr(`y`,v/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let A=y.append(`g`).attr(`transform`,`translate(0, ${v})`).attr(`class`,`treemapContainer`),j=R(p).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=ae().size([S,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=x({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`clip-path`,(e,t)=>`url(#clip-section-${i}-${t})`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+x({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=n(this),r=e.data.name;t.text(r);let i=e.x1-e.x0,a;a=u.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=r;for(;e.length>0;){if(e=r.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),u.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+x({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=F.length>20,L=I?16:38,z=I?14:28,B=I?4:8,V=I?4:6,H=I?2:4,U=I?8:10,W=I?1:2,G=A.selectAll(`.treemapLeafGroup`).data(F).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);G.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>x({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),G.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),G.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: ${L}px;fill:`+k(e.data.name)+`;`+x({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(e){let t=n(this),r=e.x1-e.x0,i=e.y1-e.y0,a=t.node(),o=r-2*H,s=i-2*H;if(oo&&c>B;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(V,Math.min(z,Math.round(c*l))),d=c+W+u;for(;d>s&&c>B&&(c--,u=Math.max(V,Math.min(z,Math.round(c*l))),!(uo||c(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: ${z}px;fill:`+k(e.data.name)+`;`+x({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(e){let t=n(this),r=this.parentNode;if(!r){t.style(`display`,`none`);return}let i=n(r).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(V,Math.min(z,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+W;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-2*H;t.node().getComputedTextLength()>u||s+o>l||o{let t=g(r(),c().themeVariables),n=g(ue,e),i=n.titleColor??t.titleColor,a=n.labelColor??t.textColor,o=n.valueColor??t.textColor;return` - .treemapNode.section { - stroke: ${n.sectionStrokeColor}; - stroke-width: ${n.sectionStrokeWidth}; - fill: ${n.sectionFillColor}; - } - .treemapNode.leaf { - stroke: ${n.leafStrokeColor}; - stroke-width: ${n.leafStrokeWidth}; - fill: ${n.leafFillColor}; - } - .treemapLabel { - fill: ${a}; - font-size: ${n.labelFontSize}; - } - .treemapValue { - fill: ${o}; - font-size: ${n.valueFontSize}; - } - .treemapTitle { - fill: ${i}; - font-size: ${n.titleFontSize}; - } - `},`getStyles`)};export{de as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/diagram-NH7WQ7WH-Btsva5Mx.js b/dist-desktop/assets/diagram-NH7WQ7WH-Btsva5Mx.js deleted file mode 100644 index 0d4adff..0000000 --- a/dist-desktop/assets/diagram-NH7WQ7WH-Btsva5Mx.js +++ /dev/null @@ -1,24 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-UMNXGZaF.js";import{H as n,K as r,U as i,a,b as o,c as s,f as c,v as l,w as u,y as d}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{i as f}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as p}from"./chunk-VAUOI2AC-AC9pRUsa.js";import{t as m}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as h}from"./mermaid-parser.core-Z7xZAZRH.js";var g=c.packet,_=class{constructor(){this.packet=[],this.setAccTitle=i,this.getAccTitle=d,this.setDiagramTitle=r,this.getDiagramTitle=u,this.getAccDescription=l,this.setAccDescription=n}static{e(this,`PacketDB`)}getConfig(){let e=f({...g,...o().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){a(),this.packet=[]}},v=1e4,y=e((e,n)=>{m(e,n);let r=-1,i=[],a=1,{bitsPerRow:o}=n.getConfig();for(let{start:s,end:c,bits:l,label:u}of e.blocks){if(s!==void 0&&c!==void 0&&c{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),x={parser:{yy:void 0},parse:e(async e=>{let n=await h(`packet`,e),r=x.parser?.yy;if(!(r instanceof _))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);t.debug(n),y(n,r)},`parse`)},S=e((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:c,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),m=o+c,h=m*(d.length+1)-(f?0:o),g=l*u+2,_=p(t);_.attr(`viewBox`,`0 0 ${g} ${h}`),s(_,h,g,a.useMaxWidth);for(let[e,t]of d.entries())C(_,t,e,a);_.append(`text`).text(f).attr(`x`,g/2).attr(`y`,h-m/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),C=e((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),w={draw:S},T={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},E={parser:x,get db(){return new _},renderer:w,styles:e(({packet:e}={})=>{let t=f(T,e);return` - .packetByte { - font-size: ${t.byteFontSize}; - } - .packetByte.start { - fill: ${t.startByteColor}; - } - .packetByte.end { - fill: ${t.endByteColor}; - } - .packetLabel { - fill: ${t.labelColor}; - font-size: ${t.labelFontSize}; - } - .packetTitle { - fill: ${t.titleColor}; - font-size: ${t.titleFontSize}; - } - .packetBlock { - stroke: ${t.blockStrokeColor}; - stroke-width: ${t.blockStrokeWidth}; - fill: ${t.blockFillColor}; - } - `},`styles`)};export{E as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/diagram-OA4YK3LP-B1b6NwZz.js b/dist-desktop/assets/diagram-OA4YK3LP-B1b6NwZz.js deleted file mode 100644 index 338e2b6..0000000 --- a/dist-desktop/assets/diagram-OA4YK3LP-B1b6NwZz.js +++ /dev/null @@ -1,30 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-UMNXGZaF.js";import{H as n,K as r,U as i,a,b as o,c as s,f as c,v as l,w as u,y as d,z as f}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{i as p}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as m}from"./chunk-VAUOI2AC-AC9pRUsa.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as g}from"./mermaid-parser.core-Z7xZAZRH.js";import{r as _,t as v}from"./chunk-HOUHSVGY-iJuv90UH.js";import{t as y}from"./chunk-2Q5K7J3B-C1jixKkw.js";var b=/[─━│┃└┗├┣]/,x=/[└┗├┣]/,S=/[─━]/,C=/^[\s│┃]+$/,w=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,T=/^\s*%%/,E=` `;function D(e){return e.some(e=>b.test(e))}e(D,`isBoxDrawingFormat`);function O(e){for(let t of e){let e=x.exec(t);if(e?.index&&e.index>0)return e.index}return 4}e(O,`inferSegmentWidth`);function k(e,t){return e.replace(/\bline\s+(\d+)\b/gi,(e,n)=>{let r=parseInt(n,10),i=t.get(r);return i?`line ${i}`:e})}e(k,`remapErrorLines`);function A(e){let t=e.split(` -`),n=new Map,r=-1;for(let[e,n]of t.entries())if(n.trim()===`treeView-beta`){r=e;break}if(r===-1)return{text:e,lineMap:n};let i=[];for(let e=r+1;e({cnt:1,stack:[{id:0,level:-1,name:`/`,nodeType:`directory`,children:[]}]})),M=e(()=>{j.reset(),a()},`clear`),N=e(()=>j.records.stack[0],`getRoot`),P=e(()=>j.records.cnt,`getCount`),F=c.treeView,I={clear:M,addNode:e((e,t,n,r,i,a)=>{for(;e<=j.records.stack[j.records.stack.length-1].level;)j.records.stack.pop();let o={id:j.records.cnt++,level:e,name:t,nodeType:n,icon:i,cssClass:r,description:a,children:[]};j.records.stack[j.records.stack.length-1].children.push(o),j.records.stack.push(o)},`addNode`),getRoot:N,getCount:P,getConfig:e(()=>p(F,o().treeView),`getConfig`),getAccTitle:d,getAccDescription:l,getDiagramTitle:u,setAccDescription:n,setAccTitle:i,setDiagramTitle:r},L=e(e=>{h(e,I);for(let t of e.nodes){let e=typeof t.indent==`number`?t.indent:0,n=t.name,r=n.endsWith(`/`);r&&(n=n.slice(0,-1));let i=r?`directory`:`file`,a=t.classAnnotation||void 0,s=t.iconAnnotation,c=s===void 0?void 0:s||`none`,l=t.descAnnotation||void 0,u=l?f(l,o()):void 0;I.addNode(e,n,i,a,c,u)}},`populate`),R={parse:e(async e=>{let{text:n,lineMap:r}=A(e);try{let e=await g(`treeView`,n);t.debug(e),L(e)}catch(e){throw r.size>0&&e instanceof Error&&(e.message=k(e.message,r)),e}},`parse`)},z={prefix:`mermaid-treeview`,height:24,width:24,icons:{folder:{body:``},file:{body:``}}};function B(e,t){let n=t?.filenameIcons?.[e];if(n)return n;let r=e.lastIndexOf(`.`);if(r>0){let n=e.substring(r).toLowerCase(),i=t?.extensionIcons;return i?.[n]??i?.[n.slice(1)]}}e(B,`detectIcon`);function V(e,t){return e.includes(`:`)?e:e in z.icons||!t?`${z.prefix}:${e}`:`${t}:${e}`}e(V,`qualifyIcon`);function H(e,t){if(e.icon!==`none`){if(e.icon)return V(e.icon,t.defaultIconPack);if(t.showIcons){if(e.nodeType===`file`){let n=B(e.name,t);if(n===`none`)return;if(n)return V(n,t.defaultIconPack)}return`${z.prefix}:${e.nodeType===`directory`?`folder`:`file`}`}}}e(H,`getNodeIcon`),_([{name:z.prefix,icons:z}]);var U=14,W=4,G=16,K=e((e,t)=>`tv-icon-${e}-${t.replace(/[^\w-]/g,`-`)}`,`iconSymbolId`),q=e(async(t,n,r,i)=>{let a=new Set,o=e(e=>{let t=H(e,r);t&&a.add(t),e.children.forEach(o)},`collect`);if(o(n),a.size===0)return;let s=await Promise.all([...a].map(async e=>({icon:e,svg:await v(e,{height:U,width:U})}))),c=t.append(`defs`);for(let{icon:e,svg:t}of s)c.append(`g`).attr(`id`,K(i,e)).html(t)},`injectIconDefs`),J=e((e,t,n,r,i,a)=>{let o=r.append(`g`),s=`treeView-node-label`;n.nodeType===`directory`&&(s+=` treeView-node-dir`),n.cssClass&&(s+=` ${n.cssClass}`);let c=U+W,l=H(n,i),u=l!==void 0;l&&o.append(`use`).attr(`xlink:href`,`#${K(a,l)}`).attr(`x`,e+i.paddingX).attr(`y`,t+i.paddingY).attr(`class`,`treeView-node-icon`);let d=o.append(`text`).text(n.name).attr(`dominant-baseline`,`middle`).attr(`class`,s),{height:f,width:p}=d.node().getBBox(),m=f+i.paddingY*2,h=e+i.paddingX+(u?c:0);d.attr(`x`,h),d.attr(`y`,t+m/2);let g=h+p;return n.BBox={x:e,y:t,width:p+i.paddingX*2+(u?c:0),height:m},n.cssClass?.split(/\s+/).includes(`highlight`)&&o.insert(`rect`,`:first-child`).attr(`x`,e).attr(`y`,t+1).attr(`width`,0).attr(`height`,m-2).attr(`rx`,3).attr(`class`,`treeView-highlight-bg`),{node:n,nodeGroup:o,labelRightEdge:g,centerY:t+m/2}},`positionLabel`),Y=e((e,t,n,r,i,a)=>e.append(`line`).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i).attr(`stroke-width`,a).attr(`class`,`treeView-node-line`),`positionLine`),X=e((t,n,r,i)=>{let a=0,o=0,s=[],c=e((e,t,n,r)=>{let c=r*(n.rowIndent+n.paddingX),l=J(c,a,t,e,n,i);s.push(l);let{height:u,width:d}=t.BBox;Y(e,c-n.rowIndent,a+u/2,c,a+u/2,n.lineThickness),o=Math.max(o,c+d),a+=u},`drawNode`),l=e((e,n=0)=>{c(t,e,r,n),e.children.forEach(e=>{l(e,n+1)});let{x:i,y:a,height:o}=e.BBox;if(e.children.length){let{y:n,height:s}=e.children[e.children.length-1].BBox;Y(t,i+r.paddingX,a+o,i+r.paddingX,n+s/2+r.lineThickness/2,r.lineThickness)}},`processNode`);l(n);let u=s.filter(e=>e.node.description);if(u.length>0){let e=Math.max(...s.map(e=>e.labelRightEdge))+G;for(let t of u){let n=t.nodeGroup.append(`text`).text(t.node.description).attr(`dominant-baseline`,`middle`).attr(`class`,`treeView-node-description`).attr(`x`,e).attr(`y`,t.centerY).node().getBBox();o=Math.max(o,e+n.width+r.paddingX)}}for(let e of s)if(e.node.cssClass?.split(/\s+/).includes(`highlight`)){let t=e.nodeGroup.select(`.treeView-highlight-bg`);if(!t.empty()){let n=o-e.node.BBox.x+8;t.attr(`width`,n),o=Math.max(o,e.node.BBox.x+n+2)}}return{totalHeight:a,totalWidth:o}},`drawTree`),Z={draw:e(async(e,n,r,i)=>{t.debug(`Rendering treeView diagram -`+e);let a=i.db,o=a.getRoot(),c=a.getConfig(),l=m(n);await q(l,o,c,n);let u=l.append(`g`);u.attr(`class`,`tree-view`);let{totalHeight:d,totalWidth:f}=X(u,o,c,n);l.attr(`viewBox`,`-${c.lineThickness/2} 0 ${f} ${d}`),s(l,d,f,c.useMaxWidth)},`draw`)},Q={labelFontSize:`16px`,labelColor:`black`,lineColor:`black`,iconColor:`#546e7a`,descriptionColor:`#6a9955`,highlightBg:`rgba(255, 193, 7, 0.15)`,highlightStroke:`#ffc107`},$={db:I,renderer:Z,parser:R,styles:e(({treeView:e})=>{let{labelFontSize:t,labelColor:n,lineColor:r,iconColor:i,descriptionColor:a,highlightBg:o,highlightStroke:s}=p(Q,e);return` - .treeView-node-label { - font-size: ${t}; - fill: ${n}; - white-space: pre; - } - .treeView-node-dir { - font-weight: bold; - } - .treeView-node-line { - stroke: ${r}; - } - .treeView-node-icon { - color: ${i}; - } - .treeView-node-description { - font-size: ${t}; - fill: ${a}; - font-style: italic; - white-space: pre; - } - .treeView-highlight-bg { - fill: ${o}; - stroke: ${s}; - stroke-width: 1; - } - `},`styles`)};export{$ as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/diagram-WEI45ONY-DzxhBgyP.js b/dist-desktop/assets/diagram-WEI45ONY-DzxhBgyP.js deleted file mode 100644 index bf57f53..0000000 --- a/dist-desktop/assets/diagram-WEI45ONY-DzxhBgyP.js +++ /dev/null @@ -1,41 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-UMNXGZaF.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{i as p}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as m}from"./chunk-VAUOI2AC-AC9pRUsa.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as g}from"./mermaid-parser.core-Z7xZAZRH.js";var _={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},v={axes:[],curves:[],options:_},y=structuredClone(v),b=l.radar,x=e(()=>p({...b,...s().radar}),`getConfig`),S=e(()=>y.axes,`getAxes`),C=e(()=>y.curves,`getCurves`),w=e(()=>y.options,`getOptions`),T=e(e=>{y.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),E=e(e=>{y.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:D(e.entries)}))},`setCurves`),D=e(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=S();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),O={getAxes:S,getCurves:C,getOptions:w,setAxes:T,setCurves:E,setOptions:e(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});y.options={showLegend:t.showLegend?.value??_.showLegend,ticks:t.ticks?.value??_.ticks,max:t.max?.value??_.max,min:t.min?.value??_.min,graticule:t.graticule?.value??_.graticule}},`setOptions`),getConfig:x,clear:e(()=>{o(),y=structuredClone(v)},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r},k=e(e=>{h(e,O);let{axes:t,curves:n,options:r}=e;O.setAxes(t),O.setCurves(n),O.setOptions(r)},`populate`),A={parse:e(async e=>{let n=await g(`radar`,e);t.debug(n),k(n)},`parse`)},j=e((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=M(m(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,p=Math.min(c.width,c.height)/2;N(u,a,p,s.ticks,s.graticule),P(u,a,p,c),F(u,a,o,f,d,s.graticule,c),R(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),M=e((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return c(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`).attr(`overflow`,`visible`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),N=e((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),P=e((e,t,n,r)=>{let i=t.length;for(let a=0;a.01?`start`:c<-.01?`end`:`middle`,d=l>.01?`hanging`:l<-.01?`auto`:`central`;e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*c+4*c).attr(`y`,n*r.axisLabelFactor*l+4*l).attr(`text-anchor`,u).attr(`dominant-baseline`,d).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function F(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=I(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,L(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}e(F,`drawCurves`);function I(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}e(I,`relativeRadius`);function L(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}e(R,`drawLegend`);var z={draw:j},B=e((e,t)=>{let n=``;for(let r=0;r{let t=p(n(),s().themeVariables);return{themeVariables:t,radarOptions:p(t.radar,e)}},`buildRadarStyleOptions`),H={parser:A,db:O,renderer:z,styles:e(({radar:e}={})=>{let{themeVariables:t,radarOptions:n}=V(e);return` - .radarTitle { - font-size: ${t.fontSize}; - color: ${t.titleColor}; - dominant-baseline: hanging; - text-anchor: middle; - } - .radarAxisLine { - stroke: ${n.axisColor}; - stroke-width: ${n.axisStrokeWidth}; - } - .radarAxisLabel { - font-size: ${n.axisLabelFontSize}px; - color: ${n.axisColor}; - } - .radarGraticule { - fill: ${n.graticuleColor}; - fill-opacity: ${n.graticuleOpacity}; - stroke: ${n.graticuleColor}; - stroke-width: ${n.graticuleStrokeWidth}; - } - .radarLegendText { - text-anchor: start; - font-size: ${n.legendFontSize}px; - dominant-baseline: hanging; - } - ${B(t,n)} - `},`styles`)};export{H as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/dist-qx0Iv9vM.js b/dist-desktop/assets/dist-qx0Iv9vM.js deleted file mode 100644 index d02cb33..0000000 --- a/dist-desktop/assets/dist-qx0Iv9vM.js +++ /dev/null @@ -1 +0,0 @@ -import{t as e}from"./rolldown-runtime-aKtaBQYM.js";var t=Math.abs,n=Math.atan2,r=Math.cos,i=Math.max,a=Math.min,o=Math.sin,s=Math.sqrt,c=1e-12,l=Math.PI,u=l/2,d=2*l;function f(e){return e>1?0:e<-1?l:Math.acos(e)}function p(e){return e>=1?u:e<=-1?-u:Math.asin(e)}var m=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[`.`,`/`],e.BLANK_URL=`about:blank`})),h=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=o;var t=m();function n(e){return t.relativeFirstCharacters.indexOf(e[0])>-1}function r(e){return e.replace(t.ctrlCharactersRegex,``).replace(t.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function i(e){return URL.canParse(e)}function a(e){try{return decodeURIComponent(e)}catch{return e}}function o(e){if(!e)return t.BLANK_URL;var o,s=a(e.trim());do s=r(s).replace(t.htmlCtrlEntityRegex,``).replace(t.ctrlCharactersRegex,``).replace(t.whitespaceEscapeCharsRegex,``).trim(),s=a(s),o=s.match(t.ctrlCharactersRegex)||s.match(t.htmlEntitiesRegex)||s.match(t.htmlCtrlEntityRegex)||s.match(t.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=s;if(!c)return t.BLANK_URL;if(n(c))return c;var l=c.trimStart(),u=l.match(t.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(d))return t.BLANK_URL;var f=l.replace(/\\/g,`/`);if(d===`mailto:`||d.includes(`://`))return f;if(d===`http:`||d===`https:`){if(!i(f))return t.BLANK_URL;var p=new URL(f);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return f}}));export{n as a,u as c,l as d,o as f,p as i,i as l,d as m,t as n,r as o,s as p,f as r,c as s,h as t,a as u}; \ No newline at end of file diff --git a/dist-desktop/assets/ebnfDiagram-CCIWWBDH-DiJBARG_.js b/dist-desktop/assets/ebnfDiagram-CCIWWBDH-DiJBARG_.js deleted file mode 100644 index bf5a450..0000000 --- a/dist-desktop/assets/ebnfDiagram-CCIWWBDH-DiJBARG_.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-U6XO7XAA-CR0BSRFR.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-UMNXGZaF.js";import"./chunk-WYO6CB5R-Dv5kDyQC.js";import"./chunk-VAUOI2AC-AC9pRUsa.js";import{n as r,r as i,t as a}from"./chunk-MOJQB5TN-Bju_yCKi.js";import{t as o}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as s}from"./mermaid-parser.core-Z7xZAZRH.js";var c=e().RailroadEbnf.parser.LangiumParser,l=t(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformChoice`),u=t(e=>{let t=e.elements.map(p);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=t(e=>{switch(e.$type){case`EbnfTerminal`:return{type:`terminal`,value:e.value};case`EbnfNonTerminal`:return{type:`nonterminal`,name:e.name};case`EbnfSpecial`:return{type:`special`,text:e.text};case`EbnfGroup`:return l(e.element);case`EbnfOptional`:return{type:`optional`,element:l(e.element)};case`EbnfRepetition`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported EBNF primary node: ${e.$type}`)}},`transformPrimary`),f=t((e,t)=>{switch(t.$type){case`EbnfOptionalPostfix`:return{type:`optional`,element:e};case`EbnfZeroOrMorePostfix`:return{type:`repetition`,element:e,min:0,max:1/0};case`EbnfOneOrMorePostfix`:return{type:`repetition`,element:e,min:1,max:1/0};case`EbnfExceptionPostfix`:return{type:`sequence`,elements:[e,{type:`terminal`,value:`-`},d(t.except)]};default:throw Error(`Unsupported EBNF postfix node: ${t.$type}`)}},`transformPostfix`),p=t(e=>e.postfixes.reduce((e,t)=>f(e,t),d(e.base)),`transformTerm`),m=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),h=t(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(m(e)))},`populateDb`),g={parser:{parse:t(e=>{a.clear(),n.debug(`[EBNF Parser] Starting Langium parse`);let t=c.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new s(t);let r=t.value;n.debug(`[EBNF Parser] Parsed rules:`,r.rules.length),h(r),n.debug(`[EBNF Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{g as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/erDiagram-Q63AITRT-BwmdWLsf.js b/dist-desktop/assets/erDiagram-Q63AITRT-BwmdWLsf.js deleted file mode 100644 index 9a5e629..0000000 --- a/dist-desktop/assets/erDiagram-Q63AITRT-BwmdWLsf.js +++ /dev/null @@ -1,85 +0,0 @@ -import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-UMNXGZaF.js";import{H as i,K as a,U as o,a as s,it as c,v as l,w as u,x as d,y as f}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as p}from"./channel-C4fgBBJ4.js";import{c as m,g as h}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import"./chunk-HOUHSVGY-iJuv90UH.js";import"./chunk-Q4XR5HBZ-CQ8zkLYc.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-D-nWYRNR.js";import{t as g}from"./chunk-XXDRQBXY-Bq6zMMOx.js";import{t as _}from"./chunk-VR4S4FIN-BTo4eV3J.js";import"./chunk-C7G6YPKG-DW-1jWUA.js";import"./chunk-ZGVPDNZ5-DGInJAPD.js";import"./chunk-52WLFC77-BOCvVCX1.js";import{r as v,t as y}from"./chunk-FWX5IMBZ-ComLEIwh.js";var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,23],c=[1,24],l=[1,25],u=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],h=[1,20],g=[1,18],_=[1,21],v=[1,22],y=[1,36],b=[1,37],x=[1,38],S=[1,39],C=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],T=[1,45],E=[1,46],D=[1,55],O=[40,48,50,51,52,71,72],k=[1,66],A=[1,64],j=[1,61],M=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],F=[66,67,68,69,70],I=[1,85],L=[1,84],R=[1,82],z=[1,83],B=[6,10,42,47],V=[6,10,13,41,42,47,48,49],H=[1,93],U=[1,92],W=[1,91],G=[19,58],K=[1,102],q=[1,101],J=[19,58,61,63],Y={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType:65,ZERO_OR_ONE:66,ZERO_OR_MORE:67,ONE_OR_MORE:68,ONLY_ONE:69,MD_PARENT:70,NON_IDENTIFYING:71,IDENTIFYING:72,WORD:73,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,13:`COLON`,15:`STYLE_SEPARATOR`,17:`BLOCK_START`,19:`BLOCK_STOP`,20:`SQS`,21:`SQE`,22:`title`,23:`title_value`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`direction_tb`,34:`direction_bt`,35:`direction_rl`,36:`direction_lr`,37:`CLASSDEF`,40:`UNICODE_TEXT`,41:`STYLE_TEXT`,42:`COMMA`,43:`CLASS`,44:`STYLE`,47:`SEMI`,48:`NUM`,49:`BRKT`,50:`ENTITY_NAME`,51:`DECIMAL_NUM`,52:`ENTITY_ONE`,58:`ATTRIBUTE_WORD`,59:`?`,61:`,`,62:`ATTRIBUTE_KEY`,63:`COMMENT`,66:`ZERO_OR_ONE`,67:`ZERO_OR_MORE`,68:`ONE_OR_MORE`,69:`ONLY_ONE`,70:`MD_PARENT`,71:`NON_IDENTIFYING`,72:`IDENTIFYING`,73:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection(`TB`);break;case 33:r.setDirection(`BT`);break;case 34:r.setDirection(`RL`);break;case 35:r.setDirection(`LR`);break;case 36:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 68:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 80:case 81:this.$=a[s].replace(/"/g,``);break;case 55:case 56:case 57:case 58:case 82:this.$=a[s];break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 65:case 67:case 70:this.$=a[s];break;case 66:this.$=a[s-1]+a[s];break;case 69:a[s-2].push(a[s]),this.$=a[s-2];break;case 71:this.$=a[s].replace(/"/g,``);break;case 72:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:30,11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},t(n,[2,5]),t(n,[2,6]),t(n,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:y,67:b,68:x,69:S,70:C}),{23:[1,41]},{25:[1,42]},{27:[1,43]},t(n,[2,27]),t(n,[2,28]),t(n,[2,29]),t(n,[2,30]),t(n,[2,31]),t(w,[2,54]),t(w,[2,55]),t(w,[2,56]),t(w,[2,57]),t(w,[2,58]),t(n,[2,32]),t(n,[2,33]),t(n,[2,34]),t(n,[2,35]),{16:44,40:T,41:E},{16:47,40:T,41:E},{16:48,40:T,41:E},t(n,[2,4]),{11:49,40:f,48:h,50:g,51:_,52:v},{16:50,40:T,41:E},{18:51,19:[1,52],53:53,54:54,58:D},{11:56,40:f,48:h,50:g,51:_,52:v},{65:57,71:[1,58],72:[1,59]},t(O,[2,73]),t(O,[2,74]),t(O,[2,75]),t(O,[2,76]),t(O,[2,77]),t(n,[2,24]),t(n,[2,25]),t(n,[2,26]),{13:k,38:60,41:A,42:j,45:62,46:63,48:M,49:N},t(P,[2,37]),t(P,[2,38]),{16:68,40:T,41:E,42:j},{13:k,38:69,41:A,42:j,45:62,46:63,48:M,49:N},{13:[1,70],15:[1,71]},t(n,[2,17],{64:35,12:72,17:[1,73],42:j,66:y,67:b,68:x,69:S,70:C}),{19:[1,74]},t(n,[2,14]),{18:75,19:[2,59],53:53,54:54,58:D},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:y,67:b,68:x,69:S,70:C},t(F,[2,78]),t(F,[2,79]),{6:I,10:L,39:81,42:R,47:z},{40:[1,86],41:[1,87]},t(B,[2,43],{46:88,13:k,41:A,48:M,49:N}),t(V,[2,45]),t(V,[2,50]),t(V,[2,51]),t(V,[2,52]),t(V,[2,53]),t(n,[2,41],{42:j}),{6:I,10:L,39:89,42:R,47:z},{14:90,40:H,50:U,73:W},{16:94,40:T,41:E},{11:95,40:f,48:h,50:g,51:_,52:v},{18:96,19:[1,97],53:53,54:54,58:D},t(n,[2,12]),{19:[2,60]},t(G,[2,61],{56:98,57:99,60:100,62:K,63:q}),t([19,58,62,63],[2,67]),{58:[2,66]},t(n,[2,22],{15:[1,104],17:[1,103]}),t([40,48,50,51,52],[2,72]),t(n,[2,36]),{13:k,41:A,45:105,46:63,48:M,49:N},t(n,[2,47]),t(n,[2,48]),t(n,[2,49]),t(P,[2,39]),t(P,[2,40]),t(V,[2,46]),t(n,[2,42]),t(n,[2,8]),t(n,[2,80]),t(n,[2,81]),t(n,[2,82]),{13:[1,106],42:j},{13:[1,108],15:[1,107]},{19:[1,109]},t(n,[2,15]),t(G,[2,62],{57:110,61:[1,111],63:q}),t(G,[2,63]),t(J,[2,68]),t(G,[2,71]),t(J,[2,70]),{18:112,19:[1,113],53:53,54:54,58:D},{16:114,40:T,41:E},t(B,[2,44],{46:88,13:k,41:A,48:M,49:N}),{14:115,40:H,50:U,73:W},{16:116,40:T,41:E},{14:117,40:H,50:U,73:W},t(n,[2,13]),t(G,[2,64]),{60:118,62:K},{19:[1,119]},t(n,[2,20]),t(n,[2,23],{17:[1,120],42:j}),t(n,[2,11]),{13:[1,121],42:j},t(n,[2,10]),t(J,[2,69]),t(n,[2,18]),{18:122,19:[1,123],53:53,54:54,58:D},{14:124,40:H,50:U,73:W},{19:[1,125]},t(n,[2,21]),t(n,[2,9]),t(n,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};Y.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return this.begin(`acc_title`),24;case 1:return this.popState(),`acc_title_value`;case 2:return this.begin(`acc_descr`),26;case 3:return this.popState(),`acc_descr_value`;case 4:this.begin(`acc_descr_multiline`);break;case 5:this.popState();break;case 6:return`acc_descr_multiline_value`;case 7:return 33;case 8:return 34;case 9:return 35;case 10:return 36;case 11:return 10;case 12:break;case 13:return 8;case 14:return 50;case 15:return 73;case 16:return 4;case 17:return this.begin(`block`),17;case 18:return 49;case 19:return 49;case 20:return 42;case 21:return 15;case 22:return 13;case 23:break;case 24:return 62;case 25:return 58;case 26:return 58;case 27:this.begin(`block_bq`);break;case 28:return 58;case 29:this.popState();break;case 30:return 63;case 31:break;case 32:return this.popState(),19;case 33:return t.yytext[0];case 34:return 20;case 35:return 21;case 36:return this.begin(`style`),44;case 37:return this.popState(),10;case 38:break;case 39:return 13;case 40:return 42;case 41:return 49;case 42:return this.begin(`style`),37;case 43:return 43;case 44:return 66;case 45:return 68;case 46:return 68;case 47:return 68;case 48:return 66;case 49:return 66;case 50:return 67;case 51:return 67;case 52:return 67;case 53:return 67;case 54:return 67;case 55:return 68;case 56:return 67;case 57:return 68;case 58:return 69;case 59:return 69;case 60:return 51;case 61:return 69;case 62:return 69;case 63:return 69;case 64:return 52;case 65:return 48;case 66:return 69;case 67:return 66;case 68:return 67;case 69:return 68;case 70:return 70;case 71:return 71;case 72:return 72;case 73:return 72;case 74:return 71;case 75:return 71;case 76:return 71;case 77:return 41;case 78:return 47;case 79:return 40;case 80:return t.yytext[0];case 81:return 6}},`anonymous`),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[37,38,39,40,41,77,78],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[28,29],inclusive:!1},block:{rules:[23,24,25,26,27,30,31,32,33],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,34,35,36,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,79,80,81],inclusive:!0}}}})();function X(){this.yy={}}return e(X,`Parser`),X.prototype=Y,Y.Parser=X,new X})();b.parser=b;var x=b,S=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.direction=`TB`,this.Cardinality={ZERO_OR_ONE:`ZERO_OR_ONE`,ZERO_OR_MORE:`ZERO_OR_MORE`,ONE_OR_MORE:`ONE_OR_MORE`,ONLY_ONE:`ONLY_ONE`,MD_PARENT:`MD_PARENT`},this.Identification={NON_IDENTIFYING:`NON_IDENTIFYING`,IDENTIFYING:`IDENTIFYING`},this.setAccTitle=o,this.getAccTitle=f,this.setAccDescription=i,this.getAccDescription=l,this.setDiagramTitle=a,this.getDiagramTitle=u,this.getConfig=e(()=>d().er,`getConfig`),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{e(this,`ErDB`)}addEntity(e,t=``){return this.entities.has(e)?!this.entities.get(e)?.alias&&t&&(this.entities.get(e).alias=t,n.info(`Add alias '${t}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,label:e,attributes:[],alias:t,shape:`erBox`,look:d().look??`default`,cssClasses:`default`,cssStyles:[],labelType:`markdown`}),n.info(`Added new entity :`,e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,t){let r=this.addEntity(e),i;for(i=t.length-1;i>=0;i--)t[i].keys||(t[i].keys=[]),t[i].comment||(t[i].comment=``),r.attributes.push(t[i]),n.debug(`Added attribute `,t[i].name)}addRelationship(e,t,r,i){let a=this.entities.get(e),o=this.entities.get(r);if(!a||!o)return;let s={entityA:a.id,roleA:t,entityB:o.id,relSpec:i};this.relationships.push(s),n.debug(`Added new relationship :`,s)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let t=[];for(let n of e){let e=this.classes.get(n);e?.styles&&(t=[...t,...e.styles??[]].map(e=>e.trim())),e?.textStyles&&(t=[...t,...e.textStyles??[]].map(e=>e.trim()))}return t}addCssStyles(e,t){for(let n of e){let e=this.entities.get(n);if(!t||!e)return;for(let n of t)e.cssStyles.push(n)}}addClass(e,t){e.forEach(e=>{let n=this.classes.get(e);n===void 0&&(n={id:e,styles:[],textStyles:[]},this.classes.set(e,n)),t&&t.forEach(function(e){if(/color/.exec(e)){let t=e.replace(`fill`,`bgFill`);n.textStyles.push(t)}n.styles.push(e)})})}setClass(e,t){for(let n of e){let e=this.entities.get(n);if(e)for(let n of t)e.cssClasses+=` `+n}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],s()}getData(){let e=[],t=[],n=d(),r=0;for(let t of this.entities.keys()){let n=this.entities.get(t);n&&(n.cssCompiledStyles=this.getCompiledStyles(n.cssClasses.split(` `)),n.colorIndex=r++,e.push(n))}let i=0;for(let e of this.relationships){let r={id:m(e.entityA,e.entityB,{prefix:`id`,counter:i++}),type:`normal`,curve:`basis`,start:e.entityA,end:e.entityB,label:e.roleA,labelpos:`c`,thickness:`normal`,classes:`relationshipLine`,arrowTypeStart:e.relSpec.cardB.toLowerCase(),arrowTypeEnd:e.relSpec.cardA.toLowerCase(),pattern:e.relSpec.relType==`IDENTIFYING`?`solid`:`dashed`,look:n.look,labelType:`markdown`};t.push(r)}return{nodes:e,edges:t,other:{},config:n,direction:`TB`}}},C={};t(C,{draw:()=>w});var w=e(async function(e,t,i,a){n.info(`REF0:`),n.info(`Drawing er diagram (unified)`,t);let{securityLevel:o,er:s,layout:c}=d(),l=a.db.getData(),u=g(t,o);l.type=a.type,l.layoutAlgorithm=y(c),l.config.flowchart.nodeSpacing=s?.nodeSpacing||140,l.config.flowchart.rankSpacing=s?.rankSpacing||80,l.direction=a.db.getDirection();let{config:f}=l,{look:p}=f;p===`neo`?l.markers=[`only_one_neo`,`zero_or_one_neo`,`one_or_more_neo`,`zero_or_more_neo`]:l.markers=[`only_one`,`zero_or_one`,`one_or_more`,`zero_or_more`],l.diagramId=t,await v(l,u),l.layoutAlgorithm===`elk`&&u.select(`.edges`).lower();let m=u.selectAll(`[id*="-background"]`);Array.from(m).length>0&&m.each(function(){let e=r(this),t=e.attr(`id`).replace(`-background`,``),n=u.select(`#${CSS.escape(t)}`);if(!n.empty()){let t=n.attr(`transform`);e.attr(`transform`,t)}}),h.insertTitle(u,`erDiagramTitleText`,s?.titleTopMargin??25,a.db.getDiagramTitle()),_(u,8,`erDiagram`,s?.useMaxWidth??!0)},`draw`),T=e((e,t)=>{let n=p;return c(n(e,`r`),n(e,`g`),n(e,`b`),t)},`fade`),E=new Set([`redux-color`,`redux-dark-color`]),D=e(e=>{let{theme:t,look:n,bkgColorArray:r,borderColorArray:i}=e;if(!E.has(t))return``;let a=r?.length>0,o=``;for(let t=0;t{let{look:t,theme:n,erEdgeLabelBackground:r,strokeWidth:i}=e;return` - ${D(e)} - .entityBox { - fill: ${e.mainBkg}; - stroke: ${e.nodeBorder}; - } - - .relationshipLabelBox { - fill: ${e.tertiaryColor}; - opacity: 0.7; - background-color: ${e.tertiaryColor}; - rect { - opacity: 0.5; - } - } - - .labelBkg { - background-color: ${E.has(n)&&r?r:T(e.tertiaryColor,.5)}; - } - - .edgeLabel { - background-color: ${E.has(n)&&r?r:e.edgeLabelBackground}; - } - .edgeLabel .label rect { - fill: ${E.has(n)&&r?r:e.edgeLabelBackground}; - } - .edgeLabel .label text { - fill: ${e.textColor}; - } - - .edgeLabel .label { - fill: ${e.nodeBorder}; - font-size: 14px; - } - - .label { - font-family: ${e.fontFamily}; - color: ${e.nodeTextColor||e.textColor}; - } - - .edge-pattern-dashed { - stroke-dasharray: 8,8; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon - { - fill: ${e.mainBkg}; - stroke: ${e.nodeBorder}; - stroke-width: ${t===`neo`?i:`1px`}; - } - - .relationshipLine { - stroke: ${e.lineColor}; - stroke-width: ${t===`neo`?i:`1px`}; - fill: none; - } - - .marker { - fill: none !important; - stroke: ${e.lineColor} !important; - stroke-width: 1; - } - [data-look=neo].labelBkg { - background-color: ${T(e.tertiaryColor,.5)}; - } -`},`getStyles`)};export{O as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/eventmodeling-45OFAUF4-Dp0gpjhg.js b/dist-desktop/assets/eventmodeling-45OFAUF4-Dp0gpjhg.js deleted file mode 100644 index 6ab9ed1..0000000 --- a/dist-desktop/assets/eventmodeling-45OFAUF4-Dp0gpjhg.js +++ /dev/null @@ -1 +0,0 @@ -import"./chunk-KEIR6QF5-Dj-OpFgW.js";import{n as e}from"./chunk-5JV3BV7I-DKfYBAeY.js";export{e as createEventModelingServices}; \ No newline at end of file diff --git a/dist-desktop/assets/flowDiagram-23GEKE2U-mMOyit70.js b/dist-desktop/assets/flowDiagram-23GEKE2U-mMOyit70.js deleted file mode 100644 index 9be8115..0000000 --- a/dist-desktop/assets/flowDiagram-23GEKE2U-mMOyit70.js +++ /dev/null @@ -1 +0,0 @@ -import"./src-UMNXGZaF.js";import"./chunk-WYO6CB5R-Dv5kDyQC.js";import"./chunk-ICXQ74PX-Czpgj8Uw.js";import"./chunk-HOUHSVGY-iJuv90UH.js";import"./chunk-Q4XR5HBZ-CQ8zkLYc.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-D-nWYRNR.js";import"./chunk-32BRIVSS-DWU3ezKg.js";import"./chunk-XXDRQBXY-Bq6zMMOx.js";import"./chunk-VR4S4FIN-BTo4eV3J.js";import"./chunk-C7G6YPKG-DW-1jWUA.js";import"./chunk-ZGVPDNZ5-DGInJAPD.js";import"./chunk-52WLFC77-BOCvVCX1.js";import"./chunk-FWX5IMBZ-ComLEIwh.js";import"./chunk-ZIRB5QZD-C6fEPe3t.js";import{n as e}from"./chunk-PUDLZKDR-hlw4TonS.js";export{e as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/ganttDiagram-NO4QXBWP-BFiNAWzu.js b/dist-desktop/assets/ganttDiagram-NO4QXBWP-BFiNAWzu.js deleted file mode 100644 index 105834d..0000000 --- a/dist-desktop/assets/ganttDiagram-NO4QXBWP-BFiNAWzu.js +++ /dev/null @@ -1,292 +0,0 @@ -import{i as e,t}from"./rolldown-runtime-aKtaBQYM.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{a as r,c as i,d as a,f as o,g as s,i as c,m as l,p as u,s as d,u as f}from"./src-UMNXGZaF.js";import{H as p,K as m,U as h,a as g,c as _,s as v,v as y,w as b,x,y as S}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{a as C,i as w,n as T,r as E,t as D}from"./linear-DhAcoVP9.js";import{t as O}from"./init-D6jRqBbL.js";import{t as k}from"./dist-qx0Iv9vM.js";import{g as ee}from"./chunk-ICXQ74PX-Czpgj8Uw.js";function A(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function te(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function ne(e){return e}var j=1,re=2,ie=3,ae=4,oe=1e-6;function se(e){return`translate(`+e+`,0)`}function ce(e){return`translate(0,`+e+`)`}function le(e){return t=>+e(t)}function ue(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function de(){return!this.__axis}function fe(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,c=typeof window<`u`&&window.devicePixelRatio>1?0:.5,l=e===j||e===ae?-1:1,u=e===ae||e===re?`x`:`y`,d=e===j||e===ie?se:ce;function f(f){var p=r??(t.ticks?t.ticks.apply(t,n):t.domain()),m=i??(t.tickFormat?t.tickFormat.apply(t,n):ne),h=Math.max(a,0)+s,g=t.range(),_=+g[0]+c,v=+g[g.length-1]+c,y=(t.bandwidth?ue:le)(t.copy(),c),b=f.selection?f.selection():f,x=b.selectAll(`.domain`).data([null]),S=b.selectAll(`.tick`).data(p,t).order(),C=S.exit(),w=S.enter().append(`g`).attr(`class`,`tick`),T=S.select(`line`),E=S.select(`text`);x=x.merge(x.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),S=S.merge(w),T=T.merge(w.append(`line`).attr(`stroke`,`currentColor`).attr(u+`2`,l*a)),E=E.merge(w.append(`text`).attr(`fill`,`currentColor`).attr(u,l*h).attr(`dy`,e===j?`0em`:e===ie?`0.71em`:`0.32em`)),f!==b&&(x=x.transition(f),S=S.transition(f),T=T.transition(f),E=E.transition(f),C=C.transition(f).attr(`opacity`,oe).attr(`transform`,function(e){return isFinite(e=y(e))?d(e+c):this.getAttribute(`transform`)}),w.attr(`opacity`,oe).attr(`transform`,function(e){var t=this.parentNode.__axis;return d((t&&isFinite(t=t(e))?t:y(e))+c)})),C.remove(),x.attr(`d`,e===ae||e===re?o?`M`+l*o+`,`+_+`H`+c+`V`+v+`H`+l*o:`M`+c+`,`+_+`V`+v:o?`M`+_+`,`+l*o+`V`+c+`H`+v+`V`+l*o:`M`+_+`,`+c+`H`+v),S.attr(`opacity`,1).attr(`transform`,function(e){return d(y(e)+c)}),T.attr(u+`2`,l*a),E.attr(u,l*h).text(m),b.filter(de).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===re?`start`:e===ae?`end`:`middle`),b.each(function(){this.__axis=y})}return f.scale=function(e){return arguments.length?(t=e,f):t},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),f):n.slice()},f.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),f):r&&r.slice()},f.tickFormat=function(e){return arguments.length?(i=e,f):i},f.tickSize=function(e){return arguments.length?(a=o=+e,f):a},f.tickSizeInner=function(e){return arguments.length?(a=+e,f):a},f.tickSizeOuter=function(e){return arguments.length?(o=+e,f):o},f.tickPadding=function(e){return arguments.length?(s=+e,f):s},f.offset=function(e){return arguments.length?(c=+e,f):c},f}function pe(e){return fe(j,e)}function me(e){return fe(ie,e)}var he=Math.PI/180,ge=180/Math.PI,_e=18,ve=.96422,ye=1,be=.82521,xe=4/29,Se=6/29,Ce=3*Se*Se,we=Se*Se*Se;function Te(e){if(e instanceof M)return new M(e.l,e.a,e.b,e.opacity);if(e instanceof N)return Ne(e);e instanceof i||(e=f(e));var t=Ae(e.r),n=Ae(e.g),r=Ae(e.b),a=De((.2225045*t+.7168786*n+.0606169*r)/ye),o,s;return t===n&&n===r?o=s=a:(o=De((.4360747*t+.3850649*n+.1430804*r)/ve),s=De((.0139322*t+.0971045*n+.7141733*r)/be)),new M(116*a-16,500*(o-a),200*(a-s),e.opacity)}function Ee(e,t,n,r){return arguments.length===1?Te(e):new M(e,t,n,r??1)}function M(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}a(M,Ee,o(d,{brighter(e){return new M(this.l+_e*(e??1),this.a,this.b,this.opacity)},darker(e){return new M(this.l-_e*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=ve*Oe(t),e=ye*Oe(e),n=be*Oe(n),new i(ke(3.1338561*t-1.6168667*e-.4906146*n),ke(-.9787684*t+1.9161415*e+.033454*n),ke(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function De(e){return e>we?e**(1/3):e/Ce+xe}function Oe(e){return e>Se?e*e*e:Ce*(e-xe)}function ke(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function Ae(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function je(e){if(e instanceof N)return new N(e.h,e.c,e.l,e.opacity);if(e instanceof M||(e=Te(e)),e.a===0&&e.b===0)return new N(NaN,0(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(sP(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(Le.setTime(+t),Re.setTime(+r),e(Le),e(Re),Math.floor(n(Le,Re))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var ze=P(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ze.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?P(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):ze),ze.range;var F=1e3,I=F*60,L=I*60,R=L*24,Be=R*7,Ve=R*30,He=R*365,z=P(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*F)},(e,t)=>(t-e)/F,e=>e.getUTCSeconds());z.range;var Ue=P(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*F)},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getMinutes());Ue.range;var We=P(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*I)},(e,t)=>(t-e)/I,e=>e.getUTCMinutes());We.range;var Ge=P(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*F-e.getMinutes()*I)},(e,t)=>{e.setTime(+e+t*L)},(e,t)=>(t-e)/L,e=>e.getHours());Ge.range;var Ke=P(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*L)},(e,t)=>(t-e)/L,e=>e.getUTCHours());Ke.range;var B=P(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*I)/R,e=>e.getDate()-1);B.range;var qe=P(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/R,e=>e.getUTCDate()-1);qe.range;var Je=P(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/R,e=>Math.floor(e/R));Je.range;function V(e){return P(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*I)/Be)}var Ye=V(0),Xe=V(1),Ze=V(2),Qe=V(3),H=V(4),$e=V(5),et=V(6);Ye.range,Xe.range,Ze.range,Qe.range,H.range,$e.range,et.range;function U(e){return P(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Be)}var tt=U(0),nt=U(1),rt=U(2),it=U(3),at=U(4),ot=U(5),st=U(6);tt.range,nt.range,rt.range,it.range,at.range,ot.range,st.range;var ct=P(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());ct.range;var lt=P(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());lt.range;var W=P(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());W.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:P(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),W.range;var G=P(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());G.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:P(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),G.range;function ut(e,t,n,r,i,a){let o=[[z,1,F],[z,5,5*F],[z,15,15*F],[z,30,30*F],[a,1,I],[a,5,5*I],[a,15,15*I],[a,30,30*I],[i,1,L],[i,3,3*L],[i,6,6*L],[i,12,12*L],[r,1,R],[r,2,2*R],[n,1,Be],[t,1,Ve],[t,3,3*Ve],[e,1,He]];function s(e,t,n){let r=te).right(o,i);if(a===o.length)return e.every(w(t/He,n/He,r));if(a===0)return ze.every(Math.max(w(t,n,r),1));let[s,c]=o[i/o[a-1][2]53)return null;`w`in r||(r.w=1),`Z`in r?(a=gt(_t(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?nt.ceil(a):nt(a),a=qe.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=ht(_t(r.y,0,1)),o=a.getDay(),a=o>4||o===0?Xe.ceil(a):Xe(a),a=B.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?gt(_t(r.y,0,1)).getUTCDay():ht(_t(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,gt(r)):ht(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in yt?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function ee(e,n,r){return w(e,t,n,r)}function A(e,t,r){return w(e,n,t,r)}function te(e,t,n){return w(e,r,t,n)}function ne(e){return o[e.getDay()]}function j(e){return a[e.getDay()]}function re(e){return c[e.getMonth()]}function ie(e){return s[e.getMonth()]}function ae(e){return i[+(e.getHours()>=12)]}function oe(e){return 1+~~(e.getMonth()/3)}function se(e){return o[e.getUTCDay()]}function ce(e){return a[e.getUTCDay()]}function le(e){return c[e.getUTCMonth()]}function ue(e){return s[e.getUTCMonth()]}function de(e){return i[+(e.getUTCHours()>=12)]}function fe(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var yt={"-":``,_:` `,0:`0`},K=/^\s*\d+/,bt=/^%/,xt=/[\\^$*+?|[\]().{}]/g;function q(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a[e.toLowerCase(),t]))}function Tt(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Et(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Dt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Ot(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function kt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function At(e,t,n){var r=K.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function jt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Mt(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function Nt(e,t,n){var r=K.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function Pt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function Ft(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function It(e,t,n){var r=K.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Lt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Rt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function zt(e,t,n){var r=K.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Bt(e,t,n){var r=K.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Vt(e,t,n){var r=K.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Ht(e,t,n){var r=bt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ut(e,t,n){var r=K.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Wt(e,t,n){var r=K.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function Gt(e,t){return q(e.getDate(),t,2)}function Kt(e,t){return q(e.getHours(),t,2)}function qt(e,t){return q(e.getHours()%12||12,t,2)}function Jt(e,t){return q(1+B.count(W(e),e),t,3)}function Yt(e,t){return q(e.getMilliseconds(),t,3)}function Xt(e,t){return Yt(e,t)+`000`}function Zt(e,t){return q(e.getMonth()+1,t,2)}function Qt(e,t){return q(e.getMinutes(),t,2)}function $t(e,t){return q(e.getSeconds(),t,2)}function en(e){var t=e.getDay();return t===0?7:t}function tn(e,t){return q(Ye.count(W(e)-1,e),t,2)}function nn(e){var t=e.getDay();return t>=4||t===0?H(e):H.ceil(e)}function rn(e,t){return e=nn(e),q(H.count(W(e),e)+(W(e).getDay()===4),t,2)}function an(e){return e.getDay()}function on(e,t){return q(Xe.count(W(e)-1,e),t,2)}function sn(e,t){return q(e.getFullYear()%100,t,2)}function cn(e,t){return e=nn(e),q(e.getFullYear()%100,t,2)}function ln(e,t){return q(e.getFullYear()%1e4,t,4)}function un(e,t){var n=e.getDay();return e=n>=4||n===0?H(e):H.ceil(e),q(e.getFullYear()%1e4,t,4)}function dn(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+q(t/60|0,`0`,2)+q(t%60,`0`,2)}function fn(e,t){return q(e.getUTCDate(),t,2)}function pn(e,t){return q(e.getUTCHours(),t,2)}function mn(e,t){return q(e.getUTCHours()%12||12,t,2)}function hn(e,t){return q(1+qe.count(G(e),e),t,3)}function gn(e,t){return q(e.getUTCMilliseconds(),t,3)}function _n(e,t){return gn(e,t)+`000`}function vn(e,t){return q(e.getUTCMonth()+1,t,2)}function yn(e,t){return q(e.getUTCMinutes(),t,2)}function bn(e,t){return q(e.getUTCSeconds(),t,2)}function xn(e){var t=e.getUTCDay();return t===0?7:t}function Sn(e,t){return q(tt.count(G(e)-1,e),t,2)}function Cn(e){var t=e.getUTCDay();return t>=4||t===0?at(e):at.ceil(e)}function wn(e,t){return e=Cn(e),q(at.count(G(e),e)+(G(e).getUTCDay()===4),t,2)}function Tn(e){return e.getUTCDay()}function En(e,t){return q(nt.count(G(e)-1,e),t,2)}function Dn(e,t){return q(e.getUTCFullYear()%100,t,2)}function On(e,t){return e=Cn(e),q(e.getUTCFullYear()%100,t,2)}function kn(e,t){return q(e.getUTCFullYear()%1e4,t,4)}function An(e,t){var n=e.getUTCDay();return e=n>=4||n===0?at(e):at.ceil(e),q(e.getUTCFullYear()%1e4,t,4)}function jn(){return`+0000`}function Mn(){return`%`}function Nn(e){return+e}function Pn(e){return Math.floor(e/1e3)}var Fn,In;Ln({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]});function Ln(e){return Fn=vt(e),In=Fn.format,Fn.parse,Fn.utcFormat,Fn.utcParse,Fn}function Rn(e){return new Date(e)}function zn(e){return e instanceof Date?+e:+new Date(+e)}function Bn(e,t,n,r,i,a,o,s,c,l){var u=T(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e){(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){return function(e,t,n){var r=function(e){return e.add(4-e.isoWeekday(),`day`)},i=t.prototype;i.isoWeekYear=function(){return r(this).year()},i.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),`day`);var t,i,a,o,s=r(this),c=(t=this.isoWeekYear(),i=this.$u,a=(i?n.utc:n)().year(t).startOf(`year`),o=4-a.isoWeekday(),a.isoWeekday()>4&&(o+=7),a.add(o,`day`));return s.diff(c,`week`)+1},i.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var a=i.startOf;i.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):a.bind(this)(e,t)}}}))})),Un=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},c=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],u=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,c(`seconds`)],ss:[i,c(`seconds`)],m:[i,c(`minutes`)],mm:[i,c(`minutes`)],H:[i,c(`hours`)],h:[i,c(`hours`)],HH:[i,c(`hours`)],hh:[i,c(`hours`)],D:[i,c(`day`)],DD:[r,c(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,c(`week`)],ww:[r,c(`week`)],M:[i,c(`month`)],MM:[r,c(`month`)],MMM:[a,function(e){var t=u(`months`),n=(u(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=u(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,c(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,c(`year`)],Z:l,ZZ:l};function p(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,c=0;c-1)return new Date((t===`X`?1e3:1)*e);var i=p(t)(e),a=i.year,o=i.month,s=i.day,c=i.hours,l=i.minutes,u=i.seconds,d=i.milliseconds,f=i.zone,m=i.week,h=new Date,g=s||(a||o?1:h.getDate()),_=a||h.getFullYear(),v=0;a&&!o||(v=o>0?o-1:h.getMonth());var y,b=c||0,x=l||0,S=u||0,C=d||0;return f?new Date(Date.UTC(_,v,g,b,x,S,C+60*f.offset*1e3)):n?new Date(Date.UTC(_,v,g,b,x,S,C)):(y=new Date(_,v,g,b,x,S,C),m&&(y=r(y).week(m).toDate()),y)}catch{return new Date(``)}}(t,s,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var f=s.length,m=1;m<=f;m+=1){a[1]=s[m-1];var h=n.apply(this,a);if(h.isValid()){this.$d=h.$d,this.$L=h.$L,this.init();break}m===f&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),Wn=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),Gn=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(e,(function(){var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=31536e6,s=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,u={years:o,months:s,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof v},f=function(e,t,n){return new v(e,n,t.$l)},p=function(e){return t.p(e)+`s`},m=function(e){return e<0},h=function(e){return m(e)?Math.ceil(e):Math.floor(e)},g=function(e){return Math.abs(e)},_=function(e,t){return e?m(e)?{negative:!0,format:``+g(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},v=function(){function m(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return f(e*u[p(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[p(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(c);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var g=m.prototype;return g.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*u[n]}),0)},g.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=h(e/o),e%=o,this.$d.months=h(e/s),e%=s,this.$d.days=h(e/a),e%=a,this.$d.hours=h(e/i),e%=i,this.$d.minutes=h(e/r),e%=r,this.$d.seconds=h(e/n),e%=n,this.$d.milliseconds=e},g.toISOString=function(){var e=_(this.$d.years,`Y`),t=_(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=_(n,`D`),i=_(this.$d.hours,`H`),a=_(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=_(o,`S`),c=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,l=i.format||a.format||s.format?`T`:``,u=(c?`-`:``)+`P`+e.format+t.format+r.format+l+i.format+a.format+s.format;return u===`P`||u===`-P`?`P0D`:u},g.toJSON=function(){return this.toISOString()},g.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(l,(function(e,t){return t||String(r[e])}))},g.as=function(e){return this.$ms/u[p(e)]},g.get=function(e){var t=this.$ms,n=p(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?h(t/u[n]):this.$d[n],t||0},g.add=function(e,t,n){var r;return r=t?e*u[p(t)]:d(e)?e.$ms:f(e,this).$ms,f(this.$ms+r*(n?-1:1),this)},g.subtract=function(e,t){return this.add(e,t,!0)},g.locale=function(e){var t=this.clone();return t.$l=e,t},g.clone=function(){return f(this.$ms,this)},g.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get(`milliseconds`)},g.asMilliseconds=function(){return this.as(`milliseconds`)},g.seconds=function(){return this.get(`seconds`)},g.asSeconds=function(){return this.as(`seconds`)},g.minutes=function(){return this.get(`minutes`)},g.asMinutes=function(){return this.as(`minutes`)},g.hours=function(){return this.get(`hours`)},g.asHours=function(){return this.as(`hours`)},g.days=function(){return this.get(`days`)},g.asDays=function(){return this.as(`days`)},g.weeks=function(){return this.get(`weeks`)},g.asWeeks=function(){return this.as(`weeks`)},g.months=function(){return this.get(`months`)},g.asMonths=function(){return this.as(`months`)},g.years=function(){return this.get(`years`)},g.asYears=function(){return this.as(`years`)},m}(),y=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return f(e,{$l:i.locale()},t)},i.isDuration=d;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return d(e)?y(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return d(e)?y(this,e,-1):o.bind(this)(e,t)}}}))})),Kn=k(),J=e(s(),1),qn=e(Hn(),1),Jn=e(Un(),1),Yn=e(Wn(),1),Xn=e(Gn(),1),Zn=(function(){var e=n(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],i=[1,27],a=[1,28],o=[1,29],s=[1,30],c=[1,31],l=[1,32],u=[1,33],d=[1,34],f=[1,9],p=[1,10],m=[1,11],h=[1,12],g=[1,13],_=[1,14],v=[1,15],y=[1,16],b=[1,19],x=[1,20],S=[1,21],C=[1,22],w=[1,23],T=[1,25],E=[1,35],D={trace:n(function(){},`trace`),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:`error`,4:`gantt`,6:`EOF`,8:`SPACE`,10:`NL`,12:`weekday_monday`,13:`weekday_tuesday`,14:`weekday_wednesday`,15:`weekday_thursday`,16:`weekday_friday`,17:`weekday_saturday`,18:`weekday_sunday`,20:`weekend_friday`,21:`weekend_saturday`,22:`dateFormat`,23:`inclusiveEndDates`,24:`topAxis`,25:`axisFormat`,26:`tickInterval`,27:`excludes`,28:`includes`,29:`todayMarker`,30:`title`,31:`acc_title`,32:`acc_title_value`,33:`acc_descr`,34:`acc_descr_value`,35:`acc_descr_multiline_value`,36:`section`,38:`taskTxt`,39:`taskData`,40:`click`,41:`callbackname`,42:`callbackargs`,43:`href`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:n(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setWeekday(`monday`);break;case 9:r.setWeekday(`tuesday`);break;case 10:r.setWeekday(`wednesday`);break;case 11:r.setWeekday(`thursday`);break;case 12:r.setWeekday(`friday`);break;case 13:r.setWeekday(`saturday`);break;case 14:r.setWeekday(`sunday`);break;case 15:r.setWeekend(`friday`);break;case 16:r.setWeekend(`saturday`);break;case 17:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:r.TopAxis(),this.$=a[s].substr(8);break;case 20:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:r.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 31:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:r.addTask(a[s-1],a[s]),this.$=`task`;break;case 34:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 41:case 47:this.$=a[s-1]+` `+a[s];break;case 42:case 43:case 45:this.$=a[s-2]+` `+a[s-1]+` `+a[s];break;case 44:case 46:this.$=a[s-3]+` `+a[s-2]+` `+a[s-1]+` `+a[s];break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:i,14:a,15:o,16:s,17:c,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:r,13:i,14:a,15:o,16:s,17:c,18:l,19:18,20:u,21:d,22:f,23:p,24:m,25:h,26:g,27:_,28:v,29:y,30:b,31:x,33:S,35:C,36:w,37:24,38:T,40:E},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:n(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:n(function(e){var t=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}n(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=t.symbols_[e]||e),e}n(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+A.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(te,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:A})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),ee=s[r[r.length-2]][r[r.length-1]],r.push(ee);break;case 3:return!0}}return!0},`parse`)};D.lexer=(function(){return{EOF:1,parseError:n(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:n(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:n(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:n(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:n(function(){return this._more=!0,this},`more`),reject:n(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). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:n(function(e){this.unput(this.match.slice(e))},`less`),pastInput:n(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:n(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:n(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:n(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:n(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:n(function(){return this.next()||this.lex()},`lex`),begin:n(function(e){this.conditionStack.push(e)},`begin`),popState:n(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:n(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:n(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:n(function(e){this.begin(e)},`pushState`),stateStackSize:n(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:n(function(e,t,n,r){switch(n){case 0:return this.begin(`open_directive`),`open_directive`;case 1:return this.begin(`acc_title`),31;case 2:return this.popState(),`acc_title_value`;case 3:return this.begin(`acc_descr`),33;case 4:return this.popState(),`acc_descr_value`;case 5:this.begin(`acc_descr_multiline`);break;case 6:this.popState();break;case 7:return`acc_descr_multiline_value`;case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin(`href`);break;case 15:this.popState();break;case 16:return 43;case 17:this.begin(`callbackname`);break;case 18:this.popState();break;case 19:this.popState(),this.begin(`callbackargs`);break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin(`click`);break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return`date`;case 45:return 30;case 46:return`accDescription`;case 47:return 36;case 48:return 38;case 49:return 39;case 50:return`:`;case 51:return 6;case 52:return`INVALID`}},`anonymous`),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}})();function O(){this.yy={}}return n(O,`Parser`),O.prototype=D,D.Parser=O,new O})();Zn.parser=Zn;var Qn=Zn;J.default.extend(qn.default),J.default.extend(Jn.default),J.default.extend(Yn.default);var $n={friday:5,saturday:6},Y=``,er=``,tr=void 0,nr=``,rr=[],ir=[],ar=new Map,or=[],sr=[],X=``,cr=``,lr=[`active`,`done`,`crit`,`milestone`,`vert`],ur=[],dr=``,fr=!1,pr=!1,mr=`sunday`,hr=`saturday`,gr=0,_r=n(function(){or=[],sr=[],X=``,ur=[],Zr=0,ti=void 0,ni=void 0,Z=[],Y=``,er=``,cr=``,tr=void 0,nr=``,rr=[],ir=[],fr=!1,pr=!1,gr=0,ar=new Map,dr=``,g(),mr=`sunday`,hr=`saturday`},`clear`),vr=n(function(e){dr=e},`setDiagramId`),yr=n(function(e){er=e},`setAxisFormat`),br=n(function(){return er},`getAxisFormat`),xr=n(function(e){tr=e},`setTickInterval`),Sr=n(function(){return tr},`getTickInterval`),Cr=n(function(e){nr=e},`setTodayMarker`),wr=n(function(){return nr},`getTodayMarker`),Tr=n(function(e){Y=e},`setDateFormat`),Er=n(function(){fr=!0},`enableInclusiveEndDates`),Dr=n(function(){return fr},`endDatesAreInclusive`),Or=n(function(){pr=!0},`enableTopAxis`),kr=n(function(){return pr},`topAxisEnabled`),Ar=n(function(e){cr=e},`setDisplayMode`),jr=n(function(){return cr},`getDisplayMode`),Mr=n(function(){return Y},`getDateFormat`),Nr=n((e,t)=>{let n=t.toLowerCase().split(/[\s,]+/).filter(e=>e!==``);return[...new Set([...e,...n])]},`mergeTokens`),Pr=n(function(e){rr=Nr(rr,e)},`setIncludes`),Fr=n(function(){return rr},`getIncludes`),Ir=n(function(e){ir=Nr(ir,e)},`setExcludes`),Lr=n(function(){return ir},`getExcludes`),Rr=n(function(){return ar},`getLinks`),zr=n(function(e){X=e,or.push(e)},`addSection`),Br=n(function(){return or},`getSections`),Vr=n(function(){let e=oi(),t=0;for(;!e&&t<10;)e=oi(),t++;return sr=Z,sr},`getTasks`),Hr=n(function(e,t,n,r){let i=e.format(t.trim()),a=e.format(`YYYY-MM-DD`);return r.includes(i)||r.includes(a)?!1:n.includes(`weekends`)&&(e.isoWeekday()===$n[hr]||e.isoWeekday()===$n[hr]+1)||n.includes(e.format(`dddd`).toLowerCase())?!0:n.includes(i)||n.includes(a)},`isInvalidDate`),Ur=n(function(e){mr=e},`setWeekday`),Wr=n(function(){return mr},`getWeekday`),Gr=n(function(e){hr=e},`setWeekend`),Kr=n(function(e,t,n,r){if(!n.length||e.manualEndTime)return;let i;i=e.startTime instanceof Date?(0,J.default)(e.startTime):(0,J.default)(e.startTime,t,!0),i=i.add(1,`d`);let a;a=e.endTime instanceof Date?(0,J.default)(e.endTime):(0,J.default)(e.endTime,t,!0);let[o,s]=qr(i,a,t,n,r);e.endTime=o.toDate(),e.renderEndTime=s},`checkTaskDates`),qr=n(function(e,t,n,r,i){let a=!1,o=null,s=t.add(1e4,`d`);for(;e<=t;){if(a||(o=t.toDate()),a=Hr(e,n,r,i),a&&(t=t.add(1,`d`),t>s))throw Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");e=e.add(1,`d`)}return[t,o]},`fixTaskDates`),Jr=n(function(e,t,r){if(r=r.trim(),n(e=>{let t=e.trim();return t===`x`||t===`X`},`isTimestampFormat`)(t)&&/^\d+$/.test(r))return new Date(Number(r));let i=/^after\s+(?[\d\w- ]+)/.exec(r);if(i!==null){let e=null;for(let t of i.groups.ids.split(` `)){let n=Q(t);n!==void 0&&(!e||n.endTime>e.endTime)&&(e=n)}if(e)return e.endTime;let t=new Date;return t.setHours(0,0,0,0),t}let a=(0,J.default)(r,t.trim(),!0);if(a.isValid())return a.toDate();{l.debug(`Invalid date:`+r),l.debug(`With date format:`+t.trim());let e=new Date(r);if(e===void 0||isNaN(e.getTime())||e.getFullYear()<-1e4||e.getFullYear()>1e4)throw Error(`Invalid date:`+r);return e}},`getStartDate`),Yr=n(function(e){let t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t===null?[NaN,`ms`]:[Number.parseFloat(t[1]),t[2]]},`parseDuration`),Xr=n(function(e,t,n,r=!1){n=n.trim();let i=/^until\s+(?[\d\w- ]+)/.exec(n);if(i!==null){let e=null;for(let t of i.groups.ids.split(` `)){let n=Q(t);n!==void 0&&(!e||n.startTime{window.open(n,`_self`)}),ar.set(e,n))}),ci(e,`clickable`)},`setLink`),ci=n(function(e,t){e.split(`,`).forEach(function(e){let n=Q(e);n!==void 0&&n.classes.push(t)})},`setClass`),li=n(function(e,t,n){if(x().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{ee.runFunc(t,...r)})},`setClickFun`),ui=n(function(e,t){ur.push(function(){let n=dr?`${dr}-${e}`:e,r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,function(){t()})},function(){let n=dr?`${dr}-${e}`:e,r=document.querySelector(`[id="${n}-text"]`);r!==null&&r.addEventListener(`click`,function(){t()})})},`pushFun`),di={getConfig:n(()=>x().gantt,`getConfig`),clear:_r,setDateFormat:Tr,getDateFormat:Mr,enableInclusiveEndDates:Er,endDatesAreInclusive:Dr,enableTopAxis:Or,topAxisEnabled:kr,setAxisFormat:yr,getAxisFormat:br,setTickInterval:xr,getTickInterval:Sr,setTodayMarker:Cr,getTodayMarker:wr,setAccTitle:h,getAccTitle:S,setDiagramTitle:m,getDiagramTitle:b,setDiagramId:vr,setDisplayMode:Ar,getDisplayMode:jr,setAccDescription:p,getAccDescription:y,addSection:zr,getSections:Br,getTasks:Vr,addTask:ii,findTaskById:Q,addTaskOrg:ai,setIncludes:Pr,getIncludes:Fr,setExcludes:Ir,getExcludes:Lr,setClickEvent:n(function(e,t,n){e.split(`,`).forEach(function(e){li(e,t,n)}),ci(e,`clickable`)},`setClickEvent`),setLink:si,getLinks:Rr,bindFunctions:n(function(e){ur.forEach(function(t){t(e)})},`bindFunctions`),parseDuration:Yr,isInvalidDate:Hr,setWeekday:Ur,getWeekday:Wr,setWeekend:Gr};function fi(e,t,n){let r=!0;for(;r;)r=!1,n.forEach(function(n){let i=`^\\s*`+n+`\\s*$`,a=new RegExp(i);e[0].match(a)&&(t[n]=!0,e.shift(1),r=!0)})}n(fi,`getTaskTags`),J.default.extend(Xn.default);var pi=n(function(){l.debug(`Something is calling, setConf, remove the call`)},`setConf`),mi={monday:Xe,tuesday:Ze,wednesday:Qe,thursday:H,friday:$e,saturday:et,sunday:Ye},hi=n((e,t)=>{let n=[...e].map(()=>-1/0),r=[...e].sort((e,t)=>e.startTime-t.startTime||e.order-t.order),i=0;for(let e of r)for(let r=0;r=n[r]){n[r]=e.endTime,e.order=r+t,r>i&&(i=r);break}return i},`getMaxIntersections`),$,gi=1e4,_i={parser:Qn,db:di,renderer:{setConf:pi,draw:n(function(e,t,r,i){let a=x().gantt;i.db.setDiagramId(t);let o=x().securityLevel,s;o===`sandbox`&&(s=u(`#i`+t));let c=u(o===`sandbox`?s.nodes()[0].contentDocument.body:`body`),d=o===`sandbox`?s.nodes()[0].contentDocument:document,f=d.getElementById(t);$=f.parentElement.offsetWidth,$===void 0&&($=1200),a.useWidth!==void 0&&($=a.useWidth);let p=i.db.getTasks(),m=p.filter(e=>!e.vert),h=[];for(let e of m)h.push(e.type);h=j(h);let g={},y=2*a.topPadding;if(i.db.getDisplayMode()===`compact`||a.displayMode===`compact`){let e={};for(let t of m)e[t.section]===void 0?e[t.section]=[t]:e[t.section].push(t);let t=0;for(let n of Object.keys(e)){let r=hi(e[n],t)+1;t+=r,y+=r*(a.barHeight+a.barGap),g[n]=r}}else{y+=m.length*(a.barHeight+a.barGap);for(let e of h)g[e]=m.filter(t=>t.type===e).length}f.setAttribute(`viewBox`,`0 0 `+$+` `+y);let b=c.select(`[id="${t}"]`),S=Vn().domain([te(p,function(e){return e.startTime}),A(p,function(e){return e.endTime})]).rangeRound([0,$-a.leftPadding-a.rightPadding]);function C(e,t){let n=e.startTime,r=t.startTime,i=0;return n>r?i=1:ne.vert===t.vert?0:e.vert?1:-1);let d=e.filter(e=>!e.vert),f=[...new Set(d.map(e=>e.order))].map(e=>d.find(t=>t.order===e));b.append(`g`).selectAll(`rect`).data(f).enter().append(`rect`).attr(`x`,0).attr(`y`,function(e,t){return t=e.order,t*n+r-2}).attr(`width`,function(){return l-a.rightPadding/2}).attr(`height`,n).attr(`class`,function(e){for(let[t,n]of h.entries())if(e.type===n)return`section section`+t%a.numberSectionStyles;return`section section0`}).enter();let p=b.append(`g`).selectAll(`rect`).data(e).enter(),m=i.db.getLinks();if(p.append(`rect`).attr(`id`,function(e){return t+`-`+e.id}).attr(`rx`,3).attr(`ry`,3).attr(`x`,function(e){return e.milestone?S(e.startTime)+o+.5*(S(e.endTime)-S(e.startTime))-.5*s:S(e.startTime)+o}).attr(`y`,function(e,t){return t=e.order,e.vert?a.gridLineStartPadding:t*n+r}).attr(`width`,function(e){return e.milestone?s:e.vert?.08*s:S(e.renderEndTime||e.endTime)-S(e.startTime)}).attr(`height`,function(e){return e.vert?d.length*(a.barHeight+a.barGap)+a.barHeight*2:s}).attr(`transform-origin`,function(e,t){return t=e.order,(S(e.startTime)+o+.5*(S(e.endTime)-S(e.startTime))).toString()+`px `+(t*n+r+.5*s).toString()+`px`}).attr(`class`,function(e){let t=``;e.classes.length>0&&(t=e.classes.join(` `));let n=0;for(let[t,r]of h.entries())e.type===r&&(n=t%a.numberSectionStyles);let r=``;return e.active?e.crit?r+=` activeCrit`:r=` active`:e.done?r=e.crit?` doneCrit`:` done`:e.crit&&(r+=` crit`),r.length===0&&(r=` task`),e.milestone&&(r=` milestone `+r),e.vert&&(r=` vert `+r),r+=n,r+=` `+t,`task`+r}),p.append(`text`).attr(`id`,function(e){return t+`-`+e.id+`-text`}).text(function(e){return e.task}).attr(`font-size`,a.fontSize).attr(`x`,function(e){let t=S(e.startTime),n=S(e.renderEndTime||e.endTime);if(e.milestone&&(t+=.5*(S(e.endTime)-S(e.startTime))-.5*s,n=t+s),e.vert)return S(e.startTime)+o;let r=this.getBBox().width;return r>n-t?n+r+1.5*a.leftPadding>l?t+o-5:n+o+5:(n-t)/2+t+o}).attr(`y`,function(e,t){return e.vert?a.gridLineStartPadding+d.length*(a.barHeight+a.barGap)+60:(t=e.order,t*n+a.barHeight/2+(a.fontSize/2-2)+r)}).attr(`text-height`,s).attr(`class`,function(e){let t=S(e.startTime),n=S(e.endTime);e.milestone&&(n=t+s);let r=this.getBBox().width,i=``;e.classes.length>0&&(i=e.classes.join(` `));let o=0;for(let[t,n]of h.entries())e.type===n&&(o=t%a.numberSectionStyles);let c=``;return e.active&&(c=e.crit?`activeCritText`+o:`activeText`+o),e.done?c=e.crit?c+` doneCritText`+o:c+` doneText`+o:e.crit&&(c=c+` critText`+o),e.milestone&&(c+=` milestoneText`),e.vert&&(c+=` vertText`),r>n-t?n+r+1.5*a.leftPadding>l?i+` taskTextOutsideLeft taskTextOutside`+o+` `+c:i+` taskTextOutsideRight taskTextOutside`+o+` `+c+` width-`+r:i+` taskText taskText`+o+` `+c+` width-`+r}),x().securityLevel===`sandbox`){let e;e=u(`#i`+t);let n=e.nodes()[0].contentDocument;p.filter(function(e){return m.has(e.id)}).each(function(e){var r=n.querySelector(`#`+CSS.escape(t+`-`+e.id)),i=n.querySelector(`#`+CSS.escape(t+`-`+e.id+`-text`));let a=r.parentNode;var o=n.createElement(`a`);o.setAttribute(`xlink:href`,m.get(e.id)),o.setAttribute(`target`,`_top`),a.appendChild(o),o.appendChild(r),o.appendChild(i)})}}n(T,`drawRects`);function E(e,n,r,o,s,c,u,d){if(u.length===0&&d.length===0)return;let f,p;for(let{startTime:e,endTime:t}of c)(f===void 0||ep)&&(p=t);if(!f||!p)return;if((0,J.default)(p).diff((0,J.default)(f),`year`)>5){l.warn(`The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.`);return}let m=i.db.getDateFormat(),h=[],g=null,_=(0,J.default)(f);for(;_.valueOf()<=p;)i.db.isInvalidDate(_,m,u,d)?g?g.end=_:g={start:_,end:_}:g&&=(h.push(g),null),_=_.add(1,`d`);b.append(`g`).selectAll(`rect`).data(h).enter().append(`rect`).attr(`id`,e=>t+`-exclude-`+e.start.format(`YYYY-MM-DD`)).attr(`x`,e=>S(e.start.startOf(`day`))+r).attr(`y`,a.gridLineStartPadding).attr(`width`,e=>S(e.end.endOf(`day`))-S(e.start.startOf(`day`))).attr(`height`,s-n-a.gridLineStartPadding).attr(`transform-origin`,function(t,n){return(S(t.start)+r+.5*(S(t.end)-S(t.start))).toString()+`px `+(n*e+.5*s).toString()+`px`}).attr(`class`,`exclude-range`)}n(E,`drawExcludeDays`);function O(e,t,n,r){if(n<=0||e>t)return 1/0;let i=t-e,a=J.default.duration({[r??`day`]:n}).asMilliseconds();return a<=0?1/0:Math.ceil(i/a)}n(O,`getEstimatedTickCount`);function k(e,t,n,r){let o=i.db.getDateFormat(),s=i.db.getAxisFormat(),c;c=s||(o===`D`?`%d`:a.axisFormat??`%Y-%m-%d`);let u=me(S).tickSize(-r+t+a.gridLineStartPadding).tickFormat(In(c)),d=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||a.tickInterval);if(d!==null){let e=parseInt(d[1],10);if(isNaN(e)||e<=0)l.warn(`Invalid tick interval value: "${d[1]}". Skipping custom tick interval.`);else{let t=d[2],n=i.db.getWeekday()||a.weekday,r=S.domain(),o=r[0],s=r[1],c=O(o,s,e,t);if(c>gi)l.warn(`The tick interval "${e}${t}" would generate ${c} ticks, which exceeds the maximum allowed (${gi}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(t){case`millisecond`:u.ticks(ze.every(e));break;case`second`:u.ticks(z.every(e));break;case`minute`:u.ticks(Ue.every(e));break;case`hour`:u.ticks(Ge.every(e));break;case`day`:u.ticks(B.every(e));break;case`week`:u.ticks(mi[n].every(e));break;case`month`:u.ticks(ct.every(e));break}}}if(b.append(`g`).attr(`class`,`grid`).attr(`transform`,`translate(`+e+`, `+(r-50)+`)`).call(u).selectAll(`text`).style(`text-anchor`,`middle`).attr(`fill`,`#000`).attr(`stroke`,`none`).attr(`font-size`,10).attr(`dy`,`1em`),i.db.topAxisEnabled()||a.topAxis){let n=pe(S).tickSize(-r+t+a.gridLineStartPadding).tickFormat(In(c));if(d!==null){let e=parseInt(d[1],10);if(isNaN(e)||e<=0)l.warn(`Invalid tick interval value: "${d[1]}". Skipping custom tick interval.`);else{let t=d[2],r=i.db.getWeekday()||a.weekday,o=S.domain(),s=o[0],c=o[1];if(O(s,c,e,t)<=gi)switch(t){case`millisecond`:n.ticks(ze.every(e));break;case`second`:n.ticks(z.every(e));break;case`minute`:n.ticks(Ue.every(e));break;case`hour`:n.ticks(Ge.every(e));break;case`day`:n.ticks(B.every(e));break;case`week`:n.ticks(mi[r].every(e));break;case`month`:n.ticks(ct.every(e));break}}}b.append(`g`).attr(`class`,`grid`).attr(`transform`,`translate(`+e+`, `+t+`)`).call(n).selectAll(`text`).style(`text-anchor`,`middle`).attr(`fill`,`#000`).attr(`stroke`,`none`).attr(`font-size`,10)}}n(k,`makeGrid`);function ee(e,t){let n=0,r=Object.keys(g).map(e=>[e,g[e]]);b.append(`g`).selectAll(`text`).data(r).enter().append(function(e){let t=e[0].split(v.lineBreakRegex),n=-(t.length-1)/2,r=d.createElementNS(`http://www.w3.org/2000/svg`,`text`);r.setAttribute(`dy`,n+`em`);for(let[e,n]of t.entries()){let t=d.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);t.setAttribute(`alignment-baseline`,`central`),t.setAttribute(`x`,`10`),e>0&&t.setAttribute(`dy`,`1em`),t.textContent=n,r.appendChild(t)}return r}).attr(`x`,10).attr(`y`,function(i,a){if(a>0)for(let o=0;o` - .mermaid-main-font { - font-family: ${e.fontFamily}; - } - - .exclude-range { - fill: ${e.excludeBkgColor}; - } - - .section { - stroke: none; - opacity: 0.2; - } - - .section0 { - fill: ${e.sectionBkgColor}; - } - - .section2 { - fill: ${e.sectionBkgColor2}; - } - - .section1, - .section3 { - fill: ${e.altSectionBkgColor}; - opacity: 0.2; - } - - .sectionTitle0 { - fill: ${e.titleColor}; - } - - .sectionTitle1 { - fill: ${e.titleColor}; - } - - .sectionTitle2 { - fill: ${e.titleColor}; - } - - .sectionTitle3 { - fill: ${e.titleColor}; - } - - .sectionTitle { - text-anchor: start; - font-family: ${e.fontFamily}; - } - - - /* Grid and axis */ - - .grid .tick { - stroke: ${e.gridColor}; - opacity: 0.8; - shape-rendering: crispEdges; - } - - .grid .tick text { - font-family: ${e.fontFamily}; - fill: ${e.textColor}; - } - - .grid path { - stroke-width: 0; - } - - - /* Today line */ - - .today { - fill: none; - stroke: ${e.todayLineColor}; - stroke-width: 2px; - } - - - /* Task styling */ - - /* Default task */ - - .task { - stroke-width: 2; - } - - .taskText { - text-anchor: middle; - font-family: ${e.fontFamily}; - } - - .taskTextOutsideRight { - fill: ${e.taskTextDarkColor}; - text-anchor: start; - font-family: ${e.fontFamily}; - } - - .taskTextOutsideLeft { - fill: ${e.taskTextDarkColor}; - text-anchor: end; - } - - - /* Special case clickable */ - - .task.clickable { - cursor: pointer; - } - - .taskText.clickable { - cursor: pointer; - fill: ${e.taskTextClickableColor} !important; - font-weight: bold; - } - - .taskTextOutsideLeft.clickable { - cursor: pointer; - fill: ${e.taskTextClickableColor} !important; - font-weight: bold; - } - - .taskTextOutsideRight.clickable { - cursor: pointer; - fill: ${e.taskTextClickableColor} !important; - font-weight: bold; - } - - - /* Specific task settings for the sections*/ - - .taskText0, - .taskText1, - .taskText2, - .taskText3 { - fill: ${e.taskTextColor}; - } - - .task0, - .task1, - .task2, - .task3 { - fill: ${e.taskBkgColor}; - stroke: ${e.taskBorderColor}; - } - - .taskTextOutside0, - .taskTextOutside2 - { - fill: ${e.taskTextOutsideColor}; - } - - .taskTextOutside1, - .taskTextOutside3 { - fill: ${e.taskTextOutsideColor}; - } - - - /* Active task */ - - .active0, - .active1, - .active2, - .active3 { - fill: ${e.activeTaskBkgColor}; - stroke: ${e.activeTaskBorderColor}; - } - - .activeText0, - .activeText1, - .activeText2, - .activeText3 { - fill: ${e.taskTextDarkColor} !important; - } - - - /* Completed task */ - - .done0, - .done1, - .done2, - .done3 { - stroke: ${e.doneTaskBorderColor}; - fill: ${e.doneTaskBkgColor}; - stroke-width: 2; - } - - .doneText0, - .doneText1, - .doneText2, - .doneText3 { - fill: ${e.taskTextDarkColor} !important; - } - - /* Done task text displayed outside the bar sits against the diagram background, - not against the done-task bar, so it must use the outside/contrast color. */ - .doneText0.taskTextOutsideLeft, - .doneText0.taskTextOutsideRight, - .doneText1.taskTextOutsideLeft, - .doneText1.taskTextOutsideRight, - .doneText2.taskTextOutsideLeft, - .doneText2.taskTextOutsideRight, - .doneText3.taskTextOutsideLeft, - .doneText3.taskTextOutsideRight { - fill: ${e.taskTextOutsideColor} !important; - } - - - /* Tasks on the critical line */ - - .crit0, - .crit1, - .crit2, - .crit3 { - stroke: ${e.critBorderColor}; - fill: ${e.critBkgColor}; - stroke-width: 2; - } - - .activeCrit0, - .activeCrit1, - .activeCrit2, - .activeCrit3 { - stroke: ${e.critBorderColor}; - fill: ${e.activeTaskBkgColor}; - stroke-width: 2; - } - - .doneCrit0, - .doneCrit1, - .doneCrit2, - .doneCrit3 { - stroke: ${e.critBorderColor}; - fill: ${e.doneTaskBkgColor}; - stroke-width: 2; - cursor: pointer; - shape-rendering: crispEdges; - } - - .milestone { - transform: rotate(45deg) scale(0.8,0.8); - } - - .milestoneText { - font-style: italic; - } - .doneCritText0, - .doneCritText1, - .doneCritText2, - .doneCritText3 { - fill: ${e.taskTextDarkColor} !important; - } - - /* Done-crit task text outside the bar \u2014 same reasoning as doneText above. */ - .doneCritText0.taskTextOutsideLeft, - .doneCritText0.taskTextOutsideRight, - .doneCritText1.taskTextOutsideLeft, - .doneCritText1.taskTextOutsideRight, - .doneCritText2.taskTextOutsideLeft, - .doneCritText2.taskTextOutsideRight, - .doneCritText3.taskTextOutsideLeft, - .doneCritText3.taskTextOutsideRight { - fill: ${e.taskTextOutsideColor} !important; - } - - .vert { - stroke: ${e.vertLineColor}; - } - - .vertText { - font-size: 15px; - text-anchor: middle; - fill: ${e.vertLineColor} !important; - } - - .activeCritText0, - .activeCritText1, - .activeCritText2, - .activeCritText3 { - fill: ${e.taskTextDarkColor} !important; - } - - .titleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.titleColor||e.textColor}; - font-family: ${e.fontFamily}; - } -`,`getStyles`)};export{_i as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/gitGraph-TEB2WS4Q-Do0SQOtM.js b/dist-desktop/assets/gitGraph-TEB2WS4Q-Do0SQOtM.js deleted file mode 100644 index eb0ae78..0000000 --- a/dist-desktop/assets/gitGraph-TEB2WS4Q-Do0SQOtM.js +++ /dev/null @@ -1 +0,0 @@ -import"./chunk-KEIR6QF5-Dj-OpFgW.js";import{n as e}from"./chunk-CYSBUYHQ-CbOq7Rc1.js";export{e as createGitGraphServices}; \ No newline at end of file diff --git a/dist-desktop/assets/gitGraphDiagram-IHSO6WYX-CPtw8GFs.js b/dist-desktop/assets/gitGraphDiagram-IHSO6WYX-CPtw8GFs.js deleted file mode 100644 index fdc61da..0000000 --- a/dist-desktop/assets/gitGraphDiagram-IHSO6WYX-CPtw8GFs.js +++ /dev/null @@ -1,106 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-UMNXGZaF.js";import{H as r,K as i,U as a,Y as o,a as s,b as c,f as l,s as u,v as d,w as f,x as p,y as m}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{g as h,i as g,m as _}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as v}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as y}from"./mermaid-parser.core-Z7xZAZRH.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=l.gitGraph,S=e(()=>g({...ee,...c().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return _({length:7})}e(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}e(T,`uniqBy`);var te=e(function(e){C.records.direction=e},`setDirection`),ne=e(function(e){t.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){t.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=e(function(){return C.records.options},`getOptions`),ie=e(function(e){let n=e.msg,r=e.id,i=e.type,a=e.tags;t.info(`commit`,n,r,i,a),t.debug(`Entering commit:`,n,r,i,a);let o=S();r=u.sanitizeText(r,o),n=u.sanitizeText(n,o),a=a?.map(e=>u.sanitizeText(e,o));let s={id:r||C.records.seq+`-`+w(),message:n,seq:C.records.seq++,type:i??x.NORMAL,tags:a??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,t.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&t.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),t.debug(`in pushCommit `+s.id)},`commit`),ae=e(function(e){let n=e.name,r=e.order;if(n=u.sanitizeText(n,S()),C.records.branches.has(n))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${n}")`);C.records.branches.set(n,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(n,{name:n,order:r}),E(n),t.debug(`in createBranch`)},`branch`),oe=e(e=>{let n=e.branch,r=e.id,i=e.type,a=e.tags,o=S();n=u.sanitizeText(n,o),r&&=u.sanitizeText(r,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(n),l=s?C.records.commits.get(s):void 0,d=c?C.records.commits.get(c):void 0;if(l&&d&&l.branch===n)throw Error(`Cannot merge branch '${n}' into itself.`);if(C.records.currBranch===n){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`commit`]},e}if(!C.records.branches.has(n)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) does not exist`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch ${n}`]},e}if(d===void 0||!d){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`"commit"`]},e}if(l===d){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(r&&C.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${n} ${r} ${i} ${a?.join(` `)}`,token:`merge ${n} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${n} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${C.records.seq}-${w()}`,message:`merged branch ${n} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,f],branch:C.records.currBranch,type:x.MERGE,customType:i,customId:!!r,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),t.debug(C.records.branches),t.debug(`in mergeBranch`)},`merge`),se=e(function(e){let n=e.id,r=e.targetId,i=e.tags,a=e.parent;t.debug(`Entering cherryPick:`,n,r,i);let o=S();if(n=u.sanitizeText(n,o),r=u.sanitizeText(r,o),i=i?.map(e=>u.sanitizeText(e,o)),a=u.sanitizeText(a,o),!n||!C.records.commits.has(n)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(n);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!C.records.commits.has(r)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let e=C.records.branches.get(C.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),t.debug(C.records.branches),t.debug(`in cherryPick`)}},`cherryPick`),E=e(function(e){if(e=u.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}e(D,`upsert`);function O(e){let n=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r=``;e.forEach(function(e){e===n?r+=` *`:r+=` |`});let i=[r,n.id,n.seq];for(let e in C.records.branches)C.records.branches.get(e)===n.id&&i.push(e);if(t.debug(i.join(` `)),n.parents&&n.parents.length==2&&n.parents[0]&&n.parents[1]){let t=C.records.commits.get(n.parents[0]);D(e,n,t),n.parents[1]&&e.push(C.records.commits.get(n.parents[1]))}else if(n.parents.length==0)return;else if(n.parents[0]){let t=C.records.commits.get(n.parents[0]);D(e,n,t)}e=T(e,e=>e.id),O(e)}e(O,`prettyPrintCommitHistory`);var ce=e(function(){t.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=e(function(){C.reset(),s()},`clear`),ue=e(function(){return[...C.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),de=e(function(){return C.records.branches},`getBranches`),fe=e(function(){return C.records.commits},`getCommits`),k=e(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){t.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:e(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:e(function(){return C.records.direction},`getDirection`),getHead:e(function(){return C.records.head},`getHead`),setAccTitle:a,getAccTitle:m,getAccDescription:d,setAccDescription:r,setDiagramTitle:i,getDiagramTitle:f},pe=e((e,t)=>{v(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=e((n,r)=>{let i={Commit:e(e=>r.commit(he(e)),`Commit`),Branch:e(e=>r.branch(ge(e)),`Branch`),Merge:e(e=>r.merge(_e(e)),`Merge`),Checkout:e(e=>r.checkout(ve(e)),`Checkout`),CherryPicking:e(e=>r.cherryPick(ye(e)),`CherryPicking`)}[n.$type];i?i(n):t.error(`Unknown statement type: ${n.$type}`)},`parseStatement`),he=e(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=e(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=e(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=e(e=>e.branch,`parseCheckout`),ye=e(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:e(async e=>{let n=await y(`gitGraph`,e);t.debug(n),pe(n,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=e((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,q=e(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),J=e(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),Y=e(t=>{let n,r,i;return K===`BT`?(r=e((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=e((e,t)=>e>=t,`comparisonFunc`),i=0),t.forEach(e=>{let t=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),Se=e(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),Ce=e((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Te(n),i=Math.max(r,i)):a.push(n),Ee(n,r)}),r=i,a.forEach(e=>{De(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Se(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),we=e(e=>{let t=Y(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Te=e(e=>we(e)+M,`calculateCommitPosition`),Ee=e((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),De=e((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),Oe=e((e,t,n,r,i,a)=>{let{theme:o}=p(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),ke=e((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),Ae=e((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,` - ${r-a/2-N/2},${l+P} - ${r-a/2-N/2},${l-P} - ${n.posWithOffset-a/2-N},${l-s-P} - ${n.posWithOffset+a/2+N},${l-s-P} - ${n.posWithOffset+a/2+N},${l+s+P} - ${n.posWithOffset-a/2-N},${l+s+P}`),t.attr(`cy`,l).attr(`cx`,r-a/2+N/2).attr(`r`,1.5).attr(`class`,`tag-hole`),K===`TB`||K===`BT`){let o=r+c;i.attr(`class`,`tag-label-bkg`).attr(`points`,` - ${n.x},${o+2} - ${n.x},${o-2} - ${n.x+j},${o-s-2} - ${n.x+j+a+4},${o-s-2} - ${n.x+j+a+4},${o+s+2} - ${n.x+j},${o+s+2}`).attr(`transform`,`translate(12,12) rotate(45, `+n.x+`,`+r+`)`),t.attr(`cx`,n.x+N/2).attr(`cy`,o).attr(`transform`,`translate(12,12) rotate(45, `+n.x+`,`+r+`)`),e.attr(`x`,n.x+5).attr(`y`,o+3).attr(`transform`,`translate(14,14) rotate(45, `+n.x+`,`+r+`)`)}}}},`drawCommitTags`),je=e(e=>{switch(e.customType??e.type){case x.NORMAL:return`commit-normal`;case x.REVERSE:return`commit-reverse`;case x.HIGHLIGHT:return`commit-highlight`;case x.MERGE:return`commit-merge`;case x.CHERRY_PICK:return`commit-cherry-pick`;default:return`commit-normal`}},`getCommitClassType`),Me=e((e,t,n,r)=>{let i={x:0,y:0};if(e.parents.length>0){let n=Y(e.parents);if(n){let a=r.get(n)??i;return t===`TB`?a.y+M:t===`BT`?(r.get(e.id)??i).y-M:a.x+M}}else if(t===`TB`)return H;else if(t===`BT`)return(r.get(e.id)??i).y-M;else return 0;return 0},`calculatePosition`),Ne=e((e,t,n)=>{let r=K===`BT`&&n?t:t+j,i=B.get(e.branch)?.pos,a=K===`TB`||K===`BT`?B.get(e.branch)?.pos:r;if(a===void 0||i===void 0)throw Error(`Position were undefined for commit ${e.id}`);let o=I.has(p().theme??``);return{x:a,y:K===`TB`||K===`BT`?r:i+(o?L/2+1:-2),posWithOffset:r}},`getCommitPosition`),X=e((t,n,r,i)=>{let a=t.append(`g`).attr(`class`,`commit-bullets`),o=t.append(`g`).attr(`class`,`commit-labels`),s=K===`TB`||K===`BT`?H:0,c=[...n.keys()],l=i.parallelCommits??!1,u=e((e,t)=>{let r=n.get(e)?.seq,i=n.get(t)?.seq;return r!==void 0&&i!==void 0?r-i:0},`sortKeys`),d=c.sort(u);K===`BT`&&(l&&Ce(d,n,s),d=d.reverse()),d.forEach(e=>{let t=n.get(e);if(!t)throw Error(`Commit not found for key ${e}`);l&&(s=Me(t,K,s,V));let c=Ne(t,s,l);if(r){let e=je(t),n=t.customType??t.type,r=B.get(t.branch)?.index??0;Oe(a,t,c,e,r,n),ke(o,t,c,s,i),Ae(o,t,c,s)}K===`TB`||K===`BT`?V.set(t.id,{x:c.x,y:c.posWithOffset}):V.set(t.id,{x:c.posWithOffset,y:c.y}),s=K===`BT`&&l?s+M:s+M+j,s>G&&(G=s)})},`drawCommits`),Pe=e((t,n,r,i,a)=>{let o=(K===`TB`||K===`BT`?r.xe.branch===o,`isOnBranchToGetCurve`),c=e(e=>e.seq>t.seq&&e.seqc(e)&&s(e))},`shouldRerouteArrow`),Z=e((e,t,n=0)=>{let r=e+Math.abs(e-t)/2;return n>5?r:W.every(e=>Math.abs(e-r)>=10)?(W.push(r),r):Z(e,t-Math.abs(e-t)/5,n+1)},`findLane`),Fe=e((e,t,n,r)=>{let{theme:i}=p(),a=R.has(i??``),o=V.get(t.id),s=V.get(n.id);if(o===void 0||s===void 0)throw Error(`Commit positions not found for commits ${t.id} and ${n.id}`);let c=Pe(t,n,o,s,r),l=``,u=``,d=0,f=0,m=B.get(n.branch)?.index;n.type===x.MERGE&&t.id!==n.parents[0]&&(m=B.get(t.branch)?.index);let h;if(c){l=`A 10 10, 0, 0, 0,`,u=`A 10 10, 0, 0, 1,`,d=10,f=10;let e=o.ys.x&&(l=`A 20 20, 0, 0, 0,`,u=`A 20 20, 0, 0, 1,`,d=20,f=20,h=n.type===x.MERGE&&t.id!==n.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${s.y-d} ${u} ${o.x-f} ${s.y} L ${s.x} ${s.y}`:`M ${o.x} ${o.y} L ${s.x+d} ${o.y} ${l} ${s.x} ${o.y+f} L ${s.x} ${s.y}`),o.x===s.x&&(h=`M ${o.x} ${o.y} L ${s.x} ${s.y}`)):K===`BT`?(o.xs.x&&(l=`A 20 20, 0, 0, 0,`,u=`A 20 20, 0, 0, 1,`,d=20,f=20,h=n.type===x.MERGE&&t.id!==n.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${s.y+d} ${l} ${o.x-f} ${s.y} L ${s.x} ${s.y}`:`M ${o.x} ${o.y} L ${s.x+d} ${o.y} ${u} ${s.x} ${o.y-f} L ${s.x} ${s.y}`),o.x===s.x&&(h=`M ${o.x} ${o.y} L ${s.x} ${s.y}`)):(o.ys.y&&(h=n.type===x.MERGE&&t.id!==n.parents[0]?`M ${o.x} ${o.y} L ${s.x-d} ${o.y} ${l} ${s.x} ${o.y-f} L ${s.x} ${s.y}`:`M ${o.x} ${o.y} L ${o.x} ${s.y+d} ${u} ${o.x+f} ${s.y} L ${s.x} ${s.y}`),o.y===s.y&&(h=`M ${o.x} ${o.y} L ${s.x} ${s.y}`));if(h===void 0)throw Error(`Line definition not found`);e.append(`path`).attr(`d`,h).attr(`class`,`arrow arrow`+z(m,F,a))},`drawArrow`),Ie=e((e,t)=>{let n=e.append(`g`).attr(`class`,`commit-arrows`);[...t.keys()].forEach(e=>{let r=t.get(e);r.parents&&r.parents.length>0&&r.parents.forEach(e=>{Fe(n,t.get(e),r,t)})})},`drawArrows`),Le=e((e,t,n,r)=>{let{look:i,theme:a,themeVariables:o}=p(),{dropShadow:s,THEME_COLOR_LIMIT:c}=o,l=I.has(a??``),u=R.has(a??``),d=e.append(`g`);t.forEach((e,t)=>{let a=z(t,l?c:F,u),o=B.get(e.name)?.pos;if(o===void 0)throw Error(`Position not found for branch ${e.name}`);let f=K===`TB`||K===`BT`?o:l?o+L/2+1:o-2,p=d.append(`line`);p.attr(`x1`,0),p.attr(`y1`,f),p.attr(`x2`,G),p.attr(`y2`,f),p.attr(`class`,`branch branch`+a),K===`TB`?(p.attr(`y1`,H),p.attr(`x1`,o),p.attr(`y2`,G),p.attr(`x2`,o)):K===`BT`&&(p.attr(`y1`,G),p.attr(`x1`,o),p.attr(`y2`,H),p.attr(`x2`,o)),W.push(f);let m=e.name,h=J(m),g=d.insert(`rect`),_=d.insert(`g`).attr(`class`,`branchLabel`).insert(`g`).attr(`class`,`label branch-label`+a);_.node().appendChild(h);let v=h.getBBox(),y=l?0:4,b=l?16:0,x=l?L:0;i===`neo`&&g.attr(`data-look`,`neo`),g.attr(`class`,`branchLabelBkg label`+a).attr(`style`,i===`neo`?`filter:${l?`url(#${r}-drop-shadow)`:s}`:``).attr(`rx`,y).attr(`ry`,y).attr(`x`,-v.width-4-(n.rotateCommitLabel===!0?30:0)).attr(`y`,-v.height/2+10).attr(`width`,v.width+18+b).attr(`height`,v.height+4+x),_.attr(`transform`,`translate(`+(-v.width-14-(n.rotateCommitLabel===!0?30:0)+b/2)+`, `+(f-v.height/2-2)+`)`),K===`TB`?(g.attr(`x`,o-v.width/2-10).attr(`y`,0),_.attr(`transform`,`translate(`+(o-v.width/2-5)+`, 0)`),l&&(g.attr(`transform`,`translate(${-b/2-3}, ${-x-10})`),_.attr(`transform`,`translate(`+(o-v.width/2-5)+`, `+(-x*2+7)+`)`))):K===`BT`?(g.attr(`x`,o-v.width/2-10).attr(`y`,G),_.attr(`transform`,`translate(`+(o-v.width/2-5)+`, `+G+`)`),l&&(g.attr(`transform`,`translate(${-b/2-3}, ${x+10})`),_.attr(`transform`,`translate(`+(o-v.width/2-5)+`, `+(G+x*2+4)+`)`))):g.attr(`transform`,`translate(-19, `+(f-12-x/2)+`)`)})},`drawBranches`),Re=e(function(e,t,n,r,i){return B.set(e,{pos:t,index:n}),t+=50+(i?40:0)+(K===`TB`||K===`BT`?r.width/2:0),t},`setBranchPosition`),ze={draw:e(function(e,r,i,a){q(),t.debug(`in gitgraph renderer`,e+` -`,`id:`,r,i);let s=a.db;if(!s.getConfig){t.error(`getConfig method is not available on db`);return}let c=s.getConfig(),l=c.rotateCommitLabel??!1;U=s.getCommits();let u=s.getBranchesAsObjArray();K=s.getDirection();let d=n(`[id="${r}"]`),{look:f,theme:m,themeVariables:g}=p(),{useGradient:_,gradientStart:v,gradientStop:y,filterColor:b}=g;if(_){let e=d.append(`defs`).append(`linearGradient`).attr(`id`,r+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,v).attr(`stop-opacity`,1),e.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,y).attr(`stop-opacity`,1)}f===`neo`&&I.has(m??``)&&d.append(`defs`).append(`filter`).attr(`id`,r+`-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,b);let x=0;u.forEach((e,t)=>{let n=J(e.name),r=d.append(`g`),i=r.insert(`g`).attr(`class`,`branchLabel`),a=i.insert(`g`).attr(`class`,`label branch-label`);a.node()?.appendChild(n);let o=n.getBBox();x=Re(e.name,x,t,o,l),a.remove(),i.remove(),r.remove()}),X(d,U,!1,c),c.showBranches&&Le(d,u,c,r),Ie(d,U),X(d,U,!0,c),h.insertTitle(d,`gitTitleText`,c.titleTopMargin??0,s.getDiagramTitle()),o(void 0,d,c.diagramPadding,c.useMaxWidth)},`draw`)},Q=8,$=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),Be=new Set([`redux-color`,`redux-dark-color`]),Ve=new Set([`neo`,`neo-dark`]),He=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),Ue=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`,`neo`,`neo-dark`]),We=e(e=>{let{svgId:t}=e,n=``;if(e.useGradient&&t)for(let r=0;r{let{theme:t,themeVariables:n}=c(),{borderColorArray:r}=n,i=$.has(t);if(Ve.has(t)){let t=``;for(let n=0;n`${Array.from({length:e.THEME_COLOR_LIMIT},(e,t)=>t).map(t=>{let n=t%Q;return` - .branch-label${t} { fill: ${e[`gitBranchLabel`+n]}; } - .commit${t} { stroke: ${e[`git`+n]}; fill: ${e[`git`+n]}; } - .commit-highlight${t} { stroke: ${e[`gitInv`+n]}; fill: ${e[`gitInv`+n]}; } - .label${t} { fill: ${e[`git`+n]}; } - .arrow${t} { stroke: ${e[`git`+n]}; } - `}).join(` -`)}`,`normalTheme`),qe={parser:be,db:A,renderer:ze,styles:e(e=>{let{theme:t}=c(),n=Ue.has(t);return` - .commit-id, - .commit-msg, - .branch-label { - fill: lightgrey; - color: lightgrey; - font-family: 'trebuchet ms', verdana, arial, sans-serif; - font-family: var(--mermaid-font-family); - } - - ${n?Ge(e):Ke(e)} - - .branch { - stroke-width: ${e.strokeWidth}; - stroke: ${e.commitLineColor??e.lineColor}; - stroke-dasharray: ${n?`4 2`:`2`}; - } - .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${n?e.nodeBorder:e.commitLabelColor}; ${n?`font-weight:${e.noteFontWeight};`:``}} - .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${n?`transparent`:e.commitLabelBackground}; opacity: ${n?``:.5}; } - .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} - .tag-label-bkg { fill: ${n?e.mainBkg:e.tagLabelBackground}; stroke: ${n?e.nodeBorder:e.tagLabelBorder}; ${n?`filter:${e.dropShadow}`:``} } - .tag-hole { fill: ${e.textColor}; } - - .commit-merge { - stroke: ${n?e.mainBkg:e.primaryColor}; - fill: ${n?e.mainBkg:e.primaryColor}; - } - .commit-reverse { - stroke: ${n?e.mainBkg:e.primaryColor}; - fill: ${n?e.mainBkg:e.primaryColor}; - stroke-width: ${n?e.strokeWidth:3}; - } - .commit-highlight-outer { - } - .commit-highlight-inner { - stroke: ${n?e.mainBkg:e.primaryColor}; - fill: ${n?e.mainBkg:e.primaryColor}; - } - - .arrow { - /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */ - stroke-width: ${$.has(t)?e.strokeWidth:8}; - stroke-linecap: round; - fill: none - } - .gitTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.textColor}; - } -`},`getStyles`)};export{qe as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/graphlib-DS17s2tU.js b/dist-desktop/assets/graphlib-DS17s2tU.js deleted file mode 100644 index 8beeacf..0000000 --- a/dist-desktop/assets/graphlib-DS17s2tU.js +++ /dev/null @@ -1 +0,0 @@ -var e=typeof global==`object`&&global&&global.Object===Object&&global,t=typeof self==`object`&&self&&self.Object===Object&&self,n=e||t||Function(`return this`)(),r=n.Symbol,i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;function c(e){var t=a.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch{}var i=o.call(e);return r&&(t?e[s]=n:delete e[s]),i}var l=Object.prototype.toString;function u(e){return l.call(e)}var d=`[object Null]`,f=`[object Undefined]`,p=r?r.toStringTag:void 0;function m(e){return e==null?e===void 0?f:d:p&&p in Object(e)?c(e):u(e)}function h(e){return typeof e==`object`&&!!e}var g=`[object Symbol]`;function _(e){return typeof e==`symbol`||h(e)&&m(e)==g}function v(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n0){if(++t>=we)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function T(e){return function(){return e}}var Oe=function(){try{var e=w(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),ke=De(Oe?function(e,t){return Oe(e,`toString`,{configurable:!0,enumerable:!1,value:T(t),writable:!0})}:x);function Ae(e,t){for(var n=-1,r=e==null?0:e.length;++n-1}var Ie=9007199254740991,Le=/^(?:0|[1-9]\d*)$/;function Re(e,t){var n=typeof e;return t??=Ie,!!t&&(n==`number`||n!=`symbol`&&Le.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=Ue}function E(e){return e!=null&&We(e.length)&&!S(e)}var Ge=Object.prototype;function Ke(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Ge)}function qe(e,t){for(var n=-1,r=Array(e);++n-1}function nn(e,t){var n=this.__data__,r=F(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function I(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0&&n(s)?t>1?Tn(s,t-1,n,r,i):Sn(i,s):r||(i[i.length]=s)}return i}function En(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++is))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&or?new G:void 0;for(a.set(e,t),a.set(t,e);++d=mi){var l=t?null:pi(e);if(l)return lr(l);o=!1,i=ir,c=new G}else c=t?[]:s;outer:for(;++r1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Q,this._children[e]={},this._children[Q][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],J(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),J(M(this._in[e]),t),delete this._in[e],delete this._preds[e],J(M(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(Z(t))t=Q;else{t+=``;for(var n=t;!Z(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==Q)return t}}children(e){if(Z(e)&&(e=Q),this._isCompound){var t=this._children[e];if(t)return M(t)}else if(e===Q)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return M(t)}successors(e){var t=this._sucs[e];if(t)return M(t)}neighbors(e){var t=this.predecessors(e);if(t)return gi(t,this.successors(e))}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;J(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),J(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&J(t.nodes(),function(e){t.setParent(e,i(e))}),t}setDefaultEdgeLabel(e){return S(e)||(e=T(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return X(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return fi(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,Z(n)||(n=``+n);var o=$(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!Z(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);var s=Si(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,bi(this._preds[t],e),bi(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?Ci(this._isDirected,arguments[0]):$(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?Ci(this._isDirected,arguments[0]):$(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?Ci(this._isDirected,arguments[0]):$(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],xi(this._preds[t],e),xi(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=X(n);return t?Y(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=X(n);return t?Y(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};yi.prototype._nodeCount=0,yi.prototype._edgeCount=0;function bi(e,t){e[t]?e[t]++:e[t]=1}function xi(e,t){--e[t]||delete e[t]}function $(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+vi+a+vi+(Z(r)?_i:r)}function Si(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function Ci(e,t){return $(e,t.v,t.w,t.name)}export{v as $,Rt as A,He as B,Tn as C,vn as D,B as E,Ot as F,Ae as G,ze as H,O as I,T as J,ke as K,D as L,Pt as M,j as N,_n as O,jt as P,y as Q,Ke as R,V as S,bn as T,Re as U,Ve as V,je as W,x as X,S as Y,b as Z,W as _,Y as a,Ln as b,ni as c,$r as d,_ as et,Zr as f,$n as g,Ur as h,X as i,n as it,Ft as j,M as k,q as l,Wr as m,fi as n,m as nt,J as o,Jr as p,Oe as q,Z as r,r as rt,ii as s,yi as t,h as tt,ei as u,zn as v,Sn as w,Pn as x,Rn as y,E as z}; \ No newline at end of file diff --git a/dist-desktop/assets/index-CXgd9jpl.js b/dist-desktop/assets/index-CXgd9jpl.js deleted file mode 100644 index 6fa379b..0000000 --- a/dist-desktop/assets/index-CXgd9jpl.js +++ /dev/null @@ -1,22 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-BDn33g5C.js","assets/rolldown-runtime-aKtaBQYM.js","assets/react-BLJmJXjR.js","assets/utils-BTuSbA5p.js","assets/client-CwgDvMJw.js","assets/input-mze7gZ5r.js","assets/login-xkhUej_P.js"])))=>i.map(i=>d[i]); -import{i as e,t}from"./rolldown-runtime-aKtaBQYM.js";import{t as n}from"./react-BLJmJXjR.js";import{A as r,B as i,C as a,D as o,E as s,F as c,G as l,H as u,I as d,L as f,M as p,N as m,O as h,P as g,R as _,S as v,T as y,U as b,V as x,W as S,_ as C,a as w,b as ee,c as te,d as ne,f as re,g as ie,h as ae,i as oe,j as se,k as ce,l as le,m as E,n as D,o as ue,p as de,s as fe,u as pe,v as me,w as O,x as he,y as ge,z as _e}from"./utils-BTuSbA5p.js";var ve=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,re());else{var t=n(l);t!==null&&oe(x,t.startTime-e)}}var S=!1,C=-1,w=5,ee=-1;function te(){return g?!0:!(e.unstable_now()-eet&&te());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&oe(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?re():S=!1}}}var re;if(typeof y==`function`)re=function(){y(ne)};else if(typeof MessageChannel<`u`){var ie=new MessageChannel,ae=ie.port2;ie.port1.onmessage=ne,re=function(){ae.postMessage(null)}}else re=function(){_(ne,0)};function oe(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,oe(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,re()))),r},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),ye=t(((e,t)=>{t.exports=ve()})),be=t((e=>{var t=ye(),r=n(),i=l();function a(e){var t=`https://react.dev/errors/`+e;if(1fe||(e.current=de[fe],de[fe]=null,fe--)}function O(e,t){fe++,de[fe]=e.current,e.current=t}var he=pe(null),ge=pe(null),_e=pe(null),ve=pe(null);function be(e,t){switch(O(_e,t),O(ge,e),O(he,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}me(he),O(he,e)}function xe(){me(he),me(ge),me(_e)}function Se(e){e.memoizedState!==null&&O(ve,e);var t=he.current,n=Ud(t,e.type);t!==n&&(O(ge,e),O(he,n))}function Ce(e){ge.current===e&&(me(he),me(ge)),ve.current===e&&(me(ve),$f._currentValue=ue)}var we,Te;function Ee(e){if(we===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);we=t&&t[1]||``,Te=-1)`:-1i||c[r]!==l[i]){var u=` -`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{De=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ee(n):``}function ke(e,t){switch(e.tag){case 26:case 27:case 5:return Ee(e.type);case 16:return Ee(`Lazy`);case 13:return e.child!==t&&t!==null?Ee(`Suspense Fallback`):Ee(`Suspense`);case 19:return Ee(`SuspenseList`);case 0:case 15:return Oe(e.type,!1);case 11:return Oe(e.type.render,!1);case 1:return Oe(e.type,!0);case 31:return Ee(`Activity`);default:return``}}function Ae(e){try{var t=``,n=null;do t+=ke(e,n),n=e,e=e.return;while(e);return t}catch(e){return` -Error generating stack: `+e.message+` -`+e.stack}}var je=Object.prototype.hasOwnProperty,Me=t.unstable_scheduleCallback,Ne=t.unstable_cancelCallback,Pe=t.unstable_shouldYield,Fe=t.unstable_requestPaint,Ie=t.unstable_now,Le=t.unstable_getCurrentPriorityLevel,Re=t.unstable_ImmediatePriority,ze=t.unstable_UserBlockingPriority,Be=t.unstable_NormalPriority,Ve=t.unstable_LowPriority,He=t.unstable_IdlePriority,Ue=t.log,We=t.unstable_setDisableYieldValue,Ge=null,Ke=null;function qe(e){if(typeof Ue==`function`&&We(e),Ke&&typeof Ke.setStrictMode==`function`)try{Ke.setStrictMode(Ge,e)}catch{}}var Je=Math.clz32?Math.clz32:Ze,Ye=Math.log,Xe=Math.LN2;function Ze(e){return e>>>=0,e===0?32:31-(Ye(e)/Xe|0)|0}var Qe=256,$e=262144,et=4194304;function tt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function nt(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=tt(n))):i=tt(o):i=tt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=tt(n))):i=tt(o)):i=tt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function rt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function it(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function at(){var e=et;return et<<=1,!(et&62914560)&&(et=4194304),e}function ot(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function st(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ct(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),xn=!1;if(bn)try{var Sn={};Object.defineProperty(Sn,"passive",{get:function(){xn=!0}}),window.addEventListener(`test`,Sn,Sn),window.removeEventListener(`test`,Sn,Sn)}catch{xn=!1}var Cn=null,wn=null,Tn=null;function k(){if(Tn)return Tn;var e,t=wn,n=t.length,r,i=`value`in Cn?Cn.value:Cn.textContent,a=i.length;for(e=0;e=nr),ar=` `,or=!1;function sr(e,t){switch(e){case`keyup`:return er.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function cr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var lr=!1;function ur(e,t){switch(e){case`compositionend`:return cr(t);case`keypress`:return t.which===32?(or=!0,ar):null;case`textInput`:return e=t.data,e===ar&&or?null:e;default:return null}}function dr(e,t){if(lr)return e===`compositionend`||!tr&&sr(e,t)?(e=k(),Tn=wn=Cn=null,lr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Nr(n)}}function Fr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Fr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ir(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=qt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=qt(e.document)}return t}function Lr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Rr=bn&&`documentMode`in document&&11>=document.documentMode,zr=null,Br=null,Vr=null,Hr=!1;function Ur(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hr||zr==null||zr!==qt(r)||(r=zr,`selectionStart`in r&&Lr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Vr&&Mr(Vr,r)||(Vr=r,r=Dd(Br,`onSelect`),0>=o,i-=o,Fi=1<<32-Je(t)+i|n<h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),N&&Li(i,h),l;if(d===null){for(;hg?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),N&&Li(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return N&&Li(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),N&&Li(i,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===v&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case g:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===v){if(r.tag===7){n(e,r.sibling),c=i(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ne&&Pa(l)===r.type){n(e,r.sibling),c=i(r,o.props),Ba(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===v?(c=Si(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=xi(o.type,o.key,o.props,null,e.mode,c),Ba(c,o),c.return=e,e=c)}return s(e);case _:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=i(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=Ti(o,e.mode,c),c.return=e,e=c}return s(e);case ne:return o=Pa(o),b(e,r,o,c)}if(le(o))return h(e,r,o,c);if(oe(o)){if(l=oe(o),typeof l!=`function`)throw Error(a(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,za(o),c);if(o.$$typeof===S)return b(e,r,ca(e,o),c);Va(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,o),c.return=e,e=c):(n(e,r),c=Ci(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ra=0;var i=b(e,t,n,r);return La=null,i}catch(t){if(t===Oa||t===Aa)throw t;var a=_i(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ua=Ha(!0),Wa=Ha(!1),Ga=!1;function Ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function qa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ya(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=mi(e),pi(e,null,n),t}return ui(e,r,t,n),mi(e)}function Xa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ut(e,n)}}function Za(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Qa=!1;function $a(){if(Qa){var e=ya;if(e!==null)throw e}}function eo(e,t,n,r){Qa=!1;var i=e.updateQueue;Ga=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===va&&(Qa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Ga=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Kl|=o,e.lanes=o,e.memoizedState=d}}function to(e,t){if(typeof e!=`function`)throw Error(a(191,e));e.call(t)}function no(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=E.T,s={};E.T=s,Fs(e,!1,t,n);try{var c=i(),l=E.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ps(e,t,Sa(c,r),mu(e)):Ps(e,t,r,mu(e))}catch(n){Ps(e,t,{then:function(){},status:`rejected`,reason:n},mu())}finally{D.p=a,o!==null&&s.types!==null&&(o.types=s.types),E.T=o}}function ws(){}function Ts(e,t,n,r){if(e.tag!==5)throw Error(a(476));var i=Es(e).queue;Cs(e,i,t,ue,n===null?ws:function(){return Ds(e),n(r)})}function Es(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:ue},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Lo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ds(e){var t=Es(e);t.next===null&&(t=e.alternate.memoizedState),Ps(e,t.next.queue,{},mu())}function Os(){return sa($f)}function ks(){return Mo().memoizedState}function As(){return Mo().memoizedState}function js(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=mu();e=Ja(n);var r=Ya(t,e,n);r!==null&&(gu(r,t,n),Xa(r,t,n)),t={cache:ma()},e.payload=t;return}t=t.return}}function Ms(e,t,n){var r=mu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Is(e)?Ls(t,n):(n=di(e,t,n,r),n!==null&&(gu(n,e,r),Rs(n,t,r)))}function Ns(e,t,n){Ps(e,t,n,mu())}function Ps(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Is(e))Ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,jr(s,o))return ui(e,t,i,0),q===null&&li(),!1}catch{}if(n=di(e,t,i,r),n!==null)return gu(n,e,r),Rs(n,t,r),!0}return!1}function Fs(e,t,n,r){if(r={lane:2,revertLane:fd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Is(e)){if(t)throw Error(a(479))}else t=di(e,n,r,2),t!==null&&gu(t,e,2)}function Is(e){var t=e.alternate;return e===L||t!==null&&t===L}function Ls(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Rs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ut(e,n)}}var zs={readContext:sa,use:Fo,useCallback:B,useContext:B,useEffect:B,useImperativeHandle:B,useLayoutEffect:B,useInsertionEffect:B,useMemo:B,useReducer:B,useRef:B,useState:B,useDebugValue:B,useDeferredValue:B,useTransition:B,useSyncExternalStore:B,useId:B,useHostTransitionStatus:B,useFormState:B,useActionState:B,useOptimistic:B,useMemoCache:B,useCacheRefresh:B};zs.useEffectEvent=B;var Bs={readContext:sa,use:Fo,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:sa,useEffect:us,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),cs(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cs(4194308,4,e,t)},useInsertionEffect:function(e,t){cs(4,2,e,t)},useMemo:function(e,t){var n=jo();t=t===void 0?null:t;var r=e();if(bo){qe(!0);try{e()}finally{qe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=jo();if(n!==void 0){var i=n(t);if(bo){qe(!0);try{n(t)}finally{qe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ms.bind(null,L,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:function(e){e=Ko(e);var t=e.queue,n=Ns.bind(null,L,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:vs,useDeferredValue:function(e,t){return xs(jo(),e,t)},useTransition:function(){var e=Ko(!1);return e=Cs.bind(null,L,e.queue,!0,!1),jo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=L,i=jo();if(N){if(n===void 0)throw Error(a(407));n=n()}else{if(n=t(),q===null)throw Error(a(349));Y&127||Vo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,us(Uo.bind(null,r,o,e),[e]),r.flags|=2048,os(9,{destroy:void 0},Ho.bind(null,r,o,n,t),null),n},useId:function(){var e=jo(),t=q.identifierPrefix;if(N){var n=Ii,r=Fi;n=(r&~(1<<32-Je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(i,{is:r.is}):s.createElement(i)}}o[_t]=t,o[vt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Fd(o,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Pc(t)}}return W(t),Fc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Pc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(a(166));if(e=_e.current,Ji(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=j,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[_t]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Nd(e.nodeValue,n)),e||Gi(t,!0)}else e=Vd(e).createTextNode(r),e[_t]=t,t.stateNode=e}return W(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ji(t),n!==null){if(e===null){if(!r)throw Error(a(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(a(557));e[_t]=t}else Yi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),e=!1}else n=Xi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ho(t),t):(ho(t),null);if(t.flags&128)throw Error(a(558))}return W(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Ji(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(a(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(a(317));i[_t]=t}else Yi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;W(t),i=!1}else i=Xi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(ho(t),t):(ho(t),null)}return ho(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Lc(t,t.updateQueue),W(t),null);case 4:return xe(),e===null&&Cd(t.stateNode.containerInfo),W(t),null;case 10:return P(t.type),W(t),null;case 19:if(me(I),r=t.memoizedState,r===null)return W(t),null;if(i=(t.flags&128)!=0,o=r.rendering,o===null)if(i)Rc(r,!1);else{if(Gl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=go(e),o!==null){for(t.flags|=128,Rc(r,!1),e=o.updateQueue,t.updateQueue=e,Lc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)bi(n,e),n=n.sibling;return O(I,I.current&1|2),N&&Li(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ie()>nu&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304)}else{if(!i)if(e=go(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Lc(t,e),Rc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!N)return W(t),null}else 2*Ie()-r.renderingStartTime>nu&&n!==536870912&&(t.flags|=128,i=!0,Rc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(W(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ie(),e.sibling=null,n=I.current,O(I,i?n&1|2:n&1),N&&Li(t,r.treeForkCount),e);case 22:case 23:return ho(t),so(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(W(t),t.subtreeFlags&6&&(t.flags|=8192)):W(t),n=t.updateQueue,n!==null&&Lc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&me(wa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),P(pa),W(t),null;case 25:return null;case 30:return null}throw Error(a(156,t.tag))}function Bc(e,t){switch(Bi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return P(pa),xe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ce(t),null;case 31:if(t.memoizedState!==null){if(ho(t),t.alternate===null)throw Error(a(340));Yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ho(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(a(340));Yi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return me(I),null;case 4:return xe(),null;case 10:return P(t.type),null;case 22:case 23:return ho(t),so(),e!==null&&me(wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return P(pa),null;case 25:return null;default:return null}}function Vc(e,t){switch(Bi(t),t.tag){case 3:P(pa),xe();break;case 26:case 27:case 5:Ce(t);break;case 4:xe();break;case 31:t.memoizedState!==null&&ho(t);break;case 13:ho(t);break;case 19:me(I);break;case 10:P(t.type);break;case 22:case 23:ho(t),so(),e!==null&&me(wa);break;case 24:P(pa)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{no(t,n)}catch(t){Z(e,e.return,t)}}}function Gc(e,t,n){n.props=qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Id(r,e.type,n,t),r[vt]=t}catch(t){Z(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qd(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Qd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=dn));else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Fd(t,r,n),t[_t]=e,t[vt]=n}catch(t){Z(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,zd=cp,e=Ir(e),Lr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Bd={focusedElem:e,selectionRange:n},cp=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Fd(o,r,n),o[_t]=e,At(o),r=o;break a;case`link`:var s=Hf(`link`,`href`,i).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Pr(s,h),v=Pr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,E.T=null,n=uu,uu=null;var o=ou,s=cu;if(au=0,su=ou=null,cu=0,K&6)throw Error(a(331));var c=K;if(K|=4,Fl(o.current),Dl(o,o.current,s,n),K=c,ad(0,!1),Ke&&typeof Ke.onPostCommitFiberRoot==`function`)try{Ke.onPostCommitFiberRoot(Ge,o)}catch{}return!0}finally{D.p=i,E.T=r,Hu(e,t)}}function Gu(e,t,n){t=Di(n,t),t=$s(e.stateNode,t,2),e=Ya(e,t,2),e!==null&&(st(e,2),id(e))}function Z(e,t,n){if(e.tag===3)Gu(e,e,n);else for(;t!==null;){if(t.tag===3){Gu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(iu===null||!iu.has(r))){e=Di(n,e),n=ec(2),r=Ya(t,n,2),r!==null&&(tc(n,r,t,e),st(r,2),id(r));break}}t=t.return}}function Ku(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ul=!0,i.add(n),e=qu.bind(null,e,t,n),t.then(e,e))}function qu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(Gl===4||Gl===3&&(Y&62914560)===Y&&300>Ie()-eu?!(K&2)&&Cu(e,0):Jl|=n,Xl===Y&&(Xl=0)),id(e)}function Ju(e,t){t===0&&(t=at()),e=fi(e,t),e!==null&&(st(e,t),id(e))}function Yu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ju(e,n)}function Xu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(a(314))}r!==null&&r.delete(t),Ju(e,n)}function Zu(e,t){return Me(e,t)}var Qu=null,$u=null,ed=!1,td=!1,nd=!1,rd=0;function id(e){e!==$u&&e.next===null&&($u===null?Qu=$u=e:$u=$u.next=e),td=!0,ed||(ed=!0,dd())}function ad(e,t){if(!nd&&td){nd=!0;do for(var n=!1,r=Qu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ud(r,a))}else a=Y,a=nt(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||rt(r,a)||(n=!0,ud(r,a));r=r.next}while(n);nd=!1}}function od(){sd()}function sd(){td=ed=!1;var e=0;rd!==0&&Kd()&&(e=rd);for(var t=Ie(),n=null,r=Qu;r!==null;){var i=r.next,a=cd(r,t);a===0?(r.next=null,n===null?Qu=i:n.next=i,i===null&&($u=n)):(n=r,(e!==0||a&3)&&(td=!0)),r=i}au!==0&&au!==5||ad(e,!1),rd!==0&&(rd=0)}function cd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Ld(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Sf(e,t,n){var r=xf;if(r&&typeof t==`string`&&t){var i=Yt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),gf.has(i)||(gf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Fd(t,`link`,e),At(t),r.head.appendChild(t)))}}function Cf(e){vf.D(e),Sf(`dns-prefetch`,e,null)}function wf(e,t){vf.C(e,t),Sf(`preconnect`,e,t)}function Tf(e,t,n){vf.L(e,t,n);var r=xf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Yt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Yt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Yt(n.imageSizes)+`"]`)):i+=`[href="`+Yt(e)+`"]`;var a=i;switch(t){case`style`:a=jf(e);break;case`script`:a=Ff(e)}hf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),hf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Mf(a))||t===`script`&&r.querySelector(If(a))||(t=r.createElement(`link`),Fd(t,`link`,e),At(t),r.head.appendChild(t)))}}function Ef(e,t){vf.m(e,t);var n=xf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Yt(r)+`"][href="`+Yt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Ff(e)}if(!hf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),hf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(If(a)))return}r=n.createElement(`link`),Fd(r,`link`,e),At(r),n.head.appendChild(r)}}}function Df(e,t,n){vf.S(e,t,n);var r=xf;if(r&&e){var i=kt(r).hoistableStyles,a=jf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Mf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=hf.get(a))&&zf(e,n);var c=o=r.createElement(`link`);At(c),Fd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Rf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Of(e,t){vf.X(e,t);var n=xf;if(n&&e){var r=kt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=m({src:e,async:!0},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),At(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t){vf.M(e,t);var n=xf;if(n&&e){var r=kt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),At(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t,n,r){var i=(i=_e.current)?_f(i):null;if(!i)throw Error(a(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=jf(n.href),n=kt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=jf(n.href);var o=kt(i).hoistableStyles,s=o.get(e);if(s||(i=i.ownerDocument||i,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=i.querySelector(Mf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),hf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},hf.set(e,n),o||Pf(i,e,n,s.state))),t&&r===null)throw Error(a(528,``));return s}if(t&&r!==null)throw Error(a(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Ff(n),n=kt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(a(444,e))}}function jf(e){return`href="`+Yt(e)+`"`}function Mf(e){return`link[rel="stylesheet"][`+e+`]`}function Nf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Pf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Fd(t,`link`,n),At(t),e.head.appendChild(t))}function Ff(e){return`[src="`+Yt(e)+`"]`}function If(e){return`script[async]`+e}function Lf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Yt(n.href)+`"]`);if(r)return t.instance=r,At(r),r;var i=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),At(r),Fd(r,`style`,i),Rf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=jf(n.href);var o=e.querySelector(Mf(i));if(o)return t.state.loading|=4,t.instance=o,At(o),o;r=Nf(n),(i=hf.get(i))&&zf(r,i),o=(e.ownerDocument||e).createElement(`link`),At(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Fd(o,`link`,r),t.state.loading|=4,Rf(o,n.precedence,e),t.instance=o;case`script`:return o=Ff(n.src),(i=e.querySelector(If(o)))?(t.instance=i,At(i),i):(r=n,(i=hf.get(o))&&(r=m({},n),Bf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),At(i),Fd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(a(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Rf(r,n.precedence,e));return t.instance}function Rf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Wf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Gf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Kf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=jf(r.href),a=t.querySelector(Mf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Yf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,At(a);return}a=t.ownerDocument||t,r=Nf(r),(i=hf.get(i))&&zf(r,i),a=a.createElement(`link`),At(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Fd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Yf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var qf=0;function Jf(e,t){return e.stylesheets&&e.count===0&&Zf(e,e.stylesheets),0qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Yf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Xf=null;function Zf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Xf=new Map,t.forEach(Qf,e),Xf=null,Yf.call(e))}function Qf(e,t){if(!(t.state.loading&4)){var n=Xf.get(e);if(n)var r=n.get(null);else{n=new Map,Xf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=be()})),Se=`__TSS_CONTEXT`,Ce=Symbol.for(`TSS_SERVER_FUNCTION`),we=Symbol.for(`TSS_SERVER_FUNCTION_FACTORY`),Te=`application/x-tss-framed`,Ee={JSON:0,CHUNK:1,END:2,ERROR:3};`${Te}`;var De=/;\s*v=(\d+)/;function Oe(e){let t=e.match(De);return t?parseInt(t[1],10):void 0}function ke(e){let t=Oe(e);if(t!==void 0&&t!==1)throw Error(`Incompatible framed protocol version: server=${t}, client=1. Please ensure client and server are using compatible versions.`)}var Ae=()=>window.__TSS_START_OPTIONS__;function je(e){return e?.isNotFound===!0}function Me(){try{return sessionStorage}catch{return}}var Ne=`tsr-scroll-restoration-v1_3`,Pe=Me();function Fe(){try{return JSON.parse(Pe?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Ie(){try{Pe?.setItem(Ne,JSON.stringify(Le))}catch{}}var Le=Fe(),Re=`data-scroll-restoration-id`,ze=e=>e.state.__TSR_key||e.href;function Be(e){let t=e.getAttribute(Re);if(t)return`[${Re}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var Ve=!1,He=`window`;function Ue(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function We(e){let t=new Set;for(let n of e){if(n===He)continue;let e=Ue(n);e&&t.add(e)}return t}function Ge(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||ze,a=new Set,o=e=>{let t=Le[e]||={};for(let e of a)e===document?t[He]={scrollX,scrollY}:e.isConnected&&(t[Be(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Ve=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Ve||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Ie()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=Le[d];if(e){let t=Le[u];for(let n in e){if(n===He){if(s)continue}else{let e=Ue(n);if(!e||s&&o&&(l??=We(o),l.has(e)))continue}t||=Le[u]={},t[n]??=e[n]}}}Ve=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=We(o));let t=e&&i&&c,s=r.restoring?Le[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===He){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Ue(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Ve=!1}}))}function Ke(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function qe(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Je(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=qe(r):Array.isArray(t)?t.push(qe(r)):n[e]=[t,qe(r)]}return n}var Ye=Ze(JSON.parse),Xe=Qe(JSON.stringify,JSON.parse);function Ze(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=Je(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function Qe(e,t){let n=typeof t==`function`;function r(r){if(typeof r==`object`&&r)try{return e(r)}catch{}else if(n&&typeof r==`string`)try{return t(r),e(r)}catch{}return r}return e=>{let t=Ke(e,r);return t?`?${t}`:``}}var $e=`__root__`;function et(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function tt(e){return e instanceof Response&&!!e.options}function nt(e){if(typeof e==`object`&&e&&e.isSerializedRedirect)return et(e)}function rt(e){return{input:({url:t})=>{for(let n of e)t=at(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=ot(e[n],t);return t}}}function it(e){let t=ge(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=C([`/`,t,e.pathname]),e)}}function at(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function ot(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function st(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i,init:a}=t,o=new Map,s=new Map,c=new Map,l=n(e.status),u=n(e.loadedAt),d=n(e.isLoading),f=n(e.isTransitioning),p=n(e.location),m=n(e.resolvedLocation),g=n(e.statusCode),_=n(e.redirect),v=n([]),y=n([]),b=n([]),x=r(()=>ct(o,v.get())),S=r(()=>ct(s,y.get())),C=r(()=>ct(c,b.get())),w=r(()=>v.get()[0]),ee=r(()=>v.get().some(e=>o.get(e)?.get().status===`pending`)),te=r(()=>({locationHref:p.get().href,resolvedLocationHref:m.get()?.href,status:l.get()})),ne=r(()=>({status:l.get(),loadedAt:u.get(),isLoading:d.get(),isTransitioning:f.get(),matches:x.get(),location:p.get(),resolvedLocation:m.get(),statusCode:g.get(),redirect:_.get()})),re=h(64);function ie(e){let t=re.get(e);return t||(t=r(()=>{let t=v.get();for(let n of t){let t=o.get(n);if(t&&t.routeId===e)return t.get()}}),re.set(e,t)),t}let ae={status:l,loadedAt:u,isLoading:d,isTransitioning:f,location:p,resolvedLocation:m,statusCode:g,redirect:_,matchesId:v,pendingIds:y,cachedIds:b,matches:x,pendingMatches:S,cachedMatches:C,firstId:w,hasPending:ee,matchRouteDeps:te,matchStores:o,pendingMatchStores:s,cachedMatchStores:c,__store:ne,getRouteMatchStore:ie,setMatches:oe,setPending:se,setCached:ce};oe(e.matches),a?.(ae);function oe(e){lt(e,o,v,n,i)}function se(e){lt(e,s,y,n,i)}function ce(e){lt(e,c,b,n,i)}return ae}function ct(e,t){let n=[];for(let r of t){let t=e.get(r);t&&n.push(t.get())}return n}function lt(e,t,n,r,i){let a=e.map(e=>e.id),o=new Set(a);i(()=>{for(let e of t.keys())o.has(e)||t.delete(e);for(let n of e){let e=t.get(n.id);if(!e){let e=r(n);e.routeId=n.routeId,t.set(n.id,e);continue}e.routeId=n.routeId,e.get()!==n&&e.set(n)}se(n.get(),a)||n.set(a)})}var ut=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},dt=e=>e.stores.matchesId.get().some(t=>e.stores.matchStores.get(t)?.get()._forcePending),ft=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),pt=(e,t,n=!0)=>{let r={...e.router.options.context??{}},i=n?t:t-1;for(let t=0;t<=i;t++){let n=e.matches[t];if(!n)continue;let i=e.router.getMatch(n.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},mt=(e,t)=>{if(!e.matches.length)return;let n=t.routeId,r=e.matches.findIndex(t=>t.routeId===e.router.routeTree.id),i=r>=0?r:0,a=n?e.matches.findIndex(e=>e.routeId===n):e.firstBadMatchIndex??e.matches.length-1;a<0&&(a=i);for(let t=a;t>=0;t--){let n=e.matches[t];if(e.router.looseRoutesById[n.routeId].options.notFoundComponent)return t}return n?a:i},ht=(e,t,n)=>{if(!(!tt(n)&&!je(n)))throw tt(n)&&n.redirectHandled&&!n.options.reloadDocument?n:(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:tt(n)?`redirected`:je(n)?`notFound`:r.status===`pending`?`success`:r.status,context:pt(e,t.index),isFetching:!1,error:n})),je(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),tt(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n)),n)},gt=(e,t)=>{let n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},_t=(e,t,n)=>{let r=pt(e,n);e.updateMatch(t,e=>({...e,context:r}))},vt=(e,t,n)=>{let{id:r,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;e.firstBadMatchIndex??=t,ht(e,e.router.getMatch(r),n);try{a.options.onError?.(n)}catch(t){n=t,ht(e,e.router.getMatch(r),n)}e.updateMatch(r,e=>(e._nonReactive.beforeLoadPromise?.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loadPromise?.resolve(),{...e,error:n,status:`error`,isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!tt(n)&&!je(n)&&(e.serialError??=n)},yt=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;let i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!ft(e,t)&&(n.options.loader||n.options.beforeLoad||At(n))&&typeof i==`number`&&i!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent)){let t=setTimeout(()=>{ut(e)},i);r._nonReactive.pendingTimeout=t}},bt=(e,t,n)=>{let r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;yt(e,t,n,r);let i=()=>{let n=e.router.getMatch(t);n.preload&&(n.status===`redirected`||n.status===`notFound`)&&ht(e,n,n.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},xt=(e,t,n,r)=>{let i=e.router.getMatch(t),a=i._nonReactive.loadPromise;i._nonReactive.loadPromise=p(()=>{a?.resolve(),a=void 0});let{paramsError:o,searchError:s}=i;o&&vt(e,n,o),s&&vt(e,n,s),yt(e,t,r,i);let c=new AbortController,l=!1,u=()=>{l||(l=!0,e.updateMatch(t,e=>({...e,isFetching:`beforeLoad`,fetchCount:e.fetchCount+1,abortController:c})))},d=()=>{i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,e=>({...e,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{u(),d()});return}i._nonReactive.beforeLoadPromise=p();let f={...pt(e,n,!1),...i.__routeContext},{search:m,params:h,cause:g}=i,_=ft(e,t),v={search:m,abortController:c,params:h,preload:_,context:f,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:_?`preload`:g,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},y=r=>{if(r===void 0){e.router.batch(()=>{u(),d()});return}(tt(r)||je(r))&&(u(),vt(e,n,r)),e.router.batch(()=>{u(),e.updateMatch(t,e=>({...e,__beforeLoadContext:r})),d()})},b;try{if(b=r.options.beforeLoad(v),x(b))return u(),b.catch(t=>{vt(e,n,t)}).then(y)}catch(t){u(),vt(e,n,t)}y(b)},St=(e,t)=>{let{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],a=()=>s(),o=()=>xt(e,n,t,i),s=()=>{if(gt(e,n))return;let t=bt(e,n,i);return x(t)?t.then(o):o()};return a()},Ct=(e,t,n)=>{let r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;let i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(i),n.options.scripts?.(i),n.options.headers?.(i)]).then(([e,t,n])=>({meta:e?.meta,links:e?.links,headScripts:e?.scripts,headers:n,scripts:t,styles:e?.styles}))},wt=(e,t,n,r,i)=>{let a=t[r-1],{params:o,loaderDeps:s,abortController:c,cause:l}=e.router.getMatch(n),u=pt(e,r),d=ft(e,n);return{params:o,deps:s,preload:!!d,parentMatchPromise:a,abortController:c,context:u,location:e.location,navigate:t=>e.router.navigate({...t,_fromLocation:e.location}),cause:d?`preload`:l,route:i,...e.router.options.additionalContext}},Tt=async(e,t,n,r,i)=>{try{let a=e.router.getMatch(n);try{kt(i);let o=i.options.loader,s=typeof o==`function`?o:o?.handler,c=s?.(wt(e,t,n,r,i)),l=!!s&&x(c);if((l||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||a._nonReactive.minPendingPromise)&&e.updateMatch(n,e=>({...e,isFetching:`loader`})),s){let t=l?await c:c;ht(e,e.router.getMatch(n),t),t!==void 0&&e.updateMatch(n,e=>({...e,loaderData:t}))}i._lazyPromise&&await i._lazyPromise;let u=a._nonReactive.minPendingPromise;u&&await u,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,t=>({...t,error:void 0,context:pt(e,r),status:`success`,isFetching:!1,updatedAt:Date.now()}))}catch(t){let o=t;if(o?.name===`AbortError`){if(a.abortController.signal.aborted){a._nonReactive.loaderPromise?.resolve(),a._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,t=>({...t,status:t.status===`pending`?`success`:t.status,isFetching:!1,context:pt(e,r)}));return}let s=a._nonReactive.minPendingPromise;s&&await s,je(t)&&await i.options.notFoundComponent?.preload?.(),ht(e,e.router.getMatch(n),t);try{i.options.onError?.(t)}catch(t){o=t,ht(e,e.router.getMatch(n),t)}!tt(o)&&!je(o)&&await kt(i,[`errorComponent`]),e.updateMatch(n,t=>({...t,error:o,context:pt(e,r),status:`error`,isFetching:!1}))}}catch(t){let r=e.router.getMatch(n);r&&(r._nonReactive.loaderPromise=void 0),ht(e,r,t)}},Et=async(e,t,n)=>{async function r(r,a,c,l,d){let f=Date.now()-a.updatedAt,p=r?d.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:d.options.staleTime??e.router.options.defaultStaleTime??0,m=d.options.shouldReload,h=typeof m==`function`?m(wt(e,t,i,n,d)):m,{status:g,invalid:_}=l,v=f>=p&&(!!e.forceStaleReload||l.cause===`enter`||c!==void 0&&c!==l.id);o=g===`success`&&(_||(h??v)),r&&d.options.preload===!1||(o&&!e.sync&&u?(s=!0,(async()=>{try{await Tt(e,t,i,n,d);let r=e.router.getMatch(i);r._nonReactive.loaderPromise?.resolve(),r._nonReactive.loadPromise?.resolve(),r._nonReactive.loaderPromise=void 0,r._nonReactive.loadPromise=void 0}catch(t){tt(t)&&await e.router.navigate(t.options)}})()):g!==`success`||o?await Tt(e,t,i,n,d):_t(e,i,n))}let{id:i,routeId:a}=e.matches[n],o=!1,s=!1,c=e.router.looseRoutesById[a],l=c.options.loader,u=((typeof l==`function`?void 0:l?.staleReloadMode)??e.router.options.defaultStaleReloadMode)!==`blocking`;if(gt(e,i)){if(!e.router.getMatch(i))return e.matches[n];_t(e,i,n)}else{let t=e.router.getMatch(i),o=e.router.stores.matchesId.get()[n],s=(o&&e.router.stores.matchStores.get(o)||null)?.routeId===a?o:e.router.stores.matches.get().find(e=>e.routeId===a)?.id,l=ft(e,i);if(t._nonReactive.loaderPromise){if(t.status===`success`&&!e.sync&&!t.preload&&u)return t;await t._nonReactive.loaderPromise;let n=e.router.getMatch(i),a=n._nonReactive.error||n.error;a&&ht(e,n,a),n.status===`pending`&&await r(l,t,s,n,c)}else{let n=l&&!e.router.stores.matchStores.has(i),a=e.router.getMatch(i);a._nonReactive.loaderPromise=p(),n!==a.preload&&e.updateMatch(i,e=>({...e,preload:n})),await r(l,t,s,a,c)}}let d=e.router.getMatch(i);s||(d._nonReactive.loaderPromise?.resolve(),d._nonReactive.loadPromise?.resolve(),d._nonReactive.loadPromise=void 0),clearTimeout(d._nonReactive.pendingTimeout),d._nonReactive.pendingTimeout=void 0,s||(d._nonReactive.loaderPromise=void 0),d._nonReactive.dehydrated=void 0;let f=s?d.isFetching:!1;return f!==d.isFetching||d.invalid!==!1?(e.updateMatch(i,e=>({...e,isFetching:f,invalid:!1})),e.router.getMatch(i)):d};async function Dt(e){let t=e,n=[];dt(t.router)&&ut(t);let r;for(let e=0;e({...e,...a?{status:`success`,globalNotFound:!0,error:void 0}:{status:`notFound`,error:l},isFetching:!1})),u=e,await kt(r,[`notFoundComponent`])}else if(!t.preload){let e=t.matches[0];e.globalNotFound||t.router.getMatch(e.id)?.globalNotFound&&t.updateMatch(e.id,e=>({...e,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){let e=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await kt(e,[`errorComponent`])}for(let e=0;e<=u;e++){let{id:n,routeId:r}=t.matches[e],i=t.router.looseRoutesById[r];try{let e=Ct(t,n,i);if(e){let r=await e;t.updateMatch(n,e=>({...e,...r}))}}catch(e){console.error(`Error executing head for route ${r}:`,e)}}let d=ut(t);if(x(d)&&await d,l)throw l;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function Ot(e,t){let n=t.map(t=>e.options[t]?.preload?.()).filter(Boolean);if(n.length!==0)return Promise.all(n)}function kt(e,t=jt){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);let n=()=>e._componentsLoaded?void 0:t===jt?(()=>{if(e._componentsPromise===void 0){let t=Ot(e,jt);t?e._componentsPromise=t.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():Ot(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function At(e){for(let t of jt)if(e.options[t]?.preload)return!0;return!1}var jt=[`component`,`errorComponent`,`pendingComponent`,`notFoundComponent`],Mt=`__TSR_index`,Nt=`popstate`,Pt=`beforeunload`;function Ft(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=zt(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[Mt];i=It(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[Mt];i=It(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[Mt]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function It(e,t){t||={};let n=Bt();return{...t,key:n,__TSR_key:n,[Mt]:e}}function Lt(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>zt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Bt();t.history.replaceState({[Mt]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_,v=()=>{g&&(C._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,``,g.href),C._ignoreSubscribers=!1,g=void 0,_=void 0,u=void 0)},y=(e,t,n)=>{let r=s(t);_||(u=l),l=zt(t,n),g={href:r,state:n,isPush:g?.isPush||e===`push`},_||=Promise.resolve().then(()=>v())},b=e=>{l=c(),C.notify({type:e})},x=async()=>{if(f){f=!1;return}let e=c(),n=e.state[Mt]-l.state[Mt],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),C.notify(u);return}}}l=c(),C.notify(u)},S=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},C=Ft({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>y(`push`,e,t),replaceState:(e,t)=>y(`replace`,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Pt,S,{capture:!0}),t.removeEventListener(Nt,x)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(Pt,S,{capture:!0}),t.addEventListener(Nt,x),t.history.pushState=function(...e){let r=n.apply(t.history,e);return C._ignoreSubscribers||b(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return C._ignoreSubscribers||b(`REPLACE`),n},C}function Rt(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function zt(e,t){let n=Rt(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=Bt();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[Mt]:0,key:a,__TSR_key:a}}}function Bt(){return(Math.random()+1).toString(36).substring(7)}function Vt(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Ht(e,t){let n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:n?.pathname!==r.pathname,hrefChanged:n?.href!==r.href,hashChanged:n?.hash!==r.hash}}var Ut=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=e=>e(),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=ae(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Lt()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!==`null`?this.origin=window.origin:this.origin=`http://localhost`),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=h(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=st(Kt(this.latestLocation),e),Ge(this)}let a=!1,o=this.options.basepath??`/`,s=this.options.rewrite;if(r||n!==o||i!==s){this.basepath=o;let e=[],t=ge(o);t&&t!==`/`&&e.push(it({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:rt(e),this.history&&this.updateLatestLocation(),a=!0}a&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<`u`&&`CSS`in window&&typeof window.CSS?.supports==`function`&&(this.isViewTransitionTypesSupported=window.CSS.supports(`selector(:active-view-transition-type(a))`))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=o(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&s(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{this.subscribers.forEach(t=>{t.eventType===e.type&&t.fn(e)})},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:m(e).path,external:!1,searchStr:o,search:b(t?.search,i),hash:m(r.slice(1)).path,state:S(t?.state,a)}}let o=new URL(i,this.origin),s=at(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:m(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:b(t?.search,c),hash:m(s.hash.slice(1)).path,state:S(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>me({base:e,to:t.includes(`//`)?E(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>Jt({pathname:e,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=e=>{let t=this.getMatch(e);t&&(t.abortController.abort(),clearTimeout(t._nonReactive.pendingTimeout),t._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(e=>{this.cancelMatch(e)}),this.stores.matchesId.get().forEach(e=>{if(this.stores.pendingMatchStores.has(e))return;let t=this.stores.matchStores.get(e)?.get();t&&(t.status===`pending`||t.isFetching===`loader`)&&this.cancelMatch(e)})},this.buildLocation=e=>{let t=(t={})=>{let n=t._fromLocation||this.pendingBuiltLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r.fullPath,a=t.to?`${t.to}`:void 0,o=r.search,s=Object.assign(Object.create(null),r.params),l=a?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(i,`.`),u=a?this.resolvePathWithBase(l,a):l,d=t.params===!1||t.params===null?Object.create(null):(t.params??!0)===!0?s:Object.assign(s,f(t.params,s)),p=this.routesByPath[he(u)],h;if(p)h=this.getRouteBranch(p);else if(u.includes(`$`))h=[];else{let e=this.getMatchedRoutes(u);h=e.matchedRoutes,this.options.notFoundRoute&&(!e.foundRoute||e.foundRoute.path!==`/`&&e.routeParams[`**`])&&(h=[...h,this.options.notFoundRoute])}if(h.length&&_(d))for(let e of h){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(d,t(d))}catch{}}let g=e.leaveParams?u:m(ie({path:u,params:d,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,v=o;if(e._includeValidateSearch&&this.options.search?.strict){let e={};h.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,qt(t.options.validateSearch,{...e,...v}))}catch{}}),v=e}v=Yt({search:v,dest:t,destRoutes:h,_includeValidateSearch:e._includeValidateSearch}),v=b(o,v);let y=this.options.stringifySearch(v),x=t.hash===!0?n.hash:t.hash?f(t.hash,n.hash):void 0,C=x?`#${x}`:``,w=t.state===!0?n.state:t.state?f(t.state,n.state):{};w=S(n.state,w);let ee=`${g}${y}${C}`,te,ne,re=!1;if(this.rewrite){let e=new URL(ee,this.origin),t=ot(this.rewrite,e);te=e.href.replace(e.origin,``),t.origin===this.origin?ne=t.pathname+t.search+t.hash:(ne=t.href,re=!0)}else te=c(ee),ne=te;return{publicHref:ne,href:te,pathname:g,search:v,searchStr:y,state:w,hash:x??``,external:re,unmaskOnReload:t.unmaskOnReload}},n=(n={},r)=>{let i=t(n),o=r?t(r):void 0;if(!o){let n=Object.create(null);if(this.options.routeMasks){let s=a(i.pathname,this.processedTree);if(s){Object.assign(n,s.rawParams);let{from:i,params:a,...c}=s.route,l=a===!1||a===null?Object.create(null):(a??!0)===!0?n:Object.assign(n,f(a,n));r={from:e.from,...c,params:l},o=t(r)}}}return o&&(i.maskedLocation=o),i};return e.mask?n(e,{from:e.from,...e.mask}):n(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=()=>{let e=[`key`,`__TSR_key`,`__TSR_index`,`__hashScrollIntoViewOptions`];e.forEach(e=>{n.state[e]=this.latestLocation.state[e]});let t=g(n.state,this.latestLocation.state);return e.forEach(e=>{delete n.state[e]}),t},a=he(this.latestLocation.href)===he(n.href),o=this.commitLocationPromise;if(this.commitLocationPromise=p(()=>{o?.resolve(),o=void 0}),a&&i())this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t})}return this._scroll.next=n.resetScroll??!0,this.history.subscribers.size||this.load(r?{action:{type:r}}:void 0),this.commitLocationPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,href:a,...o}={})=>{if(a){let t=this.history.location.state.__TSR_index,n=zt(a,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);o.to=at(this.rewrite,r).pathname,o.search=this.options.parseSearch(n.search),o.hash=n.hash.slice(1)}let s=this.buildLocation({...o,_includeValidateSearch:!0});this.pendingBuiltLocation=s;let c=this.commitLocation({...s,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this.pendingBuiltLocation===s&&(this.pendingBuiltLocation=void 0)}),c},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(_e(t,this.protocolAllowlist))return;if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return}i.replace?window.location.replace(t):window.location.href=t;return}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();let e=this.matchRoutes(this.latestLocation),t=this.stores.cachedMatches.get().filter(t=>!e.some(e=>e.id===t.id));this.batch(()=>{this.stores.status.set(`pending`),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(e),this.stores.setCached(t)})},this.load=async e=>{let t=e?.action?.type,n,r,i,a=this.stores.resolvedLocation.get()??this.stores.location.get();for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad(),t&&(this._scroll.hash=t===`PUSH`||t===`REPLACE`);let n=this.latestLocation,r=Ht(n,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:`onBeforeNavigate`,...r}),this.emit({type:`onBeforeLoad`,...r}),await Dt({router:this,sync:e?.sync,forceStaleReload:a.href===n.href,matches:this.stores.pendingMatches.get(),location:n,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let e=null,t=null,n=null,r=null;this.batch(()=>{let i=this.stores.pendingMatches.get(),a=i.length,o=this.stores.matches.get();e=a?o.filter(e=>!this.stores.pendingMatchStores.has(e.id)):null;let s=new Set;for(let e of this.stores.pendingMatchStores.values())e.routeId&&s.add(e.routeId);let c=new Set;for(let e of this.stores.matchStores.values())e.routeId&&c.add(e.routeId);t=a?o.filter(e=>!s.has(e.routeId)):null,n=a?i.filter(e=>!c.has(e.routeId)):null,r=a?i.filter(e=>c.has(e.routeId)):o,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),a&&(this.stores.setMatches(i),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...e.filter(e=>e.status!==`error`&&e.status!==`notFound`&&e.status!==`redirected`)]),this.clearExpiredCache())});for(let[e,i]of[[t,`onLeave`],[n,`onEnter`],[r,`onStay`]])if(e)for(let t of e)this.looseRoutesById[t.routeId].options[i]?.(t)})})}})}catch(e){tt(e)?(n=e,this.navigate({...n.options,replace:!0,ignoreBlocker:!0})):je(e)&&(r=e);let t=n?n.status:r?404:this.stores.matches.get().some(e=>e.status===`error`)?500:200;this.batch(()=>{this.stores.statusCode.set(t),this.stores.redirect.set(n)})}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.stores.matches.get().some(e=>e.status===`error`)&&(o=500),o!==void 0&&this.stores.statusCode.set(o)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document<`u`&&`startViewTransition`in document&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&this.isViewTransitionTypesSupported){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Ht(r,i)):t.types;if(a===!1){e();return}n={update:e,types:a}}else n=e;document.startViewTransition(n)}else e()},this.updateMatch=(e,t)=>{this.startTransition(()=>{let n=this.stores.pendingMatchStores.get(e);if(n){n.set(t);return}let r=this.stores.matchStores.get(e);if(r){r.set(t);return}let i=this.stores.cachedMatchStores.get(e);if(i){let n=t(i.get());n.status===`redirected`?this.stores.cachedMatchStores.delete(e)&&this.stores.cachedIds.set(t=>t.filter(t=>t!==e)):i.set(n)}})},this.getMatch=e=>this.stores.cachedMatchStores.get(e)?.get()??this.stores.pendingMatchStores.get(e)?.get()??this.stores.matchStores.get(e)?.get(),this.invalidate=e=>{let t=t=>e?.filter?.(t)??!0?{...t,invalid:!0,...e?.forcePending||t.status===`error`||t.status===`notFound`?{status:`pending`,error:void 0}:void 0}:t;return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(t)),this.stores.setCached(this.stores.cachedMatches.get().map(t)),this.stores.setPending(this.stores.pendingMatches.get().map(t))}),this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.getParsedLocationHref=e=>e.publicHref||`/`,this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=e.options._builtLocation??this.buildLocation(e.options),n=this.getParsedLocationHref(t);e.options.href=n,e.headers.set(`Location`,n)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&_e(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=e?.filter;t===void 0?this.stores.setCached([]):this.stores.setCached(this.stores.cachedMatches.get().filter(e=>!t(e)))},this.clearExpiredCache=()=>{let e=Date.now();this.clearCache({filter:t=>{let n=this.looseRoutesById[t.routeId];if(!n.options.loader)return!0;let r=(t.preload?n.options.preloadGcTime??this.options.defaultPreloadGcTime:n.options.gcTime??this.options.defaultGcTime)??300*1e3;return t.status===`error`||e-t.updatedAt>=r}})},this.loadRouteChunk=kt,this.preloadRoute=async e=>{let t=e._builtLocation??this.buildLocation(e),n=this.matchRoutes(t,{throwOnError:!0,preload:!0,dest:e}),r=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),i=new Set([...r,...this.stores.cachedIds.get()]),a=n.filter(e=>!i.has(e.id));if(a.length){let e=this.stores.cachedMatches.get();this.stores.setCached([...e,...a])}try{return n=await Dt({router:this,matches:n,location:t,preload:!0,updateMatch:(e,t)=>{r.has(e)?n=n.map(n=>n.id===e?t(n):n):this.updateMatch(e,t)}}),n}catch(e){if(tt(e))return e.options.reloadDocument?void 0:await this.preloadRoute({...e.options,_fromLocation:t});je(e)||console.error(e);return}},this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n);if(t?.pending&&this.stores.status.get()!==`pending`)return!1;let i=(t?.pending===void 0?!this.stores.isLoading.get():t.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),a=y(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,i.pathname,this.processedTree);return!a||e.params&&!g(a.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?g(i.search,r.search,{partial:!0})?a.rawParams:!1:a.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(e=>e.status===`notFound`||e.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Xe,parseSearch:e.parseSearch??Ye,protocolAllowlist:e.protocolAllowlist??r}),typeof document<`u`&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=v(e),this.routeBranchCache.set(e,t)),t}get looseRoutesById(){return this.routesById}getParentContext(e){return e?.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){let n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i}=n,{matchedRoutes:a}=n,o=!1;(r?r.path!==`/`&&i[`**`]:he(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Zt(this.options.notFoundMode,a):void 0,c=Array(a.length),l=new Map;for(let e of this.stores.matchStores.values())e.routeId&&l.set(e.routeId,e.get());for(let n=0;nthis.navigate({...t,_fromLocation:e}),buildLocation:this.buildLocation,cause:n.cause,abortController:n.abortController,preload:!!n.preload,matches:c,routeId:r.id};n.__routeContext=r.options.context(t)??void 0}n.context={...a,...n.__routeContext,...n.__beforeLoadContext}}}return c}matchRoutesLightweight(e){let t=u(this.stores.matchesId.get()),n=this.lightweightCache.get(e);if(n&&n[0]===t)return n[1];let{matchedRoutes:r,routeParams:i}=this.getMatchedRoutes(e.pathname),a=u(r),o={...e.search};for(let e of r)try{Object.assign(o,qt(e.options.validateSearch,o))}catch{}let s=t&&this.stores.matchStores.get(t)?.get(),c=s&&s.routeId===a.id&&s.pathname===e.pathname,l;if(c)l=s.params;else{let e=Object.assign(Object.create(null),i);for(let t of r)try{Qt(t,e)}catch{}l=e}let d={matchedRoutes:r,fullPath:a.fullPath,search:o,params:l};return this.lightweightCache.set(e,[t,d]),d}},Wt=class extends Error{},Gt=class extends Error{};function Kt(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:`idle`,resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function qt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Wt(`Async validation not supported`);if(n.issues)throw new Wt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function Jt({pathname:e,routesById:t,processedTree:n}){let r=Object.create(null),i=he(e),a,o=O(i,n,!0);return o&&(a=o.route,Object.assign(r,o.rawParams)),{matchedRoutes:o?.branch||[t.__root__],routeParams:r,foundRoute:a}}function Yt({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return Xt(n)(e,t,r??!1)}function Xt(e){let t,n,r=[];for(let t of e){let e=t.options;`search`in e?e.search?.middlewares&&r.push(...e.search.middlewares):(e.preSearchFilters||e.postSearchFilters)&&r.push(({search:t,next:n})=>{let r=n(e.preSearchFilters?e.preSearchFilters.reduce((e,t)=>t(e),t):t);return e.postSearchFilters?e.postSearchFilters.reduce((e,t)=>t(e),r):r});let i=e.validateSearch;i&&r.push(({search:e,next:t,meta:r})=>{let a=t(e);if(n)try{let e=qt(i,a);if(r&&e)for(let t in e)t in a||(r.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let i=(e,n,a)=>{if(e>=r.length){if(!t.search)return{};if(t.search===!0)return n;let e=f(t.search,n);return a&&(a.explicit=e),e}return r[e]({search:n,next:(t,n)=>{if(n){let n=a||{};return{search:i(e+1,t,n),meta:n}}return i(e+1,t,a)},meta:a})};return function(e,r,a){return t=r,n=a,i(0,e)}}function Zt(e,t){if(e!==`root`)for(let e=t.length-1;e>=0;e--){let n=t[e];if(n.children)return n.id}return $e}function Qt(e,t){let n=e.options.params?.parse??e.options.parseParams;if(n){let e=n(t);if(e===!1)throw Error(`Route params.parse returned false for a matched route`);Object.assign(t,e)}}var $t=Symbol.for(`TSR_DEFERRED_PROMISE`);function en(e,t){let n=e;return n[$t]?n:(n[$t]={status:`pending`},n.then(e=>{n[$t].status=`success`,n[$t].data=e}).catch(e=>{n[$t].status=`error`,n[$t].error={data:(t?.serializeError??Vt)(e),__isServerError:!0}}),n)}function tn(e,t){if(e)return typeof e==`string`?e:e[t]}function nn(e){return e?.scriptFormat??`module`}function rn(e,t,n){let r=an(t),i=tn(n,`script`)??r.crossOrigin;return{...nn(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function an(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function on(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function sn(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}var cn=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=$e:this.parentRoute||ce();let r=n?$e:t?.path;r&&r!==`/`&&(r=ee(r));let i=t?.id||r,a=n?$e:C([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=C([`/`,a]));let o=a===`__root__`?`/`:C([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=he(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>et({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},ln=class extends cn{constructor(e){super(e)}},un=(e=>(e[e.AggregateError=1]=`AggregateError`,e[e.ArrowFunction=2]=`ArrowFunction`,e[e.ErrorPrototypeStack=4]=`ErrorPrototypeStack`,e[e.ObjectAssign=8]=`ObjectAssign`,e[e.BigIntTypedArray=16]=`BigIntTypedArray`,e[e.RegExp=32]=`RegExp`,e))(un||{}),dn=Symbol.asyncIterator,fn=Symbol.hasInstance,pn=Symbol.isConcatSpreadable,mn=Symbol.iterator,hn=Symbol.match,gn=Symbol.matchAll,_n=Symbol.replace,vn=Symbol.search,yn=Symbol.species,bn=Symbol.split,xn=Symbol.toPrimitive,Sn=Symbol.toStringTag,Cn=Symbol.unscopables,wn={[dn]:0,[fn]:1,[pn]:2,[mn]:3,[hn]:4,[gn]:5,[_n]:6,[vn]:7,[yn]:8,[bn]:9,[xn]:10,[Sn]:11,[Cn]:12},Tn={0:dn,1:fn,2:pn,3:mn,4:hn,5:gn,6:_n,7:vn,8:yn,9:bn,10:xn,11:Sn,12:Cn},k=void 0,En={2:!0,3:!1,1:k,0:null,4:-0,5:1/0,6:-1/0,7:NaN},Dn={0:`Error`,1:`EvalError`,2:`RangeError`,3:`ReferenceError`,4:`SyntaxError`,5:`TypeError`,6:`URIError`},On={0:Error,1:EvalError,2:RangeError,3:ReferenceError,4:SyntaxError,5:TypeError,6:URIError};function A(e,t,n,r,i,a,o,s,c,l,u,d){return{t:e,i:t,s:n,c:r,m:i,p:a,e:o,a:s,f:c,b:l,o:u,l:d}}function kn(e){return A(2,k,e,k,k,k,k,k,k,k,k,k)}var An=kn(2),jn=kn(3),Mn=kn(1),Nn=kn(0),Pn=kn(4),Fn=kn(5),In=kn(6),Ln=kn(7);function Rn(e){switch(e){case`"`:return`\\"`;case`\\`:return`\\\\`;case` -`:return`\\n`;case`\r`:return`\\r`;case`\b`:return`\\b`;case` `:return`\\t`;case`\f`:return`\\f`;case`<`:return`\\x3C`;case`\u2028`:return`\\u2028`;case`\u2029`:return`\\u2029`;default:return k}}function zn(e){let t=``,n=0,r;for(let i=0,a=e.length;iTr(e),Dr=class extends Error{constructor(e,t){super(Er(e,t)),this.cause=t}},Or=class extends Dr{constructor(e){super(`parsing`,e)}},kr=class extends Dr{constructor(e){super(`deserialization`,e)}};function Ar(e){return`Seroval Error (specific: ${e})`}var jr=class extends Error{constructor(e){super(Ar(1)),this.value=e}},Mr=class extends Error{constructor(e){super(Ar(2))}},Nr=class extends Error{constructor(e){super(Ar(3))}},Pr=class extends Error{constructor(e){super(Ar(4))}},Fr=class extends Error{constructor(e){super(Ar(5)),this.value=e}},Ir=class extends Error{constructor(e){super(Ar(6))}},Lr=class extends Error{constructor(e){super(Ar(7))}},Rr=class extends Error{constructor(e){super(Ar(8))}},zr=class extends Error{constructor(e){super(Ar(9))}},Br=class{constructor(e,t){this.value=e,this.replacement=t}},Vr=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e};Vr.toString(),((e,t)=>{e.s(t),e.p.s=1,e.p.v=t}).toString(),((e,t)=>{e.f(t),e.p.s=2,e.p.v=t}).toString();var Hr=()=>{let e=[],t=[],n=!0,r=!1,i=0,a=(e,n,r)=>{for(r=0;r{for(i=0,a=e.length;i(n&&(r=i++,t[r]=e),o(e),()=>{n&&(t[r]=t[i],t[i--]=void 0)});return{__SEROVAL_STREAM__:!0,on:e=>s(e),next:t=>{n&&(e.push(t),a(t,`next`))},throw:i=>{n&&(e.push(i),a(i,`throw`),n=!1,r=!1,t.length=0)},return:i=>{n&&(e.push(i),a(i,`return`),n=!1,r=!0,t.length=0)}}};Hr.toString();var Ur=e=>t=>()=>{let n=0,r={[e]:()=>r,next:()=>{if(n>t.d)return{done:!0,value:void 0};let e=n++,r=t.v[e];if(e===t.t)throw r;return{done:e===t.d,value:r}}};return r};Ur.toString();var Wr=(e,t)=>n=>()=>{let r=0,i=-1,a=!1,o=[],s=[],c=(e=0,t=s.length)=>{for(;e{let t=s.shift();t&&t.s({done:!1,value:e}),o.push(e)},throw:e=>{let t=s.shift();t&&t.f(e),c(),i=o.length,a=!0,o.push(e)},return:e=>{let t=s.shift();t&&t.s({done:!0,value:e}),c(),i=o.length,o.push(e)}});let l={[e]:()=>l,next:()=>{if(i===-1){let e=r++;if(e>=o.length){let e=t();return s.push(e),e.p}return{done:!1,value:o[e]}}if(r>i)return{done:!0,value:void 0};let e=r++,n=o[e];if(e!==i)return{done:!1,value:n};if(a)throw n;return{done:!0,value:n}}};return l};Wr.toString();var Gr=e=>{let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e{}),t}var ri=Wr(dn,Vr);function ii(e){return ri(e)}async function ai(e){try{return[1,await e]}catch(e){return[0,e]}}function oi(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function si(e,t){e.marked.add(t)}function ci(e,t){let n=e.refs.size;return e.refs.set(t,n),n}function li(e,t){let n=e.refs.get(t);return n==null?{type:0,value:ci(e,t)}:(si(e,n),{type:1,value:nr(n)})}function ui(e,t){let n=li(e,t);return n.type===1?n:Gn(t)?{type:2,value:or(n.value,t)}:n}function di(e,t){let n=ui(e,t);if(n.type!==0)return n.value;if(t in wn)return ar(n.value,t);throw new jr(t)}function fi(e,t){let n=li(e,$r[t]);return n.type===1?n.value:A(26,n.value,t,k,k,k,k,k,k,k,k,k)}function pi(e){let t=li(e,Zr);return t.type===1?t.value:A(27,t.value,k,k,k,k,k,k,di(e,mn),k,k,k)}function mi(e){let t=li(e,Qr);return t.type===1?t.value:A(29,t.value,k,k,k,k,k,[fi(e,1),di(e,dn)],k,k,k,k)}function hi(e,t,n,r){return A(n?11:10,e,k,k,k,r,k,k,k,k,Qn(t),k)}function gi(e,t,n,r){return A(8,t,k,k,k,k,{k:n,v:r},k,fi(e,0),k,k,k)}function _i(e,t,n){let r=new Uint8Array(n),i=``;for(let e=0,t=r.length;e{si(this.base,t),zi(this,e,n).then(e=>{a.push(yr(t,e))},e=>{i(e),o()})},throw:n=>{si(this.base,t),zi(this,e,n).then(e=>{a.push(br(t,e)),r(a),o()},e=>{i(e),o()})},return:n=>{si(this.base,t),zi(this,e,n).then(e=>{a.push(xr(t,e)),r(a),o()},e=>{i(e),o()})}})}async function Fi(e,t,n,r){return vr(n,fi(e.base,4),await new Promise(Pi.bind(e,t,n,r)))}async function Ii(e,t,n,r){let i=[];for(let n=0,a=r.v.length;n=e.base.depthLimit)throw new zr(e.base.depthLimit);switch(typeof n){case`boolean`:return n?An:jn;case`undefined`:return Mn;case`string`:return er(n);case`number`:return $n(n);case`bigint`:return tr(n);case`object`:if(n){let r=ui(e.base,n);return r.type===0?await Li(e,t+1,r.value,n):r.value}return Nn;case`symbol`:return di(e.base,n);case`function`:return Ri(e,t,n);default:throw new jr(n)}}async function Bi(e,t){try{return await zi(e,0,t)}catch(e){throw e instanceof Or?e:new Or(e)}}var Vi=(e=>(e[e.Vanilla=1]=`Vanilla`,e[e.Cross=2]=`Cross`,e))(Vi||{});function j(e){return e}function M(e,t){for(let n=0,r=t.length;n0)for(let a=0,o=n.v,s=i.length;aqi)throw new Rr(t);return P(e,t.i,new RegExp(n,t.m))}throw new Mr(t)}function pa(e,t,n){let r=P(e,n.i,new Set);for(let i=0,a=n.a,o=a.length;iGi)throw new Rr(t);return P(e,t.i,Gr(Vn(t.s)))}function ga(e,t,n){let r=Hi(n.c),i=F(e,t,n.f),a=n.b??0;if(a<0||a>i.byteLength)throw new Rr(n);return P(e,n.i,new r(i,a,n.l))}function _a(e,t,n){let r=F(e,t,n.f),i=n.b??0;if(i<0||i>r.byteLength)throw new Rr(n);return P(e,n.i,new DataView(r,i,n.l))}function va(e,t,n,r){if(n.p){let i=la(e,t,n.p,{});Object.defineProperties(r,Object.getOwnPropertyDescriptors(i))}return r}function ya(e,t,n){return va(e,t,n,P(e,n.i,AggregateError([],Vn(n.m))))}function ba(e,t,n){let r=na(n,On,n.s);return va(e,t,n,P(e,n.i,new r(Vn(n.m))))}function xa(e,t,n){let r=Vr(),i=P(e,n.i,r.p),a=F(e,t,n.f);return n.s?r.s(a):r.f(a),i}function Sa(e,t,n){return P(e,n.i,Object(F(e,t,n.f)))}function Ca(e,t,n){let r=e.base.plugins;if(r){let i=Vn(n.c);for(let a=0,o=r.length;ae.base.depthLimit)throw new zr(e.base.depthLimit);switch(t+=1,n.t){case 2:return na(n,En,n.s);case 0:return Number(n.s);case 1:return Vn(String(n.s));case 3:if(String(n.s).length>Ki)throw new Rr(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return ra(e,n);case 9:return ia(e,t,n);case 10:case 11:return ua(e,t,n);case 5:return da(e,n);case 6:return fa(e,n);case 7:return pa(e,t,n);case 8:return ma(e,t,n);case 19:return ha(e,n);case 16:case 15:return ga(e,t,n);case 20:return _a(e,t,n);case 14:return ya(e,t,n);case 13:return ba(e,t,n);case 12:return xa(e,t,n);case 17:return na(n,Tn,n.s);case 21:return Sa(e,t,n);case 25:return Ca(e,t,n);case 22:return wa(e,n);case 23:return Ta(e,t,n);case 24:return Ea(e,t,n);case 28:return Da(e,t,n);case 30:return Oa(e,t,n);case 31:return ka(e,t,n);case 32:return Aa(e,t,n);case 33:return ja(e,t,n);case 34:return Ma(e,t,n);case 27:return Na(e,t,n);case 29:return Pa(e,t,n);case 35:return Fa(e,t,n);default:throw new Mr(n)}}function Ia(e,t){try{return F(e,0,t)}catch(e){throw new kr(e)}}var La=(()=>T).toString();/=>/.test(La);function Ra(e,t){return Ia(Zi({plugins:N(t.plugins),refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit}),e)}async function za(e,t={}){let n=vi(1,{plugins:N(t.plugins),disabledFeatures:t.disabledFeatures});return{t:await Bi(n,e),f:n.base.features,m:Array.from(n.base.marked)}}function Ba(e){return e}function Va(e){return j({tag:`$TSR/t/`+e.key,test:e.test,parse:{sync(t,n,r){return{v:n.parse(e.toSerializable(t))}},async async(t,n,r){return{v:await n.parse(e.toSerializable(t))}},stream(t,n,r){return{v:n.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,n,r){return e.fromSerializable(n.deserialize(t.v))}})}var Ha=class{constructor(e,t){this.stream=e,this.hint=t?.hint??`binary`}},Ua=globalThis.Buffer,Wa=!!Ua&&typeof Ua.from==`function`;function Ga(e){if(e.length===0)return``;if(Wa)return Ua.from(e).toString(`base64`);let t=32768,n=[];for(let r=0;rnew ReadableStream({start(t){e.on({next(e){try{t.enqueue(Ka(e))}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),Xa=new TextEncoder,Za=e=>new ReadableStream({start(t){e.on({next(e){try{typeof e==`string`?t.enqueue(Xa.encode(e)):t.enqueue(Ka(e.$b64))}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),Qa=`(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i{try{for(;;){let{done:e,value:r}=await n.read();if(e){t.return(void 0);break}t.next(Ga(r))}}catch(e){t.throw(e)}finally{n.releaseLock()}})(),t}function to(e){let t=ti(),n=e.getReader(),r=new TextDecoder(`utf-8`,{fatal:!0});return(async()=>{try{for(;;){let{done:e,value:i}=await n.read();if(e){try{let e=r.decode();e.length>0&&t.next(e)}catch{}t.return(void 0);break}try{let e=r.decode(i,{stream:!0});e.length>0&&t.next(e)}catch{t.next({$b64:Ga(i)})}}}catch(e){t.throw(e)}finally{n.releaseLock()}})(),t}var no=j({tag:`tss/RawStream`,extends:[j({tag:`tss/RawStreamFactory`,test(e){return e===qa},parse:{sync(e,t,n){return{}},async async(e,t,n){return{}},stream(e,t,n){return{}}},serialize(e,t,n){return Qa},deserialize(e,t,n){return qa}}),j({tag:`tss/RawStreamFactoryText`,test(e){return e===Ja},parse:{sync(e,t,n){return{}},async async(e,t,n){return{}},stream(e,t,n){return{}}},serialize(e,t,n){return $a},deserialize(e,t,n){return Ja}})],test(e){return e instanceof Ha},parse:{sync(e,t,n){let r=e.hint===`text`?Ja:qa;return{hint:t.parse(e.hint),factory:t.parse(r),stream:t.parse(ti())}},async async(e,t,n){let r=e.hint===`text`?Ja:qa,i=e.hint===`text`?to(e.stream):eo(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(r),stream:await t.parse(i)}},stream(e,t,n){let r=e.hint===`text`?Ja:qa,i=e.hint===`text`?to(e.stream):eo(e.stream);return{hint:t.parse(e.hint),factory:t.parse(r),stream:t.parse(i)}}},serialize(e,t,n){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t,n){let r=t.deserialize(e.stream);return t.deserialize(e.hint)===`text`?Za(r):Ya(r)}});function ro(e){return j({tag:`tss/RawStream`,test:()=>!1,parse:{},serialize(){throw Error(`RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.`)},deserialize(t,n,r){return e(typeof n?.deserialize==`function`?n.deserialize(t.streamId):t.streamId)}})}var io=j({tag:`$TSR/Error`,test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return`new Error(`+t.serialize(e.message)+`)`},deserialize(e,t){return Error(t.deserialize(e.message))}}),ao={},oo=e=>new ReadableStream({start:t=>{e.on({next:e=>{try{t.enqueue(e)}catch{}},throw:e=>{t.error(e)},return:()=>{try{t.close()}catch{}}})}}),so=j({tag:`seroval-plugins/web/ReadableStreamFactory`,test(e){return e===ao},parse:{sync(){return ao},async async(){return await Promise.resolve(ao)},stream(){return ao}},serialize(){return oo.toString()},deserialize(){return ao}});async function co(e,t){try{let n=await t.read();n.done?(e.return(n.value),t.releaseLock()):(e.next(n.value),await co(e,t))}catch(t){e.throw(t)}}function lo(e){e.cancel().catch(()=>{}),e.releaseLock()}function uo(e){let t=ti(),n=e.getReader(),r=lo.bind(null,n);return co(t,n).catch(r),[t,r]}var fo=[io,no,j({tag:`seroval/plugins/web/ReadableStream`,extends:[so],test(e){return typeof ReadableStream>`u`?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(ao),stream:t.parse(ti())}},async async(e,t){return{factory:await t.parse(ao),stream:await t.parse(uo(e)[0])}},stream(e,t){let[n,r]=uo(e);return t.addCleanup(r),{factory:t.parse(ao),stream:t.parse(n)}}},serialize(e,t){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t){return oo(t.deserialize(e.stream))}})];function po(){return[...(Ae()?.serializationAdapters)?.map(Va)??[],...fo]}var mo=new TextDecoder,ho=new Uint8Array,I=16*1024*1024,go=32*1024*1024,_o=1024,L=1e5;function R(e){let t=new Map,n=new Map,r=new Set,i=!1,a=null,o=0,s,c=new ReadableStream({start(e){s=e},cancel(){i=!0;try{a?.cancel()}catch{}t.forEach(e=>{try{e.error(Error(`Framed response cancelled`))}catch{}}),t.clear(),n.clear(),r.clear()}});function l(e){let i=n.get(e);if(i)return i;if(r.has(e))return new ReadableStream({start(e){e.close()}});if(n.size>=_o)throw Error(`Too many raw streams in framed response (max ${_o})`);let a=new ReadableStream({start(n){t.set(e,n)},cancel(){r.add(e),t.delete(e),n.delete(e)}});return n.set(e,a),a}function u(e){return l(e),t.get(e)}return(async()=>{let n=e.getReader();a=n;let c=[],l=0;function d(){if(l<9)return null;let e=c[0];if(e.length>=9)return{type:e[0],streamId:(e[1]<<24|e[2]<<16|e[3]<<8|e[4])>>>0,length:(e[5]<<24|e[6]<<16|e[7]<<8|e[8])>>>0};let t=new Uint8Array(9),n=0,r=9;for(let e=0;e0;e++){let i=c[e],a=Math.min(i.length,r);t.set(i.subarray(0,a),n),n+=a,r-=a}return{type:t[0],streamId:(t[1]<<24|t[2]<<16|t[3]<<8|t[4])>>>0,length:(t[5]<<24|t[6]<<16|t[7]<<8|t[8])>>>0}}function f(e){if(e===0)return ho;let t=c[0];if(t&&t.length>=e){let n=t.subarray(0,e);return t.length===e?c.shift():c[0]=t.subarray(e),l-=e,n}let n=new Uint8Array(e),r=0,i=e;for(;i>0&&c.length>0;){let e=c[0];if(!e)break;let t=Math.min(e.length,i);n.set(e.subarray(0,t),r),r+=t,i-=t,t===e.length?c.shift():c[0]=e.subarray(t)}return l-=e,n}try{for(;;){let{done:e,value:a}=await n.read();if(i||e)break;if(a){if(l+a.length>go)throw Error(`Framed response buffer exceeded ${go} bytes`);for(c.push(a),l+=a.length;;){let e=d();if(!e)break;let{type:n,streamId:i,length:a}=e;if(n!==Ee.JSON&&n!==Ee.CHUNK&&n!==Ee.END&&n!==Ee.ERROR)throw Error(`Unknown frame type: ${n}`);if(n===Ee.JSON){if(i!==0)throw Error(`Invalid JSON frame streamId (expected 0)`)}else if(i===0)throw Error(`Invalid raw frame streamId (expected non-zero)`);if(a>I)throw Error(`Frame payload too large: ${a} bytes (max ${I})`);let c=9+a;if(lL)throw Error(`Too many frames in framed response (max ${L})`);f(9);let p=f(a);switch(n){case Ee.JSON:try{s.enqueue(mo.decode(p))}catch{}break;case Ee.CHUNK:{let e=u(i);e&&e.enqueue(p);break}case Ee.END:{let e=u(i);if(r.add(i),e){try{e.close()}catch{}t.delete(i)}break}case Ee.ERROR:{let e=u(i);if(r.add(i),e){let n=mo.decode(p);e.error(Error(n)),t.delete(i)}break}}}}}if(l!==0)throw Error(`Incomplete frame at end of framed response`);try{s.close()}catch{}t.forEach(e=>{try{e.close()}catch{}}),t.clear()}catch(e){try{s.error(e)}catch{}t.forEach(t=>{try{t.error(e)}catch{}}),t.clear()}finally{try{n.releaseLock()}catch{}a=null}})(),{getOrCreateStream:l,jsonChunks:c}}var z=null;async function vo(e){e.length>0&&await Promise.allSettled(e)}var yo=Object.prototype.hasOwnProperty;function bo(e){for(let t in e)if(yo.call(e,t))return!0;return!1}async function xo(e,t,n){z||=po();let r=t[0],i=r.fetch??n,a=r.data instanceof FormData?`formData`:`payload`,o=r.headers?new Headers(r.headers):new Headers;if(o.set(`x-tsr-serverFn`,`true`),a===`payload`&&o.set(`accept`,`${Te}, application/x-ndjson, application/json`),r.method===`GET`){if(a===`formData`)throw Error(`FormData is not supported with GET requests`);let t=await So(r);if(t!==void 0){let n=Ke({payload:t});e.includes(`?`)?e+=`&${n}`:e+=`?${n}`}}let s;if(r.method===`POST`){let e=await wo(r);e?.contentType&&o.set(`content-type`,e.contentType),s=e?.body}return await B(async()=>i(e,{method:r.method,headers:o,signal:r.signal,body:s}))}async function So(e){let t=!1,n={};if(e.data!==void 0&&(t=!0,n.data=e.data),e.context&&bo(e.context)&&(t=!0,n.context=e.context),t)return Co(n)}async function Co(e){return JSON.stringify(await Promise.resolve(za(e,{plugins:z})))}async function wo(e){if(e.data instanceof FormData){let t;return e.context&&bo(e.context)&&(t=await Co(e.context)),t!==void 0&&e.data.set(Se,t),{body:e.data}}let t=await So(e);if(t)return{body:t,contentType:`application/json`}}async function B(e){let t;try{t=await e()}catch(e){if(e instanceof Response)t=e;else throw console.log(e),e}if(t.headers.get(`x-tss-raw`)===`true`)return t;let n=t.headers.get(`content-type`);if(n||ce(),t.headers.get(`x-tss-serialized`)){let e;if(n.includes(`application/x-tss-framed`)){if(ke(n),!t.body)throw Error(`No response body for framed response`);let{getOrCreateStream:r,jsonChunks:i}=R(t.body),a=[ro(r),...z||[]],o=new Map;e=await To({jsonStream:i,onMessage:e=>Ra(e,{refs:o,plugins:a}),onError(e,t){console.error(e,t)}})}else if(n.includes(`application/json`)){let n=await t.json(),r=[];try{e=Ra(n,{plugins:z})}finally{}await vo(r)}if(e||ce(),e instanceof Error)throw e;return e}if(n.includes(`application/json`)){let e=await t.json(),n=nt(e);if(n)throw n;if(je(e))throw e;return e}if(!t.ok)throw Error(await t.text());return t}async function To({jsonStream:e,onMessage:t,onError:n}){let r=e.getReader(),{value:i,done:a}=await r.read();if(a||!i)throw Error(`Stream ended before first object`);let o=JSON.parse(i),s=!1,c=(async()=>{try{for(;;){let{value:e,done:i}=await r.read();if(i)break;if(e)try{let n=[];try{t(JSON.parse(e))}finally{}await vo(n)}catch(t){n?.(`Invalid JSON: ${e}`,t)}}}catch(e){s||n?.(`Stream processing error:`,e)}})(),l,u=[];try{l=t(o)}catch(e){throw s=!0,r.cancel().catch(()=>{}),e}return await vo(u),Promise.resolve(l).catch(()=>{s=!0,r.cancel().catch(()=>{})}),c.finally(()=>{try{r.releaseLock()}catch{}}),l}function Eo(e){let t=`/_serverFn/`+e;return Object.assign((...e)=>{let n=Ae()?.serverFns?.fetch;return xo(t,e,n??fetch)},{url:t,serverFnMeta:{id:e},[Ce]:!0})}var Do=Ba({key:`$TSS/serverfn`,test:e=>typeof e!=`function`||!(Ce in e)?!1:!!e[Ce],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>Eo(e)});function Oo(e){return e.replaceAll(`\0`,`/`).replaceAll(`�`,`/`)}function ko(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function Ao(e){window.$_TSR||ce();let t=e.options.serializationAdapters;if(t?.length){let e=new Map;t.forEach(t=>{e.set(t.key,t.fromSerializable)}),window.$_TSR.t=e,window.$_TSR.buffer.forEach(e=>e())}window.$_TSR.initialized=!0,window.$_TSR.router||ce();let n=window.$_TSR.router;n.matches.forEach(e=>{e.i=Oo(e.i)}),n.lastMatchId&&=Oo(n.lastMatchId);let{manifest:r,dehydratedData:i,lastMatchId:a}=n;e.ssr={manifest:r};let o=document.querySelector(`meta[property="csp-nonce"]`)?.content;e.options.ssr={nonce:o},await e.options.hydrate?.(i);let s=e.matchRoutes(e.stores.location.get()),c=Promise.all(s.map(t=>e.loadRouteChunk(e.looseRoutesById[t.routeId])));function l(t){let n=e.looseRoutesById[t.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(n){let r=p();t._nonReactive.minPendingPromise=r,t._forcePending=!0,setTimeout(()=>{r.resolve(),e.updateMatch(t.id,e=>(e._nonReactive.minPendingPromise=void 0,{...e,_forcePending:void 0}))},n)}}function u(t){let n=e.looseRoutesById[t.routeId];n&&(n.options.ssr=t.ssr)}let d;s.forEach(e=>{let t=n.matches.find(t=>t.i===e.id);if(!t){e._nonReactive.dehydrated=!1,e.ssr=!1,u(e);return}ko(e,t),u(e),e._nonReactive.dehydrated=e.ssr!==!1,(e.ssr===`data-only`||e.ssr===!1)&&d===void 0&&(d=e.index,l(e))}),e.stores.setMatches(s);let f=e.stores.matches.get(),m=e.stores.location.get();await Promise.all(f.map(async t=>{try{let n=e.looseRoutesById[t.routeId],r=f[t.index-1]?.context??e.options.context;if(n.options.context){let i={deps:t.loaderDeps,params:t.params,context:r??{},location:m,navigate:t=>e.navigate({...t,_fromLocation:m}),buildLocation:e.buildLocation,cause:t.cause,abortController:t.abortController,preload:!1,matches:s,routeId:n.id};t.__routeContext=n.options.context(i)??void 0}t.context={...r,...t.__routeContext,...t.__beforeLoadContext};let i={ssr:e.options.ssr,matches:f,match:t,params:t.params,loaderData:t.loaderData},a=await n.options.head?.(i),o=await n.options.scripts?.(i);t.meta=a?.meta,t.links=a?.links,t.headScripts=a?.scripts,t.styles=a?.styles,t.scripts=o}catch(e){if(je(e))t.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${t.routeId}`,e);else throw t.error=e,console.error(`Error during hydration for route ${t.routeId}:`,e),e}}));let h=s[s.length-1].id!==a;if(!s.some(e=>e.ssr===!1)&&!h)return s.forEach(e=>{e._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),c;let g=Promise.resolve().then(()=>e.load()).catch(e=>{console.error(`Error during router hydration:`,e)});if(h){let t=s[1];t||ce(),l(t),t._displayPending=!0,t._nonReactive.displayPendingPromise=g,g.then(()=>{e.batch(()=>{e.stores.status.get()===`pending`&&(e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(t.id,e=>({...e,_displayPending:void 0,displayPendingPromise:void 0}))})})}return c}var V=e(n(),1),H=pe();function jo({promise:e}){if(ne)return ne(e);let t=en(e);if(t[$t].status===`pending`)throw t;if(t[$t].status===`error`)throw t[$t].error;return t[$t].data}function Mo(e){let t=(0,H.jsx)(No,{...e});return e.fallback?(0,H.jsx)(V.Suspense,{fallback:e.fallback,children:t}):t}function No(e){let t=jo(e);return e.children(t)}function Po(e){let t=e.errorComponent??Io;return(0,H.jsx)(Fo,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?V.createElement(t,{error:n,reset:r}):e.children})}var Fo=class extends V.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function Io({error:e}){let[t,n]=V.useState(!1);return(0,H.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,H.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,H.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,H.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,H.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,H.jsx)(`div`,{children:(0,H.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,H.jsx)(`code`,{children:e.message}):null})}):null]})}var Lo=V.createContext(void 0),Ro=V.createContext(void 0),U=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(U||{});function zo({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Bo(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Vo=[],Ho=0,{link:Uo,unlink:Wo,propagate:Go,checkDirty:Ko,shallowPropagate:qo}=zo({update(e){return e._update()},notify(e){Vo[Yo++]=e,e.flags&=~U.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=U.Mutable|U.Dirty,$o(e))}}),Jo=0,Yo=0,Xo,Zo=0;function Qo(e){try{++Zo,e()}finally{--Zo||es()}}function $o(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Wo(n,e)}function es(){if(!(Zo>0)){for(;Jo{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Xo,o=t?.compare??Object.is;if(n)Xo=i,++Ho,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=U.Mutable|U.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Xo=a,n&&(i.flags&=~U.RecursedCheck),$o(i)}}};return n?(i.flags=U.Mutable|U.Dirty,i.get=function(){let e=i.flags;if(e&U.Dirty||e&U.Pending&&Ko(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&qo(e)}}else e&U.Pending&&(i.flags=e&~U.Pending);return Xo!==void 0&&Uo(i,Xo,Ho),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Go(e),qo(e),es())}},i}function ns(e){let t=()=>{let t=Xo;Xo=n,++Ho,n.depsTail=void 0,n.flags=U.Watching|U.RecursedCheck;try{return e()}finally{Xo=t,n.flags&=~U.RecursedCheck,$o(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:U.Watching|U.RecursedCheck,notify(){let e=this.flags;e&U.Dirty||e&U.Pending&&Ko(this.deps,this)?t():this.flags=U.Watching},stop(){this.flags=U.None,this.depsTail=void 0,$o(this)}};return t(),n}var rs={get(){},subscribe(){return{unsubscribe(){}}}};function is(e,t){let n=V.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=S(n.current,i):i}}function as(e){let t=ue(),n=V.useContext(e.from?Ro:Lo),r=e.from?t.stores.getRouteMatchStore(e.from):t.stores.matchStores.get(n),i=is(e,t),a=w(r??rs,e=>e?i(e):rs);if(a!==rs)return a;(e.shouldThrow??!0)&&ce()}function os(e){return as({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function ss(e){let{select:t,...n}=e;return as({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function cs(e){return as({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function ls(e){return as({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function us(e){let t=ue();return V.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function ds(e){let t=ue(),n=us(),r=V.useRef(null);return re(()=>{r.current!==e&&(n(e),r.current=e)},[t,e,n]),null}function fs(e){return as({...e,select:t=>e.select?e.select(t.context):t.context})}var ps=class extends cn{constructor(e){super(e),this.useMatch=e=>as({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>fs({...e,from:this.id}),this.useSearch=e=>ls({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>cs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ss({...e,from:this.id}),this.useLoaderData=e=>os({...e,from:this.id}),this.useNavigate=()=>us({from:this.fullPath}),this.Link=V.forwardRef((e,t)=>(0,H.jsx)(oe,{ref:t,from:this.fullPath,...e}))}};function ms(e){return new ps(e)}var hs=class extends ln{constructor(e){super(e),this.useMatch=e=>as({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>fs({...e,from:this.id}),this.useSearch=e=>ls({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>cs({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>ss({...e,from:this.id}),this.useLoaderData=e=>os({...e,from:this.id}),this.useNavigate=()=>us({from:this.fullPath}),this.Link=V.forwardRef((e,t)=>(0,H.jsx)(oe,{ref:t,from:this.fullPath,...e}))}};function gs(e){return new hs(e)}function _s(e){return new vs(e,{silent:!0}).createRoute}var vs=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=ms(e);return t.isRoot=!1,t},this.silent=t?.silent}};function ys(e,t){let n,r,a,o,s=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(a=e,i(a)&&a instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${a.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),o=!0)}}),n),c=function(e){if(o)throw window.location.reload(),new Promise(()=>{});if(a)throw a;if(!r)if(ne)ne(s());else throw s();return V.createElement(r,e)};return c.preload=s,c}function bs(e){let t=ue(),n=`not-found-${w(t.stores.location,e=>e.pathname)}-${w(t.stores.status,e=>e)}`;return(0,H.jsx)(Po,{getResetKey:()=>n,onCatch:(t,n)=>{if(je(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(je(t))return e.fallback?.(t);throw t},children:e.children})}function xs(){return(0,H.jsx)(`p`,{children:`Not Found`})}function Ss(e){return(0,H.jsx)(H.Fragment,{children:e.children})}function Cs(e,t,n){return t.options.notFoundComponent?(0,H.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,H.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,H.jsx)(xs,{})}var ws=(e,t)=>e.routeId===t.routeId&&e._displayPending===t._displayPending,Ts=(e,t)=>e[0]===t[0]&&e[1]===t[1],Es=V.memo(function({matchId:e}){let t=ue(),n=t.stores.matchStores.get(e);n||ce();let r=w(t.stores.loadedAt,e=>e),i=w(n,e=>e,ws);return(0,H.jsx)(Ds,{router:t,matchId:e,resetKey:r,matchState:V.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function Ds({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,H.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?V.Suspense:Ss,f=s?Po:Ss,p=l?bs:Ss;return(0,H.jsxs)(i.isRoot?i.options.shellComponent??Ss:Ss,{children:[(0,H.jsx)(Lo.Provider,{value:t,children:(0,H.jsx)(d,{fallback:o,children:(0,H.jsx)(f,{getResetKey:()=>n,errorComponent:s||Io,onCatch:(e,t)=>{if(je(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,H.jsx)(p,{fallback:e=>{if(e.routeId??=r.routeId,!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return V.createElement(l,e)},children:u||r._displayPending?(0,H.jsx)(te,{fallback:o,children:(0,H.jsx)(ks,{matchId:t})}):(0,H.jsx)(ks,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(Os,{}),(e.options.scrollRestoration,null)]}):null]})}function Os(){let e=ue(),t=V.useRef();return re(()=>{let n=e.stores.resolvedLocation.get(),r=t.current;n&&(!r||r.href!==n.href)&&e.emit({type:`onRendered`,...Ht(e.stores.location.get(),r??n)}),t.current=n},[w(e.stores.resolvedLocation,e=>e?.state.__TSR_key),e]),null}var ks=V.memo(function({matchId:e}){let t=ue(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||ce();let i=w(r,e=>e),a=i.routeId,o=t.routesById[a],s=V.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=V.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,H.jsx)(e,{},s):(0,H.jsx)(As,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=p();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return je(i.error)||ce(),Cs(t,o,i.error);if(i.status===`redirected`)throw tt(i.error)||ce(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),As=V.memo(function(){let e=ue(),t=V.useContext(Lo),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=w(a,e=>[e?.routeId,e?.globalNotFound??!1],Ts),i=w(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,H.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||ce(),Cs(e,a,void 0);if(!i)return null;let s=(0,H.jsx)(Es,{matchId:i});return n===`__root__`?(0,H.jsx)(V.Suspense,{fallback:o,children:s}):s});function js(){let e=ue(),t=V.useRef({router:e,mounted:!1}),[n,r]=V.useState(!1),i=w(e.stores.isLoading,e=>e),a=w(e.stores.hasPending,e=>e),o=de(i),s=i||n||a,c=de(s),l=i||a,u=de(l);return e.startTransition=e=>{r(!0),V.startTransition(()=>{e(),r(!1)})},V.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return he(e.latestLocation.publicHref)!==he(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),re(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),re(()=>{o&&!i&&e.emit({type:`onLoad`,...Ht(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),re(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...Ht(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,u,e]),re(()=>{if(c&&!s){let t=Ht(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),Qo(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())})}},[s,c,e]),null}function Ms(){let e=ue(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,H.jsx)(t,{}):null,r=(0,H.jsxs)(typeof document<`u`&&e.ssr?Ss:V.Suspense,{fallback:n,children:[(0,H.jsx)(js,{}),(0,H.jsx)(Ns,{})]});return e.options.InnerWrap?(0,H.jsx)(e.options.InnerWrap,{children:r}):r}function Ns(){let e=ue(),t=w(e.stores.firstId,e=>e),n=w(e.stores.loadedAt,e=>e),r=t?(0,H.jsx)(Es,{matchId:t}):null;return(0,H.jsx)(Lo.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,H.jsx)(Po,{getResetKey:()=>n,errorComponent:Io,onCatch:void 0,children:r})})}var Ps=e=>({createMutableStore:ts,createReadonlyStore:ts,batch:Qo}),Fs=e=>new Is(e),Is=class extends Ut{constructor(e){super(e,Ps)}};function Ls({router:e,children:t,...n}){_(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,H.jsx)(fe.Provider,{value:e,children:t});return e.options.Wrap?(0,H.jsx)(e.options.Wrap,{children:r}):r}function Rs({router:e,...t}){return(0,H.jsx)(Ls,{router:e,...t,children:(0,H.jsx)(Ms,{})})}function zs(e,t){if(t)for(let[n,r]of Object.entries(t))n!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&e.setAttribute(n,typeof r==`boolean`?``:String(r))}function Bs(e){let{attrs:t,children:n,nonce:r,preventScriptHoist:i}=e;switch(e.tag){case`title`:return(0,H.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,H.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,H.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return e.inlineCss,(0,H.jsx)(`style`,{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case`script`:return(0,H.jsx)(Vs,{attrs:t,preventScriptHoist:i,children:n});default:return null}}function Vs({attrs:e,children:t,preventScriptHoist:n}){ue();let r=le(),i=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(V.useEffect(()=>{if(!i){if(e?.src){let t=(()=>{try{let t=document.baseURI||window.location.href;return new URL(e.src,t).href}catch{return e.src}})();for(let e of document.querySelectorAll(`script[src]`))if(e.src===t)return;let n=document.createElement(`script`);return zs(n,e),document.head.appendChild(n),()=>n.remove()}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;for(let e of document.querySelectorAll(`script:not([src])`)){if(!(e instanceof HTMLScriptElement))continue;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;if(e.textContent===t&&i===n&&a===r)return}let i=document.createElement(`script`);return i.textContent=t,zs(i,e),document.head.appendChild(i),()=>i.remove()}}},[e,t,i]),i&&typeof t==`string`)return(0,H.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!r){if(e?.src)return(0,H.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,H.jsx)(`script`,{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var Hs=e=>{let t=ue(),n=t.options.ssr?.nonce,r=w(t.stores.matches,e=>e.map(e=>e.meta).filter(e=>e!==void 0),g),i=V.useMemo(()=>{let e=[],t={},i;for(let a=r.length-1;a>=0;a--){let o=r[a];for(let r=o.length-1;r>=0;r--){let a=o[r];if(a)if(a.title)i||={tag:`title`,children:a.title};else if(`script:ld+json`in a)try{let t=JSON.stringify(a[`script:ld+json`]);e.push({tag:`script`,attrs:{type:`application/ld+json`},children:d(t)})}catch{}else{let r=a.name??a.property;if(r){if(t[r])continue;t[r]=!0}e.push({tag:`meta`,attrs:{...a,nonce:n}})}}}return i&&e.push(i),n&&e.push({tag:`meta`,attrs:{property:`csp-nonce`,content:n}}),e.reverse(),e},[r,n]),a=w(t.stores.matches,e=>e.flatMap(e=>e.links??[]).filter(e=>e!==void 0).map(e=>({tag:`link`,attrs:{...e,nonce:n}})),g),o=w(t.stores.matches,r=>{let i=t.ssr?.manifest,a=[];return i?(r.forEach(t=>{i.routes[t.routeId]?.css?.forEach(t=>{let r=sn(t);a.push({tag:`link`,attrs:{rel:`stylesheet`,...r,crossOrigin:tn(e,`stylesheet`)??r.crossOrigin,suppressHydrationWarning:!0,nonce:n}})})}),i.inlineStyle&&a.push({tag:`style`,attrs:{...i.inlineStyle.attrs,nonce:n},children:i.inlineStyle.children,inlineCss:!0}),a):a},g),s=w(t.stores.matches,r=>{let i=[],a=t.ssr?.manifest;return a&&r.forEach(t=>{a.routes[t.routeId]?.preloads?.forEach(t=>{i.push({tag:`link`,attrs:{...rn(a,t,e),nonce:n}})})}),i},g),c=w(t.stores.matches,e=>e.flatMap(e=>e.styles??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`style`,attrs:{...t,nonce:n},children:e})),g),l=w(t.stores.matches,e=>e.flatMap(e=>e.headScripts??[]).filter(e=>e!==void 0).map(({children:e,...t})=>({tag:`script`,attrs:{...t,nonce:n},children:e})),g),u=[];return on(u,i),u.push(...s),on(u,a),u.push(...o),on(u,c),on(u,l),u};function Us(e){let t=Hs(e.assetCrossOrigin),n=ue().options.ssr?.nonce;return(0,H.jsx)(H.Fragment,{children:t.map(e=>(0,V.createElement)(Bs,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var Ws=()=>{let e=ue(),t=e.options.ssr?.nonce,n=n=>{let r=[],i=e.ssr?.manifest;if(!i)return[];for(let e of n){let n=i.routes[e.routeId]?.scripts;if(n)for(let e of n)r.push({tag:`script`,attrs:{...e.attrs,nonce:t},children:e.children,...typeof e.attrs?.src==`string`?{preventScriptHoist:!0}:{}})}return r},r=e=>e.map(e=>e.scripts).flat(1).filter(Boolean).map(({children:e,...n})=>({tag:`script`,attrs:{...n,suppressHydrationWarning:!0,nonce:t},children:e})),i=w(e.stores.matches,n,g);return Gs(e,w(e.stores.matches,r,g),i)};function Gs(e,t,n){let r=[...t,...n];return(0,H.jsx)(H.Fragment,{children:r.map((e,t)=>(0,V.createElement)(Bs,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}function Ks({children:e}){return(0,H.jsx)(H.Fragment,{children:e})}var qs=e=>{let t,n=new Set,r=(e,r)=>{let i=typeof e==`function`?e(t):e;if(!Object.is(i,t)){let e=t;t=r??(typeof i!=`object`||!i)?i:Object.assign({},t,i),n.forEach(n=>n(t,e))}},i=()=>t,a={setState:r,getState:i,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e))},o=t=e(r,i,a);return a},Js=(e=>e?qs(e):qs),Ys=e=>e;function Xs(e,t=Ys){let n=V.useSyncExternalStore(e.subscribe,V.useCallback(()=>t(e.getState()),[e,t]),V.useCallback(()=>t(e.getInitialState()),[e,t]));return V.useDebugValue(n),n}var Zs=e=>{let t=Js(e),n=e=>Xs(t,e);return Object.assign(n,t),n},Qs=(e=>e?Zs(e):Zs);function $s(e,t){let n;try{n=e()}catch{return}return{getItem:e=>{let r=e=>e===null?null:JSON.parse(e,t?.reviver),i=n.getItem(e)??null;return i instanceof Promise?i.then(r):r(i)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,t?.replacer)),removeItem:e=>n.removeItem(e)}}var ec=e=>t=>{try{let n=e(t);return n instanceof Promise?n:{then(e){return ec(e)(n)},catch(e){return this}}}catch(e){return{then(e){return this},catch(t){return ec(t)(e)}}}},tc=(e,t)=>(n,r,i)=>{let a={storage:$s(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},o=!1,s=0,c=new Set,l=new Set,u=a.storage;if(!u)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`),n(...e)},r,i);let d=()=>{let e=a.partialize({...r()});return u.setItem(a.name,{state:e,version:a.version})},f=i.setState;i.setState=(e,t)=>(f(e,t),d());let p=e((...e)=>(n(...e),d()),r,i);i.getInitialState=()=>p;let m,h=()=>{if(!u)return;let e=++s;o=!1,c.forEach(e=>e(r()??p));let t=a.onRehydrateStorage?.call(a,r()??p)||void 0;return ec(u.getItem.bind(u))(a.name).then(e=>{if(e)if(typeof e.version==`number`&&e.version!==a.version){if(a.migrate){let t=a.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error(`State loaded from storage couldn't be migrated since no migrate function was provided`)}else return[!1,e.state];return[!1,void 0]}).then(t=>{if(e!==s)return;let[i,o]=t;if(m=a.merge(o,r()??p),n(m,!0),i)return d()}).then(()=>{e===s&&(t?.(r(),void 0),m=r(),o=!0,l.forEach(e=>e(m)))}).catch(n=>{e===s&&t?.(void 0,n)})};return i.persist={setOptions:e=>{a={...a,...e},e.storage&&(u=e.storage)},clearStorage:()=>{u?.removeItem(a.name)},getOptions:()=>a,rehydrate:()=>h(),hasHydrated:()=>o,onHydrate:e=>(c.add(e),()=>{c.delete(e)}),onFinishHydration:e=>(l.add(e),()=>{l.delete(e)})},a.skipHydration||h(),m||p};function nc(...e){return e.map(e=>({id:D(`b`),type:e.type,content:e.content??``,checked:e.checked,collapsed:e.collapsed,indent:e.indent??0,showSource:e.showSource,aiOutput:e.aiOutput}))}function rc(e){let t=Date.now();return{id:D(`page`),title:``,icon:`📄`,cover:null,parentId:null,favorite:!1,createdAt:t,updatedAt:t,blocks:nc({type:`paragraph`,content:``}),archived:!1,...e}}function ic(){let e=rc({title:`Getting Started`,icon:`🚀`,cover:`warm`,favorite:!0,blocks:nc({type:`paragraph`,content:`Welcome to ForgeNotes — notes, AI assist, Mermaid diagrams, and optional database sync.`},{type:`heading1`,content:`What you can do`},{type:`bullet`,content:`Create pages from the sidebar`},{type:`bullet`,content:`Type / for block types — try AI and Mermaid`},{type:`bullet`,content:`Hover a block → ⋮⋮ menu → Edit with AI`},{type:`bullet`,content:`Sign in to sync pages to the database`},{type:`bullet`,content:`Search with ⌘K / Ctrl+K`},{type:`heading2`,content:`Try AI`},{type:`ai`,content:`Summarize this page as three bullets for a new teammate`},{type:`heading2`,content:`Mermaid`},{type:`mermaid`,content:`flowchart LR - Write[Write notes] --> AI[AI block] - AI --> Diagram[Mermaid] - Diagram --> Ship[Ship]`,showSource:!1},{type:`heading2`,content:`Basics`},{type:`todo`,content:`Rename this page title`,checked:!1},{type:`todo`,content:`Run the AI block above`,checked:!1},{type:`todo`,content:`Toggle Mermaid source / preview`,checked:!0},{type:`callout`,content:`Tip: slash /ai or /mermaid. AI uses Grok when XAI_API_KEY is set; otherwise a local demo mode.`},{type:`quote`,content:`Write first. Organize later.`},{type:`code`,content:`function hello() { - console.log("hello workspace"); -}`},{type:`divider`,content:``},{type:`paragraph`,content:`This starter page is yours — edit freely or start a blank page.`})}),t=rc({title:`Product Spec`,icon:`📋`,parentId:e.id,blocks:nc({type:`heading1`,content:`Overview`},{type:`paragraph`,content:`A lightweight personal knowledge base with nested pages, AI, and diagrams.`},{type:`heading2`,content:`Goals`},{type:`numbered`,content:`Capture ideas without friction`},{type:`numbered`,content:`Structure docs with nested pages`},{type:`numbered`,content:`Use AI for summaries and checklists`},{type:`heading2`,content:`Non-goals`},{type:`bullet`,content:`Real-time multiplayer (for now)`},{type:`bullet`,content:`Full offline multi-device without sign-in`},{type:`mermaid`,content:`sequenceDiagram - participant U as User - participant A as App - participant D as Database - U->>A: Edit page - A->>D: Save (when signed in)`,showSource:!1})}),n=rc({title:`Weekly Notes`,icon:`📅`,favorite:!0,cover:`cool`,blocks:nc({type:`heading1`,content:`This week`},{type:`todo`,content:`Ship the block editor`,checked:!0},{type:`todo`,content:`Add AI + Mermaid`,checked:!0},{type:`todo`,content:`Write release notes`,checked:!1},{type:`heading2`,content:`Notes`},{type:`paragraph`,content:`Keep daily fragments here. Promote anything durable into its own page.`},{type:`ai`,content:`Turn the todos and notes above into a short status update for stakeholders`},{type:`callout`,content:`Use favorites for the 2–3 pages you open every day.`})});return{pages:[e,t,n,rc({title:`Reading List`,icon:`📚`,blocks:nc({type:`heading2`,content:`Queue`},{type:`todo`,content:`Atomic Habits — James Clear`,checked:!1},{type:`todo`,content:`The Design of Everyday Things`,checked:!1},{type:`todo`,content:`Staff Engineer — Will Larson`,checked:!0},{type:`heading2`,content:`Quotes`},{type:`quote`,content:`Perfection is achieved not when there is nothing more to add, but when there is nothing left to take away.`})}),rc({title:`Meeting Notes`,icon:`🗒`,parentId:n.id,blocks:nc({type:`heading1`,content:`Kickoff`},{type:`paragraph`,content:`Attendees: design, eng, product`},{type:`bullet`,content:`Align on v1 scope`},{type:`bullet`,content:`Decide on editor primitives`},{type:`bullet`,content:`Ship a polished demo`},{type:`divider`,content:``},{type:`heading3`,content:`Action items`},{type:`todo`,content:`Draft IA for sidebar`,checked:!0},{type:`todo`,content:`Prototype slash menu`,checked:!0},{type:`todo`,content:`Add AI edit-with-block`,checked:!0})})],activePageId:e.id}}var ac=`📄.📝.📋.📚.💡.🎯.🚀.⭐.🏠.📁.🗂.📅.✅.🔧.🎨.🧠.🌱.🔥.☕.🗒.📦.🧭.🛠.💬.📊.🔍.✨.🏷.📎.🛡`.split(`.`),oc={warm:{label:`Warm`,className:`bg-gradient-to-br from-stone-200 via-amber-100/80 to-orange-100/60`},cool:{label:`Cool`,className:`bg-gradient-to-br from-slate-200 via-sky-100/70 to-stone-100`},soft:{label:`Soft`,className:`bg-gradient-to-br from-zinc-200 via-neutral-100 to-stone-50`},ink:{label:`Ink`,className:`bg-gradient-to-br from-zinc-800 via-stone-700 to-neutral-800`}};function sc(e){return{...e,updatedAt:Date.now()}}function cc(e,t){let n=new Set([t]),r=!0;for(;r;){r=!1;for(let t of e)t.parentId&&n.has(t.parentId)&&!n.has(t.id)&&(n.add(t.id),r=!0)}return n}function lc(e){return e.map(e=>({...e,id:D(`b`)}))}var uc=ic(),dc=Qs()(tc((e,t)=>({name:`ForgeNotes`,pages:uc.pages,activePageId:uc.activePageId,sidebarOpen:!0,theme:`light`,hydrated:!1,storageMode:`local`,syncStatus:`local`,setHydrated:t=>e({hydrated:t}),setName:t=>e({name:t}),setSidebarOpen:t=>e({sidebarOpen:t}),toggleSidebar:()=>e(e=>({sidebarOpen:!e.sidebarOpen})),setTheme:t=>e({theme:t}),setActivePage:t=>e({activePageId:t}),setStorageMode:t=>e({storageMode:t}),setSyncStatus:t=>e({syncStatus:t}),loadFromRemote:t=>e({name:t.name,pages:t.pages,activePageId:t.activePageId,sidebarOpen:t.sidebarOpen,theme:t.theme,storageMode:`database`,syncStatus:`saved`,hydrated:!0}),getPage:e=>t().pages.find(t=>t.id===e),getChildren:e=>t().pages.filter(t=>!t.archived&&t.parentId===e).sort((e,t)=>e.createdAt-t.createdAt),createPage:t=>{let n=rc({parentId:t?.parentId??null,title:t?.title??``,icon:t?.icon});return e(e=>({pages:[...e.pages,n],activePageId:n.id})),n.id},updatePage:(t,n)=>e(e=>({pages:e.pages.map(e=>e.id===t?sc({...e,...n}):e)})),deletePage:n=>{let r=cc(t().pages,n);e(e=>{let t=e.pages.map(e=>r.has(e.id)?sc({...e,archived:!0,favorite:!1}):e),n=e.activePageId;return n&&r.has(n)&&(n=t.find(e=>!e.archived&&!r.has(e.id))?.id??null),{pages:t,activePageId:n}})},restorePage:t=>e(e=>({pages:e.pages.map(e=>e.id===t?sc({...e,archived:!1,parentId:null}):e)})),permanentlyDeletePage:n=>{let r=cc(t().pages,n);e(e=>{let t=e.pages.filter(e=>!r.has(e.id)),n=e.activePageId;return n&&r.has(n)&&(n=t.find(e=>!e.archived)?.id??null),{pages:t,activePageId:n}})},duplicatePage:n=>{let r=t().pages.find(e=>e.id===n);if(!r)return null;let i=rc({title:r.title?`${r.title} (copy)`:`Untitled (copy)`,icon:r.icon,cover:r.cover,parentId:r.parentId,favorite:!1,blocks:lc(r.blocks)});return e(e=>({pages:[...e.pages,i],activePageId:i.id})),i.id},movePage:(n,r)=>{n!==r&&(r&&cc(t().pages,n).has(r)||e(e=>({pages:e.pages.map(e=>e.id===n?sc({...e,parentId:r}):e)})))},setBlocks:(t,n)=>e(e=>({pages:e.pages.map(e=>e.id===t?sc({...e,blocks:n}):e)})),updateBlock:(t,n,r)=>e(e=>({pages:e.pages.map(e=>e.id===t?sc({...e,blocks:e.blocks.map(e=>e.id===n?{...e,...r}:e)}):e)})),insertBlock:(t,n,r=`paragraph`,i=``)=>{let a={id:D(`b`),type:r,content:i,indent:0};return e(e=>({pages:e.pages.map(e=>{if(e.id!==t)return e;let r=[...e.blocks];if(!n)r.unshift(a);else{let e=r.findIndex(e=>e.id===n);e>=0?r.splice(e+1,0,a):r.push(a)}return sc({...e,blocks:r})})})),a.id},deleteBlock:(t,n)=>e(e=>({pages:e.pages.map(e=>{if(e.id!==t)return e;let r=e.blocks.filter(e=>e.id!==n);return r.length===0&&(r=[{id:D(`b`),type:`paragraph`,content:``,indent:0}]),sc({...e,blocks:r})})})),changeBlockType:(t,n,r)=>e(e=>({pages:e.pages.map(e=>e.id===t?sc({...e,blocks:e.blocks.map(e=>e.id===n?{...e,type:r,checked:r===`todo`?e.checked??!1:void 0}:e)}):e)})),moveBlock:(t,n,r)=>e(e=>({pages:e.pages.map(e=>{if(e.id!==t)return e;let i=[...e.blocks],a=i.findIndex(e=>e.id===n);if(a<0)return e;let o=r===`up`?a-1:a+1;if(o<0||o>=i.length)return e;let s=i[a];return i[a]=i[o],i[o]=s,sc({...e,blocks:i})})})),importPages:(t,n)=>e(e=>({pages:[...e.pages,...t],activePageId:n??t[0]?.id??e.activePageId})),resetWorkspace:()=>{let t=ic();e({name:`ForgeNotes`,pages:t.pages,activePageId:t.activePageId,sidebarOpen:!0,theme:`light`,storageMode:`local`,syncStatus:`local`})}}),{name:`workspace-v1`,partialize:e=>({name:e.name,pages:e.pages,activePageId:e.activePageId,sidebarOpen:e.sidebarOpen,theme:e.theme}),onRehydrateStorage:()=>e=>{e?.setHydrated(!0)}}));function fc(){let e=dc(e=>e.theme);(0,V.useEffect)(()=>{let t=document.documentElement;e===`dark`?t.classList.add(`dark`):t.classList.remove(`dark`)},[e])}var pc=`forgenotes-zoom`,mc=[.75,.85,1,1.15,1.3,1.5,1.75,2];function hc(e){let t=0;for(let n=1;n`u`)return 1;let e=Number.parseFloat(window.localStorage.getItem(pc)??``);return!Number.isFinite(e)||e<=0?1:Math.min(mc.at(-1),Math.max(mc[0],e))}function vc(e){document.documentElement.style.fontSize=e===1?``:`${e*100}%`}function yc(){(0,V.useEffect)(()=>{let e=_c();vc(e);let t=t=>{if(!(t.metaKey||t.ctrlKey)||t.altKey)return;let n=t.key===`=`||t.key===`+`?1:t.key===`-`||t.key===`_`?-1:t.key===`0`?0:null;if(n===null)return;let r=gc(e,n);t.preventDefault(),r!==e&&(e=r,vc(e),window.localStorage.setItem(pc,String(e)))};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[])}function bc(){(0,V.useEffect)(()=>{},[])}var xc=`/assets/styles-Peq6Rcdg.css`,Sc=gs({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1`},{title:`ForgeNotes — notes, AI & harness`},{name:`description`,content:`ForgeNotes is a Notion-style workspace for notes, AI (Deep Agents & coding CLIs), markdown, and agent workflows.`}],links:[{rel:`stylesheet`,href:xc}]}),component:Cc});function Cc(){return fc(),yc(),bc(),(0,H.jsxs)(`html`,{lang:`en`,suppressHydrationWarning:!0,children:[(0,H.jsx)(`head`,{children:(0,H.jsx)(Us,{})}),(0,H.jsxs)(`body`,{children:[(0,H.jsx)(Ks,{children:(0,H.jsx)(As,{})}),(0,H.jsx)(Ws,{})]})]})}var wc=`modulepreload`,Tc=function(e){return`/`+e},Ec={},Dc=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Tc(t,n),t=s(t),t in Ec)return;Ec[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:wc,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Oc=_s(`/`)({component:ys(()=>Dc(()=>import(`./routes-BDn33g5C.js`),__vite__mapDeps([0,1,2,3,4,5])),`component`)}),kc=_s(`/login`)({component:ys(()=>Dc(()=>import(`./login-xkhUej_P.js`),__vite__mapDeps([6,1,2,3,4,5])),`component`)}),Ac={IndexRoute:Oc.update({id:`/`,path:`/`,getParentRoute:()=>Sc}),LoginRoute:kc.update({id:`/login`,path:`/login`,getParentRoute:()=>Sc})},jc=Sc._addFileChildren(Ac);function Mc(){return Fs({routeTree:jc})}async function Nc(){let e=await Mc(),t=[];return window.__TSS_START_OPTIONS__={serializationAdapters:t},t.push(Do),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:``,serializationAdapters:t}),e.stores.matchesId.get().length||await Ao(e),e}var Pc=Nc;async function Fc(){let e=await Pc();return window.$_TSR?.h(),e}var Ic;function Lc(){return Ic||=Fc(),(0,H.jsx)(Mo,{promise:Ic,children:e=>(0,H.jsx)(Rs,{router:e})})}var Rc=xe();(0,V.startTransition)(()=>{(0,Rc.hydrateRoot)(document,(0,H.jsx)(V.StrictMode,{children:(0,H.jsx)(Lc,{})}))});export{rc as a,ds as c,nt as d,Ae as f,ac as i,Eo as l,dc as n,tc as o,we as p,oc as r,Qs as s,Dc as t,tt as u}; \ No newline at end of file diff --git a/dist-desktop/assets/info-DKCQHKI2-DIc7uC4I.js b/dist-desktop/assets/info-DKCQHKI2-DIc7uC4I.js deleted file mode 100644 index 8ac0188..0000000 --- a/dist-desktop/assets/info-DKCQHKI2-DIc7uC4I.js +++ /dev/null @@ -1 +0,0 @@ -import"./chunk-KEIR6QF5-Dj-OpFgW.js";import{n as e}from"./chunk-BIQX33UG-CuPbkyWp.js";export{e as createInfoServices}; \ No newline at end of file diff --git a/dist-desktop/assets/infoDiagram-FWYZ7A6U-BY1UX4W6.js b/dist-desktop/assets/infoDiagram-FWYZ7A6U-BY1UX4W6.js deleted file mode 100644 index cc3455f..0000000 --- a/dist-desktop/assets/infoDiagram-FWYZ7A6U-BY1UX4W6.js +++ /dev/null @@ -1,2 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-UMNXGZaF.js";import{c as n}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as r}from"./chunk-VAUOI2AC-AC9pRUsa.js";import{n as i}from"./mermaid-parser.core-Z7xZAZRH.js";var a={parse:e(async e=>{let n=await i(`info`,e);t.debug(n)},`parse`)},o={version:`11.16.0`},s={parser:a,db:{getVersion:e(()=>o.version,`getVersion`)},renderer:{draw:e((e,i,a)=>{t.debug(`rendering info diagram -`+e);let o=r(i);n(o,100,400,!0),o.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${a}`)},`draw`)}};export{s as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/init-D6jRqBbL.js b/dist-desktop/assets/init-D6jRqBbL.js deleted file mode 100644 index 6e92a59..0000000 --- a/dist-desktop/assets/init-D6jRqBbL.js +++ /dev/null @@ -1 +0,0 @@ -function e(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}export{e as t}; \ No newline at end of file diff --git a/dist-desktop/assets/input-mze7gZ5r.js b/dist-desktop/assets/input-mze7gZ5r.js deleted file mode 100644 index fa8d0a3..0000000 --- a/dist-desktop/assets/input-mze7gZ5r.js +++ /dev/null @@ -1 +0,0 @@ -import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./react-BLJmJXjR.js";import{r as n,t as r,u as i}from"./utils-BTuSbA5p.js";import{t as a}from"./client-CwgDvMJw.js";var o=e(t(),1),s=Object.defineProperty,c=(e,t)=>s(e,`name`,{value:t,configurable:!0});function l(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}c(l,`setRef`);function u(...e){return t=>{let n=!1,r=e.map(e=>{let r=l(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;tp(e,`name`,{value:t,configurable:!0}),h=m(((e,t)=>{let n={...t};for(let r in t){let i=e[r],a=t[r];if(/^on[A-Z]/.test(r))if(i&&a){let e=typeof i==`function`,t=typeof a==`function`;n[r]=(...n)=>{let r=t?a(...n):void 0;return e&&i(...n),r}}else i&&(n[r]=i);else r===`style`?n[r]={...typeof i==`object`?i:null,...typeof a==`object`?a:null}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=g(a,i))}return{...e,...n}}),`mergeProps`);function g(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}m(g,`concatAriaDescribedby`);var _=o.createContext(h);_.displayName=`SlotContext`;function v(e){let t=o.forwardRef((t,n)=>{let r=o.useContext(_),{children:i,mergeProps:a=r,...s}=t,c=null,l=!1,u=[];E(i)&&typeof A==`function`&&(i=A(i._payload)),o.Children.forEach(i,e=>{if(w(e)){l=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;E(n)&&typeof A==`function`&&(n=A(n._payload)),c=S(t,n),u.push(c?.props?.children)}else u.push(e)}),c?c=o.cloneElement(c,void 0,u):!l&&o.Children.count(i)===1&&o.isValidElement(i)&&(c=i);let f=c?C(c):void 0,p=d(n,f);if(!c){if(i||i===0)throw Error(l?k(e):O(e));return i}let m=a(s,c.props??{});return c.type!==o.Fragment&&(m.ref=n?p:f),o.cloneElement(c,m)});return t.displayName=`${e}.Slot`,t}m(v,`createSlot`);var y=v(`Slot`),b=Symbol.for(`radix.slottable`);function x(e){let t=m(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=b,t}m(x,`createSlottable`);var S=m((e,t)=>{if(`child`in e.props){let t=e.props.child;return o.isValidElement(t)?o.cloneElement(t,void 0,e.props.children(t.props.children)):null}return o.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function C(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}m(C,`getElementRef`);function w(e){return o.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===b}m(w,`isSlottable`);var T=Symbol.for(`react.lazy`);function E(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===T&&`_payload`in e&&D(e._payload)}m(E,`isLazyComponent`);function D(e){return typeof e==`object`&&!!e&&`then`in e}m(D,`isPromiseLike`);var O=m(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),k=m(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),A=o.use,j=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,M=n,N=((e,t)=>n=>{if(t?.variants==null)return M(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=j(t)||j(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return M(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)})(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[background-color,color,opacity,box-shadow,transform] duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:pointer-events-none disabled:opacity-50 active:scale-[0.98] [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/90`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/80`,ghost:`hover:bg-muted text-foreground`,outline:`border border-border bg-transparent hover:bg-muted`,destructive:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,soft:`bg-muted text-foreground hover:bg-muted/80`},size:{default:`h-9 px-3.5 py-2`,sm:`h-8 rounded-md px-2.5 text-xs`,lg:`h-10 rounded-lg px-4`,icon:`h-8 w-8`,"icon-sm":`h-7 w-7`}},defaultVariants:{variant:`default`,size:`default`}}),P=o.forwardRef(({className:e,variant:t,size:n,asChild:i=!1,...a},o)=>(0,f.jsx)(i?y:`button`,{className:r(N({variant:t,size:n,className:e})),ref:o,...a}));P.displayName=`Button`;function F(){let{data:e,isPending:t}=a.useSession(),n=e?.user;return{user:n?{id:n.id,displayName:n.name??null,primaryEmail:n.email??null,profileImageUrl:n.image??null,isDevFallback:!1}:null,isPending:t}}function I(){return F().user}var L=o.forwardRef(({className:e,type:t,...n},i)=>(0,f.jsx)(`input`,{type:t,className:r(`flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm text-foreground shadow-none transition-colors placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40 disabled:cursor-not-allowed disabled:opacity-50`,e),ref:i,...n}));L.displayName=`Input`;export{v as a,d as c,P as i,I as n,x as o,F as r,u as s,L as t}; \ No newline at end of file diff --git a/dist-desktop/assets/ishikawaDiagram-FXEZZL3T-Jj-U8PJa.js b/dist-desktop/assets/ishikawaDiagram-FXEZZL3T-Jj-U8PJa.js deleted file mode 100644 index 284aace..0000000 --- a/dist-desktop/assets/ishikawaDiagram-FXEZZL3T-Jj-U8PJa.js +++ /dev/null @@ -1,70 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-UMNXGZaF.js";import{H as t,K as n,U as r,a as i,c as a,s as o,v as s,w as c,x as l,y as u}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{p as d}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as f}from"./chunk-VAUOI2AC-AC9pRUsa.js";import{t as p}from"./rough.esm-CSKSodPl.js";var m=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,14],i=[1,12],a=[1,13],o=[6,7,8],s=[1,20],c=[1,18],l=[1,19],u=[6,7,11],d=[1,6,13,14],f=[1,23],p=[1,24],m=[1,6,7,11,13,14],h={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`ISHIKAWA`,11:`EOF`,13:`SPACELIST`,14:`TEXT`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 15:r.addNode(a[s-1].length,a[s].trim());break;case 16:r.addNode(0,a[s].trim());break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:a},t(o,[2,3]),{1:[2,2]},t(o,[2,4]),t(o,[2,5]),{1:[2,6],6:r,12:15,13:i,14:a},{6:r,9:16,12:11,13:i,14:a},{6:s,7:c,10:17,11:l},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:s,7:c,10:22,11:l},{1:[2,7],6:r,12:15,13:i,14:a},t(d,[2,14],{7:f,11:p}),t(m,[2,8]),t(m,[2,9]),t(m,[2,10]),t(u,[2,15]),t(d,[2,13],{7:f,11:p}),t(m,[2,11]),t(m,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};h.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return 6;case 1:return 8;case 2:return 8;case 3:return 6;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},`anonymous`),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}})();function g(){this.yy={}}return e(g,`Parser`),g.prototype=h,h.Parser=g,new g})();m.parser=m;var h=m,g=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{e(this,`IshikawaDB`)}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,i()}getRoot(){return this.root}addNode(e,t){let r=o.sanitizeText(t,l());if(!this.root){this.root={text:r,children:[]},this.stack=[{level:0,node:this.root}],n(r);return}this.baseLevel??=e;let i=e-this.baseLevel+1;for(i<=0&&(i=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=i;)this.stack.pop();let a=this.stack[this.stack.length-1].node,s={text:r,children:[]};a.children.push(s),this.stack.push({level:i,node:s})}getAccTitle(){return u()}setAccTitle(e){r(e)}getAccDescription(){return s()}setAccDescription(e){t(e)}getDiagramTitle(){return c()}setDiagramTitle(e){n(e)}},_=14,v=250,y=30,b=60,x=5,S=82*Math.PI/180,C=Math.cos(S),w=Math.sin(S),T=e((e,t,n)=>{let r=e.node().getBBox(),i=r.width+t*2,o=r.height+t*2;a(e,o,i,n),e.attr(`viewBox`,`${r.x-t} ${r.y-t} ${i} ${o}`)},`applyPaddedViewBox`),E=e((e,t,n,r)=>{let i=r.db.getRoot();if(!i)return;let a=l(),{look:o,handDrawnSeed:s,themeVariables:c}=a,u=d(a.fontSize)[0]??_,m=o===`handDrawn`,h=i.children??[],g=a.ishikawa?.diagramPadding??20,y=a.ishikawa?.useMaxWidth??!1,b=f(t),x=b.append(`g`).attr(`class`,`ishikawa`),S=m?p.svg(b.node()):void 0,C=S?{roughSvg:S,seed:s??0,lineColor:c?.lineColor??`#333`,fillColor:c?.mainBkg??`#fff`}:void 0,w=`ishikawa-arrow-${t}`;m||x.append(`defs`).append(`marker`).attr(`id`,w).attr(`viewBox`,`0 0 10 10`).attr(`refX`,0).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 Z`).attr(`class`,`ishikawa-arrow`);let E=0,k=v,A=m?void 0:L(x,E,k,E,k,`ishikawa-spine`);if(O(x,E,k,i.text,u,C),!h.length){m&&L(x,E,k,E,k,`ishikawa-spine`,C),T(b,g,y);return}E-=20;let j=h.filter((e,t)=>t%2==0),N=h.filter((e,t)=>t%2==1),P=D(j),F=D(N),I=P.total+F.total,R=v,z=v;if(I>0){let e=v*2,t=v*.3;R=Math.max(t,e*(P.total/I)),z=Math.max(t,e*(F.total/I))}let B=u*2;R=Math.max(R,P.max*B),z=Math.max(z,F.max*B),k=Math.max(R,v),A&&A.attr(`y1`,k).attr(`y2`,k),x.select(`.ishikawa-head-group`).attr(`transform`,`translate(0,${k})`);let V=Math.ceil(h.length/2);for(let e=0;eMath.min(e,t.getBBox().x),1/0)}if(m)L(x,E,k,0,k,`ishikawa-spine`,C);else{A.attr(`x1`,E);let e=`url(#${w})`;x.selectAll(`line.ishikawa-branch, line.ishikawa-sub-branch`).attr(`marker-start`,e)}T(b,g,y)},`draw`),D=e(t=>{let n=e(e=>e.children.reduce((e,t)=>e+1+n(t),0),`countDescendants`);return t.reduce((e,t)=>{let r=n(t);return e.total+=r,e.max=Math.max(e.max,r),e},{total:0,max:0})},`sideStats`),O=e((e,t,n,r,i,a)=>{let o=Math.max(6,Math.floor(110/(i*.6))),s=e.append(`g`).attr(`class`,`ishikawa-head-group`).attr(`transform`,`translate(${t},${n})`),c=F(s,P(r,o),0,0,`ishikawa-head-label`,`start`,i),l=c.node().getBBox(),u=Math.max(60,l.width+6),d=Math.max(40,l.height*2+40),f=`M 0 ${-d/2} L 0 ${d/2} Q ${u*2.4} 0 0 ${-d/2} Z`;if(a){let e=a.roughSvg.path(f,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-head`)}else s.insert(`path`,`:first-child`).attr(`class`,`ishikawa-head`).attr(`d`,f);c.attr(`transform`,`translate(${(u-l.width)/2-l.x+3},${-l.y-l.height/2})`)},`drawHead`),k=e((t,n)=>{let r=[],i=[],a=e((e,t,o)=>{let s=n===-1?[...e].reverse():e;for(let e of s){let n=r.length,s=e.children??[];r.push({depth:o,text:P(e.text,15),parentIndex:t,childCount:s.length}),o%2==0?(i.push(n),s.length&&a(s,n,o+1)):(s.length&&a(s,n,o+1),i.push(n))}},`walk`);return a(t,-1,2),{entries:r,yOrder:i}},`flattenTree`),A=e((e,t,n,r,i,a,o)=>{let s=e.append(`g`).attr(`class`,`ishikawa-label-group`),c=F(s,t,n,r+11*i,`ishikawa-label cause`,`middle`,a).node().getBBox();if(o){let e=o.roughSvg.rectangle(c.x-20,c.y-2,c.width+40,c.height+4,{roughness:1.5,seed:o.seed,fill:o.fillColor,fillStyle:`hachure`,fillWeight:2.5,hachureGap:5,stroke:o.lineColor,strokeWidth:2});s.insert(()=>e,`:first-child`).attr(`class`,`ishikawa-label-box`)}else s.insert(`rect`,`:first-child`).attr(`class`,`ishikawa-label-box`).attr(`x`,c.x-20).attr(`y`,c.y-2).attr(`width`,c.width+40).attr(`height`,c.height+4)},`drawCauseLabel`),j=e((e,t,n,r,i,a)=>{let o=Math.sqrt(r*r+i*i);if(o===0)return;let s=r/o,c=i/o,l=-c*6,u=s*6,d=t,f=n,p=`M ${d} ${f} L ${d-s*6*2+l} ${f-c*6*2+u} L ${d-s*6*2-l} ${f-c*6*2-u} Z`,m=a.roughSvg.path(p,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:`solid`,stroke:a.lineColor,strokeWidth:1});e.append(()=>m)},`drawArrowMarker`),M=e((e,t,n,r,i,a,o,s)=>{let c=t.children??[],l=a*(c.length?1:.2),u=-C*l,d=w*l*i,f=n+u,p=r+d;if(L(e,n,r,f,p,`ishikawa-branch`,s),s&&j(e,n,r,n-f,r-p,s),A(e,t.text,f,p,i,o,s),!c.length)return;let{entries:m,yOrder:h}=k(c,i),g=m.length,_=Array(g);for(let[e,t]of h.entries())_[t]=r+d*((e+1)/(g+1));let v=new Map;v.set(-1,{x0:n,y0:r,x1:f,y1:p,childCount:c.length,childrenDrawn:0});let S=-C,T=w*i,E=i<0?`ishikawa-label up`:`ishikawa-label down`;for(let[t,n]of m.entries()){let r=_[t],i=v.get(n.parentIndex),a=e.append(`g`).attr(`class`,`ishikawa-sub-group`),c=0,l=0,u=0;if(n.depth%2==0){let e=i.y1-i.y0;c=I(i.x0,i.x1,e?(r-i.y0)/e:.5),l=r,u=c-(n.childCount>0?b+n.childCount*x:y),L(a,c,r,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,r,1,0,s),F(a,n.text,u,r,`ishikawa-label align`,`end`,o)}else{let e=i.childrenDrawn++;c=I(i.x0,i.x1,(i.childCount-e)/(i.childCount+1)),l=i.y0,u=c+S*((r-l)/T),L(a,c,l,u,r,`ishikawa-sub-branch`,s),s&&j(a,c,l,c-u,l-r,s),F(a,n.text,u,r,E,`end`,o)}n.childCount>0&&v.set(t,{x0:c,y0:l,x1:u,y1:r,childCount:n.childCount,childrenDrawn:0})}},`drawBranch`),N=e(e=>e.split(/|\n/),`splitLines`),P=e((e,t)=>{if(e.length<=t)return e;let n=[];for(let r of e.split(/\s+/)){let e=n.length-1;e>=0&&n[e].length+1+r.length<=t?n[e]+=` `+r:n.push(r)}return n.join(` -`)},`wrapText`),F=e((e,t,n,r,i,a,o)=>{let s=N(t),c=o*1.05,l=e.append(`text`).attr(`class`,i).attr(`text-anchor`,a).attr(`x`,n).attr(`y`,r-(s.length-1)*c/2);for(let[e,t]of s.entries())l.append(`tspan`).attr(`x`,n).attr(`dy`,e===0?0:c).text(t);return l},`drawMultilineText`),I=e((e,t,n)=>e+(t-e)*n,`lerp`),L=e((e,t,n,r,i,a,o)=>{if(o){let s=o.roughSvg.line(t,n,r,i,{roughness:1.5,seed:o.seed,stroke:o.lineColor,strokeWidth:2});e.append(()=>s).attr(`class`,a);return}return e.append(`line`).attr(`class`,a).attr(`x1`,t).attr(`y1`,n).attr(`x2`,r).attr(`y2`,i)},`drawLine`),R={parser:h,get db(){return new g},renderer:{draw:E},styles:e(e=>` -.ishikawa .ishikawa-spine, -.ishikawa .ishikawa-branch, -.ishikawa .ishikawa-sub-branch { - stroke: ${e.lineColor}; - stroke-width: 2; - fill: none; -} - -.ishikawa .ishikawa-sub-branch { - stroke-width: 1; -} - -.ishikawa .ishikawa-arrow { - fill: ${e.lineColor}; -} - -.ishikawa .ishikawa-head { - fill: ${e.mainBkg}; - stroke: ${e.lineColor}; - stroke-width: 2; -} - -.ishikawa .ishikawa-label-box { - fill: ${e.mainBkg}; - stroke: ${e.lineColor}; - stroke-width: 2; -} - -.ishikawa text { - font-family: ${e.fontFamily}; - font-size: ${e.fontSize}; - fill: ${e.textColor}; -} - -.ishikawa .ishikawa-head-label { - font-weight: 600; - text-anchor: middle; - dominant-baseline: middle; - font-size: 14px; -} - -.ishikawa .ishikawa-label { - text-anchor: end; -} - -.ishikawa .ishikawa-label.cause { - text-anchor: middle; - dominant-baseline: middle; -} - -.ishikawa .ishikawa-label.align { - text-anchor: end; - dominant-baseline: middle; -} - -.ishikawa .ishikawa-label.up { - dominant-baseline: baseline; -} - -.ishikawa .ishikawa-label.down { - dominant-baseline: hanging; -} -`,`getStyles`)};export{R as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/journeyDiagram-5HDEW3XC-CCn-uNlj.js b/dist-desktop/assets/journeyDiagram-5HDEW3XC-CCn-uNlj.js deleted file mode 100644 index 88cb2d8..0000000 --- a/dist-desktop/assets/journeyDiagram-5HDEW3XC-CCn-uNlj.js +++ /dev/null @@ -1,139 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-UMNXGZaF.js";import{H as n,K as r,U as i,a,c as o,v as s,w as c,x as l,y as u}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as d}from"./arc-DqK6O3qL.js";import{t as f}from"./chunk-5VM5RSS4-ZNzvKenW.js";import{a as p,n as m,o as h,s as g}from"./chunk-32BRIVSS-DWU3ezKg.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,11,12,14,16,17,18],r=[1,9],i=[1,10],a=[1,11],o=[1,12],s=[1,13],c=[1,14],l={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:15,11:r,12:i,14:a,16:o,17:s,18:c},t(n,[2,5]),t(n,[2,6]),t(n,[2,8]),{13:[1,16]},{15:[1,17]},t(n,[2,11]),t(n,[2,12]),{19:[1,18]},t(n,[2,4]),t(n,[2,9]),t(n,[2,10]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};l.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin(`acc_title`),12;case 8:return this.popState(),`acc_title_value`;case 9:return this.begin(`acc_descr`),14;case 10:return this.popState(),`acc_descr_value`;case 11:this.begin(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 17;case 15:return 18;case 16:return 19;case 17:return`:`;case 18:return 6;case 19:return`INVALID`}},`anonymous`),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\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,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}})();function u(){this.yy={}}return e(u,`Parser`),u.prototype=l,l.Parser=u,new u})();_.parser=_;var v=_,y=``,b=[],x=[],S=[],C=e(function(){b.length=0,x.length=0,y=``,S.length=0,a()},`clear`),w=e(function(e){y=e,b.push(e)},`addSection`),T=e(function(){return b},`getSections`),E=e(function(){let e=A(),t=0;for(;!e&&t<100;)e=A(),t++;return x.push(...S),x},`getTasks`),D=e(function(){let e=[];return x.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},`updateActors`),O=e(function(e,t){let n=t.substr(1).split(`:`),r=0,i=[];n.length===1?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(`,`));let a=i.map(e=>e.trim()),o={section:y,type:y,people:a,task:e,score:r};S.push(o)},`addTask`),k=e(function(e){let t={section:y,type:y,description:e,task:e,classes:[]};x.push(t)},`addTaskOrg`),A=e(function(){let t=e(function(e){return S[e].processed},`compileTask`),n=!0;for(let[e,r]of S.entries())t(e),n&&=r.processed;return n},`compileTasks`),j={getConfig:e(()=>l().journey,`getConfig`),clear:C,setDiagramTitle:r,getDiagramTitle:c,setAccTitle:i,getAccTitle:u,setAccDescription:n,getAccDescription:s,addSection:w,getSections:T,getTasks:E,addTask:O,addTaskOrg:k,getActors:e(function(){return D()},`getActors`)},M=e(e=>`.label { - font-family: ${e.fontFamily}; - color: ${e.textColor}; - } - .mouth { - stroke: #666; - } - - line { - stroke: ${e.textColor} - } - - .legend { - fill: ${e.textColor}; - font-family: ${e.fontFamily}; - } - - .label text { - fill: #333; - } - .label { - color: ${e.textColor} - } - - .face { - ${e.faceColor?`fill: ${e.faceColor}`:`fill: #FFF8DC`}; - stroke: #999; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${e.mainBkg}; - stroke: ${e.nodeBorder}; - stroke-width: 1px; - } - - .node .label { - text-align: center; - } - .node.clickable { - cursor: pointer; - } - - .arrowheadPath { - fill: ${e.arrowheadColor}; - } - - .edgePath .path { - stroke: ${e.lineColor}; - stroke-width: 1.5px; - } - - .flowchart-link { - stroke: ${e.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${e.edgeLabelBackground}; - rect { - opacity: 0.5; - } - text-align: center; - } - - .cluster rect { - } - - .cluster text { - fill: ${e.titleColor}; - } - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: ${e.fontFamily}; - font-size: 12px; - background: ${e.tertiaryColor}; - border: 1px solid ${e.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .task-type-0, .section-type-0 { - ${e.fillType0?`fill: ${e.fillType0}`:``}; - } - .task-type-1, .section-type-1 { - ${e.fillType0?`fill: ${e.fillType1}`:``}; - } - .task-type-2, .section-type-2 { - ${e.fillType0?`fill: ${e.fillType2}`:``}; - } - .task-type-3, .section-type-3 { - ${e.fillType0?`fill: ${e.fillType3}`:``}; - } - .task-type-4, .section-type-4 { - ${e.fillType0?`fill: ${e.fillType4}`:``}; - } - .task-type-5, .section-type-5 { - ${e.fillType0?`fill: ${e.fillType5}`:``}; - } - .task-type-6, .section-type-6 { - ${e.fillType0?`fill: ${e.fillType6}`:``}; - } - .task-type-7, .section-type-7 { - ${e.fillType0?`fill: ${e.fillType7}`:``}; - } - - .actor-0 { - ${e.actor0?`fill: ${e.actor0}`:``}; - } - .actor-1 { - ${e.actor1?`fill: ${e.actor1}`:``}; - } - .actor-2 { - ${e.actor2?`fill: ${e.actor2}`:``}; - } - .actor-3 { - ${e.actor3?`fill: ${e.actor3}`:``}; - } - .actor-4 { - ${e.actor4?`fill: ${e.actor4}`:``}; - } - .actor-5 { - ${e.actor5?`fill: ${e.actor5}`:``}; - } - ${f()} -`,`getStyles`),N=e(function(e,t){return p(e,t)},`drawRect`),P=e(function(t,n){let r=t.append(`circle`).attr(`cx`,n.cx).attr(`cy`,n.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),i=t.append(`g`);i.append(`circle`).attr(`cx`,n.cx-15/3).attr(`cy`,n.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),i.append(`circle`).attr(`cx`,n.cx+15/3).attr(`cy`,n.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function a(e){let t=d().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+2)+`)`)}e(a,`smile`);function o(e){let t=d().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+7)+`)`)}e(o,`sad`);function s(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,n.cx-5).attr(`y1`,n.cy+7).attr(`x2`,n.cx+5).attr(`y2`,n.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return e(s,`ambivalent`),n.score>3?a(i):n.score<3?o(i):s(i),r},`drawFace`),F=e(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),I=e(function(e,t){return h(e,t)},`drawText`),L=e(function(t,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}e(r,`genPoints`);let i=t.append(`polygon`);i.attr(`points`,r(n.x,n.y,50,20,7)),i.attr(`class`,`labelBox`),n.y+=n.labelMargin,n.x+=.5*n.labelMargin,I(t,n)},`drawLabel`),R=e(function(e,t,n){let r=e.append(`g`),i=g();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width*t.taskCount+n.diagramMarginX*(t.taskCount-1),i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,N(r,i),H(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),z=-1,B=e(function(e,t,n,r){let i=t.x+n.width/2,a=e.append(`g`);z++,a.append(`line`).attr(`id`,r+`-task`+z).attr(`x1`,i).attr(`y1`,t.y).attr(`x2`,i).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),P(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=g();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class=`task task-type-`+t.num,o.rx=3,o.ry=3,N(a,o);let s=t.x+14;t.people.forEach(e=>{let n=t.actors[e].color,r={cx:s,cy:t.y,r:7,fill:n,stroke:`#000`,title:e,pos:t.actors[e].position};F(a,r),s+=10}),H(n)(t.task,a,o.x,o.y,o.width,o.height,{class:`task`},n,t.colour)},`drawTask`),V=e(function(e,t){m(e,t)},`drawBackgroundRect`),H=(function(){function t(e,t,n,r,a,o,s,c){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`font-color`,c).style(`text-anchor`,`middle`).text(e),s)}e(t,`byText`);function n(e,t,n,r,a,o,s,c,l){let{taskFontSize:u,taskFontFamily:d}=c,f=e.split(//gi);for(let e=0;e{let a=G[i].color,o={cx:20,cy:r,r:7,fill:a,stroke:`#000`,pos:G[i].position};U.drawCircle(e,o);let s=e.append(`text`).attr(`visibility`,`hidden`).text(i),c=s.node().getBoundingClientRect().width;s.remove();let l=[];if(c<=n)l=[i];else{let t=i.split(` `),r=``;s=e.append(`text`).attr(`visibility`,`hidden`),t.forEach(e=>{let t=r?`${r} ${e}`:e;if(s.text(t),s.node().getBoundingClientRect().width>n){if(r&&l.push(r),r=e,s.text(e),s.node().getBoundingClientRect().width>n){let t=``;for(let r of e)t+=r,s.text(t+`-`),s.node().getBoundingClientRect().width>n&&(l.push(t.slice(0,-1)+`-`),t=r);r=t}}else r=t}),r&&l.push(r),s.remove()}l.forEach((n,i)=>{let a={x:40,y:r+7+i*20,fill:`#666`,text:n,textMargin:t.boxTextMargin??5},o=U.drawText(e,a).node().getBoundingClientRect().width;o>K&&o>t.leftMargin-o&&(K=o)}),r+=Math.max(20,l.length*20)})}e(q,`drawActorLegend`);var J=l().journey,Y=0,ee=e(function(e,n,r,i){let a=l(),s=a.journey.titleColor,c=a.journey.titleFontSize,u=a.journey.titleFontFamily,d=a.securityLevel,f;d===`sandbox`&&(f=t(`#i`+n));let p=t(d===`sandbox`?f.nodes()[0].contentDocument.body:`body`);X.init();let m=p.select(`#`+n);U.initGraphics(m,n);let h=i.db.getTasks(),g=i.db.getDiagramTitle(),_=i.db.getActors();for(let e in G)delete G[e];let v=0;_.forEach(e=>{G[e]={color:J.actorColours[v%J.actorColours.length],position:v},v++}),q(m),Y=J.leftMargin+K,X.insert(0,0,Y,Object.keys(G).length*50),te(m,h,0,n);let y=X.getBounds();g&&m.append(`text`).text(g).attr(`x`,Y).attr(`font-size`,c).attr(`font-weight`,`bold`).attr(`y`,25).attr(`fill`,s).attr(`font-family`,u);let b=y.stopy-y.starty+2*J.diagramMarginY,x=Y+y.stopx+2*J.diagramMarginX;o(m,b,x,J.useMaxWidth),m.append(`line`).attr(`x1`,Y).attr(`y1`,J.height*4).attr(`x2`,x-Y-4).attr(`y2`,J.height*4).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#`+n+`-arrowhead)`);let S=g?70:0;m.attr(`viewBox`,`${y.startx} -25 ${x} ${b+S}`),m.attr(`preserveAspectRatio`,`xMinYMin meet`),m.attr(`height`,b+S+25)},`draw`),X={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:e(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},`init`),updateVal:e(function(e,t,n,r){e[t]===void 0?e[t]=n:e[t]=r(n,e[t])},`updateVal`),updateBounds:e(function(t,n,r,i){let a=l().journey,o=this,s=0;function c(c){return e(function(e){s++;let l=o.sequenceItems.length-s+1;o.updateVal(e,`starty`,n-l*a.boxMargin,Math.min),o.updateVal(e,`stopy`,i+l*a.boxMargin,Math.max),o.updateVal(X.data,`startx`,t-l*a.boxMargin,Math.min),o.updateVal(X.data,`stopx`,r+l*a.boxMargin,Math.max),c!==`activation`&&(o.updateVal(e,`startx`,t-l*a.boxMargin,Math.min),o.updateVal(e,`stopx`,r+l*a.boxMargin,Math.max),o.updateVal(X.data,`starty`,n-l*a.boxMargin,Math.min),o.updateVal(X.data,`stopy`,i+l*a.boxMargin,Math.max))},`updateItemBounds`)}e(c,`updateFn`),this.sequenceItems.forEach(c())},`updateBounds`),insert:e(function(e,t,n,r){let i=Math.min(e,n),a=Math.max(e,n),o=Math.min(t,r),s=Math.max(t,r);this.updateVal(X.data,`startx`,i,Math.min),this.updateVal(X.data,`starty`,o,Math.min),this.updateVal(X.data,`stopx`,a,Math.max),this.updateVal(X.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),bumpVerticalPos:e(function(e){this.verticalPos+=e,this.data.stopy=this.verticalPos},`bumpVerticalPos`),getVerticalPos:e(function(){return this.verticalPos},`getVerticalPos`),getBounds:e(function(){return this.data},`getBounds`)},Z=J.sectionFills,Q=J.sectionColours,te=e(function(e,t,n,r){let i=l().journey,a=``,o=n+(i.height*2+i.diagramMarginY),s=0,c=`#CCC`,u=`black`,d=0;for(let[n,l]of t.entries()){if(a!==l.section){c=Z[s%Z.length],d=s%Z.length,u=Q[s%Q.length];let r=0,o=l.section;for(let e=n;e(G[t]&&(e[t]=G[t]),e),{});l.x=n*i.taskMargin+n*i.width+Y,l.y=o,l.width=i.diagramMarginX,l.height=i.diagramMarginY,l.colour=u,l.fill=c,l.num=d,l.actors=f,U.drawTask(e,l,i,r),X.insert(l.x,l.y,l.x+l.width+i.taskMargin,450)}},`drawTasks`),$={setConf:W,draw:ee},ne={parser:v,db:j,renderer:$,styles:M,init:e(e=>{$.setConf(e.journey),j.clear()},`init`)};export{ne as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/kanban-definition-HUTT4EX6-CW9CwpnR.js b/dist-desktop/assets/kanban-definition-HUTT4EX6-CW9CwpnR.js deleted file mode 100644 index 1d105a8..0000000 --- a/dist-desktop/assets/kanban-definition-HUTT4EX6-CW9CwpnR.js +++ /dev/null @@ -1,89 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-UMNXGZaF.js";import{J as n,et as r,f as i,rt as a,tt as o,x as s,z as c}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as l}from"./chunk-VAUOI2AC-AC9pRUsa.js";import"./chunk-HOUHSVGY-iJuv90UH.js";import"./chunk-Q4XR5HBZ-CQ8zkLYc.js";import{t as u}from"./chunk-5VM5RSS4-ZNzvKenW.js";import"./chunk-OGEWGWER-D-nWYRNR.js";import"./chunk-C7G6YPKG-DW-1jWUA.js";import{a as d,c as f,i as p}from"./chunk-ZGVPDNZ5-DGInJAPD.js";import{n as m,t as h}from"./chunk-ZIRB5QZD-C6fEPe3t.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,31],h=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:r,9:22,12:11,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},{6:u,7:d,10:23,11:f},t(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:s,23:c}),t(p,[2,19]),t(p,[2,21],{15:30,24:m}),t(p,[2,22]),t(p,[2,23]),t(h,[2,25]),t(h,[2,26]),t(h,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:r,12:21,13:i,14:14,16:a,17:o,18:17,19:18,20:s,23:c},t(g,[2,14],{7:_,11:v}),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(p,[2,16],{15:37,24:m}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(h,[2,31]),{21:[1,39]},{22:[1,40]},t(g,[2,13],{7:_,11:v}),t(y,[2,11]),t(y,[2,12]),t(p,[2,15],{24:b}),t(h,[2,30]),{22:[1,41]},t(h,[2,27]),t(h,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};x.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return this.pushState(`shapeData`),t.yytext=``,24;case 1:return this.pushState(`shapeDataStr`),24;case 2:return this.popState(),24;case 3:return t.yytext=t.yytext.replace(/\n\s*/g,`
    `),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace(`Found comment`,t.yytext),6;case 7:return 8;case 8:this.begin(`CLASS`);break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace(`Begin icon`),this.begin(`ICON`);break;case 12:return e.getLogger().trace(`SPACELINE`),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace(`end icon`),this.popState();break;case 16:return e.getLogger().trace(`Exploding node`),this.begin(`NODE`),20;case 17:return e.getLogger().trace(`Cloud`),this.begin(`NODE`),20;case 18:return e.getLogger().trace(`Explosion Bang`),this.begin(`NODE`),20;case 19:return e.getLogger().trace(`Cloud Bang`),this.begin(`NODE`),20;case 20:return this.begin(`NODE`),20;case 21:return this.begin(`NODE`),20;case 22:return this.begin(`NODE`),20;case 23:return this.begin(`NODE`),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin(`NSTR2`);break;case 28:return`NODE_DESCR`;case 29:this.popState();break;case 30:e.getLogger().trace(`Starting NSTR`),this.begin(`NSTR`);break;case 31:return e.getLogger().trace(`description:`,t.yytext),`NODE_DESCR`;case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace(`node end ))`),`NODE_DEND`;case 34:return this.popState(),e.getLogger().trace(`node end )`),`NODE_DEND`;case 35:return this.popState(),e.getLogger().trace(`node end ...`,t.yytext),`NODE_DEND`;case 36:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 37:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 41:return e.getLogger().trace(`Long description:`,t.yytext),21;case 42:return e.getLogger().trace(`Long description:`,t.yytext),21}},`anonymous`),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}})();function S(){this.yy={}}return e(S,`Parser`),S.prototype=x,x.Parser=S,new S})();g.parser=g;var _=g,v=[],y=[],b=0,x={},S=e(()=>{v=[],y=[],b=0,x={}},`clear`),C=e(e=>{if(v.length===0)return null;let t=v[0].level,n=null;for(let e=v.length-1;e>=0;e--)if(v[e].level===t&&!n&&(n=v[e]),v[e].levelt.parentId===e.id);for(let n of i){let i={id:n.id,parentId:e.id,label:c(n.label??``,r),labelType:`markdown`,isGroup:!1,ticket:n?.ticket,priority:n?.priority,assigned:n?.assigned,icon:n?.icon,shape:`kanbanItem`,level:n.level,rx:5,ry:5,cssStyles:[`text-align: left`]};t.push(i)}}return{nodes:t,edges:e,other:{},config:s()}},`getData`),E=e((e,t,n,r,a)=>{let o=s(),l=o.mindmap?.padding??i.mindmap.padding;switch(r){case D.ROUNDED_RECT:case D.RECT:case D.HEXAGON:l*=2}let u={id:c(t,o)||`kbn`+b++,level:e,label:c(n,o),width:o.mindmap?.maxNodeWidth??i.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(a!==void 0){let e;e=a.includes(` -`)?a+` -`:`{ -`+a+` -}`;let t=m(e,{schema:h});if(t.shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes(`_`)))throw Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&t.shape===`kanbanItem`&&(u.shape=t?.shape),t?.label&&(u.label=t?.label),t?.icon&&(u.icon=t?.icon.toString()),t?.assigned&&(u.assigned=t?.assigned.toString()),t?.ticket&&(u.ticket=t?.ticket.toString()),t?.priority&&(u.priority=t?.priority)}let d=C(e);d?u.parentId=d.id||`kbn`+b++:y.push(u),v.push(u)},`addNode`),D={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O={clear:S,addNode:E,getSections:w,getData:T,nodeType:D,getType:e((e,n)=>{switch(t.debug(`In get type`,e,n),e){case`[`:return D.RECT;case`(`:return n===`)`?D.ROUNDED_RECT:D.CLOUD;case`((`:return D.CIRCLE;case`)`:return D.CLOUD;case`))`:return D.BANG;case`{{`:return D.HEXAGON;default:return D.DEFAULT}},`getType`),setElementForId:e((e,t)=>{x[e]=t},`setElementForId`),decorateNode:e(e=>{if(!e)return;let t=s(),n=v[v.length-1];e.icon&&(n.icon=c(e.icon,t)),e.class&&(n.cssClasses=c(e.class,t))},`decorateNode`),type2Str:e(e=>{switch(e){case D.DEFAULT:return`no-border`;case D.RECT:return`rect`;case D.ROUNDED_RECT:return`rounded-rect`;case D.CIRCLE:return`circle`;case D.CLOUD:return`cloud`;case D.BANG:return`bang`;case D.HEXAGON:return`hexgon`;default:return`no-border`}},`type2Str`),getLogger:e(()=>t,`getLogger`),getElementById:e(e=>x[e],`getElementById`)},k={draw:e(async(e,r,a,o)=>{t.debug(`Rendering kanban diagram -`+e);let c=o.db.getData(),u=s();u.htmlLabels=!1;let m=l(r);for(let e of c.nodes)e.domId=`${r}-${e.id}`;let h=m.append(`g`);h.attr(`class`,`sections`);let g=m.append(`g`);g.attr(`class`,`items`);let _=c.nodes.filter(e=>e.isGroup),v=0,y=[],b=25;for(let e of _){let t=u?.kanban?.sectionWidth||200;v+=1,e.x=t*v+(v-1)*10/2,e.width=t,e.y=0,e.height=t*3,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+` section-`+v;let n=await p(h,e);b=Math.max(b,n?.labelBBox?.height),y.push(n)}let x=0;for(let e of _){let t=y[x];x+=1;let n=u?.kanban?.sectionWidth||200,r=-n*3/2+b,i=r,a=c.nodes.filter(t=>t.parentId===e.id);for(let t of a){if(t.isGroup)throw Error(`Groups within groups are not allowed in Kanban diagrams`);t.x=e.x,t.width=n-1.5*10;let r=(await d(g,t,{config:u})).node().getBBox();t.y=i+r.height/2,await f(t),i=t.y+r.height/2+10/2}let o=t.cluster.select(`rect`),s=Math.max(i-r+30,50)+(b-25);o.attr(`height`,s)}n(void 0,m,u.mindmap?.padding??i.kanban.padding,u.mindmap?.useMaxWidth??i.kanban.useMaxWidth)},`draw`)},A=e(t=>{let n=``;for(let e=0;et.darkMode?r(e,n):o(e,n),`adjuster`);for(let e=0;e` - .edge { - stroke-width: 3; - } - ${A(e)} - .section-root rect, .section-root path, .section-root circle, .section-root polygon { - fill: ${e.git0}; - } - .section-root text { - fill: ${e.gitBranchLabel0}; - } - .icon-container { - height:100%; - display: flex; - justify-content: center; - align-items: center; - } - .edge { - fill: none; - } - .cluster-label, .label { - color: ${e.textColor}; - fill: ${e.textColor}; - } - .kanban-label { - dy: 1em; - alignment-baseline: middle; - text-anchor: middle; - dominant-baseline: middle; - text-align: center; - } - ${u()} -`,`getStyles`)};export{j as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/katex-B7rAX3Vi.js b/dist-desktop/assets/katex-B7rAX3Vi.js deleted file mode 100644 index e8497db..0000000 --- a/dist-desktop/assets/katex-B7rAX3Vi.js +++ /dev/null @@ -1,257 +0,0 @@ -var e=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var c=s.slice(i,a).replace(/[^]/g,`$&̲`),l=i>15?`…`+s.slice(i-15,i):s.slice(0,i),u=a+15e.replace(t,`-$1`).toLowerCase(),r={"&":`&`,">":`>`,"<":`<`,'"':`"`,"'":`'`},i=/[&><"']/g,a=e=>String(e).replace(i,e=>r[e]),o=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?o(e.body[0]):e:e.type===`font`?o(e.body):e,s=new Set([`mathord`,`textord`,`atom`]),c=e=>s.has(o(e).type),l=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},u={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format `},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color `,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro `,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness `,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size `,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand `,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}};function d(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function f(e){return e.default===void 0?d(Array.isArray(e.type)?e.type[0]:e.type):e.default}function p(e,t,n,r){var i=n[t];e[t]=i===void 0?f(r):r.processor?r.processor(i):i}var m=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(u)){var n=u[t];n&&p(this,t,e,n)}}reportNonstrict(t,n,r){var i=this.strict;if(typeof i==`function`&&(i=i(t,n,r)),!(!i||i===`ignore`)){if(i===!0||i===`error`)throw new e(`LaTeX-incompatible input and strict mode is set to 'error': `+(n+` [`+t+`]`),r);i===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(n+` [`+t+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+i+`': `+n+` [`+t+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=l(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},h=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return w[ee[this.id]]}sub(){return w[T[this.id]]}fracNum(){return w[te[this.id]]}fracDen(){return w[ne[this.id]]}cramp(){return w[re[this.id]]}text(){return w[ie[this.id]]}isTight(){return this.size>=2}},g=0,_=1,v=2,y=3,b=4,x=5,S=6,C=7,w=[new h(g,0,!1),new h(_,0,!0),new h(v,1,!1),new h(y,1,!0),new h(b,2,!1),new h(x,2,!0),new h(S,3,!1),new h(C,3,!0)],ee=[b,x,b,x,S,C,S,C],T=[x,x,x,x,C,C,C,C],te=[v,y,b,x,S,C,S,C],ne=[y,y,x,x,C,C,C,C],re=[_,_,y,y,x,x,C,C],ie=[g,_,v,y,v,y,v,y],E={DISPLAY:w[g],TEXT:w[v],SCRIPT:w[b],SCRIPTSCRIPT:w[S]},ae=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}];function oe(e){for(var t=0;t=i[0]&&e<=i[1])return n.name}return null}var se=[];ae.forEach(e=>e.blocks.forEach(e=>se.push(...e)));function ce(e){for(var t=0;t=se[t]&&e<=se[t+1])return!0;return!1}var D=e=>e+` `+e,le=80,ue=function(e,t){return`M95,`+(622+e+t)+` -c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 -c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 -c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 -s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 -c69,-144,104.5,-217.7,106.5,-221 -l`+e/2.075+` -`+e+` -c5.3,-9.3,12,-14,20,-14 -H400000v`+(40+e)+`H845.2724 -s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 -c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z -M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},de=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,119 -c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 -c340,-704.7,510.7,-1060.3,512,-1067 -l`+e/2.084+` -`+e+` -c4.7,-7.3,11,-11,19,-11 -H40000v`+(40+e)+`H1012.3 -s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 -c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 -s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 -c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z -M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},fe=function(e,t){return`M983 `+(10+e+t)+` -l`+e/3.13+` -`+e+` -c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+` -H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 -s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 -c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 -c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 -c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 -c53.7,-170.3,84.5,-266.8,92.5,-289.5z -M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},pe=function(e,t){return`M424,`+(2398+e+t)+` -c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 -c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 -s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 -s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 -l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H400000 -v`+(40+e)+`H1014.6 -s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 -c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+` -h400000v`+(40+e)+`h-400000z`},me=function(e,t){return`M473,`+(2713+e+t)+` -c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+` -c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.7 -s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 -c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 -c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 -s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, -606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},he=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},ge=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+` -H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 -h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 -c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 -219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},_e=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=ue(t,le);break;case`sqrtSize1`:r=de(t,le);break;case`sqrtSize2`:r=fe(t,le);break;case`sqrtSize3`:r=pe(t,le);break;case`sqrtSize4`:r=me(t,le);break;case`sqrtTall`:r=ge(t,le,n)}return r},ve=function(e,t){switch(e){case`⎜`:return D(`M291 0 H417 V`+t+` H291z`);case`∣`:return D(`M145 0 H188 V`+t+` H145z`);case`∥`:return D(`M145 0 H188 V`+t+` H145z`)+D(`M367 0 H410 V`+t+` H367z`);case`⎟`:return D(`M457 0 H583 V`+t+` H457z`);case`⎢`:return D(`M319 0 H403 V`+t+` H319z`);case`⎥`:return D(`M263 0 H347 V`+t+` H263z`);case`⎪`:return D(`M384 0 H504 V`+t+` H384z`);case`⏐`:return D(`M312 0 H355 V`+t+` H312z`);case`‖`:return D(`M257 0 H300 V`+t+` H257z`)+D(`M478 0 H521 V`+t+` H478z`);default:return``}},ye={doubleleftarrow:`M262 157 -l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 - 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 - 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 -c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 - 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 --86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 --2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z -m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l --10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 - 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 --33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 --17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 --13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 -c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 --107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 - 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 --5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 -c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 - 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 - 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 - l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 --45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 - 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 - 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 - 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 --331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 -H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 - 435 0h399565z`,leftgroupunder:`M400000 262 -H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 - 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 --3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 --18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 --196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 - 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 --4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 --10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z -m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 - 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 - 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 --152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 - 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 --2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 -v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 --83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 --68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 - 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:D(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:D(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:D(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:D(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 --.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 -c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 - 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:D(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334 -c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 --53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 - 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 - 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 -c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 - 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 - 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 --5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 --320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z -m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 -60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 --451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z -m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 -c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 --480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z -m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 -85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 --707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z -m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 -c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 --16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 - 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 - 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 --40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 - 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l --6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 -s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 -c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 - 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 --174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 - 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 - 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 --3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 --10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 - 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 --18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 - 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z -m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 - 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 --7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 --27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 - 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 - 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 --64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z -m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 - 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 --13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 - 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:D(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:D(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:D(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 - 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 --52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 --167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 - 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 --70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 --40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 --37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 - 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 -c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 - 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 - 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 --19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 - 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 --2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 - 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 - 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 --68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 --8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 - 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 -c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 - 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 --11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 - 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 - 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 - -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 --11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 - 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 - 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 - -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 -3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 -10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 --1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 --7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 -H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 -c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 -c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 --11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, --5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, --11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 -c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 -c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 -s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 -121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 -s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 -c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z -M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 --27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 -13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 --84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 --119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 --12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 -151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 -c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 -c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 -c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z -M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 -c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, -1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, --152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z -M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 -c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, --231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 -c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z -M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},be=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84 -H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z -M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z -M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z -MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z -MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z -M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z -M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 -c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, --36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, -949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 -c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, --544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 -l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, --210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, -63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 -c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+` -c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 -c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 -c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 -c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 -l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, --470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}};function xe(e){return`toText`in e}var Se=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t{if(xe(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},Ce={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},we={ex:!0,em:!0,mu:!0},Te=function(e){return typeof e!=`string`&&(e=e.unit),e in Ce||e in we||e===`ex`},O=function(t,n){var r;if(t.unit in Ce)r=Ce[t.unit]/n.fontMetrics().ptPerEm/n.sizeMultiplier;else if(t.unit===`mu`)r=n.fontMetrics().cssEmPerMu;else{var i=n.style.isTight()?n.havingStyle(n.style.text()):n;if(t.unit===`ex`)r=i.fontMetrics().xHeight;else if(t.unit===`em`)r=i.fontMetrics().quad;else throw new e(`Invalid unit: '`+t.unit+`'`);i!==n&&(r*=i.sizeMultiplier/n.sizeMultiplier)}return Math.min(t.number*r,n.maxSize)},k=function(e){return+e.toFixed(4)+`em`},Ee=function(e){return e.filter(e=>e).join(` `)},De=function(e){var t=``;for(var r of Object.keys(e)){var i=e[r];i!==void 0&&(t+=n(r)+`:`+i+`;`)}return t},Oe=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},ke=function(e){var t=document.createElement(e);t.className=Ee(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r/=\x00-\x1f]/,je=function(t){var n=`<`+t;this.classes.length&&(n+=` class="`+a(Ee(this.classes))+`"`);var r=De(this.style);r&&(n+=` style="`+a(r)+`"`);for(var i of Object.keys(this.attributes)){if(Ae.test(i))throw new e(`Invalid attribute name '`+i+`'`);n+=` `+i+`="`+a(this.attributes[i])+`"`}n+=`>`;for(var o=0;o`,n},Me=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,Oe.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return ke.call(this,`span`)}toMarkup(){return je.call(this,`span`)}},Ne=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Oe.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return ke.call(this,`a`)}toMarkup(){return je.call(this,`a`)}},Pe=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=``+a(this.alt)+``,e}},Fe={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},Ie=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var c=oe(this.text.charCodeAt(0));c&&this.classes.push(c+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=Fe[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=k(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=Ee(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`0&&(n+=`margin-right:`+k(this.italic)+`;`),n+=De(this.style),n&&(e=!0,t+=` style="`+a(n)+`"`);var r=a(this.text);return e?(t+=`>`,t+=r,t+=``,t):r}},Le=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n`;for(var n=0;n`,e}},Re=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,ye[this.pathName]),e}toMarkup(){return this.alternate?``:``}},ze=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=``,e}};function Be(e){if(e instanceof Ie)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Ve(e){if(e instanceof Me)return e;throw Error(`Expected span but got `+String(e)+`.`)}var He=e=>e instanceof Me||e instanceof Ne||e instanceof Se,Ue={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},We={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Ge={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`};function Ke(e,t){Ue[e]=t}function qe(e,t,n){if(!Ue[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=Ue[t][r];if(!i&&e[0]in Ge&&(r=Ge[e[0]].charCodeAt(0),i=Ue[t][r]),!i&&n===`text`&&ce(r)&&(i=Ue[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}var Je={};function Ye(e){var t=e>=5?0:e>=3?1:2;if(!Je[t]){var n=Je[t]={cssEmPerMu:We.quad[t]/18};for(var r in We)We.hasOwnProperty(r)&&(n[r]=We[r][t])}return Je[t]}var A={math:{},text:{}};function j(e,t,n,r,i,a){A[e][i]={font:t,group:n,replace:r},a&&r&&(A[e][r]=A[e][i])}var M=`math`,N=`text`,P=`main`,F=`ams`,I=`accent-token`,L=`bin`,Xe=`close`,Ze=`inner`,R=`mathord`,z=`op-token`,Qe=`open`,$e=`punct`,B=`rel`,et=`spacing`,V=`textord`;j(M,P,B,`≡`,`\\equiv`,!0),j(M,P,B,`≺`,`\\prec`,!0),j(M,P,B,`≻`,`\\succ`,!0),j(M,P,B,`∼`,`\\sim`,!0),j(M,P,B,`⊥`,`\\perp`),j(M,P,B,`⪯`,`\\preceq`,!0),j(M,P,B,`⪰`,`\\succeq`,!0),j(M,P,B,`≃`,`\\simeq`,!0),j(M,P,B,`∣`,`\\mid`,!0),j(M,P,B,`≪`,`\\ll`,!0),j(M,P,B,`≫`,`\\gg`,!0),j(M,P,B,`≍`,`\\asymp`,!0),j(M,P,B,`∥`,`\\parallel`),j(M,P,B,`⋈`,`\\bowtie`,!0),j(M,P,B,`⌣`,`\\smile`,!0),j(M,P,B,`⊑`,`\\sqsubseteq`,!0),j(M,P,B,`⊒`,`\\sqsupseteq`,!0),j(M,P,B,`≐`,`\\doteq`,!0),j(M,P,B,`⌢`,`\\frown`,!0),j(M,P,B,`∋`,`\\ni`,!0),j(M,P,B,`∝`,`\\propto`,!0),j(M,P,B,`⊢`,`\\vdash`,!0),j(M,P,B,`⊣`,`\\dashv`,!0),j(M,P,B,`∋`,`\\owns`),j(M,P,$e,`.`,`\\ldotp`),j(M,P,$e,`⋅`,`\\cdotp`),j(M,P,$e,`⋅`,`·`),j(N,P,V,`⋅`,`·`),j(M,P,V,`#`,`\\#`),j(N,P,V,`#`,`\\#`),j(M,P,V,`&`,`\\&`),j(N,P,V,`&`,`\\&`),j(M,P,V,`ℵ`,`\\aleph`,!0),j(M,P,V,`∀`,`\\forall`,!0),j(M,P,V,`ℏ`,`\\hbar`,!0),j(M,P,V,`∃`,`\\exists`,!0),j(M,P,V,`∇`,`\\nabla`,!0),j(M,P,V,`♭`,`\\flat`,!0),j(M,P,V,`ℓ`,`\\ell`,!0),j(M,P,V,`♮`,`\\natural`,!0),j(M,P,V,`♣`,`\\clubsuit`,!0),j(M,P,V,`℘`,`\\wp`,!0),j(M,P,V,`♯`,`\\sharp`,!0),j(M,P,V,`♢`,`\\diamondsuit`,!0),j(M,P,V,`ℜ`,`\\Re`,!0),j(M,P,V,`♡`,`\\heartsuit`,!0),j(M,P,V,`ℑ`,`\\Im`,!0),j(M,P,V,`♠`,`\\spadesuit`,!0),j(M,P,V,`§`,`\\S`,!0),j(N,P,V,`§`,`\\S`),j(M,P,V,`¶`,`\\P`,!0),j(N,P,V,`¶`,`\\P`),j(M,P,V,`†`,`\\dag`),j(N,P,V,`†`,`\\dag`),j(N,P,V,`†`,`\\textdagger`),j(M,P,V,`‡`,`\\ddag`),j(N,P,V,`‡`,`\\ddag`),j(N,P,V,`‡`,`\\textdaggerdbl`),j(M,P,Xe,`⎱`,`\\rmoustache`,!0),j(M,P,Qe,`⎰`,`\\lmoustache`,!0),j(M,P,Xe,`⟯`,`\\rgroup`,!0),j(M,P,Qe,`⟮`,`\\lgroup`,!0),j(M,P,L,`∓`,`\\mp`,!0),j(M,P,L,`⊖`,`\\ominus`,!0),j(M,P,L,`⊎`,`\\uplus`,!0),j(M,P,L,`⊓`,`\\sqcap`,!0),j(M,P,L,`∗`,`\\ast`),j(M,P,L,`⊔`,`\\sqcup`,!0),j(M,P,L,`◯`,`\\bigcirc`,!0),j(M,P,L,`∙`,`\\bullet`,!0),j(M,P,L,`‡`,`\\ddagger`),j(M,P,L,`≀`,`\\wr`,!0),j(M,P,L,`⨿`,`\\amalg`),j(M,P,L,`&`,`\\And`),j(M,P,B,`⟵`,`\\longleftarrow`,!0),j(M,P,B,`⇐`,`\\Leftarrow`,!0),j(M,P,B,`⟸`,`\\Longleftarrow`,!0),j(M,P,B,`⟶`,`\\longrightarrow`,!0),j(M,P,B,`⇒`,`\\Rightarrow`,!0),j(M,P,B,`⟹`,`\\Longrightarrow`,!0),j(M,P,B,`↔`,`\\leftrightarrow`,!0),j(M,P,B,`⟷`,`\\longleftrightarrow`,!0),j(M,P,B,`⇔`,`\\Leftrightarrow`,!0),j(M,P,B,`⟺`,`\\Longleftrightarrow`,!0),j(M,P,B,`↦`,`\\mapsto`,!0),j(M,P,B,`⟼`,`\\longmapsto`,!0),j(M,P,B,`↗`,`\\nearrow`,!0),j(M,P,B,`↩`,`\\hookleftarrow`,!0),j(M,P,B,`↪`,`\\hookrightarrow`,!0),j(M,P,B,`↘`,`\\searrow`,!0),j(M,P,B,`↼`,`\\leftharpoonup`,!0),j(M,P,B,`⇀`,`\\rightharpoonup`,!0),j(M,P,B,`↙`,`\\swarrow`,!0),j(M,P,B,`↽`,`\\leftharpoondown`,!0),j(M,P,B,`⇁`,`\\rightharpoondown`,!0),j(M,P,B,`↖`,`\\nwarrow`,!0),j(M,P,B,`⇌`,`\\rightleftharpoons`,!0),j(M,F,B,`≮`,`\\nless`,!0),j(M,F,B,``,`\\@nleqslant`),j(M,F,B,``,`\\@nleqq`),j(M,F,B,`⪇`,`\\lneq`,!0),j(M,F,B,`≨`,`\\lneqq`,!0),j(M,F,B,``,`\\@lvertneqq`),j(M,F,B,`⋦`,`\\lnsim`,!0),j(M,F,B,`⪉`,`\\lnapprox`,!0),j(M,F,B,`⊀`,`\\nprec`,!0),j(M,F,B,`⋠`,`\\npreceq`,!0),j(M,F,B,`⋨`,`\\precnsim`,!0),j(M,F,B,`⪹`,`\\precnapprox`,!0),j(M,F,B,`≁`,`\\nsim`,!0),j(M,F,B,``,`\\@nshortmid`),j(M,F,B,`∤`,`\\nmid`,!0),j(M,F,B,`⊬`,`\\nvdash`,!0),j(M,F,B,`⊭`,`\\nvDash`,!0),j(M,F,B,`⋪`,`\\ntriangleleft`),j(M,F,B,`⋬`,`\\ntrianglelefteq`,!0),j(M,F,B,`⊊`,`\\subsetneq`,!0),j(M,F,B,``,`\\@varsubsetneq`),j(M,F,B,`⫋`,`\\subsetneqq`,!0),j(M,F,B,``,`\\@varsubsetneqq`),j(M,F,B,`≯`,`\\ngtr`,!0),j(M,F,B,``,`\\@ngeqslant`),j(M,F,B,``,`\\@ngeqq`),j(M,F,B,`⪈`,`\\gneq`,!0),j(M,F,B,`≩`,`\\gneqq`,!0),j(M,F,B,``,`\\@gvertneqq`),j(M,F,B,`⋧`,`\\gnsim`,!0),j(M,F,B,`⪊`,`\\gnapprox`,!0),j(M,F,B,`⊁`,`\\nsucc`,!0),j(M,F,B,`⋡`,`\\nsucceq`,!0),j(M,F,B,`⋩`,`\\succnsim`,!0),j(M,F,B,`⪺`,`\\succnapprox`,!0),j(M,F,B,`≆`,`\\ncong`,!0),j(M,F,B,``,`\\@nshortparallel`),j(M,F,B,`∦`,`\\nparallel`,!0),j(M,F,B,`⊯`,`\\nVDash`,!0),j(M,F,B,`⋫`,`\\ntriangleright`),j(M,F,B,`⋭`,`\\ntrianglerighteq`,!0),j(M,F,B,``,`\\@nsupseteqq`),j(M,F,B,`⊋`,`\\supsetneq`,!0),j(M,F,B,``,`\\@varsupsetneq`),j(M,F,B,`⫌`,`\\supsetneqq`,!0),j(M,F,B,``,`\\@varsupsetneqq`),j(M,F,B,`⊮`,`\\nVdash`,!0),j(M,F,B,`⪵`,`\\precneqq`,!0),j(M,F,B,`⪶`,`\\succneqq`,!0),j(M,F,B,``,`\\@nsubseteqq`),j(M,F,L,`⊴`,`\\unlhd`),j(M,F,L,`⊵`,`\\unrhd`),j(M,F,B,`↚`,`\\nleftarrow`,!0),j(M,F,B,`↛`,`\\nrightarrow`,!0),j(M,F,B,`⇍`,`\\nLeftarrow`,!0),j(M,F,B,`⇏`,`\\nRightarrow`,!0),j(M,F,B,`↮`,`\\nleftrightarrow`,!0),j(M,F,B,`⇎`,`\\nLeftrightarrow`,!0),j(M,F,B,`△`,`\\vartriangle`),j(M,F,V,`ℏ`,`\\hslash`),j(M,F,V,`▽`,`\\triangledown`),j(M,F,V,`◊`,`\\lozenge`),j(M,F,V,`Ⓢ`,`\\circledS`),j(M,F,V,`®`,`\\circledR`),j(N,F,V,`®`,`\\circledR`),j(M,F,V,`∡`,`\\measuredangle`,!0),j(M,F,V,`∄`,`\\nexists`),j(M,F,V,`℧`,`\\mho`),j(M,F,V,`Ⅎ`,`\\Finv`,!0),j(M,F,V,`⅁`,`\\Game`,!0),j(M,F,V,`‵`,`\\backprime`),j(M,F,V,`▲`,`\\blacktriangle`),j(M,F,V,`▼`,`\\blacktriangledown`),j(M,F,V,`■`,`\\blacksquare`),j(M,F,V,`⧫`,`\\blacklozenge`),j(M,F,V,`★`,`\\bigstar`),j(M,F,V,`∢`,`\\sphericalangle`,!0),j(M,F,V,`∁`,`\\complement`,!0),j(M,F,V,`ð`,`\\eth`,!0),j(N,P,V,`ð`,`ð`),j(M,F,V,`╱`,`\\diagup`),j(M,F,V,`╲`,`\\diagdown`),j(M,F,V,`□`,`\\square`),j(M,F,V,`□`,`\\Box`),j(M,F,V,`◊`,`\\Diamond`),j(M,F,V,`¥`,`\\yen`,!0),j(N,F,V,`¥`,`\\yen`,!0),j(M,F,V,`✓`,`\\checkmark`,!0),j(N,F,V,`✓`,`\\checkmark`),j(M,F,V,`ℶ`,`\\beth`,!0),j(M,F,V,`ℸ`,`\\daleth`,!0),j(M,F,V,`ℷ`,`\\gimel`,!0),j(M,F,V,`ϝ`,`\\digamma`,!0),j(M,F,V,`ϰ`,`\\varkappa`),j(M,F,Qe,`┌`,`\\@ulcorner`,!0),j(M,F,Xe,`┐`,`\\@urcorner`,!0),j(M,F,Qe,`└`,`\\@llcorner`,!0),j(M,F,Xe,`┘`,`\\@lrcorner`,!0),j(M,F,B,`≦`,`\\leqq`,!0),j(M,F,B,`⩽`,`\\leqslant`,!0),j(M,F,B,`⪕`,`\\eqslantless`,!0),j(M,F,B,`≲`,`\\lesssim`,!0),j(M,F,B,`⪅`,`\\lessapprox`,!0),j(M,F,B,`≊`,`\\approxeq`,!0),j(M,F,L,`⋖`,`\\lessdot`),j(M,F,B,`⋘`,`\\lll`,!0),j(M,F,B,`≶`,`\\lessgtr`,!0),j(M,F,B,`⋚`,`\\lesseqgtr`,!0),j(M,F,B,`⪋`,`\\lesseqqgtr`,!0),j(M,F,B,`≑`,`\\doteqdot`),j(M,F,B,`≓`,`\\risingdotseq`,!0),j(M,F,B,`≒`,`\\fallingdotseq`,!0),j(M,F,B,`∽`,`\\backsim`,!0),j(M,F,B,`⋍`,`\\backsimeq`,!0),j(M,F,B,`⫅`,`\\subseteqq`,!0),j(M,F,B,`⋐`,`\\Subset`,!0),j(M,F,B,`⊏`,`\\sqsubset`,!0),j(M,F,B,`≼`,`\\preccurlyeq`,!0),j(M,F,B,`⋞`,`\\curlyeqprec`,!0),j(M,F,B,`≾`,`\\precsim`,!0),j(M,F,B,`⪷`,`\\precapprox`,!0),j(M,F,B,`⊲`,`\\vartriangleleft`),j(M,F,B,`⊴`,`\\trianglelefteq`),j(M,F,B,`⊨`,`\\vDash`,!0),j(M,F,B,`⊪`,`\\Vvdash`,!0),j(M,F,B,`⌣`,`\\smallsmile`),j(M,F,B,`⌢`,`\\smallfrown`),j(M,F,B,`≏`,`\\bumpeq`,!0),j(M,F,B,`≎`,`\\Bumpeq`,!0),j(M,F,B,`≧`,`\\geqq`,!0),j(M,F,B,`⩾`,`\\geqslant`,!0),j(M,F,B,`⪖`,`\\eqslantgtr`,!0),j(M,F,B,`≳`,`\\gtrsim`,!0),j(M,F,B,`⪆`,`\\gtrapprox`,!0),j(M,F,L,`⋗`,`\\gtrdot`),j(M,F,B,`⋙`,`\\ggg`,!0),j(M,F,B,`≷`,`\\gtrless`,!0),j(M,F,B,`⋛`,`\\gtreqless`,!0),j(M,F,B,`⪌`,`\\gtreqqless`,!0),j(M,F,B,`≖`,`\\eqcirc`,!0),j(M,F,B,`≗`,`\\circeq`,!0),j(M,F,B,`≜`,`\\triangleq`,!0),j(M,F,B,`∼`,`\\thicksim`),j(M,F,B,`≈`,`\\thickapprox`),j(M,F,B,`⫆`,`\\supseteqq`,!0),j(M,F,B,`⋑`,`\\Supset`,!0),j(M,F,B,`⊐`,`\\sqsupset`,!0),j(M,F,B,`≽`,`\\succcurlyeq`,!0),j(M,F,B,`⋟`,`\\curlyeqsucc`,!0),j(M,F,B,`≿`,`\\succsim`,!0),j(M,F,B,`⪸`,`\\succapprox`,!0),j(M,F,B,`⊳`,`\\vartriangleright`),j(M,F,B,`⊵`,`\\trianglerighteq`),j(M,F,B,`⊩`,`\\Vdash`,!0),j(M,F,B,`∣`,`\\shortmid`),j(M,F,B,`∥`,`\\shortparallel`),j(M,F,B,`≬`,`\\between`,!0),j(M,F,B,`⋔`,`\\pitchfork`,!0),j(M,F,B,`∝`,`\\varpropto`),j(M,F,B,`◀`,`\\blacktriangleleft`),j(M,F,B,`∴`,`\\therefore`,!0),j(M,F,B,`∍`,`\\backepsilon`),j(M,F,B,`▶`,`\\blacktriangleright`),j(M,F,B,`∵`,`\\because`,!0),j(M,F,B,`⋘`,`\\llless`),j(M,F,B,`⋙`,`\\gggtr`),j(M,F,L,`⊲`,`\\lhd`),j(M,F,L,`⊳`,`\\rhd`),j(M,F,B,`≂`,`\\eqsim`,!0),j(M,P,B,`⋈`,`\\Join`),j(M,F,B,`≑`,`\\Doteq`,!0),j(M,F,L,`∔`,`\\dotplus`,!0),j(M,F,L,`∖`,`\\smallsetminus`),j(M,F,L,`⋒`,`\\Cap`,!0),j(M,F,L,`⋓`,`\\Cup`,!0),j(M,F,L,`⩞`,`\\doublebarwedge`,!0),j(M,F,L,`⊟`,`\\boxminus`,!0),j(M,F,L,`⊞`,`\\boxplus`,!0),j(M,F,L,`⋇`,`\\divideontimes`,!0),j(M,F,L,`⋉`,`\\ltimes`,!0),j(M,F,L,`⋊`,`\\rtimes`,!0),j(M,F,L,`⋋`,`\\leftthreetimes`,!0),j(M,F,L,`⋌`,`\\rightthreetimes`,!0),j(M,F,L,`⋏`,`\\curlywedge`,!0),j(M,F,L,`⋎`,`\\curlyvee`,!0),j(M,F,L,`⊝`,`\\circleddash`,!0),j(M,F,L,`⊛`,`\\circledast`,!0),j(M,F,L,`⋅`,`\\centerdot`),j(M,F,L,`⊺`,`\\intercal`,!0),j(M,F,L,`⋒`,`\\doublecap`),j(M,F,L,`⋓`,`\\doublecup`),j(M,F,L,`⊠`,`\\boxtimes`,!0),j(M,F,B,`⇢`,`\\dashrightarrow`,!0),j(M,F,B,`⇠`,`\\dashleftarrow`,!0),j(M,F,B,`⇇`,`\\leftleftarrows`,!0),j(M,F,B,`⇆`,`\\leftrightarrows`,!0),j(M,F,B,`⇚`,`\\Lleftarrow`,!0),j(M,F,B,`↞`,`\\twoheadleftarrow`,!0),j(M,F,B,`↢`,`\\leftarrowtail`,!0),j(M,F,B,`↫`,`\\looparrowleft`,!0),j(M,F,B,`⇋`,`\\leftrightharpoons`,!0),j(M,F,B,`↶`,`\\curvearrowleft`,!0),j(M,F,B,`↺`,`\\circlearrowleft`,!0),j(M,F,B,`↰`,`\\Lsh`,!0),j(M,F,B,`⇈`,`\\upuparrows`,!0),j(M,F,B,`↿`,`\\upharpoonleft`,!0),j(M,F,B,`⇃`,`\\downharpoonleft`,!0),j(M,P,B,`⊶`,`\\origof`,!0),j(M,P,B,`⊷`,`\\imageof`,!0),j(M,F,B,`⊸`,`\\multimap`,!0),j(M,F,B,`↭`,`\\leftrightsquigarrow`,!0),j(M,F,B,`⇉`,`\\rightrightarrows`,!0),j(M,F,B,`⇄`,`\\rightleftarrows`,!0),j(M,F,B,`↠`,`\\twoheadrightarrow`,!0),j(M,F,B,`↣`,`\\rightarrowtail`,!0),j(M,F,B,`↬`,`\\looparrowright`,!0),j(M,F,B,`↷`,`\\curvearrowright`,!0),j(M,F,B,`↻`,`\\circlearrowright`,!0),j(M,F,B,`↱`,`\\Rsh`,!0),j(M,F,B,`⇊`,`\\downdownarrows`,!0),j(M,F,B,`↾`,`\\upharpoonright`,!0),j(M,F,B,`⇂`,`\\downharpoonright`,!0),j(M,F,B,`⇝`,`\\rightsquigarrow`,!0),j(M,F,B,`⇝`,`\\leadsto`),j(M,F,B,`⇛`,`\\Rrightarrow`,!0),j(M,F,B,`↾`,`\\restriction`),j(M,P,V,`‘`,"`"),j(M,P,V,`$`,`\\$`),j(N,P,V,`$`,`\\$`),j(N,P,V,`$`,`\\textdollar`),j(M,P,V,`%`,`\\%`),j(N,P,V,`%`,`\\%`),j(M,P,V,`_`,`\\_`),j(N,P,V,`_`,`\\_`),j(N,P,V,`_`,`\\textunderscore`),j(M,P,V,`∠`,`\\angle`,!0),j(M,P,V,`∞`,`\\infty`,!0),j(M,P,V,`′`,`\\prime`),j(M,P,V,`△`,`\\triangle`),j(M,P,V,`Γ`,`\\Gamma`,!0),j(M,P,V,`Δ`,`\\Delta`,!0),j(M,P,V,`Θ`,`\\Theta`,!0),j(M,P,V,`Λ`,`\\Lambda`,!0),j(M,P,V,`Ξ`,`\\Xi`,!0),j(M,P,V,`Π`,`\\Pi`,!0),j(M,P,V,`Σ`,`\\Sigma`,!0),j(M,P,V,`Υ`,`\\Upsilon`,!0),j(M,P,V,`Φ`,`\\Phi`,!0),j(M,P,V,`Ψ`,`\\Psi`,!0),j(M,P,V,`Ω`,`\\Omega`,!0),j(M,P,V,`A`,`Α`),j(M,P,V,`B`,`Β`),j(M,P,V,`E`,`Ε`),j(M,P,V,`Z`,`Ζ`),j(M,P,V,`H`,`Η`),j(M,P,V,`I`,`Ι`),j(M,P,V,`K`,`Κ`),j(M,P,V,`M`,`Μ`),j(M,P,V,`N`,`Ν`),j(M,P,V,`O`,`Ο`),j(M,P,V,`P`,`Ρ`),j(M,P,V,`T`,`Τ`),j(M,P,V,`X`,`Χ`),j(M,P,V,`¬`,`\\neg`,!0),j(M,P,V,`¬`,`\\lnot`),j(M,P,V,`⊤`,`\\top`),j(M,P,V,`⊥`,`\\bot`),j(M,P,V,`∅`,`\\emptyset`),j(M,F,V,`∅`,`\\varnothing`),j(M,P,R,`α`,`\\alpha`,!0),j(M,P,R,`β`,`\\beta`,!0),j(M,P,R,`γ`,`\\gamma`,!0),j(M,P,R,`δ`,`\\delta`,!0),j(M,P,R,`ϵ`,`\\epsilon`,!0),j(M,P,R,`ζ`,`\\zeta`,!0),j(M,P,R,`η`,`\\eta`,!0),j(M,P,R,`θ`,`\\theta`,!0),j(M,P,R,`ι`,`\\iota`,!0),j(M,P,R,`κ`,`\\kappa`,!0),j(M,P,R,`λ`,`\\lambda`,!0),j(M,P,R,`μ`,`\\mu`,!0),j(M,P,R,`ν`,`\\nu`,!0),j(M,P,R,`ξ`,`\\xi`,!0),j(M,P,R,`ο`,`\\omicron`,!0),j(M,P,R,`π`,`\\pi`,!0),j(M,P,R,`ρ`,`\\rho`,!0),j(M,P,R,`σ`,`\\sigma`,!0),j(M,P,R,`τ`,`\\tau`,!0),j(M,P,R,`υ`,`\\upsilon`,!0),j(M,P,R,`ϕ`,`\\phi`,!0),j(M,P,R,`χ`,`\\chi`,!0),j(M,P,R,`ψ`,`\\psi`,!0),j(M,P,R,`ω`,`\\omega`,!0),j(M,P,R,`ε`,`\\varepsilon`,!0),j(M,P,R,`ϑ`,`\\vartheta`,!0),j(M,P,R,`ϖ`,`\\varpi`,!0),j(M,P,R,`ϱ`,`\\varrho`,!0),j(M,P,R,`ς`,`\\varsigma`,!0),j(M,P,R,`φ`,`\\varphi`,!0),j(M,P,L,`∗`,`*`,!0),j(M,P,L,`+`,`+`),j(M,P,L,`−`,`-`,!0),j(M,P,L,`⋅`,`\\cdot`,!0),j(M,P,L,`∘`,`\\circ`,!0),j(M,P,L,`÷`,`\\div`,!0),j(M,P,L,`±`,`\\pm`,!0),j(M,P,L,`×`,`\\times`,!0),j(M,P,L,`∩`,`\\cap`,!0),j(M,P,L,`∪`,`\\cup`,!0),j(M,P,L,`∖`,`\\setminus`,!0),j(M,P,L,`∧`,`\\land`),j(M,P,L,`∨`,`\\lor`),j(M,P,L,`∧`,`\\wedge`,!0),j(M,P,L,`∨`,`\\vee`,!0),j(M,P,V,`√`,`\\surd`),j(M,P,Qe,`⟨`,`\\langle`,!0),j(M,P,Qe,`∣`,`\\lvert`),j(M,P,Qe,`∥`,`\\lVert`),j(M,P,Xe,`?`,`?`),j(M,P,Xe,`!`,`!`),j(M,P,Xe,`⟩`,`\\rangle`,!0),j(M,P,Xe,`∣`,`\\rvert`),j(M,P,Xe,`∥`,`\\rVert`),j(M,P,B,`=`,`=`),j(M,P,B,`:`,`:`),j(M,P,B,`≈`,`\\approx`,!0),j(M,P,B,`≅`,`\\cong`,!0),j(M,P,B,`≥`,`\\ge`),j(M,P,B,`≥`,`\\geq`,!0),j(M,P,B,`←`,`\\gets`),j(M,P,B,`>`,`\\gt`,!0),j(M,P,B,`∈`,`\\in`,!0),j(M,P,B,``,`\\@not`),j(M,P,B,`⊂`,`\\subset`,!0),j(M,P,B,`⊃`,`\\supset`,!0),j(M,P,B,`⊆`,`\\subseteq`,!0),j(M,P,B,`⊇`,`\\supseteq`,!0),j(M,F,B,`⊈`,`\\nsubseteq`,!0),j(M,F,B,`⊉`,`\\nsupseteq`,!0),j(M,P,B,`⊨`,`\\models`),j(M,P,B,`←`,`\\leftarrow`,!0),j(M,P,B,`≤`,`\\le`),j(M,P,B,`≤`,`\\leq`,!0),j(M,P,B,`<`,`\\lt`,!0),j(M,P,B,`→`,`\\rightarrow`,!0),j(M,P,B,`→`,`\\to`),j(M,F,B,`≱`,`\\ngeq`,!0),j(M,F,B,`≰`,`\\nleq`,!0),j(M,P,et,`\xA0`,`\\ `),j(M,P,et,`\xA0`,`\\space`),j(M,P,et,`\xA0`,`\\nobreakspace`),j(N,P,et,`\xA0`,`\\ `),j(N,P,et,`\xA0`,` `),j(N,P,et,`\xA0`,`\\space`),j(N,P,et,`\xA0`,`\\nobreakspace`),j(M,P,et,``,`\\nobreak`),j(M,P,et,``,`\\allowbreak`),j(M,P,$e,`,`,`,`),j(M,P,$e,`;`,`;`),j(M,F,L,`⊼`,`\\barwedge`,!0),j(M,F,L,`⊻`,`\\veebar`,!0),j(M,P,L,`⊙`,`\\odot`,!0),j(M,P,L,`⊕`,`\\oplus`,!0),j(M,P,L,`⊗`,`\\otimes`,!0),j(M,P,V,`∂`,`\\partial`,!0),j(M,P,L,`⊘`,`\\oslash`,!0),j(M,F,L,`⊚`,`\\circledcirc`,!0),j(M,F,L,`⊡`,`\\boxdot`,!0),j(M,P,L,`△`,`\\bigtriangleup`),j(M,P,L,`▽`,`\\bigtriangledown`),j(M,P,L,`†`,`\\dagger`),j(M,P,L,`⋄`,`\\diamond`),j(M,P,L,`⋆`,`\\star`),j(M,P,L,`◃`,`\\triangleleft`),j(M,P,L,`▹`,`\\triangleright`),j(M,P,Qe,`{`,`\\{`),j(N,P,V,`{`,`\\{`),j(N,P,V,`{`,`\\textbraceleft`),j(M,P,Xe,`}`,`\\}`),j(N,P,V,`}`,`\\}`),j(N,P,V,`}`,`\\textbraceright`),j(M,P,Qe,`{`,`\\lbrace`),j(M,P,Xe,`}`,`\\rbrace`),j(M,P,Qe,`[`,`\\lbrack`,!0),j(N,P,V,`[`,`\\lbrack`,!0),j(M,P,Xe,`]`,`\\rbrack`,!0),j(N,P,V,`]`,`\\rbrack`,!0),j(M,P,Qe,`(`,`\\lparen`,!0),j(M,P,Xe,`)`,`\\rparen`,!0),j(N,P,V,`<`,`\\textless`,!0),j(N,P,V,`>`,`\\textgreater`,!0),j(M,P,Qe,`⌊`,`\\lfloor`,!0),j(M,P,Xe,`⌋`,`\\rfloor`,!0),j(M,P,Qe,`⌈`,`\\lceil`,!0),j(M,P,Xe,`⌉`,`\\rceil`,!0),j(M,P,V,`\\`,`\\backslash`),j(M,P,V,`∣`,`|`),j(M,P,V,`∣`,`\\vert`),j(N,P,V,`|`,`\\textbar`,!0),j(M,P,V,`∥`,`\\|`),j(M,P,V,`∥`,`\\Vert`),j(N,P,V,`∥`,`\\textbardbl`),j(N,P,V,`~`,`\\textasciitilde`),j(N,P,V,`\\`,`\\textbackslash`),j(N,P,V,`^`,`\\textasciicircum`),j(M,P,B,`↑`,`\\uparrow`,!0),j(M,P,B,`⇑`,`\\Uparrow`,!0),j(M,P,B,`↓`,`\\downarrow`,!0),j(M,P,B,`⇓`,`\\Downarrow`,!0),j(M,P,B,`↕`,`\\updownarrow`,!0),j(M,P,B,`⇕`,`\\Updownarrow`,!0),j(M,P,z,`∐`,`\\coprod`),j(M,P,z,`⋁`,`\\bigvee`),j(M,P,z,`⋀`,`\\bigwedge`),j(M,P,z,`⨄`,`\\biguplus`),j(M,P,z,`⋂`,`\\bigcap`),j(M,P,z,`⋃`,`\\bigcup`),j(M,P,z,`∫`,`\\int`),j(M,P,z,`∫`,`\\intop`),j(M,P,z,`∬`,`\\iint`),j(M,P,z,`∭`,`\\iiint`),j(M,P,z,`∏`,`\\prod`),j(M,P,z,`∑`,`\\sum`),j(M,P,z,`⨂`,`\\bigotimes`),j(M,P,z,`⨁`,`\\bigoplus`),j(M,P,z,`⨀`,`\\bigodot`),j(M,P,z,`∮`,`\\oint`),j(M,P,z,`∯`,`\\oiint`),j(M,P,z,`∰`,`\\oiiint`),j(M,P,z,`⨆`,`\\bigsqcup`),j(M,P,z,`∫`,`\\smallint`),j(N,P,Ze,`…`,`\\textellipsis`),j(M,P,Ze,`…`,`\\mathellipsis`),j(N,P,Ze,`…`,`\\ldots`,!0),j(M,P,Ze,`…`,`\\ldots`,!0),j(M,P,Ze,`⋯`,`\\@cdots`,!0),j(M,P,Ze,`⋱`,`\\ddots`,!0),j(M,P,V,`⋮`,`\\varvdots`),j(N,P,V,`⋮`,`\\varvdots`),j(M,P,I,`ˊ`,`\\acute`),j(M,P,I,`ˋ`,`\\grave`),j(M,P,I,`¨`,`\\ddot`),j(M,P,I,`~`,`\\tilde`),j(M,P,I,`ˉ`,`\\bar`),j(M,P,I,`˘`,`\\breve`),j(M,P,I,`ˇ`,`\\check`),j(M,P,I,`^`,`\\hat`),j(M,P,I,`⃗`,`\\vec`),j(M,P,I,`˙`,`\\dot`),j(M,P,I,`˚`,`\\mathring`),j(M,P,R,``,`\\@imath`),j(M,P,R,``,`\\@jmath`),j(M,P,V,`ı`,`ı`),j(M,P,V,`ȷ`,`ȷ`),j(N,P,V,`ı`,`\\i`,!0),j(N,P,V,`ȷ`,`\\j`,!0),j(N,P,V,`ß`,`\\ss`,!0),j(N,P,V,`æ`,`\\ae`,!0),j(N,P,V,`œ`,`\\oe`,!0),j(N,P,V,`ø`,`\\o`,!0),j(N,P,V,`Æ`,`\\AE`,!0),j(N,P,V,`Œ`,`\\OE`,!0),j(N,P,V,`Ø`,`\\O`,!0),j(N,P,I,`ˊ`,`\\'`),j(N,P,I,`ˋ`,"\\`"),j(N,P,I,`ˆ`,`\\^`),j(N,P,I,`˜`,`\\~`),j(N,P,I,`ˉ`,`\\=`),j(N,P,I,`˘`,`\\u`),j(N,P,I,`˙`,`\\.`),j(N,P,I,`¸`,`\\c`),j(N,P,I,`˚`,`\\r`),j(N,P,I,`ˇ`,`\\v`),j(N,P,I,`¨`,`\\"`),j(N,P,I,`˝`,`\\H`),j(N,P,I,`◯`,`\\textcircled`);var tt={"--":!0,"---":!0,"``":!0,"''":!0};j(N,P,V,`–`,`--`,!0),j(N,P,V,`–`,`\\textendash`),j(N,P,V,`—`,`---`,!0),j(N,P,V,`—`,`\\textemdash`),j(N,P,V,`‘`,"`",!0),j(N,P,V,`‘`,`\\textquoteleft`),j(N,P,V,`’`,`'`,!0),j(N,P,V,`’`,`\\textquoteright`),j(N,P,V,`“`,"``",!0),j(N,P,V,`“`,`\\textquotedblleft`),j(N,P,V,`”`,`''`,!0),j(N,P,V,`”`,`\\textquotedblright`),j(M,P,V,`°`,`\\degree`,!0),j(N,P,V,`°`,`\\degree`),j(N,P,V,`°`,`\\textdegree`,!0),j(M,P,V,`£`,`\\pounds`),j(M,P,V,`£`,`\\mathsterling`,!0),j(N,P,V,`£`,`\\pounds`),j(N,P,V,`£`,`\\textsterling`,!0),j(M,F,V,`✠`,`\\maltese`),j(N,F,V,`✠`,`\\maltese`);for(var nt=`0123456789/@."`,rt=0;rt{var n=t.charCodeAt(0),r=t.charCodeAt(1),i=(n-55296)*1024+(r-56320)+65536;if(119808<=i&&i<120484)return kt[Math.floor((i-119808)/26)];if(120782<=i&&i<=120831)return At[Math.floor((i-120782)/10)];if(i===120485||i===120486)return kt[0];if(120486{if(Ee(e.classes)!==Ee(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},Rt=e=>{for(var t=0;tt&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},W=function(e,t,n,r){var i=new Me(e,t,n,r);return zt(i),i},Bt=(e,t,n,r)=>new Me(e,t,n,r),Vt=function(e,t,n){var r=W([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=k(r.height),r.maxFontSize=1,r},Ht=function(e,t,n,r){var i=new Ne(e,t,n,r);return zt(i),i},Ut=function(e){var t=new Se(e);return zt(t),t},Wt=function(e,t){return e instanceof Se?W([],[e],t):e},Gt=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a{var n=W([`mspace`],[],t),r=O(e,t);return n.style.marginRight=k(r),n},qt=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},Jt={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},Yt={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},Xt=function(e,t){var[n,r,i]=Yt[e],a=Bt([`overlay`],[new Le([new Re(n)],{width:k(r),height:k(i),style:`width:`+k(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return a.height=i,a.style.height=k(i),a.style.width=k(r),a},K={number:3,unit:`mu`},Zt={number:4,unit:`mu`},Qt={number:5,unit:`mu`},$t={mord:{mop:K,mbin:Zt,mrel:Qt,minner:K},mop:{mord:K,mop:K,mrel:Qt,minner:K},mbin:{mord:Zt,mop:Zt,mopen:Zt,minner:Zt},mrel:{mord:Qt,mop:Qt,mopen:Qt,minner:Qt},mopen:{},mclose:{mop:K,mbin:Zt,mrel:Qt,minner:K},mpunct:{mord:K,mop:K,mrel:Qt,mopen:K,mclose:K,mpunct:K,minner:K},minner:{mord:K,mop:K,mbin:Zt,mrel:Qt,mopen:K,mpunct:K,minner:K}},en={mord:{mop:K},mop:{mord:K,mop:K},mbin:{},mrel:{},mopen:{},mclose:{mop:K},mpunct:{},minner:{mop:K}},tn={},nn={},rn={};function q(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},c=0;c{var n=t.classes[0],r=e.classes[0];n===`mbin`&&cn.has(r)?t.classes[0]=`mord`:r===`mbin`&&sn.has(n)&&(e.classes[0]=`mord`)},{node:u},d,f),fn(i,(e,t)=>{var n=hn(t),r=hn(e),i=n&&r?e.hasClass(`mtight`)?en[n]?.[r]:$t[n]?.[r]:null;if(i)return Kt(i,c)},{node:u},d,f),i},fn=function(e,t,n,r,i){r&&e.push(r);for(var a=0;an=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},pn=function(e){return e instanceof Se||e instanceof Ne||e instanceof Me&&e.hasClass(`enclosing`)?e:null},mn=function(e,t){var n=pn(e);if(n){var r=n.children;if(r.length){if(t===`right`)return mn(r[r.length-1],`right`);if(t===`left`)return mn(r[0],`left`)}}return e},hn=function(e,t){return e?(t&&(e=mn(e,t)),un[e.classes[0]]||null):null},gn=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return W(t.concat(n))},Y=function(t,n,r){if(!t)return W();if(nn[t.type]){var i=nn[t.type](t,n);if(r&&n.size!==r.size){i=W(n.sizingClasses(r),[i],n);var a=n.sizeMultiplier/r.sizeMultiplier;i.height*=a,i.depth*=a}return i}else throw new e(`Got group of unknown type: '`+t.type+`'`)};function _n(e,t){var n=W([`base`],e,t),r=W([`strut`]);return r.style.height=k(n.height+n.depth),n.depth&&(r.style.verticalAlign=k(-n.depth)),n.children.unshift(r),n}function vn(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=dn(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s0&&(a.push(_n(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(_n(o,t));var l;n?(l=_n(dn(n,t,!0),t),l.classes=[`tag`],a.push(l)):i&&a.push(i);var u=W([`katex-html`],a);if(u.setAttribute(`aria-hidden`,`true`),l){var d=l.children[0];d.style.height=k(u.height+u.depth),u.depth&&(d.style.verticalAlign=k(-u.depth))}return u}function yn(e){return new Se(e)}var X=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Ee(this.classes));for(var n=0;n0&&(e+=` class ="`+a(Ee(this.classes))+`"`),e+=`>`;for(var n=0;n`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},bn=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return a(this.toText())}toText(){return this.text}},xn=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,e>=.05555&&e<=.05556?this.character=` `:e>=.1666&&e<=.1667?this.character=` `:e>=.2222&&e<=.2223?this.character=` `:e>=.2777&&e<=.2778?this.character=`  `:e>=-.05556&&e<=-.05555?this.character=` ⁣`:e>=-.1667&&e<=-.1666?this.character=` ⁣`:e>=-.2223&&e<=-.2222?this.character=` ⁣`:e>=-.2778&&e<=-.2777?this.character=` ⁣`:this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,k(this.width)),e}toMarkup(){return this.character?``+this.character+``:``}toText(){return this.character?this.character:` `}},Sn=new Set([`\\imath`,`\\jmath`]),Cn=new Set([`mrow`,`mtable`]),wn=function(e,t,n){return A[t][e]&&A[t][e].replace&&e.charCodeAt(0)!==55349&&!(tt.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=A[t][e].replace),new bn(e)},Tn=function(e){return e.length===1?e[0]:new X(`mrow`,e)},En={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},Dn=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=En[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(Sn.has(a))return null;if(A[r][a]){var o=A[r][a].replace;o&&(a=o)}var s=Jt[n].fontName;return qe(a,s,r)?Jt[n].variant:null};function On(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof bn&&t.text===`.`}else if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof bn&&n.text===`,`}else return!1}var kn=function(e,t,n){if(e.length===1){var r=Z(e[0],t);return n&&r instanceof X&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o=1&&(a.type===`mn`||On(a))){var c=s.children[0];c instanceof X&&c.type===`mn`&&(c.children=[...a.children,...c.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var l=a.children[0];if(l instanceof bn&&l.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var u=s.children[0];u instanceof bn&&u.text.length>0&&(u.text=u.text.slice(0,1)+`̸`+u.text.slice(1),i.pop())}}}i.push(s),a=s}return i},An=function(e,t,n){return Tn(kn(e,t,n))},Z=function(t,n){if(!t)return new X(`mrow`);if(rn[t.type])return rn[t.type](t,n);throw new e(`Got group of unknown type: '`+t.type+`'`)};function jn(e,t,n,r,i){var a=kn(e,n),o=a.length===1&&a[0]instanceof X&&Cn.has(a[0].type)?a[0]:new X(`mrow`,a),s=new X(`annotation`,[new bn(t)]);s.setAttribute(`encoding`,`application/x-tex`);var c=new X(`math`,[new X(`semantics`,[o,s])]);return c.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&c.setAttribute(`display`,`block`),W([i?`katex`:`katex-mathml`],[c])}var Mn=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Nn=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Pn=function(e,t){return t.size<2?e:Mn[e-1][t.size-1]},Fn=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=Nn[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Pn(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Nn[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=Pn(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=Ye(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}};Fn.BASESIZE=6;var In=function(e){return new Fn({style:e.displayMode?E.DISPLAY:E.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Ln=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=W(n,[e])}return e},Rn=function(e,t,n){var r=In(n),i;return n.output===`mathml`?jn(e,t,r,n.displayMode,!0):(i=n.output===`html`?W([`katex`],[vn(e,r)]):W([`katex`],[jn(e,t,r,n.displayMode,!1),vn(e,r)]),Ln(i,n))},zn=function(e,t,n){return Ln(W([`katex`],[vn(e,In(n))]),n)},Bn={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},Vn=function(e){var t=new X(`mo`,[new bn(Bn[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},Hn={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},Un=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),Wn=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(Un.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var c=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][c],a=[0,239,300,360,420][c],s=[0,.24,.3,.3,.36,.42][c],o=r+c):(n=[0,600,1033,2339,2340][c],a=[0,260,286,306,312][c],s=[0,.26,.286,.3,.306,.34][c],o=`tilde`+c)}return{span:Bt([],[new Le([new Re(o)],{width:`100%`,height:k(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}else{var l=[],u=Hn[r];if(!u)throw Error(`No SVG data for "`+r+`".`);var[d,f,p]=u,m=p/1e3,h=d.length,g,_;if(h===1){if(u.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);g=[`hide-tail`],_=[u[3]]}else if(h===2)g=[`halfarrow-left`,`halfarrow-right`],_=[`xMinYMin`,`xMaxYMin`];else if(h===3)g=[`brace-left`,`brace-center`,`brace-right`],_=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support - `+h+` children.`);for(var v=0;v0&&(r.style.minWidth=k(i)),r},Gn=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=W([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var c=[];/^[bx]cancel$/.test(t)&&c.push(new ze({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&c.push(new ze({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=Bt([],[new Le(c,{width:`100%`,height:k(o)})],i)}return a.height=o,a.style.height=k(o),a},Kn={bin:1,close:1,inner:1,open:1,punct:1,rel:1},qn={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function Jn(e){return e in Kn}function Q(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function Yn(e){var t=Xn(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function Xn(e){return e&&(e.type===`atom`||qn.hasOwnProperty(e.type))?e:null}var Zn=e=>{if(e instanceof Ie)return e;if(He(e)&&e.children.length===1)return Zn(e.children[0])},Qn=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=Q(e.base,`accent`),n=r.base,e.base=n,i=Ve(Y(e,t)),e.base=r):(r=Q(e,`accent`),n=r.base);var a=Y(n,t.havingCrampedStyle()),o=r.isShifty&&c(n),s=0;o&&(s=Zn(a)?.skew??0);var l=r.label===`\\c`,u=l?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),d;if(r.isStretchy)d=Wn(r,t),d=G({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:d,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+k(2*s)+`)`,marginLeft:k(2*s)}:void 0}]});else{var f,p;r.label===`\\vec`?(f=Xt(`vec`,t),p=Yt.vec[1]):(f=It({type:`textord`,mode:r.mode,text:r.label},t,`textord`),f=Be(f),f.italic=0,p=f.width,l&&(u+=f.depth)),d=W([`accent-body`],[f]);var m=r.label===`\\textcircled`;m&&(d.classes.push(`accent-full`),u=a.height);var h=s;m||(h-=p/2),d.style.left=k(h),r.label===`\\textcircled`&&(d.style.top=`.2em`),d=G({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-u},{type:`elem`,elem:d}]})}var g=W([`mord`,`accent`],[d],t);return i?(i.children[0]=g,i.height=Math.max(g.height,i.height),i.classes[0]=`mord`,i):g},$n=(e,t)=>{var n=e.isStretchy?Vn(e.label):new X(`mo`,[wn(e.label,e.mode)]),r=new X(`mover`,[Z(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},er=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`));q({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],props:{numArgs:1},handler:(e,t)=>{var n=on(t[0]),r=!er.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:Qn,mathmlBuilder:$n}),q({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Qn,mathmlBuilder:$n}),q({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=Y(e.base,t),r=Wn(e,t),i=e.label===`\\utilde`?.12:0;return W([`mord`,`accentunder`],[G({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=Vn(e.label),r=new X(`munder`,[Z(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}});var tr=e=>{var t=new X(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t};q({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=Wt(Y(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=Wt(Y(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=Wn(e,t),c=-t.fontMetrics().axisHeight+.5*s.height,l=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(l-=i.depth);var u;if(o){var d=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;u=G({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:d}]})}else u=G({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:l},{type:`elem`,elem:s,shift:c,wrapperClasses:[`svg-align`]}]});return W([`mrel`,`x-arrow`],[u],t)},mathmlBuilder(e,t){var n=Vn(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=tr(Z(e.body,t));r=e.below?new X(`munderover`,[n,tr(Z(e.below,t)),i]):new X(`mover`,[n,i])}else e.below?r=new X(`munder`,[n,tr(Z(e.below,t))]):(r=tr(),r=new X(`mover`,[n,r]));return r}});function nr(e,t){var n=dn(e.body,t,!0);return W([e.mclass],n,t)}function rr(e,t){var n,r=kn(e.body,t);return e.mclass===`minner`?n=new X(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new X(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new X(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):e.mclass===`mopen`||e.mclass===`mclose`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`):e.mclass===`minner`&&(n.attributes.lspace=`0.0556em`,n.attributes.width=`+0.1111em`)),n}q({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:J(i),isCharacterBox:c(i)}},htmlBuilder:nr,mathmlBuilder:rr});var ir=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`};q({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:ir(t[0]),body:J(t[1]),isCharacterBox:c(t[1])}}}),q({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:ir(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:J(i)},l={type:`supsub`,mode:a.mode,base:s,sup:r===`\\underset`?null:a,sub:r===`\\underset`?a:null};return{type:`mclass`,mode:n.mode,mclass:o,body:[l],isCharacterBox:c(l)}},htmlBuilder:nr,mathmlBuilder:rr}),q({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:ir(t[0]),body:J(t[0])}},htmlBuilder(e,t){var n=dn(e.body,t,!0),r=W([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=new X(`mstyle`,kn(e.body,t));return n.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),n}});var ar={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},or=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),sr=e=>e.type===`textord`&&e.text===`@`,cr=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t;function lr(e,t,n){var r=ar[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function ur(t){var n=[];for(t.gullet.beginGroup(),t.gullet.macros.set(`\\cr`,`\\\\\\relax`),t.gullet.beginGroup();;){n.push(t.parseExpression(!1,`\\\\`)),t.gullet.endGroup(),t.gullet.beginGroup();var r=t.fetch().text;if(r===`&`||r===`\\\\`)t.consume();else if(r===`\\end`){n[n.length-1].length===0&&n.pop();break}else throw new e(`Expected \\\\ or \\cr or \\end`,t.nextToken)}for(var i=[],a=[i],o=0;oAV`.includes(u))for(var f=0;f<2;f++){for(var p=!0,m=l+1;mAV=|." after @`,s[l]);var h={type:`styling`,body:[lr(u,d,t)],mode:`math`,style:`display`,resetFont:!0};i.push(h),c=or()}o%2==0?i.push(c):i.shift(),i=[],a.push(i)}return t.gullet.endGroup(),t.gullet.endGroup(),{type:`array`,mode:`math`,body:a,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(a[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(a.length+1).fill([])}}q({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=Wt(Y(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=k(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new X(`mrow`,[Z(e.label,t)]);return n=new X(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new X(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),q({type:`cdlabelparent`,names:[`\\\\cdparent`],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=Wt(Y(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new X(`mrow`,[Z(e.fragment,t)])}}),q({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(t,n){for(var{parser:r}=t,i=Q(n[0],`ordgroup`).body,a=``,o=0;o=1114111)throw new e(`\\@char with invalid code point `+a);return c<=65535?l=String.fromCharCode(c):(c-=65536,l=String.fromCharCode((c>>10)+55296,(c&1023)+56320)),{type:`textord`,mode:r.mode,text:l}}});var dr=(e,t)=>Ut(dn(e.body,t.withColor(e.color),!1)),fr=(e,t)=>{var n=new X(`mstyle`,kn(e.body,t.withColor(e.color)));return n.setAttribute(`mathcolor`,e.color),n};q({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=Q(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:J(i)}},htmlBuilder:dr,mathmlBuilder:fr}),q({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=Q(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}},htmlBuilder:dr,mathmlBuilder:fr}),q({type:`cr`,names:[`\\\\`],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&Q(i,`size`).value}},htmlBuilder(e,t){var n=W([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=k(O(e.size,t)))),n},mathmlBuilder(e,t){var n=new X(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,k(O(e.size,t)))),n}});var pr={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},mr=t=>{var n=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new e(`Expected a control sequence`,t);return n},hr=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},gr=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)};q({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:n,funcName:r}=t;n.consumeSpaces();var i=n.fetch();if(pr[i.text])return(r===`\\global`||r===`\\\\globallong`)&&(i.text=pr[i.text]),Q(n.parseFunction(),`internal`);throw new e(`Invalid token after macro prefix`,i)}}),q({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:n,funcName:r}=t,i=n.gullet.popToken(),a=i.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(a))throw new e(`Expected a control sequence`,i);for(var o=0,s,c=[[]];n.gullet.future().text!==`{`;)if(i=n.gullet.popToken(),i.text===`#`){if(n.gullet.future().text===`{`){s=n.gullet.future(),c[o].push(`{`);break}if(i=n.gullet.popToken(),!/^[1-9]$/.test(i.text))throw new e(`Invalid argument number "`+i.text+`"`);if(parseInt(i.text)!==o+1)throw new e(`Argument number "`+i.text+`" out of order`);o++,c.push([])}else if(i.text===`EOF`)throw new e(`Expected a macro definition`);else c[o].push(i.text);var{tokens:l}=n.gullet.consumeArg();return s&&l.unshift(s),(r===`\\edef`||r===`\\xdef`)&&(l=n.gullet.expandTokens(l),l.reverse()),n.gullet.macros.set(a,{tokens:l,numArgs:o,delimiters:c},r===pr[r]),{type:`internal`,mode:n.mode}}}),q({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=mr(t.gullet.popToken());return t.gullet.consumeSpaces(),gr(t,r,hr(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),q({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=mr(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return gr(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}});var _r=function(e,t,n){var r=qe(A.math[e]&&A.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},vr=function(e,t,n,r){var i=n.havingBaseStyle(t),a=W(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},yr=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=k(i),e.height-=i,e.depth+=i},br=function(e,t,n,r,i,a){var o=vr(Nt(e,`Main-Regular`,i,r),t,r,a);return n&&yr(o,r,t),o},xr=function(e,t,n,r){return Nt(e,`Size`+t+`-Regular`,n,r)},Sr=function(e,t,n,r,i,a){var o=xr(e,t,i,r),s=vr(W([`delimsizing`,`size`+t],[o],r),E.TEXT,r,a);return n&&yr(s,r,E.TEXT),s},Cr=function(e,t,n){return{type:`elem`,elem:W([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[W([],[Nt(e,t,n)])])}},wr=function(e,t,n){var r=Ue[`Size4-Regular`][e.charCodeAt(0)]?Ue[`Size4-Regular`][e.charCodeAt(0)][4]:Ue[`Size1-Regular`][e.charCodeAt(0)][4],i=Bt([],[new Le([new Re(`inner`,ve(e,Math.round(1e3*t)))],{width:k(r),height:k(t),style:`width:`+k(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return i.height=t,i.style.height=k(t),i.style.width=k(r),{type:`elem`,elem:i}},Tr=.008,Er={type:`kern`,size:-1*Tr},Dr=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),Or=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),kr=function(e,t,n,r,i,a){var o,s,c,l,u=``,d=0;o=c=l=e,s=null;var f=`Size1-Regular`;e===`\\uparrow`?c=l=`⏐`:e===`\\Uparrow`?c=l=`‖`:e===`\\downarrow`?o=c=`⏐`:e===`\\Downarrow`?o=c=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,c=`⏐`,l=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,c=`‖`,l=`\\Downarrow`):Dr.has(e)?(c=`∣`,u=`vert`,d=333):Or.has(e)?(c=`∥`,u=`doublevert`,d=556):e===`[`||e===`\\lbrack`?(o=`⎡`,c=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lbrack`,d=667):e===`]`||e===`\\rbrack`?(o=`⎤`,c=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rbrack`,d=667):e===`\\lfloor`||e===`⌊`?(c=o=`⎢`,l=`⎣`,f=`Size4-Regular`,u=`lfloor`,d=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,c=l=`⎢`,f=`Size4-Regular`,u=`lceil`,d=667):e===`\\rfloor`||e===`⌋`?(c=o=`⎥`,l=`⎦`,f=`Size4-Regular`,u=`rfloor`,d=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,c=l=`⎥`,f=`Size4-Regular`,u=`rceil`,d=667):e===`(`||e===`\\lparen`?(o=`⎛`,c=`⎜`,l=`⎝`,f=`Size4-Regular`,u=`lparen`,d=875):e===`)`||e===`\\rparen`?(o=`⎞`,c=`⎟`,l=`⎠`,f=`Size4-Regular`,u=`rparen`,d=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,l=`⎩`,c=`⎪`,f=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,l=`⎭`,c=`⎪`,f=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,l=`⎩`,c=`⎪`,f=`Size4-Regular`);var p=_r(o,f,i),m=p.height+p.depth,h=_r(c,f,i),g=h.height+h.depth,_=_r(l,f,i),v=_.height+_.depth,y=0,b=1;if(s!==null){var x=_r(s,f,i);y=x.height+x.depth,b=2}var S=m+v+y,C=S+Math.max(0,Math.ceil((t-S)/(b*g)))*b*g,w=r.fontMetrics().axisHeight;n&&(w*=r.sizeMultiplier);var ee=C/2-w,T=[];if(u.length>0){var te=C-m-v,ne=Math.round(C*1e3),re=be(u,Math.round(te*1e3)),ie=new Re(u,re),ae=k(d/1e3),oe=k(ne/1e3),se=Bt([],[new Le([ie],{width:ae,height:oe,viewBox:`0 0 `+d+` `+ne})],r);se.height=ne/1e3,se.style.width=ae,se.style.height=oe,T.push({type:`elem`,elem:se})}else{if(T.push(Cr(l,f,i)),T.push(Er),s===null){var ce=C-m-v+2*Tr;T.push(wr(c,ce,r))}else{var D=(C-m-v-y)/2+2*Tr;T.push(wr(c,D,r)),T.push(Er),T.push(Cr(s,f,i)),T.push(Er),T.push(wr(c,D,r))}T.push(Er),T.push(Cr(o,f,i))}var le=r.havingBaseStyle(E.TEXT);return vr(W([`delimsizing`,`mult`],[G({positionType:`bottom`,positionData:ee,children:T})],le),E.TEXT,r,a)},Ar=80,jr=.08,Mr=function(e,t,n,r,i){return Bt([`hide-tail`],[new Le([new Re(e,_e(e,r,n))],{width:`400em`,height:k(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},Nr=function(e,t){var n=t.havingBaseSizing(),r=Ur(`\\surd`,e*n.sizeMultiplier,Vr,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,c,l,u;return r.type===`small`?(l=1e3+1e3*a+Ar,e<1?i=1:e<1.4&&(i=.7),s=(1+a+jr)/i,c=(1+a)/i,o=Mr(`sqrtMain`,s,l,a,t),o.style.minWidth=`0.853em`,u=.833/i):r.type===`large`?(l=(1e3+Ar)*Lr[r.size],c=(Lr[r.size]+a)/i,s=(Lr[r.size]+a+jr)/i,o=Mr(`sqrtSize`+r.size,s,l,a,t),o.style.minWidth=`1.02em`,u=1/i):(s=e+a+jr,c=e+a,l=Math.floor(1e3*e+a)+Ar,o=Mr(`sqrtTall`,s,l,a,t),o.style.minWidth=`0.742em`,u=1.056),o.height=c,o.style.height=k(s),{span:o,advanceWidth:u,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},Pr=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),Fr=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),Ir=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),Lr=[0,1.2,1.8,2.4,3],Rr=function(t,n,r,i,a){if(t===`<`||t===`\\lt`||t===`⟨`?t=`\\langle`:(t===`>`||t===`\\gt`||t===`⟩`)&&(t=`\\rangle`),Pr.has(t)||Ir.has(t))return Sr(t,n,!1,r,i,a);if(Fr.has(t))return kr(t,Lr[n],!1,r,i,a);throw new e(`Illegal delimiter: '`+t+`'`)},zr=[{type:`small`,style:E.SCRIPTSCRIPT},{type:`small`,style:E.SCRIPT},{type:`small`,style:E.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],Br=[{type:`small`,style:E.SCRIPTSCRIPT},{type:`small`,style:E.SCRIPT},{type:`small`,style:E.TEXT},{type:`stack`}],Vr=[{type:`small`,style:E.SCRIPTSCRIPT},{type:`small`,style:E.SCRIPT},{type:`small`,style:E.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],Hr=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},Ur=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);it)return a}return n[n.length-1]},Wr=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=Ir.has(e)?zr:Pr.has(e)?Vr:Br,s=Ur(e,t,o,r);return s.type===`small`?br(e,s.style,n,r,i,a):s.type===`large`?Sr(e,s.size,n,r,i,a):kr(e,t,n,r,i,a)},Gr=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,c=5/r.fontMetrics().ptPerEm,l=Math.max(t-o,n+o);return Wr(e,Math.max(l/500*s,2*l-c),!0,r,i,a)},Kr={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},qr=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`));function Jr(e){return`isMiddle`in e}function Yr(t,n){var r=Xn(t);if(r&&qr.has(r.text))return r;throw r?new e(`Invalid delimiter '`+r.text+`' after '`+n.funcName+`'`,t):new e(`Invalid delimiter type '`+t.type+`'`,t)}q({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],props:{numArgs:1,argTypes:[`primitive`]},handler:(e,t)=>{var n=Yr(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:Kr[e.funcName].size,mclass:Kr[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?W([e.mclass]):Rr(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(wn(e.delim,e.mode));var n=new X(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=k(Lr[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}});function Xr(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}q({type:`leftright-right`,names:[`\\right`],props:{numArgs:1,primitive:!0},handler:(t,n)=>{var r=t.parser.gullet.macros.get(`\\current@color`);if(r&&typeof r!=`string`)throw new e(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:t.parser.mode,delim:Yr(n[0],t).text,color:r}}}),q({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=Yr(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=Q(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{Xr(e);for(var n=dn(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o{Xr(e);var n=kn(e.body,t);if(e.left!==`.`){var r=new X(`mo`,[wn(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new X(`mo`,[wn(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return Tn(n)}}),q({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:(t,n)=>{var r=Yr(n[0],t);if(!t.parser.leftrightDepth)throw new e(`\\middle without preceding \\left`,r);return{type:`middle`,mode:t.parser.mode,delim:r.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=gn(t,[]):(n=Rr(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=new X(`mo`,[e.delim===`\\vert`||e.delim===`|`?wn(`|`,`text`):wn(e.delim,e.mode)]);return n.setAttribute(`fence`,`true`),n.setAttribute(`lspace`,`0.05em`),n.setAttribute(`rspace`,`0.05em`),n}});var Zr=(e,t)=>{var n=Wt(Y(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=c(e.body);if(r===`sout`)a=W([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var l=O({number:.6,unit:`pt`},t),u=O({number:.35,unit:`ex`},t),d=t.havingBaseSizing();i/=d.sizeMultiplier;var f=n.height+n.depth+l+u;n.style.paddingLeft=k(f/2+l);var p=Math.floor(1e3*f*i);a=Bt([`hide-tail`],[new Le([new Re(`phase`,he(p))],{width:`400em`,height:k(p/1e3),viewBox:`0 0 400000 `+p,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=k(f),o=n.depth+l+u}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var m,h,g=0;/box/.test(r)?(g=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),m=t.fontMetrics().fboxsep+(r===`colorbox`?0:g),h=m):r===`angl`?(g=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),m=4*g,h=Math.max(0,.25-n.depth)):(m=s?.2:0,h=m),a=Gn(n,r,m,h,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=k(g)):r===`angl`&&g!==.049&&(a.style.borderTopWidth=k(g),a.style.borderRightWidth=k(g)),o=n.depth+h,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var _;if(e.backgroundColor)_=G({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var v=/cancel|phase/.test(r)?[`svg-align`]:[];_=G({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:v}]})}return/cancel/.test(r)&&(_.height=n.height,_.depth=n.depth),/cancel/.test(r)&&!s?W([`mord`,`cancel-lap`],[_],t):W([`mord`],[_],t)},Qr=(e,t)=>{var n,r=new X(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[Z(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+k(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`);break}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r};q({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=Q(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:Zr,mathmlBuilder:Qr}),q({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=Q(t[0],`color-token`).color,o=Q(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:Zr,mathmlBuilder:Qr}),q({type:`enclose`,names:[`\\fbox`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),q({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:Zr,mathmlBuilder:Qr}),q({type:`enclose`,names:[`\\sout`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:Zr,mathmlBuilder:Qr}),q({type:`enclose`,names:[`\\angl`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\angl`,body:t[0]}}});var $r={};function ei(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},c=0;c{if(!t.parser.settings.displayMode)throw new e(`{`+t.envName+`} can be used only in display mode.`)},oi=new Set([`gather`,`gather*`]);function si(e){if(!e.includes(`ed`))return!e.includes(`*`)}function ci(t,n,r){var{hskipBeforeAndAfter:i,addJot:a,cols:o,arraystretch:s,colSeparationType:c,autoTag:l,singleRow:u,emptySingleRow:d,maxNumCols:f,leqno:p}=n;if(t.gullet.beginGroup(),u||t.gullet.macros.set(`\\cr`,`\\\\\\relax`),!s){var m=t.gullet.expandMacroAsText(`\\arraystretch`);if(m==null)s=1;else if(s=parseFloat(m),!s||s<0)throw new e(`Invalid \\arraystretch: `+m)}t.gullet.beginGroup();var h=[],g=[h],_=[],v=[],y=l==null?void 0:[];function b(){l&&t.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function x(){y&&(t.gullet.macros.get(`\\df@tag`)?(y.push(t.subparse([new ri(`\\df@tag`)])),t.gullet.macros.set(`\\df@tag`,void 0,!0)):y.push(!!l&&t.gullet.macros.get(`\\@eqnsw`)===`1`))}for(b(),v.push(ii(t));;){var S=t.parseExpression(!1,u?`\\end`:`\\\\`);t.gullet.endGroup(),t.gullet.beginGroup();var C={type:`ordgroup`,mode:t.mode,body:S};r&&(C={type:`styling`,mode:t.mode,style:r,resetFont:!0,body:[C]}),h.push(C);var w=t.fetch().text;if(w===`&`){if(f&&h.length===f){if(u||c)throw new e(`Too many tab characters: &`,t.nextToken);t.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}t.consume()}else if(w===`\\end`){x(),h.length===1&&C.type===`styling`&&C.body.length===1&&C.body[0].type===`ordgroup`&&C.body[0].body.length===0&&(g.length>1||!d)&&g.pop(),v.length0&&(v+=.25),l.push({pos:v,isDashed:e[t]})}for(y(o[0]),r=0;r0&&(T+=_,Se))for(r=0;r=s)){var ge=void 0;(i>0||t.hskipBeforeAndAfter)&&(ge=ue?.pregap??f,ge!==0&&(ie=W([`arraycolsep`],[]),ie.style.width=k(ge),re.push(ie)));var _e=[];for(r=0;r0){for(var we=Vt(`hline`,n,u),Te=Vt(`hdashline`,n,u),Ee=[{type:`elem`,elem:Ce,shift:0}];l.length>0;){var De=l.pop(),Oe=De.pos-te;De.isDashed?Ee.push({type:`elem`,elem:Te,shift:Oe}):Ee.push({type:`elem`,elem:we,shift:Oe})}Ce=G({positionType:`individualShift`,children:Ee})}if(oe.length===0)return W([`mord`],[Ce],n);var ke=W([`tag`],[G({positionType:`individualShift`,children:oe})],n);return Ut([Ce,ke])},di={c:`center `,l:`left `,r:`right `},fi=function(e,t){for(var n=[],r=new X(`mtd`,[],[`mtr-glue`]),i=new X(`mtd`,[],[`mml-eqn-num`]),a=0;a0){var p=e.cols,m=``,h=!1,g=0,_=p.length;p[0].type===`separator`&&(d+=`top `,g=1),p[p.length-1].type===`separator`&&(d+=`bottom `,--_);for(var v=g;v<_;v++){var y=p[v];y.type===`align`?(f+=di[y.align],h&&(m+=`none `),h=!0):y.type===`separator`&&(h&&=(m+=y.separator===`|`?`solid `:`dashed `,!1))}l.setAttribute(`columnalign`,f.trim()),/[sd]/.test(m)&&l.setAttribute(`columnlines`,m.trim())}if(e.colSeparationType===`align`){for(var b=e.cols||[],x=``,S=1;S0?`left `:``,d+=w[w.length-1].length>0?`right `:``;for(var ee=1;ee0&&p&&(g=1),r[m]={type:`align`,align:h,pregap:g,postgap:0}}return o.colSeparationType=p?`align`:`alignat`,o};ei({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(t,n){var r=(Xn(n[0])?[n[0]]:Q(n[0],`ordgroup`).body).map(function(t){var n=Yn(t).text;if(`lcr`.includes(n))return{type:`align`,align:n};if(n===`|`)return{type:`separator`,separator:`|`};if(n===`:`)return{type:`separator`,separator:`:`};throw new e(`Unknown column alignment: `+n,t)}),i={cols:r,hskipBeforeAndAfter:!0,maxNumCols:r.length};return ci(t.parser,i,li(t.envName))},htmlBuilder:ui,mathmlBuilder:fi}),ei({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(t){var n={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[t.envName.replace(`*`,``)],r=`c`,i={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:r}]};if(t.envName.charAt(t.envName.length-1)===`*`){var a=t.parser;if(a.consumeSpaces(),a.fetch().text===`[`){if(a.consume(),a.consumeSpaces(),r=a.fetch().text,!`lcr`.includes(r))throw new e(`Expected l or c or r`,a.nextToken);a.consume(),a.consumeSpaces(),a.expect(`]`),a.consume(),i.cols=[{type:`align`,align:r}]}}var o=ci(t.parser,i,li(t.envName)),s=Math.max(0,...o.body.map(e=>e.length));return o.cols=Array(s).fill({type:`align`,align:r}),n?{type:`leftright`,mode:t.mode,body:[o],left:n[0],right:n[1],rightColor:void 0}:o},htmlBuilder:ui,mathmlBuilder:fi}),ei({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=ci(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:ui,mathmlBuilder:fi}),ei({type:`array`,names:[`subarray`],props:{numArgs:1},handler(t,n){var r=(Xn(n[0])?[n[0]]:Q(n[0],`ordgroup`).body).map(function(t){var n=Yn(t).text;if(`lc`.includes(n))return{type:`align`,align:n};throw new e(`Unknown column alignment: `+n,t)});if(r.length>1)throw new e(`{subarray} can contain only one column`);var i={cols:r,hskipBeforeAndAfter:!1,arraystretch:.5},a=ci(t.parser,i,`script`);if(a.body.length>0&&a.body[0].length>1)throw new e(`{subarray} can contain only one column`);return a},htmlBuilder:ui,mathmlBuilder:fi}),ei({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=ci(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},li(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:ui,mathmlBuilder:fi}),ei({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:pi,htmlBuilder:ui,mathmlBuilder:fi}),ei({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){oi.has(e.envName)&&ai(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:si(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return ci(e.parser,t,`display`)},htmlBuilder:ui,mathmlBuilder:fi}),ei({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:pi,htmlBuilder:ui,mathmlBuilder:fi}),ei({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){ai(e);var t={autoTag:si(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return ci(e.parser,t,`display`)},htmlBuilder:ui,mathmlBuilder:fi}),ei({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return ai(e),ur(e.parser)},htmlBuilder:ui,mathmlBuilder:fi}),$(`\\nonumber`,`\\gdef\\@eqnsw{0}`),$(`\\notag`,`\\nonumber`),q({type:`text`,names:[`\\hline`,`\\hdashline`],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(t,n){throw new e(t.funcName+` valid only within array environment`)}});var mi=$r;q({type:`environment`,names:[`\\begin`,`\\end`],props:{numArgs:1,argTypes:[`text`]},handler(t,n){var{parser:r,funcName:i}=t,a=n[0];if(a.type!==`ordgroup`)throw new e(`Invalid environment name`,a);for(var o=``,s=0;s{var n=e.font,r=t.withFont(n);return Y(e.body,r)},gi=(e,t)=>{var n=e.font,r=t.withFont(n);return Z(e.body,r)},_i={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`};q({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=on(t[0]),a=r;return a in _i&&(a=_i[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:hi,mathmlBuilder:gi}),q({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`mclass`,mode:n.mode,mclass:ir(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:c(r)}}}),q({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}},htmlBuilder:hi,mathmlBuilder:gi});var vi=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=Y(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,c=3.5/t.fontMetrics().ptPerEm;o.height=o.height0?3*f:7*f,h=t.fontMetrics().denom1):(d>0?(p=t.fontMetrics().num2,m=f):(p=t.fontMetrics().num3,m=3*f),h=t.fontMetrics().denom2);var g;if(u){var _=t.fontMetrics().axisHeight;p-o.depth-(_+.5*d){var n=new X(`mfrac`,[Z(e.numer,t),Z(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=O(e.barSize,t);n.setAttribute(`linethickness`,k(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new X(`mo`,[new bn(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new X(`mo`,[new bn(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return Tn(i)}return n},bi=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e;q({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,c=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,c=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,c=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,c=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var l=r===`\\cfrac`,u=null;return l||r.startsWith(`\\d`)?u=`display`:r.startsWith(`\\t`)&&(u=`text`),bi({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:l,hasBarLine:o,leftDelim:s,rightDelim:c,barSize:null},u)},htmlBuilder:vi,mathmlBuilder:yi}),q({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}});var xi=[`display`,`text`,`script`,`scriptscript`],Si=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t};q({type:`genfrac`,names:[`\\genfrac`],props:{numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=on(t[0]),o=a.type===`atom`&&a.family===`open`?Si(a.text):null,s=on(t[1]),c=s.type===`atom`&&s.family===`close`?Si(s.text):null,l=Q(t[2],`size`),u,d=null;l.isBlank?u=!0:(d=l.value,u=d.number>0);var f=null,p=t[3];if(p.type===`ordgroup`){if(p.body.length>0){var m=Q(p.body[0],`textord`);f=xi[Number(m.text)]}}else p=Q(p,`textord`),f=xi[Number(p.text)];return bi({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:u,barSize:d,leftDelim:o,rightDelim:c},f)}}),q({type:`infix`,names:[`\\above`],props:{numArgs:1,argTypes:[`size`],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:Q(t[0],`size`).value,token:i}}}),q({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=Q(t[1],`infix`).size;if(!a)throw Error(`\\\\abovefrac expected size, but got `+String(a));var o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null}}});var Ci=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?Y(e.sup,t.havingStyle(n.sup()),t):Y(e.sub,t.havingStyle(n.sub()),t),i=Q(e.base,`horizBrace`)):i=Q(e,`horizBrace`);var a=Y(i.base,t.havingBaseStyle(E.DISPLAY)),o=Wn(i,t),s=i.isOver?G({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):G({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var c=W([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?G({positionType:`firstBaseline`,children:[{type:`elem`,elem:c},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):G({positionType:`bottom`,positionData:c.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:c}]})}return W([`minner`,i.isOver?`mover`:`munder`],[s],t)};q({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:Ci,mathmlBuilder:(e,t)=>{var n=Vn(e.label);return new X(e.isOver?`mover`:`munder`,[Z(e.base,t),n])}}),q({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=Q(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:J(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=dn(e.body,t,!1);return Ht(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=An(e.body,t);return n instanceof X||(n=new X(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),q({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=Q(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a{var{parser:r,funcName:i,token:a}=t,o=Q(n[0],`raw`).string,s=n[1];r.settings.strict&&r.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var c,l={};switch(i){case`\\htmlClass`:l.class=o,c={command:`\\htmlClass`,class:o};break;case`\\htmlId`:l.id=o,c={command:`\\htmlId`,id:o};break;case`\\htmlStyle`:l.style=o,c={command:`\\htmlStyle`,style:o};break;case`\\htmlData`:for(var u=o.split(`,`),d=0;d{var n=dn(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=W(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>An(e.body,t)}),q({type:`htmlmathml`,names:[`\\html@mathml`],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:J(t[0]),mathml:J(t[1])}},htmlBuilder:(e,t)=>Ut(dn(e.html,t,!1)),mathmlBuilder:(e,t)=>An(e.mathml,t)});var wi=function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:`bp`};var n=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!n)throw new e(`Invalid size: '`+t+`' in \\includegraphics`);var r={number:+(n[1]+n[2]),unit:n[3]};if(!Te(r))throw new e(`Invalid unit: '`+r.unit+`' in \\includegraphics.`);return r};q({type:`includegraphics`,names:[`\\includegraphics`],props:{numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1},handler:(t,n,r)=>{var{parser:i}=t,a={number:0,unit:`em`},o={number:.9,unit:`em`},s={number:0,unit:`em`},c=``;if(r[0])for(var l=Q(r[0],`raw`).string.split(`,`),u=0;u{var n=O(e.height,t),r=0;e.totalheight.number>0&&(r=O(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=O(e.width,t));var a={height:k(n+r)};i>0&&(a.width=k(i)),r>0&&(a.verticalAlign=k(-r));var o=new Pe(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new X(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=O(e.height,t),i=0;if(e.totalheight.number>0&&(i=O(e.totalheight,t)-r,n.setAttribute(`valign`,k(-i))),n.setAttribute(`height`,k(r+i)),e.width.number>0){var a=O(e.width,t);n.setAttribute(`width`,k(a))}return n.setAttribute(`src`,e.src),n}}),q({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],props:{numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=Q(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return Kt(e.dimension,t)},mathmlBuilder(e,t){return new xn(O(e.dimension,t))}}),q({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=W([],[Y(e.body,t)]),n=W([`inner`],[n],t)):n=W([`inner`],[Y(e.body,t)]);var r=W([`fix`],[]),i=W([e.alignment],[n,r],t),a=W([`strut`]);return a.style.height=k(i.height+i.depth),i.depth&&(a.style.verticalAlign=k(-i.depth)),i.children.unshift(a),i=W([`thinbox`],[i],t),W([`mord`,`vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new X(`mpadded`,[Z(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),q({type:`styling`,names:[`\\(`,`$`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),q({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,n){throw new e(`Mismatched `+t.funcName)}});var Ti=(e,t)=>{switch(t.style.size){case E.DISPLAY.size:return e.display;case E.TEXT.size:return e.text;case E.SCRIPT.size:return e.script;case E.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};q({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:J(t[0]),text:J(t[1]),script:J(t[2]),scriptscript:J(t[3])}},htmlBuilder:(e,t)=>Ut(dn(Ti(e,t),t,!1)),mathmlBuilder:(e,t)=>An(Ti(e,t),t)});var Ei=(e,t,n,r,i,a,o)=>{e=W([],[e]);var s=n&&c(n),l,u;if(t){var d=Y(t,r.havingStyle(i.sup()),r);u={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var f=Y(n,r.havingStyle(i.sub()),r);l={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-f.height)}}var p;if(u&&l)p=G({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:l.elem,marginLeft:k(-a)},{type:`kern`,size:l.kern},{type:`elem`,elem:e},{type:`kern`,size:u.kern},{type:`elem`,elem:u.elem,marginLeft:k(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(l)p=G({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:l.elem,marginLeft:k(-a)},{type:`kern`,size:l.kern},{type:`elem`,elem:e}]});else if(u)p=G({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:u.kern},{type:`elem`,elem:u.elem,marginLeft:k(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var m=[p];if(l&&a!==0&&!s){var h=W([`mspace`],[],r);h.style.marginRight=k(a),m.unshift(h)}return W([`mop`,`op-limits`],m,r)},Di=new Set([`\\smallint`]),Oi=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=Q(e.base,`op`),i=!0):a=Q(e,`op`);var o=t.style,s=!1;o.size===E.DISPLAY.size&&a.symbol&&!Di.has(a.name)&&(s=!0);var c,l;if(a.symbol){var u=s?`Size2-Regular`:`Size1-Regular`,d=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(d=a.name.slice(1),a.name=d===`oiint`?`\\iint`:`\\iiint`),c=Nt(a.name,u,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),l=c.italic,d.length>0){var f=Xt(d+`Size`+(s?`2`:`1`),t);c=G({positionType:`individualShift`,children:[{type:`elem`,elem:c,shift:0},{type:`elem`,elem:f,shift:s?.08:0}]}),a.name=`\\`+d,c.classes.unshift(`mop`),c.italic=l}}else if(a.body){var p=dn(a.body,t,!0);p.length===1&&p[0]instanceof Ie?(c=p[0],c.classes[0]=`mop`):c=W([`mop`],p,t)}else{for(var m=[],h=1;h{var n;if(e.symbol)n=new X(`mo`,[wn(e.name,e.mode)]),Di.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new X(`mo`,kn(e.body,t));else{n=new X(`mi`,[new bn(e.name.slice(1))]);var r=new X(`mo`,[wn(`⁡`,`text`)]);n=e.parentIsSupSub?new X(`mrow`,[n,r]):yn([n,r])}return n},Ai={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`};q({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=Ai[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Oi,mathmlBuilder:ki}),q({type:`op`,names:[`\\mathop`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:J(r)}},htmlBuilder:Oi,mathmlBuilder:ki});var ji={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`};q({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Oi,mathmlBuilder:ki}),q({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Oi,mathmlBuilder:ki}),q({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=ji[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Oi,mathmlBuilder:ki});var Mi=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=Q(e.base,`operatorname`),i=!0):a=Q(e,`operatorname`);var o;if(a.body.length>0){for(var s=dn(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),c=0;c{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:J(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:Mi,mathmlBuilder:(e,t)=>{for(var n=kn(e.body,t.withFont(`mathrm`)),r=!0,i=0;ie.toText()).join(``))]);var s=new X(`mi`,n);s.setAttribute(`mathvariant`,`normal`);var c=new X(`mo`,[wn(`⁡`,`text`)]);return e.parentIsSupSub?new X(`mrow`,[s,c]):yn([s,c])}}),$(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),an({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?Ut(dn(e.body,t,!1)):W([`mord`],dn(e.body,t,!0),t)},mathmlBuilder(e,t){return An(e.body,t,!0)}}),q({type:`overline`,names:[`\\overline`],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=Y(e.body,t.havingCrampedStyle()),r=Vt(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return W([`mord`,`overline`],[G({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new X(`mo`,[new bn(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new X(`mover`,[Z(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),q({type:`phantom`,names:[`\\phantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:J(r)}},htmlBuilder:(e,t)=>Ut(dn(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>new X(`mphantom`,kn(e.body,t))}),$(`\\hphantom`,`\\smash{\\phantom{#1}}`),q({type:`vphantom`,names:[`\\vphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>W([`mord`,`rlap`],[W([`inner`],[Y(e.body,t.withPhantom())]),W([`fix`],[])],t),mathmlBuilder:(e,t)=>{var n=new X(`mpadded`,[new X(`mphantom`,kn(J(e.body),t))]);return n.setAttribute(`width`,`0px`),n}}),q({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=Q(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=Y(e.body,t);return G({positionType:`shift`,positionData:-O(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new X(`mpadded`,[Z(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),q({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),q({type:`rule`,names:[`\\rule`],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`]},handler(e,t,n){var{parser:r}=e,i=n[0],a=Q(t[0],`size`),o=Q(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&Q(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=W([`mord`,`rule`],[],t),r=O(e.width,t),i=O(e.height,t),a=e.shift?O(e.shift,t):0;return n.style.borderRightWidth=k(r),n.style.borderTopWidth=k(i),n.style.bottom=k(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=O(e.width,t),r=O(e.height,t),i=e.shift?O(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new X(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,k(n)),o.setAttribute(`height`,k(r));var s=new X(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,k(i)):(s.setAttribute(`height`,k(i)),s.setAttribute(`depth`,k(-i))),s.setAttribute(`voffset`,k(i)),s}});function Ni(e,t,n){for(var r=dn(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:Pi.indexOf(r)+1,body:a}},htmlBuilder:(e,t)=>{var n=t.havingSize(e.size);return Ni(e.body,n,t)},mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=new X(`mstyle`,kn(e.body,n));return r.setAttribute(`mathsize`,k(n.sizeMultiplier)),r}}),q({type:`smash`,names:[`\\smash`],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&Q(n[0],`ordgroup`);if(o)for(var s,c=0;c{var n=W([],[Y(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return W([`mord`,`smash`],[n],t);if(n.children)for(var r=0;r{var n=new X(`mpadded`,[Z(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),q({type:`sqrt`,names:[`\\sqrt`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=Y(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=Wt(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.idn.height+n.depth+a&&(a=(a+l-n.height-n.depth)/2);var u=o.height-n.height-a-s;n.style.paddingLeft=k(c);var d=G({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+u)},{type:`elem`,elem:o},{type:`kern`,size:s}]});if(e.index){var f=t.havingStyle(E.SCRIPTSCRIPT),p=Y(e.index,f,t);return W([`mord`,`sqrt`],[W([`root`],[G({positionType:`shift`,positionData:-(.6*(d.height-d.depth)),children:[{type:`elem`,elem:p}]})]),d],t)}else return W([`mord`,`sqrt`],[d],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new X(`mroot`,[Z(n,t),Z(r,t)]):new X(`msqrt`,[Z(n,t)])}});var Fi={display:E.DISPLAY,text:E.TEXT,script:E.SCRIPT,scriptscript:E.SCRIPTSCRIPT};function Ii(e){return e in Fi}q({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!Ii(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=Fi[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),Ni(e.body,r,t)},mathmlBuilder(e,t){var n=Fi[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=new X(`mstyle`,kn(e.body,r)),a={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return i.setAttribute(`scriptlevel`,a[0]),i.setAttribute(`displaystyle`,a[1]),i}});var Li=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===E.DISPLAY.size||n.alwaysHandleSupSub)?Oi:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===E.DISPLAY.size||n.limits)?Mi:null:n.type===`accent`?c(n.base)?Qn:null:n.type===`horizBrace`&&!e.sub===n.isOver?Ci:null:null};an({type:`supsub`,htmlBuilder(e,t){var n=Li(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=Y(r,t),s,l,u=t.fontMetrics(),d=0,f=0,p=r&&c(r);if(i){var m=t.havingStyle(t.style.sup());s=Y(i,m,t),p||(d=o.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(a){var h=t.havingStyle(t.style.sub());l=Y(a,h,t),p||(f=o.depth+h.fontMetrics().subDrop*h.sizeMultiplier/t.sizeMultiplier)}var g=t.style===E.DISPLAY?u.sup1:t.style.cramped?u.sup3:u.sup2,_=t.sizeMultiplier,v=k(.5/u.ptPerEm/_),y=null;if(l){var b=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof Ie||b)&&(y=k(-(o.italic??0)))}var x;if(s&&l){d=Math.max(d,g,s.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var S=4*u.defaultRuleThickness;if(d-s.depth-(l.height-f)0&&(d+=C,f-=C)}x=G({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:f,marginRight:v,marginLeft:y},{type:`elem`,elem:s,shift:-d,marginRight:v}]})}else if(l)f=Math.max(f,u.sub1,l.height-.8*u.xHeight),x=G({positionType:`shift`,positionData:f,children:[{type:`elem`,elem:l,marginLeft:y,marginRight:v}]});else if(s)d=Math.max(d,g,s.depth+.25*u.xHeight),x=G({positionType:`shift`,positionData:-d,children:[{type:`elem`,elem:s,marginRight:v}]});else throw Error(`supsub must have either sup or sub.`);return W([hn(o,`right`)||`mord`],[o,W([`msupsub`],[x])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[Z(e.base,t)];e.sub&&a.push(Z(e.sub,t)),e.sup&&a.push(Z(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===E.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===E.DISPLAY)?`mover`:`msup`}else if(e.sup){var c=e.base;o=c&&c.type===`op`&&c.limits&&t.style===E.DISPLAY||c&&c.type===`operatorname`&&c.alwaysHandleSupSub&&(t.style===E.DISPLAY||c.limits)?`munderover`:`msubsup`}else{var l=e.base;o=l&&l.type===`op`&&l.limits&&(t.style===E.DISPLAY||l.alwaysHandleSupSub)||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(l.limits||t.style===E.DISPLAY)?`munder`:`msub`}return new X(o,a)}}),an({type:`atom`,htmlBuilder(e,t){return Pt(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new X(`mo`,[wn(e.text,e.mode)]);if(e.family===`bin`){var r=Dn(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}});var Ri={mi:`italic`,mn:`normal`,mtext:`normal`};an({type:`mathord`,htmlBuilder(e,t){return It(e,t,`mathord`)},mathmlBuilder(e,t){var n=new X(`mi`,[wn(e.text,e.mode,t)]),r=Dn(e,t)||`italic`;return r!==Ri[n.type]&&n.setAttribute(`mathvariant`,r),n}}),an({type:`textord`,htmlBuilder(e,t){return It(e,t,`textord`)},mathmlBuilder(e,t){var n=wn(e.text,e.mode,t),r=Dn(e,t)||`normal`,i=e.mode===`text`?new X(`mtext`,[n]):/[0-9]/.test(e.text)?new X(`mn`,[n]):e.text===`\\prime`?new X(`mo`,[n]):new X(`mi`,[n]);return r!==Ri[i.type]&&i.setAttribute(`mathvariant`,r),i}});var zi={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},Bi={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}};an({type:`spacing`,htmlBuilder(t,n){if(Bi.hasOwnProperty(t.text)){var r=Bi[t.text].className||``;if(t.mode===`text`){var i=It(t,n,`textord`);return i.classes.push(r),i}else return W([`mspace`,r],[Pt(t.text,t.mode,n)],n)}else if(zi.hasOwnProperty(t.text))return W([`mspace`,zi[t.text]],[],n);else throw new e(`Unknown type of space "`+t.text+`"`)},mathmlBuilder(t,n){var r;if(Bi.hasOwnProperty(t.text))r=new X(`mtext`,[new bn(`\xA0`)]);else if(zi.hasOwnProperty(t.text))return new X(`mspace`);else throw new e(`Unknown type of space "`+t.text+`"`);return r}});var Vi=()=>{var e=new X(`mtd`,[]);return e.setAttribute(`width`,`50%`),e};an({type:`tag`,mathmlBuilder(e,t){var n=new X(`mtable`,[new X(`mtr`,[Vi(),new X(`mtd`,[An(e.body,t)]),Vi(),new X(`mtd`,[An(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}});var Hi={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},Ui={"\\textbf":`textbf`,"\\textmd":`textmd`},Wi={"\\textit":`textit`,"\\textup":`textup`},Gi=(e,t)=>{var n=e.font;return n?Hi[n]?t.withTextFontFamily(Hi[n]):Ui[n]?t.withTextFontWeight(Ui[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(Wi[n]):t};q({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],props:{numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`text`,mode:n.mode,body:J(i),font:r}},htmlBuilder(e,t){var n=Gi(e,t);return W([`mord`,`text`],dn(e.body,n,!0),n)},mathmlBuilder(e,t){var n=Gi(e,t);return An(e.body,n)}}),q({type:`underline`,names:[`\\underline`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`underline`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Y(e.body,t),r=Vt(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return W([`mord`,`underline`],[G({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new X(`mo`,[new bn(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new X(`munder`,[Z(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),q({type:`vcenter`,names:[`\\vcenter`],props:{numArgs:1,argTypes:[`original`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`vcenter`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Y(e.body,t),r=t.fontMetrics().axisHeight;return G({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){return new X(`mrow`,[new X(`mpadded`,[Z(e.body,t)],[`vcenter`])])}}),q({type:`verb`,names:[`\\verb`],props:{numArgs:0,allowedInText:!0},handler(t,n,r){throw new e(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=Ki(e),r=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?`␣`:`\xA0`),qi=tn,Ji=`[ \r - ]`,Yi=`\\\\[a-zA-Z@]+`,Xi=`\\\\[^\ud800-\udfff]`,Zi=`(`+Yi+`)`+Ji+`*`,Qi=`\\\\( -|[ \r ]+ -?)[ \r ]*`,$i=`[̀-ͯ]`,ea=RegExp($i+`+$`),ta=`(`+Ji+`+)|`+(Qi+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+($i+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+($i+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+Zi)+(`|`+Xi+`)`),na=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(ta,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var t=this.input,n=this.tokenRegex.lastIndex;if(n===t.length)return new ri(`EOF`,new ni(this,n,n));var r=this.tokenRegex.exec(t);if(r===null||r.index!==n)throw new e(`Unexpected character: '`+t[n]+`'`,new ri(t[n],new ni(this,n,n+1)));var i=r[6]||r[3]||(r[2]?`\\ `:` `);if(this.catcodes[i]===14){var a=t.indexOf(` -`,this.tokenRegex.lastIndex);return a===-1?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=a+1,this.lex()}return new ri(i,new ni(this,n,this.tokenRegex.lastIndex))}},ra=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new e(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var t=this.undefStack.pop();for(var n in t)t.hasOwnProperty(n)&&(t[n]==null?delete this.current[n]:this.current[n]=t[n])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},ia=ti;$(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),$(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),$(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),$(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),$(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),$(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),$(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}});var aa={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};$(`\\char`,function(t){var n=t.popToken(),r,i=0;if(n.text===`'`)r=8,n=t.popToken();else if(n.text===`"`)r=16,n=t.popToken();else if(n.text==="`")if(n=t.popToken(),n.text[0]===`\\`)i=n.text.charCodeAt(1);else if(n.text===`EOF`)throw new e("\\char` missing argument");else i=n.text.charCodeAt(0);else r=10;if(r){if(i=aa[n.text],i==null||i>=r)throw new e(`Invalid base-`+r+` digit `+n.text);for(var a;(a=aa[t.future().text])!=null&&a{var a=t.consumeArg().tokens;if(a.length!==1)throw new e(`\\newcommand's first argument must be a macro name`);var o=a[0].text,s=t.isDefined(o);if(s&&!n)throw new e(`\\newcommand{`+o+`} attempting to redefine `+(o+`; use \\renewcommand`));if(!s&&!r)throw new e(`\\renewcommand{`+o+`} when command `+o+` does not yet exist; use \\newcommand`);var c=0;if(a=t.consumeArg().tokens,a.length===1&&a[0].text===`[`){for(var l=``,u=t.expandNextToken();u.text!==`]`&&u.text!==`EOF`;)l+=u.text,u=t.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new e(`Invalid number of arguments: `+l);c=parseInt(l),a=t.consumeArg().tokens}return s&&i||t.macros.set(o,{tokens:a,numArgs:c}),``};$(`\\newcommand`,e=>oa(e,!1,!0,!1)),$(`\\renewcommand`,e=>oa(e,!0,!1,!1)),$(`\\providecommand`,e=>oa(e,!0,!0,!0)),$(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),$(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),$(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),qi[n],A.math[n],A.text[n]),``}),$(`\\bgroup`,`{`),$(`\\egroup`,`}`),$(`~`,`\\nobreakspace`),$(`\\lq`,"`"),$(`\\rq`,`'`),$(`\\aa`,`\\r a`),$(`\\AA`,`\\r A`),$(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),$(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),$(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),$(`ℬ`,`\\mathscr{B}`),$(`ℰ`,`\\mathscr{E}`),$(`ℱ`,`\\mathscr{F}`),$(`ℋ`,`\\mathscr{H}`),$(`ℐ`,`\\mathscr{I}`),$(`ℒ`,`\\mathscr{L}`),$(`ℳ`,`\\mathscr{M}`),$(`ℛ`,`\\mathscr{R}`),$(`ℭ`,`\\mathfrak{C}`),$(`ℌ`,`\\mathfrak{H}`),$(`ℨ`,`\\mathfrak{Z}`),$(`\\Bbbk`,`\\Bbb{k}`),$(`\\llap`,`\\mathllap{\\textrm{#1}}`),$(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),$(`\\clap`,`\\mathclap{\\textrm{#1}}`),$(`\\mathstrut`,`\\vphantom{(}`),$(`\\underbar`,`\\underline{\\text{#1}}`),$(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),$(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),$(`\\ne`,`\\neq`),$(`≠`,`\\neq`),$(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),$(`∉`,`\\notin`),$(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),$(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),$(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),$(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),$(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),$(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),$(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),$(`⟂`,`\\perp`),$(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),$(`∌`,`\\notni`),$(`⌜`,`\\ulcorner`),$(`⌝`,`\\urcorner`),$(`⌞`,`\\llcorner`),$(`⌟`,`\\lrcorner`),$(`©`,`\\copyright`),$(`®`,`\\textregistered`),$(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),$(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),$(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),$(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),$(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),$(`⋮`,`\\vdots`),$(`\\varGamma`,`\\mathit{\\Gamma}`),$(`\\varDelta`,`\\mathit{\\Delta}`),$(`\\varTheta`,`\\mathit{\\Theta}`),$(`\\varLambda`,`\\mathit{\\Lambda}`),$(`\\varXi`,`\\mathit{\\Xi}`),$(`\\varPi`,`\\mathit{\\Pi}`),$(`\\varSigma`,`\\mathit{\\Sigma}`),$(`\\varUpsilon`,`\\mathit{\\Upsilon}`),$(`\\varPhi`,`\\mathit{\\Phi}`),$(`\\varPsi`,`\\mathit{\\Psi}`),$(`\\varOmega`,`\\mathit{\\Omega}`),$(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),$(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),$(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),$(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),$(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),$(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),$(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),$(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`);var sa={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},ca=new Set([`bin`,`rel`]);$(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in sa?t=sa[n]:(n.slice(0,4)===`\\not`||n in A.math&&ca.has(A.math[n].group))&&(t=`\\dotsb`),t});var la={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};$(`\\dotso`,function(e){return e.future().text in la?`\\ldots\\,`:`\\ldots`}),$(`\\dotsc`,function(e){var t=e.future().text;return t in la&&t!==`,`?`\\ldots\\,`:`\\ldots`}),$(`\\cdots`,function(e){return e.future().text in la?`\\@cdots\\,`:`\\@cdots`}),$(`\\dotsb`,`\\cdots`),$(`\\dotsm`,`\\cdots`),$(`\\dotsi`,`\\!\\cdots`),$(`\\dotsx`,`\\ldots\\,`),$(`\\DOTSI`,`\\relax`),$(`\\DOTSB`,`\\relax`),$(`\\DOTSX`,`\\relax`),$(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),$(`\\,`,`\\tmspace+{3mu}{.1667em}`),$(`\\thinspace`,`\\,`),$(`\\>`,`\\mskip{4mu}`),$(`\\:`,`\\tmspace+{4mu}{.2222em}`),$(`\\medspace`,`\\:`),$(`\\;`,`\\tmspace+{5mu}{.2777em}`),$(`\\thickspace`,`\\;`),$(`\\!`,`\\tmspace-{3mu}{.1667em}`),$(`\\negthinspace`,`\\!`),$(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),$(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),$(`\\enspace`,`\\kern.5em `),$(`\\enskip`,`\\hskip.5em\\relax`),$(`\\quad`,`\\hskip1em\\relax`),$(`\\qquad`,`\\hskip2em\\relax`),$(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),$(`\\tag@paren`,`\\tag@literal{({#1})}`),$(`\\tag@literal`,t=>{if(t.macros.get(`\\df@tag`))throw new e(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),$(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),$(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),$(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),$(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),$(`\\newline`,`\\\\\\relax`),$(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`);var ua=k(Ue[`Main-Regular`][84][1]-.7*Ue[`Main-Regular`][65][1]);$(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+ua+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),$(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+ua+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),$(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),$(`\\@hspace`,`\\hskip #1\\relax`),$(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),$(`\\ordinarycolon`,`:`),$(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),$(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),$(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),$(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),$(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),$(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),$(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),$(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),$(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),$(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),$(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),$(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),$(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),$(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),$(`∷`,`\\dblcolon`),$(`∹`,`\\eqcolon`),$(`≔`,`\\coloneqq`),$(`≕`,`\\eqqcolon`),$(`⩴`,`\\Coloneqq`),$(`\\ratio`,`\\vcentcolon`),$(`\\coloncolon`,`\\dblcolon`),$(`\\colonequals`,`\\coloneqq`),$(`\\coloncolonequals`,`\\Coloneqq`),$(`\\equalscolon`,`\\eqqcolon`),$(`\\equalscoloncolon`,`\\Eqqcolon`),$(`\\colonminus`,`\\coloneq`),$(`\\coloncolonminus`,`\\Coloneq`),$(`\\minuscolon`,`\\eqcolon`),$(`\\minuscoloncolon`,`\\Eqcolon`),$(`\\coloncolonapprox`,`\\Colonapprox`),$(`\\coloncolonsim`,`\\Colonsim`),$(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),$(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),$(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),$(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),$(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),$(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),$(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),$(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),$(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),$(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),$(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),$(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),$(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),$(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),$(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),$(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),$(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),$(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),$(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),$(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),$(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),$(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),$(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),$(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),$(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),$(`\\imath`,`\\html@mathml{\\@imath}{ı}`),$(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),$(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),$(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),$(`⟦`,`\\llbracket`),$(`⟧`,`\\rrbracket`),$(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),$(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),$(`⦃`,`\\lBrace`),$(`⦄`,`\\rBrace`),$(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),$(`⦵`,`\\minuso`),$(`\\darr`,`\\downarrow`),$(`\\dArr`,`\\Downarrow`),$(`\\Darr`,`\\Downarrow`),$(`\\lang`,`\\langle`),$(`\\rang`,`\\rangle`),$(`\\uarr`,`\\uparrow`),$(`\\uArr`,`\\Uparrow`),$(`\\Uarr`,`\\Uparrow`),$(`\\N`,`\\mathbb{N}`),$(`\\R`,`\\mathbb{R}`),$(`\\Z`,`\\mathbb{Z}`),$(`\\alef`,`\\aleph`),$(`\\alefsym`,`\\aleph`),$(`\\Alpha`,`\\mathrm{A}`),$(`\\Beta`,`\\mathrm{B}`),$(`\\bull`,`\\bullet`),$(`\\Chi`,`\\mathrm{X}`),$(`\\clubs`,`\\clubsuit`),$(`\\cnums`,`\\mathbb{C}`),$(`\\Complex`,`\\mathbb{C}`),$(`\\Dagger`,`\\ddagger`),$(`\\diamonds`,`\\diamondsuit`),$(`\\empty`,`\\emptyset`),$(`\\Epsilon`,`\\mathrm{E}`),$(`\\Eta`,`\\mathrm{H}`),$(`\\exist`,`\\exists`),$(`\\harr`,`\\leftrightarrow`),$(`\\hArr`,`\\Leftrightarrow`),$(`\\Harr`,`\\Leftrightarrow`),$(`\\hearts`,`\\heartsuit`),$(`\\image`,`\\Im`),$(`\\infin`,`\\infty`),$(`\\Iota`,`\\mathrm{I}`),$(`\\isin`,`\\in`),$(`\\Kappa`,`\\mathrm{K}`),$(`\\larr`,`\\leftarrow`),$(`\\lArr`,`\\Leftarrow`),$(`\\Larr`,`\\Leftarrow`),$(`\\lrarr`,`\\leftrightarrow`),$(`\\lrArr`,`\\Leftrightarrow`),$(`\\Lrarr`,`\\Leftrightarrow`),$(`\\Mu`,`\\mathrm{M}`),$(`\\natnums`,`\\mathbb{N}`),$(`\\Nu`,`\\mathrm{N}`),$(`\\Omicron`,`\\mathrm{O}`),$(`\\plusmn`,`\\pm`),$(`\\rarr`,`\\rightarrow`),$(`\\rArr`,`\\Rightarrow`),$(`\\Rarr`,`\\Rightarrow`),$(`\\real`,`\\Re`),$(`\\reals`,`\\mathbb{R}`),$(`\\Reals`,`\\mathbb{R}`),$(`\\Rho`,`\\mathrm{P}`),$(`\\sdot`,`\\cdot`),$(`\\sect`,`\\S`),$(`\\spades`,`\\spadesuit`),$(`\\sub`,`\\subset`),$(`\\sube`,`\\subseteq`),$(`\\supe`,`\\supseteq`),$(`\\Tau`,`\\mathrm{T}`),$(`\\thetasym`,`\\vartheta`),$(`\\weierp`,`\\wp`),$(`\\Zeta`,`\\mathrm{Z}`),$(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),$(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),$(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),$(`\\bra`,`\\mathinner{\\langle{#1}|}`),$(`\\ket`,`\\mathinner{|{#1}\\rangle}`),$(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),$(`\\Bra`,`\\left\\langle#1\\right|`),$(`\\Ket`,`\\left|#1\\right\\rangle`);var da=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var c=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,c(!1)),i.length&&t.macros.set(`\\|`,c(!0));var l=t.consumeArg().tokens,u=t.expandTokens([...a,...l,...n]);return t.macros.endGroup(),{tokens:u.reverse(),numArgs:0}};$(`\\bra@ket`,da(!1)),$(`\\bra@set`,da(!0)),$(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),$(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),$(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),$(`\\angln`,`{\\angl n}`),$(`\\blue`,`\\textcolor{##6495ed}{#1}`),$(`\\orange`,`\\textcolor{##ffa500}{#1}`),$(`\\pink`,`\\textcolor{##ff00af}{#1}`),$(`\\red`,`\\textcolor{##df0030}{#1}`),$(`\\green`,`\\textcolor{##28ae7b}{#1}`),$(`\\gray`,`\\textcolor{gray}{#1}`),$(`\\purple`,`\\textcolor{##9d38bd}{#1}`),$(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),$(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),$(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),$(`\\blueD`,`\\textcolor{##11accd}{#1}`),$(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),$(`\\tealA`,`\\textcolor{##94fff5}{#1}`),$(`\\tealB`,`\\textcolor{##26edd5}{#1}`),$(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),$(`\\tealD`,`\\textcolor{##01a995}{#1}`),$(`\\tealE`,`\\textcolor{##208170}{#1}`),$(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),$(`\\greenB`,`\\textcolor{##8af281}{#1}`),$(`\\greenC`,`\\textcolor{##74cf70}{#1}`),$(`\\greenD`,`\\textcolor{##1fab54}{#1}`),$(`\\greenE`,`\\textcolor{##0d923f}{#1}`),$(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),$(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),$(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),$(`\\goldD`,`\\textcolor{##e07d10}{#1}`),$(`\\goldE`,`\\textcolor{##a75a05}{#1}`),$(`\\redA`,`\\textcolor{##fca9a9}{#1}`),$(`\\redB`,`\\textcolor{##ff8482}{#1}`),$(`\\redC`,`\\textcolor{##f9685d}{#1}`),$(`\\redD`,`\\textcolor{##e84d39}{#1}`),$(`\\redE`,`\\textcolor{##bc2612}{#1}`),$(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),$(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),$(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),$(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),$(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),$(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),$(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),$(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),$(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),$(`\\purpleE`,`\\textcolor{##543b78}{#1}`),$(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),$(`\\mintB`,`\\textcolor{##edf2df}{#1}`),$(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),$(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),$(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),$(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),$(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),$(`\\grayE`,`\\textcolor{##babec2}{#1}`),$(`\\grayF`,`\\textcolor{##888d93}{#1}`),$(`\\grayG`,`\\textcolor{##626569}{#1}`),$(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),$(`\\grayI`,`\\textcolor{##21242c}{#1}`),$(`\\kaBlue`,`\\textcolor{##314453}{#1}`),$(`\\kaGreen`,`\\textcolor{##71B307}{#1}`);var fa={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},pa=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new ra(ia,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new na(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg([`]`])}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new ri(`EOF`,n.loc)),this.pushTokens(r),new ri(``,ni.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(t){var n=[],r=t&&t.length>0;r||this.consumeSpaces();var i=this.future(),a,o=0,s=0;do{if(a=this.popToken(),n.push(a),a.text===`{`)++o;else if(a.text===`}`){if(--o,o===-1)throw new e(`Extra }`,a)}else if(a.text===`EOF`)throw new e(`Unexpected end of input in a macro argument, expected '`+(t&&r?t[s]:`}`)+`'`,a);if(t&&r)if((o===0||o===1&&t[s]===`{`)&&a.text===t[s]){if(++s,s===t.length){n.splice(-s,s);break}}else s=0}while(o!==0||r);return i.text===`{`&&n[n.length-1].text===`}`&&(n.pop(),n.shift()),n.reverse(),{tokens:n,start:i,end:a}}consumeArgs(t,n){if(n){if(n.length!==t+1)throw new e(`The length of delimiters doesn't match the number of args!`);for(var r=n[0],i=0;ithis.settings.maxExpand)throw new e(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(t){var n=this.popToken(),r=n.text,i=n.noexpand?null:this._getExpansion(r);if(i==null||t&&i.unexpandable){if(t&&i==null&&r[0]===`\\`&&!this.isDefined(r))throw new e(`Undefined control sequence: `+r);return this.pushToken(n),!1}this.countExpansion(1);var a=i.tokens,o=this.consumeArgs(i.numArgs,i.delimiters);if(i.numArgs){a=a.slice();for(var s=a.length-1;s>=0;--s){var c=a[s];if(c.text===`#`){if(s===0)throw new e(`Incomplete placeholder at end of macro body`,c);if(c=a[--s],c.text===`#`)a.splice(s+1,1);else if(/^[1-9]$/.test(c.text))a.splice(s,2,...o[c.text-1]);else throw new e(`Not a valid argument number`,c)}}}return this.pushTokens(a),a.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new ri(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new na(r,this.settings),s=[],c=o.lex();c.text!==`EOF`;)s.push(c),c=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||qi.hasOwnProperty(e)||A.math.hasOwnProperty(e)||A.text.hasOwnProperty(e)||fa.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t==null?qi.hasOwnProperty(e)&&!qi[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},ma=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,ha=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),ga={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},_a={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},va=class t{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new pa(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(t,n){if(n===void 0&&(n=!0),this.fetch().text!==t)throw new e(`Expected '`+t+`', got '`+this.fetch().text+`'`,this.fetch());n&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new ri(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(e,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(t.endOfExpression.has(i.text)||n&&i.text===n||e&&qi[i.text]&&qi[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var n=-1,r,i=0;i=128)this.settings.strict&&(ce(n.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+n[0]+`" used in math mode`,t):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+n[0]+`"`+(` (`+n.charCodeAt(0)+`)`),t)),o={type:`textord`,mode:`text`,loc:ni.range(t),text:n};else return null;if(this.consume(),a)for(var l=0;lt?1:e>=t?0:NaN}function d(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function f(e){let t,n,r;e.length===2?(t=e===u||e===d?e:p,n=e,r=e):(t=u,n=(t,n)=>u(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i>>1;n(e[t],r)<0?i=t+1:a=t}while(i>>1;n(e[t],r)<=0?i=t+1:a=t}while(in&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function p(){return 0}function m(e){return e===null?NaN:+e}var h=f(u),g=h.right;h.left,f(m).center;var _=Math.sqrt(50),v=Math.sqrt(10),y=Math.sqrt(2);function b(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=_?10:a>=v?5:a>=y?2:1,s,c,l;return i<0?(l=10**-i/o,s=Math.round(e*l),c=Math.round(t*l),s/lt&&--c,l=-l):(l=10**i*o,s=Math.round(e/l),c=Math.round(t/l),s*lt&&--c),c0))return[];if(e===t)return[e];let r=t=i))return[];let s=a-i+1,c=Array(s);if(r)if(o<0)for(let e=0;et&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function B(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i2?V:B,l=u=null,f}function f(t){return t==null||isNaN(t=+t)?o:(l||=c(e.map(i),n,r))(i(s(t)))}return f.invert=function(r){return s(a((u||=c(n,e.map(i),t))(r)))},f.domain=function(t){return arguments.length?(e=Array.from(t,F),d()):e.slice()},f.range=function(e){return arguments.length?(n=Array.from(e),d()):n.slice()},f.rangeRound=function(e){return n=Array.from(e),r=A,d()},f.clamp=function(e){return arguments.length?(s=e?!0:L,d()):s!==L},f.interpolate=function(e){return arguments.length?(r=e,d()):r},f.unknown=function(e){return arguments.length?(o=e,f):o},function(e,t){return i=e,a=t,d()}}function W(){return U()(L,L)}function G(e,t,n,r){var i=C(e,t,n),a;switch(r=s(r??`,f`),r.type){case`s`:var l=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=M(i,l))&&(r.precision=a),o(r,l);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=N(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=j(i))&&(r.precision=a-(r.type===`%`)*2);break}return c(r)}function K(e){var t=e.domain;return e.ticks=function(e){var n=t();return x(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return G(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],c,l,u=10;for(s0;){if(l=S(o,s,n),l===c)return r[i]=o,r[a]=s,t(r);if(l>0)o=Math.floor(o/l)*l,s=Math.ceil(s/l)*l;else if(l<0)o=Math.ceil(o*l)/l,s=Math.floor(s*l)/l;else break;c=l}return e},e}function q(){var e=W();return e.copy=function(){return H(e,q())},l.apply(e,arguments),K(e)}export{f as a,C as i,W as n,H as r,q as t}; \ No newline at end of file diff --git a/dist-desktop/assets/login-xkhUej_P.js b/dist-desktop/assets/login-xkhUej_P.js deleted file mode 100644 index 17c179c..0000000 --- a/dist-desktop/assets/login-xkhUej_P.js +++ /dev/null @@ -1 +0,0 @@ -import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{t}from"./react-BLJmJXjR.js";import{i as n,u as r}from"./utils-BTuSbA5p.js";import{c as i}from"./index-CXgd9jpl.js";import{r as a,t as o}from"./client-CwgDvMJw.js";import{i as s,r as c,t as l}from"./input-mze7gZ5r.js";var u=[{providerId:`grok-google`,idp:`google`,label:`Google`},{providerId:`grok-x`,idp:`twitter`,label:`X`}],d=e(t()),f=r();function p(){if(typeof window>`u`)return!1;let e=window.location.hostname;return e===`localhost`||e===`127.0.0.1`||e===`[::1]`}function m(){let{user:e,isPending:t}=c(),[r,m]=(0,d.useState)(``),[h,g]=(0,d.useState)(``),[_,v]=(0,d.useState)(``),[y,b]=(0,d.useState)(`signin`),[x,S]=(0,d.useState)(!1),[C,w]=(0,d.useState)(null),[T,E]=(0,d.useState)(!1);if((0,d.useEffect)(()=>E(p()),[]),!t&&e)return(0,f.jsx)(i,{to:`/`});async function D(e){e.preventDefault(),w(null),S(!0);try{if(y===`signup`){let{error:e}=await o.signUp.email({email:r.trim(),password:h,name:_.trim()||r.trim().split(`@`)[0]||`User`});if(e)throw Error(e.message??`Sign-up failed`)}else{let{error:e}=await o.signIn.email({email:r.trim(),password:h});if(e)throw Error(e.message??`Sign-in failed`)}window.location.href=`/`}catch(e){w(e instanceof Error?e.message:`Authentication failed`)}finally{S(!1)}}async function O(e){w(null),S(!0);try{await a(e,{callbackURL:`/`})}catch(e){let t=e instanceof Error?e.message:`Sign-in failed`;/invalid redirect/i.test(t)||T?w(`Google / X sign-in needs a public app URL registered with the Grok auth broker. On this machine use email & password, or open the app in a Grok live preview / deployed host.`):w(t),S(!1)}}return(0,f.jsx)(`main`,{className:`grid min-h-dvh place-items-center bg-background px-6 text-foreground`,children:(0,f.jsxs)(`div`,{className:`w-full max-w-sm space-y-6`,children:[(0,f.jsxs)(`div`,{className:`space-y-2 text-center`,children:[(0,f.jsx)(`div`,{className:`mx-auto flex size-12 items-center justify-center rounded-xl bg-foreground text-lg font-semibold text-background`,children:`F`}),(0,f.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Sign in to ForgeNotes`}),(0,f.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Signed-in pages sync to the database. Guests keep a local copy only.`})]}),T&&(0,f.jsxs)(`p`,{className:`rounded-lg border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-left text-xs leading-relaxed text-amber-950 dark:text-amber-100`,children:[(0,f.jsx)(`strong`,{className:`font-medium`,children:`Desktop / local note:`}),` Continue with Google or X uses the shared Grok auth broker, which only accepts callbacks from`,` `,(0,f.jsx)(`code`,{className:`rounded bg-black/5 px-1 dark:bg-white/10`,children:`*.grok-sandbox.com`}),` `,`(or a deployed app with its own broker credentials). For this Tauri / localhost window, use `,(0,f.jsx)(`strong`,{children:`email & password`}),` below.`]}),(0,f.jsxs)(`div`,{className:`space-y-4`,children:[(0,f.jsxs)(`form`,{onSubmit:D,className:`space-y-3`,children:[y===`signup`&&(0,f.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,f.jsx)(`label`,{htmlFor:`name`,className:`text-xs font-medium text-muted-foreground`,children:`Name`}),(0,f.jsx)(l,{id:`name`,autoComplete:`name`,value:_,onChange:e=>v(e.target.value),placeholder:`Your name`,disabled:x})]}),(0,f.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,f.jsx)(`label`,{htmlFor:`email`,className:`text-xs font-medium text-muted-foreground`,children:`Email`}),(0,f.jsx)(l,{id:`email`,type:`email`,autoComplete:`email`,required:!0,value:r,onChange:e=>m(e.target.value),placeholder:`you@example.com`,disabled:x})]}),(0,f.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,f.jsx)(`label`,{htmlFor:`password`,className:`text-xs font-medium text-muted-foreground`,children:`Password`}),(0,f.jsx)(l,{id:`password`,type:`password`,autoComplete:y===`signup`?`new-password`:`current-password`,required:!0,minLength:8,value:h,onChange:e=>g(e.target.value),placeholder:`At least 8 characters`,disabled:x})]}),(0,f.jsx)(s,{type:`submit`,className:`h-11 w-full`,disabled:x,children:x?`Working…`:y===`signup`?`Create account`:`Sign in with email`}),(0,f.jsx)(`button`,{type:`button`,className:`w-full text-center text-xs text-muted-foreground underline-offset-4 hover:underline`,disabled:x,onClick:()=>{b(e=>e===`signin`?`signup`:`signin`),w(null)},children:y===`signup`?`Already have an account? Sign in`:`Need an account? Sign up`})]}),(0,f.jsxs)(`div`,{className:`relative py-1`,children:[(0,f.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,f.jsx)(`span`,{className:`w-full border-t border-border`})}),(0,f.jsx)(`div`,{className:`relative flex justify-center text-xs uppercase`,children:(0,f.jsx)(`span`,{className:`bg-background px-2 text-muted-foreground`,children:`or`})})]}),(0,f.jsx)(`div`,{className:`space-y-2`,children:u.map(e=>(0,f.jsxs)(s,{type:`button`,variant:`outline`,className:`h-11 w-full justify-center`,disabled:x,onClick:()=>void O(e.providerId),children:[`Continue with `,e.label]},e.providerId))})]}),C&&(0,f.jsx)(`p`,{className:`rounded-lg border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive`,children:C}),(0,f.jsx)(`p`,{className:`text-center text-sm text-muted-foreground`,children:(0,f.jsx)(n,{to:`/`,className:`underline-offset-4 hover:underline`,children:`Continue as guest`})})]})})}export{m as component}; \ No newline at end of file diff --git a/dist-desktop/assets/map-BaFkSB1l.js b/dist-desktop/assets/map-BaFkSB1l.js deleted file mode 100644 index f3c4b0d..0000000 --- a/dist-desktop/assets/map-BaFkSB1l.js +++ /dev/null @@ -1 +0,0 @@ -import{$ as e,F as t,G as n,H as r,I as i,M as a,P as o,Q as s,R as c,S as ee,Z as l,_ as u,b as d,f,g as p,it as m,j as h,k as g,l as _,q as v,rt as y,tt as b,v as te,w as ne,x as re,y as ie,z as x}from"./graphlib-DS17s2tU.js";var S=Object.create,ae=function(){function e(){}return function(t){if(!l(t))return{};if(S)return S(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function C(e,t){var n=-1,r=e.length;for(t||=Array(r);++ni.map(i=>d[i]); -import{t as e}from"./index-CXgd9jpl.js";import{x as t}from"./chunk-KEIR6QF5-Dj-OpFgW.js";import"./chunk-MOZMSUNE-BgA8jCvb.js";import"./chunk-OSBZ3O6U-CX9EQ5t2.js";import"./chunk-5JV3BV7I-DKfYBAeY.js";import"./chunk-CYSBUYHQ-CbOq7Rc1.js";import"./chunk-BIQX33UG-CuPbkyWp.js";import"./chunk-EMLP6XTP-BoneA0Uo.js";import"./chunk-YOTPTUD7-CjHV8V6f.js";import"./chunk-QBLGF6JB-C9zGMqvP.js";import"./chunk-5TONJI2A-DOX2waSJ.js";import"./chunk-5HE753X5-o8-OCfIL.js";import"./chunk-U6XO7XAA-CR0BSRFR.js";import"./chunk-JG7HCLWE-Dk4_aECj.js";import"./chunk-CQNSW5MT-BbEh_krl.js";import"./chunk-R7FJI6CG-BpBhcF6R.js";import"./chunk-5FCAYU7R-DNtJmW0j.js";var n={},r={info:t(async()=>{let{createInfoServices:t}=await e(async()=>{let{createInfoServices:e}=await import(`./info-DKCQHKI2-DIc7uC4I.js`);return{createInfoServices:e}},__vite__mapDeps([0,1,2]));n.info=t().Info.parser.LangiumParser},`info`),packet:t(async()=>{let{createPacketServices:t}=await e(async()=>{let{createPacketServices:e}=await import(`./packet-7NZHBO7P-D2duWGIK.js`);return{createPacketServices:e}},__vite__mapDeps([3,1,4]));n.packet=t().Packet.parser.LangiumParser},`packet`),pie:t(async()=>{let{createPieServices:t}=await e(async()=>{let{createPieServices:e}=await import(`./pie-RZYD4A2V-CynqTUkZ.js`);return{createPieServices:e}},__vite__mapDeps([5,1,6]));n.pie=t().Pie.parser.LangiumParser},`pie`),treeView:t(async()=>{let{createTreeViewServices:t}=await e(async()=>{let{createTreeViewServices:e}=await import(`./treeView-QDETBFTQ-CygwzEgj.js`);return{createTreeViewServices:e}},__vite__mapDeps([7,1,8]));n.treeView=t().TreeView.parser.LangiumParser},`treeView`),architecture:t(async()=>{let{createArchitectureServices:t}=await e(async()=>{let{createArchitectureServices:e}=await import(`./architecture-TIHT7OUA-BWqzHezU.js`);return{createArchitectureServices:e}},__vite__mapDeps([9,1,10]));n.architecture=t().Architecture.parser.LangiumParser},`architecture`),gitGraph:t(async()=>{let{createGitGraphServices:t}=await e(async()=>{let{createGitGraphServices:e}=await import(`./gitGraph-TEB2WS4Q-Do0SQOtM.js`);return{createGitGraphServices:e}},__vite__mapDeps([11,1,12]));n.gitGraph=t().GitGraph.parser.LangiumParser},`gitGraph`),eventmodeling:t(async()=>{let{createEventModelingServices:t}=await e(async()=>{let{createEventModelingServices:e}=await import(`./eventmodeling-45OFAUF4-Dp0gpjhg.js`);return{createEventModelingServices:e}},__vite__mapDeps([13,1,14]));n.eventmodeling=t().EventModel.parser.LangiumParser},`eventmodeling`),radar:t(async()=>{let{createRadarServices:t}=await e(async()=>{let{createRadarServices:e}=await import(`./radar-I7S5WNFK-fIKE12aT.js`);return{createRadarServices:e}},__vite__mapDeps([15,1,16]));n.radar=t().Radar.parser.LangiumParser},`radar`),railroad:t(async()=>{let{createRailroadServices:t}=await e(async()=>{let{createRailroadServices:e}=await import(`./railroad-3IZDKUUU-Bgx8HJTj.js`);return{createRailroadServices:e}},__vite__mapDeps([17,1,18]));n.railroad=t().Railroad.parser.LangiumParser},`railroad`),railroadEbnf:t(async()=>{let{createRailroadEbnfServices:t}=await e(async()=>{let{createRailroadEbnfServices:e}=await import(`./railroad-ebnf-EBAXGLYW-C74h3s_I.js`);return{createRailroadEbnfServices:e}},__vite__mapDeps([19,1,20]));n.railroadEbnf=t().RailroadEbnf.parser.LangiumParser},`railroadEbnf`),railroadAbnf:t(async()=>{let{createRailroadAbnfServices:t}=await e(async()=>{let{createRailroadAbnfServices:e}=await import(`./railroad-abnf-AHOZXSZD-Nh6k60mH.js`);return{createRailroadAbnfServices:e}},__vite__mapDeps([21,1,22]));n.railroadAbnf=t().RailroadAbnf.parser.LangiumParser},`railroadAbnf`),railroadPeg:t(async()=>{let{createRailroadPegServices:t}=await e(async()=>{let{createRailroadPegServices:e}=await import(`./railroad-peg-LSFZ7HO6-0hT-lN-u.js`);return{createRailroadPegServices:e}},__vite__mapDeps([23,1,24]));n.railroadPeg=t().RailroadPeg.parser.LangiumParser},`railroadPeg`),treemap:t(async()=>{let{createTreemapServices:t}=await e(async()=>{let{createTreemapServices:e}=await import(`./treemap-6X3UGDF4-BbCXbaXr.js`);return{createTreemapServices:e}},__vite__mapDeps([25,1,26]));n.treemap=t().Treemap.parser.LangiumParser},`treemap`),wardley:t(async()=>{let{createWardleyServices:t}=await e(async()=>{let{createWardleyServices:e}=await import(`./wardley-OPB4EBWU-BjXxCRf_.js`);return{createWardleyServices:e}},__vite__mapDeps([27,1,28]));n.wardley=t().Wardley.parser.LangiumParser},`wardley`),cynefin:t(async()=>{let{createCynefinServices:t}=await e(async()=>{let{createCynefinServices:e}=await import(`./cynefin-VYW2F7L2-4m18BxUG.js`);return{createCynefinServices:e}},__vite__mapDeps([29,1,30]));n.cynefin=t().Cynefin.parser.LangiumParser},`cynefin`)};async function i(e,t){let i=r[e];if(!i)throw Error(`Unknown diagram type: ${e}`);n[e]||await i();let o=n[e].parse(t);if(o.lexerErrors.length>0||o.parserErrors.length>0)throw new a(o);return o.value}t(i,`parse`);var a=class extends Error{constructor(e){let t=e.lexerErrors.map(e=>`Lexer error on line ${e.line!==void 0&&!isNaN(e.line)?e.line:`?`}, column ${e.column!==void 0&&!isNaN(e.column)?e.column:`?`}: ${e.message}`).join(` -`),n=e.parserErrors.map(e=>`Parse error on line ${e.token.startLine!==void 0&&!isNaN(e.token.startLine)?e.token.startLine:`?`}, column ${e.token.startColumn!==void 0&&!isNaN(e.token.startColumn)?e.token.startColumn:`?`}: ${e.message}`).join(` -`);super(`Parsing failed: ${t} ${n}`),this.result=e}static{t(this,`MermaidParseError`)}};export{i as n,a as t}; \ No newline at end of file diff --git a/dist-desktop/assets/mermaid.core-lwoghoVk.js b/dist-desktop/assets/mermaid.core-lwoghoVk.js deleted file mode 100644 index 280727f..0000000 --- a/dist-desktop/assets/mermaid.core-lwoghoVk.js +++ /dev/null @@ -1,11 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/c4Diagram-LMCZKHZV-B2PQ0JjZ.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-UMNXGZaF.js","assets/rolldown-runtime-aKtaBQYM.js","assets/chunk-WYO6CB5R-Dv5kDyQC.js","assets/index-CXgd9jpl.js","assets/react-BLJmJXjR.js","assets/utils-BTuSbA5p.js","assets/dist-qx0Iv9vM.js","assets/chunk-ICXQ74PX-Czpgj8Uw.js","assets/chunk-32BRIVSS-DWU3ezKg.js","assets/flowDiagram-23GEKE2U-mMOyit70.js","assets/chunk-HOUHSVGY-iJuv90UH.js","assets/chunk-Q4XR5HBZ-CQ8zkLYc.js","assets/chunk-7BUUIJ7U-Bb538aSH.js","assets/chunk-OGEWGWER-D-nWYRNR.js","assets/chunk-XXDRQBXY-Bq6zMMOx.js","assets/chunk-VR4S4FIN-BTo4eV3J.js","assets/chunk-C7G6YPKG-DW-1jWUA.js","assets/chunk-ZGVPDNZ5-DGInJAPD.js","assets/rough.esm-CSKSodPl.js","assets/chunk-52WLFC77-BOCvVCX1.js","assets/line-b9Ala942.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/chunk-FWX5IMBZ-ComLEIwh.js","assets/chunk-ZIRB5QZD-C6fEPe3t.js","assets/chunk-PUDLZKDR-hlw4TonS.js","assets/channel-C4fgBBJ4.js","assets/chunk-5VM5RSS4-ZNzvKenW.js","assets/swimlanesDiagram-G3AALYLV-CGWZF_2o.js","assets/erDiagram-Q63AITRT-BwmdWLsf.js","assets/gitGraphDiagram-IHSO6WYX-CPtw8GFs.js","assets/chunk-JWPE2WC7-DVXcaiue.js","assets/mermaid-parser.core-Z7xZAZRH.js","assets/chunk-KEIR6QF5-Dj-OpFgW.js","assets/chunk-MOZMSUNE-BgA8jCvb.js","assets/chunk-OSBZ3O6U-CX9EQ5t2.js","assets/chunk-5JV3BV7I-DKfYBAeY.js","assets/chunk-CYSBUYHQ-CbOq7Rc1.js","assets/chunk-BIQX33UG-CuPbkyWp.js","assets/chunk-EMLP6XTP-BoneA0Uo.js","assets/chunk-YOTPTUD7-CjHV8V6f.js","assets/chunk-QBLGF6JB-C9zGMqvP.js","assets/chunk-5TONJI2A-DOX2waSJ.js","assets/chunk-5HE753X5-o8-OCfIL.js","assets/chunk-U6XO7XAA-CR0BSRFR.js","assets/chunk-JG7HCLWE-Dk4_aECj.js","assets/chunk-CQNSW5MT-BbEh_krl.js","assets/chunk-R7FJI6CG-BpBhcF6R.js","assets/chunk-5FCAYU7R-DNtJmW0j.js","assets/chunk-2Q5K7J3B-C1jixKkw.js","assets/ganttDiagram-NO4QXBWP-BFiNAWzu.js","assets/linear-DhAcoVP9.js","assets/defaultLocale-C8Fc0cco.js","assets/init-D6jRqBbL.js","assets/infoDiagram-FWYZ7A6U-BY1UX4W6.js","assets/chunk-VAUOI2AC-AC9pRUsa.js","assets/pieDiagram-ENE6RG2P-BBPaHS9V.js","assets/ordinal-hYBb2elL.js","assets/arc-DqK6O3qL.js","assets/quadrantDiagram-ABIIQ3AL-UafGc-sH.js","assets/xychartDiagram-FW5EYKEG-HaTasnSW.js","assets/requirementDiagram-TGXJPOKE-Bk3E4jWx.js","assets/sequenceDiagram-DBY2YBRQ-CUG55-r_.js","assets/classDiagram-OUVF2IWQ-D6qCu_tS.js","assets/chunk-V7JOEXUC-Drt5hFEy.js","assets/classDiagram-v2-EOCWNBFH-D6qCu_tS.js","assets/stateDiagram-2N3HPSRC-u60ROSPY.js","assets/graphlib-DS17s2tU.js","assets/dagre-dpRSp0QF.js","assets/map-BaFkSB1l.js","assets/chunk-EX3LRPZG-CzaF5a2T.js","assets/stateDiagram-v2-6OUMAXLB-CR3Ef9C0.js","assets/journeyDiagram-5HDEW3XC-CCn-uNlj.js","assets/timeline-definition-FHXFAJF6-DFMIv6oI.js","assets/mindmap-definition-LN4V7U3C-Bib4remL.js","assets/kanban-definition-HUTT4EX6-CW9CwpnR.js","assets/sankeyDiagram-HTMAVEWB-oWnBtA7E.js","assets/diagram-NH7WQ7WH-Btsva5Mx.js","assets/diagram-WEI45ONY-DzxhBgyP.js","assets/blockDiagram-677ZJIJ3-Dn3HALPW.js","assets/diagram-OA4YK3LP-B1b6NwZz.js","assets/architectureDiagram-ZJ3FMSHR-DevFyLmc.js","assets/cytoscape.esm-CQFVGiJu.js","assets/diagram-FQU43EPY-C8Vn5v8I.js","assets/ishikawaDiagram-FXEZZL3T-Jj-U8PJa.js","assets/vennDiagram-L72KCM5P-DkYnXwoc.js","assets/diagram-G47NLZAW-B5XCVQOu.js","assets/wardleyDiagram-EHGQE667-BewauNW1.js","assets/cynefinDiagram-TSTJHNR4-CAKFzgf0.js","assets/railroadDiagram-RFXS5EU6-D7w_TgGh.js","assets/chunk-MOJQB5TN-Bju_yCKi.js","assets/ebnfDiagram-CCIWWBDH-DiJBARG_.js","assets/abnfDiagram-VRR7QNED-DLdRCqX4.js","assets/pegDiagram-2B236MQR-CPt8QfP3.js"])))=>i.map(i=>d[i]); -import{t as e}from"./index-CXgd9jpl.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{h as n,m as r,p as i}from"./src-UMNXGZaF.js";import{$ as a,C as o,E as s,I as c,L as l,N as u,P as d,Q as f,S as p,T as m,V as h,W as g,X as _,Z as v,_ as y,b,c as x,g as S,l as C,m as w,n as ee,p as T,q as te,r as ne,t as re,u as ie}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{S as ae,a as oe,f as E,g as D,h as se,i as ce,o as le,v as ue,x as de,y as fe}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as pe}from"./chunk-VAUOI2AC-AC9pRUsa.js";import{r as me}from"./chunk-HOUHSVGY-iJuv90UH.js";import{r as he}from"./chunk-Q4XR5HBZ-CQ8zkLYc.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-D-nWYRNR.js";import"./chunk-C7G6YPKG-DW-1jWUA.js";import"./chunk-ZGVPDNZ5-DGInJAPD.js";import"./chunk-52WLFC77-BOCvVCX1.js";import{n as ge}from"./chunk-FWX5IMBZ-ComLEIwh.js";import{n as _e,t as ve}from"./chunk-ZIRB5QZD-C6fEPe3t.js";function ye(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function be(e){if(e==null)return!0;if(de(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!ae(e)&&!ue(e)&&!fe(e)?!1:e.length===0;if(typeof e==`object`||typeof e==`function`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return ye(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var O=`comm`,xe=`rule`,Se=`decl`,Ce=`@import`,we=`@namespace`,Te=`@keyframes`,Ee=`@layer`,De=Math.abs,k=String.fromCharCode;function Oe(e){return e.trim()}function A(e,t,n){return e.replace(t,n)}function j(e,t){return e.charCodeAt(t)|0}function M(e,t,n){return e.slice(t,n)}function N(e){return e.length}function ke(e){return e.length}function P(e,t){return t.push(e),e}var F=1,I=1,Ae=0,L=0,R=0,z=``;function B(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:F,column:I,length:o,return:``,siblings:s}}function je(){return R}function Me(){return R=L>0?j(z,--L):0,I--,R===10&&(I=1,F--),R}function V(){return R=L2||G(R)>3?``:` `}function Ie(e,t){for(;--t&&V()&&!(R<48||R>102||R>57&&R<65||R>70&&R<97););return W(e,U()+(t<6&&H()==32&&V()==32))}function q(e){for(;V();)switch(R){case e:return L;case 34:case 39:e!==34&&e!==39&&q(R);break;case 40:e===41&&q(e);break;case 92:V();break}return L}function Le(e,t){for(;V()&&e+R!==57&&!(e+R===84&&H()===47););return`/*`+W(t,L-1)+`*`+k(e===47?e:V())}function Re(e){for(;!G(H());)V();return W(e,L)}function ze(e){return Pe(J(``,null,null,null,[``],e=Ne(e),0,[0],e))}function J(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=0,b=``,x=i,S=a,C=r,w=b;g;)switch(m=y,y=V()){case 40:m!=108&&j(w,d-1)==58?(v++,w+=`(`):w+=K(y);break;case 41:v--,w+=`)`;break;case 34:case 39:case 91:w+=K(y);break;case 9:case 10:case 13:case 32:if(v>0){w+=k(y);break}w+=Fe(m);break;case 92:w+=Ie(U()-1,7);continue;case 47:switch(H()){case 42:case 47:P(Ve(Le(V(),U()),t,n,c),c),(G(m||1)==5||G(H()||1)==5)&&N(w)&&M(w,-1,void 0)!==` `&&(w+=` `);break;default:w+=`/`}break;case 123*h:s[l++]=N(w)*_;case 125*h:case 59:case 0:if(v>0&&y){w+=k(y);break}switch(y){case 0:case 125:g=0;case 59+u:_==-1&&(w=A(w,/\f/g,``)),p>0&&(N(w)-d||h===0)&&P(p>32?He(w+`;`,r,n,d-1,c):He(A(w,` `,``)+`;`,r,n,d-2,c),c);break;case 59:w+=`;`;default:if(P(C=Be(w,t,n,l,u,i,s,b,x=[],S=[],d,a),a),y===123)if(u===0)J(w,t,C,C,x,a,d,s,S);else{switch(f){case 99:if(j(w,3)===110)break;case 108:if(j(w,2)===97)break;default:u=0;case 100:case 109:case 115:}u?J(e,C,C,r&&P(Be(e,C,C,0,0,i,s,b,i,x=[],d,S),S),i,S,d,s,r?x:S):J(w,C,C,C,[``],S,0,s,S)}}l=u=p=0,h=_=1,b=w=``,d=o;break;case 58:d=1+N(w),p=m;default:if(h<1){if(y==123)--h;else if(y==125&&h++==0&&Me()==125)continue}switch(w+=k(y),y*h){case 38:_=u>0?1:(w+=`\f`,-1);break;case 44:if(v>0)break;s[l++]=(N(w)-1)*_,_=1;break;case 64:H()===45&&(w+=K(V())),f=H(),u=d=N(b=w+=Re(U())),y++;break;case 45:m===45&&N(w)==2&&(h=0)}}return a}function Be(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=ke(p),h=0,g=0,_=0;h0?p[v]+` `+y:A(y,/&\f/g,p[v])))&&(c[_++]=b);return B(e,t,n,i===0?xe:s,c,l,u,d)}function Ve(e,t,n,r){return B(e,t,n,O,k(je()),M(e,2,-2),0,r)}function He(e,t,n,r,i){return B(e,t,n,Se,M(e,0,r),M(e,r+1,-1),r,i)}function Ue(e,t){for(var n=``,r=0;r/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./c4Diagram-LMCZKHZV-B2PQ0JjZ.js`);return{diagram:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]));return{id:Ke,diagram:t}},`loader`)},Je=`flowchart`,Ye={id:Je,detector:t((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./flowDiagram-23GEKE2U-mMOyit70.js`);return{diagram:e}},__vite__mapDeps([11,2,3,1,4,5,6,7,9,8,12,13,14,15,10,16,17,18,19,20,21,22,23,24,25,26,27,28,29]));return{id:Je,diagram:t}},`loader`)},Xe=`flowchart-v2`,Ze={id:Xe,detector:t((e,t)=>t?.flowchart?.defaultRenderer===`dagre-d3`?!1:(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./flowDiagram-23GEKE2U-mMOyit70.js`);return{diagram:e}},__vite__mapDeps([11,2,3,1,4,5,6,7,9,8,12,13,14,15,10,16,17,18,19,20,21,22,23,24,25,26,27,28,29]));return{id:Xe,diagram:t}},`loader`)},Qe=`swimlane`,$e={id:Qe,detector:t(e=>/^\s*swimlane-beta\b/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./swimlanesDiagram-G3AALYLV-CGWZF_2o.js`);return{diagram:e}},__vite__mapDeps([30,1,2,3,4,5,6,7,9,8,12,13,14,15,10,16,17,18,19,20,21,22,23,24,25,26,27,28,29]));return{id:Qe,diagram:t}},`loader`)},et=`er`,tt={id:et,detector:t(e=>/^\s*erDiagram/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./erDiagram-Q63AITRT-BwmdWLsf.js`);return{diagram:e}},__vite__mapDeps([31,1,2,3,4,5,6,7,28,9,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25]));return{id:et,diagram:t}},`loader`)},nt=`gitGraph`,rt={id:nt,detector:t(e=>/^\s*gitGraph/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-IHSO6WYX-CPtw8GFs.js`);return{diagram:e}},__vite__mapDeps([32,1,2,3,4,5,6,7,9,8,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51]));return{id:nt,diagram:t}},`loader`)},it=`gantt`,at={id:it,detector:t(e=>/^\s*gantt/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./ganttDiagram-NO4QXBWP-BFiNAWzu.js`);return{diagram:e}},__vite__mapDeps([52,3,1,2,4,5,6,7,53,54,55,8,9]));return{id:it,diagram:t}},`loader`)},ot=`info`,st={id:ot,detector:t(e=>/^\s*info/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./infoDiagram-FWYZ7A6U-BY1UX4W6.js`);return{diagram:e}},__vite__mapDeps([56,1,2,3,4,5,6,7,57,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50]));return{id:ot,diagram:t}},`loader`)},ct=`pie`,lt={id:ct,detector:t(e=>/^\s*pie/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./pieDiagram-ENE6RG2P-BBPaHS9V.js`);return{diagram:e}},__vite__mapDeps([58,1,2,3,4,5,6,7,59,55,23,8,60,24,9,57,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50]));return{id:ct,diagram:t}},`loader`)},ut=`quadrantChart`,dt={id:ut,detector:t(e=>/^\s*quadrantChart/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./quadrantDiagram-ABIIQ3AL-UafGc-sH.js`);return{diagram:e}},__vite__mapDeps([61,1,2,3,4,5,6,7,53,54,55]));return{id:ut,diagram:t}},`loader`)},ft=`xychart`,pt={id:ft,detector:t(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./xychartDiagram-FW5EYKEG-HaTasnSW.js`);return{diagram:e}},__vite__mapDeps([62,1,2,3,4,5,6,7,53,54,55,59,9,8,22,23,24,57,12,13]));return{id:ft,diagram:t}},`loader`)},mt=`requirement`,ht={id:mt,detector:t(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./requirementDiagram-TGXJPOKE-Bk3E4jWx.js`);return{diagram:e}},__vite__mapDeps([63,1,2,3,4,5,6,7,9,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25]));return{id:mt,diagram:t}},`loader`)},gt=`sequence`,_t={id:gt,detector:t(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./sequenceDiagram-DBY2YBRQ-CUG55-r_.js`);return{diagram:e}},__vite__mapDeps([64,1,2,3,4,5,6,7,8,9,10,51,26]));return{id:gt,diagram:t}},`loader`)},vt=`class`,yt={id:vt,detector:t((e,t)=>t?.class?.defaultRenderer!==`dagre-wrapper`&&/^\s*classDiagram/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./classDiagram-OUVF2IWQ-D6qCu_tS.js`);return{diagram:e}},__vite__mapDeps([65,1,2,3,4,5,6,7,9,8,12,13,14,15,10,16,17,18,19,20,21,22,23,24,25,66,29]));return{id:vt,diagram:t}},`loader`)},bt=`classDiagram`,xt={id:bt,detector:t((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./classDiagram-v2-EOCWNBFH-D6qCu_tS.js`);return{diagram:e}},__vite__mapDeps([67,1,2,3,4,5,6,7,9,8,12,13,14,15,10,16,17,18,19,20,21,22,23,24,25,66,29]));return{id:bt,diagram:t}},`loader`)},St=`state`,Ct={id:St,detector:t((e,t)=>t?.state?.defaultRenderer!==`dagre-wrapper`&&/^\s*stateDiagram/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./stateDiagram-2N3HPSRC-u60ROSPY.js`);return{diagram:e}},__vite__mapDeps([68,1,2,3,4,5,6,7,9,8,22,23,24,12,13,14,15,69,70,71,10,16,17,18,19,20,21,25,72]));return{id:St,diagram:t}},`loader`)},wt=`stateDiagram`,Tt={id:wt,detector:t((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-6OUMAXLB-CR3Ef9C0.js`);return{diagram:e}},__vite__mapDeps([73,1,2,3,4,5,6,7,9,8,12,13,14,15,10,16,17,18,19,20,21,22,23,24,25,72]));return{id:wt,diagram:t}},`loader`)},Et=`journey`,Dt={id:Et,detector:t(e=>/^\s*journey/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./journeyDiagram-5HDEW3XC-CCn-uNlj.js`);return{diagram:e}},__vite__mapDeps([74,1,2,3,4,5,6,7,60,23,8,29,10]));return{id:Et,diagram:t}},`loader`)},Ot={draw:t((e,t,n)=>{r.debug(`rendering svg for syntax error -`);let i=pe(t),a=i.append(`g`);i.attr(`viewBox`,`0 0 2412 512`),x(i,100,512,!0),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),a.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),a.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),a.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},kt=Ot,At={db:{},renderer:Ot,parser:{parse:t(()=>{},`parse`)}},jt=`flowchart-elk`,Mt={id:jt,detector:t((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./flowDiagram-23GEKE2U-mMOyit70.js`);return{diagram:e}},__vite__mapDeps([11,2,3,1,4,5,6,7,9,8,12,13,14,15,10,16,17,18,19,20,21,22,23,24,25,26,27,28,29]));return{id:jt,diagram:t}},`loader`)},Nt=`timeline`,Pt={id:Nt,detector:t(e=>/^\s*timeline/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./timeline-definition-FHXFAJF6-DFMIv6oI.js`);return{diagram:e}},__vite__mapDeps([75,1,2,3,4,5,6,7,60,23,8,9,57]));return{id:Nt,diagram:t}},`loader`)},Ft=`mindmap`,It={id:Ft,detector:t(e=>/^\s*mindmap/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./mindmap-definition-LN4V7U3C-Bib4remL.js`);return{diagram:e}},__vite__mapDeps([76,1,2,3,4,5,6,7,9,8,12,13,14,15,16,17,18,19,20,21,22,23,24,25]));return{id:Ft,diagram:t}},`loader`)},Lt=`kanban`,Rt={id:Lt,detector:t(e=>/^\s*kanban/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./kanban-definition-HUTT4EX6-CW9CwpnR.js`);return{diagram:e}},__vite__mapDeps([77,1,2,3,4,5,6,7,9,8,57,12,13,29,15,18,19,20,26]));return{id:Lt,diagram:t}},`loader`)},zt=`sankey`,Bt={id:zt,detector:t(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./sankeyDiagram-HTMAVEWB-oWnBtA7E.js`);return{diagram:e}},__vite__mapDeps([78,1,2,3,4,5,6,7,59,55]));return{id:zt,diagram:t}},`loader`)},Vt=`packet`,Ht={id:Vt,detector:t(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-NH7WQ7WH-Btsva5Mx.js`);return{diagram:e}},__vite__mapDeps([79,1,2,3,4,5,6,7,9,8,57,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50]));return{id:Vt,diagram:t}},`loader`)},Ut=`radar`,Wt={id:Ut,detector:t(e=>/^\s*radar-beta/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-WEI45ONY-DzxhBgyP.js`);return{diagram:e}},__vite__mapDeps([80,1,2,3,4,5,6,7,9,8,57,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50]));return{id:Ut,diagram:t}},`loader`)},Gt=`block`,Kt={id:Gt,detector:t(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./blockDiagram-677ZJIJ3-Dn3HALPW.js`);return{diagram:e}},__vite__mapDeps([81,1,2,3,4,5,6,7,28,9,8,22,23,24,12,13,29,14,15,69]));return{id:Gt,diagram:t}},`loader`)},qt=`treeView`,Jt={id:qt,detector:t(e=>/^\s*treeView-beta/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-OA4YK3LP-B1b6NwZz.js`);return{diagram:e}},__vite__mapDeps([82,1,2,3,4,5,6,7,9,8,57,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,12,51]));return{id:qt,diagram:t}},`loader`)},Yt=`architecture`,Xt={id:Yt,detector:t(e=>/^\s*architecture/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./architectureDiagram-ZJ3FMSHR-DevFyLmc.js`);return{diagram:e}},__vite__mapDeps([83,3,1,2,4,5,6,7,9,8,57,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,12,13,84]));return{id:Yt,diagram:t}},`loader`)},Zt=`eventmodeling`,Qt={id:Zt,detector:t(e=>/^\s*eventmodeling/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-FQU43EPY-C8Vn5v8I.js`);return{diagram:e}},__vite__mapDeps([85,35,1,2,3,4,5,6,7,9,8,33,34,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50]));return{id:Zt,diagram:t}},`loader`)},$t=`ishikawa`,en={id:$t,detector:t(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-FXEZZL3T-Jj-U8PJa.js`);return{diagram:e}},__vite__mapDeps([86,1,2,3,4,5,6,7,9,8,57,20]));return{id:$t,diagram:t}},`loader`)},tn=`venn`,nn={id:tn,detector:t(e=>/^\s*venn-beta/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./vennDiagram-L72KCM5P-DkYnXwoc.js`);return{diagram:e}},__vite__mapDeps([87,1,2,3,4,5,6,7,9,8,57,20]));return{id:tn,diagram:t}},`loader`)},rn=`treemap`,an={id:rn,detector:t(e=>/^\s*treemap/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./diagram-G47NLZAW-B5XCVQOu.js`);return{diagram:e}},__vite__mapDeps([88,1,2,3,4,5,6,7,59,55,54,9,8,57,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,17,18]));return{id:rn,diagram:t}},`loader`)},on=`wardley`,sn={id:on,detector:t(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./wardleyDiagram-EHGQE667-BewauNW1.js`);return{diagram:e}},__vite__mapDeps([89,1,2,3,4,5,6,7,9,8,57,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50]));return{id:on,diagram:t}},`loader`)},cn=`cynefin`,ln={id:cn,detector:t(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./cynefinDiagram-TSTJHNR4-CAKFzgf0.js`);return{diagram:e}},__vite__mapDeps([90,1,2,3,4,5,6,7,9,8,57,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50]));return{id:cn,diagram:t}},`loader`)},un=`railroad`,dn={id:un,detector:t(e=>/^\s*railroad-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./railroadDiagram-RFXS5EU6-D7w_TgGh.js`);return{diagram:e}},__vite__mapDeps([91,44,35,1,2,3,4,5,6,7,57,92,33,34,36,37,38,39,40,41,42,43,45,46,47,48,49,50]));return{id:un,diagram:t}},`loader`)},fn=`railroadEbnf`,pn={id:fn,detector:t(e=>/^\s*railroad-ebnf-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./ebnfDiagram-CCIWWBDH-DiJBARG_.js`);return{diagram:e}},__vite__mapDeps([93,46,35,1,2,3,4,5,6,7,57,92,33,34,36,37,38,39,40,41,42,43,44,45,47,48,49,50]));return{id:fn,diagram:t}},`loader`)},mn=`railroadAbnf`,hn={id:mn,detector:t(e=>/^\s*railroad-abnf-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./abnfDiagram-VRR7QNED-DLdRCqX4.js`);return{diagram:e}},__vite__mapDeps([94,45,35,1,2,3,4,5,6,7,57,92,33,34,36,37,38,39,40,41,42,43,44,46,47,48,49,50]));return{id:mn,diagram:t}},`loader`)},gn=`railroadPeg`,_n={id:gn,detector:t(e=>/^\s*railroad-peg-beta/i.test(e),`detector`),loader:t(async()=>{let{diagram:t}=await e(async()=>{let{diagram:e}=await import(`./pegDiagram-2B236MQR-CPt8QfP3.js`);return{diagram:e}},__vite__mapDeps([95,47,35,1,2,3,4,5,6,7,57,92,33,34,36,37,38,39,40,41,42,43,44,45,46,48,49,50]));return{id:gn,diagram:t}},`loader`)},vn=!1,Y=t(()=>{vn||(vn=!0,u(`error`,At,e=>e.toLowerCase().trim()===`error`),u(`---`,{db:{clear:t(()=>{},`clear`)},styles:{},renderer:{draw:t(()=>{},`draw`)},parser:{parse:t(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:t(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),d(Mt,It,Xt),d(qe,Rt,xt,yt,tt,at,st,lt,ht,_t,$e,Ze,Ye,Pt,rt,Tt,Ct,Dt,dt,Bt,Ht,pt,Kt,Qt,Jt,Wt,en,an,dn,pn,hn,_n,nn,sn,ln))},`addDiagrams`),yn=t(async()=>{r.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(w).map(async([e,{detector:t,loader:n}])=>{if(n)try{p(e)}catch{try{let{diagram:e,id:r}=await n();u(r,e,t)}catch(t){throw r.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete w[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){r.error(`Failed to load ${e.length} external diagrams`);for(let t of e)r.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),bn=`graphics-document document`;function xn(e,t){e.attr(`role`,bn),t!==``&&e.attr(`aria-roledescription`,t)}t(xn,`setA11yDiagramInfo`);function Sn(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}t(Sn,`addSVGa11yTitleDescription`);var Cn=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{t(this,`Diagram`)}static async fromText(t,n={}){let r=b(),i=T(t,r);t=le(t)+` -`;try{p(i)}catch{let e=o(i);if(!e)throw new re(`Diagram ${i} not found.`);let{id:t,diagram:n}=await e();u(t,n)}let{db:a,parser:s,renderer:c,init:l}=p(i);return s.parser&&(s.parser.yy=a),a.clear?.(),l?.(r),n.title&&a.setDiagramTitle?.(n.title),await s.parse(t),new e(i,t,a,s,c)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},wn=[],Tn=t(()=>{wn.forEach(e=>{e()}),wn=[]},`attachFunctions`),En=t(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`);function Dn(e){let t=e.match(y);if(!t)return{text:e,metadata:{}};let n=t[1],r=_e(n?t[2].split(` -`).map(e=>e.startsWith(n)?e.slice(n.length):e).join(` -`):t[2],{schema:ve})??{};r=typeof r==`object`&&!Array.isArray(r)?r:{};let i={};return r.displayMode&&(i.displayMode=r.displayMode.toString()),r.title&&(i.title=r.title.toString()),r.config&&(i.config=r.config),{text:e.slice(t[0].length),metadata:i}}t(Dn,`extractFrontMatter`);var On=t(e=>e.replace(/\r\n?/g,` -`).replace(/<(\w+)([^>]*)>/g,(e,t,n)=>`<`+t+n.replace(/="([^"]*)"/g,`='$1'`)+`>`),`cleanupText`),kn=t(e=>{let{text:t,metadata:n}=Dn(e),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||={},a.gantt.displayMode=r),{title:i,config:a,text:t}},`processFrontmatter`),An=t(e=>{let t=D.detectInit(e)??{},n=D.detectDirective(e,`wrap`);return Array.isArray(n)?t.wrap=n.some(({type:e})=>e===`wrap`):n?.type===`wrap`&&(t.wrap=!0),{text:se(e),directive:t}},`processDirectives`);function jn(e){let t=kn(On(e)),n=An(t.text),r=ce(t.config,n.directive);return e=En(n.text),{code:e,title:t.title,config:r}}t(jn,`preprocessDiagram`);function Mn(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}t(Mn,`toBase64`);var Nn=5e4,Pn=`graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa`,Fn=`sandbox`,In=`loose`,Ln=`http://www.w3.org/2000/svg`,Rn=`http://www.w3.org/1999/xlink`,zn=`http://www.w3.org/1999/xhtml`,Bn=`100%`,Vn=`100%`,Hn=`border:0;margin:0;`,Un=`margin:0`,Wn=`allow-top-navigation-by-user-activation allow-popups`,Gn=`The "iframe" tag is not supported by your browser.`,Kn=[`foreignobject`],qn=[`dominant-baseline`];function X(e){let t=jn(e);return c(),ee(t.config??{}),t}t(X,`processAndSetConfigs`);async function Jn(e,t){Y();try{let{code:t,config:n}=X(e);return{diagramType:(await or(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}t(Jn,`parse`);var Yn=t((e,t,n=[])=>`.${e} ${t} ${l(`{ ${n.join(` !important; `)} !important; }`)}`,`cssImportantStyles`),Xn=t((e,t=new Map)=>{let n=new CSSStyleSheet;if(e.fontFamily!==void 0&&n.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,n.cssRules.length),e.altFontFamily!==void 0&&n.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,n.cssRules.length),t instanceof Map){let r=m(e)?[`> *`,`span`]:[`rect`,`polygon`,`ellipse`,`circle`,`path`];t.forEach(e=>{be(e.styles)||r.forEach(t=>{n.insertRule(Yn(e.id,t,e.styles),n.cssRules.length)}),be(e.textStyles)||n.insertRule(Yn(e.id,`tspan`,(e?.textStyles||[]).map(e=>e.replace(`color`,`fill`))),n.cssRules.length)})}let r=``;if(e.themeCSS!==void 0)if(typeof n.replaceSync==`function`){let t=new CSSStyleSheet;t.replaceSync(e.themeCSS),r=C(t)+` -`}else r+=`${e.themeCSS} -`;return r+C(n)},`createCssStyles`),Zn=t((e,n)=>Ue(ze(`${e}{${n}}`),Ge([t(function(t,n,i,a){if(t.type===`rule`&&Array.isArray(t.props)){if(t.parent&&t.parent.type===`@keyframes`)return;t.props=t.props.map(t=>t.startsWith(e)?t:`${e} ${t}`)}else t.type.startsWith(`@`)&&([`@media`,`@supports`,`@layer`,`@scope`,`@container`,`@starting-style`,`@keyframes`].includes(t.type)||(r.warn(`Removing unsupported at-rule ${t.type} from CSS`),t.type=O))},`addNamespace`),We])),`compileCSS`),Qn=t((e,t,n,r)=>Zn(r,_(t,Xn(e,n),{...e.themeVariables,theme:e.theme,look:e.look},r)),`createUserStyles`),$n=t((e=``,t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,`marker-end="url(#`)),r=oe(r),r=r.replace(/
    /g,`
    `),r},`cleanUpSvgCode`),er=t((e=``,t)=>``,`putIntoIFrame`),tr=t((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,Ln);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`);function nr(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}t(nr,`sandboxedIframe`);var rr=t((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),ir=t(async function(e,n,o){Y();let s=X(n);n=s.code;let c=b();r.debug(c),n.length>(c?.maxTextSize??Nn)&&(n=Pn);let l=`#${e}`,u=`i`+e,d=`#`+u,f=`d`+e,p=`#`+f,m=t(()=>{let e=i(g?d:p).node();e&&`remove`in e&&e.remove()},`removeTempElements`),h=i(document.body),g=c.securityLevel===Fn,_=c.securityLevel===In,v=c.fontFamily;o===void 0?(rr(document,e,f,u),g?(h=i(nr(i(document.body),u).nodes()[0].contentDocument.body),h.node().style.margin=`0`):h=i(`body`),tr(h,e,f)):(o&&(o.innerHTML=``),g?(h=i(nr(i(o),u).nodes()[0].contentDocument.body),h.node().style.margin=`0`):h=i(o),tr(h,e,f,`font-family: ${v}`,Rn));let y,x;try{y=await Cn.fromText(n,{title:s.title})}catch(e){if(c.suppressErrorRendering)throw m(),e;y=await Cn.fromText(`error`),x=e}let C=h.select(p).node(),w=y.type,ee=C.firstChild,T=ee.firstChild,te=y.renderer.getClasses?.(n,y),ne=Qn(c,w,te,l),re=document.createElement(`style`);re.innerHTML=ne,ee.insertBefore(re,T);try{await y.renderer.draw(n,e,`11.16.0`,y)}catch(t){throw c.suppressErrorRendering?m():kt.draw(n,e,`11.16.0`),t}let ie=h.select(`${p} svg`),ae=y.db.getAccTitle?.(),oe=y.db.getAccDescription?.();sr(w,ie,ae,oe),h.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,zn);let E=h.select(p).node().innerHTML;if(r.debug(`config.arrowMarkerAbsolute`,c.arrowMarkerAbsolute),E=$n(E,g,S(c.arrowMarkerAbsolute)),g){let e=h.select(p+` svg`).node();E=er(E,e)}else _||(E=a.sanitize(E,{ADD_TAGS:Kn,ADD_ATTR:qn,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Tn(),x)throw x;return m(),{diagramType:w,svg:E,bindFunctions:y.db.bindFunctions}},`render`);function ar(e={}){let t=ne({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||={},t.themeVariables.fontFamily=t.fontFamily),h(t),t?.theme&&t.theme in v?t.themeVariables=v[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=v.default.getThemeVariables(t.themeVariables)),n((typeof t==`object`?te(t):s()).logLevel),Y()}t(ar,`initialize`);var or=t((e,t={})=>{let{code:n}=jn(e);return Cn.fromText(n,t)},`getDiagramFromText`);function sr(e,t,n,r){xn(t,e),Sn(t,n,r,t.attr(`id`))}t(sr,`addA11yInfo`);var Z=Object.freeze({render:ir,parse:Jn,getDiagramFromText:or,initialize:ar,getConfig:b,setConfig:g,getSiteConfig:s,updateSiteConfig:f,reset:t(()=>{c()},`reset`),globalReset:t(()=>{c(ie)},`globalReset`),defaultConfig:ie});n(b().logLevel),c(b());var cr=t((e,t,n)=>{r.warn(e),E(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),lr=t(async function(e={querySelector:`.mermaid`}){try{await ur(e)}catch(t){if(E(t)&&r.error(t.str),$.parseError&&$.parseError(t),!e.suppressErrors)throw r.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),ur=t(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:`.mermaid`}){let i=Z.getConfig();r.debug(`${e?``:`No `}Callback function found`);let a;if(n)a=n;else if(t)a=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);r.debug(`Found ${a.length} diagrams`),i?.startOnLoad!==void 0&&(r.debug(`Start On Load: `+i?.startOnLoad),Z.updateSiteConfig({startOnLoad:i?.startOnLoad}));let o=new D.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed),s,c=[];for(let t of Array.from(a)){if(r.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let n=`mermaid-${o.next()}`;s=t.innerHTML,s=he(D.entityDecode(s)).trim().replace(//gi,`
    `);let i=D.detectInit(s);i&&r.debug(`Detected early reinit: `,i);try{let{svg:r,bindFunctions:i}=await yr(n,s,t);t.innerHTML=r,e&&await e(n),i&&i(t)}catch(e){cr(e,c,$.parseError)}}if(c.length>0)throw c[0]},`runThrowsErrors`),dr=t(function(e){Z.initialize(e)},`initialize`),fr=t(async function(e,t,n){r.warn(`mermaid.init is deprecated. Please use run instead.`),e&&dr(e);let i={postRenderCallback:n,querySelector:`.mermaid`};typeof t==`string`?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await lr(i)},`init`),pr=t(async(e,{lazyLoad:t=!0}={})=>{Y(),d(...e),t===!1&&await yn()},`registerExternalDiagrams`),mr=t(function(){if($.startOnLoad){let{startOnLoad:e}=Z.getConfig();e&&$.run().catch(e=>r.error(`Mermaid failed to initialize`,e))}},`contentLoaded`);typeof document<`u`&&window.addEventListener(`load`,mr,!1);var hr=t(function(e){$.parseError=e},`setParseErrorHandler`),Q=[],gr=!1,_r=t(async()=>{if(!gr){for(gr=!0;Q.length>0;){let e=Q.shift();if(e)try{await e()}catch(e){r.error(`Error executing queue`,e)}}gr=!1}},`executeQueue`),vr=t(async(e,n)=>new Promise((i,a)=>{let o=t(()=>new Promise((t,o)=>{Z.parse(e,n).then(e=>{t(e),i(e)},e=>{r.error(`Error parsing`,e),$.parseError?.(e),o(e),a(e)})}),`performCall`);Q.push(o),_r().catch(a)}),`parse`),yr=t((e,n,i)=>new Promise((a,o)=>{let s=t(()=>new Promise((t,s)=>{Z.render(e,n,i).then(e=>{t(e),a(e)},e=>{r.error(`Error parsing`,e),$.parseError?.(e),s(e),o(e)})}),`performCall`);Q.push(s),_r().catch(o)}),`render`),$={startOnLoad:!0,mermaidAPI:Z,parse:vr,render:yr,init:fr,run:lr,registerExternalDiagrams:pr,registerLayoutLoaders:ge,initialize:dr,parseError:void 0,contentLoaded:mr,setParseErrorHandler:hr,detectType:T,registerIconPacks:me,getRegisteredDiagramsMetadata:t(()=>Object.keys(w).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},br=$;export{br as default}; \ No newline at end of file diff --git a/dist-desktop/assets/mindmap-definition-LN4V7U3C-Bib4remL.js b/dist-desktop/assets/mindmap-definition-LN4V7U3C-Bib4remL.js deleted file mode 100644 index c25c0b2..0000000 --- a/dist-desktop/assets/mindmap-definition-LN4V7U3C-Bib4remL.js +++ /dev/null @@ -1,96 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-UMNXGZaF.js";import{b as n,et as r,f as i,k as a,rt as o,tt as s,x as c,z as l}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import"./chunk-ICXQ74PX-Czpgj8Uw.js";import"./chunk-HOUHSVGY-iJuv90UH.js";import"./chunk-Q4XR5HBZ-CQ8zkLYc.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-D-nWYRNR.js";import{t as u}from"./chunk-XXDRQBXY-Bq6zMMOx.js";import{t as d}from"./chunk-VR4S4FIN-BTo4eV3J.js";import"./chunk-C7G6YPKG-DW-1jWUA.js";import"./chunk-ZGVPDNZ5-DGInJAPD.js";import"./chunk-52WLFC77-BOCvVCX1.js";import{r as f,t as p}from"./chunk-FWX5IMBZ-ComLEIwh.js";var m=[];for(let e=0;e<256;++e)m.push((e+256).toString(16).slice(1));function h(e,t=0){return(m[e[t+0]]+m[e[t+1]]+m[e[t+2]]+m[e[t+3]]+`-`+m[e[t+4]]+m[e[t+5]]+`-`+m[e[t+6]]+m[e[t+7]]+`-`+m[e[t+8]]+m[e[t+9]]+`-`+m[e[t+10]]+m[e[t+11]]+m[e[t+12]]+m[e[t+13]]+m[e[t+14]]+m[e[t+15]]).toLowerCase()}var g=new Uint8Array(16);function _(){return crypto.getRandomValues(g)}function v(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():y(e,t,n)}function y(e,t,n){e||={};let r=e.random??e.rng?.()??_();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return h(r)}var b=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,4],r=[1,13],i=[1,12],a=[1,15],o=[1,16],s=[1,20],c=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],p=[6,7,11],m=[1,6,13,15,16,19,22],h=[1,33],g=[1,34],_=[1,6,7,11,13,15,16,19,22],v={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`MINDMAP`,11:`EOF`,13:`SPACELIST`,15:`ICON`,16:`CLASS`,19:`NODE_DSTART`,20:`NODE_DESCR`,21:`NODE_DEND`,22:`NODE_ID`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 17:case 21:r.decorateNode({class:a[s]});break;case 18:r.getLogger().trace(`SPACELIST`);break;case 19:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:r.decorateNode({icon:a[s]});break;case 25:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:r,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},t(l,[2,3]),{1:[2,2]},t(l,[2,4]),t(l,[2,5]),{1:[2,6],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:r,9:22,12:11,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},{6:u,7:d,10:23,11:f},t(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:s,22:c}),t(p,[2,18]),t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),t(p,[2,23]),t(p,[2,24]),t(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:d,10:32,11:f},{1:[2,7],6:r,12:21,13:i,14:14,15:a,16:o,17:17,18:18,19:s,22:c},t(m,[2,14],{7:h,11:g}),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(p,[2,15]),t(p,[2,16]),t(p,[2,17]),{20:[1,35]},{21:[1,36]},t(m,[2,13],{7:h,11:g}),t(_,[2,11]),t(_,[2,12]),{21:[1,37]},t(p,[2,25]),t(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};v.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return e.getLogger().trace(`Found comment`,t.yytext),6;case 1:return 8;case 2:this.begin(`CLASS`);break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:e.getLogger().trace(`Begin icon`),this.begin(`ICON`);break;case 6:return e.getLogger().trace(`SPACELINE`),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace(`end icon`),this.popState();break;case 10:return e.getLogger().trace(`Exploding node`),this.begin(`NODE`),19;case 11:return e.getLogger().trace(`Cloud`),this.begin(`NODE`),19;case 12:return e.getLogger().trace(`Explosion Bang`),this.begin(`NODE`),19;case 13:return e.getLogger().trace(`Cloud Bang`),this.begin(`NODE`),19;case 14:return this.begin(`NODE`),19;case 15:return this.begin(`NODE`),19;case 16:return this.begin(`NODE`),19;case 17:return this.begin(`NODE`),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin(`NSTR2`);break;case 22:return`NODE_DESCR`;case 23:this.popState();break;case 24:e.getLogger().trace(`Starting NSTR`),this.begin(`NSTR`);break;case 25:return e.getLogger().trace(`description:`,t.yytext),`NODE_DESCR`;case 26:this.popState();break;case 27:return this.popState(),e.getLogger().trace(`node end ))`),`NODE_DEND`;case 28:return this.popState(),e.getLogger().trace(`node end )`),`NODE_DEND`;case 29:return this.popState(),e.getLogger().trace(`node end ...`,t.yytext),`NODE_DEND`;case 30:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 31:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 32:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 33:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 34:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 35:return e.getLogger().trace(`Long description:`,t.yytext),20;case 36:return e.getLogger().trace(`Long description:`,t.yytext),20}},`anonymous`),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}})();function y(){this.yy={}}return e(y,`Parser`),y.prototype=v,v.Parser=y,new y})();b.parser=b;var x=b,S=12,C={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},w=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=C,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{e(this,`MindmapDB`)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let t=this.nodes.length-1;t>=0;t--)if(this.nodes[t].level0?this.nodes[0]:null}addNode(e,n,r,a){t.info(`addNode`,e,n,r,a);let o=!1;this.nodes.length===0?(this.baseLevel=e,e=0,o=!0):this.baseLevel!==void 0&&(e-=this.baseLevel,o=!1);let s=c(),u=s.mindmap?.padding??i.mindmap.padding;switch(a){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:u*=2;break}let d={id:this.count++,nodeId:l(n,s),level:e,descr:l(r,s),type:a,children:[],width:s.mindmap?.maxNodeWidth??i.mindmap.maxNodeWidth,padding:u,isRoot:o},f=this.getParent(e);if(f)f.children.push(d),this.nodes.push(d);else if(o)this.nodes.push(d);else throw Error(`There can be only one root. No parent could be found for ("${d.descr}")`)}getType(e,n){switch(t.debug(`In get type`,e,n),e){case`[`:return this.nodeType.RECT;case`(`:return n===`)`?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case`((`:return this.nodeType.CIRCLE;case`)`:return this.nodeType.CLOUD;case`))`:return this.nodeType.BANG;case`{{`:return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let t=c(),n=this.nodes[this.nodes.length-1];e.icon&&(n.icon=l(e.icon,t)),e.class&&(n.class=l(e.class,t))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return`no-border`;case this.nodeType.RECT:return`rect`;case this.nodeType.ROUNDED_RECT:return`rounded-rect`;case this.nodeType.CIRCLE:return`circle`;case this.nodeType.CLOUD:return`cloud`;case this.nodeType.BANG:return`bang`;case this.nodeType.HEXAGON:return`hexgon`;default:return`no-border`}}assignSections(e,t){if(e.level===0?e.section=void 0:e.section=t,e.children)for(let[n,r]of e.children.entries()){let i=e.level===0?n%(S-1):t;this.assignSections(r,i)}}flattenNodes(t,n){let r=c(),i=[`mindmap-node`];t.isRoot===!0?i.push(`section-root`,`section--1`):t.section!==void 0&&i.push(`section-${t.section}`),t.class&&i.push(t.class);let a=i.join(` `),o=e(e=>{let t=(r.theme?.toLowerCase()??``).includes(`redux`);switch(e){case C.CIRCLE:return`mindmapCircle`;case C.RECT:return`rect`;case C.ROUNDED_RECT:return`rounded`;case C.CLOUD:return`cloud`;case C.BANG:return`bang`;case C.HEXAGON:return`hexagon`;case C.DEFAULT:return t?`rounded`:`defaultMindmapNode`;case C.NO_BORDER:default:return`rect`}},`getShapeFromType`),s={id:t.id.toString(),domId:`node_`+t.id.toString(),label:t.descr,labelType:`markdown`,isGroup:!1,shape:o(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:a,cssStyles:[],look:r.look,icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(n.push(s),t.children)for(let e of t.children)this.flattenNodes(e,n)}generateEdges(e,t){if(!e.children)return;let n=c();for(let r of e.children){let i=`edge`;r.section!==void 0&&(i+=` section-edge-${r.section}`);let a=e.level+1;i+=` edge-depth-${a}`;let o={id:`edge_${e.id}_${r.id}`,start:e.id.toString(),end:r.id.toString(),type:`normal`,curve:`basis`,thickness:`normal`,look:n.look,classes:i,depth:e.level,section:r.section};t.push(o),this.generateEdges(r,t)}}getData(){let e=this.getMindmap(),n=c(),r=a().layout!==void 0,i=n;if(r||(i.layout=`cose-bilkent`),!e)return{nodes:[],edges:[],config:i};t.debug(`getData: mindmapRoot`,e,n),this.assignSections(e);let o=[],s=[];this.flattenNodes(e,o),this.generateEdges(e,s),t.debug(`getData: processed ${o.length} nodes and ${s.length} edges`);let l=new Map;for(let e of o)l.set(e.id,{shape:e.shape,width:e.width,height:e.height,padding:e.padding});return{nodes:o,edges:s,config:i,rootNode:e,markers:[`point`],direction:`TB`,nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(l),type:`mindmap`,diagramId:`mindmap-`+v()}}getLogger(){return t}},T={draw:e(async(e,r,a,o)=>{t.debug(`Rendering mindmap diagram -`+e);let s=o.db,c=s.getData(),l=u(r,c.config.securityLevel);if(c.type=o.type,c.layoutAlgorithm=p(c.config.layout,{fallback:`cose-bilkent`}),c.diagramId=r,!s.getMindmap())return;c.nodes.forEach(e=>{e.shape===`rounded`?(e.radius=15,e.taper=15,e.stroke=`none`,e.width=0,e.padding=15):e.shape===`circle`?e.padding=10:e.shape===`rect`?(e.width=0,e.padding=10):e.shape===`hexagon`&&(e.width=0,e.height=0)}),await f(c,l);let{themeVariables:m}=n(),{useGradient:h,gradientStart:g,gradientStop:_}=m;if(h&&g&&_){let e=l.attr(`id`),t=l.append(`defs`).append(`linearGradient`).attr(`id`,`${e}-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);t.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,g).attr(`stop-opacity`,1),t.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,_).attr(`stop-opacity`,1)}d(l,c.config.mindmap?.padding??i.mindmap.padding,`mindmapDiagram`,c.config.mindmap?.useMaxWidth??i.mindmap.useMaxWidth)},`draw`)},E=e(e=>{let{theme:t,look:n}=e,i=``;for(let t=0;t{let r=``;for(let i=0;i{let{theme:t}=e,n=e.svgId,r=e.dropShadow?e.dropShadow.replace(`url(#drop-shadow)`,`url(${n}-drop-shadow)`):`none`;return` - .edge { - stroke-width: 3; - } - ${E(e)} - .section-root rect, .section-root path, .section-root circle, .section-root polygon { - fill: ${e.git0}; - } - .section-root text { - fill: ${e.gitBranchLabel0}; - } - .section-root span { - color: ${t?.includes(`redux`)?e.nodeBorder:e.gitBranchLabel0}; - } - .icon-container { - height:100%; - display: flex; - justify-content: center; - align-items: center; - } - .edge { - fill: none; - } - .mindmap-node-label { - dy: 1em; - alignment-baseline: middle; - text-anchor: middle; - dominant-baseline: middle; - text-align: center; - } - [data-look="neo"].mindmap-node { - filter: ${r}; - } - [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon { - fill: ${t?.includes(`redux`)?e.mainBkg:e.git0}; - } - [data-look="neo"].mindmap-node.section-root .text-inner-tspan { - fill: ${t?.includes(`redux`)?e.nodeBorder:e[`cScaleLabel`+ +(t===`neutral`)]}; - } - ${e.useGradient&&n&&e.mainBkg?D(e.THEME_COLOR_LIMIT,n,e.mainBkg):``} -`},`getStyles`)};export{O as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/ordinal-hYBb2elL.js b/dist-desktop/assets/ordinal-hYBb2elL.js deleted file mode 100644 index d5570ec..0000000 --- a/dist-desktop/assets/ordinal-hYBb2elL.js +++ /dev/null @@ -1 +0,0 @@ -import{t as e}from"./init-D6jRqBbL.js";var t=class extends Map{constructor(e,t=a){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(n(this,e))}has(e){return super.has(n(this,e))}set(e,t){return super.set(r(this,e),t)}delete(e){return super.delete(i(this,e))}};function n({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function r({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function i({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function a(e){return typeof e==`object`&&e?e.valueOf():e}var o=Symbol(`implicit`);function s(){var n=new t,r=[],i=[],a=o;function c(e){let t=n.get(e);if(t===void 0){if(a!==o)return a;n.set(e,t=r.push(e)-1)}return i[t%i.length]}return c.domain=function(e){if(!arguments.length)return r.slice();r=[],n=new t;for(let t of e)n.has(t)||n.set(t,r.push(t)-1);return c},c.range=function(e){return arguments.length?(i=Array.from(e),c):i.slice()},c.unknown=function(e){return arguments.length?(a=e,c):a},c.copy=function(){return s(r,i).unknown(a)},e.apply(c,arguments),c}export{s as t}; \ No newline at end of file diff --git a/dist-desktop/assets/packet-7NZHBO7P-D2duWGIK.js b/dist-desktop/assets/packet-7NZHBO7P-D2duWGIK.js deleted file mode 100644 index 848b89d..0000000 --- a/dist-desktop/assets/packet-7NZHBO7P-D2duWGIK.js +++ /dev/null @@ -1 +0,0 @@ -import"./chunk-KEIR6QF5-Dj-OpFgW.js";import{n as e}from"./chunk-EMLP6XTP-BoneA0Uo.js";export{e as createPacketServices}; \ No newline at end of file diff --git a/dist-desktop/assets/path-BWPyau1x.js b/dist-desktop/assets/path-BWPyau1x.js deleted file mode 100644 index 63d59fc..0000000 --- a/dist-desktop/assets/path-BWPyau1x.js +++ /dev/null @@ -1 +0,0 @@ -var e=Math.PI,t=2*e,n=1e-6,r=t-n;function i(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw Error(`invalid digits: ${e}`);if(t>15)return i;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;tn)if(!(Math.abs(f*l-u*d)>n)||!o)this._append`L${this._x1=t},${this._y1=r}`;else{let m=i-s,h=a-c,g=l*l+u*u,_=m*m+h*h,v=Math.sqrt(g),y=Math.sqrt(p),b=o*Math.tan((e-Math.acos((g+p-_)/(2*v*y)))/2),x=b/y,S=b/v;Math.abs(x-1)>n&&this._append`L${t+x*d},${r+x*f}`,this._append`A${o},${o},0,0,${+(f*m>d*h)},${this._x1=t+S*l},${this._y1=r+S*u}`}}arc(i,a,o,s,c,l){if(i=+i,a=+a,o=+o,l=!!l,o<0)throw Error(`negative radius: ${o}`);let u=o*Math.cos(s),d=o*Math.sin(s),f=i+u,p=a+d,m=1^l,h=l?s-c:c-s;this._x1===null?this._append`M${f},${p}`:(Math.abs(this._x1-f)>n||Math.abs(this._y1-p)>n)&&this._append`L${f},${p}`,o&&(h<0&&(h=h%t+t),h>r?this._append`A${o},${o},0,1,${m},${i-u},${a-d}A${o},${o},0,1,${m},${this._x1=f},${this._y1=p}`:h>n&&this._append`A${o},${o},0,${+(h>=e)},${m},${this._x1=i+o*Math.cos(c)},${this._y1=a+o*Math.sin(c)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function s(){return new o}s.prototype=o.prototype;function c(e){return function(){return e}}function l(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new o(t)}export{c as n,l as t}; \ No newline at end of file diff --git a/dist-desktop/assets/pegDiagram-2B236MQR-CPt8QfP3.js b/dist-desktop/assets/pegDiagram-2B236MQR-CPt8QfP3.js deleted file mode 100644 index 1516455..0000000 --- a/dist-desktop/assets/pegDiagram-2B236MQR-CPt8QfP3.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-JG7HCLWE-Dk4_aECj.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-UMNXGZaF.js";import"./chunk-WYO6CB5R-Dv5kDyQC.js";import"./chunk-VAUOI2AC-AC9pRUsa.js";import{n as r,r as i,t as a}from"./chunk-MOJQB5TN-Bju_yCKi.js";import{t as o}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as s}from"./mermaid-parser.core-Z7xZAZRH.js";var c=e().RailroadPeg.parser.LangiumParser,l=t(e=>{let t=e.alternatives.map(u);return t.length===1?t[0]:{type:`choice`,alternatives:t}},`transformOrderedChoice`),u=t(e=>{let t=e.elements.map(d);return t.length===1?t[0]:{type:`sequence`,elements:t}},`transformSequence`),d=t(e=>{let t=p(e.suffix);return e.operator?{type:`special`,text:e.operator===`&`?`&${f(t)}`:`!${f(t)}`}:t},`transformPrefix`),f=t(e=>{switch(e.type){case`terminal`:return`"${e.value}"`;case`nonterminal`:return e.name;case`special`:return e.text;default:return`(...)`}},`nodeToLabel`),p=t(e=>{let t=m(e.primary);if(!e.operator)return t;switch(e.operator){case`?`:return{type:`optional`,element:t};case`*`:return{type:`repetition`,element:t,min:0,max:1/0};case`+`:return{type:`repetition`,element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${e.operator}`)}},`transformSuffix`),m=t(e=>{switch(e.$type){case`PegLiteral`:return{type:`terminal`,value:e.value};case`PegIdentifier`:return{type:`nonterminal`,name:e.name};case`PegGroup`:return l(e.element);case`PegAny`:return{type:`special`,text:e.dot};default:throw Error(`Unsupported PEG primary node: ${e.$type}`)}},`transformPrimary`),h=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),g=t(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(h(e)))},`populateDb`),_={parser:{parse:t(e=>{a.clear(),n.debug(`[PEG Parser] Starting Langium parse`);let t=c.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new s(t);let r=t.value;n.debug(`[PEG Parser] Parsed rules:`,r.rules.length),g(r),n.debug(`[PEG Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{_ as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/pie-RZYD4A2V-CynqTUkZ.js b/dist-desktop/assets/pie-RZYD4A2V-CynqTUkZ.js deleted file mode 100644 index 3bf5cfd..0000000 --- a/dist-desktop/assets/pie-RZYD4A2V-CynqTUkZ.js +++ /dev/null @@ -1 +0,0 @@ -import"./chunk-KEIR6QF5-Dj-OpFgW.js";import{n as e}from"./chunk-YOTPTUD7-CjHV8V6f.js";export{e as createPieServices}; \ No newline at end of file diff --git a/dist-desktop/assets/pieDiagram-ENE6RG2P-BBPaHS9V.js b/dist-desktop/assets/pieDiagram-ENE6RG2P-BBPaHS9V.js deleted file mode 100644 index 26f2daf..0000000 --- a/dist-desktop/assets/pieDiagram-ENE6RG2P-BBPaHS9V.js +++ /dev/null @@ -1,39 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-UMNXGZaF.js";import{H as n,K as r,U as i,a,c as o,f as s,v as c,w as l,x as u,y as d}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as f}from"./ordinal-hYBb2elL.js";import{n as p}from"./path-BWPyau1x.js";import{m}from"./dist-qx0Iv9vM.js";import{t as h}from"./arc-DqK6O3qL.js";import{t as g}from"./array-BifhSqXX.js";import{i as _,p as v}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as y}from"./chunk-VAUOI2AC-AC9pRUsa.js";import{t as b}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as x}from"./mermaid-parser.core-Z7xZAZRH.js";function S(e,t){return te?1:t>=e?0:NaN}function C(e){return e}function w(){var e=C,t=S,n=null,r=p(0),i=p(m),a=p(0);function o(o){var s,c=(o=g(o)).length,l,u,d=0,f=Array(c),p=Array(c),h=+r.apply(this,arguments),_=Math.min(m,Math.max(-m,i.apply(this,arguments)-h)),v,y=Math.min(Math.abs(_)/c,a.apply(this,arguments)),b=y*(_<0?-1:1),x;for(s=0;s0&&(d+=x);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(_-c*b)/d:0;s0?x*u:0)+b,p[l]={data:o[l],index:s,value:x,startAngle:h,endAngle:v,padAngle:y};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:p(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:p(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:p(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:p(+e),o):a},o}var T=s.pie,E={sections:new Map,showData:!1,config:T},D=E.sections,O=E.showData,k=structuredClone(T),A={getConfig:e(()=>structuredClone(k),`getConfig`),clear:e(()=>{D=new Map,O=E.showData,a()},`clear`),setDiagramTitle:r,getDiagramTitle:l,setAccTitle:i,getAccTitle:d,setAccDescription:n,getAccDescription:c,addSection:e(({label:e,value:n})=>{if(n<0)throw Error(`"${e}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);D.has(e)||(D.set(e,n),t.debug(`added new section: ${e}, with value: ${n}`))},`addSection`),getSections:e(()=>D,`getSections`),setShowData:e(e=>{O=e},`setShowData`),getShowData:e(()=>O,`getShowData`)},j=e((e,t)=>{b(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},`populateDb`),M={parse:e(async e=>{let n=await x(`pie`,e);t.debug(n),j(n,A)},`parse`)},N=e(e=>` - .pieCircle{ - stroke: ${e.pieStrokeColor}; - stroke-width : ${e.pieStrokeWidth}; - opacity : ${e.pieOpacity}; - } - .pieCircle.highlighted{ - scale: 1.05; - opacity: 1; - } - .pieCircle.highlightedOnHover:hover{ - transition-duration: 250ms; - scale: 1.05; - opacity: 1; - } - .pieOuterCircle{ - stroke: ${e.pieOuterStrokeColor}; - stroke-width: ${e.pieOuterStrokeWidth}; - fill: none; - } - .pieTitleText { - text-anchor: middle; - font-size: ${e.pieTitleTextSize}; - fill: ${e.pieTitleTextColor}; - font-family: ${e.fontFamily}; - } - .slice { - font-family: ${e.fontFamily}; - fill: ${e.pieSectionTextColor}; - font-size:${e.pieSectionTextSize}; - // fill: white; - } - .legend text { - fill: ${e.pieLegendTextColor}; - font-family: ${e.fontFamily}; - font-size: ${e.pieLegendTextSize}; - } -`,`getStyles`),P=e(e=>{let t=[...e.values()].reduce((e,t)=>e+t,0),n=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>e.value/t*100>=1);return w().value(e=>e.value).sort(null)(n)},`createPieArcs`),F={parser:M,db:A,renderer:{draw:e((e,n,r,i)=>{t.debug(`rendering pie chart -`+e);let a=i.db,s=u(),c=_(a.getConfig(),s.pie),l=y(n),d=l.append(`g`);d.attr(`transform`,`translate(225,225)`);let{themeVariables:p}=s,[m]=v(p.pieOuterStrokeWidth);m??=2;let g=c.legendPosition,b=c.textPosition,x=c.donutHole>0&&c.donutHole<=.9?c.donutHole:0,S=h().innerRadius(x*185).outerRadius(185),C=h().innerRadius(185*b).outerRadius(185*b),w=d.append(`g`);w.append(`circle`).attr(`cx`,0).attr(`cy`,0).attr(`r`,185+m/2).attr(`class`,`pieOuterCircle`);let T=a.getSections(),E=P(T),D=[p.pie1,p.pie2,p.pie3,p.pie4,p.pie5,p.pie6,p.pie7,p.pie8,p.pie9,p.pie10,p.pie11,p.pie12],O=0;T.forEach(e=>{O+=e});let k=E.filter(e=>(e.data.value/O*100).toFixed(0)!==`0`),A=f(D).domain([...T.keys()]);w.selectAll(`mySlices`).data(k).enter().append(`path`).attr(`d`,S).attr(`fill`,e=>A(e.data.label)).attr(`class`,e=>{let t=`pieCircle`;return c.highlightSlice===`hover`?t+=` highlightedOnHover`:c.highlightSlice===e.data.label&&(t+=` highlighted`),t}),w.selectAll(`mySlices`).data(k).enter().append(`text`).text(e=>(e.data.value/O*100).toFixed(0)+`%`).attr(`transform`,e=>`translate(`+C.centroid(e)+`)`).style(`text-anchor`,`middle`).attr(`class`,`slice`);let j=d.append(`text`).text(a.getDiagramTitle()).attr(`x`,0).attr(`y`,-400/2).attr(`class`,`pieTitleText`),M=[...T.entries()].map(([e,t])=>({label:e,value:t})),N=d.selectAll(`.legend`).data(M).enter().append(`g`).attr(`class`,`legend`);N.append(`rect`).attr(`width`,18).attr(`height`,18).style(`fill`,e=>A(e.label)).style(`stroke`,e=>A(e.label)),N.append(`text`).attr(`x`,22).attr(`y`,14).text(e=>a.getShowData()?`${e.label} [${e.value}]`:e.label);let F=Math.max(...N.selectAll(`text`).nodes().map(e=>e?.getBoundingClientRect().width??0)),I=450,L=490,R=M.length*22;switch(g){case`center`:N.attr(`transform`,(e,t)=>{let n=22*M.length/2,r=-F/2-22,i=t*22-n;return`translate(`+r+`,`+i+`)`});break;case`top`:I+=R,N.attr(`transform`,(e,t)=>`translate(${-F/2-22}, ${t*22-185})`),w.attr(`transform`,()=>`translate(0, ${R+22})`);break;case`bottom`:I+=R,N.attr(`transform`,(e,t)=>{let n=-F/2-22,r=t*22- -207;return`translate(`+n+`,`+r+`)`});break;case`left`:L+=22+F,N.attr(`transform`,(e,t)=>{let n=22*M.length/2;return`translate(-207,`+(t*22-n)+`)`}),w.attr(`transform`,()=>`translate(${F+18+4}, 0)`);break;default:L+=22+F,N.attr(`transform`,(e,t)=>{let n=22*M.length/2;return`translate(216,`+(t*22-n)+`)`});break}let z=j.node()?.getBoundingClientRect().width??0,B=450/2-z/2,V=450/2+z/2,H=Math.min(0,B),U=Math.max(L,V)-H;l.attr(`viewBox`,`${H} 0 ${U} ${I}`),o(l,I,U,c.useMaxWidth)},`draw`)},styles:N};export{F as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/quadrantDiagram-ABIIQ3AL-UafGc-sH.js b/dist-desktop/assets/quadrantDiagram-ABIIQ3AL-UafGc-sH.js deleted file mode 100644 index a1aa0dd..0000000 --- a/dist-desktop/assets/quadrantDiagram-ABIIQ3AL-UafGc-sH.js +++ /dev/null @@ -1,7 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-UMNXGZaF.js";import{D as r,H as i,K as a,U as o,a as s,c,f as l,v as u,w as d,x as f,y as p,z as m}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as h}from"./linear-DhAcoVP9.js";var g=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[1,7],s=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],c=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],d=[1,37],f=[1,36],p=[1,38],m=[1,35],h=[1,43],g=[1,41],_=[1,45],v=[1,14],y=[1,23],b=[1,18],x=[1,19],S=[1,20],C=[1,21],w=[1,22],T=[1,24],E=[1,25],D=[1,26],O=[1,27],k=[1,28],A=[1,29],j=[1,32],M=[1,33],N=[1,34],P=[1,39],F=[1,40],I=[1,42],L=[1,44],R=[1,63],z=[1,62],B=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],ee=[1,66],te=[1,67],ne=[1,68],re=[1,69],ie=[1,70],ae=[1,71],oe=[1,72],se=[1,73],ce=[1,74],le=[1,75],ue=[1,76],de=[1,77],V=[4,5,6,7,8,9,10,11,12,13,14,15,18],H=[1,91],U=[1,92],W=[1,93],G=[1,100],K=[1,94],q=[1,97],J=[1,95],Y=[1,96],X=[1,98],Z=[1,99],fe=[1,103],pe=[10,55,56,57],Q=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],me={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:`error`,4:`ALPHA`,5:`NUM`,6:`NODE_STRING`,7:`DOWN`,8:`MINUS`,9:`DEFAULT`,10:`COMMA`,11:`COLON`,12:`AMP`,13:`BRKT`,14:`MULT`,15:`UNICODE_TEXT`,17:`UNIT`,18:`SPACE`,19:`STYLE`,20:`PCT`,25:`CLASSDEF`,28:`QUADRANT`,35:`title`,36:`title_value`,37:`acc_title`,38:`acc_title_value`,39:`acc_descr`,40:`acc_descr_value`,41:`acc_descr_multiline_value`,42:`section`,44:`point_start`,45:`point_x`,46:`point_y`,47:`class_name`,48:`X-AXIS`,49:`AXIS-TEXT-DELIMITER`,50:`Y-AXIS`,51:`QUADRANT_1`,52:`QUADRANT_2`,53:`QUADRANT_3`,54:`QUADRANT_4`,55:`NEWLINE`,56:`SEMI`,57:`EOF`,60:`STR`,61:`MD_STR`,63:`PUNCTUATION`,64:`PLUS`,65:`EQUALS`,66:`DOT`,67:`UNDERSCORE`},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+``+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:r.addPoint(a[s-3],``,a[s-1],a[s],[]);break;case 48:r.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:r.addPoint(a[s-4],``,a[s-2],a[s-1],a[s]);break;case 50:r.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:r.setXAxisLeftText(a[s-2]),r.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=` ⟶ `,r.setXAxisLeftText(a[s-1]);break;case 53:r.setXAxisLeftText(a[s]);break;case 54:r.setYAxisBottomText(a[s-2]),r.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=` ⟶ `,r.setYAxisBottomText(a[s-1]);break;case 56:r.setYAxisBottomText(a[s]);break;case 57:r.setQuadrant1Text(a[s]);break;case 58:r.setQuadrant2Text(a[s]);break;case 59:r.setQuadrant3Text(a[s]);break;case 60:r.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:`text`};break;case 65:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:`text`};break;case 67:this.$={text:a[s],type:`markdown`};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+``+a[s];break}},`anonymous`),table:[{18:n,26:1,27:2,28:r,55:i,56:a,57:o},{1:[3]},{18:n,26:8,27:2,28:r,55:i,56:a,57:o},{18:n,26:9,27:2,28:r,55:i,56:a,57:o},t(s,[2,33],{29:10}),t(c,[2,61]),t(c,[2,62]),t(c,[2,63]),{1:[2,30]},{1:[2,31]},t(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(s,[2,34]),{27:46,55:i,56:a,57:o},t(l,[2,37]),t(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:p,12:m,13:h,14:g,15:_,18:v,25:y,35:b,37:x,39:S,41:C,42:w,48:T,50:E,51:D,52:O,53:k,54:A,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(l,[2,39]),t(l,[2,40]),t(l,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(l,[2,45]),t(l,[2,46]),{18:[1,51]},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:52,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:53,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:54,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:55,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:56,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,10:p,12:m,13:h,14:g,15:_,43:57,58:31,60:j,61:M,63:N,64:P,65:F,66:I,67:L},{4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,44:[1,58],47:[1,59],58:61,59:60,63:N,64:P,65:F,66:I,67:L},t(B,[2,64]),t(B,[2,66]),t(B,[2,67]),t(B,[2,70]),t(B,[2,71]),t(B,[2,72]),t(B,[2,73]),t(B,[2,74]),t(B,[2,75]),t(B,[2,76]),t(B,[2,77]),t(B,[2,78]),t(B,[2,79]),t(B,[2,80]),t(B,[2,81]),t(s,[2,35]),t(l,[2,38]),t(l,[2,42]),t(l,[2,43]),t(l,[2,44]),{3:65,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,21:64},t(l,[2,53],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,78],63:N,64:P,65:F,66:I,67:L}),t(l,[2,56],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,49:[1,79],63:N,64:P,65:F,66:I,67:L}),t(l,[2,57],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,58],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,59],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,60],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),{45:[1,80]},{44:[1,81]},t(B,[2,65]),t(B,[2,82]),t(B,[2,83]),t(B,[2,84]),{3:83,4:ee,5:te,6:ne,7:re,8:ie,9:ae,10:oe,11:se,12:ce,13:le,14:ue,15:de,18:[1,82]},t(V,[2,23]),t(V,[2,1]),t(V,[2,2]),t(V,[2,3]),t(V,[2,4]),t(V,[2,5]),t(V,[2,6]),t(V,[2,7]),t(V,[2,8]),t(V,[2,9]),t(V,[2,10]),t(V,[2,11]),t(V,[2,12]),t(l,[2,52],{58:31,43:84,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),t(l,[2,55],{58:31,43:85,4:d,5:f,10:p,12:m,13:h,14:g,15:_,60:j,61:M,63:N,64:P,65:F,66:I,67:L}),{46:[1,86]},{45:[1,87]},{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:89,23:88},t(V,[2,24]),t(l,[2,51],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,54],{59:60,58:61,4:d,5:f,8:R,10:p,12:m,13:h,14:g,15:_,18:z,63:N,64:P,65:F,66:I,67:L}),t(l,[2,47],{22:89,16:90,23:101,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{46:[1,102]},t(l,[2,29],{10:fe}),t(pe,[2,27],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),t(Q,[2,25]),t(Q,[2,13]),t(Q,[2,14]),t(Q,[2,15]),t(Q,[2,16]),t(Q,[2,17]),t(Q,[2,18]),t(Q,[2,19]),t(Q,[2,20]),t(Q,[2,21]),t(Q,[2,22]),t(l,[2,49],{10:fe}),t(l,[2,48],{22:89,16:90,23:105,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z}),{4:H,5:U,6:W,8:G,11:K,13:q,16:90,17:J,18:Y,19:X,20:Z,22:106},t(Q,[2,26]),t(l,[2,50],{10:fe}),t(pe,[2,28],{16:104,4:H,5:U,6:W,8:G,11:K,13:q,17:J,18:Y,19:X,20:Z})],defaultActions:{8:[2,30],9:[2,31]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};me.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin(`title`),35;case 5:return this.popState(),`title_value`;case 6:return this.begin(`acc_title`),37;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),39;case 9:return this.popState(),`acc_descr_value`;case 10:this.begin(`acc_descr_multiline`);break;case 11:this.popState();break;case 12:return`acc_descr_multiline_value`;case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin(`md_string`);break;case 22:return`MD_STR`;case 23:this.popState();break;case 24:this.begin(`string`);break;case 25:this.popState();break;case 26:return`STR`;case 27:this.begin(`class_name`);break;case 28:return this.popState(),47;case 29:return this.begin(`point_start`),44;case 30:return this.begin(`point_x`),45;case 31:this.popState();break;case 32:this.popState(),this.begin(`point_y`);break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}})();function $(){this.yy={}}return e($,`Parser`),$.prototype=me,me.Parser=$,new $})();g.parser=g;var _=g,v=r(),y=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{e(this,`QuadrantBuilder`)}getDefaultData(){return{titleText:``,quadrant1Text:``,quadrant2Text:``,quadrant3Text:``,quadrant4Text:``,xAxisLeftText:``,xAxisRightText:``,yAxisBottomText:``,yAxisTopText:``,points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:l.quadrantChart?.chartWidth||500,chartWidth:l.quadrantChart?.chartHeight||500,titlePadding:l.quadrantChart?.titlePadding||10,titleFontSize:l.quadrantChart?.titleFontSize||20,quadrantPadding:l.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:l.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:l.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:l.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:l.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:l.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:l.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:l.quadrantChart?.pointTextPadding||5,pointLabelFontSize:l.quadrantChart?.pointLabelFontSize||12,pointRadius:l.quadrantChart?.pointRadius||5,xAxisPosition:l.quadrantChart?.xAxisPosition||`top`,yAxisPosition:l.quadrantChart?.yAxisPosition||`left`,quadrantInternalBorderStrokeWidth:l.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:l.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:v.quadrant1Fill,quadrant2Fill:v.quadrant2Fill,quadrant3Fill:v.quadrant3Fill,quadrant4Fill:v.quadrant4Fill,quadrant1TextFill:v.quadrant1TextFill,quadrant2TextFill:v.quadrant2TextFill,quadrant3TextFill:v.quadrant3TextFill,quadrant4TextFill:v.quadrant4TextFill,quadrantPointFill:v.quadrantPointFill,quadrantPointTextFill:v.quadrantPointTextFill,quadrantXAxisTextFill:v.quadrantXAxisTextFill,quadrantYAxisTextFill:v.quadrantYAxisTextFill,quadrantTitleFill:v.quadrantTitleFill,quadrantInternalBorderStrokeFill:v.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:v.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,t.info(`clear called`)}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,t){this.classes.set(e,t)}setConfig(e){t.trace(`setConfig called with: `,e),this.config={...this.config,...e}}setThemeConfig(e){t.trace(`setThemeConfig called with: `,e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,t,n,r){let i=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,a={top:e===`top`&&t?i:0,bottom:e===`bottom`&&t?i:0},o=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,s={left:this.config.yAxisPosition===`left`&&n?o:0,right:this.config.yAxisPosition===`right`&&n?o:0},c=this.config.titleFontSize+this.config.titlePadding*2,l={top:r?c:0},u=this.config.quadrantPadding+s.left,d=this.config.quadrantPadding+a.top+l.top,f=this.config.chartWidth-this.config.quadrantPadding*2-s.left-s.right,p=this.config.chartHeight-this.config.quadrantPadding*2-a.top-a.bottom-l.top;return{xAxisSpace:a,yAxisSpace:s,titleSpace:l,quadrantSpace:{quadrantLeft:u,quadrantTop:d,quadrantWidth:f,quadrantHalfWidth:f/2,quadrantHeight:p,quadrantHalfHeight:p/2}}}getAxisLabels(e,t,n,r){let{quadrantSpace:i,titleSpace:a}=r,{quadrantHalfHeight:o,quadrantHeight:s,quadrantLeft:c,quadrantHalfWidth:l,quadrantTop:u,quadrantWidth:d}=i,f=!!this.data.xAxisRightText,p=!!this.data.yAxisTopText,m=[];return this.data.xAxisLeftText&&t&&m.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+(f?l/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+u+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:f?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.xAxisRightText&&t&&m.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:c+l+(f?l/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+u+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:f?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.yAxisBottomText&&n&&m.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+d+this.config.quadrantPadding,y:u+s-(p?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:-90}),this.data.yAxisTopText&&n&&m.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+c+d+this.config.quadrantPadding,y:u+o-(p?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:-90}),m}getQuadrants(e){let{quadrantSpace:t}=e,{quadrantHalfHeight:n,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:a}=t,o=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a,width:i,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a,width:i,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant4Fill}];for(let e of o)e.text.x=e.x+e.width/2,this.data.points.length===0?(e.text.y=e.y+e.height/2,e.text.horizontalPos=`middle`):(e.text.y=e.y+this.config.quadrantTextTopPadding,e.text.horizontalPos=`top`);return o}getQuadrantPoints(e){let{quadrantSpace:t}=e,{quadrantHeight:n,quadrantLeft:r,quadrantTop:i,quadrantWidth:a}=t,o=h().domain([0,1]).range([r,a+r]),s=h().domain([0,1]).range([n+i,i]);return this.data.points.map(e=>{let t=this.classes.get(e.className);return t&&(e={...t,...e}),{x:o(e.x),y:s(e.y),fill:e.color??this.themeConfig.quadrantPointFill,radius:e.radius??this.config.pointRadius,text:{text:e.text,fill:this.themeConfig.quadrantPointTextFill,x:o(e.x),y:s(e.y)+this.config.pointTextPadding,verticalPos:`center`,horizontalPos:`top`,fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:e.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:e.strokeWidth??`0px`}})}getBorders(e){let t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:r,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:o,quadrantTop:s,quadrantWidth:c}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s,x2:a+c+t,y2:s},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+c,y1:s+t,x2:a+c,y2:s+i-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s+i,x2:a+c+t,y2:s+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:s+t,x2:a,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+o,y1:s+t,x2:a+o,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+t,y1:s+r,x2:a+c-t,y2:s+r}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:`top`,verticalPos:`center`,rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),t=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,r=this.data.points.length>0?`bottom`:this.config.xAxisPosition,i=this.calculateSpace(r,e,t,n);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(r,e,t,i),borderLines:this.getBorders(i),title:this.getTitle(n)}}},b=class extends Error{static{e(this,`InvalidStyleError`)}constructor(e,t,n){super(`value for ${e} ${t} is invalid, please use a valid ${n}`),this.name=`InvalidStyleError`}};function x(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}e(x,`validateHexCode`);function S(e){return!/^\d+$/.test(e)}e(S,`validateNumber`);function C(e){return!/^\d+px$/.test(e)}e(C,`validateSizeInPixels`);function w(e){return m(e.trim(),f())}e(w,`textSanitizer`);var T=new y;function E(e){T.setData({quadrant1Text:w(e.text)})}e(E,`setQuadrant1Text`);function D(e){T.setData({quadrant2Text:w(e.text)})}e(D,`setQuadrant2Text`);function O(e){T.setData({quadrant3Text:w(e.text)})}e(O,`setQuadrant3Text`);function k(e){T.setData({quadrant4Text:w(e.text)})}e(k,`setQuadrant4Text`);function A(e){T.setData({xAxisLeftText:w(e.text)})}e(A,`setXAxisLeftText`);function j(e){T.setData({xAxisRightText:w(e.text)})}e(j,`setXAxisRightText`);function M(e){T.setData({yAxisTopText:w(e.text)})}e(M,`setYAxisTopText`);function N(e){T.setData({yAxisBottomText:w(e.text)})}e(N,`setYAxisBottomText`);function P(e){let t={};for(let n of e){let[e,r]=n.trim().split(/\s*:\s*/);if(e===`radius`){if(S(r))throw new b(e,r,`number`);t.radius=parseInt(r)}else if(e===`color`){if(x(r))throw new b(e,r,`hex code`);t.color=r}else if(e===`stroke-color`){if(x(r))throw new b(e,r,`hex code`);t.strokeColor=r}else if(e===`stroke-width`){if(C(r))throw new b(e,r,`number of pixels (eg. 10px)`);t.strokeWidth=r}else throw Error(`style named ${e} is not supported.`)}return t}e(P,`parseStyles`);function F(e,t,n,r,i){let a=P(i);T.addPoints([{x:n,y:r,text:w(e.text),className:t,...a}])}e(F,`addPoint`);function I(e,t){T.addClass(e,P(t))}e(I,`addClass`);function L(e){T.setConfig({chartWidth:e})}e(L,`setWidth`);function R(e){T.setConfig({chartHeight:e})}e(R,`setHeight`);function z(){let{themeVariables:e,quadrantChart:t}=f();return t&&T.setConfig(t),T.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),T.setData({titleText:d()}),T.build()}e(z,`getQuadrantData`);var B={parser:_,db:{setWidth:L,setHeight:R,setQuadrant1Text:E,setQuadrant2Text:D,setQuadrant3Text:O,setQuadrant4Text:k,setXAxisLeftText:A,setXAxisRightText:j,setYAxisTopText:M,setYAxisBottomText:N,parseStyles:P,addPoint:F,addClass:I,getQuadrantData:z,clear:e(function(){T.clear(),s()},`clear`),setAccTitle:o,getAccTitle:p,setDiagramTitle:a,getDiagramTitle:d,getAccDescription:u,setAccDescription:i},renderer:{draw:e((r,i,a,o)=>{function s(e){return e===`top`?`hanging`:`middle`}e(s,`getDominantBaseLine`);function l(e){return e===`left`?`start`:`middle`}e(l,`getTextAnchor`);function u(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}e(u,`getTransformation`);let d=f();t.debug(`Rendering quadrant chart -`+r);let p=d.securityLevel,m;p===`sandbox`&&(m=n(`#i`+i));let h=n(p===`sandbox`?m.nodes()[0].contentDocument.body:`body`).select(`[id="${i}"]`),g=h.append(`g`).attr(`class`,`main`),_=d.quadrantChart?.chartWidth??500,v=d.quadrantChart?.chartHeight??500;c(h,v,_,d.quadrantChart?.useMaxWidth??!0),h.attr(`viewBox`,`0 0 `+_+` `+v),o.db.setHeight(v),o.db.setWidth(_);let y=o.db.getQuadrantData(),b=g.append(`g`).attr(`class`,`quadrants`),x=g.append(`g`).attr(`class`,`border`),S=g.append(`g`).attr(`class`,`data-points`),C=g.append(`g`).attr(`class`,`labels`),w=g.append(`g`).attr(`class`,`title`);y.title&&w.append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,y.title.fill).attr(`font-size`,y.title.fontSize).attr(`dominant-baseline`,s(y.title.horizontalPos)).attr(`text-anchor`,l(y.title.verticalPos)).attr(`transform`,u(y.title)).text(y.title.text),y.borderLines&&x.selectAll(`line`).data(y.borderLines).enter().append(`line`).attr(`x1`,e=>e.x1).attr(`y1`,e=>e.y1).attr(`x2`,e=>e.x2).attr(`y2`,e=>e.y2).style(`stroke`,e=>e.strokeFill).style(`stroke-width`,e=>e.strokeWidth);let T=b.selectAll(`g.quadrant`).data(y.quadrants).enter().append(`g`).attr(`class`,`quadrant`);T.append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill),T.append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.text.fill).attr(`font-size`,e=>e.text.fontSize).attr(`dominant-baseline`,e=>s(e.text.horizontalPos)).attr(`text-anchor`,e=>l(e.text.verticalPos)).attr(`transform`,e=>u(e.text)).text(e=>e.text.text),C.selectAll(`g.label`).data(y.axisLabels).enter().append(`g`).attr(`class`,`label`).append(`text`).attr(`x`,0).attr(`y`,0).text(e=>e.text).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>s(e.horizontalPos)).attr(`text-anchor`,e=>l(e.verticalPos)).attr(`transform`,e=>u(e));let E=S.selectAll(`g.data-point`).data(y.points).enter().append(`g`).attr(`class`,`data-point`);E.append(`circle`).attr(`cx`,e=>e.x).attr(`cy`,e=>e.y).attr(`r`,e=>e.radius).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeColor).attr(`stroke-width`,e=>e.strokeWidth),E.append(`text`).attr(`x`,0).attr(`y`,0).text(e=>e.text.text).attr(`fill`,e=>e.text.fill).attr(`font-size`,e=>e.text.fontSize).attr(`dominant-baseline`,e=>s(e.text.horizontalPos)).attr(`text-anchor`,e=>l(e.text.verticalPos)).attr(`transform`,e=>u(e.text))},`draw`)},styles:e(()=>``,`styles`)};export{B as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/radar-I7S5WNFK-fIKE12aT.js b/dist-desktop/assets/radar-I7S5WNFK-fIKE12aT.js deleted file mode 100644 index 236e538..0000000 --- a/dist-desktop/assets/radar-I7S5WNFK-fIKE12aT.js +++ /dev/null @@ -1 +0,0 @@ -import"./chunk-KEIR6QF5-Dj-OpFgW.js";import{n as e}from"./chunk-QBLGF6JB-C9zGMqvP.js";export{e as createRadarServices}; \ No newline at end of file diff --git a/dist-desktop/assets/railroad-3IZDKUUU-Bgx8HJTj.js b/dist-desktop/assets/railroad-3IZDKUUU-Bgx8HJTj.js deleted file mode 100644 index 8ca997f..0000000 --- a/dist-desktop/assets/railroad-3IZDKUUU-Bgx8HJTj.js +++ /dev/null @@ -1 +0,0 @@ -import"./chunk-KEIR6QF5-Dj-OpFgW.js";import{n as e}from"./chunk-5TONJI2A-DOX2waSJ.js";export{e as createRailroadServices}; \ No newline at end of file diff --git a/dist-desktop/assets/railroad-abnf-AHOZXSZD-Nh6k60mH.js b/dist-desktop/assets/railroad-abnf-AHOZXSZD-Nh6k60mH.js deleted file mode 100644 index 7000d0a..0000000 --- a/dist-desktop/assets/railroad-abnf-AHOZXSZD-Nh6k60mH.js +++ /dev/null @@ -1 +0,0 @@ -import"./chunk-KEIR6QF5-Dj-OpFgW.js";import{n as e}from"./chunk-5HE753X5-o8-OCfIL.js";export{e as createRailroadAbnfServices}; \ No newline at end of file diff --git a/dist-desktop/assets/railroad-ebnf-EBAXGLYW-C74h3s_I.js b/dist-desktop/assets/railroad-ebnf-EBAXGLYW-C74h3s_I.js deleted file mode 100644 index aa91b93..0000000 --- a/dist-desktop/assets/railroad-ebnf-EBAXGLYW-C74h3s_I.js +++ /dev/null @@ -1 +0,0 @@ -import"./chunk-KEIR6QF5-Dj-OpFgW.js";import{n as e}from"./chunk-U6XO7XAA-CR0BSRFR.js";export{e as createRailroadEbnfServices}; \ No newline at end of file diff --git a/dist-desktop/assets/railroad-peg-LSFZ7HO6-0hT-lN-u.js b/dist-desktop/assets/railroad-peg-LSFZ7HO6-0hT-lN-u.js deleted file mode 100644 index 991b665..0000000 --- a/dist-desktop/assets/railroad-peg-LSFZ7HO6-0hT-lN-u.js +++ /dev/null @@ -1 +0,0 @@ -import"./chunk-KEIR6QF5-Dj-OpFgW.js";import{n as e}from"./chunk-JG7HCLWE-Dk4_aECj.js";export{e as createRailroadPegServices}; \ No newline at end of file diff --git a/dist-desktop/assets/railroadDiagram-RFXS5EU6-D7w_TgGh.js b/dist-desktop/assets/railroadDiagram-RFXS5EU6-D7w_TgGh.js deleted file mode 100644 index 3276078..0000000 --- a/dist-desktop/assets/railroadDiagram-RFXS5EU6-D7w_TgGh.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-5TONJI2A-DOX2waSJ.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-UMNXGZaF.js";import"./chunk-WYO6CB5R-Dv5kDyQC.js";import"./chunk-VAUOI2AC-AC9pRUsa.js";import{n as r,r as i,t as a}from"./chunk-MOJQB5TN-Bju_yCKi.js";import{t as o}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as s}from"./mermaid-parser.core-Z7xZAZRH.js";var c=e().Railroad.parser.LangiumParser,l=t(e=>{switch(e.$type){case`RailroadTerminalExpr`:return{type:`terminal`,value:e.value};case`RailroadNonTerminalExpr`:return{type:`nonterminal`,name:e.name};case`RailroadSpecialExpr`:return{type:`special`,text:e.text};case`RailroadSequenceExpr`:{let t=e.elements.map(l);return t.length===1?t[0]:{type:`sequence`,elements:t}}case`RailroadChoiceExpr`:{let t=e.alternatives.map(l);return t.length===1?t[0]:{type:`choice`,alternatives:t}}case`RailroadOptionalExpr`:return{type:`optional`,element:l(e.element)};case`RailroadOneOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:1,max:1/0};case`RailroadZeroOrMoreExpr`:return{type:`repetition`,element:l(e.element),min:0,max:1/0};default:throw Error(`Unsupported railroad expression: ${e.$type}`)}},`transformExpression`),u=t(e=>({name:e.name,definition:l(e.definition)}),`transformRule`),d=t(e=>{o(e,a),e.title&&a.setTitle(e.title),e.rules.map(e=>a.addRule(u(e)))},`populateDb`),f={parser:{parse:t(e=>{a.clear(),n.debug(`[Railroad Parser] Starting Langium parse`);let t=c.parse(e);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new s(t);let r=t.value;n.debug(`[Railroad Parser] Parsed rules:`,r.rules.length),d(r),n.debug(`[Railroad Parser] Parse complete`)},`parse`),parser:{yy:a}},db:a,renderer:i,styles:r};export{f as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/react-BLJmJXjR.js b/dist-desktop/assets/react-BLJmJXjR.js deleted file mode 100644 index 3a483f5..0000000 --- a/dist-desktop/assets/react-BLJmJXjR.js +++ /dev/null @@ -1 +0,0 @@ -import{t as e}from"./rolldown-runtime-aKtaBQYM.js";var t=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{n.exports=t()}));export{n as t}; \ No newline at end of file diff --git a/dist-desktop/assets/requirementDiagram-TGXJPOKE-Bk3E4jWx.js b/dist-desktop/assets/requirementDiagram-TGXJPOKE-Bk3E4jWx.js deleted file mode 100644 index 399bc68..0000000 --- a/dist-desktop/assets/requirementDiagram-TGXJPOKE-Bk3E4jWx.js +++ /dev/null @@ -1,84 +0,0 @@ -import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-UMNXGZaF.js";import{H as r,K as i,U as a,a as o,b as s,v as c,w as l,x as u,y as d}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{g as f}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import"./chunk-HOUHSVGY-iJuv90UH.js";import"./chunk-Q4XR5HBZ-CQ8zkLYc.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-D-nWYRNR.js";import{t as p}from"./chunk-XXDRQBXY-Bq6zMMOx.js";import{t as m}from"./chunk-VR4S4FIN-BTo4eV3J.js";import"./chunk-C7G6YPKG-DW-1jWUA.js";import"./chunk-ZGVPDNZ5-DGInJAPD.js";import"./chunk-52WLFC77-BOCvVCX1.js";import{r as h,t as g}from"./chunk-FWX5IMBZ-ComLEIwh.js";var _=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,3],r=[1,4],i=[1,5],a=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],s=[1,22],c=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],p=[1,33],m=[1,34],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,24],b=[1,31],x=[1,32],S=[1,30],C=[1,39],w=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],D=[89,90],O=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],k=[27,29],ee=[1,70],A=[1,71],te=[1,72],ne=[1,73],re=[1,74],ie=[1,75],ae=[1,76],j=[1,83],M=[1,80],N=[1,84],P=[1,85],F=[1,86],I=[1,87],L=[1,88],R=[1,89],z=[1,90],B=[1,91],V=[1,92],oe=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],H=[63,64],se=[1,101],ce=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],U=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],W=[1,110],G=[1,106],K=[1,107],q=[1,108],J=[1,109],Y=[1,111],X=[1,116],Z=[1,117],Q=[1,114],$=[1,115],le={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:`error`,5:`NEWLINE`,6:`RD`,8:`EOF`,9:`acc_title`,10:`acc_title_value`,11:`acc_descr`,12:`acc_descr_value`,13:`acc_descr_multiline_value`,21:`direction_tb`,22:`direction_bt`,23:`direction_rl`,24:`direction_lr`,27:`STRUCT_START`,29:`STYLE_SEPARATOR`,31:`ID`,32:`COLONSEP`,34:`TEXT`,36:`RISK`,38:`VERIFYMTHD`,40:`STRUCT_STOP`,41:`REQUIREMENT`,42:`FUNCTIONAL_REQUIREMENT`,43:`INTERFACE_REQUIREMENT`,44:`PERFORMANCE_REQUIREMENT`,45:`PHYSICAL_REQUIREMENT`,46:`DESIGN_CONSTRAINT`,47:`LOW_RISK`,48:`MED_RISK`,49:`HIGH_RISK`,50:`VERIFY_ANALYSIS`,51:`VERIFY_DEMONSTRATION`,52:`VERIFY_INSPECTION`,53:`VERIFY_TEST`,54:`ELEMENT`,57:`TYPE`,59:`DOCREF`,61:`END_ARROW_L`,63:`LINE`,64:`END_ARROW_R`,65:`CONTAINS`,66:`COPIES`,67:`DERIVES`,68:`SATISFIES`,69:`VERIFIES`,70:`REFINES`,71:`TRACES`,72:`CLASSDEF`,74:`CLASS`,75:`ALPHA`,76:`COMMA`,77:`STYLE`,80:`NUM`,81:`COLON`,82:`UNIT`,83:`SPACE`,84:`BRKT`,85:`PCT`,86:`MINUS`,87:`LABEL`,88:`SEMICOLON`,89:`unqString`,90:`qString`},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s];break}},`anonymous`),table:[{3:1,4:2,6:n,9:r,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:r,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(o,[2,6]),{3:12,4:2,6:n,9:r,11:i,13:a},{1:[2,2]},{4:17,5:s,7:13,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},t(o,[2,4]),t(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:s,7:42,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:43,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:44,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:45,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:46,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:47,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:48,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:49,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{4:17,5:s,7:50,8:c,9:r,11:i,13:a,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:p,42:m,43:h,44:g,45:_,46:v,54:y,72:b,74:x,77:S,89:C,90:w},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(T,[2,20]),{30:60,33:62,75:E,89:C,90:w},{30:63,33:62,75:E,89:C,90:w},{30:64,33:62,75:E,89:C,90:w},t(D,[2,29]),t(D,[2,30]),t(D,[2,31]),t(D,[2,32]),t(D,[2,33]),t(D,[2,34]),t(O,[2,81]),t(O,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},t(k,[2,79]),t(k,[2,80]),{27:[1,67],29:[1,68]},t(k,[2,85]),t(k,[2,86]),{62:69,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{62:77,65:ee,66:A,67:te,68:ne,69:re,70:ie,71:ae},{30:78,33:62,75:E,89:C,90:w},{73:79,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,60]),t(oe,[2,62]),{73:93,75:j,76:M,78:81,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},{30:94,33:62,75:E,76:M,89:C,90:w},{5:[1,95]},{30:96,33:62,75:E,89:C,90:w},{5:[1,97]},{30:98,33:62,75:E,89:C,90:w},{63:[1,99]},t(H,[2,50]),t(H,[2,51]),t(H,[2,52]),t(H,[2,53]),t(H,[2,54]),t(H,[2,55]),t(H,[2,56]),{64:[1,100]},t(T,[2,59],{76:M}),t(T,[2,64],{76:se}),{33:103,75:[1,102],89:C,90:w},t(ce,[2,65],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),t(U,[2,67]),t(U,[2,69]),t(U,[2,70]),t(U,[2,71]),t(U,[2,72]),t(U,[2,73]),t(U,[2,74]),t(U,[2,75]),t(U,[2,76]),t(U,[2,77]),t(U,[2,78]),t(T,[2,57],{76:se}),t(T,[2,58],{76:M}),{5:W,28:105,31:G,34:K,36:q,38:J,40:Y},{27:[1,112],76:M},{5:X,40:Z,56:113,57:Q,59:$},{27:[1,118],76:M},{33:119,89:C,90:w},{33:120,89:C,90:w},{75:j,78:121,79:82,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V},t(oe,[2,61]),t(oe,[2,63]),t(U,[2,68]),t(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:W,28:126,31:G,34:K,36:q,38:J,40:Y},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:X,40:Z,56:130,57:Q,59:$},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(ce,[2,66],{79:104,75:j,80:N,81:P,82:F,83:I,84:L,85:R,86:z,87:B,88:V}),{33:132,89:C,90:w},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},t(T,[2,27]),{5:W,28:145,31:G,34:K,36:q,38:J,40:Y},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(T,[2,46]),{5:X,40:Z,56:152,57:Q,59:$},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(T,[2,43]),{5:W,28:159,31:G,34:K,36:q,38:J,40:Y},{5:W,28:160,31:G,34:K,36:q,38:J,40:Y},{5:W,28:161,31:G,34:K,36:q,38:J,40:Y},{5:W,28:162,31:G,34:K,36:q,38:J,40:Y},{5:X,40:Z,56:163,57:Q,59:$},{5:X,40:Z,56:164,57:Q,59:$},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(T,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,ee,A;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var te=``;for(O in A=[],s[w])this.terminals_[O]&&O>f&&A.push(`'`+this.terminals_[O]+`'`);te=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+A.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(te,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:A})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),ee=s[r[r.length-2]][r[r.length-1]],r.push(ee);break;case 3:return!0}}return!0},`parse`)};le.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return`title`;case 1:return this.begin(`acc_title`),9;case 2:return this.popState(),`acc_title_value`;case 3:return this.begin(`acc_descr`),11;case 4:return this.popState(),`acc_descr_value`;case 5:this.begin(`acc_descr_multiline`);break;case 6:this.popState();break;case 7:return`acc_descr_multiline_value`;case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin(`style`),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return`PERCENT`;case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin(`string`);break;case 58:this.popState();break;case 59:return this.begin(`style`),72;case 60:return this.begin(`style`),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin(`string`);break;case 65:this.popState();break;case 66:return`qString`;case 67:return t.yytext=t.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},`anonymous`),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}})();function ue(){this.yy={}}return e(ue,`Parser`),ue.prototype=le,le.Parser=ue,new ue})();_.parser=_;var v=_,y=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction=`TB`,this.RequirementType={REQUIREMENT:`Requirement`,FUNCTIONAL_REQUIREMENT:`Functional Requirement`,INTERFACE_REQUIREMENT:`Interface Requirement`,PERFORMANCE_REQUIREMENT:`Performance Requirement`,PHYSICAL_REQUIREMENT:`Physical Requirement`,DESIGN_CONSTRAINT:`Design Constraint`},this.RiskLevel={LOW_RISK:`Low`,MED_RISK:`Medium`,HIGH_RISK:`High`},this.VerifyType={VERIFY_ANALYSIS:`Analysis`,VERIFY_DEMONSTRATION:`Demonstration`,VERIFY_INSPECTION:`Inspection`,VERIFY_TEST:`Test`},this.Relationships={CONTAINS:`contains`,COPIES:`copies`,DERIVES:`derives`,SATISFIES:`satisfies`,VERIFIES:`verifies`,REFINES:`refines`,TRACES:`traces`},this.setAccTitle=a,this.getAccTitle=d,this.setAccDescription=r,this.getAccDescription=c,this.setDiagramTitle=i,this.getDiagramTitle=l,this.getConfig=e(()=>u().requirement,`getConfig`),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{e(this,`RequirementDB`)}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:``,text:``,risk:``,verifyMethod:``,name:``,type:``,cssStyles:[],classes:[`default`]}}getInitialElement(){return{name:``,type:``,docRef:``,cssStyles:[],classes:[`default`]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:[`default`]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:[`default`]}),n.info(`Added new element: `,e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,t,n){this.relations.push({type:e,src:t,dst:n})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,o()}setCssStyle(e,t){for(let n of e){let e=this.requirements.get(n)??this.elements.get(n);if(!t||!e)return;for(let n of t)n.includes(`,`)?e.cssStyles.push(...n.split(`,`)):e.cssStyles.push(n)}}setClass(e,t){for(let n of e){let e=this.requirements.get(n)??this.elements.get(n);if(e)for(let n of t){e.classes.push(n);let t=this.classes.get(n)?.styles;t&&e.cssStyles.push(...t)}}}defineClass(e,t){for(let n of e){let e=this.classes.get(n);e===void 0&&(e={id:n,styles:[],textStyles:[]},this.classes.set(n,e)),t&&t.forEach(function(t){if(/color/.exec(t)){let n=t.replace(`fill`,`bgFill`);e.textStyles.push(n)}e.styles.push(t)}),this.requirements.forEach(e=>{e.classes.includes(n)&&e.cssStyles.push(...t.flatMap(e=>e.split(`,`)))}),this.elements.forEach(e=>{e.classes.includes(n)&&e.cssStyles.push(...t.flatMap(e=>e.split(`,`)))})}}getClasses(){return this.classes}getData(){let e=u(),t=[],n=[];for(let n of this.requirements.values()){let r=n;r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(` `),r.shape=`requirementBox`,r.look=e.look,r.colorIndex=t.length,t.push(r)}for(let n of this.elements.values()){let r=n;r.shape=`requirementBox`,r.look=e.look,r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(` `),r.colorIndex=t.length,t.push(r)}for(let t of this.relations){let r=0,i=t.type===this.Relationships.CONTAINS,a={id:`${t.src}-${t.dst}-${r}`,start:this.requirements.get(t.src)?.name??this.elements.get(t.src)?.name,end:this.requirements.get(t.dst)?.name??this.elements.get(t.dst)?.name,label:`<<${t.type}>>`,classes:`relationshipLine`,style:[`fill:none`,i?``:`stroke-dasharray: 10,7`],labelpos:`c`,thickness:`normal`,type:`normal`,pattern:i?`normal`:`dashed`,arrowTypeStart:i?`requirement_contains`:``,arrowTypeEnd:i?``:`requirement_arrow`,look:e.look,labelType:`markdown`};n.push(a),r++}return{nodes:t,edges:n,other:{},config:e,direction:this.getDirection()}}},b=e(e=>{let{themeVariables:t,look:n}=s(),{bkgColorArray:r,borderColorArray:i}=t;if(!i?.length)return``;let a=``;for(let t=0;t{let{look:t,themeVariables:n}=s(),{requirementEdgeLabelBackground:r}=n;return` - ${b(e)} - marker { - fill: ${e.relationColor}; - stroke: ${e.relationColor}; - } - - marker.cross { - stroke: ${e.lineColor}; - } - - svg { - font-family: ${e.fontFamily}; - font-size: ${e.fontSize}; - } - - .reqBox { - fill: ${e.requirementBackground}; - fill-opacity: 1.0; - stroke: ${e.requirementBorderColor}; - stroke-width: ${e.requirementBorderSize}; - } - - .reqTitle, .reqLabel{ - fill: ${e.requirementTextColor}; - } - .reqLabelBox { - fill: ${e.relationLabelBackground}; - fill-opacity: 1.0; - } - - .req-title-line { - stroke: ${e.requirementBorderColor}; - stroke-width: ${e.requirementBorderSize}; - } - .relationshipLine { - stroke: ${e.relationColor}; - stroke-width: ${t===`neo`?e.strokeWidth:`1px`}; - } - .relationshipLabel { - fill: ${e.relationLabelColor}; - } - .edgeLabel { - background-color: ${e.edgeLabelBackground}; - } - .edgeLabel .label rect { - fill: ${e.edgeLabelBackground}; - } - .edgeLabel .label text { - fill: ${e.relationLabelColor}; - } - .divider { - stroke: ${e.nodeBorder}; - stroke-width: 1; - } - .label { - font-family: ${e.fontFamily}; - color: ${e.nodeTextColor||e.textColor}; - } - .label text,span { - fill: ${e.nodeTextColor||e.textColor}; - color: ${e.nodeTextColor||e.textColor}; - } - .labelBkg { - background-color: ${r??e.edgeLabelBackground}; - } - -`},`getStyles`),S={};t(S,{draw:()=>C});var C=e(async function(e,t,r,i){n.info(`REF0:`),n.info(`Drawing requirement diagram (unified)`,t);let{securityLevel:a,state:o,layout:s,look:c}=u(),l=i.db.getData(),d=p(t,a);l.type=i.type,l.layoutAlgorithm=g(s),l.nodeSpacing=o?.nodeSpacing??50,l.rankSpacing=o?.rankSpacing??50,l.markers=c===`neo`?[`requirement_contains_neo`,`requirement_arrow_neo`]:[`requirement_contains`,`requirement_arrow`],l.diagramId=t,await h(l,d),f.insertTitle(d,`requirementDiagramTitleText`,o?.titleTopMargin??25,i.db.getDiagramTitle()),m(d,8,`requirementDiagram`,o?.useMaxWidth??!0)},`draw`),w={parser:v,get db(){return new y},renderer:S,styles:x};export{w as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/rolldown-runtime-aKtaBQYM.js b/dist-desktop/assets/rolldown-runtime-aKtaBQYM.js deleted file mode 100644 index 8e7d307..0000000 --- a/dist-desktop/assets/rolldown-runtime-aKtaBQYM.js +++ /dev/null @@ -1 +0,0 @@ -var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});export{l as i,s as n,u as r,o as t}; \ No newline at end of file diff --git a/dist-desktop/assets/rough.esm-CSKSodPl.js b/dist-desktop/assets/rough.esm-CSKSodPl.js deleted file mode 100644 index 9f228ce..0000000 --- a/dist-desktop/assets/rough.esm-CSKSodPl.js +++ /dev/null @@ -1 +0,0 @@ -function e(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function t(e,t){return e[0]===t[0]&&e[1]===t[1]}function n(n,r,i,a=1){let o=i,s=Math.max(r,.1),c=n[0]&&n[0][0]&&typeof n[0][0]==`number`?[n]:n,l=[0,0];if(o)for(let t of c)e(t,l,o);let u=function(e,n,r){let i=[];for(let n of e){let e=[...n];t(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&i.push(e)}let a=[];n=Math.max(n,.1);let o=[];for(let e of i)for(let t=0;te.ymint.ymin?1:e.xt.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!o.length)return a;let s=[],c=o[0].ymin,l=0;for(;s.length||o.length;){if(o.length){let e=-1;for(let t=0;tc);t++)e=t;o.splice(0,e+1).forEach((e=>{s.push({s:c,edge:e})}))}if(s=s.filter((e=>!(e.edge.ymax<=c))),s.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),(r!==1||l%n==0)&&s.length>1)for(let e=0;e=s.length)break;let n=s[e].edge,r=s[t].edge;a.push([[Math.round(n.x),c],[Math.round(r.x),c]])}c+=r,s.forEach((e=>{e.edge.x=e.edge.x+r*e.edge.islope})),l++}return a}(c,s,a);if(o){for(let t of c)e(t,l,-o);(function(t,n,r){let i=[];t.forEach((e=>i.push(...e))),e(i,n,r)})(u,l,-o)}return u}function r(e,t){let r=t.hachureAngle+90,i=t.hachureGap;i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1));let a=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(a=i),n(e,i,r,a||1)}var i=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=r(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}};function a(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}var o=class extends i{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);let i=r(e,Object.assign({},t,{hachureGap:n})),o=Math.PI/180*t.hachureAngle,s=[],c=.5*n*Math.cos(o),l=.5*n*Math.sin(o);for(let[e,t]of i)a([e,t])&&s.push([[e[0]-c,e[1]+l],[...t]],[[e[0]+c,e[1]-l],[...t]]);return{type:`fillSketch`,ops:this.renderLines(s,t)}}},s=class extends i{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},c=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=r(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let o=r/4;for(let s of e){let e=a(s),c=e/r,l=Math.ceil(c)-1,u=e-l*r,d=(s[0][0]+s[1][0])/2-r/4,f=Math.min(s[0][1],s[1][1]);for(let e=0;e{let o=a(e),s=Math.floor(o/(n+r)),c=(o+r-s*(n+r))/2,l=e[0],u=e[1];l[0]>u[0]&&(l=e[1],u=e[0]);let d=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let e=0;e{let i=a(e),o=Math.round(i/(2*t)),s=e[0],c=e[1];s[0]>c[0]&&(s=e[1],c=e[0]);let l=Math.atan((c[1]-s[1])/(c[0]-s[0]));for(let e=0;er%2?e+n:e+t));a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function b(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,c=0;for(let{key:l,data:u}of e){switch(l){case`M`:t.push({key:`M`,data:[...u]}),[r,i]=u,[a,o]=u;break;case`C`:t.push({key:`C`,data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case`L`:t.push({key:`L`,data:[...u]}),[r,i]=u;break;case`H`:r=u[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=u[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-c)):(e=r,a=i),t.push({key:`C`,data:[e,a,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case`T`:{let[e,a]=u,o=0,l=0;n===`Q`||n===`T`?(o=r+(r-s),l=i+(i-c)):(o=r,l=i);let d=r+2*(o-r)/3,f=i+2*(l-i)/3,p=e+2*(o-e)/3,m=a+2*(l-a)/3;t.push({key:`C`,data:[d,f,p,m,e,a]}),s=o,c=l,r=e,i=a;break}case`Q`:{let[e,n,a,o]=u,l=r+2*(e-r)/3,d=i+2*(n-i)/3,f=a+2*(e-a)/3,p=o+2*(n-o)/3;t.push({key:`C`,data:[l,d,f,p,a,o]}),s=e,c=n,r=a,i=o;break}case`A`:{let e=Math.abs(u[0]),n=Math.abs(u[1]),a=u[2],o=u[3],s=u[4],c=u[5],l=u[6];e===0||n===0?(t.push({key:`C`,data:[r,i,c,l,c,l]}),r=c,i=l):(r!==c||i!==l)&&(S(r,i,c,l,e,n,a,o,s).forEach((function(e){t.push({key:`C`,data:e})})),r=c,i=l);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=l}return t}function x(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function S(e,t,n,r,i,a,o,s,c,l){let u=(d=o,Math.PI*d/180);var d;let f=[],p=0,m=0,h=0,g=0;if(l)[p,m,h,g]=l;else{[e,t]=x(e,t,-u),[n,r]=x(n,r,-u);let o=(e-n)/2,l=(t-r)/2,d=o*o/(i*i)+l*l/(a*a);d>1&&(d=Math.sqrt(d),i*=d,a*=d);let f=i*i,_=a*a,v=f*_-f*l*l-_*o*o,y=f*l*l+_*o*o,b=(s===c?-1:1)*Math.sqrt(Math.abs(v/y));h=b*i*l/a+(e+n)/2,g=b*-a*o/i+(t+r)/2,p=Math.asin(parseFloat(((t-g)/a).toFixed(9))),m=Math.asin(parseFloat(((r-g)/a).toFixed(9))),em&&(p-=2*Math.PI),!c&&m>p&&(m-=2*Math.PI)}let _=m-p;if(Math.abs(_)>120*Math.PI/180){let e=m,t=n,s=r;m=c&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=S(n=h+i*Math.cos(m),r=g+a*Math.sin(m),t,s,i,a,o,0,c,[m,e,h,g])}_=m-p;let v=Math.cos(p),y=Math.sin(p),b=Math.cos(m),C=Math.sin(m),w=Math.tan(_/4),T=4/3*i*w,E=4/3*a*w,D=[e,t],O=[e+T*y,t-E*v],k=[n+T*C,r-E*b],A=[n,r];if(O[0]=2*D[0]-O[0],O[1]=2*D[1]-O[1],l)return[O,k,A].concat(f);{f=[O,k,A].concat(f);let e=[];for(let t=0;t2){let i=[];for(let t=0;t2*Math.PI&&(p=0,m=2*Math.PI);let h=2*Math.PI/c.curveStepCount,g=Math.min(h/2,(m-p)/2),_=U(g,l,u,d,f,p,m,1,c);if(!c.disableMultiStroke){let e=U(g,l,u,d,f,p,m,1.5,c);_.push(...e)}return o&&(s?_.push(...R(l,u,l+d*Math.cos(p),u+f*Math.sin(p),c),...R(l,u,l+d*Math.cos(m),u+f*Math.sin(m),c)):_.push({op:`lineTo`,data:[l,u]},{op:`lineTo`,data:[l+d*Math.cos(p),u+f*Math.sin(p)]})),{type:`path`,ops:_}}function j(e,t){let n=b(y(v(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...R(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,c,l]=o;r.push(...ee(e,n,i,s,c,l,a,t)),a=[c,l];break}case`Z`:r.push(...R(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function M(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+L(e,t),r[0][1]+L(e,t)]});for(let a=1;a500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=c/10);let d=u/2,f=.2+.2*F(i),p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=L(p,i,l),m=L(m,i,l);let h=[],g=()=>L(d,i,l),_=()=>L(u,i,l),v=i.preserveVertices;return a&&(o?h.push({op:`move`,data:[e+(v?0:g()),t+(v?0:g())]}):h.push({op:`move`,data:[e+(v?0:L(u,i,l)),t+(v?0:L(u,i,l))]})),o?h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+g(),m+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),m+t+2*(r-t)*f+g(),n+(v?0:g()),r+(v?0:g())]}):h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+_(),m+t+(r-t)*f+_(),p+e+2*(n-e)*f+_(),m+t+2*(r-t)*f+_(),n+(v?0:_()),r+(v?0:_())]}),h}function B(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+L(t,n),e[0][1]+L(t,n)]),r.push([e[0][0]+L(t,n),e[0][1]+L(t,n)]);for(let i=1;i3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+21&&i.push(n):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],c=e[t+3],l=q(a,o,r),u=q(o,s,r),d=q(s,c,r),f=q(l,u,r),p=q(u,d,r),m=q(f,p,r);J([a,l,f,m],0,n,i),J([m,p,d,c],0,n,i)}var a,o;return i}function ne(e,t){return Y(e,0,e.length,t)}function Y(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],c=0,l=1;for(let r=t+1;rc&&(c=t,l=r)}return Math.sqrt(c)>r?(Y(e,t,l+1,r,a),Y(e,l,n,r,a)):(a.length||a.push(o),a.push(s)),a}function X(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n0?Y(r,0,r.length,n):r}var Z=`none`,Q=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:`#000`,strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[w(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=E(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(M([i],a)):o.push(N([i],a))}return a.stroke!==Z&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=O(n,r,a),c=k(e,t,a,s);if(a.fill)if(a.fillStyle===`solid`){let n=k(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push(N([c.estimatedPoints],a));return a.stroke!==Z&&o.push(c.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[T(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let c=this._o(s),l=[],u=A(e,t,n,r,i,a,o,!0,c);if(o&&c.fill)if(c.fillStyle===`solid`){let o=Object.assign({},c);o.disableMultiStroke=!0;let s=A(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,l.push(s)}else l.push(function(e,t,n,r,i,a,o){let s=e,c=t,l=Math.abs(n/2),u=Math.abs(r/2);l+=L(.01*l,o),u+=L(.01*u,o);let d=i,f=a;for(;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);let p=(f-d)/o.curveStepCount,m=[];for(let e=d;e<=f;e+=p)m.push([s+l*Math.cos(e),c+u*Math.sin(e)]);return m.push([s+l*Math.cos(f),c+u*Math.sin(f)]),m.push([s,c]),N([m],o)}(e,t,n,r,i,a,c));return c.stroke!==Z&&l.push(u),this._d(`arc`,l,c)}curve(e,t){let n=this._o(t),r=[],i=D(e,n);if(n.fill&&n.fill!==Z)if(n.fillStyle===`solid`){let t=D(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...X(G([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...X(G(r),10,(1+n.roughness)/2))}t.length&&r.push(N([t],n))}return n.stroke!==Z&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=T(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(M([e],n)):r.push(N([e],n))),n.stroke!==Z&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==Z,a=n.stroke!==Z,o=!!(n.simplification&&n.simplification<1),s=function(e,t,n){let r=b(y(v(e))),i=[],a=[],o=[0,0],s=[],c=()=>{s.length>=4&&a.push(...X(s,t)),s=[]},l=()=>{c(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:l(),o=[t[0],t[1]],a.push(o);break;case`L`:c(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:c(),a.push([o[0],o[1]])}if(l(),!n)return i;let u=[];for(let e of i){let t=ne(e,n);t.length&&u.push(t)}return u}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),c=j(e,n);if(i)if(n.fillStyle===`solid`)if(s.length===1){let t=j(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(M(s,n));else r.push(N(s,n));return a&&(o?s.forEach((e=>{r.push(T(e,!1,n))})):r.push(c)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Z};break;case`fillPath`:t={d:this.opsToPath(e),stroke:Z,strokeWidth:0,fill:n.fill||Z};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||Z,strokeWidth:n,fill:Z}}_mergedShape(e){return e.filter(((e,t)=>t===0||e.op!==`move`))}},re=class{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext(`2d`),this.gen=new Q(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(let a of t)switch(a.type){case`path`:r.save(),r.strokeStyle=n.stroke===`none`?`transparent`:n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case`fillPath`:{r.save(),r.fillStyle=n.fill||``;let t=e.shape===`curve`||e.shape===`polygon`||e.shape===`path`?`evenodd`:`nonzero`;this._drawToContext(r,a,i,t),r.restore();break}case`fillSketch`:this.fillSketch(r,a,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||``,e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r=`nonzero`){e.beginPath();for(let r of t.ops){let t=typeof n==`number`&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case`move`:e.moveTo(t[0],t[1]);break;case`bcurveTo`:e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case`lineTo`:e.lineTo(t[0],t[1])}}t.type===`fillPath`?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a),a}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a),a}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a),a}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i),i}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c),c}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){let n=this.gen.path(e,t);return this.draw(n),n}},$=`http://www.w3.org/2000/svg`,ie=class{constructor(e,t){this.svg=e,this.gen=new Q(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS($,`g`),a=e.options.fixedDecimalPlaceDigits;for(let o of t){let t=null;switch(o.type){case`path`:t=r.createElementNS($,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,n.stroke),t.setAttribute(`stroke-width`,n.strokeWidth+``),t.setAttribute(`fill`,`none`),n.strokeLineDash&&t.setAttribute(`stroke-dasharray`,n.strokeLineDash.join(` `).trim()),n.strokeLineDashOffset&&t.setAttribute(`stroke-dashoffset`,`${n.strokeLineDashOffset}`);break;case`fillPath`:t=r.createElementNS($,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,`none`),t.setAttribute(`stroke-width`,`0`),t.setAttribute(`fill`,n.fill||``),e.shape!==`curve`&&e.shape!==`polygon`||t.setAttribute(`fill-rule`,`evenodd`);break;case`fillSketch`:t=this.fillSketch(r,o,n)}t&&i.appendChild(t)}return i}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);let i=e.createElementNS($,`path`);return i.setAttribute(`d`,this.opsToPath(t,n.fixedDecimalPlaceDigits)),i.setAttribute(`stroke`,n.fill||``),i.setAttribute(`stroke-width`,r+``),i.setAttribute(`fill`,`none`),n.fillLineDash&&i.setAttribute(`stroke-dasharray`,n.fillLineDash.join(` `).trim()),n.fillLineDashOffset&&i.setAttribute(`stroke-dashoffset`,`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a)}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a)}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a)}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i)}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c)}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n)}path(e,t){let n=this.gen.path(e,t);return this.draw(n)}},ae={canvas:(e,t)=>new re(e,t),svg:(e,t)=>new ie(e,t),generator:e=>new Q(e),newSeed:()=>Q.newSeed()};export{ae as t}; \ No newline at end of file diff --git a/dist-desktop/assets/routes-BDn33g5C.js b/dist-desktop/assets/routes-BDn33g5C.js deleted file mode 100644 index 55c290f..0000000 --- a/dist-desktop/assets/routes-BDn33g5C.js +++ /dev/null @@ -1,67 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mermaid.core-lwoghoVk.js","assets/index-CXgd9jpl.js","assets/rolldown-runtime-aKtaBQYM.js","assets/react-BLJmJXjR.js","assets/utils-BTuSbA5p.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js","assets/src-UMNXGZaF.js","assets/chunk-WYO6CB5R-Dv5kDyQC.js","assets/chunk-ICXQ74PX-Czpgj8Uw.js","assets/dist-qx0Iv9vM.js","assets/chunk-VAUOI2AC-AC9pRUsa.js","assets/chunk-HOUHSVGY-iJuv90UH.js","assets/chunk-Q4XR5HBZ-CQ8zkLYc.js","assets/chunk-7BUUIJ7U-Bb538aSH.js","assets/chunk-OGEWGWER-D-nWYRNR.js","assets/chunk-C7G6YPKG-DW-1jWUA.js","assets/chunk-ZGVPDNZ5-DGInJAPD.js","assets/rough.esm-CSKSodPl.js","assets/chunk-52WLFC77-BOCvVCX1.js","assets/line-b9Ala942.js","assets/path-BWPyau1x.js","assets/array-BifhSqXX.js","assets/chunk-FWX5IMBZ-ComLEIwh.js","assets/chunk-ZIRB5QZD-C6fEPe3t.js","assets/client-CwgDvMJw.js"])))=>i.map(i=>d[i]); -import{i as e,r as t,t as n}from"./rolldown-runtime-aKtaBQYM.js";import{t as r}from"./react-BLJmJXjR.js";import{G as i,i as a,n as o,t as s,u as c}from"./utils-BTuSbA5p.js";import{a as l,d as u,f as d,i as f,l as p,n as m,o as h,p as g,r as _,s as v,t as y,u as b}from"./index-CXgd9jpl.js";import{i as x}from"./client-CwgDvMJw.js";import{a as S,c as C,i as w,n as T,o as E,r as D,s as O,t as k}from"./input-mze7gZ5r.js";function A(e){if(Array.isArray(e))return e.flatMap(e=>A(e));if(typeof e!=`string`)return[];let t=[],n=0,r,i,a,o,s,c=()=>{for(;n(i=e.charAt(n),i!==`=`&&i!==`;`&&i!==`,`);for(;n=e.length)&&t.push(e.slice(r))}return t}function j(e){return e instanceof Headers?e:Array.isArray(e)||typeof e==`object`?new Headers(e):null}function M(...e){return e.reduce((e,t)=>{let n=j(t);if(!n)return e;for(let[t,r]of n.entries())t===`set-cookie`?A(r).forEach(t=>e.append(`set-cookie`,t)):e.set(t,r);return e},new Headers)}var N=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),P=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),F=e=>{let t=P(e);return t.charAt(0).toUpperCase()+t.slice(1)},I=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),L=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},R={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},z=e(r()),B=(0,z.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,z.createElement)(`svg`,{ref:c,...R,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:I(`lucide`,i),...!a&&!L(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,z.createElement)(e,t)),...Array.isArray(a)?a:[a]])),V=(e,t)=>{let n=(0,z.forwardRef)(({className:n,...r},i)=>(0,z.createElement)(B,{ref:i,iconNode:t,className:I(`lucide-${N(F(e))}`,`lucide-${e}`,n),...r}));return n.displayName=F(e),n},ee=V(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),H=V(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),te=V(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),ne=V(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),re=V(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),U=V(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ie=V(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ae=V(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),W=V(`cloud-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5.782 5.782A7 7 0 0 0 9 19h8.5a4.5 4.5 0 0 0 1.307-.193`,key:`yfwify`}],[`path`,{d:`M21.532 16.5A4.5 4.5 0 0 0 17.5 10h-1.79A7.008 7.008 0 0 0 10 5.07`,key:`jlfiyv`}]]),oe=V(`cloud`,[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]),se=V(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),ce=V(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),le=V(`download`,[[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`polyline`,{points:`7 10 12 15 17 10`,key:`2ggqvy`}],[`line`,{x1:`12`,x2:`12`,y1:`15`,y2:`3`,key:`1vk2je`}]]),ue=V(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),de=V(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),fe=V(`file-down`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}],[`path`,{d:`m9 15 3 3 3-3`,key:`1npd3o`}]]),pe=V(`file-text`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),me=V(`folder-input`,[[`path`,{d:`M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1`,key:`fm4g5t`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m9 16 3-3-3-3`,key:`6m91ic`}]]),he=V(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),ge=V(`folder-output`,[[`path`,{d:`M2 7.5V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-1.5`,key:`1yk7aj`}],[`path`,{d:`M2 13h10`,key:`pgb2dq`}],[`path`,{d:`m5 10-3 3 3 3`,key:`1r8ie0`}]]),_e=V(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),ve=V(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),ye=V(`hard-drive`,[[`line`,{x1:`22`,x2:`2`,y1:`12`,y2:`12`,key:`1y58io`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}],[`line`,{x1:`6`,x2:`6.01`,y1:`16`,y2:`16`,key:`sgf278`}],[`line`,{x1:`10`,x2:`10.01`,y1:`16`,y2:`16`,key:`1l4acy`}]]),be=V(`heading-1`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`m17 12 3-2v8`,key:`1hhhft`}]]),xe=V(`heading-2`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`M21 18h-4c0-4 4-3 4-6 0-1.5-2-2.5-4-1`,key:`9jr5yi`}]]),Se=V(`heading-3`,[[`path`,{d:`M4 12h8`,key:`17cfdx`}],[`path`,{d:`M4 18V6`,key:`1rz3zl`}],[`path`,{d:`M12 18V6`,key:`zqpxq5`}],[`path`,{d:`M17.5 10.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2`,key:`68ncm8`}],[`path`,{d:`M17 17.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2`,key:`1ejuhz`}]]),Ce=V(`image`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]),we=V(`link-2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),Te=V(`list-ordered`,[[`path`,{d:`M10 12h11`,key:`6m4ad9`}],[`path`,{d:`M10 18h11`,key:`11hvi2`}],[`path`,{d:`M10 6h11`,key:`c7qv1k`}],[`path`,{d:`M4 10h2`,key:`16xx2s`}],[`path`,{d:`M4 6h1v4`,key:`cnovpq`}],[`path`,{d:`M6 18H4c0-1 2-2 2-3s-1-1.5-2-1`,key:`m9a95d`}]]),Ee=V(`list-todo`,[[`rect`,{x:`3`,y:`5`,width:`6`,height:`6`,rx:`1`,key:`1defrl`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`M13 6h8`,key:`15sg57`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 18h8`,key:`oe0vm4`}]]),De=V(`list-tree`,[[`path`,{d:`M21 12h-8`,key:`1bmf0i`}],[`path`,{d:`M21 6H8`,key:`1pqkrb`}],[`path`,{d:`M21 18h-8`,key:`1tm79t`}],[`path`,{d:`M3 6v4c0 1.1.9 2 2 2h3`,key:`1ywdgy`}],[`path`,{d:`M3 10v6c0 1.1.9 2 2 2h3`,key:`2wc746`}]]),Oe=V(`list`,[[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 18h.01`,key:`1tta3j`}],[`path`,{d:`M3 6h.01`,key:`1rqtza`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 18h13`,key:`1lx6n3`}],[`path`,{d:`M8 6h13`,key:`ik3vkj`}]]),ke=V(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Ae=V(`log-in`,[[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}],[`polyline`,{points:`10 17 15 12 10 7`,key:`1ail0h`}],[`line`,{x1:`15`,x2:`3`,y1:`12`,y2:`12`,key:`v6grx8`}]]),je=V(`menu`,[[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 18h16`,key:`19g7jn`}],[`path`,{d:`M4 6h16`,key:`1o0s65`}]]),Me=V(`message-square`,[[`path`,{d:`M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z`,key:`1lielz`}]]),Ne=V(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Pe=V(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),Fe=V(`moon`,[[`path`,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`,key:`a7tn18`}]]),Ie=V(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),Le=V(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),Re=V(`play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),ze=V(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Be=V(`plug`,[[`path`,{d:`M12 22v-5`,key:`1ega77`}],[`path`,{d:`M9 8V2`,key:`14iosj`}],[`path`,{d:`M15 8V2`,key:`18g5xt`}],[`path`,{d:`M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z`,key:`osxo6l`}]]),Ve=V(`quote`,[[`path`,{d:`M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`rib7q0`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`1ymkrd`}]]),He=V(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),Ue=V(`save`,[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`,key:`1c8476`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`,key:`1ydtos`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`,key:`t51u73`}]]),We=V(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Ge=V(`settings`,[[`path`,{d:`M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z`,key:`1qme2f`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Ke=V(`sparkles`,[[`path`,{d:`M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z`,key:`4pj2yx`}],[`path`,{d:`M20 3v4`,key:`1olli1`}],[`path`,{d:`M22 5h-4`,key:`1gvqau`}],[`path`,{d:`M4 17v2`,key:`vumght`}],[`path`,{d:`M5 18H3`,key:`zchphs`}]]),qe=V(`square-check-big`,[[`path`,{d:`M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5`,key:`1uzm8b`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Je=V(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]),Ye=V(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),Xe=V(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Ze=V(`table-2`,[[`path`,{d:`M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18`,key:`gugj83`}]]),Qe=V(`terminal`,[[`polyline`,{points:`4 17 10 11 4 5`,key:`akl6gq`}],[`line`,{x1:`12`,x2:`20`,y1:`19`,y2:`19`,key:`q2wloq`}]]),$e=V(`trash-2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`path`,{d:`M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2`,key:`v07s0e`}],[`line`,{x1:`10`,x2:`10`,y1:`11`,y2:`17`,key:`1uufr5`}],[`line`,{x1:`14`,x2:`14`,y1:`11`,y2:`17`,key:`xtxkd`}]]),et=V(`type`,[[`polyline`,{points:`4 7 4 4 20 4 20 7`,key:`1nosan`}],[`line`,{x1:`9`,x2:`15`,y1:`20`,y2:`20`,key:`swin9y`}],[`line`,{x1:`12`,x2:`12`,y1:`4`,y2:`20`,key:`1tx1rr`}]]),tt=V(`unlink`,[[`path`,{d:`m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71`,key:`yqzxt4`}],[`path`,{d:`m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71`,key:`4qinb0`}],[`line`,{x1:`8`,x2:`8`,y1:`2`,y2:`5`,key:`1041cp`}],[`line`,{x1:`2`,x2:`5`,y1:`8`,y2:`8`,key:`14m1p5`}],[`line`,{x1:`16`,x2:`16`,y1:`19`,y2:`22`,key:`rzdirn`}],[`line`,{x1:`19`,x2:`22`,y1:`16`,y2:`16`,key:`ox905f`}]]),nt=V(`upload`,[[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`polyline`,{points:`17 8 12 3 7 8`,key:`t8dd8p`}],[`line`,{x1:`12`,x2:`12`,y1:`3`,y2:`15`,key:`widbto`}]]),rt=V(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),it=V(`wifi`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M2 8.82a15 15 0 0 1 20 0`,key:`dnpr2z`}],[`path`,{d:`M5 12.859a10 10 0 0 1 14 0`,key:`1x1e6c`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}]]),at=V(`workflow`,[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]),ot=V(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),st=V(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),ct=Object.defineProperty,lt=(e,t)=>ct(e,`name`,{value:t,configurable:!0}),ut=!!(typeof window<`u`&&window.document&&window.document.createElement);function G(e,t,{checkForDefaultPrevented:n=!0}={}){return lt(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}lt(G,`composeEventHandlers`);function dt(e){if(!ut)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}lt(dt,`getOwnerWindow`);function ft(e){if(!ut)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}lt(ft,`getOwnerDocument`);function pt(e,t=!1){let{activeElement:n}=ft(e);if(!n?.nodeName)return null;if(mt(n)&&n.contentDocument)return pt(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=ft(n).getElementById(e);if(t)return t}}return n}lt(pt,`getActiveElement`);function mt(e){return e.tagName===`IFRAME`}lt(mt,`isFrame`);var K=c(),ht=Object.defineProperty,gt=(e,t)=>ht(e,`name`,{value:t,configurable:!0});function _t(e,t){let n=z.createContext(t);n.displayName=e+`Context`;let r=gt(e=>{let{children:t,...r}=e,i=z.useMemo(()=>r,Object.values(r));return(0,K.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=z.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return gt(i,`useContext`),[r,i]}gt(_t,`createContext`);function vt(e,t=[]){let n=[];function r(t,r){let i=z.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=gt(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=z.useMemo(()=>o,Object.values(o));return(0,K.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=z.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return gt(s,`useContext`),[o,s]}gt(r,`createContext`);let i=gt(()=>{let t=n.map(e=>z.createContext(e));return gt(function(n){let r=n?.[e]||t;return z.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,yt(i,...t)]}gt(vt,`createContextScope`);function yt(...e){let t=e[0];if(e.length===1)return t;let n=gt(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return gt(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return z.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}gt(yt,`composeContextScopes`);var bt=e(i(),1),xt=Object.defineProperty,St=(e,t)=>xt(e,`name`,{value:t,configurable:!0}),q=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=S(`Primitive.${t}`),r=z.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,K.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ct(e,t){e&&bt.flushSync(()=>e.dispatchEvent(t))}St(Ct,`dispatchDiscreteCustomEvent`);var wt=Object.defineProperty,Tt=(e,t)=>wt(e,`name`,{value:t,configurable:!0});function Et(e){let t=z.useRef(e);return z.useEffect(()=>{t.current=e}),z.useMemo(()=>((...e)=>t.current?.(...e)),[])}Tt(Et,`useCallbackRef`);var Dt=Object.defineProperty,J=(e,t)=>Dt(e,`name`,{value:t,configurable:!0}),Ot=`dismissableLayer.update`,kt=`dismissableLayer.pointerDownOutside`,At=`dismissableLayer.focusOutside`,jt,Mt=z.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Nt=z.forwardRef(J(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=z.useContext(Mt),[d,f]=z.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=z.useState({}),h=C(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=z.useRef(!1),w=It(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:z.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),T=Lt(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?y===g.length-1:!1,D=Et(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return z.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),z.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(jt=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Rt(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=jt))}},[d,p,n,u]),z.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Rt())},[d,u]),z.useEffect(()=>{let e=J(()=>m({}),`handleUpdate`);return document.addEventListener(Ot,e),()=>document.removeEventListener(Ot,e)},[]),(0,K.jsx)(q.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:G(e.onFocusCapture,T.onFocusCapture),onBlurCapture:G(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function Pt(){let e=z.useContext(Mt),[t,n]=z.useState(null);return z.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}J(Pt,`useDismissableLayerSurface`);var Ft=J(()=>!0,`IS_TRUE`);function It(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Ft}=t,s=Et(e),c=z.useRef(!1),l=z.useRef(!1),u=z.useRef(new Map),d=z.useRef(()=>{});return z.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}J(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}J(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}J(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}J(p,`handleInteractionBubble`);let m=J(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||zt(kt,s,p,{discrete:!0})};if(J(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:J(()=>c.current=!0,`onPointerDownCapture`)}}J(It,`usePointerDownOutside`);function Lt(e,t=globalThis?.document){let n=Et(e),r=z.useRef(!1);return z.useEffect(()=>{let e=J(e=>{e.target&&!r.current&&zt(At,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:J(()=>r.current=!0,`onFocusCapture`),onBlurCapture:J(()=>r.current=!1,`onBlurCapture`)}}J(Lt,`useFocusOutside`);function Rt(){let e=new CustomEvent(Ot);document.dispatchEvent(e)}J(Rt,`dispatchUpdate`);function zt(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Ct(i,a):i.dispatchEvent(a)}J(zt,`handleAndDispatchCustomEvent`);var Bt=globalThis?.document?z.useLayoutEffect:()=>{},Vt=Object.defineProperty,Ht=(e,t)=>Vt(e,`name`,{value:t,configurable:!0}),Ut=z.useId||(()=>void 0),Wt=0;function Y(e){let[t,n]=z.useState(Ut());return Bt(()=>{e||n(e=>e??String(Wt++))},[e]),e||(t?`radix-${t}`:``)}Ht(Y,`useId`);var Gt=[`top`,`right`,`bottom`,`left`],Kt=Math.min,qt=Math.max,Jt=Math.round,Yt=Math.floor,Xt=e=>({x:e,y:e}),Zt={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Qt(e,t,n){return qt(e,Kt(t,n))}function $t(e,t){return typeof e==`function`?e(t):e}function en(e){return e.split(`-`)[0]}function tn(e){return e.split(`-`)[1]}function nn(e){return e===`x`?`y`:`x`}function rn(e){return e===`y`?`height`:`width`}function an(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function on(e){return nn(an(e))}function sn(e,t,n){n===void 0&&(n=!1);let r=tn(e),i=on(e),a=rn(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=gn(o)),[o,gn(o)]}function cn(e){let t=gn(e);return[ln(e),t,ln(t)]}function ln(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var un=[`left`,`right`],dn=[`right`,`left`],fn=[`top`,`bottom`],pn=[`bottom`,`top`];function mn(e,t,n){switch(e){case`top`:case`bottom`:return n?t?dn:un:t?un:dn;case`left`:case`right`:return t?fn:pn;default:return[]}}function hn(e,t,n,r){let i=tn(e),a=mn(en(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(ln)))),a}function gn(e){let t=en(e);return Zt[t]+e.slice(t.length)}function _n(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function vn(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:_n(e)}function yn(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function bn(e,t,n){let{reference:r,floating:i}=e,a=an(t),o=on(t),s=rn(o),c=en(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=tn(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function xn(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=$t(t,e),p=vn(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=yn(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=yn(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Sn=50,Cn=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:xn},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=bn(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=$t(e,t)||{};if(l==null)return{};let d=vn(u),f={x:n,y:r},p=on(i),m=rn(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Kt(d[_],T),D=Kt(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Qt(E,k,O),j=!c.arrow&&tn(i)!=null&&k!==A&&a.reference[m]/2-(ke<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==an(t))||T.every(e=>an(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=an(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function En(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Dn(e){return Gt.some(t=>e[t]>=0)}var On=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=$t(e,t);switch(i){case`referenceHidden`:{let e=En(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Dn(e)}}}case`escaped`:{let e=En(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Dn(e)}}}default:return{}}}}},kn=new Set([`left`,`top`]);async function An(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=en(n),s=tn(n),c=an(n)===`y`,l=kn.has(o)?-1:1,u=a&&c?-1:1,d=$t(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var jn=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await An(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Mn=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=$t(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=an(i),p=nn(f),m=u[p],h=u[f],g=(e,t)=>Qt(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},Nn=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=$t(e,t),u={x:n,y:r},d=an(i),f=nn(d),p=u[f],m=u[d],h=$t(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;pn&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=kn.has(en(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);mr&&(m=r)}return{[f]:p,[d]:m}}}},Pn=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=$t(e,t),c=await i.detectOverflow(t,s),l=en(n),u=tn(n),d=an(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Kt(p-c[m],g),y=Kt(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*qt(c.left,c.right):S=p-2*qt(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Fn(){return typeof window<`u`}function In(e){return zn(e)?(e.nodeName||``).toLowerCase():`#document`}function Ln(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rn(e){return((zn(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function zn(e){return Fn()?e instanceof Node||e instanceof Ln(e).Node:!1}function Bn(e){return Fn()?e instanceof Element||e instanceof Ln(e).Element:!1}function Vn(e){return Fn()?e instanceof HTMLElement||e instanceof Ln(e).HTMLElement:!1}function Hn(e){return!Fn()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ln(e).ShadowRoot}function Un(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=er(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Wn(e){return/^(table|td|th)$/.test(In(e))}function Gn(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Kn=/transform|translate|scale|rotate|perspective|filter/,qn=/paint|layout|strict|content/,Jn=e=>!!e&&e!==`none`,Yn;function Xn(e){let t=Bn(e)?er(e):e;return Jn(t.transform)||Jn(t.translate)||Jn(t.scale)||Jn(t.rotate)||Jn(t.perspective)||!Qn()&&(Jn(t.backdropFilter)||Jn(t.filter))||Kn.test(t.willChange||``)||qn.test(t.contain||``)}function Zn(e){let t=nr(e);for(;Vn(t)&&!$n(t);){if(Xn(t))return t;if(Gn(t))return null;t=nr(t)}return null}function Qn(){return Yn??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Yn}function $n(e){return/^(html|body|#document)$/.test(In(e))}function er(e){return Ln(e).getComputedStyle(e)}function tr(e){return Bn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nr(e){if(In(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Hn(e)&&e.host||Rn(e);return Hn(t)?t.host:t}function rr(e){let t=nr(e);return $n(t)?(e.ownerDocument||e).body:Vn(t)&&Un(t)?t:rr(t)}function ir(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=rr(e),i=r===e.ownerDocument?.body,a=Ln(r);if(i){let e=ar(a);return t.concat(a,a.visualViewport||[],Un(r)?r:[],e&&n?ir(e):[])}else return t.concat(r,ir(r,[],n))}function ar(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function or(e){let t=er(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Vn(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Jt(n)!==a||Jt(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function sr(e){return Bn(e)?e:e.contextElement}function cr(e){let t=sr(e);if(!Vn(t))return Xt(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=or(t),o=(a?Jt(n.width):n.width)/r,s=(a?Jt(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var lr=Xt(0);function ur(e){let t=Ln(e);return!Qn()||!t.visualViewport?lr:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dr(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ln(e)}function fr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=sr(e),o=Xt(1);t&&(r?Bn(r)&&(o=cr(r)):o=cr(e));let s=dr(a,n,r)?ur(a):Xt(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ln(a),t=Bn(r)?Ln(r):r,n=e,i=ar(n);for(;i&&t!==n;){let e=cr(i),t=i.getBoundingClientRect(),r=er(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ln(i),i=ar(n)}}return yn({width:u,height:d,x:c,y:l})}function pr(e,t){let n=tr(e).scrollLeft;return t?t.left+n:fr(Rn(e)).left+n}function mr(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-pr(e,n),y:n.top+t.scrollTop}}function hr(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Rn(r),s=t?Gn(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Xt(1),u=Xt(0),d=Vn(r);if((d||!a)&&((In(r)!==`body`||Un(o))&&(c=tr(r)),d)){let e=fr(r);l=cr(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?mr(o,c):Xt(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function gr(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function _r(e){let t=tr(e),n=e.ownerDocument.body,r=qt(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=qt(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+pr(e),o=-t.scrollTop;return er(n).direction===`rtl`&&(a+=qt(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var vr=25;function yr(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ln(e),a=Rn(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Qn()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(pr(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=vr&&(s-=o)}return{width:s,height:c,x:l,y:u}}function br(e,t){let n=fr(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=cr(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function xr(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=yr(e,n,t);else if(t===`document`)r=_r(Rn(e));else if(Bn(t))r=br(t,n);else{let n=ur(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return yn(r)}function Sr(e,t){let n=t.get(e);if(n)return n;let r=ir(e,[],!1).filter(e=>Bn(e)&&In(e)!==`body`),i=null,a=er(e).position===`fixed`,o=a?nr(e):e;for(;Bn(o)&&!$n(o);){let e=er(o),t=Xn(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=nr(o)}return t.set(e,r),r}function Cr(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Gn(t)?[]:Sr(t,this._c):[].concat(n),r],o=xr(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ln(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Pr(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=sr(e),u=i||a?[...l?ir(l):[],...t?ir(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Nr(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?fr(e):null;c&&g();function g(){let t=fr(e);h&&!Mr(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Fr=jn,Ir=Mn,Lr=Tn,Rr=Pn,zr=On,Br=wn,Vr=Nn,Hr=(e,t,n)=>{let r=new Map,i=n??{},a={...jr,...i.platform,_c:r};return Cn(e,t,{...i,platform:a})},Ur=typeof document<`u`?z.useLayoutEffect:function(){};function Wr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Wr(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Wr(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Gr(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Kr(e,t){let n=Gr(e);return Math.round(t*n)/n}function qr(e){let t=z.useRef(e);return Ur(()=>{t.current=e}),t}function Jr(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=z.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=z.useState(r);Wr(f,r)||p(r);let[m,h]=z.useState(null),[g,_]=z.useState(null),v=z.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=z.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=z.useRef(null),C=z.useRef(null),w=z.useRef(u),T=c!=null,E=qr(c),D=qr(i),O=qr(l),k=z.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Hr(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Wr(w.current,t)&&(w.current=t,bt.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Ur(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=z.useRef(!1);Ur(()=>(A.current=!0,()=>{A.current=!1}),[]),Ur(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=z.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=z.useMemo(()=>({reference:b,floating:x}),[b,x]),N=z.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Kr(M.floating,u.x),r=Kr(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Gr(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return z.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var Yr=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Br({element:r.current,padding:i}).fn(n):r?Br({element:r,padding:i}).fn(n):{}}}},Xr=(e,t)=>{let n=Fr(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zr=(e,t)=>{let n=Ir(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qr=(e,t)=>({fn:Vr(e).fn,options:[e,t]}),$r=(e,t)=>{let n=Lr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ei=(e,t)=>{let n=Rr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ti=(e,t)=>{let n=zr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ni=(e,t)=>{let n=Yr(e);return{name:n.name,fn:n.fn,options:[e,t]}},ri=Object.defineProperty,ii=(e,t)=>ri(e,`name`,{value:t,configurable:!0});function ai(e){let[t,n]=z.useState(void 0);return Bt(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}ii(ai,`useSize`);var oi=Object.defineProperty,si=(e,t)=>oi(e,`name`,{value:t,configurable:!0}),ci=`Popper`,[li,ui]=vt(ci),[di,fi]=li(ci),pi=si(e=>{let{__scopePopper:t,children:n}=e,[r,i]=z.useState(null),[a,o]=z.useState(void 0);return(0,K.jsx)(di,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),mi=`PopperAnchor`,hi=z.forwardRef(si(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=fi(mi,n),o=z.useRef(null),s=a.onAnchorChange,c=C(t,z.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=z.useRef(null);z.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Si(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,K.jsx)(q.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),gi=`PopperContent`,[_i,vi]=li(gi),yi=z.forwardRef(si(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=fi(gi,n),[_,v]=z.useState(null),y=C(t,v),[b,x]=z.useState(null),S=ai(b),w=S?.width??0,T=S?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(bi),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=Jr({strategy:`fixed`,placement:E,whileElementsMounted:si((...e)=>Pr(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[Xr({mainAxis:i+T,alignmentAxis:o}),c&&Zr({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Qr():void 0,...A}),c&&$r({...A}),ei({...A,apply:si(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),b&&ni({element:b,padding:s}),xi({arrowWidth:w,arrowHeight:T}),f&&ti({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),I=g.setPlacementState;Bt(()=>(I(N),()=>{I(void 0)}),[N,I]);let[L,R]=Si(N),B=Et(m);Bt(()=>{P&&B?.()},[P,B]);let V=F.arrow?.x,ee=F.arrow?.y,H=F.arrow?.centerOffset!==0,[te,ne]=z.useState();return Bt(()=>{_&&ne(window.getComputedStyle(_).zIndex)},[_]),(0,K.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:te,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,K.jsx)(_i,{scope:n,placedSide:L,placedAlign:R,onArrowChange:x,arrowX:V,arrowY:ee,shouldHideArrow:H,children:(0,K.jsx)(q.div,{"data-side":L,"data-align":R,...h,ref:y,style:{...h.style,animation:P?h.style?.animation:`none`}})})})},`PopperContent`));function bi(e){return e!==null}si(bi,`isNotNull`);var xi=si(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=Si(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Si(e){let[t,n=`center`]=e.split(`-`);return[t,n]}si(Si,`getSideAndAlignFromPlacement`);var Ci=Object.defineProperty,wi=z.forwardRef(((e,t)=>Ci(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=z.useState(!1);Bt(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?bt.createPortal((0,K.jsx)(q.div,{...r,ref:t}),o):null},`Portal`)),Ti=Object.defineProperty,Ei=(e,t)=>Ti(e,`name`,{value:t,configurable:!0});function Di(e,t){return z.useReducer((e,n)=>t[e][n]??e,e)}Ei(Di,`useStateMachine`);var Oi=Ei(e=>{let{present:t,children:n}=e,r=ki(t),i=typeof n==`function`?n({present:r.isPresent}):z.Children.only(n),a=ji(r.ref,Ni(i));return typeof n==`function`||r.isPresent?z.cloneElement(i,{ref:a}):null},`Presence`);function ki(e){let[t,n]=z.useState(),r=z.useRef(null),i=z.useRef(e),a=z.useRef(`none`),o=z.useRef(void 0),[s,c]=Di(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return z.useEffect(()=>{s===`mounted`?(a.current=o.current??Mi(r.current),o.current=void 0):a.current=`none`},[s]),Bt(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Mi(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),Bt(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Ei(a=>{let o=Mi(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Ei(e=>{e.target===t&&(a.current=Mi(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:z.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Mi(t)}else r.current=null;n(e)},[])}}Ei(ki,`usePresence`);function Ai(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ei(Ai,`setRef`);function ji(...e){let t=z.useRef(e);return t.current=e,z.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Ai(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;ePi(e,`name`,{value:t,configurable:!0}),Ii=z.useEffectEvent,Li=z.useInsertionEffect;function Ri(e){if(typeof Ii==`function`)return Ii(e);let t=z.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Li==`function`?Li(()=>{t.current=e}):Bt(()=>{t.current=e}),z.useMemo(()=>((...e)=>t.current?.(...e)),[])}Fi(Ri,`useEffectEvent`);var zi=Object.defineProperty,Bi=(e,t)=>zi(e,`name`,{value:t,configurable:!0}),Vi=z.useInsertionEffect||Bt;function Hi({prop:e,defaultProp:t,onChange:n=Bi(()=>{},`onChange`),caller:r}){let[i,a,o]=Ui({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,z.useCallback(t=>{if(s){let n=Wi(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}Bi(Hi,`useControllableState`);function Ui({defaultProp:e,onChange:t}){let[n,r]=z.useState(e),i=z.useRef(n),a=z.useRef(t);return Vi(()=>{a.current=t},[t]),z.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}Bi(Ui,`useUncontrolledState`);function Wi(e){return typeof e==`function`}Bi(Wi,`isFunction`);var Gi=Symbol(`RADIX:SYNC_STATE`);function Ki(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Ri(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=z.useReducer((t,n)=>{if(n.type===Gi)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=z.useRef(p);z.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=z.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return z.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Gi,state:i})},[i,d.state,c]),[h,f]}Bi(Ki,`useControllableStateReducer`);var qi=Object.defineProperty,Ji=(e,t)=>qi(e,`name`,{value:t,configurable:!0}),[Yi,Xi]=vt(`Tooltip`,[ui]);ui();var Zi=`TooltipProvider`,Qi=700,[$i,ea]=Yi(Zi),ta=Ji(e=>{let{__scopeTooltip:t,delayDuration:n=Qi,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=z.useRef(!0),s=z.useRef(!1),c=z.useRef(0);return z.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,K.jsx)($i,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:z.useCallback(()=>{r<=0||(window.clearTimeout(c.current),o.current=!1)},[r]),onClose:z.useCallback(()=>{r<=0||(window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r))},[r]),isPointerInTransitRef:s,onPointerInTransitChange:z.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})},`TooltipProvider`),[na,ra]=Yi(`Tooltip`),[ia,aa]=Yi(`TooltipPortal`,{forceMount:void 0});E(`TooltipContent`);function oa(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}Ji(oa,`getExitSideFromRect`);function sa(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}Ji(sa,`getPaddedExitPoints`);function ca(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}Ji(ca,`getPointsFromRect`);function la(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;er!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Ji(la,`isPointInPolygon`);function ua(e){let t=e.slice();return t.sort((e,t)=>e.xt.x?1:e.yt.y)),da(t)}Ji(ua,`getHull`);function da(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}Ji(da,`getHullPresorted`);function fa(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Ji(fa,`concatAriaDescribedby`);var pa=ta,ma=Object.defineProperty,ha=(e,t)=>ma(e,`name`,{value:t,configurable:!0}),ga=z.createContext(void 0);function _a(e){let t=z.useContext(ga);return e||t||`ltr`}ha(_a,`useDirection`);var va=Object.defineProperty,ya=(e,t)=>va(e,`name`,{value:t,configurable:!0});function ba(e,[t,n]){return Math.min(n,Math.max(t,e))}ya(ba,`clamp`);var xa=Object.defineProperty,X=(e,t)=>xa(e,`name`,{value:t,configurable:!0});function Sa(e,t){return z.useReducer((e,n)=>t[e][n]??e,e)}X(Sa,`useStateMachine`);var Ca=`ScrollArea`,[wa,Ta]=vt(Ca),[Ea,Da]=wa(Ca),Oa=z.forwardRef(X(function(e,t){let{__scopeScrollArea:n,type:r=`hover`,dir:i,scrollHideDelay:a=600,...o}=e,[s,c]=z.useState(null),[l,u]=z.useState(null),[d,f]=z.useState(null),[p,m]=z.useState(null),[h,g]=z.useState(null),[_,v]=z.useState(0),[y,b]=z.useState(0),[x,S]=z.useState(!1),[w,T]=z.useState(!1),E=C(t,c),D=_a(i);return(0,K.jsx)(Ea,{scope:n,type:r,dir:D,scrollHideDelay:a,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:w,onScrollbarYEnabledChange:T,onCornerWidthChange:v,onCornerHeightChange:b,children:(0,K.jsx)(q.div,{dir:D,...o,ref:E,style:{position:`relative`,"--radix-scroll-area-corner-width":_+`px`,"--radix-scroll-area-corner-height":y+`px`,...e.style}})})},`ScrollArea`)),ka=`ScrollAreaViewport`,Aa=z.forwardRef(X(function(e,t){let{__scopeScrollArea:n,children:r,nonce:i,...a}=e,o=Da(ka,n),s=C(t,z.useRef(null),o.onViewportChange);return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(ja,{nonce:i}),(0,K.jsx)(q.div,{"data-radix-scroll-area-viewport":``,...a,ref:s,style:{overflowX:o.scrollbarXEnabled?`scroll`:`hidden`,overflowY:o.scrollbarYEnabled?`scroll`:`hidden`,...e.style},children:(0,K.jsx)(`div`,{ref:o.onContentChange,style:{minWidth:`100%`,display:`table`},children:r})})]})},`ScrollAreaViewport`)),ja=z.memo(X(function({nonce:e}){return(0,K.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`},nonce:e})},`ScrollAreaViewportStyle`),(e,t)=>e.nonce===t.nonce),Ma=`ScrollAreaScrollbar`,Na=z.forwardRef(X(function(e,t){let{forceMount:n,...r}=e,i=Da(Ma,e.__scopeScrollArea),{onScrollbarXEnabledChange:a,onScrollbarYEnabledChange:o}=i,s=e.orientation===`horizontal`;return z.useEffect(()=>(s?a(!0):o(!0),()=>{s?a(!1):o(!1)}),[s,a,o]),i.type===`hover`?(0,K.jsx)(Pa,{...r,ref:t,forceMount:n}):i.type===`scroll`?(0,K.jsx)(Fa,{...r,ref:t,forceMount:n}):i.type===`auto`?(0,K.jsx)(Ia,{...r,ref:t,forceMount:n}):i.type===`always`?(0,K.jsx)(La,{...r,ref:t,"data-state":`visible`}):null},`ScrollAreaScrollbar`)),Pa=z.forwardRef(X(function(e,t){let{forceMount:n,...r}=e,i=Da(Ma,e.__scopeScrollArea),[a,o]=z.useState(!1);return z.useEffect(()=>{let e=i.scrollArea,t=0;if(e){let n=X(()=>{window.clearTimeout(t),o(!0)},`handlePointerEnter`),r=X(()=>{t=window.setTimeout(()=>o(!1),i.scrollHideDelay)},`handlePointerLeave`);return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,r),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,r)}}},[i.scrollArea,i.scrollHideDelay]),(0,K.jsx)(Oi,{present:n||a,children:(0,K.jsx)(Ia,{"data-state":a?`visible`:`hidden`,...r,ref:t})})},`ScrollAreaScrollbarHover`)),Fa=z.forwardRef(X(function(e,t){let{forceMount:n,...r}=e,i=Da(Ma,e.__scopeScrollArea),a=e.orientation===`horizontal`,o=ro(()=>c(`SCROLL_END`),100),[s,c]=Sa(`hidden`,{hidden:{SCROLL:`scrolling`},scrolling:{SCROLL_END:`idle`,POINTER_ENTER:`interacting`},interacting:{SCROLL:`interacting`,POINTER_LEAVE:`idle`},idle:{HIDE:`hidden`,SCROLL:`scrolling`,POINTER_ENTER:`interacting`}});return z.useEffect(()=>{if(s===`idle`){let e=window.setTimeout(()=>c(`HIDE`),i.scrollHideDelay);return()=>window.clearTimeout(e)}},[s,i.scrollHideDelay,c]),z.useEffect(()=>{let e=i.viewport,t=a?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=X(()=>{let r=e[t];n!==r&&(c(`SCROLL`),o()),n=r},`handleScroll`);return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[i.viewport,a,c,o]),(0,K.jsx)(Oi,{present:n||s!==`hidden`,children:(0,K.jsx)(La,{"data-state":s===`hidden`?`hidden`:`visible`,...r,ref:t,onPointerEnter:G(e.onPointerEnter,()=>c(`POINTER_ENTER`)),onPointerLeave:G(e.onPointerLeave,()=>c(`POINTER_LEAVE`))})})},`ScrollAreaScrollbarScroll`)),Ia=z.forwardRef(X(function(e,t){let n=Da(Ma,e.__scopeScrollArea),{forceMount:r,...i}=e,[a,o]=z.useState(!1),s=e.orientation===`horizontal`,c=ro(()=>{if(n.viewport){let e=n.viewport.offsetWidth0&&l<1,onThumbChange:X(e=>a.current=e,`onThumbChange`),onThumbPointerUp:X(()=>o.current=0,`onThumbPointerUp`),onThumbPointerDown:X(e=>o.current=e,`onThumbPointerDown`)};function d(e,t){return Qa(e,o.current,s,t)}return X(d,`getScrollPosition`),n===`horizontal`?(0,K.jsx)(Ra,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=$a(e,s,i.dir);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,i.dir))}}):n===`vertical`?(0,K.jsx)(za,{...u,ref:t,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=$a(e,s);a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null},`ScrollAreaScrollbarVisible`)),Ra=z.forwardRef(X(function(e,t){let{sizes:n,onSizesChange:r,...i}=e,a=Da(Ma,e.__scopeScrollArea),[o,s]=z.useState(),c=z.useRef(null),l=C(t,c,a.onScrollbarXChange);return z.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,K.jsx)(Ha,{"data-orientation":`horizontal`,...i,ref:l,sizes:n,style:{bottom:0,left:a.dir===`rtl`?`var(--radix-scroll-area-corner-width)`:0,right:a.dir===`ltr`?`var(--radix-scroll-area-corner-width)`:0,"--radix-scroll-area-thumb-width":Za(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),to(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollWidth,viewport:a.viewport.offsetWidth,scrollbar:{size:c.current.clientWidth,paddingStart:Ya(o.paddingLeft),paddingEnd:Ya(o.paddingRight)}})}})},`ScrollAreaScrollbarX`)),za=z.forwardRef(X(function(e,t){let{sizes:n,onSizesChange:r,...i}=e,a=Da(Ma,e.__scopeScrollArea),[o,s]=z.useState(),c=z.useRef(null),l=C(t,c,a.onScrollbarYChange);return z.useEffect(()=>{c.current&&s(getComputedStyle(c.current))},[c]),(0,K.jsx)(Ha,{"data-orientation":`vertical`,...i,ref:l,sizes:n,style:{top:0,right:a.dir===`ltr`?0:void 0,left:a.dir===`rtl`?0:void 0,bottom:`var(--radix-scroll-area-corner-height)`,"--radix-scroll-area-thumb-height":Za(n)+`px`,...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(a.viewport){let r=a.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),to(r,n)&&t.preventDefault()}},onResize:()=>{c.current&&a.viewport&&o&&r({content:a.viewport.scrollHeight,viewport:a.viewport.offsetHeight,scrollbar:{size:c.current.clientHeight,paddingStart:Ya(o.paddingTop),paddingEnd:Ya(o.paddingBottom)}})}})},`ScrollAreaScrollbarY`)),[Ba,Va]=wa(Ma),Ha=z.forwardRef(X(function(e,t){let{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:a,onThumbPointerUp:o,onThumbPointerDown:s,onThumbPositionChange:c,onDragScroll:l,onWheelScroll:u,onResize:d,...f}=e,p=Da(Ma,n),[m,h]=z.useState(null),g=C(t,h),_=z.useRef(null),v=z.useRef(``),y=p.viewport,b=r.content-r.viewport,x=Et(u),S=Et(c),w=ro(d,10);function T(e){if(_.current){let t=e.clientX-_.current.left,n=e.clientY-_.current.top;l({x:t,y:n})}}return X(T,`handleDragScroll`),z.useEffect(()=>{let e=X(e=>{let t=e.target;m?.contains(t)&&x(e,b)},`handleWheel`);return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[y,m,b,x]),z.useEffect(S,[r,S]),io(m,w),io(p.content,w),(0,K.jsx)(Ba,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:Et(a),onThumbPointerUp:Et(o),onThumbPositionChange:S,onThumbPointerDown:Et(s),children:(0,K.jsx)(q.div,{...f,ref:g,style:{position:`absolute`,...f.style},onPointerDown:G(e.onPointerDown,e=>{e.button===0&&(e.target.setPointerCapture(e.pointerId),_.current=m.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,p.viewport&&(p.viewport.style.scrollBehavior=`auto`),T(e))}),onPointerMove:G(e.onPointerMove,T),onPointerUp:G(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=v.current,p.viewport&&(p.viewport.style.scrollBehavior=``),_.current=null})})})},`ScrollAreaScrollbarImpl`)),Ua=`ScrollAreaThumb`,Wa=z.forwardRef(X(function(e,t){let{forceMount:n,...r}=e,i=Va(Ua,e.__scopeScrollArea);return(0,K.jsx)(Oi,{present:n||i.hasThumb,children:(0,K.jsx)(Ga,{ref:t,...r})})},`ScrollAreaThumb`)),Ga=z.forwardRef(X(function(e,t){let{__scopeScrollArea:n,style:r,...i}=e,a=Da(Ua,n),o=Va(Ua,n),{onThumbPositionChange:s}=o,c=C(t,o.onThumbChange),l=z.useRef(void 0),u=ro(()=>{l.current&&=(l.current(),void 0)},100);return z.useEffect(()=>{let e=a.viewport;if(e){let t=X(()=>{if(u(),!l.current){let t=no(e,s);l.current=t,s()}},`handleScroll`);return s(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[a.viewport,u,s]),(0,K.jsx)(q.div,{"data-state":o.hasThumb?`visible`:`hidden`,...i,ref:c,style:{width:`var(--radix-scroll-area-thumb-width)`,height:`var(--radix-scroll-area-thumb-height)`,...r},onPointerDownCapture:G(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;o.onThumbPointerDown({x:n,y:r})}),onPointerUp:G(e.onPointerUp,o.onThumbPointerUp)})},`ScrollAreaThumbImpl`)),Ka=`ScrollAreaCorner`,qa=z.forwardRef(X(function(e,t){let n=Da(Ka,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!==`scroll`&&r?(0,K.jsx)(Ja,{...e,ref:t}):null},`ScrollAreaCorner`)),Ja=z.forwardRef(X(function(e,t){let{__scopeScrollArea:n,...r}=e,i=Da(Ka,n),[a,o]=z.useState(0),[s,c]=z.useState(0),l=!!(a&&s),{onCornerWidthChange:u,onCornerHeightChange:d}=i;return io(i.scrollbarX,()=>{let e=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(e),c(e)}),io(i.scrollbarY,()=>{let e=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(e),o(e)}),z.useEffect(()=>()=>{u(0),d(0)},[u,d]),l?(0,K.jsx)(q.div,{...r,ref:t,style:{width:a,height:s,position:`absolute`,right:i.dir===`ltr`?0:void 0,left:i.dir===`rtl`?0:void 0,bottom:0,...e.style}}):null},`ScrollAreaCornerImpl`));function Ya(e){return e?parseInt(e,10):0}X(Ya,`toInt`);function Xa(e,t){let n=e/t;return isNaN(n)?0:n}X(Xa,`getThumbRatio`);function Za(e){let t=Xa(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}X(Za,`getThumbSize`);function Qa(e,t,n,r=`ltr`){let i=Za(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return eo([c,l],d)(e)}X(Qa,`getScrollPositionFromPointer`);function $a(e,t,n=`ltr`){let r=Za(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=ba(e,n===`ltr`?[0,o]:[o*-1,0]);return eo([0,o],[0,s])(c)}X($a,`getThumbOffsetFromScroll`);function eo(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}X(eo,`linearScale`);function to(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return X((function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)}),`loop`)(),()=>window.cancelAnimationFrame(r)},`addUnlinkedScrollListener`);function ro(e,t){let n=Et(e),r=z.useRef(0);return z.useEffect(()=>()=>window.clearTimeout(r.current),[]),z.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}X(ro,`useDebounceCallback`);function io(e,t){let n=Et(t);Bt(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e,n])}X(io,`useResizeObserver`);function ao({className:e,children:t,...n}){return(0,K.jsxs)(Oa,{className:s(`relative overflow-hidden`,e),...n,children:[(0,K.jsx)(Aa,{className:`h-full w-full rounded-[inherit]`,children:t}),(0,K.jsx)(oo,{}),(0,K.jsx)(qa,{})]})}function oo({className:e,orientation:t=`vertical`,...n}){return(0,K.jsx)(Na,{orientation:t,className:s(`flex touch-none select-none transition-colors`,t===`vertical`&&`h-full w-2 border-l border-l-transparent p-px`,t===`horizontal`&&`h-2 flex-col border-t border-t-transparent p-px`,e),...n,children:(0,K.jsx)(Wa,{className:`relative flex-1 rounded-full bg-border`})})}var so=Object.defineProperty,Z=(e,t)=>so(e,`name`,{value:t,configurable:!0});function co(e){let t=e+`CollectionProvider`,[n,r]=vt(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Z(e=>{let{scope:t,children:n}=e,r=z.useRef(null),a=z.useRef(new Map).current;return(0,K.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=S(s),l=z.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=C(t,a(s,n).collectionRef);return(0,K.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=S(u),p=z.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=z.useRef(null),s=C(t,o),c=a(u,n);return z.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,K.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return z.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Z(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}Z(co,`createCollection`);var lo=new WeakMap,uo=class e extends Map{static{Z(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],lo.set(this,!0)}set(e,t){return lo.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=mo(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function fo(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=po(e,t);return n===-1?void 0:e[n]}Z(fo,`at`);function po(e,t){let n=e.length,r=mo(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Z(po,`toSafeIndex`);function mo(e){return e!==e||e===0?0:Math.trunc(e)}Z(mo,`toSafeInteger`);function ho(e){let t=e+`CollectionProvider`,[n,r]=vt(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new uo,setItemMap:Z(()=>void 0,`setItemMap`)}),o=Z(({state:e,...t})=>e?(0,K.jsx)(c,{...t,state:e}):(0,K.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=Z(e=>{let t=h();return(0,K.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=Z(e=>{let{scope:t,children:n,state:r}=e,a=z.useRef(null),[o,s]=z.useState(null),c=C(a,s),[l,u]=r;return z.useEffect(()=>{if(!o)return;let e=yo(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,K.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=S(l),d=z.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=C(t,a(l,n).collectionRef);return(0,K.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=S(f),m=z.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=z.useRef(null),[s,c]=z.useState(null),l=C(t,o,c),{setItemMap:u}=a(f,n),d=z.useRef(i);go(d.current,i)||(d.current=i);let m=d.current;return z.useEffect(()=>{let e=m;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(vo):(t.set(s,{...e,element:s}),t.toSorted(vo)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new uo(e)))}},[s,m,u]),(0,K.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return z.useState(new uo)}Z(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return Z(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}Z(ho,`createCollection`);function go(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Z(go,`shallowEqual`);function _o(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Z(_o,`isElementPreceding`);function vo(e,t){return!e[1].element||!t[1].element?0:_o(e[1].element,t[1].element)?-1:1}Z(vo,`sortByDocumentPosition`);function yo(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Z(yo,`getChildListObserver`);var bo=Object.defineProperty,xo=(e,t)=>bo(e,`name`,{value:t,configurable:!0}),So=0,Co=null;function wo(e){return To(),e.children}xo(wo,`FocusGuards`);function To(){z.useEffect(()=>{Co||={start:Eo(),end:Eo()};let{start:e,end:t}=Co;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),So++,()=>{So===1&&(Co?.start.remove(),Co?.end.remove(),Co=null),So=Math.max(0,So-1)}},[])}xo(To,`useFocusGuards`);function Eo(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}xo(Eo,`createFocusGuard`);var Do=Object.defineProperty,Oo=(e,t)=>Do(e,`name`,{value:t,configurable:!0}),ko=`focusScope.autoFocusOnMount`,Ao=`focusScope.autoFocusOnUnmount`,jo={bubbles:!1,cancelable:!0},Mo=z.forwardRef(Oo(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=z.useState(null),l=Et(i),u=Et(a),d=z.useRef(null),f=C(t,c),p=z.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;z.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:zo(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||zo(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&zo(s)};Oo(e,`handleFocusIn`),Oo(t,`handleFocusOut`),Oo(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),z.useEffect(()=>{if(s){Bo.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(ko,jo);s.addEventListener(ko,l),s.dispatchEvent(t),t.defaultPrevented||(No(Uo(Fo(s)),{select:!0}),document.activeElement===e&&zo(s))}return()=>{s.removeEventListener(ko,l),setTimeout(()=>{let t=new CustomEvent(Ao,jo);s.addEventListener(Ao,u),s.dispatchEvent(t),t.defaultPrevented||zo(e??document.body,{select:!0}),s.removeEventListener(Ao,u),Bo.remove(p)},0)}}},[s,l,u,p]);let m=z.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Po(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&zo(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&zo(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,K.jsx)(q.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function No(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(zo(r,{select:t}),document.activeElement!==n)return}Oo(No,`focusFirst`);function Po(e){let t=Fo(e);return[Io(t,e),Io(t.reverse(),e)]}Oo(Po,`getTabbableEdges`);function Fo(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Oo(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Oo(Fo,`getTabbableCandidates`);function Io(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):Lo(r,{upTo:t})))return r}Oo(Io,`findVisible`);function Lo(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}Oo(Lo,`isHidden`);function Ro(e){return e instanceof HTMLInputElement&&`select`in e}Oo(Ro,`isSelectableInput`);function zo(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ro(e)&&t&&e.select()}}Oo(zo,`focus`);var Bo=Vo();function Vo(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=Ho(e,t),e.unshift(t)},remove(t){e=Ho(e,t),e[0]?.resume()}}}Oo(Vo,`createFocusScopesStack`);function Ho(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Oo(Ho,`arrayRemove`);function Uo(e){return e.filter(e=>e.tagName!==`A`)}Oo(Uo,`removeLinks`);var Wo=Object.defineProperty,Go=(e,t)=>Wo(e,`name`,{value:t,configurable:!0}),Ko=!1;function qo(){let[e,t]=z.useState(Ko);return z.useEffect(()=>{Ko||(Ko=!0,t(!0))},[]),e}Go(qo,`useIsHydrated`);var Jo=z.useSyncExternalStore;function Yo(){return()=>{}}Go(Yo,`subscribe`);function Xo(){return Jo(Yo,()=>!0,()=>!1)}Go(Xo,`useIsHydratedModern`);var Zo=typeof Jo==`function`?Xo:qo,Qo=Object.defineProperty,$o=(e,t)=>Qo(e,`name`,{value:t,configurable:!0}),es=`rovingFocusGroup.onEntryFocus`,ts={bubbles:!1,cancelable:!0},ns=`RovingFocusGroup`,[rs,is,as]=co(ns),[os,ss]=vt(ns,[as]),[cs,ls]=os(ns),us=z.forwardRef($o(function(e,t){return(0,K.jsx)(rs.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,K.jsx)(rs.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,K.jsx)(ds,{...e,ref:t})})})},`RovingFocusGroup`)),ds=z.forwardRef($o(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=z.useRef(null),p=C(t,f),m=_a(a),[h,g]=Hi({prop:o,defaultProp:s??null,onChange:c,caller:ns}),[_,v]=z.useState(!1),y=Et(l),b=is(n),x=z.useRef(!1),[S,w]=z.useState(0);return z.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(es,y),()=>e.removeEventListener(es,y)},[y]),(0,K.jsx)(cs,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:z.useCallback(e=>g(e),[g]),onItemShiftTab:z.useCallback(()=>v(!0),[]),onFocusableItemAdd:z.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:z.useCallback(()=>w(e=>e-1),[]),children:(0,K.jsx)(q.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:G(e.onMouseDown,()=>{x.current=!0}),onFocus:G(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(es,ts);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);_s([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:G(e.onBlur,()=>v(!1))})})},`RovingFocusGroupImpl`)),fs=`RovingFocusGroupItem`,ps=z.forwardRef($o(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Y(),l=a||c,u=ls(fs,n),d=u.currentTabStopId===l,f=is(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=Zo();return Bt(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),z.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,K.jsx)(rs.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,K.jsx)(q.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:G(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:G(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:G(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=gs(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?vs(n,r+1):n.slice(r+1)}setTimeout(()=>_s(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),ms={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function hs(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}$o(hs,`getDirectionAwareKey`);function gs(e,t,n){let r=hs(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return ms[r]}$o(gs,`getFocusIntent`);function _s(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}$o(_s,`focusFirst`);function vs(e,t){return e.map((n,r)=>e[(t+r)%e.length])}$o(vs,`wrapArray`);var ys=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},bs=new WeakMap,xs=new WeakMap,Ss={},Cs=0,ws=function(e){return e&&(e.host||ws(e.parentNode))},Ts=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=ws(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Es=function(e,t,n,r){var i=Ts(t,Array.isArray(e)?e:[e]);Ss[n]||(Ss[n]=new WeakMap);var a=Ss[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(bs.get(e)||0)+1,l=(a.get(e)||0)+1;bs.set(e,c),a.set(e,l),o.push(e),c===1&&i&&xs.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Cs++,function(){o.forEach(function(e){var t=bs.get(e)-1,i=a.get(e)-1;bs.set(e,t),a.set(e,i),t||(xs.has(e)||e.removeAttribute(r),xs.delete(e)),i||e.removeAttribute(n)}),Cs--,Cs||(bs=new WeakMap,bs=new WeakMap,xs=new WeakMap,Ss={})}},Ds=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||ys(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Es(r,i,n,`aria-hidden`)):function(){return null}},Os=function(){return Os=Object.assign||function(e){for(var t,n=1,r=arguments.length;n`u`)return nc;var t=ic(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},oc=tc(),sc=`data-scroll-locked`,cc=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),` - .${Ns} { - overflow: hidden ${r}; - padding-right: ${s}px ${r}; - } - body[${sc}] { - overflow: hidden ${r}; - overscroll-behavior: contain; - ${[t&&`position: relative ${r};`,n===`margin`&&` - padding-left: ${i}px; - padding-top: ${a}px; - padding-right: ${o}px; - margin-left:0; - margin-top:0; - margin-right: ${s}px ${r}; - `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)} - } - - .${js} { - right: ${s}px ${r}; - } - - .${Ms} { - margin-right: ${s}px ${r}; - } - - .${js} .${js} { - right: 0 ${r}; - } - - .${Ms} .${Ms} { - margin-right: 0 ${r}; - } - - body[${sc}] { - ${Ps}: ${s}px; - } -`},lc=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},uc=function(){z.useEffect(function(){return document.body.setAttribute(sc,(lc()+1).toString()),function(){var e=lc()-1;e<=0?document.body.removeAttribute(sc):document.body.setAttribute(sc,e.toString())}},[])},dc=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;uc();var a=z.useMemo(function(){return ac(i)},[i]);return z.createElement(oc,{styles:cc(a,!t,i,n?``:`!important`)})},fc=!1;if(typeof window<`u`)try{var pc=Object.defineProperty({},"passive",{get:function(){return fc=!0,!0}});window.addEventListener(`test`,pc,pc),window.removeEventListener(`test`,pc,pc)}catch{fc=!1}var mc=fc?{passive:!1}:!1,hc=function(e){return e.tagName===`TEXTAREA`},gc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!hc(e)&&n[t]===`visible`)},_c=function(e){return gc(e,`overflowY`)},vc=function(e){return gc(e,`overflowX`)},yc=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Sc(e,r)){var i=Cc(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},bc=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},xc=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Sc=function(e,t){return e===`v`?_c(t):vc(t)},Cc=function(e,t){return e===`v`?bc(t):xc(t)},wc=function(e,t){return e===`h`&&t===`rtl`?-1:1},Tc=function(e,t,n,r,i){var a=wc(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Cc(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Sc(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Ec=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Dc=function(e){return[e.deltaX,e.deltaY]},Oc=function(e){return e&&`current`in e?e.current:e},kc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ac=function(e){return` - .block-interactivity-${e} {pointer-events: none;} - .allow-interactivity-${e} {pointer-events: all;} -`},jc=0,Mc=[];function Nc(e){var t=z.useRef([]),n=z.useRef([0,0]),r=z.useRef(),i=z.useState(jc++)[0],a=z.useState(tc)[0],o=z.useRef(e);z.useEffect(function(){o.current=e},[e]),z.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=As([e.lockRef.current],(e.shards||[]).map(Oc),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=z.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Ec(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=yc(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=yc(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Tc(h,t,e,h===`h`?s:c,!0)},[]),c=z.useCallback(function(e){var n=e;if(!(!Mc.length||Mc[Mc.length-1]!==a)){var r=`deltaY`in n?Dc(n):Ec(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&kc(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Oc).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=z.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Pc(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=z.useCallback(function(e){n.current=Ec(e),r.current=void 0},[]),d=z.useCallback(function(t){l(t.type,Dc(t),t.target,s(t,e.lockRef.current))},[]),f=z.useCallback(function(t){l(t.type,Ec(t),t.target,s(t,e.lockRef.current))},[]);z.useEffect(function(){return Mc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,mc),document.addEventListener(`touchmove`,c,mc),document.addEventListener(`touchstart`,u,mc),function(){Mc=Mc.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,mc),document.removeEventListener(`touchmove`,c,mc),document.removeEventListener(`touchstart`,u,mc)}},[]);var p=e.removeScrollBar,m=e.inert;return z.createElement(z.Fragment,null,m?z.createElement(a,{styles:Ac(i)}):null,p?z.createElement(dc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Pc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Fc=Ws(Gs,Nc),Ic=z.forwardRef(function(e,t){return z.createElement(qs,Os({},e,{ref:t,sideCar:Fc}))});Ic.classNames=qs.classNames;var Lc=Object.defineProperty,Q=(e,t)=>Lc(e,`name`,{value:t,configurable:!0}),Rc=[`Enter`,` `],zc=[`ArrowDown`,`PageUp`,`Home`],Bc=[`ArrowUp`,`PageDown`,`End`],Vc=[...zc,...Bc],Hc={ltr:[...Rc,`ArrowRight`],rtl:[...Rc,`ArrowLeft`]},Uc={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},Wc=`Menu`,[Gc,Kc,qc]=co(Wc),[Jc,Yc]=vt(Wc,[qc,ui,ss]),Xc=ui(),Zc=ss(),[Qc,$c]=Jc(Wc),[el,tl]=Jc(Wc),nl=Q(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=Xc(t),[c,l]=z.useState(null),u=z.useRef(!1),d=Et(a),f=_a(i);return z.useEffect(()=>{let e=Q(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=Q(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),z.useEffect(()=>{if(!n)return;let e=Q(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,K.jsx)(pi,{...s,children:(0,K.jsx)(Qc,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,K.jsx)(el,{scope:t,onClose:z.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),rl=z.forwardRef(Q(function(e,t){let{__scopeMenu:n,...r}=e,i=Xc(n);return(0,K.jsx)(hi,{...i,...r,ref:t})},`MenuAnchor`)),il=`MenuPortal`,[al,ol]=Jc(il,{forceMount:void 0}),sl=Q(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=$c(il,t);return(0,K.jsx)(al,{scope:t,forceMount:n,children:(0,K.jsx)(Oi,{present:n||a.open,children:(0,K.jsx)(wi,{asChild:!0,container:i,children:r})})})},`MenuPortal`),cl=`MenuContent`,[ll,ul]=Jc(cl),dl=z.forwardRef(Q(function(e,t){let n=ol(cl,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=$c(cl,e.__scopeMenu),o=tl(cl,e.__scopeMenu);return(0,K.jsx)(Gc.Provider,{scope:e.__scopeMenu,children:(0,K.jsx)(Oi,{present:r||a.open,children:(0,K.jsx)(Gc.Slot,{scope:e.__scopeMenu,children:o.modal?(0,K.jsx)(fl,{...i,ref:t}):(0,K.jsx)(pl,{...i,ref:t})})})})},`MenuContent`)),fl=z.forwardRef(Q(function(e,t){let n=$c(cl,e.__scopeMenu),r=z.useRef(null),i=C(t,r);return z.useEffect(()=>{let e=r.current;if(e)return Ds(e)},[]),(0,K.jsx)(hl,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:G(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),pl=z.forwardRef(Q(function(e,t){let n=$c(cl,e.__scopeMenu);return(0,K.jsx)(hl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),ml=S(`MenuContent.ScrollLock`),hl=z.forwardRef(Q(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=$c(cl,n),_=tl(cl,n),v=Xc(n),y=Zc(n),b=Kc(n),[x,S]=z.useState(null),w=z.useRef(null),T=C(t,w,g.onContentChange),E=z.useRef(0),D=z.useRef(``),O=z.useRef(0),k=z.useRef(null),A=z.useRef(`right`),j=z.useRef(0),M=m?Ic:z.Fragment,N=m?{as:ml,allowPinchZoom:!0}:void 0,P=Q(e=>{let t=D.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=zl(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;Q((function e(t){D.current=t,window.clearTimeout(E.current),t!==``&&(E.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);z.useEffect(()=>()=>window.clearTimeout(E.current),[]),To();let F=z.useCallback(e=>A.current===k.current?.side&&Vl(e,k.current?.area),[]);return(0,K.jsx)(ll,{scope:n,searchRef:D,onItemEnter:z.useCallback(e=>{F(e)&&e.preventDefault()},[F]),onItemLeave:z.useCallback(e=>{F(e)||(w.current?.focus(),S(null))},[F]),onTriggerLeave:z.useCallback(e=>{F(e)&&e.preventDefault()},[F]),pointerGraceTimerRef:O,onPointerGraceIntentChange:z.useCallback(e=>{k.current=e},[]),children:(0,K.jsx)(M,{...N,children:(0,K.jsx)(Mo,{asChild:!0,trapped:i,onMountAutoFocus:G(a,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,K.jsx)(Nt,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,K.jsx)(us,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:G(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,K.jsx)(yi,{role:`menu`,"aria-orientation":`vertical`,"data-state":Pl(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:T,style:{outline:`none`,...h.style},onKeyDown:G(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&P(e.key));let i=w.current;if(e.target!==i||!Vc.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);Bc.includes(e.key)&&a.reverse(),Ll(a)}),onBlur:G(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(E.current),D.current=``)}),onPointerMove:G(e.onPointerMove,Hl(e=>{let t=e.target,n=j.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>j.current?`right`:`left`;A.current=t,j.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),gl=z.forwardRef(Q(function(e,t){let{__scopeMenu:n,...r}=e;return(0,K.jsx)(q.div,{...r,ref:t})},`MenuLabel`)),_l=`MenuItem`,vl=`menu.itemSelect`,yl=z.forwardRef(Q(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=z.useRef(null),o=tl(_l,e.__scopeMenu),s=ul(_l,e.__scopeMenu),c=C(t,a),l=z.useRef(!1),u=Q(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(vl,{bubbles:!0,cancelable:!0});e.addEventListener(vl,e=>r?.(e),{once:!0}),Ct(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,K.jsx)(bl,{...i,ref:c,disabled:n,onClick:G(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:G(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:G(e.onKeyDown,e=>{n||e.target!==e.currentTarget||s.searchRef.current!==``&&e.key===` `||Rc.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),bl=z.forwardRef(Q(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=ul(_l,n),s=Zc(n),c=z.useRef(null),l=C(t,c),[u,d]=z.useState(!1),[f,p]=z.useState(``);return z.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,K.jsx)(Gc.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,K.jsx)(ps,{asChild:!0,...s,focusable:!r,children:(0,K.jsx)(q.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:G(e.onPointerMove,Hl(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:G(e.onPointerLeave,Hl(e=>o.onItemLeave(e))),onFocus:G(e.onFocus,()=>d(!0)),onBlur:G(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[xl,Sl]=Jc(`MenuRadioGroup`,{value:void 0,onValueChange:Q(()=>{},`onValueChange`)}),[Cl,wl]=Jc(`MenuItemIndicator`,{checked:!1}),Tl=z.forwardRef(Q(function(e,t){let{__scopeMenu:n,...r}=e;return(0,K.jsx)(q.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})},`MenuSeparator`)),El=`MenuSub`,[Dl,Ol]=Jc(El),kl=Q(e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=$c(El,t),o=Xc(t),[s,c]=z.useState(null),[l,u]=z.useState(null),d=Et(i);return z.useEffect(()=>(a.open===!1&&d(!1),()=>d(!1)),[a.open,d]),(0,K.jsx)(pi,{...o,children:(0,K.jsx)(Qc,{scope:t,open:r,onOpenChange:d,content:l,onContentChange:u,children:(0,K.jsx)(Dl,{scope:t,contentId:Y(),triggerId:Y(),trigger:s,onTriggerChange:c,children:n})})})},`MenuSub`),Al=`MenuSubTrigger`,jl=z.forwardRef(Q(function(e,t){let n=$c(Al,e.__scopeMenu),r=tl(Al,e.__scopeMenu),i=Ol(Al,e.__scopeMenu),a=ul(Al,e.__scopeMenu),o=z.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,l={__scopeMenu:e.__scopeMenu},u=z.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);z.useEffect(()=>u,[u]),z.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]);let d=C(t,i.onTriggerChange);return(0,K.jsx)(rl,{asChild:!0,...l,children:(0,K.jsx)(bl,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":n.open?i.contentId:void 0,"data-state":Pl(n.open),...e,ref:d,onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:G(e.onPointerMove,Hl(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:G(e.onPointerLeave,Hl(e=>{u();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:G(e.onKeyDown,t=>{e.disabled||t.target!==t.currentTarget||a.searchRef.current!==``&&t.key===` `||Hc[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})},`MenuSubTrigger`)),Ml=`MenuSubContent`,Nl=z.forwardRef(Q(function(e,t){let n=ol(cl,e.__scopeMenu),{forceMount:r=n.forceMount,align:i=`start`,...a}=e,o=$c(cl,e.__scopeMenu),s=tl(cl,e.__scopeMenu),c=Ol(Ml,e.__scopeMenu),l=z.useRef(null),u=C(t,l);return(0,K.jsx)(Gc.Provider,{scope:e.__scopeMenu,children:(0,K.jsx)(Oi,{present:r||o.open,children:(0,K.jsx)(Gc.Slot,{scope:e.__scopeMenu,children:(0,K.jsx)(hl,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:u,align:i,side:s.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:G(e.onFocusOutside,e=>{e.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:G(e.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:G(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=Uc[s.dir].includes(e.key);t&&n&&(o.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})},`MenuSubContent`));function Pl(e){return e?`open`:`closed`}Q(Pl,`getOpenState`);function Fl(e){return e===`indeterminate`}Q(Fl,`isIndeterminate`);function Il(e){return Fl(e)?`indeterminate`:e?`checked`:`unchecked`}Q(Il,`getCheckedState`);function Ll(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}Q(Ll,`focusFirst`);function Rl(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Q(Rl,`wrapArray`);function zl(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Rl(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Q(zl,`getNextMatch`);function Bl(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;er!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}Q(Bl,`isPointInPolygon`);function Vl(e,t){return t?Bl({x:e.clientX,y:e.clientY},t):!1}Q(Vl,`isPointerInGraceArea`);function Hl(e){return t=>t.pointerType===`mouse`?e(t):void 0}Q(Hl,`whenMouse`);var Ul=Object.defineProperty,Wl=(e,t)=>Ul(e,`name`,{value:t,configurable:!0}),Gl=`DropdownMenu`,[Kl,ql]=vt(Gl,[Yc]),Jl=Yc(),[Yl,Xl]=Kl(Gl),Zl=Wl(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Jl(t),l=z.useRef(null),[u,d]=Hi({prop:i,defaultProp:a??!1,onChange:o,caller:Gl});return(0,K.jsx)(Yl,{scope:t,triggerId:Y(),triggerRef:l,contentId:Y(),open:u,onOpenChange:d,onOpenToggle:z.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,K.jsx)(nl,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),Ql=`DropdownMenuTrigger`,$l=z.forwardRef(Wl(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=Xl(Ql,n),o=Jl(n),s=C(t,a.triggerRef);return(0,K.jsx)(rl,{asChild:!0,...o,children:(0,K.jsx)(q.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:G(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:G(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),eu=Wl(e=>{let{__scopeDropdownMenu:t,...n}=e,r=Jl(t);return(0,K.jsx)(sl,{...r,...n})},`DropdownMenuPortal`),tu=`DropdownMenuContent`,nu=z.forwardRef(Wl(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Xl(tu,n),a=Jl(n),o=z.useRef(!1);return(0,K.jsx)(dl,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:G(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:G(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),ru=z.forwardRef(Wl(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Jl(n);return(0,K.jsx)(gl,{...i,...r,ref:t})},`DropdownMenuLabel`)),iu=z.forwardRef(Wl(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Jl(n);return(0,K.jsx)(yl,{...i,...r,ref:t})},`DropdownMenuItem`)),au=z.forwardRef(Wl(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Jl(n);return(0,K.jsx)(Tl,{...i,...r,ref:t})},`DropdownMenuSeparator`)),ou=Wl(e=>{let{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:i,defaultOpen:a}=e,o=Jl(t),[s,c]=Hi({prop:r,defaultProp:a??!1,onChange:i,caller:`DropdownMenuSub`});return(0,K.jsx)(kl,{...o,open:s,onOpenChange:c,children:n})},`DropdownMenuSub`),su=z.forwardRef(Wl(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Jl(n);return(0,K.jsx)(jl,{...i,...r,ref:t})},`DropdownMenuSubTrigger`)),cu=z.forwardRef(Wl(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=Jl(n);return(0,K.jsx)(Nl,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuSubContent`)),lu=Zl,uu=$l,du=ou;function fu({className:e,inset:t,children:n,...r}){return(0,K.jsxs)(su,{className:s(`flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-muted data-[state=open]:bg-muted`,t&&`pl-8`,e),...r,children:[n,(0,K.jsx)(ae,{className:`ml-auto size-4 opacity-60`})]})}function pu({className:e,...t}){return(0,K.jsx)(cu,{className:s(`z-50 min-w-40 overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg`,e),...t})}function mu({className:e,sideOffset:t=4,...n}){return(0,K.jsx)(eu,{children:(0,K.jsx)(nu,{sideOffset:t,className:s(`z-50 min-w-44 overflow-hidden rounded-lg border border-border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,e),...n})})}function hu({className:e,inset:t,...n}){return(0,K.jsx)(iu,{className:s(`relative flex cursor-default select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none transition-colors focus:bg-muted data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,t&&`pl-8`,e),...n})}function gu({className:e,inset:t,...n}){return(0,K.jsx)(ru,{className:s(`px-2 py-1.5 text-xs font-medium text-muted-foreground`,t&&`pl-8`,e),...n})}function _u({className:e,...t}){return(0,K.jsx)(au,{className:s(`-mx-1 my-1 h-px bg-border`,e),...t})}var vu=Object.defineProperty,yu=(e,t)=>vu(e,`name`,{value:t,configurable:!0}),bu=`Dialog`,[xu,Su]=vt(bu),[Cu,wu]=xu(bu),Tu=yu(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=z.useRef(null),c=z.useRef(null),[l,u]=Hi({prop:r,defaultProp:i??!1,onChange:a,caller:bu}),[d,f]=z.useState(0),[p,m]=z.useState(0);return(0,K.jsx)(Cu,{scope:t,triggerRef:s,contentRef:c,contentId:Y(),titleId:Y(),descriptionId:Y(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:z.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),Eu=`DialogPortal`,[Du,Ou]=xu(Eu,{forceMount:void 0}),ku=yu(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=wu(Eu,t);return(0,K.jsx)(Du,{scope:t,forceMount:n,children:z.Children.map(r,e=>(0,K.jsx)(Oi,{present:n||a.open,children:(0,K.jsx)(wi,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),Au=`DialogOverlay`,ju=z.forwardRef(yu(function(e,t){let n=Ou(Au,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=wu(Au,e.__scopeDialog);return a.modal?(0,K.jsx)(Oi,{present:r||a.open,children:(0,K.jsx)(Nu,{...i,ref:t})}):null},`DialogOverlay`)),Mu=S(`DialogOverlay.RemoveScroll`),Nu=z.forwardRef(yu(function(e,t){let{__scopeDialog:n,...r}=e,i=wu(Au,n),a=C(t,Pt());return(0,K.jsx)(Ic,{as:Mu,allowPinchZoom:!0,shards:[i.contentRef],children:(0,K.jsx)(q.div,{"data-state":Wu(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),Pu=`DialogContent`,Fu=z.forwardRef(yu(function(e,t){let n=Ou(Pu,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=wu(Pu,e.__scopeDialog);return(0,K.jsx)(Oi,{present:r||a.open,children:a.modal?(0,K.jsx)(Iu,{...i,ref:t}):(0,K.jsx)(Lu,{...i,ref:t})})},`DialogContent`)),Iu=z.forwardRef(yu(function(e,t){let n=wu(Pu,e.__scopeDialog),r=z.useRef(null),i=C(t,n.contentRef,r);return z.useEffect(()=>{let e=r.current;if(e)return Ds(e)},[]),(0,K.jsx)(Ru,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:G(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:G(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),Lu=z.forwardRef(yu(function(e,t){let n=wu(Pu,e.__scopeDialog),r=z.useRef(!1),i=z.useRef(!1);return(0,K.jsx)(Ru,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),Ru=z.forwardRef(yu(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,"aria-describedby":o,...s}=e,c=wu(Pu,n);return To(),(0,K.jsx)(K.Fragment,{children:(0,K.jsx)(Mo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,K.jsx)(Nt,{role:`dialog`,id:c.contentId,"aria-labelledby":c.titlePresent?c.titleId:void 0,"aria-describedby":c.descriptionPresent?Uu(o,c.descriptionId):o,"data-state":Wu(c.open),...s,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})},`DialogContentImpl`)),zu=z.forwardRef(yu(function(e,t){let{__scopeDialog:n,...r}=e,i=wu(`DialogTitle`,n),{setTitleCount:a}=i;return Bt(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,K.jsx)(q.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),Bu=z.forwardRef(yu(function(e,t){let{__scopeDialog:n,...r}=e,i=wu(`DialogDescription`,n),{setDescriptionCount:a}=i;return Bt(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,K.jsx)(q.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),Vu=`DialogClose`,Hu=z.forwardRef(yu(function(e,t){let{__scopeDialog:n,...r}=e,i=wu(Vu,n);return(0,K.jsx)(q.button,{type:`button`,...r,ref:t,onClick:G(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function Uu(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}yu(Uu,`concatAriaDescribedby`);function Wu(e){return e?`open`:`closed`}yu(Wu,`getState`);var Gu=Tu,Ku=ku;function qu({className:e,...t}){return(0,K.jsx)(ju,{className:s(`fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t})}function Ju({className:e,children:t,...n}){return(0,K.jsxs)(Ku,{children:[(0,K.jsx)(qu,{}),(0,K.jsxs)(Fu,{className:s(`fixed left-1/2 top-1/2 z-50 grid w-[calc(100%-2rem)] max-w-lg -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl border border-border bg-background p-6 shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,e),...n,children:[t,(0,K.jsxs)(Hu,{className:`absolute right-3 top-3 rounded-md p-1.5 text-muted-foreground opacity-70 transition-opacity hover:bg-muted hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring/40`,children:[(0,K.jsx)(ot,{className:`size-4`}),(0,K.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function Yu({className:e,...t}){return(0,K.jsx)(`div`,{className:s(`flex flex-col gap-1.5 text-left`,e),...t})}function Xu({className:e,...t}){return(0,K.jsx)(zu,{className:s(`text-lg font-semibold leading-none tracking-tight`,e),...t})}function Zu({className:e,...t}){return(0,K.jsx)(Bu,{className:s(`text-sm text-muted-foreground`,e),...t})}function Qu(){let e=T();if(!e)return null;let t=e.displayName??e.primaryEmail??`Account`;return(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[e.profileImageUrl?(0,K.jsx)(`img`,{src:e.profileImageUrl,alt:``,className:`h-8 w-8 rounded-full object-cover`}):(0,K.jsx)(`span`,{className:`grid h-8 w-8 place-items-center rounded-full bg-black/10 text-sm font-medium dark:bg-white/20`,children:t.charAt(0).toUpperCase()}),(0,K.jsx)(`span`,{className:`text-sm font-medium`,children:t}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>void x(),className:`cursor-pointer text-sm underline-offset-4 opacity-70 hover:underline`,children:`Sign out`})]})}function $u(e){return e!==`__proto__`&&e!==`constructor`&&e!==`prototype`}function ed(e,t){let n=Object.create(null);if(e)for(let t of Object.keys(e))$u(t)&&(n[t]=e[t]);if(t&&typeof t==`object`)for(let e of Object.keys(t))$u(e)&&(n[e]=t[e]);return n}function td(e){if(!e)return Object.create(null);let t=Object.create(null);for(let n of Object.keys(e))$u(n)&&(t[n]=e[n]);return t}var nd=()=>{throw Error(`createServerOnlyFn() functions can only be called on the server!`)},$=(e,t)=>{let n=t||e||{};n.method===void 0&&(n.method=`GET`);let r=e=>$(void 0,{...n,validator:e,inputValidator:e});return Object.assign(e=>$(void 0,{...n,...e}),{options:n,middleware:e=>{let t=[...n.middleware||[]];e.map(e=>{g in e?e.options.middleware&&t.push(...e.options.middleware):t.push(e)});let r=$(void 0,{...n,middleware:t});return r[g]=!0,r},validator:r,inputValidator:r,handler:(...e)=>{let[t,r]=e,i={...n,extractedFn:t,serverFn:r},a=[...i.middleware||[],od(i)];return t.method=n.method,Object.assign(async e=>{let n=await rd(a,`client`,{...t,...i,data:e?.data,headers:e?.headers,signal:e?.signal,fetch:e?.fetch,context:td()}),r=u(n.error);if(r)throw r;if(n.error)throw n.error;return n.result},{...t,method:n.method,__executeServer:async e=>{let n=nd(),r=n.contextAfterGlobalMiddlewares;return await rd(a,`server`,{...t,...e,serverFnMeta:t.serverFnMeta,context:ed(e.context,r),request:n.request}).then(e=>({result:e.result,error:e.error,context:e.sendContext}))}})}})};async function rd(e,t,n){let r=id([...d()?.functionMiddleware||[],...e]);if(t===`server`){let e=nd({throwIfNotFound:!1});e?.executedRequestMiddlewares&&(r=r.filter(t=>!e.executedRequestMiddlewares.has(t)))}let i=async e=>{let n=r.shift();if(!n)return e;try{let r=`validator`in n.options?n.options.validator:void 0;!r&&`inputValidator`in n.options&&(r=n.options.inputValidator),r&&t===`server`&&(e.data=await ad(r,e.data));let a;if(t===`client`?`client`in n.options&&(a=n.options.client):`server`in n.options&&(a=n.options.server),a){let t=async(t={})=>{let n=await i({...e,...t,context:ed(e.context,t.context),sendContext:ed(e.sendContext,t.sendContext),headers:M(e.headers,t.headers),_callSiteFetch:e._callSiteFetch,fetch:e._callSiteFetch??t.fetch??e.fetch,result:t.result===void 0?t instanceof Response?t:e.result:t.result,error:t.error??e.error});if(n.error)throw n.error;return n},n=await a({...e,next:t});if(b(n))return{...e,error:n};if(n instanceof Response)return{...e,result:n};if(!n)throw Error(`User middleware returned undefined. You must call next() or return a result in your middlewares.`);return n}return i(e)}catch(t){return{...e,error:t}}};return i({...n,headers:n.headers||{},sendContext:n.sendContext||{},context:n.context||td(),_callSiteFetch:n.fetch})}function id(e,t=100){let n=new Set,r=[],i=(e,a)=>{if(a>t)throw Error(`Middleware nesting depth exceeded maximum of ${t}. Check for circular references.`);e.forEach(e=>{e.options.middleware&&i(e.options.middleware,a+1),n.has(e)||(n.add(e),r.push(e))})};return i(e,0),r}async function ad(e,t){if(e==null)return{};if(`~standard`in e){let n=await e[`~standard`].validate(t);if(n.issues)throw Error(JSON.stringify(n.issues,void 0,2));return n.value}if(`parse`in e)return e.parse(t);if(typeof e==`function`)return e(t);throw Error(`Invalid validator type!`)}function od(e){return{"~types":void 0,options:{inputValidator:e.validator??e.inputValidator,client:async({next:t,sendContext:n,fetch:r,...i})=>{let a={...i,context:n,fetch:r};return t(await e.extractedFn?.(a))},server:async({next:t,...n})=>{let r=await e.serverFn?.(n);return t({...n,result:r})}}}}var sd=(e,t)=>{let n={type:`request`,...t||e},r=e=>sd({},Object.assign(n,{validator:e,inputValidator:e}));return{options:n,middleware:e=>sd({},Object.assign(n,{middleware:e})),validator:r,inputValidator:r,client:e=>sd({},Object.assign(n,{client:e})),server:e=>sd({},Object.assign(n,{server:e}))}},cd=$({method:`POST`}).handler(p(`76d08ea8f0b0103fcaf7055c8b138a9579e4124d0d2f62a0686a1011273cd47a`)),ld=$({method:`POST`}).handler(p(`5e6a13ce7e871cac8b1efc1cf5ccb213d79a60710661cd7012f69f2c7ccb6982`)),ud=$({method:`POST`}).handler(p(`1e62b13d94b613cf423e7774bb51046a7dfc3005d0164d46cbd5f39fd41e65ae`)),dd=$({method:`GET`}).handler(p(`5252add61246cf72a4fa382b4734734c4e8ea74302302ba378f1ecb54d53868d`)),fd=$({method:`GET`}).handler(p(`9bf431d4df4d57d04f011720753080a98c88face5f4f24058da2b17f8da151b8`));$({method:`POST`}).handler(p(`12c220cad66e7d4a3abab6da0b2bab6053a48aee4b6a0cde9d321705b501bd69`));var pd=[`summarize-page`,`edit-block`,`action-items`,`table-from-notes`,`mermaid-diagram`,`custom-page-task`],md={xai:[`grok-4.5`,`grok-4`,`grok-3`,`grok-3-mini`,`grok-2`],anthropic:[`claude-sonnet-4-6`,`claude-opus-4-6`,`claude-haiku-4-5-20251001`,`claude-3-5-sonnet-latest`],openai:[`gpt-4.1`,`gpt-4.1-mini`,`gpt-4o`,`o4-mini`,`gpt-4o-mini`],ollama:[`llama3.2`,`llama3.1`,`mistral`,`qwen2.5`,`gemma3`,`deepseek-r1`],openai_compatible:[`gpt-4o`,`llama3.1`,`custom-model`]},hd={deepagents:{label:`LangChain Deep Agents`,description:`In-process agent with skills + MCP tools.`,needsApiKey:!0,isCli:!1},direct:{label:`Direct model API`,description:`Single-shot chat via provider API (streamable).`,needsApiKey:!0,isCli:!1},"claude-cli":{label:`Claude Code CLI`,description:"Shell out to `claude` with stream-json when available.",needsApiKey:!1,isCli:!0},"codex-cli":{label:`Codex CLI`,description:"Shell out to `codex exec` (streams stdout).",needsApiKey:!1,isCli:!0},"grok-cli":{label:`Grok CLI`,description:"Shell out to `grok chat --stream` / Grok Build.",needsApiKey:!1,isCli:!0},local:{label:`Local demo`,description:`No remote model — offline placeholders.`,needsApiKey:!1,isCli:!1}},gd={xai:{label:`xAI · Grok`,description:`Grok models via the xAI API (OpenAI-compatible).`,keyLabel:`xAI API key`,keyPlaceholder:`xai-…`,needsKey:!0},anthropic:{label:`Anthropic · Claude`,description:`Claude models (Sonnet, Opus, Haiku).`,keyLabel:`Anthropic API key`,keyPlaceholder:`sk-ant-…`,needsKey:!0},openai:{label:`OpenAI`,description:`GPT and o-series models from OpenAI.`,keyLabel:`OpenAI API key`,keyPlaceholder:`sk-…`,needsKey:!0},ollama:{label:`Ollama (local)`,description:`Run open models on your machine or LAN.`,keyLabel:`API key (optional)`,keyPlaceholder:`Usually blank`,needsKey:!1,baseUrlDefault:`http://127.0.0.1:11434`,baseUrlHint:`Ollama OpenAI-compatible base (no /v1 suffix needed).`},openai_compatible:{label:`OpenAI-compatible`,description:`Any OpenAI-style endpoint (Groq, Together, Azure proxy, etc.).`,keyLabel:`API key`,keyPlaceholder:`Optional / required by host`,needsKey:!1,baseUrlDefault:`https://api.example.com/v1`,baseUrlHint:`Must include /v1 if the host expects it.`}};function _d(){return{setupComplete:!1,enabled:!0,backend:`deepagents`,provider:`xai`,model:md.xai[0],apiKey:``,baseUrl:``,temperature:.35,recursionLimit:40,mcpServers:[],enabledSkills:[...pd],preferStreaming:!0}}var vd=v()(h((e,t)=>({..._d(),hydrated:!1,setHydrated:t=>e({hydrated:t}),patch:t=>e(e=>({...e,...t})),reset:()=>e({..._d(),hydrated:!0}),setProviderDefaults:t=>e(e=>{let n={xai:`grok-4.5`,anthropic:`claude-sonnet-4-6`,openai:`gpt-4.1`,ollama:`llama3.2`,openai_compatible:`gpt-4o`},r=t===`ollama`?e.baseUrl||`http://127.0.0.1:11434`:t===`openai_compatible`?e.baseUrl||`https://api.example.com/v1`:``;return{provider:t,model:n[t],baseUrl:r}}),addMcpServer:t=>{let n=o(`mcp`),r={id:n,name:t?.name??`New MCP server`,enabled:t?.enabled??!0,transport:t?.transport??`http`,url:t?.url??`https://`,authToken:t?.authToken??``,headersText:t?.headersText??``,command:t?.command??`npx`,argsText:t?.argsText??`-y @modelcontextprotocol/server-everything`,envText:t?.envText??``};return e(e=>({mcpServers:[...e.mcpServers,r]})),n},updateMcpServer:(t,n)=>e(e=>({mcpServers:e.mcpServers.map(e=>e.id===t?{...e,...n}:e)})),removeMcpServer:t=>e(e=>({mcpServers:e.mcpServers.filter(e=>e.id!==t)})),getSettings:()=>{let e=t();return{setupComplete:e.setupComplete,enabled:e.enabled,backend:e.backend,provider:e.provider,model:e.model,apiKey:e.apiKey,baseUrl:e.baseUrl,temperature:e.temperature,recursionLimit:e.recursionLimit,mcpServers:e.mcpServers,enabledSkills:e.enabledSkills,preferStreaming:e.preferStreaming!==!1}}}),{name:`workspace-ai-settings-v1`,partialize:e=>({setupComplete:e.setupComplete,enabled:e.enabled,backend:e.backend,provider:e.provider,model:e.model,apiKey:e.apiKey,baseUrl:e.baseUrl,temperature:e.temperature,recursionLimit:e.recursionLimit,mcpServers:e.mcpServers,enabledSkills:e.enabledSkills,preferStreaming:e.preferStreaming!==!1}),onRehydrateStorage:()=>e=>{e?.setHydrated(!0)}}));function yd(){return vd.getState().getSettings()}var bd=[{id:`welcome`,title:`Welcome`},{id:`provider`,title:`Provider`},{id:`credentials`,title:`Credentials`},{id:`mcp`,title:`MCP tools`},{id:`skills`,title:`Skills`},{id:`review`,title:`Test & finish`}];function xd({open:e,onOpenChange:t,initialStep:n=`welcome`}){let r=vd(),[i,a]=(0,z.useState)(0),[o,c]=(0,z.useState)(!1),[l,u]=(0,z.useState)(null),[d,f]=(0,z.useState)(null),[p,m]=(0,z.useState)([]);(0,z.useEffect)(()=>{if(!e)return;let t=bd.findIndex(e=>e.id===n);a(t>=0?t:0),u(null),fd().then(e=>m(e.map(e=>({id:e.id,label:e.label,available:e.available})))).catch(()=>m([]))},[e,n]);let h=bd[i],g=r.backend===`claude-cli`||r.backend===`codex-cli`||r.backend===`grok-cli`,_=()=>r.getSettings(),v=(0,z.useMemo)(()=>h.id===`provider`?!!r.backend:h.id===`credentials`?g?!0:r.provider===`openai_compatible`&&!r.baseUrl.trim()?!1:!!r.model.trim():!0,[h.id,r.backend,r.provider,r.baseUrl,r.model,g]),y=e=>{u(null),a(t=>Math.min(bd.length-1,Math.max(0,t+e)))},b=()=>{r.patch({setupComplete:!0,enabled:!0}),t(!1)},x=async()=>{c(!0),u(null);try{let e=await ld({data:{clientSettings:_()}});u({ok:e.ok,message:e.message})}catch(e){u({ok:!1,message:e instanceof Error?e.message:`Test failed`})}finally{c(!1)}},S=async e=>{f(e.id);try{let t=await ud({data:{server:e}});r.updateMcpServer(e.id,{lastTestOk:t.ok,lastTestMessage:t.message,lastToolCount:t.toolNames?.length??0})}catch(t){r.updateMcpServer(e.id,{lastTestOk:!1,lastTestMessage:t instanceof Error?t.message:`Test failed`})}finally{f(null)}};return(0,K.jsx)(Gu,{open:e,onOpenChange:t,children:(0,K.jsxs)(Ju,{className:`flex max-h-[90vh] max-w-2xl flex-col gap-0 overflow-hidden p-0`,children:[(0,K.jsxs)(`div`,{className:`border-b border-border px-6 py-4`,children:[(0,K.jsxs)(Yu,{children:[(0,K.jsxs)(Xu,{className:`flex items-center gap-2`,children:[(0,K.jsx)(Ke,{className:`size-4`}),`AI setup · Deep Agents & coding CLIs`]}),(0,K.jsx)(Zu,{children:`Connect an API model, or shell out to Claude Code / Codex / Grok CLIs with streaming.`})]}),(0,K.jsx)(`ol`,{className:`mt-4 flex flex-wrap gap-1.5`,children:bd.map((e,t)=>(0,K.jsx)(`li`,{children:(0,K.jsxs)(`button`,{type:`button`,"data-testid":`wizard-step-${e.id}`,"aria-current":t===i?`step`:void 0,onClick:()=>a(t),className:s(`rounded-full px-2.5 py-1 text-[11px] font-medium transition-colors`,t===i?`bg-foreground text-background`:tr.setProviderDefaults(e),onBackend:e=>r.patch({backend:e}),onPreferStreaming:e=>r.patch({preferStreaming:e})}),h.id===`credentials`&&(g?(0,K.jsx)(wd,{backend:r.backend,cliStatus:p}):(0,K.jsx)(Td,{provider:r.provider,model:r.model,apiKey:r.apiKey,baseUrl:r.baseUrl,temperature:r.temperature,recursionLimit:r.recursionLimit,onChange:e=>r.patch(e)})),h.id===`mcp`&&(0,K.jsx)(Ed,{servers:r.mcpServers,testingId:d,onAdd:()=>r.addMcpServer(),onUpdate:(e,t)=>r.updateMcpServer(e,t),onRemove:e=>r.removeMcpServer(e),onTest:e=>void S(e)}),h.id===`skills`&&(0,K.jsx)(Dd,{enabled:r.enabledSkills,onToggle:e=>{let t=new Set(r.enabledSkills);t.has(e)?t.delete(e):t.add(e),r.patch({enabledSkills:[...t]})},onAll:()=>r.patch({enabledSkills:[...pd]})}),h.id===`review`&&(0,K.jsx)(Od,{settings:_(),testing:o,testResult:l,onTest:()=>void x()})]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2 border-t border-border px-6 py-4`,children:[(0,K.jsxs)(w,{type:`button`,variant:`ghost`,disabled:i===0,onClick:()=>y(-1),children:[(0,K.jsx)(H,{className:`size-4`}),` Back`]}),(0,K.jsx)(`div`,{className:`flex gap-2`,children:h.id===`review`?(0,K.jsxs)(w,{type:`button`,onClick:b,children:[(0,K.jsx)(U,{className:`size-4`}),` Save & finish`]}):(0,K.jsxs)(w,{type:`button`,disabled:!v,onClick:()=>y(1),children:[`Continue `,(0,K.jsx)(te,{className:`size-4`})]})})]})]})})}function Sd(){return(0,K.jsxs)(`div`,{className:`space-y-4 text-sm leading-relaxed text-muted-foreground`,children:[(0,K.jsxs)(`p`,{className:`text-base text-foreground`,children:[`Generate and edit content with `,(0,K.jsx)(`strong`,{children:`Deep Agents`}),`, provider APIs, or`,` `,(0,K.jsx)(`strong`,{children:`coding CLIs`}),` (Claude Code, Codex, Grok) — with streaming when available.`]}),(0,K.jsxs)(`ul`,{className:`list-inside list-disc space-y-1.5`,children:[(0,K.jsx)(`li`,{children:`API path: Grok / Claude / OpenAI / Ollama keys (browser-stored)`}),(0,K.jsxs)(`li`,{children:[`CLI path: `,(0,K.jsx)(`code`,{className:`text-xs`,children:`claude`}),`, `,(0,K.jsx)(`code`,{className:`text-xs`,children:`codex`}),`,`,` `,(0,K.jsx)(`code`,{className:`text-xs`,children:`grok`}),` already logged in on the host`]}),(0,K.jsx)(`li`,{children:`Streaming tokens over SSE for live previews in AI blocks and edit dialogs`}),(0,K.jsx)(`li`,{children:`Optional MCP servers + workspace skills for Deep Agents mode`})]})]})}function Cd({provider:e,backend:t,preferStreaming:n,cliStatus:r,onProvider:i,onBackend:a,onPreferStreaming:o}){let c=Object.keys(gd),l=Object.keys(hd),u=hd[t]?.isCli;return(0,K.jsxs)(`div`,{className:`space-y-5`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`h3`,{className:`mb-2 flex items-center gap-2 text-sm font-medium text-foreground`,children:[(0,K.jsx)(Qe,{className:`size-4`}),` Generation backend`]}),(0,K.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:l.map(e=>{let n=hd[e],i=r.find(t=>t.id===e);return(0,K.jsxs)(`button`,{type:`button`,onClick:()=>a(e),className:s(`rounded-xl border px-3 py-3 text-left transition-colors`,t===e?`border-foreground bg-muted/60`:`border-border hover:bg-muted/40`),children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-foreground`,children:[n.label,n.isCli&&(0,K.jsx)(`span`,{className:s(`rounded-full px-1.5 py-0.5 text-[10px] font-medium`,i?.available?`bg-emerald-500/15 text-emerald-700 dark:text-emerald-300`:`bg-muted text-muted-foreground`),children:i?i.available?`on PATH`:`not found`:`CLI`})]}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:n.description})]},e)})})]}),(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>o(e.target.checked)}),`Prefer streaming output (SSE) when the backend supports it`]}),!u&&(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`h3`,{className:`mb-2 text-sm font-medium text-foreground`,children:`Model provider (API)`}),(0,K.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:c.map(t=>{let n=gd[t];return(0,K.jsxs)(`button`,{type:`button`,onClick:()=>i(t),className:s(`rounded-xl border px-3 py-3 text-left transition-colors`,e===t?`border-foreground bg-muted/60`:`border-border hover:bg-muted/40`),children:[(0,K.jsx)(`div`,{className:`text-sm font-semibold text-foreground`,children:n.label}),(0,K.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:n.description})]},t)})})]})]})}function wd({backend:e,cliStatus:t}){let n=t.find(t=>t.id===e);return(0,K.jsxs)(`div`,{className:`space-y-4 text-sm`,children:[(0,K.jsx)(`div`,{className:s(`rounded-lg border px-3 py-2 text-xs`,n?.available?`border-emerald-500/40 bg-emerald-500/10 text-emerald-900 dark:text-emerald-200`:`border-border bg-muted/40 text-muted-foreground`),children:n?.available?`${hd[e]?.label??e} is available on PATH.`:`${hd[e]?.label??e} was not found on PATH in this environment. Install it on the machine running the app server.`}),(0,K.jsx)(`ul`,{className:`list-inside list-disc space-y-1.5 text-muted-foreground`,children:({"claude-cli":["Install Claude Code CLI and run `claude login`","Streaming uses `claude -p … --output-format stream-json`","Falls back to plain `-p` if stream-json is unavailable"],"codex-cli":[`Install Codex CLI and authenticate`,"Streaming uses `codex exec` stdout",`Workspace AI never stores your Codex credentials`],"grok-cli":["Install Grok CLI / Grok Build (`grok login` or XAI_API_KEY)","Streaming prefers `grok chat --stream`","Falls back to `grok -p` / chat without stream flags"]}[e]??[`Authenticate the CLI on the host machine.`]).map(e=>(0,K.jsx)(`li`,{children:e},e))}),(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No API key is stored in the workspace for CLI backends — auth is handled by the CLI itself.`})]})}function Td({provider:e,model:t,apiKey:n,baseUrl:r,temperature:i,recursionLimit:a,onChange:o}){let s=gd[e],c=md[e],l=e===`ollama`||e===`openai_compatible`;return(0,K.jsxs)(`div`,{className:`space-y-4`,children:[(0,K.jsxs)(`div`,{className:`rounded-lg border border-border bg-muted/30 px-3 py-2 text-xs text-muted-foreground`,children:[`Provider: `,(0,K.jsx)(`span`,{className:`font-medium text-foreground`,children:s.label})]}),(0,K.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium`,children:s.keyLabel}),(0,K.jsx)(k,{type:`password`,autoComplete:`off`,placeholder:s.keyPlaceholder,value:n,onChange:e=>o({apiKey:e.target.value})}),(0,K.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`Stored in this browser’s local storage. Not written to the project repo.`})]}),l&&(0,K.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium`,children:`Base URL`}),(0,K.jsx)(k,{placeholder:s.baseUrlDefault,value:r,onChange:e=>o({baseUrl:e.target.value})}),s.baseUrlHint&&(0,K.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:s.baseUrlHint})]}),(0,K.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium`,children:`Model`}),(0,K.jsx)(`select`,{className:`h-9 w-full rounded-md border border-border bg-background px-2 text-sm`,value:t,onChange:e=>o({model:e.target.value}),children:c.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))}),(0,K.jsx)(k,{className:`mt-1`,placeholder:`Or type a custom model id`,value:t,onChange:e=>o({model:e.target.value})})]}),(0,K.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,K.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,K.jsxs)(`span`,{className:`text-sm font-medium`,children:[`Temperature (`,i.toFixed(2),`)`]}),(0,K.jsx)(`input`,{type:`range`,min:0,max:1.2,step:.05,value:i,onChange:e=>o({temperature:Number(e.target.value)}),className:`w-full`})]}),(0,K.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,K.jsx)(`span`,{className:`text-sm font-medium`,children:`Agent recursion limit`}),(0,K.jsx)(k,{type:`number`,min:8,max:80,value:a,onChange:e=>o({recursionLimit:Number(e.target.value)||40})})]})]})]})}function Ed({servers:e,testingId:t,onAdd:n,onUpdate:r,onRemove:i,onTest:a}){return(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`MCP tools are used when backend is `,(0,K.jsx)(`strong`,{children:`Deep Agents`}),`.`]}),(0,K.jsxs)(w,{type:`button`,size:`sm`,variant:`outline`,onClick:n,children:[(0,K.jsx)(ze,{className:`size-3.5`}),` Add server`]})]}),e.length===0&&(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No MCP servers yet.`}),e.map(e=>(0,K.jsxs)(`div`,{className:`space-y-2 rounded-xl border border-border p-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(Be,{className:`size-4 text-muted-foreground`}),(0,K.jsx)(k,{value:e.name,onChange:t=>r(e.id,{name:t.target.value}),className:`h-8`}),(0,K.jsxs)(`label`,{className:`flex items-center gap-1 text-xs`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:e.enabled,onChange:t=>r(e.id,{enabled:t.target.checked})}),`On`]}),(0,K.jsx)(w,{type:`button`,size:`icon-sm`,variant:`ghost`,onClick:()=>i(e.id),children:(0,K.jsx)($e,{className:`size-3.5`})})]}),(0,K.jsxs)(`select`,{className:`h-8 w-full rounded-md border border-border bg-background px-2 text-xs`,value:e.transport,onChange:t=>r(e.id,{transport:t.target.value}),children:[(0,K.jsx)(`option`,{value:`http`,children:`HTTP`}),(0,K.jsx)(`option`,{value:`sse`,children:`SSE`}),(0,K.jsx)(`option`,{value:`stdio`,children:`stdio`})]}),e.transport===`stdio`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(k,{placeholder:`command`,value:e.command??``,onChange:t=>r(e.id,{command:t.target.value})}),(0,K.jsx)(k,{placeholder:`args (space-separated)`,value:e.argsText??``,onChange:t=>r(e.id,{argsText:t.target.value})})]}):(0,K.jsx)(k,{placeholder:`https://…`,value:e.url??``,onChange:t=>r(e.id,{url:t.target.value})}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsxs)(w,{type:`button`,size:`sm`,variant:`secondary`,disabled:t===e.id,onClick:()=>a(e),children:[t===e.id?(0,K.jsx)(ke,{className:`size-3.5 animate-spin`}):(0,K.jsx)(it,{className:`size-3.5`}),`Test`]}),e.lastTestMessage&&(0,K.jsx)(`span`,{className:s(`text-[11px]`,e.lastTestOk?`text-emerald-600`:`text-destructive`),children:e.lastTestMessage})]})]},e.id))]})}function Dd({enabled:e,onToggle:t,onAll:n}){return(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Skills for Deep Agents mode.`}),(0,K.jsx)(w,{type:`button`,size:`sm`,variant:`ghost`,onClick:n,children:`Enable all`})]}),(0,K.jsx)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:pd.map(n=>(0,K.jsx)(`button`,{type:`button`,onClick:()=>t(n),className:s(`rounded-lg border px-3 py-2 text-left text-sm`,e.includes(n)?`border-foreground bg-muted/50`:`border-border text-muted-foreground`),children:(0,K.jsx)(`span`,{className:`font-medium`,children:n})},n))})]})}function Od({settings:e,testing:t,testResult:n,onTest:r}){return(0,K.jsxs)(`div`,{className:`space-y-4 text-sm`,children:[(0,K.jsxs)(`dl`,{className:`grid grid-cols-[auto_1fr] gap-x-4 gap-y-2 text-xs`,children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Backend`}),(0,K.jsx)(`dd`,{className:`font-medium`,children:hd[e.backend]?.label??e.backend}),(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Streaming`}),(0,K.jsx)(`dd`,{children:e.preferStreaming===!1?`Off`:`Preferred`}),!hd[e.backend]?.isCli&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Provider`}),(0,K.jsxs)(`dd`,{children:[gd[e.provider]?.label,` · `,e.model]}),(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`API key`}),(0,K.jsx)(`dd`,{children:e.apiKey?`Set`:`Not set`})]}),(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`MCP servers`}),(0,K.jsxs)(`dd`,{children:[e.mcpServers.filter(e=>e.enabled).length,` enabled`]}),(0,K.jsx)(`dt`,{className:`text-muted-foreground`,children:`Skills`}),(0,K.jsx)(`dd`,{children:e.enabledSkills.length})]}),(0,K.jsxs)(w,{type:`button`,variant:`secondary`,disabled:t,onClick:r,children:[t?(0,K.jsx)(ke,{className:`size-4 animate-spin`}):(0,K.jsx)(it,{className:`size-4`}),`Test connection`]}),n&&(0,K.jsx)(`p`,{className:s(`text-xs`,n.ok?`text-emerald-600`:`text-destructive`),children:n.message})]})}function kd({onOpen:e}){let t=vd(e=>e.setupComplete),n=vd(e=>e.backend);return t?null:(0,K.jsxs)(`button`,{type:`button`,onClick:e,className:`flex w-full items-center gap-2 rounded-lg border border-dashed border-border bg-background px-3 py-2 text-left text-xs text-muted-foreground hover:bg-muted/40`,children:[(0,K.jsx)(Ke,{className:`size-3.5 shrink-0`}),(0,K.jsxs)(`span`,{children:[`Set up AI — Grok, Claude, Codex CLI, MCP…`,` `,(0,K.jsxs)(`span`,{className:`text-foreground`,children:[`(`,hd[n]?.label??n,`)`]})]})]})}var Ad={id:`mount_sample`,name:`Sample notes (linked)`,kind:`server`,serverPath:`/workspace/markdown-samples`,createdAt:Date.now()},jd=v()(h((e,t)=>({mounts:[Ad],selection:null,hydrated:!1,setHydrated:t=>e({hydrated:t}),setSelection:t=>e({selection:t}),addServerMount:(t,n)=>{let r=o(`mount`);return e(e=>({mounts:[...e.mounts,{id:r,name:t||`Linked folder`,kind:`server`,serverPath:n,createdAt:Date.now()}]})),r},addBrowserMount:t=>{let n=o(`mount`);return e(e=>({mounts:[...e.mounts,{id:n,name:t||`Local folder`,kind:`browser`,createdAt:Date.now()}]})),n},removeMount:t=>e(e=>({mounts:e.mounts.filter(e=>e.id!==t),selection:e.selection?.mountId===t?null:e.selection})),renameMount:(t,n)=>e(e=>({mounts:e.mounts.map(e=>e.id===t?{...e,name:n}:e)})),...(function(){return{}})()}),{name:`workspace-md-mounts-v1`,partialize:e=>({mounts:e.mounts}),onRehydrateStorage:()=>e=>{e?.setHydrated(!0),e&&!e.mounts.some(e=>e.id===`mount_sample`)&&(e.mounts=[Ad,...e.mounts])}})),Md=`workspace-md-handles`,Nd=`handles`;function Pd(){return new Promise((e,t)=>{let n=indexedDB.open(Md,1);n.onupgradeneeded=()=>{let e=n.result;e.objectStoreNames.contains(Nd)||e.createObjectStore(Nd)},n.onsuccess=()=>e(n.result),n.onerror=()=>t(n.error)})}async function Fd(e,t){let n=await Pd();await new Promise((r,i)=>{let a=n.transaction(Nd,`readwrite`);a.objectStore(Nd).put(t,e),a.oncomplete=()=>r(),a.onerror=()=>i(a.error)}),n.close()}async function Id(e){let t=await Pd(),n=await new Promise((n,r)=>{let i=t.transaction(Nd,`readonly`).objectStore(Nd).get(e);i.onsuccess=()=>n(i.result??null),i.onerror=()=>r(i.error)});return t.close(),n}async function Ld(e,t=``){let n=[];for await(let[r,i]of e.entries()){if(r.startsWith(`.`))continue;let e=t?`${t}/${r}`:r;i.kind===`directory`?n.push({name:r,relPath:e,kind:`dir`}):r.toLowerCase().endsWith(`.md`)&&n.push({name:r,relPath:e,kind:`file`})}return n.sort((e,t)=>e.kind===t.kind?e.name.localeCompare(t.name):e.kind===`dir`?-1:1)}async function Rd(e,t){let n=t.split(`/`).filter(Boolean),r=e;for(let e=0;e`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var Gd=e=>{switch(e){case`success`:return Jd;case`info`:return Xd;case`warning`:return Yd;case`error`:return Zd;default:return null}},Kd=Array(12).fill(0),qd=({visible:e,className:t})=>z.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},z.createElement(`div`,{className:`sonner-spinner`},Kd.map((e,t)=>z.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Jd=z.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},z.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),Yd=z.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},z.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),Xd=z.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},z.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),Zd=z.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},z.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),Qd=z.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},z.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),z.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),$d=()=>{let[e,t]=z.useState(document.hidden);return z.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},ef=1,tf=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:ef++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0||e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],z.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(rf(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!z.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!z.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!z.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!z.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||ef++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},nf=(e,t)=>{let n=t?.id||ef++;return tf.addToast({title:e,...t,id:n}),n},rf=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,af=Object.assign(nf,{success:tf.success,info:tf.info,warning:tf.warning,error:tf.error,custom:tf.custom,message:tf.message,promise:tf.promise,dismiss:tf.dismiss,loading:tf.loading},{getHistory:()=>tf.toasts,getToasts:()=>tf.getActiveToasts()});Wd(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function of(e){return e.label!==void 0}var sf=3,cf=`24px`,lf=`16px`,uf=4e3,df=356,ff=14,pf=45,mf=200;function hf(...e){return e.filter(Boolean).join(` `)}function gf(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var _f=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:T=`Close toast`}=e,[E,D]=z.useState(null),[O,k]=z.useState(null),[A,j]=z.useState(!1),[M,N]=z.useState(!1),[P,F]=z.useState(!1),[I,L]=z.useState(!1),[R,B]=z.useState(!1),[V,ee]=z.useState(0),[H,te]=z.useState(0),ne=z.useRef(n.duration||y||uf),re=z.useRef(null),U=z.useRef(null),ie=c===0,ae=c+1<=o,W=n.type,oe=n.dismissible!==!1,se=n.className||``,ce=n.descriptionClassName||``,le=z.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),ue=z.useMemo(()=>n.closeButton??p,[n.closeButton,p]),de=z.useMemo(()=>n.duration||y||uf,[n.duration,y]),fe=z.useRef(0),pe=z.useRef(0),me=z.useRef(0),he=z.useRef(null),[ge,_e]=b.split(`-`),ve=z.useMemo(()=>s.reduce((e,t,n)=>n>=le?e:e+t.height,0),[s,le]),ye=$d(),be=n.invert||t,xe=W===`loading`;pe.current=z.useMemo(()=>le*x+ve,[le,ve]),z.useEffect(()=>{ne.current=de},[de]),z.useEffect(()=>{j(!0)},[]),z.useEffect(()=>{let e=U.current;if(e){let t=e.getBoundingClientRect().height;return te(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),z.useLayoutEffect(()=>{if(!A)return;let e=U.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,te(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[A,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Se=z.useCallback(()=>{N(!0),ee(pe.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},mf)},[n,d,a,pe]);z.useEffect(()=>{if(n.promise&&W===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||ye?(()=>{if(me.current{n.onAutoClose==null||n.onAutoClose.call(n,n),Se()},ne.current)),()=>clearTimeout(e)},[u,i,n,W,ye,Se]),z.useEffect(()=>{n.delete&&(Se(),n.onDismiss==null||n.onDismiss.call(n,n))},[Se,n.delete]);function Ce(){return w?.loading?z.createElement(`div`,{className:hf(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":W===`loading`},w.loading):z.createElement(qd,{className:hf(C?.loader,n?.classNames?.loader),visible:W===`loading`})}let we=n.icon||w?.[W]||Gd(W);return z.createElement(`li`,{tabIndex:0,ref:U,className:hf(_,se,C?.toast,n?.classNames?.toast,C?.default,C?.[W],n?.classNames?.[W]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":A,"data-promise":!!n.promise,"data-swiped":R,"data-removed":M,"data-visible":ae,"data-y-position":ge,"data-x-position":_e,"data-index":c,"data-front":ie,"data-swiping":P,"data-dismissible":oe,"data-type":W,"data-invert":be,"data-swipe-out":I,"data-swipe-direction":O,"data-expanded":!!(u||S&&A),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${M?V:pe.current}px`,"--initial-height":S?`auto`:`${H}px`,...m,...n.style},onDragEnd:()=>{F(!1),D(null),he.current=null},onPointerDown:e=>{e.button!==2&&(xe||!oe||(re.current=new Date,ee(pe.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(F(!0),he.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(I||!oe)return;he.current=null;let e=Number(U.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(U.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-re.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=pf||a>.11){ee(pe.current),n.onDismiss==null||n.onDismiss.call(n,n),k(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Se(),L(!0);return}else{var o,s;(o=U.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=U.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}B(!1),F(!1),D(null)},onPointerMove:t=>{var n,r;if(!he.current||!oe||window.getSelection()?.toString().length>0)return;let i=t.clientY-he.current.y,a=t.clientX-he.current.x,o=e.swipeDirections??gf(b);!E&&(Math.abs(a)>1||Math.abs(i)>1)&&D(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(E===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)0||Math.abs(s.y)>0)&&B(!0),(n=U.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=U.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},ue&&!n.jsx&&W!==`loading`?z.createElement(`button`,{"aria-label":T,"data-disabled":xe,"data-close-button":!0,onClick:xe||!oe?()=>{}:()=>{Se(),n.onDismiss==null||n.onDismiss.call(n,n)},className:hf(C?.closeButton,n?.classNames?.closeButton)},w?.close??Qd):null,(W||n.icon||n.promise)&&n.icon!==null&&(w?.[W]!==null||n.icon)?z.createElement(`div`,{"data-icon":``,className:hf(C?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Ce():null,n.type===`loading`?null:we):null,z.createElement(`div`,{"data-content":``,className:hf(C?.content,n?.classNames?.content)},z.createElement(`div`,{"data-title":``,className:hf(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?z.createElement(`div`,{"data-description":``,className:hf(v,ce,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),z.isValidElement(n.cancel)?n.cancel:n.cancel&&of(n.cancel)?z.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{of(n.cancel)&&oe&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Se())},className:hf(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,z.isValidElement(n.action)?n.action:n.action&&of(n.action)?z.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{of(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Se())},className:hf(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function vf(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function yf(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?lf:cf;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var bf=z.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=sf,toastOptions:g,dir:_=vf(),gap:v=ff,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,S]=z.useState([]),C=z.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),w=z.useMemo(()=>Array.from(new Set([i].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,i]),[T,E]=z.useState([]),[D,O]=z.useState(!1),[k,A]=z.useState(!1),[j,M]=z.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),N=z.useRef(null),P=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),F=z.useRef(null),I=z.useRef(!1),L=z.useCallback(e=>{S(t=>(t.find(t=>t.id===e.id)?.delete||tf.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return z.useEffect(()=>tf.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{bt.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[x]),z.useEffect(()=>{if(d!==`system`){M(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?M(`dark`):M(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{M(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{M(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),z.useEffect(()=>{x.length<=1&&O(!1)},[x]),z.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;O(!0),(t=N.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===N.current||N.current?.contains(document.activeElement))&&O(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),z.useEffect(()=>{if(N.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,I.current=!1)}},[N.current]),z.createElement(`section`,{ref:t,"aria-label":`${b} ${P}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},w.map((t,n)=>{let[i,a]=t.split(`-`);return C.length?z.createElement(`ol`,{key:t,dir:_===`auto`?vf():_,tabIndex:-1,ref:N,className:c,"data-sonner-toaster":!0,"data-sonner-theme":j,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${T[0]?.height||0}px`,"--width":`${df}px`,"--gap":`${v}px`,...m,...yf(l,u)},onBlur:e=>{I.current&&!e.currentTarget.contains(e.relatedTarget)&&(I.current=!1,F.current&&=(F.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||I.current||(I.current=!0,F.current=e.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{k||O(!1)},onDragEnd:()=>O(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||A(!0)},onPointerUp:()=>A(!1)},C.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>z.createElement(_f,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:k,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:L,toasts:C.filter(e=>e.position==n.position),heights:T.filter(e=>e.position==n.position),setHeights:E,expandByDefault:o,gap:v,expanded:D,swipeDirections:e.swipeDirections}))):null}))});function xf({open:e,onOpenChange:t}){let n=jd(e=>e.addServerMount),r=jd(e=>e.addBrowserMount),i=jd(e=>e.setSelection),[a,o]=(0,z.useState)(`Linked notes`),[s,c]=(0,z.useState)(`/workspace/markdown-samples`),[l,u]=(0,z.useState)(!1),d=async()=>{u(!0);try{await Bd({data:{root:s,relPath:``}});let e=n(a||`Linked folder`,s);i({mountId:e,relPath:``}),af.success(`Folder linked (view only until you open a file)`),t(!1)}catch(e){af.error(e instanceof Error?e.message:`Could not open path`)}finally{u(!1)}},f=async()=>{let e=window;if(typeof e.showDirectoryPicker!=`function`){af.error(`Your browser doesn’t support folder access. Use a server path instead.`);return}u(!0);try{let n=await e.showDirectoryPicker({mode:`readwrite`}),o=r(a||n.name||`Local folder`);await Fd(o,n),i({mountId:o,relPath:``}),af.success(`Local folder linked without importing`),t(!1)}catch(e){if(e instanceof Error&&e.name===`AbortError`)return;af.error(e instanceof Error?e.message:`Could not link folder`)}finally{u(!1)}};return(0,K.jsx)(Gu,{open:e,onOpenChange:t,children:(0,K.jsxs)(Ju,{className:`max-w-md`,children:[(0,K.jsxs)(Yu,{children:[(0,K.jsxs)(Xu,{className:`flex items-center gap-2`,children:[(0,K.jsx)(we,{className:`size-4`}),`Link markdown folder`]}),(0,K.jsxs)(Zu,{children:[`Browse `,(0,K.jsx)(`code`,{className:`text-xs`,children:`.md`}),` files in the same UI`,` `,(0,K.jsx)(`strong`,{children:`without importing`}),` them into the workspace.`]})]}),(0,K.jsxs)(`label`,{className:`block space-y-1.5 text-sm`,children:[(0,K.jsx)(`span`,{className:`font-medium`,children:`Display name`}),(0,K.jsx)(k,{value:a,onChange:e=>o(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`space-y-2 rounded-xl border border-border p-3`,children:[(0,K.jsxs)(`p`,{className:`flex items-center gap-2 text-sm font-medium`,children:[(0,K.jsx)(ye,{className:`size-4`}),` This computer`]}),(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Uses the browser’s folder picker. Files stay on disk; we only read/write when you open or save.`}),(0,K.jsxs)(w,{type:`button`,disabled:l,onClick:()=>void f(),children:[l?(0,K.jsx)(ke,{className:`size-4 animate-spin`}):(0,K.jsx)(_e,{className:`size-4`}),`Choose local folder`]})]}),(0,K.jsxs)(`div`,{className:`space-y-2 rounded-xl border border-border p-3`,children:[(0,K.jsx)(`p`,{className:`text-sm font-medium`,children:`Server path (sandbox / deploy host)`}),(0,K.jsx)(k,{value:s,onChange:e=>c(e.target.value),placeholder:`/workspace/markdown-samples`}),(0,K.jsxs)(`p`,{className:`text-[11px] text-muted-foreground`,children:[`Allowed under `,(0,K.jsx)(`code`,{children:`/workspace`}),`. Sample:`,` `,(0,K.jsx)(`code`,{children:`/workspace/markdown-samples`})]}),(0,K.jsx)(w,{type:`button`,variant:`secondary`,disabled:l,onClick:()=>void d(),children:`Link server folder`})]})]})})}var Sf=e(n(((e,n)=>{(function(t){typeof e==`object`&&n!==void 0?n.exports=t():typeof define==`function`&&define.amd?define([],t):(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this).JSZip=t()})(function(){return function e(n,r,i){function a(s,c){if(!r[s]){if(!n[s]){var l=typeof t==`function`&&t;if(!c&&l)return l(s,!0);if(o)return o(s,!0);var u=Error(`Cannot find module '`+s+`'`);throw u.code=`MODULE_NOT_FOUND`,u}var d=r[s]={exports:{}};n[s][0].call(d.exports,function(e){var t=n[s][1][e];return a(t||e)},d,d.exports,e,n,r,i)}return r[s].exports}for(var o=typeof t==`function`&&t,s=0;s>2,s=(3&t)<<4|n>>4,c=1>6:64,l=2>4,n=(15&o)<<4|(s=a.indexOf(e.charAt(l++)))>>2,r=(3&s)<<6|(c=a.indexOf(e.charAt(l++))),f[u++]=t,s!==64&&(f[u++]=n),c!==64&&(f[u++]=r);return f}},{"./support":30,"./utils":32}],2:[function(e,t,n){var r=e(`./external`),i=e(`./stream/DataWorker`),a=e(`./stream/Crc32Probe`),o=e(`./stream/DataLengthProbe`);function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o(`data_length`)),t=this;return e.on(`end`,function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw Error(`Bug : uncompressed data size mismatch`)}),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo(`compressedSize`,this.compressedSize).withStreamInfo(`uncompressedSize`,this.uncompressedSize).withStreamInfo(`crc32`,this.crc32).withStreamInfo(`compression`,this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o(`uncompressedSize`)).pipe(t.compressWorker(n)).pipe(new o(`compressedSize`)).withStreamInfo(`compression`,t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){var r=e(`./stream/GenericWorker`);n.STORE={magic:`\0\0`,compressWorker:function(){return new r(`STORE compression`)},uncompressWorker:function(){return new r(`STORE decompression`)}},n.DEFLATE=e(`./flate`)},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){var r=e(`./utils`),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return e!==void 0&&e.length?r.getTypeOf(e)===`string`?function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t.charCodeAt(s))];return-1^e}(0|t,e,e.length,0):function(e,t,n,r){var a=i,o=r+n;e^=-1;for(var s=r;s>>8^a[255&(e^t[s])];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){var r=null;r=typeof Promise<`u`?Promise:e(`lie`),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){var r=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Uint32Array<`u`,i=e(`pako`),a=e(`./utils`),o=e(`./stream/GenericWorker`),s=r?`uint8array`:`array`;function c(e,t){o.call(this,`FlateWorker/`+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic=`\b\0`,a.inherits(c,o),c.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,e.data),!1)},c.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},c.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},c.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new c(`Deflate`,e)},n.uncompressWorker=function(){return new c(`Inflate`,{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){function r(e,t){var n,r=``;for(n=0;n>>=8;return r}function i(e,t,n,i,o,u){var d,f,p=e.file,m=e.compression,h=u!==s.utf8encode,g=a.transformTo(`string`,u(p.name)),_=a.transformTo(`string`,s.utf8encode(p.name)),v=p.comment,y=a.transformTo(`string`,u(v)),b=a.transformTo(`string`,s.utf8encode(v)),x=_.length!==p.name.length,S=b.length!==v.length,C=``,w=``,T=``,E=p.dir,D=p.date,O={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(O.crc32=e.crc32,O.compressedSize=e.compressedSize,O.uncompressedSize=e.uncompressedSize);var k=0;t&&(k|=8),h||!x&&!S||(k|=2048);var A=0,j=0;E&&(A|=16),o===`UNIX`?(j=798,A|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(j=20,A|=function(e){return 63&(e||0)}(p.dosPermissions)),d=D.getUTCHours(),d<<=6,d|=D.getUTCMinutes(),d<<=5,d|=D.getUTCSeconds()/2,f=D.getUTCFullYear()-1980,f<<=4,f|=D.getUTCMonth()+1,f<<=5,f|=D.getUTCDate(),x&&(w=r(1,1)+r(c(g),4)+_,C+=`up`+r(w.length,2)+w),S&&(T=r(1,1)+r(c(y),4)+b,C+=`uc`+r(T.length,2)+T);var M=``;return M+=` -\0`,M+=r(k,2),M+=m.magic,M+=r(d,2),M+=r(f,2),M+=r(O.crc32,4),M+=r(O.compressedSize,4),M+=r(O.uncompressedSize,4),M+=r(g.length,2),M+=r(C.length,2),{fileRecord:l.LOCAL_FILE_HEADER+M+g+C,dirRecord:l.CENTRAL_FILE_HEADER+r(j,2)+M+r(y.length,2)+`\0\0\0\0`+r(A,4)+r(i,4)+g+C+y}}var a=e(`../utils`),o=e(`../stream/GenericWorker`),s=e(`../utf8`),c=e(`../crc32`),l=e(`../signature`);function u(e,t,n,r){o.call(this,`ZipFileWorker`),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,o.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return l.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo(`string`,this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){var r=e(`./Uint8ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){var r=e(`./DataReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){var r=e(`./ArrayReader`);function i(e){r.call(this,e)}e(`../utils`).inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array;var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){var r=e(`../utils`),i=e(`../support`),a=e(`./ArrayReader`),o=e(`./StringReader`),s=e(`./NodeBufferReader`),c=e(`./Uint8ArrayReader`);t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),t!==`string`||i.uint8array?t===`nodebuffer`?new s(e):i.uint8array?new c(r.transformTo(`uint8array`,e)):new a(r.transformTo(`array`,e)):new o(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){n.LOCAL_FILE_HEADER=`PK`,n.CENTRAL_FILE_HEADER=`PK`,n.CENTRAL_DIRECTORY_END=`PK`,n.ZIP64_CENTRAL_DIRECTORY_LOCATOR=`PK\x07`,n.ZIP64_CENTRAL_DIRECTORY_END=`PK`,n.DATA_DESCRIPTOR=`PK\x07\b`},{}],24:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../utils`);function a(e){r.call(this,`ConvertWorker to `+e),this.destType=e}i.inherits(a,r),a.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){var r=e(`./GenericWorker`),i=e(`../crc32`);function a(){r.call(this,`Crc32Probe`),this.withStreamInfo(`crc32`,0)}e(`../utils`).inherits(a,r),a.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataLengthProbe for `+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(a,i),a.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){var r=e(`../utils`),i=e(`./GenericWorker`);function a(e){i.call(this,`DataWorker`);var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type=``,this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}r.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case`string`:e=this.data.substring(this.index,t);break;case`uint8array`:e=this.data.subarray(this.index,t);break;case`array`:case`nodebuffer`:e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){function r(e){this.name=e||`default`,this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit(`data`,e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit(`end`),this.cleanUp(),this.isFinished=!0}catch(e){this.emit(`error`,e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit(`error`,e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n `+e:e}},t.exports=r},{}],29:[function(e,t,n){var r=e(`../utils`),i=e(`./ConvertWorker`),a=e(`./GenericWorker`),o=e(`../base64`),s=e(`../support`),c=e(`../external`),l=null;if(s.nodestream)try{l=e(`../nodejs/NodejsStreamOutputAdapter`)}catch{}function u(e,t){return new c.Promise(function(n,i){var a=[],s=e._internalType,c=e._outputType,l=e._mimeType;e.on(`data`,function(e,n){a.push(e),t&&t(n)}).on(`error`,function(e){a=[],i(e)}).on(`end`,function(){try{n(function(e,t,n){switch(e){case`blob`:return r.newBlob(r.transformTo(`arraybuffer`,t),n);case`base64`:return o.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){var n,r=0,i=null,a=0;for(n=0;n`u`)n.blob=!1;else{var r=new ArrayBuffer(0);try{n.blob=new Blob([r],{type:`application/zip`}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(r),n.blob=i.getBlob(`application/zip`).size===0}catch{n.blob=!1}}}try{n.nodestream=!!e(`readable-stream`).Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var r=e(`./utils`),i=e(`./support`),a=e(`./nodejsUtils`),o=e(`./stream/GenericWorker`),s=Array(256),c=0;c<256;c++)s[c]=252<=c?6:248<=c?5:240<=c?4:224<=c?3:192<=c?2:1;s[254]=s[254]=1;function l(){o.call(this,`utf-8 decode`),this.leftOver=null}function u(){o.call(this,`utf-8 encode`)}n.utf8encode=function(e){return i.nodebuffer?a.newBufferFrom(e,`utf-8`):function(e){var t,n,r,a,o,s=e.length,c=0;for(a=0;a>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo(`nodebuffer`,e).toString(`utf-8`):function(e){var t,n,i,a,o=e.length,c=Array(2*o);for(t=n=0;t>10&1023,c[n++]=56320|1023&i)}return c.length!==n&&(c.subarray?c=c.subarray(0,n):c.length=n),r.applyFromCharCode(c)}(e=r.transformTo(i.uint8array?`uint8array`:`array`,e))},r.inherits(l,o),l.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?`uint8array`:`array`,e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var a=t;(t=new Uint8Array(a.length+this.leftOver.length)).set(this.leftOver,0),t.set(a,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var o=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+s[e[n]]>t?n:t}(t),c=t;o!==t.length&&(i.uint8array?(c=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(c=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(c),meta:e.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=l,r.inherits(u,o),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,n){var r=e(`./support`),i=e(`./base64`),a=e(`./nodejsUtils`),o=e(`./external`);function s(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),e==0&&(this.dosPermissions=63&this.externalFileAttributes),e==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!==`/`||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||={};e.index+4>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return c(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,l[r++]=56320|1023&i)}return c(l,r)},n.utf8border=function(e,t){var n;for((t||=e.length)>e.length&&(t=e.length),n=t-1;0<=n&&(192&e[n])==128;)n--;return n<0||n===0?t:n+o[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){t.exports=function(e,t,n,r){for(var i=65535&e|0,a=e>>>16&65535|0,o=0;n!==0;){for(n-=o=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s>>8^a[255&(e^t[s])];return-1^e}},{}],46:[function(e,t,n){var r,i=e(`../utils/common`),a=e(`./trees`),o=e(`./adler32`),s=e(`./crc32`),c=e(`./messages`),l=0,u=4,d=0,f=-2,p=-1,m=4,h=2,g=8,_=9,v=286,y=30,b=19,x=2*v+1,S=15,C=3,w=258,T=w+C+1,E=42,D=113,O=1,k=2,A=3,j=4;function M(e,t){return e.msg=c[t],t}function N(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),n!==0&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))}function I(e,t){a._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function L(e,t){e.pending_buf[e.pending++]=t}function R(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function z(e,t){var n,r,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-T?e.strstart-(e.w_size-T):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+w,p=l[a+o-1],m=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(l[(n=t)+o]===m&&l[n+o-1]===p&&l[n]===l[a]&&l[++n]===l[a+1]){a+=2,n++;do;while(l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&l[++a]===l[++n]&&ac&&--i!=0);return o<=e.lookahead?o:e.lookahead}function B(e){var t,n,r,a,c,l,u,d,f,p,m=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-T)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);a+=m}if(e.strm.avail_in===0)break;if(l=e.strm,u=e.window,d=e.strstart+e.lookahead,f=a,p=void 0,p=l.avail_in,f=C)for(c=e.strstart-e.insert,e.ins_h=e.window[c],e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C)if(r=a._tr_tally(e,e.strstart-e.match_start,e.match_length-C),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=C){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=C&&(e.ins_h=(e.ins_h<=C&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-C,r=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-C),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),e.lookahead===0&&t===l)return O;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,I(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-T&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):(e.strstart>e.block_start&&(I(e,!1),e.strm.avail_out),O)}),new H(4,4,8,4,V),new H(4,5,16,8,V),new H(4,6,32,32,V),new H(4,4,16,16,ee),new H(8,16,32,32,ee),new H(8,16,128,128,ee),new H(8,32,128,256,ee),new H(32,128,258,1024,ee),new H(32,258,258,4096,ee)],n.deflateInit=function(e,t){return U(e,t,g,15,8,0)},n.deflateInit2=U,n.deflateReset=re,n.deflateResetKeep=ne,n.deflateSetHeader=function(e,t){return e&&e.state&&e.state.wrap===2?(e.state.gzhead=t,d):f},n.deflate=function(e,t){var n,i,o,c;if(!e||!e.state||5>8&255),L(i,i.gzhead.time>>16&255),L(i,i.gzhead.time>>24&255),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(L(i,255&i.gzhead.extra.length),L(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(L(i,0),L(i,0),L(i,0),L(i,0),L(i,0),L(i,i.level===9?2:2<=i.strategy||i.level<2?4:0),L(i,3),i.status=D);else{var p=g+(i.w_bits-8<<4)<<8;p|=(2<=i.strategy||i.level<2?0:i.level<6?1:i.level===6?2:3)<<6,i.strstart!==0&&(p|=32),p+=31-p%31,i.status=D,R(i,p),i.strstart!==0&&(R(i,e.adler>>>16),R(i,65535&e.adler)),e.adler=1}if(i.status===69)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending!==i.pending_buf_size));)L(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(i.status===73)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.gzindex=0,i.status=91)}else i.status=91;if(i.status===91)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),F(e),o=i.pending,i.pending===i.pending_buf_size)){c=1;break}c=i.gzindexo&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),c===0&&(i.status=103)}else i.status=103;if(i.status===103&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&F(e),i.pending+2<=i.pending_buf_size&&(L(i,255&e.adler),L(i,e.adler>>8&255),e.adler=0,i.status=D)):i.status=D),i.pending!==0){if(F(e),e.avail_out===0)return i.last_flush=-1,d}else if(e.avail_in===0&&N(t)<=N(n)&&t!==u)return M(e,-5);if(i.status===666&&e.avail_in!==0)return M(e,-5);if(e.avail_in!==0||i.lookahead!==0||t!==l&&i.status!==666){var m=i.strategy===2?function(e,t){for(var n;;){if(e.lookahead===0&&(B(e),e.lookahead===0)){if(t===l)return O;break}if(e.match_length=0,n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):i.strategy===3?function(e,t){for(var n,r,i,o,s=e.window;;){if(e.lookahead<=w){if(B(e),e.lookahead<=w&&t===l)return O;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=C&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=C?(n=a._tr_tally(e,1,e.match_length-C),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(I(e,!1),e.strm.avail_out===0))return O}return e.insert=0,t===u?(I(e,!0),e.strm.avail_out===0?A:j):e.last_lit&&(I(e,!1),e.strm.avail_out===0)?O:k}(i,t):r[i.level].func(i,t);if(m!==A&&m!==j||(i.status=666),m===O||m===A)return e.avail_out===0&&(i.last_flush=-1),d;if(m===k&&(t===1?a._tr_align(i):t!==5&&(a._tr_stored_block(i,0,0,!1),t===3&&(P(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),F(e),e.avail_out===0))return i.last_flush=-1,d}return t===u?i.wrap<=0?1:(i.wrap===2?(L(i,255&e.adler),L(i,e.adler>>8&255),L(i,e.adler>>16&255),L(i,e.adler>>24&255),L(i,255&e.total_in),L(i,e.total_in>>8&255),L(i,e.total_in>>16&255),L(i,e.total_in>>24&255)):(R(i,e.adler>>>16),R(i,65535&e.adler)),F(e),0=n.w_size&&(s===0&&(P(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new i.Buf8(n.w_size),i.arraySet(p,t,m-n.w_size,n.w_size,0),t=p,m=n.w_size),c=e.avail_in,l=e.next_in,u=e.input,e.avail_in=m,e.next_in=0,e.input=t,B(n);n.lookahead>=C;){for(r=n.strstart,a=n.lookahead-(C-1);n.ins_h=(n.ins_h<>>=b=y>>>24,m-=b,(b=y>>>16&255)==0)E[a++]=65535&y;else{if(!(16&b)){if(!(64&b)){y=h[(65535&y)+(p&(1<>>=b,m-=b),m<15&&(p+=T[r++]<>>=b=y>>>24,m-=b,!(16&(b=y>>>16&255))){if(!(64&b)){y=g[(65535&y)+(p&(1<>>=b,m-=b,(b=a-o)>3,p&=(1<<(m-=x<<3))-1,e.next_in=r,e.next_out=a,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function g(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function _(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=1&t.wrap),t.mode=f,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(p),t.distcode=t.distdyn=new r.Buf32(m),t.sane=1,t.back=-1,u):d}function v(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,_(e)):d}function y(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=o.wsize?(r.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(i<(a=o.wsize-o.wnext)&&(a=i),r.arraySet(o.window,t,n-i,a,o.wnext),(i-=a)?(r.arraySet(o.window,t,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=a(n.check,B,2,0),x=b=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31){e.msg=`incorrect header check`,n.mode=30;break}if((15&b)!=8){e.msg=`unknown compression method`,n.mode=30;break}if(x-=4,F=8+(15&(b>>>=4)),n.wbits===0)n.wbits=F;else if(F>n.wbits){e.msg=`invalid window size`,n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=3;case 3:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>8&255,B[2]=b>>>16&255,B[3]=b>>>24&255,n.check=a(n.check,B,4,0)),x=b=0,n.mode=4;case 4:for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>8),512&n.flags&&(B[0]=255&b,B[1]=b>>>8&255,n.check=a(n.check,B,2,0)),x=b=0,n.mode=5;case 5:if(1024&n.flags){for(;x<16;){if(v===0)break e;v--,b+=p[g++]<>>8&255,n.check=a(n.check,B,2,0)),x=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(v<(E=n.length)&&(E=v),E&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=Array(n.head.extra_len)),r.arraySet(n.head.extra,p,g,E,F)),512&n.flags&&(n.check=a(n.check,p,E,g)),v-=E,g+=E,n.length-=E),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(v===0)break e;for(E=0;F=p[g+E++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F)),F&&E>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;x<32;){if(v===0)break e;v--,b+=p[g++]<>>=7&x,x-=7&x,n.mode=27;break}for(;x<3;){if(v===0)break e;v--,b+=p[g++]<>>=1)){case 0:n.mode=14;break;case 1:if(w(n),n.mode=20,t!==6)break;b>>>=2,x-=2;break e;case 2:n.mode=17;break;case 3:e.msg=`invalid block type`,n.mode=30}b>>>=2,x-=2;break;case 14:for(b>>>=7&x,x-=7&x;x<32;){if(v===0)break e;v--,b+=p[g++]<>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=30;break}if(n.length=65535&b,x=b=0,n.mode=15,t===6)break e;case 15:n.mode=16;case 16:if(E=n.length){if(v>>=5,x-=5,n.ndist=1+(31&b),b>>>=5,x-=5,n.ncode=4+(15&b),b>>>=4,x-=4,286>>=3,x-=3}for(;n.have<19;)n.lens[V[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,L={bits:n.lenbits},I=s(0,n.lens,0,19,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid code lengths set`,n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=k,x-=k,n.lens[n.have++]=j;else{if(j===16){for(R=k+2;x>>=k,x-=k,n.have===0){e.msg=`invalid bit length repeat`,n.mode=30;break}F=n.lens[n.have-1],E=3+(3&b),b>>>=2,x-=2}else if(j===17){for(R=k+3;x>>=k)),b>>>=3,x-=3}else{for(R=k+7;x>>=k)),b>>>=7,x-=7}if(n.have+E>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=30;break}for(;E--;)n.lens[n.have++]=F}}if(n.mode===30)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=30;break}if(n.lenbits=9,L={bits:n.lenbits},I=s(c,n.lens,0,n.nlen,n.lencode,0,n.work,L),n.lenbits=L.bits,I){e.msg=`invalid literal/lengths set`,n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,L={bits:n.distbits},I=s(l,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,L),n.distbits=L.bits,I){e.msg=`invalid distances set`,n.mode=30;break}if(n.mode=20,t===6)break e;case 20:n.mode=21;case 21:if(6<=v&&258<=y){e.next_out=_,e.avail_out=y,e.next_in=g,e.avail_in=v,n.hold=b,n.bits=x,o(e,C),_=e.next_out,m=e.output,y=e.avail_out,g=e.next_in,p=e.input,v=e.avail_in,b=n.hold,x=n.bits,n.mode===12&&(n.back=-1);break}for(n.back=0;A=(z=n.lencode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,n.length=j,A===0){n.mode=26;break}if(32&A){n.back=-1,n.mode=12;break}if(64&A){e.msg=`invalid literal/length code`,n.mode=30;break}n.extra=15&A,n.mode=22;case 22:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;A=(z=n.distcode[b&(1<>>16&255,j=65535&z,!((k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>M)])>>>16&255,j=65535&z,!(M+(k=z>>>24)<=x);){if(v===0)break e;v--,b+=p[g++]<>>=M,x-=M,n.back+=M}if(b>>>=k,x-=k,n.back+=k,64&A){e.msg=`invalid distance code`,n.mode=30;break}n.offset=j,n.extra=15&A,n.mode=24;case 24:if(n.extra){for(R=n.extra;x>>=n.extra,x-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=30;break}n.mode=25;case 25:if(y===0)break e;if(E=C-y,n.offset>E){if((E=n.offset-E)>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break}D=E>n.wnext?(E-=n.wnext,n.wsize-E):n.wnext-E,E>n.length&&(E=n.length),O=n.window}else O=m,D=_-n.offset,E=n.length;for(yv?(b=L[R+d[w]],N[P+d[w]]):(b=96,0),p=1<>k)+(m-=p)]=y<<24|b<<16|x|0,m!==0;);for(p=1<>=1;if(p===0?M=0:(M&=p-1,M+=p),w++,--F[C]==0){if(C===E)break;C=t[n+d[w]]}if(D>>7)]}function L(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function R(e,t,n){e.bi_valid>h-n?(e.bi_buf|=t<>h-e.bi_valid,e.bi_valid+=n-h):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function V(e,t,n){var r,i,a=Array(m+1),o=0;for(r=1;r<=m;r++)a[r]=o=o+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];s!==0&&(e[2*i]=B(a[s]++,s))}}function ee(e){var t;for(t=0;t>1;1<=n;n--)ne(e,a,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],ne(e,a,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,a[2*i]=a[2*n]+a[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,a[2*n+1]=a[2*r+1]=i,e.heap[1]=i++,ne(e,a,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,a,o,s,c=t.dyn_tree,l=t.max_code,u=t.stat_desc.static_tree,d=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,g=t.stat_desc.max_length,_=0;for(a=0;a<=m;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n>=7;r>>=1)if(1&n&&e.dyn_ltree[2*t]!==0)return i;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return a;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=o&&(o=s)):o=s=n+5,n+4<=o&&t!==-1?oe(e,t,n,r):e.strategy===4||s===o?(R(e,2+ +!!r,3),re(e,T,E)):(R(e,4+ +!!r,3),function(e,t,n,r){var i;for(R(e,t-257,5),R(e,n-1,5),R(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,t===0?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(O[n]+l+1)]++,e.dyn_dtree[2*I(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){R(e,2,3),z(e,_,T),function(e){e.bi_valid===16?(L(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){(function(e,t){if(!e.setImmediate){var n,r,i,a,o=1,s={},c=!1,l=e.document,u=Object.getPrototypeOf&&Object.getPrototypeOf(e);u=u&&u.setTimeout?u:e,n={}.toString.call(e.process)===`[object process]`?function(e){process.nextTick(function(){f(e)})}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(``,`*`),e.onmessage=n,t}}()?(a=`setImmediate$`+Math.random()+`$`,e.addEventListener?e.addEventListener(`message`,p,!1):e.attachEvent(`onmessage`,p),function(t){e.postMessage(a+t,`*`)}):e.MessageChannel?((i=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){i.port2.postMessage(e)}):l&&`onreadystatechange`in l.createElement(`script`)?(r=l.documentElement,function(e){var t=l.createElement(`script`);t.onreadystatechange=function(){f(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(f,0,e)},u.setImmediate=function(e){typeof e!=`function`&&(e=Function(``+e));for(var t=Array(arguments.length-1),r=0;r`u`?e===void 0?this:e:self)}).call(this,typeof global<`u`?global:typeof self<`u`?self:typeof window<`u`?window:{})},{}]},{},[10])(10)})}))(),1);function Cf(e){let t=[e.title||``];for(let n of e.blocks)n.type===`divider`||n.type===`ai`||n.content?.trim()&&t.push(n.content.trim());return t.join(` -`)}function wf(e){let t=[],n=0;for(let r of e){let e=r.content??``;switch(r.type){case`heading1`:t.push(`# ${e}`),n=0;break;case`heading2`:t.push(`## ${e}`),n=0;break;case`heading3`:t.push(`### ${e}`),n=0;break;case`bullet`:t.push(`${` `.repeat(r.indent??0)}- ${e}`),n=0;break;case`numbered`:n+=1,t.push(`${` `.repeat(r.indent??0)}${n}. ${e}`);break;case`todo`:t.push(`${` `.repeat(r.indent??0)}- [${r.checked?`x`:` `}] ${e}`),n=0;break;case`quote`:t.push(e.split(` -`).map(e=>`> ${e}`).join(` -`)),n=0;break;case`callout`:t.push(`> 💡 ${e}`),n=0;break;case`code`:t.push("```"),t.push(e),t.push("```"),n=0;break;case`mermaid`:t.push("```mermaid"),t.push(e),t.push("```"),n=0;break;case`divider`:t.push(`---`),n=0;break;case`toggle`:t.push(`
    ${e||`Toggle`}`),t.push(``),t.push(`
    `),n=0;break;case`ai`:break;default:t.push(e),n=0}t.push(``)}return t.join(` -`).replace(/\n{3,}/g,` - -`).trim()+` -`}function Tf(e){let t=e.title||`Untitled`,n=wf(e.blocks);return n.startsWith(`# ${t}`)?n:`# ${t}\n\n${n}`}function Ef(e,t,n){return{id:o(`b`),type:e,content:t,indent:0,...n}}function Df(e){let t=e.replace(/\r\n/g,` -`),n=[],r=t.split(` -`),i=0;for(;i`)){let e=[];for(;i`);)e.push(r[i].replace(/^>\s?/,``)),i+=1;let t=e.join(` -`);t.startsWith(`💡`)||t.startsWith(`:bulb:`)?n.push(Ef(`callout`,t.replace(/^💡\s*|^:bulb:\s*/,``))):n.push(Ef(`quote`,t));continue}if(!e.trim()){i+=1;continue}let l=[e];for(i+=1;i`)||e.startsWith("```")||/^[-*+]\s/.test(e)||/^\d+\.\s/.test(e)||/^---+\s*$/.test(e))break;l.push(e),i+=1}n.push(Ef(`paragraph`,l.join(` -`)))}return n.length===0&&n.push(Ef(`paragraph`,``)),n}function Of(e,t){let n=e.match(/^#\s+(.+)$/m);return n?.[1]?.trim()?n[1].trim().slice(0,200):t.replace(/\.md$/i,``)||`Untitled`}function kf(e){return(e||`untitled`).toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-|-$/g,``).slice(0,60)||`untitled`}function Af(e,t,n=20){let r=t.trim().toLowerCase();if(!r)return[];let i=r.split(/\s+/).filter(Boolean),a=[];for(let t of e){if(t.archived)continue;let e=Cf(t),n=`${t.title}\n${e}`.toLowerCase(),o=0;t.title.toLowerCase().includes(r)&&(o+=2);for(let e of i)n.includes(e)&&(o+=1);let s=t.title.toLowerCase(),c=0;for(let e=0;e120?`…`:``);if(u>=0){let e=Math.max(0,u-40),t=Math.min(l.length,u+r.length+80);d=(e>0?`…`:``)+l.slice(e,t)+(t=2?`keyword`:`similarity`})}return a.sort((e,t)=>t.score-e.score).slice(0,n)}function jf(e,t){let n=new Map;for(let t of e){if(t.archived)continue;let e=n.get(t.parentId)??[];e.push(t),n.set(t.parentId,e)}let r=[],i=t=>{let a=e.find(e=>e.id===t);if(!(!a||a.archived)){r.push(a);for(let e of n.get(t)??[])i(e.id)}};return i(t),r}function Mf(e,t){if(!e.has(t))return e.add(t),t;let n=2;for(;e.has(`${t}-${n}`);)n+=1;let r=`${t}-${n}`;return e.add(r),r}async function Nf(e,t){let n=new Sf.default,r=t.hierarchy?jf(e,t.rootId):e.filter(e=>e.id===t.rootId);if(r.length===0)throw Error(`Page not found`);let i=e.find(e=>e.id===t.rootId),a=new Set,o=new Map,s=Mf(a,kf(i.title||`page`));if(n.file(`${s}.md`,Tf(i)),o.set(i.id,s),t.hierarchy)for(let e of r){if(e.id===i.id)continue;let t=e.parentId?o.get(e.parentId):s;if(!t)continue;let r=Mf(a,`${t}/${kf(e.title||`page`)}`);n.file(`${r}.md`,Tf(e)),o.set(e.id,r)}return{blob:await n.generateAsync({type:`blob`}),filename:`${kf(i.title||`export`)}${t.hierarchy?`-tree`:``}.zip`}}function Pf(e,t,n=null){let r=Of(t,e.split(/[/\\]/).pop()||`page.md`),i=t;return i=i.replace(RegExp(`^#\\s+${Ff(r)}\\s*\\n+`),``),{tempId:o(`imp`),title:r,icon:`📝`,parentTempId:n,blocks:Df(i),relPath:e}}function Ff(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function If(e){let t=e.map(e=>({path:e.path.replace(/\\/g,`/`).replace(/^\.\//,``),content:e.content})).filter(e=>e.path.toLowerCase().endsWith(`.md`)),n=new Map,r=[],i=e=>{if(!e||e===`.`)return null;if(n.has(e))return n.get(e);let t=e.split(`/`),a=t[t.length-1],s=t.slice(0,-1).join(`/`),c=s?i(s):null,l=o(`imp`);return n.set(e,l),r.push({tempId:l,title:a,icon:`📁`,parentTempId:c,blocks:[{id:o(`b`),type:`paragraph`,content:`Folder: ${a}`,indent:0}],relPath:e+`/`}),l};t.sort((e,t)=>e.path.localeCompare(t.path));for(let e of t){let t=e.path.split(`/`),n=t.pop(),a=t.join(`/`),o=a?i(a):null;r.push(Pf(n,e.content,o)),r[r.length-1].relPath=e.path}return r}function Lf(e,t){let n=new Map,r=[],i=[];for(let t of e)n.set(t.tempId,o(`page`));for(let a of e){let e=n.get(a.tempId),o=a.parentTempId?n.get(a.parentTempId)??t:t,s=l({id:e,title:a.title,icon:a.icon,parentId:o,blocks:a.blocks});r.push(s),a.parentTempId||i.push(e)}return{pages:r,rootIds:i}}function Rf(e,t){let n=URL.createObjectURL(e),r=document.createElement(`a`);r.href=n,r.download=t,r.click(),URL.revokeObjectURL(n)}function zf({open:e,onOpenChange:t,initialTab:n=`export`,pageId:r}){let i=m(e=>e.pages),a=m(e=>e.activePageId),o=m(e=>e.importPages),s=m(e=>e.setActivePage),c=r??a,l=i.find(e=>e.id===c),[u,d]=(0,z.useState)(n),[f,p]=(0,z.useState)(!0),[h,g]=(0,z.useState)(!1),[_,v]=(0,z.useState)(`/workspace/markdown-mounts/export`),[y,b]=(0,z.useState)(!0),x=(0,z.useRef)(null),S=(0,z.useRef)(null),C=async()=>{if(c){g(!0);try{let{blob:e,filename:t}=await Nf(i,{rootId:c,hierarchy:f});Rf(e,t),af.success(`Markdown zip downloaded`)}catch(e){af.error(e instanceof Error?e.message:`Export failed`)}finally{g(!1)}}},T=()=>{if(!l)return;let e=Tf(l);Rf(new Blob([e],{type:`text/markdown`}),`${kf(l.title||`page`)}.md`),af.success(`Markdown file downloaded`)},E=async()=>{if(c){g(!0);try{let{blob:e}=await Nf(i,{rootId:c,hierarchy:f}),t=await Sf.default.loadAsync(e),n=[],r=Object.keys(t.files);for(let e of r){let r=t.files[e];r.dir||n.push({relPath:e,content:await r.async(`string`)})}let a=await Ud({data:{targetDir:_,files:n}});af.success(`Wrote ${a.count} files to ${a.dir}`)}catch(e){af.error(e instanceof Error?e.message:`Server export failed`)}finally{g(!1)}}},D=e=>{let{pages:n,rootIds:r}=Lf(e.length===1?[Pf(e[0].path,e[0].content)]:If(e),y?c??null:null);o(n,r[0]??n[0]?.id??null),r[0]&&s(r[0]),af.success(`Imported ${n.length} page${n.length===1?``:`s`}`),t(!1)},O=async e=>{if(e?.length){g(!0);try{let t=[];for(let n of Array.from(e))if(!(!n.name.toLowerCase().endsWith(`.md`)&&!n.name.toLowerCase().endsWith(`.zip`)))if(n.name.toLowerCase().endsWith(`.zip`)){let e=await Sf.default.loadAsync(await n.arrayBuffer());for(let n of Object.keys(e.files)){let r=e.files[n];r.dir||!n.toLowerCase().endsWith(`.md`)||t.push({path:n,content:await r.async(`string`)})}}else{let e=n.webkitRelativePath||n.name;t.push({path:e,content:await n.text()})}if(!t.length){af.error(`No markdown files found`);return}D(t)}catch(e){af.error(e instanceof Error?e.message:`Import failed`)}finally{g(!1)}}};return(0,K.jsx)(Gu,{open:e,onOpenChange:t,children:(0,K.jsxs)(Ju,{className:`max-w-lg`,children:[(0,K.jsxs)(Yu,{children:[(0,K.jsxs)(Xu,{className:`flex items-center gap-2`,children:[(0,K.jsx)(ge,{className:`size-4`}),`Markdown import / export`]}),(0,K.jsxs)(Zu,{children:[`Move pages as folders of `,(0,K.jsx)(`code`,{className:`text-xs`,children:`.md`}),` files — or export a hierarchy.`]})]}),(0,K.jsx)(`div`,{className:`flex gap-1 rounded-lg border border-border p-1`,children:[`export`,`import`].map(e=>(0,K.jsx)(`button`,{type:`button`,onClick:()=>d(e),className:u===e?`flex-1 rounded-md bg-foreground px-3 py-1.5 text-sm font-medium text-background`:`flex-1 rounded-md px-3 py-1.5 text-sm text-muted-foreground hover:bg-muted`,children:e===`export`?`Export`:`Import`},e))}),u===`export`?(0,K.jsxs)(`div`,{className:`space-y-4 text-sm`,children:[(0,K.jsxs)(`p`,{className:`text-muted-foreground`,children:[`Current page:`,` `,(0,K.jsxs)(`span`,{className:`font-medium text-foreground`,children:[l?.icon,` `,l?.title||`Untitled`]})]}),(0,K.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:f,onChange:e=>p(e.target.checked)}),`Include child pages (folder hierarchy)`]}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsxs)(w,{type:`button`,disabled:h||!l,onClick:()=>void C(),children:[h?(0,K.jsx)(ke,{className:`size-4 animate-spin`}):(0,K.jsx)(le,{className:`size-4`}),`Download as .zip`]}),(0,K.jsx)(w,{type:`button`,variant:`outline`,disabled:!l||f,onClick:T,children:`Download single .md`})]}),(0,K.jsxs)(`div`,{className:`space-y-2 rounded-lg border border-border p-3`,children:[(0,K.jsx)(`p`,{className:`text-xs font-medium text-foreground`,children:`Write to server folder`}),(0,K.jsx)(k,{value:_,onChange:e=>v(e.target.value)}),(0,K.jsxs)(`p`,{className:`text-[11px] text-muted-foreground`,children:[`Allowed under `,(0,K.jsx)(`code`,{children:`/workspace`}),` (e.g.`,` `,(0,K.jsx)(`code`,{children:`/workspace/markdown-mounts/export`}),`)`]}),(0,K.jsxs)(w,{type:`button`,size:`sm`,variant:`secondary`,disabled:h||!l,onClick:()=>void E(),children:[(0,K.jsx)(ge,{className:`size-3.5`}),` Write markdown dir`]})]})]}):(0,K.jsxs)(`div`,{className:`space-y-4 text-sm`,children:[(0,K.jsxs)(`label`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:y,onChange:e=>b(e.target.checked)}),`Nest under current page`]}),(0,K.jsx)(`input`,{ref:x,type:`file`,accept:`.md,.zip,text/markdown,application/zip`,multiple:!0,className:`hidden`,onChange:e=>void O(e.target.files)}),(0,K.jsx)(`input`,{ref:S,type:`file`,webkitdirectory:``,directory:``,multiple:!0,className:`hidden`,onChange:e=>void O(e.target.files)}),(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsxs)(w,{type:`button`,disabled:h,onClick:()=>x.current?.click(),children:[h?(0,K.jsx)(ke,{className:`size-4 animate-spin`}):(0,K.jsx)(nt,{className:`size-4`}),`Import .md or .zip`]}),(0,K.jsxs)(w,{type:`button`,variant:`outline`,disabled:h,onClick:()=>S.current?.click(),children:[(0,K.jsx)(me,{className:`size-4`}),` Import folder of markdown`]})]}),(0,K.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Folders become parent pages; each `,(0,K.jsx)(`code`,{children:`.md`}),` becomes a page. Content is copied into the workspace (unlike linked mounts).`]})]})]})})}var Bf=$({method:`GET`}).handler(p(`19e00543f0313fe7905c045b33772265c61fa51d18574d69244c3f084698fddb`));$({method:`GET`}).handler(p(`9869410eeb67daab81f5d2ed574198eae379b3efb7eb41fe5a887f5ee51051d9`));var Vf=$({method:`POST`}).handler(p(`3a3b06354c92fa523d323b08f8cb2c04194a6d325c5629dfe4c092272682e98a`)),Hf=$({method:`POST`}).handler(p(`64ebef571e60681eaece2b296de9be5f6f33209c413aad1e4ff65d57e56c9c83`));function Uf({open:e,onOpenChange:t}){let[n,r]=(0,z.useState)([]),[i,a]=(0,z.useState)([]),[o,c]=(0,z.useState)([]),[l,u]=(0,z.useState)(!1),[d,f]=(0,z.useState)(!1),[p,m]=(0,z.useState)(`mock`),[h,g]=(0,z.useState)(`JWT authentication`),[_,v]=(0,z.useState)(`hello`),[y,b]=(0,z.useState)(`What is a meta-harness?`),[x,S]=(0,z.useState)(`jwt-auth.yaml`),[C,T]=(0,z.useState)(null),[E,D]=(0,z.useState)(`workflow`),[O,A]=(0,z.useState)(null);if((0,z.useEffect)(()=>{e&&(u(!0),A(null),Bf().then(e=>{r(e.backends),a(e.agents),c(e.workflows),e.agents[0]&&v(e.agents[0].replace(/\.ya?ml$/,``));let t=e.workflows.find(e=>e.includes(`jwt`));t?S(t):e.workflows[0]&&S(e.workflows[0])}).catch(e=>A(e instanceof Error?e.message:`Failed to load harness`)).finally(()=>u(!1)))},[e]),!e)return null;let j=async()=>{f(!0),T(null),A(null);try{let e=await Hf({data:{workflow:x,feature:h||`feature`,backend:p||`mock`}});T(e),af.success(`Workflow done · ${e.runId}`)}catch(e){let t=e instanceof Error?e.message:`Run failed`;A(t),af.error(t)}finally{f(!1)}},M=async()=>{f(!0),T(null),A(null);try{let e=await Vf({data:{agent:_,message:y,backend:p||`mock`}});T(e),af.success(`Agent done · ${e.runId}`)}catch(e){let t=e instanceof Error?e.message:`Run failed`;A(t),af.error(t)}finally{f(!1)}};return(0,K.jsxs)(`div`,{className:`fixed inset-0 z-[120] flex items-center justify-center p-4`,children:[(0,K.jsx)(`button`,{type:`button`,className:`absolute inset-0 z-0 bg-black/40`,"aria-label":`Dismiss`,onClick:()=>{d||t(!1)}}),(0,K.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-labelledby":`harness-title`,className:`relative z-10 flex max-h-[90vh] w-full max-w-2xl flex-col overflow-hidden rounded-xl border border-border bg-background shadow-2xl`,onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),children:[(0,K.jsxs)(`div`,{className:`border-b border-border px-6 py-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`h2`,{id:`harness-title`,className:`flex items-center gap-2 text-lg font-semibold`,children:[(0,K.jsx)(Qe,{className:`size-4`}),`Meta-harness · CLI agents`]}),(0,K.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:`Plan → Implement → Review → Validate. Swap backends without rewriting the workflow.`})]}),(0,K.jsx)(`button`,{type:`button`,className:`rounded-md p-1.5 text-muted-foreground hover:bg-muted`,onClick:()=>t(!1),"aria-label":`Close`,children:(0,K.jsx)(ot,{className:`size-4`})})]}),(0,K.jsx)(`div`,{className:`mt-3 flex flex-wrap gap-1.5`,children:[[`workflow`,`Workflow`,at],[`agent`,`Single agent`,re],[`backends`,`Backends`,st]].map(([e,t,n])=>(0,K.jsxs)(`button`,{type:`button`,onClick:()=>D(e),className:s(`inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium`,E===e?`bg-foreground text-background`:`bg-muted text-muted-foreground`),children:[(0,K.jsx)(n,{className:`size-3`}),t]},e))})]}),(0,K.jsx)(`div`,{className:`min-h-0 flex-1 space-y-4 overflow-y-auto px-6 py-5 text-sm`,children:l?(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-muted-foreground`,children:[(0,K.jsx)(ke,{className:`size-4 animate-spin`}),` Loading harness…`]}):(0,K.jsxs)(K.Fragment,{children:[O&&(0,K.jsx)(`div`,{className:`rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-xs text-destructive`,children:O}),(0,K.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,K.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Backend slot (executor.harness)`}),(0,K.jsx)(`select`,{className:`h-9 w-full rounded-md border border-border bg-background px-2 text-sm`,value:p,onChange:e=>m(e.target.value),children:n.map(e=>(0,K.jsxs)(`option`,{value:e.id,children:[e.available?`●`:`○`,` `,e.label,` (`,e.id,`)`]},e.id))})]}),E===`workflow`&&(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,K.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Workflow`}),(0,K.jsx)(`select`,{className:`h-9 w-full rounded-md border border-border bg-background px-2 text-sm`,value:x,onChange:e=>S(e.target.value),children:o.map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))})]}),(0,K.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,K.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Feature`}),(0,K.jsx)(k,{value:h,onChange:e=>g(e.target.value)})]}),(0,K.jsxs)(w,{type:`button`,disabled:d||!x,onClick:()=>void j(),children:[d?(0,K.jsx)(ke,{className:`size-4 animate-spin`}):(0,K.jsx)(Re,{className:`size-4`}),`Run workflow`]}),(0,K.jsx)(`pre`,{className:`overflow-x-auto rounded-lg border border-border bg-muted/40 p-3 text-[11px] leading-relaxed text-muted-foreground`,children:`wks harness workflow ${x.replace(/\.ya?ml$/,``)} \\\n --feature "${h}" --backend ${p}`})]}),E===`agent`&&(0,K.jsxs)(`div`,{className:`space-y-3`,children:[(0,K.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,K.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Agent YAML`}),(0,K.jsx)(`select`,{className:`h-9 w-full rounded-md border border-border bg-background px-2 text-sm`,value:_,onChange:e=>v(e.target.value),children:i.map(e=>(0,K.jsx)(`option`,{value:e.replace(/\.ya?ml$/,``),children:e},e))})]}),(0,K.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,K.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Message`}),(0,K.jsx)(k,{value:y,onChange:e=>b(e.target.value)})]}),(0,K.jsxs)(w,{type:`button`,disabled:d,onClick:()=>void M(),children:[d?(0,K.jsx)(ke,{className:`size-4 animate-spin`}):(0,K.jsx)(Re,{className:`size-4`}),`Run agent`]}),(0,K.jsx)(`pre`,{className:`overflow-x-auto rounded-lg border border-border bg-muted/40 p-3 text-[11px] text-muted-foreground`,children:`wks harness run ${_} --message "${y}" --backend ${p}`})]}),E===`backends`&&(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Install CLIs locally for live runs; `,(0,K.jsx)(`strong`,{children:`mock`}),` always works in preview. Grok Build via `,(0,K.jsx)(`code`,{children:`grok agent stdio`}),` (ACP).`]}),n.map(e=>(0,K.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-border px-3 py-2`,children:[(0,K.jsx)(`span`,{className:s(`mt-0.5 size-2 shrink-0 rounded-full`,e.available?`bg-emerald-500`:`bg-muted-foreground/40`)}),(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,K.jsx)(`div`,{className:`font-medium`,children:e.label}),(0,K.jsxs)(`div`,{className:`text-[11px] text-muted-foreground`,children:[(0,K.jsx)(`code`,{children:e.id}),e.command?` · ${e.command}`:``]}),e.notes&&(0,K.jsx)(`p`,{className:`mt-0.5 text-[11px] text-muted-foreground`,children:e.notes})]}),e.available&&(0,K.jsx)(U,{className:`size-3.5 text-emerald-600`})]},e.id))]}),C&&(0,K.jsxs)(`div`,{className:`space-y-2 rounded-xl border border-border p-3`,"data-testid":`harness-result`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs`,children:[(0,K.jsx)(`span`,{className:s(`rounded-full px-2 py-0.5 font-medium`,C.ok?`bg-emerald-500/15 text-emerald-800 dark:text-emerald-300`:`bg-destructive/10 text-destructive`),children:C.ok?`ok`:`failed`}),(0,K.jsxs)(`span`,{"data-volatile":!0,className:`text-muted-foreground`,children:[C.runId,` · `,C.backend,` · `,C.durationMs,`ms`]}),C.planPath&&(0,K.jsxs)(`span`,{className:`text-muted-foreground`,children:[`plan: `,C.planPath]})]}),(0,K.jsx)(`pre`,{className:`max-h-48 overflow-auto whitespace-pre-wrap rounded-md bg-muted/50 p-2 text-[11px] leading-relaxed`,children:C.summary})]})]})})]})]})}function Wf(){if(typeof window>`u`)return!1;let e=window;return!!(e.__TAURI_INTERNALS__||e.__TAURI__||e.__WORKSPACE_DESKTOP__)}async function Gf(){if(!Wf())return null;try{let{invoke:e}=await y(async()=>{let{invoke:e}=await import(`./core-CwxXejkd.js`);return{invoke:e}},[]);return await e(`desktop_info`)}catch{return{isDesktop:!0}}}function Kf({icon:e,label:t,onClick:n}){return(0,K.jsxs)(`button`,{type:`button`,onClick:n,className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm text-sidebar-fg transition-colors hover:bg-sidebar-hover`,children:[e,(0,K.jsx)(`span`,{className:`truncate`,children:t})]})}function qf({onOpenSearch:e,mobile:t,onNavigate:n}){let r=m(e=>e.name),i=m(e=>e.pages),o=m(e=>e.activePageId),c=m(e=>e.theme),l=m(e=>e.storageMode),u=m(e=>e.syncStatus),d=m(e=>e.setActivePage),f=m(e=>e.createPage),p=m(e=>e.deletePage),h=m(e=>e.restorePage),g=m(e=>e.permanentlyDeletePage),_=m(e=>e.duplicatePage),v=m(e=>e.updatePage),y=m(e=>e.toggleSidebar),b=m(e=>e.setTheme),x=m(e=>e.setName),S=m(e=>e.resetWorkspace),{user:C}=D(),[T,E]=(0,z.useState)({}),[O,k]=(0,z.useState)(!1),[A,j]=(0,z.useState)(!1),[M,N]=(0,z.useState)(!1),[P,F]=(0,z.useState)(`welcome`),I=vd(),[L,R]=(0,z.useState)(!1),[B,V]=(0,z.useState)(!1),[ee,H]=(0,z.useState)(!1),te=jd(e=>e.mounts),ne=jd(e=>e.selection),re=jd(e=>e.setSelection),U=jd(e=>e.removeMount),[se,le]=(0,z.useState)({mount_sample:!0}),[de,pe]=(0,z.useState)({}),[me,he]=(0,z.useState)(null),[ge,_e]=(0,z.useState)(null);(0,z.useEffect)(()=>{Wf()&&Gf().then(e=>{e?.isDesktop&&he(e.platform?`Desktop · ${e.platform}`:`Desktop app`)})},[]),(0,z.useEffect)(()=>{dd().then(e=>{let t=e.clis;t?.length&&_e(t.map(e=>`${e.label.split(` `)[0]} ${e.available?`✓`:`·`}`).join(` · `))}).catch(()=>_e(null))},[]);let ve=(0,z.useCallback)(e=>{d(e),re(null),n?.()},[d,re,n]),ye=(0,z.useMemo)(()=>i.filter(e=>!e.archived&&e.favorite),[i]),be=(0,z.useMemo)(()=>i.filter(e=>e.archived),[i]),xe=(0,z.useMemo)(()=>i.filter(e=>!e.archived&&!e.parentId).sort((e,t)=>e.createdAt-t.createdAt),[i]),Se=(0,z.useCallback)(e=>i.filter(t=>!t.archived&&t.parentId===e).sort((e,t)=>e.createdAt-t.createdAt),[i]),Ce=async e=>{let t=te.find(t=>t.id===e);if(t)try{if(t.kind===`server`&&t.serverPath){let n=await Bd({data:{root:t.serverPath,relPath:``}}),r=Array.isArray(n)?n:[];pe(t=>({...t,[e]:r.map(e=>({name:e.name,relPath:e.relPath,kind:e.kind}))}))}else if(t.kind===`browser`){let t=await Id(e);if(!t){pe(t=>({...t,[e]:[]}));return}let n=await Ld(t,``);pe(t=>({...t,[e]:n}))}}catch{pe(t=>({...t,[e]:[]}))}},Te=(e,t)=>{re({mountId:e,relPath:t}),d(null),n?.()},Ee=(e,t)=>(e===null?xe:Se(e)).map(e=>{let n=Se(e.id).length>0,r=T[e.id]??t<1;return(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:s(`group flex items-center gap-0.5 rounded-md pr-1`,o===e.id&&!ne?`bg-sidebar-active text-foreground`:`hover:bg-sidebar-hover`),style:{paddingLeft:8+t*12},children:[(0,K.jsx)(`button`,{type:`button`,className:`flex size-5 shrink-0 items-center justify-center rounded text-muted-foreground`,onClick:()=>E(t=>({...t,[e.id]:!r})),"aria-label":r?`Collapse`:`Expand`,children:n?r?(0,K.jsx)(ie,{className:`size-3.5`}):(0,K.jsx)(ae,{className:`size-3.5`}):(0,K.jsx)(`span`,{className:`size-3.5`})}),(0,K.jsxs)(`button`,{type:`button`,className:`flex min-w-0 flex-1 items-center gap-2 py-1.5 text-left text-sm`,onClick:()=>ve(e.id),children:[(0,K.jsx)(`span`,{className:`shrink-0 text-sm`,children:e.icon||`📄`}),(0,K.jsx)(`span`,{className:`truncate`,children:e.title||`Untitled`})]}),(0,K.jsxs)(`div`,{"data-hover-reveal":!0,className:`flex items-center opacity-0 group-hover:opacity-100`,children:[(0,K.jsxs)(lu,{children:[(0,K.jsx)(uu,{asChild:!0,children:(0,K.jsx)(`button`,{type:`button`,className:`flex size-6 items-center justify-center rounded hover:bg-black/5 dark:hover:bg-white/10`,"aria-label":`Page menu`,children:(0,K.jsx)(ue,{className:`size-3.5 text-muted-foreground`})})}),(0,K.jsxs)(mu,{align:`start`,className:`w-48`,children:[(0,K.jsxs)(hu,{onClick:()=>v(e.id,{favorite:!e.favorite}),children:[(0,K.jsx)(Ye,{className:`size-4`}),e.favorite?`Unfavorite`:`Favorite`]}),(0,K.jsxs)(hu,{onClick:()=>{f({parentId:e.id}),E(t=>({...t,[e.id]:!0}))},children:[(0,K.jsx)(ze,{className:`size-4`}),` Add sub-page`]}),(0,K.jsxs)(hu,{onClick:()=>_(e.id),children:[(0,K.jsx)(ce,{className:`size-4`}),` Duplicate`]}),(0,K.jsx)(_u,{}),(0,K.jsxs)(hu,{className:`text-destructive focus:text-destructive`,onClick:()=>p(e.id),children:[(0,K.jsx)($e,{className:`size-4`}),` Delete`]})]})]}),(0,K.jsx)(`button`,{type:`button`,className:`flex size-6 items-center justify-center rounded hover:bg-black/5 dark:hover:bg-white/10`,"aria-label":`New sub-page`,onClick:()=>{f({parentId:e.id}),E(t=>({...t,[e.id]:!0}))},children:(0,K.jsx)(ze,{className:`size-3.5 text-muted-foreground`})})]})]}),n&&r&&Ee(e.id,t+1)]},e.id)}),De=l===`database`?u===`saving`||u===`pending`?(0,K.jsx)(oe,{className:`size-3.5 animate-pulse text-muted-foreground`}):u===`error`?(0,K.jsx)(W,{className:`size-3.5 text-destructive`}):(0,K.jsx)(oe,{className:`size-3.5 text-emerald-600`}):(0,K.jsx)(W,{className:`size-3.5 text-muted-foreground`});return(0,K.jsxs)(`aside`,{className:s(`flex h-full flex-col border-r border-sidebar-border bg-sidebar text-sidebar-fg`,t?`w-full`:`w-[260px] min-w-[260px]`),children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 px-3 pb-1 pt-3`,children:[(0,K.jsxs)(`button`,{type:`button`,className:`flex min-w-0 flex-1 items-center gap-2 rounded-md px-2 py-1.5 text-left transition-colors hover:bg-sidebar-hover`,onClick:()=>j(!0),children:[(0,K.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-md bg-foreground text-[11px] font-semibold text-background`,children:r.slice(0,1).toUpperCase()||`W`}),(0,K.jsx)(`span`,{className:`truncate text-sm font-semibold text-foreground`,children:r}),De]}),!t&&(0,K.jsx)(`button`,{type:`button`,className:`flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-sidebar-hover`,onClick:()=>y(),"aria-label":`Collapse sidebar`,children:(0,K.jsx)(Ie,{className:`size-4`})})]}),me&&(0,K.jsxs)(`div`,{className:`mx-3 mb-1 flex items-center gap-1.5 rounded-md bg-muted/50 px-2 py-1 text-[10px] font-medium text-muted-foreground`,children:[(0,K.jsx)(Pe,{className:`size-3`}),me]}),(0,K.jsxs)(`div`,{className:`space-y-0.5 px-2 py-1`,children:[(0,K.jsx)(Kf,{icon:(0,K.jsx)(We,{className:`size-4`}),label:`Search`,onClick:e}),(0,K.jsx)(Kf,{icon:(0,K.jsx)(ze,{className:`size-4`}),label:`New page`,onClick:()=>{let e=f();ve(e)}}),(0,K.jsx)(Kf,{icon:(0,K.jsx)(fe,{className:`size-4`}),label:`Import / export`,onClick:()=>V(!0)}),(0,K.jsx)(Kf,{icon:(0,K.jsx)(we,{className:`size-4`}),label:`Link markdown`,onClick:()=>R(!0)}),(0,K.jsx)(Kf,{icon:(0,K.jsx)(Qe,{className:`size-4`}),label:`Agent harness`,onClick:()=>H(!0)})]}),(0,K.jsxs)(ao,{className:`min-h-0 flex-1 px-2`,children:[ye.length>0&&(0,K.jsxs)(`div`,{className:`mb-3`,children:[(0,K.jsx)(`div`,{className:`px-2 py-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Favorites`}),ye.map(e=>(0,K.jsxs)(`button`,{type:`button`,className:s(`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-sm`,o===e.id&&!ne?`bg-sidebar-active text-foreground`:`hover:bg-sidebar-hover`),onClick:()=>ve(e.id),children:[(0,K.jsx)(`span`,{children:e.icon||`📄`}),(0,K.jsx)(`span`,{className:`truncate`,children:e.title||`Untitled`})]},e.id))]}),(0,K.jsxs)(`div`,{className:`mb-3`,children:[(0,K.jsx)(`div`,{className:`px-2 py-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Private`}),Ee(null,0),xe.length===0&&(0,K.jsx)(`p`,{className:`px-2 py-2 text-xs text-muted-foreground`,children:`No pages yet`})]}),(0,K.jsxs)(`div`,{className:`mb-3`,children:[(0,K.jsx)(`div`,{className:`px-2 py-1.5 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground`,children:`Linked markdown`}),te.map(e=>{let t=se[e.id]??!1,n=de[e.id]??[];return(0,K.jsxs)(`div`,{className:`mb-0.5`,children:[(0,K.jsxs)(`div`,{className:`group flex items-center gap-0.5 rounded-md pr-1 hover:bg-sidebar-hover`,children:[(0,K.jsx)(`button`,{type:`button`,className:`flex size-5 shrink-0 items-center justify-center rounded text-muted-foreground`,onClick:()=>{le(n=>({...n,[e.id]:!t})),t||Ce(e.id)},children:t?(0,K.jsx)(ie,{className:`size-3.5`}):(0,K.jsx)(ae,{className:`size-3.5`})}),(0,K.jsxs)(`button`,{type:`button`,className:`flex min-w-0 flex-1 items-center gap-2 py-1.5 text-left text-sm`,onClick:()=>{le(t=>({...t,[e.id]:!0})),Ce(e.id),Te(e.id,``)},children:[(0,K.jsx)(we,{className:`size-3.5 shrink-0 text-muted-foreground`}),(0,K.jsx)(`span`,{className:`truncate font-medium`,children:e.name})]}),(0,K.jsx)(`button`,{type:`button`,"data-hover-reveal":!0,className:`flex size-6 items-center justify-center rounded opacity-0 group-hover:opacity-100 hover:bg-black/5`,title:`Unlink`,onClick:()=>U(e.id),children:(0,K.jsx)(tt,{className:`size-3 text-muted-foreground`})})]}),t&&n.map(t=>(0,K.jsxs)(`button`,{type:`button`,className:s(`flex w-full items-center gap-2 rounded-md py-1.5 pl-8 pr-2 text-left text-sm`,ne?.mountId===e.id&&ne.relPath===t.relPath?`bg-sidebar-active text-foreground`:`text-sidebar-fg hover:bg-sidebar-hover`),onClick:()=>void Te(e.id,t.relPath),children:[(0,K.jsx)(`span`,{className:`text-xs`,children:t.kind===`dir`?`📁`:`📝`}),(0,K.jsx)(`span`,{className:`truncate`,children:t.name})]},t.relPath))]},e.id)}),(0,K.jsx)(`p`,{className:`px-2 py-1 text-[11px] text-muted-foreground`,children:`Link folder (no import)`})]})]}),(0,K.jsxs)(`div`,{className:`space-y-0.5 border-t border-sidebar-border px-2 py-2`,children:[!C&&(0,K.jsxs)(a,{to:`/login`,className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-sm hover:bg-sidebar-hover`,children:[(0,K.jsx)(Ae,{className:`size-4`}),`Sign in to sync`]}),C&&(0,K.jsx)(`div`,{className:`px-1 py-1`,children:(0,K.jsx)(Qu,{})}),!C&&(0,K.jsx)(`p`,{className:`px-2 py-0.5 text-[11px] text-muted-foreground`,children:`Local only · Sign in to sync`}),(0,K.jsx)(Kf,{icon:(0,K.jsx)($e,{className:`size-4`}),label:`Trash`,onClick:()=>k(!0)}),(0,K.jsx)(Kf,{icon:(0,K.jsx)(Ge,{className:`size-4`}),label:`Settings`,onClick:()=>j(!0)})]}),(0,K.jsx)(Gu,{open:O,onOpenChange:k,children:(0,K.jsxs)(Ju,{className:`max-w-md`,children:[(0,K.jsxs)(Yu,{children:[(0,K.jsx)(Xu,{children:`Trash`}),(0,K.jsx)(Zu,{children:`Restored pages return to the top level of your workspace.`})]}),(0,K.jsxs)(`div`,{className:`max-h-72 space-y-1 overflow-y-auto`,children:[be.length===0&&(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Trash is empty`}),be.map(e=>(0,K.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border border-border px-2 py-1.5`,children:[(0,K.jsx)(`span`,{children:e.icon||`📄`}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-sm`,children:e.title||`Untitled`}),(0,K.jsx)(w,{size:`sm`,variant:`outline`,onClick:()=>h(e.id),children:`Restore`}),(0,K.jsx)(w,{size:`sm`,variant:`ghost`,className:`text-destructive`,onClick:()=>g(e.id),children:`Delete`})]},e.id))]})]})}),(0,K.jsx)(Gu,{open:A,onOpenChange:j,children:(0,K.jsxs)(Ju,{className:`max-w-md`,children:[(0,K.jsxs)(Yu,{children:[(0,K.jsx)(Xu,{children:`Settings`}),(0,K.jsx)(Zu,{children:`Workspace preferences and AI`})]}),(0,K.jsxs)(`div`,{className:`space-y-4 text-sm`,children:[me&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-border bg-muted/40 px-3 py-2 text-xs`,children:[(0,K.jsx)(Pe,{className:`size-3.5`}),`Running as `,me,(0,K.jsx)(`span`,{className:`text-muted-foreground`,children:`· Tauri standalone`})]}),(0,K.jsxs)(`label`,{className:`block space-y-1.5`,children:[(0,K.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Workspace name`}),(0,K.jsx)(`input`,{className:`h-9 w-full rounded-md border border-border bg-background px-3 text-sm`,value:r,onChange:e=>x(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsx)(`span`,{className:`text-sm`,children:`Theme`}),(0,K.jsxs)(`div`,{className:`flex gap-1`,children:[(0,K.jsxs)(w,{type:`button`,size:`sm`,variant:c===`light`?`default`:`outline`,onClick:()=>b(`light`),children:[(0,K.jsx)(Xe,{className:`size-3.5`}),` Light`]}),(0,K.jsxs)(w,{type:`button`,size:`sm`,variant:c===`dark`?`default`:`outline`,onClick:()=>b(`dark`),children:[(0,K.jsx)(Fe,{className:`size-3.5`}),` Dark`]})]})]}),(0,K.jsxs)(`div`,{className:`rounded-lg border border-border p-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 font-medium`,children:[(0,K.jsx)(Ke,{className:`size-4`}),` AI`]}),(0,K.jsxs)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:[`Backend: `,hd[I.backend]?.label??I.backend,!hd[I.backend]?.isCli&&(0,K.jsxs)(K.Fragment,{children:[` `,`· `,gd[I.provider]?.label,` · `,I.model]})]}),ge&&(0,K.jsxs)(`p`,{className:`mt-1 text-[11px] text-muted-foreground`,children:[`CLIs: `,ge]}),(0,K.jsx)(w,{type:`button`,size:`sm`,className:`mt-2`,variant:`secondary`,onClick:()=>{F(`provider`),N(!0)},children:`Configure AI`})]}),(0,K.jsxs)(`div`,{className:`rounded-lg border border-border p-3 text-xs text-muted-foreground`,children:[`Storage: `,l===`database`?`Database (synced)`:`Local only`,l===`database`&&` · ${u}`]}),(0,K.jsxs)(w,{type:`button`,variant:`outline`,className:`w-full text-destructive`,onClick:()=>{confirm(`Reset workspace to seed pages? This cannot be undone.`)&&(S(),j(!1))},children:[(0,K.jsx)(He,{className:`size-4`}),` Reset workspace`]})]})]})}),(0,K.jsx)(zf,{open:B,onOpenChange:V}),(0,K.jsx)(xf,{open:L,onOpenChange:R}),(0,K.jsx)(Uf,{open:ee,onOpenChange:H}),(0,K.jsx)(xd,{open:M,onOpenChange:N,initialStep:P})]})}var Jf=Object.defineProperty,Yf=(e,t)=>Jf(e,`name`,{value:t,configurable:!0}),Xf=`Popover`,[Zf,Qf]=vt(Xf,[ui]),$f=ui(),[ep,tp]=Zf(Xf),np=Yf(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=$f(t),c=z.useRef(null),[l,u]=z.useState(!1),[d,f]=z.useState(0),[p,m]=z.useState(0),[h,g]=Hi({prop:r,defaultProp:i??!1,onChange:a,caller:Xf});return(0,K.jsx)(pi,{...s,children:(0,K.jsx)(ep,{scope:t,contentId:Y(),titleId:Y(),descriptionId:Y(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,triggerRef:c,open:h,onOpenChange:g,onOpenToggle:z.useCallback(()=>g(e=>!e),[g]),hasCustomAnchor:l,onCustomAnchorAdd:z.useCallback(()=>u(!0),[]),onCustomAnchorRemove:z.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),rp=`PopoverTrigger`,ip=z.forwardRef(Yf(function(e,t){let{__scopePopover:n,...r}=e,i=tp(rp,n),a=$f(n),o=C(t,i.triggerRef),s=(0,K.jsx)(q.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":hp(i.open),...r,ref:o,onClick:G(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,K.jsx)(hi,{asChild:!0,...a,children:s})},`PopoverTrigger`)),ap=`PopoverPortal`,[op,sp]=Zf(ap,{forceMount:void 0}),cp=Yf(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=tp(ap,t);return(0,K.jsx)(op,{scope:t,forceMount:n,children:(0,K.jsx)(Oi,{present:n||a.open,children:(0,K.jsx)(wi,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),lp=`PopoverContent`,up=z.forwardRef(Yf(function(e,t){let n=sp(lp,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=tp(lp,e.__scopePopover);return(0,K.jsx)(Oi,{present:r||a.open,children:a.modal?(0,K.jsx)(fp,{...i,ref:t}):(0,K.jsx)(pp,{...i,ref:t})})},`PopoverContent`)),dp=S(`PopoverContent.RemoveScroll`),fp=z.forwardRef(Yf(function(e,t){let n=tp(lp,e.__scopePopover),r=z.useRef(null),i=C(t,r),a=z.useRef(!1);return z.useEffect(()=>{let e=r.current;if(e)return Ds(e)},[]),(0,K.jsx)(Ic,{as:dp,allowPinchZoom:!0,children:(0,K.jsx)(mp,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:G(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),pp=z.forwardRef(Yf(function(e,t){let n=tp(lp,e.__scopePopover),r=z.useRef(!1),i=z.useRef(!1);return(0,K.jsx)(mp,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),mp=z.forwardRef(Yf(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,"aria-describedby":d,...f}=e,p=tp(lp,n),m=$f(n);return To(),(0,K.jsx)(Mo,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,K.jsx)(Nt,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>p.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,K.jsx)(yi,{"data-state":hp(p.open),role:`dialog`,id:p.contentId,"aria-labelledby":p.titlePresent?p.titleId:void 0,"aria-describedby":p.descriptionPresent?gp(d,p.descriptionId):d,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})},`PopoverContentImpl`));function hp(e){return e?`open`:`closed`}Yf(hp,`getState`);function gp(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}Yf(gp,`concatAriaDescribedby`);var _p=np,vp=ip;function yp({className:e,align:t=`center`,sideOffset:n=6,...r}){return(0,K.jsx)(cp,{children:(0,K.jsx)(up,{align:t,sideOffset:n,className:s(`z-50 w-72 rounded-lg border border-border bg-popover p-3 text-popover-foreground shadow-lg outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95`,e),...r})})}var bp=[{type:`paragraph`,label:`Text`,description:`Just start writing with plain text.`,icon:et,keywords:[`text`,`paragraph`,`plain`],placeholder:`Type '/' for commands`},{type:`heading1`,label:`Heading 1`,description:`Big section heading.`,icon:be,keywords:[`h1`,`title`,`heading`],placeholder:`Heading 1`},{type:`heading2`,label:`Heading 2`,description:`Medium section heading.`,icon:xe,keywords:[`h2`,`heading`,`subtitle`],placeholder:`Heading 2`},{type:`heading3`,label:`Heading 3`,description:`Small section heading.`,icon:Se,keywords:[`h3`,`heading`],placeholder:`Heading 3`},{type:`bullet`,label:`Bulleted list`,description:`Create a simple bulleted list.`,icon:Oe,keywords:[`ul`,`list`,`bullet`,`unordered`],placeholder:`List item`},{type:`numbered`,label:`Numbered list`,description:`Create a list with numbering.`,icon:Te,keywords:[`ol`,`list`,`number`,`ordered`],placeholder:`List item`},{type:`todo`,label:`To-do list`,description:`Track tasks with a to-do checkbox.`,icon:qe,keywords:[`todo`,`task`,`checkbox`,`check`],placeholder:`To-do`},{type:`toggle`,label:`Toggle`,description:`Hide and show content inside.`,icon:ae,keywords:[`toggle`,`collapse`,`details`],placeholder:`Toggle heading`},{type:`quote`,label:`Quote`,description:`Capture a quote.`,icon:Ve,keywords:[`quote`,`blockquote`,`cite`],placeholder:`Empty quote`},{type:`callout`,label:`Callout`,description:`Make writing stand out.`,icon:Me,keywords:[`callout`,`note`,`info`,`tip`],placeholder:`Callout`},{type:`code`,label:`Code`,description:`Capture a code snippet.`,icon:se,keywords:[`code`,`snippet`,`pre`],placeholder:`Code`},{type:`mermaid`,label:`Mermaid`,description:`Diagram with Mermaid syntax.`,icon:at,keywords:[`mermaid`,`diagram`,`flowchart`,`sequence`,`graph`],placeholder:`flowchart TD - A[Start] --> B[End]`},{type:`ai`,label:`AI`,description:`Generate from the rest of this page.`,icon:Ke,keywords:[`ai`,`gpt`,`grok`,`summary`,`assistant`,`llm`],placeholder:`Summarize this page as a launch checklist…`},{type:`divider`,label:`Divider`,description:`Visually divide blocks.`,icon:Ne,keywords:[`divider`,`line`,`hr`,`separator`],placeholder:``}];function xp(e){return bp.find(t=>t.type===e)??bp[0]}function Sp(e){let t=e.trim().toLowerCase();return t?bp.filter(e=>e.label.toLowerCase().includes(t)||e.description.toLowerCase().includes(t)||e.keywords.some(e=>e.includes(t))):bp}function Cp({query:e,selectedIndex:t,onSelect:n,onHover:r,position:i}){let a=(0,z.useMemo)(()=>Sp(e),[e]),o=(0,z.useRef)(null);return(0,z.useEffect)(()=>{(o.current?.querySelector(`[data-index="${t}"]`))?.scrollIntoView({block:`nearest`})},[t]),a.length===0?(0,K.jsx)(`div`,{className:`fixed z-50 w-72 overflow-hidden rounded-xl border border-border bg-popover p-3 text-sm text-muted-foreground shadow-xl`,style:{top:i.top,left:i.left},children:`No matching blocks`}):(0,K.jsxs)(`div`,{ref:o,className:`fixed z-50 max-h-72 w-72 overflow-y-auto rounded-xl border border-border bg-popover p-1.5 shadow-xl`,style:{top:i.top,left:Math.min(i.left,window.innerWidth-300)},role:`listbox`,children:[(0,K.jsx)(`div`,{className:`px-2 py-1.5 text-[11px] font-medium uppercase tracking-wide text-muted-foreground`,children:`Basic blocks`}),a.map((e,i)=>{let a=e.icon;return(0,K.jsxs)(`button`,{type:`button`,"data-index":i,role:`option`,"aria-selected":i===t,className:s(`flex w-full items-start gap-2.5 rounded-lg px-2 py-2 text-left transition-colors`,i===t?`bg-muted`:`hover:bg-muted/70`),onMouseEnter:()=>r(i),onMouseDown:t=>{t.preventDefault(),n(e.type)},children:[(0,K.jsx)(`span`,{className:`mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-md border border-border bg-background text-foreground`,children:(0,K.jsx)(a,{className:`size-4`})}),(0,K.jsxs)(`span`,{className:`min-w-0`,children:[(0,K.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:e.label}),(0,K.jsx)(`span`,{className:`block truncate text-xs text-muted-foreground`,children:e.description})]})]},e.type)})]})}var wp=null;function Tp(){return wp||=y(()=>import(`./mermaid.core-lwoghoVk.js`).then(e=>{let t=e.default;return t.initialize({startOnLoad:!1,securityLevel:`strict`,theme:document.documentElement.classList.contains(`dark`)?`dark`:`neutral`,fontFamily:`inherit`}),t}),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23])),wp}function Ep({source:e,className:t}){let n=(0,z.useId)().replace(/:/g,``),r=(0,z.useRef)(null),[i,a]=(0,z.useState)(null),[o,c]=(0,z.useState)(``);return(0,z.useEffect)(()=>{let t=!1,r=e.trim();if(!r){c(``),a(null);return}return(async()=>{try{let e=await Tp();e.initialize({startOnLoad:!1,securityLevel:`strict`,theme:document.documentElement.classList.contains(`dark`)?`dark`:`neutral`,fontFamily:`inherit`});let i=`mmd_${n}_${Math.random().toString(36).slice(2,8)}`,{svg:o}=await e.render(i,r);t||(c(o),a(null))}catch(e){t||(c(``),a(e instanceof Error?e.message:`Invalid Mermaid diagram`))}})(),()=>{t=!0}},[e,n]),e.trim()?i?(0,K.jsx)(`div`,{className:`rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive`,children:i}):(0,K.jsx)(`div`,{ref:r,className:s(`overflow-x-auto rounded-md border border-border bg-background px-3 py-4 [&_svg]:mx-auto [&_svg]:max-w-full`,t),dangerouslySetInnerHTML:o?{__html:o}:void 0}):(0,K.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Write Mermaid syntax (e.g. flowchart TD) — diagram previews here.`})}async function Dp(e){let t=await fetch(`/api/ai/stream`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`text/event-stream`},body:JSON.stringify({...e.request,clientSettings:e.clientSettings,backend:e.backend}),signal:e.signal});if(!t.ok){let e=await t.text().catch(()=>t.statusText);throw Error(e||`Stream failed (${t.status})`)}if(!t.body)throw Error(`No response body for stream`);let n=t.body.getReader(),r=new TextDecoder,i=``,a=``,o=null,s=null;for(;;){let{done:t,value:c}=await n.read();if(t)break;i+=r.decode(c,{stream:!0});let l=i.split(` - -`);i=l.pop()??``;for(let t of l){let n=t.split(` -`).filter(e=>e.startsWith(`data:`)).map(e=>e.slice(5).trim()).join(``);if(!n)continue;let r;try{r=JSON.parse(n)}catch{continue}r.type===`token`&&r.text?(a+=r.text,e.onToken?.(r.text,a)):r.type===`status`&&r.message?e.onStatus?.(r.message):r.type===`done`?(r.text&&(a=r.text),o=r.result?r.result:{text:a,provider:`local`},e.onDone?.(o,a)):r.type===`error`&&(s=r.message||`Stream error`,e.onError?.(s))}}if(s&&!o&&!a.trim())throw Error(s);return o??{text:a,provider:`local`}}var Op=[{action:`summarize`,label:`Summary`,icon:pe,hint:`Condense the page`},{action:`action_items`,label:`Todos`,icon:Ee,hint:`Extract action items`},{action:`table`,label:`Table`,icon:Ze,hint:`Markdown table`},{action:`outline`,label:`Outline`,icon:De,hint:`Hierarchical outline`},{action:`mermaid`,label:`Diagram`,icon:at,hint:`Mermaid flowchart`}];function kp(e,t){return e===`claude-cli`?`Claude Code CLI`:e===`codex-cli`?`Codex CLI`:e===`grok-cli`?`Grok CLI`:e===`deepagents`?`Deep Agents · ${t??`model`}`:e===`direct`?t??`Direct API`:e===`xai`?t??`Grok`:`Local demo AI`}function Ap({content:e,aiOutput:t,aiError:n,pageTitle:r,pageText:i,onChangePrompt:a,onResult:o}){let[s,c]=(0,z.useState)(!1),[l,u]=(0,z.useState)(null),[d,f]=(0,z.useState)(!1),[p,m]=(0,z.useState)(``),[h,g]=(0,z.useState)(null),_=(0,z.useRef)(null),v=()=>{_.current?.abort(),_.current=null,c(!1),g(`Stopped`)},y=async(t,n)=>{c(!0),m(``),g(null);let a=yd(),s=a.preferStreaming!==!1,l=a.backend===`claude-cli`||a.backend===`codex-cli`||a.backend===`grok-cli`,d=s&&(l||a.backend===`direct`||a.backend===`deepagents`);try{if(d){let s=new AbortController;_.current=s;let c=await Dp({request:{action:t,instruction:n??e,pageTitle:r,pageText:i},clientSettings:a,backend:a.backend,signal:s.signal,onToken:(e,t)=>m(t),onStatus:e=>g(e)});u(kp(c.provider,c.model)),o({output:c.text||(c.blocks?c.blocks.map(e=>`${e.type}: ${e.content}`).join(` -`):``),blocks:c.blocks}),m(``)}else{let s=await cd({data:{action:t,instruction:n??e,pageTitle:r,pageText:i,clientSettings:a}});u(kp(s.provider,s.model)),o({output:s.text||(s.blocks?s.blocks.map(e=>`${e.type}: ${e.content}`).join(` -`):``),blocks:s.blocks})}}catch(e){e?.name===`AbortError`?o({output:p,error:`Generation stopped`}):o({output:``,error:e instanceof Error?e.message:`AI request failed`})}finally{_.current=null,c(!1),g(null)}},b=yd(),x=hd[b.backend]?.label??b.backend;return(0,K.jsxs)(`div`,{className:`w-full space-y-3 rounded-xl border border-border bg-muted/30 p-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium text-foreground`,children:[(0,K.jsx)(`span`,{className:`flex size-7 items-center justify-center rounded-md bg-foreground text-background`,children:(0,K.jsx)(Ke,{className:`size-3.5`})}),`AI block`,(0,K.jsx)(`span`,{className:`ml-auto text-[11px] font-normal text-muted-foreground`,children:l??x})]}),(0,K.jsx)(kd,{onOpen:()=>f(!0)}),(0,K.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Uses page context. Backends: Deep Agents, API keys, or coding CLIs (Claude Code / Codex / Grok) with live streaming when available.`}),(0,K.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:Op.map(e=>{let t=e.icon;return(0,K.jsxs)(w,{type:`button`,size:`sm`,variant:`outline`,className:`bg-background`,disabled:s,title:e.hint,onClick:()=>void y(e.action),children:[(0,K.jsx)(t,{className:`size-3.5`}),e.label]},e.action)})}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsx)(`textarea`,{className:`min-h-[64px] flex-1 resize-y rounded-md border border-border bg-background px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-ring/30`,placeholder:`Custom instruction…`,value:e,onChange:e=>a(e.target.value),disabled:s}),s?(0,K.jsxs)(w,{type:`button`,size:`sm`,variant:`destructive`,onClick:v,children:[(0,K.jsx)(Je,{className:`size-3.5`}),`Stop`]}):(0,K.jsxs)(w,{type:`button`,size:`sm`,disabled:!e.trim(),onClick:()=>void y(`custom`,e),children:[(0,K.jsx)(Re,{className:`size-3.5`}),`Run`]})]}),(s||p)&&(0,K.jsxs)(`div`,{className:`rounded-lg border border-border bg-background p-3`,children:[(0,K.jsxs)(`div`,{className:`mb-1 flex items-center gap-2 text-[11px] text-muted-foreground`,children:[s&&(0,K.jsx)(ke,{className:`size-3 animate-spin`}),h??(s?`Streaming…`:`Preview`)]}),(0,K.jsx)(`pre`,{className:`max-h-40 overflow-auto whitespace-pre-wrap text-xs leading-relaxed`,children:p||`…`})]}),n&&(0,K.jsx)(`p`,{className:`text-xs text-destructive`,children:n}),t&&!p&&(0,K.jsx)(`pre`,{className:`max-h-48 overflow-auto rounded-lg border border-border bg-background p-3 text-xs`,children:t}),(0,K.jsx)(xd,{open:d,onOpenChange:f})]})}var jp=[{id:`improve`,label:`Improve`,instruction:`Improve clarity and flow while preserving meaning.`},{id:`shorter`,label:`Shorter`,instruction:`Make this shorter and more concise.`},{id:`longer`,label:`Expand`,instruction:`Expand this with one more sentence of useful detail.`},{id:`fix`,label:`Fix grammar`,instruction:`Fix grammar and spelling only.`},{id:`pro`,label:`Professional`,instruction:`Rewrite in a clear, professional tone.`}];function Mp(e,t){return e===`claude-cli`?`Claude Code CLI`:e===`codex-cli`?`Codex CLI`:e===`grok-cli`?`Grok CLI`:e===`deepagents`?`Deep Agents · ${t??`model`}`:e===`direct`?t??`Direct API`:e===`xai`?t??`Grok`:`Local demo AI`}function Np({open:e,onOpenChange:t,blockText:n,blockType:r,pageTitle:i,pageText:a,onApply:o}){let[c,l]=(0,z.useState)(``),[u,d]=(0,z.useState)(null),[f,p]=(0,z.useState)(!1),[m,h]=(0,z.useState)(null),[g,_]=(0,z.useState)(null),[v,y]=(0,z.useState)(null),[b,x]=(0,z.useState)(!1),S=(0,z.useRef)(null),C=()=>{S.current?.abort(),S.current=null,p(!1)},T=async e=>{p(!0),h(null),d(``),y(null);let t=yd(),o=t.preferStreaming!==!1,s=t.backend===`claude-cli`||t.backend===`codex-cli`||t.backend===`grok-cli`,c=o&&(s||t.backend===`direct`||t.backend===`deepagents`);try{if(c){let o=new AbortController;S.current=o;let s=await Dp({request:{action:`edit_block`,instruction:e,blockText:n,blockType:r,pageTitle:i,pageText:a},clientSettings:t,backend:t.backend,signal:o.signal,onToken:(e,t)=>d(t),onStatus:e=>y(e)});d(s.text),_(Mp(s.provider,s.model))}else{let o=await cd({data:{action:`edit_block`,instruction:e,blockText:n,blockType:r,pageTitle:i,pageText:a,clientSettings:t}});d(o.text),_(Mp(o.provider,o.model))}}catch(e){e?.name!==`AbortError`&&h(e instanceof Error?e.message:`AI request failed`)}finally{S.current=null,p(!1),y(null)}};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Gu,{open:e,onOpenChange:e=>{e||(C(),d(null),h(null),l(``)),t(e)},children:(0,K.jsxs)(Ju,{className:`max-w-lg`,children:[(0,K.jsxs)(Yu,{children:[(0,K.jsxs)(Xu,{className:`flex items-center gap-2`,children:[(0,K.jsx)(Ke,{className:`size-4`}),`Edit block with AI`]}),(0,K.jsxs)(Zu,{children:[`Rewrite this block. Uses your configured backend (API or Claude / Codex / Grok CLI) with streaming when available.`,g&&(0,K.jsx)(`span`,{className:`mt-1 block text-xs text-muted-foreground`,children:g})]})]}),(0,K.jsx)(kd,{onOpen:()=>x(!0)}),(0,K.jsxs)(`div`,{className:`rounded-md border border-border bg-muted/40 p-2 text-xs text-muted-foreground`,children:[(0,K.jsx)(`span`,{className:`font-medium text-foreground`,children:`Original`}),(0,K.jsx)(`p`,{className:`mt-1 line-clamp-4 whitespace-pre-wrap`,children:n||`(empty)`})]}),(0,K.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:jp.map(e=>(0,K.jsxs)(w,{type:`button`,size:`sm`,variant:`outline`,disabled:f,onClick:()=>void T(e.instruction),children:[(0,K.jsx)(rt,{className:`size-3.5`}),e.label]},e.id))}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsx)(`input`,{className:`h-9 flex-1 rounded-md border border-border bg-background px-3 text-sm outline-none focus:ring-2 focus:ring-ring/30`,placeholder:`Custom instruction…`,value:c,onChange:e=>l(e.target.value),disabled:f,onKeyDown:e=>{e.key===`Enter`&&c.trim()&&T(c.trim())}}),f?(0,K.jsxs)(w,{type:`button`,size:`sm`,variant:`destructive`,onClick:C,children:[(0,K.jsx)(Je,{className:`size-3.5`}),`Stop`]}):(0,K.jsx)(w,{type:`button`,size:`sm`,disabled:!c.trim(),onClick:()=>void T(c.trim()),children:`Run`})]}),f&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,K.jsx)(ke,{className:`size-3.5 animate-spin`}),v??`Generating…`]}),m&&(0,K.jsx)(`p`,{className:`text-xs text-destructive`,children:m}),u!=null&&u!==``&&(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsx)(`div`,{className:`text-xs font-medium text-muted-foreground`,children:`Preview`}),(0,K.jsx)(`pre`,{className:s(`max-h-48 overflow-auto whitespace-pre-wrap rounded-md border border-border bg-background p-3 text-sm`,f&&`opacity-80`),children:u}),(0,K.jsx)(w,{type:`button`,className:`w-full`,disabled:f,onClick:()=>{o(u),t(!1)},children:`Apply to block`})]})]})}),(0,K.jsx)(xd,{open:b,onOpenChange:x})]})}function Pp({block:e,index:t,isFocused:n,listNumber:r,pageTitle:i,pageText:a,onFocus:o,onChange:c,onTypeChange:l,onToggleCheck:u,onToggleCollapse:d,onEnter:f,onBackspaceEmpty:p,onMove:m,onDelete:h,onIndent:g,onPatch:_,onAiInsert:v,focusRequest:y,onFocusHandled:b,inputRefs:x}){let S=xp(e.type),C=(0,z.useRef)(null),T=(0,z.useRef)(null),[E,D]=(0,z.useState)(!1),[O,k]=(0,z.useState)(``),[A,j]=(0,z.useState)(0),[M,N]=(0,z.useState)({top:0,left:0}),[P,F]=(0,z.useState)(!1),[I,L]=(0,z.useState)(!1),R=(0,z.useCallback)(t=>{C.current=t,t?x.current.set(e.id,t):x.current.delete(e.id)},[e.id,x]),B=(0,z.useCallback)(()=>{let e=C.current;e&&(e.style.height=`0px`,e.style.height=`${Math.max(e.scrollHeight,28)}px`)},[]);(0,z.useEffect)(()=>{B()},[e.content,e.type,B]),(0,z.useEffect)(()=>{if(y!==e.id)return;let t=C.current;if(t){t.focus();let e=t.value.length;t.setSelectionRange(e,e)}b()},[y,e.id,b]);let V=e=>{let t=T.current;if(!t)return;let n=t.getBoundingClientRect(),r=Math.min(n.left+48,window.innerWidth-300),i=n.bottom+280>window.innerHeight?Math.max(8,n.top-280):n.bottom+4;N({top:i,left:r}),k(e),j(0),D(!0)},ee=()=>{D(!1),k(``),j(0)},H=t=>{let n=e.content,r=n.lastIndexOf(`/`),i=r>=0?n.slice(0,r):n;c(e.id,i),l(e.id,t),ee(),requestAnimationFrame(()=>{x.current.get(e.id)?.focus()})},te=t=>{c(e.id,t),requestAnimationFrame(B);let n=t.lastIndexOf(`/`);if(n>=0){let e=t.slice(n+1),r=t[n-1];if((n===0||r===` `||r===` -`)&&!e.includes(` -`)){V(e);return}}E&&ee()},ne=t=>{if(E){let e=Sp(O);if(t.key===`ArrowDown`){t.preventDefault(),j(t=>(t+1)%Math.max(e.length,1));return}if(t.key===`ArrowUp`){t.preventDefault(),j(t=>(t-1+Math.max(e.length,1))%Math.max(e.length,1));return}if(t.key===`Enter`||t.key===`Tab`){t.preventDefault();let n=e[A];n&&H(n.type);return}if(t.key===`Escape`){t.preventDefault(),ee();return}}if(t.key===`Enter`&&!t.shiftKey&&e.type!==`code`&&e.type!==`mermaid`){t.preventDefault(),f(e.id);return}if(t.key===`Backspace`){let n=t.currentTarget;if(!n.value&&n.selectionStart===0){t.preventDefault(),p(e.id);return}}t.key===`Tab`&&(t.preventDefault(),g(e.id,t.shiftKey?-1:1)),t.key===`ArrowUp`&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),m(e.id,`up`)),t.key===`ArrowDown`&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),m(e.id,`down`))},re={paddingLeft:`${(e.indent??0)*1.5}rem`},ie=e.type!==`divider`&&e.type!==`ai`&&e.type!==`mermaid`;if(e.type===`divider`)return(0,K.jsxs)(`div`,{ref:T,"data-block-id":e.id,"data-block-type":e.type,className:`group relative flex items-center gap-1 py-2`,style:re,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),children:[(0,K.jsx)(Fp,{visible:P||n,canAiEdit:!1,onAdd:()=>f(e.id),onMoveUp:()=>m(e.id,`up`),onMoveDown:()=>m(e.id,`down`),onDelete:()=>h(e.id),onTypeChange:t=>l(e.id,t),onAiEdit:()=>L(!0)}),(0,K.jsx)(`hr`,{className:`w-full border-0 border-t border-border`})]});if(e.type===`ai`)return(0,K.jsxs)(`div`,{ref:T,"data-block-id":e.id,"data-block-type":e.type,className:`group relative py-1`,style:re,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),children:[(0,K.jsx)(Fp,{visible:P||n,canAiEdit:!1,onAdd:()=>f(e.id),onMoveUp:()=>m(e.id,`up`),onMoveDown:()=>m(e.id,`down`),onDelete:()=>h(e.id),onTypeChange:t=>l(e.id,t),onAiEdit:()=>void 0}),(0,K.jsx)(`div`,{className:`pl-1`,children:(0,K.jsx)(Ap,{content:e.content,aiOutput:e.aiOutput,aiError:e.aiError,pageTitle:i,pageText:a,onChangePrompt:t=>c(e.id,t),onResult:({output:t,blocks:n,error:r})=>{_(e.id,{aiOutput:t,aiError:r}),n?.length&&v(e.id,n)}})})]});if(e.type===`mermaid`){let t=e.showSource??!e.content.trim();return(0,K.jsxs)(`div`,{ref:T,"data-block-id":e.id,"data-block-type":e.type,className:`group relative py-1`,style:re,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),children:[(0,K.jsx)(Fp,{visible:P||n,canAiEdit:!1,onAdd:()=>f(e.id),onMoveUp:()=>m(e.id,`up`),onMoveDown:()=>m(e.id,`down`),onDelete:()=>h(e.id),onTypeChange:t=>l(e.id,t),onAiEdit:()=>void 0}),(0,K.jsxs)(`div`,{className:`space-y-2 rounded-xl border border-border bg-muted/20 p-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,K.jsx)(`span`,{className:`text-xs font-medium uppercase tracking-wide text-muted-foreground`,children:`Mermaid`}),(0,K.jsx)(w,{type:`button`,size:`sm`,variant:`ghost`,className:`h-7 text-muted-foreground`,onClick:()=>_(e.id,{showSource:!t}),children:t?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(de,{className:`size-3.5`}),` Preview`]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(se,{className:`size-3.5`}),` Edit source`]})})]}),t?(0,K.jsx)(`textarea`,{ref:R,value:e.content,onChange:e=>te(e.target.value),onFocus:()=>o(e.id),onKeyDown:ne,placeholder:S.placeholder,rows:Math.max(4,e.content.split(` -`).length),spellCheck:!1,className:`w-full resize-y rounded-md border border-border bg-background px-3 py-2 font-mono text-sm leading-relaxed text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring/40`}):(0,K.jsx)(Ep,{source:e.content})]}),E&&(0,K.jsx)(Cp,{query:O,selectedIndex:A,onSelect:H,onHover:j,position:M})]})}let W=s(`block w-full resize-none overflow-hidden border-0 bg-background p-0 text-foreground shadow-none outline-none ring-0 focus:outline-none focus:ring-0`,`placeholder:text-muted-foreground/60`,e.type===`paragraph`&&`text-base leading-relaxed`,e.type===`heading1`&&`text-3xl font-semibold leading-tight tracking-tight`,e.type===`heading2`&&`text-2xl font-semibold leading-tight tracking-tight`,e.type===`heading3`&&`text-xl font-semibold leading-snug tracking-tight`,(e.type===`bullet`||e.type===`numbered`)&&`text-base leading-relaxed`,e.type===`todo`&&s(`text-base leading-relaxed`,e.checked&&`text-muted-foreground line-through`),e.type===`toggle`&&`text-base font-medium leading-relaxed`,e.type===`quote`&&`text-base leading-relaxed text-muted-foreground`,e.type===`callout`&&`text-base leading-relaxed`,e.type===`code`&&`min-h-16 font-mono text-sm leading-relaxed`);return(0,K.jsxs)(`div`,{ref:T,"data-block-id":e.id,"data-block-type":e.type,className:s(`group relative flex items-start gap-1 rounded-md py-0.5`,n&&`bg-muted/40`),style:re,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),children:[(0,K.jsx)(Fp,{visible:P||n,canAiEdit:ie,onAdd:()=>f(e.id),onMoveUp:()=>m(e.id,`up`),onMoveDown:()=>m(e.id,`down`),onDelete:()=>h(e.id),onTypeChange:t=>l(e.id,t),onAiEdit:()=>L(!0)}),(0,K.jsxs)(`div`,{className:s(`flex min-w-0 flex-1 items-start gap-2 rounded-md px-1 py-1`,e.type===`callout`&&`border border-border bg-muted/50 px-3 py-2.5`,e.type===`quote`&&`border-l-2 border-foreground/25 pl-3`,e.type===`code`&&`border border-border bg-muted/60 px-3 py-2.5`),children:[e.type===`bullet`&&(0,K.jsx)(`span`,{className:`mt-2.5 size-1.5 shrink-0 rounded-full bg-foreground/80`}),e.type===`numbered`&&(0,K.jsxs)(`span`,{className:`mt-1 w-5 shrink-0 text-right text-sm tabular-nums text-muted-foreground`,children:[r??t+1,`.`]}),e.type===`todo`&&(0,K.jsx)(`button`,{type:`button`,className:s(`mt-1.5 flex size-4 shrink-0 items-center justify-center rounded border transition-colors`,e.checked?`border-primary bg-primary text-primary-foreground`:`border-border bg-background hover:border-foreground/40`),onClick:()=>u(e.id),"aria-label":e.checked?`Mark incomplete`:`Mark complete`,children:e.checked&&(0,K.jsx)(U,{className:`size-3`,strokeWidth:3})}),e.type===`toggle`&&(0,K.jsx)(`button`,{type:`button`,className:`mt-1 flex size-5 shrink-0 items-center justify-center rounded hover:bg-muted`,onClick:()=>d(e.id),"aria-label":e.collapsed?`Expand`:`Collapse`,children:(0,K.jsx)(ae,{className:s(`size-4 text-muted-foreground transition-transform duration-150`,!e.collapsed&&`rotate-90`)})}),e.type===`callout`&&(0,K.jsx)(`span`,{className:`mt-1 shrink-0 text-base leading-none`,"aria-hidden":!0,children:`💡`}),(0,K.jsx)(`textarea`,{ref:R,value:e.content,onChange:e=>te(e.target.value),onFocus:()=>o(e.id),onKeyDown:ne,placeholder:S.placeholder,rows:1,spellCheck:e.type!==`code`,className:W})]}),E&&(0,K.jsx)(Cp,{query:O,selectedIndex:A,onSelect:H,onHover:j,position:M}),ie&&(0,K.jsx)(Np,{open:I,onOpenChange:L,blockText:e.content,blockType:e.type,pageTitle:i,pageText:a,onApply:t=>c(e.id,t)})]})}function Fp({visible:e,canAiEdit:t,onAdd:n,onMoveUp:r,onMoveDown:i,onDelete:a,onTypeChange:o,onAiEdit:c}){return(0,K.jsxs)(`div`,{"data-hover-reveal":!0,className:s(`absolute -left-12 top-1 flex items-center gap-0.5 opacity-0 transition-opacity max-sm:-left-10`,e&&`opacity-100`),children:[(0,K.jsx)(w,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,onClick:n,"aria-label":`Add block below`,children:(0,K.jsx)(ze,{className:`size-3.5`})}),(0,K.jsxs)(lu,{children:[(0,K.jsx)(uu,{asChild:!0,children:(0,K.jsx)(w,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground`,"aria-label":`Block menu`,children:(0,K.jsx)(ve,{className:`size-3.5`})})}),(0,K.jsxs)(mu,{align:`start`,className:`w-48`,children:[(0,K.jsx)(gu,{children:`Block`}),t&&(0,K.jsxs)(hu,{onClick:c,children:[(0,K.jsx)(Ke,{className:`size-4`}),` Edit with AI`]}),(0,K.jsxs)(hu,{onClick:r,children:[(0,K.jsx)(ne,{className:`size-4`}),` Move up`]}),(0,K.jsxs)(hu,{onClick:i,children:[(0,K.jsx)(ee,{className:`size-4`}),` Move down`]}),(0,K.jsxs)(du,{children:[(0,K.jsxs)(fu,{children:[(0,K.jsx)(ue,{className:`size-4`}),` Turn into`]}),(0,K.jsx)(pu,{className:`max-h-64 overflow-y-auto`,children:bp.map(e=>{let t=e.icon;return(0,K.jsxs)(hu,{onClick:()=>o(e.type),children:[(0,K.jsx)(t,{className:`size-4`}),` `,e.label]},e.type)})})]}),(0,K.jsx)(_u,{}),(0,K.jsxs)(hu,{className:`text-destructive focus:text-destructive`,onClick:a,children:[(0,K.jsx)($e,{className:`size-4`}),` Delete`]})]})]})]})}function Ip(e){return e.blocks.filter(e=>e.type!==`ai`&&e.type!==`divider`).map(e=>`${e.type===`heading1`?`# `:e.type===`heading2`?`## `:e.type===`heading3`?`### `:e.type===`bullet`?`- `:e.type===`numbered`?`1. `:e.type===`todo`?e.checked?`[x] `:`[ ] `:e.type===`quote`?`> `:(e.type===`code`||e.type,``)}${e.content}`.trim()).filter(Boolean).join(` -`)}function Lp({page:e}){let t=m(e=>e.updatePage),n=m(e=>e.updateBlock),r=m(e=>e.insertBlock),i=m(e=>e.deleteBlock),a=m(e=>e.changeBlockType),c=m(e=>e.moveBlock),l=m(e=>e.deletePage),u=m(e=>e.duplicatePage),d=m(e=>e.createPage),p=m(e=>e.setBlocks),[h,g]=(0,z.useState)(null),[v,y]=(0,z.useState)(null),b=(0,z.useRef)(new Map),x=(0,z.useRef)(null),S=(0,z.useMemo)(()=>Ip(e),[e]),C=(0,z.useMemo)(()=>{let t=new Map,n=0;for(let r of e.blocks)r.type===`numbered`?(n+=1,t.set(r.id,n)):n=0;return t},[e.blocks]);(0,z.useEffect)(()=>{let e=x.current;e&&(e.style.height=`auto`,e.style.height=`${e.scrollHeight}px`)},[e.title]);let T=(0,z.useCallback)(t=>{let n=r(e.id,t,`paragraph`,``);y(n),g(n)},[r,e.id]),E=(0,z.useCallback)(t=>{let n=e.blocks.findIndex(e=>e.id===t);if(n<0)return;let r=e.blocks[n-1];i(e.id,t),r&&(y(r.id),g(r.id))},[i,e.blocks,e.id]),D=(0,z.useCallback)((t,r)=>{let i=e.blocks.find(e=>e.id===t);if(!i)return;let a=Math.max(0,Math.min(4,(i.indent??0)+r));n(e.id,t,{indent:a})},[e.blocks,e.id,n]),O=(0,z.useCallback)((t,n)=>{let r=e.blocks.findIndex(e=>e.id===t);if(r<0||n.length===0)return;let i=n.map(e=>({id:o(`b`),type:e.type,content:e.content,indent:0,checked:e.type!==`todo`&&void 0,showSource:e.type!==`mermaid`&&void 0})),a=[...e.blocks];a.splice(r+1,0,...i),p(e.id,a),y(i[0].id)},[e.blocks,e.id,p]),k=e.cover?_[e.cover]:null;return(0,K.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl px-4 pb-32 pt-4 sm:px-12 sm:pt-8`,children:[k?(0,K.jsxs)(`div`,{className:`group/cover relative -mx-4 mb-2 h-36 overflow-hidden rounded-xl sm:-mx-6 sm:h-44`,children:[(0,K.jsx)(`div`,{className:s(`absolute inset-0`,k.className)}),(0,K.jsx)(`div`,{"data-hover-reveal":!0,className:`absolute bottom-3 right-3 opacity-0 transition-opacity group-hover/cover:opacity-100`,children:(0,K.jsx)(w,{type:`button`,size:`sm`,variant:`secondary`,className:`bg-background/90 shadow-sm backdrop-blur-sm`,onClick:()=>t(e.id,{cover:null}),children:`Remove cover`})})]}):null,(0,K.jsxs)(`div`,{className:`mb-1 flex flex-wrap items-end gap-2`,children:[(0,K.jsxs)(_p,{children:[(0,K.jsx)(vp,{asChild:!0,children:(0,K.jsx)(`button`,{type:`button`,className:`flex size-16 items-center justify-center rounded-xl text-4xl transition-colors hover:bg-muted`,"aria-label":`Change page icon`,children:e.icon})}),(0,K.jsxs)(yp,{align:`start`,className:`w-72`,children:[(0,K.jsx)(`div`,{className:`mb-2 text-xs font-medium text-muted-foreground`,children:`Page icon`}),(0,K.jsx)(`div`,{className:`grid grid-cols-8 gap-1`,children:f.map(n=>(0,K.jsx)(`button`,{type:`button`,className:s(`flex size-8 items-center justify-center rounded-md text-lg transition-colors hover:bg-muted`,e.icon===n&&`bg-muted ring-1 ring-border`),onClick:()=>t(e.id,{icon:n}),children:n},n))})]})]}),(0,K.jsxs)(`div`,{className:`mb-2 flex flex-1 flex-wrap items-center gap-1`,children:[(0,K.jsxs)(w,{type:`button`,size:`sm`,variant:`ghost`,className:`text-muted-foreground`,onClick:()=>t(e.id,{favorite:!e.favorite}),children:[(0,K.jsx)(Ye,{className:s(`size-3.5`,e.favorite&&`fill-amber-400 text-amber-500`)}),e.favorite?`Unfavorite`:`Favorite`]}),(0,K.jsxs)(w,{type:`button`,size:`sm`,variant:`ghost`,className:`text-muted-foreground`,onClick:()=>{let t=e.blocks[e.blocks.length-1],n=r(e.id,t?.id??null,`ai`,``);y(n)},children:[(0,K.jsx)(Ke,{className:`size-3.5`}),`AI block`]}),(0,K.jsxs)(lu,{children:[(0,K.jsx)(uu,{asChild:!0,children:(0,K.jsxs)(w,{type:`button`,size:`sm`,variant:`ghost`,className:`text-muted-foreground`,children:[(0,K.jsx)(Ce,{className:`size-3.5`}),`Cover`]})}),(0,K.jsxs)(mu,{align:`start`,children:[Object.entries(_).map(([n,r])=>(0,K.jsxs)(hu,{onClick:()=>t(e.id,{cover:n}),children:[(0,K.jsx)(`span`,{className:s(`mr-2 size-4 rounded`,r.className)}),r.label]},n)),e.cover&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(_u,{}),(0,K.jsx)(hu,{onClick:()=>t(e.id,{cover:null}),children:`Remove cover`})]})]})]}),(0,K.jsxs)(lu,{children:[(0,K.jsx)(uu,{asChild:!0,children:(0,K.jsx)(w,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":`Page actions`,className:`text-muted-foreground`,children:(0,K.jsx)(ue,{className:`size-3.5`})})}),(0,K.jsxs)(mu,{align:`start`,children:[(0,K.jsxs)(hu,{onClick:()=>d({parentId:e.id}),children:[(0,K.jsx)(ze,{className:`size-4`}),` Add sub-page`]}),(0,K.jsxs)(hu,{onClick:()=>u(e.id),children:[(0,K.jsx)(ce,{className:`size-4`}),` Duplicate`]}),(0,K.jsx)(_u,{}),(0,K.jsxs)(hu,{className:`text-destructive focus:text-destructive`,onClick:()=>l(e.id),children:[(0,K.jsx)($e,{className:`size-4`}),` Move to trash`]})]})]})]})]}),(0,K.jsx)(`textarea`,{ref:x,value:e.title,onChange:n=>t(e.id,{title:n.target.value}),placeholder:`Untitled`,rows:1,className:`mb-4 w-full resize-none overflow-hidden bg-transparent text-4xl font-bold tracking-tight text-foreground outline-none placeholder:text-muted-foreground/50`,onKeyDown:t=>{if(t.key===`Enter`){t.preventDefault();let n=e.blocks[0];n&&(y(n.id),g(n.id))}}}),(0,K.jsx)(`div`,{className:`relative space-y-0.5 pl-10 sm:pl-12`,children:e.blocks.map((t,r)=>(0,K.jsx)(Pp,{pageId:e.id,block:t,index:r,isFocused:h===t.id,listNumber:C.get(t.id),pageTitle:e.title,pageText:S,onFocus:g,onChange:(t,r)=>n(e.id,t,{content:r}),onTypeChange:(t,n)=>a(e.id,t,n),onToggleCheck:t=>{let r=e.blocks.find(e=>e.id===t);r&&n(e.id,t,{checked:!r.checked})},onToggleCollapse:t=>{let r=e.blocks.find(e=>e.id===t);r&&n(e.id,t,{collapsed:!r.collapsed})},onEnter:T,onBackspaceEmpty:E,onMove:(t,n)=>c(e.id,t,n),onDelete:t=>i(e.id,t),onIndent:D,onPatch:(t,r)=>n(e.id,t,r),onAiInsert:O,focusRequest:v,onFocusHandled:()=>y(null),inputRefs:b},t.id))}),(0,K.jsx)(`button`,{type:`button`,className:`mt-2 ml-10 min-h-16 w-[calc(100%-2.5rem)] cursor-text rounded-md sm:ml-12 sm:w-[calc(100%-3rem)]`,"aria-label":`Add block at end`,onClick:()=>{let t=e.blocks[e.blocks.length-1];if(t&&t.type===`paragraph`&&!t.content)y(t.id),g(t.id);else{let n=r(e.id,t?.id??null,`paragraph`,``);y(n),g(n)}}})]})}var Rp=1,zp=.9,Bp=.8,Vp=.17,Hp=.1,Up=.999,Wp=.9999,Gp=.99,Kp=/[\\\/_+.#"@\[\(\{&]/,qp=/[\\\/_+.#"@\[\(\{&]/g,Jp=/[\s-]/,Yp=/[\s-]/g;function Xp(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?Rp:Gp;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=Xp(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=Rp:Kp.test(e.charAt(l-1))?(d*=Bp,p=e.slice(i,l-1).match(qp),p&&i>0&&(d*=Up**+p.length)):Jp.test(e.charAt(l-1))?(d*=zp,m=e.slice(i,l-1).match(Yp),m&&i>0&&(d*=Up**+m.length)):(d*=Vp,i>0&&(d*=Up**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=Wp)),(dd&&(d=f*Hp)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function Zp(e){return e.toLowerCase().replace(Yp,` `)}function Qp(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,Xp(e,t,Zp(e),Zp(t),0,0,{})}var $p=`[cmdk-group=""]`,em=`[cmdk-group-items=""]`,tm=`[cmdk-group-heading=""]`,nm=`[cmdk-item=""]`,rm=`${nm}:not([aria-disabled="true"])`,im=`cmdk-item-select`,am=`data-value`,om=(e,t,n)=>Qp(e,t,n),sm=z.createContext(void 0),cm=()=>z.useContext(sm),lm=z.createContext(void 0),um=()=>z.useContext(lm),dm=z.createContext(void 0),fm=z.forwardRef((e,t)=>{let n=Em(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=Em(()=>new Set),i=Em(()=>new Map),a=Em(()=>new Map),o=Em(()=>new Set),s=wm(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=Y(),y=Y(),b=Y(),x=z.useRef(null),S=km();Tm(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,C.emit()}},[u]),Tm(()=>{S(6,k)},[]);let C=z.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)O(),E(),S(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(S(7,()=>{n.current.selectedItemId=A()?.id,C.emit()}),r||S(5,k),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),w=z.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,T(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{O(),E(),n.current.value||D(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=A();S(4,()=>{O(),t?.getAttribute(`id`)===e&&D(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function T(e,t){let r=s.current?.filter??om;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;j().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(em);t?t.appendChild(e.parentElement===t?e:e.closest(`${em} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${em} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${$p}[${am}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=j().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(am);C.setState(`value`,e||void 0)}function O(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=T(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function k(){var e;let t=A();t&&(t.parentElement?.firstChild===t&&((e=t.closest($p)?.querySelector(tm))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function A(){return x.current?.querySelector(`${nm}[aria-selected="true"]`)}function j(){return Array.from(x.current?.querySelectorAll(rm)||[])}function M(e){let t=j()[e];t&&C.setState(`value`,t.getAttribute(am))}function N(e){var t;let n=A(),r=j(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&C.setState(`value`,a.getAttribute(am))}function P(e){let t=A()?.closest($p),n;for(;t&&!n;)t=e>0?Sm(t,$p):Cm(t,$p),n=t?.querySelector(rm);n?C.setState(`value`,n.getAttribute(am)):N(e)}let F=()=>M(j().length-1),I=e=>{e.preventDefault(),e.metaKey?F():e.altKey?P(1):N(1)},L=e=>{e.preventDefault(),e.metaKey?M(0):e.altKey?P(-1):N(-1)};return z.createElement(q.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&I(e);break;case`ArrowDown`:I(e);break;case`p`:case`k`:g&&e.ctrlKey&&L(e);break;case`ArrowUp`:L(e);break;case`Home`:e.preventDefault(),M(0);break;case`End`:e.preventDefault(),F();break;case`Enter`:{e.preventDefault();let t=A();if(t){let e=new Event(im);t.dispatchEvent(e)}}}}},z.createElement(`label`,{"cmdk-label":``,htmlFor:w.inputId,id:w.labelId,style:Mm},c),jm(e,e=>z.createElement(lm.Provider,{value:C},z.createElement(sm.Provider,{value:w},e))))}),pm=z.forwardRef((e,t)=>{let n=Y(),r=z.useRef(null),i=z.useContext(dm),a=cm(),o=wm(e),s=o.current?.forceMount??i?.forceMount;Tm(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=Om(n,r,[e.value,e.children,r],e.keywords),l=um(),u=Dm(e=>e.value&&e.value===c.current),d=Dm(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);z.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(im,f),()=>t.removeEventListener(im,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return z.createElement(q.div,{ref:O(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),mm=z.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=Y(),s=z.useRef(null),c=z.useRef(null),l=Y(),u=cm(),d=Dm(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));Tm(()=>u.group(o),[]),Om(o,s,[e.value,e.heading,c]);let f=z.useMemo(()=>({id:o,forceMount:i}),[i]);return z.createElement(q.div,{ref:O(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&z.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),jm(e,e=>z.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},z.createElement(dm.Provider,{value:f},e))))}),hm=z.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=z.useRef(null),a=Dm(e=>!e.search);return!n&&!a?null:z.createElement(q.div,{ref:O(i,t),...r,"cmdk-separator":``,role:`separator`})}),gm=z.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=um(),o=Dm(e=>e.search),s=Dm(e=>e.selectedItemId),c=cm();return z.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),z.createElement(q.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),_m=z.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=z.useRef(null),o=z.useRef(null),s=Dm(e=>e.selectedItemId),c=cm();return z.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),z.createElement(q.div,{ref:O(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},jm(e,e=>z.createElement(`div`,{ref:O(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),vm=z.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return z.createElement(Tu,{open:n,onOpenChange:r},z.createElement(ku,{container:o},z.createElement(ju,{"cmdk-overlay":``,className:i}),z.createElement(Fu,{"aria-label":e.label,"cmdk-dialog":``,className:a},z.createElement(fm,{ref:t,...s}))))}),ym=z.forwardRef((e,t)=>Dm(e=>e.filtered.count===0)?z.createElement(q.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),bm=z.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return z.createElement(q.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},jm(e,e=>z.createElement(`div`,{"aria-hidden":!0},e)))}),xm=Object.assign(fm,{List:_m,Item:pm,Input:gm,Group:mm,Separator:hm,Dialog:vm,Empty:ym,Loading:bm});function Sm(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Cm(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function wm(e){let t=z.useRef(e);return Tm(()=>{t.current=e}),t}var Tm=typeof window>`u`?z.useEffect:z.useLayoutEffect;function Em(e){let t=z.useRef();return t.current===void 0&&(t.current=e()),t}function Dm(e){let t=um(),n=()=>e(t.snapshot());return z.useSyncExternalStore(t.subscribe,n,n)}function Om(e,t,n,r=[]){let i=z.useRef(),a=cm();return Tm(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(am,s),i.current=s}),i}var km=()=>{let[e,t]=z.useState(),n=Em(()=>new Map);return Tm(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function Am(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function jm({asChild:e,children:t},n){return e&&z.isValidElement(t)?z.cloneElement(Am(t),{ref:t.ref},n(t.props.children)):n(t)}var Mm={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`},Nm=sd({type:`function`}).client(async({next:e})=>{let{getBearerToken:t}=await y(async()=>{let{getBearerToken:e}=await import(`./client-CwgDvMJw.js`).then(e=>e.n);return{getBearerToken:e}},__vite__mapDeps([24,2,3]));return e({sendContext:{bearerToken:t()??void 0}})}),Pm=$({method:`POST`}).middleware([Nm]).handler(p(`a98064319e8852a83544a57d2b08358536b8e71b7accdbbc3c7a0bc01b34e11a`));function Fm({open:e,onOpenChange:t}){let n=m(e=>e.pages),r=m(e=>e.storageMode),i=m(e=>e.setActivePage),a=m(e=>e.createPage),[o,c]=(0,z.useState)(``),[l,u]=(0,z.useState)([]),[d,f]=(0,z.useState)(!1),[p,h]=(0,z.useState)(!1),[g,_]=(0,z.useState)(`local`);(0,z.useEffect)(()=>{e||(c(``),u([]))},[e]),(0,z.useEffect)(()=>{let n=n=>{(n.metaKey||n.ctrlKey)&&n.key.toLowerCase()===`k`&&(n.preventDefault(),t(!e))};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t]),(0,z.useEffect)(()=>{if(!e)return;let t=o.trim();if(!t){u([]),f(!1);return}let i=!1;f(!0);let a=setTimeout(()=>{(async()=>{try{if(r===`database`){let e=await Pm({data:{query:t,limit:24}});if(i)return;u(e.hits),h(e.trgm),_(`postgres`)}else{let e=Af(n,t,24);if(i)return;u(e),h(!1),_(`local`)}}catch{if(i)return;u(Af(n,t,24)),_(`local`)}finally{i||f(!1)}})()},180);return()=>{i=!0,clearTimeout(a)}},[o,e,r,n]);let v=(0,z.useMemo)(()=>n.filter(e=>!e.archived).slice(0,30),[n]);if(!e)return null;let y=o.trim().length>0;return(0,K.jsxs)(`div`,{className:`fixed inset-0 z-[100]`,children:[(0,K.jsx)(`div`,{className:`absolute inset-0 bg-black/40`,onClick:()=>t(!1),"aria-hidden":!0}),(0,K.jsx)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,"data-testid":`command-palette`,className:`absolute left-1/2 top-[18%] w-[min(560px,calc(100%-2rem))] -translate-x-1/2 overflow-hidden rounded-xl border border-border bg-popover shadow-2xl`,children:(0,K.jsxs)(xm,{className:`flex flex-col`,label:`Search pages`,shouldFilter:!1,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-border px-3`,children:[(0,K.jsx)(We,{className:`size-4 shrink-0 text-muted-foreground`}),(0,K.jsx)(xm.Input,{value:o,onValueChange:c,placeholder:r===`database`?`Search pages (Postgres keyword + similarity)…`:`Search pages…`,className:`h-12 w-full bg-transparent text-sm text-foreground outline-none placeholder:text-muted-foreground`,autoFocus:!0}),d?(0,K.jsx)(ke,{className:`size-4 animate-spin text-muted-foreground`}):(0,K.jsx)(`kbd`,{className:`hidden rounded border border-border px-1.5 py-0.5 text-[10px] text-muted-foreground sm:inline`,children:`ESC`})]}),y&&(0,K.jsx)(`div`,{className:`border-b border-border px-3 py-1.5 text-[11px] text-muted-foreground`,children:g===`postgres`?`Postgres full-text${p?` + pg_trgm similarity`:` + ILIKE fallback`}`:`Local search (sign in to sync for Postgres search)`}),(0,K.jsxs)(xm.List,{className:`max-h-80 overflow-y-auto p-2`,children:[(0,K.jsx)(xm.Group,{heading:`Actions`,className:`[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-[11px] [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wide [&_[cmdk-group-heading]]:text-muted-foreground`,children:(0,K.jsxs)(xm.Item,{value:`new page create`,onSelect:()=>{a(),t(!1)},className:s(`flex cursor-pointer items-center gap-2 rounded-md px-2 py-2 text-sm aria-selected:bg-muted`),children:[(0,K.jsx)(ze,{className:`size-4 text-muted-foreground`}),`New page`]})}),(0,K.jsx)(xm.Group,{heading:y?`Results`:`Pages`,className:`mt-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-[11px] [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:uppercase [&_[cmdk-group-heading]]:tracking-wide [&_[cmdk-group-heading]]:text-muted-foreground`,children:(y?l:v.map(Im)).map(e=>(0,K.jsxs)(xm.Item,{value:`${e.title} ${e.pageId}`,onSelect:()=>{i(e.pageId),window.dispatchEvent(new CustomEvent(`workspace:clear-mount`)),t(!1)},className:`flex cursor-pointer flex-col gap-0.5 rounded-md px-2 py-2 text-sm aria-selected:bg-muted`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`text-base leading-none`,children:e.icon}),(0,K.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-medium`,children:e.title||`Untitled`}),e.favorite&&(0,K.jsx)(Ye,{className:`size-3.5 fill-amber-400 text-amber-500`}),y&&(0,K.jsx)(`span`,{className:`text-[10px] uppercase text-muted-foreground`,children:e.mode}),(0,K.jsx)(pe,{className:`size-3.5 text-muted-foreground`})]}),y&&e.snippet&&(0,K.jsx)(`p`,{className:`line-clamp-2 pl-7 text-xs text-muted-foreground`,children:e.snippet})]},e.pageId))}),y&&l.length===0&&(0,K.jsx)(`p`,{className:`py-8 text-center text-sm text-muted-foreground`,children:d?`Searching…`:`No pages found`})]})]})})]})}function Im(e){return{pageId:e.id,title:e.title,icon:e.icon,parentId:e.parentId,favorite:e.favorite,snippet:``,score:0,mode:`keyword`}}function Lm(){let e=jd(e=>e.mounts),t=jd(e=>e.selection),n=jd(e=>e.setSelection),r=e.find(e=>e.id===t?.mountId),[i,a]=(0,z.useState)([]),[s,c]=(0,z.useState)(``),[l,u]=(0,z.useState)(``),[d,f]=(0,z.useState)([]),[p,m]=(0,z.useState)(``),[h,g]=(0,z.useState)(!1),[_,v]=(0,z.useState)(!1),[y,b]=(0,z.useState)(!1),[x,S]=(0,z.useState)(null),[C,T]=(0,z.useState)(`browse`),E=(0,z.useCallback)(async(e=``)=>{if(r){g(!0),S(null);try{if(r.kind===`server`&&r.serverPath){let t=await Bd({data:{root:r.serverPath,relPath:e}});a(t)}else{let t=await Id(r.id);if(!t)throw Error(`Local folder permission lost — re-link the folder.`);let n=t;if(e)for(let t of e.split(`/`).filter(Boolean))n=await n.getDirectoryHandle(t);let i=await Ld(n,e);a(i.map(t=>({...t,relPath:e?`${e}/${t.name}`:t.name})))}c(e),T(`browse`)}catch(e){S(e instanceof Error?e.message:`Failed to list folder`)}finally{g(!1)}}},[r]),D=(0,z.useCallback)(async e=>{if(r){g(!0),S(null);try{let t=``;if(r.kind===`server`&&r.serverPath)t=(await Vd({data:{root:r.serverPath,relPath:e}})).content;else{let n=await Id(r.id);if(!n)throw Error(`Local folder permission lost — re-link the folder.`);t=await Rd(n,e)}u(t);let i=Of(t,e.split(`/`).pop()||`note`);m(i),f(Df(t.replace(RegExp(`^#\\s+${i}\\s*\\n+`),``))),b(!1),T(`file`),n({mountId:r.id,relPath:e})}catch(e){S(e instanceof Error?e.message:`Failed to read file`)}finally{g(!1)}}},[r,n]);(0,z.useEffect)(()=>{r&&(t?.relPath&&t.relPath.toLowerCase().endsWith(`.md`)?D(t.relPath):E(t?.relPath&&!t.relPath.endsWith(`.md`)?t.relPath:``))},[r?.id]);let O=async()=>{if(!(!r||!t?.relPath)){v(!0),S(null);try{let e=Tf({id:`x`,title:p,icon:`📝`,cover:null,parentId:null,favorite:!1,createdAt:0,updatedAt:0,blocks:d});if(r.kind===`server`&&r.serverPath)await Hd({data:{root:r.serverPath,relPath:t.relPath,content:e}});else{let n=await Id(r.id);if(!n)throw Error(`Local folder permission lost`);await zd(n,t.relPath,e)}u(e),b(!1)}catch(e){S(e instanceof Error?e.message:`Save failed`)}finally{v(!1)}}};if(!r||!t)return(0,K.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-2 p-8 text-center text-muted-foreground`,children:[(0,K.jsx)(we,{className:`size-8 opacity-40`}),(0,K.jsx)(`p`,{className:`text-sm`,children:`Select a linked markdown file from the sidebar.`})]});let k=(C===`file`?t.relPath:s).split(`/`).filter(Boolean);return(0,K.jsxs)(`div`,{className:`mx-auto w-full max-w-3xl px-4 pb-32 pt-6 sm:px-12`,children:[(0,K.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2 text-xs text-muted-foreground`,children:[(0,K.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-border bg-muted/40 px-2 py-0.5 font-medium text-foreground`,children:[(0,K.jsx)(we,{className:`size-3`}),` Linked · not imported`]}),(0,K.jsx)(`button`,{type:`button`,className:`hover:text-foreground`,onClick:()=>void E(``),children:r.name}),k.map((e,t)=>{let n=k.slice(0,t+1).join(`/`),r=t===k.length-1&&C===`file`;return(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{children:`/`}),r?(0,K.jsx)(`span`,{className:`text-foreground`,children:e}):(0,K.jsx)(`button`,{type:`button`,className:`hover:text-foreground`,onClick:()=>{e.toLowerCase().endsWith(`.md`)?D(n):E(n)},children:e})]},n)})]}),x&&(0,K.jsx)(`div`,{className:`mb-4 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-sm text-destructive`,children:x}),h?(0,K.jsxs)(`div`,{className:`flex items-center gap-2 py-12 text-sm text-muted-foreground`,children:[(0,K.jsx)(ke,{className:`size-4 animate-spin`}),` Loading…`]}):C===`browse`?(0,K.jsxs)(`div`,{className:`space-y-1`,children:[s&&(0,K.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm hover:bg-muted`,onClick:()=>{let e=s.split(`/`).slice(0,-1).join(`/`);E(e)},children:[(0,K.jsx)(he,{className:`size-4 text-muted-foreground`}),`..`]}),i.length===0&&(0,K.jsx)(`p`,{className:`py-8 text-center text-sm text-muted-foreground`,children:`No markdown files here`}),i.map(e=>(0,K.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm hover:bg-muted`,onClick:()=>{e.kind===`dir`?E(e.relPath):D(e.relPath)},children:[(0,K.jsx)(`span`,{children:e.kind===`dir`?`📁`:`📝`}),(0,K.jsx)(`span`,{className:`font-medium`,children:e.name})]},e.relPath))]}):(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`input`,{className:`min-w-0 flex-1 bg-transparent text-3xl font-bold tracking-tight outline-none`,value:p,onChange:e=>{m(e.target.value),b(!0)}}),(0,K.jsxs)(w,{type:`button`,size:`sm`,disabled:!y||_,onClick:()=>void O(),children:[_?(0,K.jsx)(ke,{className:`size-3.5 animate-spin`}):(0,K.jsx)(Ue,{className:`size-3.5`}),`Save to disk`]})]}),(0,K.jsxs)(`div`,{className:`relative space-y-0.5 pl-2`,children:[d.map((e,t)=>(0,K.jsxs)(`div`,{className:`rounded-md py-1`,children:[(0,K.jsx)(`textarea`,{className:`w-full resize-y rounded-md border border-transparent bg-transparent px-1 py-1 text-base leading-relaxed outline-none hover:border-border focus:border-border focus:bg-background`,rows:Math.max(1,e.content.split(` -`).length),value:e.content,onChange:t=>{let n=d.map(n=>n.id===e.id?{...n,content:t.target.value}:n);f(n),b(!0)},placeholder:e.type}),(0,K.jsx)(`div`,{className:`px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:e.type})]},e.id)),(0,K.jsx)(w,{type:`button`,size:`sm`,variant:`ghost`,className:`mt-2`,onClick:()=>{f([...d,{id:o(`b`),type:`paragraph`,content:``,indent:0}]),b(!0)},children:`Add block`})]}),(0,K.jsxs)(`p`,{className:`mt-8 text-xs text-muted-foreground`,children:[`Edits write back to the linked file. This page is `,(0,K.jsx)(`strong`,{children:`not`}),` stored in your workspace until you Import.`]})]})]})}var Rm=$({method:`GET`}).middleware([Nm]).handler(p(`e3fb77d67dfdadad5d019581d79338a7f7cf2e42797c44110574e289b39fd293`)),zm=$({method:`POST`}).middleware([Nm]).handler(p(`7bd9976b9723bbefb2399d41723684e8ed7d3bfcf4f814066bb422e47b4bb658`)),Bm=null,Vm=!1,Hm=!1,Um=!1,Wm=!1,Gm=null;function Km(){let e=m.getState();return{name:e.name,theme:e.theme,activePageId:e.activePageId,sidebarOpen:e.sidebarOpen,pages:e.pages}}function qm(){Gm?.(),Gm=m.subscribe((e,t)=>{!Um||!Wm||e.name===t.name&&e.theme===t.theme&&e.activePageId===t.activePageId&&e.sidebarOpen===t.sidebarOpen&&e.pages===t.pages||Ym()})}async function Jm(){try{let e=await Rm();return Wm=!1,m.setState({name:e.name,theme:e.theme,activePageId:e.activePageId,sidebarOpen:e.sidebarOpen,pages:e.pages,hydrated:!0,syncStatus:`saved`,storageMode:`database`}),Um=!0,Wm=!0,qm(),e.source}catch{return Um=!1,Wm=!1,Gm?.(),Gm=null,m.setState({storageMode:`local`,syncStatus:`local`,hydrated:!0}),`error`}}function Ym(){!Um||!Wm||(m.setState({syncStatus:`pending`}),Bm&&clearTimeout(Bm),Bm=setTimeout(()=>{Xm()},600))}async function Xm(){if(Um){if(Vm){Hm=!0;return}Vm=!0,m.setState({syncStatus:`saving`});try{await zm({data:Km()}),m.setState({syncStatus:`saved`})}catch{m.setState({syncStatus:`error`})}finally{Vm=!1,Hm&&(Hm=!1,Ym())}}}async function Zm(){if(Bm&&=(clearTimeout(Bm),null),Um)try{await zm({data:Km()}),m.setState({syncStatus:`saved`})}catch{m.setState({syncStatus:`error`})}}function Qm(){Um=!1,Wm=!1,Gm?.(),Gm=null,m.setState({storageMode:`local`,syncStatus:`local`,hydrated:!0})}function $m(){let e=m(e=>e.pages),t=m(e=>e.activePageId),n=m(e=>e.sidebarOpen),r=m(e=>e.theme),i=m(e=>e.hydrated),o=m(e=>e.storageMode),c=m(e=>e.syncStatus),l=m(e=>e.setSidebarOpen),u=m(e=>e.toggleSidebar),d=m(e=>e.setActivePage),f=m(e=>e.setTheme),p=m(e=>e.updatePage),h=m(e=>e.createPage),g=m(e=>e.setHydrated),_=jd(e=>e.selection),v=jd(e=>e.mounts),y=jd(e=>e.setSelection),b=v.find(e=>e.id===_?.mountId),{user:x,isPending:S}=D(),[C,T]=(0,z.useState)(!1),[E,O]=(0,z.useState)(!1),[k,A]=(0,z.useState)(!1),[j,M]=(0,z.useState)(!1);(0,z.useEffect)(()=>{let e=m.persist.onFinishHydration(()=>{x||g(!0)});return m.persist.hasHydrated()&&!x&&g(!0),e},[g,x]),(0,z.useEffect)(()=>{if(S)return;let e=!1;async function t(){x?(A(!0),await Jm(),e||A(!1)):(Qm(),m.persist.hasHydrated()&&g(!0))}return t(),()=>{e=!0}},[x,S,g]),(0,z.useEffect)(()=>{let e=()=>{o===`database`&&Zm()};return window.addEventListener(`pagehide`,e),()=>window.removeEventListener(`pagehide`,e)},[o]),(0,z.useEffect)(()=>{let e=()=>y(null);return window.addEventListener(`workspace:clear-mount`,e),()=>window.removeEventListener(`workspace:clear-mount`,e)},[y]);let N=!!(_&&b),P=N?void 0:e.find(e=>e.id===t&&!e.archived),F=(()=>{if(!P)return[];let t=[],n=P,r=new Map(e.map(e=>[e.id,e]));for(;n;)t.unshift(n),n=n.parentId?r.get(n.parentId):void 0;return t})();return!i||S||k?(0,K.jsx)(`div`,{className:`flex h-dvh items-center justify-center bg-background text-muted-foreground`,children:(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,K.jsx)(`div`,{className:`size-8 animate-pulse rounded-lg bg-muted`}),(0,K.jsx)(`p`,{className:`text-sm`,children:k?`Loading workspace from database…`:`Loading workspace…`})]})}):(0,K.jsx)(pa,{delayDuration:300,children:(0,K.jsxs)(`div`,{className:`flex h-dvh overflow-hidden bg-background text-foreground`,children:[(0,K.jsx)(`div`,{className:s(`hidden h-full shrink-0 transition-[width,opacity] duration-200 md:block`,n?`w-[260px] opacity-100`:`w-0 overflow-hidden opacity-0`),children:n&&(0,K.jsx)(qf,{onOpenSearch:()=>T(!0)})}),E&&(0,K.jsxs)(`div`,{className:`fixed inset-0 z-50 md:hidden`,children:[(0,K.jsx)(`div`,{className:`absolute inset-0 bg-black/40`,onClick:()=>O(!1),"aria-hidden":!0}),(0,K.jsx)(`div`,{className:`absolute inset-y-0 left-0 w-[min(280px,88vw)] shadow-xl`,children:(0,K.jsx)(qf,{mobile:!0,onOpenSearch:()=>{O(!1),T(!0)},onNavigate:()=>O(!1)})})]}),(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col`,children:[(0,K.jsxs)(`header`,{className:`flex h-11 shrink-0 items-center gap-1 border-b border-border px-2 sm:px-3`,children:[(0,K.jsx)(w,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`md:hidden`,onClick:()=>O(!0),"aria-label":`Open sidebar`,children:(0,K.jsx)(je,{className:`size-4`})}),!n&&(0,K.jsx)(w,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`hidden md:inline-flex`,onClick:u,"aria-label":`Open sidebar`,children:(0,K.jsx)(Le,{className:`size-4`})}),(0,K.jsxs)(`nav`,{className:`flex min-w-0 flex-1 items-center gap-0.5 overflow-hidden text-sm`,children:[N?(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5 px-1.5 text-muted-foreground`,children:[(0,K.jsx)(we,{className:`size-3.5`}),(0,K.jsxs)(`span`,{className:`truncate font-medium text-foreground`,children:[b?.name,_?.relPath?` / ${_.relPath}`:``]})]}):F.map((e,t)=>(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-0.5`,children:[t>0&&(0,K.jsx)(ae,{className:`size-3.5 shrink-0 text-muted-foreground`}),(0,K.jsxs)(`button`,{type:`button`,className:s(`max-w-[140px] truncate rounded px-1.5 py-0.5 transition-colors hover:bg-muted sm:max-w-[200px]`,t===F.length-1?`font-medium text-foreground`:`text-muted-foreground`),onClick:()=>d(e.id),children:[(0,K.jsx)(`span`,{className:`mr-1`,children:e.icon}),e.title||`Untitled`]})]},e.id)),!P&&!N&&(0,K.jsx)(`span`,{className:`px-1.5 text-muted-foreground`,children:`No page selected`})]}),(0,K.jsx)(eh,{mode:o,status:c}),(0,K.jsx)(w,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:()=>f(r===`dark`?`light`:`dark`),"aria-label":r===`dark`?`Switch to light theme`:`Switch to dark theme`,children:r===`dark`?(0,K.jsx)(Xe,{className:`size-4 text-muted-foreground`}):(0,K.jsx)(Fe,{className:`size-4 text-muted-foreground`})}),(P||N)&&(0,K.jsx)(w,{type:`button`,variant:`ghost`,size:`icon-sm`,title:`Import / export markdown`,onClick:()=>M(!0),children:(0,K.jsx)(fe,{className:`size-4 text-muted-foreground`})}),P&&(0,K.jsx)(w,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:()=>p(P.id,{favorite:!P.favorite}),"aria-label":P.favorite?`Unfavorite`:`Favorite`,children:(0,K.jsx)(Ye,{className:s(`size-4`,P.favorite?`fill-amber-400 text-amber-500`:`text-muted-foreground`)})}),(0,K.jsx)(`div`,{className:`ml-1 hidden items-center gap-2 sm:flex`,children:x?(0,K.jsx)(Qu,{}):(0,K.jsx)(w,{type:`button`,size:`sm`,variant:`outline`,asChild:!0,children:(0,K.jsx)(a,{to:`/login`,children:`Sign in to sync`})})})]}),(0,K.jsx)(`main`,{className:`min-h-0 flex-1 overflow-y-auto`,children:N?(0,K.jsx)(Lm,{},`${_.mountId}:${_.relPath}`):P?(0,K.jsx)(Lp,{page:P},P.id):(0,K.jsx)(th,{onCreate:()=>h(),onOpenSidebar:()=>{l(!0),O(!0)}})})]}),(0,K.jsx)(Fm,{open:C,onOpenChange:T}),(0,K.jsx)(zf,{open:j,onOpenChange:M}),(0,K.jsx)(bf,{position:`bottom-right`,theme:r,toastOptions:{className:`border border-border bg-background text-foreground`}})]})})}function eh({mode:e,status:t}){if(e===`local`)return(0,K.jsxs)(`span`,{className:`hidden items-center gap-1 rounded-full border border-border px-2 py-0.5 text-[11px] text-muted-foreground sm:inline-flex`,title:`Guest mode — data stays in this browser`,children:[(0,K.jsx)(W,{className:`size-3`}),`Local only`]});let n=t===`saving`||t===`pending`?`Saving…`:t===`error`?`Sync error`:`Saved to DB`;return(0,K.jsxs)(`span`,{className:s(`hidden items-center gap-1 rounded-full border border-border px-2 py-0.5 text-[11px] sm:inline-flex`,t===`error`?`text-destructive`:`text-muted-foreground`),title:`Signed in — workspace syncs to Postgres`,children:[t===`saving`||t===`pending`?(0,K.jsx)(ke,{className:`size-3 animate-spin`}):(0,K.jsx)(oe,{className:`size-3`}),n]})}function th({onCreate:e,onOpenSidebar:t}){return(0,K.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-4 p-8 text-center`,children:[(0,K.jsx)(`p`,{className:`text-lg font-medium`,children:`No page open`}),(0,K.jsx)(`p`,{className:`max-w-sm text-sm text-muted-foreground`,children:`Create a page, open one from the sidebar, or link a markdown folder without importing.`}),(0,K.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2`,children:[(0,K.jsx)(w,{type:`button`,onClick:e,children:`New page`}),(0,K.jsx)(w,{type:`button`,variant:`outline`,onClick:t,children:`Open sidebar`})]})]})}function nh(){return(0,K.jsx)($m,{})}export{nh as component}; \ No newline at end of file diff --git a/dist-desktop/assets/sankeyDiagram-HTMAVEWB-oWnBtA7E.js b/dist-desktop/assets/sankeyDiagram-HTMAVEWB-oWnBtA7E.js deleted file mode 100644 index ce4503d..0000000 --- a/dist-desktop/assets/sankeyDiagram-HTMAVEWB-oWnBtA7E.js +++ /dev/null @@ -1,40 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-UMNXGZaF.js";import{H as n,J as r,K as i,U as a,a as o,d as s,s as c,v as l,w as u,x as d,y as f}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as p}from"./ordinal-hYBb2elL.js";function m(e){for(var t=e.length/6|0,n=Array(t),r=0;r=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n=i)&&(n=i)}return n}function _(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function v(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}function y(e){return e.target.depth}function b(e){return e.depth}function x(e,t){return t-1-e.height}function S(e,t){return e.sourceLinks.length?e.depth:t-1}function C(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?_(e.sourceLinks,y)-1:0}function w(e){return function(){return e}}function T(e,t){return D(e.source,t.source)||e.index-t.index}function E(e,t){return D(e.target,t.target)||e.index-t.index}function D(e,t){return e.y0-t.y0}function O(e){return e.value}function k(e){return e.index}function A(e){return e.nodes}function j(e){return e.links}function M(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function N({nodes:e}){for(let t of e){let e=t.y0,n=e;for(let n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(let e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function P(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=k,c=S,l,u,d=A,f=j,p=6;function m(){let e={nodes:d.apply(null,arguments),links:f.apply(null,arguments)};return h(e),y(e),b(e),x(e),F(e),N(e),e}m.update=function(e){return N(e),e},m.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:w(e),m):s},m.nodeAlign=function(e){return arguments.length?(c=typeof e==`function`?e:w(e),m):c},m.nodeSort=function(e){return arguments.length?(l=e,m):l},m.nodeWidth=function(e){return arguments.length?(i=+e,m):i},m.nodePadding=function(e){return arguments.length?(a=o=+e,m):a},m.nodes=function(e){return arguments.length?(d=typeof e==`function`?e:w(e),m):d},m.links=function(e){return arguments.length?(f=typeof e==`function`?e:w(e),m):f},m.linkSort=function(e){return arguments.length?(u=e,m):u},m.size=function(i){return arguments.length?(e=t=0,n=+i[0],r=+i[1],m):[n-e,r-t]},m.extent=function(i){return arguments.length?(e=+i[0][0],n=+i[1][0],t=+i[0][1],r=+i[1][1],m):[[e,t],[n,r]]},m.iterations=function(e){return arguments.length?(p=+e,m):p};function h({nodes:e,links:t}){for(let[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];let n=new Map(e.map((t,n)=>[s(t,n,e),t]));for(let[e,r]of t.entries()){r.index=e;let{source:t,target:i}=r;typeof t!=`object`&&(t=r.source=M(n,t)),typeof i!=`object`&&(i=r.target=M(n,i)),t.sourceLinks.push(r),i.targetLinks.push(r)}if(u!=null)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(u),n.sort(u)}function y({nodes:e}){for(let t of e)t.value=t.fixedValue===void 0?Math.max(v(t.sourceLinks,O),v(t.targetLinks,O)):t.fixedValue}function b({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.depth=i;for(let{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function x({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.height=i;for(let{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function C({nodes:t}){let r=g(t,e=>e.depth)+1,a=(n-e-i)/(r-1),o=Array(r);for(let n of t){let t=Math.max(0,Math.min(r-1,Math.floor(c.call(null,n,r))));n.layer=t,n.x0=e+t*a,n.x1=n.x0+i,o[t]?o[t].push(n):o[t]=[n]}if(l)for(let e of o)e.sort(l);return o}function P(e){let n=_(e,e=>(r-t-(e.length-1)*o)/v(e,O));for(let i of e){let e=t;for(let t of i){t.y0=e,t.y1=e+t.value*n,e=t.y1+o;for(let e of t.sourceLinks)e.width=e.value*n}e=(r-e+o)/(i.length+1);for(let t=0;te.length)-1)),P(n);for(let e=0;e0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,V(e)}l===void 0&&i.sort(D),R(i,n)}}function L(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e of i){let n=0,r=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);n+=W(e,t)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,V(e)}l===void 0&&i.sort(D),R(i,n)}}function R(e,n){let i=e.length>>1,a=e[i];B(e,a.y0-o,i-1,n),z(e,a.y1+o,i+1,n),B(e,r,e.length-1,n),z(e,t,0,n)}function z(e,t,n,r){for(;n1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+o}}function B(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-o}}function V({sourceLinks:e,targetLinks:t}){if(u===void 0){for(let{source:{sourceLinks:e}}of t)e.sort(E);for(let{target:{targetLinks:t}}of e)t.sort(T)}}function H(e){if(u===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(E),n.sort(T)}function U(e,t){let n=e.y0-(e.sourceLinks.length-1)*o/2;for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n+=i+o}for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n-=i}return n}function W(e,t){let n=t.y0-(t.targetLinks.length-1)*o/2;for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n+=i+o}for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n-=i}return n}return m}var F=Math.PI,I=2*F,L=1e-6,R=I-L;function z(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function B(){return new z}z.prototype=B.prototype={constructor:z,moveTo:function(e,t){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)},lineTo:function(e,t){this._+=`L`+(this._x1=+e)+`,`+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+=`Q`+ +e+`,`+ +t+`,`+(this._x1=+n)+`,`+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+=`C`+ +e+`,`+ +t+`,`+ +n+`,`+ +r+`,`+(this._x1=+i)+`,`+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(i<0)throw Error(`negative radius: `+i);if(this._x1===null)this._+=`M`+(this._x1=e)+`,`+(this._y1=t);else if(d>L)if(!(Math.abs(u*s-c*l)>L)||!i)this._+=`L`+(this._x1=e)+`,`+(this._y1=t);else{var f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((F-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>L&&(this._+=`L`+(e+y*l)+`,`+(t+y*u)),this._+=`A`+i+`,`+i+`,0,0,`+ +(u*f>l*p)+`,`+(this._x1=e+b*s)+`,`+(this._y1=t+b*c)}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;if(n<0)throw Error(`negative radius: `+n);this._x1===null?this._+=`M`+c+`,`+l:(Math.abs(this._x1-c)>L||Math.abs(this._y1-l)>L)&&(this._+=`L`+c+`,`+l),n&&(d<0&&(d=d%I+I),d>R?this._+=`A`+n+`,`+n+`,0,1,`+u+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+u+`,`+(this._x1=c)+`,`+(this._y1=l):d>L&&(this._+=`A`+n+`,`+n+`,0,`+ +(d>=F)+`,`+u+`,`+(this._x1=e+n*Math.cos(i))+`,`+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)+`h`+ +n+`v`+ +r+`h`+-n+`Z`},toString:function(){return this._}};function V(e){return function(){return e}}function H(e){return e[0]}function U(e){return e[1]}var W=Array.prototype.slice;function G(e){return e.source}function ee(e){return e.target}function te(e){var t=G,n=ee,r=H,i=U,a=null;function o(){var o,s=W.call(arguments),c=t.apply(this,s),l=n.apply(this,s);if(a||=o=B(),e(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),o)return a=null,o+``||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r=typeof e==`function`?e:V(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:V(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function ne(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function re(){return te(ne)}function ie(e){return[e.source.x1,e.y0]}function ae(e){return[e.target.x0,e.y1]}function K(){return re().source(ie).target(ae)}var q=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,9],r=[1,10],i=[1,5,10,12],a={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:`error`,4:`SANKEY`,5:`NEWLINE`,10:`EOF`,11:`field[source]`,12:`COMMA`,13:`field[target]`,14:`field[value]`,18:`DQUOTE`,19:`ESCAPED_TEXT`,20:`NON_ESCAPED_TEXT`},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 7:let e=r.findOrCreateNode(a[s-4].trim().replaceAll(`""`,`"`)),t=r.findOrCreateNode(a[s-2].trim().replaceAll(`""`,`"`)),n=parseFloat(a[s].trim());r.addLink(e,t,n);break;case 8:case 9:case 11:this.$=a[s];break;case 10:this.$=a[s-1];break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:r},{1:[2,6],7:11,10:[1,12]},t(r,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(r,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:r},{15:18,16:7,17:8,18:n,20:r},{18:[1,19]},t(r,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:n,20:r},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};a.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return this.pushState(`csv`),4;case 1:return this.pushState(`csv`),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState(`escaped_text`),18;case 6:return 20;case 7:return this.popState(`escaped_text`),18;case 8:return 19}},`anonymous`),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}})();function o(){this.yy={}}return e(o,`Parser`),o.prototype=a,a.Parser=o,new o})();q.parser=q;var J=q,Y=[],X=[],Z=new Map,oe=e(()=>{Y=[],X=[],Z=new Map,o()},`clear`),se=class{constructor(e,t,n=0){this.source=e,this.target=t,this.value=n}static{e(this,`SankeyLink`)}},ce=e((e,t,n)=>{Y.push(new se(e,t,n))},`addLink`),le=class{constructor(e){this.ID=e}static{e(this,`SankeyNode`)}},ue={nodesMap:Z,getConfig:e(()=>d().sankey,`getConfig`),getNodes:e(()=>X,`getNodes`),getLinks:e(()=>Y,`getLinks`),getGraph:e(()=>({nodes:X.map(e=>({id:e.ID})),links:Y.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),`getGraph`),addLink:ce,findOrCreateNode:e(e=>{e=c.sanitizeText(e,d());let t=Z.get(e);return t===void 0&&(t=new le(e),Z.set(e,t),X.push(t)),t},`findOrCreateNode`),getAccTitle:f,setAccTitle:a,getAccDescription:l,setAccDescription:n,getDiagramTitle:u,setDiagramTitle:i,clear:oe},Q=class t{static{e(this,`Uid`)}static{this.count=0}static next(e){return new t(e+ ++t.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return`url(`+this.href+`)`}},$={left:b,right:x,center:C,justify:S},de=e(e=>{let t=0,n=0;for(let r of e){let e=r.value??0;e>t&&(t=e,n=r.layer??0)}return n},`findCentralNodeLayer`),fe={draw:e(function(n,i,a,o){let{securityLevel:c,sankey:l}=d(),u=s.sankey,f;c===`sandbox`&&(f=t(`#i`+i));let m=t(c===`sandbox`?f.nodes()[0].contentDocument.body:`body`),g=c===`sandbox`?m.select(`[id="${i}"]`):t(`[id="${i}"]`),_=l?.width??u.width,v=l?.height??u.width,y=l?.useMaxWidth??u.useMaxWidth,b=l?.nodeAlignment??u.nodeAlignment,x=l?.prefix??u.prefix,S=l?.suffix??u.suffix,C=l?.showValues??u.showValues,w=l?.nodeWidth??u.nodeWidth??10,T=l?.nodePadding??u.nodePadding??12,E=l?.labelStyle??u.labelStyle??`legacy`,D=l?.nodeColors??{},O=o.db.getGraph(),k=$[b];P().nodeId(e=>e.id).nodeWidth(w).nodePadding(T+(C?15:0)).nodeAlign(k).extent([[0,0],[_,v]])(O);let A=de(O.nodes),j=p(h),M=e(e=>D[e]??j(e),`getNodeColor`);g.append(`g`).attr(`class`,`nodes`).selectAll(`.node`).data(O.nodes).join(`g`).attr(`class`,`node`).attr(`id`,e=>(e.uid=Q.next(`node-`)).id).attr(`transform`,function(e){return`translate(`+e.x0+`,`+e.y0+`)`}).attr(`x`,e=>e.x0).attr(`y`,e=>e.y0).append(`rect`).attr(`height`,e=>e.y1-e.y0).attr(`width`,e=>e.x1-e.x0).attr(`fill`,e=>M(e.id));let N=e(({id:e,value:t})=>C?`${e} -${x}${Math.round(t*100)/100}${S}`:e,`getText`),F=e(e=>E===`outlined`?(e.layer??0)I.selectAll(e?`.${e}`:`text`).data(O.nodes).join(`text`).attr(`class`,e??null).attr(`x`,e=>F(e).x).attr(`y`,e=>(e.y1+e.y0)/2).attr(`dy`,`${C?`0`:`0.35`}em`).attr(`text-anchor`,e=>F(e).anchor).text(N),`appendLabel`);E===`outlined`?(L(`sankey-label-bg`),L(`sankey-label-fg`)):L();let R=g.append(`g`).attr(`class`,`links`).attr(`fill`,`none`).attr(`stroke-opacity`,.5).selectAll(`.link`).data(O.links).join(`g`).attr(`class`,`link`).style(`mix-blend-mode`,`multiply`),z=l?.linkColor??`gradient`;if(z===`gradient`){let e=R.append(`linearGradient`).attr(`id`,e=>(e.uid=Q.next(`linearGradient-`)).id).attr(`gradientUnits`,`userSpaceOnUse`).attr(`x1`,e=>e.source.x1).attr(`x2`,e=>e.target.x0);e.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,e=>M(e.source.id)),e.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,e=>M(e.target.id))}let B;switch(z){case`gradient`:B=e(e=>e.uid,`coloring`);break;case`source`:B=e(e=>M(e.source.id),`coloring`);break;case`target`:B=e(e=>M(e.target.id),`coloring`);break;default:B=z}R.append(`path`).attr(`d`,K()).attr(`stroke`,B).attr(`stroke-width`,e=>Math.max(1,e.width)),r(void 0,g,0,y)},`draw`)},pe=e(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,``).replaceAll(/([\n\r])+/g,` -`).trim(),`prepareTextForParsing`),me=e(e=>`.label { - font-family: ${e.fontFamily}; - } - - .node-labels { - font-family: ${e.fontFamily}; - } - - /* Outlined label style - background stroke for better readability */ - .sankey-label-bg { - stroke: ${e.mainBkg||e.background||`#fff`}; - stroke-width: 4px; - stroke-linejoin: round; - paint-order: stroke; - } - - /* Foreground label text */ - .sankey-label-fg { - fill: ${e.textColor}; - } - - /* Node styling */ - .node rect { - shape-rendering: crispEdges; - } - - /* Link styling */ - .link { - fill: none; - stroke-opacity: 0.5; - mix-blend-mode: multiply; - } -`,`getStyles`),he=J.parse.bind(J);J.parse=e=>he(pe(e));var ge={styles:me,parser:J,db:ue,renderer:fe};export{ge as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/sequenceDiagram-DBY2YBRQ-CUG55-r_.js b/dist-desktop/assets/sequenceDiagram-DBY2YBRQ-CUG55-r_.js deleted file mode 100644 index 0e4ba18..0000000 --- a/dist-desktop/assets/sequenceDiagram-DBY2YBRQ-CUG55-r_.js +++ /dev/null @@ -1,162 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-UMNXGZaF.js";import{A as r,F as i,G as a,H as o,K as s,O as c,U as l,a as u,b as d,c as f,i as p,r as m,s as h,v as g,w as _,x as v,y,z as b}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as x}from"./dist-qx0Iv9vM.js";import{g as S,p as C}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{a as w,c as T,i as E,n as D,r as O,s as k}from"./chunk-32BRIVSS-DWU3ezKg.js";import{t as A}from"./chunk-2Q5K7J3B-C1jixKkw.js";import{n as j,t as M}from"./chunk-ZIRB5QZD-C6fEPe3t.js";var N=x(),P=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[1,2],r=[1,3],i=[1,4],a=[2,4],o=[1,9],s=[1,11],c=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],p=[1,19],m=[1,25],h=[1,26],g=[1,27],_=[1,28],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,34],w=[1,35],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[1,42],j=[1,43],M=[1,44],N=[1,45],P=[1,46],F=[1,47],I=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],ee=[1,74],L=[1,80],R=[1,81],te=[1,82],ne=[1,83],z=[1,84],B=[1,85],V=[1,86],re=[1,87],H=[1,88],U=[1,89],W=[1,90],ie=[1,91],ae=[1,92],oe=[1,93],G=[1,94],se=[1,95],K=[1,96],ce=[1,97],le=[1,98],ue=[1,99],de=[1,100],fe=[1,101],pe=[1,102],me=[1,103],he=[1,104],ge=[1,105],_e=[2,78],ve=[4,5,17,51,53,54],ye=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],be=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],xe=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],Se=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Ce=[5,52],q=[70,71,72,73],J=[1,151],we={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1));break}},`anonymous`),table:[{3:1,4:n,5:r,6:i},{1:[3]},{3:5,4:n,5:r,6:i},{3:6,4:n,5:r,6:i},t([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},t(I,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},t(I,[2,7]),t(I,[2,8]),t(I,[2,9]),t(I,[2,15]),{13:49,51:D,53:O,54:k},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:F},{23:56,73:F},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},t(I,[2,30]),t(I,[2,31]),{33:[1,62]},{35:[1,63]},t(I,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:ee},{23:75,55:76,73:ee},{23:77,73:F},{69:78,72:[1,79],78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:F},{23:111,73:F},{23:112,73:F},{23:113,73:F},t([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],_e),t(I,[2,6]),t(I,[2,16]),t(ve,[2,10],{11:114}),t(I,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},t(I,[2,22]),{5:[1,118]},{5:[1,119]},t(I,[2,25]),t(I,[2,26]),t(I,[2,27]),t(I,[2,28]),t(I,[2,29]),t(I,[2,32]),t(I,[2,33]),t(ye,a,{7:120}),t(ye,a,{7:121}),t(ye,a,{7:122}),t(be,a,{41:123,7:124}),t(xe,a,{43:125,7:126}),t(xe,a,{7:126,43:127}),t(Se,a,{46:128,7:129}),t(ye,a,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},t(Ce,_e,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:F},{69:146,78:L,79:R,80:te,81:ne,82:z,83:B,84:V,85:re,86:H,87:U,88:W,89:ie,90:ae,91:oe,92:G,93:se,94:K,95:ce,96:le,97:ue,98:de,99:fe,100:pe,101:me,102:he,103:ge},t(q,[2,79]),t(q,[2,80]),t(q,[2,81]),t(q,[2,82]),t(q,[2,83]),t(q,[2,84]),t(q,[2,85]),t(q,[2,86]),t(q,[2,87]),t(q,[2,88]),t(q,[2,89]),t(q,[2,90]),t(q,[2,91]),t(q,[2,92]),t(q,[2,93]),t(q,[2,94]),t(q,[2,95]),t(q,[2,96]),t(q,[2,97]),t(q,[2,98]),t(q,[2,99]),t(q,[2,100]),t(q,[2,101]),t(q,[2,102]),t(q,[2,103]),t(q,[2,104]),{23:147,73:F},{23:149,60:148,73:F},{73:[2,68]},{73:[2,69]},{58:150,104:J},{58:152,104:J},{58:153,104:J},{58:154,104:J},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:D,53:O,54:k},{5:[1,160]},t(I,[2,20]),t(I,[2,21]),t(I,[2,23]),t(I,[2,24]),{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,164]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,50:[1,165],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,166]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,49:[1,167],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{17:[1,168]},{17:[1,169]},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,48:[1,170],51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{4:o,5:s,8:8,9:10,10:c,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:p,25:20,26:21,27:22,28:23,29:24,30:m,31:h,32:g,34:_,36:v,37:y,38:b,39:x,40:S,42:C,44:w,45:T,47:E,51:D,53:O,54:k,56:A,61:j,62:M,63:N,64:P,73:F},{16:[1,172]},t(I,[2,50]),{16:[1,173]},t(I,[2,55]),t(Ce,[2,76]),{76:[1,174]},{16:[1,175]},t(I,[2,52]),{16:[1,176]},t(I,[2,57]),t(I,[2,53]),{23:177,73:F},{23:178,73:F},{23:179,73:F},{58:180,104:J},{23:181,72:[1,182],73:F},{58:183,104:J},{58:184,104:J},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},t(I,[2,17]),t(ve,[2,11]),{13:186,51:D,53:O,54:k},t(ve,[2,13]),t(ve,[2,14]),t(I,[2,19]),t(I,[2,35]),t(I,[2,36]),t(I,[2,37]),t(I,[2,38]),{16:[1,187]},t(I,[2,39]),{16:[1,188]},t(I,[2,40]),t(I,[2,41]),{16:[1,189]},t(I,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:J},{58:196,104:J},{58:197,104:J},{5:[2,75]},{58:198,104:J},{23:199,73:F},{5:[2,58]},{5:[2,59]},{23:200,73:F},t(ve,[2,12]),t(be,a,{7:124,41:201}),t(xe,a,{7:126,43:202}),t(Se,a,{7:129,46:203}),t(I,[2,49]),t(I,[2,54]),t(Ce,[2,77]),t(I,[2,51]),t(I,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:J},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};we.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin(`CONFIG`),75;case 8:return 76;case 9:return this.popState(),this.begin(`ALIAS`),77;case 10:return this.popState(),this.popState(),77;case 11:return t.yytext=t.yytext.trim(),73;case 12:return t.yytext=t.yytext.trim(),this.begin(`ALIAS`),73;case 13:return t.yytext=t.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return t.yytext=t.yytext.trim(),this.popState(),10;case 16:return this.begin(`LINE`),15;case 17:return this.begin(`ID`),51;case 18:return this.begin(`ID`),53;case 19:return 14;case 20:return this.begin(`ID`),54;case 21:return this.popState(),this.popState(),this.begin(`LINE`),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin(`LINE`),37;case 24:return this.begin(`LINE`),38;case 25:return this.begin(`LINE`),39;case 26:return this.begin(`LINE`),40;case 27:return this.begin(`LINE`),50;case 28:return this.begin(`LINE`),42;case 29:return this.begin(`LINE`),44;case 30:return this.begin(`LINE`),49;case 31:return this.begin(`LINE`),45;case 32:return this.begin(`LINE`),48;case 33:return this.begin(`LINE`),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin(`ID`),22;case 45:return this.begin(`ID`),24;case 46:return 30;case 47:return 31;case 48:return this.begin(`acc_title`),32;case 49:return this.popState(),`acc_title_value`;case 50:return this.begin(`acc_descr`),34;case 51:return this.popState(),`acc_descr_value`;case 52:this.begin(`acc_descr_multiline`);break;case 53:this.popState();break;case 54:return`acc_descr_multiline_value`;case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return t.yytext=t.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},`anonymous`),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/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,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}}})();function Te(){this.yy={}}return e(Te,`Parser`),Te.prototype=we,we.Parser=Te,new Te})();P.parser=P;var F=P,I={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},ee={FILLED:0,OPEN:1},L={LEFTOF:0,RIGHTOF:1,OVER:2},R={ACTOR:`actor`,BOUNDARY:`boundary`,COLLECTIONS:`collections`,CONTROL:`control`,DATABASE:`database`,ENTITY:`entity`,PARTICIPANT:`participant`,QUEUE:`queue`},te=class{constructor(){this.state=new A(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=l,this.setAccDescription=o,this.setDiagramTitle=s,this.getAccTitle=y,this.getAccDescription=g,this.getDiagramTitle=_,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(v().wrap),this.LINETYPE=I,this.ARROWTYPE=ee,this.PLACEMENT=L}static{e(this,`SequenceDB`)}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,n,r,i){let a=this.state.records.currentBox,o;if(i!==void 0){let e;e=i.includes(` -`)?i+` -`:`{ -`+i+` -}`,o=j(e,{schema:M})}r=o?.type??r,o?.alias&&(!n||n.text===t)&&(n={text:o.alias,wrap:n?.wrap,type:r});let s=this.state.records.actors.get(e);if(s){if(this.state.records.currentBox&&s.box&&this.state.records.currentBox!==s.box)throw Error(`A same participant should only be defined in one Box: ${s.name} can't be in '${s.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=s.box?s.box:this.state.records.currentBox,s.box=a,s&&t===s.name&&n==null)return}if(n?.text??(n={text:t,type:r}),(r==null||n.text==null)&&(n={text:t,type:r}),this.state.records.actors.set(e,{box:a,name:t,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??`participant`}),this.state.records.prevActor){let t=this.state.records.actors.get(this.state.records.prevActor);t&&(t.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,n=0;if(!e)return 0;for(t=0;t>-`,token:`->>-`,line:`1`,loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[`'ACTIVE_PARTICIPANT'`]},t}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:n?.text??``,wrap:n?.wrap??this.autoWrap(),type:r,activate:i,centralConnection:a??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();let t=/^:?wrap:/.exec(e)!==null||/^:?nowrap:/.exec(e)===null&&void 0;return{cleanedText:(t===void 0?e:e.replace(/^:?(?:no)?wrap:/,``)).trim(),wrap:t}}autoWrap(){return this.state.records.wrapEnabled===void 0?v().sequence?.wrap??!1:this.state.records.wrapEnabled}clear(){this.state.reset(),u()}parseMessage(e){let n=e.trim(),{wrap:r,cleanedText:i}=this.extractWrap(n),a={text:i,wrap:r};return t.debug(`parseMessage: ${JSON.stringify(a)}`),a}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),n=t?.[1]?t[1].trim():`transparent`,r=t?.[2]?t[2].trim():void 0;if(window?.CSS)window.CSS.supports(`color`,n)||(n=`transparent`,r=e.trim());else{let t=new Option().style;t.color=n,t.color!==n&&(n=`transparent`,r=e.trim())}let{wrap:i,cleanedText:a}=this.extractWrap(r);return{text:a?b(a,v()):void 0,color:n,wrap:i}}addNote(e,t,n){let r={actor:e,placement:t,message:n.text,wrap:n.wrap??this.autoWrap()},i=[].concat(e,e);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(e,n){let r=this.getActor(e);try{let e=b(n.text,v());e=e.replace(/=/g,`=`),e=e.replace(/&/g,`&`);let t=JSON.parse(e);this.insertLinks(r,t)}catch(e){t.error(`error while parsing actor link text`,e)}}addALink(e,n){let r=this.getActor(e);try{let e={},t=b(n.text,v()),i=t.indexOf(`@`);t=t.replace(/=/g,`=`),t=t.replace(/&/g,`&`);let a=t.slice(0,i-1).trim();e[a]=t.slice(i+1).trim(),this.insertLinks(r,e)}catch(e){t.error(`error while parsing actor link text`,e)}}insertLinks(e,t){if(e.links==null)e.links=t;else for(let n in t)e.links[n]=t[n]}addProperties(e,n){let r=this.getActor(e);try{let e=b(n.text,v()),t=JSON.parse(e);this.insertProperties(r,t)}catch(e){t.error(`error while parsing actor properties text`,e)}}insertProperties(e,t){if(e.properties==null)e.properties=t;else for(let n in t)e.properties[n]=t[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,n){let r=this.getActor(e),i=document.getElementById(n.text);try{let e=i.innerHTML,t=JSON.parse(e);t.properties&&this.insertProperties(r,t.properties),t.links&&this.insertLinks(r,t.links)}catch(e){t.error(`error while parsing actor details text`,e)}}getActorProperty(e,t){if(e?.properties!==void 0)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(e=>{this.apply(e)});else switch(e.type){case`sequenceIndex`:this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case`addParticipant`:this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case`createParticipant`:if(this.state.records.actors.has(e.actor))throw Error(`It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior`);this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case`destroyParticipant`:this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case`activeStart`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`centralConnection`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`centralConnectionReverse`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`activeEnd`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`addNote`:this.addNote(e.actor,e.placement,e.text);break;case`addLinks`:this.addLinks(e.actor,e.text);break;case`addALink`:this.addALink(e.actor,e.text);break;case`addProperties`:this.addProperties(e.actor,e.text);break;case`addDetails`:this.addDetails(e.actor,e.text);break;case`addMessage`:if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw Error(`The created participant `+this.state.records.lastCreated.name+` does not have an associated creating message after its declaration. Please check the sequence diagram.`);this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw Error(`The destroyed participant `+this.state.records.lastDestroyed.name+` does not have an associated destroying message after its declaration. Please check the sequence diagram.`);this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case`boxStart`:this.addBox(e.boxData);break;case`boxEnd`:this.boxEnd();break;case`loopStart`:this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case`loopEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`rectStart`:this.addSignal(void 0,void 0,e.color,e.signalType);break;case`rectEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`optStart`:this.addSignal(void 0,void 0,e.optText,e.signalType);break;case`optEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`altStart`:this.addSignal(void 0,void 0,e.altText,e.signalType);break;case`else`:this.addSignal(void 0,void 0,e.altText,e.signalType);break;case`altEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`setAccTitle`:l(e.text);break;case`parStart`:this.addSignal(void 0,void 0,e.parText,e.signalType);break;case`and`:this.addSignal(void 0,void 0,e.parText,e.signalType);break;case`parEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`criticalStart`:this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case`option`:this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case`criticalEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`breakStart`:this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case`breakEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break}}getConfig(){return v().sequence}},ne=e(e=>{let t=e.dropShadow??`none`,{look:n}=v();return`.actor { - stroke: ${e.actorBorder}; - fill: ${e.actorBkg}; - stroke-width: ${e.strokeWidth??1}; - } - - rect.actor.outer-path[data-look="neo"] { - filter: ${t}; - } - - rect.note[data-look="neo"] { - stroke:${e.noteBorderColor}; - fill:${e.noteBkgColor}; - filter: ${t}; - } - - text.actor > tspan { - fill: ${e.actorTextColor}; - stroke: none; - } - - .actor-line { - stroke: ${e.actorLineColor}; - } - - .innerArc { - stroke-width: 1.5; - stroke-dasharray: none; - } - - .messageLine0 { - stroke-width: 1.5; - stroke-dasharray: none; - stroke: ${e.signalColor}; - } - - .messageLine1 { - stroke-width: 1.5; - stroke-dasharray: 2, 2; - stroke: ${e.signalColor}; - } - - [id$="-arrowhead"] path { - fill: ${e.signalColor}; - stroke: ${e.signalColor}; - } - - .sequenceNumber { - fill: ${e.sequenceNumberColor}; - } - - [id$="-sequencenumber"] { - fill: ${e.signalColor}; - } - - [id$="-crosshead"] path { - fill: ${e.signalColor}; - stroke: ${e.signalColor}; - } - - .messageText { - fill: ${e.signalTextColor}; - stroke: none; - } - - .labelBox { - stroke: ${e.labelBoxBorderColor}; - fill: ${e.labelBoxBkgColor}; - filter: ${n===`neo`?t:`none`}; - } - - .labelText, .labelText > tspan { - fill: ${e.labelTextColor}; - stroke: none; - } - - .loopText, .loopText > tspan { - fill: ${e.loopTextColor}; - stroke: none; - } - - .sectionTitle, .sectionTitle > tspan { - fill: ${e.loopTextColor}; - stroke: none; - } - - .loopLine { - stroke-width: 2px; - stroke-dasharray: 2, 2; - stroke: ${e.labelBoxBorderColor}; - fill: ${e.labelBoxBorderColor}; - } - - .note { - //stroke: #decc93; - stroke: ${e.noteBorderColor}; - fill: ${e.noteBkgColor}; - } - - .noteText, .noteText > tspan { - fill: ${e.noteTextColor}; - stroke: none; - ${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:``} - } - - .activation0 { - fill: ${e.activationBkgColor}; - stroke: ${e.activationBorderColor}; - } - - .activation1 { - fill: ${e.activationBkgColor}; - stroke: ${e.activationBorderColor}; - } - - .activation2 { - fill: ${e.activationBkgColor}; - stroke: ${e.activationBorderColor}; - } - - .actorPopupMenu { - position: absolute; - } - - .actorPopupMenuPanel { - position: absolute; - fill: ${e.actorBkg}; - box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); - filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); -} - .actor-man circle, line { - fill: ${e.actorBkg}; - stroke-width: 2px; - } - - g rect.rect { - filter: ${t}; - stroke: ${e.nodeBorder}; - } -`},`getStyles`),z=36,B=`actor-top`,V=`actor-bottom`,re=`actor-box`,H=`actor-man`,U=new Set([`redux-color`,`redux-dark-color`]),W=e(function(e,t){let n=w(e,t);return d().look===`neo`&&n.attr(`data-look`,`neo`),n},`drawRect`),ie=e(function(e,t,n,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let a=t.links,o=t.actorCnt,s=t.rectData;var c=`none`;i&&(c=`block !important`);let l=e.append(`g`);l.attr(`id`,`actor`+o+`_popup`),l.attr(`class`,`actorPopupMenu`),l.attr(`display`,c);var u=``;s.class!==void 0&&(u=` `+s.class);let d=s.width>n?s.width:n,f=l.append(`rect`);if(f.attr(`class`,`actorPopupMenuPanel`+u),f.attr(`x`,s.x),f.attr(`y`,s.height),f.attr(`fill`,s.fill),f.attr(`stroke`,s.stroke),f.attr(`width`,d),f.attr(`height`,s.height),f.attr(`rx`,s.rx),f.attr(`ry`,s.ry),a!=null){var p=20;for(let e in a){var m=l.append(`a`),h=(0,N.sanitizeUrl)(a[e]);m.attr(`xlink:href`,h),m.attr(`target`,`_blank`),je(r)(e,m,s.x+10,s.height+p,d,20,{class:`actor`},r),p+=30}}return f.attr(`height`,p),{height:s.height+p,width:d}},`drawPopup`),ae=e(function(e){return`var pu = document.getElementById('`+e+`'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }`},`popupMenuToggle`),oe=e(async function(e,t,n=null){let r=e.append(`foreignObject`),a=await i(t.text,d()),o=r.append(`xhtml:div`).attr(`style`,`width: fit-content;`).attr(`xmlns`,`http://www.w3.org/1999/xhtml`).html(a).node().getBoundingClientRect();if(r.attr(`height`,Math.round(o.height)).attr(`width`,Math.round(o.width)),t.class===`noteText`){let n=e.node().firstChild;n.setAttribute(`height`,o.height+2*t.textMargin);let i=n.getBBox();r.attr(`x`,Math.round(i.x+i.width/2-o.width/2)).attr(`y`,Math.round(i.y+i.height/2-o.height/2))}else if(n){let{startx:e,stopx:i,starty:a}=n;if(e>i){let t=e;e=i,i=t}r.attr(`x`,Math.round(e+Math.abs(e-i)/2-o.width/2)),t.class===`loopText`?r.attr(`y`,Math.round(a)):r.attr(`y`,Math.round(a-o.height))}return[r]},`drawKatex`),G=e(function(t,n){let r=0,i=0,a=n.text.split(h.lineBreakRegex),[o,s]=C(n.fontSize),c=[],l=0,u=e(()=>n.y,`yfunc`);if(n.valign!==void 0&&n.textMargin!==void 0&&n.textMargin>0)switch(n.valign){case`top`:case`start`:u=e(()=>Math.round(n.y+n.textMargin),`yfunc`);break;case`middle`:case`center`:u=e(()=>Math.round(n.y+(r+i+n.textMargin)/2),`yfunc`);break;case`bottom`:case`end`:u=e(()=>Math.round(n.y+(r+i+2*n.textMargin)-n.textMargin),`yfunc`);break}if(n.anchor!==void 0&&n.textMargin!==void 0&&n.width!==void 0)switch(n.anchor){case`left`:case`start`:n.x=Math.round(n.x+n.textMargin),n.anchor=`start`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break;case`middle`:case`center`:n.x=Math.round(n.x+n.width/2),n.anchor=`middle`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break;case`right`:case`end`:n.x=Math.round(n.x+n.width-n.textMargin),n.anchor=`end`,n.dominantBaseline=`middle`,n.alignmentBaseline=`middle`;break}for(let[e,d]of a.entries()){n.textMargin!==void 0&&n.textMargin===0&&o!==void 0&&(l=e*o);let a=t.append(`text`);a.attr(`x`,n.x),a.attr(`y`,u()),n.anchor!==void 0&&a.attr(`text-anchor`,n.anchor).attr(`dominant-baseline`,n.dominantBaseline).attr(`alignment-baseline`,n.alignmentBaseline),n.fontFamily!==void 0&&a.style(`font-family`,n.fontFamily),s!==void 0&&a.style(`font-size`,s),n.fontWeight!==void 0&&a.style(`font-weight`,n.fontWeight),n.fill!==void 0&&a.attr(`fill`,n.fill),n.class!==void 0&&a.attr(`class`,n.class),n.dy===void 0?l!==0&&a.attr(`dy`,l):a.attr(`dy`,n.dy);let f=d||`​`;if(n.tspan){let e=a.append(`tspan`);e.attr(`x`,n.x),n.fill!==void 0&&e.attr(`fill`,n.fill),e.text(f)}else a.text(f);n.valign!==void 0&&n.textMargin!==void 0&&n.textMargin>0&&(i+=(a._groups||a)[0][0].getBBox().height,r=i),c.push(a)}return c},`drawText`),se=e(function(t,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}e(r,`genPoints`);let i=t.append(`polygon`);return i.attr(`points`,r(n.x,n.y,n.width,n.height,7)),i.attr(`class`,`labelBox`),n.y+=n.height/2,G(t,n),i},`drawLabel`),K=-1,ce=e((e,t,n,r)=>{e.select&&n.forEach(n=>{let i=t.get(n),a=e.select(`#actor`+i.actorCnt);!r.mirrorActors&&i.stopy?a.attr(`y2`,i.stopy+i.height/2):r.mirrorActors&&a.attr(`y2`,i.stopy)})},`fixLifeLineHeights`),le=e(function(e,t,n,i,a){let o=i?t.stopy:t.starty,s=t.x+t.width/2,c=o+t.height,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower();var h=m;i||(K++,Object.keys(t.links||{}).length&&!n.forceMenus&&h.attr(`onclick`,ae(`actor${K}_popup`)).attr(`cursor`,`pointer`),h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),h=m.append(`g`),t.actorCnt=K,t.links!=null&&h.attr(`id`,`root-`+K),l===`neo`&&h.attr(`data-look`,`neo`));let g=k();var _=`actor`;t.properties?.class?_=t.properties.class:g.fill=`#eaeaea`,i?_+=` ${V}`:_+=` ${B}`,g.x=t.x,g.y=o,g.width=t.width,g.height=t.height,g.class=_,g.rx=3,g.ry=3,g.name=t.name,l===`neo`&&(g.rx=6,g.ry=6);let v=W(h,g),y=a.get(t.name)??0;if(U.has(u)&&(v.style(`stroke`,p[y%p.length]),v.style(`fill`,f[y%p.length])),l===`neo`&&v.attr(`filter`,`url(#drop-shadow)`),t.rectData=g,t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?O(h,g.x+g.width-20,g.y+10,e.substr(1)):E(h,g.x+g.width-20,g.y+10,e)}i||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`participant`),h.attr(`data-id`,t.name)),Y(n,r(t.description))(t.description,h,g.x,g.y,g.width,g.height,{class:`actor ${re}`},n);let b=t.height;if(v.node){let e=v.node().getBBox();t.height=e.height,b=e.height}return b},`drawActorTypeParticipant`),ue=e(function(e,t,n,i,a){let o=i?t.stopy:t.starty,s=t.x+t.width/2,c=o+t.height,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower();var h=m;i||(K++,Object.keys(t.links||{}).length&&!n.forceMenus&&h.attr(`onclick`,ae(`actor${K}_popup`)).attr(`cursor`,`pointer`),h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),h=m.append(`g`),t.actorCnt=K,t.links!=null&&h.attr(`id`,`root-`+K),l===`neo`&&h.attr(`data-look`,`neo`));let g=k();var _=`actor`;t.properties?.class?_=t.properties.class:g.fill=`#eaeaea`,i?_+=` ${V}`:_+=` ${B}`,g.x=t.x,g.y=o,g.width=t.width,g.height=t.height,g.class=_,g.name=t.name;let v={...g,x:g.x+-6,y:g.y+6,class:`actor`},y=W(h,g),b=W(h,v);t.rectData=g,l===`neo`&&h.attr(`filter`,`url(#drop-shadow)`);let x=a.get(t.name)??0;if(U.has(u)&&(y.style(`stroke`,p[x%p.length]),y.style(`fill`,f[x%p.length]),b.style(`stroke`,p[x%p.length]),b.style(`fill`,f[x%p.length])),t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?O(h,g.x+g.width-20,g.y+10,e.substr(1)):E(h,g.x+g.width-20,g.y+10,e)}Y(n,r(t.description))(t.description,h,g.x-6,g.y+6,g.width,g.height,{class:`actor ${re}`},n);let S=t.height;if(y.node){let e=y.node().getBBox();t.height=e.height,S=e.height}return i||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`collections`),h.attr(`data-id`,t.name)),S},`drawActorTypeCollections`),de=e(function(e,t,n,i,a){let o=i?t.stopy:t.starty,s=t.x+t.width/2,c=o+t.height,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower(),h=m;i||(K++,Object.keys(t.links||{}).length&&!n.forceMenus&&h.attr(`onclick`,ae(`actor${K}_popup`)).attr(`cursor`,`pointer`),h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),h=m.append(`g`),t.actorCnt=K,t.links!=null&&h.attr(`id`,`root-`+K),l===`neo`&&h.attr(`data-look`,`neo`));let g=k(),_=`actor`;t.properties?.class?_=t.properties.class:g.fill=`#eaeaea`,i?_+=` ${V}`:_+=` ${B}`,h.attr(`class`,_),g.x=t.x,g.y=o,g.width=t.width,g.height=t.height,g.name=t.name;let v=g.height/2,y=v/(2.5+g.height/50),b=h.append(`g`),x=h.append(`g`),S=`M ${g.x},${g.y+v} - a ${y},${v} 0 0 0 0,${g.height} - h ${g.width-2*y} - a ${y},${v} 0 0 0 0,-${g.height} - Z - `;b.append(`path`).attr(`d`,S),x.append(`path`).attr(`d`,`M ${g.x},${g.y+v} - a ${y},${v} 0 0 0 0,${g.height}`),b.attr(`transform`,`translate(${y}, ${-(g.height/2)})`),x.attr(`transform`,`translate(${g.width-y}, ${-g.height/2})`),t.rectData=g,l===`neo`&&b.attr(`filter`,`url(#drop-shadow)`);let C=a.get(t.name)??0;if(U.has(u)&&(b.style(`stroke`,p[C%p.length]),b.style(`fill`,f[C%p.length]),x.style(`stroke`,p[C%p.length]),x.style(`fill`,f[C%p.length])),t.properties?.icon){let e=t.properties.icon.trim(),n=g.x+g.width-20,r=g.y+10;e.charAt(0)===`@`?O(h,n,r,e.substr(1)):E(h,n,r,e)}Y(n,r(t.description))(t.description,h,g.x,g.y,g.width,g.height,{class:`actor ${re}`},n);let w=t.height,T=b.select(`path:last-child`);if(T.node()){let e=T.node().getBBox();t.height=e.height,w=e.height}return i||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`queue`),h.attr(`data-id`,t.name)),w},`drawActorTypeQueue`),fe=e(function(e,t,n,i,a,o){let s=i?t.stopy:t.starty,c=t.x+t.width/2,l=s+75,{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m,actorBorder:h,actorBkg:g}=f,_=e.append(`g`).lower();i||(K++,_.append(`line`).attr(`id`,`actor`+K).attr(`x1`,c).attr(`y1`,l).attr(`x2`,c).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let v=e.append(`g`),y=H;i?y+=` ${V}`:y+=` ${B}`,v.attr(`class`,y),v.attr(`name`,t.name);let b=k();b.x=t.x,b.y=s,b.fill=`#eaeaea`,b.width=t.width,b.height=t.height,b.class=`actor`;let x=t.x+t.width/2,S=s+32;v.append(`defs`).append(`marker`).attr(`id`,a+`-filled-head-control`).attr(`refX`,11).attr(`refY`,5.8).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`172.5`).attr(`stroke-width`,1.2).append(`path`).attr(`d`,`M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z`),v.append(`circle`).attr(`cx`,x).attr(`cy`,S).attr(`r`,22).attr(`filter`,`${u===`neo`?`url(#drop-shadow)`:``}`),v.append(`line`).attr(`marker-end`,`url(#`+a+`-filled-head-control)`).attr(`transform`,`translate(${x}, ${S-22})`);let C=o.get(t.name)??0;return U.has(d)?(v.style(`stroke`,m[C%m.length]),v.style(`fill`,p[C%m.length])):(v.style(`stroke`,h),v.style(`fill`,g)),t.height=v.node().getBBox().height+2*(n?.sequence?.labelBoxHeight??0),Y(n,r(t.description))(t.description,v,b.x,b.y+22+(i?5:12),b.width,b.height,{class:`actor ${H}`},n),i||(v.attr(`data-et`,`participant`),v.attr(`data-type`,`control`),v.attr(`data-id`,t.name)),t.height},`drawActorTypeControl`),pe=e(function(e,t,n,i,a){let o=i?t.stopy:t.starty,s=t.x+t.width/2,c=o+75,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower(),h=e.append(`g`),g=`actor`;i?g+=` ${V}`:g+=` ${B}`,h.attr(`class`,g),h.attr(`name`,t.name);let _=k();_.x=t.x,_.y=o,_.fill=`#eaeaea`,_.width=t.width,_.height=t.height,_.class=`actor`;let v=t.x+t.width/2,y=o+(i?10:25);h.append(`circle`).attr(`cx`,v).attr(`cy`,y).attr(`r`,22).attr(`width`,t.width).attr(`height`,t.height),h.append(`line`).attr(`x1`,v-22).attr(`x2`,v+22).attr(`y1`,y+22).attr(`y2`,y+22).attr(`stroke-width`,2),l===`neo`&&h.attr(`filter`,`url(#drop-shadow)`);let b=a.get(t.name)??0;return U.has(u)&&(h.style(`stroke`,p[b%p.length]),h.style(`fill`,f[b%p.length])),t.height=h.node().getBBox().height+(n?.sequence?.labelBoxHeight??0),i||(K++,m.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K),Y(n,r(t.description))(t.description,h,_.x,_.y+(i?15:30),_.width,_.height,{class:`actor ${H}`},n),i?h.attr(`transform`,`translate(0, 22)`):(h.attr(`transform`,`translate(0, ${22/2-5})`),h.attr(`data-et`,`participant`),h.attr(`data-type`,`entity`),h.attr(`data-id`,t.name)),t.height},`drawActorTypeEntity`),me=e(function(e,t,n,i,a){let o=i?t.stopy:t.starty,s=t.x+t.width/2,c=o+t.height+2*n.boxTextMargin,{theme:l,themeVariables:u,look:d}=n,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=u,h=e.append(`g`).lower(),g=h;i||(K++,Object.keys(t.links||{}).length&&!n.forceMenus&&g.attr(`onclick`,ae(`actor${K}_popup`)).attr(`cursor`,`pointer`),g.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),g=h.append(`g`),t.actorCnt=K,t.links!=null&&g.attr(`id`,`root-`+K),d===`neo`&&g.attr(`data-look`,`neo`));let _=k(),v=`actor`;t.properties?.class?v=t.properties.class:_.fill=`#eaeaea`,i?v+=` ${V}`:v+=` ${B}`,_.x=t.x,_.y=o,_.width=t.width,_.height=t.height,_.class=v,_.name=t.name,_.x=t.x,_.y=o;let y=_.width/3,b=_.width/3,x=y/2,S=x/(2.5+y/50),C=g.append(`g`);C.attr(`class`,v);let w=` - M ${_.x},${_.y+S} - a ${x},${S} 0 0 0 ${y},0 - a ${x},${S} 0 0 0 -${y},0 - l 0,${b-2*S} - a ${x},${S} 0 0 0 ${y},0 - l 0,-${b-2*S} -`;C.append(`path`).attr(`d`,w),d===`neo`&&C.attr(`filter`,`url(#drop-shadow)`);let T=a.get(t.name)??0;U.has(l)?(C.style(`stroke`,p[T%p.length]),C.style(`fill`,f[T%p.length])):C.style(`stroke`,m),C.attr(`transform`,`translate(${y}, ${S})`),t.rectData=_,Y(n,r(t.description))(t.description,g,_.x,_.y+35,_.width,_.height,{class:`actor ${re}`},n);let E=C.select(`path:last-child`);return E.node()&&(t.height=E.node().getBBox().height+(n.sequence.labelBoxHeight??0)),i||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`database`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeDatabase`),he=e(function(e,t,n,i,a){let o=i?t.stopy:t.starty,s=t.x+t.width/2,c=o+80,l=e.append(`g`).lower(),{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m,actorBorder:h}=f;i||(K++,l.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let g=e.append(`g`),_=H;i?_+=` ${V}`:_+=` ${B}`,g.attr(`class`,_),g.attr(`name`,t.name);let v=k();v.x=t.x,v.y=o,v.fill=`#eaeaea`,v.width=t.width,v.height=t.height,v.class=`actor`,g.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,t.x+t.width/2-22*2.5).attr(`y1`,o+12).attr(`x2`,t.x+t.width/2-15).attr(`y2`,o+12),g.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,t.x+t.width/2-22*2.5).attr(`y1`,o+2).attr(`x2`,t.x+t.width/2-22*2.5).attr(`y2`,o+22),g.append(`circle`).attr(`cx`,t.x+t.width/2).attr(`cy`,o+12).attr(`r`,22),u===`neo`&&g.attr(`filter`,`url(#drop-shadow)`);let y=a.get(t.name)??0;return U.has(d)?(g.style(`stroke`,m[y%m.length]),g.style(`fill`,p[y%m.length])):g.style(`stroke`,h),t.height=g.node().getBBox().height+(n.sequence.labelBoxHeight??0),Y(n,r(t.description))(t.description,g,v.x,v.y+15,v.width,v.height,{class:`actor ${H}`},n),g.attr(`transform`,`translate(0,21)`),i||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`boundary`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeBoundary`),ge=e(function(e,t,n,i,a){let o=i?t.stopy:t.starty,s=t.x+t.width/2,c=o+80,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=d,h=e.append(`g`).lower();i||(K++,h.append(`line`).attr(`id`,`actor`+K).attr(`x1`,s).attr(`y1`,c).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=K);let g=e.append(`g`),_=H;i?_+=` ${V}`:_+=` ${B}`,g.attr(`class`,_),g.attr(`name`,t.name),i||g.attr(`data-et`,`participant`).attr(`data-type`,`actor`).attr(`data-id`,t.name);let v=l===`neo`?.5:1,y=l===`neo`?o+(1-v)*30:o;g.append(`line`).attr(`id`,`actor-man-torso`+K).attr(`x1`,s).attr(`y1`,y+25*v).attr(`x2`,s).attr(`y2`,y+45*v),g.append(`line`).attr(`id`,`actor-man-arms`+K).attr(`x1`,s-z/2*v).attr(`y1`,y+33*v).attr(`x2`,s+z/2*v).attr(`y2`,y+33*v),g.append(`line`).attr(`x1`,s-z/2*v).attr(`y1`,y+60*v).attr(`x2`,s).attr(`y2`,y+45*v),g.append(`line`).attr(`x1`,s).attr(`y1`,y+45*v).attr(`x2`,s+(z/2-2)*v).attr(`y2`,y+60*v);let b=g.append(`circle`);b.attr(`cx`,t.x+t.width/2),b.attr(`cy`,y+10*v),b.attr(`r`,15*v),b.attr(`width`,t.width*v),b.attr(`height`,t.height*v),t.height=g.node().getBBox().height;let x=k();x.x=t.x,x.y=y,x.fill=`#eaeaea`,x.width=t.width,x.height=t.height/v,x.class=`actor`,x.rx=3,x.ry=3;let S=a.get(t.name)??0;return U.has(u)?(g.style(`stroke`,p[S%p.length]),g.style(`fill`,f[S%p.length])):g.style(`stroke`,m),Y(n,r(t.description))(t.description,g,x.x,y+35*v-(l===`neo`?10:0),x.width,x.height,{class:`actor ${H}`},n),t.height},`drawActorTypeActor`),_e=e(async function(e,t,n,r,i,a,o){let s=o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]));switch(t.type){case`actor`:return await ge(e,t,n,r,s);case`participant`:return await le(e,t,n,r,s);case`boundary`:return await he(e,t,n,r,s);case`control`:return await fe(e,t,n,r,i,s);case`entity`:return await pe(e,t,n,r,s);case`database`:return await me(e,t,n,r,s);case`collections`:return await ue(e,t,n,r,s);case`queue`:return await de(e,t,n,r,s)}},`drawActor`),ve=e(function(e,t,n){let r=e.append(`g`);Se(r,t),t.name&&Y(n)(t.name,r,t.x,t.y+n.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:`text`},n),r.lower()},`drawBox`),ye=e(function(e){return e.append(`g`)},`anchorElement`),be=e(function(e,t,n,r,i,a,o){let{theme:s,themeVariables:c}=r,{bkgColorArray:l,borderColorArray:u,mainBkg:d}=c,f=k(),p=t.anchored,m=t.actor;f.x=t.startx,f.y=t.starty,f.class=`activation`+i%3,f.width=t.stopx-t.startx,f.height=n-t.starty;let h=W(p,f),g=(o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]))).get(m)??0;U.has(s)&&(h.style(`stroke`,u[g%u.length]),h.style(`fill`,l[g%u.length]??d))},`drawActivation`),xe=e(async function(t,n,i,a,o){let{boxMargin:s,boxTextMargin:c,labelBoxHeight:l,labelBoxWidth:u,messageFontFamily:d,messageFontSize:f,messageFontWeight:p}=a,m=t.append(`g`).attr(`data-et`,`control-structure`).attr(`data-id`,`i`+o.id),h=e(function(e,t,n,r){return m.append(`line`).attr(`x1`,e).attr(`y1`,t).attr(`x2`,n).attr(`y2`,r).attr(`class`,`loopLine`)},`drawLoopLine`);h(n.startx,n.starty,n.stopx,n.starty),h(n.stopx,n.starty,n.stopx,n.stopy),h(n.startx,n.stopy,n.stopx,n.stopy),h(n.startx,n.starty,n.startx,n.stopy),n.sections!==void 0&&n.sections.forEach(function(e){h(n.startx,e.y,n.stopx,e.y).style(`stroke-dasharray`,`3, 3`)});let g=T();g.text=i,g.x=n.startx,g.y=n.starty,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.anchor=`middle`,g.valign=`middle`,g.tspan=!1,g.width=Math.max(u??0,50),g.height=l+(a.look===`neo`?15:0)||20,g.textMargin=c,g.class=`labelText`,se(m,g),g=ke(),g.text=n.title,g.x=n.startx+u/2+(n.stopx-n.startx)/2,g.y=n.starty+s+c,g.anchor=`middle`,g.valign=`middle`,g.textMargin=c,g.class=`loopText`,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.wrap=!0;let _=r(g.text)?await oe(m,g,n):G(m,g);if(n.sectionTitles!==void 0){for(let[e,t]of Object.entries(n.sectionTitles))if(t.message){g.text=t.message,g.x=n.startx+(n.stopx-n.startx)/2,g.y=n.sections[e].y+s+c,g.class=`sectionTitle`,g.anchor=`middle`,g.valign=`middle`,g.tspan=!1,g.fontFamily=d,g.fontSize=f,g.fontWeight=p,g.wrap=n.wrap,r(g.text)?(n.starty=n.sections[e].y,await oe(m,g,n)):G(m,g);let i=Math.round(_.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));n.sections[e].height+=i-(s+c)}}return n.height=Math.round(n.stopy-n.starty),m},`drawLoop`),Se=e(function(e,t){D(e,t)},`drawBackgroundRect`),Ce=e(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-database`).attr(`fill-rule`,`evenodd`).attr(`clip-rule`,`evenodd`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z`)},`insertDatabaseIcon`),q=e(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-computer`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z`)},`insertComputerIcon`),J=e(function(e,t){e.append(`defs`).append(`symbol`).attr(`id`,t+`-clock`).attr(`width`,`24`).attr(`height`,`24`).append(`path`).attr(`transform`,`scale(.5)`).attr(`d`,`M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z`)},`insertClockIcon`),we=e(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,7.9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M -1 0 L 10 5 L 0 10 z`)},`insertArrowHead`),Te=e(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-filled-head`).attr(`refX`,15.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`insertArrowFilledHead`),Ee=e(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-sequencenumber`).attr(`refX`,15).attr(`refY`,15).attr(`markerWidth`,60).attr(`markerHeight`,40).attr(`orient`,`auto`).append(`circle`).attr(`cx`,15).attr(`cy`,15).attr(`r`,6)},`insertSequenceNumber`),De=e(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,4).attr(`refY`,4.5).append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1pt`).attr(`d`,`M 1,2 L 6,7 M 6,2 L 1,7`)},`insertArrowCrossHead`),Oe=e(function(e,t){let{theme:n}=t;e.append(`defs`).append(`filter`).attr(`id`,`drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${n===`redux`||n===`redux-color`?`#000000`:`#FFFFFF`}`)},`insertDropShadow`),ke=e(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:`#666`,width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},`getTextObj`),Ae=e(function(){return{x:0,y:0,fill:`#EDF2AE`,stroke:`#666`,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),Y=(function(){function t(e,t,n,r,i,a,s){o(t.append(`text`).attr(`x`,n+i/2).attr(`y`,r+a/2+5).style(`text-anchor`,`middle`).text(e),s)}e(t,`byText`);function n(e,t,n,r,i,a,s,c){let{actorFontSize:l,actorFontFamily:u,actorFontWeight:d}=c,[f,p]=C(l),m=e.split(h.lineBreakRegex);for(let e=0;ee.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},`getHeight`),clear:e(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},`clear`),addBox:e(function(e){this.boxes.push(e)},`addBox`),addActor:e(function(e){this.actors.push(e)},`addActor`),addLoop:e(function(e){this.loops.push(e)},`addLoop`),addMessage:e(function(e){this.messages.push(e)},`addMessage`),addNote:e(function(e){this.notes.push(e)},`addNote`),lastActor:e(function(){return this.actors[this.actors.length-1]},`lastActor`),lastLoop:e(function(){return this.loops[this.loops.length-1]},`lastLoop`),lastMessage:e(function(){return this.messages[this.messages.length-1]},`lastMessage`),lastNote:e(function(){return this.notes[this.notes.length-1]},`lastNote`),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:e(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,He(v())},`init`),updateVal:e(function(e,t,n,r){e[t]===void 0?e[t]=n:e[t]=r(n,e[t])},`updateVal`),updateBounds:e(function(t,n,r,i){let a=this,o=0;function s(s){return e(function(e){o++;let c=a.sequenceItems.length-o+1;a.updateVal(e,`starty`,n-c*Z.boxMargin,Math.min),a.updateVal(e,`stopy`,i+c*Z.boxMargin,Math.max),a.updateVal(Q.data,`startx`,t-c*Z.boxMargin,Math.min),a.updateVal(Q.data,`stopx`,r+c*Z.boxMargin,Math.max),s!==`activation`&&(a.updateVal(e,`startx`,t-c*Z.boxMargin,Math.min),a.updateVal(e,`stopx`,r+c*Z.boxMargin,Math.max),a.updateVal(Q.data,`starty`,n-c*Z.boxMargin,Math.min),a.updateVal(Q.data,`stopy`,i+c*Z.boxMargin,Math.max))},`updateItemBounds`)}e(s,`updateFn`),this.sequenceItems.forEach(s()),this.activations.forEach(s(`activation`))},`updateBounds`),insert:e(function(e,t,n,r){let i=h.getMin(e,n),a=h.getMax(e,n),o=h.getMin(t,r),s=h.getMax(t,r);this.updateVal(Q.data,`startx`,i,Math.min),this.updateVal(Q.data,`starty`,o,Math.min),this.updateVal(Q.data,`stopx`,a,Math.max),this.updateVal(Q.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),newActivation:e(function(e,t,n){let r=n.get(e.from),i=Ue(e.from).length||0,a=r.x+r.width/2+(i-1)*Z.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Z.activationWidth,stopy:void 0,actor:e.from,anchored:X.anchorElement(t)})},`newActivation`),endActivation:e(function(e){let t=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},`endActivation`),createLoop:e(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},`createLoop`),newLoop:e(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},`newLoop`),endLoop:e(function(){return this.sequenceItems.pop()},`endLoop`),isLoopOverlap:e(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},`isLoopOverlap`),addSectionToLoop:e(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:Q.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},`addSectionToLoop`),saveVerticalPos:e(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},`saveVerticalPos`),resetVerticalPos:e(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},`resetVerticalPos`),bumpVerticalPos:e(function(e){this.verticalPos+=e,this.data.stopy=h.getMax(this.data.stopy,this.verticalPos)},`bumpVerticalPos`),getVerticalPos:e(function(){return this.verticalPos},`getVerticalPos`),getBounds:e(function(){return{bounds:this.data,models:this.models}},`getBounds`)},Me=e(async function(e,t,n){Q.bumpVerticalPos(Z.boxMargin),t.height=Z.boxMargin,t.starty=Q.getVerticalPos();let i=k();i.x=t.startx,i.y=t.starty,i.width=t.width||Z.width,i.class=`note`;let a=e.append(`g`);a.attr(`data-et`,`note`),a.attr(`data-id`,`i`+n);let o=X.drawRect(a,i),s=T();s.x=t.startx,s.y=t.starty,s.width=i.width,s.dy=`1em`,s.text=t.message,s.class=`noteText`,s.fontFamily=Z.noteFontFamily,s.fontSize=Z.noteFontSize,s.fontWeight=Z.noteFontWeight,s.anchor=Z.noteAlign,s.textMargin=Z.noteMargin,s.valign=`center`;let c=r(s.text)?await oe(a,s):G(a,s),l=Math.round(c.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));o.attr(`height`,l+2*Z.noteMargin),t.height+=l+2*Z.noteMargin,Q.bumpVerticalPos(l+2*Z.noteMargin),t.stopy=t.starty+l+2*Z.noteMargin,t.stopx=t.startx+i.width,Q.insert(t.startx,t.starty,t.stopx,t.stopy),Q.models.addNote(t)},`drawNote`),Ne=e(function(t,n,r,i,a,o,s){let c=i.db.getActors(),l=c.get(n.from),u=c.get(n.to),d=r.sequenceVisible,f=l.x+l.width/2,p=u.x+u.width/2,m=f<=p,h=tt(n,i),g=t.append(`g`),_=e((e,t)=>{let n=e?16.5:-16.5;return t?-n:n},`getCircleOffset`),v=e(e=>{g.append(`circle`).attr(`cx`,e).attr(`cy`,s).attr(`r`,5).attr(`width`,10).attr(`height`,10)},`drawCircle`),{CENTRAL_CONNECTION:y,CENTRAL_CONNECTION_REVERSE:b,CENTRAL_CONNECTION_DUAL:x}=i.db.LINETYPE;if(d)switch(n.centralConnection){case y:h&&(p+=_(m,!0));break;case b:h||(f+=_(m,!1));break;case x:h?p+=_(m,!0):f+=_(m,!1);break}switch(n.centralConnection){case y:v(p);break;case b:v(f);break;case x:v(f),v(p);break}},`drawCentralConnection`),Pe=e(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`),Fe=e(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),`noteFont`),Ie=e(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),`actorFont`);async function Le(e,t){Q.bumpVerticalPos(10);let{startx:n,stopx:i,message:a}=t,o=h.splitBreaks(a).length,s=r(a),c=s?await p(a,v()):S.calculateTextDimensions(a,Pe(Z));if(!s){let e=c.height/o;t.height+=e,Q.bumpVerticalPos(e)}let l,u=c.height-10,d=c.width;if(n===i){l=Q.getVerticalPos()+u,Z.rightAngles||(u+=Z.boxMargin,l=Q.getVerticalPos()+u),u+=30;let e=h.getMax(d/2,Z.width/2);Q.insert(n-e,Q.getVerticalPos()-10+u,i+e,Q.getVerticalPos()+30+u)}else u+=Z.boxMargin,l=Q.getVerticalPos()+u,Q.insert(n,l-10,i,l);return Q.bumpVerticalPos(u),t.height+=u,t.stopy=t.starty+t.height,Q.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),l}e(Le,`boundMessage`);var Re=e(async function(e,t,n,i,a,o){let{startx:s,stopx:l,starty:u,message:d,type:f,sequenceIndex:p,sequenceVisible:m}=t,g=S.calculateTextDimensions(d,Pe(Z)),_=T();_.x=Math.min(s,l),_.y=u+10,_.width=Math.abs(l-s),_.class=`messageText`,_.dy=`1em`,_.text=d,_.fontFamily=Z.messageFontFamily,_.fontSize=Z.messageFontSize,_.fontWeight=Z.messageFontWeight,_.anchor=Z.messageAlign,_.valign=`center`,_.textMargin=Z.wrapPadding,_.tspan=!1,r(_.text)?await oe(e,_,{startx:s,stopx:l,starty:n}):G(e,_);let v=g.width,y;if(s===l){let r=m||Z.showSequenceNumbers,o=tt(a,i),c=nt(a,i),u=s+(r&&(o||c)?10:0);y=Z.rightAngles?e.append(`path`).attr(`d`,`M ${u},${n} H ${s+h.getMax(Z.width/2,v/2)} V ${n+25} H ${s}`):e.append(`path`).attr(`d`,`M `+u+`,`+n+` C `+(u+60)+`,`+(n-10)+` `+(s+60)+`,`+(n+30)+` `+s+`,`+(n+20)),$e(a,i)&&Ne(e,a,t,i,s,l,n)}else y=e.append(`line`),y.attr(`x1`,s),y.attr(`y1`,n),y.attr(`x2`,l),y.attr(`y2`,n),$e(a,i)&&Ne(e,a,t,i,s,l,n);f===i.db.LINETYPE.DOTTED||f===i.db.LINETYPE.DOTTED_CROSS||f===i.db.LINETYPE.DOTTED_POINT||f===i.db.LINETYPE.DOTTED_OPEN||f===i.db.LINETYPE.BIDIRECTIONAL_DOTTED||f===i.db.LINETYPE.SOLID_TOP_DOTTED||f===i.db.LINETYPE.SOLID_BOTTOM_DOTTED||f===i.db.LINETYPE.STICK_TOP_DOTTED||f===i.db.LINETYPE.STICK_BOTTOM_DOTTED||f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(y.style(`stroke-dasharray`,`3, 3`),y.attr(`class`,`messageLine1`)):y.attr(`class`,`messageLine0`),y.attr(`data-et`,`message`),y.attr(`data-id`,`i`+t.id),y.attr(`data-from`,t.from),y.attr(`data-to`,t.to);let b=``;if(Z.arrowMarkerAbsolute&&(b=c(!0)),y.attr(`stroke-width`,2),y.attr(`stroke`,`none`),y.style(`fill`,`none`),(f===i.db.LINETYPE.SOLID_TOP||f===i.db.LINETYPE.SOLID_TOP_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-solidTopArrowHead)`),(f===i.db.LINETYPE.SOLID_BOTTOM||f===i.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-solidBottomArrowHead)`),(f===i.db.LINETYPE.STICK_TOP||f===i.db.LINETYPE.STICK_TOP_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-stickTopArrowHead)`),(f===i.db.LINETYPE.STICK_BOTTOM||f===i.db.LINETYPE.STICK_BOTTOM_DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-stickBottomArrowHead)`),(f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-solidBottomArrowHead)`),(f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-solidTopArrowHead)`),(f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-stickBottomArrowHead)`),(f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&y.attr(`marker-start`,`url(`+b+`#`+o+`-stickTopArrowHead)`),(f===i.db.LINETYPE.SOLID||f===i.db.LINETYPE.DOTTED)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-arrowhead)`),(f===i.db.LINETYPE.BIDIRECTIONAL_SOLID||f===i.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(y.attr(`marker-start`,`url(`+b+`#`+o+`-arrowhead)`),y.attr(`marker-end`,`url(`+b+`#`+o+`-arrowhead)`)),(f===i.db.LINETYPE.SOLID_POINT||f===i.db.LINETYPE.DOTTED_POINT)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-filled-head)`),(f===i.db.LINETYPE.SOLID_CROSS||f===i.db.LINETYPE.DOTTED_CROSS)&&y.attr(`marker-end`,`url(`+b+`#`+o+`-crosshead)`),m||Z.showSequenceNumbers){let r=f===i.db.LINETYPE.BIDIRECTIONAL_SOLID||f===i.db.LINETYPE.BIDIRECTIONAL_DOTTED,c=f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE||f===i.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||f===i.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,u=$e(a,i),d=s,m=l;r?(ss?m=l-12:(m=l-6,d+=a?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_DUAL||a?.centralConnection===i.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),m+=u?15:0,y.attr(`x2`,m),y.attr(`x1`,d)):y.attr(`x1`,s+6);let h=0,g=s===l,_=s<=l;h=g?t.fromBounds+1:c?_?t.toBounds-1:t.fromBounds+1:_?t.fromBounds+1:t.toBounds-1;let v=`12px`,x=p.toString().length;x>5?v=`7px`:x>3&&(v=`9px`),e.append(`line`).attr(`x1`,h).attr(`y1`,n).attr(`x2`,h).attr(`y2`,n).attr(`stroke-width`,0).attr(`marker-start`,`url(`+b+`#`+o+`-sequencenumber)`),e.append(`text`).attr(`x`,h).attr(`y`,n+4).attr(`font-family`,`sans-serif`).attr(`font-size`,v).attr(`text-anchor`,`middle`).attr(`class`,`sequenceNumber`).text(p)}},`drawMessage`),ze=e(function(e,t,n,r,i,a,o){let s=0,c=0,l,u=0;for(let e of r){let r=t.get(e),a=r.box;l&&l!=a&&(o||Q.models.addBox(l),c+=Z.boxMargin+l.margin),a&&a!=l&&(o||(a.x=s+c,a.y=i),c+=a.margin),r.width=h.getMax(r.width||Z.width,Z.width),r.height=h.getMax(r.height||Z.height,Z.height),r.margin=r.margin||Z.actorMargin,u=h.getMax(u,r.height),n.get(r.name)&&(c+=r.width/2),r.x=s+c,r.starty=Q.getVerticalPos(),Q.insert(r.x,i,r.x+r.width,r.height),s+=r.width+c,r.box&&(r.box.width=s+a.margin-r.box.x),c=r.margin,l=r.box,Q.models.addActor(r)}l&&!o&&Q.models.addBox(l),Q.bumpVerticalPos(u)},`addActorRenderingData`),Be=e(async function(e,t,n,r,i,a,o){if(r){let r=0;Q.bumpVerticalPos(Z.boxMargin*2);for(let s of n){let n=t.get(s);n.stopy||=Q.getVerticalPos();let c=await X.drawActor(e,n,Z,!0,i,a,o);r=h.getMax(r,c)}Q.bumpVerticalPos(r+Z.boxMargin)}else for(let r of n){let n=t.get(r);await X.drawActor(e,n,Z,!1,i,a,o)}},`drawActors`),Ve=e(function(e,t,n,r){let i=0,a=0;for(let o of n){let n=t.get(o),s=Je(n),c=X.drawPopup(e,n,s,Z,Z.forceMenus,r);c.height>i&&(i=c.height),c.width+n.x>a&&(a=c.width+n.x)}return{maxHeight:i,maxWidth:a}},`drawActorsPopup`),He=e(function(e){m(Z,e),e.fontFamily&&(Z.actorFontFamily=Z.noteFontFamily=Z.messageFontFamily=e.fontFamily),e.fontSize&&(Z.actorFontSize=Z.noteFontSize=Z.messageFontSize=e.fontSize),e.fontWeight&&(Z.actorFontWeight=Z.noteFontWeight=Z.messageFontWeight=e.fontWeight)},`setConf`),Ue=e(function(e){return Q.activations.filter(function(t){return t.actor===e})},`actorActivations`),We=e(function(e,t){let n=t.get(e),r=Ue(e);return[r.reduce(function(e,t){return h.getMin(e,t.startx)},n.x+n.width/2-1),r.reduce(function(e,t){return h.getMax(e,t.stopx)},n.x+n.width/2+1)]},`activationBounds`);function $(e,n,r,i,a){Q.bumpVerticalPos(r);let o=i;if(n.id&&n.message&&e[n.id]){let r=e[n.id].width,a=Pe(Z);n.message=S.wrapLabel(`[${n.message}]`,r-2*Z.wrapPadding,a),n.width=r,n.wrap=!0;let s=S.calculateTextDimensions(n.message,a),c=h.getMax(s.height,Z.labelBoxHeight);o=i+c,t.debug(`${c} - ${n.message}`)}a(n),Q.bumpVerticalPos(o)}e($,`adjustLoopHeightForWrap`);function Ge(t,n,r,i,a,o,s){function c(e,r){e.x{e.add(t.from),e.add(t.to)}),x=x.filter(t=>e.has(t))}let D=new Map(x.map((e,t)=>[g.get(e)?.name??e,t]));ze(h,g,_,x,0,S,!1);let O=await it(S,g,E,o);X.insertArrowHead(h,i),X.insertArrowCrossHead(h,i),X.insertArrowFilledHead(h,i),X.insertSequenceNumber(h,i),X.insertSolidTopArrowHead(h,i),X.insertSolidBottomArrowHead(h,i),X.insertStickTopArrowHead(h,i),X.insertStickBottomArrowHead(h,i),l===`neo`&&X.insertDropShadow(h,Z);function k(e,t){let n=Q.endActivation(e);n.starty+18>t&&(n.starty=t-6,t+=12),X.drawActivation(h,n,t,Z,Ue(e.from).length,o,D),Q.insert(n.startx,t-10,n.stopx,t)}e(k,`activeEnd`);let A=1,j=1,M=[],N=[],P=0;for(let e of S){let n,r,i;switch(e.type){case o.db.LINETYPE.NOTE:Q.resetVerticalPos(),r=e.noteModel,await Me(h,r,e.id);break;case o.db.LINETYPE.ACTIVE_START:Q.newActivation(e,h,g);break;case o.db.LINETYPE.CENTRAL_CONNECTION:Q.newActivation(e,h,g);break;case o.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:Q.newActivation(e,h,g);break;case o.db.LINETYPE.ACTIVE_END:k(e,Q.getVerticalPos());break;case o.db.LINETYPE.LOOP_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.LOOP_END:n=Q.endLoop(),await X.drawLoop(h,n,`loop`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.RECT_START:$(O,e,Z.boxMargin,Z.boxMargin,e=>{let t=e.message;t||=u?.rectBkgColor||u?.actorBkg||`rgba(128, 128, 128, 0.5)`,Q.newLoop(void 0,t)});break;case o.db.LINETYPE.RECT_END:n=Q.endLoop(),N.push(n),Q.models.addLoop(n),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos());break;case o.db.LINETYPE.OPT_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.OPT_END:n=Q.endLoop(),await X.drawLoop(h,n,`opt`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.ALT_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.ALT_ELSE:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case o.db.LINETYPE.ALT_END:n=Q.endLoop(),await X.drawLoop(h,n,`alt`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.PAR_START:case o.db.LINETYPE.PAR_OVER_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e)),Q.saveVerticalPos();break;case o.db.LINETYPE.PAR_AND:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case o.db.LINETYPE.PAR_END:n=Q.endLoop(),await X.drawLoop(h,n,`par`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.AUTONUMBER:A=e.message.start||A,j=e.message.step||j,e.message.visible?o.db.enableSequenceNumbers():o.db.disableSequenceNumbers();break;case o.db.LINETYPE.CRITICAL_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.CRITICAL_OPTION:$(O,e,Z.boxMargin+Z.boxTextMargin,Z.boxMargin,e=>Q.addSectionToLoop(e));break;case o.db.LINETYPE.CRITICAL_END:n=Q.endLoop(),await X.drawLoop(h,n,`critical`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;case o.db.LINETYPE.BREAK_START:$(O,e,Z.boxMargin,Z.boxMargin+Z.boxTextMargin,e=>Q.newLoop(e));break;case o.db.LINETYPE.BREAK_END:n=Q.endLoop(),await X.drawLoop(h,n,`break`,Z,e),Q.bumpVerticalPos(n.stopy-Q.getVerticalPos()),Q.models.addLoop(n);break;default:try{i=e.msgModel,i.starty=Q.getVerticalPos(),i.sequenceIndex=A,i.sequenceVisible=o.db.showSequenceNumbers(),i.id=e.id,i.from=e.from,i.to=e.to;let t=await Le(h,i);Ge(e,i,t,P,g,_,y),M.push({messageModel:i,lineStartY:t,msg:e}),Q.models.addMessage(i)}catch(e){t.error(`error while drawing message`,e)}}[o.db.LINETYPE.SOLID_OPEN,o.db.LINETYPE.DOTTED_OPEN,o.db.LINETYPE.SOLID,o.db.LINETYPE.SOLID_TOP,o.db.LINETYPE.SOLID_BOTTOM,o.db.LINETYPE.STICK_TOP,o.db.LINETYPE.STICK_BOTTOM,o.db.LINETYPE.SOLID_TOP_DOTTED,o.db.LINETYPE.SOLID_BOTTOM_DOTTED,o.db.LINETYPE.STICK_TOP_DOTTED,o.db.LINETYPE.STICK_BOTTOM_DOTTED,o.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,o.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,o.db.LINETYPE.STICK_ARROW_TOP_REVERSE,o.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,o.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,o.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,o.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,o.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,o.db.LINETYPE.DOTTED,o.db.LINETYPE.SOLID_CROSS,o.db.LINETYPE.DOTTED_CROSS,o.db.LINETYPE.SOLID_POINT,o.db.LINETYPE.DOTTED_POINT,o.db.LINETYPE.BIDIRECTIONAL_SOLID,o.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(A=Math.round((A+j)*100)/100),P++}t.debug(`createdActors`,_),t.debug(`destroyedActors`,y),await Be(h,g,x,!1,i,o,D);for(let e of M)await Re(h,e.messageModel,e.lineStartY,o,e.msg,i);Z.mirrorActors&&await Be(h,g,x,!0,i,o,D),N.forEach(e=>X.drawBackgroundRect(h,e)),ce(h,g,x,Z);for(let e of Q.models.boxes){e.height=Q.getVerticalPos()-e.y,Q.insert(e.x,e.y,e.x+e.width,e.height);let t=Z.boxMargin*2;e.startx=e.x-t,e.starty=e.y-t*.25,e.stopx=e.startx+e.width+2*t,e.stopy=e.starty+e.height+t*.75,e.stroke=`rgb(0,0,0, 0.5)`,X.drawBox(h,e,Z)}w&&Q.bumpVerticalPos(Z.boxMargin);let F=Ve(h,g,x,m),{bounds:I}=Q.getBounds();I.startx===void 0&&(I.startx=0),I.starty===void 0&&(I.starty=0),I.stopx===void 0&&(I.stopx=0),I.stopy===void 0&&(I.stopy=0);let ee=I.stopy-I.starty;ee{let n=Pe(Z),r=t.actorKeys.reduce((t,n)=>t+=e.get(n).width+(e.get(n).margin||0),0),i=Z.boxMargin*8;r+=i,r-=2*Z.boxTextMargin,t.wrap&&(t.name=S.wrapLabel(t.name,r-2*Z.wrapPadding,n));let o=S.calculateTextDimensions(t.name,n);a=h.getMax(o.height,a);let s=h.getMax(r,o.width+2*Z.wrapPadding);if(t.margin=Z.boxTextMargin,re.textMaxHeight=a),h.getMax(i,Z.height)}e(Ye,`calculateActorMargins`);var Xe=e(async function(e,n,i){let a=n.get(e.from),o=n.get(e.to),s=a.x,c=o.x,l=e.wrap&&e.message,u=r(e.message)?await p(e.message,v()):S.calculateTextDimensions(l?S.wrapLabel(e.message,Z.width,Fe(Z)):e.message,Fe(Z)),d={width:l?Z.width:h.getMax(Z.width,u.width+2*Z.noteMargin),height:0,startx:a.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===i.db.PLACEMENT.RIGHTOF?(d.width=l?h.getMax(Z.width,u.width):h.getMax(a.width/2+o.width/2,u.width+2*Z.noteMargin),d.startx=s+(a.width+Z.actorMargin)/2):e.placement===i.db.PLACEMENT.LEFTOF?(d.width=l?h.getMax(Z.width,u.width+2*Z.noteMargin):h.getMax(a.width/2+o.width/2,u.width+2*Z.noteMargin),d.startx=s-d.width+(a.width-Z.actorMargin)/2):e.to===e.from?(u=S.calculateTextDimensions(l?S.wrapLabel(e.message,h.getMax(Z.width,a.width),Fe(Z)):e.message,Fe(Z)),d.width=l?h.getMax(Z.width,a.width):h.getMax(a.width,Z.width,u.width+2*Z.noteMargin),d.startx=s+(a.width-d.width)/2):(d.width=Math.abs(s+a.width/2-(c+o.width/2))+Z.actorMargin,d.startx=s2,p=e(e=>l?-e:e,`adjustValue`);t.from===t.to?d=u:(t.activate&&!f&&(d+=p(Z.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)||(d+=p(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(t.type)&&(u-=p(3)));let m=[a,o,s,c],g=Math.abs(u-d);t.wrap&&t.message&&(t.message=S.wrapLabel(t.message,h.getMax(g+2*Z.wrapPadding,Z.width),Pe(Z)));let _=S.calculateTextDimensions(t.message,Pe(Z));return{width:h.getMax(t.wrap?0:_.width+2*Z.wrapPadding,g+2*Z.wrapPadding,Z.width),height:0,startx:u,stopx:d,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,m),toBounds:Math.max.apply(null,m)}},`buildMessageModel`),it=e(async function(e,n,r,i){let a={},o=[],s,c,l;for(let t of e){switch(t.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:o.push({id:t.id,msg:t.message,from:2**53-1,to:-(2**53-1),width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:t.message&&(s=o.pop(),a[s.id]=s,a[t.id]=s,o.push(s));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:s=o.pop(),a[s.id]=s;break;case i.db.LINETYPE.ACTIVE_START:{let e=n.get(t.from?t.from:t.to.actor),r=Ue(t.from?t.from:t.to.actor).length,i=e.x+e.width/2+(r-1)*Z.activationWidth/2,a={startx:i,stopx:i+Z.activationWidth,actor:t.from,enabled:!0};Q.activations.push(a)}break;case i.db.LINETYPE.ACTIVE_END:{let e=Q.activations.map(e=>e.actor).lastIndexOf(t.from);Q.activations.splice(e,1).splice(0,1)}break}t.placement===void 0?(l=rt(t,n,i),t.msgModel=l,l.startx&&l.stopx&&o.length>0&&o.forEach(e=>{if(s=e,l.startx===l.stopx){let e=n.get(t.from),r=n.get(t.to);s.from=h.getMin(e.x-l.width/2,e.x-e.width/2,s.from),s.to=h.getMax(r.x+l.width/2,r.x+e.width/2,s.to),s.width=h.getMax(s.width,Math.abs(s.to-s.from))-Z.labelBoxWidth}else s.from=h.getMin(l.startx,s.from),s.to=h.getMax(l.stopx,s.to),s.width=h.getMax(s.width,l.width)-Z.labelBoxWidth})):(c=await Xe(t,n,i),t.noteModel=c,o.forEach(e=>{s=e,s.from=h.getMin(s.from,c.startx),s.to=h.getMax(s.to,c.startx+c.width),s.width=h.getMax(s.width,Math.abs(s.from-s.to))-Z.labelBoxWidth}))}return Q.activations=[],t.debug(`Loop type widths:`,a),a},`calculateLoopBounds`),at={parser:F,get db(){return new te},renderer:{bounds:Q,drawActors:Be,drawActorsPopup:Ve,setConf:He,draw:Ke},styles:ne,init:e(e=>{e.sequence||={},e.wrap&&(e.sequence.wrap=e.wrap,a({sequence:{wrap:e.wrap}}))},`init`)};export{at as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js b/dist-desktop/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js deleted file mode 100644 index ea2efbd..0000000 --- a/dist-desktop/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var t=1;function n(){if(!(typeof globalThis>`u`))return globalThis}e(n,`getCaptureGlobal`);function r(){return!!n()?.mermaidCaptureSizes}e(r,`shouldCaptureSizes`);function i(){return typeof location>`u`?`browser-dev`:`${location.pathname}${location.search}`}e(i,`capturedFromLocation`);function a(e,t){let r=n();if(!r)return;let i=t.node(),a=((i&&`ownerSVGElement`in i?i.ownerSVGElement:null)??i)?.id??`(unknown)`;r.mermaidCapturedSizes??=[];let o={svgId:a,sizes:e};r.mermaidCapturedSizes.push(o),r.mermaidLastCapturedSizes=o}e(a,`emitCapturedSizes`);function o(e,n){let r=[];for(let e of n.nodes)e.isGroup||r.push({id:e.id,width:e.width??0,height:e.height??0});r.length!==0&&a({metadata:{captureVersion:t,capturedAt:new Date().toISOString(),capturedFrom:i()},nodes:r},e)}e(o,`captureNodeSizes`);export{o as captureNodeSizes}; \ No newline at end of file diff --git a/dist-desktop/assets/src-UMNXGZaF.js b/dist-desktop/assets/src-UMNXGZaF.js deleted file mode 100644 index ef716e8..0000000 --- a/dist-desktop/assets/src-UMNXGZaF.js +++ /dev/null @@ -1 +0,0 @@ -import{i as e,t}from"./rolldown-runtime-aKtaBQYM.js";import{n}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var r=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e){},`trace`),debug:n((...e)=>{},`debug`),info:n((...e)=>{},`info`),warn:n((...e)=>{},`warn`),error:n((...e)=>{},`error`),fatal:n((...e)=>{},`fatal`)},s=n(function(e=`fatal`){let t=a.fatal;typeof e==`string`?e.toLowerCase()in a&&(t=a[e]):typeof e==`number`&&(t=e),o.trace=()=>{},o.debug=()=>{},o.info=()=>{},o.warn=()=>{},o.error=()=>{},o.fatal=()=>{},t<=a.fatal&&(o.fatal=console.error?console.error.bind(console,c(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,c(`FATAL`))),t<=a.error&&(o.error=console.error?console.error.bind(console,c(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,c(`ERROR`))),t<=a.warn&&(o.warn=console.warn?console.warn.bind(console,c(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,c(`WARN`))),t<=a.info&&(o.info=console.info?console.info.bind(console,c(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,c(`INFO`))),t<=a.debug&&(o.debug=console.debug?console.debug.bind(console,c(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,c(`DEBUG`))),t<=a.trace&&(o.trace=console.debug?console.debug.bind(console,c(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,c(`TRACE`)))},`setLogLevel`),c=n(e=>`%c${(0,i.default)().format(`ss.SSS`)} : ${e} : `,`format`),l={value:()=>{}};function u(){for(var e=0,t=arguments.length,n={},r;e=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}d.prototype=u.prototype={constructor:d,on:function(e,t){var n=this._,r=f(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a0)for(var n=Array(i),r=0,i,a;r=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),h.hasOwnProperty(t)?{space:h[t],local:e}:e}function _(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function v(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function y(e){var t=g(e);return(t.local?v:_)(t)}function b(){}function x(e){return e==null?b:function(){return this.querySelector(e)}}function S(e){typeof e!=`function`&&(e=x(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i=v&&(v=_+1);!(b=g[v])&&++v=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function we(e){e||=Te;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;at?1:e>=t?0:NaN}function Ee(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function De(){return Array.from(this)}function Oe(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?Be:typeof t==`function`?He:Ve)(e,t,n??``)):O(this.node(),e)}function O(e,t){return e.style.getPropertyValue(t)||ze(e).getComputedStyle(e,null).getPropertyValue(t)}function We(e){return function(){delete this[e]}}function Ge(e,t){return function(){this[e]=t}}function Ke(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function qe(e,t){return arguments.length>1?this.each((t==null?We:typeof t==`function`?Ke:Ge)(e,t)):this.node()[e]}function Je(e){return e.trim().split(/^|\s+/)}function Ye(e){return e.classList||new Xe(e)}function Xe(e){this._node=e,this._names=Je(e.getAttribute(`class`)||``)}Xe.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function Ze(e,t){for(var n=Ye(e),r=-1,i=t.length;++r=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Et(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?L(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?L(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Vt.exec(e))?new R(t[1],t[2],t[3],1):(t=Ht.exec(e))?new R(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ut.exec(e))?L(t[1],t[2],t[3],t[4]):(t=Wt.exec(e))?L(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Gt.exec(e))?an(t[1],t[2]/100,t[3]/100,1):(t=Kt.exec(e))?an(t[1],t[2]/100,t[3]/100,t[4]):qt.hasOwnProperty(e)?Qt(qt[e]):e===`transparent`?new R(NaN,NaN,NaN,0):null}function Qt(e){return new R(e>>16&255,e>>8&255,e&255,1)}function L(e,t,n,r){return r<=0&&(e=t=n=NaN),new R(e,t,n,r)}function $t(e){return e instanceof j||(e=I(e)),e?(e=e.rgb(),new R(e.r,e.g,e.b,e.opacity)):new R}function en(e,t,n,r){return arguments.length===1?$t(e):new R(e,t,n,r??1)}function R(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Lt(R,en,Rt(j,{brighter(e){return e=e==null?zt:zt**+e,new R(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?M:M**+e,new R(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new R(B(this.r),B(this.g),B(this.b),z(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tn,formatHex:tn,formatHex8:nn,formatRgb:rn,toString:rn}));function tn(){return`#${V(this.r)}${V(this.g)}${V(this.b)}`}function nn(){return`#${V(this.r)}${V(this.g)}${V(this.b)}${V((isNaN(this.opacity)?1:this.opacity)*255)}`}function rn(){let e=z(this.opacity);return`${e===1?`rgb(`:`rgba(`}${B(this.r)}, ${B(this.g)}, ${B(this.b)}${e===1?`)`:`, ${e})`}`}function z(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function B(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function V(e){return e=B(e),(e<16?`0`:``)+e.toString(16)}function an(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new H(e,t,n,r)}function on(e){if(e instanceof H)return new H(e.h,e.s,e.l,e.opacity);if(e instanceof j||(e=I(e)),!e)return new H;if(e instanceof H)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n0&&c<1?0:o,new H(o,s,c,e.opacity)}function sn(e,t,n,r){return arguments.length===1?on(e):new H(e,t,n,r??1)}function H(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Lt(H,sn,Rt(j,{brighter(e){return e=e==null?zt:zt**+e,new H(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?M:M**+e,new H(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new R(ln(e>=240?e-240:e+120,i,r),ln(e,i,r),ln(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new H(cn(this.h),U(this.s),U(this.l),z(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=z(this.opacity);return`${e===1?`hsl(`:`hsla(`}${cn(this.h)}, ${U(this.s)*100}%, ${U(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function cn(e){return e=(e||0)%360,e<0?e+360:e}function U(e){return Math.max(0,Math.min(1,e||0))}function ln(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var un=e=>()=>e;function dn(e,t){return function(n){return e+n*t}}function fn(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function pn(e,t){var n=t-e;return n?dn(e,n>180||n<-180?n-360*Math.round(n/360):n):un(isNaN(e)?t:e)}function mn(e){return(e=+e)==1?hn:function(t,n){return n-t?fn(t,n,e):un(isNaN(t)?n:t)}}function hn(e,t){var n=t-e;return n?dn(e,n):un(isNaN(e)?t:e)}var gn=(function e(t){var n=mn(t);function r(e,t){var r=n((e=en(e)).r,(t=en(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=hn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function W(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var _n=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vn=new RegExp(_n.source,`g`);function yn(e){return function(){return e}}function bn(e){return function(t){return e(t)+``}}function xn(e,t){var n=_n.lastIndex=vn.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=_n.exec(e))&&(i=vn.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:W(r,i)})),n=vn.lastIndex;return n180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:W(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:W(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:W(e,n)},{i:s-2,x:W(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t=0&&e._call.call(void 0,t),e=e._next;--G}function Un(){q=(Fn=J.now())+In,G=jn=0;try{Hn()}finally{G=0,Gn(),q=0}}function Wn(){var e=J.now(),t=e-Fn;t>Nn&&(In-=t,Fn=e)}function Gn(){for(var e,t=Pn,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Pn=n);K=e,Kn(r)}function Kn(e){G||(jn&&=clearTimeout(jn),e-q>24?(e<1/0&&(jn=setTimeout(Un,e-J.now()-In)),Mn&&=clearInterval(Mn)):(Mn||=(Fn=J.now(),setInterval(Wn,Nn)),G=1,Ln(Un)))}function qn(e,t,n){var r=new Bn;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var Jn=u(`start`,`end`,`cancel`,`interrupt`),Yn=[];function Xn(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Qn(e,n,{name:t,index:r,group:i,on:Jn,tween:Yn,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Zn(e,t){var n=X(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function Y(e,t){var n=X(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function X(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Qn(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Vn(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return qn(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function er(e){return this.each(function(){$n(this,e)})}function tr(e,t){var n,r;return function(){var i=Y(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o=0&&(e=e.slice(0,t)),!e||e===`start`})}function jr(e,t,n){var r,i,a=Ar(t)?Zn:Y;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Mr(e,t){var n=this._id;return arguments.length<2?X(this.node(),n).on.on(e):this.each(jr(n,e,t))}function Nr(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Pr(){return this.on(`end.remove`,Nr(this._id))}function Fr(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=x(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;oe.append(`circle`).attr(`class`,`start-state`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit).attr(`cy`,o().state.padding+o().state.sizeUnit),`drawStartState`),g=e(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,o().state.textHeight).attr(`class`,`divider`).attr(`x2`,o().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=e((e,t)=>{let n=e.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+2*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,r.width+2*o().state.padding).attr(`height`,r.height+2*o().state.padding).attr(`rx`,o().state.radius),n},`drawSimpleState`),v=e((t,n)=>{let r=e(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*o().state.padding).text(t);n||r.attr(`dy`,o().state.textHeight)},`addTspan`),i=t.append(`text`).attr(`x`,2*o().state.padding).attr(`y`,o().state.textHeight+1.3*o().state.padding).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),a=i.height,s=t.append(`text`).attr(`x`,o().state.padding).attr(`y`,a+o().state.padding*.4+o().state.dividerMargin+o().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=t.append(`line`).attr(`x1`,o().state.padding).attr(`y1`,o().state.padding+a+o().state.dividerMargin/2).attr(`y2`,o().state.padding+a+o().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,i.width);return u.attr(`x2`,f+3*o().state.padding),t.insert(`rect`,`:first-child`).attr(`x`,o().state.padding).attr(`y`,o().state.padding).attr(`width`,f+2*o().state.padding).attr(`height`,d.height+a+2*o().state.padding).attr(`rx`,o().state.radius),t},`drawDescrState`),y=e((e,t,n)=>{let r=o().state.padding,i=2*o().state.padding,a=e.node().getBBox(),s=a.width,c=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,o().state.titleShift).attr(`font-size`,o().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,s);d===s&&(d+=i);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)s&&(f=c-(u-s)/2);let m=1-o().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+o().state.textHeight+o().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,o().state.textHeight*3).attr(`rx`,o().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,o().state.titleShift-o().state.textHeight-o().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*o().state.textHeight).attr(`rx`,o().state.radius),e},`addTitleAndBox`),b=e(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,o().state.sizeUnit+o().state.miniPadding).attr(`cx`,o().state.padding+o().state.sizeUnit+o().state.miniPadding).attr(`cy`,o().state.padding+o().state.sizeUnit+o().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,o().state.sizeUnit).attr(`cx`,o().state.padding+o().state.sizeUnit+2).attr(`cy`,o().state.padding+o().state.sizeUnit+2)),`drawEndState`),x=e((e,t)=>{let n=o().state.forkWidth,r=o().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,o().state.padding).attr(`y`,o().state.padding)},`drawForkJoinState`),S=e((e,t,n,r)=>{let i=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`
    `);c=c.replace(/\n/g,`
    `);let l=c.split(a.lineBreakRegex),u=1.25*o().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}i+=u,e.attr(`x`,t+o().state.noteMargin),e.attr(`y`,n+i+1.25*o().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:i}},`_drawLongText`),C=e((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,o().state.padding),{textWidth:r,textHeight:i}=S(e,0,0,t.append(`g`));return n.attr(`height`,i+2*o().state.noteMargin),n.attr(`width`,r+o().state.noteMargin*2),n},`drawNote`),w=e(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(i),t.type===`end`&&b(i),(t.type===`fork`||t.type===`join`)&&x(i,t),t.type===`note`&&C(t.note.text,i),t.type===`divider`&&g(i),t.type==="default"&&t.descriptions.length===0&&_(i,t),t.type==="default"&&t.descriptions.length>0&&v(i,t);let a=i.node().getBBox();return r.width=a.width+2*o().state.padding,r.height=a.height+2*o().state.padding,r},`drawState`),T=0,E=e(function(n,i,u){let d=e(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);i.points=i.points.filter(e=>!Number.isNaN(e.y));let f=i.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=n.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(o().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let e=n.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(i.points),l=a.getRows(u.title),d=0,f=[],p=0,m=0;for(let n=0;n<=l.length;n++){let i=e.append(`text`).attr(`text-anchor`,`middle`).text(l[n]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),t.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,t.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=e.node().getBBox();e.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-o().state.padding/2).attr(`y`,s-h/2-o().state.padding/2-3.5).attr(`width`,p+o().state.padding).attr(`height`,h+o().state.padding),t.info(g)}T++},`drawEdge`),D,O={},k=e(function(){},`setConf`),A=e(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=e(function(e,r,a,s){D=o().state;let c=o().securityLevel,l;c===`sandbox`&&(l=n(`#i`+r));let u=n(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;t.debug(`Rendering diagram `+e);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f.append(`g`).attr(`id`,r+`-root`),void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;i(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=e(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=e((e,n,r,i,o,s,c)=>{let l=new u({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):t.debug(`No Node `+e+`: `+JSON.stringify(l.node(e)))});let b=v.getBBox();l.edges().forEach(function(e){e!==void 0&&l.edge(e)!==void 0&&(t.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(l.edge(e))),E(n,l.edge(e),l.edge(e).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,t.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/stateDiagram-v2-6OUMAXLB-CR3Ef9C0.js b/dist-desktop/assets/stateDiagram-v2-6OUMAXLB-CR3Ef9C0.js deleted file mode 100644 index a370a28..0000000 --- a/dist-desktop/assets/stateDiagram-v2-6OUMAXLB-CR3Ef9C0.js +++ /dev/null @@ -1 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-UMNXGZaF.js";import"./chunk-WYO6CB5R-Dv5kDyQC.js";import"./chunk-ICXQ74PX-Czpgj8Uw.js";import"./chunk-HOUHSVGY-iJuv90UH.js";import"./chunk-Q4XR5HBZ-CQ8zkLYc.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-D-nWYRNR.js";import"./chunk-32BRIVSS-DWU3ezKg.js";import"./chunk-XXDRQBXY-Bq6zMMOx.js";import"./chunk-VR4S4FIN-BTo4eV3J.js";import"./chunk-C7G6YPKG-DW-1jWUA.js";import"./chunk-ZGVPDNZ5-DGInJAPD.js";import"./chunk-52WLFC77-BOCvVCX1.js";import"./chunk-FWX5IMBZ-ComLEIwh.js";import{i as t,n,r,t as i}from"./chunk-EX3LRPZG-CzaF5a2T.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/styles-Peq6Rcdg.css b/dist-desktop/assets/styles-Peq6Rcdg.css deleted file mode 100644 index e9b9b31..0000000 --- a/dist-desktop/assets/styles-Peq6Rcdg.css +++ /dev/null @@ -1,2 +0,0 @@ -/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-pan-x:initial;--tw-pan-y:initial;--tw-pinch-zoom:initial;--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-divide-x-reverse:0;--tw-border-style:solid;--tw-divide-y-reverse:0;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:"";--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0}}}@layer theme{:root,:host{--font-sans:"Segoe UI", "Helvetica Neue", ui-sans-serif, system-ui, -apple-system, sans-serif;--font-mono:ui-monospace, "SF Mono", Menlo, Consolas, monospace;--color-orange-100:oklch(95.4% .038 75.164);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-950:oklch(27.9% .077 45.635);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-sky-100:oklch(95.1% .026 236.824);--color-slate-200:oklch(92.9% .013 255.508);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-800:oklch(27.4% .006 286.033);--color-neutral-100:oklch(97% 0 none);--color-neutral-300:oklch(87% 0 none);--color-neutral-500:oklch(55.6% 0 none);--color-neutral-700:oklch(37.1% 0 none);--color-neutral-800:oklch(26.9% 0 none);--color-neutral-900:oklch(20.5% 0 none);--color-stone-50:oklch(98.5% .001 106.423);--color-stone-100:oklch(97% .001 106.424);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-700:oklch(37.4% .01 67.558);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height:calc(2.25 / 1.875);--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-xs:.125rem;--radius-sm:.375rem;--radius-md:.5rem;--radius-lg:.75rem;--radius-xl:1rem;--radius-2xl:1rem;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-background:#fff;--color-foreground:#1a1a1a;--color-card:#fff;--color-popover:#fff;--color-popover-foreground:#1a1a1a;--color-primary:#1a1a1a;--color-primary-foreground:#fafafa;--color-secondary:#f2f1ee;--color-secondary-foreground:#1a1a1a;--color-muted:#f2f1ee;--color-muted-foreground:#6b6b6b;--color-accent:#f2f1ee;--color-destructive:#c2410c;--color-destructive-foreground:#fafafa;--color-border:#e8e7e4;--color-input:#e8e7e4;--color-ring:#a3a3a3;--color-sidebar:#f7f6f3;--color-sidebar-fg:#3f3f3f;--color-sidebar-border:#ebeae6;--color-sidebar-hover:#efeee9;--color-sidebar-active:#e8e7e2}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--color-border)}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizelegibility}body{background-color:var(--color-background);font-family:var(--font-sans);color:var(--color-foreground);min-height:100dvh;margin:0}button:not(:disabled),[role=button]:not(:disabled){cursor:pointer}[contenteditable]:empty:before{content:attr(data-placeholder);color:#6b6b6b8c}@supports (color:color-mix(in lab, red, red)){[contenteditable]:empty:before{color:color-mix(in oklab, var(--color-muted-foreground) 55%, transparent)}}[contenteditable]:empty:before{pointer-events:none}*{scrollbar-width:thin;scrollbar-color:#1a1a1a2e transparent}@supports (color:color-mix(in lab, red, red)){*{scrollbar-color:color-mix(in oklab, var(--color-foreground) 18%, transparent) transparent}}}@layer components;@layer utilities{.\@container{container-type:inline-size}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.not-sr-only{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:0}.inset-y-0{inset-block:0}.top-1{top:var(--spacing)}.top-1\/2{top:50%}.top-3{top:calc(var(--spacing) * 3)}.top-\[18\%\]{top:18%}.right-1{right:var(--spacing)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.right-4{right:calc(var(--spacing) * 4)}.bottom-3{bottom:calc(var(--spacing) * 3)}.-left-12{left:calc(var(--spacing) * -12)}.left-0{left:0}.left-1{left:var(--spacing)}.left-1\/2{left:50%}.left-2{left:calc(var(--spacing) * 2)}.left-3{left:calc(var(--spacing) * 3)}.left-4{left:calc(var(--spacing) * 4)}.isolate{isolation:isolate}.isolation-auto{isolation:auto}.z-0{z-index:0}.z-10{z-index:10}.z-50{z-index:50}.z-\[100\]{z-index:100}.z-\[120\]{z-index:120}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.-mx-4{margin-inline:calc(var(--spacing) * -4)}.mx-3{margin-inline:calc(var(--spacing) * 3)}.mx-auto{margin-inline:auto}.my-1{margin-block:var(--spacing)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mr-1{margin-right:var(--spacing)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.ml-1{margin-left:var(--spacing)}.ml-10{margin-left:calc(var(--spacing) * 10)}.ml-auto{margin-left:auto}.ml-px{margin-left:1px}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-4{-webkit-line-clamp:4;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.flow-root{display:flow-root}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.inline-table{display:inline-table}.list-item{display:list-item}.table{display:table}.table-caption{display:table-caption}.table-cell{display:table-cell}.table-column{display:table-column}.table-column-group{display:table-column-group}.table-footer-group{display:table-footer-group}.table-header-group{display:table-header-group}.table-row{display:table-row}.table-row-group{display:table-row-group}.size-1{width:var(--spacing);height:var(--spacing)}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-3{width:calc(var(--spacing) * 3);height:calc(var(--spacing) * 3)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.size-8{width:calc(var(--spacing) * 8);height:calc(var(--spacing) * 8)}.size-9{width:calc(var(--spacing) * 9);height:calc(var(--spacing) * 9)}.size-12{width:calc(var(--spacing) * 12);height:calc(var(--spacing) * 12)}.size-16{width:calc(var(--spacing) * 16);height:calc(var(--spacing) * 16)}.h-2{height:calc(var(--spacing) * 2)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-36{height:calc(var(--spacing) * 36)}.h-40{height:calc(var(--spacing) * 40)}.h-84{height:calc(var(--spacing) * 84)}.h-120{height:calc(var(--spacing) * 120)}.h-dvh{height:100dvh}.h-full{height:100%}.h-px{height:1px}.max-h-40{max-height:calc(var(--spacing) * 40)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-72{max-height:calc(var(--spacing) * 72)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[90vh\]{max-height:90vh}.min-h-0{min-height:0}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-\[64px\]{min-height:64px}.min-h-dvh{min-height:100dvh}.min-h-screen{min-height:100vh}.w-0{width:0}.w-2{width:calc(var(--spacing) * 2)}.w-5{width:calc(var(--spacing) * 5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-48{width:calc(var(--spacing) * 48)}.w-72{width:calc(var(--spacing) * 72)}.w-\[260px\]{width:260px}.w-\[calc\(100\%-2\.5rem\)\]{width:calc(100% - 2.5rem)}.w-\[calc\(100\%-2rem\)\]{width:calc(100% - 2rem)}.w-\[min\(280px\,88vw\)\]{width:min(280px,88vw)}.w-\[min\(560px\,calc\(100\%-2rem\)\)\]{width:min(560px,100% - 2rem)}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[140px\]{max-width:140px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:0}.min-w-40{min-width:calc(var(--spacing) * 40)}.min-w-44{min-width:calc(var(--spacing) * 44)}.min-w-\[260px\]{min-width:260px}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-none{translate:none}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x) var(--tw-scale-y)}.scale-3d{scale:var(--tw-scale-x) var(--tw-scale-y) var(--tw-scale-z)}.scale-\[0\.25\]{scale:.25}.rotate-90{rotate:90deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.transform\!{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)!important}.animate-in{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-pinch-zoom{--tw-pinch-zoom:pinch-zoom;touch-action:var(--tw-pan-x,) var(--tw-pan-y,) var(--tw-pinch-zoom,)}.touch-none{touch-action:none}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-cols-8{grid-template-columns:repeat(8,minmax(0,1fr))}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-reverse>:not(:last-child)){--tw-space-y-reverse:1}.gap-x-4{column-gap:calc(var(--spacing) * 4)}:where(.space-x-reverse>:not(:last-child)){--tw-space-x-reverse:1}.gap-y-2{row-gap:calc(var(--spacing) * 2)}:where(.divide-x>:not(:last-child)){--tw-divide-x-reverse:0;border-inline-style:var(--tw-border-style);border-inline-start-width:calc(1px * var(--tw-divide-x-reverse));border-inline-end-width:calc(1px * calc(1 - var(--tw-divide-x-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-y-reverse>:not(:last-child)){--tw-divide-y-reverse:1}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:2147483647px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-s{border-start-start-radius:.25rem;border-end-start-radius:.25rem}.rounded-ss{border-start-start-radius:.25rem}.rounded-e{border-start-end-radius:.25rem;border-end-end-radius:.25rem}.rounded-se{border-start-end-radius:.25rem}.rounded-ee{border-end-end-radius:.25rem}.rounded-es{border-end-start-radius:.25rem}.rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-b{border-bottom-right-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-br{border-bottom-right-radius:.25rem}.rounded-bl{border-bottom-left-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-x{border-inline-style:var(--tw-border-style);border-inline-width:1px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-bs{border-block-start-style:var(--tw-border-style);border-block-start-width:1px}.border-be{border-block-end-style:var(--tw-border-style);border-block-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber-500\/30{border-color:#f99c004d}@supports (color:color-mix(in lab, red, red)){.border-amber-500\/30{border-color:color-mix(in oklab, var(--color-amber-500) 30%, transparent)}}.border-border{border-color:var(--color-border)}.border-destructive\/30{border-color:#c2410c4d}@supports (color:color-mix(in lab, red, red)){.border-destructive\/30{border-color:color-mix(in oklab, var(--color-destructive) 30%, transparent)}}.border-emerald-500\/40{border-color:#00bb7f66}@supports (color:color-mix(in lab, red, red)){.border-emerald-500\/40{border-color:color-mix(in oklab, var(--color-emerald-500) 40%, transparent)}}.border-foreground{border-color:var(--color-foreground)}.border-foreground\/25{border-color:#1a1a1a40}@supports (color:color-mix(in lab, red, red)){.border-foreground\/25{border-color:color-mix(in oklab, var(--color-foreground) 25%, transparent)}}.border-neutral-300{border-color:var(--color-neutral-300)}.border-primary{border-color:var(--color-primary)}.border-sidebar-border{border-color:var(--color-sidebar-border)}.border-transparent{border-color:#0000}.border-t-transparent{border-top-color:#0000}.border-l-transparent{border-left-color:#0000}.bg-amber-500\/10{background-color:#f99c001a}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/10{background-color:color-mix(in oklab, var(--color-amber-500) 10%, transparent)}}.bg-background{background-color:var(--color-background)}.bg-background\/90{background-color:#ffffffe6}@supports (color:color-mix(in lab, red, red)){.bg-background\/90{background-color:color-mix(in oklab, var(--color-background) 90%, transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/5{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bg-black\/5{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.bg-black\/10{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.bg-black\/10{background-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.bg-black\/40{background-color:#0006}@supports (color:color-mix(in lab, red, red)){.bg-black\/40{background-color:color-mix(in oklab, var(--color-black) 40%, transparent)}}.bg-border{background-color:var(--color-border)}.bg-card{background-color:var(--color-card)}.bg-destructive{background-color:var(--color-destructive)}.bg-destructive\/5{background-color:#c2410c0d}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/5{background-color:color-mix(in oklab, var(--color-destructive) 5%, transparent)}}.bg-destructive\/10{background-color:#c2410c1a}@supports (color:color-mix(in lab, red, red)){.bg-destructive\/10{background-color:color-mix(in oklab, var(--color-destructive) 10%, transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/10{background-color:color-mix(in oklab, var(--color-emerald-500) 10%, transparent)}}.bg-emerald-500\/15{background-color:#00bb7f26}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/15{background-color:color-mix(in oklab, var(--color-emerald-500) 15%, transparent)}}.bg-foreground{background-color:var(--color-foreground)}.bg-foreground\/80{background-color:#1a1a1acc}@supports (color:color-mix(in lab, red, red)){.bg-foreground\/80{background-color:color-mix(in oklab, var(--color-foreground) 80%, transparent)}}.bg-muted{background-color:var(--color-muted)}.bg-muted-foreground\/40{background-color:#6b6b6b66}@supports (color:color-mix(in lab, red, red)){.bg-muted-foreground\/40{background-color:color-mix(in oklab, var(--color-muted-foreground) 40%, transparent)}}.bg-muted\/20{background-color:#f2f1ee33}@supports (color:color-mix(in lab, red, red)){.bg-muted\/20{background-color:color-mix(in oklab, var(--color-muted) 20%, transparent)}}.bg-muted\/30{background-color:#f2f1ee4d}@supports (color:color-mix(in lab, red, red)){.bg-muted\/30{background-color:color-mix(in oklab, var(--color-muted) 30%, transparent)}}.bg-muted\/40{background-color:#f2f1ee66}@supports (color:color-mix(in lab, red, red)){.bg-muted\/40{background-color:color-mix(in oklab, var(--color-muted) 40%, transparent)}}.bg-muted\/50{background-color:#f2f1ee80}@supports (color:color-mix(in lab, red, red)){.bg-muted\/50{background-color:color-mix(in oklab, var(--color-muted) 50%, transparent)}}.bg-muted\/60{background-color:#f2f1ee99}@supports (color:color-mix(in lab, red, red)){.bg-muted\/60{background-color:color-mix(in oklab, var(--color-muted) 60%, transparent)}}.bg-popover{background-color:var(--color-popover)}.bg-primary{background-color:var(--color-primary)}.bg-secondary{background-color:var(--color-secondary)}.bg-sidebar{background-color:var(--color-sidebar)}.bg-sidebar-active{background-color:var(--color-sidebar-active)}.bg-transparent{background-color:#0000}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-slate-200{--tw-gradient-from:var(--color-slate-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-stone-200{--tw-gradient-from:var(--color-stone-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-zinc-200{--tw-gradient-from:var(--color-zinc-200);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-zinc-800{--tw-gradient-from:var(--color-zinc-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.via-amber-100\/80{--tw-gradient-via:#fef3c6cc}@supports (color:color-mix(in lab, red, red)){.via-amber-100\/80{--tw-gradient-via:color-mix(in oklab, var(--color-amber-100) 80%, transparent)}}.via-amber-100\/80{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-neutral-100{--tw-gradient-via:var(--color-neutral-100);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-sky-100\/70{--tw-gradient-via:#dff2feb3}@supports (color:color-mix(in lab, red, red)){.via-sky-100\/70{--tw-gradient-via:color-mix(in oklab, var(--color-sky-100) 70%, transparent)}}.via-sky-100\/70{--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-stone-700{--tw-gradient-via:var(--color-stone-700);--tw-gradient-via-stops:var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-via) var(--tw-gradient-via-position), var(--tw-gradient-to) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-neutral-800{--tw-gradient-to:var(--color-neutral-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-orange-100\/60{--tw-gradient-to:#ffedd599}@supports (color:color-mix(in lab, red, red)){.to-orange-100\/60{--tw-gradient-to:color-mix(in oklab, var(--color-orange-100) 60%, transparent)}}.to-orange-100\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-stone-50{--tw-gradient-to:var(--color-stone-50);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-stone-100{--tw-gradient-to:var(--color-stone-100);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.bg-repeat{background-repeat:repeat}.mask-no-clip{-webkit-mask-clip:no-clip;mask-clip:no-clip}.mask-repeat{-webkit-mask-repeat:repeat;mask-repeat:repeat}.fill-amber-400{fill:var(--color-amber-400)}.object-cover{object-fit:cover}.p-0{padding:0}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.p-\[16px\]{padding:16px}.p-px{padding:1px}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-5{padding-block:calc(var(--spacing) * 5)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pr-1{padding-right:var(--spacing)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3\.5{padding-right:calc(var(--spacing) * 3.5)}.pb-1{padding-bottom:var(--spacing)}.pb-32{padding-bottom:calc(var(--spacing) * 32)}.pl-1{padding-left:var(--spacing)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-4{padding-left:calc(var(--spacing) * 4)}.pl-7{padding-left:calc(var(--spacing) * 7)}.pl-8{padding-left:calc(var(--spacing) * 8)}.pl-10{padding-left:calc(var(--spacing) * 10)}.pl-12{padding-left:calc(var(--spacing) * 12)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[13px\]{font-size:13px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.text-balance{text-wrap:balance}.text-wrap{text-wrap:wrap}.text-clip{text-overflow:clip}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-500{color:var(--color-amber-500)}.text-amber-950{color:var(--color-amber-950)}.text-background{color:var(--color-background)}.text-destructive{color:var(--color-destructive)}.text-destructive-foreground{color:var(--color-destructive-foreground)}.text-emerald-600{color:var(--color-emerald-600)}.text-emerald-700{color:var(--color-emerald-700)}.text-emerald-800{color:var(--color-emerald-800)}.text-emerald-900{color:var(--color-emerald-900)}.text-foreground{color:var(--color-foreground)}.text-muted-foreground{color:var(--color-muted-foreground)}.text-neutral-500{color:var(--color-neutral-500)}.text-popover-foreground{color:var(--color-popover-foreground)}.text-primary-foreground{color:var(--color-primary-foreground)}.text-secondary-foreground{color:var(--color-secondary-foreground)}.text-sidebar-fg{color:var(--color-sidebar-fg)}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.italic{font-style:italic}.italic\!{font-style:italic!important}.not-italic{font-style:normal}.diagonal-fractions{--tw-numeric-fraction:diagonal-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.lining-nums{--tw-numeric-figure:lining-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.oldstyle-nums{--tw-numeric-figure:oldstyle-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.ordinal{--tw-ordinal:ordinal;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.proportional-nums{--tw-numeric-spacing:proportional-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.slashed-zero{--tw-slashed-zero:slashed-zero;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.stacked-fractions{--tw-numeric-fraction:stacked-fractions;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.normal-nums{font-variant-numeric:normal}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.overline{text-decoration-line:overline}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.subpixel-antialiased{-webkit-font-smoothing:auto;-moz-osx-font-smoothing:auto}.opacity-0{opacity:0}.opacity-1{opacity:.01}.opacity-40{opacity:.4}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a), 0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.inset-ring{--tw-inset-ring-shadow:inset 0 0 0 1px var(--tw-inset-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-border{--tw-ring-color:var(--color-border)}.ring-ring{--tw-ring-color:var(--color-ring)}.outline,.outline-1{outline-style:var(--tw-outline-style);outline-width:1px}.-outline-offset-1{outline-offset:calc(1px * -1)}.outline-black\/10{outline-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.outline-black\/10{outline-color:color-mix(in oklab, var(--color-black) 10%, transparent)}}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur\!{--tw-blur:blur(8px)!important;filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)!important}.blur-\[4px\]{--tw-blur:blur(4px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-none{--tw-blur: ;filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow{--tw-drop-shadow-size:drop-shadow(0 1px 2px var(--tw-drop-shadow-color,#0000001a)) drop-shadow(0 1px 1px var(--tw-drop-shadow-color,#0000000f));--tw-drop-shadow:drop-shadow(0 1px 2px #0000001a) drop-shadow(0 1px 1px #0000000f);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.sepia{--tw-sepia:sepia(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-grayscale{--tw-backdrop-grayscale:grayscale(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-invert{--tw-backdrop-invert:invert(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-sepia{--tw-backdrop-sepia:sepia(100%);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background-color\,color\,opacity\,box-shadow\,transform\]{transition-property:background-color,color,opacity,box-shadow,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[box-shadow\]{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[opacity\,filter\,scale\]{transition-property:opacity,filter,scale;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[scale\,background-color\]{transition-property:scale,background-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[scale\,opacity\,filter\]{transition-property:scale,opacity,filter;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\,opacity\]{transition-property:width,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-\[cubic-bezier\(0\.2\,0\,0\,1\)\]{--tw-ease:cubic-bezier(.2,0,0,1);transition-timing-function:cubic-bezier(.2,0,0,1)}.ease-in{--tw-ease:var(--ease-in);transition-timing-function:var(--ease-in)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.fade-in-0{--tw-enter-opacity:0}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.zoom-in-95{--tw-enter-scale:.95}:where(.divide-x-reverse>:not(:last-child)){--tw-divide-x-reverse:1}.paused{animation-play-state:paused}.ring-inset{--tw-ring-inset:inset}.running{animation-play-state:running}.zoom-in{--tw-enter-scale:0}.zoom-out{--tw-exit-scale:0}@media (hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/cover\:opacity-100:is(:where(.group\/cover):hover *){opacity:1}}.placeholder\:text-muted-foreground::placeholder{color:var(--color-muted-foreground)}.placeholder\:text-muted-foreground\/50::placeholder{color:#6b6b6b80}@supports (color:color-mix(in lab, red, red)){.placeholder\:text-muted-foreground\/50::placeholder{color:color-mix(in oklab, var(--color-muted-foreground) 50%, transparent)}}.placeholder\:text-muted-foreground\/60::placeholder{color:#6b6b6b99}@supports (color:color-mix(in lab, red, red)){.placeholder\:text-muted-foreground\/60::placeholder{color:color-mix(in oklab, var(--color-muted-foreground) 60%, transparent)}}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:top-1\/2:after{content:var(--tw-content);top:50%}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:size-10:after{content:var(--tw-content);width:calc(var(--spacing) * 10);height:calc(var(--spacing) * 10)}.after\:-translate-1\/2:after{content:var(--tw-content);--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}@media (hover:hover){.hover\:border-border:hover{border-color:var(--color-border)}.hover\:border-foreground\/40:hover{border-color:#1a1a1a66}@supports (color:color-mix(in lab, red, red)){.hover\:border-foreground\/40:hover{border-color:color-mix(in oklab, var(--color-foreground) 40%, transparent)}}.hover\:bg-black\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-black\/5:hover{background-color:color-mix(in oklab, var(--color-black) 5%, transparent)}}.hover\:bg-destructive\/90:hover{background-color:#c2410ce6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-destructive\/90:hover{background-color:color-mix(in oklab, var(--color-destructive) 90%, transparent)}}.hover\:bg-muted:hover{background-color:var(--color-muted)}.hover\:bg-muted\/40:hover{background-color:#f2f1ee66}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/40:hover{background-color:color-mix(in oklab, var(--color-muted) 40%, transparent)}}.hover\:bg-muted\/70:hover{background-color:#f2f1eeb3}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/70:hover{background-color:color-mix(in oklab, var(--color-muted) 70%, transparent)}}.hover\:bg-muted\/80:hover{background-color:#f2f1eecc}@supports (color:color-mix(in lab, red, red)){.hover\:bg-muted\/80:hover{background-color:color-mix(in oklab, var(--color-muted) 80%, transparent)}}.hover\:bg-neutral-100:hover{background-color:var(--color-neutral-100)}.hover\:bg-primary\/90:hover{background-color:#1a1a1ae6}@supports (color:color-mix(in lab, red, red)){.hover\:bg-primary\/90:hover{background-color:color-mix(in oklab, var(--color-primary) 90%, transparent)}}.hover\:bg-secondary\/80:hover{background-color:#f2f1eecc}@supports (color:color-mix(in lab, red, red)){.hover\:bg-secondary\/80:hover{background-color:color-mix(in oklab, var(--color-secondary) 80%, transparent)}}.hover\:bg-sidebar-hover:hover{background-color:var(--color-sidebar-hover)}.hover\:text-foreground:hover{color:var(--color-foreground)}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}}.focus\:border-border:focus{border-color:var(--color-border)}.focus\:bg-background:focus{background-color:var(--color-background)}.focus\:bg-muted:focus{background-color:var(--color-muted)}.focus\:text-destructive:focus{color:var(--color-destructive)}.focus\:ring-0:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-ring\/30:focus{--tw-ring-color:#a3a3a34d}@supports (color:color-mix(in lab, red, red)){.focus\:ring-ring\/30:focus{--tw-ring-color:color-mix(in oklab, var(--color-ring) 30%, transparent)}}.focus\:ring-ring\/40:focus{--tw-ring-color:#a3a3a366}@supports (color:color-mix(in lab, red, red)){.focus\:ring-ring\/40:focus{--tw-ring-color:color-mix(in oklab, var(--color-ring) 40%, transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-ring\/40:focus-visible{--tw-ring-color:#a3a3a366}@supports (color:color-mix(in lab, red, red)){.focus-visible\:ring-ring\/40:focus-visible{--tw-ring-color:color-mix(in oklab, var(--color-ring) 40%, transparent)}}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:scale-\[0\.96\]:active{scale:.96}.active\:scale-\[0\.98\]:active{scale:.98}.active\:not-disabled\:scale-\[0\.96\]:active:not(:disabled){scale:.96}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.aria-selected\:bg-muted[aria-selected=true]{background-color:var(--color-muted)}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=closed\]\:animate-out[data-state=closed]{animation:exit var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:animate-in[data-state=open]{animation:enter var(--tw-animation-duration,var(--tw-duration,.15s))var(--tw-ease,ease)var(--tw-animation-delay,0s)var(--tw-animation-iteration-count,1)var(--tw-animation-direction,normal)var(--tw-animation-fill-mode,none)}.data-\[state\=open\]\:bg-muted[data-state=open]{background-color:var(--color-muted)}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}@media not all and (width>=40rem){.max-sm\:-left-10{left:calc(var(--spacing) * -10)}}@media (width>=40rem){.sm\:-mx-6{margin-inline:calc(var(--spacing) * -6)}.sm\:ml-12{margin-left:calc(var(--spacing) * 12)}.sm\:flex{display:flex}.sm\:inline{display:inline}.sm\:inline-flex{display:inline-flex}.sm\:h-44{height:calc(var(--spacing) * 44)}.sm\:w-\[calc\(100\%-3rem\)\]{width:calc(100% - 3rem)}.sm\:max-w-\[200px\]{max-width:200px}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:px-3{padding-inline:calc(var(--spacing) * 3)}.sm\:px-12{padding-inline:calc(var(--spacing) * 12)}.sm\:pt-8{padding-top:calc(var(--spacing) * 8)}.sm\:pl-12{padding-left:calc(var(--spacing) * 12)}}@media (width>=48rem){.md\:block{display:block}.md\:hidden{display:none}.md\:inline-flex{display:inline-flex}}.dark\:border-neutral-700:is(.dark *){border-color:var(--color-neutral-700)}.dark\:bg-white\/10:is(.dark *){background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.dark\:bg-white\/10:is(.dark *){background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}.dark\:bg-white\/20:is(.dark *){background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.dark\:bg-white\/20:is(.dark *){background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.dark\:text-amber-100:is(.dark *){color:var(--color-amber-100)}.dark\:text-emerald-200:is(.dark *){color:var(--color-emerald-200)}.dark\:text-emerald-300:is(.dark *){color:var(--color-emerald-300)}.dark\:outline-white\/10:is(.dark *){outline-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.dark\:outline-white\/10:is(.dark *){outline-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}@media (hover:hover){.dark\:hover\:bg-neutral-900:is(.dark *):hover{background-color:var(--color-neutral-900)}.dark\:hover\:bg-white\/10:is(.dark *):hover{background-color:#ffffff1a}@supports (color:color-mix(in lab, red, red)){.dark\:hover\:bg-white\/10:is(.dark *):hover{background-color:color-mix(in oklab, var(--color-white) 10%, transparent)}}}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-inline:calc(var(--spacing) * 2)}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\[cmdk-group-heading\]\]\:text-\[11px\] [cmdk-group-heading]{font-size:11px}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\[cmdk-group-heading\]\]\:tracking-wide [cmdk-group-heading]{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:var(--color-muted-foreground)}.\[\&_\[cmdk-group-heading\]\]\:uppercase [cmdk-group-heading]{text-transform:uppercase}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:mx-auto svg{margin-inline:auto}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:max-w-full svg{max-width:100%}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}.dark{--color-background:#191919;--color-foreground:#e8e8e8;--color-card:#202020;--color-card-foreground:#e8e8e8;--color-popover:#252525;--color-popover-foreground:#e8e8e8;--color-primary:#e8e8e8;--color-primary-foreground:#191919;--color-secondary:#2a2a2a;--color-secondary-foreground:#e8e8e8;--color-muted:#2a2a2a;--color-muted-foreground:#9b9b9b;--color-accent:#2a2a2a;--color-accent-foreground:#e8e8e8;--color-destructive:#ea580c;--color-destructive-foreground:#fafafa;--color-border:#333;--color-input:#333;--color-ring:#6b6b6b;--color-sidebar:#202020;--color-sidebar-fg:#cfcfcf;--color-sidebar-border:#2e2e2e;--color-sidebar-hover:#2a2a2a;--color-sidebar-active:#2f2f2f}@media (prefers-reduced-motion:reduce){*,:before,:after{transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}.ui-freeze *,.ui-freeze :before,.ui-freeze :after{caret-color:#0000!important;transition:none!important;animation:none!important}.ui-freeze [data-sonner-toaster]{display:none!important}.ui-freeze [data-volatile]{visibility:hidden!important}.ui-reveal [data-hover-reveal]{opacity:1!important}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-pan-x{syntax:"*";inherits:false}@property --tw-pan-y{syntax:"*";inherits:false}@property --tw-pinch-zoom{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0)scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1))rotate(var(--tw-enter-rotate,0));filter:blur(var(--tw-enter-blur,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0)scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1))rotate(var(--tw-exit-rotate,0));filter:blur(var(--tw-exit-blur,0))}} diff --git a/dist-desktop/assets/swimlanes-5IMT3BWC-hyAz1L8O.js b/dist-desktop/assets/swimlanes-5IMT3BWC-hyAz1L8O.js deleted file mode 100644 index 62a43b1..0000000 --- a/dist-desktop/assets/swimlanes-5IMT3BWC-hyAz1L8O.js +++ /dev/null @@ -1,2 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-X5ZJPWSS-B0uUizjq.js","assets/chunk-Y2CYZVJY-DsF7k-Jl.js"])))=>i.map(i=>d[i]); -import{t as e}from"./index-CXgd9jpl.js";import{n as t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n}from"./src-UMNXGZaF.js";import{b as r,x as i}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{g as a}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import"./chunk-HOUHSVGY-iJuv90UH.js";import"./chunk-Q4XR5HBZ-CQ8zkLYc.js";import{r as o}from"./chunk-7BUUIJ7U-Bb538aSH.js";import{n as s}from"./chunk-OGEWGWER-D-nWYRNR.js";import{t as c}from"./graphlib-DS17s2tU.js";import{n as l}from"./chunk-RYQCIY6F-Dtr3kkSR.js";import"./chunk-C7G6YPKG-DW-1jWUA.js";import{a as u,c as d,i as f,n as p,t as m}from"./chunk-ZGVPDNZ5-DGInJAPD.js";import{a as h,i as g,n as _,r as v,s as y,t as b}from"./chunk-52WLFC77-BOCvVCX1.js";async function x(t,n){let r=new c({multigraph:!0,compound:!0}),a=[...n.edges],o=i(),s=t.insert(`g`).attr(`class`,`root`),l=s.insert(`g`).attr(`class`,`clusters`),d=s.insert(`g`).attr(`class`,`edges edgePath`),f=s.insert(`g`).attr(`class`,`edgeLabels`),p=s.insert(`g`).attr(`class`,`nodes`),m=new Map,h=t.node()!=null;await Promise.all(n.nodes.map(async e=>{if(e.isGroup)r.setNode(e.id,{...e});else{if(h){let t=await u(p,e,{config:o,dir:e.dir}),n=t.node()?.getBBox()??{width:0,height:0};m.set(e.id,t),e.width=n.width,e.height=n.height}r.setNode(e.id,{...e})}}));for(let e of a)r.setEdge(e.start,e.end,{...e},e.id),n.edges.some(t=>t.id===e.id)||n.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:r}=await e(async()=>{let{captureNodeSizes:e}=await import(`./sizeCapture-X5ZJPWSS-B0uUizjq.js`);return{captureNodeSizes:e}},__vite__mapDeps([0,1]));r(t,n)}return{graph:r,groups:{clusters:l,edgePaths:d,edgeLabels:f,nodes:p,rootGroups:s},nodeElements:m}}t(x,`createGraphWithElements`);var S=5,C=1e-5,w=1e-6;function T(e){let t=[];for(let n=0;n=1-w||f<=w||f>=1-w?null:{point:{x:e.x+d*i,y:e.y+d*a},tA:d,tB:f}}t(E,`segmentIntersection`);function D(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}t(D,`isHorizontalSeg`);function O(e){let t=[];for(let n=0;n=Math.abs(n)?+(t>=0):+(n>=0)}t(j,`getArcSweepFlag`);var ee=.001;function te(e,t){if(e.length<2)return e.map(e=>({...e}));let n=e.map(e=>({...e})),r=t.arrowTypeStart&&o[t.arrowTypeStart];if(r){let t=e[0],i=e[1],a=Math.atan2(i.y-t.y,i.x-t.x);n[0].x=t.x+r*Math.cos(a),n[0].y=t.y+r*Math.sin(a)}let i=t.arrowTypeEnd&&o[t.arrowTypeEnd];if(i){let t=e.length,r=e[t-2],a=e[t-1],o=Math.atan2(a.y-r.y,a.x-r.x);n[t-1].x=a.x-i*Math.cos(o),n[t-1].y=a.y-i*Math.sin(o)}return n}t(te,`applyMarkerOffsets`);function M(e,t,n,r,i){let a=e.point.x,o=e.point.y,s={x:a-t*e.r,y:o-n*e.r},c={x:a+t*e.r,y:o+n*e.r},l=[`L${A(s)}`];return i===`arc`?l.push(`A${k(e.r)},${k(e.r)} 0 0 ${r} ${A(c)}`):l.push(`M${A(c)}`),l}t(M,`emitJump`);function ne(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=n.x-t.x,s=n.y-t.y,c=Math.hypot(i,a),l=Math.hypot(o,s);if(c0){let t=ne(i[e-1],i[e],i[e+1]??i[e],S);t&&(f=t.cutLen)}let p=r,m=null;a&&ee.t-t.t);for(let e of h)e.r=Math.min(e.r,e.d-f,p-e.d);for(let e=0;et){let n=t/2;h[e].r=Math.min(h[e].r,n),h[e+1].r=Math.min(h[e+1].r,n)}}for(let e of h)e.r=2?r:null}catch{return null}}t(ie,`decodeDataPoints`);function ae(e,t,n){if(!n.enabled)return;let r=e.node();if(!r)return;let i=new Map;for(let e of t)i.set(e.id,e);let a=[],o=new Map;for(let e of t){let t=typeof CSS<`u`&&CSS.escape?CSS.escape(e.id):e.id,n=r.querySelector(`path[data-id="${t}"]`);if(!n)continue;o.set(e.id,n);let i=ie(n.getAttribute(`data-points`))??e.points;a.push({...e,points:i})}let s=O(a);if(s.length===0)return;let c=new Map;for(let e of s){let t=c.get(e.jumpEdgeId)??[];t.push(e),c.set(e.jumpEdgeId,t)}for(let e of a){let t=c.get(e.id);if(!t||t.length===0)continue;let r=i.get(e.id)?.curve;if(r!==void 0&&!P(r))continue;let a=o.get(e.id);if(!a||r===void 0&&!re(a.getAttribute(`d`)??``))continue;let s=a.getAttribute(`style`)??``,l=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(s),u=l?Number.parseFloat(l[1]):null,d=l?Number.parseFloat(l[2]):null,f=N(e,t,n);if(a.setAttribute(`d`,f),u!==null&&d!==null&&typeof a.getTotalLength==`function`){let e=a.getTotalLength(),t=`0 ${u} ${Math.max(0,e-u-d)} ${d}`,n=s.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${t};`).replace(/;\s*;+/g,`;`);a.setAttribute(`style`,n)}}}t(ae,`applyLineJumpsToSvg`);async function oe(e,t){for(let n of e.nodes)n.isGroup?await f(t.clusters,n):d(n);let n=new Map;for(let t of e.nodes)t?.id&&n.set(t.id,t);for(let r of e.edges){let i=r.start?n.get(r.start)??{}:{},a=r.end?n.get(r.end)??{}:{},o=v(t.edgePaths,{...r},{},e.type,i,a,e.diagramId);r.label&&await g(t.rootGroups,r),r.label&&se(r,o)}let r=e.config?.swimlane?.lineHops;if(r!==!1){let n=r===`gap`?`gap`:`arc`,i=e.edges.filter(e=>Array.isArray(e.points)&&e.points.length>=2).map(e=>({id:e.id,points:e.points,curve:e.curve,arrowTypeStart:e.arrowTypeStart,arrowTypeEnd:e.arrowTypeEnd}));ae(t.edgePaths,i,{enabled:!0,jumpRadius:6,jumpStyle:n})}}t(oe,`adjustLayout`);function se(e,t){let i=t?.updatedPath??t?.originalPath,{subGraphTitleTotalMargin:o}=s({flowchart:r().flowchart??{}});if(e.label){let r=_.get(e.id),s=e.x,c=e.y;if(i){let r=a.calcLabelPosition(i);n.debug(`Moving label `+e.label+` from (`,s,`,`,c,`) to (`,r.x,`,`,r.y,`) abc88`),t&&(s=r.x,c=r.y)}r.attr(`transform`,`translate(${s}, ${c+o/2})`)}if(e?.startLabelLeft){let t=y.get(e.id).startLeft,n=e?.x,r=e?.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.startLabelRight){let t=y.get(e.id).startRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelLeft){let t=y.get(e.id).endLeft,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}if(e.endLabelRight){let t=y.get(e.id).endRight,n=e.x,r=e.y;if(i){let t=a.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,i);n=t.x,r=t.y}t.attr(`transform`,`translate(${n}, ${r})`)}}t(se,`positionEdgeLabel`);var ce=`__swimlane_default__`,le=21,ue=20;function de(e){return Math.max(e.padding??ue,ue)}t(de,`topLaneHorizontalPadding`);function fe(e){let{x:t,y:n,width:r,height:i}=e,a=e.swimlaneContentTop;if(typeof t!=`number`||typeof n!=`number`||typeof r!=`number`||typeof i!=`number`||typeof a!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||r<=0||i<=0){delete e.groupTitleRect;return}let o=n-i/2,s=Math.min(a,n+i/2),c=o+Math.min(le,Math.max(0,s-o));if(c<=o){delete e.groupTitleRect;return}e.groupTitleRect={left:t-r/2,right:t+r/2,top:o,bottom:c}}t(fe,`assignTopLaneTitleRect`);function pe(e){let t=e.direction,n=e.nodes??=[];for(let n of e.nodes??[])n.isGroup&&!n.parentId&&(n.shape=`swimlane`,t&&(n.direction=t));let r=n.filter(e=>!e.isGroup&&!e.parentId);if(r.length===0)return;let i=n.find(e=>e.id===ce);i?i.isGroup&&(i.shape=`swimlane`,t&&(i.direction=t)):(i={id:ce,label:``,isGroup:!0,shape:`swimlane`,padding:20,...t?{direction:t}:{}},n.push(i));for(let e of r)e.parentId=ce}t(pe,`prepareLayoutForSwimlanes`);function F(e){let t=new Map;for(let n of e.nodes??[])t.set(n.id,n);let n=[];for(let t of e.edges??[]){let e=typeof t.start==`string`?t.start:void 0,r=typeof t.end==`string`?t.end:void 0;!e||!r||t.labelNodeId||n.push({id:t.id,src:e,dst:r,ref:t})}let r=e.nodes??[],i=r.filter(e=>e.isGroup),a=r.filter(e=>!e.isGroup);return{nodes:[...[...i].reverse(),...a].map(e=>e.id),edges:n,layout:e,nodeById:t}}t(F,`toGraphView`);function I(e,t,n,r){let{layout:i}=e,a=e.nodeById,o=r?.layerGap??100,s=r?.nodeGap??40,c=0;for(let e of t.layers){let t=0;for(let r of e){let e=a.get(r);if(!e){t++;continue}e.layer=c,e.order=t;let i=n.x[r]??t*s,l=n.y[r]??c*o;e.x=i,e.y=l,t++}c++}let l=i.nodes??[],u=new Map,d=[];for(let e of l){if(!e?.isGroup)continue;e.parentId||d.push(e);let t=l.filter(t=>t.parentId===e.id),r=1/0,i=-1/0,a=1/0,o=-1/0;for(let e of t){let t=e.x??n.x[e.id],s=e.y??n.y[e.id],c=e.width??0,l=e.height??0;t!=null&&s!=null&&(r=Math.min(r,t-c/2),i=Math.max(i,t+c/2),a=Math.min(a,s-l/2),o=Math.max(o,s+l/2))}if(r===1/0||a===1/0)e.x=e.x??0,e.y=e.y??0,e.width=e.width??0,e.height=e.height??0;else{let t=e.padding??20,n=e.parentId?t:2*de(e),s=t,c=Math.max(0,i-r)+n,l=Math.max(0,o-a)+s,d=(r+i)/2,f=(a+o)/2;e.x=d,e.y=f,e.width=c,e.height=l,u.set(e.id,{minX:r,maxX:i,minY:a,maxY:o})}}if(d.length>0&&u.size>0){let e=1/0,t=-1/0,n=0;for(let r of d){let i=r.padding??20;i>n&&(n=i);let a=u.get(r.id);a&&(e=Math.min(e,a.minY),t=Math.max(t,a.maxY))}if(e!==1/0&&t!==-1/0){let r=Math.max(0,t-e)+2*Math.max(n,36),i=(e+t)/2;for(let t of d)t.y=i,t.height=r,t.swimlaneContentTop=e;let a=[...d].sort((e,t)=>(e.x??0)-(t.x??0)),o=[],s=[],c=[];for(let e of a){let t=u.get(e.id);if(!t)continue;let n=Math.max(0,t.maxX-t.minX)+2*de(e),r=(t.minX+t.maxX)/2;o.push(e.id),s.push(r),c.push(n)}let l=o.length;if(l>0){let e=new Map;if(l===1)e.set(o[0],c[0]);else{let t=[];for(let e=0;e0&&i>0?{cx:t,cy:n,rect:Ee(t,n,r,i)}:void 0}t(ge,`measuredNodeRect`);function _e(e){if(e.isGroup)return;let t=ge(e);if(t)return{id:String(e.id??``),cx:t.cx,cy:t.cy,rect:t.rect}}t(_e,`nodeBoundsInfoFor`);function R(e,t,n=L){return Math.abs(e.x-t.x)n}t(V,`isHorizontalSegment`);function H(e,t,n=L){return z(e,t,n)&&Math.abs(e.y-t.y)>n}t(H,`isVerticalSegment`);function U(e,t,n,r){return Math.max(0,Math.min(Math.max(e,t),Math.max(n,r))-Math.max(Math.min(e,t),Math.min(n,r)))}t(U,`overlapLength`);function ve(e,t,n=L){return e.horizontal&&t.horizontal&&B(e.a,t.a,n)?U(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&z(e.a,t.a,n)?U(e.a.y,e.b.y,t.a.y,t.b.y):0}t(ve,`sameAxisSegmentOverlapLength`);function ye(e,t=L){let n=[];for(let r=0;r0?n[n.length-1]:void 0;(!e||!R(e,r,t))&&n.push({x:r.x,y:r.y})}return n}t(G,`dedupeConsecutivePoints`);function be(e,t=L){if(!e||e.length!==4)return;let[n,r,i,a]=e;return V(n,r,t)&&H(r,i,t)&&V(i,a,t)?{kind:`HVH`,p0:n,p1:r,p2:i,p3:a}:H(n,r,t)&&V(r,i,t)&&H(i,a,t)?{kind:`VHV`,p0:n,p1:r,p2:i,p3:a}:void 0}t(be,`classifyThreeSegmentRoute`);function xe(e,t,n,r=0){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return a>n.left-r&&in.top-r&&ot.left+n&&e.xt.top+n&&e.y=t.right&&e.top<=t.top&&e.bottom>=t.bottom}t(Ce,`rectContainsRect`);function we(e,t){return e.leftt.left&&e.topt.top}t(we,`rectsOverlap`);function Te(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}t(Te,`inflateRect`);function Ee(e,t,n,r){return{left:e-n/2,right:e+n/2,top:t-r/2,bottom:t+r/2}}t(Ee,`rectFromCenterSize`);function K(e){return ge(e)?.rect}t(K,`rectOfNodeBounds`);function De(e,t){switch(t){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(De,`portForRectSide`);function Oe(e,t,n,r,i,a=L){let o=t===`left`||t===`right`,s=r===`left`||r===`right`;if(o&&s){if(t===`right`&&r===`left`&&e.xn.x){if(B(e,n,a))return[e,n];let t=(e.x+n.x)/2;return[e,{x:t,y:e.y},{x:t,y:n.y},n]}if(t===r){if(B(e,n,a))return;let r=t===`left`?Math.min(e.x,n.x)-i:Math.max(e.x,n.x)+i;return[e,{x:r,y:e.y},{x:r,y:n.y},n]}return}if(!o&&!s){if(t===r){if(z(e,n,a))return;let r=t===`top`?Math.min(e.y,n.y)-i:Math.max(e.y,n.y)+i;return[e,{x:e.x,y:r},{x:n.x,y:r},n]}if(!(t===`bottom`&&r===`top`&&e.yn.y))return;if(z(e,n,a))return[e,n];let o=(e.y+n.y)/2;return[e,{x:e.x,y:o},{x:n.x,y:o},n]}if(o&&!s){let i=t===`right`&&n.x>e.x||t===`left`&&n.xn.y;return i&&a?[e,{x:n.x,y:e.y},n]:void 0}let c=t===`bottom`&&n.y>e.y||t===`top`&&n.yn.x;return c&&l?[e,{x:e.x,y:n.y},n]:void 0}t(Oe,`buildOrthogonalPortPath`);function ke(e,t,n,r){return t===`left`||t===`right`?[e,{x:r,y:e.y},{x:r,y:n.y},n]:[e,{x:e.x,y:r},{x:n.x,y:r},n]}t(ke,`buildSameSideTrackPath`);function Ae(e){let t=new Map,n=[];for(let r of e){if(r.isEdgeLabel)continue;let e=_e(r);e&&(t.set(e.id,e),n.push({id:e.id,rect:e.rect}))}return{nodeInfoById:t,realNodeRects:n}}t(Ae,`collectRealNodeBounds`);function je(e){let t=[],n=[];for(let r of e){let e=_e(r);if(!e)continue;let i={id:e.id,rect:e.rect};r.isEdgeLabel?n.push(i):t.push(i)}return{realNodeRects:t,labelNodeRects:n}}t(je,`collectNodeRectEntries`);function Me(e,{includeEdgeLabels:t=!0}={}){let n=[];for(let r of e){if(r.isGroup||!t&&r.isEdgeLabel)continue;let e=r.x??0,i=r.y??0,a=r.width??0,o=r.height??0;n.push({nodeId:r.id,...Ee(e,i,a,o)})}return n}t(Me,`collectLayoutNodeRects`);function Ne(e,t,n=L){let r=e.start,i=e.end;if(!r||!i)return;let a=t.get(r),o=t.get(i);if(!(!a||!o))return{srcId:r,dstId:i,srcInfo:a,dstInfo:o,collinearX:Math.abs(a.cx-o.cx)m||f_)return!1;let v=Math.abs(h-u.a.x)i:a&&s&&B(e,n,i)?U(e.x,t.x,n.x,r.x)>i:!1}t(Fe,`sameAxisSegmentsOverlap`);function Ie(e,t,n,r,{epsilon:i=L,skipDegenerateOther:a=!1}={}){for(let o of n){if(o===r||o.isLayoutOnly)continue;let n=o.points;if(!(!n||n.length<2))for(let r=0;rf+i&&mh+i&&dr+L&&e=2?t[t.length-2]:void 0,n=e&&z(e,r)?{x:r.x,y:i.y}:{x:i.x,y:r.y};t.push(n)}t.push(i)}let n=[];for(let e of t){let t=n[n.length-1];(!t||!R(t,e))&&n.push(e)}return n}t(Ve,`orthogonalizePolyline`);function He(e){if(e.length<3)return e;let t=[...e];for(let e=0;e<32;e++){let e=Be(t);if(t=e.points,!e.changed)break}return t}t(He,`simplifyPolyline`);var J=.001,Ue=.5,We=4;function Ge(e,t,n){let r=e;if(r.isLayoutOnly||!r.points||r.points.length=0&&i=e.length)return e;let a=i-r;if(a<0||a>=e.length)return e;let o=Ke(e[i],e[a],t);return n?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}t(qe,`clipEndpoint`);function Je(e,t){for(let n of e){let e=Ge(n,t,2);if(!e)continue;let r=[...e.points];e.srcRect&&(r=qe(r,e.srcRect,!0)),e.dstRect&&(r=qe(r,e.dstRect,!1)),r=He(Ve(r)),r=at(r,e.srcRect,e.dstRect),e.edge.points=He(Ve(r))}}t(Je,`clipEdgeEndpointsToNodeBoundaries`);function Ye(e,t,n,r=!1){if(B(e,t,J)){if(t.yn.bottom+J)return t;if(r){if(e.xn.right+J)return{x:n.right,y:e.y}}return{x:Math.abs(t.x-n.left)<=Math.abs(t.x-n.right)?n.left:n.right,y:e.y}}if(z(e,t,J)){if(t.xn.right+J)return t;if(r){if(e.yn.bottom+J)return{x:e.x,y:n.bottom}}let i=Math.abs(t.y-n.top)<=Math.abs(t.y-n.bottom);return{x:e.x,y:i?n.top:n.bottom}}return t}t(Ye,`snapEndpointToBoundary`);function Xe(e,t,n){let r=e[t];for(let i=t+n;i>=0&&ie.lo)),n=Math.min(...e.map(e=>e.hi));if(!(t>n))return{lo:t,hi:n}}t($e,`intersectRanges`);function et(e,t){return t===`left`||t===`right`?Ze(e.top,e.bottom):Ze(e.left,e.right)}t(et,`clearanceRangeForSide`);function tt(e,t,n){let r=e.y>=n.top-J&&e.y<=n.bottom+J,i=e.x>=n.left-J&&e.x<=n.right+J;if(B(e,t,J)&&r){if(Math.abs(e.x-n.left)0?$e(a):void 0}t(rt,`straightClearanceRange`);function it(e,t,n,r,i){let a=rt(e,t,n,r,i);if(!a)return;let o=i?e.y:e.x,s=Math.min(a.hi,Math.max(a.lo,o));if(!(Math.abs(s-o)({...e}));for(let s=t;s>=0&&s=n.left-J&&Math.max(e.x,t.x)<=n.right+J,i=Math.min(e.y,t.y)>=n.top-J&&Math.max(e.y,t.y)<=n.bottom+J;if(Math.abs(e.y-n.top)r.bottom+J;case`left`:return B(t,n,J)&&n.xr.right+J}}t(ut,`leavesOutward`);function dt(e,t,n){if(e.length<3)return e;if(n){let n=lt(e[0],e[1],t);return n&&ut(n,e[1],e[2],t)?e.slice(1):e}let r=e.length-1,i=lt(e[r-1],e[r],t);return i&&ut(i,e[r-1],e[r-2],t)?e.slice(0,r):e}t(dt,`collapseOwnBorderStub`);function ft(e,t,n){let r=e;if(t){let e=Xe(r,0,1);if(e){let n=Ye(e,r[0],t);n!==r[0]&&(r=[n,...r.slice(1)])}r=dt(r,t,!0)}if(n){let e=r.length-1,t=Xe(r,e,-1);if(t){let i=Ye(t,r[e],n,!0);i!==r[e]&&(r=[...r.slice(0,e),i])}r=dt(r,n,!1)}let i=at(r,t,n);return i!==r||r.length===2?i:(t&&(r=ct(r,t,!0)),n&&(r=ct(r,n,!1)),r)}t(ft,`snapAndCollapseEndpoints`);function pt(e,t){for(let n of e){let e=Ge(n,t,2);if(!e)continue;let r=ft(G(e.points,J),e.srcRect,e.dstRect);if(r.length<3){e.edge.points=r;continue}let i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];e.edge.points=i}}t(pt,`prepareEdgeEndpointsForRenderer`);function mt(e){return new Map(e.map(e=>[e.id,e]))}t(mt,`buildNodeMap`);function ht(e,t){let n=e.parentId,r=null;for(;n;){let e=t.get(n);if(!e?.isGroup)break;r=e.id,n=e.parentId}return r}t(ht,`resolveTopLevelGroupId`);function gt(e,t){let n=0,r=e.parentId;for(;r;){let e=t.get(r);if(!e?.isGroup)break;n++,r=e.parentId}return n}t(gt,`groupDepth`);function _t(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;for(let a of e){let e=a.x,o=a.y;if(typeof e!=`number`||typeof o!=`number`)continue;let s=a.width??0,c=a.height??0;t=Math.min(t,e-s/2),n=Math.max(n,e+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}return t===1/0||r===1/0?null:{minX:t,maxX:n,minY:r,maxY:i}}t(_t,`boundsForChildren`);function vt(e,t){let n=e.padding??20;e.x=(t.minX+t.maxX)/2,e.y=(t.minY+t.maxY)/2,e.width=Math.max(0,t.maxX-t.minX)+n,e.height=Math.max(0,t.maxY-t.minY)+n}t(vt,`applyGroupBounds`);function yt(e){let t=mt(e),n=e.filter(e=>e.isGroup&&e.parentId).sort((e,n)=>gt(n,t)-gt(e,t));for(let t of n){let n=_t(e.filter(e=>e.parentId===t.id));n&&vt(t,n)}}t(yt,`recomputeNestedGroupBounds`);function bt(e,n){let r=e.nodes??[],i=e.edges??[],a=r.filter(e=>!e.isGroup),o=1/0,s=-1/0;for(let e of a){let t=e[n];typeof t==`number`&&(o=Math.min(o,t),s=Math.max(s,t))}if(!Number.isFinite(o)||!Number.isFinite(s))return!1;let c=t(e=>o+s-e,`mirror`);for(let e of r){let t=e[n];typeof t==`number`&&(e[n]=c(t));let r=e.groupTitleRect;r&&(e.groupTitleRect=n===`x`?{...r,left:c(r.right),right:c(r.left)}:{...r,top:c(r.bottom),bottom:c(r.top)})}for(let e of i)for(let t of e.points??[])t[n]=c(t[n]);return!0}t(bt,`mirrorAxis`);function xt(e){return!(e.nodes??[]).some(e=>!e.isGroup)||bt(e,`y`)}t(xt,`applyBtDirectionTransform`);function St(e,t=`LR`){let n=e.nodes??[],r=e.edges??[],i=n.filter(e=>!e.isGroup),a=1/0,o=1/0;for(let e of i){let t=e.x??0,n=e.y??0;t0?Math.max(1,l/u):1;for(let e of i){let t=e.x??0,n=((e.y??0)-o)*d+36,r=t-a;e.x=n,e.y=r}for(let e of r)if(e.points)for(let t of e.points){let e=t.x,n=(t.y-o)*d+36,r=e-a;t.x=n,t.y=r}yt(n);let f=n.filter(e=>e.isGroup&&!e.parentId);if(f.length===0)return t===`RL`&&bt(e,`x`),!0;let p=mt(n),m=new Map;for(let e of n){if(e.isGroup)continue;let t=ht(e,p);if(!t)continue;let n=m.get(t)??[];n.push(e),m.set(t,n)}let h=0;for(let e of f){let t=e.padding??0;t>h&&(h=t)}let g=[],_=1/0,v=-1/0;for(let e of f){let t=_t(m.get(e.id)??[]);t&&(_=Math.min(_,t.minX),v=Math.max(v,t.maxX),g.push({lane:e,contentTop:t.minY,contentBottom:t.maxY,centerY:(t.minY+t.maxY)/2}))}if(_===1/0||v===-1/0)return!0;let y=Math.max(0,v-_)+2*Math.max(h,10),b=36+y,x=(_+v)/2-y/2-36,S=x+b/2,C=Math.max(h,36);g.sort((e,t)=>e.centerY-t.centerY);for(let e=0;ed.cy?g.bottom:g.top,t=d.cx+n;if(t<=g.left+Ct||t>=g.right-Ct)continue;i={x:t,y:e},a={x:t,y:o.y},c={x:o.x,y:o.y}}else{let e=f.cx>d.cx?g.right:g.left,t=d.cy+n;if(t<=g.top+Ct||t>=g.bottom-Ct)continue;i={x:e,y:t},a={x:o.x,y:t},c={x:o.x,y:o.y}}let p=R(i,a,Ct),m=R(a,c,Ct);if(p&&m||!p&&q(i,a,r,[l],1)||!m&&q(a,c,r,[u],1))continue;let _=!p&&Ie(i,a,e,t,{epsilon:Ct,skipDegenerateOther:!0}),v=!m&&Ie(a,c,e,t,{epsilon:Ct,skipDegenerateOther:!0});if(!(_||v)){h=p?[a,c]:m?[i,a]:[i,a,c];break}}h&&(t.points=h)}}t(Et,`portSwapToLShape`);function Dt(e,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=je(n.values());for(let o of e){if(o.isLayoutOnly)continue;let s=o.points;if(!s||s.length<4)continue;let c=G(s,r);if(c.length<4)continue;let l=c.length-1,u=c[l],d=c[l-1],f=c[l-2],p=u.x-d.x,m=u.y-d.y,h=Math.hypot(p,m);if(h>=10||h0;O={x:f.x,y:E},k={x:e?D.right:D.left,y:E}}if(q(O,k,i,S?[S]:[],-2)||q(O,k,a,[],-2))continue;if(C){let e=n.get(C),t=e?K(e):void 0;if(t&&Se(O,t,2))continue}let A=t((e,t)=>`${e.x.toFixed(3)},${e.y.toFixed(3)}|${t.x.toFixed(3)},${t.y.toFixed(3)}`,`ownSegmentKey`),j=new Set;for(let e=0;e{for(let i of e){if(i===o||i.isLayoutOnly)continue;let e=i.points;if(!(!e||e.length<2))for(let i=0;i=0){let e=c[l-3],t=[C,S].filter(e=>!!e);if(q(e,O,i,t,-2)||ee(e,O))continue}let te=[...c.slice(0,l-2),O,k];o.points=te;let M=o.labelNodeId;if(M){let e=n.get(M);if(e){let t=e.width??0,n=e.height??0;if(t>0&&n>0){let i,a,o=-1;for(let e=0;e=t+2||d&&l>=n+2)&&l>o&&(o=l,i=(s.x+c.x)/2,a=(s.y+c.y)/2)}i!==void 0&&a!==void 0&&(e.x=i,e.y=a)}}}}}t(Dt,`collapseShortTerminalStub`);var Y=.001,X=8,Z=ye,Ot=t((e,t)=>z(e,t,Y)||B(e,t,Y),`orthogonallyAligned`);function kt(e,n){let r=t((e,t)=>{let n=e.x??0,r=e.y??0,i=t.x-n,a=t.y-r,o=(e.width??0)/2,s=(e.height??0)/2;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),{x:n+(a===0?0:s*i/a),y:r+s}):(i<0&&(o=-o),{x:n+o,y:r+(i===0?0:o*a/i)})},`rectIntersect`),i=t((e,t)=>{let i=G(e.points??[]);if(i.length<2)return;let a=t?e.start:e.end,o=a?n.get(a):void 0,s=o?K(o):void 0;if(!o||!a||!s)return;let c=t?i[0]:i[i.length-1],l=t?i[1]:i[i.length-2],u=r(o,c),d=c;if(Ot(l,u)&&(d=l),z(u,d,Y))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`V`,coord:u.x,min:Math.min(u.y,d.y),max:Math.max(u.y,d.y),boundary:u,railEnd:d,rect:s};if(B(u,d,Y))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:t,orientation:`H`,coord:u.y,min:Math.min(u.x,d.x),max:Math.max(u.x,d.x),boundary:u,railEnd:d,rect:s}},`terminalLaneFor`),a=t((e,t)=>Math.max(0,Math.min(e.max,t.max)-Math.max(e.min,t.min)),`projectedOverlapLength`),o=t((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:e.orientation===`H`?(Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1)&&z(e.boundary,t.boundary,1):(Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1)&&B(e.boundary,t.boundary,1),`sameTerminalFace`),s=t((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:a(e,t)>=X&&Math.abs(e.coord-t.coord)<.5,`exactTerminalLaneConflict`),c=t((e,t)=>{if(e.nodeId!==t.nodeId||e.orientation!==t.orientation||e.orientation!==`H`||e.atStart===t.atStart)return!1;let n=a(e,t);if(n2*r?!1:o(e,t)&&Math.abs(e.coord-t.coord)<16},`nearTerminalLaneConflict`),l=t((e,n)=>{let r=G(e.edge.points??[]);if(r.length<2)return;let i=e.orientation===`V`?{x:e.boundary.x+n,y:e.boundary.y}:{x:e.boundary.x,y:e.boundary.y+n},a=e.orientation===`V`?{x:e.railEnd.x+n,y:e.railEnd.y}:{x:e.railEnd.x,y:e.railEnd.y+n};if(!t(()=>Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1?B(i,e.boundary,Y)&&i.x>=e.rect.left+1&&i.x<=e.rect.right-1:Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1?z(i,e.boundary,Y)&&i.y>=e.rect.top+1&&i.y<=e.rect.bottom-1:!1,`boundaryStaysOnSameFace`)())return;if(e.atStart){let t=r.length>1&&R(r[1],e.railEnd,Y),n=r.slice(t?2:1),o=n[0];return o&&!Ot(o,a)?void 0:[i,a,...n]}let o=r.length>1&&R(r[r.length-2],e.railEnd,Y),s=r.slice(0,o?-2:-1),c=s[s.length-1];if(!(c&&!Ot(c,a)))return[...s,a,i]},`shiftedCandidate`),u=t(e=>{let t=e.edge,r=G(t.points??[]);if(r.length!==2)return!1;let i=t.start,a=t.end,o=i?n.get(i):void 0,s=a?n.get(a):void 0;if(!o||!s)return!1;let c=o.x??0,l=o.y??0,u=s.x??0,d=s.y??0,[f,p]=r;return B(f,p,Y)&&Math.abs(l-d)<1&&Math.abs(c-u)>1||z(f,p,Y)&&Math.abs(c-u)<1&&Math.abs(l-d)>1},`laneIsStraightCollinearConnector`),d=[-7,7,-14,14,-21,21];for(let t=0;t<8;t++){let t=e.filter(e=>!e.isLayoutOnly).flatMap(e=>[i(e,!0),i(e,!1)]).filter(e=>!!e),n=!1;for(let e=0;e{let n=u(e),r=u(t);return n===r?Number(!t.atStart)-Number(!e.atStart):Number(n)-Number(r)});for(let e of p){for(let r of d){let a=l(e,r);if(!a)continue;let o=i({...e.edge,points:a},e.atStart);if(!(!o||t.some(t=>t.edge!==e.edge&&(s(o,t)||f&&c(o,t))))){e.edge.points=a,n=!0;break}}if(n)break}}if(!n)return}}t(kt,`separateSharedRenderedTerminalLanes`);function At(e,n){let{realNodeRects:r,labelNodeRects:i}=je(n.values()),a=t((t,n)=>{let a=t.start,o=t.end,s=Z(n);if(s.length!==n.length-1)return!1;let c=[a,o].filter(e=>!!e);for(let e of s)if(q(e.a,e.b,r,c,-2)||q(e.a,e.b,i,[],-2))return!1;for(let n of e){if(n===t||n.isLayoutOnly)continue;let e=n.points;if(!(!e||e.length<2)){for(let t of s)for(let n of Z(G(e)))if(ve(t,n,.5)>=X||Le(t.a,t.b,n.a,n.b,Y))return!1}}return!0},`candidateIsSafe`),o=t((e,t)=>{if(t+4>=e.length)return;let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=e[t+4],s=V(n,r)&&H(r,i)&&V(i,a)&&H(a,o)&&z(n,a,Y)&&z(n,o,Y)&&z(r,i,Y)&&(r.x-n.x)*(a.x-i.x)<0,c=H(n,r)&&V(r,i)&&H(i,a)&&V(a,o)&&B(n,a,Y)&&B(n,o,Y)&&B(r,i,Y)&&(r.y-n.y)*(a.y-i.y)<0;if(s||c)return G([...e.slice(0,t+1),o,...e.slice(t+5)]);if(t+5>=e.length)return;let l=e[t+5],u=H(n,r)&&V(r,i)&&H(i,a)&&V(a,o)&&H(o,l)&&z(n,o,Y)&&z(n,l,Y)&&z(i,a,Y)&&(i.x-r.x)*(o.x-a.x)<0,d=V(n,r)&&H(r,i)&&V(i,a)&&H(a,o)&&V(o,l)&&B(n,o,Y)&&B(n,l,Y)&&B(i,a,Y)&&(i.y-r.y)*(o.y-a.y)<0;if(!(!u&&!d))return G([...e.slice(0,t+1),l,...e.slice(t+6)])},`withoutDogleg`);for(let t=0;t<8;t++){let t=!1;for(let n of e){if(n.isLayoutOnly)continue;let e=G(n.points??[]);for(let r=0;r<=e.length-5;r++){let i=o(e,r);if(!(!i||!a(n,i))){n.points=i,t=!0;break}}if(t)break}if(!t)return}}t(At,`collapseRedundantRectangularDoglegs`);function jt(e,n){let{realNodeRects:r,labelNodeRects:i}=je(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t,n)=>G(e===t?n??[]:e.points??[]),`pointsFor`),s=t((e,t)=>{let n=0;for(let r=0;r{let t=Z(e);if(t.length!==3)return;let n=t[1];if(!(t[0].horizontal===n.horizontal||t[2].horizontal===n.horizontal))return{index:n.index,horizontal:n.horizontal,vertical:n.vertical,segment:n}},`middleRail`),l=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);return r.filter(e=>{if(n.includes(e.id))return!1;let r=e.rect;return t.horizontal?U(t.a.x,t.b.x,r.left,r.right)>=X&&t.a.y>=r.top-2&&t.a.y<=r.bottom+2:U(t.a.y,t.b.y,r.top,r.bottom)>=X&&t.a.x>=r.left-2&&t.a.x<=r.right+2})},`blockingRectsFor`),u=t((e,t,n)=>{let r=e.map(e=>({...e}));if(t.horizontal)r[t.index].y=n,r[t.index+1].y=n;else if(t.vertical)r[t.index].x=n,r[t.index+1].x=n;else return;let i=He(G(r));return Z(i).length===i.length-1?i:void 0},`candidateByMovingRail`),d=t((e,t,n)=>{let c=[e.start,e.end].filter(e=>!!e),l=Z(t);if(l.length!==t.length-1)return!1;for(let e of l)if(q(e.a,e.b,r,c,-2)||q(e.a,e.b,i,[],-2))return!1;for(let t of a)if(t!==e){for(let e of l)for(let n of Z(o(t)))if(ve(e,n,.5)>=X)return!1}return s(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=s(),t=!1;for(let n of a){let r=o(n),i=c(r);if(!i)continue;let a=l(n,i.segment);if(a.length===0)continue;let s=i.horizontal?[Math.min(...a.map(e=>e.rect.top))-20,Math.max(...a.map(e=>e.rect.bottom))+20]:[Math.min(...a.map(e=>e.rect.left))-20,Math.max(...a.map(e=>e.rect.right))+20];for(let a of s){let o=u(r,i.segment,a);if(!(!o||!d(n,o,e))){n.points=o,t=!0;break}}if(t)break}if(!t)return}}t(jt,`liftObstacleHuggingSameSideRails`);function Mt(e,n){let r=t(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=t(e=>{if(!e.isGroup||e.parentId)return;let t=e.direction,n=typeof t==`string`?t.toUpperCase():``;if(n===`LR`||n===`RL`||n===`BT`)return;let i=r(e),a=e.y,o=e.height;if(!i||typeof a!=`number`||typeof o!=`number`||!Number.isFinite(a)||!Number.isFinite(o)||o<=0)return;let s=i.right-i.left,c=i.bottom-i.top;if(!(c<=0||s{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+Y||n>=t.bottom-Y?!1:U(e.a.x,e.b.x,t.left,t.right)>=X},`horizontalSegmentIntersectsTitle`),o=[...n.values()].map(i).filter(e=>!!e);if(o.length===0)return;let s=0;for(let t of e){if(t.isLayoutOnly)continue;let e=G(t.points??[]);for(let t of Z(e))for(let e of o)a(t,e.rect)&&(s=Math.max(s,e.rect.bottom-t.a.y+4))}if(!(s<=Y))for(let e of o){let t=e.node.y,n=e.node.height;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.y=t-s/2,e.node.height=n+s,e.node.groupTitleRect={...e.rect,top:e.rect.top-s,bottom:e.rect.bottom-s})}}t(Mt,`liftTopLaneTitleBandsAboveRails`);function Nt(e,n){let r=t(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),i=t(e=>{if(!e.isGroup||e.parentId||e.direction!==`LR`)return;let t=r(e),n=e.x,i=e.width;if(!t||typeof n!=`number`||typeof i!=`number`||!Number.isFinite(n)||!Number.isFinite(i)||i<=0)return;let a=t.right-t.left,o=t.bottom-t.top;if(!(a<=0||o{if(!e.vertical)return!1;let n=e.a.x;return n<=t.left+Y||n>=t.right-Y?!1:U(e.a.y,e.b.y,t.top,t.bottom)>=X},`verticalSegmentIntersectsTitle`),o=t((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+Y||n>=t.bottom-Y?!1:U(e.a.x,e.b.x,t.left,t.right)>=X},`horizontalSegmentIntersectsTitle`),s=[...n.values()].map(i).filter(e=>!!e);if(s.length===0)return;let c=0;for(let t of e){if(t.isLayoutOnly)continue;let e=G(t.points??[]);for(let t of Z(e))for(let e of s)if(a(t,e.rect))c=Math.max(c,e.rect.right-t.a.x+4);else if(o(t,e.rect)){let n=Math.min(t.a.x,t.b.x);c=Math.max(c,e.rect.right-n+4)}}if(!(c<=Y))for(let e of s){let t=e.node.x,n=e.node.width;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.x=t-c/2,e.node.width=n+c,e.node.groupTitleRect={...e.rect,left:e.rect.left-c,right:e.rect.right-c})}}t(Nt,`shiftLeftLaneTitleBandsLeftOfRails`);function Pt(e,n){let{realNodeRects:r}=je(n.values()),i=e.filter(e=>!e.isLayoutOnly),a=t((e,t=new Map)=>G(t.get(e)??e.points??[]),`replacementPointsFor`),o=t((e=new Map)=>{let t=0;for(let n=0;ni.reduce((t,n)=>t+W(a(n,e)),0),`totalBends`),c=t(e=>{let t=a(e);if(t.length<4)return;let n=t[t.length-2],r=t[t.length-1];if(!(!V(n,r,Y)&&!H(n,r,Y)))return{tailStart:n,terminal:r}},`terminalTailFor`),l=t((e,t)=>{let n=a(e);if(n.length<3)return;let r=n[0],i=n[1],o;if(V(r,i,Y))o={x:i.x,y:t.tailStart.y};else if(H(r,i,Y))o={x:t.tailStart.x,y:i.y};else return;let s=He(G([r,i,o,t.tailStart,t.terminal]));return Z(s).length===s.length-1?s:void 0},`candidateWithDestinationTail`),u=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Z(t))if(q(e.a,e.b,r,n,-2))return!0;return!1},`pathHasNodeHit`),d=t((e,t,n)=>{for(let r of i)if(r!==e){for(let e of Z(t))for(let t of Z(a(r,n)))if(ve(e,t,.5)>=X)return!0}return!1},`pathHasSharedTrack`),f=t((e,t,n)=>!u(e,t)&&!d(e,t,n),`candidateIsSafe`),p=t(()=>{let e=new Map;for(let t of i){let r=t.end;if(!r||!n.has(r)||a(t).length<4)continue;let i=e.get(r)??[];i.push(t),e.set(r,i)}return e},`edgesByDestination`);for(let e=0;e<4;e++){let e=o();if(e===0)return;let t=s(),n,r=e,i=t;for(let t of p().values())for(let a=0;a=e||y>r||y===r&&b>=i||(n=v,r=y,i=b)}if(!n)return;for(let[e,t]of n)e.points=t}}t(Pt,`swapDestinationTerminalTailsToReduceCrossings`);function Ft(e,n){let{realNodeRects:r,labelNodeRects:i}=je(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t=new Map)=>G(t.get(e)??e.points??[]),`replacementPointsFor`),s=t((e=new Map)=>{let t=0;for(let n=0;na.reduce((t,n)=>t+W(o(n,e)),0),`totalBends`),l=t(e=>{let t=e.start,r=e.end,i=t?n.get(t):void 0,a=r?n.get(r):void 0,o=i?K(i):void 0,s=a?K(a):void 0;return o&&s?{src:o,dst:s}:void 0},`endpointRectsFor`),u=t((e,t,n)=>{if(n.index<=0||n.index+1>=t.length-1)return;let r=l(e);if(r){if(n.vertical){let i=n.a.x,a=Math.min(r.src.left,r.dst.left),o=Math.max(r.src.right,r.dst.right),s=io+Y?`right`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`vertical`,side:s,coord:i,min:Math.min(n.a.y,n.b.y),max:Math.max(n.a.y,n.b.y)}:void 0}if(n.horizontal){let i=n.a.y,a=Math.min(r.src.top,r.dst.top),o=Math.max(r.src.bottom,r.dst.bottom),s=io+Y?`bottom`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`horizontal`,side:s,coord:i,min:Math.min(n.a.x,n.b.x),max:Math.max(n.a.x,n.b.x)}:void 0}}},`externalRailForSegment`),d=t(()=>{let e=[];for(let t of a){let n=o(t);for(let r of Z(n)){let i=u(t,n,r);i&&e.push(i)}}return e},`collectExternalRails`),f=t((e,t)=>e.edge!==t.edge&&e.axis===t.axis&&e.side===t.side&&U(e.min,e.max,t.min,t.max)>=X,`railsInteract`),p=t(e=>{let t=[],n=new Set;for(let r of e){if(n.has(r))continue;let i=[r],a=[];for(n.add(r);i.length>0;){let t=i.pop();a.push(t);for(let r of e)!n.has(r)&&f(t,r)&&(n.add(r),i.push(r))}a.length>1&&t.push(a)}return t},`connectedComponents`),m=t(e=>{let t=[];for(let n of e)t.some(e=>Math.abs(e-n.coord){let n=e.map(e=>e.coord),r=m(e),i=[];if(e.length<=6){let a=Array(r.length).fill(!1),o=[],s=t(()=>{if(o.length===e.length){o.some((e,t)=>Math.abs(e-n[t])>=Y)&&i.push([...o]);return}for(let[e,t]of r.entries())a[e]||(a[e]=!0,o.push(t),s(),o.pop(),a[e]=!1)},`visit`);return s(),i}for(let e=0;e{let n=new Map;for(let[r,i]of e.entries()){let e=t[r],a=n.get(i.edge)??i.points.map(e=>({x:e.x,y:e.y}));i.axis===`vertical`?(a[i.segmentIndex].x=e,a[i.segmentIndex+1].x=e):(a[i.segmentIndex].y=e,a[i.segmentIndex+1].y=e),n.set(i.edge,a)}let r=new Map;for(let[e,t]of n){let n=He(G(t));if(Z(n).length!==n.length-1)return;r.set(e,n)}return r},`replacementsForAssignment`),_=t(e=>{for(let[t,n]of e){let e=[t.start,t.end].filter(e=>!!e);for(let t of Z(n))if(q(t.a,t.b,r,e,-2)||q(t.a,t.b,i,[],-2))return!1}for(let t=0;t=X)return!1}}return!0},`candidateIsSafe`);for(let e=0;e<4;e++){let e=s();if(e===0)return;let t,n=e,r=c(),i=1/0;for(let a of p(d()))for(let o of h(a)){let l=g(a,o);if(!l||!_(l))continue;let u=s(l);if(u>=e)continue;let d=c(l),f=a.reduce((e,t,n)=>e+Math.abs(o[n]-t.coord),0);u>n||u===n&&(d>r||d===r&&f>=i)||(t=l,n=u,r=d,i=f)}if(!t)return;for(let[e,n]of t)e.points=n}}t(Ft,`reassignCrossingExternalRailChannels`);function It(e,n){let{realNodeRects:r,labelNodeRects:i}=je(n.values()),a=e.filter(e=>!e.isLayoutOnly),o=t((e,t,n)=>G(e===t?n??[]:e.points??[]),`pointsFor`),s=t(e=>Z(e).reduce((e,t)=>{let n=t.a.x-t.b.x,r=t.a.y-t.b.y;return e+Math.hypot(n,r)},0),`pathLength`),c=t((e,t)=>{let n=0;for(let r=0;r{if(e.horizontal){let n=e.a.y;return(Math.abs(n-t.top)<1||Math.abs(n-t.bottom)<1)&&U(e.a.x,e.b.x,t.left,t.right)>=X}if(e.vertical){let n=e.a.x;return(Math.abs(n-t.left)<1||Math.abs(n-t.right)<1)&&U(e.a.y,e.b.y,t.top,t.bottom)>=X}return!1},`segmentRunsAlongRectBorder`),u=t(e=>{let t=[e.start,e.end].filter(e=>!!e),r=[];for(let e of t){let t=n.get(e),i=t?K(t):void 0;i&&r.push(i)}return r},`endpointRectsFor`),d=t((e,t)=>{if(t+3>=e.length)return[];let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=V(n,r,Y)&&H(r,i,Y)&&V(i,a,Y),s=H(n,r,Y)&&V(r,i,Y)&&H(i,a,Y);if(!o&&!s||!(o?Math.sign(r.x-n.x)!==Math.sign(a.x-i.x):Math.sign(r.y-n.y)!==Math.sign(a.y-i.y)))return[];let c=z(n,a,Y)||B(n,a,Y)?[]:[{x:n.x,y:a.y},{x:a.x,y:n.y}],l=c.length===0?[[...e.slice(0,t+1),...e.slice(t+3)]]:c.map(n=>[...e.slice(0,t+1),n,...e.slice(t+3)]),u=new Set;return l.map(e=>He(G(e))).filter(e=>{if(Z(e).length!==e.length-1||!e.some(e=>R(e,a,Y)))return!1;let t=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return u.has(t)?!1:(u.add(t),!0)})},`shortcutCandidatesAt`),f=t((e,t,n)=>{let s=[e.start,e.end].filter(e=>!!e),d=u(e);for(let e of Z(t))if(q(e.a,e.b,r,s,-2)||q(e.a,e.b,i,[],-2)||d.some(t=>l(e,t)))return!1;for(let n of a)if(n!==e){for(let e of Z(t))for(let t of Z(o(n)))if(ve(e,t,.5)>=X)return!1}return c(e,t)<=n},`candidateIsSafe`);for(let e=0;e<8;e++){let e=c(),t,n,r=e,i=1/0,l=1/0;for(let u of a){let a=o(u),p=W(a,Y),m=s(a);for(let o=0;o<=a.length-4;o++)for(let h of d(a,o)){let a=W(h,Y),o=s(h);if(!(ar||d===r&&(a>i||a===i&&o>=l)||(t=u,n=h,r=d,i=a,l=o)}}if(!t||!n)return;t.points=n}}t(It,`shortcutRedundantOrthogonalJogs`);function Lt(e,n){let r=[];for(let e of n.values()){if(e.isGroup||e.isEdgeLabel)continue;let t=e.x??0,n=e.y??0,i=K(e);i&&r.push({id:String(e.id??``),cx:t,cy:n,rect:i})}if(r.length===0)return;let i=new Map(r.map(e=>[e.id,e])),a=r.map(e=>({id:e.id,rect:e.rect})),o=[`top`,`bottom`,`left`,`right`],s={top:Math.min(...r.map(e=>e.rect.top))-20,bottom:Math.max(...r.map(e=>e.rect.bottom))+20,left:Math.min(...r.map(e=>e.rect.left))-20,right:Math.max(...r.map(e=>e.rect.right))+20},c=e.filter(e=>!e.isLayoutOnly),l=new Map(c.map((e,t)=>[e,t])),u=t(e=>{let t=e===`left`||e===`top`?-1:1,n=[];for(let r=0;r<=2;r++)n.push(s[e]+t*20*r);return n},`outwardTracksForSide`),d=t((e,t=new Map)=>G(t.get(e)??e.points??[]),`replacementPointsFor`),f=t((e,t)=>{let n=0;for(let r of e)for(let e of t)Le(r.a,r.b,e.a,e.b,Y)&&n++;return n},`crossingCountBetweenSegments`),p=t((e,t)=>f(Z(e),Z(t)),`crossingCountBetweenPaths`),m=t((e=new Map)=>{let n=0,r=[],i=new Set,a=[],o=t(e=>{i.has(e)||(i.add(e),a.push(e))},`addEdge`);for(let t=0;t0&&(n+=l,r.push({first:i,second:t,count:l}),o(i),o(t))}}return a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),{count:n,pairs:r,edgeSet:i,edges:a}},`crossingSnapshot`),h=t((e,t)=>{let n=new Set(t.keys());if(n.size===0)return e.count;let r=0;for(let t of e.pairs)(n.has(t.first)||n.has(t.second))&&(r+=t.count);let i=0;for(let e=0;e{let t=new Map;for(let n of e.pairs){let e=t.get(n.first)??new Set;e.add(n.second),t.set(n.first,e);let r=t.get(n.second)??new Set;r.add(n.first),t.set(n.second,r)}let n=[],r=new Set;for(let i of e.edges){if(r.has(i))continue;let e=[i],a=[];for(r.add(i);e.length>0;){let n=e.pop();a.push(n);for(let i of t.get(n)??[])r.has(i)||(r.add(i),e.push(i))}a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),a.length>1&&n.push(a)}return n},`crossingComponents`),_=t(e=>[e.start,e.end].filter(e=>!!e),`endpointIdsFor`),v=t(e=>{let t=[];for(let n of g(e)){let e=new Set(n),r=new Set(n.flatMap(e=>_(e))),i=[...n];for(let t of c)e.has(t)||_(t).some(e=>r.has(e))&&i.push(t);i.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),t.push(i)}return t},`pairSearchGroups`),y=t((e,t,n)=>h(e,new Map([[t,n]])),`crossingCountWithSingleReplacement`),b=t(e=>{let t=new Map;for(let n of e.pairs)t.set(n.first,(t.get(n.first)??0)+n.count),t.set(n.second,(t.get(n.second)??0)+n.count);return t},`currentCrossingsByEdge`),x=t(e=>e.slice(1).reduce((t,n,r)=>{let i=e[r];return t+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),`pathLength`),S=t((e=new Map)=>c.reduce((t,n)=>t+W(d(n,e)),0),`totalBends`),C=t((e=new Map)=>c.reduce((t,n)=>t+x(d(n,e)),0),`totalLength`),w=t((e,t,n=new Map)=>{let r=Z(t);for(let t of c)if(t!==e){for(let e of r)for(let r of Z(d(t,n)))if(ve(e,r,.5)>=X)return!0}return!1},`pathHasSegmentConflict`),T=t((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Z(t))if(q(e.a,e.b,a,n,-2))return!0;return!1},`pathHitsNode`),E=t((e,t)=>{let n=He(G(t));Z(n).length===n.length-1&&e.push(n)},`pushOrthogonalCandidate`),D=t(e=>e===`left`||e===`right`,`sideIsHorizontal`),O=t((e,t,n)=>{switch(t){case`left`:return Math.min(e.x,n.x)-20;case`right`:return Math.max(e.x,n.x)+20;case`top`:return Math.min(e.y,n.y)-20;case`bottom`:return Math.max(e.y,n.y)+20}},`localTrackForSameSide`),k=t((e,t,n,r)=>{let i=n===`left`||n===`top`?-1:1,a=[O(t,n,r),s[n]];for(let o of a)for(let a=0;a<=2;a++)E(e,ke(t,n,r,o+i*20*a))},`addSameSideCandidates`),A=t((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:a,y:t.y},{x:a,y:n},{x:r.x,y:n},r])},`addHorizontalToVerticalCandidates`),j=t((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))E(e,[t,{x:t.x,y:a},{x:n,y:a},{x:n,y:r.y},r])},`addVerticalToHorizontalCandidates`),ee=t((e,t,n,r,i)=>{let a=[...u(`top`),...u(`bottom`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:o,y:t.y},{x:o,y:i},{x:n,y:i},{x:n,y:r.y},r])},`addHorizontalPairCandidates`),te=t((e,t,n,r,i)=>{let a=[...u(`left`),...u(`right`)];for(let o of u(n))for(let n of u(i))for(let i of a)E(e,[t,{x:t.x,y:o},{x:i,y:o},{x:i,y:n},{x:r.x,y:n},r])},`addVerticalPairCandidates`),M=t(e=>{let t=new Set;return e.map(e=>G(e)).filter(e=>{let n=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return t.has(n)||e.length<2?!1:(t.add(n),!0)})},`dedupeCandidatePaths`),ne=t((e,t,n,r)=>{let i=[],a=Oe(e,t,n,r,20,Y);a&&E(i,a),t===r&&k(i,e,t,n);let o=D(t),s=D(r);return o&&!s?A(i,e,t,n,r):!o&&s?j(i,e,t,n,r):o?ee(i,e,t,n,r):te(i,e,t,n,r),M(i)},`buildCandidatesForSides`),N=t((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=De(r,s),c=s===`top`||s===`bottom`?u(s):a;for(let r of i){E(e,[t,n,{x:r,y:n.y},{x:r,y:o.y},o]);for(let i of c)E(e,[t,n,{x:r,y:n.y},{x:r,y:i},{x:o.x,y:i},o])}}},`addVerticalDepartureOuterTrackCandidates`),re=t((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],a=[...u(`top`),...u(`bottom`)];for(let s of o){let o=De(r,s),c=s===`left`||s===`right`?u(s):i;for(let r of a){E(e,[t,n,{x:n.x,y:r},{x:o.x,y:r},o]);for(let i of c)E(e,[t,n,{x:n.x,y:r},{x:i,y:r},{x:i,y:o.y},o])}}},`addHorizontalDepartureOuterTrackCandidates`),P=t(e=>{let t=e.start,n=e.end,r=n?i.get(n):void 0;if(!t||!r)return[];let a=G(e.points??[]);if(a.length<4)return[];let o=a[0],s=a[1],c=[];return H(o,s,Y)?N(c,o,s,r):V(o,s,Y)&&re(c,o,s,r),c},`terminalPreservingOuterTrackCandidates`),ie=t(e=>{let t=e.start,n=e.end,r=t?i.get(t):void 0,a=n?i.get(n):void 0;if(!r||!a)return[];let s=[];for(let e of o){let t=De(r,e);for(let n of o)s.push(...ne(t,e,De(a,n),n))}return s.push(...P(e)),s},`candidatePathsFor`),ae=t(()=>new Map(c.map(e=>[e,Z(d(e))])),`currentSegmentsByEdge`),oe=t((e,t,n)=>{let r=new Set;for(let i of c){if(i===e)continue;let a=n.get(i)??Z(d(i));t.some(e=>a.some(t=>ve(e,t,.5)>=X))&&r.add(i)}return r},`sharedTrackConflictsFor`),se=t((e,t,n,r)=>{let i=new Set;return ie(e).map(e=>He(G(e))).filter(t=>{if(T(e,t))return!1;let n=t.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return i.has(n)||t.length<2?!1:(i.add(n),!0)}).map(i=>{let a=Z(i),o=0;for(let t of c)t!==e&&(o+=f(a,n.get(t)??Z(d(t))));return{candidate:i,candidateSegments:a,crossings:t.count-(r.get(e)??0)+o,bends:W(i,Y),totalBends:W(i),length:x(i)}}).filter(({crossings:e})=>e<=t.count).sort((e,t)=>e.crossings-t.crossings||e.bends-t.bends||e.length-t.length).slice(0,48).map(t=>({path:t.candidate,segments:t.candidateSegments,sharedTrackConflicts:oe(e,t.candidateSegments,n),totalBends:t.totalBends,length:t.length}))},`pairCandidatesFor`),ce=t((e,t,n,r,i,a)=>{let o=0;for(let n of e.pairs)(n.first===t||n.second===t||n.first===r||n.second===r)&&(o+=n.count);let s=f(n.segments,i.segments);for(let e of c){if(e===t||e===r)continue;let o=a.get(e)??Z(d(e));s+=f(n.segments,o)+f(i.segments,o)}return e.count-o+s},`pairCrossingCount`),le=t((e,t)=>{for(let n of e.sharedTrackConflicts)if(n!==t)return!1;return!0},`conflictsOnlyWith`),ue=t((e,t)=>e.segments.some(e=>t.segments.some(t=>ve(e,t,.5)>=X)),`candidatesShareTrack`),de=t((e,t,n,r)=>le(t,n.edge)&&le(r,e.edge)&&!ue(t,r),`pairCandidatesAreCompatible`),fe=t((e,t,n,r,i)=>{let a=ce(e.current,t.edge,n,r.edge,i,e.baseSegments);if(!(a>=e.current.count))return{replacements:new Map([[t.edge,n.path],[r.edge,i.path]]),crossings:a,bends:e.currentBends-(e.baseBendsByEdge.get(t.edge)??0)-(e.baseBendsByEdge.get(r.edge)??0)+n.totalBends+i.totalBends,length:e.currentLength-(e.baseLengthByEdge.get(t.edge)??0)-(e.baseLengthByEdge.get(r.edge)??0)+n.length+i.length}},`scorePairReplacement`),pe=t((e,t)=>e.crossings{let i=r;for(let r of t.candidates)for(let a of n.candidates){if(!de(t,r,n,a))continue;let o=fe(e,t,r,n,a);o&&pe(o,i)&&(i=o)}return i},`bestScoreForOptionPair`),I=t(e=>{let t=S(),n=C(),r=ae(),i=b(e),a=new Map(c.map(e=>[e,W(d(e))])),o=new Map(c.map(e=>[e,x(d(e))])),s=new Map,l=v(e);for(let t of l)for(let n of t){if(s.has(n))continue;let t=se(n,e,r,i);t.length>0&&s.set(n,{edge:n,candidates:t})}let u={replacements:new Map,crossings:e.count,bends:t,length:n},f={current:e,currentBends:t,currentLength:n,baseBendsByEdge:a,baseLengthByEdge:o,baseSegments:r};for(let t of l){let n=new Set(t.filter(t=>e.edgeSet.has(t))),r=t.map(e=>s.get(e)).filter(e=>!!e);for(let e=0;e0?u.replacements:void 0},`bestPairedReplacement`);for(let e=0;e<4;e++){let e=m(),t=e.count;if(t===0)return;let n,r,i=t,a=1/0;for(let o of e.edges){let s=W(d(o),Y);for(let c of ie(o)){let l=T(o,c),u=!l&&w(o,c),d=y(e,o,c),f=W(c,Y);l||u||(di||d===i&&f>=a||(n=o,r=c,i=d,a=f))}}if(n&&r){n.points=r;continue}let o=I(e);if(!o)return;for(let[e,t]of o)e.points=t}}t(Lt,`resolveRenderedOrthogonalCrossings`);var Rt=.001,zt=8;function Bt(e,n){let{nodeInfoById:r,realNodeRects:i}=Ae(n),a=[`top`,`bottom`,`left`,`right`],o={top:Math.min(...i.map(e=>e.rect.top))-20,bottom:Math.max(...i.map(e=>e.rect.bottom))+20,left:Math.min(...i.map(e=>e.rect.left))-20,right:Math.max(...i.map(e=>e.rect.right))+20},s=t((e,t,n,r)=>{let i=[],a=Oe(e,t,n,r,20,Rt);return a&&i.push(a),t===r&&i.push(ke(e,t,n,o[t])),i},`buildOrthogonalPathCandidates`),c=t((e,t)=>{for(let n=0;n{let i=0,a=ye(t,Rt),o=n.start,s=n.end;for(let t of e){if(t===n||t.isLayoutOnly)continue;let e=t.start,c=t.end;if(!r&&o&&s&&(e===o||e===s||c===o||c===s))continue;let l=t.points;if(!(!l||l.length<2))for(let e of a)for(let t of ye(l,Rt)){if(Pe(e.a,e.b,t.a,t.b,Rt,Rt)){i++;continue}ve(e,t,Rt)>=zt&&i++}}return i},`pathConflictCount`),u=t((e,t)=>{let n=Math.abs(e.y-t.rect.top),r=Math.abs(e.y-t.rect.bottom),i=Math.abs(e.x-t.rect.left),a=Math.abs(e.x-t.rect.right),o=`top`,s=n;return r{let r=d.get(e)??[];r.push({side:t,edgeId:n}),d.set(e,r)},`addFaceClaim`);for(let t of e){if(t.isLayoutOnly)continue;let e=t.points??[];if(e.length<1)continue;let n=t.id??``,i=t.start,a=t.end;if(i){let t=r.get(i);t&&f(i,u(e[0],t),n)}if(a){let t=r.get(a);t&&f(a,u(e[e.length-1],t),n)}}let p=t((e,t,n)=>d.get(e)?.some(e=>e.edgeId!==n&&e.side===t)??!1,`faceIsClaimed`);for(let t of e){if(t.isLayoutOnly)continue;let e=t.points;if(!e||e.length<2)continue;let n=W(e,Rt);if(n<4)continue;let i=t.start,o=t.end;if(!i||!o)continue;let m=r.get(i),h=r.get(o);if(!m||!h)continue;let g=t.id??``,_=l(e,t,!0),v=l(e,t),y,b=_,x=n;for(let e of a){if(p(i,e,g))continue;let n=De(m,e);for(let r of a){if(p(o,r,g))continue;let a=De(h,r);for(let u of s(n,e,a,r)){if(c(u,[i,o]))continue;let e=W(u,Rt);if(_>0){let n=l(u,t,!0);if(n>b||n===b&&e>=x)continue;b=n,x=e,y=u;continue}l(u,t)>v||ee.edgeId!==g));let n=d.get(o);n&&d.set(o,n.filter(e=>e.edgeId!==g)),f(i,u(y[0],m),g),f(o,u(y[y.length-1],h),g)}}}t(Bt,`simplifyDetouredEdges`);var Q=.001,Vt=10,Ht=7;function Ut(e,t){let n=t?0:e.length-1,r=t?1:-1,i=e[n],a=e[n+r];if(!i||!a)return;let o=a.x-i.x,s=a.y-i.y;if(!(Math.abs(o)+Math.abs(s)t&&we(e,Wt(t)))}t(Gt,`labelOverlapsOwnMarker`);function Kt(e,n){let r=[];for(let t of e){if(t.isLayoutOnly)continue;let e=t.points;if(!(!e||e.length<2))for(let n=0;n{let n=Te(t,3);for(let{nodeId:t,rect:r}of i)if(t!==e&&we(n,r))return!0;return!1},`labelOverlapsForeignNode`),s=t((e,t)=>{let n=Te(t,3);for(let t of r)if(t.edgeId!==e&&xe(t.p1,t.p2,n))return!0;return!1},`labelOverlapsForeignEdge`),c=t((e,t,n)=>o(e,n)||s(t,n),`labelOverlapsAnything`),l=[],u=t(e=>{for(let{id:t,rect:n}of a)if(Ce(n,e))return t},`findContainingLane`),d=t((e,t)=>l.some(n=>n.labelId!==e&&we(t,n.rect)),`overlapsPlacedLabel`);for(let r of e){if(r.isLayoutOnly)continue;let e=r.labelNodeId;if(!e)continue;let i=n.get(e);if(!i)continue;let f=r.points;if(!f||f.length<2)continue;let p=i.width??0,m=i.height??0;if(p<=0||m<=0)continue;let h=[];for(let e=0;e=Q&&i>=Q||h.push({idx:e,length:r+i,orientation:r>=Q?`horizontal`:`vertical`,midX:(t.x+n.x)/2,midY:(t.y+n.y)/2})}if(h.length===0)continue;let g=h.length>=3?h.filter(e=>e.idx>0&&e.idx0?g:h,v=p>=m?`horizontal`:`vertical`,y=t(e=>[...e].sort((e,t)=>{let n=e.orientation===v;if(n!==(t.orientation===v))return n?-1:1;let r=e.length>=(e.orientation===`horizontal`?p:m)+2;return r===t.length>=(t.orientation===`horizontal`?p:m)+2?t.length-e.length:r?-1:1}),`rankSegments`),b=h[0],x=h[h.length-1],S=[.5,.25,.75,.05,.95,.15,.85,.1,.9],C=t((e,t)=>{let n=f[e.idx],r=f[e.idx+1];return{midX:n.x+(r.x-n.x)*t,midY:n.y+(r.y-n.y)*t}},`anchorAtT`),w=t((e,t,n)=>Math.min(n,Math.max(t,e)),`clamp`),T=t((e,t)=>e.midX>=t.left-Q&&e.midX<=t.right+Q&&e.midY>=t.top-Q&&e.midY<=t.bottom+Q,`pointInsideRectInclusive`),E=t(e=>{let t=Ee(e.midX,e.midY,p,m),n=u(t);if(n)return{laneId:n,anchor:e,rect:t};let r=a.find(({rect:t})=>T(e,t));if(!r)return;let i=r.rect.left+p/2+1,o=r.rect.right-p/2-1,s=r.rect.top+m/2+1,c=r.rect.bottom-m/2-1;if(i>o||s>c)return;let l={midX:w(e.midX,i,o),midY:w(e.midY,s,c)},d=Ee(l.midX,l.midY,p,m);return T(e,d)?{laneId:r.id,anchor:l,rect:d}:void 0},`placementForAnchor`),D=t((e,t,n)=>e.orientation===`horizontal`?Math.abs(t.midX-n.x):Math.abs(t.midY-n.y),`distanceAlongSegment`),O=t((e,t)=>{let n=(e.orientation===`horizontal`?p/2:m/2)+12;if(e===b){let r=f[e.idx];if(D(e,t,r)+Q{let n=y(t);for(let t of n)for(let n of S){let i=C(t,n);if(!O(t,i))continue;let a=E(i);if(a&&!Gt(a.rect,f)&&!d(e,a.rect)&&!c(e,r.id,a.rect))return{laneId:a.laneId,anchor:a.anchor}}},`tryPool`),A=t((t,n,i=!1)=>{let a=y(t);for(let t of a){let a={midX:t.midX,midY:t.midY};if(n&&!O(t,a))continue;let c=E(a);if(c&&!Gt(c.rect,f)&&!d(e,c.rect)&&!o(e,c.rect)&&(i||!s(r.id,c.rect)))return{laneId:c.laneId,anchor:c.anchor}}},`findLaneContainingFallback`),j=k(_)??(_.lengtht.labelId===e);n>=0?l[n]={labelId:e,rect:t}:l.push({labelId:e,rect:t})}}}t(Kt,`anchorLabelsToPolyline`);var qt=1e-6,Jt=8/2,Yt=3;function Xt(e,t){return e{let s=Xt(r,i),c=0,l=t(e=>{if(!e)return;let t=a.get(e);if(!t)return;let n=o===`x`?t.w/2:t.h/2;n>c&&(c=n)},`consider`);l(n.labelNodeId);for(let t of e){if(t===n||t.isLayoutOnly)continue;let e=t.start,r=t.end;!e||!r||Xt(e,r)===s&&l(t.labelNodeId)}return c>0?c+Yt:0},`labelClearanceFor`);for(let t of e){if(t.isLayoutOnly)continue;let n=t.points;if(!be(n,qt))continue;let a=Ne(t,r,qt);if(!a)continue;let{srcId:s,dstId:c,srcInfo:l,dstInfo:u,collinearX:d,collinearY:f}=a;if(d===f)continue;let p,m;if(d){let e=u.cy>l.cy;p={x:l.cx,y:e?l.rect.bottom:l.rect.top},m={x:u.cx,y:e?u.rect.top:u.rect.bottom}}else{let e=u.cx>l.cx;p={x:e?l.rect.right:l.rect.left,y:l.cy},m={x:e?u.rect.left:u.rect.right,y:u.cy}}if(q(p,m,i,[s,c],1))continue;let h=o(t,s,c,d?`x`:`y`),g=h>Jt?h:Jt,_=[0,g,-g];for(let n of _){let r={...p},a={...m};if(d){if(r.x+=n,a.x+=n,r.x<=l.rect.left||r.x>=l.rect.right||a.x<=u.rect.left||a.x>=u.rect.right)continue}else if(r.y+=n,a.y+=n,r.y<=l.rect.top||r.y>=l.rect.bottom||a.y<=u.rect.top||a.y>=u.rect.bottom)continue;if(!q(r,a,i,[s,c],1)&&!Ie(r,a,e,t,{epsilon:qt})){t.points=[r,a];break}}}}t(Zt,`straightenCollinearSiblingDetours`);function Qt(e,n){let r=.001,{realNodeRects:i,labelNodeRects:a}=je(n.values()),o=t((e,t)=>ye(t,r).map(n=>({...n,edge:e,interior:n.index>=1&&n.index<=t.length-3})),`segmentsFor`),s=t(()=>{let t=[];for(let n of e){if(n.isLayoutOnly)continue;let e=n.points;!e||e.length<2||t.push(...o(n,G(e)))}return t},`allSegments`),c=t((e,t)=>e.horizontal&&t.horizontal?U(e.a.x,e.b.x,t.a.x,t.b.x)>=8&&Math.abs(e.a.y-t.a.y)<7:e.vertical&&t.vertical?U(e.a.y,e.b.y,t.a.y,t.b.y)>=8&&Math.abs(e.a.x-t.a.x)<7:!1,`hasCrowdedParallelTrack`),l=t((t,n)=>{let s=t.start,l=t.end,u=o(t,n);if(u.length!==n.length-1)return!1;let d=[s,l].filter(e=>!!e),f=t.labelNodeId?[t.labelNodeId]:[];for(let e of u)if(q(e.a,e.b,i,d,-2)||q(e.a,e.b,a,f,-2))return!1;for(let n of e){if(n===t||n.isLayoutOnly)continue;let e=n.points;if(!(!e||e.length<2)){for(let t of u)for(let i of o(n,G(e)))if(c(t,i)||Le(t.a,t.b,i.a,i.b,r))return!1}}return!0},`candidateIsSafe`),u=t((e,t)=>{let n=G(e.edge.points??[]);if(n.length<4||e.index>=n.length-1)return;let r=n.map(e=>({...e}));if(e.horizontal)r[e.index].y+=t,r[e.index+1].y+=t;else if(e.vertical)r[e.index].x+=t,r[e.index+1].x+=t;else return;return o(e.edge,r).length===r.length-1?r:void 0},`shiftedCandidate`),d=t((e,t)=>({x:e.x??(t.left+t.right)/2,y:e.y??(t.top+t.bottom)/2}),`nodeCenter`),f=t(e=>{let t=e.edge,r=G(t.points??[]);if(r.length!==4||e.index!==1)return;let i=t.start?n.get(t.start):void 0,a=t.end?n.get(t.end):void 0,o=i?K(i):void 0,s=a?K(a):void 0,c=r.slice(e.index+2);if(!(!i||!a||!o||!s||c.length===0))return{sourceCenter:d(i,o),targetCenter:d(a,s),sourceRect:o,tail:c}},`sourceDetourContextFor`),p=t((e,t,n,i,a,o)=>{let s=i.y>=n.y,c=s?a.bottom:a.top,l=c+(s?20:-20);if(s&&e.b.y<=l+r||!s&&e.b.y>=l-r)return;let u=e.a.x+t;return G([{x:n.x,y:c},{x:n.x,y:l},{x:u,y:l},{x:u,y:e.b.y},...o],r)},`verticalSourceDetour`),m=t((e,t,n,i,a,o)=>{let s=i.x>=n.x,c=s?a.right:a.left,l=c+(s?20:-20);if(s&&e.b.x<=l+r||!s&&e.b.x>=l-r)return;let u=e.a.y+t;return G([{x:c,y:n.y},{x:l,y:n.y},{x:l,y:u},{x:e.b.x,y:u},...o],r)},`horizontalSourceDetour`),h=t((e,t)=>{let n=f(e);if(n){if(e.vertical)return p(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail);if(e.horizontal)return m(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail)}},`sourceDetourCandidate`),g=[-7,7,-14,14,-21,21];for(let e=0;e<12;e++){let e=s(),t=!1;for(let n=0;ne.interior);for(let e of o){for(let n of g){let r=u(e,n);if(r&&l(e.edge,r)){e.edge.points=r,t=!0;break}let i=h(e,n);if(i&&l(e.edge,i)){e.edge.points=i,t=!0;break}}if(t)break}}if(!t)return}}t(Qt,`nudgeSharedInteriorSubpaths`);function $t(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,c=i*s-a*o;if(Math.abs(c)<1e-10)return!1;let l=n.x-e.x,u=n.y-e.y,d=(l*s-u*o)/c,f=(l*a-u*i)/c,p=.01;return d>p&&d<1-p&&f>p&&f<1-p}t($t,`segmentsIntersect`);function en(e){let t=e.nodes??[],r=e.edges??[],i=[];if(!r.length||!t.length)return i;let a=Me(t),o=[];for(let e of r){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=e.start,r=e.end,s=e.labelNodeId,c=e.id??`${n}->${r}`;for(let e of a)if(!(e.nodeId===n||e.nodeId===r)&&!(s&&e.nodeId===s)){for(let n=0;n0){let e=i.filter(e=>e.type===`edge-node-overlap`).length,t=i.filter(e=>e.type===`edge-edge-crossing`).length;n.warn(`[SWIMLANE_VALIDATE] ${i.length} issue(s) detected: ${e} edge-node overlap(s), ${t} edge crossing(s)`);for(let e of i)n.warn(`[SWIMLANE_VALIDATE] ${e.type}: ${e.detail}`)}return i}t(en,`validateSwimlanesLayout`);function tn(e,n){let r=e.nodes??[],i=e.edges??[],a=r.filter(e=>!e.isGroup);if((n===`LR`||n===`RL`)&&a.length>0&&!St(e,n)||n===`BT`&&a.length>0&&!xt(e))return;for(let e of i){if(e.isLayoutOnly)continue;let t=e.points;!t||t.length<2||(e.points=He(Ve(t)))}Bt(i,r),Zt(i,r),Et(i,r);let o=new Map;for(let e of r)o.set(String(e.id),e);Kt(i,o),Je(i,o),Dt(i,o),Qt(i,o),kt(i,o),At(i,o),jt(i,o),Pt(i,o);let s=t(()=>{Lt(i,o),Ft(i,o),It(i,o),Kt(i,o),pt(i,o),jt(i,o),Kt(i,o),pt(i,o)},`finalizeRenderedEdges`);s(),Qt(i,o),s(),Mt(i,o),Nt(i,o),Mt(i,o),Nt(i,o)}t(tn,`postProcessSwimlaneLayout`);function nn(e){let t=new Map(e.nodeById),n=new Set,r=[];for(let i of e.edges){if(!t.has(i.src)||!t.has(i.dst))continue;let e=`${i.id}:${i.src}->${i.dst}`;n.has(e)||(n.add(e),r.push(i))}return{nodes:[...t.keys()],edges:r,layout:e.layout,nodeById:t}}t(nn,`normalizeGraph`);function rn(e,t){return e.edges.filter(e=>e.dst===t)}t(rn,`incoming`);function an(e){let t=new Map;for(let n of e.nodes)t.set(n,[]);for(let n of e.edges)t.get(n.src).push(n.dst);return t}t(an,`buildSuccessorMap`);function on(e){let t=an(e);for(let e of t.values())e.sort((e,t)=>e.localeCompare(t));return t}t(on,`buildSortedSuccessorMap`);function sn(e){let t=new Map;for(let n of e.nodes)t.set(n,0);for(let n of e.edges)t.set(n.dst,(t.get(n.dst)??0)+1);return t}t(sn,`buildInDegreeMap`);function cn(e){return[...e.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,t)=>e.localeCompare(t))}t(cn,`sortedZeroInDegreeNodes`);function ln(e,t=()=>!0){let n=new Map,r=new Map;for(let t of e.nodes)n.set(t,[]),r.set(t,[]);for(let i of e.edges)t(i)&&(r.get(i.src).push(i.dst),n.get(i.dst).push(i.src));return{preds:n,succs:r}}t(ln,`buildPredecessorSuccessorMaps`);function un(e,t,n,r){let i=0;for(let t of e.nodes)r?.skipGroups&&e.nodeById.get(t)?.isGroup||(i=Math.max(i,n[t]??0));let a=Array.from({length:i+1},()=>[]);for(let i of t)r?.skipGroups&&e.nodeById.get(i)?.isGroup||a[Math.max(0,n[i]??0)].push(i);return a}t(un,`buildLayersFromRanks`);function dn(e){let t=sn(e),n=cn(t),r=[],i=on(e);for(;n.length;){let e=n.shift();r.push(e);for(let r of i.get(e)??[])if(t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0){let e=0;for(;e{if(i-t<=1)return 0;let a=t+i>>1,o=r(t,a)+r(a,i),s=t,c=a,l=t;for(;s=i||se.dst===t.dst?e.id.localeCompare(t.id):e.dst.localeCompare(t.dst));let i=Object.create(null);for(let e of n.nodes)i[e]=0;let a=[],o=t(e=>{i[e]=1;for(let t of r.get(e)??[]){let e=t.dst;i[e]===0?o(e):i[e]===1&&a.push(t)}i[e]=2},`dfs`),s=[...n.nodes].sort((e,t)=>e.localeCompare(t));for(let e of s)i[e]===0&&o(e);let c=new Set(a.map(e=>`${e.id}:${e.src}->${e.dst}`)),l=n.edges.map(e=>c.has(`${e.id}:${e.src}->${e.dst}`)?{id:e.id,src:e.dst,dst:e.src,weight:e.weight,ref:e.ref}:e);return{acyclic:{nodes:[...n.nodes],edges:l,layout:n.layout,nodeById:new Map(n.nodeById)},reversed:a}}t(mn,`removeCycles_DFS`);function hn(e){let n=new Map,r=t(t=>{if(n.has(t))return n.get(t);let i=e.nodeById.get(t);if(!i)return n.set(t,null),null;let a=i.parentId;if(!a)return n.set(t,null),null;let o=r(a)??a;return n.set(t,o),o},`resolve`);for(let t of e.nodes)r(t);return n}t(hn,`buildTopLaneMap`);function gn(e){let t=hn(e);return e=>t.get(e)??null}t(gn,`createTopLaneResolver`);function _n(e){let t=[];for(let n of e.layout.nodes??[])n.isGroup&&!n.parentId&&t.push(n.id);return[...new Set(t)].reverse()}t(_n,`buildTopLaneOrder`);function vn(e,t){let n=_n(e);if(!t||t.length===0)return n;let r=new Set(n),i=new Set,a=[];for(let e of t)!r.has(e)||i.has(e)||(i.add(e),a.push(e));for(let e of n)i.has(e)||a.push(e);return a}t(vn,`resolveTopLaneOrder`);var yn={EPSILON:1e-6},bn={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},xn={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Sn(e,n){let r=nn(e),i=n?.laneOf??(()=>null),a=n?.rankHint,{preds:o}=ln(r);for(let e of o.values())e.sort((e,t)=>e.localeCompare(t));let s=dn(r)??[...r.nodes].sort((e,t)=>e.localeCompare(t)),c=new Map;for(let[e,t]of s.entries())c.set(t,e);let l=new Map,u=new Map;for(let e of r.nodes)u.set(e,[]);for(let e of s){let t=(o.get(e)??[]).filter(e=>l.has(e));if(t.length>0){let n=Cn(e,t,{laneOf:i,rankHint:a,topoIndex:c});l.set(e,n),u.get(n).push(e)}else l.has(e)||l.set(e,null)}for(let e of r.nodes)l.has(e)||l.set(e,null);let d=new Set;for(let e of r.nodes)(l.get(e)??null)===null&&d.add(e);let f=[...d].sort((e,t)=>{let n=c.get(e)??0,r=c.get(t)??0;return n===r?e.localeCompare(t):n-r}),p=wn(r),m=new Map;for(let[e,t]of p.entries())m.set(e,[...t].sort((e,t)=>e.localeCompare(t)));let h=Tn(m),g=En(m),_=new Map;for(let e of r.nodes)_.set(e,[]);for(let e of g)for(let t of e.nodes){let n=_.get(t);n?n.push(e.id):_.set(t,[e.id])}let v=[],y=[],b=new Set,x=t(e=>{if(!b.has(e)){b.add(e),v.push(e);for(let t of u.get(e)??[])x(t);y.push(e)}},`walk`);for(let e of f)x(e);for(let e of s)x(e);return{parent:l,children:u,roots:f,componentOf:h,blocks:g,nodeBlocks:_,adjacency:m,preorder:v,postorder:y,topologicalOrder:s}}t(Sn,`buildDrivingTree`);function Cn(e,t,n){let r=n.laneOf(e);return[...t].sort((e,t)=>{let i=n.laneOf(e),a=n.laneOf(t),o=i!=null&&i===r;if(o!==(a!=null&&a===r))return o?-1:1;let s=n.rankHint?.[e],c=n.rankHint?.[t];if(s!=null&&c!=null&&s!==c)return c-s;let l=n.topoIndex.get(e)??0,u=n.topoIndex.get(t)??0;return l===u?e.localeCompare(t):l-u})[0]}t(Cn,`chooseParent`);function wn(e){let t=new Map;for(let n of e.nodes)t.set(n,new Set);for(let n of e.edges)t.get(n.src).add(n.dst),t.get(n.dst).add(n.src);return t}t(wn,`buildAdjacency`);function Tn(e){let t=new Map,n=0;for(let r of e.keys()){if(t.has(r))continue;let i=[r];for(;i.length>0;){let r=i.pop();if(!t.has(r)){t.set(r,n);for(let n of e.get(r)??[])t.has(n)||i.push(n)}}n++}return t}t(Tn,`assignComponents`);function En(e){let n=new Map,r=new Map,i=[],a=[],o=0,s=t((t,c)=>{n.set(t,++o),r.set(t,o);for(let l of e.get(t)??[])l!==c&&(n.has(l)?(n.get(l)??0)<(n.get(t)??0)&&(i.push([t,l]),r.set(t,Math.min(r.get(t)??o,n.get(l)??o))):(i.push([t,l]),s(l,t),r.set(t,Math.min(r.get(t)??o,r.get(l)??o)),(r.get(l)??0)>=(n.get(t)??0)&&a.push(Dn(t,l,i,a.length))))},`visit`);for(let t of e.keys())n.has(t)||s(t,null);return a}t(En,`computeBlocks`);function Dn(e,t,n,r){let i=[],a=new Set;for(;n.length>0;){let r=n.pop();if(i.push(r),a.add(r[0]),a.add(r[1]),r[0]===e&&r[1]===t||r[0]===t&&r[1]===e)break}return{id:r,edges:i,nodes:[...a]}}t(Dn,`popBlock`);function On(e,n,r){let i=[...e.nodes],a=new Map;for(let[e,t]of i.entries())a.set(t,e);let o=i.length,s=Array(o).fill(-1),c=Array(o).fill(0),l=[],u=new Set;for(let e of i){let t=r.parent.get(e)??null,n=a.get(e);n!=null&&(t??(s[n]=-1,c[n]=0,u.has(e)||(u.add(e),l.push(e))))}for(;l.length>0;){let e=l.shift(),t=a.get(e);if(t==null)continue;let n=r.children.get(e)??[];for(let e of n){if(u.has(e))continue;let n=a.get(e);n!=null&&(s[n]=t,c[n]=c[t]+1,u.add(e),l.push(e))}}for(let e of i){if(u.has(e))continue;let t=a.get(e);t!=null&&(s[t]=-1,c[t]=0,u.add(e))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,o)))+1),f=Array.from({length:d},()=>Array(o).fill(-1));for(let e=0;e{if(e===-1||t===-1)return-1;c[e]>t&1&&(e=f[t][e],e===-1))return-1;if(e===t)return e;for(let n=d-1;n>=0;n--){let r=f[n][e],i=f[n][t];r===-1||i===-1||r!==i&&(e=r,t=i)}return f[0][e]},`lcaIndex`),m=Array.from({length:o},()=>new Map);for(let t of e.edges){let e=t.src,r=t.dst,i=n[e],o=n[r];if(i==null||o==null||(i>o&&([e,r]=[r,e],[i,o]=[o,i]),i==null||o==null||i===o))continue;let s=a.get(e),c=a.get(r);if(s==null||c==null)continue;let l=p(s,c);if(l===-1)continue;let u=m[l];for(let e=i;e{if(t.size!==0)for(let[n,r]of t)e.set(n,(e.get(n)??0)+r)},`mergeInto`),_=new Set,v=t(e=>{let t=a.get(e);_.add(e);let i=t==null?void 0:m[t],o=i?new Map(i):new Map,s=r.children.get(e)??[];for(let t of s){let r=v(t),i=n[e];if(i!=null){let a=h.get(e);a||(a=new Map,h.set(e,a));let o=r.get(i)??0,s=n[t];s!=null&&s>i&&(o+=1),a.set(t,o)}g(o,r)}return o},`dfs`);for(let e of r.roots)_.has(e)||v(e);for(let e of i)_.has(e)||v(e);return h}t(On,`computeSubtreeCrossCounts`);function kn(e,n,r){let i=new Map,a=t(e=>{let t=r[e]??0,o=[...n.get(e)??[]];o.sort(An(r));for(let e of o){a(e);let n=i.get(e);n!=null&&(t=Math.min(t,n))}i.set(e,t)},`annotate`);for(let t of e)a(t);return i}t(kn,`annotateMinimumLayers`);function An(e){return(t,n)=>{let r=e[t]??0,i=e[n]??0;return r===i?t.localeCompare(n):r-i}}t(An,`compareByRankThenId`);function jn(e,n,r,i){let a=0;for(let e of n){let t=r[e]??0;t>a&&(a=t)}let o=Array.from({length:a+1},()=>[]),s=new Set,c=t(e=>{if(s.has(e))return;s.add(e);let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e);for(let t of i(e))c(t)},`emit`);for(let t of e)c(t);for(let e of n)if(!s.has(e)){let t=r[e]??0;o[t]||(o[t]=[]),o[t].push(e),s.add(e)}return o}t(jn,`emitNodesInTreeOrder`);function Mn(e){let t=[];for(let n of e){let e=new Set,r=[];for(let t of n)e.has(t)||(e.add(t),r.push(t));t.push(r)}return t}t(Mn,`deduplicateLayers`);function Nn(e,t,n,r){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let o=t[i]??0,s=[],c=[],l=n.get(i);for(let e of a){let t=r.get(e)??o;t>o?s.push({child:e,min:t}):c.push(e)}return s.sort((e,t)=>e.min===t.min?e.child.localeCompare(t.child):e.min-t.min),c.sort((e,t)=>{let n=l?.get(e)??0,i=l?.get(t)??0;if(n!==i)return n-i;let a=r.get(e)??o,s=r.get(t)??o;return a===s?e.localeCompare(t):a-s}),[...s.map(e=>e.child),...c]}}t(Nn,`createChildOrderer`);function Pn(e,t,n){let r=Sn(e,{rankHint:t,laneOf:n}),{children:i,roots:a}=r;for(let t of e.nodes)i.has(t)||i.set(t,[]);let o=On(e,t,r),s=[...a].sort(An(t)),c=Nn(i,t,o,kn(s,i,t)),l=jn(s,e.nodes,t,c);return l=Mn(l),l}t(Pn,`buildMultitreeLayerOrder`);function Fn(e,t,n){let r=new Set(e),i=new Set(t),a=fn(t),o=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&o.push(a.get(e.dst));return pn(o)}t(Fn,`countCrossingsBetweenAdjacent`);function In(e,t,n){let r=[];for(let e of t){let t=n[e.src],i=n[e.dst];if(t==null||i==null||t===i)continue;let a=e.src,o=e.dst,s=t,c=i;t>i&&(a=e.dst,o=e.src,s=i,c=t);for(let t=s;t(n[t]??0)-(n[e]??0));for(let s of o){let o=n[s]??0;if(o===0)continue;let c=0;for(let e of r.get(s)??[])c=Math.max(c,(n[e]??0)+1);if(c>=o)continue;let l=o;n[s]=c;let u=In(Pn(e,n,i),e.edges,n);u(t[e]??0)-(t[n]??0)||e.localeCompare(n));for(let i of r){let r=n(i);if(!r)continue;let a=e.edges.filter(e=>e.src===i);if(a.length===0)continue;let o=!1,s=0;for(let e of a){let t=n(e.dst);t==null||t===r?o=!0:s++}if(s===0||o)continue;let c=0,l=!1;for(let t of e.edges){if(t.dst!==i)continue;let e=n(t.src);e&&(e===r?l=!0:c++)}if(c>0||!l)continue;let u=t[i]??0,d=u+s,f=0;for(let n of e.edges)n.dst===i&&(f=Math.max(f,(t[n.src]??0)+1));let p=Math.max(u,f,d);p!==u&&(t[i]=p)}}t(Rn,`adjustCrossLaneSources`);function zn(e,t){let n=nn(e),r=dn(n)??[...n.nodes].sort(),i=t?.compactSingleInput??!1,a=gn(n),o=Object.create(null);for(let e of r){let r=rn(n,e),s=t?.ignoreCrossLaneEdges?r.filter(t=>{let n=a(t.src),r=a(e);return!n||!r||n===r}):r;if(s.length===0)o[e]=0;else if(i&&s.length===1){let t=s[0].src;a(t)===a(e)?o[e]=(o[t]??0)+1:o[e]=o[t]??0}else{let t=-1/0;for(let e of s)t=Math.max(t,(o[e.src]??0)+1);o[e]=t===-1/0?0:t}}return(t?.optimizeRanksByCrossings??!1)&&(o=Ln(n,o)),t?.ignoreCrossLaneEdges&&Rn(n,o),{layers:Pn(n,o,a),rankOf:o,dummy:new Set}}t(zn,`assignLayers_LongestPath`);function Bn(e,n){let r=nn(e),i={...zn(r,{compactSingleInput:n?.compactSingleInput,ignoreCrossLaneEdges:n?.ignoreCrossLaneEdges,optimizeRanksByCrossings:n?.optimizeRanksByCrossings}).rankOf},a=gn(r),{preds:o,succs:s}=ln(r,e=>{if(n?.ignoreCrossLaneEdges){let t=a(e.src),n=a(e.dst);if(t&&n&&t!==n)return!1}return!0}),c=dn(r)??[...r.nodes],l=[...c].reverse(),u=t((e,t)=>{let n=0;for(let t of o.get(e)??[])n=Math.max(n,(i[t]??0)+1);let r=1/0,a=s.get(e)??[];return a.length>0&&(r=Math.min(...a.map(e=>(i[e]??0)-1))),Number.isFinite(r)||(r=Math.max(n,t)),Math.min(Math.max(t,n),r)},`clampFeasible`),d=bn.GRAVITY_ITERATIONS,f=t(e=>{let t=!1;for(let n of e){let e=o.get(n)??[],r=s.get(n)??[];if(e.length===0&&r.length===0)continue;let a=e.length>0?e.reduce((e,t)=>e+(i[t]??0)+1,0)/e.length:i[n]??0,c=r.length>0?r.reduce((e,t)=>e+(i[t]??0)-1,0)/r.length:i[n]??0,l=Math.round((a+c)/2),d=u(n,l);d!==i[n]&&(i[n]=d,t=!0)}return t},`relaxOrder`);for(let e=0;e0){let n=Math.min(...t.map(e=>(i[e]??0)-1));(i[e]??0)>n&&(i[e]=n)}}return{layers:un(r,c,i),rankOf:i,dummy:new Set}}t(Bn,`assignLayers_Gravity`);function Vn(e){let t=sn(e),n=on(e),r=cn(t),i=[];for(;r.length>0;){let e=[];for(let a of r){i.push(a);for(let r of n.get(a)??[])t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0&&e.push(r)}r=e.sort((e,t)=>e.localeCompare(t))}return i.length===e.nodes.length?i:null}t(Vn,`topoSortByGenerationIfAcyclic`);function Hn(e,n){let r=nn(e),i=n?.direction===`LR`?Vn(r)??[...r.nodes].sort():dn(r)??[...r.nodes].sort(),a=gn(r),o=t(e=>a(e)??e,`laneOf`),s=Object.create(null),c=new Map,l=t((e,t)=>n?.ignoreCrossLaneEdges??!0?+(o(e)===o(t)):1,`edgeWeight`);for(let e of i){if(r.nodeById.get(e)?.isGroup)continue;let t=rn(r,e),n=0;if(t.length>0)for(let r of t){let t=r.src,i=s[t]??0;n=Math.max(n,i+l(t,e))}let i=o(e),a=c.get(i)??0,u=Math.max(n,a);s[e]=u,c.set(i,u+1)}return{layers:un(r,i,s,{skipGroups:!0}),rankOf:s,dummy:new Set}}t(Hn,`assignLayers_LaneAwareCompact`);function Un(e,n){let r=nn(n),{rankOf:i}=e,a=e.layers.map(e=>[...e]),o=new Set(e.dummy?[...e.dummy]:[]),s=0,c=new Map(r.nodeById),l=t(e=>{let t=`placeholder-${s++}`,n={id:t,isGroup:!1,isDummy:!0,width:0,height:0};for(c.set(t,n),o.add(t);a.length<=e;)a.push([]);return a[e].push(t),i[t]=e,t},`addDummyAt`),u=[...r.edges].sort((e,t)=>e.id===t.id?e.src===t.src?e.dst.localeCompare(t.dst):e.src.localeCompare(t.src):e.id.localeCompare(t.id)),d=[];for(let e of u){let t=i[e.src]??0,n=i[e.dst]??0;if(n-t<=1){d.push(e);continue}let r=e.src;for(let i=t+1,a=0;i!r.nodes.includes(e))],edges:d,layout:r.layout,nodeById:c};return{layering:{layers:a,rankOf:i,dummy:o},graphWithDummies:f}}t(Un,`makeProperLayering`);function Wn(e){let t=e.length;if(t===0)return 1/0;let n=[...e].sort((e,t)=>e-t);return t%2==1?n[(t-1)/2]:.5*(n[t/2-1]+n[t/2])}t(Wn,`median`);function Gn(e){return e.length===0?1/0:e.reduce((e,t)=>e+t,0)/e.length}t(Gn,`barycenter`);function Kn(e,t,n,r){let i=new Map;for(let t of e)i.set(t,[]);for(let e of n)r===`down`?t.has(e.src)&&i.has(e.dst)&&i.get(e.dst).push(t.get(e.src)):t.has(e.dst)&&i.has(e.src)&&i.get(e.src).push(t.get(e.dst));return i}t(Kn,`neighborPositionsFor`);function qn(e,t,n){let r=n.get(e)??0,i=n.get(t)??0;return r===i?e.localeCompare(t):r-i}t(qn,`currentOrderTieBreak`);function Jn(e,t,n){let r=new Set(e),i=new Set(t),a=fn(e),o=fn(t),s=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&s.push({u:a.get(e.src),v:o.get(e.dst)});return s.sort((e,t)=>e.u===t.u?e.v-t.v:e.u-t.u),pn(s.map(e=>e.v))}t(Jn,`countCrossingsBetweenAdjacent`);function Yn(e,t,n){return[...e].sort((e,r)=>{let i=Wn(t.get(e)??[]),a=Wn(t.get(r)??[]);return i===a?qn(e,r,n):isFinite(i)?isFinite(a)?i-a:-1:1})}t(Yn,`sortByHeuristic`);function Xn(e,t,n,r,i,a){let o=fn(e),s=fn(t),c=Kn(t,o,n,r);if(!i||!a||a.length===0)return Yn(t,c,s);let l=new Map;for(let e of t){let t=i(e),n=l.get(t)??[];n.push(e),l.set(t,n)}let u=[];for(let e of a){let t=l.get(e);if(!t||t.length===0)continue;let n=Yn(t,c,s);u.push(...n)}let d=l.get(null);if(d&&d.length>0){let e=Yn(d,c,s);for(let t of e){let e=Gn(c.get(t)??[]),n=u.length;if(isFinite(e)){for(let[t,r]of u.entries())if(es.has(e.src)&&c.has(e.dst)),d=l?r.filter(e=>c.has(e.src)&&l.has(e.dst)):void 0,f=t(t=>{let n=Jn(e,t,u);return d&&i&&(n+=Jn(t,i,d)),n},`crossingScore`),p=a?new Map:null;if(a&&p)for(let e of n)p.set(e,a(e));let m=!0,h=f(o);for(;m;){m=!1;for(let e=0;e+1[...e]),i=t.edges,a=gn(t),o=vn(t,n?.laneOrder);for(let e=0;e<3;e++){for(let e=1;e=0;e--)r[e]=Xn(r[e+1],r[e],i,`up`,a,o),r[e]=Zn(r[e+1],r[e],i,r[e-1],a)}return{layers:r}}t(Qn,`orderLayers`);function $n(e,n,r){let i=r?.layerGap??xn.DEFAULT_LAYER_GAP,a=r?.nodeGap??xn.DEFAULT_NODE_GAP,o=r?.laneGap??a*2,s=r?.direction??`TB`,c=s===`LR`||s===`RL`,l=e.layers,u=Object.create(null),d=Object.create(null),f=t(e=>n.nodeById.get(e),`getNode`),p=t(e=>f(e)?.width??0,`getWidth`),m=t(e=>f(e)?.height??0,`getHeight`),h=gn(n),g=vn(n,r?.laneOrder),_=l.map(e=>e.reduce((e,t)=>Math.max(e,m(t)),0)),v=[];if(c)for(let e=0;e+1Math.max(e,p(t)),0),n=l[e+1].reduce((e,t)=>Math.max(e,p(t)),0),r=_[e],a=_[e+1],o=r/2+a/2,s=(t+n)/2,c=Math.max(0,s-o-i);v.push(c)}let y=new Set;for(let e of l)for(let t of e)y.add(h(t));let b=y.has(null),x=g.filter(e=>y.has(e)),S=[...b?[null]:[],...x],C=Object.create(null);for(let e of x)C[e]=0;b&&(C.null=0);for(let e of l){let t=Object.create(null),n=[];for(let r of e){let e=h(r);e===null?n.push(r):(t[e]||=[]).push(r)}for(let[e,n]of Object.entries(t)){let t=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C[e]=Math.max(C[e]??0,t)}if(b&&n.length){let e=n.reduce((e,t)=>e+p(t),0)+a*Math.max(0,n.length-1);C.null=Math.max(C.null??0,e)}}let w=new Map;{let e=S.map(e=>(e===null?C.null:C[e])??0),t=-(e.reduce((e,t)=>e+t,0)+o*Math.max(0,S.length-1))/2;for(let n=0;np(e)),r=i-(e.reduce((e,t)=>e+t,0)+a*(t.length-1))/2;for(let[i,o]of t.entries()){let t=e[i];u[o]=r+t/2,d[o]=T+n/2,r+=t+a}}}let o=v[e]??0;T+=n+i+o}let E=new Map;for(let e of n.edges){let t=e.ref.id;E.has(t)||E.set(t,[]),E.get(t).push(e)}for(let[,e]of E){if(e.length===0)continue;let t=e[0].ref,r=t.start,i=t.end;if(r==null||i==null)continue;let a=Math.round(((u[r]??0)+(u[i]??0))/2),o=new Set;for(let t of e)o.add(t.src),o.add(t.dst);for(let e of o)e===r||e===i||n.nodeById.get(e)?.isDummy&&(u[e]=a)}return{x:u,y:d}}t($n,`assignCoordinates`);var er=8;function tr(e){let t=2166136261;for(let n=0;n>>0}t(tr,`hashString`);function nr(e){let t=e>>>0;return()=>{t+=1831565813;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}t(nr,`mulberry32`);function rr(e,t){let n=[...e],r=nr(t);for(let e=n.length-1;e>0;e--){let t=Math.floor(r()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return n}t(rr,`deterministicShuffle`);function ir(e,t){let n=0;for(let[r,i]of e.entries())n+=Math.abs(r-(t.get(i)??r));return n}t(ir,`sourceDistance`);function ar(e,t){let n=new Map;for(let[t,r]of e.entries())n.set(r,t);let r=0;for(let{a:e,b:i,weight:a}of t){let t=n.get(e),o=n.get(i);t==null||o==null||(r+=a*Math.abs(t-o))}return r}t(ar,`laneArrangementCost`);function or(e){let t=_n(e);if(t.length<2)return[];let n=new Map(t.map((e,t)=>[e,t])),r=gn(e),i=new Map;for(let t of e.layout.edges??[]){if(t.isLayoutOnly)continue;let a=typeof t.start==`string`?t.start:void 0,o=typeof t.end==`string`?t.end:void 0;if(!a||!o||!e.nodeById.has(a)||!e.nodeById.has(o))continue;let s=r(a),c=r(o);if(!s||!c||s===c)continue;let l=n.get(s),u=n.get(c);if(l==null||u==null)continue;let[d,f]=l<=u?[s,c]:[c,s],p=`${d}\0${f}`,m=i.get(p);m?m.weight++:i.set(p,{a:d,b:f,weight:1})}return[...i.values()]}t(or,`buildWeightedLaneEdges`);function sr(e,t,n){let r=[...e],i=ar(r,t),a=!0,o=0,s=Math.max(1,r.length);for(;a&&oe.a===t.a?e.b.localeCompare(t.b):e.a.localeCompare(t.a)).map(({a:e,b:t,weight:n})=>`${e}:${t}:${n}`).join(`|`);return tr(`${e.join(`|`)}#${r}#${n}`)}t(lr,`seedForRestart`);function ur(e,t={}){let n=_n(e);if(n.length<2)return n;let r=or(e);if(r.length===0)return n;let i=new Map(n.map((e,t)=>[e,t])),a=sr(n,r,i),o=Math.max(0,t.restarts??er);for(let e=0;e$&&c*3>=s?o>0?`bottom`:`top`:s>$?a>0?`right`:`left`:n}t(vr,`chooseOrthogonalSide`);function yr(e,t){return Math.abs(e.to-t.from)<$||Math.abs(e.to-t.to)<$?e.to:e.from}t(yr,`sharedLineEndpointCoord`);function br(e,t){return e.orient===`vertical`?{x:e.coord,y:t}:{x:t,y:e.coord}}t(br,`pointOnLine`);function xr(e,n){let r=e.nodes??[],i=e.edges??[],a=[];for(let e of i)e.isLayoutOnly||a.push({...e,__originalEdge:e});let o=new Map,s=new Map,c=[],l=n===`LR`;for(let e of r)o.set(e.id,e);let u=r.filter(e=>e.isGroup&&!e.parentId);for(let e of u){let n={id:e.id},i=t(e=>{s.set(e.id,n),r.filter(t=>t.parentId===e.id).forEach(i)},`assignLane`);i(e)}let d=r.filter(e=>!e.isGroup&&!e.isEdgeLabel).map(e=>{let t=e.width??10,n=e.height??10,r=e.x??0,i=e.y??0,a=fr;return{nodeId:e.id,minX:r-t/2-a,maxX:r+t/2+a,minY:i-n/2-a,maxY:i+n/2+a,visualXHalfExtent:l?n/2+a:t/2+a}}),f=t((e,t,n,r)=>{let i=c.find(n=>n.orientation===e&&Math.abs(n.coord-t)<1);return i||(i={id:`pipe-${e}-${t.toFixed(0)}`,orientation:e,coord:t,spanMin:n,spanMax:r,tracks:[]},c.push(i)),i.spanMin=Math.min(i.spanMin,n),i.spanMax=Math.max(i.spanMax,r),i},`getOrAddPipe`),p=t((e,t)=>{let n=e.width??10,r=e.height??10,i=e.x??0,a=e.y??0;switch(t){case`top`:return{x:i,y:a-r/2};case`bottom`:return{x:i,y:a+r/2};case`left`:return{x:i-n/2,y:a};case`right`:return{x:i+n/2,y:a}}},`portForSide`),m=t((e,t,n)=>p(e,vr(e,t,n?`bottom`:`top`)),`getOrthogonalPort`),h=[],g=[],_=new Set,v=1e3,y=t((e,t,n)=>{if(h.length===0)return 0;let r=Math.abs(t.y-n.y)<$,i=Math.abs(t.x-n.x)<$;if(!r&&!i)return 0;let a=0;if(r){let r=t.y,i=Math.min(t.x,n.x)-$,o=Math.max(t.x,n.x)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex===e||t.orientation!==`vertical`||t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v)}else if(i){let r=t.x,i=Math.min(t.y,n.y)-$,o=Math.max(t.y,n.y)+$;if(o<=i)return 0;for(let t of h)t.edgeIndex===e||t.orientation!==`horizontal`||t.pipe.coordo||t.from-$<=r&&t.to+$>=r&&(a+=v)}return a},`crossingPenalty`),b=a.map((e,t)=>{if(!e.start||!e.end)return{idx:t,crossLane:0,dx:0,dy:0};let n=o.get(e.start),r=o.get(e.end),i=s.get(e.start),a=s.get(e.end);return{idx:t,crossLane:i&&a&&i.id!==a.id?1:0,dx:n&&r?Math.abs((r.x??0)-(n.x??0)):0,dy:n&&r?Math.abs((r.y??0)-(n.y??0)):0}}).sort((e,t)=>{if(e.crossLane!==t.crossLane)return t.crossLane-e.crossLane;let n=e.dx+e.dy,r=t.dx+t.dy;return Math.abs(n-r)>1?n-r:e.idx-t.idx}).map(e=>e.idx),x=t((e,t,n,r)=>{let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return!!d.find(c=>n&&c.nodeId===n||r&&c.nodeId===r?!1:Math.abs(e.x-t.x)>$?c.minYe.y&&c.maxX>i&&c.minXe.x&&c.maxY>o&&c.minYvr(e,t,`bottom`),`determineSide`),T=new Map;for(let[e,t]of a.entries()){if(!t.start||!t.end||t.start===t.end||t.points&&t.points.length>0)continue;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)continue;let i=(r.x??0)-(n.x??0),a=(r.y??0)-(n.y??0);T.set(e,{edgeIdx:e,srcId:t.start,dstId:t.end,srcSide:w(n,{x:r.x??0,y:r.y??0}),dstSide:w(r,{x:n.x??0,y:n.y??0}),absDx:Math.abs(i),absDy:Math.abs(a),dxSign:Math.sign(i),dySign:Math.sign(a)})}let E=t(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.absDx===0?1/0:e.absDy/e.absDx:e.absDy===0?1/0:e.absDx/e.absDy,`preferenceStrength`),D=t(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.dxSign>=0?`right`:`left`:e.dySign>=0?`bottom`:`top`,`secondarySide`),O=new Map;for(let e of T.values()){let t=`${e.srcId}:${e.srcSide}`;O.has(t)||O.set(t,[]),O.get(t).push(e)}let k=new Map,A=t((e,t)=>`${e}:${t}`,`loadKey`);for(let e of T.values())k.set(A(e.srcId,e.srcSide),(k.get(A(e.srcId,e.srcSide))??0)+1),k.set(A(e.dstId,e.dstSide),(k.get(A(e.dstId,e.dstSide))??0)+1);for(let e of O.values())if(!(e.length<2)){e.sort((e,t)=>{let n=E(e),r=E(t);return Math.abs(n-r)>1e-9?r-n:e.edgeIdx-t.edgeIdx});for(let t=1;t=i||(k.set(A(n.srcId,n.srcSide),i-1),k.set(A(n.srcId,r),a+1),n.srcSide=r)}}let j=t(e=>{let t=e?.shape;return t===`question`||t===`diamond`},`isDiamondNode`),ee=new Map;for(let e of T.values())ee.has(e.dstId)||ee.set(e.dstId,new Set),ee.get(e.dstId).add(e.dstSide);for(let e of T.values()){if(!j(o.get(e.srcId)))continue;let t=ee.get(e.srcId);if(!t?.has(e.srcSide))continue;let n=D(e);if(t.has(n)||(k.get(A(e.srcId,n))??0)>0)continue;let r=k.get(A(e.srcId,e.srcSide))??0;k.set(A(e.srcId,e.srcSide),Math.max(0,r-1)),k.set(A(e.srcId,n),1),e.srcSide=n}for(let e of T.values()){let{edgeIdx:t,srcId:n,dstId:r,srcSide:i,dstSide:a}=e,s=o.get(n),c=o.get(r),l=`${n}:${i}:src`,u=i===`top`||i===`bottom`?c.x??0:c.y??0;S.has(l)||S.set(l,[]),S.get(l).push({edgeIdx:t,oppositeCoord:u});let d=`${r}:${a}:dst`,f=a===`top`||a===`bottom`?s.x??0:s.y??0;S.has(d)||S.set(d,[]),S.get(d).push({edgeIdx:t,oppositeCoord:f})}let te=new Map;for(let[e,t]of S){if(t.length<2)continue;t.sort((e,t)=>e.oppositeCoord-t.oppositeCoord);let n=e.split(`:`),r=n.slice(0,-2).join(`:`),i=n[n.length-2],a=n[n.length-1],s=o.get(r);if(!s)continue;let c=i===`left`||i===`right`?s.height??10:s.width??10,l=s.shape,u=l===`question`||l===`diamond`?c*.3:c,d=Math.min(20,Math.max(8,u/(t.length+1))),f=-(d*(t.length-1))/2;for(let[e,n]of t.entries()){let t=f+e*d,r=`${n.edgeIdx}:${a}`;te.set(r,t)}}let M=t(e=>!!a[e]?.labelNodeId,`edgeHasLabelNode`),ne=t((e,t)=>e?(S.get(`${e}:${t}:src`)??[]).some(({edgeIdx:e})=>M(e))||(S.get(`${e}:${t}:dst`)??[]).some(({edgeIdx:e})=>M(e)):!1,`faceHasLabelNode`),N=t((e,t,n)=>t===`top`||t===`bottom`?{x:e.x+n,y:e.y}:{x:e.x,y:e.y+n},`applyPortOffset`),re=t((e,t,n)=>{let r=T.get(e),i={x:n.x??0,y:n.y??0},a={x:t.x??0,y:t.y??0},o=r?.srcSide??w(t,i),s=r?.dstSide??w(n,a),c=r?p(t,r.srcSide):m(t,i,!0),l=r?p(n,r.dstSide):m(n,a,!1),u=te.get(`${e}:src`),d=te.get(`${e}:dst`);return u!==void 0&&(c=N(c,o,u)),d!==void 0&&(l=N(l,s,d)),{pSrcPort:c,pDstPort:l,srcSide:o,dstSide:s}},`portsForEdge`);for(let e of b){let n=a[e];if(g[e]=[],!n.start||!n.end||n.points&&n.points.length>0||n.start===n.end)continue;let r=o.get(n.start),i=o.get(n.end);if(!r||!i)continue;let{pSrcPort:s,pDstPort:u,srcSide:p,dstSide:m}=re(e,r,i),v={...s},b={...u},w=p===`top`||p===`bottom`,T=m===`top`||m===`bottom`;w?v.y=s.y>(r.y??0)?s.y+gr:s.y-gr:v.x=s.x>(r.x??0)?s.x+gr:s.x-gr,T?b.y=u.y>(i.y??0)?u.y+gr:u.y-gr:b.x=u.x>(i.x??0)?u.x+gr:u.x-gr;let E=t((e,t)=>{for(let n of d)if(!t.includes(n.nodeId)&&e.x>n.minX&&e.xn.minY&&e.y{if(i){let i=e.y>(t.y??0);return{x:(n.x??0)>=e.x?r.maxX+pr:r.minX-pr,y:i?r.maxY+mr:r.minY-mr,leavesPositiveSide:i}}let a=e.x>(t.x??0),o=(n.y??0)>=e.y;return{x:a?r.maxX+pr:r.minX-pr,y:o?r.maxY+mr:r.minY-mr,leavesPositiveSide:a}},`obstacleDetour`),O=[],k=[n.start,n.end],A=E(v,k);if(A.inside&&A.obstacle){let e=A.obstacle;if(w){let t=D(s,r,i,e,!0);v.x=t.x,v.y=t.y;let n=t.leavesPositiveSide?Math.min(e.minY-2,s.y+gr):Math.max(e.maxY+2,s.y-gr);O=[{x:s.x,y:n},{x:t.x,y:n},{x:t.x,y:t.y}]}else{let t=D(s,r,i,e,!1),n=t.leavesPositiveSide?Math.min(e.minX-2,s.x+gr):Math.max(e.maxX+2,s.x-gr);v.x=t.x,v.y=t.y,O=[{x:n,y:s.y},{x:n,y:t.y},{x:t.x,y:t.y}]}}let j=[],ee=E(b,k);if(ee.inside&&ee.obstacle){let e=ee.obstacle;if(T){let t=D(u,i,r,e,!0);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:u.x,y:t.y}]}else{let t=D(u,i,r,e,!1);b.x=t.x,b.y=t.y,j=[{x:t.x,y:t.y},{x:t.x,y:u.y}]}}if(O.length===0&&j.length===0){let t=pr,r=Math.abs(v.x-b.x)1||c>1,d=C.get(n.start??``)??0,f=C.get(n.end??``)??0,g=o>1&&ne(n.start,p)||c>1&&ne(n.end,m);if((r||i)&&!a&&(!l||l&&!g&&(o<=1||d<=2)&&(c<=1||f<=2))&&!x(s,u,n.start,n.end)){n.points=[{...s},{...v},{...b},{...u}],_.add(e);let t=i?`horizontal`:`vertical`,r=i?s.y:s.x,a=i?Math.min(s.x,u.x):Math.min(s.y,u.y),o=i?Math.max(s.x,u.x):Math.max(s.y,u.y),c={id:`fast-path-${t}-${r.toFixed(0)}-${e}`,orientation:t,coord:r,spanMin:a,spanMax:o,tracks:[]};h.push({edgeIndex:e,segmentIndex:0,orientation:t,pipe:c,trackIndex:0,from:a,to:o});continue}}v.x=f(`vertical`,v.x,v.y,v.y).coord,b.x=f(`vertical`,b.x,b.y,b.y).coord;let M=Math.min(v.x,b.x)-50,N=Math.max(v.x,b.x)+50,P=Math.min(v.y,b.y)-50,ie=Math.max(v.y,b.y)+50;for(let e of d){let t=Math.min(v.x,b.x),n=Math.max(v.x,b.x),r=Math.min(v.y,b.y),i=Math.max(v.y,b.y);e.minXt&&e.minYr&&(M=Math.min(M,e.minX-hr),N=Math.max(N,e.maxX+hr),P=Math.min(P,e.minY-hr),ie=Math.max(ie,e.maxY+hr))}for(let e of d){if(e.maxXN||e.maxYie)continue;let t=pr;f(`horizontal`,e.minY-t,M,N),f(`horizontal`,e.maxY+t,M,N);let n=mr;f(`vertical`,e.minX-n,P,ie),f(`vertical`,e.maxX+n,P,ie)}f(`horizontal`,v.y,M,N),f(`horizontal`,b.y,M,N);let ae=c.filter(e=>e.orientation===`horizontal`&&e.coord>=P&&e.coord<=ie),oe=c.filter(e=>e.orientation===`vertical`&&e.coord>=M&&e.coord<=N),se=t((e,t)=>`${e.toFixed(1)},${t.toFixed(1)}`,`getKey`),ce=se(v.x,v.y),le=se(b.x,b.y),ue=new Map,de=new Map,fe=new Map,pe=new Set,F=[];ue.set(ce,0),fe.set(ce,`n`),F.push({key:ce,f:Math.hypot(b.x-v.x,b.y-v.y),pt:v}),pe.add(ce);let I=[],me=t((e,t)=>x(e,t,n.start,n.end),`checkSegmentBlocked`),he={x:b.x,y:v.y},L=me(v,he),ge=me(he,b),_e=L||ge,R={x:v.x,y:b.y},z=me(v,R),B=me(R,b);if(_e?z||B||(I=Math.abs(v.x-b.x)<$?[v,b]:[v,R,b]):I=Math.abs(v.y-b.y)<$||Math.abs(v.x-b.x)<$?[v,b]:[v,he,b],I.length===0)for(;F.length>0;){F.sort((e,t)=>e.f-t.f);let t=F.shift();if(pe.delete(t.key),t.key===le){let e=le,t=b;for(I=[t];de.has(e);){let n=de.get(e);I.unshift(n),t=n,e=se(n.x,n.y)}break}let r=t.pt.x,i=t.pt.y,a=oe.sort((e,t)=>e.coord-t.coord),o=a.findIndex(e=>Math.abs(e.coord-r)<1),s=ae.sort((e,t)=>e.coord-t.coord),c=s.findIndex(e=>Math.abs(e.coord-i)<1),l=[];o>0&&l.push({x:a[o-1].coord,y:i}),o>=0&&o0&&l.push({x:r,y:s[c-1].coord}),c>=0&&ce.nodeId===n.start||e.nodeId===n.end?!1:o===s?e.minXr&&e.maxY>c&&e.minYi&&e.maxX>o&&e.minX10&&x<-5||g<-10&&x>5)&&(m=Math.abs(x)*100),(h>10&&_<-5||h<-10&&_>5)&&(m+=Math.abs(_)*50);let S=0,C=fe.get(t.key)??`n`,w=Math.abs(_)>$?`h`:`v`;C!==`n`&&C!==w&&(S=50);let T=f+p+m+S,E=(ue.get(t.key)??1/0)+T,D=Math.abs(b.x-a.x)+Math.abs(b.y-a.y);if(E<(ue.get(u)??1/0))if(de.set(u,t.pt),ue.set(u,E),fe.set(u,w),!pe.has(u))F.push({key:u,f:E+D,pt:a}),pe.add(u);else{let e=F.findIndex(e=>e.key===u);e!==-1&&(F[e].f=E+D)}}}if(I.length===0&&(I=[v,{x:v.x,y:b.y},b]),I.length>4){let e=I[0],n=I[I.length-1],r=Math.min(e.x,n.x),i=Math.max(e.x,n.x),a=Math.min(e.y,n.y),o=Math.max(e.y,n.y);for(let e of I)r=Math.min(r,e.x),i=Math.max(i,e.x),a=Math.min(a,e.y),o=Math.max(o,e.y);let s=i>Math.max(e.x,n.x),c=re.minXr&&e.minYa);if(s.length>0){let r=Math.max(e.x,n.x);for(let e of s){let n=(e.minX+e.maxX)/2;if(e.visualXHalfExtent===void 0||isNaN(e.visualXHalfExtent))continue;let i=n+e.visualXHalfExtent+t;r=Math.max(r,i)}isNaN(r)||(i=r)}}if(c){let i=d.filter(r=>r.minXMath.min(e.y,n.y));if(i.length>0){let a=Math.min(e.x,n.x);for(let e of i){let n=(e.minX+e.maxX)/2-e.visualXHalfExtent-t;a=Math.min(a,n)}r=a}}}let u=t(t=>{let r=n.y>e.y,i=d.filter(t=>{let r=Math.min(e.x,n.x)t.minX,i=Math.min(e.y,n.y)t.minY;return r&&i}),a=i;if(l&&i.length>0){let e=i.filter(e=>e.minXt);e.length>0&&(a=e)}if(a.length===0)return n.y;let o=pr;if(r){let e=Math.max(...a.map(e=>e.maxY))+o;if(ee.minY))-o;if(e>n.y+$)return e}return n.y},`findBestReturnY`),f=t(t=>{let r=u(t),i={x:t,y:e.y},a={x:t,y:r},o={x:n.x,y:r},s=me(e,i),c=me(i,a),l=me(a,o),d=r!==n.y&&me(o,n);return!s&&!c&&!l&&!d?Math.abs(r-n.y)<$?[e,i,a,n]:[e,i,a,o,n]:null},`trySimplifyWithDetourX`),p=s&&!c?f(i):c&&!s?f(r):null;p&&(I=p)}let V=[s,...O,...I,...j.reverse(),u];if(V.length>=3){let e=V[V.length-1],t=V[V.length-2],n=V[V.length-3],r=Math.abs(n.y-t.y)<$&&Math.abs(t.y-e.y)<$,i=Math.abs(n.x-t.x)<$&&Math.abs(t.x-e.x)<$;if(r){let r=Math.sign(t.x-n.x),i=Math.sign(e.x-n.x);r!==0&&r===i&&Math.abs(t.x-n.x)>Math.abs(e.x-n.x)&&V.splice(-2,1)}else if(i){let r=Math.sign(t.y-n.y),i=Math.sign(e.y-n.y);r!==0&&r===i&&Math.abs(t.y-n.y)>Math.abs(e.y-n.y)&&V.splice(-2,1)}}let H=[V[0]];for(let e=1;et.x!=r.x>n.x){H.push(n);continue}continue}if(Math.abs(t.x-n.x)<$&&Math.abs(n.x-r.x)<$){if(n.y>t.y!=r.y>n.y){H.push(n);continue}continue}H.push(n)}H.push(V[V.length-1]);for(let t=0;te.from{let i=!r.segments.some(n=>(n.edgeIndex!==t.edgeIndex||n.segmentIndex!==t.segmentIndex)&&P(n,e)),a=!n.segments.some(n=>(n.edgeIndex!==e.edgeIndex||n.segmentIndex!==e.segmentIndex)&&P(n,t));return i&&a?(e.trackIndex=r.index,t.trackIndex=n.index,n.segments=[...n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),{edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,from:t.from,to:t.to}],r.segments=[...r.segments.filter(e=>e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex),{edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to}],!0):!1},`trySwapSegmentsAcrossTracks`),ae=t(e=>{let t=e.tracks.length;return e.tracks[t]={index:t,coord:e.coord,segments:[]},t},`createNewTrack`),oe=t((e,t)=>{let n=e.pipe.tracks[e.trackIndex];n.segments=n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),e.trackIndex=t,e.pipe.tracks[t].segments.push({edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to})},`moveSegmentToTrack`),se=t((e,t)=>{let n=g[e.edgeIndex];for(let r of n){let n=h[r];n.pipe===e.pipe&&oe(n,t)}},`moveSegmentChainToTrack`),ce=t(e=>{let t=g[e.edgeIndex],n=t.indexOf(h.indexOf(e)),r=[];return n>0&&r.push(h[t[n-1]]),n{if(e.orientation===t.orientation)return!1;let n=e.orientation===`horizontal`?e:t,r=e.orientation===`horizontal`?t:e;return r.pipe.coord>n.from&&r.pipe.coordr.from&&n.pipe.coord{for(let n of e.tracks)if(!n.segments.some(e=>(e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex)&&P(e,t)))return n.index;return-1},`findAvailableTrack`),de=t((e,t)=>{if(e.trackIndex===t.trackIndex)return P(e,t);let n=ce(e),r=ce(t);return n.some(e=>r.some(t=>le(e,t)))},`segmentsConflict`),fe=t((e,t,n)=>{if(ie(e,t,e.pipe.tracks[e.trackIndex],t.pipe.tracks[t.trackIndex]))return;let r=ue(e.pipe,t);n(t,r===-1?ae(e.pipe):r)},`resolveTrackConflict`),pe=t(e=>{let t=0;for(let n=0;n{if(F.has(e))return F.get(e);let t=g[e];if(t.length===0){let t={dest:0,deviation:0,base:0,delta:0};return F.set(e,t),t}let n=h[t[0]].pipe.coord,r=n;for(let e=1;eMath.abs(t-n)?e:t;break}}let i=Math.abs(r-n),a={dest:r,deviation:i,base:n,delta:r-n};return F.set(e,a),a},`getDestInfo`),me=t(()=>{let e=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.start&&(n.has(t.start)||n.set(t.start,[]),n.get(t.start).push(e));let r=t(e=>{let t=a[e];if(!t.start||!t.end)return 0;let n=o.get(t.start),r=o.get(t.end);if(!n||!r)return 0;let i=(r.x??0)-(n.x??0),s=(r.y??0)-(n.y??0);return Math.abs(i)+Math.abs(s)},`getEdgeDistance`);for(let t of n.values()){t.sort((e,t)=>{let n=I(e),i=I(t);if(Math.abs(n.deviation-i.deviation)>1)return n.deviation-i.deviation;if(Math.abs(n.dest-i.dest)>1)return n.dest-i.dest;let a=r(e),o=r(t);if(Math.abs(a-o)>1)return o-a;let s=g[e].length,c=g[t].length;if(s!==c)return s-c;if(s===1){let n=g[e][0],r=g[t][0];if(h[n]&&h[r]){let e=h[n],t=h[r],i=Math.abs(e.to-e.from),a=Math.abs(t.to-t.from);if(Math.abs(i-a)>1)return i-a}}return 0});let n=t.map(e=>h[g[e][0]]);e+=pe(n)}return e},`fixSourceHandleCrossings`),he=t(()=>{let e=0,n=new Map;for(let[e,t]of a.entries())g[e].length!==0&&t.end&&(n.has(t.end)||n.set(t.end,[]),n.get(t.end).push(e));for(let r of n.values()){r.sort((e,n)=>{let r=t(e=>{let t=g[e];if(t.length<2)return 0;let n=h[t[t.length-2]];return Math.abs(n.to-n.from)},`getDist`),i=r(e),a=r(n);return Math.abs(i-a)>.1?i-a:e-n});let n=r.map(e=>h[g[e][g[e].length-1]]);e+=pe(n)}return e},`fixTargetHandleCrossings`),L=t(()=>{let e=0;for(let t of c){let n=[];for(let e of t.tracks)for(let t of e.segments){let e=g[t.edgeIndex].find(e=>h[e].segmentIndex===t.segmentIndex);e!==void 0&&n.push(h[e])}n.sort((e,t)=>e.edgeIndex-t.edgeIndex||e.segmentIndex-t.segmentIndex);for(let t=0;t{e.segments.forEach(t=>{n.push({edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,trackIndex:e.index,from:t.from,to:t.to})})}),n.sort((e,t)=>e.from-t.from);let r=[];if(n.length>0){let e=[n[0]],t=n[0].to;for(let i=1;ir.add(e.trackIndex));let i=new Map;n.forEach(e=>{let t=I(e.edgeIndex);i.set(e.trackIndex,(i.get(e.trackIndex)??0)+t.delta)});let a=[...r].filter(e=>(i.get(e)??0)<-1),o=[...r].filter(e=>(i.get(e)??0)>1),s=[...r].filter(e=>Math.abs(i.get(e)??0)<=1);a.sort((e,t)=>(i.get(t)??0)-(i.get(e)??0)),o.sort((e,t)=>(i.get(e)??0)-(i.get(t)??0));let c=t((t,r)=>{n.filter(e=>e.trackIndex===t).forEach(t=>{let n=_.has(t.edgeIndex)?e.coord:r;_e.set(`${t.edgeIndex}-${t.segmentIndex}`,n)})},`assignCoord`),l=0;for(let t of a)l++,c(t,e.coord-l*_r);if(s.length===0&&r.size>0){let e=[...r].sort((e,t)=>Math.abs(i.get(e)??0)-Math.abs(i.get(t)??0))[0],t=a.indexOf(e);t!==-1&&a.splice(t,1);let n=o.indexOf(e);n!==-1&&o.splice(n,1),s.push(e)}let u=0;for(let t of s){if(u===0)c(t,e.coord);else{let n=u%2==1?1:-1,r=Math.ceil(u/2);c(t,e.coord+n*r*_r*.5)}u++}let d=0;for(let t of o)d++,c(t,e.coord+d*_r)}}for(let[e,t]of a.entries()){let n=g[e]??[];if(n.length===0)continue;let r=[],{pSrcPort:i,pDstPort:a}=re(e,o.get(t.start),o.get(t.end)),s=n.map(e=>{let t=h[e],n=_e.get(`${t.edgeIndex}-${t.segmentIndex}`)??t.pipe.coord;return{orient:t.orientation,coord:n,from:t.from,to:t.to}});r.push(i);for(let e=0;e$&&r.push(br(t,i)),c&&o.orient===t.orient)if(Math.abs(t.coord-o.coord)>$){let e=t.orient===`vertical`?(i+o.from)/2:yr(t,o);r.push(br(t,e),br(o,e))}else(e===0||e===s.length-2)&&r.push(br(t,yr(t,o)));else if(c)r.push(br(t,o.coord));else{let e=Math.abs(t.from-i)$||Math.abs(c.y-a.y)>$)&&r.push(a);let l=[];r.length>0&&l.push(r[0]);for(let e=1;e$||Math.abs(t.y-n.y)>$)&&l.push(t)}t.points=l}for(let e of a){let t=e.__originalEdge;t&&e.points&&(t.points=e.points)}e.edges=(e.edges??[]).filter(e=>!e.isLayoutOnly);let R=t((e,t)=>{let n=t.x??0,r=t.y??0,i=t.width??0,a=t.height??0;if(i<=0||a<=0)return e;let o=n-i/2,s=n+i/2,c=r-a/2,l=r+a/2;if(e.xs||e.yl)return e;let u=e.x-o,d=s-e.x,f=e.y-c,p=l-e.y,m=Math.min(u,d,f,p);return m===u?{x:o,y:e.y}:m===d?{x:s,y:e.y}:m===f?{x:e.x,y:c}:{x:e.x,y:l}},`nodeBoundaryClamp`);for(let t of e.edges){let e=t.points;if(!e||e.length<2)continue;let n=t.start,r=t.end,i=n?o.get(n):void 0,a=r?o.get(r):void 0;i&&(e[0]=R(e[0],i)),a&&(e[e.length-1]=R(e[e.length-1],a))}return e}t(xr,`routeEdgesOrthogonal`);function Sr(e){return e.direction??`TB`}t(Sr,`getSwimlaneDirection`);function Cr(e){let t=F(e),n=e.config.flowchart?.nodeSpacing??40,r=e.config.flowchart?.rankSpacing??100,i=e.config.swimlane?.ignoreCrossLaneEdges??!0,a=e.config.swimlane?.optimizeRanksByCrossings??!0,o=e.config.swimlane?.automaticLaneOrdering??!1,s=Sr(e),{ordered:c,coordinates:l}=dr(t,{nodeGap:n,layerGap:r,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:a,automaticLaneOrdering:o,direction:s});I(t,c,l,{nodeGap:n,layerGap:r});for(let t of e.edges??[])delete t.points;xr(e,s);for(let t of e.edges??[])(!t.curve||t.curve===`basis`)&&(t.curve=`rounded`);return tn(e,s),en(e),s}t(Cr,`runSwimlaneLayoutCore`);async function wr(e,t){let n=t.select(`g`);h(n,e.markers,e.type,e.diagramId),p(),b(),m(),l(),pe(e);let r=he(e);e.nodes=r.nodes,e.edges=r.edges;let{groups:i}=await x(n,e);Cr(e),await oe(e,i)}t(wr,`render`);export{wr as render}; \ No newline at end of file diff --git a/dist-desktop/assets/swimlanesDiagram-G3AALYLV-CGWZF_2o.js b/dist-desktop/assets/swimlanesDiagram-G3AALYLV-CGWZF_2o.js deleted file mode 100644 index 6e69ac7..0000000 --- a/dist-desktop/assets/swimlanesDiagram-G3AALYLV-CGWZF_2o.js +++ /dev/null @@ -1,8 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import"./src-UMNXGZaF.js";import"./chunk-WYO6CB5R-Dv5kDyQC.js";import"./chunk-ICXQ74PX-Czpgj8Uw.js";import"./chunk-HOUHSVGY-iJuv90UH.js";import"./chunk-Q4XR5HBZ-CQ8zkLYc.js";import"./chunk-7BUUIJ7U-Bb538aSH.js";import"./chunk-OGEWGWER-D-nWYRNR.js";import"./chunk-32BRIVSS-DWU3ezKg.js";import"./chunk-XXDRQBXY-Bq6zMMOx.js";import"./chunk-VR4S4FIN-BTo4eV3J.js";import"./chunk-C7G6YPKG-DW-1jWUA.js";import"./chunk-ZGVPDNZ5-DGInJAPD.js";import"./chunk-52WLFC77-BOCvVCX1.js";import"./chunk-FWX5IMBZ-ComLEIwh.js";import"./chunk-ZIRB5QZD-C6fEPe3t.js";import{r as t,t as n}from"./chunk-PUDLZKDR-hlw4TonS.js";var r=n({defaultLayout:`swimlane`,styles:e(e=>`${t(e)} - .swimlane.cluster rect { - stroke: ${e.clusterBorder} !important; - } - [data-look="neo"].cluster rect { - filter: none; - } -`,`getStyles`)});export{r as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/timeline-definition-FHXFAJF6-DFMIv6oI.js b/dist-desktop/assets/timeline-definition-FHXFAJF6-DFMIv6oI.js deleted file mode 100644 index 45f929e..0000000 --- a/dist-desktop/assets/timeline-definition-FHXFAJF6-DFMIv6oI.js +++ /dev/null @@ -1,120 +0,0 @@ -import{n as e,t}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as n,p as r}from"./src-UMNXGZaF.js";import{J as i,a,b as o,et as s,o as c,rt as l,tt as u,x as d}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as f}from"./arc-DqK6O3qL.js";import{p}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as m}from"./chunk-VAUOI2AC-AC9pRUsa.js";var h=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,11,13,14,15,17,19,20,23,24],r=[1,12],i=[1,13],a=[1,14],o=[1,15],s=[1,16],c=[1,19],l=[1,20],u={trace:e(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:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s];break}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},t(n,[2,5],{5:6}),t(n,[2,2]),t(n,[2,3]),t(n,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,10],{1:[2,1]}),t(n,[2,6]),{12:21,14:r,15:i,17:a,19:o,20:s,21:17,22:18,23:c,24:l},t(n,[2,8]),t(n,[2,9]),t(n,[2,11]),{16:[1,22]},{18:[1,23]},t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),t(n,[2,7]),t(n,[2,12]),t(n,[2,13])],defaultActions:{},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};u.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){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;case 10:return this.popState(),`acc_title_value`;case 11:return this.begin(`acc_descr`),17;case 12:return this.popState(),`acc_descr_value`;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}}}})();function d(){this.yy={}}return e(d,`Parser`),d.prototype=u,u.Parser=d,new d})();h.parser=h;var g=h,_={};t(_,{addEvent:()=>M,addSection:()=>O,addTask:()=>j,addTaskOrg:()=>N,clear:()=>T,default:()=>ee,getCommonDb:()=>w,getDirection:()=>D,getSections:()=>k,getTasks:()=>A,setDirection:()=>E});var v=``,y=0,b=`LR`,x=[],S=[],C=[],w=e(()=>c,`getCommonDb`),T=e(function(){x.length=0,S.length=0,v=``,C.length=0,b=`LR`,a()},`clear`),E=e(function(e){b=e},`setDirection`),D=e(function(){return b},`getDirection`),O=e(function(e){v=e,x.push(e)},`addSection`),k=e(function(){return x},`getSections`),A=e(function(){let e=P(),t=0;for(;!e&&t<100;)e=P(),t++;return S.push(...C),S},`getTasks`),j=e(function(e,t,n){let r={id:y++,section:v,type:v,task:e,score:t||0,events:n?[n]:[]};C.push(r)},`addTask`),M=e(function(e){C.find(e=>e.id===y-1).events.push(e)},`addEvent`),N=e(function(e){let t={section:v,type:v,description:e,task:e,classes:[]};S.push(t)},`addTaskOrg`),P=e(function(){let t=e(function(e){return C[e].processed},`compileTask`),n=!0;for(let[e,r]of C.entries())t(e),n&&=r.processed;return n},`compileTasks`),ee={clear:T,getCommonDb:w,getDirection:D,setDirection:E,addSection:O,getSections:k,getTasks:A,addTask:j,addTaskOrg:N,addEvent:M},F=0,I=e(function(e,t){let n=e.append(`rect`);return n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),n.attr(`rx`,t.rx),n.attr(`ry`,t.ry),t.class!==void 0&&n.attr(`class`,t.class),n},`drawRect`),te=e(function(t,n){let r=t.append(`circle`).attr(`cx`,n.cx).attr(`cy`,n.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),i=t.append(`g`);i.append(`circle`).attr(`cx`,n.cx-15/3).attr(`cy`,n.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),i.append(`circle`).attr(`cx`,n.cx+15/3).attr(`cy`,n.cy-15/3).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function a(e){let t=f().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+2)+`)`)}e(a,`smile`);function o(e){let t=f().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,t).attr(`transform`,`translate(`+n.cx+`,`+(n.cy+7)+`)`)}e(o,`sad`);function s(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,n.cx-5).attr(`y1`,n.cy+7).attr(`x2`,n.cx+5).attr(`y2`,n.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return e(s,`ambivalent`),n.score>3?a(i):n.score<3?o(i):s(i),r},`drawFace`),ne=e(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),L=e(function(e,t){let n=t.text.replace(//gi,` `),r=e.append(`text`);r.attr(`x`,t.x),r.attr(`y`,t.y),r.attr(`class`,`legend`),r.style(`text-anchor`,t.anchor),t.class!==void 0&&r.attr(`class`,t.class);let i=r.append(`tspan`);return i.attr(`x`,t.x+t.textMargin*2),i.text(n),r},`drawText`),re=e(function(t,n){function r(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}e(r,`genPoints`);let i=t.append(`polygon`);i.attr(`points`,r(n.x,n.y,50,20,7)),i.attr(`class`,`labelBox`),n.y+=n.labelMargin,n.x+=.5*n.labelMargin,L(t,n)},`drawLabel`),R=e(function(e,t,n){let r=e.append(`g`),i=B();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width,i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,I(r,i),V(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),z=-1,ie=e(function(e,t,n,r){let i=t.x+n.width/2,a=e.append(`g`);z++,a.append(`line`).attr(`id`,r+`-task`+z).attr(`x1`,i).attr(`y1`,t.y).attr(`x2`,i).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),te(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=B();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class=`task task-type-`+t.num,o.rx=3,o.ry=3,I(a,o),V(n)(t.task,a,o.x,o.y,o.width,o.height,{class:`task`},n,t.colour)},`drawTask`),ae=e(function(e,t){I(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:`rect`}).lower()},`drawBackgroundRect`),oe=e(function(){return{x:0,y:0,fill:void 0,"text-anchor":`start`,width:100,height:100,textMargin:0,rx:0,ry:0}},`getTextObj`),B=e(function(){return{x:0,y:0,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),V=(function(){function t(e,t,n,r,a,o,s,c){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`font-color`,c).style(`text-anchor`,`middle`).text(e),s)}e(t,`byText`);function n(e,t,n,r,a,o,s,c,l){let{taskFontSize:u,taskFontFamily:d}=c,f=e.split(//gi);for(let e=0;e)/).reverse(),i,a=[],o=1.1,s=e.attr(`y`),c=parseFloat(e.attr(`dy`)),l=e.text(null).append(`tspan`).attr(`x`,0).attr(`y`,s).attr(`dy`,c+`em`);for(let r=0;rt||i===`
    `)&&(a.pop(),l.text(a.join(` `).trim()),a=i===`
    `?[``]:[i],l=e.append(`tspan`).attr(`x`,0).attr(`y`,s).attr(`dy`,o+`em`).text(i))})}e(H,`wrap`);var ce=e(function(e,t,n,i,a,o=!1){let{theme:s,look:c}=i,l=s?.includes(`redux`),u=n%(i?.themeVariables?.THEME_COLOR_LIMIT??12)-1,d=e.append(`g`);t.section=u,d.attr(`class`,(t.class?t.class+` `:``)+`timeline-node `+(`section-`+u));let f=d.append(`g`),p=d.append(`g`),m=p.append(`text`).text(t.descr).attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).call(H,t.width).node().getBBox(),h=i.fontSize?.replace?i.fontSize.replace(`px`,``):i.fontSize;if(t.height=m.height+h*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width+=2*t.padding,p.attr(`transform`,`translate(`+t.width/2+`, `+t.padding/2+`)`),l&&p.attr(`transform`,`translate(${t.width/2}, ${o?t.padding/2+3:t.padding})`),ue(f,t,u,a,i),c===`neo`&&(d.attr(`data-look`,`neo`),l)){let t=s.includes(`dark`),n=r(e.node()?.ownerSVGElement??e.node()),i=n.attr(`id`)??``,a=i?`${i}-drop-shadow`:`drop-shadow`;if(n.select(`#${a}`).empty()){let e=n.select(`defs`);(e.empty()?n.append(`defs`):e).append(`filter`).attr(`id`,a).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,t?`0.2`:`0.06`).attr(`flood-color`,t?`#FFFFFF`:`#000000`)}}return t},`drawNode`),le=e(function(e,t,n){let r=e.append(`g`),i=r.append(`text`).text(t.descr).attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).call(H,t.width).node().getBBox(),a=n.fontSize?.replace?n.fontSize.replace(`px`,``):n.fontSize;return r.remove(),i.height+a*1.1*.5+t.padding},`getVirtualNodeHeight`),ue=e(function(e,t,n,r,i){let{theme:a}=i,o=a?.includes(`redux`)?0:5,s=o>0?`M0 ${t.height-5} v${-t.height+10} q0,-${o},${o},-${o} h${t.width-10} q${o},0,${o},${o} v${t.height-5} H0 Z`:`M0 ${t.height-5} v${-(t.height-5)} h${t.width} v${t.height} H0 Z`;e.append(`path`).attr(`id`,r+`-node-`+F++).attr(`class`,`node-bkg node-`+t.type).attr(`d`,s),a?.includes(`redux`)||e.append(`line`).attr(`class`,`node-line-`+n).attr(`x1`,0).attr(`y1`,t.height).attr(`x2`,t.width).attr(`y2`,t.height)},`defaultBkg`),U={drawRect:I,drawCircle:ne,drawSection:R,drawText:L,drawLabel:re,drawTask:ie,drawBackgroundRect:ae,getTextObj:oe,getNoteRect:B,initGraphics:se,drawNode:ce,getVirtualNodeHeight:le},de=e(function(e,t,a,o){let s=d(),{look:c,theme:l,themeVariables:u}=s,{useGradient:f,gradientStart:p,gradientStop:m}=u,h=s.timeline?.leftMargin??50;n.debug(`timeline`,o.db);let g=s.securityLevel,_;g===`sandbox`&&(_=r(`#i`+t));let v=r(g===`sandbox`?_.nodes()[0].contentDocument.body:`body`).select(`#`+t);v.append(`g`);let y=o.db.getTasks(),b=o.db.getCommonDb().getDiagramTitle();n.debug(`task`,y),U.initGraphics(v,t);let x=o.db.getSections();n.debug(`sections`,x);let S=0,C=0,w=0,T=0,E=50+h,D=50;T=50;let O=0,k=!0;x.forEach(function(e){let t={number:O,descr:e,section:O,width:150,padding:20,maxHeight:S},r=U.getVirtualNodeHeight(v,t,s);n.debug(`sectionHeight before draw`,r),S=Math.max(S,r+20)});let A=0,j=0;n.debug(`tasks.length`,y.length);for(let[e,t]of y.entries()){let r={number:e,descr:t,section:t.section,width:150,padding:20,maxHeight:C},i=U.getVirtualNodeHeight(v,r,s);n.debug(`taskHeight before draw`,i),C=Math.max(C,i+20),A=Math.max(A,t.events.length);let a=0;for(let e of t.events){let n={descr:e,section:t.section,number:t.section,width:150,padding:20,maxHeight:50};a+=U.getVirtualNodeHeight(v,n,s)}t.events.length>0&&(a+=(t.events.length-1)*10),j=Math.max(j,a)}n.debug(`maxSectionHeight before draw`,S),n.debug(`maxTaskHeight before draw`,C),x&&x.length>0?x.forEach(e=>{let r=y.filter(t=>t.section===e),i={number:O,descr:e,section:O,width:200*Math.max(r.length,1)-50,padding:20,maxHeight:S};n.debug(`sectionNode`,i);let a=v.append(`g`),o=U.drawNode(a,i,O,s,t);n.debug(`sectionNode output`,o),a.attr(`transform`,`translate(${E}, ${T})`),D+=S+50,r.length>0&&W(v,r,O,E,D,C,s,A,j,S,!1,t),E+=200*Math.max(r.length,1),D=T,O++}):(k=!1,W(v,y,O,E,D,C,s,A,j,S,!0,t));let M=v.node().getBBox();if(n.debug(`bounds`,M),b&&v.append(`text`).text(b).attr(`x`,c===`neo`?M.x*2+h:M.width/2-h).attr(`font-size`,`4ex`).attr(`font-weight`,`bold`).attr(`y`,20),w=k?S+C+150:C+100,v.append(`g`).attr(`class`,`lineWrapper`).append(`line`).attr(`x1`,h).attr(`y1`,w).attr(`x2`,M.width+3*h).attr(`y2`,w).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#${t}-arrowhead)`),c===`neo`&&f&&l!==`neutral`){let e=v.select(`defs`),t=(e.empty()?v.append(`defs`):e).append(`linearGradient`).attr(`id`,v.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);t.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,p).attr(`stop-opacity`,1),t.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,m).attr(`stop-opacity`,1)}i(void 0,v,s.timeline?.padding??50,s.timeline?.useMaxWidth??!1)},`draw`),W=e(function(e,t,r,i,a,o,s,c,l,u,d,f){for(let c of t){let t={descr:c.task,section:r,number:r,width:150,padding:20,maxHeight:o};n.debug(`taskNode`,t);let u=e.append(`g`).attr(`class`,`taskWrapper`),p=U.drawNode(u,t,r,s,f).height;if(n.debug(`taskHeight after draw`,p),u.attr(`transform`,`translate(${i}, ${a})`),o=Math.max(o,p),c.events){let t=e.append(`g`).attr(`class`,`lineWrapper`),n=o;a+=100,n+=fe(e,c.events,r,i,a,s,f),a-=100,t.append(`line`).attr(`x1`,i+190/2).attr(`y1`,a+o).attr(`x2`,i+190/2).attr(`y2`,a+o+100+l+100).attr(`stroke-width`,2).attr(`stroke`,`black`).attr(`marker-end`,`url(#${f}-arrowhead)`).attr(`stroke-dasharray`,`5,5`)}i+=200,d&&!s.timeline?.disableMulticolor&&r++}a-=10},`drawTasks`),fe=e(function(e,t,r,i,a,o,s){let c=0,l=a;a+=100;for(let l of t){let t={descr:l,section:r,number:r,width:150,padding:20,maxHeight:50};n.debug(`eventNode`,t);let u=e.append(`g`).attr(`class`,`eventWrapper`),d=U.drawNode(u,t,r,o,s,!0).height;c+=d,u.attr(`transform`,`translate(${i}, ${a})`),a=a+10+d}return a=l,c},`drawEvents`),pe={setConf:e(()=>{},`setConf`),draw:de},G=200,K=5,me=G+K*2,q=G+100,he=q+K*2,J=10,ge=0,Y=20,X=20,Z=30,Q=50,_e=e(function(e,t,r,a){let o=d(),s=o.timeline?.leftMargin??50;n.debug(`timeline`,a.db);let c=m(t);c.append(`g`);let l=a.db.getTasks(),u=a.db.getCommonDb().getDiagramTitle();n.debug(`task`,l),U.initGraphics(c);let f=a.db.getSections();n.debug(`sections`,f);let h=0,g=0,_=50+s,v=50,y=v,b=_,x=me+X,S=he+Q,C=b+x,w=0,T=f&&f.length>0,E=T?C:_+x,D=Math.max(50,x+S-K*2);f.forEach(function(e){let t={number:w,descr:e,section:w,width:D,padding:K,maxHeight:h},r=U.getVirtualNodeHeight(c,t,o);n.debug(`sectionHeight before draw`,r),h=Math.max(h,r)});let O=0;n.debug(`tasks.length`,l.length);for(let[e,t]of l.entries()){let r={number:e,descr:t,section:t.section,width:G,padding:K,maxHeight:g},i=U.getVirtualNodeHeight(c,r,o);n.debug(`taskHeight before draw`,i),g=Math.max(g,i);let a=0;for(let e of t.events){let n={descr:e,section:t.section,number:t.section,width:q,padding:K,maxHeight:50};a+=U.getVirtualNodeHeight(c,n,o)}t.events.length>0&&(a+=(t.events.length-1)*J),O=Math.max(O,a)+ge}n.debug(`maxSectionHeight before draw`,h),n.debug(`maxTaskHeight before draw`,g);let k=Math.max(g,O)+Z;T?f.forEach(e=>{let t=l.filter(t=>t.section===e),r={number:w,descr:e,section:w,width:D,padding:K,maxHeight:h};n.debug(`sectionNode`,r);let i=c.append(`g`),a=U.drawNode(i,r,w,o);n.debug(`sectionNode output`,a);let s=E-x;i.attr(`transform`,`translate(${s}, ${v})`);let u=v+a.height+Y;t.length>0&&$(c,t,w,E,u,g,o,k,!1);let d=t.length,f=a.height+Y+k*Math.max(d,1)-(d>0?Z*2:0);v+=f,w++}):$(c,l,w,E,v,g,o,k,!0);let A=c.node()?.getBBox();if(!A)throw Error(`bbox not found`);if(n.debug(`bounds`,A),u){if(c.append(`text`).text(u).attr(`x`,A.width/2-s).attr(`font-size`,`4ex`).attr(`font-weight`,`bold`).attr(`y`,20),A=c.node()?.getBBox(),!A)throw Error(`bbox not found`);n.debug(`bounds after title`,A)}let[j]=p(o.fontSize),M=(j??16)*2,N=(j??16)*.5+20,P=c.append(`g`).attr(`class`,`lineWrapper`);P.append(`line`).attr(`x1`,E).attr(`y1`,y-M).attr(`x2`,E).attr(`y2`,A.y+A.height+N).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`),P.lower(),i(void 0,c,o.timeline?.padding??50,o.timeline?.useMaxWidth??!1)},`draw`),$=e(function(e,t,r,i,a,o,s,c,l){for(let u of t){let t={descr:u.task,section:r,number:r,width:G,padding:K,maxHeight:o};n.debug(`taskNode`,t);let d=e.append(`g`).attr(`class`,`taskWrapper`),f=U.drawNode(d,t,r,s),p=f.height;n.debug(`taskHeight after draw`,p);let m=i-X-f.width;if(d.attr(`transform`,`translate(${m}, ${a})`),o=Math.max(o,p),u.events&&u.events.length>0){let t=a,n=i+Q;ve(e,u.events,r,i,n,t,s)}a+=c,l&&!s.timeline?.disableMulticolor&&r++}},`drawTasks`),ve=e(function(e,t,r,i,a,o,s){let c=o;for(let o of t){let t={descr:o,section:r,number:r,width:q,padding:K,maxHeight:0};n.debug(`eventNode`,t);let l=e.append(`g`).attr(`class`,`eventWrapper`),u=U.drawNode(l,t,r,s).height;l.attr(`transform`,`translate(${a}, ${c})`);let d=e.append(`g`).attr(`class`,`lineWrapper`),f=c+u/2;d.append(`line`).attr(`x1`,i).attr(`y1`,f).attr(`x2`,a).attr(`y2`,f).attr(`stroke-width`,2).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`).attr(`stroke-dasharray`,`5,5`),c=c+u+J}return c-o},`drawEvents`),ye={setConf:e(()=>{},`setConf`),draw:_e},be=e(e=>{let{theme:t}=o(),n=t?.includes(`dark`),r=t?.includes(`color`),i=e.svgId?.replace(/^#/,``)??``,a=i?`url(#${i}-drop-shadow)`:e.dropShadow??`none`,s=``;for(let t=0;t{let t=``;for(let t=0;t{},`setConf`),draw:e((e,t,n,r)=>(r?.db?.getDirection?.()??`LR`)===`TD`?ye.draw(e,t,n,r):pe.draw(e,t,n,r),`draw`)},parser:g,styles:e(e=>{let{theme:t}=o(),n=t?.includes(`redux`),r=t===`neutral`,i=e.svgId?.replace(/^#/,``)??``,a=``;if(e.useGradient&&i&&e.THEME_COLOR_LIMIT&&!r)for(let t=0;t{var t=n();function r(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=r()}));function a(e){return e[e.length-1]}function o(e){return typeof e==`function`}function s(e,t){return o(e)?e(t):e}var c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function u(e){for(let t in e)if(c.call(e,t))return!0;return!1}var d=()=>Object.create(null),f=(e,t)=>p(e,t,d);function p(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=_(e)&&_(i);if(!a&&!(h(e)&&h(i)))return i;let o=a?e:m(e);if(!o)return i;let s=a?i:m(i);if(!s)return i;let l=o.length,u=s.length,d=a?Array(u):n(),f=0;for(let t=0;ti||!v(e[o],t[o],n)))return!1;return i===a}return!1}function y(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function b(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}function x(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}var ee=/[\x00-\x1f\x7f"<>`{}]/g;function S(e){return e.replace(ee,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function C(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return S(t)}var w=[`http:`,`https:`,`mailto:`,`tel:`];function te(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}var ne={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},T=/[&><\u2028\u2029]/g;function re(e){return e.replace(T,e=>ne[e])}function ie(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=C(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=C(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function E(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function D(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var k=4,A=5;function oe(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function se(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=oe(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=P(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=P(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=P(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=N(n.fullPath??n.from);e.kind=A,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=N(n.fullPath??n.from);e.kind=k,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,i.priority=n.options?.params?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)ce(e,t,r,s,i,a,o)}function j(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function M(e){if(e.pathless)for(let t of e.pathless)M(t);if(e.static)for(let t of e.static.values())M(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())M(t);if(e.dynamic?.length){e.dynamic.sort(j);for(let t of e.dynamic)M(t)}if(e.optional?.length){e.optional.sort(j);for(let t of e.optional)M(t)}if(e.wildcard?.length){e.wildcard.sort(j);for(let t of e.wildcard)M(t)}}function N(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function P(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function F(e,t){let n=N(`/`),r=new Uint16Array(6);for(let t of e)ce(!1,r,t,1,n,0);M(n),t.masksTree=n,t.flatCache=ae(1e3)}function I(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=B(e,t.masksTree);return t.flatCache.set(e,r),r}function le(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=N(`/`),ce(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),B(r,o,n)}function L(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=B(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=de(a.route)),t.matchCache.set(r,a),a}function R(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function z(e,t=!1,n){let r=N(e.fullPath),i=new Uint16Array(6),a={},o={},s=0;return ce(t,i,e,1,r,0,e=>{if(n?.(e,s),e.id in a&&O(),a[e.id]=e,s!==0&&e.path){let t=R(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}s++}),M(r),{processedTree:{segmentTree:r,singleCache:ae(1e3),matchCache:ae(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function B(e,t,n=!1){let r=e.split(`/`),i=pe(e,r,t,n);if(!i)return null;let[a]=ue(e,r,i);return{route:i.node.route,rawParams:a}}function ue(e,t,n){let r=fe(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s=0;e--){let n=i.wildcard[e],{prefix:r,suffix:o}=n;if(!(r&&(v||!(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)))){if(o){if(v)continue;let e=t.slice(a).join(`/`).slice(-o.length);if((n.caseSensitive?e:e.toLowerCase())!==o)continue}c.push({node:n,index:s,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<=0;n--){let r=i.optional[n];c.push({node:r,index:a,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:o}=n;if(r||o){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||o&&!e.endsWith(o))continue}c.push({node:n,index:a+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+me(s,a),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}c.push({node:t,index:a+1,skipped:d,depth:f+1,statics:p,dynamics:m+me(s,a),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&c.push({node:e,index:a+1,skipped:d,depth:f+1,statics:p+me(s,a),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&c.push({node:e,index:a+1,skipped:d,depth:f+1,statics:p+me(s,a),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];c.push({node:n,index:a,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(u)return u;if(r&&l){let n=l.index;for(let e=0;ee.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===k)>(e.node.kind===k)||t.node.kind===k==(e.node.kind===k)&&t.depth>e.depth)))}function U(e){return ge(e.filter(e=>e!==void 0).join(`/`))}function ge(e){return e.replace(/\/{2,}/g,`/`)}function _e(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function ve(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function ye(e){return ve(_e(e))}function be(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function xe(e,t,n){return be(e,n)===be(t,n)}function Se({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),o=!i&&t===`.`,s;if(r){s=i?t:o?e:e+`\0`+t;let n=r.get(s);if(n)return n}let c;if(o)c=e.split(`/`);else if(i)c=t.split(`/`);else{for(c=e.split(`/`);c.length>1&&a(c)===``;)c.pop();let n=t.split(`/`);for(let e=0,t=n.length;e1&&(a(c)===``?n===`never`&&c.pop():n===`always`&&c.push(``));let l=ge(c.join(`/`))||`/`;return s&&r&&r.set(s,l),l}function Ce(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function we(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Ee(e,n)).join(`/`):Ee(r,n):r}function Te({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function Me(e){let t=W.useRef(null);return W.useImperativeHandle(e,()=>t.current,[]),t}var Ne=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Pe=t(((e,t)=>{t.exports=Ne()})),Fe=Pe();function Ie({children:e,fallback:t=null}){return Le()?(0,Fe.jsx)(W.Fragment,{children:e}):(0,Fe.jsx)(W.Fragment,{children:t})}function Le(){return W.useSyncExternalStore(Re,()=>!0,()=>!1)}function Re(){return()=>{}}var ze=W.createContext(null);function Be(e){return W.useContext(ze)}var Ve=t((e=>{var t=n();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),He=t(((e,t)=>{t.exports=Ve()})),Ue=t((e=>{var t=n(),r=He();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=r.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),We=t(((e,t)=>{t.exports=Ue()}))();function Ge(e,t){return e===t}function Ke(e,t,n=Ge){let r=(0,W.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,W.useCallback)(()=>e?.get(),[e]);return(0,We.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var qe=e(i(),1);function Je(e,t){let n=Be(),r=Me(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:c,preload:l,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:f,replace:p,startTransition:m,resetScroll:h,viewTransition:g,children:_,target:y,disabled:b,style:x,className:ee,onClick:S,onBlur:C,onFocus:w,onMouseEnter:ne,onMouseLeave:T,onTouchStart:re,ignoreBlocker:ie,params:E,search:D,hash:O,state:ae,mask:k,reloadDocument:A,unsafeRelative:oe,from:se,_fromLocation:ce,...j}=e,M=Le(),N=W.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),P=Ke(n.stores.location,e=>e,(e,t)=>e.href===t.href),F=W.useMemo(()=>{let e={_fromLocation:P,...N};return n.buildLocation(e)},[n,P,N]),I=F.maskedLocation?F.maskedLocation.publicHref:F.publicHref,le=F.maskedLocation?F.maskedLocation.external:F.external,L=W.useMemo(()=>rt(I,le,n.history,b),[b,le,I,n.history]),R=W.useMemo(()=>{if(L?.external)return te(L.href,n.protocolAllowlist)?void 0:L.href;if(!it(c)&&!(typeof c!=`string`||c.indexOf(`:`)===-1))try{return new URL(c),te(c,n.protocolAllowlist)?void 0:c}catch{}},[c,L,n.protocolAllowlist]),z=W.useMemo(()=>{if(R)return!1;if(o?.exact){if(!xe(P.pathname,F.pathname,n.basepath))return!1}else{let e=be(P.pathname,n.basepath),t=be(F.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(o?.includeSearch??!0)&&!v(P.search,F.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:!o?.includeHash||M&&P.hash===F.hash},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,P,R,M,F.hash,F.pathname,F.search,n.basepath]),B=z?s(i,{})??Xe:Ye,ue=z?Ye:s(a,{})??Ye,de=[ee,B.className,ue.className].filter(Boolean).join(` `),fe=(x||B.style||ue.style)&&{...x,...B.style,...ue.style},[pe,me]=W.useState(!1),he=W.useRef(!1),V=e.reloadDocument||R?!1:l??n.options.defaultPreload,H=u??n.options.defaultPreloadDelay??0,U=W.useCallback(()=>{n.preloadRoute({...N,_builtLocation:F}).catch(e=>{console.warn(e),console.warn(De)})},[n,N,F]);je(r,W.useCallback(e=>{e?.isIntersecting&&U()},[U]),tt,{disabled:!!b||V!==`viewport`}),W.useEffect(()=>{he.current||!b&&V===`render`&&(U(),he.current=!0)},[b,U,V]);let ge=e=>{let t=e.currentTarget.getAttribute(`target`),r=y===void 0?t:y;if(!b&&!ot(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,qe.flushSync)(()=>{me(!0)});let t=n.subscribe(`onResolved`,()=>{t(),me(!1)});n.navigate({...N,replace:p,resetScroll:h,hashScrollIntoView:f,startTransition:m,viewTransition:g,ignoreBlocker:ie})}};if(R)return{...j,ref:r,href:R,..._&&{children:_},...y&&{target:y},...b&&{disabled:b},...x&&{style:x},...ee&&{className:ee},...S&&{onClick:S},...C&&{onBlur:C},...w&&{onFocus:w},...ne&&{onMouseEnter:ne},...T&&{onMouseLeave:T},...re&&{onTouchStart:re}};let _e=e=>{if(b||V!==`intent`)return;if(!H){U();return}let t=e.currentTarget;if(et.has(t))return;let n=setTimeout(()=>{et.delete(t),U()},H);et.set(t,n)},ve=e=>{b||V!==`intent`||U()},ye=e=>{if(b||!V||!H)return;let t=e.currentTarget,n=et.get(t);n&&(clearTimeout(n),et.delete(t))};return{...j,...B,...ue,href:L?.href,ref:r,onClick:nt([S,ge]),onBlur:nt([C,ye]),onFocus:nt([w,_e]),onMouseEnter:nt([ne,_e]),onMouseLeave:nt([T,ye]),onTouchStart:nt([re,ve]),disabled:!!b,target:y,...fe&&{style:fe},...de&&{className:de},...b&&Ze,...z&&Qe,...M&&pe&&$e}}var Ye={},Xe={className:`active`},Ze={role:`link`,"aria-disabled":!0},Qe={"data-status":`active`,"aria-current":`page`},$e={"data-transitioning":`transitioning`},et=new WeakMap,tt={rootMargin:`100px`},nt=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function rt(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function it(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var at=W.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Je(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return W.createElement(`a`,t,o)}return W.createElement(n,a,o)});function ot(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function st(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t{let n=Array(e.length+t.length);for(let t=0;t({classGroupId:e,validator:t}),dt=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),ft=`-`,pt=[],mt=`arbitrary..`,ht=e=>{let t=vt(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return _t(e);let n=e.split(ft);return gt(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?lt(i,t):t:i||pt}return n[e]||pt}}},gt=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=gt(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(ft):e.slice(t).join(ft),s=a.length;for(let e=0;ee.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?mt+r:void 0})(),vt=e=>{let{theme:t,classGroups:n}=e;return yt(n,t)},yt=(e,t)=>{let n=dt();for(let r in e){let i=e[r];bt(i,n,r,t)}return n},bt=(e,t,n,r)=>{let i=e.length;for(let a=0;a{if(typeof e==`string`){St(e,t,n);return}if(typeof e==`function`){Ct(e,t,n,r);return}wt(e,t,n,r)},St=(e,t,n)=>{let r=e===``?t:Tt(t,e);r.classGroupId=n},Ct=(e,t,n,r)=>{if(Et(e)){bt(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(ut(n,e))},wt=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e{let n=e,r=t.split(ft),i=r.length;for(let e=0;e`isThemeGetter`in e&&e.isThemeGetter===!0,Dt=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Ot=`!`,kt=`:`,At=[],jt=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Mt=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;si?a-i:void 0;return jt(t,l,c,u)};if(t){let e=t+kt,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):jt(At,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Nt=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Pt=e=>({cache:Dt(e.cacheSize),parseClassName:Mt(e),sortModifiers:Nt(e),postfixLookupClassGroupIds:Ft(e),...ht(e)}),Ft=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(It),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+Ot:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e0?` `+l:l)}return l},Rt=(...e)=>{let t=0,n,r,i=``;for(;t{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r{let n,r,i,a,o=o=>(n=Pt(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Lt(e,n);return i(e,a),a};return a=o,(...e)=>a(Rt(...e))},Vt=[],G=e=>{let t=t=>t[e]||Vt;return t.isThemeGetter=!0,t},Ht=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Ut=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Wt=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Gt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kt=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Jt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Yt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,K=e=>Wt.test(e),q=e=>!!e&&!Number.isNaN(Number(e)),J=e=>!!e&&Number.isInteger(Number(e)),Xt=e=>e.endsWith(`%`)&&q(e.slice(0,-1)),Y=e=>Gt.test(e),Zt=()=>!0,Qt=e=>Kt.test(e)&&!qt.test(e),$t=()=>!1,en=e=>Jt.test(e),tn=e=>Yt.test(e),nn=e=>!X(e)&&!Z(e),rn=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),an=e=>Q(e,Sn,$t),X=e=>Ht.test(e),on=e=>Q(e,Cn,Qt),sn=e=>Q(e,wn,q),cn=e=>Q(e,En,Zt),ln=e=>Q(e,Tn,$t),un=e=>Q(e,bn,$t),dn=e=>Q(e,xn,tn),fn=e=>Q(e,Dn,en),Z=e=>Ut.test(e),pn=e=>$(e,Cn),mn=e=>$(e,Tn),hn=e=>$(e,bn),gn=e=>$(e,Sn),_n=e=>$(e,xn),vn=e=>$(e,Dn,!0),yn=e=>$(e,En,!0),Q=(e,t,n)=>{let r=Ht.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},$=(e,t,n=!1)=>{let r=Ut.exec(e);return r?r[1]?t(r[1]):n:!1},bn=e=>e===`position`||e===`percentage`,xn=e=>e===`image`||e===`url`,Sn=e=>e===`length`||e===`size`||e===`bg-size`,Cn=e=>e===`length`,wn=e=>e===`number`,Tn=e=>e===`family-name`,En=e=>e===`number`||e===`weight`,Dn=e=>e===`shadow`,On=Bt(()=>{let e=G(`color`),t=G(`font`),n=G(`text`),r=G(`font-weight`),i=G(`tracking`),a=G(`leading`),o=G(`breakpoint`),s=G(`container`),c=G(`spacing`),l=G(`radius`),u=G(`shadow`),d=G(`inset-shadow`),f=G(`text-shadow`),p=G(`drop-shadow`),m=G(`blur`),h=G(`perspective`),g=G(`aspect`),_=G(`ease`),v=G(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Z,X],ee=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],S=()=>[`auto`,`contain`,`none`],C=()=>[Z,X,c],w=()=>[K,`full`,`auto`,...C()],te=()=>[J,`none`,`subgrid`,Z,X],ne=()=>[`auto`,{span:[`full`,J,Z,X]},J,Z,X],T=()=>[J,`auto`,Z,X],re=()=>[`auto`,`min`,`max`,`fr`,Z,X],ie=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],E=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],D=()=>[`auto`,...C()],O=()=>[K,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...C()],ae=()=>[K,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...C()],k=()=>[K,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...C()],A=()=>[e,Z,X],oe=()=>[...b(),hn,un,{position:[Z,X]}],se=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ce=()=>[`auto`,`cover`,`contain`,gn,an,{size:[Z,X]}],j=()=>[Xt,pn,on],M=()=>[``,`none`,`full`,l,Z,X],N=()=>[``,q,pn,on],P=()=>[`solid`,`dashed`,`dotted`,`double`],F=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],I=()=>[q,Xt,hn,un],le=()=>[``,`none`,m,Z,X],L=()=>[`none`,q,Z,X],R=()=>[`none`,q,Z,X],z=()=>[q,Z,X],B=()=>[K,`full`,...C()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[Y],breakpoint:[Y],color:[Zt],container:[Y],"drop-shadow":[Y],ease:[`in`,`out`,`in-out`],font:[nn],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[Y],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[Y],shadow:[Y],spacing:[`px`,q],text:[Y],"text-shadow":[Y],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,K,X,Z,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,Z,X]}],"container-named":[rn],columns:[{columns:[q,X,Z,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{"inset-s":w(),start:w()}],end:[{"inset-e":w(),end:w()}],"inset-bs":[{"inset-bs":w()}],"inset-be":[{"inset-be":w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[J,`auto`,Z,X]}],basis:[{basis:[K,`full`,`auto`,s,...C()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[q,K,`auto`,`initial`,`none`,X]}],grow:[{grow:[``,q,Z,X]}],shrink:[{shrink:[``,q,Z,X]}],order:[{order:[J,`first`,`last`,`none`,Z,X]}],"grid-cols":[{"grid-cols":te()}],"col-start-end":[{col:ne()}],"col-start":[{"col-start":T()}],"col-end":[{"col-end":T()}],"grid-rows":[{"grid-rows":te()}],"row-start-end":[{row:ne()}],"row-start":[{"row-start":T()}],"row-end":[{"row-end":T()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":re()}],"auto-rows":[{"auto-rows":re()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...ie(),`normal`]}],"justify-items":[{"justify-items":[...E(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...E()]}],"align-content":[{content:[`normal`,...ie()]}],"align-items":[{items:[...E(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...E(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":ie()}],"place-items":[{"place-items":[...E(),`baseline`]}],"place-self":[{"place-self":[`auto`,...E()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":C()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":C()}],"space-y-reverse":[`space-y-reverse`],size:[{size:O()}],"inline-size":[{inline:[`auto`,...ae()]}],"min-inline-size":[{"min-inline":[`auto`,...ae()]}],"max-inline-size":[{"max-inline":[`none`,...ae()]}],"block-size":[{block:[`auto`,...k()]}],"min-block-size":[{"min-block":[`auto`,...k()]}],"max-block-size":[{"max-block":[`none`,...k()]}],w:[{w:[s,`screen`,...O()]}],"min-w":[{"min-w":[s,`screen`,`none`,...O()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...O()]}],h:[{h:[`screen`,`lh`,...O()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...O()]}],"max-h":[{"max-h":[`screen`,`lh`,...O()]}],"font-size":[{text:[`base`,n,pn,on]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,yn,cn]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Xt,X]}],"font-family":[{font:[mn,ln,t]}],"font-features":[{"font-features":[X]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Z,X]}],"line-clamp":[{"line-clamp":[q,`none`,Z,sn]}],leading:[{leading:[a,...C()]}],"list-image":[{"list-image":[`none`,Z,X]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Z,X]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:A()}],"text-color":[{text:A()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...P(),`wavy`]}],"text-decoration-thickness":[{decoration:[q,`from-font`,`auto`,Z,on]}],"text-decoration-color":[{decoration:A()}],"underline-offset":[{"underline-offset":[q,`auto`,Z,X]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:C()}],"tab-size":[{tab:[J,Z,X]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Z,X]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Z,X]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:oe()}],"bg-repeat":[{bg:se()}],"bg-size":[{bg:ce()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},J,Z,X],radial:[``,Z,X],conic:[J,Z,X]},_n,dn]}],"bg-color":[{bg:A()}],"gradient-from-pos":[{from:j()}],"gradient-via-pos":[{via:j()}],"gradient-to-pos":[{to:j()}],"gradient-from":[{from:A()}],"gradient-via":[{via:A()}],"gradient-to":[{to:A()}],rounded:[{rounded:M()}],"rounded-s":[{"rounded-s":M()}],"rounded-e":[{"rounded-e":M()}],"rounded-t":[{"rounded-t":M()}],"rounded-r":[{"rounded-r":M()}],"rounded-b":[{"rounded-b":M()}],"rounded-l":[{"rounded-l":M()}],"rounded-ss":[{"rounded-ss":M()}],"rounded-se":[{"rounded-se":M()}],"rounded-ee":[{"rounded-ee":M()}],"rounded-es":[{"rounded-es":M()}],"rounded-tl":[{"rounded-tl":M()}],"rounded-tr":[{"rounded-tr":M()}],"rounded-br":[{"rounded-br":M()}],"rounded-bl":[{"rounded-bl":M()}],"border-w":[{border:N()}],"border-w-x":[{"border-x":N()}],"border-w-y":[{"border-y":N()}],"border-w-s":[{"border-s":N()}],"border-w-e":[{"border-e":N()}],"border-w-bs":[{"border-bs":N()}],"border-w-be":[{"border-be":N()}],"border-w-t":[{"border-t":N()}],"border-w-r":[{"border-r":N()}],"border-w-b":[{"border-b":N()}],"border-w-l":[{"border-l":N()}],"divide-x":[{"divide-x":N()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":N()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...P(),`hidden`,`none`]}],"divide-style":[{divide:[...P(),`hidden`,`none`]}],"border-color":[{border:A()}],"border-color-x":[{"border-x":A()}],"border-color-y":[{"border-y":A()}],"border-color-s":[{"border-s":A()}],"border-color-e":[{"border-e":A()}],"border-color-bs":[{"border-bs":A()}],"border-color-be":[{"border-be":A()}],"border-color-t":[{"border-t":A()}],"border-color-r":[{"border-r":A()}],"border-color-b":[{"border-b":A()}],"border-color-l":[{"border-l":A()}],"divide-color":[{divide:A()}],"outline-style":[{outline:[...P(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[q,Z,X]}],"outline-w":[{outline:[``,q,pn,on]}],"outline-color":[{outline:A()}],shadow:[{shadow:[``,`none`,u,vn,fn]}],"shadow-color":[{shadow:A()}],"inset-shadow":[{"inset-shadow":[`none`,d,vn,fn]}],"inset-shadow-color":[{"inset-shadow":A()}],"ring-w":[{ring:N()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:A()}],"ring-offset-w":[{"ring-offset":[q,on]}],"ring-offset-color":[{"ring-offset":A()}],"inset-ring-w":[{"inset-ring":N()}],"inset-ring-color":[{"inset-ring":A()}],"text-shadow":[{"text-shadow":[`none`,f,vn,fn]}],"text-shadow-color":[{"text-shadow":A()}],opacity:[{opacity:[q,Z,X]}],"mix-blend":[{"mix-blend":[...F(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":F()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[q]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":A()}],"mask-image-linear-to-color":[{"mask-linear-to":A()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":A()}],"mask-image-t-to-color":[{"mask-t-to":A()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":A()}],"mask-image-r-to-color":[{"mask-r-to":A()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":A()}],"mask-image-b-to-color":[{"mask-b-to":A()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":A()}],"mask-image-l-to-color":[{"mask-l-to":A()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":A()}],"mask-image-x-to-color":[{"mask-x-to":A()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":A()}],"mask-image-y-to-color":[{"mask-y-to":A()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":A()}],"mask-image-radial-to-color":[{"mask-radial-to":A()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[q]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":A()}],"mask-image-conic-to-color":[{"mask-conic-to":A()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:oe()}],"mask-repeat":[{mask:se()}],"mask-size":[{mask:ce()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Z,X]}],filter:[{filter:[``,`none`,Z,X]}],blur:[{blur:le()}],brightness:[{brightness:[q,Z,X]}],contrast:[{contrast:[q,Z,X]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,vn,fn]}],"drop-shadow-color":[{"drop-shadow":A()}],grayscale:[{grayscale:[``,q,Z,X]}],"hue-rotate":[{"hue-rotate":[q,Z,X]}],invert:[{invert:[``,q,Z,X]}],saturate:[{saturate:[q,Z,X]}],sepia:[{sepia:[``,q,Z,X]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Z,X]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[q,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[q,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,q,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[q,Z,X]}],"backdrop-invert":[{"backdrop-invert":[``,q,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[q,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[q,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":[``,q,Z,X]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Z,X]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[q,`initial`,Z,X]}],ease:[{ease:[`linear`,`initial`,_,Z,X]}],delay:[{delay:[q,Z,X]}],animate:[{animate:[`none`,v,Z,X]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Z,X]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:L()}],"rotate-x":[{"rotate-x":L()}],"rotate-y":[{"rotate-y":L()}],"rotate-z":[{"rotate-z":L()}],scale:[{scale:R()}],"scale-x":[{"scale-x":R()}],"scale-y":[{"scale-y":R()}],"scale-z":[{"scale-z":R()}],"scale-3d":[`scale-3d`],skew:[{skew:z()}],"skew-x":[{"skew-x":z()}],"skew-y":[{"skew-y":z()}],transform:[{transform:[Z,X,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:B()}],"translate-x":[{"translate-x":B()}],"translate-y":[{"translate-y":B()}],"translate-z":[{"translate-z":B()}],"translate-none":[`translate-none`],zoom:[{zoom:[J,Z,X]}],accent:[{accent:A()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:A()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Z,X]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":A()}],"scrollbar-track-color":[{"scrollbar-track":A()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,Z,X]}],fill:[{fill:[`none`,...A()]}],"stroke-w":[{stroke:[q,pn,on,sn]}],stroke:[{stroke:[`none`,...A()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function kn(...e){return On(ct(e))}function An(e=`id`){return`${e}_${Math.random().toString(36).slice(2,10)}${Date.now().toString(36).slice(-4)}`}export{w as A,b as B,I as C,z as D,F as E,E as F,i as G,a as H,re as I,s as L,y as M,ie as N,ae as O,v as P,u as R,de as S,le as T,f as U,x as V,p as W,U as _,Ke as a,_e as b,Ie as c,Oe as d,ke as f,Te as g,Ce as h,at as i,D as j,O as k,Le as l,ge as m,An as n,Be as o,Ae as p,ct as r,ze as s,kn as t,Pe as u,Se as v,L as w,ve as x,ye as y,te as z}; \ No newline at end of file diff --git a/dist-desktop/assets/vennDiagram-L72KCM5P-DkYnXwoc.js b/dist-desktop/assets/vennDiagram-L72KCM5P-DkYnXwoc.js deleted file mode 100644 index 95deb1e..0000000 --- a/dist-desktop/assets/vennDiagram-L72KCM5P-DkYnXwoc.js +++ /dev/null @@ -1,34 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{p as t}from"./src-UMNXGZaF.js";import{H as n,K as r,U as i,a,b as o,c as s,et as c,f as l,nt as u,rt as d,tt as f,v as p,w as m,y as h}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{i as g}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as _}from"./chunk-VAUOI2AC-AC9pRUsa.js";import{t as v}from"./rough.esm-CSKSodPl.js";var y=(e,t)=>u(e,`a`,-t),b=1e-10;function x(e,t){let n=C(e),r=n.filter(t=>S(t,e)),i=0,a=0,o=[];if(r.length>1){let t=O(r);for(let e=0;et.angle-e.angle);let n=r[r.length-1];for(let t=0;tr.radius*2&&(d=r.radius*2),(l==null||l.width>d)&&(l={circle:r,width:d,p1:s,p2:n,large:d>r.radius,sweep:!0})}l!=null&&(o.push(l),i+=w(l.circle.radius,l.width),n=s)}}else{let t=e[0];for(let n=1;nMath.abs(t.radius-e[r].radius)){n=!0;break}n?i=a=0:(i=t.radius*t.radius*Math.PI,o.push({circle:t,p1:{x:t.x,y:t.y+t.radius},p2:{x:t.x-b,y:t.y+t.radius},width:t.radius*2,large:!0,sweep:!0}))}return a/=2,t&&(t.area=i+a,t.arcArea=i,t.polygonArea=a,t.arcs=o,t.innerPoints=r,t.intersectionPoints=n),i+a}function S(e,t){return t.every(t=>T(e,t)=e+t)return 0;if(n<=Math.abs(e-t))return Math.PI*Math.min(e,t)*Math.min(e,t);let r=e-(n*n-t*t+e*e)/(2*n),i=t-(n*n-e*e+t*t)/(2*n);return w(e,r)+w(t,i)}function D(e,t){let n=T(e,t),r=e.radius,i=t.radius;if(n>=r+i||n<=Math.abs(r-i))return[];let a=(r*r-i*i+n*n)/(2*n),o=Math.sqrt(r*r-a*a),s=e.x+a*(t.x-e.x)/n,c=e.y+a*(t.y-e.y)/n,l=-(t.y-e.y)*(o/n),u=-(t.x-e.x)*(o/n);return[{x:s+l,y:c-u},{x:s-l,y:c+u}]}function O(e){let t={x:0,y:0};for(let n of e)t.x+=n.x,t.y+=n.y;return t.x/=e.length,t.y/=e.length,t}function k(e,t,n,r){r||={};let i=r.maxIterations||100,a=r.tolerance||1e-10,o=e(t),s=e(n),c=n-t;if(o*s>0)throw`Initial bisect points must have opposite signs`;if(o===0)return t;if(s===0)return n;for(let n=0;n=0&&(t=n),Math.abs(c)A(t))}function M(e,t){let n=0;for(let r=0;re.fx-t.fx,_=t.slice(),v=t.slice(),y=t.slice(),b=t.slice();for(let t=0;t{let t=e.slice();return t.fx=e.fx,t.id=e.id,t});e.sort((e,t)=>e.id-t.id),n.history.push({x:m[0].slice(),fx:m[0].fx,simplex:e})}f=0;for(let e=0;e=m[p-1].fx){let n=!1;if(v.fx>t.fx?(F(y,1+u,_,-u,t),y.fx=e(y),y.fx=1)break;for(let t=1;ts+a*i*c||l>=p)f=i;else{if(Math.abs(d)<=-o*c)return i;d*(f-u)>=0&&(f=u),u=i,p=l}return 0}for(let m=0;m<10;++m){if(F(r.x,1,n.x,i,t),l=r.fx=e(r.x,r.fxprime),d=M(r.fxprime,t),l>s+a*i*c||m&&l>=u)return p(f,i,u);if(Math.abs(d)<=-o*c)return i;if(d>=0)return p(i,f,l);u=l,f=i,i*=2}return i}function R(e,t,n){let r={x:t.slice(),fx:0,fxprime:t.slice()},i={x:t.slice(),fx:0,fxprime:t.slice()},a=t.slice(),o,s,c=1,l;n||={},l=n.maxIterations||t.length*20,r.fx=e(r.x,r.fxprime),o=r.fxprime.slice(),P(o,r.fxprime,-1);for(let t=0;t{let t={};for(let n=0;nE(e,t,r)-n,0,e+t)}function ne(e,t={}){let n=t.distinct,r=e.map(e=>Object.assign({},e));function i(e){return e.join(`;`)}if(n){let e=new Map;for(let t of r)for(let n=0;ne===t?0:ee.sets.length===2).forEach(e=>{let a=n[e.sets[0]],o=n[e.sets[1]],s=z(Math.sqrt(t[a].size/Math.PI),Math.sqrt(t[o].size/Math.PI),e.size);r[a][o]=r[o][a]=s;let c=0;e.size+1e-10>=Math.min(t[a].size,t[o].size)?c=1:e.size<=1e-10&&(c=-1),i[a][o]=i[o][a]=c}),{distances:r,constraints:i}}function ie(e,t,n,r){for(let e=0;e0&&m<=d||f<0&&m>=d||(i+=2*h*h,t[2*a]+=4*h*(o-l),t[2*a+1]+=4*h*(s-u),t[2*c]+=4*h*(l-o),t[2*c+1]+=4*h*(u-s))}}return i}function ae(e,t={}){let n=se(e,t),r=t.lossFunction||B;if(e.length>=8){let i=oe(e,t),a=r(i,e),o=r(n,e);a+1e-8e.map(e=>e/s));let c=(e,t)=>ie(e,t,a,o),l=null;for(let e=0;ee.sets.length===2);for(let t of e){let e=t.weight==null?1:t.weight,n=t.sets[0],a=t.sets[1];t.size+te>=Math.min(r[n].size,r[a].size)&&(e=0),i[n].push({set:a,size:t.size,weight:e}),i[a].push({set:n,size:t.size,weight:e})}let a=[];Object.keys(i).forEach(e=>{let t=0;for(let n=0;ne[t]));let i=r.weight==null?1:r.weight;n+=i*(t-r.size)*(t-r.size)}return n}function ce(e,t){let n=0;for(let r of t){if(r.sets.length===1)continue;let t;if(r.sets.length===2){let n=e[r.sets[0]],i=e[r.sets[1]];t=E(n.radius,i.radius,T(n,i))}else t=x(r.sets.map(t=>e[t]));let i=r.weight==null?1:r.weight,a=Math.log((t+1)/(r.size+1));n+=i*a*a}return n}function le(e,t,n){if(n==null?e.sort((e,t)=>t.radius-e.radius):e.sort(n),e.length>0){let t=e[0].x,n=e[0].y;for(let r of e)r.x-=t,r.y-=n}if(e.length===2&&T(e[0],e[1])1){let n=Math.atan2(e[1].x,e[1].y)-t,r=Math.cos(n),i=Math.sin(n);for(let t of e){let e=t.x,n=t.y;t.x=r*e-i*n,t.y=i*e+r*n}}if(e.length>2){let n=Math.atan2(e[2].x,e[2].y)-t;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let t=e[1].y/(1e-10+e[1].x);for(let n of e){var r=(n.x+t*n.y)/(1+t*t);n.x=2*r-n.x,n.y=2*r*t-n.y}}}}function ue(e){e.forEach(e=>{e.parent=e});function t(e){return e.parent!==e&&(e.parent=t(e.parent)),e.parent}function n(e,n){let r=t(e);r.parent=t(n)}for(let t=0;t{delete e.parent}),Array.from(r.values())}function V(e){let t=t=>({max:e.reduce((e,n)=>Math.max(e,n[t]+n.radius),-1/0),min:e.reduce((e,n)=>Math.min(e,n[t]-n.radius),1/0)});return{xRange:t(`x`),yRange:t(`y`)}}function de(e,t,n){t??=Math.PI/2;let r=me(e).map(e=>Object.assign({},e)),i=ue(r);for(let e of i){le(e,t,n);let r=V(e);e.size=(r.xRange.max-r.xRange.min)*(r.yRange.max-r.yRange.min),e.bounds=r}i.sort((e,t)=>t.size-e.size),r=i[0];let a=r.bounds,o=(a.xRange.max-a.xRange.min)/50;function s(e,t,n){if(!e)return;let i=e.bounds,s,c;if(t)s=a.xRange.max-i.xRange.min+o;else{s=a.xRange.max-i.xRange.max;let e=(i.xRange.max-i.xRange.min)/2-(a.xRange.max-a.xRange.min)/2;e<0&&(s+=e)}if(n)c=a.yRange.max-i.yRange.min+o;else{c=a.yRange.max-i.yRange.max;let e=(i.yRange.max-i.yRange.min)/2-(a.yRange.max-a.yRange.min)/2;e<0&&(c+=e)}for(let t of e)t.x+=s,t.y+=c,r.push(t)}let c=1;for(;c({radius:u*e.radius,x:r+d+(e.x-o.min)*u,y:r+f+(e.y-s.min)*u,setid:e.setid})))}function pe(e){let t={};for(let n of e)t[n.setid]=n;return t}function me(e){return Object.keys(e).map(t=>Object.assign(e[t],{setid:t}))}function he(e={}){let t=!1,n=600,r=350,i=15,a=1e3,o=Math.PI/2,s=!0,c=null,l=!0,u=!0,d=null,f=null,p=!1,m=null,h=e&&e.symmetricalTextCentre?e.symmetricalTextCentre:!1,g={},_=e&&e.colourScheme?e.colourScheme:e&&e.colorScheme?e.colorScheme:[`#1f77b4`,`#ff7f0e`,`#2ca02c`,`#d62728`,`#9467bd`,`#8c564b`,`#e377c2`,`#7f7f7f`,`#bcbd22`,`#17becf`],v=0,y=function(e){if(e in g)return g[e];var t=g[e]=_[v];return v+=1,v>=_.length&&(v=0),t},b=ee,x=B;function S(g){let _=g.datum(),v=new Set;_.forEach(e=>{e.size==0&&e.sets.length==1&&v.add(e.sets[0])}),_=_.filter(e=>!e.sets.some(e=>v.has(e)));let S={},C={};if(_.length>0){let e=b(_,{lossFunction:x,distinct:p});s&&(e=de(e,o,f)),S=fe(e,n,r,i,c),C=ve(S,_,h)}let w={};_.forEach(e=>{e.label&&(w[e.sets]=e.label)});function T(e){if(e.sets in w)return w[e.sets];if(e.sets.length==1)return``+e.sets[0]}g.selectAll(`svg`).data([S]).enter().append(`svg`);let E=g.select(`svg`);t?E.attr(`viewBox`,`0 0 ${n} ${r}`):E.attr(`width`,n).attr(`height`,r);let D={},O=!1;E.selectAll(`.venn-area path`).each(function(e){let t=this.getAttribute(`d`);e.sets.length==1&&t&&!p&&(O=!0,D[e.sets[0]]=be(t))});function k(e){return t=>Ce(e.sets.map(e=>{let i=D[e],a=S[e];return i||={x:n/2,y:r/2,radius:1},a||={x:n/2,y:r/2,radius:1},{x:i.x*(1-t)+a.x*t,y:i.y*(1-t)+a.y*t,radius:i.radius*(1-t)+a.radius*t}}),m)}let A=E.selectAll(`.venn-area`).data(_,e=>e.sets),j=A.enter().append(`g`).attr(`class`,e=>`venn-area venn-${e.sets.length==1?`circle`:`intersection`}${e.colour||e.color?` venn-coloured`:``}`).attr(`data-venn-sets`,e=>e.sets.join(`_`)),M=j.append(`path`),N=j.append(`text`).attr(`class`,`label`).text(e=>T(e)).attr(`text-anchor`,`middle`).attr(`dy`,`.35em`).attr(`x`,n/2).attr(`y`,r/2);u&&(M.style(`fill-opacity`,`0`).filter(e=>e.sets.length==1).style(`fill`,e=>e.colour?e.colour:e.color?e.color:y(e.sets)).style(`fill-opacity`,`.25`),N.style(`fill`,t=>t.colour||t.color?`#FFF`:e.textFill?e.textFill:t.sets.length==1?y(t.sets):`#444`));function P(e){return typeof e.transition==`function`?e.transition(`venn`).duration(a):e}let F=g;O&&typeof F.transition==`function`?(F=P(g),F.selectAll(`path`).attrTween(`d`,k)):F.selectAll(`path`).attr(`d`,e=>Ce(e.sets.map(e=>S[e])),m);let I=F.selectAll(`text`).filter(e=>e.sets in C).text(e=>T(e)).attr(`x`,e=>Math.floor(C[e.sets].x)).attr(`y`,e=>Math.floor(C[e.sets].y));l&&(O?`on`in I?I.on(`end`,H(S,T)):I.each(`end`,H(S,T)):I.each(H(S,T)));let L=P(A.exit()).remove();typeof A.transition==`function`&&L.selectAll(`path`).attrTween(`d`,k);let R=L.selectAll(`text`).attr(`x`,n/2).attr(`y`,r/2);return d!==null&&(N.style(`font-size`,`0px`),I.style(`font-size`,d),R.style(`font-size`,`0px`)),{circles:S,textCentres:C,nodes:A,enter:j,update:F,exit:L}}return S.wrap=function(e){return arguments.length?(l=e,S):l},S.useViewBox=function(){return t=!0,S},S.width=function(e){return arguments.length?(n=e,S):n},S.height=function(e){return arguments.length?(r=e,S):r},S.padding=function(e){return arguments.length?(i=e,S):i},S.distinct=function(e){return arguments.length?(p=e,S):p},S.colours=function(e){return arguments.length?(y=e,S):y},S.colors=function(e){return arguments.length?(y=e,S):y},S.fontSize=function(e){return arguments.length?(d=e,S):d},S.round=function(e){return arguments.length?(m=e,S):m},S.duration=function(e){return arguments.length?(a=e,S):a},S.layoutFunction=function(e){return arguments.length?(b=e,S):b},S.normalize=function(e){return arguments.length?(s=e,S):s},S.scaleToFit=function(e){return arguments.length?(c=e,S):c},S.styled=function(e){return arguments.length?(u=e,S):u},S.orientation=function(e){return arguments.length?(o=e,S):o},S.orientationOrder=function(e){return arguments.length?(f=e,S):f},S.lossFunction=function(e){return arguments.length?(x=e==="default"?B:e===`logRatio`?ce:e,S):x},S}function H(e,t){return function(n){let r=this,i=e[n.sets[0]].radius||50,a=t(n)||``,o=a.split(/\s+/).reverse(),s=(a.length+o.length)/3,c=o.pop(),l=[c],u=0,d=1.1;r.textContent=null;let f=[];function p(e){let t=r.ownerDocument.createElementNS(r.namespaceURI,`tspan`);return t.textContent=e,f.push(t),r.append(t),t}let m=p(c);for(;c=o.pop(),c;){l.push(c);let e=l.join(` `);m.textContent=e,e.length>s&&m.getComputedTextLength()>i&&(l.pop(),m.textContent=l.join(` `),l=[c],m=p(c),u++)}let h=.35-u*d/2,g=r.getAttribute(`x`),_=r.getAttribute(`y`);f.forEach((e,t)=>{e.setAttribute(`x`,g),e.setAttribute(`y`,_),e.setAttribute(`dy`,`${h+t*d}em`)})}}function U(e,t,n){let r=t[0].radius-T(t[0],e);for(let n=1;n=a&&(i=r[n],a=o)}let o=I(n=>-1*U({x:n[0],y:n[1]},e,t),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,s={x:n?0:o[0],y:o[1]},c=!0;for(let t of e)if(T(s,t)>t.radius){c=!1;break}for(let e of t)if(T(s,e)e.p1))}function _e(e){let t={},n=Object.keys(e);for(let e of n)t[e]=[];for(let r=0;r0&&console.log(`WARNING: area `+o+` not represented on screen`)}return r}function ye(e,t,n){let r=[];return r.push(` -M`,e,t),r.push(` -m`,-n,0),r.push(` -a`,n,n,0,1,0,n*2,0),r.push(` -a`,n,n,0,1,0,-n*2,0),r.join(` `)}function be(e){let t=e.split(` `);return{x:Number.parseFloat(t[1]),y:Number.parseFloat(t[2]),radius:-Number.parseFloat(t[4])}}function xe(e){if(e.length===0)return[];let t={};return x(e,t),t.arcs}function Se(e,t){if(e.length===0)return`M 0 0`;let n=10**(t||0),r=t==null?e=>e:e=>Math.round(e*n)/n;if(e.length==1){let t=e[0].circle;return ye(r(t.x),r(t.y),r(t.radius))}let i=[` -M`,r(e[0].p2.x),r(e[0].p2.y)];for(let t of e){let e=r(t.circle.radius);i.push(` -A`,e,e,0,+!!t.large,+!!t.sweep,r(t.p1.x),r(t.p1.y))}return i.join(` `)}function Ce(e,t){return Se(xe(e),t)}function we(e,t={}){let{lossFunction:n,layoutFunction:r=ee,normalize:i=!0,orientation:a=Math.PI/2,orientationOrder:o,width:s=600,height:c=350,padding:l=15,scaleToFit:u=!1,symmetricalTextCentre:d=!1,distinct:f,round:p=2}=t,m=r(e,{lossFunction:n==="default"||!n?B:n===`logRatio`?ce:n,distinct:f});i&&(m=de(m,a,o));let h=fe(m,s,c,l,u),g=ve(h,e,d),_=new Map(Object.keys(h).map(e=>[e,{set:e,x:h[e].x,y:h[e].y,radius:h[e].radius}])),v=e.map(e=>{let t=e.sets.map(e=>_.get(e)),n=xe(t);return{circles:t,arcs:n,path:Se(n,p),area:e,has:new Set(e.sets)}});function y(e){let t=``;for(let n of v)n.has.size>e.length&&e.every(e=>n.has.has(e))&&(t+=` `+n.path);return t}return v.map(({circles:e,arcs:t,path:n,area:r})=>({data:r,text:g[r.sets],circles:e,arcs:t,path:n,distinctPath:n+y(r.sets)}))}var W=(function(){var t=e(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[5,8],r=[7,8,11,12,17,19,22,24],i=[1,17],a=[1,18],o=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],s=[1,31],c=[1,39],l=[7,8,11,12,17,19,22,24,27],u=[1,57],d=[1,56],f=[1,58],p=[1,59],m=[1,60],h=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],g={trace:e(function(){},`trace`),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:`error`,5:`VENN`,7:`EOF`,8:`NEWLINE`,11:`TITLE`,12:`SET`,14:`BRACKET_LABEL`,15:`COLON`,16:`NUMERIC`,17:`UNION`,19:`TEXT`,20:`IDENTIFIER`,21:`STRING`,22:`INDENT_TEXT`,24:`STYLE`,27:`COMMA`,31:`HEXCOLOR`,32:`RGBCOLOR`,33:`RGBACOLOR`},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:e(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:case 3:case 4:this.$=[];break;case 5:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:this.$=[];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:this.$=a[s];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:r.addSubsetData([a[s]],void 0,void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 10:r.addSubsetData([a[s-1]],a[s],void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 11:r.addSubsetData([a[s-2]],void 0,parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 12:r.addSubsetData([a[s-3]],a[s-2],parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 13:if(a[s].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s]),r.addSubsetData(a[s],void 0,void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 14:if(a[s-1].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-1]),r.addSubsetData(a[s-1],a[s],void 0),r.setIndentMode&&r.setIndentMode(!0);break;case 15:if(a[s-2].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-2]),r.addSubsetData(a[s-2],void 0,parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 16:if(a[s-3].length<2)throw Error(`union requires multiple identifiers`);r.validateUnionIdentifiers&&r.validateUnionIdentifiers(a[s-3]),r.addSubsetData(a[s-3],a[s-2],parseFloat(a[s])),r.setIndentMode&&r.setIndentMode(!0);break;case 17:case 18:case 19:r.addTextData(a[s-1],a[s],void 0);break;case 20:case 21:r.addTextData(a[s-2],a[s-1],a[s]);break;case 23:r.addStyleData(a[s-1],a[s]);break;case 24:case 25:case 26:var c=r.getCurrentSets();if(!c)throw Error(`text requires set`);r.addTextData(c,a[s],void 0);break;case 27:case 28:var c=r.getCurrentSets();if(!c)throw Error(`text requires set`);r.addTextData(c,a[s-1],a[s]);break;case 29:case 41:this.$=[a[s]];break;case 30:case 42:this.$=[...a[s-2],a[s]];break;case 31:this.$=[a[s-2],a[s]];break;case 33:this.$=a[s].join(` `);break;case 34:this.$=[a[s]];break;case 35:a[s-1].push(a[s]),this.$=a[s-1];break;case 43:case 44:this.$=a[s];break}},`anonymous`),table:[t(n,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(r,[2,4],{6:5}),t(n,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(r,[2,5]),t(r,[2,6]),t(r,[2,7]),t(r,[2,8]),{13:16,20:i,21:a},{13:20,18:19,20:i,21:a},{13:20,18:21,20:i,21:a},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:i,21:a},t(r,[2,9],{14:[1,27],15:[1,28]}),t(o,[2,43]),t(o,[2,44]),t(r,[2,13],{14:[1,29],15:[1,30],27:s}),t(o,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:s},t(r,[2,22]),t(r,[2,24],{14:[1,35]}),t(r,[2,25],{14:[1,36]}),t(r,[2,26]),{20:c,25:37,26:38,27:s},t(r,[2,10],{15:[1,40]}),{16:[1,41]},t(r,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:i,21:a},t(r,[2,17],{14:[1,45]}),t(r,[2,18],{14:[1,46]}),t(r,[2,19]),t(r,[2,27]),t(r,[2,28]),t(r,[2,23],{27:[1,47]}),t(l,[2,29]),{15:[1,48]},{16:[1,49]},t(r,[2,11]),{16:[1,50]},t(r,[2,15]),t(o,[2,42]),t(r,[2,20]),t(r,[2,21]),{20:c,26:51},{16:u,20:d,21:[1,53],28:52,29:54,30:55,31:f,32:p,33:m},t(r,[2,12]),t(r,[2,16]),t(l,[2,30]),t(l,[2,31]),t(l,[2,32]),t(l,[2,33],{30:61,16:u,20:d,31:f,32:p,33:m}),t(h,[2,34]),t(h,[2,36]),t(h,[2,37]),t(h,[2,38]),t(h,[2,39]),t(h,[2,40]),t(h,[2,35])],defaultActions:{6:[2,1]},parseError:e(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:e(function(t){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(t,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}e(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}e(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};g.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:break;case 3:if(e.getIndentMode&&e.getIndentMode())return e.consumeIndentText=!0,this.begin(`INITIAL`),22;break;case 4:break;case 5:e.setIndentMode&&e.setIndentMode(!1),this.begin(`INITIAL`),this.unput(t.yytext);break;case 6:return this.begin(`bol`),8;case 7:break;case 8:break;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(e.consumeIndentText)e.consumeIndentText=!1;else return 19;break;case 15:return 24;case 16:return t.yytext=t.yytext.slice(2,-2),14;case 17:return t.yytext=t.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}}})();function _(){this.yy={}}return e(_,`Parser`),_.prototype=g,g.Parser=_,new _})();W.parser=W;var Te=W,G=[],K=[],q=[],J=new Set,Y,X=!1,Ee=e((e,t,n)=>{let r=Q(e).sort(),i=n??10/e.length**2;Y=r,r.length===1&&J.add(r[0]),G.push({sets:r,size:i,label:t?Z(t):void 0})},`addSubsetData`),De=e(()=>G,`getSubsetData`),Z=e(e=>{let t=e.trim();return t.length>=2&&t.startsWith(`"`)&&t.endsWith(`"`)?t.slice(1,-1):t},`normalizeText`),Oe=e(e=>e&&Z(e),`normalizeStyleValue`),ke=e((e,t,n)=>{let r=Z(t);K.push({sets:Q(e).sort(),id:r,label:n?Z(n):void 0})},`addTextData`),Ae=e((e,t)=>{let n=Q(e).sort(),r={};for(let[e,n]of t)r[e]=Oe(n)??n;q.push({targets:n,styles:r})},`addStyleData`),je=e(()=>q,`getStyleData`),Q=e(e=>e.map(e=>Z(e)),`normalizeIdentifierList`),Me=e(e=>{let t=Q(e).filter(e=>!J.has(e));if(t.length>0)throw Error(`unknown set identifier: ${t.join(`, `)}`)},`validateUnionIdentifiers`),Ne=e(()=>K,`getTextData`),Pe=e(()=>Y,`getCurrentSets`),Fe=e(()=>X,`getIndentMode`),Ie=e(e=>{X=e},`setIndentMode`),Le=l.venn;function Re(){return g(Le,o().venn)}e(Re,`getConfig`);var ze={getConfig:Re,clear:e(()=>{a(),G.length=0,K.length=0,q.length=0,J.clear(),Y=void 0,X=!1},`customClear`),setAccTitle:i,getAccTitle:h,setDiagramTitle:r,getDiagramTitle:m,getAccDescription:p,setAccDescription:n,addSubsetData:Ee,getSubsetData:De,addTextData:ke,addStyleData:Ae,validateUnionIdentifiers:Me,getTextData:Ne,getStyleData:je,getCurrentSets:Pe,getIndentMode:Fe,setIndentMode:Ie},Be=e(e=>` - .venn-title { - font-size: 32px; - fill: ${e.vennTitleTextColor}; - font-family: ${e.fontFamily}; - } - - .venn-circle text { - font-size: 48px; - font-family: ${e.fontFamily}; - } - - .venn-intersection text { - font-size: 48px; - fill: ${e.vennSetTextColor}; - font-family: ${e.fontFamily}; - } - - .venn-text-node { - font-family: ${e.fontFamily}; - color: ${e.vennSetTextColor}; - } -`,`getStyles`);function Ve(e){let t=new Map;for(let n of e){let e=n.targets.join(`|`),r=t.get(e);r?Object.assign(r,n.styles):t.set(e,{...n.styles})}return t}e(Ve,`buildStyleByKey`);var He=e((e,n,r,i)=>{let a=i.db,l=a.getConfig?.(),{themeVariables:u,look:p,handDrawnSeed:m}=o(),h=p===`handDrawn`,g=[u.venn1,u.venn2,u.venn3,u.venn4,u.venn5,u.venn6,u.venn7,u.venn8].filter(Boolean),b=a.getDiagramTitle?.(),x=a.getSubsetData(),S=a.getTextData(),C=Ve(a.getStyleData()),w=We(x),T=l?.width??800,E=l?.height??450,D=T/1600,O=b?48*D:0,k=u.primaryTextColor??u.textColor,A=_(n);A.attr(`viewBox`,`0 0 ${T} ${E}`),b&&A.append(`text`).text(b).attr(`class`,`venn-title`).attr(`font-size`,`${32*D}px`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`x`,`50%`).attr(`y`,32*D).style(`fill`,u.vennTitleTextColor||u.titleColor);let j=t(document.createElement(`div`)),M=he().width(T).height(E-O);j.datum(w).call(M);let N=h?v.svg(j.select(`svg`).node()):void 0,P=we(w,{width:T,height:E-O,padding:l?.padding??15}),F=new Map;for(let e of P){let t=$([...e.data.sets].sort());F.set(t,e)}S.length>0&&Ue(l,F,j,S,D,C);let I=d(u.background||`#f4f4f4`);j.selectAll(`.venn-circle`).each(function(e,n){let r=t(this),i=$([...e.sets].sort()),a=C.get(i),o=a?.fill||g[n%g.length]||u.primaryColor;r.classed(`venn-set-${n%8}`,!0);let s=a?.[`fill-opacity`]??.1,l=a?.stroke||o,d=a?.[`stroke-width`]||`${5*D}`;if(h&&N){let e=F.get(i);if(e&&e.circles.length>0){let t=e.circles[0],i=N.circle(t.x,t.y,t.radius*2,{roughness:.7,seed:m,fill:y(o,.7),fillStyle:`hachure`,fillWeight:2,hachureGap:8,hachureAngle:-41+n*60,stroke:l,strokeWidth:parseFloat(String(d))});r.select(`path`).remove(),r.node()?.insertBefore(i,r.select(`text`).node())}}else r.select(`path`).style(`fill`,o).style(`fill-opacity`,s).style(`stroke`,l).style(`stroke-width`,d).style(`stroke-opacity`,.95);let p=a?.color||(I?f(o,30):c(o,30));r.select(`text`).style(`font-size`,`${48*D}px`).style(`fill`,p)}),h&&N?j.selectAll(`.venn-intersection`).each(function(e){let n=t(this),r=$([...e.sets].sort()),i=C.get(r),a=i?.fill;if(a){let e=n.select(`path`),t=e.attr(`d`);if(t){let n=N.path(t,{roughness:.7,seed:m,fill:y(a,.3),fillStyle:`cross-hatch`,fillWeight:2,hachureGap:6,hachureAngle:60,stroke:`none`}),r=e.node();r?.parentNode?.insertBefore(n,r),e.remove()}}else n.select(`path`).style(`fill-opacity`,0);n.select(`text`).style(`font-size`,`${48*D}px`).style(`fill`,i?.color??u.vennSetTextColor??k)}):(j.selectAll(`.venn-intersection text`).style(`font-size`,`${48*D}px`).style(`fill`,e=>{let t=$([...e.sets].sort());return C.get(t)?.color??u.vennSetTextColor??k}),j.selectAll(`.venn-intersection path`).style(`fill-opacity`,e=>{let t=$([...e.sets].sort());return+!!C.get(t)?.fill}).style(`fill`,e=>{let t=$([...e.sets].sort());return C.get(t)?.fill??`transparent`}));let L=A.append(`g`).attr(`transform`,`translate(0, ${O})`),R=j.select(`svg`).node();if(R&&`childNodes`in R)for(let e of[...R.childNodes])L.node()?.appendChild(e);s(A,E,T,l?.useMaxWidth??!0)},`draw`);function $(e){return e.join(`|`)}e($,`stableSetsKey`);function Ue(e,t,n,r,i,a){let o=e?.useDebugLayout??!1,s=n.select(`svg`).append(`g`).attr(`class`,`venn-text-nodes`),c=new Map;for(let e of r){let t=$(e.sets),n=c.get(t);n?n.push(e):c.set(t,[e])}for(let[e,n]of c.entries()){let r=t.get(e);if(!r?.text)continue;let c=r.text.x,l=r.text.y,u=Math.min(...r.circles.map(e=>e.radius)),d=Math.min(...r.circles.map(e=>e.radius-Math.hypot(c-e.x,l-e.y))),f=Number.isFinite(d)?Math.max(0,d):0;f===0&&Number.isFinite(u)&&(f=u*.6);let p=s.append(`g`).attr(`class`,`venn-text-area`).attr(`font-size`,`${40*i}px`);o&&p.append(`circle`).attr(`class`,`venn-text-debug-circle`).attr(`cx`,c).attr(`cy`,l).attr(`r`,f).attr(`fill`,`none`).attr(`stroke`,`purple`).attr(`stroke-width`,1.5*i).attr(`stroke-dasharray`,`${6*i} ${4*i}`);let m=Math.max(80*i,f*2*.95),h=Math.max(60*i,f*2*.95),g=(r.data.label&&r.data.label.length>0?Math.min(32*i,f*.25):0)+(n.length<=2?30*i:0),_=c-m/2,v=l-h/2+g,y=Math.max(1,Math.ceil(Math.sqrt(n.length))),b=Math.max(1,Math.ceil(n.length/y)),x=m/y,S=h/b;for(let[e,t]of n.entries()){let n=e%y,r=Math.floor(e/y),s=_+x*(n+.5),c=v+S*(r+.5);o&&p.append(`rect`).attr(`class`,`venn-text-debug-cell`).attr(`x`,_+x*n).attr(`y`,v+S*r).attr(`width`,x).attr(`height`,S).attr(`fill`,`none`).attr(`stroke`,`teal`).attr(`stroke-width`,1*i).attr(`stroke-dasharray`,`${4*i} ${3*i}`);let l=x*.9,u=S*.9,d=p.append(`foreignObject`).attr(`class`,`venn-text-node-fo`).attr(`width`,l).attr(`height`,u).attr(`x`,s-l/2).attr(`y`,c-u/2).attr(`overflow`,`visible`),f=a.get(t.id)?.color,m=d.append(`xhtml:span`).attr(`class`,`venn-text-node`).style(`display`,`flex`).style(`width`,`100%`).style(`height`,`100%`).style(`white-space`,`normal`).style(`align-items`,`center`).style(`justify-content`,`center`).style(`text-align`,`center`).style(`overflow-wrap`,`normal`).style(`word-break`,`normal`).text(t.label??t.id);f&&m.style(`color`,f)}}}e(Ue,`renderTextNodes`);function We(e){let t=new Set(e.map(e=>[...e.sets].sort().join(`|`))),n=new Map(e.filter(e=>e.sets.length===1&&e.size!==void 0).map(e=>[e.sets[0],e.size])),r=[];for(let i of e){if(i.sets.length<3)continue;let e=[...i.sets].sort();for(let i=0;i0?[...e,...r]:e}e(We,`ensurePairwiseSubsets`);var Ge={parser:Te,db:ze,renderer:{draw:He},styles:Be};export{Ge as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/wardley-OPB4EBWU-BjXxCRf_.js b/dist-desktop/assets/wardley-OPB4EBWU-BjXxCRf_.js deleted file mode 100644 index fd69e7b..0000000 --- a/dist-desktop/assets/wardley-OPB4EBWU-BjXxCRf_.js +++ /dev/null @@ -1 +0,0 @@ -import"./chunk-KEIR6QF5-Dj-OpFgW.js";import{n as e}from"./chunk-5FCAYU7R-DNtJmW0j.js";export{e as createWardleyServices}; \ No newline at end of file diff --git a/dist-desktop/assets/wardleyDiagram-EHGQE667-BewauNW1.js b/dist-desktop/assets/wardleyDiagram-EHGQE667-BewauNW1.js deleted file mode 100644 index eddd590..0000000 --- a/dist-desktop/assets/wardleyDiagram-EHGQE667-BewauNW1.js +++ /dev/null @@ -1,78 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-UMNXGZaF.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,v as l,w as u,x as d,y as f}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{i as p}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as m}from"./chunk-VAUOI2AC-AC9pRUsa.js";import{t as h}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as g}from"./mermaid-parser.core-Z7xZAZRH.js";var _=e((e,t)=>{let n=e<=1?e*100:e;if(n<0||n>100)throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return n},`toPercent`),v=e((e,t,n)=>({x:_(t,`${n} evolution`),y:_(e,`${n} visibility`)}),`toCoordinates`),y=e(e=>{if(e){if(e===`+<>`)return`bidirectional`;if(e===`+<`)return`backward`;if(e===`+>`)return`forward`}},`getFlowFromPort`),b=e(e=>{if(!e?.startsWith(`+`))return{};let t=/^\+'([^']*)'/.exec(e)?.[1];return e.includes(`<>`)?{flow:`bidirectional`,label:t}:e.includes(`<`)?{flow:`backward`,label:t}:e.includes(`>`)?{flow:`forward`,label:t}:{label:t}},`extractFlowFromArrow`),x=e((e,t)=>{if(h(e,t),e.size&&t.setSize(e.size.width,e.size.height),e.evolution){let n=e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),r=e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary);t.updateAxes({stages:n,stageBoundaries:r})}if(e.anchors.forEach(e=>{let n=v(e.visibility,e.evolution,`Anchor "${e.name}"`);t.addNode(e.name,e.name,n.x,n.y,`anchor`)}),e.components.forEach(e=>{let n=v(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,i=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,a=e.decorator?.strategy;t.addNode(e.name,e.name,n.x,n.y,`component`,r,i,e.inertia,a)}),e.notes.forEach(e=>{let n=v(e.visibility,e.evolution,`Note "${e.text}"`);t.addNote(e.text,n.x,n.y)}),e.pipelines.forEach(e=>{let n=t.getNode(e.parent);if(!n||typeof n.y!=`number`)throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);let r=n.y;t.startPipeline(e.parent),e.components.forEach(n=>{let i=`${e.parent}_${n.name}`,a=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,o=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,s=_(n.evolution,`Pipeline component "${n.name}" evolution`);t.addNode(i,n.name,s,r,`pipeline-component`,a,o),t.addPipelineComponent(e.parent,i)})}),e.links.forEach(e=>{let n=!!e.arrow&&(e.arrow.includes(`-.->`)||e.arrow.includes(`.-.`)),r=y(e.fromPort)??y(e.toPort),{flow:i,label:a}=b(e.arrow);!r&&i&&(r=i);let o=e.linkLabel,s=a??o;t.addLink(t.resolveNodeId(e.from),t.resolveNodeId(e.to),n,s,r)}),e.evolves.forEach(e=>{let n=t.getNode(e.component);if(n?.y!==void 0){let r=_(e.target,`Evolve target for "${e.component}"`);t.addTrend(e.component,r,n.y)}}),e.annotations.length>0){let n=e.annotations[0],r=v(n.x,n.y,`Annotations box`);t.setAnnotationsBox(r.x,r.y)}e.annotation.forEach(e=>{let n=v(e.x,e.y,`Annotation ${e.number}`);t.addAnnotation(e.number,[{x:n.x,y:n.y}],e.text)}),e.accelerators.forEach(e=>{let n=v(e.x,e.y,`Accelerator "${e.name}"`);t.addAccelerator(e.name,n.x,n.y)}),e.deaccelerators.forEach(e=>{let n=v(e.x,e.y,`Deaccelerator "${e.name}"`);t.addDeaccelerator(e.name,n.x,n.y)})},`populateDb`),S={parser:{yy:void 0},parse:e(async e=>{let n=await g(`wardley`,e);t.debug(n);let r=S.parser?.yy;if(!r||typeof r.addNode!=`function`)throw Error(`parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);x(n,r)},`parse`)},C=new class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{e(this,`WardleyBuilder`)}addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label},n={...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY};this.nodes.set(e.id,n)}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){let n=this.pipelines.get(e);n&&n.componentIds.push(t);let r=this.nodes.get(t);r&&(r.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;for(let[t,n]of this.nodes)if(n.label===e)return t;return e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw Error(`Node "${t.label}" is missing coordinates`);e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}};function w(){return d()[`wardley-beta`]}e(w,`getConfig`);function T(e,t,n,r,i,a,o,s,c){C.addNode({id:e,label:t,x:n,y:r,className:i,labelOffsetX:a,labelOffsetY:o,inertia:s,sourceStrategy:c})}e(T,`addNode`);function E(e,t,n=!1,r,i){C.addLink({source:e,target:t,dashed:n,label:r,flow:i})}e(E,`addLink`);function D(e,t,n){C.addTrend({nodeId:e,targetX:t,targetY:n})}e(D,`addTrend`);function O(e,t,n){C.addAnnotation({number:e,coordinates:t,text:n})}e(O,`addAnnotation`);function k(e,t,n){C.addNote({text:e,x:t,y:n})}e(k,`addNote`);function A(e,t,n){C.addAccelerator({name:e,x:t,y:n})}e(A,`addAccelerator`);function j(e,t,n){C.addDeaccelerator({name:e,x:t,y:n})}e(j,`addDeaccelerator`);function M(e,t){C.setAnnotationsBox(e,t)}e(M,`setAnnotationsBox`);function N(e,t){C.setSize(e,t)}e(N,`setSize`);function P(e){C.startPipeline(e)}e(P,`startPipeline`);function F(e,t){C.addPipelineComponent(e,t)}e(F,`addPipelineComponent`);function I(e){C.setAxes(e)}e(I,`updateAxes`);function L(e){return C.getNode(e)}e(L,`getNode`);function R(e){return C.resolveNodeId(e)}e(R,`resolveNodeId`);function z(){return C.build()}e(z,`getWardleyData`);function B(){C.clear(),o()}e(B,`clear`);var V={getConfig:w,addNode:T,addLink:E,addTrend:D,addAnnotation:O,addNote:k,addAccelerator:A,addDeaccelerator:j,setAnnotationsBox:M,setSize:N,startPipeline:P,addPipelineComponent:F,updateAxes:I,getNode:L,resolveNodeId:R,getWardleyData:z,clear:B,setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:u,getAccDescription:l,setAccDescription:r},H=[`Genesis`,`Custom Built`,`Product`,`Commodity`],U=e(()=>{let{themeVariables:e}=d();return{backgroundColor:e.wardley?.backgroundColor??e.background??`#fff`,axisColor:e.wardley?.axisColor??`#000`,axisTextColor:e.wardley?.axisTextColor??e.primaryTextColor??`#222`,gridColor:e.wardley?.gridColor??`rgba(100, 100, 100, 0.2)`,componentFill:e.wardley?.componentFill??`#fff`,componentStroke:e.wardley?.componentStroke??`#000`,componentLabelColor:e.wardley?.componentLabelColor??e.primaryTextColor??`#222`,linkStroke:e.wardley?.linkStroke??`#000`,evolutionStroke:e.wardley?.evolutionStroke??`#dc3545`,annotationStroke:e.wardley?.annotationStroke??`#000`,annotationTextColor:e.wardley?.annotationTextColor??e.primaryTextColor??`#222`,annotationFill:e.wardley?.annotationFill??e.background??`#fff`}},`getTheme`),W=e(()=>{let e=d()[`wardley-beta`];return{width:e?.width??900,height:e?.height??600,padding:e?.padding??48,nodeRadius:e?.nodeRadius??6,nodeLabelOffset:e?.nodeLabelOffset??8,axisFontSize:e?.axisFontSize??12,labelFontSize:e?.labelFontSize??10,showGrid:e?.showGrid??!1,useMaxWidth:e?.useMaxWidth??!0}},`getConfigValues`),G={parser:S,db:V,renderer:{draw:e((n,r,i,a)=>{t.debug(`Rendering Wardley map -`+n);let o=W(),s=U(),l=o.nodeRadius*1.6,u=a.db,d=u.getWardleyData(),f=u.getDiagramTitle(),p=d.size?.width??o.width,h=d.size?.height??o.height,g=m(r);g.selectAll(`*`).remove(),c(g,h,p,o.useMaxWidth),g.attr(`viewBox`,`0 0 ${p} ${h}`);let _=g.append(`g`).attr(`class`,`wardley-map`),v=g.append(`defs`);v.append(`marker`).attr(`id`,`arrow-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,6).attr(`markerHeight`,6).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.evolutionStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-end-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,9).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),v.append(`marker`).attr(`id`,`link-arrow-start-${r}`).attr(`viewBox`,`0 0 10 10`).attr(`refX`,1).attr(`refY`,5).attr(`markerWidth`,5).attr(`markerHeight`,5).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 10 0 L 0 5 L 10 10 z`).attr(`fill`,s.linkStroke).attr(`stroke`,`none`),_.append(`rect`).attr(`class`,`wardley-background`).attr(`width`,p).attr(`height`,h).attr(`fill`,s.backgroundColor);let y=p-o.padding*2,b=h-o.padding*2;f&&_.append(`text`).attr(`class`,`wardley-title`).attr(`x`,p/2).attr(`y`,o.padding/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize*1.05).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(f);let x=e(e=>o.padding+e/100*y,`projectX`),S=e(e=>h-o.padding-e/100*b,`projectY`),C=_.append(`g`).attr(`class`,`wardley-axes`);C.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,h-o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1),C.append(`line`).attr(`x1`,o.padding).attr(`x2`,o.padding).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.axisColor).attr(`stroke-width`,1);let w=d.axes.xLabel??`Evolution`,T=d.axes.yLabel??`Visibility`;C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-x`).attr(`x`,o.padding+y/2).attr(`y`,h-o.padding/4).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).text(w),C.append(`text`).attr(`class`,`wardley-axis-label wardley-axis-label-y`).attr(`x`,o.padding/3).attr(`y`,o.padding+b/2).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize).attr(`font-weight`,`bold`).attr(`text-anchor`,`middle`).attr(`transform`,`rotate(-90 ${o.padding/3} ${o.padding+b/2})`).text(T);let E=d.axes.stages&&d.axes.stages.length>0?d.axes.stages:H;if(E.length>0){let e=_.append(`g`).attr(`class`,`wardley-stages`),t=d.axes.stageBoundaries,n=[];if(t&&t.length===E.length){let e=0;t.forEach(t=>{n.push({start:e,end:t}),e=t})}else{let e=1/E.length;E.forEach((t,r)=>{n.push({start:r*e,end:(r+1)*e})})}E.forEach((t,r)=>{let i=n[r],a=o.padding+i.start*y,c=(a+(o.padding+i.end*y))/2;r>0&&e.append(`line`).attr(`x1`,a).attr(`x2`,a).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,`#000`).attr(`stroke-width`,1).attr(`stroke-dasharray`,`5 5`).attr(`opacity`,.8),e.append(`text`).attr(`class`,`wardley-stage-label`).attr(`x`,c).attr(`y`,h-o.padding/1.5).attr(`fill`,s.axisTextColor).attr(`font-size`,o.axisFontSize-2).attr(`text-anchor`,`middle`).text(t)})}if(o.showGrid){let e=_.append(`g`).attr(`class`,`wardley-grid`);for(let t=1;t<4;t++){let n=t/4,r=o.padding+y*n;e.append(`line`).attr(`x1`,r).attr(`x2`,r).attr(`y1`,o.padding).attr(`y2`,h-o.padding).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`),e.append(`line`).attr(`x1`,o.padding).attr(`x2`,p-o.padding).attr(`y1`,h-o.padding-b*n).attr(`y2`,h-o.padding-b*n).attr(`stroke`,s.gridColor).attr(`stroke-dasharray`,`2 6`)}}let D=new Map;if(d.nodes.forEach(e=>{D.set(e.id,{x:x(e.x),y:S(e.y),node:e})}),d.pipelines.length>0){let e=_.append(`g`).attr(`class`,`wardley-pipelines`),t=_.append(`g`).attr(`class`,`wardley-pipeline-links`);d.pipelines.forEach(n=>{if(n.componentIds.length===0)return;let r=n.componentIds.map(e=>({id:e,pos:D.get(e),node:d.nodes.find(t=>t.id===e)})).filter(e=>e.pos&&e.node).sort((e,t)=>e.node.x-t.node.x);for(let e=0;e{let t=D.get(e);t&&(i=Math.min(i,t.x),a=Math.max(a,t.x),c=t.y)}),i!==1/0&&a!==-1/0){let t=o.nodeRadius*4,r=c-t/2,u=D.get(n.nodeId);u&&(u.x=(i+a)/2,u.y=r-l/6),e.append(`rect`).attr(`class`,`wardley-pipeline-box`).attr(`x`,i-15).attr(`y`,r).attr(`width`,a-i+30).attr(`height`,t).attr(`fill`,`none`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}})}let O=_.append(`g`).attr(`class`,`wardley-links`),k=new Map;d.pipelines.forEach(e=>{k.set(e.nodeId,new Set(e.componentIds))});let A=d.links.filter(e=>!(!D.has(e.source)||!D.has(e.target)||k.get(e.target)?.has(e.source)));O.selectAll(`line`).data(A).enter().append(`line`).attr(`class`,e=>`wardley-link${e.dashed?` wardley-link--dashed`:``}`).attr(`x1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.x+i/s*r}).attr(`y1`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.source).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=n.x-t.x,a=n.y-t.y,s=Math.sqrt(i*i+a*a);return t.y+a/s*r}).attr(`x2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.x+i/s*r}).attr(`y2`,e=>{let t=D.get(e.source),n=D.get(e.target),r=d.nodes.find(t=>t.id===e.target).isPipelineParent?l/Math.sqrt(2):o.nodeRadius,i=t.x-n.x,a=t.y-n.y,s=Math.sqrt(i*i+a*a);return n.y+a/s*r}).attr(`stroke`,s.linkStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,e=>e.dashed?`6 6`:null).attr(`marker-end`,e=>e.flow===`forward`||e.flow===`bidirectional`?`url(#link-arrow-end-${r})`:null).attr(`marker-start`,e=>e.flow===`backward`||e.flow===`bidirectional`?`url(#link-arrow-start-${r})`:null),O.selectAll(`text`).data(A.filter(e=>e.label)).enter().append(`text`).attr(`class`,`wardley-link-label`).attr(`x`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=n.y-t.y,a=n.x-t.x;return r+i/Math.sqrt(a*a+i*i)*8}).attr(`y`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.y+n.y)/2,i=n.x-t.x,a=n.y-t.y,o=Math.sqrt(i*i+a*a);return r+-i/o*8}).attr(`fill`,s.axisTextColor).attr(`font-size`,o.labelFontSize).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).attr(`transform`,e=>{let t=D.get(e.source),n=D.get(e.target),r=(t.x+n.x)/2,i=(t.y+n.y)/2,a=n.x-t.x,o=n.y-t.y,s=Math.sqrt(a*a+o*o),c=o/s,l=-a/s,u=r+c*8,d=i+l*8,f=Math.atan2(o,a)*180/Math.PI;return(f>90||f<-90)&&(f+=180),`rotate(${f} ${u} ${d})`}).text(e=>e.label);let j=_.append(`g`).attr(`class`,`wardley-trends`),M=d.trends.map(e=>{let t=D.get(e.nodeId);if(!t)return null;let n=x(e.targetX),r=S(e.targetY),i=n-t.x,a=r-t.y,s=Math.sqrt(i*i+a*a),c=o.nodeRadius+2;return{origin:t,targetX:n,targetY:r,adjustedX2:s>c?n-i/s*c:n,adjustedY2:s>c?r-a/s*c:r}}).filter(e=>e!==null);j.selectAll(`line`).data(M).enter().append(`line`).attr(`class`,`wardley-trend`).attr(`x1`,e=>e.origin.x).attr(`y1`,e=>e.origin.y).attr(`x2`,e=>e.adjustedX2).attr(`y2`,e=>e.adjustedY2).attr(`stroke`,s.evolutionStroke).attr(`stroke-width`,1).attr(`stroke-dasharray`,`4 4`).attr(`marker-end`,`url(#arrow-${r})`);let N=_.append(`g`).attr(`class`,`wardley-nodes`).selectAll(`g`).data(d.nodes).enter().append(`g`).attr(`class`,e=>[`wardley-node`,e.className?`wardley-node--${e.className}`:``].filter(Boolean).join(` `));N.filter(e=>e.sourceStrategy===`outsource`).append(`circle`).attr(`class`,`wardley-outsource-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#666`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`buy`).append(`circle`).attr(`class`,`wardley-buy-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#ccc`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.sourceStrategy===`build`).append(`circle`).attr(`class`,`wardley-build-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`#eee`).attr(`stroke`,`#000`).attr(`stroke-width`,1);let P=N.filter(e=>e.sourceStrategy===`market`);P.append(`circle`).attr(`class`,`wardley-market-overlay`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius*2).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>!e.isPipelineParent&&e.sourceStrategy!==`market`&&e.className!==`anchor`).append(`circle`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y).attr(`r`,o.nodeRadius).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1);let F=o.nodeRadius*.7,I=o.nodeRadius*1.2;if(P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x).attr(`y1`,e=>D.get(e.id).y-I).attr(`x2`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y2`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`line`).attr(`class`,`wardley-market-line`).attr(`x1`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`y1`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`x2`,e=>D.get(e.id).x).attr(`y2`,e=>D.get(e.id).y-I).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x).attr(`cy`,e=>D.get(e.id).y-I).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x-I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),P.append(`circle`).attr(`class`,`wardley-market-dot`).attr(`cx`,e=>D.get(e.id).x+I*Math.cos(Math.PI/6)).attr(`cy`,e=>D.get(e.id).y+I*Math.sin(Math.PI/6)).attr(`r`,F).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,2),N.filter(e=>e.isPipelineParent===!0).append(`rect`).attr(`x`,e=>D.get(e.id).x-l/2).attr(`y`,e=>D.get(e.id).y-l/2).attr(`width`,l).attr(`height`,l).attr(`fill`,s.componentFill).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),N.filter(e=>e.inertia===!0).append(`line`).attr(`class`,`wardley-inertia`).attr(`x1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y1`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y-n/2}).attr(`x2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l/2+15:o.nodeRadius+15;return e.sourceStrategy&&(n+=o.nodeRadius+10),t.x+n}).attr(`y2`,e=>{let t=D.get(e.id),n=e.isPipelineParent?l:o.nodeRadius*2;return t.y+n/2}).attr(`stroke`,s.componentStroke).attr(`stroke-width`,6),N.append(`text`).attr(`x`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetX===void 0?t.x:t.x+e.labelOffsetX;let n=o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetX===void 0&&(n+=10);let r=e.labelOffsetX??n;return t.x+r}).attr(`y`,e=>{let t=D.get(e.id);if(e.className===`anchor`)return e.labelOffsetY===void 0?t.y-3:t.y+e.labelOffsetY;let n=-o.nodeLabelOffset;e.sourceStrategy&&e.labelOffsetY===void 0&&(n-=10);let r=e.labelOffsetY??n;return t.y+r}).attr(`class`,`wardley-node-label`).attr(`fill`,e=>e.className===`evolved`?s.evolutionStroke:e.className===`anchor`?`#000`:s.componentLabelColor).attr(`font-size`,o.labelFontSize).attr(`font-weight`,e=>e.className===`anchor`?`bold`:`normal`).attr(`text-anchor`,e=>e.className===`anchor`?`middle`:`start`).attr(`dominant-baseline`,e=>e.className===`anchor`?`middle`:`auto`).text(e=>e.label),d.annotations.length>0){let e=_.append(`g`).attr(`class`,`wardley-annotations`);if(d.annotations.forEach(t=>{let n=t.coordinates.map(e=>({x:x(e.x),y:S(e.y)}));if(n.length>1)for(let t=0;t{let r=e.append(`g`).attr(`class`,`wardley-annotation`);r.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5),r.append(`text`).attr(`x`,n.x).attr(`y`,n.y).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`central`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.number)})}),d.annotationsBox){let t=x(d.annotationsBox.x),n=S(d.annotationsBox.y),r=e.append(`g`).attr(`class`,`wardley-annotations-box`),i=[...d.annotations].filter(e=>e.text).sort((e,t)=>e.number-t.number),a=[];if(i.forEach((e,i)=>{let o=r.append(`text`).attr(`x`,t+10).attr(`y`,n+10+(i+1)*16).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`text-anchor`,`start`).attr(`dominant-baseline`,`middle`).text(`${e.number}. ${e.text}`);a.push(o)}),a.length>0){let e=0,c=0;a.forEach(t=>{let n=t.node(),r=n.getComputedTextLength();e=Math.max(e,r);let i=n.getBBox();c=Math.max(c,i.height)});let l=e+20+105,u=i.length*16+20+c/2,d=o.padding,f=p-o.padding-l,m=o.padding,g=h-o.padding-u;t=Math.max(d,Math.min(t,f)),n=Math.max(m,Math.min(n,g)),a.forEach((e,r)=>{e.attr(`x`,t+10).attr(`y`,n+10+(r+1)*16)}),r.insert(`rect`,`text`).attr(`x`,t).attr(`y`,n).attr(`width`,l).attr(`height`,u).attr(`fill`,`white`).attr(`stroke`,s.axisColor).attr(`stroke-width`,1.5).attr(`rx`,4).attr(`ry`,4)}}}if(d.notes.length>0){let e=_.append(`g`).attr(`class`,`wardley-notes`);d.notes.forEach(t=>{let n=x(t.x),r=S(t.y);e.append(`text`).attr(`x`,n).attr(`y`,r).attr(`text-anchor`,`start`).attr(`font-size`,11).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.text)})}if(d.accelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-accelerators`);d.accelerators.forEach(t=>{let n=x(t.x),r=S(t.y),i=` - M ${n} ${r-30/2} - L ${n+60-20} ${r-30/2} - L ${n+60-20} ${r-30/2-8} - L ${n+60} ${r} - L ${n+60-20} ${r+30/2+8} - L ${n+60-20} ${r+30/2} - L ${n} ${r+30/2} - Z - `;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+60/2).attr(`y`,r+30/2+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}if(d.deaccelerators.length>0){let e=_.append(`g`).attr(`class`,`wardley-deaccelerators`);d.deaccelerators.forEach(t=>{let n=x(t.x),r=S(t.y),i=` - M ${n+60} ${r-30/2} - L ${n+20} ${r-30/2} - L ${n+20} ${r-30/2-8} - L ${n} ${r} - L ${n+20} ${r+30/2+8} - L ${n+20} ${r+30/2} - L ${n+60} ${r+30/2} - Z - `;e.append(`path`).attr(`d`,i).attr(`fill`,`white`).attr(`stroke`,s.componentStroke).attr(`stroke-width`,1),e.append(`text`).attr(`x`,n+60/2).attr(`y`,r+30/2+15).attr(`text-anchor`,`middle`).attr(`font-size`,10).attr(`fill`,s.axisTextColor).attr(`font-weight`,`bold`).text(t.name)})}},`draw`)},styles:e(({wardley:e}={})=>{let t=p(p(n(),s().themeVariables).wardley,e);return` - .wardley-background { - fill: ${t.backgroundColor}; - } - .wardley-axes line, .wardley-axes path { - stroke: ${t.axisColor}; - } - .wardley-axis-label { - fill: ${t.axisTextColor}; - } - .wardley-stage-label { - fill: ${t.axisTextColor}; - } - .wardley-grid line { - stroke: ${t.gridColor}; - } - .wardley-node circle { - fill: ${t.componentFill}; - stroke: ${t.componentStroke}; - } - .wardley-node-label { - fill: ${t.componentLabelColor}; - } - .wardley-link { - stroke: ${t.linkStroke}; - } - .wardley-link--dashed { - stroke-dasharray: 4 4; - } - .wardley-link-label { - fill: ${t.axisTextColor}; - } - .wardley-trend line { - stroke: ${t.evolutionStroke}; - } - .wardley-annotation-line { - stroke: ${t.annotationStroke}; - } - .wardley-annotation circle { - fill: ${t.annotationFill}; - stroke: ${t.annotationStroke}; - } - .wardley-annotation text { - fill: ${t.annotationTextColor}; - } - .wardley-annotations-box rect { - fill: ${t.annotationFill}; - stroke: ${t.annotationStroke}; - } - .wardley-annotations-box text { - fill: ${t.annotationTextColor}; - } - .wardley-pipeline-box { - stroke: ${t.componentStroke}; - } - .wardley-notes text { - fill: ${t.axisTextColor}; - } - `},`styles`)};export{G as diagram}; \ No newline at end of file diff --git a/dist-desktop/assets/xychartDiagram-FW5EYKEG-HaTasnSW.js b/dist-desktop/assets/xychartDiagram-FW5EYKEG-HaTasnSW.js deleted file mode 100644 index 8c00a6f..0000000 --- a/dist-desktop/assets/xychartDiagram-FW5EYKEG-HaTasnSW.js +++ /dev/null @@ -1,7 +0,0 @@ -import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t}from"./src-UMNXGZaF.js";import{D as n,H as r,K as i,U as a,a as o,b as s,c,f as l,v as u,w as d,y as f,z as p}from"./chunk-WYO6CB5R-Dv5kDyQC.js";import{t as m}from"./linear-DhAcoVP9.js";import{t as h}from"./ordinal-hYBb2elL.js";import{t as g}from"./init-D6jRqBbL.js";import{i as _}from"./chunk-ICXQ74PX-Czpgj8Uw.js";import{t as v}from"./line-b9Ala942.js";import{t as y}from"./chunk-VAUOI2AC-AC9pRUsa.js";import"./chunk-HOUHSVGY-iJuv90UH.js";import{t as b}from"./chunk-Q4XR5HBZ-CQ8zkLYc.js";function x(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++rf&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`: -`+h.showPosition()+` -Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};A.lexer=(function(){return{EOF:1,parseError:e(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:e(function(e,t){return this.yy=t||this.yy||{},this._input=e,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]),this.offset=0,this},`setInput`),input:e(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:e(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:e(function(){return this._more=!0,this},`more`),reject:e(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). -`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:e(function(e){this.unput(this.match.slice(e))},`less`),pastInput:e(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:e(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:e(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+` -`+t+`^`},`showPosition`),test_match:e(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:e(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;at[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}else return!1}else if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:e(function(){return this.next()||this.lex()},`lex`),begin:e(function(e){this.conditionStack.push(e)},`begin`),popState:e(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:e(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},`_currentRules`),topState:e(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:e(function(e){this.begin(e)},`pushState`),stateStackSize:e(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:e(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState(`acc_title`),19;case 8:return this.popState(),`acc_title_value`;case 9:return this.pushState(`acc_descr`),21;case 10:return this.popState(),`acc_descr_value`;case 11:this.pushState(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState(`axis_data`),`X_AXIS`;case 18:return this.pushState(`axis_data`),`Y_AXIS`;case 19:return this.pushState(`axis_band_data`),24;case 20:return 33;case 21:return this.pushState(`data`),16;case 22:return this.pushState(`data`),18;case 23:return this.pushState(`data_inner`),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState(`string`);break;case 28:this.popState();break;case 29:return`STR`;case 30:return 24;case 31:return 26;case 32:return 44;case 33:return`COLON`;case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function j(){this.yy={}}return e(j,`Parser`),j.prototype=A,A.Parser=j,new j})();C.parser=C;var w=C;function T(e){return e.type===`bar`}e(T,`isBarPlot`);function E(e){return e.type===`band`}e(E,`isBandAxisData`);function D(e){return e.type===`linear`}e(D,`isLinearAxisData`);var O=class{constructor(e){this.parentGroup=e}static{e(this,`TextDimensionCalculatorWithFont`)}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};let n={width:0,height:0},r=this.parentGroup.append(`g`).attr(`visibility`,`hidden`).attr(`font-size`,t);for(let i of e){let e=b(r,1,i),a=e?e.width:i.length*t,o=e?e.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,o)}return r.remove(),n}},k=.7,A=.2,j=class{constructor(e,t,n,r){this.axisConfig=e,this.title=t,this.textDimensionCalculator=n,this.axisThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{e(this,`BaseAxis`)}setRange(e){this.range=e,this.axisPosition===`left`||this.axisPosition===`right`?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){k*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(k*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=A*e.width;this.outerPadding=Math.min(n.width/2,r);let i=n.height;this.axisPosition===`bottom`&&this.normalizedLabelRotationInRad!==0&&(i=Math.max(i,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height))),i+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=A*e.height;this.outerPadding=Math.min(n.height/2,r);let i=n.width+this.axisConfig.labelPadding*2;i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition===`left`||this.axisPosition===`right`?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let t=this.normalizedLabelRotationInRad;return t===0?0:Math.sin(t)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`left-axis`,`axisl-line`],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`left-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`middle`,horizontalPos:`right`}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`left-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`left-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`bottom-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`bottom-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e)+this.calculateOffsetByRotation(`height`),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation(`width`)),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`bottom-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`bottom-axis`,`title`],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`top-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`top-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y;e.push({type:`path`,groupTexts:[`top-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`top-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElements(){if(this.axisPosition===`left`)return this.getDrawableElementsForLeftAxis();if(this.axisPosition===`right`)throw Error(`Drawing of right axis is not implemented`);return this.axisPosition===`bottom`?this.getDrawableElementsForBottomAxis():this.axisPosition===`top`?this.getDrawableElementsForTopAxis():[]}},M=class extends j{static{e(this,`BandAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.categories=n,this.scale=S().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=S().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),t.trace(`BandAxis axis final categories, range: `,this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},ee=class extends j{static{e(this,`LinearAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.domain=n,this.scale=m().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition===`left`&&e.reverse(),this.scale=m().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function N(e,t,n,r){let i=new O(r);return E(e)?new M(t,n,e.categories,e.title,i):new ee(t,n,[e.min,e.max],e.title,i)}e(N,`getAxis`);var te=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{e(this,`ChartTitle`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=n&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:[`chart-title`],type:`text`,data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:`middle`,horizontalPos:`center`,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}};function ne(e,t,n,r){return new te(new O(r),e,t,n)}e(ne,`getChartTitleComponent`);var re=class{constructor(e,t,n,r,i){this.plotData=e,this.xAxis=t,this.yAxis=n,this.orientation=r,this.plotIndex=i}static{e(this,`LinePlot`)}getDrawableElement(){let e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t;if(t=this.orientation===`horizontal`?v().y(e=>e[0]).x(e=>e[1])(e):v().x(e=>e[0]).y(e=>e[1])(e),!t)return[];let n=[{groupTexts:[`plot`,`line-plot-${this.plotIndex}`],type:`path`,data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let t=[];for(let[n,[r,i]]of e.entries()){let e=this.plotData.pointLabels[n];e&&(this.orientation===`horizontal`?t.push({x:i+10,y:r,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`left`,fontSize:12,rotation:0}):t.push({x:r,y:i-10,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`center`,fontSize:12,rotation:0}))}t.length>0&&n.push({groupTexts:[`plot`,`line-plot-${this.plotIndex}`,`labels`],type:`text`,data:t})}return n}},ie=class{constructor(e,t,n,r,i,a){this.barData=e,this.boundingRect=t,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}static{e(this,`BarPlot`)}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,n=t/2;return this.orientation===`horizontal`?[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:this.boundingRect.x,y:e[0]-n,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:e[0]-n,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},ae=class{constructor(e,t,n){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{e(this,`BasePlot`)}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error(`Axes must be passed to render Plots`);let e=[];for(let[t,n]of this.chartData.plots.entries())switch(n.type){case`line`:{let r=new re(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break;case`bar`:{let r=new ie(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break}return e}};function P(e,t,n){return new ae(e,t,n)}e(P,`getPlotComponent`);var oe=class{constructor(e,t,n,r){this.chartConfig=e,this.chartData=t,this.componentStore={title:ne(e,t,n,r),plot:P(e,t,n),xAxis:N(t.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:N(t.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}static{e(this,`Orchestrator`)}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:i,height:a});e-=o.width,t-=o.height,o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=o.height,t-=o.height,this.componentStore.xAxis.setAxisPosition(`bottom`),o=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=o.height,this.componentStore.yAxis.setAxisPosition(`left`),o=this.componentStore.yAxis.calculateSpace({width:e,height:t}),n=o.width,e-=o.width,e>0&&(i+=e,e=0),t>0&&(a+=t,t=0),this.componentStore.plot.calculateSpace({width:i,height:a}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.xAxis.setRange([n,n+i]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+a}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(e=>T(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=0,a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),n=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition(`left`),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=s.width,r=s.width,this.componentStore.yAxis.setAxisPosition(`top`),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=s.height,i=n+s.height,e>0&&(a+=e,e=0),t>0&&(o+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.yAxis.setRange([r,r+a]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+o]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>T(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation===`horizontal`?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},se=class{static{e(this,`XYChartBuilder`)}static build(e,t,n,r){return new oe(e,t,n,r).getDrawableElement()}},F=0,I,L=W(),R=U(),z=G(),B=R.plotColorPalette.split(`,`).map(e=>e.trim()),V=!1,H=!1;function U(){let e=n(),t=s();return _(e.xyChart,t.themeVariables.xyChart)}e(U,`getChartDefaultThemeConfig`);function W(){let e=s();return _(l.xyChart,e.xyChart)}e(W,`getChartDefaultConfig`);function G(){return{yAxis:{type:`linear`,title:``,min:1/0,max:-1/0},xAxis:{type:`band`,title:``,categories:[]},title:``,plots:[]}}e(G,`getChartDefaultData`);function K(e){let t=s();return p(e.trim(),t)}e(K,`textSanitizer`);function q(e){I=e}e(q,`setTmpSVGG`);function J(e){e===`horizontal`?L.chartOrientation=`horizontal`:L.chartOrientation=`vertical`}e(J,`setOrientation`);function Y(e){z.xAxis.title=K(e.text)}e(Y,`setXAxisTitle`);function X(e,t){z.xAxis={type:`linear`,title:z.xAxis.title,min:e,max:t},V=!0}e(X,`setXAxisRangeData`);function ce(e){z.xAxis={type:`band`,title:z.xAxis.title,categories:e.map(e=>K(e.text))},V=!0}e(ce,`setXAxisBand`);function le(e){z.yAxis.title=K(e.text)}e(le,`setYAxisTitle`);function ue(e,t){z.yAxis={type:`linear`,title:z.yAxis.title,min:e,max:t},H=!0}e(ue,`setYAxisRangeData`);function de(e){let t=Math.min(...e),n=Math.max(...e),r=D(z.yAxis)?z.yAxis.min:1/0,i=D(z.yAxis)?z.yAxis.max:-1/0;z.yAxis={type:`linear`,title:z.yAxis.title,min:Math.min(r,t),max:Math.max(i,n)}}e(de,`setYAxisRangeFromPlotData`);function Z(e){let t=[];if(e.length===0)return t;if(!V){let t=D(z.xAxis)?z.xAxis.min:1/0,n=D(z.xAxis)?z.xAxis.max:-1/0;X(Math.min(t,1),Math.max(n,e.length))}if(E(z.xAxis)&&e.length>z.xAxis.categories.length&&(e=e.slice(0,z.xAxis.categories.length)),H||de(e),E(z.xAxis)&&(t=z.xAxis.categories.map((t,n)=>[t,e[n]])),D(z.xAxis)){let n=z.xAxis.min,r=z.xAxis.max,i=(r-n)/(e.length-1),a=[];for(let e=n;e<=r;e+=i)a.push(`${e}`);t=a.map((t,n)=>[t,e[n]])}return t}e(Z,`transformDataWithoutCategory`);function Q(e){return B[e===0?0:e%B.length]}e(Q,`getPlotColorFromPalette`);function fe(e,t){let n=t.map(e=>e.value),r=t.map(e=>e.label?K(e.label):``),i=Z(n),a=r.some(e=>e!==``);z.plots.push({type:`line`,strokeFill:Q(F),strokeWidth:2,data:i,...a?{pointLabels:r}:{}}),F++}e(fe,`setLineData`);function pe(e,t){let n=Z(t.map(e=>e.value));z.plots.push({type:`bar`,fill:Q(F),data:n}),F++}e(pe,`setBarData`);function me(){if(z.plots.length===0)throw Error(`No Plot to render, please provide a plot with some data`);return z.title=d(),se.build(L,z,R,I)}e(me,`getDrawableElem`);function he(){return R}e(he,`getChartThemeConfig`);function ge(){return L}e(ge,`getChartConfig`);function $(){return z}e($,`getXYChartData`);var _e={parser:w,db:{getDrawableElem:me,clear:e(function(){o(),F=0,L=W(),z=G(),R=U(),B=R.plotColorPalette.split(`,`).map(e=>e.trim()),V=!1,H=!1},`clear`),setAccTitle:a,getAccTitle:f,setDiagramTitle:i,getDiagramTitle:d,getAccDescription:u,setAccDescription:r,setOrientation:J,setXAxisTitle:Y,setXAxisRangeData:X,setXAxisBand:ce,setYAxisTitle:le,setYAxisRangeData:ue,setLineData:fe,setBarData:pe,setTmpSVGG:q,getChartThemeConfig:he,getChartConfig:ge,getXYChartData:$},renderer:{draw:e((n,r,i,a)=>{let o=a.db,s=o.getChartThemeConfig(),l=o.getChartConfig(),u=o.getXYChartData().plots[0].data.map(e=>e[1]);function d(e){return e===`top`?`text-before-edge`:`middle`}e(d,`getDominantBaseLine`);function f(e){return e===`left`?`start`:e===`right`?`end`:`middle`}e(f,`getTextAnchor`);function p(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}e(p,`getTextTransformation`),t.debug(`Rendering xychart chart -`+n);let m=y(r),h=m.append(`g`).attr(`class`,`main`),g=h.append(`rect`).attr(`width`,l.width).attr(`height`,l.height).attr(`class`,`background`);c(m,l.height,l.width,!0),m.attr(`viewBox`,`0 0 ${l.width} ${l.height}`),g.attr(`fill`,s.backgroundColor),o.setTmpSVGG(m.append(`g`).attr(`class`,`mermaid-tmp-group`));let _=o.getDrawableElem(),v={};function b(e){let t=h,n=``;for(let[r]of e.entries()){let i=h;r>0&&v[n]&&(i=v[n]),n+=e[r],t=v[n],t||=v[n]=i.append(`g`).attr(`class`,e[r])}return t}e(b,`getGroup`);for(let t of _){if(t.data.length===0)continue;let n=b(t.groupTexts);switch(t.type){case`rect`:if(n.selectAll(`rect`).data(t.data).enter().append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth),l.showDataLabel){let r=l.showDataLabelOutsideBar;if(l.chartOrientation===`horizontal`){let i=function(e,t){let{data:n,label:r}=e;return t*r.length*a<=n.width-o};e(i,`fitsHorizontally`);let a=.7,o=10,c=t.data.map((e,t)=>({data:e,label:u[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),l=c.map(e=>{let{data:t}=e,n=t.height*.7;for(;!i(e,n)&&n>0;)--n;return n}),d=Math.floor(Math.min(...l)),f=e(e=>r?e.data.x+e.data.width+10:e.data.x+e.data.width-10,`determineLabelXPosition`);n.selectAll(`text`).data(c).enter().append(`text`).attr(`x`,f).attr(`y`,e=>e.data.y+e.data.height/2).attr(`text-anchor`,r?`start`:`end`).attr(`dominant-baseline`,`middle`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${d}px`).text(e=>e.label)}else{let i=function(e,t,n){let{data:r,label:i}=e,a=t*i.length*.7,o=r.x+r.width/2,s=o-a/2,c=o+a/2,l=s>=r.x&&c<=r.x+r.width,u=r.y+n+t<=r.y+r.height;return l&&u};e(i,`fitsInBar`);let a=t.data.map((e,t)=>({data:e,label:u[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=a.map(e=>{let{data:t,label:n}=e,r=t.width/(n.length*.7);for(;!i(e,r,10)&&r>0;)--r;return r}),c=Math.floor(Math.min(...o)),l=e(e=>r?e.data.y-10:e.data.y+10,`determineLabelYPosition`);n.selectAll(`text`).data(a).enter().append(`text`).attr(`x`,e=>e.data.x+e.data.width/2).attr(`y`,l).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,r?`auto`:`hanging`).attr(`fill`,s.dataLabelColor).attr(`font-size`,`${c}px`).text(e=>e.label)}}break;case`text`:n.selectAll(`text`).data(t.data).enter().append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>d(e.verticalPos)).attr(`text-anchor`,e=>f(e.horizontalPos)).attr(`transform`,e=>p(e)).text(e=>e.text);break;case`path`:n.selectAll(`path`).data(t.data).enter().append(`path`).attr(`d`,e=>e.path).attr(`fill`,e=>e.fill?e.fill:`none`).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth);break}}},`draw`)}};export{_e as diagram}; \ No newline at end of file diff --git a/dist-desktop/desktop.json b/dist-desktop/desktop.json deleted file mode 100644 index 3c952ed..0000000 --- a/dist-desktop/desktop.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "desktop": true, - "source": "/Users/richardhightower/clients/spillwave/src/forge-notes/.vercel/output/static" -} \ No newline at end of file diff --git a/dist-desktop/index.html b/dist-desktop/index.html deleted file mode 100644 index 0e2f894..0000000 --- a/dist-desktop/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - ForgeNotes - - - -
    -

    - Desktop shell ready. If the app UI does not load, re-run - npm run build:desktop after a successful web build. -

    - - diff --git a/docs/roadmap.md b/docs/roadmap.md index 2a7911c..a636733 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -2,8 +2,8 @@ wiki_key: roadmap doc_type: roadmap truth_state: current -source_hash: 47d73154 -generated_at: 2026-08-03T14:06:00Z +source_hash: bacda013 +generated_at: 2026-08-03T14:12:18Z --- @@ -13,7 +13,7 @@ generated_at: 2026-08-03T14:06:00Z # Roadmap -_0 epic(s) in flight, 1 open item(s), 0 blocked, 0 unclassified._ +_0 epic(s) in flight, 0 open item(s), 0 blocked, 0 unclassified._ ## Now @@ -21,38 +21,8 @@ _Nothing here._ ## Next -### (no epic) - -| # | Item | Type | Priority | Status | Blocked by | -|---|---|---|---|---|---| -| 01KZ3Z46 | cargo tauri build fails: scrubbed icon filename has no image extension | task | P2 | todo | — | +_Nothing here._ ## Later _Nothing here._ - -## Milestones - -### v0.3.1 - -| # | Item | Type | Priority | Status | Blocked by | -|---|---|---|---|---|---| -| 01KZ3Z46 | cargo tauri build fails: scrubbed icon filename has no image extension | task | P2 | todo | — | - -## Visual roadmap - -### Dependency graph - -```mermaid -graph TD - 01KZ3Z46SDWDGVD3CFZ0Z1S9FB["🐛 cargo tauri build fails scrubb"] - classDef todo fill:#f4f4f4,stroke:#999999 - class 01KZ3Z46SDWDGVD3CFZ0Z1S9FB todo -``` - -### Hierarchy - -```mermaid -graph TD - 01KZ3Z46SDWDGVD3CFZ0Z1S9FB["🐛 cargo tauri build fails scrubb"] -```