@kabmo-labs/kabmo 0.32.0 → 0.32.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 +308 -308
- package/dist/client/static/js/{CsvGrid-amafmq3z.js → CsvGrid-4gx0jevc.js} +2 -2
- package/dist/client/static/js/{DocxView-851ps9t0.js → DocxView-0667nr8h.js} +5 -5
- package/dist/client/static/js/{DrawioView-kw1vy3r2.js → DrawioView-522v0d0r.js} +2 -2
- package/dist/client/static/js/ImageView-t8xp60hm.js +1 -0
- package/dist/client/static/js/LayoutWrapper-xjnveecv.js +2 -0
- package/dist/client/static/js/{Modal-f8x3j3be.js → Modal-k2jr9hc4.js} +14 -14
- package/dist/client/static/js/{PdfView-f5jkm0rs.js → PdfView-3fx172xh.js} +1 -1
- package/dist/client/static/js/SessionsView-n3agmf5t.js +1 -0
- package/dist/client/static/js/{SheetView-23zxy30b.js → SheetView-nmrdb1b8.js} +23 -23
- package/dist/client/static/js/{SvgPreview-c341y50e.js → SvgPreview-0xsc6xam.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-2dc3mpk6.js → abnfDiagram-O67JEVCF-jj31rs62.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-1y9zvsyt.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-7jmrr5ja.js → architectureDiagram-NJMV4G6O-ay3yr7pf.js} +3 -3
- package/dist/client/static/js/{astro-sjtf954j.js → astro-qgx1r159.js} +1 -1
- package/dist/client/static/js/bash-m0qjsyy0.js +1 -0
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-jrk2m0ea.js → blockDiagram-BEXU5L5S-4x33e16k.js} +3 -3
- package/dist/client/static/js/c-wkgxb1t1.js +1 -0
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-48cyncjd.js → c4Diagram-YGBWAQC7-dtb81cgz.js} +2 -2
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-gm7jt1cd.js → classDiagram-v2-NBCMYWYE-vk5a2n9w.js} +3 -3
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-g0g3z0xp.js → cose-bilkent-JH36ORCC-6rbjbe19.js} +1 -1
- package/dist/client/static/js/cpp-y0t6mynx.js +1 -0
- package/dist/client/static/js/css-t4ngafan.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-k2188qcq.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-6vjde6am.js → cynefinDiagram-VND7K2PF-vyjksedr.js} +2 -2
- package/dist/client/static/js/{dagre-6A5THRUB-q6k8bx1j.js → dagre-6A5THRUB-7hey38z5.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-87cmze2n.js → diagram-22UHCM2B-aes06jde.js} +11 -11
- package/dist/client/static/js/{diagram-3UASUU5V-1ejbr2p4.js → diagram-3UASUU5V-3cfkgm3x.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-vaw1r6k2.js → diagram-ATOU4E4O-z8mfhwpy.js} +3 -3
- package/dist/client/static/js/{diagram-CDSNMT55-gxm9zv7d.js → diagram-CDSNMT55-t4821ctz.js} +2 -2
- package/dist/client/static/js/{diagram-MLGK6HIB-x010xswm.js → diagram-MLGK6HIB-23yxbfrx.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-qtcq7e6c.js → diagram-MPIPVDR6-chhtf7v0.js} +2 -2
- package/dist/client/static/js/{dockerfile-k5xbramm.js → dockerfile-5b87ghm7.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-nwwbasfh.js → ebnfDiagram-ZINNZB2B-9jejcvfr.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-xcp7thax.js → elk-276RUBZZ-xhhtkf58.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-xj1tp716.js → erDiagram-OPXOYQCR-mt2apjjb.js} +5 -5
- package/dist/client/static/js/{erlang-rz1g9mxy.js → erlang-6m6tpt72.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-pdr0qn0n.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-zvz0mxne.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-f7q96bea.js → ganttDiagram-FUAMR5RP-8cm7a29w.js} +3 -3
- package/dist/client/static/js/gitGraph-4MIJSDKK-wmqf046s.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-1rydkyq9.js → gitGraphDiagram-X574FWY7-5s0gbnx2.js} +2 -2
- package/dist/client/static/js/graphql-692h0n2x.js +1 -0
- package/dist/client/static/js/{index-52bgxh6f.js → index-2gfc25tq.js} +1 -1
- package/dist/client/static/js/{index-x64kqgen.js → index-2xj14800.js} +2 -2
- package/dist/client/static/js/{index-8m3q2zpb.js → index-360d7j0d.js} +1 -1
- package/dist/client/static/js/{index-123e8tqq.js → index-3vhznzgr.js} +1 -1
- package/dist/client/static/js/{index-y139vc12.js → index-4s8ttfxj.js} +175 -175
- package/dist/client/static/js/{index-9nbxb421.js → index-532btjmp.js} +2 -2
- package/dist/client/static/js/{index-c8jzx6b0.js → index-59jb53v3.js} +1 -1
- package/dist/client/static/js/{index-2t2tnc3x.js → index-5x95n3hx.js} +1 -1
- package/dist/client/static/js/{index-f63y3mjj.js → index-5y7c62sm.js} +4 -4
- package/dist/client/static/js/index-61tm0v57.js +1 -0
- package/dist/client/static/js/{index-fc2j6bq2.js → index-629kfbcb.js} +2 -2
- package/dist/client/static/js/{index-0n9c85ke.js → index-6q80csr0.js} +2 -2
- package/dist/client/static/js/{index-6sdctwv2.js → index-7fdp9c7m.js} +2 -2
- package/dist/client/static/js/index-7n68yx6m.js +2 -0
- package/dist/client/static/js/{index-pe9j88d4.js → index-9sd0vjmh.js} +2 -2
- package/dist/client/static/js/{index-m6wwc5h6.js → index-9t82sx0w.js} +2 -2
- package/dist/client/static/js/{index-xa7nrnda.js → index-a0bdavdr.js} +2 -2
- package/dist/client/static/js/{index-xpf2ra60.js → index-a6k2hqke.js} +1 -1
- package/dist/client/static/js/{index-e26rd868.js → index-a733k69t.js} +2 -2
- package/dist/client/static/js/{index-31jrebvn.js → index-ay34b398.js} +6 -6
- package/dist/client/static/js/{index-w4re5r8w.js → index-bbggh3f8.js} +2 -2
- package/dist/client/static/js/{index-73xfkyea.js → index-brj8qwa6.js} +2 -2
- package/dist/client/static/js/{index-fmxn1rzs.js → index-c0x6s6f7.js} +2 -2
- package/dist/client/static/js/{index-vmvcse63.js → index-c93sp4yh.js} +1 -1
- package/dist/client/static/js/{index-e7a3fkvv.js → index-dnp07j57.js} +1 -1
- package/dist/client/static/js/{index-pkyrkkbt.js → index-dq1kdt03.js} +2 -2
- package/dist/client/static/js/{index-ggaqh9rt.js → index-dt7e1328.js} +2 -2
- package/dist/client/static/js/{index-hkq0y3pn.js → index-ehcpzk5b.js} +2 -2
- package/dist/client/static/js/{index-tr8754r0.js → index-ejgd8w3s.js} +45 -45
- package/dist/client/static/js/{index-0a1ekhqf.js → index-fdbfzshx.js} +2 -2
- package/dist/client/static/js/{index-c20a46ww.js → index-g33knza2.js} +2 -2
- package/dist/client/static/js/{index-hhm62nfj.js → index-gbfg0anm.js} +2 -2
- package/dist/client/static/js/{index-2n5wy1sh.js → index-h06bcfds.js} +1 -1
- package/dist/client/static/js/{index-22jaxtz1.js → index-h7pn9qw6.js} +2 -2
- package/dist/client/static/js/{index-qmh0h87h.js → index-hc2jmzpx.js} +48 -48
- package/dist/client/static/js/{index-nsrnyqcm.js → index-jppt5mgc.js} +2 -2
- package/dist/client/static/js/{index-deex10rz.js → index-jz9fpznk.js} +5 -5
- package/dist/client/static/js/{index-r416e9dt.js → index-kg86e3sy.js} +11 -11
- package/dist/client/static/js/{index-e6rar25v.js → index-kpspnztv.js} +2 -2
- package/dist/client/static/js/index-nmmxb4va.js +2 -0
- package/dist/client/static/js/{index-zca66d5d.js → index-p7btwjvj.js} +3 -3
- package/dist/client/static/js/{index-gvwqjpcr.js → index-pf5sbesf.js} +2 -2
- package/dist/client/static/js/{index-ynqnbvn2.js → index-pf7syd7t.js} +3 -3
- package/dist/client/static/js/{index-3anc30zh.js → index-qkscve6n.js} +2 -2
- package/dist/client/static/js/index-qnwqaczk.js +4 -0
- package/dist/client/static/js/{index-5zd1jx9r.js → index-rg8jpbsw.js} +2 -2
- package/dist/client/static/js/{index-hyry1n8x.js → index-sa9cp6km.js} +2 -2
- package/dist/client/static/js/{index-f519m6s3.js → index-vd0e25p0.js} +1 -1
- package/dist/client/static/js/{index-cwaz6geq.js → index-vtbbfwx0.js} +2 -2
- package/dist/client/static/js/{index-14wppnkx.js → index-wzma5n54.js} +2 -2
- package/dist/client/static/js/{index-s9vp6p70.js → index-x07kp3jz.js} +2 -2
- package/dist/client/static/js/{index-8a3tmm1h.js → index-xj9649ac.js} +7 -7
- package/dist/client/static/js/{index-vrbcj11n.js → index-xya34x4v.js} +2 -2
- package/dist/client/static/js/{index-yvcpdk5f.js → index-ye3sr7db.js} +2 -2
- package/dist/client/static/js/{index-w5131mtt.js → index-z4v1xmh1.js} +2 -2
- package/dist/client/static/js/{index-0g25yrc0.js → index-z5s27s26.js} +1 -1
- package/dist/client/static/js/info-A6RAGUB7-zg3twte6.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-ptg07tp2.js → infoDiagram-VRGFBTTK-3w1yz32c.js} +1 -1
- package/dist/client/static/js/ini-cg0a5wm3.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-bdk2dkf5.js → ishikawaDiagram-OU5B5YK6-ckt471dy.js} +1 -1
- package/dist/client/static/js/java-vcck089n.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-kez0ha4c.js → journeyDiagram-ZHPQQLJL-kfvn4w7e.js} +2 -2
- package/dist/client/static/js/json-j5q8nt57.js +1 -0
- package/dist/client/static/js/jsx-ht9zyzwa.js +1 -0
- package/dist/client/static/js/{julia-nmr85k8z.js → julia-0j0gsjvc.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-dhzp3qg5.js → kanban-definition-PNTS6WVX-0q36cm83.js} +3 -3
- package/dist/client/static/js/lua-ke895s2q.js +1 -0
- package/dist/client/static/js/markdown-gwmsh53r.js +1 -0
- package/dist/client/static/js/{mermaid.core-h7wttbss.js → mermaid.core-b1ssa824.js} +7 -7
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-tq5dd1em.js → mindmap-definition-NLK3R4M7-e2ym5en8.js} +4 -4
- package/dist/client/static/js/one-dark-pro-4geyzhjj.js +1 -0
- package/dist/client/static/js/one-light-tqssjm9t.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-3pav51g0.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-e5hrdfzv.js → pegDiagram-GJSIUBJH-t8bbdyhe.js} +1 -1
- package/dist/client/static/js/{perl-prxcva8r.js → perl-7n7e9ncg.js} +1 -1
- package/dist/client/static/js/{php-m9kcctzs.js → php-32vy69vd.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-wqfh7zdk.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-axvbvnz8.js → pieDiagram-5QR66LMP-envv4brj.js} +2 -2
- package/dist/client/static/js/properties-mzvvbqg5.js +1 -0
- package/dist/client/static/js/python-3w64wsyd.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-wtn28cfm.js → quadrantDiagram-O4NWA36T-72rk137a.js} +3 -3
- package/dist/client/static/js/r-32re2zwb.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-w7qjdr2g.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-rhr99kkj.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-c4jeea3m.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-x2ee66ex.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-yw8wjfwg.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-avjkq945.js → railroadDiagram-XR7U4H2S-1ej0f5hr.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-bntx7r6q.js → requirementDiagram-PLB6GJNP-rvdaknpd.js} +3 -3
- package/dist/client/static/js/{ruby-t06c0e7g.js → ruby-5ty7fys7.js} +1 -1
- package/dist/client/static/js/{rust-6gqjxyf0.js → rust-2geezrcs.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-ps8nkdm2.js → sankeyDiagram-IPEJSGJF-nxvhtdaw.js} +3 -3
- package/dist/client/static/js/{sass-gsbyn3wh.js → sass-mey5150f.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-3ckf1q6z.js → sequenceDiagram-PO4LG4MO-n5cn5qrt.js} +6 -6
- package/dist/client/static/js/{sizeCapture-INFHLROL-akvcr1x7.js → sizeCapture-INFHLROL-r074kj7s.js} +1 -1
- package/dist/client/static/js/sql-g8wcshpc.js +1 -0
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-c82914fz.js → stateDiagram-v2-GCMORJYK-vxghxdb0.js} +3 -3
- package/dist/client/static/js/{svelte-j54gfrvq.js → svelte-3ewx0hzx.js} +1 -1
- package/dist/client/static/js/{swimlanes-2SLR337P-scgdefh4.js → swimlanes-2SLR337P-qkkv894p.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-y81h9n27.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-z2ha1rhq.js → timeline-definition-EJHVYXUP-5tbq4ex2.js} +2 -2
- package/dist/client/static/js/treeView-Q6P3EWNA-ekz05ccs.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-aq6qymjr.js +1 -0
- package/dist/client/static/js/tsx-0p183w2f.js +1 -0
- package/dist/client/static/js/typescript-t9a5jyvv.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-3wdmrfmk.js → usecaseDiagram-POWQR4AR-6p8hf0b7.js} +15 -15
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-7m5tatzv.js → vennDiagram-UO4OBE2U-7k5jsxf9.js} +1 -1
- package/dist/client/static/js/{vue-y8bb5f3h.js → vue-06rdf4wh.js} +1 -1
- package/dist/client/static/js/wardley-WFR3VGLG-z34tj4y3.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-55ps9s4z.js → wardleyDiagram-VNRHLVJA-km2x4er8.js} +3 -3
- package/dist/client/static/js/xml-81hxjjt4.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-8bsjtm4t.js → xychartDiagram-PMCCYNJV-kr3sgr4m.js} +2 -2
- package/dist/client/static/js/yaml-yssayv8a.js +1 -0
- package/package.json +1 -1
- package/src/client/components/common/session-actions-menu/index.tsx +6 -1
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +20 -33
- package/src/client/components/mobile/LayoutWrapper.tsx +16 -26
- package/src/client/components/mobile/worktree-session.ts +4 -1
- package/src/client/components/workspace/chat-timeline/EmptyWorkspacePrompt.tsx +16 -15
- package/src/client/components/workspace/chat-timeline/fork-preview.test.tsx +11 -0
- package/src/client/hooks/chat/btw/mode.ts +5 -1
- package/src/client/hooks/chat/omp/session-sidebar-controller.ts +9 -3
- package/src/client/hooks/chat/timeline/new-chat.ts +4 -1
- package/src/client/hooks/chat/timeline/pending-dispatch.ts +6 -10
- package/src/client/hooks/chat/waiting/dispatch.ts +4 -1
- package/src/client/hooks/workspace/batch-delete-run.ts +5 -1
- package/src/client/hooks/workspace/session-delete.ts +5 -1
- package/src/client/lib/router/branch-params.test.ts +62 -0
- package/src/client/lib/router/branch-params.ts +48 -0
- package/src/server/lib/assets/shell-settings.server.test.ts +35 -0
- package/src/server/lib/assets/shell-settings.server.ts +33 -0
- package/src/server/lib/realtime/topics/peer-relay.server.test.ts +1 -11
- package/src/server/plugins/ssr.ts +20 -8
- package/src/test-support/peer-harness.ts +13 -5
- package/dist/client/static/js/ImageView-ksx9bbct.js +0 -1
- package/dist/client/static/js/LayoutWrapper-9ftz050x.js +0 -2
- package/dist/client/static/js/SessionsView-wzdf1cp6.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-4wsd6vk0.js +0 -1
- package/dist/client/static/js/bash-h6pkqvth.js +0 -1
- package/dist/client/static/js/c-thbdzmwv.js +0 -1
- package/dist/client/static/js/cpp-r1za1kke.js +0 -1
- package/dist/client/static/js/css-qsv4vvke.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-eycwde8c.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-srqbnmey.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-yj98317w.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-5jcrvn94.js +0 -1
- package/dist/client/static/js/graphql-275pg7ya.js +0 -1
- package/dist/client/static/js/index-b08zd4eq.js +0 -1
- package/dist/client/static/js/index-g0pkzanm.js +0 -2
- package/dist/client/static/js/index-ga2xdef3.js +0 -2
- package/dist/client/static/js/index-xzfsaqyz.js +0 -4
- package/dist/client/static/js/info-A6RAGUB7-mbt0ryx5.js +0 -1
- package/dist/client/static/js/ini-jqdrx98c.js +0 -1
- package/dist/client/static/js/java-70zqqrkr.js +0 -1
- package/dist/client/static/js/json-kxk8gfet.js +0 -1
- package/dist/client/static/js/jsx-h1035eqk.js +0 -1
- package/dist/client/static/js/lua-j2356waf.js +0 -1
- package/dist/client/static/js/markdown-ffw6rgk6.js +0 -1
- package/dist/client/static/js/one-dark-pro-8acf6cn2.js +0 -1
- package/dist/client/static/js/one-light-ysc1knem.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-a5yw789s.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-x0y4v4r2.js +0 -1
- package/dist/client/static/js/properties-55mrarxr.js +0 -1
- package/dist/client/static/js/python-dhypc3j4.js +0 -1
- package/dist/client/static/js/r-6b8dt1wp.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-trrc3ta1.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-dxgvx21w.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-rbgkd8sk.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-exgw7j47.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-28tpamzk.js +0 -1
- package/dist/client/static/js/sql-9dq913c8.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-0x2ashav.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-1a00b6kc.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-2q4f2f7m.js +0 -1
- package/dist/client/static/js/tsx-wh5xgm7f.js +0 -1
- package/dist/client/static/js/typescript-ge85req5.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-x9v91the.js +0 -1
- package/dist/client/static/js/xml-7bgz40qa.js +0 -1
- package/dist/client/static/js/yaml-4ht9416k.js +0 -1
- package/src/client/components/layout/session-sidebar/new-session-context.test.ts +0 -55
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ji}from"./index-m6wwc5h6.js";var e=Object.freeze(JSON.parse(`{"displayName":"Lua","name":"lua","patterns":[{"begin":"\\\\b(?:(local)\\\\s+)?(function)\\\\b(?![,:])","beginCaptures":{"1":{"name":"keyword.local.lua"},"2":{"name":"keyword.control.lua"}},"end":"(?<=[-\\\\]\\"')\\\\[{}])","name":"meta.function.lua","patterns":[{"include":"#comment"},{"begin":"(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.parameters.begin.lua"}},"end":"(\\\\))|(?=[-\\\\]\\"'\\\\[{}])|(?<!\\\\.)\\\\.(?!\\\\.)","endCaptures":{"1":{"name":"punctuation.definition.parameters.finish.lua"}},"name":"meta.parameter.lua","patterns":[{"include":"#comment"},{"captures":{"1":{"name":"constant.language.lua"},"2":{"name":"variable.parameter.function.lua"}},"match":"(\\\\.{3})\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)"},{"match":"[A-Z_a-z][0-9A-Z_a-z]*","name":"variable.parameter.function.lua"},{"match":",","name":"punctuation.separator.arguments.lua"},{"begin":":","beginCaptures":{"0":{"name":"punctuation.separator.arguments.lua"}},"end":"(?=[),])","patterns":[{"include":"#emmydoc.type"}]}]},{"match":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b\\\\s*(?=:)","name":"entity.name.class.lua"},{"match":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b","name":"entity.name.function.lua"}]},{"match":"(?<![.\\\\w\\\\d])0[Xx]\\\\h+(\\\\.\\\\h*)?([Ee]-?\\\\d*)?([Pp][-+]\\\\d+)?","name":"constant.numeric.float.hexadecimal.lua"},{"match":"(?<![.\\\\w\\\\d])0[Xx]\\\\.\\\\h+([Ee]-?\\\\d*)?([Pp][-+]\\\\d+)?","name":"constant.numeric.float.hexadecimal.lua"},{"match":"(?<![.\\\\w\\\\d])0[Xx]\\\\h+(?![.0-9EPep])","name":"constant.numeric.integer.hexadecimal.lua"},{"match":"(?<![.\\\\w\\\\d])\\\\d+(\\\\.\\\\d*)?([Ee]-?\\\\d*)?","name":"constant.numeric.float.lua"},{"match":"(?<![.\\\\w\\\\d])\\\\.\\\\d+([Ee]-?\\\\d*)?","name":"constant.numeric.float.lua"},{"match":"(?<![.\\\\w\\\\d])\\\\d+(?![.0-9EPep])","name":"constant.numeric.integer.lua"},{"include":"#string"},{"captures":{"1":{"name":"punctuation.definition.comment.lua"}},"match":"\\\\A(#!).*$\\\\n?","name":"comment.line.shebang.lua"},{"include":"#comment"},{"captures":{"1":{"name":"keyword.control.goto.lua"},"2":{"name":"string.tag.lua"}},"match":"\\\\b(goto)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)"},{"captures":{"1":{"name":"punctuation.section.embedded.begin.lua"},"2":{"name":"punctuation.section.embedded.end.lua"}},"match":"(::)\\\\s*[A-Z_a-z][0-9A-Z_a-z]*\\\\s*(::)","name":"string.tag.lua"},{"captures":{"0":{"name":"storage.type.attribute.lua"}},"match":"<\\\\s*(c(?:onst|lose))\\\\s*>"},{"match":"<[*A-Z_a-z][-*.0-9A-Z_a-z]*>","name":"storage.type.generic.lua"},{"match":"\\\\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|in)\\\\b","name":"keyword.control.lua"},{"match":"\\\\b(local)\\\\b","name":"keyword.local.lua"},{"captures":{"1":{"name":"keyword.global.lua"}},"match":"^\\\\s*(global)\\\\b(?!\\\\s*=)"},{"match":"\\\\b(function)\\\\b(?![,:])","name":"keyword.control.lua"},{"match":"(?<![^.]\\\\.|:)\\\\b(false|nil(?!:)|true|_ENV|_G|_VERSION|math\\\\.(pi|huge|maxinteger|mininteger)|utf8\\\\.charpattern|io\\\\.(std(?:in|out|err))|package\\\\.(config|cpath|loaded|loaders|path|preload|searchers))\\\\b|(?<!\\\\.)\\\\.{3}(?!\\\\.)","name":"constant.language.lua"},{"match":"(?<![^.]\\\\.|:)\\\\b(self)\\\\b","name":"variable.language.self.lua"},{"match":"(?<![^.]\\\\.|:)\\\\b(assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|loadstring|module|next|pairs|pcall|print|rawequal|rawget|rawlen|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\\\\b(?!\\\\s*=(?!=))","name":"support.function.lua"},{"match":"(?<![^.]\\\\.|:)\\\\b(async)\\\\b(?!\\\\s*=(?!=))","name":"entity.name.tag.lua"},{"match":"(?<![^.]\\\\.|:)\\\\b(coroutine\\\\.(create|isyieldable|close|resume|running|status|wrap|yield)|string\\\\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)|table\\\\.(concat|create|insert|maxn|move|pack|remove|sort|unpack)|math\\\\.(abs|acos|asin|atan2?|ceil|cosh?|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pow|rad|random|randomseed|sinh?|sqrt|tanh?|tointeger|type)|io\\\\.(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)|os\\\\.(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\\\\.(loadlib|seeall|searchpath)|debug\\\\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|[gs]etuservalue|set[Cc]stacklimit|traceback|upvalueid|upvaluejoin)|bit32\\\\.(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)|utf8\\\\.(char|codes|codepoint|len|offset))\\\\b(?!\\\\s*=(?!=))","name":"support.function.library.lua"},{"match":"\\\\b(\\\\|\\\\||&&|!)\\\\b","name":"keyword.operator.lua"},{"match":"\\\\b(and|or|not)\\\\b","name":"keyword.operator.logical.lua"},{"match":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b(?=\\\\s*(?:[\\"'({]|\\\\[\\\\[))","name":"support.function.any-method.lua"},{"match":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b(?=\\\\s*\\\\??:)","name":"entity.name.class.lua"},{"match":"(?<=[^.]\\\\.|:)\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b(?!\\\\s*=\\\\s*\\\\b(function)\\\\b)","name":"entity.other.attribute.lua"},{"match":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b(?!\\\\s*=\\\\s*\\\\b(function)\\\\b)","name":"variable.other.lua"},{"match":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b(?=\\\\s*=\\\\s*\\\\b(function)\\\\b)","name":"entity.name.function.lua"},{"match":"[-#%*+/^]|==?|~=|!=|<=?|>=?|(?<!\\\\.)\\\\.{2}(?!\\\\.)","name":"keyword.operator.lua"}],"repository":{"comment":{"patterns":[{"begin":"(^[\\\\t ]+)?(?=--)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.lua"}},"end":"(?!\\\\G)((?!^)[\\\\t ]+\\\\n)?","endCaptures":{"1":{"name":"punctuation.whitespace.comment.trailing.lua"}},"patterns":[{"begin":"--\\\\[(=*)\\\\[@@@","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.lua"}},"end":"(--)?]\\\\1]","endCaptures":{"0":{"name":"punctuation.definition.comment.end.lua"}},"name":"","patterns":[{"include":"source.lua"}]},{"begin":"--\\\\[(=*)\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.lua"}},"end":"(--)?]\\\\1]","endCaptures":{"0":{"name":"punctuation.definition.comment.end.lua"}},"name":"comment.block.lua","patterns":[{"include":"#emmydoc"},{"include":"#ldoc_tag"}]},{"begin":"----","beginCaptures":{"0":{"name":"punctuation.definition.comment.lua"}},"end":"\\\\n","name":"comment.line.double-dash.lua"},{"begin":"---","beginCaptures":{"0":{"name":"punctuation.definition.comment.lua"}},"end":"\\\\n","name":"comment.line.double-dash.documentation.lua","patterns":[{"include":"#emmydoc"},{"include":"#ldoc_tag"}]},{"begin":"--","beginCaptures":{"0":{"name":"punctuation.definition.comment.lua"}},"end":"\\\\n","name":"comment.line.double-dash.lua","patterns":[{"include":"#ldoc_tag"}]}]},{"begin":"/\\\\*","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.lua"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.lua"}},"name":"comment.block.lua","patterns":[{"include":"#emmydoc"},{"include":"#ldoc_tag"}]}]},"emmydoc":{"patterns":[{"begin":"(?<=---)[\\\\t ]*@class","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"match":"\\\\b([*A-Z_a-z][-*.0-9A-Z_a-z]*)","name":"support.class.lua"},{"match":"[,:]","name":"keyword.operator.lua"}]},{"begin":"(?<=---)[\\\\t ]*@enum","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"begin":"\\\\b([*A-Z_a-z][-*.0-9A-Z_a-z]*)","beginCaptures":{"0":{"name":"variable.lua"}},"end":"(?=\\\\n)"}]},{"begin":"(?<=---)[\\\\t ]*@type","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"include":"#emmydoc.type"}]},{"begin":"(?<=---)[\\\\t ]*@alias","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"begin":"\\\\b([*A-Z_a-z][-*.0-9A-Z_a-z]*)","beginCaptures":{"0":{"name":"variable.lua"}},"end":"(?=[\\\\n#])","patterns":[{"include":"#emmydoc.type"}]}]},{"begin":"(?<=---)[\\\\t ]*(@operator)\\\\s*(\\\\b[a-z]+)?","beginCaptures":{"1":{"name":"storage.type.annotation.lua"},"2":{"name":"support.function.library.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"include":"#emmydoc.type"}]},{"begin":"(?<=---)[\\\\t ]*@cast","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"begin":"\\\\b([*A-Z_a-z][-*.0-9A-Z_a-z]*)","beginCaptures":{"0":{"name":"variable.other.lua"}},"end":"(?=\\\\n)","patterns":[{"include":"#emmydoc.type"},{"match":"([+-|])","name":"keyword.operator.lua"}]}]},{"begin":"(?<=---)[\\\\t ]*@param","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"begin":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b(\\\\??)","beginCaptures":{"1":{"name":"entity.name.variable.lua"},"2":{"name":"keyword.operator.lua"}},"end":"(?=[\\\\n#])","patterns":[{"include":"#emmydoc.type"}]}]},{"begin":"(?<=---)[\\\\t ]*@return","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"match":"\\\\?","name":"keyword.operator.lua"},{"include":"#emmydoc.type"}]},{"begin":"(?<=---)[\\\\t ]*@field","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"begin":"(\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b|(\\\\[))(\\\\??)","beginCaptures":{"2":{"name":"entity.name.variable.lua"},"3":{"name":"keyword.operator.lua"}},"end":"(?=[\\\\n#])","patterns":[{"include":"#string"},{"include":"#emmydoc.type"},{"match":"]","name":"keyword.operator.lua"}]}]},{"begin":"(?<=---)[\\\\t ]*@generic","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"begin":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b","beginCaptures":{"0":{"name":"storage.type.generic.lua"}},"end":"(?=\\\\n)|(,)","endCaptures":{"0":{"name":"keyword.operator.lua"}},"patterns":[{"match":":","name":"keyword.operator.lua"},{"include":"#emmydoc.type"}]}]},{"begin":"(?<=---)[\\\\t ]*@vararg","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"include":"#emmydoc.type"}]},{"begin":"(?<=---)[\\\\t ]*@overload","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"include":"#emmydoc.type"}]},{"begin":"(?<=---)[\\\\t ]*@deprecated","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])"},{"begin":"(?<=---)[\\\\t ]*@meta","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])"},{"begin":"(?<=---)[\\\\t ]*@private","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])"},{"begin":"(?<=---)[\\\\t ]*@protected","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])"},{"begin":"(?<=---)[\\\\t ]*@package","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])"},{"begin":"(?<=---)[\\\\t ]*@version","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"match":"\\\\b(5\\\\.1|5\\\\.2|5\\\\.3|5\\\\.4|JIT)\\\\b","name":"support.class.lua"},{"match":"[,<>]","name":"keyword.operator.lua"}]},{"begin":"(?<=---)[\\\\t ]*@see","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"match":"\\\\b([*A-Z_a-z][-*.0-9A-Z_a-z]*)","name":"support.class.lua"},{"match":"#","name":"keyword.operator.lua"}]},{"begin":"(?<=---)[\\\\t ]*@diagnostic","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"begin":"([-0-9A-Z_a-z]+)[\\\\t ]*(:)?","beginCaptures":{"1":{"name":"keyword.other.unit"},"2":{"name":"keyword.operator.unit"}},"end":"(?=\\\\n)","patterns":[{"match":"\\\\b([*A-Z_a-z][-0-9A-Z_a-z]*)","name":"support.class.lua"},{"match":",","name":"keyword.operator.lua"}]}]},{"begin":"(?<=---)[\\\\t ]*@module","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"include":"#string"}]},{"match":"(?<=---)[\\\\t ]*@(async|nodiscard)","name":"storage.type.annotation.lua"},{"begin":"(?<=---)\\\\|\\\\s*[+>]?","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"include":"#string"}]}]},"emmydoc.type":{"patterns":[{"begin":"\\\\bfun\\\\b","beginCaptures":{"0":{"name":"keyword.control.lua"}},"end":"(?=[#\\\\s])","patterns":[{"match":"[](),:<>?\\\\[][\\\\t ]*","name":"keyword.operator.lua"},{"match":"([A-Z_a-z][-*.0-9A-Z_a-z]*)(?<!,)[\\\\t ]*(?=\\\\??:)","name":"entity.name.variable.lua"},{"include":"#emmydoc.type"},{"include":"#string"}]},{"match":"<[*A-Z_a-z][-*.0-9A-Z_a-z]*>","name":"storage.type.generic.lua"},{"match":"\\\\basync\\\\b","name":"entity.name.tag.lua"},{"match":"[,:?\`{|}][\\\\t ]*","name":"keyword.operator.lua"},{"begin":"(?=[\\"'*.A-\\\\[_a-z])","end":"(?=[#),:?|}\\\\s])","patterns":[{"match":"([-\\\\]*,.0-9<>A-\\\\[_a-z]+)(?<!,)[\\\\t ]*","name":"support.type.lua"},{"match":"(\\\\.\\\\.\\\\.)[\\\\t ]*","name":"constant.language.lua"},{"include":"#string"}]}]},"escaped_char":{"patterns":[{"match":"\\\\\\\\[\\\\n\\"'\\\\\\\\abfnrtv]","name":"constant.character.escape.lua"},{"match":"\\\\\\\\z[\\\\t\\\\n ]*","name":"constant.character.escape.lua"},{"match":"\\\\\\\\\\\\d{1,3}","name":"constant.character.escape.byte.lua"},{"match":"\\\\\\\\x\\\\h\\\\h","name":"constant.character.escape.byte.lua"},{"match":"\\\\\\\\u\\\\{\\\\h+}","name":"constant.character.escape.unicode.lua"},{"match":"\\\\\\\\.","name":"invalid.illegal.character.escape.lua"}]},"ldoc_tag":{"captures":{"1":{"name":"punctuation.definition.block.tag.ldoc"},"2":{"name":"storage.type.class.ldoc"}},"match":"\\\\G[\\\\t ]*(@)(alias|annotation|author|charset|class|classmod|comment|constructor|copyright|description|example|export|factory|field|file|fixme|function|include|lfunction|license|local|module|name|param|pragma|private|raise|release|return|script|section|see|set|static|submodule|summary|tfield|thread|tparam|treturn|todo|topic|type|usage|warning|within)\\\\b"},"string":{"patterns":[{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.lua"}},"end":"'[\\\\t ]*|(?=\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.lua"}},"name":"string.quoted.single.lua","patterns":[{"include":"#escaped_char"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.lua"}},"end":"\\"[\\\\t ]*|(?=\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.lua"}},"name":"string.quoted.double.lua","patterns":[{"include":"#escaped_char"}]},{"begin":"\`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.lua"}},"end":"\`[\\\\t ]*|(?=\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.lua"}},"name":"string.quoted.double.lua"},{"begin":"(?<=\\\\.cdef)\\\\s*(\\\\[(=*)\\\\[)","beginCaptures":{"0":{"name":"string.quoted.other.multiline.lua"},"1":{"name":"punctuation.definition.string.begin.lua"}},"contentName":"meta.embedded.lua","end":"(]\\\\2])[\\\\t ]*","endCaptures":{"0":{"name":"string.quoted.other.multiline.lua"},"1":{"name":"punctuation.definition.string.end.lua"}},"patterns":[{"include":"source.c"}]},{"begin":"(?<!--)\\\\[(=*)\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.lua"}},"end":"]\\\\1][\\\\t ]*","endCaptures":{"0":{"name":"punctuation.definition.string.end.lua"}},"name":"string.quoted.other.multiline.lua"}]}},"scopeName":"source.lua","embeddedLangs":["c"]}`)),If=[...ji,e];
|
|
2
|
-
export{
|
|
1
|
+
import{qi}from"./index-9t82sx0w.js";var e=Object.freeze(JSON.parse(`{"displayName":"Lua","name":"lua","patterns":[{"begin":"\\\\b(?:(local)\\\\s+)?(function)\\\\b(?![,:])","beginCaptures":{"1":{"name":"keyword.local.lua"},"2":{"name":"keyword.control.lua"}},"end":"(?<=[-\\\\]\\"')\\\\[{}])","name":"meta.function.lua","patterns":[{"include":"#comment"},{"begin":"(\\\\()","beginCaptures":{"1":{"name":"punctuation.definition.parameters.begin.lua"}},"end":"(\\\\))|(?=[-\\\\]\\"'\\\\[{}])|(?<!\\\\.)\\\\.(?!\\\\.)","endCaptures":{"1":{"name":"punctuation.definition.parameters.finish.lua"}},"name":"meta.parameter.lua","patterns":[{"include":"#comment"},{"captures":{"1":{"name":"constant.language.lua"},"2":{"name":"variable.parameter.function.lua"}},"match":"(\\\\.{3})\\\\s*([A-Z_a-z][0-9A-Z_a-z]*)"},{"match":"[A-Z_a-z][0-9A-Z_a-z]*","name":"variable.parameter.function.lua"},{"match":",","name":"punctuation.separator.arguments.lua"},{"begin":":","beginCaptures":{"0":{"name":"punctuation.separator.arguments.lua"}},"end":"(?=[),])","patterns":[{"include":"#emmydoc.type"}]}]},{"match":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b\\\\s*(?=:)","name":"entity.name.class.lua"},{"match":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b","name":"entity.name.function.lua"}]},{"match":"(?<![.\\\\w\\\\d])0[Xx]\\\\h+(\\\\.\\\\h*)?([Ee]-?\\\\d*)?([Pp][-+]\\\\d+)?","name":"constant.numeric.float.hexadecimal.lua"},{"match":"(?<![.\\\\w\\\\d])0[Xx]\\\\.\\\\h+([Ee]-?\\\\d*)?([Pp][-+]\\\\d+)?","name":"constant.numeric.float.hexadecimal.lua"},{"match":"(?<![.\\\\w\\\\d])0[Xx]\\\\h+(?![.0-9EPep])","name":"constant.numeric.integer.hexadecimal.lua"},{"match":"(?<![.\\\\w\\\\d])\\\\d+(\\\\.\\\\d*)?([Ee]-?\\\\d*)?","name":"constant.numeric.float.lua"},{"match":"(?<![.\\\\w\\\\d])\\\\.\\\\d+([Ee]-?\\\\d*)?","name":"constant.numeric.float.lua"},{"match":"(?<![.\\\\w\\\\d])\\\\d+(?![.0-9EPep])","name":"constant.numeric.integer.lua"},{"include":"#string"},{"captures":{"1":{"name":"punctuation.definition.comment.lua"}},"match":"\\\\A(#!).*$\\\\n?","name":"comment.line.shebang.lua"},{"include":"#comment"},{"captures":{"1":{"name":"keyword.control.goto.lua"},"2":{"name":"string.tag.lua"}},"match":"\\\\b(goto)\\\\s+([A-Z_a-z][0-9A-Z_a-z]*)"},{"captures":{"1":{"name":"punctuation.section.embedded.begin.lua"},"2":{"name":"punctuation.section.embedded.end.lua"}},"match":"(::)\\\\s*[A-Z_a-z][0-9A-Z_a-z]*\\\\s*(::)","name":"string.tag.lua"},{"captures":{"0":{"name":"storage.type.attribute.lua"}},"match":"<\\\\s*(c(?:onst|lose))\\\\s*>"},{"match":"<[*A-Z_a-z][-*.0-9A-Z_a-z]*>","name":"storage.type.generic.lua"},{"match":"\\\\b(break|do|else|for|if|elseif|goto|return|then|repeat|while|until|end|in)\\\\b","name":"keyword.control.lua"},{"match":"\\\\b(local)\\\\b","name":"keyword.local.lua"},{"captures":{"1":{"name":"keyword.global.lua"}},"match":"^\\\\s*(global)\\\\b(?!\\\\s*=)"},{"match":"\\\\b(function)\\\\b(?![,:])","name":"keyword.control.lua"},{"match":"(?<![^.]\\\\.|:)\\\\b(false|nil(?!:)|true|_ENV|_G|_VERSION|math\\\\.(pi|huge|maxinteger|mininteger)|utf8\\\\.charpattern|io\\\\.(std(?:in|out|err))|package\\\\.(config|cpath|loaded|loaders|path|preload|searchers))\\\\b|(?<!\\\\.)\\\\.{3}(?!\\\\.)","name":"constant.language.lua"},{"match":"(?<![^.]\\\\.|:)\\\\b(self)\\\\b","name":"variable.language.self.lua"},{"match":"(?<![^.]\\\\.|:)\\\\b(assert|collectgarbage|dofile|error|getfenv|getmetatable|ipairs|load|loadfile|loadstring|module|next|pairs|pcall|print|rawequal|rawget|rawlen|rawset|require|select|setfenv|setmetatable|tonumber|tostring|type|unpack|xpcall)\\\\b(?!\\\\s*=(?!=))","name":"support.function.lua"},{"match":"(?<![^.]\\\\.|:)\\\\b(async)\\\\b(?!\\\\s*=(?!=))","name":"entity.name.tag.lua"},{"match":"(?<![^.]\\\\.|:)\\\\b(coroutine\\\\.(create|isyieldable|close|resume|running|status|wrap|yield)|string\\\\.(byte|char|dump|find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|sub|unpack|upper)|table\\\\.(concat|create|insert|maxn|move|pack|remove|sort|unpack)|math\\\\.(abs|acos|asin|atan2?|ceil|cosh?|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pow|rad|random|randomseed|sinh?|sqrt|tanh?|tointeger|type)|io\\\\.(close|flush|input|lines|open|output|popen|read|tmpfile|type|write)|os\\\\.(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\\\\.(loadlib|seeall|searchpath)|debug\\\\.(debug|[gs]etfenv|[gs]ethook|getinfo|[gs]etlocal|[gs]etmetatable|getregistry|[gs]etupvalue|[gs]etuservalue|set[Cc]stacklimit|traceback|upvalueid|upvaluejoin)|bit32\\\\.(arshift|band|bnot|bor|btest|bxor|extract|replace|lrotate|lshift|rrotate|rshift)|utf8\\\\.(char|codes|codepoint|len|offset))\\\\b(?!\\\\s*=(?!=))","name":"support.function.library.lua"},{"match":"\\\\b(\\\\|\\\\||&&|!)\\\\b","name":"keyword.operator.lua"},{"match":"\\\\b(and|or|not)\\\\b","name":"keyword.operator.logical.lua"},{"match":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b(?=\\\\s*(?:[\\"'({]|\\\\[\\\\[))","name":"support.function.any-method.lua"},{"match":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b(?=\\\\s*\\\\??:)","name":"entity.name.class.lua"},{"match":"(?<=[^.]\\\\.|:)\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b(?!\\\\s*=\\\\s*\\\\b(function)\\\\b)","name":"entity.other.attribute.lua"},{"match":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b(?!\\\\s*=\\\\s*\\\\b(function)\\\\b)","name":"variable.other.lua"},{"match":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b(?=\\\\s*=\\\\s*\\\\b(function)\\\\b)","name":"entity.name.function.lua"},{"match":"[-#%*+/^]|==?|~=|!=|<=?|>=?|(?<!\\\\.)\\\\.{2}(?!\\\\.)","name":"keyword.operator.lua"}],"repository":{"comment":{"patterns":[{"begin":"(^[\\\\t ]+)?(?=--)","beginCaptures":{"1":{"name":"punctuation.whitespace.comment.leading.lua"}},"end":"(?!\\\\G)((?!^)[\\\\t ]+\\\\n)?","endCaptures":{"1":{"name":"punctuation.whitespace.comment.trailing.lua"}},"patterns":[{"begin":"--\\\\[(=*)\\\\[@@@","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.lua"}},"end":"(--)?]\\\\1]","endCaptures":{"0":{"name":"punctuation.definition.comment.end.lua"}},"name":"","patterns":[{"include":"source.lua"}]},{"begin":"--\\\\[(=*)\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.lua"}},"end":"(--)?]\\\\1]","endCaptures":{"0":{"name":"punctuation.definition.comment.end.lua"}},"name":"comment.block.lua","patterns":[{"include":"#emmydoc"},{"include":"#ldoc_tag"}]},{"begin":"----","beginCaptures":{"0":{"name":"punctuation.definition.comment.lua"}},"end":"\\\\n","name":"comment.line.double-dash.lua"},{"begin":"---","beginCaptures":{"0":{"name":"punctuation.definition.comment.lua"}},"end":"\\\\n","name":"comment.line.double-dash.documentation.lua","patterns":[{"include":"#emmydoc"},{"include":"#ldoc_tag"}]},{"begin":"--","beginCaptures":{"0":{"name":"punctuation.definition.comment.lua"}},"end":"\\\\n","name":"comment.line.double-dash.lua","patterns":[{"include":"#ldoc_tag"}]}]},{"begin":"/\\\\*","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.lua"}},"end":"\\\\*/","endCaptures":{"0":{"name":"punctuation.definition.comment.end.lua"}},"name":"comment.block.lua","patterns":[{"include":"#emmydoc"},{"include":"#ldoc_tag"}]}]},"emmydoc":{"patterns":[{"begin":"(?<=---)[\\\\t ]*@class","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"match":"\\\\b([*A-Z_a-z][-*.0-9A-Z_a-z]*)","name":"support.class.lua"},{"match":"[,:]","name":"keyword.operator.lua"}]},{"begin":"(?<=---)[\\\\t ]*@enum","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"begin":"\\\\b([*A-Z_a-z][-*.0-9A-Z_a-z]*)","beginCaptures":{"0":{"name":"variable.lua"}},"end":"(?=\\\\n)"}]},{"begin":"(?<=---)[\\\\t ]*@type","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"include":"#emmydoc.type"}]},{"begin":"(?<=---)[\\\\t ]*@alias","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"begin":"\\\\b([*A-Z_a-z][-*.0-9A-Z_a-z]*)","beginCaptures":{"0":{"name":"variable.lua"}},"end":"(?=[\\\\n#])","patterns":[{"include":"#emmydoc.type"}]}]},{"begin":"(?<=---)[\\\\t ]*(@operator)\\\\s*(\\\\b[a-z]+)?","beginCaptures":{"1":{"name":"storage.type.annotation.lua"},"2":{"name":"support.function.library.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"include":"#emmydoc.type"}]},{"begin":"(?<=---)[\\\\t ]*@cast","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"begin":"\\\\b([*A-Z_a-z][-*.0-9A-Z_a-z]*)","beginCaptures":{"0":{"name":"variable.other.lua"}},"end":"(?=\\\\n)","patterns":[{"include":"#emmydoc.type"},{"match":"([+-|])","name":"keyword.operator.lua"}]}]},{"begin":"(?<=---)[\\\\t ]*@param","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"begin":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b(\\\\??)","beginCaptures":{"1":{"name":"entity.name.variable.lua"},"2":{"name":"keyword.operator.lua"}},"end":"(?=[\\\\n#])","patterns":[{"include":"#emmydoc.type"}]}]},{"begin":"(?<=---)[\\\\t ]*@return","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"match":"\\\\?","name":"keyword.operator.lua"},{"include":"#emmydoc.type"}]},{"begin":"(?<=---)[\\\\t ]*@field","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"begin":"(\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b|(\\\\[))(\\\\??)","beginCaptures":{"2":{"name":"entity.name.variable.lua"},"3":{"name":"keyword.operator.lua"}},"end":"(?=[\\\\n#])","patterns":[{"include":"#string"},{"include":"#emmydoc.type"},{"match":"]","name":"keyword.operator.lua"}]}]},{"begin":"(?<=---)[\\\\t ]*@generic","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"begin":"\\\\b([A-Z_a-z][0-9A-Z_a-z]*)\\\\b","beginCaptures":{"0":{"name":"storage.type.generic.lua"}},"end":"(?=\\\\n)|(,)","endCaptures":{"0":{"name":"keyword.operator.lua"}},"patterns":[{"match":":","name":"keyword.operator.lua"},{"include":"#emmydoc.type"}]}]},{"begin":"(?<=---)[\\\\t ]*@vararg","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"include":"#emmydoc.type"}]},{"begin":"(?<=---)[\\\\t ]*@overload","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"include":"#emmydoc.type"}]},{"begin":"(?<=---)[\\\\t ]*@deprecated","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])"},{"begin":"(?<=---)[\\\\t ]*@meta","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])"},{"begin":"(?<=---)[\\\\t ]*@private","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])"},{"begin":"(?<=---)[\\\\t ]*@protected","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])"},{"begin":"(?<=---)[\\\\t ]*@package","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])"},{"begin":"(?<=---)[\\\\t ]*@version","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"match":"\\\\b(5\\\\.1|5\\\\.2|5\\\\.3|5\\\\.4|JIT)\\\\b","name":"support.class.lua"},{"match":"[,<>]","name":"keyword.operator.lua"}]},{"begin":"(?<=---)[\\\\t ]*@see","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"match":"\\\\b([*A-Z_a-z][-*.0-9A-Z_a-z]*)","name":"support.class.lua"},{"match":"#","name":"keyword.operator.lua"}]},{"begin":"(?<=---)[\\\\t ]*@diagnostic","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"begin":"([-0-9A-Z_a-z]+)[\\\\t ]*(:)?","beginCaptures":{"1":{"name":"keyword.other.unit"},"2":{"name":"keyword.operator.unit"}},"end":"(?=\\\\n)","patterns":[{"match":"\\\\b([*A-Z_a-z][-0-9A-Z_a-z]*)","name":"support.class.lua"},{"match":",","name":"keyword.operator.lua"}]}]},{"begin":"(?<=---)[\\\\t ]*@module","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"include":"#string"}]},{"match":"(?<=---)[\\\\t ]*@(async|nodiscard)","name":"storage.type.annotation.lua"},{"begin":"(?<=---)\\\\|\\\\s*[+>]?","beginCaptures":{"0":{"name":"storage.type.annotation.lua"}},"end":"(?=[\\\\n#@])","patterns":[{"include":"#string"}]}]},"emmydoc.type":{"patterns":[{"begin":"\\\\bfun\\\\b","beginCaptures":{"0":{"name":"keyword.control.lua"}},"end":"(?=[#\\\\s])","patterns":[{"match":"[](),:<>?\\\\[][\\\\t ]*","name":"keyword.operator.lua"},{"match":"([A-Z_a-z][-*.0-9A-Z_a-z]*)(?<!,)[\\\\t ]*(?=\\\\??:)","name":"entity.name.variable.lua"},{"include":"#emmydoc.type"},{"include":"#string"}]},{"match":"<[*A-Z_a-z][-*.0-9A-Z_a-z]*>","name":"storage.type.generic.lua"},{"match":"\\\\basync\\\\b","name":"entity.name.tag.lua"},{"match":"[,:?\`{|}][\\\\t ]*","name":"keyword.operator.lua"},{"begin":"(?=[\\"'*.A-\\\\[_a-z])","end":"(?=[#),:?|}\\\\s])","patterns":[{"match":"([-\\\\]*,.0-9<>A-\\\\[_a-z]+)(?<!,)[\\\\t ]*","name":"support.type.lua"},{"match":"(\\\\.\\\\.\\\\.)[\\\\t ]*","name":"constant.language.lua"},{"include":"#string"}]}]},"escaped_char":{"patterns":[{"match":"\\\\\\\\[\\\\n\\"'\\\\\\\\abfnrtv]","name":"constant.character.escape.lua"},{"match":"\\\\\\\\z[\\\\t\\\\n ]*","name":"constant.character.escape.lua"},{"match":"\\\\\\\\\\\\d{1,3}","name":"constant.character.escape.byte.lua"},{"match":"\\\\\\\\x\\\\h\\\\h","name":"constant.character.escape.byte.lua"},{"match":"\\\\\\\\u\\\\{\\\\h+}","name":"constant.character.escape.unicode.lua"},{"match":"\\\\\\\\.","name":"invalid.illegal.character.escape.lua"}]},"ldoc_tag":{"captures":{"1":{"name":"punctuation.definition.block.tag.ldoc"},"2":{"name":"storage.type.class.ldoc"}},"match":"\\\\G[\\\\t ]*(@)(alias|annotation|author|charset|class|classmod|comment|constructor|copyright|description|example|export|factory|field|file|fixme|function|include|lfunction|license|local|module|name|param|pragma|private|raise|release|return|script|section|see|set|static|submodule|summary|tfield|thread|tparam|treturn|todo|topic|type|usage|warning|within)\\\\b"},"string":{"patterns":[{"begin":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.lua"}},"end":"'[\\\\t ]*|(?=\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.lua"}},"name":"string.quoted.single.lua","patterns":[{"include":"#escaped_char"}]},{"begin":"\\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.lua"}},"end":"\\"[\\\\t ]*|(?=\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.lua"}},"name":"string.quoted.double.lua","patterns":[{"include":"#escaped_char"}]},{"begin":"\`","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.lua"}},"end":"\`[\\\\t ]*|(?=\\\\n)","endCaptures":{"0":{"name":"punctuation.definition.string.end.lua"}},"name":"string.quoted.double.lua"},{"begin":"(?<=\\\\.cdef)\\\\s*(\\\\[(=*)\\\\[)","beginCaptures":{"0":{"name":"string.quoted.other.multiline.lua"},"1":{"name":"punctuation.definition.string.begin.lua"}},"contentName":"meta.embedded.lua","end":"(]\\\\2])[\\\\t ]*","endCaptures":{"0":{"name":"string.quoted.other.multiline.lua"},"1":{"name":"punctuation.definition.string.end.lua"}},"patterns":[{"include":"source.c"}]},{"begin":"(?<!--)\\\\[(=*)\\\\[","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.lua"}},"end":"]\\\\1][\\\\t ]*","endCaptures":{"0":{"name":"punctuation.definition.string.end.lua"}},"name":"string.quoted.other.multiline.lua"}]}},"scopeName":"source.lua","embeddedLangs":["c"]}`)),Sf=[...qi,e];
|
|
2
|
+
export{Sf};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d,n,i,o,u,a,oe,e,pp,we,S,s,f,I,se,ma,ie,pe,C,y,le,nt,MA,to}from"./index-y139vc12.js";var ne={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]},O=s(ne);function J(l,r,c=1e6){return{sessionId:l,sessionTitle:r,modelId:"",modelName:"",timestamp:"",contextUsed:0,contextLimit:c,contextPercent:0,messagesCount:0,userCount:0,assistantCount:0,totalCost:0,costFormatted:"$0.00",cacheHitAverage:0,costBreakdown:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0},lastMessage:{input:0,output:0,reasoning:0,cacheRead:0,cacheWrite:0,cacheHitPercent:0},distribution:{userTokens:0,userPercent:0,assistantTokens:0,assistantPercent:0,toolTokens:0,toolPercent:0,otherTokens:0,otherPercent:100},rawMessages:[]}}function Z({used:l,limit:r,percent:c}){let x=l.toLocaleString(),m=r.toLocaleString(),t=Math.min(100,Math.max(0,c));return e("div",{className:"bg-canvas border border-ink/10 rounded-xl p-4 transition-all",children:[e("div",{className:"flex items-center justify-between text-xs mb-2",children:[e("span",{className:"font-semibold text-ink/80",children:"Context"}),e("span",{className:"font-mono text-ink/70 text-[11px]",children:[x," / ",m]})]}),e("div",{className:"w-full h-1.5 bg-ink/10 rounded-full overflow-hidden mb-2",children:e("div",{className:"h-full bg-ink/70 rounded-full transition-all duration-500 ease-out",style:{width:`${t}%`}})}),e("div",{className:"text-[11px] font-mono text-ink/50 text-left",children:[t.toFixed(1),"% used"]})]})}function _(l){return l<0.01?"$0.01":`$${l.toFixed(6).replace(/0+$/,"").replace(/\.$/,"")}`}function z({open:l,onClose:r,breakdown:c,costFormatted:x}){let m=o(null);if(le(m,r),!l)return null;let t=c?[{label:"Total Cost",value:_(c.total),strong:!0},{label:"Input (cache miss)",value:_(c.input)},{label:"Output",value:_(c.output)},{label:"Cache Read (cache hit)",value:_(c.cacheRead)},{label:"Cache Write",value:_(c.cacheWrite)}]:[{label:"Total Cost",value:x??"$0.01",strong:!0}];return e("div",{ref:m,className:"glass-popover absolute top-full right-0 mt-1.5 z-50 w-64 bg-paper border border-ink/10 rounded-lg shadow-lg p-3",role:"dialog","aria-modal":"false",children:[e("div",{className:"flex items-center justify-between mb-2.5",children:[e("span",{className:"text-xs font-semibold text-ink tracking-tight",children:"Cost Breakdown"}),e("button",{type:"button",onClick:r,className:"p-1 rounded hover:bg-ink/5 text-ink/60 hover:text-ink transition-colors","aria-label":"Close cost breakdown",children:e(y,{size:14})})]}),e("div",{className:"space-y-1.5",children:t.map((b)=>e("div",{className:"flex items-center justify-between text-[11px] font-mono border-b border-ink/5 last:border-0 pb-1.5 last:pb-0",children:[e("span",{className:"text-ink/60",children:b.label}),e("span",{className:`${b.strong?"font-semibold text-ink":"text-ink/80"}`,children:b.value})]},b.label))})]})}function V({messagesCount:l,userCount:r,assistantCount:c,costFormatted:x,cacheHitAverage:m,costBreakdown:t}){let[b,h]=n(!1);return e(d,{children:[e("div",{className:"mb-1.5",children:e("span",{className:"text-xs font-semibold text-ink/80",children:"Session Stats"})}),e("div",{className:"flex gap-2 flex-wrap",children:[e(nt,{variant:"compact",label:"Messages",value:l}),e(nt,{variant:"compact",label:"User",value:r}),e(nt,{variant:"compact",label:"Assistant",value:c}),e(nt,{variant:"compact",label:"Cache Hit",value:m!==void 0?`${m.toFixed(1)}%`:"–"}),e("div",{className:"relative bg-canvas border border-ink/10 rounded-lg px-2.5 py-1.5 flex flex-col gap-0.5 flex-1 min-w-0",children:[e("span",{className:"text-[10px] font-medium text-ink/50 flex items-center gap-1",children:["Cost",e("button",{type:"button",onClick:()=>h(!0),className:"p-0.5 rounded text-ink/40 hover:text-ink hover:bg-ink/5 transition-colors","aria-label":"Show cost breakdown",title:"Cost breakdown",children:e(pe,{size:11})})]}),e("span",{className:"text-xs font-semibold font-mono text-ink truncate",children:x}),e(z,{open:b,onClose:()=>h(!1),breakdown:t,costFormatted:x})]})]})]})}function Q({input:l,output:r,reasoning:c,cacheRead:x,cacheWrite:m,cacheHitPercent:t}){return e(d,{children:[e("div",{className:"mb-1.5",children:e("span",{className:"text-xs font-semibold text-ink/80",children:"Last Assistant Message"})}),e("div",{className:"flex gap-2 flex-wrap",children:[e(nt,{variant:"compact",label:"In",value:l.toLocaleString()}),e(nt,{variant:"compact",label:"Out",value:r.toLocaleString()}),e(nt,{variant:"compact",label:"Reason",value:c.toLocaleString()}),e(nt,{variant:"compact",label:"Cache",value:`${x.toLocaleString()}/${m.toLocaleString()}`}),e(nt,{variant:"compact",label:"Hit",value:`${t.toFixed(1)}%`})]})]})}function G({userPercent:l,assistantPercent:r,toolPercent:c,otherPercent:x}){return e("div",{className:"space-y-2.5",children:[e("div",{className:"w-full h-1.5 rounded-full overflow-hidden flex bg-ink/10",children:[e("div",{className:"h-full bg-emerald-500 transition-all duration-300",style:{width:`${l}%`},title:`User: ${l}%`}),e("div",{className:"h-full bg-sky-500 transition-all duration-300",style:{width:`${r}%`},title:`Assistant: ${r}%`}),e("div",{className:"h-full bg-amber-500 transition-all duration-300",style:{width:`${c}%`},title:`Tool Calls: ${c}%`}),e("div",{className:"h-full bg-slate-400 transition-all duration-300",style:{width:`${x}%`},title:`Other: ${x}%`})]}),e("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[11px] text-ink/70",children:[e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-emerald-500 flex-shrink-0"}),e("span",{children:["User ",l,"%"]})]}),e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-sky-500 flex-shrink-0"}),e("span",{children:["Assistant ",r,"%"]})]}),e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-amber-500 flex-shrink-0"}),e("span",{children:["Tool Calls ",c,"%"]})]}),e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-slate-400 flex-shrink-0"}),e("span",{children:["Other ",x,"%"]})]})]})]})}function K({data:l}){to();let[r,c]=n(!1),x=o(null),m=o(null),t=JSON.stringify(l,null,2),b=MA(t),h=a((v)=>{let k=m.current;if(!k)return;k.scrollLeft=v.currentTarget.scrollLeft,k.scrollTop=v.currentTarget.scrollTop},[]),w=a(async(v)=>{v.stopPropagation();try{await navigator.clipboard.writeText(t)}catch{let k=document.createElement("textarea");k.value=t,k.style.position="fixed",k.style.opacity="0",document.body.appendChild(k),k.select(),document.execCommand("copy"),document.body.removeChild(k)}c(!0),setTimeout(()=>c(!1),2000)},[t]);return e("div",{className:"relative my-1.5 rounded-lg bg-paper/80 border border-ink/10 overflow-hidden",children:[e("div",{className:"flex items-center justify-between px-2.5 py-1.5 bg-ink/[0.04] border-b border-ink/10",children:[e("span",{className:"text-[10px] font-mono text-ink/50 select-none",children:[Object.keys(l).length," keys · ",t.length," chars"]}),e("button",{type:"button",onClick:w,className:"flex items-center space-x-1 px-2 py-1 rounded bg-canvas hover:bg-paper text-ink/70 hover:text-ink border border-ink/10 text-[10px] transition-colors shadow-xs",title:"Copy Pretty JSON",children:r?e(d,{children:[e(f,{size:11,className:"text-success"}),e("span",{className:"text-success font-sans font-medium",children:"Copied"})]}):e(d,{children:[e(ie,{size:11}),e("span",{className:"font-sans",children:"Copy JSON"})]})})]}),e("div",{className:"relative",children:[e("pre",{ref:m,"aria-hidden":!0,className:"absolute inset-0 p-2.5 m-0 font-mono text-[11px] leading-5 overflow-x-auto overflow-y-auto whitespace-pre pointer-events-none",dangerouslySetInnerHTML:{__html:b}}),e("pre",{ref:x,onScroll:h,className:"relative p-2.5 m-0 font-mono text-[11px] leading-5 overflow-x-auto overflow-y-auto whitespace-pre select-text selection:bg-ink selection:text-canvas",children:e("code",{className:"text-transparent",children:t})})]})]})}var B=["bg-emerald-500","bg-sky-500","bg-amber-500","bg-violet-500","bg-rose-500","bg-teal-500","bg-indigo-500","bg-fuchsia-500","bg-lime-500","bg-cyan-500","bg-orange-500","bg-pink-500","bg-yellow-500","bg-purple-500","bg-red-500","bg-blue-500","bg-green-500","bg-cyan-600","bg-violet-600","bg-amber-600"],W=20;function q(l){let r=0;for(let c=0;c<l.length;c++)r=r*31+l.charCodeAt(c)|0;return Math.abs(r)}function Y(l){let r=l.indexOf("/"),c=r>0?l.slice(0,r):l,x=r>0?l.slice(r+1):"";return x?`${c} · ${x}`:c}function X(l,r){if(r<=7)return Array.from({length:r},(b,h)=>h+1);let c=new Set([1,r,l,l-1,l+1]);if(l<=3)[2,3,4].forEach((b)=>c.add(b));if(l>=r-2)[r-3,r-2,r-1].forEach((b)=>c.add(b));let x=[...c].filter((b)=>b>=1&&b<=r).sort((b,h)=>b-h),m=[],t=0;for(let b of x){if(b-t>1)m.push("…");m.push(b),t=b}return m}function ee({sessionId:l,refreshKey:r=0}){let[c,x]=S("context.rawExpandedIds",{}),[m,t]=S("context.rawFilterRole","all"),[b,h]=n(1),[w,v]=n([]),[k,E]=n(0),[T,N]=n(!1),U=o(0),D=o(!1),A=a((p)=>{if(typeof window>"u")return;let g=++U.current;if(!p?.silent)N(!0);let R=new URLSearchParams({page:String(b),pageSize:String(W),role:m});if(l)R.set("sessionId",l);fetch(`/api/telemetry/raw-messages?${R.toString()}`).then((M)=>M.ok?M.json():null).then((M)=>{if(D.current||g!==U.current)return;v(M&&Array.isArray(M.items)?M.items:[]),E(M&&Number.isFinite(M.filteredTotal)?M.filteredTotal:0)}).catch(()=>{if(D.current||g!==U.current)return;v([]),E(0)}).finally(()=>{if(!p?.silent&&g===U.current)N(!1)})},[l,b,m]);i(()=>(D.current=!1,A(),()=>{D.current=!0}),[A,r]);let L=Math.max(1,Math.ceil(k/W)),P=Math.min(b,L),j=(p)=>h(Math.min(Math.max(1,p),L)),te=(p)=>{x((g)=>({...g,[p]:!g[p]}))},ae=()=>{if(w.every((g)=>c[g.id]))x({});else{let g={};w.forEach((R)=>{g[R.id]=!0}),x(g)}},F=u(()=>{let p=[];for(let g of w){let R=g.info.modelID;if(!R||p.includes(R))continue;p.push(R)}return p},[w]),H=(p)=>p?B[q(p)%B.length]:"bg-ink/20";return e("div",{className:"space-y-3",children:[F.length>0&&e("div",{children:[e("div",{className:"mb-1.5",children:e("span",{className:"text-xs font-semibold text-ink/80",children:"Legend"})}),e("div",{className:"bg-canvas border border-ink/10 rounded-xl px-3 py-2",children:e("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-[10px] font-mono text-ink/60",children:F.map((p)=>e("span",{className:"flex items-center gap-1.5",children:[e("span",{className:`w-2 h-2 rounded-full ${H(p)}`}),e("span",{children:Y(p)})]},p))})})]}),e("div",{className:"flex items-center justify-between",children:[e("div",{className:"flex items-center space-x-2",children:[e("span",{className:"text-xs font-semibold text-ink/80",children:"Raw Messages"}),e("span",{className:"text-[10px] font-mono text-ink/50 bg-ink/5 px-1.5 py-0.5 rounded-full border border-ink/10",children:k})]}),e("div",{className:"flex items-center space-x-1",children:[e("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-lg p-0.5 text-[10px]",children:[e("button",{type:"button",onClick:()=>{t("all"),h(1)},className:`px-1.5 py-0.5 rounded ${m==="all"?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink"}`,children:"All"}),e("button",{type:"button",onClick:()=>{t("assistant"),h(1)},className:`px-1.5 py-0.5 rounded ${m==="assistant"?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink"}`,children:"AI"}),e("button",{type:"button",onClick:()=>{t("user"),h(1)},className:`px-1.5 py-0.5 rounded ${m==="user"?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink"}`,children:"User"})]}),e("button",{type:"button",onClick:ae,className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 transition-colors text-[10px] flex items-center",title:"Expand / Collapse All",children:e(O,{size:14})})]})]}),e("div",{className:"space-y-1.5",children:!T&&w.length===0?e("div",{className:"p-4 text-center text-xs text-ink/40 italic bg-canvas rounded-xl border border-ink/10",children:"No raw messages recorded yet."}):w.map((p)=>{let g=Boolean(c[p.id]);return e("div",{className:`bg-canvas border border-ink/10 rounded-xl overflow-hidden transition-all duration-200 ${T?"opacity-50":""}`,children:[e("button",{type:"button",onClick:()=>te(p.id),className:"w-full text-left px-3.5 py-2.5 flex items-center justify-between hover:bg-ink/5 transition-colors cursor-pointer",children:[e("div",{className:"flex items-center space-x-2 min-w-0 flex-1 mr-2",children:[e("span",{className:"text-ink/40 flex-shrink-0",children:g?e(I,{size:14}):e(se,{size:14})}),e("span",{className:"text-xs font-mono text-ink/90 truncate",children:p.badgeLabel})]}),e("div",{className:"flex items-center space-x-3 text-[11px] font-mono text-ink/50 flex-shrink-0",children:[p.tokenSummary&&e("span",{className:"text-ink/60",children:p.tokenSummary}),e("span",{className:"flex items-center gap-1.5",children:[e("span",{className:`w-2 h-2 rounded-full ${H(p.info.modelID)}`}),e("span",{children:p.timestamp})]})]})]}),g&&e("div",{className:"px-3.5 pb-3 pt-1 border-t border-ink/5 bg-canvas/60",children:e(K,{data:p.rawPayload})})]},p.id)})}),L>1&&e("div",{className:"flex items-center justify-between pt-1",children:[e("span",{className:"text-[10px] font-mono text-ink/50",children:[(P-1)*W+1,"–",Math.min(P*W,k)," of ",k]}),e("div",{className:"flex items-center gap-0.5",children:[e("button",{type:"button",disabled:P<=1,onClick:()=>j(P-1),className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 disabled:opacity-30 disabled:hover:bg-transparent transition-colors",title:"Previous page",children:e(ma,{size:14})}),X(P,L).map((p,g)=>p==="…"?e("span",{className:"px-1 text-[10px] font-mono text-ink/40 select-none",children:"…"},`gap-${g}`):e("button",{type:"button",onClick:()=>j(p),className:`min-w-[22px] h-[22px] px-1 rounded text-[10px] font-mono transition-colors ${p===P?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink hover:bg-ink/5"}`,children:p},p)),e("button",{type:"button",disabled:P>=L,onClick:()=>j(P+1),className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 disabled:opacity-30 disabled:hover:bg-transparent transition-colors",title:"Next page",children:e(se,{size:14})})]})]})]})}function dt({className:l="",enabled:r=!0,refreshKey:c=0}){let[x]=oe(),m=x.get("sessionId"),[t,b]=n(()=>J(m||"default","Session not started")),h=o(!1),w=a(()=>{if(typeof window>"u")return;let T=m?`?sessionId=${encodeURIComponent(m)}`:"";fetch(`/api/telemetry/context${T}`).then((N)=>N.ok?N.json():null).then((N)=>{if(!h.current&&N&&N.telemetry)b(N.telemetry)}).catch((N)=>{if(!h.current)console.warn("Failed to fetch context telemetry:",N)})},[m]);i(()=>{if(h.current=!1,!r)return;return w(),()=>{h.current=!0}},[r,c,w]);let v=we(m?pp(m):null,{enabled:r}),[k,E]=n(0);if(i(()=>{if(v.data)b(v.data),E((T)=>T+1)},[v.data]),!r)return e("div",{className:`flex flex-col h-full bg-paper items-center justify-center text-ink/40 ${l}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});if(t.messagesCount===0)return e("div",{className:`flex flex-col h-full bg-paper items-center justify-center text-ink/40 ${l}`,children:e("span",{className:"text-xs font-mono",children:"Session not started"})});return e("div",{className:`flex flex-col h-full bg-paper text-ink overflow-hidden select-none ${l}`,children:[e("div",{className:"flex-shrink-0 p-4 border-b border-ink/10 bg-paper",children:e("div",{className:"flex items-start justify-between gap-2",children:[e("div",{className:"min-w-0",children:[e("h2",{className:"text-xs font-medium text-ink tracking-tight truncate",children:t.sessionTitle}),e("div",{className:"text-[11px] text-ink/50 mt-1 truncate font-mono",children:t.timestamp})]}),e("button",{type:"button",onClick:()=>{v.refresh(),w()},disabled:!r,title:"Refresh context telemetry","aria-label":"Refresh context telemetry","aria-busy":v.refreshing,className:"flex-shrink-0 rounded-md border border-ink/15 bg-paper p-1.5 text-ink/80 transition-colors hover:bg-ink/5 disabled:opacity-50",children:e(C,{size:12,className:v.refreshing?"animate-spin text-ink":""})})]})}),e("div",{className:"flex-1 scrollbar-overlay-container p-4 space-y-4",children:[e(Z,{used:t.contextUsed,limit:t.contextLimit,percent:t.contextPercent}),e(V,{messagesCount:t.messagesCount,userCount:t.userCount,assistantCount:t.assistantCount,costFormatted:t.costFormatted,cacheHitAverage:t.cacheHitAverage,costBreakdown:t.costBreakdown}),e(Q,{input:t.lastMessage.input,output:t.lastMessage.output,reasoning:t.lastMessage.reasoning,cacheRead:t.lastMessage.cacheRead,cacheWrite:t.lastMessage.cacheWrite,cacheHitPercent:t.lastMessage.cacheHitPercent}),e(G,{userPercent:t.distribution.userPercent,assistantPercent:t.distribution.assistantPercent,toolPercent:t.distribution.toolPercent,otherPercent:t.distribution.otherPercent}),e(ee,{sessionId:m,refreshKey:c+k})]})]})}export{dt as ContextPanel};
|
|
1
|
+
import{d,n,i,o,u,a,oe,e,fp,we,S,s,f,I,se,fa,ie,pe,C,y,le,nt,PA,no}from"./index-4s8ttfxj.js";var ne={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]},O=s(ne);function J(l,r,c=1e6){return{sessionId:l,sessionTitle:r,modelId:"",modelName:"",timestamp:"",contextUsed:0,contextLimit:c,contextPercent:0,messagesCount:0,userCount:0,assistantCount:0,totalCost:0,costFormatted:"$0.00",cacheHitAverage:0,costBreakdown:{input:0,output:0,cacheRead:0,cacheWrite:0,total:0},lastMessage:{input:0,output:0,reasoning:0,cacheRead:0,cacheWrite:0,cacheHitPercent:0},distribution:{userTokens:0,userPercent:0,assistantTokens:0,assistantPercent:0,toolTokens:0,toolPercent:0,otherTokens:0,otherPercent:100},rawMessages:[]}}function Z({used:l,limit:r,percent:c}){let x=l.toLocaleString(),m=r.toLocaleString(),t=Math.min(100,Math.max(0,c));return e("div",{className:"bg-canvas border border-ink/10 rounded-xl p-4 transition-all",children:[e("div",{className:"flex items-center justify-between text-xs mb-2",children:[e("span",{className:"font-semibold text-ink/80",children:"Context"}),e("span",{className:"font-mono text-ink/70 text-[11px]",children:[x," / ",m]})]}),e("div",{className:"w-full h-1.5 bg-ink/10 rounded-full overflow-hidden mb-2",children:e("div",{className:"h-full bg-ink/70 rounded-full transition-all duration-500 ease-out",style:{width:`${t}%`}})}),e("div",{className:"text-[11px] font-mono text-ink/50 text-left",children:[t.toFixed(1),"% used"]})]})}function _(l){return l<0.01?"$0.01":`$${l.toFixed(6).replace(/0+$/,"").replace(/\.$/,"")}`}function z({open:l,onClose:r,breakdown:c,costFormatted:x}){let m=o(null);if(le(m,r),!l)return null;let t=c?[{label:"Total Cost",value:_(c.total),strong:!0},{label:"Input (cache miss)",value:_(c.input)},{label:"Output",value:_(c.output)},{label:"Cache Read (cache hit)",value:_(c.cacheRead)},{label:"Cache Write",value:_(c.cacheWrite)}]:[{label:"Total Cost",value:x??"$0.01",strong:!0}];return e("div",{ref:m,className:"glass-popover absolute top-full right-0 mt-1.5 z-50 w-64 bg-paper border border-ink/10 rounded-lg shadow-lg p-3",role:"dialog","aria-modal":"false",children:[e("div",{className:"flex items-center justify-between mb-2.5",children:[e("span",{className:"text-xs font-semibold text-ink tracking-tight",children:"Cost Breakdown"}),e("button",{type:"button",onClick:r,className:"p-1 rounded hover:bg-ink/5 text-ink/60 hover:text-ink transition-colors","aria-label":"Close cost breakdown",children:e(y,{size:14})})]}),e("div",{className:"space-y-1.5",children:t.map((b)=>e("div",{className:"flex items-center justify-between text-[11px] font-mono border-b border-ink/5 last:border-0 pb-1.5 last:pb-0",children:[e("span",{className:"text-ink/60",children:b.label}),e("span",{className:`${b.strong?"font-semibold text-ink":"text-ink/80"}`,children:b.value})]},b.label))})]})}function V({messagesCount:l,userCount:r,assistantCount:c,costFormatted:x,cacheHitAverage:m,costBreakdown:t}){let[b,h]=n(!1);return e(d,{children:[e("div",{className:"mb-1.5",children:e("span",{className:"text-xs font-semibold text-ink/80",children:"Session Stats"})}),e("div",{className:"flex gap-2 flex-wrap",children:[e(nt,{variant:"compact",label:"Messages",value:l}),e(nt,{variant:"compact",label:"User",value:r}),e(nt,{variant:"compact",label:"Assistant",value:c}),e(nt,{variant:"compact",label:"Cache Hit",value:m!==void 0?`${m.toFixed(1)}%`:"–"}),e("div",{className:"relative bg-canvas border border-ink/10 rounded-lg px-2.5 py-1.5 flex flex-col gap-0.5 flex-1 min-w-0",children:[e("span",{className:"text-[10px] font-medium text-ink/50 flex items-center gap-1",children:["Cost",e("button",{type:"button",onClick:()=>h(!0),className:"p-0.5 rounded text-ink/40 hover:text-ink hover:bg-ink/5 transition-colors","aria-label":"Show cost breakdown",title:"Cost breakdown",children:e(pe,{size:11})})]}),e("span",{className:"text-xs font-semibold font-mono text-ink truncate",children:x}),e(z,{open:b,onClose:()=>h(!1),breakdown:t,costFormatted:x})]})]})]})}function Q({input:l,output:r,reasoning:c,cacheRead:x,cacheWrite:m,cacheHitPercent:t}){return e(d,{children:[e("div",{className:"mb-1.5",children:e("span",{className:"text-xs font-semibold text-ink/80",children:"Last Assistant Message"})}),e("div",{className:"flex gap-2 flex-wrap",children:[e(nt,{variant:"compact",label:"In",value:l.toLocaleString()}),e(nt,{variant:"compact",label:"Out",value:r.toLocaleString()}),e(nt,{variant:"compact",label:"Reason",value:c.toLocaleString()}),e(nt,{variant:"compact",label:"Cache",value:`${x.toLocaleString()}/${m.toLocaleString()}`}),e(nt,{variant:"compact",label:"Hit",value:`${t.toFixed(1)}%`})]})]})}function G({userPercent:l,assistantPercent:r,toolPercent:c,otherPercent:x}){return e("div",{className:"space-y-2.5",children:[e("div",{className:"w-full h-1.5 rounded-full overflow-hidden flex bg-ink/10",children:[e("div",{className:"h-full bg-emerald-500 transition-all duration-300",style:{width:`${l}%`},title:`User: ${l}%`}),e("div",{className:"h-full bg-sky-500 transition-all duration-300",style:{width:`${r}%`},title:`Assistant: ${r}%`}),e("div",{className:"h-full bg-amber-500 transition-all duration-300",style:{width:`${c}%`},title:`Tool Calls: ${c}%`}),e("div",{className:"h-full bg-slate-400 transition-all duration-300",style:{width:`${x}%`},title:`Other: ${x}%`})]}),e("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-[11px] text-ink/70",children:[e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-emerald-500 flex-shrink-0"}),e("span",{children:["User ",l,"%"]})]}),e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-sky-500 flex-shrink-0"}),e("span",{children:["Assistant ",r,"%"]})]}),e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-amber-500 flex-shrink-0"}),e("span",{children:["Tool Calls ",c,"%"]})]}),e("div",{className:"flex items-center space-x-1.5",children:[e("span",{className:"w-2 h-2 rounded-full bg-slate-400 flex-shrink-0"}),e("span",{children:["Other ",x,"%"]})]})]})]})}function K({data:l}){no();let[r,c]=n(!1),x=o(null),m=o(null),t=JSON.stringify(l,null,2),b=PA(t),h=a((v)=>{let k=m.current;if(!k)return;k.scrollLeft=v.currentTarget.scrollLeft,k.scrollTop=v.currentTarget.scrollTop},[]),w=a(async(v)=>{v.stopPropagation();try{await navigator.clipboard.writeText(t)}catch{let k=document.createElement("textarea");k.value=t,k.style.position="fixed",k.style.opacity="0",document.body.appendChild(k),k.select(),document.execCommand("copy"),document.body.removeChild(k)}c(!0),setTimeout(()=>c(!1),2000)},[t]);return e("div",{className:"relative my-1.5 rounded-lg bg-paper/80 border border-ink/10 overflow-hidden",children:[e("div",{className:"flex items-center justify-between px-2.5 py-1.5 bg-ink/[0.04] border-b border-ink/10",children:[e("span",{className:"text-[10px] font-mono text-ink/50 select-none",children:[Object.keys(l).length," keys · ",t.length," chars"]}),e("button",{type:"button",onClick:w,className:"flex items-center space-x-1 px-2 py-1 rounded bg-canvas hover:bg-paper text-ink/70 hover:text-ink border border-ink/10 text-[10px] transition-colors shadow-xs",title:"Copy Pretty JSON",children:r?e(d,{children:[e(f,{size:11,className:"text-success"}),e("span",{className:"text-success font-sans font-medium",children:"Copied"})]}):e(d,{children:[e(ie,{size:11}),e("span",{className:"font-sans",children:"Copy JSON"})]})})]}),e("div",{className:"relative",children:[e("pre",{ref:m,"aria-hidden":!0,className:"absolute inset-0 p-2.5 m-0 font-mono text-[11px] leading-5 overflow-x-auto overflow-y-auto whitespace-pre pointer-events-none",dangerouslySetInnerHTML:{__html:b}}),e("pre",{ref:x,onScroll:h,className:"relative p-2.5 m-0 font-mono text-[11px] leading-5 overflow-x-auto overflow-y-auto whitespace-pre select-text selection:bg-ink selection:text-canvas",children:e("code",{className:"text-transparent",children:t})})]})]})}var B=["bg-emerald-500","bg-sky-500","bg-amber-500","bg-violet-500","bg-rose-500","bg-teal-500","bg-indigo-500","bg-fuchsia-500","bg-lime-500","bg-cyan-500","bg-orange-500","bg-pink-500","bg-yellow-500","bg-purple-500","bg-red-500","bg-blue-500","bg-green-500","bg-cyan-600","bg-violet-600","bg-amber-600"],W=20;function q(l){let r=0;for(let c=0;c<l.length;c++)r=r*31+l.charCodeAt(c)|0;return Math.abs(r)}function Y(l){let r=l.indexOf("/"),c=r>0?l.slice(0,r):l,x=r>0?l.slice(r+1):"";return x?`${c} · ${x}`:c}function X(l,r){if(r<=7)return Array.from({length:r},(b,h)=>h+1);let c=new Set([1,r,l,l-1,l+1]);if(l<=3)[2,3,4].forEach((b)=>c.add(b));if(l>=r-2)[r-3,r-2,r-1].forEach((b)=>c.add(b));let x=[...c].filter((b)=>b>=1&&b<=r).sort((b,h)=>b-h),m=[],t=0;for(let b of x){if(b-t>1)m.push("…");m.push(b),t=b}return m}function ee({sessionId:l,refreshKey:r=0}){let[c,x]=S("context.rawExpandedIds",{}),[m,t]=S("context.rawFilterRole","all"),[b,h]=n(1),[w,v]=n([]),[k,E]=n(0),[T,N]=n(!1),U=o(0),D=o(!1),A=a((p)=>{if(typeof window>"u")return;let g=++U.current;if(!p?.silent)N(!0);let R=new URLSearchParams({page:String(b),pageSize:String(W),role:m});if(l)R.set("sessionId",l);fetch(`/api/telemetry/raw-messages?${R.toString()}`).then((M)=>M.ok?M.json():null).then((M)=>{if(D.current||g!==U.current)return;v(M&&Array.isArray(M.items)?M.items:[]),E(M&&Number.isFinite(M.filteredTotal)?M.filteredTotal:0)}).catch(()=>{if(D.current||g!==U.current)return;v([]),E(0)}).finally(()=>{if(!p?.silent&&g===U.current)N(!1)})},[l,b,m]);i(()=>(D.current=!1,A(),()=>{D.current=!0}),[A,r]);let L=Math.max(1,Math.ceil(k/W)),P=Math.min(b,L),j=(p)=>h(Math.min(Math.max(1,p),L)),te=(p)=>{x((g)=>({...g,[p]:!g[p]}))},ae=()=>{if(w.every((g)=>c[g.id]))x({});else{let g={};w.forEach((R)=>{g[R.id]=!0}),x(g)}},F=u(()=>{let p=[];for(let g of w){let R=g.info.modelID;if(!R||p.includes(R))continue;p.push(R)}return p},[w]),H=(p)=>p?B[q(p)%B.length]:"bg-ink/20";return e("div",{className:"space-y-3",children:[F.length>0&&e("div",{children:[e("div",{className:"mb-1.5",children:e("span",{className:"text-xs font-semibold text-ink/80",children:"Legend"})}),e("div",{className:"bg-canvas border border-ink/10 rounded-xl px-3 py-2",children:e("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-[10px] font-mono text-ink/60",children:F.map((p)=>e("span",{className:"flex items-center gap-1.5",children:[e("span",{className:`w-2 h-2 rounded-full ${H(p)}`}),e("span",{children:Y(p)})]},p))})})]}),e("div",{className:"flex items-center justify-between",children:[e("div",{className:"flex items-center space-x-2",children:[e("span",{className:"text-xs font-semibold text-ink/80",children:"Raw Messages"}),e("span",{className:"text-[10px] font-mono text-ink/50 bg-ink/5 px-1.5 py-0.5 rounded-full border border-ink/10",children:k})]}),e("div",{className:"flex items-center space-x-1",children:[e("div",{className:"flex items-center bg-canvas border border-ink/10 rounded-lg p-0.5 text-[10px]",children:[e("button",{type:"button",onClick:()=>{t("all"),h(1)},className:`px-1.5 py-0.5 rounded ${m==="all"?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink"}`,children:"All"}),e("button",{type:"button",onClick:()=>{t("assistant"),h(1)},className:`px-1.5 py-0.5 rounded ${m==="assistant"?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink"}`,children:"AI"}),e("button",{type:"button",onClick:()=>{t("user"),h(1)},className:`px-1.5 py-0.5 rounded ${m==="user"?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink"}`,children:"User"})]}),e("button",{type:"button",onClick:ae,className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 transition-colors text-[10px] flex items-center",title:"Expand / Collapse All",children:e(O,{size:14})})]})]}),e("div",{className:"space-y-1.5",children:!T&&w.length===0?e("div",{className:"p-4 text-center text-xs text-ink/40 italic bg-canvas rounded-xl border border-ink/10",children:"No raw messages recorded yet."}):w.map((p)=>{let g=Boolean(c[p.id]);return e("div",{className:`bg-canvas border border-ink/10 rounded-xl overflow-hidden transition-all duration-200 ${T?"opacity-50":""}`,children:[e("button",{type:"button",onClick:()=>te(p.id),className:"w-full text-left px-3.5 py-2.5 flex items-center justify-between hover:bg-ink/5 transition-colors cursor-pointer",children:[e("div",{className:"flex items-center space-x-2 min-w-0 flex-1 mr-2",children:[e("span",{className:"text-ink/40 flex-shrink-0",children:g?e(I,{size:14}):e(se,{size:14})}),e("span",{className:"text-xs font-mono text-ink/90 truncate",children:p.badgeLabel})]}),e("div",{className:"flex items-center space-x-3 text-[11px] font-mono text-ink/50 flex-shrink-0",children:[p.tokenSummary&&e("span",{className:"text-ink/60",children:p.tokenSummary}),e("span",{className:"flex items-center gap-1.5",children:[e("span",{className:`w-2 h-2 rounded-full ${H(p.info.modelID)}`}),e("span",{children:p.timestamp})]})]})]}),g&&e("div",{className:"px-3.5 pb-3 pt-1 border-t border-ink/5 bg-canvas/60",children:e(K,{data:p.rawPayload})})]},p.id)})}),L>1&&e("div",{className:"flex items-center justify-between pt-1",children:[e("span",{className:"text-[10px] font-mono text-ink/50",children:[(P-1)*W+1,"–",Math.min(P*W,k)," of ",k]}),e("div",{className:"flex items-center gap-0.5",children:[e("button",{type:"button",disabled:P<=1,onClick:()=>j(P-1),className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 disabled:opacity-30 disabled:hover:bg-transparent transition-colors",title:"Previous page",children:e(fa,{size:14})}),X(P,L).map((p,g)=>p==="…"?e("span",{className:"px-1 text-[10px] font-mono text-ink/40 select-none",children:"…"},`gap-${g}`):e("button",{type:"button",onClick:()=>j(p),className:`min-w-[22px] h-[22px] px-1 rounded text-[10px] font-mono transition-colors ${p===P?"bg-ink text-canvas font-medium":"text-ink/60 hover:text-ink hover:bg-ink/5"}`,children:p},p)),e("button",{type:"button",disabled:P>=L,onClick:()=>j(P+1),className:"p-1 rounded text-ink/60 hover:text-ink hover:bg-ink/5 disabled:opacity-30 disabled:hover:bg-transparent transition-colors",title:"Next page",children:e(se,{size:14})})]})]})]})}function dt({className:l="",enabled:r=!0,refreshKey:c=0}){let[x]=oe(),m=x.get("sessionId"),[t,b]=n(()=>J(m||"default","Session not started")),h=o(!1),w=a(()=>{if(typeof window>"u")return;let T=m?`?sessionId=${encodeURIComponent(m)}`:"";fetch(`/api/telemetry/context${T}`).then((N)=>N.ok?N.json():null).then((N)=>{if(!h.current&&N&&N.telemetry)b(N.telemetry)}).catch((N)=>{if(!h.current)console.warn("Failed to fetch context telemetry:",N)})},[m]);i(()=>{if(h.current=!1,!r)return;return w(),()=>{h.current=!0}},[r,c,w]);let v=we(m?fp(m):null,{enabled:r}),[k,E]=n(0);if(i(()=>{if(v.data)b(v.data),E((T)=>T+1)},[v.data]),!r)return e("div",{className:`flex flex-col h-full bg-paper items-center justify-center text-ink/40 ${l}`,children:e("span",{className:"text-xs font-mono text-muted",children:"No session selected"})});if(t.messagesCount===0)return e("div",{className:`flex flex-col h-full bg-paper items-center justify-center text-ink/40 ${l}`,children:e("span",{className:"text-xs font-mono",children:"Session not started"})});return e("div",{className:`flex flex-col h-full bg-paper text-ink overflow-hidden select-none ${l}`,children:[e("div",{className:"flex-shrink-0 p-4 border-b border-ink/10 bg-paper",children:e("div",{className:"flex items-start justify-between gap-2",children:[e("div",{className:"min-w-0",children:[e("h2",{className:"text-xs font-medium text-ink tracking-tight truncate",children:t.sessionTitle}),e("div",{className:"text-[11px] text-ink/50 mt-1 truncate font-mono",children:t.timestamp})]}),e("button",{type:"button",onClick:()=>{v.refresh(),w()},disabled:!r,title:"Refresh context telemetry","aria-label":"Refresh context telemetry","aria-busy":v.refreshing,className:"flex-shrink-0 rounded-md border border-ink/15 bg-paper p-1.5 text-ink/80 transition-colors hover:bg-ink/5 disabled:opacity-50",children:e(C,{size:12,className:v.refreshing?"animate-spin text-ink":""})})]})}),e("div",{className:"flex-1 scrollbar-overlay-container p-4 space-y-4",children:[e(Z,{used:t.contextUsed,limit:t.contextLimit,percent:t.contextPercent}),e(V,{messagesCount:t.messagesCount,userCount:t.userCount,assistantCount:t.assistantCount,costFormatted:t.costFormatted,cacheHitAverage:t.cacheHitAverage,costBreakdown:t.costBreakdown}),e(Q,{input:t.lastMessage.input,output:t.lastMessage.output,reasoning:t.lastMessage.reasoning,cacheRead:t.lastMessage.cacheRead,cacheWrite:t.lastMessage.cacheWrite,cacheHitPercent:t.lastMessage.cacheHitPercent}),e(G,{userPercent:t.distribution.userPercent,assistantPercent:t.distribution.assistantPercent,toolPercent:t.distribution.toolPercent,otherPercent:t.distribution.otherPercent}),e(ee,{sessionId:m,refreshKey:c+k})]})]})}export{dt as ContextPanel};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d,n,i,o,u,a,e,si,s,m,D,Pr,Qo,f,ie,Tt,fe,C,F,vp,J,gn,Ul,kp,_u}from"./index-y139vc12.js";var Y={name:"clipboard-paste",size:24,node:[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]]},Ss=s(Y);var K={name:"folder-git-2",size:24,node:[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]},cp=s(K);function _({row:t,active:r,name:p,loading:c,onSelect:l,onCopyPath:g,onReveal:M}){return e("div",{className:"grid grid-cols-[1rem_minmax(0,1fr)_3.5rem] items-start gap-x-2 px-4 py-2 border-b border-ink/5 last:border-b-0 hover:bg-ink/[0.02] group/row transition-colors",children:[e("div",{className:"h-5 flex items-center justify-center",children:r&&e(f,{size:12,className:"text-ink","aria-label":"Selected repository"})}),e("button",{type:"button",onClick:l,disabled:r||!t.isRepo,title:!t.isRepo?t.error??"Not a git repository":r?"Already showing this repository":`Show ${t.path}`,className:"min-w-0 text-left cursor-pointer disabled:cursor-default",children:e("div",{className:"h-5 flex items-center gap-1.5 min-w-0",children:[e(fe,{size:11,className:r?"text-ink/60 flex-shrink-0":"text-ink/40 flex-shrink-0"}),e("span",{className:`truncate text-xs ${r?"font-semibold text-ink":"text-ink/90"}`,children:p})]})}),e("div",{className:"h-5 flex items-center justify-end gap-0.5 touch-visible opacity-0 group-hover/row:opacity-100",children:[e("button",{type:"button",onClick:g,disabled:c,title:`Copy the absolute path of ${t.path}`,"aria-label":`Copy path of ${t.path}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors disabled:opacity-30 disabled:cursor-default",children:e(ie,{size:11})}),e("button",{type:"button",onClick:M,title:`Reveal ${t.path} in the file manager`,"aria-label":`Reveal ${t.path}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(Tt,{size:11})})]}),e("div",{className:"col-start-2 col-span-2 flex flex-wrap items-center gap-x-2 gap-y-0.5 min-w-0 mt-0.5",children:[t.isRepo?e(d,{children:[e("span",{className:`text-[10px] font-mono truncate ${t.detached?"text-warning":"text-ink/50"}`,title:t.detached?`Detached HEAD at ${t.branch}`:`On branch ${t.branch}`,children:t.branch}),e("span",{className:"text-[10px] text-ink/25","aria-hidden":!0,children:"·"}),e(X,{row:t})]}):e("span",{className:"text-[10px] text-ink/40 truncate",children:t.error??"Not a git repository"}),t.isRepo&&t.subject&&e(d,{children:[e("span",{className:"text-[10px] text-ink/25","aria-hidden":!0,children:"·"}),e("span",{className:"text-[10px] text-ink/40 truncate min-w-0",title:t.subject,children:t.subject})]})]})]})}function X({row:t}){let r=[];if(t.operation)r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:t.operation==="stash-pop"?`A stash pop stopped on ${t.conflicts} conflict(s)`:`A ${si[t.operation]} is in progress, stopped on ${t.conflicts} conflict(s)`,children:[e(D,{size:9}),si[t.operation]]},"operation"));else if(t.conflicts>0)r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:`${t.conflicts} conflicted path(s)`,children:[e(D,{size:9}),t.conflicts]},"conflicts"));if(t.changed>0||t.untracked>0)r.push(e("span",{className:"flex-shrink-0 rounded border border-info/30 px-1 text-[10px] font-mono tabular-nums text-info",title:`${t.changed} changed, ${t.untracked} untracked`,children:[t.changed>0?`${t.changed}±`:"",t.changed>0&&t.untracked>0?" ":"",t.untracked>0?`${t.untracked}?`:""]},"dirty"));if(t.gone)r.push(e("span",{className:"flex-shrink-0 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:`${t.upstream} no longer exists on the remote — fetch --prune to drop it`,children:"gone"},"gone"));else if(t.upstream&&(t.ahead>0||t.behind>0))r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 text-[10px] font-mono tabular-nums text-ink/60",title:`${t.ahead} ahead of, ${t.behind} behind ${t.upstream}`,children:[t.ahead>0&&e("span",{className:"flex items-center",children:[e(Qo,{size:9}),t.ahead]}),t.behind>0&&e("span",{className:"flex items-center",children:[e(Pr,{size:9}),t.behind]})]},"track"));if(r.length===0)return e("span",{className:"text-[10px] font-mono text-ink/30",title:"Nothing to report: clean and in sync",children:"clean, in sync"});return e(d,{children:r})}function q(t){let{open:r,rootPath:p,scanning:c}=t,[l,g]=n([]),[M,y]=n(!1),[S,P]=n(!1),[k,v]=n(null),[w,j]=n(0),E=t.repos.join("\x00"),G=o(!0),b=o(null);i(()=>(G.current=!0,()=>{G.current=!1,b.current?.abort(),b.current=null}),[]);let A=a(async()=>{b.current?.abort();let R=new AbortController;b.current=R,P(!0),y(!0);try{let N=new URLSearchParams({repoDetails:"1"});if(p)N.set("root",p);let L=await fetch(`/api/fs/git?${N.toString()}`,{signal:R.signal}),T=await L.json();if(!G.current||b.current!==R)return;if(!L.ok||!Array.isArray(T.details)){v(T.error||`Failed to read repositories (HTTP ${L.status})`);return}g(T.details),v(null)}catch(N){if(!G.current||b.current!==R)return;if(N instanceof Error&&N.name==="AbortError")return;v(N instanceof Error?N.message:"Failed to read repositories")}finally{if(G.current&&b.current===R)b.current=null,P(!1),y(!1)}},[p]);i(()=>{if(!r){g([]),v(null),y(!1);return}A()},[r,A,E,c,w]);let O=a(()=>j((R)=>R+1),[]);return{details:l,loading:M,reading:S,error:k,refresh:O}}function I(t){let r=new Map;for(let p of t){if(!p||p==="."){if(!r.has(""))r.set("",{key:"",label:null,paths:[]});r.get("").paths.push(".");continue}let c=p.indexOf("/"),l=c===-1?"":p.slice(0,c),g=r.get(l);if(!g)g={key:l,label:l===""?null:l,paths:[]},r.set(l,g);g.paths.push(p)}for(let p of r.values())p.paths.sort((c,l)=>c==="."?-1:l==="."?1:c.localeCompare(l));return[...r.values()].sort((p,c)=>{if(p.key==="")return-1;if(c.key==="")return 1;return p.key.localeCompare(c.key)})}function B(t,r){if(t===".")return"workspace root";if(r==="")return t;return t.slice(r.length+1)}function U({isOpen:t,rootPath:r,activeRepo:p,repos:c,scanning:l,onSelectRepo:g,onRefreshRepos:M,onClose:y}){let[S,P]=n(""),[k,v]=n(null),{details:w,loading:j,reading:E,error:G,refresh:b}=q({open:t,rootPath:r,repos:c,scanning:l});i(()=>{if(!t)P(""),v(null)},[t]);let A=u(()=>{let x=S.trim().toLowerCase();if(!x)return w;return w.filter((h)=>h.path.toLowerCase().includes(x))},[w,S]),O=u(()=>I(A.map((x)=>x.path)),[A]),R=u(()=>{let x=new Map;for(let h of w)x.set(h.path,h);return x},[w]),N=a(()=>{M(),b()},[M,b]),L=a(async(x)=>{let h=r?_u(r,x==="."?"":x):x,z=await gn(h);v(z?{text:`Copied ${h}`,kind:"success"}:{text:"Clipboard unavailable",kind:"error"})},[r]),T=a(async(x)=>{let h=new FormData;if(h.append("actionType","open_explorer"),h.append("path","."),h.append("repo",x),r)h.append("root",r);try{let z=await fetch("/api/fs/action",{method:"POST",body:h}),H=await z.json();if(!z.ok||H.error)v({text:H.error||"Could not open the file manager",kind:"error"})}catch{v({text:"Could not open the file manager",kind:"error"})}},[r]);if(!t)return null;return e(J,{onClose:y,maxWidthClass:"max-w-[min(96vw,720px)]",header:e("div",{className:"flex items-center gap-2 min-w-0",children:[e(cp,{size:14,className:"text-ink/60 flex-shrink-0"}),e("h2",{className:"text-sm font-semibold text-ink",children:"Repositories"}),e("span",{className:"text-[10px] font-mono text-ink/50 truncate",children:[c.length," in this workspace"]})]}),children:[e("div",{className:"px-5 py-3 flex items-center gap-2 border-b border-ink/10",children:[e(F,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{type:"text",value:S,onChange:(x)=>P(x.currentTarget.value),placeholder:"Filter repositories…","aria-label":"Filter repositories",className:"flex-1 min-w-0 bg-transparent outline-none text-xs text-ink placeholder-ink/40",autoFocus:!0}),e("button",{type:"button",onClick:N,disabled:E||l,title:"Re-discover repositories and re-read their state","aria-label":"Refresh repositories",className:"text-ink/40 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 flex-shrink-0",children:e(C,{size:12,className:E||l?"animate-spin":""})})]}),l&&e("div",{className:"px-5 py-1.5 border-b border-ink/10 text-[10px] font-mono text-ink/50 flex items-center gap-1.5",children:[e(m,{size:10,className:"animate-spin"}),"Still discovering repositories in this workspace…"]}),k&&e("div",{className:`px-5 py-1.5 border-b border-ink/10 text-[10px] font-mono truncate ${k.kind==="error"?"text-error":"text-ink/60"}`,title:k.text,role:"status",children:k.text}),e("div",{className:"min-h-[40vh] max-h-[60vh] overflow-y-auto scrollbar-overlay-container",children:j&&w.length===0?e("div",{className:"flex items-center justify-center gap-2 py-12 text-xs text-ink/50 font-mono",children:[e(m,{size:14,className:"animate-spin text-info"}),"Reading repositories…"]}):G?e("div",{className:"py-12 px-6 text-center text-xs text-error font-mono",children:G}):A.length===0?e("div",{className:"py-12 text-center text-xs text-ink/40 font-mono",children:S.trim()?"No matching repositories.":"No repositories in this workspace."}):O.map((x)=>e("div",{children:[e("div",{className:"px-4 py-1 text-[10px] uppercase tracking-wider text-ink/40 font-semibold bg-canvas/40 border-b border-ink/5 sticky top-0",children:x.label??Ul(".",r)}),x.paths.map((h)=>{let z=R.get(h);if(!z)return null;return e(_,{row:z,active:h===p,name:B(h,x.key),loading:E,onSelect:()=>{g(h),y()},onCopyPath:()=>void L(h),onReveal:()=>void T(h)},h)})]},x.key))})]})}function mr({rootPath:t,activeRepo:r,onSelectRepo:p,repos:c,scanning:l,onRefreshRepos:g}){let[M,y]=n(!1),S=u(()=>({root:t??null,repo:r,rows:c.map((k)=>({repo:k,label:Ul(k,t),short:kp(k,t)})),scanning:l,ready:!0,setRepo:p,refresh:g}),[t,r,c,l,p,g]),P=a(()=>y(!0),[]);return e("div",{className:"relative",children:[e(vp,{scope:S,onManage:P}),e(U,{isOpen:M,rootPath:t,activeRepo:r,repos:c,scanning:l,onSelectRepo:p,onRefreshRepos:g,onClose:()=>y(!1)})]})}var W="(pointer: coarse)",V="(hover: none)";function Q(){if(typeof window>"u")return!1;if(window.matchMedia(W).matches)return!0;return navigator.maxTouchPoints>0&&window.matchMedia(V).matches}function Eu(){let[t,r]=n(Q);return i(()=>{let p=[W,V].map((l)=>window.matchMedia(l)),c=()=>r(Q());for(let l of p)l.addEventListener("change",c);return()=>{for(let l of p)l.removeEventListener("change",c)}},[]),t}
|
|
2
|
-
export{Ss,
|
|
1
|
+
import{d,n,i,o,u,a,e,li,s,m,D,Or,No,f,ie,Dt,fe,C,F,xp,J,hn,Gl,wp,Tu}from"./index-4s8ttfxj.js";var Y={name:"clipboard-paste",size:24,node:[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]]},Ss=s(Y);var K={name:"folder-git-2",size:24,node:[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]]},dp=s(K);function _({row:t,active:r,name:p,loading:c,onSelect:l,onCopyPath:g,onReveal:M}){return e("div",{className:"grid grid-cols-[1rem_minmax(0,1fr)_3.5rem] items-start gap-x-2 px-4 py-2 border-b border-ink/5 last:border-b-0 hover:bg-ink/[0.02] group/row transition-colors",children:[e("div",{className:"h-5 flex items-center justify-center",children:r&&e(f,{size:12,className:"text-ink","aria-label":"Selected repository"})}),e("button",{type:"button",onClick:l,disabled:r||!t.isRepo,title:!t.isRepo?t.error??"Not a git repository":r?"Already showing this repository":`Show ${t.path}`,className:"min-w-0 text-left cursor-pointer disabled:cursor-default",children:e("div",{className:"h-5 flex items-center gap-1.5 min-w-0",children:[e(fe,{size:11,className:r?"text-ink/60 flex-shrink-0":"text-ink/40 flex-shrink-0"}),e("span",{className:`truncate text-xs ${r?"font-semibold text-ink":"text-ink/90"}`,children:p})]})}),e("div",{className:"h-5 flex items-center justify-end gap-0.5 touch-visible opacity-0 group-hover/row:opacity-100",children:[e("button",{type:"button",onClick:g,disabled:c,title:`Copy the absolute path of ${t.path}`,"aria-label":`Copy path of ${t.path}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors disabled:opacity-30 disabled:cursor-default",children:e(ie,{size:11})}),e("button",{type:"button",onClick:M,title:`Reveal ${t.path} in the file manager`,"aria-label":`Reveal ${t.path}`,className:"w-5 h-5 flex items-center justify-center rounded text-ink/40 hover:text-ink hover:bg-ink/10 cursor-pointer transition-colors",children:e(Dt,{size:11})})]}),e("div",{className:"col-start-2 col-span-2 flex flex-wrap items-center gap-x-2 gap-y-0.5 min-w-0 mt-0.5",children:[t.isRepo?e(d,{children:[e("span",{className:`text-[10px] font-mono truncate ${t.detached?"text-warning":"text-ink/50"}`,title:t.detached?`Detached HEAD at ${t.branch}`:`On branch ${t.branch}`,children:t.branch}),e("span",{className:"text-[10px] text-ink/25","aria-hidden":!0,children:"·"}),e(X,{row:t})]}):e("span",{className:"text-[10px] text-ink/40 truncate",children:t.error??"Not a git repository"}),t.isRepo&&t.subject&&e(d,{children:[e("span",{className:"text-[10px] text-ink/25","aria-hidden":!0,children:"·"}),e("span",{className:"text-[10px] text-ink/40 truncate min-w-0",title:t.subject,children:t.subject})]})]})]})}function X({row:t}){let r=[];if(t.operation)r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:t.operation==="stash-pop"?`A stash pop stopped on ${t.conflicts} conflict(s)`:`A ${li[t.operation]} is in progress, stopped on ${t.conflicts} conflict(s)`,children:[e(D,{size:9}),li[t.operation]]},"operation"));else if(t.conflicts>0)r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:`${t.conflicts} conflicted path(s)`,children:[e(D,{size:9}),t.conflicts]},"conflicts"));if(t.changed>0||t.untracked>0)r.push(e("span",{className:"flex-shrink-0 rounded border border-info/30 px-1 text-[10px] font-mono tabular-nums text-info",title:`${t.changed} changed, ${t.untracked} untracked`,children:[t.changed>0?`${t.changed}±`:"",t.changed>0&&t.untracked>0?" ":"",t.untracked>0?`${t.untracked}?`:""]},"dirty"));if(t.gone)r.push(e("span",{className:"flex-shrink-0 rounded border border-warning/30 px-1 text-[10px] font-mono text-warning",title:`${t.upstream} no longer exists on the remote — fetch --prune to drop it`,children:"gone"},"gone"));else if(t.upstream&&(t.ahead>0||t.behind>0))r.push(e("span",{className:"flex flex-shrink-0 items-center gap-0.5 text-[10px] font-mono tabular-nums text-ink/60",title:`${t.ahead} ahead of, ${t.behind} behind ${t.upstream}`,children:[t.ahead>0&&e("span",{className:"flex items-center",children:[e(No,{size:9}),t.ahead]}),t.behind>0&&e("span",{className:"flex items-center",children:[e(Or,{size:9}),t.behind]})]},"track"));if(r.length===0)return e("span",{className:"text-[10px] font-mono text-ink/30",title:"Nothing to report: clean and in sync",children:"clean, in sync"});return e(d,{children:r})}function q(t){let{open:r,rootPath:p,scanning:c}=t,[l,g]=n([]),[M,y]=n(!1),[S,P]=n(!1),[k,v]=n(null),[w,j]=n(0),E=t.repos.join("\x00"),G=o(!0),b=o(null);i(()=>(G.current=!0,()=>{G.current=!1,b.current?.abort(),b.current=null}),[]);let A=a(async()=>{b.current?.abort();let R=new AbortController;b.current=R,P(!0),y(!0);try{let N=new URLSearchParams({repoDetails:"1"});if(p)N.set("root",p);let L=await fetch(`/api/fs/git?${N.toString()}`,{signal:R.signal}),T=await L.json();if(!G.current||b.current!==R)return;if(!L.ok||!Array.isArray(T.details)){v(T.error||`Failed to read repositories (HTTP ${L.status})`);return}g(T.details),v(null)}catch(N){if(!G.current||b.current!==R)return;if(N instanceof Error&&N.name==="AbortError")return;v(N instanceof Error?N.message:"Failed to read repositories")}finally{if(G.current&&b.current===R)b.current=null,P(!1),y(!1)}},[p]);i(()=>{if(!r){g([]),v(null),y(!1);return}A()},[r,A,E,c,w]);let O=a(()=>j((R)=>R+1),[]);return{details:l,loading:M,reading:S,error:k,refresh:O}}function I(t){let r=new Map;for(let p of t){if(!p||p==="."){if(!r.has(""))r.set("",{key:"",label:null,paths:[]});r.get("").paths.push(".");continue}let c=p.indexOf("/"),l=c===-1?"":p.slice(0,c),g=r.get(l);if(!g)g={key:l,label:l===""?null:l,paths:[]},r.set(l,g);g.paths.push(p)}for(let p of r.values())p.paths.sort((c,l)=>c==="."?-1:l==="."?1:c.localeCompare(l));return[...r.values()].sort((p,c)=>{if(p.key==="")return-1;if(c.key==="")return 1;return p.key.localeCompare(c.key)})}function B(t,r){if(t===".")return"workspace root";if(r==="")return t;return t.slice(r.length+1)}function U({isOpen:t,rootPath:r,activeRepo:p,repos:c,scanning:l,onSelectRepo:g,onRefreshRepos:M,onClose:y}){let[S,P]=n(""),[k,v]=n(null),{details:w,loading:j,reading:E,error:G,refresh:b}=q({open:t,rootPath:r,repos:c,scanning:l});i(()=>{if(!t)P(""),v(null)},[t]);let A=u(()=>{let x=S.trim().toLowerCase();if(!x)return w;return w.filter((h)=>h.path.toLowerCase().includes(x))},[w,S]),O=u(()=>I(A.map((x)=>x.path)),[A]),R=u(()=>{let x=new Map;for(let h of w)x.set(h.path,h);return x},[w]),N=a(()=>{M(),b()},[M,b]),L=a(async(x)=>{let h=r?Tu(r,x==="."?"":x):x,z=await hn(h);v(z?{text:`Copied ${h}`,kind:"success"}:{text:"Clipboard unavailable",kind:"error"})},[r]),T=a(async(x)=>{let h=new FormData;if(h.append("actionType","open_explorer"),h.append("path","."),h.append("repo",x),r)h.append("root",r);try{let z=await fetch("/api/fs/action",{method:"POST",body:h}),H=await z.json();if(!z.ok||H.error)v({text:H.error||"Could not open the file manager",kind:"error"})}catch{v({text:"Could not open the file manager",kind:"error"})}},[r]);if(!t)return null;return e(J,{onClose:y,maxWidthClass:"max-w-[min(96vw,720px)]",header:e("div",{className:"flex items-center gap-2 min-w-0",children:[e(dp,{size:14,className:"text-ink/60 flex-shrink-0"}),e("h2",{className:"text-sm font-semibold text-ink",children:"Repositories"}),e("span",{className:"text-[10px] font-mono text-ink/50 truncate",children:[c.length," in this workspace"]})]}),children:[e("div",{className:"px-5 py-3 flex items-center gap-2 border-b border-ink/10",children:[e(F,{size:12,className:"text-ink/40 flex-shrink-0"}),e("input",{type:"text",value:S,onChange:(x)=>P(x.currentTarget.value),placeholder:"Filter repositories…","aria-label":"Filter repositories",className:"flex-1 min-w-0 bg-transparent outline-none text-xs text-ink placeholder-ink/40",autoFocus:!0}),e("button",{type:"button",onClick:N,disabled:E||l,title:"Re-discover repositories and re-read their state","aria-label":"Refresh repositories",className:"text-ink/40 hover:text-ink transition-colors cursor-pointer disabled:opacity-40 flex-shrink-0",children:e(C,{size:12,className:E||l?"animate-spin":""})})]}),l&&e("div",{className:"px-5 py-1.5 border-b border-ink/10 text-[10px] font-mono text-ink/50 flex items-center gap-1.5",children:[e(m,{size:10,className:"animate-spin"}),"Still discovering repositories in this workspace…"]}),k&&e("div",{className:`px-5 py-1.5 border-b border-ink/10 text-[10px] font-mono truncate ${k.kind==="error"?"text-error":"text-ink/60"}`,title:k.text,role:"status",children:k.text}),e("div",{className:"min-h-[40vh] max-h-[60vh] overflow-y-auto scrollbar-overlay-container",children:j&&w.length===0?e("div",{className:"flex items-center justify-center gap-2 py-12 text-xs text-ink/50 font-mono",children:[e(m,{size:14,className:"animate-spin text-info"}),"Reading repositories…"]}):G?e("div",{className:"py-12 px-6 text-center text-xs text-error font-mono",children:G}):A.length===0?e("div",{className:"py-12 text-center text-xs text-ink/40 font-mono",children:S.trim()?"No matching repositories.":"No repositories in this workspace."}):O.map((x)=>e("div",{children:[e("div",{className:"px-4 py-1 text-[10px] uppercase tracking-wider text-ink/40 font-semibold bg-canvas/40 border-b border-ink/5 sticky top-0",children:x.label??Gl(".",r)}),x.paths.map((h)=>{let z=R.get(h);if(!z)return null;return e(_,{row:z,active:h===p,name:B(h,x.key),loading:E,onSelect:()=>{g(h),y()},onCopyPath:()=>void L(h),onReveal:()=>void T(h)},h)})]},x.key))})]})}function fr({rootPath:t,activeRepo:r,onSelectRepo:p,repos:c,scanning:l,onRefreshRepos:g}){let[M,y]=n(!1),S=u(()=>({root:t??null,repo:r,rows:c.map((k)=>({repo:k,label:Gl(k,t),short:wp(k,t)})),scanning:l,ready:!0,setRepo:p,refresh:g}),[t,r,c,l,p,g]),P=a(()=>y(!0),[]);return e("div",{className:"relative",children:[e(xp,{scope:S,onManage:P}),e(U,{isOpen:M,rootPath:t,activeRepo:r,repos:c,scanning:l,onSelectRepo:p,onRefreshRepos:g,onClose:()=>y(!1)})]})}var W="(pointer: coarse)",V="(hover: none)";function Q(){if(typeof window>"u")return!1;if(window.matchMedia(W).matches)return!0;return navigator.maxTouchPoints>0&&window.matchMedia(V).matches}function Iu(){let[t,r]=n(Q);return i(()=>{let p=[W,V].map((l)=>window.matchMedia(l)),c=()=>r(Q());for(let l of p)l.addEventListener("change",c);return()=>{for(let l of p)l.removeEventListener("change",c)}},[]),t}
|
|
2
|
+
export{Ss,dp,fr,Iu};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{t,l,ot,
|
|
1
|
+
import{t,l,ot,aa,x,R,M,O,P,z,j,G,p,ia,Bo,h,nr,rr,H,An,st,Ye,Je,zn,Ol,_t,St,xn,Tt,lt}from"./index-hc2jmzpx.js";import{Nt}from"./index-4s8ttfxj.js";import{Na}from"./index-9sd0vjmh.js";var h1="flowchart-",d1=class{constructor(){this.vertexCounter=0,this.config=p(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=M,this.setAccDescription=P,this.setDiagramTitle=j,this.getAccTitle=O,this.getAccDescription=z,this.getDiagramTitle=G,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{t(this,"FlowDB")}sanitizeText(e){return x.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case"markdown":case"string":case"text":return e;default:return"markdown"}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let r of this.vertices.values())if(r.id===e)return this.diagramId?`${this.diagramId}-${r.domId}`:r.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,r,a,n,o,k,c={},A){if(!e||e.trim().length===0)return;let f;if(A!==void 0){let T;if(!A.includes(`
|
|
2
2
|
`))T=`{
|
|
3
3
|
`+A+`
|
|
4
4
|
}`;else T=A+`
|
|
5
|
-
`;f=
|
|
5
|
+
`;f=rr(T,{schema:nr})}let I=this.subGraphLookup.get(e);if(I&&f){I.metadata={...I.metadata,...f};return}let _=this.edges.find((T)=>T.id===e);if(_){let T=f;if(T?.animate!==void 0)_.animate=T.animate;if(T?.animation!==void 0)_.animation=T.animation;if(T?.curve!==void 0)_.interpolate=T.curve;return}let L,D=this.vertices.get(e);if(D===void 0){if(r===void 0&&a===void 0&&n!==void 0&&n!==null)l.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`);D={id:e,labelType:"text",domId:h1+e+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,D)}if(this.vertexCounter++,r!==void 0){if(this.config=p(),L=this.sanitizeText(r.text.trim()),D.labelType=r.type,L.startsWith('"')&&L.endsWith('"'))L=L.substring(1,L.length-1);D.text=L}else if(D.text===void 0)D.text=e;if(a!==void 0)D.type=a;if(n!==void 0&&n!==null)n.forEach((T)=>{D.styles.push(T)});if(o!==void 0&&o!==null)o.forEach((T)=>{D.classes.push(T)});if(k!==void 0)D.dir=k;if(D.props===void 0)D.props=c;else if(c!==void 0)Object.assign(D.props,c);if(f!==void 0){if(f.shape){if(f.shape!==f.shape.toLowerCase()||f.shape.includes("_"))throw Error(`No such shape: ${f.shape}. Shape names should be lowercase.`);else if(!Ol(f.shape))throw Error(`No such shape: ${f.shape}.`);D.type=f?.shape}if(f?.label)D.text=f?.label,D.labelType=this.sanitizeNodeLabelType(f?.labelType);if(f?.icon){if(D.icon=f?.icon,!f.label?.trim()&&D.text===e)D.text=""}if(f?.form)D.form=f?.form;if(f?.pos)D.pos=f?.pos;if(f?.img){if(D.img=f?.img,!f.label?.trim()&&D.text===e)D.text=""}if(f?.constraint)D.constraint=f.constraint;if(f.w)D.assetWidth=Number(f.w);if(f.h)D.assetHeight=Number(f.h)}}addSingleLink(e,r,a,n){let c={start:e,end:r,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};l.info("abc78 Got edge...",c);let A=a.text;if(A!==void 0){if(c.text=this.sanitizeText(A.text.trim()),c.text.startsWith('"')&&c.text.endsWith('"'))c.text=c.text.substring(1,c.text.length-1);c.labelType=this.sanitizeNodeLabelType(A.type)}if(a!==void 0)c.type=a.type,c.stroke=a.stroke,c.length=a.length>10?10:a.length;if(n&&!this.edges.some((f)=>f.id===n))c.id=n,c.isUserDefinedId=!0;else{let f=this.edges.filter((I)=>I.start===c.start&&I.end===c.end);if(f.length===0)c.id=An(c.start,c.end,{counter:0,prefix:"L"});else c.id=An(c.start,c.end,{counter:f.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))l.info("Pushing edge..."),this.edges.push(c);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
|
|
6
6
|
|
|
7
7
|
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
|
8
8
|
You cannot set this config via configuration inside the diagram as it is a secure config.
|
|
9
|
-
You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e==="object"&&"id"in e&&typeof e.id==="string"}addLink(e,r,a){let n=this.isLinkData(a)?a.id.replace("@",""):void 0;l.info("addLink",e,r,n);for(let o of e)for(let k of r){let c=o===e[e.length-1],A=k===r[0];if(c&&A)this.addSingleLink(o,k,a,n);else this.addSingleLink(o,k,a,void 0)}}updateLinkInterpolate(e,r){e.forEach((a)=>{if(a==="default")this.edges.defaultInterpolate=r;else this.edges[a].interpolate=r})}updateLink(e,r){e.forEach((a)=>{if(typeof a==="number"&&a>=this.edges.length)throw Error(`The index ${a} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(a==="default")this.edges.defaultStyle=r;else if(this.edges[a].style=r,(this.edges[a]?.style?.length??0)>0&&!this.edges[a]?.style?.some((n)=>n?.startsWith("fill")))this.edges[a]?.style?.push("fill:none")})}addClass(e,r){let a=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach((n)=>{let o=this.classes.get(n);if(o===void 0)o={id:n,styles:[],textStyles:[]},this.classes.set(n,o);if(a!==void 0&&a!==null)a.forEach((k)=>{if(/color/.exec(k)){let c=k.replace("fill","bgFill");o.textStyles.push(c)}o.styles.push(k)})})}setDirection(e){if(this.direction=e.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(e,r){for(let a of e.split(",")){let n=this.vertices.get(a);if(n)n.classes.push(r);let o=this.edges.find((c)=>c.id===a);if(o)o.classes.push(r);let k=this.subGraphLookup.get(a);if(k)k.classes.push(r)}}setTooltip(e,r){if(r===void 0)return;r=this.sanitizeText(r);for(let a of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(a):a,r)}setClickFun(e,r,a){if(p().securityLevel!=="loose")return;if(r===void 0)return;let n=[];if(typeof a==="string"){n=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k<n.length;k++){let c=n[k].trim();if(c.startsWith('"')&&c.endsWith('"'))c=c.substr(1,c.length-2);n[k]=c}}if(n.length===0)n.push(e);let o=this.vertices.get(e);if(o)o.haveCallback=!0,this.funs.push(()=>{let k=this.lookUpDomId(e),c=document.querySelector(`[id="${k}"]`);if(c!==null)c.addEventListener("click",()=>{H.runFunc(r,...n)},!1)})}setLink(e,r,a){e.split(",").forEach((n)=>{let o=this.vertices.get(n);if(o!==void 0)o.link=H.formatUrl(r,this.config),o.linkTarget=a}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,a){e.split(",").forEach((n)=>{this.setClickFun(n,r,a)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach((r)=>{r(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let r=Na();h(e).select("svg").selectAll("g.node").on("mouseover",(o)=>{let k=h(o.currentTarget),c=k.attr("title");if(c===null)return;let A=o.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(k.attr("title")).style("left",window.scrollX+A.left+(A.right-A.left)/2+"px").style("top",window.scrollY+A.bottom+"px"),r.html(Qt.sanitize(c)),k.classed("hover",!0)}).on("mouseout",(o)=>{r.transition().duration(500).style("opacity",0),h(o.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=p(),R()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,a){let n=e.text.trim(),o=a.text;if(e===a&&/\s/.exec(a.text))n=void 0;let c=t((L)=>{let D={boolean:{},number:{},string:{}},T=[],B;return{nodeList:L.filter(function(ie){let d=typeof ie;if(ie.stmt&&ie.stmt==="dir")return B=ie.value,!1;if(ie.trim()==="")return!1;if(d in D)return D[d].hasOwnProperty(ie)?!1:D[d][ie]=!0;else return T.includes(ie)?!1:T.push(ie)}),dir:B}},"uniq")(r.flat()),{nodeList:A,dir:f}=c,I=p().flowchart??{};if(f=f??(I.inheritDir?this.getDirection()??p().direction??void 0:void 0),this.version==="gen-1")for(let L=0;L<A.length;L++)A[L]=this.lookUpDomId(A[L]);n=n??"subGraph"+this.subCount,o=o||"",o=this.sanitizeText(o),this.subCount=this.subCount+1;let _={id:n,nodes:A,title:o.trim(),classes:[],dir:f,labelType:this.sanitizeNodeLabelType(a?.type)};return l.info("Adding",_.id,_.nodes,_.dir),_.nodes=this.makeUniq(_,this.subGraphs).nodes,this.subGraphs.push(_),this.subGraphLookup.set(n,_),n}getPosForId(e){for(let[r,a]of this.subGraphs.entries())if(a.id===e)return r;return-1}indexNodes2(e,r){let a=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let n=0,o=1;while(n<a.length){let k=this.getPosForId(a[n]);if(k>=0){let c=this.indexNodes2(e,k);if(c.result)return{result:!0,count:o+c.count};else o=o+c.count}n=n+1}return{result:!1,count:o}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}destructStartLink(e){let r=e.trim(),a="arrow_open";switch(r[0]){case"<":a="arrow_point",r=r.slice(1);break;case"x":a="arrow_cross",r=r.slice(1);break;case"o":a="arrow_circle",r=r.slice(1);break}let n="normal";if(r.includes("="))n="thick";if(r.includes("."))n="dotted";return{type:a,stroke:n}}countChar(e,r){let a=r.length,n=0;for(let o=0;o<a;++o)if(r[o]===e)++n;return n}destructEndLink(e){let r=e.trim(),a=r.slice(0,-1),n="arrow_open";switch(r.slice(-1)){case"x":if(n="arrow_cross",r.startsWith("x"))n="double_"+n,a=a.slice(1);break;case">":if(n="arrow_point",r.startsWith("<"))n="double_"+n,a=a.slice(1);break;case"o":if(n="arrow_circle",r.startsWith("o"))n="double_"+n,a=a.slice(1);break}let o="normal",k=a.length-1;if(a.startsWith("="))o="thick";if(a.startsWith("~"))o="invisible";let c=this.countChar(".",a);if(c)o="dotted",k=c;return{type:n,stroke:o,length:k}}destructLink(e,r){let a=this.destructEndLink(e),n;if(r){if(n=this.destructStartLink(r),n.stroke!==a.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=a.type;else{if(n.type!==a.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}if(n.type==="double_arrow")n.type="double_arrow_point";return n.length=a.length,n}return a}exists(e,r){for(let a of e)if(a.nodes.includes(r))return!0;return!1}makeUniq(e,r){let a=[];return e.nodes.forEach((n,o)=>{if(!this.exists(r,n))a.push(e.nodes[o])}),{nodes:a}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon){if(e.form==="circle")return"iconCircle";if(e.form==="square")return"iconSquare";if(e.form==="rounded")return"iconRounded";return"icon"}switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,r){return e.find((a)=>a.id===r)}destructEdgeType(e){let r="none",a="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":a=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),a=r;break}return{arrowTypeStart:r,arrowTypeEnd:a}}addNodeFromVertex(e,r,a,n,o,k){let c=a.get(e.id),A=n.get(e.id)??!1,f=this.findNode(r,e.id);if(f)f.cssStyles=e.styles,f.cssCompiledStyles=this.getCompiledStyles(e.classes),f.cssClasses=e.classes.join(" ");else{let I={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:c,padding:o.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:k,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};if(A)r.push({...I,isGroup:!0,shape:"rect"});else r.push({...I,isGroup:!1,shape:this.getTypeFromVertex(e),minWidth:o.flowchart?.minNodeWidth})}}getCompiledStyles(e){let r=[];for(let a of e){let n=this.classes.get(a);if(n?.styles)r=[...r,...n.styles??[]].map((o)=>o.trim());if(n?.textStyles)r=[...r,...n.textStyles??[]].map((o)=>o.trim())}return r}getData(){let e=p(),r=[],a=[],n=this.getSubGraphs(),o=new Map,k=new Map,c=new Map;for(let d of n)for(let m of d.nodes)if(this.subGraphLookup.has(m))c.set(m,d.id);let A=new Map,f=new Map;for(let d of n){let m=c.get(d.id);if(m!==void 0)f.set(m,[...f.get(m)??[],d.id])}let I=0,_=t((d)=>{A.set(d,I++);for(let m of f.get(d)??[])_(m)},"walk");for(let d of n)if(!c.has(d.id))_(d.id);let L=t((d)=>this.subGraphLookup.get(d)?.metadata?.view==="collapsed","isCollapsed"),D=t((d)=>{let m,ue=new Set,le=d;while(le!==void 0&&!ue.has(le)){if(ue.add(le),L(le))m=le;le=c.get(le)}return m},"outermostCollapsed"),T=new Set,B=new Map;for(let d of n){let m=D(d.id);if(m===void 0)continue;if(d.id!==m)T.add(d.id),B.set(d.id,m);for(let ue of d.nodes){if(ue===m)continue;T.add(ue),B.set(ue,m)}}for(let d=n.length-1;d>=0;d--){let m=n[d];if(T.has(m.id))continue;if(m.nodes.length>0)k.set(m.id,!0);for(let ue of m.nodes)o.set(ue,m.id)}for(let d=n.length-1;d>=0;d--){let m=n[d];if(T.has(m.id))continue;if(m.metadata?.view==="collapsed")r.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:o.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssClasses:m.classes.join(" "),shape:"collapsedGroup",dir:m.dir,isGroup:!1,look:e.look,colorIndex:A.get(m.id)});else r.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:o.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssClasses:m.classes.join(" "),shape:"rect",dir:m.dir,isGroup:!0,look:e.look,colorIndex:A.get(m.id),metadata:m.metadata})}this.getVertices().forEach((d)=>{if(T.has(d.id))return;this.addNodeFromVertex(d,r,o,k,e,e.look||"classic")});let ie=this.getEdges();return ie.forEach((d,m)=>{let{arrowTypeStart:ue,arrowTypeEnd:le}=this.destructEdgeType(d.type),U=[...ie.defaultStyle??[]],W=B.get(d.start)??d.start,K=B.get(d.end)??d.end;if(W===K&&(B.has(d.start)||B.has(d.end)))return;if(d.style)U.push(...d.style);let q={id:fn(W,K,{counter:m,prefix:"L"},d.id),isUserDefinedId:d.isUserDefinedId,start:W,end:K,type:d.type??"normal",label:d.text,labelType:d.labelType,labelpos:"c",thickness:d.stroke,minlen:d.length,classes:d?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":ue,arrowTypeEnd:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":le,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(d.classes),labelStyle:U,style:U,pattern:d.stroke,look:e.look,animate:d.animate,animation:d.animation,curve:d.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};a.push(q)}),{nodes:r,edges:a,other:{},config:e}}defaultConfig(){return Eo.flowchart}},p1=t(function(e,r){return r.db.getClasses()},"getClasses"),f1=t(async function(e,r,a,n){l.info("REF0:"),l.info("Drawing state diagram (v2)",r);let{securityLevel:o,flowchart:k,layout:c}=p();n.db.setDiagramId(r),l.debug("Before getData: ");let A=n.db.getData();l.debug("Data: ",A);let f=St(r,o),I=n.db.getDirection();A.type=n.type,A.layoutAlgorithm=_t(c),A.direction=I,A.nodeSpacing=k?.nodeSpacing||50,A.rankSpacing=k?.rankSpacing||50,A.markers=["point","circle","cross"],A.diagramId=r,l.debug("REF1:",A),await It(A,f);let _=A.config.flowchart?.diagramPadding??8;H.insertTitle(f,"flowchartTitleText",k?.titleTopMargin||0,n.db.getDiagramTitle()),lt(f,_,"flowchart",k?.useMaxWidth||!1)},"draw"),b1={getClasses:p1,draw:f1},At=function(){var e=t(function(Be,b,g,C){for(g=g||{},C=Be.length;C--;g[Be[C]]=b);return g},"o"),r=[1,4],a=[1,3],n=[1,5],o=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],k=[2,2],c=[1,13],A=[1,14],f=[1,15],I=[1,16],_=[1,23],L=[1,25],D=[1,26],T=[1,27],B=[1,50],Y=[1,49],ie=[1,29],d=[1,30],m=[1,31],ue=[1,32],le=[1,33],U=[1,45],W=[1,47],K=[1,43],q=[1,48],Q=[1,44],J=[1,51],Z=[1,46],ee=[1,52],te=[1,53],Ze=[1,34],$e=[1,35],et=[1,36],tt=[1,37],it=[1,38],Fe=[1,58],v=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],be=[1,62],ke=[1,61],ge=[1,63],Ie=[8,9,11,75,77,78],mt=[1,79],Re=[1,92],Ne=[1,97],Ge=[1,96],Pe=[1,93],Oe=[1,89],Me=[1,95],Ue=[1,91],We=[1,98],ze=[1,94],je=[1,99],Ke=[1,90],ve=[8,9,10,11,40,75,77,78],re=[8,9,10,11,40,46,75,77,78],ce=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],Ct=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],He=[44,60,89,102,105,106,109,111,114,115,116],Dt=[1,122],Tt=[1,123],rt=[1,125],at=[1,124],Et=[44,60,62,74,89,102,105,106,109,111,114,115,116],yt=[1,134],xt=[1,148],Ft=[1,149],Bt=[1,150],vt=[1,151],Lt=[1,136],Vt=[1,138],wt=[1,142],Rt=[1,143],Nt=[1,144],Gt=[1,145],Pt=[1,146],Ot=[1,147],Mt=[1,152],Ut=[1,153],Wt=[1,132],zt=[1,133],jt=[1,140],Kt=[1,135],Yt=[1,139],Ht=[1,137],ht=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],qt=[1,155],Xt=[1,157],N=[8,9,11],he=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],E=[1,177],ae=[1,173],ne=[1,174],S=[1,178],y=[1,175],F=[1,176],qe=[77,116,119],V=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Jt=[10,106],_e=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Ae=[1,248],me=[1,246],Ce=[1,250],De=[1,244],Te=[1,245],Ee=[1,247],Se=[1,249],ye=[1,251],Xe=[1,269],Zt=[8,9,11,106],fe=[8,9,10,11,60,84,105,106,109,110,111,112],dt={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:t(function(b,g,C,u,w,s,Le){var i=s.length-1;switch(w){case 2:this.$=[];break;case 3:if(!Array.isArray(s[i])||s[i].length>0)s[i-1].push(s[i]);this.$=s[i-1];break;case 4:case 183:this.$=s[i];break;case 11:u.setDirection("TB"),this.$="TB";break;case 12:u.setDirection(s[i-1]),this.$=s[i-1];break;case 27:this.$=s[i-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=u.addSubGraph(s[i-6],s[i-1],s[i-4]);break;case 34:this.$=u.addSubGraph(s[i-3],s[i-1],s[i-3]);break;case 35:this.$=u.addSubGraph(void 0,s[i-1],void 0);break;case 37:this.$=s[i].trim(),u.setAccTitle(this.$);break;case 38:case 39:this.$=s[i].trim(),u.setAccDescription(this.$);break;case 43:this.$=s[i-1]+s[i];break;case 44:this.$=s[i];break;case 45:u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i]),u.addLink(s[i-3].stmt,s[i-1],s[i-2]),this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 46:u.addLink(s[i-2].stmt,s[i],s[i-1]),this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 47:u.addLink(s[i-3].stmt,s[i-1],s[i-2]),this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 48:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 49:u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i]),this.$={stmt:s[i-1],nodes:s[i-1],shapeData:s[i]};break;case 50:this.$={stmt:s[i],nodes:s[i]};break;case 51:this.$=[s[i]];break;case 52:u.addVertex(s[i-5][s[i-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-4]),this.$=s[i-5].concat(s[i]);break;case 53:this.$=s[i-4].concat(s[i]);break;case 54:this.$=s[i];break;case 55:this.$=s[i-2],u.setClass(s[i-2],s[i]);break;case 56:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"square");break;case 57:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"doublecircle");break;case 58:this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"circle");break;case 59:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"ellipse");break;case 60:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"stadium");break;case 61:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"subroutine");break;case 62:this.$=s[i-7],u.addVertex(s[i-7],s[i-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[i-5],s[i-3]]]));break;case 63:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"cylinder");break;case 64:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"round");break;case 65:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"diamond");break;case 66:this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"hexagon");break;case 67:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"odd");break;case 68:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"trapezoid");break;case 69:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"inv_trapezoid");break;case 70:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_right");break;case 71:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_left");break;case 72:this.$=s[i],u.addVertex(s[i]);break;case 73:s[i-1].text=s[i],this.$=s[i-1];break;case 74:case 75:s[i-2].text=s[i-1],this.$=s[i-2];break;case 76:this.$=s[i];break;case 77:var X=u.destructLink(s[i],s[i-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:s[i-1]};break;case 78:var X=u.destructLink(s[i],s[i-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:s[i-1],id:s[i-3]};break;case 79:this.$={text:s[i],type:"text"};break;case 80:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 81:this.$={text:s[i],type:"string"};break;case 82:this.$={text:s[i],type:"markdown"};break;case 83:var X=u.destructLink(s[i]);this.$={type:X.type,stroke:X.stroke,length:X.length};break;case 84:var X=u.destructLink(s[i]);this.$={type:X.type,stroke:X.stroke,length:X.length,id:s[i-1]};break;case 85:this.$=s[i-1];break;case 86:this.$={text:s[i],type:"text"};break;case 87:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 88:this.$={text:s[i],type:"string"};break;case 89:case 104:this.$={text:s[i],type:"markdown"};break;case 101:this.$={text:s[i],type:"text"};break;case 102:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 103:this.$={text:s[i],type:"text"};break;case 105:this.$=s[i-4],u.addClass(s[i-2],s[i]);break;case 106:this.$=s[i-4],u.setClass(s[i-2],s[i]);break;case 107:case 115:this.$=s[i-1],u.setClickEvent(s[i-1],s[i]);break;case 108:case 116:this.$=s[i-3],u.setClickEvent(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 109:this.$=s[i-2],u.setClickEvent(s[i-2],s[i-1],s[i]);break;case 110:this.$=s[i-4],u.setClickEvent(s[i-4],s[i-3],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 111:this.$=s[i-2],u.setLink(s[i-2],s[i]);break;case 112:this.$=s[i-4],u.setLink(s[i-4],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 113:this.$=s[i-4],u.setLink(s[i-4],s[i-2],s[i]);break;case 114:this.$=s[i-6],u.setLink(s[i-6],s[i-4],s[i]),u.setTooltip(s[i-6],s[i-2]);break;case 117:this.$=s[i-1],u.setLink(s[i-1],s[i]);break;case 118:this.$=s[i-3],u.setLink(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 119:this.$=s[i-3],u.setLink(s[i-3],s[i-2],s[i]);break;case 120:this.$=s[i-5],u.setLink(s[i-5],s[i-4],s[i]),u.setTooltip(s[i-5],s[i-2]);break;case 121:this.$=s[i-4],u.addVertex(s[i-2],void 0,void 0,s[i]);break;case 122:this.$=s[i-4],u.updateLink([s[i-2]],s[i]);break;case 123:this.$=s[i-4],u.updateLink(s[i-2],s[i]);break;case 124:this.$=s[i-8],u.updateLinkInterpolate([s[i-6]],s[i-2]),u.updateLink([s[i-6]],s[i]);break;case 125:this.$=s[i-8],u.updateLinkInterpolate(s[i-6],s[i-2]),u.updateLink(s[i-6],s[i]);break;case 126:this.$=s[i-6],u.updateLinkInterpolate([s[i-4]],s[i]);break;case 127:this.$=s[i-6],u.updateLinkInterpolate(s[i-4],s[i]);break;case 128:case 130:this.$=[s[i]];break;case 129:case 131:s[i-2].push(s[i]),this.$=s[i-2];break;case 133:this.$=s[i-1]+s[i];break;case 181:this.$=s[i];break;case 182:this.$=s[i-1]+""+s[i];break;case 184:this.$=s[i-1]+""+s[i];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:r,10:a,12:n},{1:[3]},e(o,k,{5:6}),{4:7,9:r,10:a,12:n},{4:8,9:r,10:a,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:c,9:A,10:f,11:I,20:17,22:18,23:19,24:20,25:21,26:22,27:_,33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:Y,84:ie,85:d,86:m,87:ue,88:le,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},e(o,[2,9]),e(o,[2,10]),e(o,[2,11]),{8:[1,55],9:[1,56],10:Fe,15:54,18:57},e(v,[2,3]),e(v,[2,4]),e(v,[2,5]),e(v,[2,6]),e(v,[2,7]),e(v,[2,8]),{8:be,9:ke,11:ge,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:be,9:ke,11:ge,21:68},{8:be,9:ke,11:ge,21:69},{8:be,9:ke,11:ge,21:70},{8:be,9:ke,11:ge,21:71},{8:be,9:ke,11:ge,21:72},{8:be,9:ke,10:[1,73],11:ge,21:74},e(v,[2,36]),{35:[1,75]},{37:[1,76]},e(v,[2,39]),e(Ie,[2,50],{18:77,39:78,10:Fe,40:mt}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:Re,44:Ne,60:Ge,80:[1,87],89:Pe,95:[1,84],97:[1,85],101:86,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},e(v,[2,185]),e(v,[2,186]),e(v,[2,187]),e(v,[2,188]),e(v,[2,189]),e(ve,[2,51]),e(ve,[2,54],{46:[1,100]}),e(re,[2,72],{113:113,29:[1,101],44:B,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:Y,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:U,102:W,105:K,106:q,109:Q,111:J,114:Z,115:ee,116:te}),e(ce,[2,181]),e(ce,[2,142]),e(ce,[2,143]),e(ce,[2,144]),e(ce,[2,145]),e(ce,[2,146]),e(ce,[2,147]),e(ce,[2,148]),e(ce,[2,149]),e(ce,[2,150]),e(ce,[2,151]),e(ce,[2,152]),e(o,[2,12]),e(o,[2,18]),e(o,[2,19]),{9:[1,114]},e(Ct,[2,26],{18:115,10:Fe}),e(v,[2,27]),{42:116,43:39,44:B,45:40,47:41,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(v,[2,40]),e(v,[2,41]),e(v,[2,42]),e(He,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Dt,81:Tt,116:rt,119:at},{75:[1,126],77:[1,127]},e(Et,[2,83]),e(v,[2,28]),e(v,[2,29]),e(v,[2,30]),e(v,[2,31]),e(v,[2,32]),{10:yt,12:xt,14:Ft,27:Bt,28:128,32:vt,44:Lt,60:Vt,75:wt,80:[1,130],81:[1,131],83:141,84:Rt,85:Nt,86:Gt,87:Pt,88:Ot,89:Mt,90:Ut,91:129,105:Wt,109:zt,111:jt,114:Kt,115:Yt,116:Ht},e(ht,k,{5:154}),e(v,[2,37]),e(v,[2,38]),e(Ie,[2,48],{44:qt}),e(Ie,[2,49],{18:156,10:Fe,40:Xt}),e(ve,[2,44]),{44:B,47:158,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},{102:[1,159],103:160,105:[1,161]},{44:B,47:162,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},{44:B,47:163,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(N,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(N,[2,115],{120:168,10:[1,167],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(N,[2,117],{10:[1,169]}),e(he,[2,183]),e(he,[2,170]),e(he,[2,171]),e(he,[2,172]),e(he,[2,173]),e(he,[2,174]),e(he,[2,175]),e(he,[2,176]),e(he,[2,177]),e(he,[2,178]),e(he,[2,179]),e(he,[2,180]),{44:B,47:170,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},{30:171,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:179,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:181,50:[1,180],67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:182,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:183,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:184,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{109:[1,185]},{30:186,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:187,65:[1,188],67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:189,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:190,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:191,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},e(ce,[2,182]),e(o,[2,20]),e(Ct,[2,25]),e(Ie,[2,46],{39:192,18:193,10:Fe,40:mt}),e(He,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{77:[1,197],79:198,116:rt,119:at},e(qe,[2,79]),e(qe,[2,81]),e(qe,[2,82]),e(qe,[2,168]),e(qe,[2,169]),{76:199,79:121,80:Dt,81:Tt,116:rt,119:at},e(Et,[2,84]),{8:be,9:ke,10:yt,11:ge,12:xt,14:Ft,21:201,27:Bt,29:[1,200],32:vt,44:Lt,60:Vt,75:wt,83:141,84:Rt,85:Nt,86:Gt,87:Pt,88:Ot,89:Mt,90:Ut,91:202,105:Wt,109:zt,111:jt,114:Kt,115:Yt,116:Ht},e(V,[2,101]),e(V,[2,103]),e(V,[2,104]),e(V,[2,157]),e(V,[2,158]),e(V,[2,159]),e(V,[2,160]),e(V,[2,161]),e(V,[2,162]),e(V,[2,163]),e(V,[2,164]),e(V,[2,165]),e(V,[2,166]),e(V,[2,167]),e(V,[2,90]),e(V,[2,91]),e(V,[2,92]),e(V,[2,93]),e(V,[2,94]),e(V,[2,95]),e(V,[2,96]),e(V,[2,97]),e(V,[2,98]),e(V,[2,99]),e(V,[2,100]),{6:11,7:12,8:c,9:A,10:f,11:I,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,203],33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:Y,84:ie,85:d,86:m,87:ue,88:le,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},{10:Fe,18:204},{44:[1,205]},e(ve,[2,43]),{10:[1,206],44:B,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:113,114:Z,115:ee,116:te},{10:[1,207]},{10:[1,208],106:[1,209]},e(Jt,[2,128]),{10:[1,210],44:B,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:113,114:Z,115:ee,116:te},{10:[1,211],44:B,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:113,114:Z,115:ee,116:te},{80:[1,212]},e(N,[2,109],{10:[1,213]}),e(N,[2,111],{10:[1,214]}),{80:[1,215]},e(he,[2,184]),{80:[1,216],98:[1,217]},e(ve,[2,55],{113:113,44:B,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,114:Z,115:ee,116:te}),{31:[1,218],67:E,82:219,116:S,117:y,118:F},e(_e,[2,86]),e(_e,[2,88]),e(_e,[2,89]),e(_e,[2,153]),e(_e,[2,154]),e(_e,[2,155]),e(_e,[2,156]),{49:[1,220],67:E,82:219,116:S,117:y,118:F},{30:221,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{51:[1,222],67:E,82:219,116:S,117:y,118:F},{53:[1,223],67:E,82:219,116:S,117:y,118:F},{55:[1,224],67:E,82:219,116:S,117:y,118:F},{57:[1,225],67:E,82:219,116:S,117:y,118:F},{60:[1,226]},{64:[1,227],67:E,82:219,116:S,117:y,118:F},{66:[1,228],67:E,82:219,116:S,117:y,118:F},{30:229,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{31:[1,230],67:E,82:219,116:S,117:y,118:F},{67:E,69:[1,231],71:[1,232],82:219,116:S,117:y,118:F},{67:E,69:[1,234],71:[1,233],82:219,116:S,117:y,118:F},e(Ie,[2,45],{18:156,10:Fe,40:Xt}),e(Ie,[2,47],{44:qt}),e(He,[2,75]),e(He,[2,74]),{62:[1,235],67:E,82:219,116:S,117:y,118:F},e(He,[2,77]),e(qe,[2,80]),{77:[1,236],79:198,116:rt,119:at},{30:237,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},e(ht,k,{5:238}),e(V,[2,102]),e(v,[2,35]),{43:239,44:B,45:40,47:41,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},{10:Fe,18:240},{10:Ae,60:me,84:Ce,92:241,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:252,104:[1,253],105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:254,104:[1,255],105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{105:[1,256]},{10:Ae,60:me,84:Ce,92:257,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{44:B,47:258,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(N,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(N,[2,116]),e(N,[2,118],{10:[1,262]}),e(N,[2,119]),e(re,[2,56]),e(_e,[2,87]),e(re,[2,57]),{51:[1,263],67:E,82:219,116:S,117:y,118:F},e(re,[2,64]),e(re,[2,59]),e(re,[2,60]),e(re,[2,61]),{109:[1,264]},e(re,[2,63]),e(re,[2,65]),{66:[1,265],67:E,82:219,116:S,117:y,118:F},e(re,[2,67]),e(re,[2,68]),e(re,[2,70]),e(re,[2,69]),e(re,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(He,[2,78]),{31:[1,266],67:E,82:219,116:S,117:y,118:F},{6:11,7:12,8:c,9:A,10:f,11:I,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,267],33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:Y,84:ie,85:d,86:m,87:ue,88:le,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},e(ve,[2,53]),{43:268,44:B,45:40,47:41,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(N,[2,121],{106:Xe}),e(Zt,[2,130],{108:270,10:Ae,60:me,84:Ce,105:De,109:Te,110:Ee,111:Se,112:ye}),e(fe,[2,132]),e(fe,[2,134]),e(fe,[2,135]),e(fe,[2,136]),e(fe,[2,137]),e(fe,[2,138]),e(fe,[2,139]),e(fe,[2,140]),e(fe,[2,141]),e(N,[2,122],{106:Xe}),{10:[1,271]},e(N,[2,123],{106:Xe}),{10:[1,272]},e(Jt,[2,129]),e(N,[2,105],{106:Xe}),e(N,[2,106],{113:113,44:B,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,114:Z,115:ee,116:te}),e(N,[2,110]),e(N,[2,112],{10:[1,273]}),e(N,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:be,9:ke,11:ge,21:278},e(v,[2,34]),e(ve,[2,52]),{10:Ae,60:me,84:Ce,105:De,107:279,108:243,109:Te,110:Ee,111:Se,112:ye},e(fe,[2,133]),{14:Re,44:Ne,60:Ge,89:Pe,101:280,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},{14:Re,44:Ne,60:Ge,89:Pe,101:281,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},{98:[1,282]},e(N,[2,120]),e(re,[2,58]),{30:283,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},e(re,[2,66]),e(ht,k,{5:284}),e(Zt,[2,131],{108:270,10:Ae,60:me,84:Ce,105:De,109:Te,110:Ee,111:Se,112:ye}),e(N,[2,126],{120:168,10:[1,285],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(N,[2,127],{120:168,10:[1,286],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(N,[2,114]),{31:[1,287],67:E,82:219,116:S,117:y,118:F},{6:11,7:12,8:c,9:A,10:f,11:I,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,288],33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:Y,84:ie,85:d,86:m,87:ue,88:le,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},{10:Ae,60:me,84:Ce,92:289,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:290,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},e(re,[2,62]),e(v,[2,33]),e(N,[2,124],{106:Xe}),e(N,[2,125],{106:Xe})],defaultActions:{},parseError:t(function(b,g){if(g.recoverable)this.trace(b);else{var C=Error(b);throw C.hash=g,C}},"parseError"),parse:t(function(b){var g=this,C=[0],u=[],w=[null],s=[],Le=this.table,i="",X=0,$t=0,e1=0,u1=2,t1=1,o1=s.slice.call(arguments,1),se=Object.create(this.lexer),Ve={yy:{}};for(var pt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,pt))Ve.yy[pt]=this.yy[pt];if(se.setInput(b,Ve.yy),Ve.yy.lexer=se,Ve.yy.parser=this,typeof se.yylloc>"u")se.yylloc={};var ft=se.yylloc;s.push(ft);var l1=se.options&&se.options.ranges;if(typeof Ve.yy.parseError==="function")this.parseError=Ve.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function c1(pe){C.length=C.length-2*pe,w.length=w.length-pe,s.length=s.length-pe}t(c1,"popStack");function s1(){var pe=u.pop()||se.lex()||t1;if(typeof pe!=="number"){if(pe instanceof Array)u=pe,pe=u.pop();pe=g.symbols_[pe]||pe}return pe}t(s1,"lex");var oe,bt,we,de,C1,kt,Qe={},ut,xe,i1,ct;while(!0){if(we=C[C.length-1],this.defaultActions[we])de=this.defaultActions[we];else{if(oe===null||typeof oe>"u")oe=s1();de=Le[we]&&Le[we][oe]}if(typeof de>"u"||!de.length||!de[0]){var gt="";ct=[];for(ut in Le[we])if(this.terminals_[ut]&&ut>u1)ct.push("'"+this.terminals_[ut]+"'");if(se.showPosition)gt="Parse error on line "+(X+1)+`:
|
|
9
|
+
You have to call mermaid.initialize.`)}isLinkData(e){return e!==null&&typeof e==="object"&&"id"in e&&typeof e.id==="string"}addLink(e,r,a){let n=this.isLinkData(a)?a.id.replace("@",""):void 0;l.info("addLink",e,r,n);for(let o of e)for(let k of r){let c=o===e[e.length-1],A=k===r[0];if(c&&A)this.addSingleLink(o,k,a,n);else this.addSingleLink(o,k,a,void 0)}}updateLinkInterpolate(e,r){e.forEach((a)=>{if(a==="default")this.edges.defaultInterpolate=r;else this.edges[a].interpolate=r})}updateLink(e,r){e.forEach((a)=>{if(typeof a==="number"&&a>=this.edges.length)throw Error(`The index ${a} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);if(a==="default")this.edges.defaultStyle=r;else if(this.edges[a].style=r,(this.edges[a]?.style?.length??0)>0&&!this.edges[a]?.style?.some((n)=>n?.startsWith("fill")))this.edges[a]?.style?.push("fill:none")})}addClass(e,r){let a=r.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");e.split(",").forEach((n)=>{let o=this.classes.get(n);if(o===void 0)o={id:n,styles:[],textStyles:[]},this.classes.set(n,o);if(a!==void 0&&a!==null)a.forEach((k)=>{if(/color/.exec(k)){let c=k.replace("fill","bgFill");o.textStyles.push(c)}o.styles.push(k)})})}setDirection(e){if(this.direction=e.trim(),/.*</.exec(this.direction))this.direction="RL";if(/.*\^/.exec(this.direction))this.direction="BT";if(/.*>/.exec(this.direction))this.direction="LR";if(/.*v/.exec(this.direction))this.direction="TB";if(this.direction==="TD")this.direction="TB"}setClass(e,r){for(let a of e.split(",")){let n=this.vertices.get(a);if(n)n.classes.push(r);let o=this.edges.find((c)=>c.id===a);if(o)o.classes.push(r);let k=this.subGraphLookup.get(a);if(k)k.classes.push(r)}}setTooltip(e,r){if(r===void 0)return;r=this.sanitizeText(r);for(let a of e.split(","))this.tooltips.set(this.version==="gen-1"?this.lookUpDomId(a):a,r)}setClickFun(e,r,a){if(p().securityLevel!=="loose")return;if(r===void 0)return;let n=[];if(typeof a==="string"){n=a.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let k=0;k<n.length;k++){let c=n[k].trim();if(c.startsWith('"')&&c.endsWith('"'))c=c.substr(1,c.length-2);n[k]=c}}if(n.length===0)n.push(e);let o=this.vertices.get(e);if(o)o.haveCallback=!0,this.funs.push(()=>{let k=this.lookUpDomId(e),c=document.querySelector(`[id="${k}"]`);if(c!==null)c.addEventListener("click",()=>{H.runFunc(r,...n)},!1)})}setLink(e,r,a){e.split(",").forEach((n)=>{let o=this.vertices.get(n);if(o!==void 0)o.link=H.formatUrl(r,this.config),o.linkTarget=a}),this.setClass(e,"clickable")}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,r,a){e.split(",").forEach((n)=>{this.setClickFun(n,r,a)}),this.setClass(e,"clickable")}bindFunctions(e){this.funs.forEach((r)=>{r(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let r=Na();h(e).select("svg").selectAll("g.node").on("mouseover",(o)=>{let k=h(o.currentTarget),c=k.attr("title");if(c===null)return;let A=o.currentTarget?.getBoundingClientRect();r.transition().duration(200).style("opacity",".9"),r.text(k.attr("title")).style("left",window.scrollX+A.left+(A.right-A.left)/2+"px").style("top",window.scrollY+A.bottom+"px"),r.html(Nt.sanitize(c)),k.classed("hover",!0)}).on("mouseout",(o)=>{r.transition().duration(500).style("opacity",0),h(o.currentTarget).classed("hover",!1)})}clear(e="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=p(),R()}setGen(e){this.version=e||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(e,r,a){let n=e.text.trim(),o=a.text;if(e===a&&/\s/.exec(a.text))n=void 0;let c=t((L)=>{let D={boolean:{},number:{},string:{}},T=[],B;return{nodeList:L.filter(function(ie){let d=typeof ie;if(ie.stmt&&ie.stmt==="dir")return B=ie.value,!1;if(ie.trim()==="")return!1;if(d in D)return D[d].hasOwnProperty(ie)?!1:D[d][ie]=!0;else return T.includes(ie)?!1:T.push(ie)}),dir:B}},"uniq")(r.flat()),{nodeList:A,dir:f}=c,I=p().flowchart??{};if(f=f??(I.inheritDir?this.getDirection()??p().direction??void 0:void 0),this.version==="gen-1")for(let L=0;L<A.length;L++)A[L]=this.lookUpDomId(A[L]);n=n??"subGraph"+this.subCount,o=o||"",o=this.sanitizeText(o),this.subCount=this.subCount+1;let _={id:n,nodes:A,title:o.trim(),classes:[],dir:f,labelType:this.sanitizeNodeLabelType(a?.type)};return l.info("Adding",_.id,_.nodes,_.dir),_.nodes=this.makeUniq(_,this.subGraphs).nodes,this.subGraphs.push(_),this.subGraphLookup.set(n,_),n}getPosForId(e){for(let[r,a]of this.subGraphs.entries())if(a.id===e)return r;return-1}indexNodes2(e,r){let a=this.subGraphs[r].nodes;if(this.secCount=this.secCount+1,this.secCount>2000)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=r,this.subGraphs[r].id===e)return{result:!0,count:0};let n=0,o=1;while(n<a.length){let k=this.getPosForId(a[n]);if(k>=0){let c=this.indexNodes2(e,k);if(c.result)return{result:!0,count:o+c.count};else o=o+c.count}n=n+1}return{result:!1,count:o}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){if(this.secCount=-1,this.subGraphs.length>0)this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){if(this.firstGraphFlag)return this.firstGraphFlag=!1,!0;return!1}destructStartLink(e){let r=e.trim(),a="arrow_open";switch(r[0]){case"<":a="arrow_point",r=r.slice(1);break;case"x":a="arrow_cross",r=r.slice(1);break;case"o":a="arrow_circle",r=r.slice(1);break}let n="normal";if(r.includes("="))n="thick";if(r.includes("."))n="dotted";return{type:a,stroke:n}}countChar(e,r){let a=r.length,n=0;for(let o=0;o<a;++o)if(r[o]===e)++n;return n}destructEndLink(e){let r=e.trim(),a=r.slice(0,-1),n="arrow_open";switch(r.slice(-1)){case"x":if(n="arrow_cross",r.startsWith("x"))n="double_"+n,a=a.slice(1);break;case">":if(n="arrow_point",r.startsWith("<"))n="double_"+n,a=a.slice(1);break;case"o":if(n="arrow_circle",r.startsWith("o"))n="double_"+n,a=a.slice(1);break}let o="normal",k=a.length-1;if(a.startsWith("="))o="thick";if(a.startsWith("~"))o="invisible";let c=this.countChar(".",a);if(c)o="dotted",k=c;return{type:n,stroke:o,length:k}}destructLink(e,r){let a=this.destructEndLink(e),n;if(r){if(n=this.destructStartLink(r),n.stroke!==a.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=a.type;else{if(n.type!==a.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}if(n.type==="double_arrow")n.type="double_arrow_point";return n.length=a.length,n}return a}exists(e,r){for(let a of e)if(a.nodes.includes(r))return!0;return!1}makeUniq(e,r){let a=[];return e.nodes.forEach((n,o)=>{if(!this.exists(r,n))a.push(e.nodes[o])}),{nodes:a}}getTypeFromVertex(e){if(e.img)return"imageSquare";if(e.icon){if(e.form==="circle")return"iconCircle";if(e.form==="square")return"iconSquare";if(e.form==="rounded")return"iconRounded";return"icon"}switch(e.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return e.type}}findNode(e,r){return e.find((a)=>a.id===r)}destructEdgeType(e){let r="none",a="arrow_point";switch(e){case"arrow_point":case"arrow_circle":case"arrow_cross":a=e;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":r=e.replace("double_",""),a=r;break}return{arrowTypeStart:r,arrowTypeEnd:a}}addNodeFromVertex(e,r,a,n,o,k){let c=a.get(e.id),A=n.get(e.id)??!1,f=this.findNode(r,e.id);if(f)f.cssStyles=e.styles,f.cssCompiledStyles=this.getCompiledStyles(e.classes),f.cssClasses=e.classes.join(" ");else{let I={id:e.id,label:e.text,labelType:e.labelType,labelStyle:"",parentId:c,padding:o.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...e.classes]),cssClasses:"default "+e.classes.join(" "),dir:e.dir,domId:e.domId,look:k,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};if(A)r.push({...I,isGroup:!0,shape:"rect"});else r.push({...I,isGroup:!1,shape:this.getTypeFromVertex(e),minWidth:o.flowchart?.minNodeWidth})}}getCompiledStyles(e){let r=[];for(let a of e){let n=this.classes.get(a);if(n?.styles)r=[...r,...n.styles??[]].map((o)=>o.trim());if(n?.textStyles)r=[...r,...n.textStyles??[]].map((o)=>o.trim())}return r}getData(){let e=p(),r=[],a=[],n=this.getSubGraphs(),o=new Map,k=new Map,c=new Map;for(let d of n)for(let m of d.nodes)if(this.subGraphLookup.has(m))c.set(m,d.id);let A=new Map,f=new Map;for(let d of n){let m=c.get(d.id);if(m!==void 0)f.set(m,[...f.get(m)??[],d.id])}let I=0,_=t((d)=>{A.set(d,I++);for(let m of f.get(d)??[])_(m)},"walk");for(let d of n)if(!c.has(d.id))_(d.id);let L=t((d)=>this.subGraphLookup.get(d)?.metadata?.view==="collapsed","isCollapsed"),D=t((d)=>{let m,ue=new Set,le=d;while(le!==void 0&&!ue.has(le)){if(ue.add(le),L(le))m=le;le=c.get(le)}return m},"outermostCollapsed"),T=new Set,B=new Map;for(let d of n){let m=D(d.id);if(m===void 0)continue;if(d.id!==m)T.add(d.id),B.set(d.id,m);for(let ue of d.nodes){if(ue===m)continue;T.add(ue),B.set(ue,m)}}for(let d=n.length-1;d>=0;d--){let m=n[d];if(T.has(m.id))continue;if(m.nodes.length>0)k.set(m.id,!0);for(let ue of m.nodes)o.set(ue,m.id)}for(let d=n.length-1;d>=0;d--){let m=n[d];if(T.has(m.id))continue;if(m.metadata?.view==="collapsed")r.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:o.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssClasses:m.classes.join(" "),shape:"collapsedGroup",dir:m.dir,isGroup:!1,look:e.look,colorIndex:A.get(m.id)});else r.push({id:m.id,label:m.title,labelStyle:"",labelType:m.labelType,parentId:o.get(m.id),padding:8,cssCompiledStyles:this.getCompiledStyles(m.classes),cssClasses:m.classes.join(" "),shape:"rect",dir:m.dir,isGroup:!0,look:e.look,colorIndex:A.get(m.id),metadata:m.metadata})}this.getVertices().forEach((d)=>{if(T.has(d.id))return;this.addNodeFromVertex(d,r,o,k,e,e.look||"classic")});let ie=this.getEdges();return ie.forEach((d,m)=>{let{arrowTypeStart:ue,arrowTypeEnd:le}=this.destructEdgeType(d.type),U=[...ie.defaultStyle??[]],W=B.get(d.start)??d.start,K=B.get(d.end)??d.end;if(W===K&&(B.has(d.start)||B.has(d.end)))return;if(d.style)U.push(...d.style);let q={id:An(W,K,{counter:m,prefix:"L"},d.id),isUserDefinedId:d.isUserDefinedId,start:W,end:K,type:d.type??"normal",label:d.text,labelType:d.labelType,labelpos:"c",thickness:d.stroke,minlen:d.length,classes:d?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":ue,arrowTypeEnd:d?.stroke==="invisible"||d?.type==="arrow_open"?"none":le,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(d.classes),labelStyle:U,style:U,pattern:d.stroke,look:e.look,animate:d.animate,animation:d.animation,curve:d.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};a.push(q)}),{nodes:r,edges:a,other:{},config:e}}defaultConfig(){return Bo.flowchart}},p1=t(function(e,r){return r.db.getClasses()},"getClasses"),f1=t(async function(e,r,a,n){l.info("REF0:"),l.info("Drawing state diagram (v2)",r);let{securityLevel:o,flowchart:k,layout:c}=p();n.db.setDiagramId(r),l.debug("Before getData: ");let A=n.db.getData();l.debug("Data: ",A);let f=Tt(r,o),I=n.db.getDirection();A.type=n.type,A.layoutAlgorithm=St(c),A.direction=I,A.nodeSpacing=k?.nodeSpacing||50,A.rankSpacing=k?.rankSpacing||50,A.markers=["point","circle","cross"],A.diagramId=r,l.debug("REF1:",A),await _t(A,f);let _=A.config.flowchart?.diagramPadding??8;H.insertTitle(f,"flowchartTitleText",k?.titleTopMargin||0,n.db.getDiagramTitle()),lt(f,_,"flowchart",k?.useMaxWidth||!1)},"draw"),b1={getClasses:p1,draw:f1},At=function(){var e=t(function(Be,b,g,C){for(g=g||{},C=Be.length;C--;g[Be[C]]=b);return g},"o"),r=[1,4],a=[1,3],n=[1,5],o=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],k=[2,2],c=[1,13],A=[1,14],f=[1,15],I=[1,16],_=[1,23],L=[1,25],D=[1,26],T=[1,27],B=[1,50],Y=[1,49],ie=[1,29],d=[1,30],m=[1,31],ue=[1,32],le=[1,33],U=[1,45],W=[1,47],K=[1,43],q=[1,48],Q=[1,44],J=[1,51],Z=[1,46],ee=[1,52],te=[1,53],Ze=[1,34],$e=[1,35],et=[1,36],tt=[1,37],it=[1,38],Fe=[1,58],v=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],be=[1,62],ke=[1,61],ge=[1,63],Ie=[8,9,11,75,77,78],mt=[1,79],Re=[1,92],Ne=[1,97],Ge=[1,96],Pe=[1,93],Oe=[1,89],Me=[1,95],Ue=[1,91],We=[1,98],ze=[1,94],je=[1,99],Ke=[1,90],ve=[8,9,10,11,40,75,77,78],re=[8,9,10,11,40,46,75,77,78],ce=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],Ct=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],He=[44,60,89,102,105,106,109,111,114,115,116],Dt=[1,122],Et=[1,123],rt=[1,125],at=[1,124],yt=[44,60,62,74,89,102,105,106,109,111,114,115,116],xt=[1,134],Ft=[1,148],Bt=[1,149],vt=[1,150],Lt=[1,151],Vt=[1,136],wt=[1,138],It=[1,142],Rt=[1,143],Gt=[1,144],Pt=[1,145],Ot=[1,146],Mt=[1,147],Ut=[1,152],Wt=[1,153],zt=[1,132],jt=[1,133],Kt=[1,140],Yt=[1,135],Ht=[1,139],qt=[1,137],ht=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Xt=[1,155],Qt=[1,157],N=[8,9,11],he=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],E=[1,177],ae=[1,173],ne=[1,174],S=[1,178],y=[1,175],F=[1,176],qe=[77,116,119],V=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],Jt=[10,106],_e=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],Ae=[1,248],me=[1,246],Ce=[1,250],De=[1,244],Te=[1,245],Ee=[1,247],Se=[1,249],ye=[1,251],Xe=[1,269],Zt=[8,9,11,106],fe=[8,9,10,11,60,84,105,106,109,110,111,112],dt={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:t(function(b,g,C,u,w,s,Le){var i=s.length-1;switch(w){case 2:this.$=[];break;case 3:if(!Array.isArray(s[i])||s[i].length>0)s[i-1].push(s[i]);this.$=s[i-1];break;case 4:case 183:this.$=s[i];break;case 11:u.setDirection("TB"),this.$="TB";break;case 12:u.setDirection(s[i-1]),this.$=s[i-1];break;case 27:this.$=s[i-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=u.addSubGraph(s[i-6],s[i-1],s[i-4]);break;case 34:this.$=u.addSubGraph(s[i-3],s[i-1],s[i-3]);break;case 35:this.$=u.addSubGraph(void 0,s[i-1],void 0);break;case 37:this.$=s[i].trim(),u.setAccTitle(this.$);break;case 38:case 39:this.$=s[i].trim(),u.setAccDescription(this.$);break;case 43:this.$=s[i-1]+s[i];break;case 44:this.$=s[i];break;case 45:u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i]),u.addLink(s[i-3].stmt,s[i-1],s[i-2]),this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 46:u.addLink(s[i-2].stmt,s[i],s[i-1]),this.$={stmt:s[i],nodes:s[i].concat(s[i-2].nodes)};break;case 47:u.addLink(s[i-3].stmt,s[i-1],s[i-2]),this.$={stmt:s[i-1],nodes:s[i-1].concat(s[i-3].nodes)};break;case 48:this.$={stmt:s[i-1],nodes:s[i-1]};break;case 49:u.addVertex(s[i-1][s[i-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i]),this.$={stmt:s[i-1],nodes:s[i-1],shapeData:s[i]};break;case 50:this.$={stmt:s[i],nodes:s[i]};break;case 51:this.$=[s[i]];break;case 52:u.addVertex(s[i-5][s[i-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,s[i-4]),this.$=s[i-5].concat(s[i]);break;case 53:this.$=s[i-4].concat(s[i]);break;case 54:this.$=s[i];break;case 55:this.$=s[i-2],u.setClass(s[i-2],s[i]);break;case 56:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"square");break;case 57:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"doublecircle");break;case 58:this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"circle");break;case 59:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"ellipse");break;case 60:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"stadium");break;case 61:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"subroutine");break;case 62:this.$=s[i-7],u.addVertex(s[i-7],s[i-1],"rect",void 0,void 0,void 0,Object.fromEntries([[s[i-5],s[i-3]]]));break;case 63:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"cylinder");break;case 64:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"round");break;case 65:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"diamond");break;case 66:this.$=s[i-5],u.addVertex(s[i-5],s[i-2],"hexagon");break;case 67:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"odd");break;case 68:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"trapezoid");break;case 69:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"inv_trapezoid");break;case 70:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_right");break;case 71:this.$=s[i-3],u.addVertex(s[i-3],s[i-1],"lean_left");break;case 72:this.$=s[i],u.addVertex(s[i]);break;case 73:s[i-1].text=s[i],this.$=s[i-1];break;case 74:case 75:s[i-2].text=s[i-1],this.$=s[i-2];break;case 76:this.$=s[i];break;case 77:var X=u.destructLink(s[i],s[i-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:s[i-1]};break;case 78:var X=u.destructLink(s[i],s[i-2]);this.$={type:X.type,stroke:X.stroke,length:X.length,text:s[i-1],id:s[i-3]};break;case 79:this.$={text:s[i],type:"text"};break;case 80:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 81:this.$={text:s[i],type:"string"};break;case 82:this.$={text:s[i],type:"markdown"};break;case 83:var X=u.destructLink(s[i]);this.$={type:X.type,stroke:X.stroke,length:X.length};break;case 84:var X=u.destructLink(s[i]);this.$={type:X.type,stroke:X.stroke,length:X.length,id:s[i-1]};break;case 85:this.$=s[i-1];break;case 86:this.$={text:s[i],type:"text"};break;case 87:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 88:this.$={text:s[i],type:"string"};break;case 89:case 104:this.$={text:s[i],type:"markdown"};break;case 101:this.$={text:s[i],type:"text"};break;case 102:this.$={text:s[i-1].text+""+s[i],type:s[i-1].type};break;case 103:this.$={text:s[i],type:"text"};break;case 105:this.$=s[i-4],u.addClass(s[i-2],s[i]);break;case 106:this.$=s[i-4],u.setClass(s[i-2],s[i]);break;case 107:case 115:this.$=s[i-1],u.setClickEvent(s[i-1],s[i]);break;case 108:case 116:this.$=s[i-3],u.setClickEvent(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 109:this.$=s[i-2],u.setClickEvent(s[i-2],s[i-1],s[i]);break;case 110:this.$=s[i-4],u.setClickEvent(s[i-4],s[i-3],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 111:this.$=s[i-2],u.setLink(s[i-2],s[i]);break;case 112:this.$=s[i-4],u.setLink(s[i-4],s[i-2]),u.setTooltip(s[i-4],s[i]);break;case 113:this.$=s[i-4],u.setLink(s[i-4],s[i-2],s[i]);break;case 114:this.$=s[i-6],u.setLink(s[i-6],s[i-4],s[i]),u.setTooltip(s[i-6],s[i-2]);break;case 117:this.$=s[i-1],u.setLink(s[i-1],s[i]);break;case 118:this.$=s[i-3],u.setLink(s[i-3],s[i-2]),u.setTooltip(s[i-3],s[i]);break;case 119:this.$=s[i-3],u.setLink(s[i-3],s[i-2],s[i]);break;case 120:this.$=s[i-5],u.setLink(s[i-5],s[i-4],s[i]),u.setTooltip(s[i-5],s[i-2]);break;case 121:this.$=s[i-4],u.addVertex(s[i-2],void 0,void 0,s[i]);break;case 122:this.$=s[i-4],u.updateLink([s[i-2]],s[i]);break;case 123:this.$=s[i-4],u.updateLink(s[i-2],s[i]);break;case 124:this.$=s[i-8],u.updateLinkInterpolate([s[i-6]],s[i-2]),u.updateLink([s[i-6]],s[i]);break;case 125:this.$=s[i-8],u.updateLinkInterpolate(s[i-6],s[i-2]),u.updateLink(s[i-6],s[i]);break;case 126:this.$=s[i-6],u.updateLinkInterpolate([s[i-4]],s[i]);break;case 127:this.$=s[i-6],u.updateLinkInterpolate(s[i-4],s[i]);break;case 128:case 130:this.$=[s[i]];break;case 129:case 131:s[i-2].push(s[i]),this.$=s[i-2];break;case 133:this.$=s[i-1]+s[i];break;case 181:this.$=s[i];break;case 182:this.$=s[i-1]+""+s[i];break;case 184:this.$=s[i-1]+""+s[i];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"};break}},"anonymous"),table:[{3:1,4:2,9:r,10:a,12:n},{1:[3]},e(o,k,{5:6}),{4:7,9:r,10:a,12:n},{4:8,9:r,10:a,12:n},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:c,9:A,10:f,11:I,20:17,22:18,23:19,24:20,25:21,26:22,27:_,33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:Y,84:ie,85:d,86:m,87:ue,88:le,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},e(o,[2,9]),e(o,[2,10]),e(o,[2,11]),{8:[1,55],9:[1,56],10:Fe,15:54,18:57},e(v,[2,3]),e(v,[2,4]),e(v,[2,5]),e(v,[2,6]),e(v,[2,7]),e(v,[2,8]),{8:be,9:ke,11:ge,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:be,9:ke,11:ge,21:68},{8:be,9:ke,11:ge,21:69},{8:be,9:ke,11:ge,21:70},{8:be,9:ke,11:ge,21:71},{8:be,9:ke,11:ge,21:72},{8:be,9:ke,10:[1,73],11:ge,21:74},e(v,[2,36]),{35:[1,75]},{37:[1,76]},e(v,[2,39]),e(Ie,[2,50],{18:77,39:78,10:Fe,40:mt}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:Re,44:Ne,60:Ge,80:[1,87],89:Pe,95:[1,84],97:[1,85],101:86,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},e(v,[2,185]),e(v,[2,186]),e(v,[2,187]),e(v,[2,188]),e(v,[2,189]),e(ve,[2,51]),e(ve,[2,54],{46:[1,100]}),e(re,[2,72],{113:113,29:[1,101],44:B,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:Y,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:U,102:W,105:K,106:q,109:Q,111:J,114:Z,115:ee,116:te}),e(ce,[2,181]),e(ce,[2,142]),e(ce,[2,143]),e(ce,[2,144]),e(ce,[2,145]),e(ce,[2,146]),e(ce,[2,147]),e(ce,[2,148]),e(ce,[2,149]),e(ce,[2,150]),e(ce,[2,151]),e(ce,[2,152]),e(o,[2,12]),e(o,[2,18]),e(o,[2,19]),{9:[1,114]},e(Ct,[2,26],{18:115,10:Fe}),e(v,[2,27]),{42:116,43:39,44:B,45:40,47:41,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(v,[2,40]),e(v,[2,41]),e(v,[2,42]),e(He,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:Dt,81:Et,116:rt,119:at},{75:[1,126],77:[1,127]},e(yt,[2,83]),e(v,[2,28]),e(v,[2,29]),e(v,[2,30]),e(v,[2,31]),e(v,[2,32]),{10:xt,12:Ft,14:Bt,27:vt,28:128,32:Lt,44:Vt,60:wt,75:It,80:[1,130],81:[1,131],83:141,84:Rt,85:Gt,86:Pt,87:Ot,88:Mt,89:Ut,90:Wt,91:129,105:zt,109:jt,111:Kt,114:Yt,115:Ht,116:qt},e(ht,k,{5:154}),e(v,[2,37]),e(v,[2,38]),e(Ie,[2,48],{44:Xt}),e(Ie,[2,49],{18:156,10:Fe,40:Qt}),e(ve,[2,44]),{44:B,47:158,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},{102:[1,159],103:160,105:[1,161]},{44:B,47:162,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},{44:B,47:163,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(N,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(N,[2,115],{120:168,10:[1,167],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(N,[2,117],{10:[1,169]}),e(he,[2,183]),e(he,[2,170]),e(he,[2,171]),e(he,[2,172]),e(he,[2,173]),e(he,[2,174]),e(he,[2,175]),e(he,[2,176]),e(he,[2,177]),e(he,[2,178]),e(he,[2,179]),e(he,[2,180]),{44:B,47:170,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},{30:171,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:179,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:181,50:[1,180],67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:182,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:183,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:184,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{109:[1,185]},{30:186,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:187,65:[1,188],67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:189,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:190,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{30:191,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},e(ce,[2,182]),e(o,[2,20]),e(Ct,[2,25]),e(Ie,[2,46],{39:192,18:193,10:Fe,40:mt}),e(He,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{77:[1,197],79:198,116:rt,119:at},e(qe,[2,79]),e(qe,[2,81]),e(qe,[2,82]),e(qe,[2,168]),e(qe,[2,169]),{76:199,79:121,80:Dt,81:Et,116:rt,119:at},e(yt,[2,84]),{8:be,9:ke,10:xt,11:ge,12:Ft,14:Bt,21:201,27:vt,29:[1,200],32:Lt,44:Vt,60:wt,75:It,83:141,84:Rt,85:Gt,86:Pt,87:Ot,88:Mt,89:Ut,90:Wt,91:202,105:zt,109:jt,111:Kt,114:Yt,115:Ht,116:qt},e(V,[2,101]),e(V,[2,103]),e(V,[2,104]),e(V,[2,157]),e(V,[2,158]),e(V,[2,159]),e(V,[2,160]),e(V,[2,161]),e(V,[2,162]),e(V,[2,163]),e(V,[2,164]),e(V,[2,165]),e(V,[2,166]),e(V,[2,167]),e(V,[2,90]),e(V,[2,91]),e(V,[2,92]),e(V,[2,93]),e(V,[2,94]),e(V,[2,95]),e(V,[2,96]),e(V,[2,97]),e(V,[2,98]),e(V,[2,99]),e(V,[2,100]),{6:11,7:12,8:c,9:A,10:f,11:I,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,203],33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:Y,84:ie,85:d,86:m,87:ue,88:le,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},{10:Fe,18:204},{44:[1,205]},e(ve,[2,43]),{10:[1,206],44:B,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:113,114:Z,115:ee,116:te},{10:[1,207]},{10:[1,208],106:[1,209]},e(Jt,[2,128]),{10:[1,210],44:B,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:113,114:Z,115:ee,116:te},{10:[1,211],44:B,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:113,114:Z,115:ee,116:te},{80:[1,212]},e(N,[2,109],{10:[1,213]}),e(N,[2,111],{10:[1,214]}),{80:[1,215]},e(he,[2,184]),{80:[1,216],98:[1,217]},e(ve,[2,55],{113:113,44:B,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,114:Z,115:ee,116:te}),{31:[1,218],67:E,82:219,116:S,117:y,118:F},e(_e,[2,86]),e(_e,[2,88]),e(_e,[2,89]),e(_e,[2,153]),e(_e,[2,154]),e(_e,[2,155]),e(_e,[2,156]),{49:[1,220],67:E,82:219,116:S,117:y,118:F},{30:221,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{51:[1,222],67:E,82:219,116:S,117:y,118:F},{53:[1,223],67:E,82:219,116:S,117:y,118:F},{55:[1,224],67:E,82:219,116:S,117:y,118:F},{57:[1,225],67:E,82:219,116:S,117:y,118:F},{60:[1,226]},{64:[1,227],67:E,82:219,116:S,117:y,118:F},{66:[1,228],67:E,82:219,116:S,117:y,118:F},{30:229,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},{31:[1,230],67:E,82:219,116:S,117:y,118:F},{67:E,69:[1,231],71:[1,232],82:219,116:S,117:y,118:F},{67:E,69:[1,234],71:[1,233],82:219,116:S,117:y,118:F},e(Ie,[2,45],{18:156,10:Fe,40:Qt}),e(Ie,[2,47],{44:Xt}),e(He,[2,75]),e(He,[2,74]),{62:[1,235],67:E,82:219,116:S,117:y,118:F},e(He,[2,77]),e(qe,[2,80]),{77:[1,236],79:198,116:rt,119:at},{30:237,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},e(ht,k,{5:238}),e(V,[2,102]),e(v,[2,35]),{43:239,44:B,45:40,47:41,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},{10:Fe,18:240},{10:Ae,60:me,84:Ce,92:241,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:252,104:[1,253],105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:254,104:[1,255],105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{105:[1,256]},{10:Ae,60:me,84:Ce,92:257,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{44:B,47:258,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(N,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(N,[2,116]),e(N,[2,118],{10:[1,262]}),e(N,[2,119]),e(re,[2,56]),e(_e,[2,87]),e(re,[2,57]),{51:[1,263],67:E,82:219,116:S,117:y,118:F},e(re,[2,64]),e(re,[2,59]),e(re,[2,60]),e(re,[2,61]),{109:[1,264]},e(re,[2,63]),e(re,[2,65]),{66:[1,265],67:E,82:219,116:S,117:y,118:F},e(re,[2,67]),e(re,[2,68]),e(re,[2,70]),e(re,[2,69]),e(re,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(He,[2,78]),{31:[1,266],67:E,82:219,116:S,117:y,118:F},{6:11,7:12,8:c,9:A,10:f,11:I,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,267],33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:Y,84:ie,85:d,86:m,87:ue,88:le,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},e(ve,[2,53]),{43:268,44:B,45:40,47:41,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te},e(N,[2,121],{106:Xe}),e(Zt,[2,130],{108:270,10:Ae,60:me,84:Ce,105:De,109:Te,110:Ee,111:Se,112:ye}),e(fe,[2,132]),e(fe,[2,134]),e(fe,[2,135]),e(fe,[2,136]),e(fe,[2,137]),e(fe,[2,138]),e(fe,[2,139]),e(fe,[2,140]),e(fe,[2,141]),e(N,[2,122],{106:Xe}),{10:[1,271]},e(N,[2,123],{106:Xe}),{10:[1,272]},e(Jt,[2,129]),e(N,[2,105],{106:Xe}),e(N,[2,106],{113:113,44:B,60:Y,89:U,102:W,105:K,106:q,109:Q,111:J,114:Z,115:ee,116:te}),e(N,[2,110]),e(N,[2,112],{10:[1,273]}),e(N,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:be,9:ke,11:ge,21:278},e(v,[2,34]),e(ve,[2,52]),{10:Ae,60:me,84:Ce,105:De,107:279,108:243,109:Te,110:Ee,111:Se,112:ye},e(fe,[2,133]),{14:Re,44:Ne,60:Ge,89:Pe,101:280,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},{14:Re,44:Ne,60:Ge,89:Pe,101:281,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke,120:88},{98:[1,282]},e(N,[2,120]),e(re,[2,58]),{30:283,67:E,80:ae,81:ne,82:172,116:S,117:y,118:F},e(re,[2,66]),e(ht,k,{5:284}),e(Zt,[2,131],{108:270,10:Ae,60:me,84:Ce,105:De,109:Te,110:Ee,111:Se,112:ye}),e(N,[2,126],{120:168,10:[1,285],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(N,[2,127],{120:168,10:[1,286],14:Re,44:Ne,60:Ge,89:Pe,105:Oe,106:Me,109:Ue,111:We,114:ze,115:je,116:Ke}),e(N,[2,114]),{31:[1,287],67:E,82:219,116:S,117:y,118:F},{6:11,7:12,8:c,9:A,10:f,11:I,20:17,22:18,23:19,24:20,25:21,26:22,27:_,32:[1,288],33:24,34:L,36:D,38:T,42:28,43:39,44:B,45:40,47:41,60:Y,84:ie,85:d,86:m,87:ue,88:le,89:U,102:W,105:K,106:q,109:Q,111:J,113:42,114:Z,115:ee,116:te,121:Ze,122:$e,123:et,124:tt,125:it},{10:Ae,60:me,84:Ce,92:289,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},{10:Ae,60:me,84:Ce,92:290,105:De,107:242,108:243,109:Te,110:Ee,111:Se,112:ye},e(re,[2,62]),e(v,[2,33]),e(N,[2,124],{106:Xe}),e(N,[2,125],{106:Xe})],defaultActions:{},parseError:t(function(b,g){if(g.recoverable)this.trace(b);else{var C=Error(b);throw C.hash=g,C}},"parseError"),parse:t(function(b){var g=this,C=[0],u=[],w=[null],s=[],Le=this.table,i="",X=0,$t=0,e1=0,u1=2,t1=1,o1=s.slice.call(arguments,1),se=Object.create(this.lexer),Ve={yy:{}};for(var pt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,pt))Ve.yy[pt]=this.yy[pt];if(se.setInput(b,Ve.yy),Ve.yy.lexer=se,Ve.yy.parser=this,typeof se.yylloc>"u")se.yylloc={};var ft=se.yylloc;s.push(ft);var l1=se.options&&se.options.ranges;if(typeof Ve.yy.parseError==="function")this.parseError=Ve.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function c1(pe){C.length=C.length-2*pe,w.length=w.length-pe,s.length=s.length-pe}t(c1,"popStack");function s1(){var pe=u.pop()||se.lex()||t1;if(typeof pe!=="number"){if(pe instanceof Array)u=pe,pe=u.pop();pe=g.symbols_[pe]||pe}return pe}t(s1,"lex");var oe,bt,we,de,C1,kt,Qe={},ut,xe,i1,ct;while(!0){if(we=C[C.length-1],this.defaultActions[we])de=this.defaultActions[we];else{if(oe===null||typeof oe>"u")oe=s1();de=Le[we]&&Le[we][oe]}if(typeof de>"u"||!de.length||!de[0]){var gt="";ct=[];for(ut in Le[we])if(this.terminals_[ut]&&ut>u1)ct.push("'"+this.terminals_[ut]+"'");if(se.showPosition)gt="Parse error on line "+(X+1)+`:
|
|
10
10
|
`+se.showPosition()+`
|
|
11
11
|
Expecting `+ct.join(", ")+", got '"+(this.terminals_[oe]||oe)+"'";else gt="Parse error on line "+(X+1)+": Unexpected "+(oe==t1?"end of input":"'"+(this.terminals_[oe]||oe)+"'");this.parseError(gt,{text:se.match,token:this.terminals_[oe]||oe,line:se.yylineno,loc:ft,expected:ct})}if(de[0]instanceof Array&&de.length>1)throw Error("Parse Error: multiple actions possible at state: "+we+", token: "+oe);switch(de[0]){case 1:if(C.push(oe),w.push(se.yytext),s.push(se.yylloc),C.push(de[1]),oe=null,!bt){if($t=se.yyleng,i=se.yytext,X=se.yylineno,ft=se.yylloc,e1>0)e1--}else oe=bt,bt=null;break;case 2:if(xe=this.productions_[de[1]][1],Qe.$=w[w.length-xe],Qe._$={first_line:s[s.length-(xe||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(xe||1)].first_column,last_column:s[s.length-1].last_column},l1)Qe._$.range=[s[s.length-(xe||1)].range[0],s[s.length-1].range[1]];if(kt=this.performAction.apply(Qe,[i,$t,X,Ve.yy,de[1],w,s].concat(o1)),typeof kt<"u")return kt;if(xe)C=C.slice(0,-1*xe*2),w=w.slice(0,-1*xe),s=s.slice(0,-1*xe);C.push(this.productions_[de[1]][0]),w.push(Qe.$),s.push(Qe._$),i1=Le[C[C.length-2]][C[C.length-1]],C.push(i1);break;case 3:return!0}}return!0},"parse")},n1=function(){var Be={EOF:1,parseError:t(function(g,C){if(this.yy.parser)this.yy.parser.parseError(g,C);else throw Error(g)},"parseError"),setInput:t(function(b,g){if(this.yy=g||this.yy||{},this._input=b,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges)this.yylloc.range=[0,0];return this.offset=0,this},"setInput"),input:t(function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var g=b.match(/(?:\r\n?|\n).*/g);if(g)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),b},"input"),unput:t(function(b){var g=b.length,C=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var u=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),C.length-1)this.yylineno-=C.length-1;var w=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:C?(C.length===u.length?this.yylloc.first_column:0)+u[u.length-C.length].length-C[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-g];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
12
12
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(b){this.unput(this.match.slice(b))},"less"),pastInput:t(function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var b=this.match;if(b.length<20)b+=this._input.substr(0,20-b.length);return(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var b=this.pastInput(),g=Array(b.length+1).join("-");return b+this.upcomingInput()+`
|
|
@@ -56,7 +56,7 @@ ${k?`
|
|
|
56
56
|
${L(".collapsed-separator")} {
|
|
57
57
|
stroke: ${f};
|
|
58
58
|
}
|
|
59
|
-
`}return c},"genColor"),A1=t((e,r)=>{let a=
|
|
59
|
+
`}return c},"genColor"),A1=t((e,r)=>{let a=aa,n=a(e,"r"),o=a(e,"g"),k=a(e,"b");return ot(n,o,k,r)},"fade"),m1=t((e)=>`${g1(e)}
|
|
60
60
|
.label {
|
|
61
61
|
font-family: ${e.fontFamily};
|
|
62
62
|
color: ${e.nodeTextColor||e.textColor};
|
|
@@ -210,5 +210,5 @@ ${k?`
|
|
|
210
210
|
text-align: center;
|
|
211
211
|
}
|
|
212
212
|
${xn()}
|
|
213
|
-
`,"getStyles"),
|
|
214
|
-
export{
|
|
213
|
+
`,"getStyles"),uf=m1,df=t(({styles:e=uf}={})=>({parser:k1,get db(){return new d1},renderer:b1,styles:e,init:t((r)=>{if(!r.flowchart)r.flowchart={};r.flowchart.arrowMarkerAbsolute=r.arrowMarkerAbsolute,ia({flowchart:{arrowMarkerAbsolute:r.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),th=df();
|
|
214
|
+
export{uf,df,th};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{n,i,o,a,e,s,
|
|
2
|
-
export{
|
|
1
|
+
import{n,i,o,a,e,s,sr,m,se,Dt,tt,C,y,W,_e}from"./index-4s8ttfxj.js";var Y={name:"pin-off",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]},ll=s(Y);var H={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]},Ia=s(H);async function pd(r){let u=r?`?path=${encodeURIComponent(r)}`:"",p=await fetch(`/api/fs/browse${u}`),l=await p.json();if(!p.ok||l.error)throw Error(l.error||`HTTP ${p.status}`);return l}function bs({initialPath:r,onSelect:u,onClose:p}){let[l,P]=n(r??""),[b,f]=n(""),[h,D]=n([]),[x,T]=n(null),[R,k]=n(!0),[v,S]=n(null),[z,g]=n(null),L=o(null),d=a(async(t)=>{k(!0),S(null);try{let c=await pd(t);P(c.path??t??""),T(c.parentPath??null),f(c.path??t??""),D(c.directories??[])}catch(c){S(c instanceof Error?c.message:String(c))}finally{k(!1)}},[]);i(()=>{d(r)},[r,d]);let A=()=>{if(x)d(x)},I=(t)=>{t.preventDefault();let c=b.trim();if(c)d(c)},w=(t)=>{d(t.path)},_=(t)=>{g(t.path),u(t.path)},B=()=>{if(l)g(l),u(l)};return e("div",{className:"fixed inset-0 modal-scrim z-[60] flex items-center justify-center p-4",onClick:p,children:e("div",{className:"glass-overlay bg-paper border border-ink/15 rounded-lg shadow-2xl w-full max-w-lg flex flex-col overflow-hidden",onClick:(t)=>t.stopPropagation(),children:[e("div",{className:"flex items-center justify-between px-4 py-3 border-b border-ink/10",children:[e("h3",{className:"font-semibold text-sm flex items-center space-x-2",children:[e(Dt,{size:15,className:"text-ink/70"}),e("span",{children:"Choose Project Folder"})]}),e("button",{type:"button",onClick:p,className:"p-1 rounded hover:bg-ink/10 text-ink/60 hover:text-ink transition-colors","aria-label":"Close picker",children:e(y,{size:15})})]}),e("div",{className:"px-4 py-2 border-b border-ink/10 bg-canvas/50",children:[e("form",{onSubmit:I,className:"flex items-center space-x-2",children:[e(sr,{size:14,className:"text-ink/40 flex-shrink-0"}),e("input",{ref:L,type:"text",value:b,onChange:(t)=>f(t.currentTarget.value),placeholder:"~ or /absolute/path",className:"flex-1 bg-transparent outline-none text-xs font-mono text-ink placeholder-ink/35 py-1",spellcheck:!1}),e("button",{type:"submit",className:"px-2 py-1 rounded bg-ink/5 border border-ink/10 text-[11px] font-medium hover:bg-ink/10 transition-colors",children:"Go"})]}),e("div",{className:"flex items-center space-x-1 mt-1 text-[11px] text-ink/40 truncate",children:[e("button",{type:"button",onClick:()=>void d(),className:"hover:text-ink transition-colors flex items-center",children:[e(sr,{size:11,className:"mr-0.5"})," home"]}),l.split("/").filter(Boolean).map((t,c,F)=>{let N="/"+l.split("/").filter(Boolean).slice(0,c+1).join("/"),j=c===F.length-1;return e("span",{className:"flex items-center space-x-1 min-w-0",children:[e(se,{size:10,className:"text-ink/20 flex-shrink-0"}),j?e("span",{className:"text-ink/70 truncate",children:t}):e("button",{type:"button",onClick:()=>void d(N),className:"hover:text-ink transition-colors truncate max-w-[120px]",children:t})]},N)})]})]}),e("div",{className:"flex-1 min-h-[240px] max-h-[360px] scrollbar-overlay-container p-2",children:R?e("div",{className:"flex items-center justify-center h-40 text-ink/40",children:e(m,{size:18,className:"animate-spin"})}):v?e("div",{className:"flex flex-col items-center justify-center h-40 text-xs text-error space-y-2 px-4",children:[e("span",{children:v}),e("button",{type:"button",onClick:()=>void d(l||void 0),className:"px-2 py-1 rounded bg-ink/5 border border-ink/10 text-ink/70 hover:bg-ink/10 flex items-center space-x-1",children:[e(C,{size:11})," Retry"]})]}):h.length===0?e("div",{className:"text-center py-16 text-xs text-ink/40",children:"No subfolders"}):h.map((t)=>e("div",{className:`group flex items-center justify-between px-2.5 py-2 rounded cursor-pointer transition-colors ${z===t.path?"bg-ink/10":"hover:bg-ink/5"}`,onDblClick:()=>w(t),children:[e("button",{type:"button",onClick:()=>w(t),className:"flex items-center space-x-2 min-w-0 flex-1 text-left",children:[e(tt,{size:15,className:"text-ink/50 flex-shrink-0"}),e("span",{className:"text-xs truncate text-ink/85",children:t.name})]}),e("button",{type:"button",onClick:()=>_(t),className:"touch-shown-flex hidden group-hover:flex px-2 py-0.5 rounded bg-ink text-canvas text-[10px] font-semibold hover:bg-ink/80 transition-colors flex-shrink-0",children:"Choose"})]},t.path))}),e("div",{className:"flex items-center justify-between px-4 py-3 border-t border-ink/10",children:[e("div",{className:"flex items-center space-x-2 min-w-0",children:[e("button",{type:"button",onClick:A,disabled:!x,className:"px-2.5 py-1.5 rounded bg-ink/5 border border-ink/10 text-[11px] font-medium hover:bg-ink/10 disabled:opacity-40 transition-colors flex items-center space-x-1",children:[e("span",{children:"↑"}),e("span",{children:"Up"})]}),e("button",{type:"button",onClick:()=>void d(),className:"px-2.5 py-1.5 rounded bg-ink/5 border border-ink/10 text-[11px] font-medium hover:bg-ink/10 transition-colors",children:"Home"})]}),e("div",{className:"flex items-center space-x-2",children:[e("button",{type:"button",onClick:p,className:"px-3 py-1.5 text-xs font-medium text-ink/60 hover:text-ink transition-colors",children:"Cancel"}),e("button",{type:"button",onClick:B,disabled:!l,className:"px-3.5 py-1.5 text-xs font-medium bg-ink text-canvas rounded hover:bg-ink/90 disabled:opacity-50 transition-colors",children:"Use This Folder"})]})]})]})})}var iA="classic",oA=["classic","modern"];function M(r){return r==="classic"||r==="modern"}function cl(r){return M(r)?r:"classic"}var sA={classic:{label:"Classic",description:"A toolbar of boxed icons and compact rows — the layout Kabmo has always shipped.",caption:"Toolbar · 24px rows"},modern:{label:"Modern",description:"Permanent search, filter chips, sticky workspace headers and taller rows with one trailing column.",caption:"Search · chips · 30px rows"}};var U="sidebarStyle",E="omp:sidebar-style-changed";function V(r){return cl(W(U,r))}function lA(r){if(typeof window>"u")return;window.dispatchEvent(new CustomEvent(E,{detail:cl(r)}))}function au(){let[r,u]=n(()=>V());return _e(E,(p)=>{u(cl(p.detail))}),r}
|
|
2
|
+
export{ll,Ia,iA,oA,cl,sA,lA,au,pd,bs};
|