agent-whiteboard 1.0.4 → 1.1.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/CHANGELOG.md +55 -0
- package/README.md +13 -2
- package/dist/client/assets/abnfDiagram-VCTEODGH-CcuBIZ5h.js +1 -0
- package/dist/client/assets/{arc-4691b008.js → arc-Aq92EeUK.js} +1 -1
- package/dist/client/assets/architectureDiagram-5GKGNRK7-CpMRoWIY.js +36 -0
- package/dist/client/assets/blockDiagram-I7D4REHJ-Dee0m4lz.js +129 -0
- package/dist/client/assets/{bootstrap.min-21652813.js → bootstrap.min-UtnB-TxT.js} +1 -2
- package/dist/client/assets/c4Diagram-7LVT6UL2-D_qs3YTM.js +38 -0
- package/dist/client/assets/channel-9qggtmY_.js +1 -0
- package/dist/client/assets/{chunk-QZHKN3VN-0f554985.js → chunk-2Q5K7J3B-CBwQ-uNF.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-23d48b24.js → chunk-5VM5RSS4-yGvVHapR.js} +1 -1
- package/dist/client/assets/{chunk-ND2GUHAM-1104c326.js → chunk-F27PBJKO-BzFUf98n.js} +1 -1
- package/dist/client/assets/chunk-IMKFNOWR-D-Zj1GaL.js +231 -0
- package/dist/client/assets/{chunk-4BX2VUAB-3c93511d.js → chunk-JWPE2WC7-C8Aj4MVR.js} +1 -1
- package/dist/client/assets/chunk-POPQ4Y6H-DZP2a-yV.js +1 -0
- package/dist/client/assets/chunk-SVP7TREG-COihS1MQ.js +88 -0
- package/dist/client/assets/chunk-TICWLB2K-DNZTRqyJ.js +206 -0
- package/dist/client/assets/{chunk-55IACEB6-0243aefd.js → chunk-XXDRQBXY-BC_9L4PF.js} +1 -1
- package/dist/client/assets/classDiagram-ZZMXUADV-BUnGzX-0.js +1 -0
- package/dist/client/assets/classDiagram-v2-VYDZK3BY-BUnGzX-0.js +1 -0
- package/dist/client/assets/cose-bilkent-JH36ORCC-DrJ8c1cV.js +1 -0
- package/dist/client/assets/cynefin-OW5HDTMX-CMVAR4fd.js +178 -0
- package/dist/client/assets/cynefinDiagram-5FMLGOSQ-CdAQ0Lst.js +62 -0
- package/dist/client/assets/cytoscape.esm-C5JX3QLV.js +331 -0
- package/dist/client/assets/dagre-GXQ25YYZ-CybK0L_u.js +4 -0
- package/dist/client/assets/diagram-S7CK7UJ4-CHjTv5Sr.js +30 -0
- package/dist/client/assets/diagram-UQ7AKVKN-DfypPsGR.js +41 -0
- package/dist/client/assets/{diagram-KO2AKTUF-81f42eeb.js → diagram-VSXAHHWV-DHsmmCug.js} +3 -3
- package/dist/client/assets/diagram-VX7I27RA-CHZoTi9k.js +24 -0
- package/dist/client/assets/diagram-Z3DM3KII-Ceb2h13y.js +24 -0
- package/dist/client/assets/ebnfDiagram-PWID7BFC-BlZ247wB.js +1 -0
- package/dist/client/assets/embed-DcNeILcO.js +211 -0
- package/dist/client/assets/erDiagram-RLTQ6QDP-BQdw-U-S.js +99 -0
- package/dist/client/assets/flowDiagram-HODETNUW-DjUWHA94.js +168 -0
- package/dist/client/assets/ganttDiagram-EL5Y4UJY-CXu2s5vq.js +292 -0
- package/dist/client/assets/gitGraphDiagram-WWUBYQGX-CwlsB28k.js +106 -0
- package/dist/client/assets/index-CFelVSRu.js +19 -0
- package/dist/client/assets/index-GF8Uj64S.css +1 -0
- package/dist/client/assets/infoDiagram-27XIBGKW-C7nvTbsQ.js +2 -0
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-50b43d03.js → ishikawaDiagram-5VMMS53U-DGFXG874.js} +2 -2
- package/dist/client/assets/{journeyDiagram-JHISSGLW-dce41bdf.js → journeyDiagram-3NMN7TZE-BDdRMcmq.js} +4 -4
- package/dist/client/assets/{kanban-definition-UN3LZRKU-92401a86.js → kanban-definition-UXKFOSKX-C3fnvfeO.js} +1 -1
- package/dist/client/assets/{katex-4c9ea27f.js → katex-BTI-AXqd.js} +3 -3
- package/dist/client/assets/{katex-0cba7652.js → katex-C5jXJg4s.js} +3 -3
- package/dist/client/assets/layout-BfegUiqt.js +1 -0
- package/dist/client/assets/linear-D1EL1Azg.js +1 -0
- package/dist/client/assets/mermaid.core-DioArgDk.js +310 -0
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-66fe4544.js → mindmap-definition-YA3MSWOX-CFCbAUC0.js} +12 -12
- package/dist/client/assets/{ordinal-db88ae6f.js → ordinal-BeghXfj9.js} +1 -1
- package/dist/client/assets/pegDiagram-XKGWAZYB-B1ULJH6S.js +1 -0
- package/dist/client/assets/pieDiagram-E7YTZNPT-B9H3HosU.js +39 -0
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-f64a7ed7.js → quadrantDiagram-AXDQQJYC-eWc3HHkM.js} +4 -4
- package/dist/client/assets/railroadDiagram-O6MQD6OU-DT7c-KwW.js +1 -0
- package/dist/client/assets/requirementDiagram-BXWQKSXE-Dk1yVWV5.js +84 -0
- package/dist/client/assets/sankeyDiagram-P5KCCOFB-B5a__hiX.js +40 -0
- package/dist/client/assets/sequenceDiagram-WJ2MYXX4-CkCIByRS.js +162 -0
- package/dist/client/assets/sizeCapture-INFHLROL-CnZIW94r.js +1 -0
- package/dist/client/assets/stateDiagram-D77RDMKH-89Sfaoz9.js +1 -0
- package/dist/client/assets/stateDiagram-v2-MP3YSRHH-CP--cdl-.js +1 -0
- package/dist/client/assets/step-BEQzeS8V.js +1 -0
- package/dist/client/assets/swimlanes-42K2YHIH-C7m88XIh.js +1 -0
- package/dist/client/assets/swimlanesDiagram-VR7AAH4N-DmG2scPu.js +8 -0
- package/dist/client/assets/{time-043b3464.js → time-BaoZouO5.js} +1 -1
- package/dist/client/assets/{timeline-definition-PNZ67QCA-b0c81243.js → timeline-definition-24CTP7MA-BHKHgHq9.js} +10 -10
- package/dist/client/assets/vennDiagram-4TSXK5OY-BqKaRdWu.js +34 -0
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-8d4d7626.js → wardleyDiagram-VM6X3IG4-XiDVRZV5.js} +3 -3
- package/dist/client/assets/xychartDiagram-S5SC5T6Z-CxP4dIVd.js +7 -0
- package/dist/client/index.html +2 -3
- package/dist/server/app.js +26 -396
- package/dist/server/channel.js +5 -3
- package/dist/server/export-html.js +26 -60
- package/dist/server/export-zip.js +83 -0
- package/dist/server/import-zip.js +196 -0
- package/dist/server/index.js +2 -1
- package/dist/server/mcp.js +9 -9
- package/dist/server/port.js +18 -0
- package/dist/server/render-core.js +5 -5
- package/dist/server/routes/export.js +95 -0
- package/dist/server/routes/import.js +24 -0
- package/dist/server/routes/render.js +184 -0
- package/dist/server/routes/slideshow.js +52 -0
- package/dist/server/routes/snapshots.js +119 -0
- package/dist/server/snapshot-reader.js +58 -20
- package/dist/server/snapshot-writer.js +18 -16
- package/dist/server/viewport-cache.js +97 -25
- package/package.json +13 -7
- package/dist/client/assets/architecture-7EHR7CIX-1221aa61.js +0 -1
- package/dist/client/assets/architectureDiagram-3BPJPVTR-1eef4d3c.js +0 -36
- package/dist/client/assets/blockDiagram-GPEHLZMM-313fb06c.js +0 -132
- package/dist/client/assets/c4Diagram-AAUBKEIU-92b023ad.js +0 -10
- package/dist/client/assets/channel-5ee4a8a7.js +0 -1
- package/dist/client/assets/chunk-2J33WTMH-fb021fdc.js +0 -1
- package/dist/client/assets/chunk-727SXJPM-8e0e0228.js +0 -206
- package/dist/client/assets/chunk-AQP2D5EJ-2ccc13c2.js +0 -231
- package/dist/client/assets/classDiagram-4FO5ZUOK-42ffecb6.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-42ffecb6.js +0 -1
- package/dist/client/assets/cose-bilkent-S5V4N54A-45ec2e52.js +0 -1
- package/dist/client/assets/cytoscape.esm-1491e259.js +0 -331
- package/dist/client/assets/dagre-BM42HDAG-ed748885.js +0 -4
- package/dist/client/assets/diagram-2AECGRRQ-ccc0ddec.js +0 -43
- package/dist/client/assets/diagram-5GNKFQAL-342efdea.js +0 -10
- package/dist/client/assets/diagram-LMA3HP47-39e66739.js +0 -24
- package/dist/client/assets/diagram-OG6HWLK6-b3e61903.js +0 -24
- package/dist/client/assets/embed-2b4adf34.js +0 -201
- package/dist/client/assets/erDiagram-TEJ5UH35-281f5cc7.js +0 -85
- package/dist/client/assets/eventmodeling-FCH6USID-6508120e.js +0 -1
- package/dist/client/assets/flowDiagram-I6XJVG4X-c3a4269e.js +0 -162
- package/dist/client/assets/ganttDiagram-6RSMTGT7-013b07ec.js +0 -292
- package/dist/client/assets/gitGraph-WXDBUCRP-02827359.js +0 -1
- package/dist/client/assets/gitGraphDiagram-PVQCEYII-de184acb.js +0 -106
- package/dist/client/assets/graph-f3dfaf53.js +0 -1
- package/dist/client/assets/index-d674a6a4.css +0 -1
- package/dist/client/assets/index-ffc5af4b.js +0 -5
- package/dist/client/assets/info-J43DQDTF-81e32294.js +0 -1
- package/dist/client/assets/infoDiagram-5YYISTIA-196101ee.js +0 -2
- package/dist/client/assets/layout-3a4eff80.js +0 -1
- package/dist/client/assets/linear-fed00341.js +0 -1
- package/dist/client/assets/mermaid-parser.core-52f9cd92.js +0 -173
- package/dist/client/assets/mermaid.core-7dfc221a.js +0 -306
- package/dist/client/assets/packet-YPE3B663-278a272a.js +0 -1
- package/dist/client/assets/pie-LRSECV5Y-2e55d9ae.js +0 -1
- package/dist/client/assets/pieDiagram-4H26LBE5-65b1bcbd.js +0 -30
- package/dist/client/assets/radar-GUYGQ44K-608e459f.js +0 -1
- package/dist/client/assets/requirementDiagram-4Y6WPE33-90ebf889.js +0 -84
- package/dist/client/assets/sankeyDiagram-5OEKKPKP-2d1a83b3.js +0 -40
- package/dist/client/assets/sequenceDiagram-3UESZ5HK-aece3633.js +0 -162
- package/dist/client/assets/stateDiagram-AJRCARHV-9bd5b5f4.js +0 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-7c16c251.js +0 -1
- package/dist/client/assets/step-171ad54a.js +0 -1
- package/dist/client/assets/treeView-BLDUP644-e54b9ddb.js +0 -1
- package/dist/client/assets/treemap-LRROVOQU-6a81775b.js +0 -1
- package/dist/client/assets/vennDiagram-CIIHVFJN-8eaf0464.js +0 -34
- package/dist/client/assets/wardley-L42UT6IY-7abd921f.js +0 -1
- package/dist/client/assets/xychartDiagram-2RQKCTM6-450f333c.js +0 -7
- /package/dist/client/assets/{KaTeX_AMS-Regular-0cdd387c.woff2 → KaTeX_AMS-Regular-BQhdFMY1.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_AMS-Regular-30da91e8.woff → KaTeX_AMS-Regular-DMm9YOAa.woff} +0 -0
- /package/dist/client/assets/{KaTeX_AMS-Regular-68534840.ttf → KaTeX_AMS-Regular-DRggAlZN.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Caligraphic-Bold-07d8e303.ttf → KaTeX_Caligraphic-Bold-ATXxdsX0.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Caligraphic-Bold-1ae6bd74.woff → KaTeX_Caligraphic-Bold-BEiXGLvX.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Caligraphic-Bold-de7701e4.woff2 → KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Caligraphic-Regular-3398dd02.woff → KaTeX_Caligraphic-Regular-CTRA-rTL.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Caligraphic-Regular-5d53e70a.woff2 → KaTeX_Caligraphic-Regular-Di6jR-x-.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Caligraphic-Regular-ed0b7437.ttf → KaTeX_Caligraphic-Regular-wX97UBjC.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Fraktur-Bold-9163df9c.ttf → KaTeX_Fraktur-Bold-BdnERNNW.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Fraktur-Bold-9be7ceb8.woff → KaTeX_Fraktur-Bold-BsDP51OF.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Fraktur-Bold-74444efd.woff2 → KaTeX_Fraktur-Bold-CL6g_b3V.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Fraktur-Regular-1e6f9579.ttf → KaTeX_Fraktur-Regular-CB_wures.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Fraktur-Regular-51814d27.woff2 → KaTeX_Fraktur-Regular-CTYiF6lA.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Fraktur-Regular-5e28753b.woff → KaTeX_Fraktur-Regular-Dxdc4cR9.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Bold-0f60d1b8.woff2 → KaTeX_Main-Bold-Cx986IdX.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Bold-c76c5d69.woff → KaTeX_Main-Bold-Jm3AIy58.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Bold-138ac28d.ttf → KaTeX_Main-Bold-waoOVXN0.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Main-BoldItalic-99cd42a3.woff2 → KaTeX_Main-BoldItalic-DxDJ3AOS.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Main-BoldItalic-70ee1f64.ttf → KaTeX_Main-BoldItalic-DzxPMmG6.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Main-BoldItalic-a6f7ec0d.woff → KaTeX_Main-BoldItalic-SpSLRI95.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Italic-0d85ae7c.ttf → KaTeX_Main-Italic-3WenGoN9.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Italic-f1d6ef86.woff → KaTeX_Main-Italic-BMLOBm91.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Italic-97479ca6.woff2 → KaTeX_Main-Italic-NWA7e6Wa.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Regular-c2342cd8.woff2 → KaTeX_Main-Regular-B22Nviop.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Regular-c6368d87.woff → KaTeX_Main-Regular-Dr94JaBh.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Main-Regular-d0332f52.ttf → KaTeX_Main-Regular-ypZvNtVU.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Math-BoldItalic-f9377ab0.ttf → KaTeX_Math-BoldItalic-B3XSjfu4.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Math-BoldItalic-dc47344d.woff2 → KaTeX_Math-BoldItalic-CZnvNsCZ.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Math-BoldItalic-850c0af5.woff → KaTeX_Math-BoldItalic-iY-2wyZ7.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Math-Italic-8a8d2445.woff → KaTeX_Math-Italic-DA0__PXp.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Math-Italic-08ce98e5.ttf → KaTeX_Math-Italic-flOr_0UB.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Math-Italic-7af58c5e.woff2 → KaTeX_Math-Italic-t53AETM-.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Bold-1ece03f7.ttf → KaTeX_SansSerif-Bold-CFMepnvq.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Bold-e99ae511.woff2 → KaTeX_SansSerif-Bold-D1sUS0GD.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Bold-ece03cfd.woff → KaTeX_SansSerif-Bold-DbIhKOiC.woff} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Italic-00b26ac8.woff2 → KaTeX_SansSerif-Italic-C3H0VqGB.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Italic-91ee6750.woff → KaTeX_SansSerif-Italic-DN2j7dab.woff} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Italic-3931dd81.ttf → KaTeX_SansSerif-Italic-YYjJ1zSn.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Regular-f36ea897.ttf → KaTeX_SansSerif-Regular-BNo7hRIc.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Regular-11e4dc8a.woff → KaTeX_SansSerif-Regular-CS6fqUqJ.woff} +0 -0
- /package/dist/client/assets/{KaTeX_SansSerif-Regular-68e8c73e.woff2 → KaTeX_SansSerif-Regular-DDBCnlJ7.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Script-Regular-1c67f068.ttf → KaTeX_Script-Regular-C5JkGWo-.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Script-Regular-036d4e95.woff2 → KaTeX_Script-Regular-D3wIWfF6.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Script-Regular-d96cdf2b.woff → KaTeX_Script-Regular-D5yQViql.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Size1-Regular-c943cc98.woff → KaTeX_Size1-Regular-C195tn64.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Size1-Regular-95b6d2f1.ttf → KaTeX_Size1-Regular-Dbsnue_I.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Size1-Regular-6b47c401.woff2 → KaTeX_Size1-Regular-mCD8mA8B.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Size2-Regular-a6b2099f.ttf → KaTeX_Size2-Regular-B7gKUWhC.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Size2-Regular-d04c5421.woff2 → KaTeX_Size2-Regular-Dy4dx90m.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Size2-Regular-2014c523.woff → KaTeX_Size2-Regular-oD1tc_U0.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Size3-Regular-6ab6b62e.woff → KaTeX_Size3-Regular-CTq5MqoE.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Size3-Regular-500e04d5.ttf → KaTeX_Size3-Regular-DgpXs0kz.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Size4-Regular-99f9c675.woff → KaTeX_Size4-Regular-BF-4gkZK.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Size4-Regular-c647367d.ttf → KaTeX_Size4-Regular-DWFBv043.ttf} +0 -0
- /package/dist/client/assets/{KaTeX_Size4-Regular-a4af7d41.woff2 → KaTeX_Size4-Regular-Dl5lxZxV.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Typewriter-Regular-e14fed02.woff → KaTeX_Typewriter-Regular-C0xS9mPB.woff} +0 -0
- /package/dist/client/assets/{KaTeX_Typewriter-Regular-71d517d6.woff2 → KaTeX_Typewriter-Regular-CO6r4hn1.woff2} +0 -0
- /package/dist/client/assets/{KaTeX_Typewriter-Regular-f01f3e87.ttf → KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf} +0 -0
- /package/dist/client/assets/{colors-98f238a0.js → colors-Cc3OSVma.js} +0 -0
- /package/dist/client/assets/{defaultLocale-a8476f12.js → defaultLocale-CzDG__Ur.js} +0 -0
- /package/dist/client/assets/{index-a1656aec.js → index-Bi7T_FA4.js} +0 -0
- /package/dist/client/assets/{init-a5b10ee5.js → init-Dmth1JHB.js} +0 -0
- /package/dist/client/assets/{range-6bc2a9a0.js → range-OtVwhkKS.js} +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import{g as Pe}from"./chunk-5VM5RSS4-yGvVHapR.js";import{an as Fe,ao as ye,ap as Me,aq as Ke,ar as Ye,as as We,at as Ve,au as Ue,av as He,aw as je,ax as Xe,ay as Ge,az as qe,aA as Je,aB as Ze,aC as Qe,aD as $e,aE as et,aF as tt,aG as st,aH as rt,aI as it,aJ as at,aK as nt,aL as ot,_ as g,y as X,j as J,aM as ct,d as lt,l as m,p as ut,r as gt,c as me,P as ht,aj as dt,ai as pt,ak as ft,k as St,aN as xt,Y as be,$ as Lt}from"./mermaid.core-DioArgDk.js";import{c as yt}from"./channel-9qggtmY_.js";import"./index-CFelVSRu.js";import"./step-BEQzeS8V.js";function mt(e){return Array.isArray(e)}function bt(e){if(Fe(e))return e;const n=ye(e);if(!wt(e))return{};if(mt(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(Me(e)){const s=e,c=s.constructor;return new c(s.buffer,s.byteOffset,s.length)}if(n==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(n==="[object DataView]"){const s=e,c=s.buffer,p=s.byteOffset,r=s.byteLength,d=new ArrayBuffer(r),x=new Uint8Array(c,p,r);return new Uint8Array(d).set(x),new DataView(d)}if(n==="[object Boolean]"||n==="[object Number]"||n==="[object String]"){const s=e.constructor,c=new s(e.valueOf());return n==="[object String]"?_t(c,e):re(c,e),c}if(n==="[object Date]")return new Date(Number(e));if(n==="[object RegExp]"){const s=e,c=new RegExp(s.source,s.flags);return c.lastIndex=s.lastIndex,c}if(n==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(n==="[object Map]"){const s=e,c=new Map;return s.forEach((p,r)=>{c.set(r,p)}),c}if(n==="[object Set]"){const s=e,c=new Set;return s.forEach(p=>{c.add(p)}),c}if(n==="[object Arguments]"){const s=e,c={};return re(c,s),c.length=s.length,c[Symbol.iterator]=s[Symbol.iterator],c}const l={};return Dt(l,e),re(l,e),Et(l,e),l}function wt(e){switch(ye(e)){case ot:case nt:case at:case it:case rt:case st:case tt:case et:case $e:case Qe:case Ze:case Je:case qe:case Ge:case Xe:case je:case He:case Ue:case Ve:case We:case Ye:case Ke:return!0;default:return!1}}function re(e,n){for(const l in n)Object.hasOwn(n,l)&&(e[l]=n[l])}function Et(e,n){const l=Object.getOwnPropertySymbols(n);for(let s=0;s<l.length;s++){const c=l[s];Object.prototype.propertyIsEnumerable.call(n,c)&&(e[c]=n[c])}}function _t(e,n){const l=n.valueOf().length;for(const s in n)Object.hasOwn(n,s)&&(Number.isNaN(Number(s))||Number(s)>=l)&&(e[s]=n[s])}function Dt(e,n){const l=Object.getPrototypeOf(n);l!==null&&typeof n.constructor=="function"&&Object.setPrototypeOf(e,l)}var ae=function(){var e=g(function(T,h,i,o){for(i=i||{},o=T.length;o--;i[T[o]]=h);return i},"o"),n=[1,15],l=[1,7],s=[1,13],c=[1,14],p=[1,19],r=[1,16],d=[1,17],x=[1,18],y=[8,30],S=[8,10,21,28,29,30,31,39,43,46],E=[1,23],z=[1,24],A=[8,10,15,16,21,28,29,30,31,39,43,46],_=[8,10,15,16,21,27,28,29,30,31,39,43,46],N=[1,49],I={trace:g(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:g(function(h,i,o,u,L,t,O){var a=t.length-1;switch(L){case 4:u.getLogger().debug("Rule: separator (NL) ");break;case 5:u.getLogger().debug("Rule: separator (Space) ");break;case 6:u.getLogger().debug("Rule: separator (EOF) ");break;case 7:u.getLogger().debug("Rule: hierarchy: ",t[a-1]),u.setHierarchy(t[a-1]);break;case 8:u.getLogger().debug("Stop NL ");break;case 9:u.getLogger().debug("Stop EOF ");break;case 10:u.getLogger().debug("Stop NL2 ");break;case 11:u.getLogger().debug("Stop EOF2 ");break;case 12:u.getLogger().debug("Rule: statement: ",t[a]),typeof t[a].length=="number"?this.$=t[a]:this.$=[t[a]];break;case 13:u.getLogger().debug("Rule: statement #2: ",t[a-1]),this.$=[t[a-1]].concat(t[a]);break;case 14:u.getLogger().debug("Rule: link: ",t[a],h),this.$={edgeTypeStr:t[a],label:""};break;case 15:u.getLogger().debug("Rule: LABEL link: ",t[a-3],t[a-1],t[a]),this.$={edgeTypeStr:t[a],label:t[a-1]};break;case 18:const f=parseInt(t[a]),w=u.generateId();this.$={id:w,type:"space",label:"",width:f,children:[]};break;case 23:u.getLogger().debug("Rule: (nodeStatement link node) ",t[a-2],t[a-1],t[a]," typestr: ",t[a-1].edgeTypeStr);const C=u.edgeStrToEdgeData(t[a-1].edgeTypeStr),M=u.edgeStrToEdgeStartData(t[a-1].edgeTypeStr),K=u.edgeStrToThickness(t[a-1].edgeTypeStr),b=u.edgeStrToPattern(t[a-1].edgeTypeStr);this.$=[{id:t[a-2].id,label:t[a-2].label,type:t[a-2].type,directions:t[a-2].directions},{id:t[a-2].id+"-"+t[a].id,start:t[a-2].id,end:t[a].id,label:t[a-1].label,type:"edge",thickness:K,pattern:b,directions:t[a].directions,arrowTypeEnd:C,arrowTypeStart:M},{id:t[a].id,label:t[a].label,type:u.typeStr2Type(t[a].typeStr),directions:t[a].directions}];break;case 24:u.getLogger().debug("Rule: nodeStatement (abc88 node size) ",t[a-1],t[a]),this.$={id:t[a-1].id,label:t[a-1].label,type:u.typeStr2Type(t[a-1].typeStr),directions:t[a-1].directions,widthInColumns:parseInt(t[a],10)};break;case 25:u.getLogger().debug("Rule: nodeStatement (node) ",t[a]),this.$={id:t[a].id,label:t[a].label,type:u.typeStr2Type(t[a].typeStr),directions:t[a].directions,widthInColumns:1};break;case 26:u.getLogger().debug("APA123",this?this:"na"),u.getLogger().debug("COLUMNS: ",t[a]),this.$={type:"column-setting",columns:t[a]==="auto"?-1:parseInt(t[a])};break;case 27:u.getLogger().debug("Rule: id-block statement : ",t[a-2],t[a-1]),u.generateId(),this.$={...t[a-2],type:"composite",children:t[a-1]};break;case 28:u.getLogger().debug("Rule: blockStatement : ",t[a-2],t[a-1],t[a]);const R=u.generateId();this.$={id:R,type:"composite",label:"",children:t[a-1]};break;case 29:u.getLogger().debug("Rule: node (NODE_ID separator): ",t[a]),this.$={id:t[a]};break;case 30:u.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",t[a-1],t[a]),this.$={id:t[a-1],label:t[a].label,typeStr:t[a].typeStr,directions:t[a].directions};break;case 31:u.getLogger().debug("Rule: dirList: ",t[a]),this.$=[t[a]];break;case 32:u.getLogger().debug("Rule: dirList: ",t[a-1],t[a]),this.$=[t[a-1]].concat(t[a]);break;case 33:u.getLogger().debug("Rule: nodeShapeNLabel: ",t[a-2],t[a-1],t[a]),this.$={typeStr:t[a-2]+t[a],label:t[a-1]};break;case 34:u.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",t[a-3],t[a-2]," #3:",t[a-1],t[a]),this.$={typeStr:t[a-3]+t[a],label:t[a-2],directions:t[a-1]};break;case 35:case 36:this.$={type:"classDef",id:t[a-1].trim(),css:t[a].trim()};break;case 37:this.$={type:"applyClass",id:t[a-1].trim(),styleClass:t[a].trim()};break;case 38:this.$={type:"applyStyles",id:t[a-1].trim(),stylesStr:t[a].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:n,11:3,13:4,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:s,29:c,31:p,39:r,43:d,46:x},{8:[1,20]},e(y,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:n,21:l,28:s,29:c,31:p,39:r,43:d,46:x}),e(S,[2,16],{14:22,15:E,16:z}),e(S,[2,17]),e(S,[2,18]),e(S,[2,19]),e(S,[2,20]),e(S,[2,21]),e(S,[2,22]),e(A,[2,25],{27:[1,25]}),e(S,[2,26]),{19:26,26:12,31:p},{10:n,11:27,13:4,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:s,29:c,31:p,39:r,43:d,46:x},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(_,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(y,[2,13]),{26:35,31:p},{31:[2,14]},{17:[1,36]},e(A,[2,24]),{10:n,11:37,13:4,14:22,15:E,16:z,19:5,20:6,21:l,22:8,23:9,24:10,25:11,26:12,28:s,29:c,31:p,39:r,43:d,46:x},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(_,[2,30]),{18:[1,43]},{18:[1,44]},e(A,[2,23]),{18:[1,45]},{30:[1,46]},e(S,[2,28]),e(S,[2,35]),e(S,[2,36]),e(S,[2,37]),e(S,[2,38]),{36:[1,47]},{33:48,34:N},{15:[1,50]},e(S,[2,27]),e(_,[2,33]),{38:[1,51]},{33:52,34:N,38:[2,31]},{31:[2,15]},e(_,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:g(function(h,i){if(i.recoverable)this.trace(h);else{var o=new Error(h);throw o.hash=i,o}},"parseError"),parse:g(function(h){var i=this,o=[0],u=[],L=[null],t=[],O=this.table,a="",f=0,w=0,C=2,M=1,K=t.slice.call(arguments,1),b=Object.create(this.lexer),R={yy:{}};for(var Y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Y)&&(R.yy[Y]=this.yy[Y]);b.setInput(h,R.yy),R.yy.lexer=b,R.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var H=b.yylloc;t.push(H);var ee=b.options&&b.options.ranges;typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ke(k){o.length=o.length-2*k,L.length=L.length-k,t.length=t.length-k}g(ke,"popStack");function pe(){var k;return k=u.pop()||b.lex()||M,typeof k!="number"&&(k instanceof Array&&(u=k,k=u.pop()),k=i.symbols_[k]||k),k}g(pe,"lex");for(var B,V,P,te,U={},G,W,fe,q;;){if(V=o[o.length-1],this.defaultActions[V]?P=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=pe()),P=O[V]&&O[V][B]),typeof P>"u"||!P.length||!P[0]){var se="";q=[];for(G in O[V])this.terminals_[G]&&G>C&&q.push("'"+this.terminals_[G]+"'");b.showPosition?se="Parse error on line "+(f+1)+`:
|
|
2
|
+
`+b.showPosition()+`
|
|
3
|
+
Expecting `+q.join(", ")+", got '"+(this.terminals_[B]||B)+"'":se="Parse error on line "+(f+1)+": Unexpected "+(B==M?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(se,{text:b.match,token:this.terminals_[B]||B,line:b.yylineno,loc:H,expected:q})}if(P[0]instanceof Array&&P.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+B);switch(P[0]){case 1:o.push(B),L.push(b.yytext),t.push(b.yylloc),o.push(P[1]),B=null,w=b.yyleng,a=b.yytext,f=b.yylineno,H=b.yylloc;break;case 2:if(W=this.productions_[P[1]][1],U.$=L[L.length-W],U._$={first_line:t[t.length-(W||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(W||1)].first_column,last_column:t[t.length-1].last_column},ee&&(U._$.range=[t[t.length-(W||1)].range[0],t[t.length-1].range[1]]),te=this.performAction.apply(U,[a,w,f,R.yy,P[1],L,t].concat(K)),typeof te<"u")return te;W&&(o=o.slice(0,-1*W*2),L=L.slice(0,-1*W),t=t.slice(0,-1*W)),o.push(this.productions_[P[1]][0]),L.push(U.$),t.push(U._$),fe=O[o[o.length-2]][o[o.length-1]],o.push(fe);break;case 3:return!0}}return!0},"parse")},D=function(){var T={EOF:1,parseError:g(function(i,o){if(this.yy.parser)this.yy.parser.parseError(i,o);else throw new Error(i)},"parseError"),setInput:g(function(h,i){return this.yy=i||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:g(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var i=h.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:g(function(h){var i=h.length,o=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var L=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===u.length?this.yylloc.first_column:0)+u[u.length-o.length].length-o[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[L[0],L[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:g(function(){return this._more=!0,this},"more"),reject:g(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:g(function(h){this.unput(this.match.slice(h))},"less"),pastInput:g(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:g(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:g(function(){var h=this.pastInput(),i=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
5
|
+
`+i+"^"},"showPosition"),test_match:g(function(h,i){var o,u,L;if(this.options.backtrack_lexer&&(L={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&&(L.yylloc.range=this.yylloc.range.slice(0))),u=h[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(h[0].length),this.matched+=h[0],o=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),o)return o;if(this._backtrack){for(var t in L)this[t]=L[t];return!1}return!1},"test_match"),next:g(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,i,o,u;this._more||(this.yytext="",this.match="");for(var L=this._currentRules(),t=0;t<L.length;t++)if(o=this._input.match(this.rules[L[t]]),o&&(!i||o[0].length>i[0].length)){if(i=o,u=t,this.options.backtrack_lexer){if(h=this.test_match(o,L[t]),h!==!1)return h;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(h=this.test_match(i,L[u]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:g(function(){var i=this.next();return i||this.lex()},"lex"),begin:g(function(i){this.conditionStack.push(i)},"begin"),popState:g(function(){var i=this.conditionStack.length-1;return i>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:g(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:g(function(i){return i=this.conditionStack.length-1-Math.abs(i||0),i>=0?this.conditionStack[i]:"INITIAL"},"topState"),pushState:g(function(i){this.begin(i)},"pushState"),stateStackSize:g(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:g(function(i,o,u,L){switch(u){case 0:return i.getLogger().debug("Found block-beta"),10;case 1:return i.getLogger().debug("Found id-block"),29;case 2:return i.getLogger().debug("Found block"),10;case 3:i.getLogger().debug(".",o.yytext);break;case 4:i.getLogger().debug("_",o.yytext);break;case 5:return 5;case 6:return o.yytext=-1,28;case 7:return o.yytext=o.yytext.replace(/columns\s+/,""),i.getLogger().debug("COLUMNS (LEX)",o.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:i.getLogger().debug("LEX: POPPING STR:",o.yytext),this.popState();break;case 13:return i.getLogger().debug("LEX: STR end:",o.yytext),"STR";case 14:return o.yytext=o.yytext.replace(/space\:/,""),i.getLogger().debug("SPACE NUM (LEX)",o.yytext),21;case 15:return o.yytext="1",i.getLogger().debug("COLUMNS (LEX)",o.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),i.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),i.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),i.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),i.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),i.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),i.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),i.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),i.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),i.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),i.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),i.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),i.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),i.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return i.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return i.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return i.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return i.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return i.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return i.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return i.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:return this.pushState("NODE"),35;case 66:return this.pushState("NODE"),35;case 67:return this.pushState("NODE"),35;case 68:return this.pushState("NODE"),35;case 69:return this.pushState("NODE"),35;case 70:return this.pushState("NODE"),35;case 71:return this.pushState("NODE"),35;case 72:return i.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),i.getLogger().debug("LEX ARR START"),37;case 74:return i.getLogger().debug("Lex: NODE_ID",o.yytext),31;case 75:return i.getLogger().debug("Lex: EOF",o.yytext),8;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:i.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:i.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return i.getLogger().debug("LEX: NODE_DESCR:",o.yytext),"NODE_DESCR";case 83:i.getLogger().debug("LEX POPPING"),this.popState();break;case 84:i.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return o.yytext=o.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (right): dir:",o.yytext),"DIR";case 86:return o.yytext=o.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (left):",o.yytext),"DIR";case 87:return o.yytext=o.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (x):",o.yytext),"DIR";case 88:return o.yytext=o.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (y):",o.yytext),"DIR";case 89:return o.yytext=o.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (up):",o.yytext),"DIR";case 90:return o.yytext=o.yytext.replace(/^,\s*/,""),i.getLogger().debug("Lex (down):",o.yytext),"DIR";case 91:return o.yytext="]>",i.getLogger().debug("Lex (ARROW_DIR end):",o.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return i.getLogger().debug("Lex: LINK","#"+o.yytext+"#"),15;case 93:return i.getLogger().debug("Lex: LINK",o.yytext),15;case 94:return i.getLogger().debug("Lex: LINK",o.yytext),15;case 95:return i.getLogger().debug("Lex: LINK",o.yytext),15;case 96:return i.getLogger().debug("Lex: START_LINK",o.yytext),this.pushState("LLABEL"),16;case 97:return i.getLogger().debug("Lex: START_LINK",o.yytext),this.pushState("LLABEL"),16;case 98:return i.getLogger().debug("Lex: START_LINK",o.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return i.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),i.getLogger().debug("Lex: LINK","#"+o.yytext+"#"),15;case 102:return this.popState(),i.getLogger().debug("Lex: LINK",o.yytext),15;case 103:return this.popState(),i.getLogger().debug("Lex: LINK",o.yytext),15;case 104:return i.getLogger().debug("Lex: COLON",o.yytext),o.yytext=o.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return T}();I.lexer=D;function v(){this.yy={}}return g(v,"Parser"),v.prototype=I,I.Parser=v,new v}();ae.parser=ae;var Tt=ae,F=new Map,ce=[],ne=new Map,Se="color",xe="fill",Nt="bgFill",we=",",Z=new Map,le="",It=g(e=>St.sanitizeText(e,me()),"sanitizeText"),Ot=g(function(e,n=""){let l=Z.get(e);l||(l={id:e,styles:[],textStyles:[]},Z.set(e,l)),n!=null&&n.split(we).forEach(s=>{const c=s.replace(/([^;]*);/,"$1").trim();if(RegExp(Se).exec(s)){const r=c.replace(xe,Nt).replace(Se,xe);l.textStyles.push(r)}l.styles.push(c)})},"addStyleClass"),Ct=g(function(e,n=""){const l=F.get(e);n!=null&&(l.styles=n.split(we))},"addStyle2Node"),vt=g(function(e,n){e.split(",").forEach(function(l){let s=F.get(l);if(s===void 0){const c=l.trim();s={id:c,type:"na",children:[]},F.set(c,s)}s.classes||(s.classes=[]),s.classes.push(n)})},"setCssClass"),Ee=g((e,n)=>{const l=e.flat(),s=[],c=l.find(r=>(r==null?void 0:r.type)==="column-setting"),p=(c==null?void 0:c.columns)??-1;for(const r of l){if(typeof p=="number"&&p>0&&r.type!=="column-setting"&&typeof r.widthInColumns=="number"&&r.widthInColumns>p&&m.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${p}`),r.label&&(r.label=It(r.label)),r.type==="classDef"){Ot(r.id,r.css);continue}if(r.type==="applyClass"){vt(r.id,(r==null?void 0:r.styleClass)??"");continue}if(r.type==="applyStyles"){r!=null&&r.stylesStr&&Ct(r.id,r==null?void 0:r.stylesStr);continue}if(r.type==="column-setting")n.columns=r.columns??-1;else if(r.type==="edge"){const d=(ne.get(r.id)??0)+1;ne.set(r.id,d),r.id=d+"-"+r.id,ce.push(r)}else{r.label||(r.type==="composite"?r.label="":r.label=r.id);const d=F.get(r.id);if(d===void 0?F.set(r.id,r):(r.type!=="na"&&(d.type=r.type),r.label!==r.id&&(d.label=r.label)),r.children&&Ee(r.children,r),r.type==="space"){const x=r.width??1;for(let y=0;y<x;y++){const S=bt(r);S.id=S.id+"-"+y,F.set(S.id,S),s.push(S)}}else d===void 0&&s.push(r)}}n.children=s},"populateBlockDatabase"),ue=[],j={id:"root",type:"composite",children:[],columns:-1},zt=g(()=>{m.debug("Clear called"),ut(),j={id:"root",type:"composite",children:[],columns:-1},F=new Map([["root",j]]),ue=[],Z=new Map,ce=[],ne=new Map,le=""},"clear");function _e(e){switch(m.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return m.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}g(_e,"typeStr2Type");function De(e){switch(m.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}g(De,"edgeTypeStr2Type");function Te(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}g(Te,"edgeStrToEdgeData");function Ne(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}g(Ne,"edgeStrToEdgeStartData");function Ie(e){return e.includes("==")?"thick":"normal"}g(Ie,"edgeStrToThickness");function Oe(e){return e.includes(".-")?"dotted":"solid"}g(Oe,"edgeStrToPattern");var Le=0,At=g(()=>(Le++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Le),"generateId"),Bt=g(e=>{j.children=e,Ee(e,j),ue=j.children},"setHierarchy"),Rt=g(e=>{const n=F.get(e);return n?n.columns?n.columns:n.children?n.children.length:-1:-1},"getColumns"),kt=g(()=>[...F.values()],"getBlocksFlat"),Pt=g(()=>ue||[],"getBlocks"),Ft=g(()=>ce,"getEdges"),Mt=g(e=>F.get(e),"getBlock"),Kt=g(e=>{F.set(e.id,e)},"setBlock"),Yt=g(e=>{le=e},"setDiagramId"),Wt=g(()=>le,"getDiagramId"),Vt=g(()=>m,"getLogger"),Ut=g(function(){return Z},"getClasses"),Ht={getConfig:g(()=>X().block,"getConfig"),typeStr2Type:_e,edgeTypeStr2Type:De,edgeStrToEdgeData:Te,edgeStrToEdgeStartData:Ne,edgeStrToThickness:Ie,edgeStrToPattern:Oe,getLogger:Vt,getBlocksFlat:kt,getBlocks:Pt,getEdges:Ft,setHierarchy:Bt,getBlock:Mt,setBlock:Kt,getColumns:Rt,getClasses:Ut,clear:zt,generateId:At,setDiagramId:Yt,getDiagramId:Wt},jt=Ht,ie=g((e,n)=>{const l=yt,s=l(e,"r"),c=l(e,"g"),p=l(e,"b");return gt(s,c,p,n)},"fade"),Xt=g(e=>`.label {
|
|
7
|
+
font-family: ${e.fontFamily};
|
|
8
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
9
|
+
}
|
|
10
|
+
.cluster-label text {
|
|
11
|
+
fill: ${e.titleColor};
|
|
12
|
+
}
|
|
13
|
+
.cluster-label span {
|
|
14
|
+
color: ${e.titleColor};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
.label text,span {
|
|
20
|
+
fill: ${e.nodeTextColor||e.textColor};
|
|
21
|
+
color: ${e.nodeTextColor||e.textColor};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.node rect,
|
|
25
|
+
.node circle,
|
|
26
|
+
.node ellipse,
|
|
27
|
+
.node polygon,
|
|
28
|
+
.node path {
|
|
29
|
+
fill: ${e.mainBkg};
|
|
30
|
+
stroke: ${e.nodeBorder};
|
|
31
|
+
stroke-width: 1px;
|
|
32
|
+
}
|
|
33
|
+
.flowchart-label text {
|
|
34
|
+
text-anchor: middle;
|
|
35
|
+
}
|
|
36
|
+
// .flowchart-label .text-outer-tspan {
|
|
37
|
+
// text-anchor: middle;
|
|
38
|
+
// }
|
|
39
|
+
// .flowchart-label .text-inner-tspan {
|
|
40
|
+
// text-anchor: start;
|
|
41
|
+
// }
|
|
42
|
+
|
|
43
|
+
.node .label {
|
|
44
|
+
text-align: center;
|
|
45
|
+
}
|
|
46
|
+
.node.clickable {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.arrowheadPath {
|
|
51
|
+
fill: ${e.arrowheadColor};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.edgePaths .path {
|
|
55
|
+
stroke: ${e.lineColor};
|
|
56
|
+
stroke-width: 2.0px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.flowchart-link {
|
|
60
|
+
stroke: ${e.lineColor};
|
|
61
|
+
fill: none;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.edgeLabel {
|
|
65
|
+
background-color: ${e.edgeLabelBackground};
|
|
66
|
+
/*
|
|
67
|
+
* This is for backward compatibility with existing code that didn't
|
|
68
|
+
* add a \`<p>\` around edge labels.
|
|
69
|
+
*
|
|
70
|
+
* TODO: We should probably remove this in a future release.
|
|
71
|
+
*/
|
|
72
|
+
p {
|
|
73
|
+
margin: 0;
|
|
74
|
+
padding: 0;
|
|
75
|
+
display: inline;
|
|
76
|
+
}
|
|
77
|
+
rect {
|
|
78
|
+
opacity: 0.5;
|
|
79
|
+
background-color: ${e.edgeLabelBackground};
|
|
80
|
+
fill: ${e.edgeLabelBackground};
|
|
81
|
+
}
|
|
82
|
+
text-align: center;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* For html labels only */
|
|
86
|
+
.labelBkg {
|
|
87
|
+
background-color: ${e.edgeLabelBackground};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.node .cluster {
|
|
91
|
+
// fill: ${ie(e.mainBkg,.5)};
|
|
92
|
+
fill: ${ie(e.clusterBkg,.5)};
|
|
93
|
+
stroke: ${ie(e.clusterBorder,.2)};
|
|
94
|
+
box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
|
|
95
|
+
stroke-width: 1px;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.cluster text {
|
|
99
|
+
fill: ${e.titleColor};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.cluster span {
|
|
103
|
+
color: ${e.titleColor};
|
|
104
|
+
}
|
|
105
|
+
/* .cluster div {
|
|
106
|
+
color: ${e.titleColor};
|
|
107
|
+
} */
|
|
108
|
+
|
|
109
|
+
div.mermaidTooltip {
|
|
110
|
+
position: absolute;
|
|
111
|
+
text-align: center;
|
|
112
|
+
max-width: 200px;
|
|
113
|
+
padding: 2px;
|
|
114
|
+
font-family: ${e.fontFamily};
|
|
115
|
+
font-size: 12px;
|
|
116
|
+
background: ${e.tertiaryColor};
|
|
117
|
+
border: 1px solid ${e.border2};
|
|
118
|
+
border-radius: 2px;
|
|
119
|
+
pointer-events: none;
|
|
120
|
+
z-index: 100;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.flowchartTitleText {
|
|
124
|
+
text-anchor: middle;
|
|
125
|
+
font-size: 18px;
|
|
126
|
+
fill: ${e.textColor};
|
|
127
|
+
}
|
|
128
|
+
${Pe()}
|
|
129
|
+
`,"getStyles"),Gt=Xt;function oe(e,n){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(n<0||!Number.isInteger(n))throw new Error("Position must be a non-negative integer."+n);if(e<0)return{px:n,py:0};if(e===1)return{px:0,py:n};const l=n%e,s=Math.floor(n/e);return{px:l,py:s}}g(oe,"calculateBlockPosition");var qt=g(e=>{let n=0,l=0;for(const s of e.children){const{width:c,height:p,x:r,y:d}=s.size??{width:0,height:0,x:0,y:0};if(m.debug("getMaxChildSize abc95 child:",s.id,"width:",c,"height:",p,"x:",r,"y:",d,s.type),s.type==="space")continue;const x=c/(s.widthInColumns??1);x>n&&(n=x),p>l&&(l=p)}return{width:n,height:l}},"getMaxChildSize");function Q(e,n,l=0,s=0,c=8){var d,x,y,S,E,z,A,_,N,I,D;m.debug("setBlockSizes abc95 (start)",e.id,(d=e==null?void 0:e.size)==null?void 0:d.x,"block width =",e==null?void 0:e.size,"siblingWidth",l),(x=e==null?void 0:e.size)!=null&&x.width||(e.size={width:l,height:s,x:0,y:0});let p=0,r=0;if(((y=e.children)==null?void 0:y.length)>0){for(const t of e.children)Q(t,n,0,0,c);const v=qt(e);p=v.width,r=v.height,m.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",p,r);for(const t of e.children)t.size&&(m.debug(`abc95 Setting size of children of ${e.id} id=${t.id} ${p} ${r} ${JSON.stringify(t.size)}`),t.size.width=p*(t.widthInColumns??1)+c*((t.widthInColumns??1)-1),t.size.height=r,t.size.x=0,t.size.y=0,m.debug(`abc95 updating size of ${e.id} children child:${t.id} maxWidth:${p} maxHeight:${r}`));for(const t of e.children)Q(t,n,p,r,c);const T=e.columns??-1;let h=0;for(const t of e.children)h+=t.widthInColumns??1;let i=e.children.length;T>0&&T<h&&(i=T);const o=Math.ceil(h/i);let u=i*(p+c)+c,L=o*(r+c)+c;if(u<l){m.debug(`Detected to small sibling: abc95 ${e.id} siblingWidth ${l} siblingHeight ${s} width ${u}`),u=l,L=s;const t=(l-i*c-c)/i,O=(s-o*c-c)/o;m.debug("Size indata abc88",e.id,"childWidth",t,"maxWidth",p),m.debug("Size indata abc88",e.id,"childHeight",O,"maxHeight",r),m.debug("Size indata abc88 xSize",i,"padding",c);for(const a of e.children)a.size&&(a.size.width=t,a.size.height=O,a.size.x=0,a.size.y=0)}if(m.debug(`abc95 (finale calc) ${e.id} xSize ${i} ySize ${o} columns ${T}${e.children.length} width=${Math.max(u,((S=e.size)==null?void 0:S.width)||0)}`),u<(((E=e==null?void 0:e.size)==null?void 0:E.width)||0)){u=((z=e==null?void 0:e.size)==null?void 0:z.width)||0;const t=T>0?Math.min(e.children.length,T):e.children.length;if(t>0){const O=(u-t*c-c)/t;m.debug("abc95 (growing to fit) width",e.id,u,(A=e.size)==null?void 0:A.width,O);for(const a of e.children)a.size&&(a.size.width=O)}}e.size={width:u,height:L,x:0,y:0}}m.debug("setBlockSizes abc94 (done)",e.id,(_=e==null?void 0:e.size)==null?void 0:_.x,(N=e==null?void 0:e.size)==null?void 0:N.width,(I=e==null?void 0:e.size)==null?void 0:I.y,(D=e==null?void 0:e.size)==null?void 0:D.height)}g(Q,"setBlockSizes");function ge(e,n,l=8){var c,p,r,d,x,y,S,E,z,A,_,N,I,D,v,T,h;m.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${(c=e==null?void 0:e.size)==null?void 0:c.x} y: ${(p=e==null?void 0:e.size)==null?void 0:p.y} width: ${(r=e==null?void 0:e.size)==null?void 0:r.width}`);const s=e.columns??-1;if(m.debug("layoutBlocks columns abc95",e.id,"=>",s,e),e.children&&e.children.length>0){const i=((x=(d=e==null?void 0:e.children[0])==null?void 0:d.size)==null?void 0:x.width)??0,o=e.children.length*i+(e.children.length-1)*l;m.debug("widthOfChildren 88",o,"posX");const u=new Map;{let f=0;for(const w of e.children){if(!w.size)continue;const{py:C}=oe(s,f),M=u.get(C)??0;w.size.height>M&&u.set(C,w.size.height);let K=(w==null?void 0:w.widthInColumns)??1;s>0&&(K=Math.min(K,s-f%s)),f+=K}}const L=new Map;{let f=0;const w=[...u.keys()].sort((C,M)=>C-M);for(const C of w)L.set(C,f),f+=(u.get(C)??0)+l}let t=0;m.debug("abc91 block?.size?.x",e.id,(y=e==null?void 0:e.size)==null?void 0:y.x);let O=(S=e==null?void 0:e.size)!=null&&S.x?((E=e==null?void 0:e.size)==null?void 0:E.x)+(-((z=e==null?void 0:e.size)==null?void 0:z.width)/2||0):-l,a=0;for(const f of e.children){const w=e;if(!f.size)continue;const{width:C,height:M}=f.size,{px:K,py:b}=oe(s,t);if(b!=a&&(a=b,O=(A=e==null?void 0:e.size)!=null&&A.x?((_=e==null?void 0:e.size)==null?void 0:_.x)+(-((N=e==null?void 0:e.size)==null?void 0:N.width)/2||0):-l,m.debug("New row in layout for block",e.id," and child ",f.id,a)),m.debug(`abc89 layout blocks (child) id: ${f.id} Pos: ${t} (px, py) ${K},${b} (${(I=w==null?void 0:w.size)==null?void 0:I.x},${(D=w==null?void 0:w.size)==null?void 0:D.y}) parent: ${w.id} width: ${C}${l}`),w.size){const Y=C/2;f.size.x=O+l+Y,m.debug(`abc91 layout blocks (calc) px, pyid:${f.id} startingPos=X${O} new startingPosX${f.size.x} ${Y} padding=${l} width=${C} halfWidth=${Y} => x:${f.size.x} y:${f.size.y} ${f.widthInColumns} (width * (child?.w || 1)) / 2 ${C*((f==null?void 0:f.widthInColumns)??1)/2}`),O=f.size.x+Y;const H=L.get(b)??0,ee=u.get(b)??M;f.size.y=w.size.y-w.size.height/2+H+ee/2+l,m.debug(`abc88 layout blocks (calc) px, pyid:${f.id}startingPosX${O}${l}${Y}=>x:${f.size.x}y:${f.size.y}${f.widthInColumns}(width * (child?.w || 1)) / 2${C*((f==null?void 0:f.widthInColumns)??1)/2}`)}f.children&&ge(f,n,l);let R=(f==null?void 0:f.widthInColumns)??1;s>0&&(R=Math.min(R,s-t%s)),t+=R,m.debug("abc88 columnsPos",f,t)}}m.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${(v=e==null?void 0:e.size)==null?void 0:v.x} y: ${(T=e==null?void 0:e.size)==null?void 0:T.y} width: ${(h=e==null?void 0:e.size)==null?void 0:h.width}`)}g(ge,"layoutBlocks");function he(e,{minX:n,minY:l,maxX:s,maxY:c}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:p,y:r,width:d,height:x}=e.size;p-d/2<n&&(n=p-d/2),r-x/2<l&&(l=r-x/2),p+d/2>s&&(s=p+d/2),r+x/2>c&&(c=r+x/2)}if(e.children)for(const p of e.children)({minX:n,minY:l,maxX:s,maxY:c}=he(p,{minX:n,minY:l,maxX:s,maxY:c}));return{minX:n,minY:l,maxX:s,maxY:c}}g(he,"findBounds");function Ce(e){var y,S;const n=e.getBlock("root");if(!n)return;const l=((S=(y=me())==null?void 0:y.block)==null?void 0:S.padding)??8;Q(n,e,0,0,l),ge(n,e,l),m.debug("getBlocks",JSON.stringify(n,null,2));const{minX:s,minY:c,maxX:p,maxY:r}=he(n),d=r-c,x=p-s;return{x:s,y:c,width:x,height:d}}g(Ce,"layout");function de(e,n,l=!1){var _,N,I;const s=e;let c="default";(((_=s==null?void 0:s.classes)==null?void 0:_.length)||0)>0&&(c=((s==null?void 0:s.classes)??[]).join(" ")),c=c+" flowchart-label";const p=((s==null?void 0:s.classes)??[]).flatMap(D=>{var v;return((v=n.getClasses().get(D))==null?void 0:v.styles)??[]});let r=0,d="rect",x;switch(s.type){case"round":r=5,d="rect";break;case"composite":r=0,d="composite",x=0;break;case"square":d="rect";break;case"diamond":d="question";break;case"hexagon":d="hexagon";break;case"block_arrow":d="block_arrow";break;case"odd":d="rect_left_inv_arrow";break;case"lean_right":d="lean_right";break;case"lean_left":d="lean_left";break;case"trapezoid":d="trapezoid";break;case"inv_trapezoid":d="inv_trapezoid";break;case"rect_left_inv_arrow":d="rect_left_inv_arrow";break;case"circle":d="circle";break;case"ellipse":d="ellipse";break;case"stadium":d="stadium";break;case"subroutine":d="subroutine";break;case"cylinder":d="cylinder";break;case"group":d="rect";break;case"doublecircle":d="doublecircle";break;default:d="rect"}const y=xt((s==null?void 0:s.styles)??[]),S=s.label,E=s.size??{width:0,height:0,x:0,y:0},z=n.getDiagramId();return{labelStyle:y.labelStyle,shape:d,label:S,labelText:S,rx:r,ry:r,class:c,cssClasses:c,cssStyles:(s==null?void 0:s.styles)??[],cssCompiledStyles:p,style:y.style,id:s.id,domId:z?`${z}-${s.id}`:s.id,isGroup:!1,directions:s.directions,width:E.width||void 0,height:E.height||void 0,wrappingWidth:E.width||Number.POSITIVE_INFINITY,x:E.x,y:E.y,positioned:l,intersect:void 0,padding:x??((I=(N=X())==null?void 0:N.block)==null?void 0:I.padding)??0,widthInColumns:s.widthInColumns??1}}g(de,"getNodeFromBlock");async function ve(e,n,l){var x;const s=de(n,l,!1);if(n.type==="group")return;const c=X(),p=await be(e,s,{config:c}),r=((x=p.node())==null?void 0:x.getBBox())??{width:0,height:0},d=l.getBlock(s.id);d.size={width:r.width,height:r.height,x:0,y:0,node:p},l.setBlock(d),p.remove()}g(ve,"calculateBlockSize");async function ze(e,n,l){const s=de(n,l,!0);if(l.getBlock(s.id).type!=="space"){const p=X();await be(e,s,{config:p}),n.intersect=s==null?void 0:s.intersect,Lt(s)}}g(ze,"insertBlockPositioned");async function $(e,n,l,s){for(const c of n)await s(e,c,l),c.children&&await $(e,c.children,l,s)}g($,"performOperations");async function Ae(e,n,l){await $(e,n,l,ve)}g(Ae,"calculateBlockSizes");async function Be(e,n,l){await $(e,n,l,ze)}g(Be,"insertBlocks");async function Re(e,n,l,s,c){const p=new ht({multigraph:!0,compound:!0});p.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const r of l)r.size&&p.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(const r of n)if(r.start&&r.end){const d=s.getBlock(r.start),x=s.getBlock(r.end);if(d!=null&&d.size&&(x!=null&&x.size)){const y=d.size,S=x.size,E=[{x:y.x,y:y.y},{x:y.x+(S.x-y.x)/2,y:y.y+(S.y-y.y)/2},{x:S.x,y:S.y}],z=c?`${c}-${r.id}`:r.id,A=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",_=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",N=`${A} ${_} flowchart-link LS-a1 LE-b1`;dt(e,{...r,id:z,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:E,classes:N},{},"block",p.node(r.start),p.node(r.end),c),r.label&&(await pt(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:E,classes:N}),ft({...r,x:E[1].x,y:E[1].y},{originalPath:E}))}}}g(Re,"insertEdges");var Jt=g(function(e,n){return n.db.getClasses()},"getClasses"),Zt=g(async function(e,n,l,s){var v;const{securityLevel:c,block:p}=X(),r=s.db;r.setDiagramId(n);let d;c==="sandbox"&&(d=J("#i"+n));const x=c==="sandbox"?J(d.nodes()[0].contentDocument.body):J("body"),y=c==="sandbox"?x.select(`[id="${n}"]`):J(`[id="${n}"]`);ct(y,["point","circle","cross"],s.type,n);const E=r.getBlocks(),z=r.getBlocksFlat(),A=r.getEdges(),_=y.insert("g").attr("class","block");await Ae(_,E,r);const N=Ce(r);await Be(_,E,r),await Re(_,A,z,r,n);const I=(v=_.node())==null?void 0:v.getBBox(),D=I&&Number.isFinite(I.width)&&Number.isFinite(I.height)?I:N;if(D){const T=Math.max(1,Math.round(.125*(D.width/D.height))),h=D.height+T+10,i=D.width+10,{useMaxWidth:o}=p;lt(y,h,i,!!o),m.debug("Here Bounds",N,D),y.attr("viewBox",`${D.x-5} ${D.y-5} ${D.width+10} ${D.height+10}`)}},"draw"),Qt={draw:Zt,getClasses:Jt},is={parser:Tt,db:jt,renderer:Qt,styles:Gt};export{is as diagram};
|