@kabmo-labs/kabmo 0.58.0 → 0.58.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +457 -444
- package/dist/client/static/js/{Body-karkrzkc.js → Body-ysmhxbvk.js} +3 -3
- package/dist/client/static/js/{CsvGrid-j03knmbe.js → CsvGrid-w90pxyn2.js} +1 -1
- package/dist/client/static/js/{DocxView-e8408vzs.js → DocxView-evxn6kaq.js} +1 -1
- package/dist/client/static/js/{DrawioView-fj4mfzch.js → DrawioView-tmdevwf4.js} +1 -1
- package/dist/client/static/js/{HtmlPreview-9g8xwzgw.js → HtmlPreview-bpsn2z9p.js} +1 -1
- package/dist/client/static/js/{ImageView-sz4fzz9k.js → ImageView-ssazqckj.js} +1 -1
- package/dist/client/static/js/{LayoutWrapper-q6q4h04a.js → LayoutWrapper-qwpfq4dq.js} +2 -2
- package/dist/client/static/js/MergeDiffView-en6aazw8.js +1 -0
- package/dist/client/static/js/{Modal-ahecatp5.js → Modal-zjnhj9nb.js} +19 -19
- package/dist/client/static/js/{PdfView-8jtdx5hd.js → PdfView-txxn6qff.js} +1 -1
- package/dist/client/static/js/{SessionsView-jwp8xvw5.js → SessionsView-eryjtmb2.js} +1 -1
- package/dist/client/static/js/{SheetView-hwx8s864.js → SheetView-52b33e6f.js} +1 -1
- package/dist/client/static/js/{SvgPreview-ete36nzv.js → SvgPreview-hrk4pfm1.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-7nsqzz6z.js → abnfDiagram-O67JEVCF-at77sybc.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-v05ap4e3.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-xvpkfq2f.js → architectureDiagram-NJMV4G6O-raw33jgg.js} +3 -3
- package/dist/client/static/js/{astro-rsrqgjjx.js → astro-qha7sceh.js} +1 -1
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-0saahcs6.js → blockDiagram-BEXU5L5S-b6e90fbk.js} +6 -6
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-ktpqnb4a.js → c4Diagram-YGBWAQC7-msg9y1c6.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-x67cz3ms.js → classDiagram-v2-NBCMYWYE-jmrd1h8r.js} +5 -5
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-9wzmhkz8.js → cose-bilkent-JH36ORCC-na65ebq3.js} +1 -1
- package/dist/client/static/js/css-q2k6afe3.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-sqv0ze38.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-dmmgmv99.js → cynefinDiagram-VND7K2PF-9xkkw71m.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-ygkkms1t.js → dagre-6A5THRUB-p59f19tv.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-qxj0pqb4.js → diagram-22UHCM2B-2e2rcvn7.js} +8 -8
- package/dist/client/static/js/{diagram-3UASUU5V-77k8w5dt.js → diagram-3UASUU5V-r9ds8vgr.js} +2 -2
- package/dist/client/static/js/{diagram-ATOU4E4O-m0h86vf4.js → diagram-ATOU4E4O-jgwxv7v8.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-5v28kaeg.js → diagram-CDSNMT55-20m35eqq.js} +4 -4
- package/dist/client/static/js/{diagram-MLGK6HIB-zgcg9gaz.js → diagram-MLGK6HIB-vt3kxt2m.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-10c9s6e6.js → diagram-MPIPVDR6-c47rgxf1.js} +1 -1
- package/dist/client/static/js/{dockerfile-dr9sdsqp.js → dockerfile-gtcyey0q.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-mz4022dz.js → ebnfDiagram-ZINNZB2B-aszw3xy3.js} +1 -1
- package/dist/client/static/js/{elixir-3dy25ex8.js → elixir-w92v180e.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-ccerbsag.js → elk-276RUBZZ-gbvr3gry.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-a8vjyrrw.js → erDiagram-OPXOYQCR-1hqca8qe.js} +2 -2
- package/dist/client/static/js/eventmodeling-NTZA5JFV-t4dzf5s7.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-c16xmjyv.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-sz1g29fp.js → ganttDiagram-FUAMR5RP-07v22te5.js} +2 -2
- package/dist/client/static/js/gitGraph-4MIJSDKK-0jq8y0qd.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-efqk42q0.js → gitGraphDiagram-X574FWY7-y068jtz9.js} +8 -8
- package/dist/client/static/js/graphql-qx4tt6ze.js +1 -0
- package/dist/client/static/js/html-5e0g8664.js +1 -0
- package/dist/client/static/js/{index-gw4c5n3a.js → index-007sewcn.js} +1 -1
- package/dist/client/static/js/{index-qbqm3c91.js → index-1e0rt7c6.js} +2 -2
- package/dist/client/static/js/{index-6qqsy78z.js → index-1e710snk.js} +1 -1
- package/dist/client/static/js/{index-kc5yt2cd.js → index-2s17netq.js} +2 -2
- package/dist/client/static/js/{index-7s4dge1z.js → index-374xq5a4.js} +1 -1
- package/dist/client/static/js/index-4ddgpqm0.css +1 -0
- package/dist/client/static/js/{index-6h46r2de.js → index-5g2j626a.js} +1 -1
- package/dist/client/static/js/{index-5tp3emtg.js → index-5hvt233n.js} +1 -1
- package/dist/client/static/js/{index-ssepzdaz.js → index-5xxbbzqa.js} +5 -5
- package/dist/client/static/js/{index-jnxmvxb8.js → index-7sq6cjt1.js} +11 -11
- package/dist/client/static/js/{index-q0k1am0g.js → index-80kx6dm6.js} +2 -2
- package/dist/client/static/js/{index-2f6psebk.js → index-8d8ce00v.js} +1 -1
- package/dist/client/static/js/{index-gqsnyh8k.js → index-94d416ee.js} +1 -1
- package/dist/client/static/js/{index-2a0b9ya2.js → index-an7fq7f6.js} +1 -1
- package/dist/client/static/js/{index-6ey6y9em.js → index-azz46nwc.js} +2 -2
- package/dist/client/static/js/{index-bkwax812.js → index-c9aqx3ht.js} +1 -1
- package/dist/client/static/js/{index-rr79n77k.js → index-cc7qbfvn.js} +155 -148
- package/dist/client/static/js/{index-wnk9k57k.js → index-cmjyet7w.js} +50 -50
- package/dist/client/static/js/{index-f31c6jg8.js → index-cpp43af3.js} +8 -8
- package/dist/client/static/js/{index-dz18nn65.js → index-dxq1tbwm.js} +1 -1
- package/dist/client/static/js/{index-8aqjj2x2.js → index-e0kahttb.js} +1 -1
- package/dist/client/static/js/{index-ts8rhd06.js → index-e4nge3f4.js} +1 -1
- package/dist/client/static/js/{index-k4qshngy.js → index-f27wvdky.js} +3 -3
- package/dist/client/static/js/{index-7ma44af3.js → index-f61c25vn.js} +1 -1
- package/dist/client/static/js/{index-nzq51nbb.js → index-fe92hqmb.js} +5 -5
- package/dist/client/static/js/{index-k56patms.js → index-fv7nybnf.js} +2 -2
- package/dist/client/static/js/{index-xfyxmaj1.js → index-gqrt766t.js} +44 -44
- package/dist/client/static/js/{index-mkp3gwag.js → index-hb7a7m9m.js} +1 -1
- package/dist/client/static/js/{index-qkcmspxq.js → index-j830qk07.js} +1 -1
- package/dist/client/static/js/{index-6ac860yz.js → index-kzzvrqnv.js} +1 -1
- package/dist/client/static/js/{index-x7h04xzf.js → index-m5n0zsft.js} +1 -1
- package/dist/client/static/js/{index-q5q8a3qn.js → index-medk4f18.js} +1 -1
- package/dist/client/static/js/{index-tnxp90ac.js → index-nptbz7sv.js} +1 -1
- package/dist/client/static/js/{index-r1wrke3j.js → index-qefssj0m.js} +1 -1
- package/dist/client/static/js/{index-mpyd7qxj.js → index-r8d4bk86.js} +2 -2
- package/dist/client/static/js/{index-vf01q99d.js → index-rqt8mem9.js} +2 -2
- package/dist/client/static/js/{index-zh550byg.js → index-s4dpkds5.js} +1 -1
- package/dist/client/static/js/index-s9k82stc.js +2 -0
- package/dist/client/static/js/{index-xygk0v3e.js → index-skwem10a.js} +2 -2
- package/dist/client/static/js/{index-k1576e2m.js → index-tv9rn2nd.js} +1 -1
- package/dist/client/static/js/{index-dqf0srrp.js → index-vny4ymjf.js} +2 -2
- package/dist/client/static/js/{index-w5j1wgcz.js → index-vw8b29ek.js} +1 -1
- package/dist/client/static/js/{index-e42ys2q3.js → index-wn28m9h7.js} +7 -7
- package/dist/client/static/js/{index-tc07gd33.js → index-wxqcnsrq.js} +2 -2
- package/dist/client/static/js/{index-j863hg0d.js → index-xmg1x6zv.js} +6 -6
- package/dist/client/static/js/{index-t71k3b28.js → index-zhgh7a31.js} +1 -1
- package/dist/client/static/js/{index-vb5a3g01.js → index-zs7kw0be.js} +3 -3
- package/dist/client/static/js/info-A6RAGUB7-szttx3v5.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-rykcacj5.js → infoDiagram-VRGFBTTK-1x83h4k4.js} +2 -2
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-rj752kd8.js → ishikawaDiagram-OU5B5YK6-et6z3c28.js} +2 -2
- package/dist/client/static/js/javascript-av46zx4c.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-mtetwn6f.js → journeyDiagram-ZHPQQLJL-sw669e7a.js} +3 -3
- package/dist/client/static/js/{julia-mxe3pnz3.js → julia-z14p8jsx.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-4h5pw5mm.js → kanban-definition-PNTS6WVX-aqxg95kx.js} +7 -7
- package/dist/client/static/js/{mermaid.core-bs542jma.js → mermaid.core-6cgqsgcf.js} +3 -3
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-67s4xy7h.js → mindmap-definition-NLK3R4M7-530anpc4.js} +4 -4
- package/dist/client/static/js/one-dark-pro-9hnhtkpr.js +1 -0
- package/dist/client/static/js/one-light-2n5y8592.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-401149bv.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-qykb6ssk.js → pegDiagram-GJSIUBJH-5zar6hvy.js} +1 -1
- package/dist/client/static/js/{perl-a8eeaqkn.js → perl-1na2x6yd.js} +1 -1
- package/dist/client/static/js/{php-6gq92zt8.js → php-x75tt7w3.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-bgfv8tfz.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-mymrrvck.js → pieDiagram-5QR66LMP-3bx8syvw.js} +2 -2
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-6f8ahd40.js → quadrantDiagram-O4NWA36T-yaarpr2e.js} +2 -2
- package/dist/client/static/js/radar-RG4KPBEZ-pw720590.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-n2a30ngs.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-rn5rx9qt.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-t4yryhtd.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-c4ebgvrr.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-c3habpvw.js → railroadDiagram-XR7U4H2S-ag41q4nt.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-nysqy6te.js → requirementDiagram-PLB6GJNP-g8sr48h4.js} +4 -4
- package/dist/client/static/js/{ruby-mc826p2e.js → ruby-3h22qahv.js} +1 -1
- package/dist/client/static/js/{rust-m4f4vpvn.js → rust-r27demr5.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-s5dtfp3z.js → sankeyDiagram-IPEJSGJF-t1wbd1hh.js} +1 -1
- package/dist/client/static/js/{scss-9wz47c6t.js → scss-c04ezwnn.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-bb3yp049.js → sequenceDiagram-PO4LG4MO-407mjqty.js} +5 -5
- package/dist/client/static/js/{sizeCapture-INFHLROL-0m2msee7.js → sizeCapture-INFHLROL-w38zb9ky.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-cd0qgj6t.js → stateDiagram-v2-GCMORJYK-4cvgymkc.js} +3 -3
- package/dist/client/static/js/{svelte-5vrwkc13.js → svelte-egg3x4tw.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-rpb01f7p.js → swimlanes-2SLR337P-w7ts2rzw.js} +1 -1
- package/dist/client/static/js/{swimlanesDiagram-TC7HE7FX-zx36y2c8.js → swimlanesDiagram-TC7HE7FX-v82nym6b.js} +1 -1
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-tqw2e6y1.js → timeline-definition-EJHVYXUP-nq46nzy9.js} +4 -4
- package/dist/client/static/js/treeView-Q6P3EWNA-bxgt5yhm.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-hh3595m0.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-dhf4d5xg.js → usecaseDiagram-POWQR4AR-q144snzb.js} +22 -22
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-ztkk79dv.js → vennDiagram-UO4OBE2U-2wemak2p.js} +5 -5
- package/dist/client/static/js/{vue-gmjnxjm3.js → vue-d7p4wv35.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-6bza7h1b.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-ahre5tmv.js → wardleyDiagram-VNRHLVJA-bb2qvvgr.js} +2 -2
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-vak2c50n.js → xychartDiagram-PMCCYNJV-9dr05fdq.js} +4 -4
- package/package.json +4 -4
- package/src/client/components/common/anchored-menu/index.tsx +11 -4
- package/src/client/components/common/session-row/TrailingSlot.tsx +6 -2
- package/src/client/components/common/session-row/index.tsx +32 -16
- package/src/client/components/common/session-row/session-row.test.tsx +56 -18
- package/src/client/components/layout/session-sidebar/modern/WorkspaceHeader.tsx +24 -3
- package/src/client/components/layout/session-sidebar/modern/workspace-header.test.tsx +20 -0
- package/src/client/components/workspace/chat-timeline/ChatOverlays.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/NewChatModal.tsx +5 -0
- package/src/client/components/workspace/chat-timeline/OrchestrationNotice.tsx +81 -162
- package/src/client/components/workspace/chat-timeline/SystemNotice.tsx +7 -3
- package/src/client/components/workspace/chat-timeline/ThinkingSection.tsx +12 -4
- package/src/client/components/workspace/chat-timeline/ToolCallingSection.tsx +1 -0
- package/src/client/components/workspace/chat-timeline/UserTurn.test.tsx +24 -6
- package/src/client/components/workspace/chat-timeline/UserTurn.tsx +17 -4
- package/src/client/components/workspace/chat-timeline/block-chrome.test.tsx +16 -0
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.test.ts +66 -10
- package/src/client/components/workspace/chat-timeline/chat-input/AccessDropdown.tsx +103 -41
- package/src/client/components/workspace/chat-timeline/chat-input/ComposerRows.tsx +3 -1
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.test.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/chat-input/SessionModeDropdown.tsx +54 -35
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.test.tsx +110 -0
- package/src/client/components/workspace/chat-timeline/chat-input/ThinkingLevelDropdown.tsx +51 -32
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.test.ts +62 -0
- package/src/client/components/workspace/chat-timeline/chat-input/Toolbar.tsx +15 -3
- package/src/client/components/workspace/chat-timeline/chat-input/access-capability.test.tsx +151 -0
- package/src/client/components/workspace/chat-timeline/chat-input/modes-props.ts +5 -0
- package/src/client/components/workspace/chat-timeline/fork-preview.test.tsx +1 -1
- package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.test.tsx +21 -5
- package/src/client/components/workspace/chat-timeline/target-picker/ParentSessionPicker.tsx +100 -71
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.test.tsx +9 -9
- package/src/client/components/workspace/chat-timeline/target-picker/WorkspacePicker.tsx +83 -66
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.test.tsx +3 -3
- package/src/client/components/workspace/chat-timeline/target-picker/WorktreePicker.tsx +36 -15
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ArtifactChip.tsx +7 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/shared/ToolRowActions.tsx +10 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Card.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Compact.tsx +11 -6
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Minimal.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Trace.tsx +2 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.test.tsx +5 -3
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/Tui.tsx +19 -12
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/parity.test.tsx +50 -2
- package/src/client/components/workspace/chat-timeline/tool-renderers/styles/props.ts +2 -0
- package/src/client/hooks/chat/timeline/access-ladder-wiring.test.ts +111 -0
- package/src/client/hooks/chat/timeline/access-ladder.test.ts +66 -0
- package/src/client/hooks/chat/timeline/access-ladder.ts +72 -0
- package/src/client/hooks/chat/timeline/access-mode.ts +11 -1
- package/src/client/hooks/chat/timeline/index.ts +4 -5
- package/src/client/hooks/chat/timeline/modes-contract.ts +10 -1
- package/src/client/hooks/chat/timeline/modes.ts +10 -2
- package/src/server/lib/realtime/topics/session-data.server.ts +6 -5
- package/src/server/lib/realtime/topics/session-data.test.ts +35 -0
- package/src/shared/lib/chat/orchestration/outcome-markdown.test.ts +57 -0
- package/src/shared/lib/chat/orchestration/outcome-markdown.ts +74 -0
- package/dist/client/static/js/MergeDiffView-b8f013ws.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-dc7zys46.js +0 -1
- package/dist/client/static/js/css-9gak6bze.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-9fx59e89.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-61d2ee91.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-104ywb7w.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-zkb30q0t.js +0 -1
- package/dist/client/static/js/graphql-2ntm7jyh.js +0 -1
- package/dist/client/static/js/html-mt2yb43b.js +0 -1
- package/dist/client/static/js/index-f44k9k8d.css +0 -1
- package/dist/client/static/js/index-ver116ed.js +0 -2
- package/dist/client/static/js/info-A6RAGUB7-xxvyt8p8.js +0 -1
- package/dist/client/static/js/javascript-0mqgcvps.js +0 -1
- package/dist/client/static/js/one-dark-pro-541ed4b7.js +0 -1
- package/dist/client/static/js/one-light-nr79mykt.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-cm8jeesg.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-8b9xgcxv.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-fxr2x2mf.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-5qd45xk1.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-6fa00vpk.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-pcbtg7tj.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-r0fdhdtp.js +0 -1
- package/dist/client/static/js/treeView-Q6P3EWNA-9sn2h4ea.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-9fzms0pq.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-vy6rp5gp.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{t,l,Jt,Y,E,te,
|
|
1
|
+
import{t,l,Jt,Y,E,te,ne,F,O,G,z,j,q,H,To,nr,ll,ge,ue,Vg}from"./index-gqrt766t.js";import{Aa}from"./index-dxq1tbwm.js";function Rt(e,i,s){e=+e,i=+i,s=(a=arguments.length)<2?(i=e,e=0,1):a<3?1:+s;var n=-1,a=Math.max(0,Math.ceil((i-e)/s))|0,h=Array(a);while(++n<a)h[n]=e+n*s;return h}function ct(){var e=nr().unknown(void 0),{domain:i,range:s}=e,n=0,a=1,h,c,x=!1,f=0,S=0,T=0.5;delete e.unknown;function R(){var y=i().length,B=a<n,P=B?a:n,L=B?n:a;if(h=(L-P)/Math.max(1,y-f+S*2),x)h=Math.floor(h);if(P+=(L-P-h*(y-f))*T,c=h*(1-f),x)P=Math.round(P),c=Math.round(c);var V=Rt(y).map(function(Z){return P+h*Z});return s(B?V.reverse():V)}return e.domain=function(y){return arguments.length?(i(y),R()):i()},e.range=function(y){return arguments.length?([n,a]=y,n=+n,a=+a,R()):[n,a]},e.rangeRound=function(y){return[n,a]=y,n=+n,a=+a,x=!0,R()},e.bandwidth=function(){return c},e.step=function(){return h},e.round=function(y){return arguments.length?(x=!!y,R()):x},e.padding=function(y){return arguments.length?(f=Math.min(1,S=+y),R()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),R()):f},e.paddingOuter=function(y){return arguments.length?(S=+y,R()):S},e.align=function(y){return arguments.length?(T=Math.max(0,Math.min(1,y)),R()):T},e.copy=function(){return ct(i(),[n,a]).round(x).paddingInner(f).paddingOuter(S).align(T)},To.apply(R(),arguments)}var _t=function(){var e=t(function(U,r,g,d){for(g=g||{},d=U.length;d--;g[U[d]]=r);return g},"o"),i=[1,10,12,14,16,18,19,21,23],s=[2,6],n=[1,3],a=[1,5],h=[1,6],c=[1,7],x=[1,5,10,12,14,16,18,19,21,23,36,37,38],f=[1,25],S=[1,26],T=[1,28],R=[1,29],y=[1,30],B=[1,31],P=[1,32],L=[1,33],V=[1,34],Z=[1,35],tt=[1,36],w=[1,37],X=[1,43],u=[1,42],W=[1,47],N=[1,50],A=[1,10,12,14,16,18,19,21,23,36,37,38],it=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],I=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],rt=[1,65],D=[26,28],k={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",28:"COMMA",29:"NUMBER_WITH_DECIMAL",30:"STR",33:"ARROW_DELIMITER",36:"NEWLINE",37:"SEMI",38:"EOF",40:"MD_STR",42:"AMP",43:"NUM",44:"ALPHA",45:"PLUS",46:"EQUALS",47:"MULT",48:"DOT",49:"BRKT",50:"MINUS",51:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:t(function(r,g,d,p,C,o,st){var m=o.length-1;switch(C){case 5:p.setOrientation(o[m]);break;case 9:p.setDiagramTitle(o[m].text.trim());break;case 12:p.setLineData({text:"",type:"text"},o[m]);break;case 13:p.setLineData(o[m-1],o[m]);break;case 14:p.setBarData({text:"",type:"text"},o[m]);break;case 15:p.setBarData(o[m-1],o[m]);break;case 16:this.$=o[m].trim(),p.setAccTitle(this.$);break;case 17:case 18:this.$=o[m].trim(),p.setAccDescription(this.$);break;case 19:this.$=o[m-1];break;case 20:case 30:this.$=[o[m-2],...o[m]];break;case 21:case 31:this.$=[o[m]];break;case 22:this.$={value:Number(o[m-1]),label:o[m]};break;case 23:this.$={value:Number(o[m]),label:""};break;case 24:p.setXAxisTitle(o[m]);break;case 25:p.setXAxisTitle(o[m-1]);break;case 26:p.setXAxisTitle({type:"text",text:""});break;case 27:p.setXAxisBand(o[m]);break;case 28:p.setXAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 29:this.$=o[m-1];break;case 32:p.setYAxisTitle(o[m]);break;case 33:p.setYAxisTitle(o[m-1]);break;case 34:p.setYAxisTitle({type:"text",text:""});break;case 35:p.setYAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 39:this.$={text:o[m],type:"text"};break;case 40:this.$={text:o[m],type:"text"};break;case 41:this.$={text:o[m],type:"markdown"};break;case 42:this.$=o[m];break;case 43:this.$=o[m-1]+""+o[m];break}},"anonymous"),table:[e(i,s,{3:1,4:2,7:4,5:n,36:a,37:h,38:c}),{1:[3]},e(i,s,{4:2,7:4,3:8,5:n,36:a,37:h,38:c}),e(i,s,{4:2,7:4,6:9,3:10,5:n,8:[1,11],36:a,37:h,38:c}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(x,[2,36]),e(x,[2,37]),e(x,[2,38]),{1:[2,1]},e(i,s,{4:2,7:4,3:21,5:n,36:a,37:h,38:c}),{1:[2,3]},e(x,[2,5]),e(i,[2,7],{4:22,36:a,37:h,38:c}),{11:23,30:f,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:39,13:38,24:X,29:u,30:f,31:40,32:41,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:45,15:44,29:W,30:f,35:46,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:49,17:48,24:N,30:f,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{11:52,17:51,24:N,30:f,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},{20:[1,53]},{22:[1,54]},e(A,[2,18]),{1:[2,2]},e(A,[2,8]),e(A,[2,9]),e(it,[2,39],{41:55,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w}),e(it,[2,40]),e(it,[2,41]),e(I,[2,42]),e(I,[2,44]),e(I,[2,45]),e(I,[2,46]),e(I,[2,47]),e(I,[2,48]),e(I,[2,49]),e(I,[2,50]),e(I,[2,51]),e(I,[2,52]),e(I,[2,53]),e(A,[2,10]),e(A,[2,24],{32:41,31:56,24:X,29:u}),e(A,[2,26]),e(A,[2,27]),{33:[1,57]},{11:59,30:f,34:58,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},e(A,[2,11]),e(A,[2,32],{35:60,29:W}),e(A,[2,34]),{33:[1,61]},e(A,[2,12]),{17:62,24:N},{25:63,27:64,29:rt},e(A,[2,14]),{17:66,24:N},e(A,[2,16]),e(A,[2,17]),e(I,[2,43]),e(A,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(A,[2,33]),{29:[1,70]},e(A,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(D,[2,23],{30:[1,73]}),e(A,[2,15]),e(A,[2,28]),e(A,[2,29]),{11:59,30:f,34:74,39:24,40:S,41:27,42:T,43:R,44:y,45:B,46:P,47:L,48:V,49:Z,50:tt,51:w},e(A,[2,35]),e(A,[2,19]),{25:75,27:64,29:rt},e(D,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:t(function(r,g){if(g.recoverable)this.trace(r);else{var d=Error(r);throw d.hash=g,d}},"parseError"),parse:t(function(r){var g=this,d=[0],p=[],C=[null],o=[],st=this.table,m="",xt=0,Vt=0,Ft=0,xe=2,Wt=1,fe=o.slice.call(arguments,1),v=Object.create(this.lexer),nt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))nt.yy[wt]=this.yy[wt];if(v.setInput(r,nt.yy),nt.yy.lexer=v,nt.yy.parser=this,typeof v.yylloc>"u")v.yylloc={};var kt=v.yylloc;o.push(kt);var pe=v.options&&v.options.ranges;if(typeof nt.yy.parseError==="function")this.parseError=nt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function me(K){d.length=d.length-2*K,C.length=C.length-K,o.length=o.length-K}t(me,"popStack");function Xt(){var K=p.pop()||v.lex()||Wt;if(typeof K!=="number"){if(K instanceof Array)p=K,K=p.pop();K=g.symbols_[K]||K}return K}t(Xt,"lex");var M,At,at,Q,Be,Ct,ht={},ft,et,Nt,pt;while(!0){if(at=d[d.length-1],this.defaultActions[at])Q=this.defaultActions[at];else{if(M===null||typeof M>"u")M=Xt();Q=st[at]&&st[at][M]}if(typeof Q>"u"||!Q.length||!Q[0]){var St="";pt=[];for(ft in st[at])if(this.terminals_[ft]&&ft>xe)pt.push("'"+this.terminals_[ft]+"'");if(v.showPosition)St="Parse error on line "+(xt+1)+`:
|
|
2
2
|
`+v.showPosition()+`
|
|
3
|
-
Expecting `+pt.join(", ")+", got '"+(this.terminals_[M]||M)+"'";else St="Parse error on line "+(xt+1)+": Unexpected "+(M==Wt?"end of input":"'"+(this.terminals_[M]||M)+"'");this.parseError(St,{text:v.match,token:this.terminals_[M]||M,line:v.yylineno,loc:kt,expected:pt})}if(Q[0]instanceof Array&&Q.length>1)throw Error("Parse Error: multiple actions possible at state: "+at+", token: "+M);switch(Q[0]){case 1:if(d.push(M),C.push(v.yytext),o.push(v.yylloc),d.push(Q[1]),M=null,!At){if(Vt=v.yyleng,m=v.yytext,xt=v.yylineno,kt=v.yylloc,Ft>0)Ft--}else M=At,At=null;break;case 2:if(et=this.productions_[Q[1]][1],ht.$=C[C.length-et],ht._$={first_line:o[o.length-(et||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(et||1)].first_column,last_column:o[o.length-1].last_column},
|
|
3
|
+
Expecting `+pt.join(", ")+", got '"+(this.terminals_[M]||M)+"'";else St="Parse error on line "+(xt+1)+": Unexpected "+(M==Wt?"end of input":"'"+(this.terminals_[M]||M)+"'");this.parseError(St,{text:v.match,token:this.terminals_[M]||M,line:v.yylineno,loc:kt,expected:pt})}if(Q[0]instanceof Array&&Q.length>1)throw Error("Parse Error: multiple actions possible at state: "+at+", token: "+M);switch(Q[0]){case 1:if(d.push(M),C.push(v.yytext),o.push(v.yylloc),d.push(Q[1]),M=null,!At){if(Vt=v.yyleng,m=v.yytext,xt=v.yylineno,kt=v.yylloc,Ft>0)Ft--}else M=At,At=null;break;case 2:if(et=this.productions_[Q[1]][1],ht.$=C[C.length-et],ht._$={first_line:o[o.length-(et||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(et||1)].first_column,last_column:o[o.length-1].last_column},pe)ht._$.range=[o[o.length-(et||1)].range[0],o[o.length-1].range[1]];if(Ct=this.performAction.apply(ht,[m,Vt,xt,nt.yy,Q[1],C,o].concat(fe)),typeof Ct<"u")return Ct;if(et)d=d.slice(0,-1*et*2),C=C.slice(0,-1*et),o=o.slice(0,-1*et);d.push(this.productions_[Q[1]][0]),C.push(ht.$),o.push(ht._$),Nt=st[d[d.length-2]][d[d.length-1]],d.push(Nt);break;case 3:return!0}}return!0},"parse")},J=function(){var U={EOF:1,parseError:t(function(g,d){if(this.yy.parser)this.yy.parser.parseError(g,d);else throw Error(g)},"parseError"),setInput:t(function(r,g){if(this.yy=g||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var g=r.match(/(?:\r\n?|\n).*/g);if(g)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),r},"input"),unput:t(function(r){var g=r.length,d=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var p=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),d.length-1)this.yylineno-=d.length-1;var C=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:d?(d.length===p.length?this.yylloc.first_column:0)+p[p.length-d.length].length-d[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[C[0],C[0]+this.yyleng-g];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(r){this.unput(this.match.slice(r))},"less"),pastInput:t(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var r=this.match;if(r.length<20)r+=this._input.substr(0,20-r.length);return(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var r=this.pastInput(),g=Array(r.length+1).join("-");return r+this.upcomingInput()+`
|
|
5
5
|
`+g+"^"},"showPosition"),test_match:t(function(r,g){var d,p,C;if(this.options.backtrack_lexer){if(C={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)C.yylloc.range=this.yylloc.range.slice(0)}if(p=r[0].match(/(?:\r\n?|\n).*/g),p)this.yylineno+=p.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:p?p[p.length-1].length-p[p.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+r[0].length},this.yytext+=r[0],this.match+=r[0],this.matches=r,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(r[0].length),this.matched+=r[0],d=this.performAction.call(this,this.yy,this,g,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(d)return d;else if(this._backtrack){for(var o in C)this[o]=C[o];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var r,g,d,p;if(!this._more)this.yytext="",this.match="";var C=this._currentRules();for(var o=0;o<C.length;o++)if(d=this._input.match(this.rules[C[o]]),d&&(!g||d[0].length>g[0].length)){if(g=d,p=o,this.options.backtrack_lexer)if(r=this.test_match(d,C[o]),r!==!1)return r;else if(this._backtrack){g=!1;continue}else return!1;else if(!this.options.flex)break}if(g){if(r=this.test_match(g,C[p]),r!==!1)return r;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:t(function(g){this.conditionStack.push(g)},"begin"),popState:t(function(){var g=this.conditionStack.length-1;if(g>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:t(function(g){this.begin(g)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(g,d,p,C){var o=C;switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;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";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;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<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/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}}};return U}();k.lexer=J;function _(){this.yy={}}return t(_,"Parser"),_.prototype=k,k.Parser=_,new _}();_t.parser=_t;var me=_t;function mt(e){return e.type==="bar"}t(mt,"isBarPlot");function bt(e){return e.type==="band"}t(bt,"isBandAxisData");function lt(e){return e.type==="linear"}t(lt,"isLinearAxisData");var Pt=class{constructor(e){this.parentGroup=e}static{t(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,i){if(!this.parentGroup)return{width:e.reduce((a,h)=>Math.max(h.length,a),0)*i,height:i};let s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let a of e){let h=Vg(n,1,a),c=h?h.width:a.length*i,x=h?h.height:i;s.width=Math.max(s.width,c),s.height=Math.max(s.height,x)}return n.remove(),s}},Yt=0.7,Ht=0.2,$t=class{constructor(e,i,s,n){this.axisConfig=e,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,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{t(this,"BaseAxis")}setRange(e){if(this.range=e,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=e[1]-e[0];else 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(){if(Yt*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(Yt*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let i=e.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Ht*e.width;this.outerPadding=Math.min(s.width/2,n);let a=s.height;if(this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0)a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*s.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*s.height));if(a+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width,this.boundingRect.height=e.height-i}calculateSpaceIfDrawnVertical(e){let i=e.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Ht*e.height;this.outerPadding=Math.min(s.height/2,n);let a=s.width+this.axisConfig.labelPadding*2;if(a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width-i,this.boundingRect.height=e.height}calculateSpace(e){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(e);else this.calculateSpaceIfDrawnHorizontally(e);return 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 i=this.normalizedLabelRotationInRad;if(i===0)return 0;return Math.sin(i)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${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((i)=>({text:i.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(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))});if(this.showTick){let i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(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"}]});return e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i)+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"}))});if(this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(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"}]});return e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let i=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},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i),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"}))});if(this.showTick){let i=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(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"}]});return e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");if(this.axisPosition==="bottom")return this.getDrawableElementsForBottomAxis();if(this.axisPosition==="top")return this.getDrawableElementsForTopAxis();return[]}},be=class extends $t{static{t(this,"BandAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.categories=s,this.scale=ct().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=ct().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),l.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},ye=class extends $t{static{t(this,"LinearAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.domain=s,this.scale=Aa().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=Aa().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Tt(e,i,s,n){let a=new Pt(n);if(bt(e))return new be(i,s,e.categories,e.title,a);return new ye(i,s,[e.min,e.max],e.title,a)}t(Tt,"getAxis");var we=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{t(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,e.width),n=i.height+2*this.chartConfig.titlePadding;if(i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];if(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}]});return e}};function Ut(e,i,s,n){let a=new Pt(n);return new we(a,e,i,s)}t(Ut,"getChartTitleComponent");var ke=0.75,Ce=0.5,Se=0.35;function Dt(e){return{fontSize:e,markerSize:e*ke,markerSpacing:e*Se,itemSpacing:e*Ce}}t(Dt,"getLegendLayout");var Re=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{t(this,"ChartLegend")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((f)=>f.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:i,markerSize:s,markerSpacing:n,itemSpacing:a}=Dt(this.chartConfig.legendFontSize),h=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((f)=>f.title),i),c=this.chartConfig.legendPadding*2+s+n+h.width,x=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;if(c<=e.width&&x<=e.height)this.boundingRect.width=c,this.boundingRect.height=x;else this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:i,markerSpacing:s,itemSpacing:n}=Dt(this.chartConfig.legendFontSize),a=e+n,h=this.boundingRect.x+this.chartConfig.legendPadding,c=this.boundingRect.y+this.chartConfig.legendPadding,x=[],f=[];for(let[S,T]of this.visiblePlots.entries())if(mt(T))x.push({x:h,y:c+S*a,width:i,height:i,fill:T.fill,strokeFill:T.fill,strokeWidth:0});else{let R=c+S*a+i/2;f.push({path:`M ${h},${R} L ${h+i},${R}`,strokeFill:T.strokeFill,strokeWidth:T.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:x},{groupTexts:["legend","markers"],type:"path",data:f},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((S,T)=>({text:S.title,x:h+i+s,y:c+T*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function qt(e,i,s,n){let a=new Pt(n);return new Re(a,e,i,s)}t(qt,"getChartLegendComponent");var _e=class{constructor(e,i,s,n,a){this.plotData=e,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{t(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map((n)=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i;if(this.orientation==="horizontal")i=ll().y((n)=>n[0]).x((n)=>n[1])(e);else i=ll().x((n)=>n[0]).y((n)=>n[1])(e);if(!i)return[];let s=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let h=[];for(let[c,[x,f]]of e.entries()){let S=this.plotData.pointLabels[c];if(!S)continue;if(this.orientation==="horizontal")h.push({x:f+10,y:x,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else h.push({x,y:f-10,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(h.length>0)s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:h})}return s}},Te=class{constructor(e,i,s,n,a,h){this.barData=e,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=h}static{t(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map((a)=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),i=0.05,s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*0.95,n=s/2;if(this.orientation==="horizontal")return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:this.boundingRect.x,y:a[0]-n,height:s,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:a[0]-n,y:a[1],width:s,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},De=class{constructor(e,i,s){this.chartConfig=e,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}static{t(this,"BasePlot")}setAxes(e,i){this.xAxis=e,this.yAxis=i}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[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let n=new _e(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break;case"bar":{let n=new Te(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break}return e}};function Gt(e,i,s){return new De(e,i,s)}t(Gt,"getPlotComponent");var ve=class{constructor(e,i,s,n){this.chartConfig=e,this.chartData=i,this.componentStore={title:Ut(e,i,s,n),plot:Gt(e,i,s),legend:qt(e,i,s,n),xAxis:Tt(i.xAxis,e.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Tt(i.yAxis,e.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}static{t(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a={width:0,height:0},h=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),c=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),x=this.componentStore.plot.calculateSpace({width:h,height:c});if(e-=x.width,i-=x.height,x=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=x.height,i-=x.height,this.componentStore.xAxis.setAxisPosition("bottom"),x=this.componentStore.xAxis.calculateSpace({width:e,height:i}),i-=x.height,this.componentStore.yAxis.setAxisPosition("left"),x=this.componentStore.yAxis.calculateSpace({width:e,height:i}),s=x.width,e-=x.width,a=this.componentStore.legend.calculateSpace({width:e,height:c}),e-=a.width,e>0)h+=e,e=0;if(i>0)c+=i,i=0;if(this.componentStore.plot.calculateSpace({width:h,height:c}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.legend.setBoundingBoxXY({x:s+h,y:n+Math.max((c-a.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+h]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+c}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((f)=>mt(f)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a=0,h={width:0,height:0},c=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),x=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:x});if(e-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:e,height:i}),e-=f.width,n=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:e,height:i}),i-=f.height,a=s+f.height,h=this.componentStore.legend.calculateSpace({width:e,height:x}),e-=h.width,e>0)c+=e,e=0;if(i>0)x+=i,i=0;if(this.componentStore.plot.calculateSpace({width:c,height:x}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.legend.setBoundingBoxXY({x:n+c,y:a+Math.max((x-h.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([a,a+x]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((S)=>mt(S)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))e.push(...i.getDrawableElements());return e}},Pe=class{static{t(this,"XYChartBuilder")}static build(e,i,s,n){return new ve(e,i,s,n).getDrawableElement()}},gt=0,jt,ut=It(),dt=Et(),b=Mt(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1;function Et(){let e=Jt(),i=E();return ue(e.xyChart,i.themeVariables.xyChart)}t(Et,"getChartDefaultThemeConfig");function It(){let e=E();return ue(Y.xyChart,e.xyChart)}t(It,"getChartDefaultConfig");function Mt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(Mt,"getChartDefaultData");function ot(e){let i=E();return te(e.trim(),i)}t(ot,"textSanitizer");function Qt(e){jt=e}t(Qt,"setTmpSVGG");function Kt(e){if(e==="horizontal")ut.chartOrientation="horizontal";else ut.chartOrientation="vertical"}t(Kt,"setOrientation");function Zt(e){b.xAxis.title=ot(e.text)}t(Zt,"setXAxisTitle");function Bt(e,i){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:i},yt=!0}t(Bt,"setXAxisRangeData");function ee(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map((i)=>ot(i.text))},yt=!0}t(ee,"setXAxisBand");function ie(e){b.yAxis.title=ot(e.text)}t(ie,"setYAxisTitle");function se(e,i){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:i},Lt=!0}t(se,"setYAxisRangeData");function ne(e){let i=Math.min(...e),s=Math.max(...e),n=lt(b.yAxis)?b.yAxis.min:1/0,a=lt(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(n,i),max:Math.max(a,s)}}t(ne,"setYAxisRangeFromPlotData");function zt(e){let i=[];if(e.length===0)return i;if(!yt){let s=lt(b.xAxis)?b.xAxis.min:1/0,n=lt(b.xAxis)?b.xAxis.max:-1/0;Bt(Math.min(s,1),Math.max(n,e.length))}if(bt(b.xAxis)&&e.length>b.xAxis.categories.length)e=e.slice(0,b.xAxis.categories.length);if(!Lt)ne(e);if(bt(b.xAxis))i=b.xAxis.categories.map((s,n)=>[s,e[n]]);if(lt(b.xAxis)){let s=b.xAxis.min,n=b.xAxis.max;if(e.length===1)i=[[`${s}`,e[0]]];else{let a=(n-s)/(e.length-1);i=e.map((h,c)=>[`${s+c*a}`,h])}}return i}t(zt,"transformDataWithoutCategory");function Ot(e){return vt[e===0?0:e%vt.length]}t(Ot,"getPlotColorFromPalette");function ae(e,i){let s=i.map((c)=>c.value),n=i.map((c)=>c.label?ot(c.label):""),a=zt(s),h=n.some((c)=>c!=="");b.plots.push({type:"line",title:ot(e.text),strokeFill:Ot(gt),strokeWidth:2,data:a,...h?{pointLabels:n}:{}}),gt++}t(ae,"setLineData");function oe(e,i){let s=i.map((a)=>a.value),n=zt(s);b.plots.push({type:"bar",title:ot(e.text),fill:Ot(gt),data:n}),gt++}t(oe,"setBarData");function he(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=H(),Pe.build(ut,b,dt,jt)}t(he,"getDrawableElem");function le(){return dt}t(le,"getChartThemeConfig");function ce(){return ut}t(ce,"getChartConfig");function ge(){return b}t(ge,"getXYChartData");var Le=t(function(){F(),gt=0,ut=It(),b=Mt(),dt=Et(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1},"clear"),Ee={getDrawableElem:he,clear:Le,setAccTitle:O,getAccTitle:G,setDiagramTitle:q,getDiagramTitle:H,getAccDescription:j,setAccDescription:z,setOrientation:Kt,setXAxisTitle:Zt,setXAxisRangeData:Bt,setXAxisBand:ee,setYAxisTitle:ie,setYAxisRangeData:se,setLineData:ae,setBarData:oe,setTmpSVGG:Qt,getChartThemeConfig:le,getChartConfig:ce,getXYChartData:ge},Ie=t((e,i,s,n)=>{let a=n.db,h=a.getChartThemeConfig(),c=a.getChartConfig(),x=a.getXYChartData().plots[0].data.map((w)=>w[1]);function f(w){return w==="top"?"text-before-edge":"middle"}t(f,"getDominantBaseLine");function S(w){return w==="left"?"start":w==="right"?"end":"middle"}t(S,"getTextAnchor");function T(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}t(T,"getTextTransformation"),l.debug(`Rendering xychart chart
|
|
7
|
-
`+e);let R=
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var g=this.next();if(g)return g;else return this.lex()},"lex"),begin:t(function(g){this.conditionStack.push(g)},"begin"),popState:t(function(){var g=this.conditionStack.length-1;if(g>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(g){if(g=this.conditionStack.length-1-Math.abs(g||0),g>=0)return this.conditionStack[g];else return"INITIAL"},"topState"),pushState:t(function(g){this.begin(g)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(g,d,p,C){var o=C;switch(p){case 0:break;case 1:break;case 2:return this.popState(),36;break;case 3:return this.popState(),36;break;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;break;case 8:return this.popState(),"acc_title_value";break;case 9:return this.pushState("acc_descr"),21;break;case 10:return this.popState(),"acc_descr_value";break;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";break;case 18:return this.pushState("axis_data"),"Y_AXIS";break;case 19:return this.pushState("axis_band_data"),24;break;case 20:return 33;case 21:return this.pushState("data"),16;break;case 22:return this.pushState("data"),18;break;case 23:return this.pushState("data_inner"),24;break;case 24:return 29;case 25:return this.popState(),26;break;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<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/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}}};return U}();k.lexer=J;function _(){this.yy={}}return t(_,"Parser"),_.prototype=k,k.Parser=_,new _}();_t.parser=_t;var be=_t;function mt(e){return e.type==="bar"}t(mt,"isBarPlot");function bt(e){return e.type==="band"}t(bt,"isBandAxisData");function lt(e){return e.type==="linear"}t(lt,"isLinearAxisData");var Pt=class{constructor(e){this.parentGroup=e}static{t(this,"TextDimensionCalculatorWithFont")}getMaxDimension(e,i){if(!this.parentGroup)return{width:e.reduce((a,h)=>Math.max(h.length,a),0)*i,height:i};let s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(let a of e){let h=Vg(n,1,a),c=h?h.width:a.length*i,x=h?h.height:i;s.width=Math.max(s.width,c),s.height=Math.max(s.height,x)}return n.remove(),s}},Yt=0.7,Ht=0.2,$t=class{constructor(e,i,s,n){this.axisConfig=e,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,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{t(this,"BaseAxis")}setRange(e){if(this.range=e,this.axisPosition==="left"||this.axisPosition==="right")this.boundingRect.height=e[1]-e[0];else 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(){if(Yt*this.getTickDistance()>this.outerPadding*2)this.outerPadding=Math.floor(Yt*this.getTickDistance()/2);this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let i=e.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Ht*e.width;this.outerPadding=Math.min(s.width/2,n);let a=s.height;if(this.axisPosition==="bottom"&&this.normalizedLabelRotationInRad!==0)a=Math.max(a,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*s.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*s.height));if(a+=this.axisConfig.labelPadding*2,this.labelTextHeight=s.height,a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width,this.boundingRect.height=e.height-i}calculateSpaceIfDrawnVertical(e){let i=e.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth)i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0;if(this.axisConfig.showLabel){let s=this.getLabelDimension(),n=Ht*e.height;this.outerPadding=Math.min(s.height/2,n);let a=s.width+this.axisConfig.labelPadding*2;if(a<=i)i-=a,this.showLabel=!0}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength)this.showTick=!0,i-=this.axisConfig.tickLength;if(this.axisConfig.showTitle&&this.title){let s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;if(this.titleTextHeight=s.height,n<=i)i-=n,this.showTitle=!0}this.boundingRect.width=e.width-i,this.boundingRect.height=e.height}calculateSpace(e){if(this.axisPosition==="left"||this.axisPosition==="right")this.calculateSpaceIfDrawnVertical(e);else this.calculateSpaceIfDrawnHorizontally(e);return 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 i=this.normalizedLabelRotationInRad;if(i===0)return 0;return Math.sin(i)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${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((i)=>({text:i.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(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))});if(this.showTick){let i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(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"}]});return e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i)+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"}))});if(this.showTick){let i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(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"}]});return e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let i=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},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel)e.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map((i)=>({text:i.toString(),x:this.getScaleValue(i),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"}))});if(this.showTick){let i=this.boundingRect.y;e.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map((s)=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}if(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"}]});return e}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");if(this.axisPosition==="bottom")return this.getDrawableElementsForBottomAxis();if(this.axisPosition==="top")return this.getDrawableElementsForTopAxis();return[]}},ye=class extends $t{static{t(this,"BandAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.categories=s,this.scale=ct().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=ct().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(0.5),l.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},we=class extends $t{static{t(this,"LinearAxis")}constructor(e,i,s,n,a){super(e,n,a,i);this.domain=s,this.scale=Aa().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];if(this.axisPosition==="left")e.reverse();this.scale=Aa().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}};function Tt(e,i,s,n){let a=new Pt(n);if(bt(e))return new ye(i,s,e.categories,e.title,a);return new we(i,s,[e.min,e.max],e.title,a)}t(Tt,"getAxis");var ke=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{t(this,"ChartTitle")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,e.width),n=i.height+2*this.chartConfig.titlePadding;if(i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title)this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];if(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}]});return e}};function Ut(e,i,s,n){let a=new Pt(n);return new ke(a,e,i,s)}t(Ut,"getChartTitleComponent");var Ae=0.75,Ce=0.5,Se=0.35;function Dt(e){return{fontSize:e,markerSize:e*Ae,markerSpacing:e*Se,itemSpacing:e*Ce}}t(Dt,"getLegendLayout");var Re=class{constructor(e,i,s,n){this.textDimensionCalculator=e,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{t(this,"ChartLegend")}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter((f)=>f.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:i,markerSize:s,markerSpacing:n,itemSpacing:a}=Dt(this.chartConfig.legendFontSize),h=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map((f)=>f.title),i),c=this.chartConfig.legendPadding*2+s+n+h.width,x=this.chartConfig.legendPadding*2+this.visiblePlots.length*i+(this.visiblePlots.length-1)*a;if(c<=e.width&&x<=e.height)this.boundingRect.width=c,this.boundingRect.height=x;else this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0;return{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:i,markerSpacing:s,itemSpacing:n}=Dt(this.chartConfig.legendFontSize),a=e+n,h=this.boundingRect.x+this.chartConfig.legendPadding,c=this.boundingRect.y+this.chartConfig.legendPadding,x=[],f=[];for(let[S,T]of this.visiblePlots.entries())if(mt(T))x.push({x:h,y:c+S*a,width:i,height:i,fill:T.fill,strokeFill:T.fill,strokeWidth:0});else{let R=c+S*a+i/2;f.push({path:`M ${h},${R} L ${h+i},${R}`,strokeFill:T.strokeFill,strokeWidth:T.strokeWidth})}return[{groupTexts:["legend","markers"],type:"rect",data:x},{groupTexts:["legend","markers"],type:"path",data:f},{groupTexts:["legend","label"],type:"text",data:this.visiblePlots.map((S,T)=>({text:S.title,x:h+i+s,y:c+T*a+i/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:"middle",horizontalPos:"left"}))}]}};function qt(e,i,s,n){let a=new Pt(n);return new Re(a,e,i,s)}t(qt,"getChartLegendComponent");var _e=class{constructor(e,i,s,n,a){this.plotData=e,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=a}static{t(this,"LinePlot")}getDrawableElement(){let e=this.plotData.data.map((n)=>[this.xAxis.getScaleValue(n[0]),this.yAxis.getScaleValue(n[1])]),i;if(this.orientation==="horizontal")i=ll().y((n)=>n[0]).x((n)=>n[1])(e);else i=ll().x((n)=>n[0]).y((n)=>n[1])(e);if(!i)return[];let s=[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let h=[];for(let[c,[x,f]]of e.entries()){let S=this.plotData.pointLabels[c];if(!S)continue;if(this.orientation==="horizontal")h.push({x:f+10,y:x,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"left",fontSize:12,rotation:0});else h.push({x,y:f-10,text:S,fill:this.plotData.strokeFill,verticalPos:"middle",horizontalPos:"center",fontSize:12,rotation:0})}if(h.length>0)s.push({groupTexts:["plot",`line-plot-${this.plotIndex}`,"labels"],type:"text",data:h})}return s}},Te=class{constructor(e,i,s,n,a,h){this.barData=e,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=a,this.plotIndex=h}static{t(this,"BarPlot")}getDrawableElement(){let e=this.barData.data.map((a)=>[this.xAxis.getScaleValue(a[0]),this.yAxis.getScaleValue(a[1])]),i=0.05,s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*0.95,n=s/2;if(this.orientation==="horizontal")return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:this.boundingRect.x,y:a[0]-n,height:s,width:a[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}];return[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:e.map((a)=>({x:a[0]-n,y:a[1],width:s,height:this.boundingRect.y+this.boundingRect.height-a[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},De=class{constructor(e,i,s){this.chartConfig=e,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}static{t(this,"BasePlot")}setAxes(e,i){this.xAxis=e,this.yAxis=i}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[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{let n=new _e(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break;case"bar":{let n=new Te(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);e.push(...n.getDrawableElement())}break}return e}};function Gt(e,i,s){return new De(e,i,s)}t(Gt,"getPlotComponent");var ve=class{constructor(e,i,s,n){this.chartConfig=e,this.chartData=i,this.componentStore={title:Ut(e,i,s,n),plot:Gt(e,i,s),legend:qt(e,i,s,n),xAxis:Tt(i.xAxis,e.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Tt(i.yAxis,e.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}static{t(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a={width:0,height:0},h=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),c=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),x=this.componentStore.plot.calculateSpace({width:h,height:c});if(e-=x.width,i-=x.height,x=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=x.height,i-=x.height,this.componentStore.xAxis.setAxisPosition("bottom"),x=this.componentStore.xAxis.calculateSpace({width:e,height:i}),i-=x.height,this.componentStore.yAxis.setAxisPosition("left"),x=this.componentStore.yAxis.calculateSpace({width:e,height:i}),s=x.width,e-=x.width,a=this.componentStore.legend.calculateSpace({width:e,height:c}),e-=a.width,e>0)h+=e,e=0;if(i>0)c+=i,i=0;if(this.componentStore.plot.calculateSpace({width:h,height:c}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.legend.setBoundingBoxXY({x:s+h,y:n+Math.max((c-a.height)/2,0)}),this.componentStore.xAxis.setRange([s,s+h]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+c}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some((f)=>mt(f)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,a=0,h={width:0,height:0},c=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),x=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:c,height:x});if(e-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:e,height:i}),e-=f.width,n=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:e,height:i}),i-=f.height,a=s+f.height,h=this.componentStore.legend.calculateSpace({width:e,height:x}),e-=h.width,e>0)c+=e,e=0;if(i>0)x+=i,i=0;if(this.componentStore.plot.calculateSpace({width:c,height:x}),this.componentStore.plot.setBoundingBoxXY({x:n,y:a}),this.componentStore.legend.setBoundingBoxXY({x:n+c,y:a+Math.max((x-h.height)/2,0)}),this.componentStore.yAxis.setRange([n,n+c]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([a,a+x]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:a}),this.chartData.plots.some((S)=>mt(S)))this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){if(this.chartConfig.chartOrientation==="horizontal")this.calculateHorizontalSpace();else this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let i of Object.values(this.componentStore))e.push(...i.getDrawableElements());return e}},Pe=class{static{t(this,"XYChartBuilder")}static build(e,i,s,n){return new ve(e,i,s,n).getDrawableElement()}},gt=0,jt,ut=It(),dt=Et(),b=Mt(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1;function Et(){let e=Jt(),i=E();return ue(e.xyChart,i.themeVariables.xyChart)}t(Et,"getChartDefaultThemeConfig");function It(){let e=E();return ue(Y.xyChart,e.xyChart)}t(It,"getChartDefaultConfig");function Mt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}t(Mt,"getChartDefaultData");function ot(e){let i=E();return te(e.trim(),i)}t(ot,"textSanitizer");function Qt(e){jt=e}t(Qt,"setTmpSVGG");function Kt(e){if(e==="horizontal")ut.chartOrientation="horizontal";else ut.chartOrientation="vertical"}t(Kt,"setOrientation");function Zt(e){b.xAxis.title=ot(e.text)}t(Zt,"setXAxisTitle");function Bt(e,i){b.xAxis={type:"linear",title:b.xAxis.title,min:e,max:i},yt=!0}t(Bt,"setXAxisRangeData");function ee(e){b.xAxis={type:"band",title:b.xAxis.title,categories:e.map((i)=>ot(i.text))},yt=!0}t(ee,"setXAxisBand");function ie(e){b.yAxis.title=ot(e.text)}t(ie,"setYAxisTitle");function se(e,i){b.yAxis={type:"linear",title:b.yAxis.title,min:e,max:i},Lt=!0}t(se,"setYAxisRangeData");function ae(e){let i=Math.min(...e),s=Math.max(...e),n=lt(b.yAxis)?b.yAxis.min:1/0,a=lt(b.yAxis)?b.yAxis.max:-1/0;b.yAxis={type:"linear",title:b.yAxis.title,min:Math.min(n,i),max:Math.max(a,s)}}t(ae,"setYAxisRangeFromPlotData");function zt(e){let i=[];if(e.length===0)return i;if(!yt){let s=lt(b.xAxis)?b.xAxis.min:1/0,n=lt(b.xAxis)?b.xAxis.max:-1/0;Bt(Math.min(s,1),Math.max(n,e.length))}if(bt(b.xAxis)&&e.length>b.xAxis.categories.length)e=e.slice(0,b.xAxis.categories.length);if(!Lt)ae(e);if(bt(b.xAxis))i=b.xAxis.categories.map((s,n)=>[s,e[n]]);if(lt(b.xAxis)){let s=b.xAxis.min,n=b.xAxis.max;if(e.length===1)i=[[`${s}`,e[0]]];else{let a=(n-s)/(e.length-1);i=e.map((h,c)=>[`${s+c*a}`,h])}}return i}t(zt,"transformDataWithoutCategory");function Ot(e){return vt[e===0?0:e%vt.length]}t(Ot,"getPlotColorFromPalette");function oe(e,i){let s=i.map((c)=>c.value),n=i.map((c)=>c.label?ot(c.label):""),a=zt(s),h=n.some((c)=>c!=="");b.plots.push({type:"line",title:ot(e.text),strokeFill:Ot(gt),strokeWidth:2,data:a,...h?{pointLabels:n}:{}}),gt++}t(oe,"setLineData");function re(e,i){let s=i.map((a)=>a.value),n=zt(s);b.plots.push({type:"bar",title:ot(e.text),fill:Ot(gt),data:n}),gt++}t(re,"setBarData");function he(){if(b.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return b.title=H(),Pe.build(ut,b,dt,jt)}t(he,"getDrawableElem");function le(){return dt}t(le,"getChartThemeConfig");function ce(){return ut}t(ce,"getChartConfig");function de(){return b}t(de,"getXYChartData");var Le=t(function(){F(),gt=0,ut=It(),b=Mt(),dt=Et(),vt=dt.plotColorPalette.split(",").map((e)=>e.trim()),yt=!1,Lt=!1},"clear"),Ee={getDrawableElem:he,clear:Le,setAccTitle:O,getAccTitle:G,setDiagramTitle:q,getDiagramTitle:H,getAccDescription:j,setAccDescription:z,setOrientation:Kt,setXAxisTitle:Zt,setXAxisRangeData:Bt,setXAxisBand:ee,setYAxisTitle:ie,setYAxisRangeData:se,setLineData:oe,setBarData:re,setTmpSVGG:Qt,getChartThemeConfig:le,getChartConfig:ce,getXYChartData:de},Ie=t((e,i,s,n)=>{let a=n.db,h=a.getChartThemeConfig(),c=a.getChartConfig(),x=a.getXYChartData().plots[0].data.map((w)=>w[1]);function f(w){return w==="top"?"text-before-edge":"middle"}t(f,"getDominantBaseLine");function S(w){return w==="left"?"start":w==="right"?"end":"middle"}t(S,"getTextAnchor");function T(w){return`translate(${w.x}, ${w.y}) rotate(${w.rotation||0})`}t(T,"getTextTransformation"),l.debug(`Rendering xychart chart
|
|
7
|
+
`+e);let R=ge(i),y=R.append("g").attr("class","main"),B=y.append("rect").attr("width",c.width).attr("height",c.height).attr("class","background");ne(R,c.height,c.width,!0),R.attr("viewBox",`0 0 ${c.width} ${c.height}`),B.attr("fill",h.backgroundColor),a.setTmpSVGG(R.append("g").attr("class","mermaid-tmp-group"));let P=a.getDrawableElem(),L={};function V(w){let X=y,u="";for(let[W]of w.entries()){let N=y;if(W>0&&L[u])N=L[u];if(u+=w[W],X=L[u],!X)X=L[u]=N.append("g").attr("class",w[W])}return X}t(V,"getGroup");for(let w of P){if(w.data.length===0)continue;let X=V(w.groupTexts);switch(w.type){case"rect":if(X.selectAll("rect").data(w.data).enter().append("rect").attr("x",(u)=>u.x).attr("y",(u)=>u.y).attr("width",(u)=>u.width).attr("height",(u)=>u.height).attr("fill",(u)=>u.fill).attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth),c.showDataLabel){let u=c.showDataLabelOutsideBar;if(c.chartOrientation==="horizontal"){let W=function(k,J){let{data:_,label:U}=k;return J*U.length*N<=_.width-A};var Z=W;t(W,"fitsHorizontally");let N=0.7,A=10,it=w.data.map((k,J)=>({data:k,label:x[J].toString()})).filter((k)=>k.data.width>0&&k.data.height>0),I=it.map((k)=>{let{data:J}=k,_=J.height*0.7;while(!W(k,_)&&_>0)_-=1;return _}),rt=Math.floor(Math.min(...I)),D=t((k)=>{if(u)return k.data.x+k.data.width+A;else return k.data.x+k.data.width-A},"determineLabelXPosition");X.selectAll("text").data(it).enter().append("text").attr("x",D).attr("y",(k)=>k.data.y+k.data.height/2).attr("text-anchor",u?"start":"end").attr("dominant-baseline","middle").attr("fill",h.dataLabelColor).attr("font-size",`${rt}px`).text((k)=>k.label)}else{let W=function(D,k,J){let{data:_,label:U}=D,r=0.7,g=k*U.length*0.7,d=_.x+_.width/2,p=d-g/2,C=d+g/2,o=p>=_.x&&C<=_.x+_.width,st=_.y+J+k<=_.y+_.height;return o&&st};var tt=W;t(W,"fitsInBar");let N=10,A=w.data.map((D,k)=>({data:D,label:x[k].toString()})).filter((D)=>D.data.width>0&&D.data.height>0),it=A.map((D)=>{let{data:k,label:J}=D,_=k.width/(J.length*0.7);while(!W(D,_,N)&&_>0)_-=1;return _}),I=Math.floor(Math.min(...it)),rt=t((D)=>{if(u)return D.data.y-N;else return D.data.y+N},"determineLabelYPosition");X.selectAll("text").data(A).enter().append("text").attr("x",(D)=>D.data.x+D.data.width/2).attr("y",rt).attr("text-anchor","middle").attr("dominant-baseline",u?"auto":"hanging").attr("fill",h.dataLabelColor).attr("font-size",`${I}px`).text((D)=>D.label)}}break;case"text":X.selectAll("text").data(w.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",(u)=>u.fill).attr("font-size",(u)=>u.fontSize).attr("dominant-baseline",(u)=>f(u.verticalPos)).attr("text-anchor",(u)=>S(u.horizontalPos)).attr("transform",(u)=>T(u)).text((u)=>u.text);break;case"path":X.selectAll("path").data(w.data).enter().append("path").attr("d",(u)=>u.path).attr("fill",(u)=>u.fill?u.fill:"none").attr("stroke",(u)=>u.strokeFill).attr("stroke-width",(u)=>u.strokeWidth);break}}},"draw"),Me={draw:Ie},Ke={parser:be,db:Ee,renderer:Me};export{Ke as diagram};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kabmo-labs/kabmo",
|
|
3
|
-
"version": "0.58.
|
|
3
|
+
"version": "0.58.1",
|
|
4
4
|
"description": "Web console and diagnostic workbench for AI coding agents: Elysia + Preact on Bun.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Wijanarko Putra Rajeb <wijanarko.rajeb@gmail.com>",
|
|
@@ -104,17 +104,17 @@
|
|
|
104
104
|
"tailwindcss": "^4.1.14",
|
|
105
105
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
|
|
106
106
|
"yaml": "^2.9.1",
|
|
107
|
-
"@kabmo-labs/kabmo-acp": "1.2.
|
|
107
|
+
"@kabmo-labs/kabmo-acp": "1.2.1",
|
|
108
108
|
"@kabmo-labs/kabmo-app-contracts": "1.1.0",
|
|
109
109
|
"@kabmo-labs/kabmo-auth": "1.0.0",
|
|
110
110
|
"@kabmo-labs/kabmo-bytes": "1.0.0",
|
|
111
|
-
"@kabmo-labs/kabmo-chat": "1.3.
|
|
111
|
+
"@kabmo-labs/kabmo-chat": "1.3.1",
|
|
112
112
|
"@kabmo-labs/kabmo-db": "1.0.0",
|
|
113
113
|
"@kabmo-labs/kabmo-format": "1.0.0",
|
|
114
114
|
"@kabmo-labs/kabmo-fs": "1.0.0",
|
|
115
115
|
"@kabmo-labs/kabmo-git": "1.0.0",
|
|
116
116
|
"@kabmo-labs/kabmo-guards": "1.0.0",
|
|
117
|
-
"@kabmo-labs/kabmo-harness": "1.1.
|
|
117
|
+
"@kabmo-labs/kabmo-harness": "1.1.1",
|
|
118
118
|
"@kabmo-labs/kabmo-http": "1.0.0",
|
|
119
119
|
"@kabmo-labs/kabmo-idle-reaper": "1.0.0",
|
|
120
120
|
"@kabmo-labs/kabmo-live-sessions": "1.0.0",
|
|
@@ -49,11 +49,16 @@ export interface AnchoredMenuProps {
|
|
|
49
49
|
align?: MenuAlign;
|
|
50
50
|
/**
|
|
51
51
|
* `dialog` for the server sheet — a panel with headings and an Add form.
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
52
|
+
* `listbox` for a chip that opens its option list (the access, thinking and
|
|
53
|
+
* session-mode controls). `menu` for a panel whose rows already claim
|
|
54
|
+
* `menuitem`/`menuitemradio` (the workspace and worktree menus). Omitted for
|
|
55
|
+
* the folder menus: their rows are plain buttons (as they were before the
|
|
56
|
+
* portal), and claiming `menu` would promise arrow-key roving that no one
|
|
57
|
+
* implements.
|
|
55
58
|
*/
|
|
56
|
-
role?: 'dialog';
|
|
59
|
+
role?: 'dialog' | 'listbox' | 'menu';
|
|
60
|
+
/** The panel's DOM id, so a trigger's `aria-controls` keeps pointing at it. */
|
|
61
|
+
id?: string;
|
|
57
62
|
/** Names the panel; every caller labels it by the trigger it opened from. */
|
|
58
63
|
ariaLabel?: string;
|
|
59
64
|
/** The panel's own chrome: width, padding, border, typography. */
|
|
@@ -67,6 +72,7 @@ export function AnchoredMenu({
|
|
|
67
72
|
anchor,
|
|
68
73
|
align = 'end',
|
|
69
74
|
role,
|
|
75
|
+
id,
|
|
70
76
|
ariaLabel,
|
|
71
77
|
className,
|
|
72
78
|
onClose,
|
|
@@ -141,6 +147,7 @@ export function AnchoredMenu({
|
|
|
141
147
|
>
|
|
142
148
|
<div
|
|
143
149
|
ref={panelRef}
|
|
150
|
+
id={id}
|
|
144
151
|
role={role}
|
|
145
152
|
aria-label={ariaLabel}
|
|
146
153
|
// `glass-popover` belongs to the PRIMITIVE, not to each caller: every
|
|
@@ -88,9 +88,13 @@ export function TrailingSlot({
|
|
|
88
88
|
);
|
|
89
89
|
|
|
90
90
|
if (touch) {
|
|
91
|
+
// `ml-0.5`: the 2px cluster gap the folder header states between its
|
|
92
|
+
// chevron, `+` and `⋯`. `min-w-7` is the `+` button's box, and `text-right`
|
|
93
|
+
// keeps even a two-character age's right edge on that box's right edge, so
|
|
94
|
+
// the chevron before it stays on the header's chevron column.
|
|
91
95
|
return (
|
|
92
|
-
<span className="ml-
|
|
93
|
-
{timeNode('font-mono text-[10px]')}
|
|
96
|
+
<span className="ml-0.5 flex shrink-0 items-center gap-0.5">
|
|
97
|
+
{timeNode('min-w-7 whitespace-nowrap text-right font-mono text-[10px]')}
|
|
94
98
|
{trigger}
|
|
95
99
|
</span>
|
|
96
100
|
);
|
|
@@ -175,12 +175,18 @@ export function SessionRow({
|
|
|
175
175
|
const menuOpen = menu.anchor !== null;
|
|
176
176
|
const waiting = Boolean(waitingFor);
|
|
177
177
|
const displayTitle = title.charAt(0).toUpperCase() + title.slice(1);
|
|
178
|
-
//
|
|
179
|
-
//
|
|
180
|
-
|
|
178
|
+
// The leading 16px slot is shared: on touch the branch disclosure lives there
|
|
179
|
+
// while the slot is free (the same position desktop uses), and moves to the
|
|
180
|
+
// trailing rail only while the slot reports a run or an in-flight rename —
|
|
181
|
+
// the one time a leading chevron would sit under the spinner it shares the
|
|
182
|
+
// slot with. Touch has no hover, so the leading chevron is PINNED rather
|
|
183
|
+
// than revealed; `StatusSlot` owns that pin (`chevronPinned`).
|
|
184
|
+
const liveRun = awaitingInput || status === 'stream' || waiting;
|
|
185
|
+
const leadingBranchControl = expandable && Boolean(onToggleExpand) && (!touch || (!liveRun && !renaming));
|
|
181
186
|
// In batch mode the row is a choice, so the disclosure is withdrawn the same
|
|
182
187
|
// way the leading slot's is (`StatusSlot` swaps it for the checkbox).
|
|
183
|
-
const trailingBranchControl =
|
|
188
|
+
const trailingBranchControl =
|
|
189
|
+
touch && !selectable && expandable && Boolean(onToggleExpand) && (liveRun || renaming);
|
|
184
190
|
|
|
185
191
|
if (isEditing) {
|
|
186
192
|
return (
|
|
@@ -264,19 +270,20 @@ export function SessionRow({
|
|
|
264
270
|
{worktree && <WorktreeBadge worktree={worktree} />}
|
|
265
271
|
</span>
|
|
266
272
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
{/* The touch rail states the folder header's three columns in the same
|
|
274
|
+
order — `chevron · +/age · ⋯` — whenever the disclosure has to be
|
|
275
|
+
here. A row without a trailing chevron (a leaf, or an idle branch
|
|
276
|
+
row whose chevron is in the leading slot) still reserves the column:
|
|
277
|
+
without it the age and `⋯` slide 28px right and stop lining up with
|
|
278
|
+
the folder's `+` and `⋯`. */}
|
|
279
|
+
{touch && !selectable && hasActions && !trailingBranchControl && (
|
|
280
|
+
<span aria-hidden="true" className="h-7 w-7 shrink-0" />
|
|
281
|
+
)}
|
|
275
282
|
|
|
276
|
-
{/* The touch row's branch disclosure,
|
|
277
|
-
the folder header's
|
|
278
|
-
|
|
279
|
-
|
|
283
|
+
{/* The touch row's branch disclosure, BEFORE the age and actions so it
|
|
284
|
+
shares the folder header's leftmost rail column. Only a row whose
|
|
285
|
+
leading slot is busy draws it here — an idle row keeps the chevron
|
|
286
|
+
in that slot, sharing it with the run cue as `StatusSlot` pins it. */}
|
|
280
287
|
{trailingBranchControl && (
|
|
281
288
|
<button
|
|
282
289
|
type="button"
|
|
@@ -292,6 +299,15 @@ export function SessionRow({
|
|
|
292
299
|
{isExpanded ? <ChevronDown size={14} /> : <ChevronRight size={14} />}
|
|
293
300
|
</button>
|
|
294
301
|
)}
|
|
302
|
+
|
|
303
|
+
<TrailingSlot
|
|
304
|
+
timeAgo={timeAgo}
|
|
305
|
+
timeTitle={timeTitle}
|
|
306
|
+
runStartedAt={runStartedAt}
|
|
307
|
+
touch={touch}
|
|
308
|
+
menuOpen={menuOpen}
|
|
309
|
+
onOpenMenu={hasActions && !selectable ? menu.openBelow : undefined}
|
|
310
|
+
/>
|
|
295
311
|
</div>
|
|
296
312
|
|
|
297
313
|
{menu.anchor && (
|
|
@@ -119,33 +119,71 @@ describe('modern session row', () => {
|
|
|
119
119
|
});
|
|
120
120
|
|
|
121
121
|
/**
|
|
122
|
-
* The phone's branch disclosure
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
122
|
+
* The phone's branch disclosure shares the LEADING 16px slot with the status
|
|
123
|
+
* cue: it is pinned there whenever that slot has nothing to report, and a
|
|
124
|
+
* spinner/question/hourglass takes the slot only while it must. This is what
|
|
125
|
+
* stops an idle row reserving a trailing column for a control the folder
|
|
126
|
+
* header already draws at the left of its actions.
|
|
126
127
|
*/
|
|
127
|
-
test('
|
|
128
|
+
test('an idle touch row pins the branch chevron in the leading status slot', async () => {
|
|
128
129
|
const el = await mount({ density: 'touch', expandable: true, onRename: () => {}, timeAgo: '5m', onToggleExpand: () => {} });
|
|
129
|
-
const row = el.querySelector('[data-testid="session-item"]');
|
|
130
|
-
const toggle = el.querySelector('[aria-label="Expand sessions and subagents"]');
|
|
130
|
+
const row = el.querySelector('[data-testid="session-item"]') as HTMLElement;
|
|
131
|
+
const toggle = el.querySelector('[aria-label="Expand sessions and subagents"]') as HTMLElement;
|
|
131
132
|
expect(toggle).not.toBeNull();
|
|
132
|
-
// ONE disclosure: the
|
|
133
|
+
// ONE disclosure: the trailing rail does not draw a duplicate.
|
|
133
134
|
expect(el.querySelectorAll('[aria-label*="sessions and subagents"]')).toHaveLength(1);
|
|
134
|
-
expect(toggle
|
|
135
|
-
//
|
|
136
|
-
// folder
|
|
137
|
-
expect(row?.
|
|
138
|
-
|
|
139
|
-
expect(
|
|
135
|
+
expect(toggle.getAttribute('aria-expanded')).toBe('false');
|
|
136
|
+
// The leading slot is the row's first element; the trailing slot keeps its
|
|
137
|
+
// reserved column so the age still lines up with the folder's `+`.
|
|
138
|
+
expect(row.firstElementChild?.contains(toggle)).toBe(true);
|
|
139
|
+
const trailing = row.lastElementChild as HTMLElement;
|
|
140
|
+
expect(trailing.querySelector('[aria-label="Session actions"]')).not.toBeNull();
|
|
141
|
+
expect((trailing.previousElementSibling as HTMLElement).getAttribute('aria-hidden')).toBe('true');
|
|
140
142
|
});
|
|
141
143
|
|
|
142
|
-
test('a touch row
|
|
143
|
-
const el = await mount({ density: 'touch', status: 'stream', expandable: true, onToggleExpand: () => {} });
|
|
144
|
+
test('a running touch row moves the branch chevron to the trailing rail', async () => {
|
|
145
|
+
const el = await mount({ density: 'touch', status: 'stream', expandable: true, onRename: () => {}, timeAgo: '5m', onToggleExpand: () => {} });
|
|
146
|
+
const row = el.querySelector('[data-testid="session-item"]') as HTMLElement;
|
|
147
|
+
const toggle = el.querySelector('[aria-label="Expand sessions and subagents"]') as HTMLElement;
|
|
144
148
|
// The spinner still reports the run, and the chevron is still on screen.
|
|
145
149
|
expect(el.querySelector('[role="status"]')?.getAttribute('aria-label')).toBe('Running');
|
|
146
|
-
const toggle = el.querySelector('[aria-label="Expand sessions and subagents"]');
|
|
147
150
|
expect(toggle).not.toBeNull();
|
|
148
|
-
expect(toggle
|
|
151
|
+
expect(toggle.className).not.toContain('opacity-0');
|
|
152
|
+
// Not in the leading slot: the spinner owns it, so the disclosure sits
|
|
153
|
+
// immediately before the age and actions in the header's rail.
|
|
154
|
+
expect(row.firstElementChild?.contains(toggle)).toBe(false);
|
|
155
|
+
const trailing = toggle.nextElementSibling as HTMLElement;
|
|
156
|
+
expect(trailing.querySelector('[aria-label="Session actions"]')).not.toBeNull();
|
|
157
|
+
expect(trailing.textContent).toContain('5m');
|
|
158
|
+
});
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* The trailing rail is one fact shared with `WorkspaceHeader` on touch: a
|
|
162
|
+
* 28px control, 2px apart, in the order chevron · +/age · ⋯. If either file
|
|
163
|
+
* states its own gap, the three columns drift.
|
|
164
|
+
*/
|
|
165
|
+
test('a running touch row puts its chevron in the header\'s leftmost rail column', async () => {
|
|
166
|
+
const el = await mount({ density: 'touch', status: 'stream', expandable: true, onRename: () => {}, timeAgo: '5m', onToggleExpand: () => {} });
|
|
167
|
+
const toggle = el.querySelector('[aria-label="Expand sessions and subagents"]') as HTMLElement;
|
|
168
|
+
expect(toggle.className).toContain('h-7');
|
|
169
|
+
expect(toggle.className).toContain('w-7');
|
|
170
|
+
const trailing = toggle.nextElementSibling as HTMLElement;
|
|
171
|
+
// The 2px gap lives on the age slot, and its minimum width is the `+` box.
|
|
172
|
+
expect(trailing.className).toContain('ml-0.5');
|
|
173
|
+
const age = trailing.querySelector('span.font-mono') as HTMLElement;
|
|
174
|
+
expect(age.className).toContain('min-w-7');
|
|
175
|
+
expect(age.className).toContain('text-right');
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
test('a leaf touch row reserves the chevron column for its age and actions', async () => {
|
|
179
|
+
const el = await mount({ density: 'touch', onRename: () => {}, timeAgo: '5m' });
|
|
180
|
+
const row = el.querySelector('[data-testid="session-item"]') as HTMLElement;
|
|
181
|
+
const trailing = row.lastElementChild as HTMLElement;
|
|
182
|
+
const spacer = trailing.previousElementSibling as HTMLElement;
|
|
183
|
+
expect(spacer.getAttribute('aria-hidden')).toBe('true');
|
|
184
|
+
expect(spacer.className).toContain('w-7');
|
|
185
|
+
// The 2px gap belongs to the age slot, not the reserved column.
|
|
186
|
+
expect(spacer.className).not.toContain('ml-0.5');
|
|
149
187
|
});
|
|
150
188
|
|
|
151
189
|
test('a touch row toggles the branch without selecting the session', async () => {
|
|
@@ -159,9 +159,15 @@ export function WorkspaceHeader({
|
|
|
159
159
|
|
|
160
160
|
<span className="glass-sticky-label shrink-0 font-mono text-[10px] font-normal tabular-nums text-ink/35">{sessionCount}</span>
|
|
161
161
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
162
|
+
{/* The desktop keeps the disclosure at the end of the toggle BUTTON.
|
|
163
|
+
Touch draws it as the FIRST control of the action cluster below, so
|
|
164
|
+
the folder's right rail is `chevron · + · ⋯` — and a touch session
|
|
165
|
+
row states the same three columns as `chevron · age · ⋯`. */}
|
|
166
|
+
{!touch && (
|
|
167
|
+
<span className="ml-auto shrink-0 text-ink/40">
|
|
168
|
+
{isOpen ? <ChevronDown size={12} /> : <ChevronRight size={12} />}
|
|
169
|
+
</span>
|
|
170
|
+
)}
|
|
165
171
|
</button>
|
|
166
172
|
|
|
167
173
|
{/* `pr-[3px]` on the desktop and `pr-1` on touch: the action cluster ends
|
|
@@ -173,6 +179,21 @@ export function WorkspaceHeader({
|
|
|
173
179
|
is what makes that half difference the whole story. */}
|
|
174
180
|
{!batchActive && (
|
|
175
181
|
<div className={`flex shrink-0 items-center gap-0.5 ${touch ? 'pr-1' : 'pr-[3px]'}`}>
|
|
182
|
+
{/* Touch's disclosure, first in the cluster: 28px box, 2px cluster
|
|
183
|
+
gap, the same box the row's branch chevron uses before its age. */}
|
|
184
|
+
{touch && (
|
|
185
|
+
<button
|
|
186
|
+
type="button"
|
|
187
|
+
title={isOpen ? 'Collapse workspace' : 'Expand workspace'}
|
|
188
|
+
aria-label={`${isOpen ? 'Collapse' : 'Expand'} ${folder.name}`}
|
|
189
|
+
aria-expanded={isOpen}
|
|
190
|
+
onClick={onToggleFolder}
|
|
191
|
+
className="flex h-7 w-7 items-center justify-center rounded text-ink/40 transition-colors cursor-pointer hover:bg-ink/10 hover:text-ink"
|
|
192
|
+
>
|
|
193
|
+
{isOpen ? <ChevronDown size={14} /> : <ChevronRight size={14} />}
|
|
194
|
+
</button>
|
|
195
|
+
)}
|
|
196
|
+
|
|
176
197
|
<button
|
|
177
198
|
type="button"
|
|
178
199
|
title="New Session"
|
|
@@ -108,4 +108,24 @@ describe('modern workspace header', () => {
|
|
|
108
108
|
expect(mount({ touch: true }).className).toContain('h-8');
|
|
109
109
|
expect(mount().className).toContain('h-[26px]');
|
|
110
110
|
});
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* The touch row draws its branch chevron BEFORE its age, so the folder
|
|
114
|
+
* header must state the same three columns — chevron, `+`, `⋯` — or the
|
|
115
|
+
* folder's disclosure sits a different column from every row beneath it.
|
|
116
|
+
*/
|
|
117
|
+
test('the phone header starts its action cluster with the disclosure', () => {
|
|
118
|
+
const header = mount({ touch: true });
|
|
119
|
+
const cluster = header.lastElementChild as HTMLElement;
|
|
120
|
+
const first = cluster.firstElementChild as HTMLElement;
|
|
121
|
+
expect(first.getAttribute('aria-label')).toBe(`Collapse ${FOLDER.name}`);
|
|
122
|
+
expect(first.getAttribute('aria-expanded')).toBe('true');
|
|
123
|
+
// The row chevron's own 28px box, separated by the cluster's 2px gap.
|
|
124
|
+
expect(first.className).toContain('h-7');
|
|
125
|
+
expect(first.className).toContain('w-7');
|
|
126
|
+
});
|
|
127
|
+
|
|
128
|
+
test('the desktop header keeps its disclosure inside the folder toggle', () => {
|
|
129
|
+
expect(mount().querySelector(`[aria-label="Collapse ${FOLDER.name}"]`)).toBeNull();
|
|
130
|
+
});
|
|
111
131
|
});
|
|
@@ -42,6 +42,9 @@ interface NewChatModalProps {
|
|
|
42
42
|
accessMode: ApprovalMode;
|
|
43
43
|
onAccessModeChange: (mode: ApprovalMode) => void;
|
|
44
44
|
composerModelRef: { current: { provider: string; modelId: string; thinkingLevel: string } | null };
|
|
45
|
+
/** The harness the new chat will spawn on, so the composer's Access Control
|
|
46
|
+
* follows the same capability gate as every other composer. */
|
|
47
|
+
harness?: string;
|
|
45
48
|
}
|
|
46
49
|
|
|
47
50
|
export function NewChatModal({
|
|
@@ -53,6 +56,7 @@ export function NewChatModal({
|
|
|
53
56
|
accessMode,
|
|
54
57
|
onAccessModeChange,
|
|
55
58
|
composerModelRef,
|
|
59
|
+
harness,
|
|
56
60
|
}: NewChatModalProps) {
|
|
57
61
|
// The seed is a quotation, and the user's own instruction goes under it — the
|
|
58
62
|
// divider is what keeps the two apart (see `new-chat-seed.ts`).
|
|
@@ -115,6 +119,7 @@ export function NewChatModal({
|
|
|
115
119
|
accessMode={accessMode}
|
|
116
120
|
onAccessModeChange={onAccessModeChange}
|
|
117
121
|
composerModelRef={composerModelRef}
|
|
122
|
+
{...(harness ? { harness } : {})}
|
|
118
123
|
autoGrow={{ minHeightPx: MODAL_COMPOSER_MIN_HEIGHT_PX, maxHeightPx: maximized ? MODAL_COMPOSER_MAX_EXPANDED_PX : MODAL_COMPOSER_MAX_HEIGHT_PX }}
|
|
119
124
|
/>
|
|
120
125
|
</div>
|