@kabmo-labs/kabmo 0.40.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.html +1 -1
- package/dist/client/index.js +360 -359
- package/dist/client/static/js/{CsvGrid-j9nvnhq1.js → CsvGrid-60njj97j.js} +2 -2
- package/dist/client/static/js/{DocxView-87gnpm81.js → DocxView-rsv0j46a.js} +1 -1
- package/dist/client/static/js/{DrawioView-a351t8f8.js → DrawioView-n2g5df3a.js} +1 -1
- package/dist/client/static/js/{ImageView-c139r891.js → ImageView-t330jx6y.js} +1 -1
- package/dist/client/static/js/LayoutWrapper-qp6nsw65.js +2 -0
- package/dist/client/static/js/{Modal-0weqfqvk.js → Modal-sbya4ahp.js} +9 -9
- package/dist/client/static/js/{PdfView-n6bwcvc8.js → PdfView-1r7a0qkp.js} +1 -1
- package/dist/client/static/js/SessionsView-yqs5m8tj.js +1 -0
- package/dist/client/static/js/{SheetView-k8ymr87w.js → SheetView-bt5pp042.js} +8 -8
- package/dist/client/static/js/{SvgPreview-5pcp444e.js → SvgPreview-vfmqgmrx.js} +1 -1
- package/dist/client/static/js/{abnfDiagram-O67JEVCF-psav75bx.js → abnfDiagram-O67JEVCF-8k5hk1yx.js} +1 -1
- package/dist/client/static/js/architecture-7GRP2DOG-1wqga929.js +1 -0
- package/dist/client/static/js/{architectureDiagram-NJMV4G6O-9bk6ykn7.js → architectureDiagram-NJMV4G6O-7jcb7fgy.js} +2 -2
- package/dist/client/static/js/{blockDiagram-BEXU5L5S-17xsf182.js → blockDiagram-BEXU5L5S-04sbtdth.js} +1 -1
- package/dist/client/static/js/{c4Diagram-YGBWAQC7-jn9j4n04.js → c4Diagram-YGBWAQC7-vwac9za0.js} +1 -1
- package/dist/client/static/js/{classDiagram-v2-NBCMYWYE-663z1g1r.js → classDiagram-v2-NBCMYWYE-18cc0bsb.js} +1 -1
- package/dist/client/static/js/{cose-bilkent-JH36ORCC-vp4yvx8x.js → cose-bilkent-JH36ORCC-dk683zvp.js} +1 -1
- package/dist/client/static/js/css-2re5mbea.js +1 -0
- package/dist/client/static/js/cynefin-OW5HDTMX-j2dpdgkh.js +1 -0
- package/dist/client/static/js/{cynefinDiagram-VND7K2PF-dagkrjbh.js → cynefinDiagram-VND7K2PF-m2sx8d8s.js} +1 -1
- package/dist/client/static/js/{dagre-6A5THRUB-8qgwpb5a.js → dagre-6A5THRUB-qf3pr59p.js} +2 -2
- package/dist/client/static/js/{diagram-22UHCM2B-671xtp0d.js → diagram-22UHCM2B-twnz23mt.js} +1 -1
- package/dist/client/static/js/{diagram-3UASUU5V-8nn5fha8.js → diagram-3UASUU5V-417bas6t.js} +1 -1
- package/dist/client/static/js/{diagram-ATOU4E4O-dnar0ktg.js → diagram-ATOU4E4O-n63cpdnx.js} +1 -1
- package/dist/client/static/js/{diagram-CDSNMT55-bt0fhk7n.js → diagram-CDSNMT55-v86p14dd.js} +1 -1
- package/dist/client/static/js/{diagram-MLGK6HIB-tp6dwxdb.js → diagram-MLGK6HIB-7a0h1hs3.js} +1 -1
- package/dist/client/static/js/{diagram-MPIPVDR6-qgx8c8ee.js → diagram-MPIPVDR6-w75bftmd.js} +1 -1
- package/dist/client/static/js/{dockerfile-hk0s4qaw.js → dockerfile-g5qbaeq3.js} +1 -1
- package/dist/client/static/js/{ebnfDiagram-ZINNZB2B-nmf9r33z.js → ebnfDiagram-ZINNZB2B-vdzm3tsv.js} +1 -1
- package/dist/client/static/js/{elk-276RUBZZ-dheh5ngz.js → elk-276RUBZZ-2fsbb484.js} +1 -1
- package/dist/client/static/js/{erDiagram-OPXOYQCR-8837mk18.js → erDiagram-OPXOYQCR-vnkztq7d.js} +1 -1
- package/dist/client/static/js/{erlang-w9gmf866.js → erlang-jqqa3ehb.js} +1 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-xjvjawd3.js +1 -0
- package/dist/client/static/js/flowDiagram-KWPJA3E3-j21f2bfg.js +1 -0
- package/dist/client/static/js/{ganttDiagram-FUAMR5RP-g68mvnje.js → ganttDiagram-FUAMR5RP-pbvcch52.js} +1 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-r0zbk95f.js +1 -0
- package/dist/client/static/js/{gitGraphDiagram-X574FWY7-ymk81cdj.js → gitGraphDiagram-X574FWY7-dkvktvzr.js} +1 -1
- package/dist/client/static/js/graphql-npbd9fdx.js +1 -0
- package/dist/client/static/js/{index-jy91r3ap.js → index-0c6vpk89.js} +2 -2
- package/dist/client/static/js/{index-js81yrmy.js → index-0xaz2eyv.js} +2 -2
- package/dist/client/static/js/{index-qnt118mp.js → index-1sw00wm0.js} +1 -1
- package/dist/client/static/js/{index-rvjc19x7.js → index-2z9wrb46.js} +1 -1
- package/dist/client/static/js/{index-ag78jnva.js → index-3rymer2w.js} +1 -1
- package/dist/client/static/js/{index-69xe17c1.js → index-4jk8ngjg.js} +2 -2
- package/dist/client/static/js/{index-q1bqg4f6.js → index-55hq7tnj.js} +1 -1
- package/dist/client/static/js/{index-547h1b8j.js → index-6fx2t6y7.js} +6 -6
- package/dist/client/static/js/{index-bgpcf3mr.js → index-7fwppdkn.js} +1 -1
- package/dist/client/static/js/{index-p2812ygk.js → index-7w3gqw2b.js} +1 -1
- package/dist/client/static/js/{index-2kg3r5jw.js → index-9dnkfpx4.js} +2 -2
- package/dist/client/static/js/{index-8ggxxp8c.js → index-9fnzcg2x.js} +1 -1
- package/dist/client/static/js/{index-y5hxhr7q.js → index-a4ed3mks.js} +1 -1
- package/dist/client/static/js/{index-g10nr8m6.js → index-ae91g8ka.js} +5 -5
- package/dist/client/static/js/{index-d1vearmk.js → index-ajjq0b8y.js} +2 -2
- package/dist/client/static/js/{index-ek7hqfp0.js → index-amawahyh.js} +2 -2
- package/dist/client/static/js/{index-wv36ddd5.js → index-b6cyn4hr.js} +19 -19
- package/dist/client/static/js/{index-aznkfx1z.js → index-c6kx7s6a.js} +1 -1
- package/dist/client/static/js/{index-9wjnbb3q.js → index-cytks03p.js} +2 -2
- package/dist/client/static/js/{index-b612vske.js → index-djv15k5s.js} +2 -2
- package/dist/client/static/js/{index-8888hgj8.js → index-ds6a2cx7.js} +4 -4
- package/dist/client/static/js/{index-qw5aqk2d.js → index-e6qjfcz9.js} +1 -1
- package/dist/client/static/js/{index-173x4bh0.js → index-e7yf273s.js} +2 -2
- package/dist/client/static/js/{index-y82bk3hr.js → index-efn233xp.js} +4 -4
- package/dist/client/static/js/index-esx3zwnt.js +1 -0
- package/dist/client/static/js/{index-4j1g7m8g.js → index-f8pq132s.js} +1 -1
- package/dist/client/static/js/{index-qntpsp98.js → index-fbbp5cwj.js} +1 -1
- package/dist/client/static/js/{index-bdz08fe2.js → index-g1cggqgx.js} +7 -7
- package/dist/client/static/js/{index-bj3wn9je.js → index-ghsdzs4m.js} +1 -1
- package/dist/client/static/js/{index-j4ks5s41.js → index-gs7ytgdw.js} +171 -171
- package/dist/client/static/js/{index-gx2xefdg.js → index-hz177dr2.js} +2 -2
- package/dist/client/static/js/{index-wy05jt00.js → index-j5ram1ve.js} +1 -1
- package/dist/client/static/js/{index-6wtx7a9x.js → index-ne131hmw.js} +1 -1
- package/dist/client/static/js/{index-vwc8pdy3.js → index-ngk9h0v9.js} +1 -1
- package/dist/client/static/js/{index-ek4gwrm8.js → index-ntcqyqd5.js} +2 -2
- package/dist/client/static/js/{index-4j5jwb54.js → index-pbsm2vw7.js} +2 -2
- package/dist/client/static/js/{index-wsqgp9jw.js → index-pfbyfab5.js} +1 -1
- package/dist/client/static/js/{index-vv9ytx0t.js → index-pn91shfp.js} +2 -2
- package/dist/client/static/js/{index-w130cs7d.js → index-qjsy6p86.js} +1 -1
- package/dist/client/static/js/{index-dj7y2df7.js → index-rdqn92tc.js} +1 -1
- package/dist/client/static/js/{index-c003wb3r.js → index-re1xz433.js} +1 -1
- package/dist/client/static/js/{index-mxpgfj6p.js → index-rebnv57p.js} +1 -1
- package/dist/client/static/js/{index-cccrappc.js → index-tgper3yy.js} +2 -2
- package/dist/client/static/js/{index-pp6mss9b.js → index-x2kb1kx5.js} +1 -1
- package/dist/client/static/js/{index-018ehs1n.js → index-xfa5hswh.js} +1 -1
- package/dist/client/static/js/{index-r1fe56cn.js → index-yq9vnd1y.js} +2 -2
- package/dist/client/static/js/{index-harsfp4x.js → index-zfykeg7x.js} +3 -3
- package/dist/client/static/js/{index-ys4t1am4.js → index-zye9309h.js} +2 -2
- package/dist/client/static/js/info-A6RAGUB7-a8xap43w.js +1 -0
- package/dist/client/static/js/{infoDiagram-VRGFBTTK-11trzn8c.js → infoDiagram-VRGFBTTK-mh6yks62.js} +1 -1
- package/dist/client/static/js/ini-df5bw23e.js +1 -0
- package/dist/client/static/js/{ishikawaDiagram-OU5B5YK6-8xnnymb5.js → ishikawaDiagram-OU5B5YK6-hnfqppnv.js} +1 -1
- package/dist/client/static/js/java-8j33rj1p.js +1 -0
- package/dist/client/static/js/{journeyDiagram-ZHPQQLJL-wd47j0hy.js → journeyDiagram-ZHPQQLJL-s4nv1f3q.js} +2 -2
- package/dist/client/static/js/jsx-f6p72qpc.js +1 -0
- package/dist/client/static/js/{julia-c2q0vwpd.js → julia-yre4bxb9.js} +1 -1
- package/dist/client/static/js/{kanban-definition-PNTS6WVX-s5rgcp44.js → kanban-definition-PNTS6WVX-t8kbfefp.js} +7 -7
- package/dist/client/static/js/lua-bahx6qze.js +1 -0
- package/dist/client/static/js/markdown-9dhg1fax.js +1 -0
- package/dist/client/static/js/{mermaid.core-9fxp8nt2.js → mermaid.core-0784021p.js} +6 -6
- package/dist/client/static/js/{mindmap-definition-NLK3R4M7-4fyewtst.js → mindmap-definition-NLK3R4M7-swkkze8c.js} +8 -8
- package/dist/client/static/js/one-dark-pro-h5tmw145.js +1 -0
- package/dist/client/static/js/one-light-x7vj1pxr.js +1 -0
- package/dist/client/static/js/packet-AYTQ26CC-b5bvg6v1.js +1 -0
- package/dist/client/static/js/{pegDiagram-GJSIUBJH-s2xe2e2k.js → pegDiagram-GJSIUBJH-jqayzh7z.js} +1 -1
- package/dist/client/static/js/{perl-6pa0tn3b.js → perl-weeskn1v.js} +1 -1
- package/dist/client/static/js/{php-1zy994pz.js → php-vf3045p9.js} +1 -1
- package/dist/client/static/js/pie-WAS4IAKB-77ee73zg.js +1 -0
- package/dist/client/static/js/{pieDiagram-5QR66LMP-1szpjbzy.js → pieDiagram-5QR66LMP-w03a65ky.js} +1 -1
- package/dist/client/static/js/properties-49mfnee4.js +1 -0
- package/dist/client/static/js/python-qb69wp1s.js +1 -0
- package/dist/client/static/js/{quadrantDiagram-O4NWA36T-mv3ee2qa.js → quadrantDiagram-O4NWA36T-2j7sfa9s.js} +1 -1
- package/dist/client/static/js/r-s3mf2tch.js +1 -0
- package/dist/client/static/js/radar-RG4KPBEZ-cp79xtvb.js +1 -0
- package/dist/client/static/js/railroad-74A4TZTK-dcpgqhcb.js +1 -0
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-qasqv686.js +1 -0
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-e46908rd.js +1 -0
- package/dist/client/static/js/railroad-peg-WCYAUIDC-7009t6bk.js +1 -0
- package/dist/client/static/js/{railroadDiagram-XR7U4H2S-hgdqjpm9.js → railroadDiagram-XR7U4H2S-jtkkgy34.js} +1 -1
- package/dist/client/static/js/{requirementDiagram-PLB6GJNP-yrfjp9wx.js → requirementDiagram-PLB6GJNP-t85ckjdb.js} +1 -1
- package/dist/client/static/js/{ruby-arvs7kz4.js → ruby-1a2ryzy6.js} +1 -1
- package/dist/client/static/js/{rust-3ahjk339.js → rust-736r0f0v.js} +1 -1
- package/dist/client/static/js/{sankeyDiagram-IPEJSGJF-k7k871xa.js → sankeyDiagram-IPEJSGJF-5pfkw8ne.js} +1 -1
- package/dist/client/static/js/{sass-cmkf7nwd.js → sass-tq4vw7hd.js} +1 -1
- package/dist/client/static/js/{sequenceDiagram-PO4LG4MO-gd80m0as.js → sequenceDiagram-PO4LG4MO-55vs9zv5.js} +3 -3
- package/dist/client/static/js/{sizeCapture-INFHLROL-jv6p4834.js → sizeCapture-INFHLROL-pzqqd7f4.js} +1 -1
- package/dist/client/static/js/{stateDiagram-v2-GCMORJYK-tvphxq2h.js → stateDiagram-v2-GCMORJYK-6nhrph8n.js} +2 -2
- package/dist/client/static/js/{swimlanes-2SLR337P-3dt7nxj2.js → swimlanes-2SLR337P-6tcnxfbv.js} +1 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-7xrkrkpa.js +8 -0
- package/dist/client/static/js/{timeline-definition-EJHVYXUP-40vvf856.js → timeline-definition-EJHVYXUP-1dz46nt5.js} +2 -2
- package/dist/client/static/js/treeView-Q6P3EWNA-tpn62q8j.js +1 -0
- package/dist/client/static/js/treemap-WGGIJYW6-w910f1g4.js +1 -0
- package/dist/client/static/js/{usecaseDiagram-POWQR4AR-g1j5x0xh.js → usecaseDiagram-POWQR4AR-b3jfveq6.js} +1 -1
- package/dist/client/static/js/{vennDiagram-UO4OBE2U-5b8789qk.js → vennDiagram-UO4OBE2U-dnc3jqvp.js} +3 -3
- package/dist/client/static/js/wardley-WFR3VGLG-pt9tq808.js +1 -0
- package/dist/client/static/js/{wardleyDiagram-VNRHLVJA-c7x3za3w.js → wardleyDiagram-VNRHLVJA-466m8400.js} +1 -1
- package/dist/client/static/js/xml-wr1dxav5.js +1 -0
- package/dist/client/static/js/{xychartDiagram-PMCCYNJV-h0fy45tg.js → xychartDiagram-PMCCYNJV-kryrpqp1.js} +2 -2
- package/dist/client/static/js/yaml-0y9fdskg.js +1 -0
- package/package.json +1 -1
- package/src/client/components/layout/desktop-layout/LeftColumn.tsx +7 -0
- package/src/client/components/layout/session-sidebar/SessionsView.tsx +2 -1
- package/src/client/components/layout/session-sidebar/about-modal/index.test.tsx +1 -1
- package/src/client/components/mobile/SessionSidebar.tsx +4 -0
- package/src/client/components/workspace/chat-timeline/MessageList.test.ts +19 -19
- package/src/client/hooks/commands/use-command-runtime.ts +15 -0
- package/src/client/hooks/ui/updates/check-request.ts +41 -0
- package/src/client/hooks/ui/updates/index.ts +13 -5
- package/src/client/lib/native/run-command.test.ts +95 -0
- package/src/client/lib/native/run-command.ts +52 -0
- package/src/client/lib/router/open-session.test.ts +26 -1
- package/src/client/lib/router/open-session.ts +21 -0
- package/src/client/main.tsx +9 -0
- package/src/server/lib/changes/capture-shell.test.ts +253 -0
- package/src/server/lib/changes/capture-targets.test.ts +83 -0
- package/src/server/lib/changes/capture-targets.ts +51 -0
- package/src/server/lib/changes/capture-write.server.ts +2 -2
- package/src/server/lib/changes/capture.server.ts +14 -29
- package/src/server/lib/changes/capture.test.ts +69 -149
- package/src/server/lib/changes/patch-paths.ts +37 -0
- package/src/shared/lib/commands/catalog.test.ts +36 -0
- package/src/shared/lib/commands/catalog.ts +16 -0
- package/src/shared/lib/updates/popup-state.ts +11 -0
- package/dist/client/static/js/LayoutWrapper-08axzr3a.js +0 -2
- package/dist/client/static/js/SessionsView-awef8ehj.js +0 -1
- package/dist/client/static/js/architecture-7GRP2DOG-6rbq97t9.js +0 -1
- package/dist/client/static/js/css-zj4qzw6r.js +0 -1
- package/dist/client/static/js/cynefin-OW5HDTMX-zafxcz2k.js +0 -1
- package/dist/client/static/js/eventmodeling-NTZA5JFV-cq3dvz7e.js +0 -1
- package/dist/client/static/js/flowDiagram-KWPJA3E3-spzh2jxq.js +0 -1
- package/dist/client/static/js/gitGraph-4MIJSDKK-epgk26pj.js +0 -1
- package/dist/client/static/js/graphql-dewsj5g1.js +0 -1
- package/dist/client/static/js/index-dhrp656p.js +0 -1
- package/dist/client/static/js/info-A6RAGUB7-0an46pag.js +0 -1
- package/dist/client/static/js/ini-09e0scxh.js +0 -1
- package/dist/client/static/js/java-vnaesxzs.js +0 -1
- package/dist/client/static/js/jsx-xz71aed4.js +0 -1
- package/dist/client/static/js/lua-e4wenyzt.js +0 -1
- package/dist/client/static/js/markdown-yv3p1p7m.js +0 -1
- package/dist/client/static/js/one-dark-pro-ahch85zb.js +0 -1
- package/dist/client/static/js/one-light-9706jgqt.js +0 -1
- package/dist/client/static/js/packet-AYTQ26CC-5e397pav.js +0 -1
- package/dist/client/static/js/pie-WAS4IAKB-0zzmzg64.js +0 -1
- package/dist/client/static/js/properties-0ag74bdj.js +0 -1
- package/dist/client/static/js/python-zsn5tdbj.js +0 -1
- package/dist/client/static/js/r-mwtqhnw3.js +0 -1
- package/dist/client/static/js/radar-RG4KPBEZ-mtar9742.js +0 -1
- package/dist/client/static/js/railroad-74A4TZTK-d6a6j9fq.js +0 -1
- package/dist/client/static/js/railroad-abnf-HS5TGJTU-1257kd8x.js +0 -1
- package/dist/client/static/js/railroad-ebnf-LZEXJU2U-v8b6qmas.js +0 -1
- package/dist/client/static/js/railroad-peg-WCYAUIDC-jxpbx410.js +0 -1
- package/dist/client/static/js/swimlanesDiagram-TC7HE7FX-aqnh1hhp.js +0 -8
- package/dist/client/static/js/treeView-Q6P3EWNA-q3qr7ew7.js +0 -1
- package/dist/client/static/js/treemap-WGGIJYW6-zgbdydeq.js +0 -1
- package/dist/client/static/js/wardley-WFR3VGLG-b230aajh.js +0 -1
- package/dist/client/static/js/xml-23y6pgvx.js +0 -1
- package/dist/client/static/js/yaml-vrayja34.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{t,l,x,R,F,z,P,U,q,j,p,h,
|
|
1
|
+
import{t,l,x,R,F,z,P,U,q,j,p,h,$f,K,pt,Ye,Je,Ur,Dt,Qt,Nt,mt}from"./index-b6cyn4hr.js";import{Mt}from"./index-gs7ytgdw.js";import{Ma}from"./index-4jk8ngjg.js";var Yt=function(){var e=t(function(Q,c,S,a){for(S=S||{},a=Q.length;a--;S[Q[a]]=c);return S},"o"),s=[1,2],o=[1,3],r=[1,4],u=[2,4],f=[1,9],y=[1,11],m=[1,16],n=[1,17],T=[1,18],E=[1,19],I=[1,33],N=[1,20],G=[1,21],C=[1,22],g=[1,23],O=[1,24],A=[1,26],M=[1,27],B=[1,28],W=[1,29],D=[1,30],st=[1,31],St=[1,32],gt=[1,35],yt=[1,36],bt=[1,37],kt=[1,38],rt=[1,34],b=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Tt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Ut=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],It={trace:t(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:t(function(c,S,a,k,_,i,it){var d=i.length-1;switch(_){case 3:return k.setRootDoc(i[d]),i[d];break;case 4:this.$=[];break;case 5:if(i[d]!="nl")i[d-1].push(i[d]),this.$=i[d-1];break;case 6:case 7:this.$=i[d];break;case 8:this.$="nl";break;case 12:this.$=i[d];break;case 13:let _t=i[d-1];_t.description=k.trimColon(i[d]),this.$=_t;break;case 14:this.$={stmt:"relation",state1:i[d-2],state2:i[d]};break;case 15:let vt=k.trimColon(i[d]);this.$={stmt:"relation",state1:i[d-3],state2:i[d-1],description:vt};break;case 19:this.$={stmt:"state",id:i[d-3],type:"default",description:"",doc:i[d-1]};break;case 20:var H=i[d],X=i[d-2].trim();if(i[d].match(":")){var lt=i[d].split(":");H=lt[0],X=[X,lt[1]]}this.$={stmt:"state",id:H,type:"default",description:X};break;case 21:this.$={stmt:"state",id:i[d-3],type:"default",description:i[d-5],doc:i[d-1]};break;case 22:this.$={stmt:"state",id:i[d],type:"fork"};break;case 23:this.$={stmt:"state",id:i[d],type:"join"};break;case 24:this.$={stmt:"state",id:i[d],type:"choice"};break;case 25:this.$={stmt:"state",id:k.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[d-1].trim(),note:{position:i[d-2].trim(),text:i[d].trim()}};break;case 29:this.$=i[d].trim(),k.setAccTitle(this.$);break;case 30:case 31:this.$=i[d].trim(),k.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[d-3],url:i[d-2],tooltip:i[d-1]};break;case 33:this.$={stmt:"click",id:i[d-3],url:i[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[d-1].trim(),classes:i[d].trim()};break;case 36:this.$={stmt:"style",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 37:this.$={stmt:"applyClass",id:i[d-1].trim(),styleClass:i[d].trim()};break;case 38:k.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:k.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:k.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:k.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[d-2].trim(),classes:[i[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:s,5:o,6:r},{1:[3]},{3:5,4:s,5:o,6:r},{3:6,4:s,5:o,6:r},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],u,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:f,5:y,8:8,9:10,10:12,11:13,12:14,13:15,16:m,17:n,19:T,22:E,24:I,25:N,26:G,27:C,28:g,29:O,32:25,33:A,35:M,37:B,38:W,41:D,45:st,48:St,51:gt,52:yt,53:bt,54:kt,57:rt},e(b,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:m,17:n,19:T,22:E,24:I,25:N,26:G,27:C,28:g,29:O,32:25,33:A,35:M,37:B,38:W,41:D,45:st,48:St,51:gt,52:yt,53:bt,54:kt,57:rt},e(b,[2,7]),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(b,[2,11]),e(b,[2,12],{14:[1,40],15:[1,41]}),e(b,[2,16]),{18:[1,42]},e(b,[2,18],{20:[1,43]}),{23:[1,44]},e(b,[2,22]),e(b,[2,23]),e(b,[2,24]),e(b,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(b,[2,28]),{34:[1,49]},{36:[1,50]},e(b,[2,31]),{13:51,24:I,57:rt},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(Tt,[2,44],{58:[1,56]}),e(Tt,[2,45],{58:[1,57]}),e(b,[2,38]),e(b,[2,39]),e(b,[2,40]),e(b,[2,41]),e(b,[2,6]),e(b,[2,13]),{13:58,24:I,57:rt},e(b,[2,17]),e(Ut,u,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(b,[2,29]),e(b,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(b,[2,14],{14:[1,71]}),{4:f,5:y,8:8,9:10,10:12,11:13,12:14,13:15,16:m,17:n,19:T,21:[1,72],22:E,24:I,25:N,26:G,27:C,28:g,29:O,32:25,33:A,35:M,37:B,38:W,41:D,45:st,48:St,51:gt,52:yt,53:bt,54:kt,57:rt},e(b,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(b,[2,34]),e(b,[2,35]),e(b,[2,36]),e(b,[2,37]),e(Tt,[2,46]),e(Tt,[2,47]),e(b,[2,15]),e(b,[2,19]),e(Ut,u,{7:78}),e(b,[2,26]),e(b,[2,27]),{5:[1,79]},{5:[1,80]},{4:f,5:y,8:8,9:10,10:12,11:13,12:14,13:15,16:m,17:n,19:T,21:[1,81],22:E,24:I,25:N,26:G,27:C,28:g,29:O,32:25,33:A,35:M,37:B,38:W,41:D,45:st,48:St,51:gt,52:yt,53:bt,54:kt,57:rt},e(b,[2,32]),e(b,[2,33]),e(b,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:t(function(c,S){if(S.recoverable)this.trace(c);else{var a=Error(c);throw a.hash=S,a}},"parseError"),parse:t(function(c){var S=this,a=[0],k=[],_=[null],i=[],it=this.table,d="",H=0,X=0,lt=0,_t=2,vt=1,ge=i.slice.call(arguments,1),v=Object.create(this.lexer),tt={yy:{}};for(var Ot in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,Ot))tt.yy[Ot]=this.yy[Ot];if(v.setInput(c,tt.yy),tt.yy.lexer=v,tt.yy.parser=this,typeof v.yylloc>"u")v.yylloc={};var Rt=v.yylloc;i.push(Rt);var ye=v.options&&v.options.ranges;if(typeof tt.yy.parseError==="function")this.parseError=tt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function me(V){a.length=a.length-2*V,_.length=_.length-V,i.length=i.length-V}t(me,"popStack");function Ht(){var V=k.pop()||v.lex()||vt;if(typeof V!=="number"){if(V instanceof Array)k=V,V=k.pop();V=S.symbols_[V]||V}return V}t(Ht,"lex");var L,$t,et,Y,Qe,Ft,at={},Ct,J,zt,At;while(!0){if(et=a[a.length-1],this.defaultActions[et])Y=this.defaultActions[et];else{if(L===null||typeof L>"u")L=Ht();Y=it[et]&&it[et][L]}if(typeof Y>"u"||!Y.length||!Y[0]){var Pt="";At=[];for(Ct in it[et])if(this.terminals_[Ct]&&Ct>_t)At.push("'"+this.terminals_[Ct]+"'");if(v.showPosition)Pt="Parse error on line "+(H+1)+`:
|
|
2
2
|
`+v.showPosition()+`
|
|
3
3
|
Expecting `+At.join(", ")+", got '"+(this.terminals_[L]||L)+"'";else Pt="Parse error on line "+(H+1)+": Unexpected "+(L==vt?"end of input":"'"+(this.terminals_[L]||L)+"'");this.parseError(Pt,{text:v.match,token:this.terminals_[L]||L,line:v.yylineno,loc:Rt,expected:At})}if(Y[0]instanceof Array&&Y.length>1)throw Error("Parse Error: multiple actions possible at state: "+et+", token: "+L);switch(Y[0]){case 1:if(a.push(L),_.push(v.yytext),i.push(v.yylloc),a.push(Y[1]),L=null,!$t){if(X=v.yyleng,d=v.yytext,H=v.yylineno,Rt=v.yylloc,lt>0)lt--}else L=$t,$t=null;break;case 2:if(J=this.productions_[Y[1]][1],at.$=_[_.length-J],at._$={first_line:i[i.length-(J||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(J||1)].first_column,last_column:i[i.length-1].last_column},ye)at._$.range=[i[i.length-(J||1)].range[0],i[i.length-1].range[1]];if(Ft=this.performAction.apply(at,[d,X,H,tt.yy,Y[1],_,i].concat(ge)),typeof Ft<"u")return Ft;if(J)a=a.slice(0,-1*J*2),_=_.slice(0,-1*J),i=i.slice(0,-1*J);a.push(this.productions_[Y[1]][0]),_.push(at.$),i.push(at._$),zt=it[a[a.length-2]][a[a.length-1]],a.push(zt);break;case 3:return!0}}return!0},"parse")},Se=function(){var Q={EOF:1,parseError:t(function(S,a){if(this.yy.parser)this.yy.parser.parseError(S,a);else throw Error(S)},"parseError"),setInput:t(function(c,S){if(this.yy=S||this.yy||{},this._input=c,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 c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var S=c.match(/(?:\r\n?|\n).*/g);if(S)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),c},"input"),unput:t(function(c){var S=c.length,a=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var k=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),a.length-1)this.yylineno-=a.length-1;var _=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:a?(a.length===k.length?this.yylloc.first_column:0)+k[k.length-a.length].length-a[0].length:this.yylloc.first_column-S},this.options.ranges)this.yylloc.range=[_[0],_[0]+this.yyleng-S];return this.yyleng=this.yytext.length,this},"unput"),more:t(function(){return this._more=!0,this},"more"),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:t(function(c){this.unput(this.match.slice(c))},"less"),pastInput:t(function(){var c=this.matched.substr(0,this.matched.length-this.match.length);return(c.length>20?"...":"")+c.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:t(function(){var c=this.match;if(c.length<20)c+=this._input.substr(0,20-c.length);return(c.substr(0,20)+(c.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:t(function(){var c=this.pastInput(),S=Array(c.length+1).join("-");return c+this.upcomingInput()+`
|
|
5
5
|
`+S+"^"},"showPosition"),test_match:t(function(c,S){var a,k,_;if(this.options.backtrack_lexer){if(_={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)_.yylloc.range=this.yylloc.range.slice(0)}if(k=c[0].match(/(?:\r\n?|\n).*/g),k)this.yylineno+=k.length;if(this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+c[0].length},this.yytext+=c[0],this.match+=c[0],this.matches=c,this.yyleng=this.yytext.length,this.options.ranges)this.yylloc.range=[this.offset,this.offset+=this.yyleng];if(this._more=!1,this._backtrack=!1,this._input=this._input.slice(c[0].length),this.matched+=c[0],a=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input)this.done=!1;if(a)return a;else if(this._backtrack){for(var i in _)this[i]=_[i];return!1}return!1},"test_match"),next:t(function(){if(this.done)return this.EOF;if(!this._input)this.done=!0;var c,S,a,k;if(!this._more)this.yytext="",this.match="";var _=this._currentRules();for(var i=0;i<_.length;i++)if(a=this._input.match(this.rules[_[i]]),a&&(!S||a[0].length>S[0].length)){if(S=a,k=i,this.options.backtrack_lexer)if(c=this.test_match(a,_[i]),c!==!1)return c;else if(this._backtrack){S=!1;continue}else return!1;else if(!this.options.flex)break}if(S){if(c=this.test_match(S,_[k]),c!==!1)return c;return!1}if(this._input==="")return this.EOF;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var S=this.next();if(S)return S;else return this.lex()},"lex"),begin:t(function(S){this.conditionStack.push(S)},"begin"),popState:t(function(){var S=this.conditionStack.length-1;if(S>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(S){if(S=this.conditionStack.length-1-Math.abs(S||0),S>=0)return this.conditionStack[S];else return"INITIAL"},"topState"),pushState:t(function(S){this.begin(S)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(S,a,k,_){function i(){let d=a.yytext.indexOf("%%");if(d===0)return!1;if(d>0){let H=a.yytext.slice(0,d),X=a.yytext.slice(d);if(X)S.lexer.unput(X);a.yytext=H}return!0}t(i,"processId");var it=_;switch(k){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),a.yytext=a.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),a.yytext=a.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!i())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+a.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!i())return;return this.popState(),"ID";break;case 66:if(!i())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),a.yytext=a.yytext.substr(2).trim(),31;break;case 68:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!i())return;return 24;case 74:return a.yytext=a.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return Q}();It.lexer=Se;function Et(){this.yy={}}return t(Et,"Parser"),Et.prototype=It,It.Parser=Et,new Et}();Yt.parser=Yt;var be=Yt,ke="TB",ee="TB",Kt="dir",ot="state",nt="root",Vt="relation",Te="classDef",Ee="style",_e="applyClass",ut="default",se="divider",re="fill:none",ie="fill: #333",ae="c",ne="markdown",oe="normal",Bt="rect",Gt="rectWithTitle",ve="stateStart",De="stateEnd",Wt="divider",Xt="roundedWithTitle",Ce="note",Ae="noteGroup",ft="statediagram",xe="state",Le=`${ft}-${xe}`,le="transition",we="note",Ie="note-edge",Ne=`${le} ${Ie}`,Oe=`${ft}-${we}`,Re="cluster",$e=`${ft}-${Re}`,Fe="cluster-alt",Pe=`${ft}-${Fe}`,ce="parent",he="note",Be="state",jt="----",Ge=`${jt}${he}`,Jt=`${jt}${ce}`,Lt=new Map,Z=0,de=0,ct=new Map,Ve=t((e,s,o,r)=>{if(e===Wt&&o?.id!==void 0&&ct.has(o.id)){let y=ct.get(o.id);return ct.set(s,y),y}let u=de++,f=r?void 0:u;return ct.set(s,f),f},"colorSlotFor");function wt(e="",s=0,o="",r=jt){let u=o!==null&&o.length>0?`${r}${o}`:"";return`${Be}-${e}${u}-${s}`}t(wt,"stateDomId");var Me=t((e,s,o,r,u,f,y,m)=>{l.trace("items",s),s.forEach((n)=>{switch(n.stmt){case ot:dt(e,n,o,r,u,f,y,m);break;case ut:dt(e,n,o,r,u,f,y,m);break;case Vt:{dt(e,n.state1,o,r,u,f,y,m),dt(e,n.state2,o,r,u,f,y,m);let T=y==="neo",E={id:"edge"+Z,start:n.state1.id,end:n.state2.id,arrowhead:"normal",arrowTypeEnd:T?"arrow_barb_neo":"arrow_barb",style:re,labelStyle:"",label:x.sanitizeText(n.description??"",p()),arrowheadStyle:ie,labelpos:ae,labelType:ne,thickness:oe,classes:le,look:y};u.push(E),Z++}break}})},"setupDoc"),qt=t((e,s=ee)=>{let o=s;if(e.doc){for(let r of e.doc)if(r.stmt==="dir")o=r.value}return o},"getDir");function ht(e,s,o){if(!s.id||s.id==="</join></fork>"||s.id==="</choice>")return;if(s.cssClasses){if(!Array.isArray(s.cssCompiledStyles))s.cssCompiledStyles=[];s.cssClasses.split(" ").forEach((u)=>{let f=o.get(u);if(f)s.cssCompiledStyles=[...s.cssCompiledStyles??[],...f.styles]})}let r=e.find((u)=>u.id===s.id);if(r)Object.assign(r,s);else e.push(s)}t(ht,"insertOrUpdateNode");function ue(e){return e?.classes?.join(" ")??""}t(ue,"getClassesFromDbInfo");function fe(e){return e?.styles??[]}t(fe,"getStylesFromDbInfo");var dt=t((e,s,o,r,u,f,y,m)=>{let n=s.id,T=o.get(n),E=ue(T),I=fe(T),N=p(),G=E.trim()!==""||I.length>0;if(l.info("dataFetcher parsedItem",s,T,I),n!=="root"){let C=Bt;if(s.start===!0)C=ve;else if(s.start===!1)C=De;if(s.type!==ut)C=s.type;if(!Lt.get(n))Lt.set(n,{id:n,shape:C,description:x.sanitizeText(n,N),cssClasses:`${E} ${Le}`,cssStyles:I});let g=Lt.get(n);if(s.description){if(Array.isArray(g.description))g.shape=Gt,g.description.push(s.description);else if(g.description?.length&&g.description.length>0)if(g.shape=Gt,g.description===n)g.description=[s.description];else g.description=[g.description,s.description];else g.shape=Bt,g.description=s.description;g.description=x.sanitizeTextOrArray(g.description,N)}if(g.description?.length===1&&g.shape===Gt)if(g.type==="group")g.shape=Xt;else g.shape=Bt;if(!g.type&&s.doc)l.info("Setting cluster for XCX",n,qt(s)),g.type="group",g.isGroup=!0,g.dir=qt(s),g.shape=s.type===se?Wt:Xt,g.colorIndex=Ve(g.shape,n,e,G),g.cssClasses=`${g.cssClasses} ${$e} ${f?Pe:""}`;let O={labelStyle:"",shape:g.shape,label:g.description,cssClasses:g.cssClasses,cssCompiledStyles:[],cssStyles:g.cssStyles,id:n,dir:g.dir,domId:wt(n,Z),type:g.type,isGroup:g.type==="group",colorIndex:g.colorIndex,padding:8,rx:10,ry:10,look:y,labelType:"markdown"};if(O.shape===Wt)O.label="";if(e&&e.id!=="root")l.trace("Setting node ",n," to be child of its parent ",e.id),O.parentId=e.id;if(O.centerLabel=!0,s.note){let A={labelStyle:"",shape:Ce,label:s.note.text,labelType:"markdown",cssClasses:Oe,cssStyles:[],cssCompiledStyles:[],id:n+Ge+"-"+Z,domId:wt(n,Z,he),type:"node",isGroup:!1,padding:N.flowchart?.padding,look:y,position:s.note.position},M=n+Jt,B={labelStyle:"",shape:Ae,label:s.note.text,cssClasses:g.cssClasses,cssStyles:[],id:n+Jt,domId:wt(n,Z,ce),type:"group",isGroup:!0,padding:16,look:y,position:s.note.position};Z++,B.id=M,A.parentId=M,ht(r,B,m),ht(r,A,m),ht(r,O,m);let W=n,D=A.id;if(s.note.position==="left of")W=A.id,D=n;u.push({id:W+"-"+D,start:W,end:D,arrowhead:"none",arrowTypeEnd:"",style:re,labelStyle:"",classes:Ne,pattern:"dashed",arrowheadStyle:ie,labelpos:ae,labelType:ne,thickness:oe,look:y})}else ht(r,O,m)}if(s.doc)l.trace("Adding nodes children "),Me(s,s.doc,o,r,u,!f,y,m)},"dataFetcher"),We=t(()=>{Lt.clear(),Z=0,de=0,ct.clear()},"reset"),pe=t((e,s=ee)=>{if(!e.doc)return s;let o=s;for(let r of e.doc)if(r.stmt==="dir")o=r.value;return o},"getDir"),je=t(function(e,s){return s.db.getClasses()},"getClasses"),Ue=t(async function(e,s,o,r){l.info("REF0:"),l.info("Drawing state diagram (v2)",s);let{securityLevel:u,state:f,layout:y}=p();r.db.extract(r.db.getRootDocV2());let m=r.db.getData(),n=Nt(s,u);if(m.type=r.type,m.layoutAlgorithm=Qt(y),m.nodeSpacing=f?.nodeSpacing||50,m.rankSpacing=f?.rankSpacing||50,p().look==="neo")m.markers=["barbNeo"];else m.markers=["barb"];m.diagramId=s,await Dt(m,n);let E=8;try{(typeof r.db.getLinks==="function"?r.db.getLinks():new Map).forEach((N,G)=>{let C=typeof G==="string"?G:typeof G?.id==="string"?G.id:"",g=m.nodes.find((D)=>D.id===C);if(!C){l.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(G));return}let O=n.node()?.querySelectorAll("g.node, g.rough-node"),A;if(O?.forEach((D)=>{let st=D.textContent?.trim();if(D.id===g?.domId||st===C)A=D}),!A){l.warn("⚠️ Could not find node matching text:",C);return}let M=A.parentNode;if(!M){l.warn("⚠️ Node has no parent, cannot wrap:",C);return}let B=document.createElementNS("http://www.w3.org/2000/svg","a"),W=N.url.replace(/^"+|"+$/g,"");if(B.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",W),B.setAttribute("target","_blank"),N.tooltip){let D=N.tooltip.replace(/^"+|"+$/g,"");B.setAttribute("title",D),A.setAttribute("title",D)}M.replaceChild(B,A),B.appendChild(A),l.info("\uD83D\uDD17 Wrapped node in <a> tag for:",C,N.url)})}catch(I){l.error("❌ Error injecting clickable links:",I)}K.insertTitle(n,"statediagramTitleText",f?.titleTopMargin??25,r.db.getDiagramTitle()),mt(n,E,ft,f?.useMaxWidth??!0)},"draw"),He={getClasses:je,draw:Ue,getDir:pe},w={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Zt=t(()=>new Map,"newClassesList"),te=t(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),xt=t((e)=>JSON.parse(JSON.stringify(e)),"clone"),ze=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Zt(),this.documents={root:te()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=z,this.setAccTitle=F,this.getAccDescription=U,this.setAccDescription=P,this.setDiagramTitle=q,this.getDiagramTitle=j,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{t(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let r of Array.isArray(e)?e:e.doc)switch(r.stmt){case ot:this.addState(r.id.trim(),r.type,r.doc,r.description,r.note);break;case Vt:this.addRelation(r.state1,r.state2,r.description);break;case Te:this.addStyleClass(r.id.trim(),r.classes);break;case Ee:this.handleStyleDef(r);break;case _e:this.setCssClass(r.id.trim(),r.styleClass);break;case"click":this.addLink(r.id,r.url,r.tooltip);break}let s=this.getStates(),o=p();We(),dt(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,o.look,this.classes);for(let r of this.nodes){if(!Array.isArray(r.label))continue;if(r.description=r.label.slice(1),r.isGroup&&r.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(e){let s=e.id.trim().split(","),o=e.styleClass.split(",");for(let r of s){let u=this.getState(r);if(!u){let f=r.trim();this.addState(f),u=this.getState(f)}if(u)u.styles=o.map((f)=>f.replace(/;/g,"")?.trim())}}setRootDoc(e){if(l.info("Setting root doc",e),this.rootDoc=e,this.version===1)this.extract(e);else this.extract(this.getRootDocV2())}docTranslator(e,s,o){if(s.stmt===Vt){this.docTranslator(e,s.state1,!0),this.docTranslator(e,s.state2,!1);return}if(s.stmt===ot)if(s.id===w.START_NODE)s.id=e.id+(o?"_start":"_end"),s.start=o;else s.id=s.id.trim();if(s.stmt!==nt&&s.stmt!==ot||!s.doc)return;let r=[],u=[];for(let f of s.doc)if(f.type===se){let y=xt(f);y.doc=xt(u),r.push(y),u=[]}else u.push(f);if(r.length>0&&u.length>0){let f={stmt:ot,id:Pf(),type:"divider",doc:xt(u)};r.push(xt(f)),s.doc=r}s.doc.forEach((f)=>this.docTranslator(s,f,!0))}getRootDocV2(){return this.docTranslator({id:nt,stmt:nt},{id:nt,stmt:nt,doc:this.rootDoc},!0),{id:nt,doc:this.rootDoc}}addState(e,s=ut,o=void 0,r=void 0,u=void 0,f=void 0,y=void 0,m=void 0){let n=e?.trim();if(!this.currentDocument.states.has(n))l.info("Adding state ",n,r),this.currentDocument.states.set(n,{stmt:ot,id:n,descriptions:[],type:s,doc:o,note:u,classes:[],styles:[],textStyles:[]});else{let T=this.currentDocument.states.get(n);if(!T)throw Error(`State not found: ${n}`);if(!T.doc)T.doc=o;if(!T.type)T.type=s}if(r)l.info("Setting state description",n,r),(Array.isArray(r)?r:[r]).forEach((E)=>this.addDescription(n,E.trim()));if(u){let T=this.currentDocument.states.get(n);if(!T)throw Error(`State not found: ${n}`);T.note=u,T.note.text=x.sanitizeText(T.note.text,p())}if(f)l.info("Setting state classes",n,f),(Array.isArray(f)?f:[f]).forEach((E)=>this.setCssClass(n,E.trim()));if(y)l.info("Setting state styles",n,y),(Array.isArray(y)?y:[y]).forEach((E)=>this.setStyle(n,E.trim()));if(m)l.info("Setting state styles",n,y),(Array.isArray(m)?m:[m]).forEach((E)=>this.setTextStyle(n,E.trim()))}clear(e){if(this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:te()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Zt(),!e)this.links=new Map,R()}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){l.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,s,o){this.links.set(e,{url:s,tooltip:o}),l.warn("Adding link",e,s,o)}getLinks(){return this.links}startIdIfNeeded(e=""){if(e===w.START_NODE)return this.startEndCount++,`${w.START_TYPE}${this.startEndCount}`;return e}startTypeIfNeeded(e="",s=ut){return e===w.START_NODE?w.START_TYPE:s}endIdIfNeeded(e=""){if(e===w.END_NODE)return this.startEndCount++,`${w.END_TYPE}${this.startEndCount}`;return e}endTypeIfNeeded(e="",s=ut){return e===w.END_NODE?w.END_TYPE:s}addRelationObjs(e,s,o=""){let r=this.startIdIfNeeded(e.id.trim()),u=this.startTypeIfNeeded(e.id.trim(),e.type),f=this.startIdIfNeeded(s.id.trim()),y=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(r,u,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(f,y,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:x.sanitizeText(o,p())})}addRelation(e,s,o){if(typeof e==="object"&&typeof s==="object")this.addRelationObjs(e,s,o);else if(typeof e==="string"&&typeof s==="string"){let r=this.startIdIfNeeded(e.trim()),u=this.startTypeIfNeeded(e),f=this.endIdIfNeeded(s.trim()),y=this.endTypeIfNeeded(s);this.addState(r,u),this.addState(f,y),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:o?x.sanitizeText(o,p()):void 0})}}addDescription(e,s){let o=this.currentDocument.states.get(e),r=s.startsWith(":")?s.replace(":","").trim():s;o?.descriptions?.push(x.sanitizeText(r,p()))}cleanupLabel(e){return e.startsWith(":")?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,s=""){if(!this.classes.has(e))this.classes.set(e,{id:e,styles:[],textStyles:[]});let o=this.classes.get(e);if(s&&o)s.split(w.STYLECLASS_SEP).forEach((r)=>{let u=r.replace(/([^;]*);/,"$1").trim();if(RegExp(w.COLOR_KEYWORD).exec(r)){let y=u.replace(w.FILL_KEYWORD,w.BG_FILL).replace(w.COLOR_KEYWORD,w.FILL_KEYWORD);o.textStyles.push(y)}o.styles.push(u)})}getClasses(){return this.classes}setupToolTips(e){let s=Ma();h(e).select("svg").selectAll("g.node, g.rough-node").on("mouseover",(u)=>{let f=h(u.currentTarget),y=f.attr("title");if(y===null)return;let m=u.currentTarget?.getBoundingClientRect();s.transition().duration(200).style("opacity",".9"),s.style("left",window.scrollX+m.left+(m.right-m.left)/2+"px").style("top",window.scrollY+m.bottom+"px"),s.html(Mt.sanitize(y)),f.classed("hover",!0)}).on("mouseout",(u)=>{s.transition().duration(500).style("opacity",0),h(u.currentTarget).classed("hover",!1)})}setCssClass(e,s){e.split(",").forEach((o)=>{let r=this.getState(o);if(!r){let u=o.trim();this.addState(u),r=this.getState(u)}r?.classes?.push(s)})}setStyle(e,s){this.getState(e)?.styles?.push(s)}setTextStyle(e,s){this.getState(e)?.textStyles?.push(s)}bindFunctions(e){this.funs.forEach((s)=>{s(e)})}getDirectionStatement(){return this.rootDoc.find((e)=>e.stmt===Kt)}getDirection(){return this.getDirectionStatement()?.value??ke}setDirection(e){let s=this.getDirectionStatement();if(s)s.value=e;else this.rootDoc.unshift({stmt:Kt,value:e})}trimColon(e){return e.startsWith(":")?e.slice(1).trim():e.trim()}getData(){let e=p();for(let s of this.nodes)if(s.wrappingWidth??=e.state?.wrappingWidth,!s.isGroup)s.minWidth??=e.state?.minNodeWidth;return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:pe(this.getRootDocV2())}}getConfig(){return p().state}},Ke=t((e)=>{let{theme:s,bkgColorArray:o,borderColorArray:r}=e;if(!Ye(s,r))return"";let u=Je(e.look),f=pt(o),y="";for(let m=0;m<Ur(r);m++){let n=r[m],T=f?`fill: ${o[m%o.length]};`:"",E=`[data-look="${u}"][data-color-id="color-${m}"]`;y+=`
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:t(function(){var S=this.next();if(S)return S;else return this.lex()},"lex"),begin:t(function(S){this.conditionStack.push(S)},"begin"),popState:t(function(){var S=this.conditionStack.length-1;if(S>0)return this.conditionStack.pop();else return this.conditionStack[0]},"popState"),_currentRules:t(function(){if(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1])return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules;else return this.conditions.INITIAL.rules},"_currentRules"),topState:t(function(S){if(S=this.conditionStack.length-1-Math.abs(S||0),S>=0)return this.conditionStack[S];else return"INITIAL"},"topState"),pushState:t(function(S){this.begin(S)},"pushState"),stateStackSize:t(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:t(function(S,a,k,_){function i(){let d=a.yytext.indexOf("%%");if(d===0)return!1;if(d>0){let H=a.yytext.slice(0,d),X=a.yytext.slice(d);if(X)S.lexer.unput(X);a.yytext=H}return!0}t(i,"processId");var it=_;switch(k){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;break;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;break;case 17:return this.popState(),"acc_title_value";break;case 18:return this.begin("acc_descr"),35;break;case 19:return this.popState(),"acc_descr_value";break;case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;break;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";break;case 25:return this.popState(),this.pushState("CLASSDEFID"),42;break;case 26:return this.popState(),43;break;case 27:return this.pushState("CLASS"),48;break;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;break;case 29:return this.popState(),50;break;case 30:return this.pushState("STYLE"),45;break;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;break;case 32:return this.popState(),47;break;case 33:return this.pushState("SCALE"),17;break;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),25;break;case 38:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),26;break;case 39:return this.popState(),a.yytext=a.yytext.slice(0,-10).trim(),27;break;case 40:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),25;break;case 41:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),26;break;case 42:return this.popState(),a.yytext=a.yytext.slice(0,-10).trim(),27;break;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";break;case 49:if(!i())return;return this.popState(),"ID";break;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:throw Error('Error: State name must be a single word. Found: "'+a.yytext.trim()+'"');case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;break;case 56:return this.popState(),21;break;case 57:break;case 58:return this.begin("NOTE"),29;break;case 59:return this.popState(),this.pushState("NOTE_ID"),59;break;case 60:return this.popState(),this.pushState("NOTE_ID"),60;break;case 61:this.popState(),this.pushState("FLOATING_NOTE");break;case 62:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";break;case 63:break;case 64:return"NOTE_TEXT";case 65:if(!i())return;return this.popState(),"ID";break;case 66:if(!i())return;return this.popState(),this.pushState("NOTE_TEXT"),24;break;case 67:return this.popState(),a.yytext=a.yytext.substr(2).trim(),31;break;case 68:return this.popState(),a.yytext=a.yytext.slice(0,-8).trim(),31;break;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:if(!i())return;return 24;case 74:return a.yytext=a.yytext.trim(),14;break;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}};return Q}();It.lexer=Se;function Et(){this.yy={}}return t(Et,"Parser"),Et.prototype=It,It.Parser=Et,new Et}();Yt.parser=Yt;var be=Yt,ke="TB",ee="TB",Kt="dir",ot="state",nt="root",Vt="relation",Te="classDef",Ee="style",_e="applyClass",ut="default",se="divider",re="fill:none",ie="fill: #333",ae="c",ne="markdown",oe="normal",Bt="rect",Gt="rectWithTitle",ve="stateStart",De="stateEnd",Wt="divider",Xt="roundedWithTitle",Ce="note",Ae="noteGroup",ft="statediagram",xe="state",Le=`${ft}-${xe}`,le="transition",we="note",Ie="note-edge",Ne=`${le} ${Ie}`,Oe=`${ft}-${we}`,Re="cluster",$e=`${ft}-${Re}`,Fe="cluster-alt",Pe=`${ft}-${Fe}`,ce="parent",he="note",Be="state",jt="----",Ge=`${jt}${he}`,Jt=`${jt}${ce}`,Lt=new Map,Z=0,de=0,ct=new Map,Ve=t((e,s,o,r)=>{if(e===Wt&&o?.id!==void 0&&ct.has(o.id)){let y=ct.get(o.id);return ct.set(s,y),y}let u=de++,f=r?void 0:u;return ct.set(s,f),f},"colorSlotFor");function wt(e="",s=0,o="",r=jt){let u=o!==null&&o.length>0?`${r}${o}`:"";return`${Be}-${e}${u}-${s}`}t(wt,"stateDomId");var Me=t((e,s,o,r,u,f,y,m)=>{l.trace("items",s),s.forEach((n)=>{switch(n.stmt){case ot:dt(e,n,o,r,u,f,y,m);break;case ut:dt(e,n,o,r,u,f,y,m);break;case Vt:{dt(e,n.state1,o,r,u,f,y,m),dt(e,n.state2,o,r,u,f,y,m);let T=y==="neo",E={id:"edge"+Z,start:n.state1.id,end:n.state2.id,arrowhead:"normal",arrowTypeEnd:T?"arrow_barb_neo":"arrow_barb",style:re,labelStyle:"",label:x.sanitizeText(n.description??"",p()),arrowheadStyle:ie,labelpos:ae,labelType:ne,thickness:oe,classes:le,look:y};u.push(E),Z++}break}})},"setupDoc"),qt=t((e,s=ee)=>{let o=s;if(e.doc){for(let r of e.doc)if(r.stmt==="dir")o=r.value}return o},"getDir");function ht(e,s,o){if(!s.id||s.id==="</join></fork>"||s.id==="</choice>")return;if(s.cssClasses){if(!Array.isArray(s.cssCompiledStyles))s.cssCompiledStyles=[];s.cssClasses.split(" ").forEach((u)=>{let f=o.get(u);if(f)s.cssCompiledStyles=[...s.cssCompiledStyles??[],...f.styles]})}let r=e.find((u)=>u.id===s.id);if(r)Object.assign(r,s);else e.push(s)}t(ht,"insertOrUpdateNode");function ue(e){return e?.classes?.join(" ")??""}t(ue,"getClassesFromDbInfo");function fe(e){return e?.styles??[]}t(fe,"getStylesFromDbInfo");var dt=t((e,s,o,r,u,f,y,m)=>{let n=s.id,T=o.get(n),E=ue(T),I=fe(T),N=p(),G=E.trim()!==""||I.length>0;if(l.info("dataFetcher parsedItem",s,T,I),n!=="root"){let C=Bt;if(s.start===!0)C=ve;else if(s.start===!1)C=De;if(s.type!==ut)C=s.type;if(!Lt.get(n))Lt.set(n,{id:n,shape:C,description:x.sanitizeText(n,N),cssClasses:`${E} ${Le}`,cssStyles:I});let g=Lt.get(n);if(s.description){if(Array.isArray(g.description))g.shape=Gt,g.description.push(s.description);else if(g.description?.length&&g.description.length>0)if(g.shape=Gt,g.description===n)g.description=[s.description];else g.description=[g.description,s.description];else g.shape=Bt,g.description=s.description;g.description=x.sanitizeTextOrArray(g.description,N)}if(g.description?.length===1&&g.shape===Gt)if(g.type==="group")g.shape=Xt;else g.shape=Bt;if(!g.type&&s.doc)l.info("Setting cluster for XCX",n,qt(s)),g.type="group",g.isGroup=!0,g.dir=qt(s),g.shape=s.type===se?Wt:Xt,g.colorIndex=Ve(g.shape,n,e,G),g.cssClasses=`${g.cssClasses} ${$e} ${f?Pe:""}`;let O={labelStyle:"",shape:g.shape,label:g.description,cssClasses:g.cssClasses,cssCompiledStyles:[],cssStyles:g.cssStyles,id:n,dir:g.dir,domId:wt(n,Z),type:g.type,isGroup:g.type==="group",colorIndex:g.colorIndex,padding:8,rx:10,ry:10,look:y,labelType:"markdown"};if(O.shape===Wt)O.label="";if(e&&e.id!=="root")l.trace("Setting node ",n," to be child of its parent ",e.id),O.parentId=e.id;if(O.centerLabel=!0,s.note){let A={labelStyle:"",shape:Ce,label:s.note.text,labelType:"markdown",cssClasses:Oe,cssStyles:[],cssCompiledStyles:[],id:n+Ge+"-"+Z,domId:wt(n,Z,he),type:"node",isGroup:!1,padding:N.flowchart?.padding,look:y,position:s.note.position},M=n+Jt,B={labelStyle:"",shape:Ae,label:s.note.text,cssClasses:g.cssClasses,cssStyles:[],id:n+Jt,domId:wt(n,Z,ce),type:"group",isGroup:!0,padding:16,look:y,position:s.note.position};Z++,B.id=M,A.parentId=M,ht(r,B,m),ht(r,A,m),ht(r,O,m);let W=n,D=A.id;if(s.note.position==="left of")W=A.id,D=n;u.push({id:W+"-"+D,start:W,end:D,arrowhead:"none",arrowTypeEnd:"",style:re,labelStyle:"",classes:Ne,pattern:"dashed",arrowheadStyle:ie,labelpos:ae,labelType:ne,thickness:oe,look:y})}else ht(r,O,m)}if(s.doc)l.trace("Adding nodes children "),Me(s,s.doc,o,r,u,!f,y,m)},"dataFetcher"),We=t(()=>{Lt.clear(),Z=0,de=0,ct.clear()},"reset"),pe=t((e,s=ee)=>{if(!e.doc)return s;let o=s;for(let r of e.doc)if(r.stmt==="dir")o=r.value;return o},"getDir"),je=t(function(e,s){return s.db.getClasses()},"getClasses"),Ue=t(async function(e,s,o,r){l.info("REF0:"),l.info("Drawing state diagram (v2)",s);let{securityLevel:u,state:f,layout:y}=p();r.db.extract(r.db.getRootDocV2());let m=r.db.getData(),n=Nt(s,u);if(m.type=r.type,m.layoutAlgorithm=Qt(y),m.nodeSpacing=f?.nodeSpacing||50,m.rankSpacing=f?.rankSpacing||50,p().look==="neo")m.markers=["barbNeo"];else m.markers=["barb"];m.diagramId=s,await Dt(m,n);let E=8;try{(typeof r.db.getLinks==="function"?r.db.getLinks():new Map).forEach((N,G)=>{let C=typeof G==="string"?G:typeof G?.id==="string"?G.id:"",g=m.nodes.find((D)=>D.id===C);if(!C){l.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(G));return}let O=n.node()?.querySelectorAll("g.node, g.rough-node"),A;if(O?.forEach((D)=>{let st=D.textContent?.trim();if(D.id===g?.domId||st===C)A=D}),!A){l.warn("⚠️ Could not find node matching text:",C);return}let M=A.parentNode;if(!M){l.warn("⚠️ Node has no parent, cannot wrap:",C);return}let B=document.createElementNS("http://www.w3.org/2000/svg","a"),W=N.url.replace(/^"+|"+$/g,"");if(B.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",W),B.setAttribute("target","_blank"),N.tooltip){let D=N.tooltip.replace(/^"+|"+$/g,"");B.setAttribute("title",D),A.setAttribute("title",D)}M.replaceChild(B,A),B.appendChild(A),l.info("\uD83D\uDD17 Wrapped node in <a> tag for:",C,N.url)})}catch(I){l.error("❌ Error injecting clickable links:",I)}K.insertTitle(n,"statediagramTitleText",f?.titleTopMargin??25,r.db.getDiagramTitle()),mt(n,E,ft,f?.useMaxWidth??!0)},"draw"),He={getClasses:je,draw:Ue,getDir:pe},w={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Zt=t(()=>new Map,"newClassesList"),te=t(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),xt=t((e)=>JSON.parse(JSON.stringify(e)),"clone"),ze=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Zt(),this.documents={root:te()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=z,this.setAccTitle=F,this.getAccDescription=U,this.setAccDescription=P,this.setDiagramTitle=q,this.getDiagramTitle=j,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{t(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let r of Array.isArray(e)?e:e.doc)switch(r.stmt){case ot:this.addState(r.id.trim(),r.type,r.doc,r.description,r.note);break;case Vt:this.addRelation(r.state1,r.state2,r.description);break;case Te:this.addStyleClass(r.id.trim(),r.classes);break;case Ee:this.handleStyleDef(r);break;case _e:this.setCssClass(r.id.trim(),r.styleClass);break;case"click":this.addLink(r.id,r.url,r.tooltip);break}let s=this.getStates(),o=p();We(),dt(void 0,this.getRootDocV2(),s,this.nodes,this.edges,!0,o.look,this.classes);for(let r of this.nodes){if(!Array.isArray(r.label))continue;if(r.description=r.label.slice(1),r.isGroup&&r.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${r.id}]`);r.label=r.label[0]}}handleStyleDef(e){let s=e.id.trim().split(","),o=e.styleClass.split(",");for(let r of s){let u=this.getState(r);if(!u){let f=r.trim();this.addState(f),u=this.getState(f)}if(u)u.styles=o.map((f)=>f.replace(/;/g,"")?.trim())}}setRootDoc(e){if(l.info("Setting root doc",e),this.rootDoc=e,this.version===1)this.extract(e);else this.extract(this.getRootDocV2())}docTranslator(e,s,o){if(s.stmt===Vt){this.docTranslator(e,s.state1,!0),this.docTranslator(e,s.state2,!1);return}if(s.stmt===ot)if(s.id===w.START_NODE)s.id=e.id+(o?"_start":"_end"),s.start=o;else s.id=s.id.trim();if(s.stmt!==nt&&s.stmt!==ot||!s.doc)return;let r=[],u=[];for(let f of s.doc)if(f.type===se){let y=xt(f);y.doc=xt(u),r.push(y),u=[]}else u.push(f);if(r.length>0&&u.length>0){let f={stmt:ot,id:$f(),type:"divider",doc:xt(u)};r.push(xt(f)),s.doc=r}s.doc.forEach((f)=>this.docTranslator(s,f,!0))}getRootDocV2(){return this.docTranslator({id:nt,stmt:nt},{id:nt,stmt:nt,doc:this.rootDoc},!0),{id:nt,doc:this.rootDoc}}addState(e,s=ut,o=void 0,r=void 0,u=void 0,f=void 0,y=void 0,m=void 0){let n=e?.trim();if(!this.currentDocument.states.has(n))l.info("Adding state ",n,r),this.currentDocument.states.set(n,{stmt:ot,id:n,descriptions:[],type:s,doc:o,note:u,classes:[],styles:[],textStyles:[]});else{let T=this.currentDocument.states.get(n);if(!T)throw Error(`State not found: ${n}`);if(!T.doc)T.doc=o;if(!T.type)T.type=s}if(r)l.info("Setting state description",n,r),(Array.isArray(r)?r:[r]).forEach((E)=>this.addDescription(n,E.trim()));if(u){let T=this.currentDocument.states.get(n);if(!T)throw Error(`State not found: ${n}`);T.note=u,T.note.text=x.sanitizeText(T.note.text,p())}if(f)l.info("Setting state classes",n,f),(Array.isArray(f)?f:[f]).forEach((E)=>this.setCssClass(n,E.trim()));if(y)l.info("Setting state styles",n,y),(Array.isArray(y)?y:[y]).forEach((E)=>this.setStyle(n,E.trim()));if(m)l.info("Setting state styles",n,y),(Array.isArray(m)?m:[m]).forEach((E)=>this.setTextStyle(n,E.trim()))}clear(e){if(this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:te()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Zt(),!e)this.links=new Map,R()}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){l.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,s,o){this.links.set(e,{url:s,tooltip:o}),l.warn("Adding link",e,s,o)}getLinks(){return this.links}startIdIfNeeded(e=""){if(e===w.START_NODE)return this.startEndCount++,`${w.START_TYPE}${this.startEndCount}`;return e}startTypeIfNeeded(e="",s=ut){return e===w.START_NODE?w.START_TYPE:s}endIdIfNeeded(e=""){if(e===w.END_NODE)return this.startEndCount++,`${w.END_TYPE}${this.startEndCount}`;return e}endTypeIfNeeded(e="",s=ut){return e===w.END_NODE?w.END_TYPE:s}addRelationObjs(e,s,o=""){let r=this.startIdIfNeeded(e.id.trim()),u=this.startTypeIfNeeded(e.id.trim(),e.type),f=this.startIdIfNeeded(s.id.trim()),y=this.startTypeIfNeeded(s.id.trim(),s.type);this.addState(r,u,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(f,y,s.doc,s.description,s.note,s.classes,s.styles,s.textStyles),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:x.sanitizeText(o,p())})}addRelation(e,s,o){if(typeof e==="object"&&typeof s==="object")this.addRelationObjs(e,s,o);else if(typeof e==="string"&&typeof s==="string"){let r=this.startIdIfNeeded(e.trim()),u=this.startTypeIfNeeded(e),f=this.endIdIfNeeded(s.trim()),y=this.endTypeIfNeeded(s);this.addState(r,u),this.addState(f,y),this.currentDocument.relations.push({id1:r,id2:f,relationTitle:o?x.sanitizeText(o,p()):void 0})}}addDescription(e,s){let o=this.currentDocument.states.get(e),r=s.startsWith(":")?s.replace(":","").trim():s;o?.descriptions?.push(x.sanitizeText(r,p()))}cleanupLabel(e){return e.startsWith(":")?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,s=""){if(!this.classes.has(e))this.classes.set(e,{id:e,styles:[],textStyles:[]});let o=this.classes.get(e);if(s&&o)s.split(w.STYLECLASS_SEP).forEach((r)=>{let u=r.replace(/([^;]*);/,"$1").trim();if(RegExp(w.COLOR_KEYWORD).exec(r)){let y=u.replace(w.FILL_KEYWORD,w.BG_FILL).replace(w.COLOR_KEYWORD,w.FILL_KEYWORD);o.textStyles.push(y)}o.styles.push(u)})}getClasses(){return this.classes}setupToolTips(e){let s=Ma();h(e).select("svg").selectAll("g.node, g.rough-node").on("mouseover",(u)=>{let f=h(u.currentTarget),y=f.attr("title");if(y===null)return;let m=u.currentTarget?.getBoundingClientRect();s.transition().duration(200).style("opacity",".9"),s.style("left",window.scrollX+m.left+(m.right-m.left)/2+"px").style("top",window.scrollY+m.bottom+"px"),s.html(Mt.sanitize(y)),f.classed("hover",!0)}).on("mouseout",(u)=>{s.transition().duration(500).style("opacity",0),h(u.currentTarget).classed("hover",!1)})}setCssClass(e,s){e.split(",").forEach((o)=>{let r=this.getState(o);if(!r){let u=o.trim();this.addState(u),r=this.getState(u)}r?.classes?.push(s)})}setStyle(e,s){this.getState(e)?.styles?.push(s)}setTextStyle(e,s){this.getState(e)?.textStyles?.push(s)}bindFunctions(e){this.funs.forEach((s)=>{s(e)})}getDirectionStatement(){return this.rootDoc.find((e)=>e.stmt===Kt)}getDirection(){return this.getDirectionStatement()?.value??ke}setDirection(e){let s=this.getDirectionStatement();if(s)s.value=e;else this.rootDoc.unshift({stmt:Kt,value:e})}trimColon(e){return e.startsWith(":")?e.slice(1).trim():e.trim()}getData(){let e=p();for(let s of this.nodes)if(s.wrappingWidth??=e.state?.wrappingWidth,!s.isGroup)s.minWidth??=e.state?.minNodeWidth;return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:pe(this.getRootDocV2())}}getConfig(){return p().state}},Ke=t((e)=>{let{theme:s,bkgColorArray:o,borderColorArray:r}=e;if(!Ye(s,r))return"";let u=Je(e.look),f=pt(o),y="";for(let m=0;m<Ur(r);m++){let n=r[m],T=f?`fill: ${o[m%o.length]};`:"",E=`[data-look="${u}"][data-color-id="color-${m}"]`;y+=`
|
|
7
7
|
|
|
8
8
|
/* The title strip: \`rect.outer\` spans the whole composite and \`rect.inner\` covers
|
|
9
9
|
the body, so what stays visible of \`outer\` is the band behind the label. */
|